var PAPAYA_BUILD_NUM="1449",papayaLoadableImages=[];
(function(a,b){function e(a){var b=a.length,d=N.type(a);return N.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===d||"function"!==d&&(0===b||"number"===typeof b&&0<b&&b-1 in a)}function d(a){var b=Jc[a]={};N.each(a.match(bc)||[],function(a,d){b[d]=!0});return b}function f(a,d,f,h){if(N.acceptData(a)){var e=N.expando,k="string"===typeof d,m=a.nodeType,n=m?N.cache:a,q=m?a[e]:a[e]&&e;if(q&&n[q]&&(h||n[q].data)||!k||f!==b){q||(m?a[e]=q=cc.pop()||N.guid++:q=e);n[q]||(n[q]={},m||(n[q].toJSON=N.noop));if("object"===
typeof d||"function"===typeof d)h?n[q]=N.extend(n[q],d):n[q].data=N.extend(n[q].data,d);a=n[q];h||(a.data||(a.data={}),a=a.data);f!==b&&(a[N.camelCase(d)]=f);k?(f=a[d],null==f&&(f=a[N.camelCase(d)])):f=a;return f}}}function k(a,b,d){if(N.acceptData(a)){var f,h,e,k=a.nodeType,m=k?N.cache:a,n=k?a[N.expando]:N.expando;if(m[n]){if(b&&(e=d?m[n]:m[n].data)){N.isArray(b)?b=b.concat(N.map(b,N.camelCase)):b in e?b=[b]:(b=N.camelCase(b),b=b in e?[b]:b.split(" "));f=0;for(h=b.length;f<h;f++)delete e[b[f]];if(!(d?
r:N.isEmptyObject)(e))return}if(!d&&(delete m[n].data,!r(m[n])))return;k?N.cleanData([a],!0):N.support.deleteExpando||m!=m.window?delete m[n]:m[n]=null}}}function h(a,d,f){if(f===b&&1===a.nodeType)if(f="data-"+d.replace(Kc,"-$1").toLowerCase(),f=a.getAttribute(f),"string"===typeof f){try{f="true"===f?!0:"false"===f?!1:"null"===f?null:+f+""===f?+f:ib.test(f)?N.parseJSON(f):f}catch(h){}N.data(a,d,f)}else f=b;return f}function r(a){for(var b in a)if(("data"!==b||!N.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;
return!0}function q(){return!0}function t(){return!1}function y(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}function G(a,b,d){b=b||0;if(N.isFunction(b))return N.grep(a,function(a,f){return!!b.call(a,f,a)===d});if(b.nodeType)return N.grep(a,function(a){return a===b===d});if("string"===typeof b){var f=N.grep(a,function(a){return 1===a.nodeType});if(Lc.test(b))return N.filter(b,f,!d);b=N.filter(b,f)}return N.grep(a,function(a){return 0<=N.inArray(a,b)===d})}function B(a){var b=Ya.split("|");a=a.createDocumentFragment();
if(a.createElement)for(;b.length;)a.createElement(b.pop());return a}function w(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function E(a){var b=a.getAttributeNode("type");a.type=(b&&b.specified)+"/"+a.type;return a}function P(a){var b=cd.exec(a.type);b?a.type=b[1]:a.removeAttribute("type");return a}function da(a,b){for(var d,f=0;null!=(d=a[f]);f++)N._data(d,"globalEval",!b||N._data(b[f],"globalEval"))}function aa(a,b){if(1===b.nodeType&&N.hasData(a)){var d,
f,h;f=N._data(a);var e=N._data(b,f),k=f.events;if(k)for(d in delete e.handle,e.events={},k)for(f=0,h=k[d].length;f<h;f++)N.event.add(b,d,k[d][f]);e.data&&(e.data=N.extend({},e.data))}}function M(a,d){var f,h,e=0,k=typeof a.getElementsByTagName!==ab?a.getElementsByTagName(d||"*"):typeof a.querySelectorAll!==ab?a.querySelectorAll(d||"*"):b;if(!k)for(k=[],f=a.childNodes||a;null!=(h=f[e]);e++)!d||N.nodeName(h,d)?k.push(h):N.merge(k,M(h,d));return d===b||d&&N.nodeName(a,d)?N.merge([a],k):k}function ka(a){dd.test(a.type)&&
(a.defaultChecked=a.checked)}function m(a,b){if(b in a)return b;for(var d=b.charAt(0).toUpperCase()+b.slice(1),f=b,h=td.length;h--;)if(b=td[h]+d,b in a)return b;return f}function fa(a,b){a=b||a;return"none"===N.css(a,"display")||!N.contains(a.ownerDocument,a)}function ba(a,b){for(var d,f,h,e=[],k=0,m=a.length;k<m;k++)f=a[k],f.style&&(e[k]=N._data(f,"olddisplay"),d=f.style.display,b?(e[k]||"none"!==d||(f.style.display=""),""===f.style.display&&fa(f)&&(e[k]=N._data(f,"olddisplay",x(f.nodeName)))):e[k]||
(h=fa(f),(d&&"none"!==d||!h)&&N._data(f,"olddisplay",h?d:N.css(f,"display"))));for(k=0;k<m;k++)f=a[k],!f.style||b&&"none"!==f.style.display&&""!==f.style.display||(f.style.display=b?e[k]||"":"none");return a}function Z(a,b,d){return(a=Xd.exec(b))?Math.max(0,a[1]-(d||0))+(a[2]||"px"):b}function X(a,b,d,f,h){b=d===(f?"border":"content")?4:"width"===b?1:0;for(var e=0;4>b;b+=2)"margin"===d&&(e+=N.css(a,d+Mc[b],!0,h)),f?("content"===d&&(e-=N.css(a,"padding"+Mc[b],!0,h)),"margin"!==d&&(e-=N.css(a,"border"+
Mc[b]+"Width",!0,h))):(e+=N.css(a,"padding"+Mc[b],!0,h),"padding"!==d&&(e+=N.css(a,"border"+Mc[b]+"Width",!0,h)));return e}function U(a,b,d){var f=!0,h="width"===b?a.offsetWidth:a.offsetHeight,e=qb(a),k=N.support.boxSizing&&"border-box"===N.css(a,"boxSizing",!1,e);if(0>=h||null==h){h=Cc(a,b,e);if(0>h||null==h)h=a.style[b];if(Dc.test(h))return h;f=k&&(N.support.boxSizingReliable||h===a.style[b]);h=parseFloat(h)||0}return h+X(a,b,d||(k?"border":"content"),f,e)+"px"}function x(a){var b=Ba,d=Tc[a];d||
(d=n(a,b),"none"!==d&&d||(ra=(ra||N("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(b.documentElement),b=(ra[0].contentWindow||ra[0].contentDocument).document,b.write("<!doctype html><html><body>"),b.close(),d=n(a,b),ra.detach()),Tc[a]=d);return d}function n(a,b){var d=N(b.createElement(a)).appendTo(b.body),f=N.css(d[0],"display");d.remove();return f}function z(a,b,d,f){var h;if(N.isArray(b))N.each(b,function(b,h){d||zd.test(a)?f(a,h):z(a+"["+
("object"===typeof h?b:"")+"]",h,d,f)});else if(d||"object"!==N.type(b))f(a,b);else for(h in b)z(a+"["+h+"]",b[h],d,f)}function Y(a){return function(b,d){"string"!==typeof b&&(d=b,b="*");var f,h=0,e=b.toLowerCase().match(bc)||[];if(N.isFunction(d))for(;f=e[h++];)"+"===f[0]?(f=f.slice(1)||"*",(a[f]=a[f]||[]).unshift(d)):(a[f]=a[f]||[]).push(d)}}function D(a,b,d,f){function h(m){var n;e[m]=!0;N.each(a[m]||[],function(a,m){var q=m(b,d,f);if("string"===typeof q&&!k&&!e[q])return b.dataTypes.unshift(q),
h(q),!1;if(k)return!(n=q)});return n}var e={},k=a===Ad;return h(b.dataTypes[0])||!e["*"]&&h("*")}function A(a,d){var f,h,e=N.ajaxSettings.flatOptions||{};for(h in d)d[h]!==b&&((e[h]?a:f||(f={}))[h]=d[h]);f&&N.extend(!0,a,f);return a}function L(){try{return new a.XMLHttpRequest}catch(b){}}function la(){setTimeout(function(){Zd=b});return Zd=N.now()}function ja(a,b){N.each(b,function(b,d){for(var f=(oe[b]||[]).concat(oe["*"]),h=0,e=f.length;h<e&&!f[h].call(a,b,d);h++);})}function Ia(a,b,d){var f,h=
0,e=$d.length,k=N.Deferred().always(function(){delete m.elem}),m=function(){if(f)return!1;for(var b=Zd||la(),b=Math.max(0,n.startTime+n.duration-b),d=1-(b/n.duration||0),h=0,e=n.tweens.length;h<e;h++)n.tweens[h].run(d);k.notifyWith(a,[n,d,b]);if(1>d&&e)return b;k.resolveWith(a,[n]);return!1},n=k.promise({elem:a,props:N.extend({},b),opts:N.extend(!0,{specialEasing:{}},d),originalProperties:b,originalOptions:d,startTime:Zd||la(),duration:d.duration,tweens:[],createTween:function(b,d){var f=N.Tween(a,
n.opts,b,d,n.opts.specialEasing[b]||n.opts.easing);n.tweens.push(f);return f},stop:function(b){var d=0,h=b?n.tweens.length:0;if(f)return this;for(f=!0;d<h;d++)n.tweens[d].run(1);b?k.resolveWith(a,[n,b]):k.rejectWith(a,[n,b]);return this}});d=n.props;for(va(d,n.opts.specialEasing);h<e;h++)if(b=$d[h].call(n,a,d,n.opts))return b;ja(n,d);N.isFunction(n.opts.start)&&n.opts.start.call(a,n);N.fx.timer(N.extend(m,{elem:a,anim:n,queue:n.opts.queue}));return n.progress(n.opts.progress).done(n.opts.done,n.opts.complete).fail(n.opts.fail).always(n.opts.always)}
function va(a,b){var d,f,h,e,k;for(h in a)if(f=N.camelCase(h),e=b[f],d=a[h],N.isArray(d)&&(e=d[1],d=a[h]=d[0]),h!==f&&(a[f]=d,delete a[h]),(k=N.cssHooks[f])&&"expand"in k)for(h in d=k.expand(d),delete a[f],d)h in a||(a[h]=d[h],b[h]=e);else b[f]=e}function O(a,b,d,f,h){return new O.prototype.init(a,b,d,f,h)}function wa(a,b){var d,f={height:a},h=0;for(b=b?1:0;4>h;h+=2-b)d=Mc[h],f["margin"+d]=f["padding"+d]=a;b&&(f.opacity=f.width=a);return f}function Ua(a){return N.isWindow(a)?a:9===a.nodeType?a.defaultView||
a.parentWindow:!1}var lb,ha,ab=typeof b,Ba=a.document,nb=a.location,Ra=a.jQuery,dc=a.$,gc={},cc=[],zb=cc.concat,kc=cc.push,mc=cc.slice,ic=cc.indexOf,vb=gc.toString,mb=gc.hasOwnProperty,nc="1.9.1".trim,N=function(a,b){return new N.fn.init(a,b,ha)},ed=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,bc=/\S+/g,ec=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,Nc=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,Oa=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Eb=/^[\],:{}\s]*$/,Oc=/(?:^|:|,)(?:\s*\[)+/g,tc=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,hc=
/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,fd=/^-ms-/,wc=/-([\da-z])/gi,Gb=function(a,b){return b.toUpperCase()},Ab=function(a){if(Ba.addEventListener||"load"===a.type||"complete"===Ba.readyState)db(),N.ready()},db=function(){Ba.addEventListener?(Ba.removeEventListener("DOMContentLoaded",Ab,!1),a.removeEventListener("load",Ab,!1)):(Ba.detachEvent("onreadystatechange",Ab),a.detachEvent("onload",Ab))};N.fn=N.prototype={jquery:"1.9.1",constructor:N,init:function(a,d,f){var h;if(!a)return this;
if("string"===typeof a){h="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&3<=a.length?[null,a,null]:Nc.exec(a);if(!h||!h[1]&&d)return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a);if(h[1]){if(d=d instanceof N?d[0]:d,N.merge(this,N.parseHTML(h[1],d&&d.nodeType?d.ownerDocument||d:Ba,!0)),Oa.test(h[1])&&N.isPlainObject(d))for(h in d)if(N.isFunction(this[h]))this[h](d[h]);else this.attr(h,d[h])}else{if((d=Ba.getElementById(h[2]))&&d.parentNode){if(d.id!==h[2])return f.find(a);this.length=1;this[0]=
d}this.context=Ba;this.selector=a}return this}if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(N.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return N.makeArray(a,this)},selector:"",length:0,size:function(){return this.length},toArray:function(){return mc.call(this)},get:function(a){return null==a?this.toArray():0>a?this[this.length+a]:this[a]},pushStack:function(a){a=N.merge(this.constructor(),a);a.prevObject=this;a.context=this.context;
return a},each:function(a,b){return N.each(this,a,b)},ready:function(a){N.ready.promise().done(a);return this},slice:function(){return this.pushStack(mc.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length;a=+a+(0>a?b:0);return this.pushStack(0<=a&&a<b?[this[a]]:[])},map:function(a){return this.pushStack(N.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:kc,
sort:[].sort,splice:[].splice};N.fn.init.prototype=N.fn;N.extend=N.fn.extend=function(){var a,d,f,h,e,k=arguments[0]||{},m=1,n=arguments.length,q=!1;"boolean"===typeof k&&(q=k,k=arguments[1]||{},m=2);"object"===typeof k||N.isFunction(k)||(k={});n===m&&(k=this,--m);for(;m<n;m++)if(null!=(e=arguments[m]))for(h in e)a=k[h],f=e[h],k!==f&&(q&&f&&(N.isPlainObject(f)||(d=N.isArray(f)))?(d?(d=!1,a=a&&N.isArray(a)?a:[]):a=a&&N.isPlainObject(a)?a:{},k[h]=N.extend(q,a,f)):f!==b&&(k[h]=f));return k};N.extend({noConflict:function(b){a.$===
N&&(a.$=dc);b&&a.jQuery===N&&(a.jQuery=Ra);return N},isReady:!1,readyWait:1,holdReady:function(a){a?N.readyWait++:N.ready(!0)},ready:function(a){if(!0===a?!--N.readyWait:!N.isReady){if(!Ba.body)return setTimeout(N.ready);N.isReady=!0;!0!==a&&0<--N.readyWait||(lb.resolveWith(Ba,[N]),N.fn.trigger&&N(Ba).trigger("ready").off("ready"))}},isFunction:function(a){return"function"===N.type(a)},isArray:Array.isArray||function(a){return"array"===N.type(a)},isWindow:function(a){return null!=a&&a==a.window},
isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return null==a?String(a):"object"===typeof a||"function"===typeof a?gc[vb.call(a)]||"object":typeof a},isPlainObject:function(a){if(!a||"object"!==N.type(a)||a.nodeType||N.isWindow(a))return!1;try{if(a.constructor&&!mb.call(a,"constructor")&&!mb.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(d){return!1}for(var f in a);return f===b||mb.call(a,f)},isEmptyObject:function(a){for(var b in a)return!1;return!0},
error:function(a){throw Error(a);},parseHTML:function(a,b,d){if(!a||"string"!==typeof a)return null;"boolean"===typeof b&&(d=b,b=!1);b=b||Ba;var f=Oa.exec(a);d=!d&&[];if(f)return[b.createElement(f[1])];f=N.buildFragment([a],b,d);d&&N(d).remove();return N.merge([],f.childNodes)},parseJSON:function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(null===b)return b;if("string"===typeof b&&(b=N.trim(b))&&Eb.test(b.replace(tc,"@").replace(hc,"]").replace(Oc,"")))return(new Function("return "+b))();
N.error("Invalid JSON: "+b)},parseXML:function(d){var f,h;if(!d||"string"!==typeof d)return null;try{a.DOMParser?(h=new DOMParser,f=h.parseFromString(d,"text/xml")):(f=new ActiveXObject("Microsoft.XMLDOM"),f.async="false",f.loadXML(d))}catch(e){f=b}f&&f.documentElement&&!f.getElementsByTagName("parsererror").length||N.error("Invalid XML: "+d);return f},noop:function(){},globalEval:function(b){b&&N.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(fd,
"ms-").replace(wc,Gb)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,d){var f,h=0,k=a.length;f=e(a);if(d)if(f)for(;h<k&&(f=b.apply(a[h],d),!1!==f);h++);else for(h in a){if(f=b.apply(a[h],d),!1===f)break}else if(f)for(;h<k&&(f=b.call(a[h],h,a[h]),!1!==f);h++);else for(h in a)if(f=b.call(a[h],h,a[h]),!1===f)break;return a},trim:nc&&!nc.call("\ufeff\u00a0")?function(a){return null==a?"":nc.call(a)}:function(a){return null==a?"":(a+"").replace(ec,
"")},makeArray:function(a,b){var d=b||[];null!=a&&(e(Object(a))?N.merge(d,"string"===typeof a?[a]:a):kc.call(d,a));return d},inArray:function(a,b,d){var f;if(b){if(ic)return ic.call(b,a,d);f=b.length;for(d=d?0>d?Math.max(0,f+d):d:0;d<f;d++)if(d in b&&b[d]===a)return d}return-1},merge:function(a,d){var f=d.length,h=a.length,e=0;if("number"===typeof f)for(;e<f;e++)a[h++]=d[e];else for(;d[e]!==b;)a[h++]=d[e++];a.length=h;return a},grep:function(a,b,d){var f,h=[],e=0,k=a.length;for(d=!!d;e<k;e++)f=!!b(a[e],
e),d!==f&&h.push(a[e]);return h},map:function(a,b,d){var f,h=0,k=a.length,m=[];if(e(a))for(;h<k;h++)f=b(a[h],h,d),null!=f&&(m[m.length]=f);else for(h in a)f=b(a[h],h,d),null!=f&&(m[m.length]=f);return zb.apply([],m)},guid:1,proxy:function(a,d){var f,h;"string"===typeof d&&(h=a[d],d=a,a=h);if(!N.isFunction(a))return b;f=mc.call(arguments,2);h=function(){return a.apply(d||this,f.concat(mc.call(arguments)))};h.guid=a.guid=a.guid||N.guid++;return h},access:function(a,d,f,h,e,k,m){var n=0,q=a.length,r=
null==f;if("object"===N.type(f))for(n in e=!0,f)N.access(a,d,n,f[n],!0,k,m);else if(h!==b&&(e=!0,N.isFunction(h)||(m=!0),r&&(m?(d.call(a,h),d=null):(r=d,d=function(a,b,d){return r.call(N(a),d)})),d))for(;n<q;n++)d(a[n],f,m?h:h.call(a[n],n,d(a[n],f)));return e?a:r?d.call(a):q?d(a[0],f):k},now:function(){return(new Date).getTime()}});N.ready.promise=function(b){if(!lb)if(lb=N.Deferred(),"complete"===Ba.readyState)setTimeout(N.ready);else if(Ba.addEventListener)Ba.addEventListener("DOMContentLoaded",
Ab,!1),a.addEventListener("load",Ab,!1);else{Ba.attachEvent("onreadystatechange",Ab);a.attachEvent("onload",Ab);var d=!1;try{d=null==a.frameElement&&Ba.documentElement}catch(f){}d&&d.doScroll&&function Be(){if(!N.isReady){try{d.doScroll("left")}catch(a){return setTimeout(Be,50)}db();N.ready()}}()}return lb.promise(b)};N.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){gc["[object "+b+"]"]=b.toLowerCase()});ha=N(Ba);var Jc={};N.Callbacks=function(a){a="string"===
typeof a?Jc[a]||d(a):N.extend({},a);var f,h,e,k,m,n,q=[],r=!a.once&&[],x=function(b){h=a.memory&&b;e=!0;m=n||0;n=0;k=q.length;for(f=!0;q&&m<k;m++)if(!1===q[m].apply(b[0],b[1])&&a.stopOnFalse){h=!1;break}f=!1;q&&(r?r.length&&x(r.shift()):h?q=[]:t.disable())},t={add:function(){if(q){var b=q.length;(function hf(b){N.each(b,function(b,d){var f=N.type(d);"function"===f?a.unique&&t.has(d)||q.push(d):d&&d.length&&"string"!==f&&hf(d)})})(arguments);f?k=q.length:h&&(n=b,x(h))}return this},remove:function(){q&&
N.each(arguments,function(a,b){for(var d;-1<(d=N.inArray(b,q,d));)q.splice(d,1),f&&(d<=k&&k--,d<=m&&m--)});return this},has:function(a){return a?-1<N.inArray(a,q):!(!q||!q.length)},empty:function(){q=[];return this},disable:function(){q=r=h=b;return this},disabled:function(){return!q},lock:function(){r=b;h||t.disable();return this},locked:function(){return!r},fireWith:function(a,b){b=b||[];b=[a,b.slice?b.slice():b];!q||e&&!r||(f?r.push(b):x(b));return this},fire:function(){t.fireWith(this,arguments);
return this},fired:function(){return!!e}};return t};N.extend({Deferred:function(a){var b=[["resolve","done",N.Callbacks("once memory"),"resolved"],["reject","fail",N.Callbacks("once memory"),"rejected"],["notify","progress",N.Callbacks("memory")]],d="pending",f={state:function(){return d},always:function(){h.done(arguments).fail(arguments);return this},then:function(){var a=arguments;return N.Deferred(function(d){N.each(b,function(b,e){var k=e[0],m=N.isFunction(a[b])&&a[b];h[e[1]](function(){var a=
m&&m.apply(this,arguments);if(a&&N.isFunction(a.promise))a.promise().done(d.resolve).fail(d.reject).progress(d.notify);else d[k+"With"](this===f?d.promise():this,m?[a]:arguments)})});a=null}).promise()},promise:function(a){return null!=a?N.extend(a,f):f}},h={};f.pipe=f.then;N.each(b,function(a,e){var k=e[2],m=e[3];f[e[1]]=k.add;m&&k.add(function(){d=m},b[a^1][2].disable,b[2][2].lock);h[e[0]]=function(){h[e[0]+"With"](this===h?f:this,arguments);return this};h[e[0]+"With"]=k.fireWith});f.promise(h);
a&&a.call(h,h);return h},when:function(a){var b=0,d=mc.call(arguments),f=d.length,h=1!==f||a&&N.isFunction(a.promise)?f:0,e=1===h?a:N.Deferred(),k=function(a,b,d){return function(f){b[a]=this;d[a]=1<arguments.length?mc.call(arguments):f;d===m?e.notifyWith(b,d):--h||e.resolveWith(b,d)}},m,n,q;if(1<f)for(m=Array(f),n=Array(f),q=Array(f);b<f;b++)d[b]&&N.isFunction(d[b].promise)?d[b].promise().done(k(b,q,d)).fail(e.reject).progress(k(b,n,m)):--h;h||e.resolveWith(q,d);return e.promise()}});N.support=function(){var b,
d,f,h,e,k,m,n=Ba.createElement("div");n.setAttribute("className","t");n.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";d=n.getElementsByTagName("*");f=n.getElementsByTagName("a")[0];if(!d||!f||!d.length)return{};h=Ba.createElement("select");e=h.appendChild(Ba.createElement("option"));d=n.getElementsByTagName("input")[0];f.style.cssText="top:1px;float:left;opacity:.5";b={getSetAttribute:"t"!==n.className,leadingWhitespace:3===n.firstChild.nodeType,tbody:!n.getElementsByTagName("tbody").length,
htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(f.getAttribute("style")),hrefNormalized:"/a"===f.getAttribute("href"),opacity:/^0.5/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,checkOn:!!d.value,optSelected:e.selected,enctype:!!Ba.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==Ba.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===Ba.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,
boxSizingReliable:!0,pixelPosition:!1};d.checked=!0;b.noCloneChecked=d.cloneNode(!0).checked;h.disabled=!0;b.optDisabled=!e.disabled;try{delete n.test}catch(q){b.deleteExpando=!1}d=Ba.createElement("input");d.setAttribute("value","");b.input=""===d.getAttribute("value");d.value="t";d.setAttribute("type","radio");b.radioValue="t"===d.value;d.setAttribute("checked","t");d.setAttribute("name","t");f=Ba.createDocumentFragment();f.appendChild(d);b.appendChecked=d.checked;b.checkClone=f.cloneNode(!0).cloneNode(!0).lastChild.checked;
n.attachEvent&&(n.attachEvent("onclick",function(){b.noCloneEvent=!1}),n.cloneNode(!0).click());for(m in{submit:!0,change:!0,focusin:!0})n.setAttribute(f="on"+m,"t"),b[m+"Bubbles"]=f in a||!1===n.attributes[f].expando;n.style.backgroundClip="content-box";n.cloneNode(!0).style.backgroundClip="";b.clearCloneStyle="content-box"===n.style.backgroundClip;N(function(){var d,f,h=Ba.getElementsByTagName("body")[0];h&&(d=Ba.createElement("div"),d.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",
h.appendChild(d).appendChild(n),n.innerHTML="<table><tr><td></td><td>t</td></tr></table>",f=n.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",k=0===f[0].offsetHeight,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=k&&0===f[0].offsetHeight,n.innerHTML="",n.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",
b.boxSizing=4===n.offsetWidth,b.doesNotIncludeMarginInBodyOffset=1!==h.offsetTop,a.getComputedStyle&&(b.pixelPosition="1%"!==(a.getComputedStyle(n,null)||{}).top,b.boxSizingReliable="4px"===(a.getComputedStyle(n,null)||{width:"4px"}).width,f=n.appendChild(Ba.createElement("div")),f.style.cssText=n.style.cssText="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",f.style.marginRight=f.style.width="0",n.style.width="1px",b.reliableMarginRight=
!parseFloat((a.getComputedStyle(f,null)||{}).marginRight)),typeof n.style.zoom!==ab&&(n.innerHTML="",n.style.cssText="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=3===n.offsetWidth,n.style.display="block",n.innerHTML="<div></div>",n.firstChild.style.width="5px",b.shrinkWrapBlocks=3!==n.offsetWidth,b.inlineBlockNeedsLayout&&(h.style.zoom=1)),h.removeChild(d),
n=null)});d=h=f=e=f=d=null;return b}();var ib=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,Kc=/([A-Z])/g;N.extend({cache:{},expando:"jQuery"+("1.9.1"+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?N.cache[a[N.expando]]:a[N.expando];return!!a&&!r(a)},data:function(a,b,d){return f(a,b,d)},removeData:function(a,b){return k(a,b)},_data:function(a,b,d){return f(a,b,d,!0)},_removeData:function(a,b){return k(a,b,!0)},acceptData:function(a){if(a.nodeType&&
1!==a.nodeType&&9!==a.nodeType)return!1;var b=a.nodeName&&N.noData[a.nodeName.toLowerCase()];return!b||!0!==b&&a.getAttribute("classid")===b}});N.fn.extend({data:function(a,d){var f,e,k=this[0],m=0,n=null;if(a===b){if(this.length&&(n=N.data(k),1===k.nodeType&&!N._data(k,"parsedAttrs"))){for(f=k.attributes;m<f.length;m++)e=f[m].name,e.indexOf("data-")||(e=N.camelCase(e.slice(5)),h(k,e,n[e]));N._data(k,"parsedAttrs",!0)}return n}return"object"===typeof a?this.each(function(){N.data(this,a)}):N.access(this,
function(d){if(d===b)return k?h(k,a,N.data(k,a)):null;this.each(function(){N.data(this,a,d)})},null,d,1<arguments.length,null,!0)},removeData:function(a){return this.each(function(){N.removeData(this,a)})}});N.extend({queue:function(a,b,d){var f;if(a)return b=(b||"fx")+"queue",f=N._data(a,b),d&&(!f||N.isArray(d)?f=N._data(a,b,N.makeArray(d)):f.push(d)),f||[]},dequeue:function(a,b){b=b||"fx";var d=N.queue(a,b),f=d.length,h=d.shift(),e=N._queueHooks(a,b),k=function(){N.dequeue(a,b)};"inprogress"===
h&&(h=d.shift(),f--);if(e.cur=h)"fx"===b&&d.unshift("inprogress"),delete e.stop,h.call(a,k,e);!f&&e&&e.empty.fire()},_queueHooks:function(a,b){var d=b+"queueHooks";return N._data(a,d)||N._data(a,d,{empty:N.Callbacks("once memory").add(function(){N._removeData(a,b+"queue");N._removeData(a,d)})})}});N.fn.extend({queue:function(a,d){var f=2;"string"!==typeof a&&(d=a,a="fx",f--);return arguments.length<f?N.queue(this[0],a):d===b?this:this.each(function(){var b=N.queue(this,a,d);N._queueHooks(this,a);
"fx"===a&&"inprogress"!==b[0]&&N.dequeue(this,a)})},dequeue:function(a){return this.each(function(){N.dequeue(this,a)})},delay:function(a,b){a=N.fx?N.fx.speeds[a]||a:a;return this.queue(b||"fx",function(b,d){var f=setTimeout(b,a);d.stop=function(){clearTimeout(f)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,d){var f,h=1,e=N.Deferred(),k=this,m=this.length,n=function(){--h||e.resolveWith(k,[k])};"string"!==typeof a&&(d=a,a=b);for(a=a||"fx";m--;)(f=N._data(k[m],a+"queueHooks"))&&
f.empty&&(h++,f.empty.add(n));n();return e.promise(d)}});var Ec,pc,qc=/[\t\r\n]/g,Uc=/\r/g,Bd=/^(?:input|select|textarea|button|object)$/i,Vc=/^(?:a|area)$/i,xc=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,Qb=/^(?:checked|selected)$/i,fc=N.support.getSetAttribute,Hb=N.support.input;N.fn.extend({attr:function(a,b){return N.access(this,N.attr,a,b,1<arguments.length)},removeAttr:function(a){return this.each(function(){N.removeAttr(this,
a)})},prop:function(a,b){return N.access(this,N.prop,a,b,1<arguments.length)},removeProp:function(a){a=N.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(d){}})},addClass:function(a){var b,d,f,h,e,k=0,m=this.length;b="string"===typeof a&&a;if(N.isFunction(a))return this.each(function(b){N(this).addClass(a.call(this,b,this.className))});if(b)for(b=(a||"").match(bc)||[];k<m;k++)if(d=this[k],f=1===d.nodeType&&(d.className?(" "+d.className+" ").replace(qc," "):" ")){for(e=
0;h=b[e++];)0>f.indexOf(" "+h+" ")&&(f+=h+" ");d.className=N.trim(f)}return this},removeClass:function(a){var b,d,f,h,e,k=0,m=this.length;b=0===arguments.length||"string"===typeof a&&a;if(N.isFunction(a))return this.each(function(b){N(this).removeClass(a.call(this,b,this.className))});if(b)for(b=(a||"").match(bc)||[];k<m;k++)if(d=this[k],f=1===d.nodeType&&(d.className?(" "+d.className+" ").replace(qc," "):"")){for(e=0;h=b[e++];)for(;0<=f.indexOf(" "+h+" ");)f=f.replace(" "+h+" "," ");d.className=
a?N.trim(f):""}return this},toggleClass:function(a,b){var d=typeof a,f="boolean"===typeof b;return N.isFunction(a)?this.each(function(d){N(this).toggleClass(a.call(this,d,this.className,b),b)}):this.each(function(){if("string"===d)for(var h,e=0,k=N(this),m=b,n=a.match(bc)||[];h=n[e++];)m=f?m:!k.hasClass(h),k[m?"addClass":"removeClass"](h);else if(d===ab||"boolean"===d)this.className&&N._data(this,"__className__",this.className),this.className=this.className||!1===a?"":N._data(this,"__className__")||
""})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if(1===this[b].nodeType&&0<=(" "+this[b].className+" ").replace(qc," ").indexOf(a))return!0;return!1},val:function(a){var d,f,h,e=this[0];if(arguments.length)return h=N.isFunction(a),this.each(function(d){var e=N(this);1===this.nodeType&&(d=h?a.call(this,d,e.val()):a,null==d?d="":"number"===typeof d?d+="":N.isArray(d)&&(d=N.map(d,function(a){return null==a?"":a+""})),f=N.valHooks[this.type]||N.valHooks[this.nodeName.toLowerCase()],
f&&"set"in f&&f.set(this,d,"value")!==b||(this.value=d))});if(e){if((f=N.valHooks[e.type]||N.valHooks[e.nodeName.toLowerCase()])&&"get"in f&&(d=f.get(e,"value"))!==b)return d;d=e.value;return"string"===typeof d?d.replace(Uc,""):null==d?"":d}}});N.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){for(var b,d=a.options,f=a.selectedIndex,h=(a="select-one"===a.type||0>f)?null:[],e=a?f+1:d.length,k=0>f?e:a?f:0;k<e;k++)if(b=
d[k],!(!b.selected&&k!==f||(N.support.optDisabled?b.disabled:null!==b.getAttribute("disabled"))||b.parentNode.disabled&&N.nodeName(b.parentNode,"optgroup"))){b=N(b).val();if(a)return b;h.push(b)}return h},set:function(a,b){var d=N.makeArray(b);N(a).find("option").each(function(){this.selected=0<=N.inArray(N(this).val(),d)});d.length||(a.selectedIndex=-1);return d}}},attr:function(a,d,f){var h,e,k;e=a.nodeType;if(a&&3!==e&&8!==e&&2!==e){if(typeof a.getAttribute===ab)return N.prop(a,d,f);if(e=1!==e||
!N.isXMLDoc(a))d=d.toLowerCase(),h=N.attrHooks[d]||(xc.test(d)?pc:Ec);if(f!==b)if(null===f)N.removeAttr(a,d);else{if(h&&e&&"set"in h&&(k=h.set(a,f,d))!==b)return k;a.setAttribute(d,f+"");return f}else{if(h&&e&&"get"in h&&null!==(k=h.get(a,d)))return k;typeof a.getAttribute!==ab&&(k=a.getAttribute(d));return null==k?b:k}}},removeAttr:function(a,b){var d,f,h=0,e=b&&b.match(bc);if(e&&1===a.nodeType)for(;d=e[h++];)f=N.propFix[d]||d,xc.test(d)?!fc&&Qb.test(d)?a[N.camelCase("default-"+d)]=a[f]=!1:a[f]=
!1:N.attr(a,d,""),a.removeAttribute(fc?d:f)},attrHooks:{type:{set:function(a,b){if(!N.support.radioValue&&"radio"===b&&N.nodeName(a,"input")){var d=a.value;a.setAttribute("type",b);d&&(a.value=d);return b}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,d,f){var h,
e,k;k=a.nodeType;if(a&&3!==k&&8!==k&&2!==k){if(k=1!==k||!N.isXMLDoc(a))d=N.propFix[d]||d,e=N.propHooks[d];return f!==b?e&&"set"in e&&(h=e.set(a,f,d))!==b?h:a[d]=f:e&&"get"in e&&null!==(h=e.get(a,d))?h:a[d]}},propHooks:{tabIndex:{get:function(a){var d=a.getAttributeNode("tabindex");return d&&d.specified?parseInt(d.value,10):Bd.test(a.nodeName)||Vc.test(a.nodeName)&&a.href?0:b}}}});pc={get:function(a,d){var f=N.prop(a,d),h="boolean"===typeof f&&a.getAttribute(d);return(f="boolean"===typeof f?Hb&&fc?
null!=h:Qb.test(d)?a[N.camelCase("default-"+d)]:!!h:a.getAttributeNode(d))&&!1!==f.value?d.toLowerCase():b},set:function(a,b,d){!1===b?N.removeAttr(a,d):Hb&&fc||!Qb.test(d)?a.setAttribute(!fc&&N.propFix[d]||d,d):a[N.camelCase("default-"+d)]=a[d]=!0;return d}};Hb&&fc||(N.attrHooks.value={get:function(a,d){var f=a.getAttributeNode(d);return N.nodeName(a,"input")?a.defaultValue:f&&f.specified?f.value:b},set:function(a,b,d){if(N.nodeName(a,"input"))a.defaultValue=b;else return Ec&&Ec.set(a,b,d)}});fc||
(Ec=N.valHooks.button={get:function(a,d){var f=a.getAttributeNode(d);return f&&("id"===d||"name"===d||"coords"===d?""!==f.value:f.specified)?f.value:b},set:function(a,d,f){var h=a.getAttributeNode(f);h||a.setAttributeNode(h=a.ownerDocument.createAttribute(f));h.value=d+="";return"value"===f||d===a.getAttribute(f)?d:b}},N.attrHooks.contenteditable={get:Ec.get,set:function(a,b,d){Ec.set(a,""===b?!1:b,d)}},N.each(["width","height"],function(a,b){N.attrHooks[b]=N.extend(N.attrHooks[b],{set:function(a,
d){if(""===d)return a.setAttribute(b,"auto"),d}})}));N.support.hrefNormalized||(N.each(["href","src","width","height"],function(a,d){N.attrHooks[d]=N.extend(N.attrHooks[d],{get:function(a){a=a.getAttribute(d,2);return null==a?b:a}})}),N.each(["href","src"],function(a,b){N.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}));N.support.style||(N.attrHooks.style={get:function(a){return a.style.cssText||b},set:function(a,b){return a.style.cssText=b+""}});N.support.optSelected||(N.propHooks.selected=
N.extend(N.propHooks.selected,{get:function(a){if(a=a.parentNode)a.selectedIndex,a.parentNode&&a.parentNode.selectedIndex;return null}}));N.support.enctype||(N.propFix.enctype="encoding");N.support.checkOn||N.each(["radio","checkbox"],function(){N.valHooks[this]={get:function(a){return null===a.getAttribute("value")?"on":a.value}}});N.each(["radio","checkbox"],function(){N.valHooks[this]=N.extend(N.valHooks[this],{set:function(a,b){if(N.isArray(b))return a.checked=0<=N.inArray(N(a).val(),b)}})});
var Wc=/^(?:input|select|textarea)$/i,ob=/^key/,Xc=/^(?:mouse|contextmenu)|click/,Ib=/^(?:focusinfocus|focusoutblur)$/,Rb=/^([^.]*)(?:\.(.+)|)$/;N.event={global:{},add:function(a,d,f,h,e){var k,m,n,q,r,x,t,z,A;if(n=N._data(a)){f.handler&&(q=f,f=q.handler,e=q.selector);f.guid||(f.guid=N.guid++);(m=n.events)||(m=n.events={});(r=n.handle)||(r=n.handle=function(a){return typeof N===ab||a&&N.event.triggered===a.type?b:N.event.dispatch.apply(r.elem,arguments)},r.elem=a);d=(d||"").match(bc)||[""];for(n=
d.length;n--;)k=Rb.exec(d[n])||[],z=x=k[1],A=(k[2]||"").split(".").sort(),k=N.event.special[z]||{},z=(e?k.delegateType:k.bindType)||z,k=N.event.special[z]||{},x=N.extend({type:z,origType:x,data:h,handler:f,guid:f.guid,selector:e,needsContext:e&&N.expr.match.needsContext.test(e),namespace:A.join(".")},q),(t=m[z])||(t=m[z]=[],t.delegateCount=0,k.setup&&!1!==k.setup.call(a,h,A,r)||(a.addEventListener?a.addEventListener(z,r,!1):a.attachEvent&&a.attachEvent("on"+z,r))),k.add&&(k.add.call(a,x),x.handler.guid||
(x.handler.guid=f.guid)),e?t.splice(t.delegateCount++,0,x):t.push(x),N.event.global[z]=!0;a=null}},remove:function(a,b,d,f,h){var e,k,m,n,q,r,x,t,z,A,y,E=N.hasData(a)&&N._data(a);if(E&&(r=E.events)){b=(b||"").match(bc)||[""];for(q=b.length;q--;)if(m=Rb.exec(b[q])||[],z=y=m[1],A=(m[2]||"").split(".").sort(),z){x=N.event.special[z]||{};z=(f?x.delegateType:x.bindType)||z;t=r[z]||[];m=m[2]&&new RegExp("(^|\\.)"+A.join("\\.(?:.*\\.|)")+"(\\.|$)");for(n=e=t.length;e--;)k=t[e],!h&&y!==k.origType||d&&d.guid!==
k.guid||m&&!m.test(k.namespace)||f&&f!==k.selector&&("**"!==f||!k.selector)||(t.splice(e,1),k.selector&&t.delegateCount--,x.remove&&x.remove.call(a,k));n&&!t.length&&(x.teardown&&!1!==x.teardown.call(a,A,E.handle)||N.removeEvent(a,z,E.handle),delete r[z])}else for(z in r)N.event.remove(a,z+b[q],d,f,!0);N.isEmptyObject(r)&&(delete E.handle,N._removeData(a,"events"))}},trigger:function(d,f,h,e){var k,m,n,q,r,x,t=[h||Ba],z=mb.call(d,"type")?d.type:d;r=mb.call(d,"namespace")?d.namespace.split("."):[];
n=k=h=h||Ba;if(3!==h.nodeType&&8!==h.nodeType&&!Ib.test(z+N.event.triggered)&&(0<=z.indexOf(".")&&(r=z.split("."),z=r.shift(),r.sort()),m=0>z.indexOf(":")&&"on"+z,d=d[N.expando]?d:new N.Event(z,"object"===typeof d&&d),d.isTrigger=!0,d.namespace=r.join("."),d.namespace_re=d.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,d.result=b,d.target||(d.target=h),f=null==f?[d]:N.makeArray(f,[d]),r=N.event.special[z]||{},e||!r.trigger||!1!==r.trigger.apply(h,f))){if(!e&&!r.noBubble&&!N.isWindow(h)){q=
r.delegateType||z;Ib.test(q+z)||(n=n.parentNode);for(;n;n=n.parentNode)t.push(n),k=n;k===(h.ownerDocument||Ba)&&t.push(k.defaultView||k.parentWindow||a)}for(x=0;(n=t[x++])&&!d.isPropagationStopped();)d.type=1<x?q:r.bindType||z,(k=(N._data(n,"events")||{})[d.type]&&N._data(n,"handle"))&&k.apply(n,f),(k=m&&n[m])&&N.acceptData(n)&&k.apply&&!1===k.apply(n,f)&&d.preventDefault();d.type=z;if(!(e||d.isDefaultPrevented()||r._default&&!1!==r._default.apply(h.ownerDocument,f)||"click"===z&&N.nodeName(h,"a"))&&
N.acceptData(h)&&m&&h[z]&&!N.isWindow(h)){(k=h[m])&&(h[m]=null);N.event.triggered=z;try{h[z]()}catch(A){}N.event.triggered=b;k&&(h[m]=k)}return d.result}},dispatch:function(a){a=N.event.fix(a);var d,f,h,e,k=[],m=mc.call(arguments);d=(N._data(this,"events")||{})[a.type]||[];var n=N.event.special[a.type]||{};m[0]=a;a.delegateTarget=this;if(!n.preDispatch||!1!==n.preDispatch.call(this,a)){k=N.event.handlers.call(this,a,d);for(d=0;(h=k[d++])&&!a.isPropagationStopped();)for(a.currentTarget=h.elem,e=0;(f=
h.handlers[e++])&&!a.isImmediatePropagationStopped();)if(!a.namespace_re||a.namespace_re.test(f.namespace))a.handleObj=f,a.data=f.data,f=((N.event.special[f.origType]||{}).handle||f.handler).apply(h.elem,m),f!==b&&!1===(a.result=f)&&(a.preventDefault(),a.stopPropagation());n.postDispatch&&n.postDispatch.call(this,a);return a.result}},handlers:function(a,d){var f,h,e,k,m=[],n=d.delegateCount,q=a.target;if(n&&q.nodeType&&(!a.button||"click"!==a.type))for(;q!=this;q=q.parentNode||this)if(1===q.nodeType&&
(!0!==q.disabled||"click"!==a.type)){e=[];for(k=0;k<n;k++)h=d[k],f=h.selector+" ",e[f]===b&&(e[f]=h.needsContext?0<=N(f,this).index(q):N.find(f,this,null,[q]).length),e[f]&&e.push(h);e.length&&m.push({elem:q,handlers:e})}n<d.length&&m.push({elem:this,handlers:d.slice(n)});return m},fix:function(a){if(a[N.expando])return a;var b,d,f;b=a.type;var h=a,e=this.fixHooks[b];e||(this.fixHooks[b]=e=Xc.test(b)?this.mouseHooks:ob.test(b)?this.keyHooks:{});f=e.props?this.props.concat(e.props):this.props;a=new N.Event(h);
for(b=f.length;b--;)d=f[b],a[d]=h[d];a.target||(a.target=h.srcElement||Ba);3===a.target.nodeType&&(a.target=a.target.parentNode);a.metaKey=!!a.metaKey;return e.filter?e.filter(a,h):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:["char","charCode","key","keyCode"],filter:function(a,b){null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
filter:function(a,d){var f,h,e=d.button,k=d.fromElement;null==a.pageX&&null!=d.clientX&&(f=a.target.ownerDocument||Ba,h=f.documentElement,f=f.body,a.pageX=d.clientX+(h&&h.scrollLeft||f&&f.scrollLeft||0)-(h&&h.clientLeft||f&&f.clientLeft||0),a.pageY=d.clientY+(h&&h.scrollTop||f&&f.scrollTop||0)-(h&&h.clientTop||f&&f.clientTop||0));!a.relatedTarget&&k&&(a.relatedTarget=k===a.target?d.toElement:k);a.which||e===b||(a.which=e&1?1:e&2?3:e&4?2:0);return a}},special:{load:{noBubble:!0},click:{trigger:function(){if(N.nodeName(this,
"input")&&"checkbox"===this.type&&this.click)return this.click(),!1}},focus:{trigger:function(){if(this!==Ba.activeElement&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){if(this===Ba.activeElement&&this.blur)return this.blur(),!1},delegateType:"focusout"},beforeunload:{postDispatch:function(a){a.result!==b&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,d,f){a=N.extend(new N.Event,d,{type:a,isSimulated:!0,originalEvent:{}});f?N.event.trigger(a,
null,b):N.event.dispatch.call(b,a);a.isDefaultPrevented()&&d.preventDefault()}};N.removeEvent=Ba.removeEventListener?function(a,b,d){a.removeEventListener&&a.removeEventListener(b,d,!1)}:function(a,b,d){b="on"+b;a.detachEvent&&(typeof a[b]===ab&&(a[b]=null),a.detachEvent(b,d))};N.Event=function(a,b){if(!(this instanceof N.Event))return new N.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||!1===a.returnValue||a.getPreventDefault&&a.getPreventDefault()?
q:t):this.type=a;b&&N.extend(this,b);this.timeStamp=a&&a.timeStamp||N.now();this[N.expando]=!0};N.Event.prototype={isDefaultPrevented:t,isPropagationStopped:t,isImmediatePropagationStopped:t,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=q;a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=q;a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=
q;this.stopPropagation()}};N.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){N.event.special[a]={delegateType:b,bindType:b,handle:function(a){var d,f=a.relatedTarget,h=a.handleObj;if(!f||f!==this&&!N.contains(this,f))a.type=h.origType,d=h.handler.apply(this,arguments),a.type=b;return d}}});N.support.submitBubbles||(N.event.special.submit={setup:function(){if(N.nodeName(this,"form"))return!1;N.event.add(this,"click._submit keypress._submit",function(a){a=a.target;(a=N.nodeName(a,
"input")||N.nodeName(a,"button")?a.form:b)&&!N._data(a,"submitBubbles")&&(N.event.add(a,"submit._submit",function(a){a._submit_bubble=!0}),N._data(a,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&N.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(N.nodeName(this,"form"))return!1;N.event.remove(this,"._submit")}});N.support.changeBubbles||(N.event.special.change={setup:function(){if(Wc.test(this.nodeName)){if("checkbox"===
this.type||"radio"===this.type)N.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),N.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1);N.event.simulate("change",this,a,!0)});return!1}N.event.add(this,"beforeactivate._change",function(a){a=a.target;Wc.test(a.nodeName)&&!N._data(a,"changeBubbles")&&(N.event.add(a,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||
N.event.simulate("change",this.parentNode,a,!0)}),N._data(a,"changeBubbles",!0))})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type)return a.handleObj.handler.apply(this,arguments)},teardown:function(){N.event.remove(this,"._change");return!Wc.test(this.nodeName)}});N.support.focusinBubbles||N.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,f=function(a){N.event.simulate(b,a.target,N.event.fix(a),!0)};N.event.special[b]=
{setup:function(){0===d++&&Ba.addEventListener(a,f,!0)},teardown:function(){0===--d&&Ba.removeEventListener(a,f,!0)}}});N.fn.extend({on:function(a,d,f,h,e){var k,m;if("object"===typeof a){"string"!==typeof d&&(f=f||d,d=b);for(k in a)this.on(k,d,f,a[k],e);return this}null==f&&null==h?(h=d,f=d=b):null==h&&("string"===typeof d?(h=f,f=b):(h=f,f=d,d=b));if(!1===h)h=t;else if(!h)return this;1===e&&(m=h,h=function(a){N().off(a);return m.apply(this,arguments)},h.guid=m.guid||(m.guid=N.guid++));return this.each(function(){N.event.add(this,
a,h,f,d)})},one:function(a,b,d,f){return this.on(a,b,d,f,1)},off:function(a,d,f){var h;if(a&&a.preventDefault&&a.handleObj)return h=a.handleObj,N(a.delegateTarget).off(h.namespace?h.origType+"."+h.namespace:h.origType,h.selector,h.handler),this;if("object"===typeof a){for(h in a)this.off(h,d,a[h]);return this}if(!1===d||"function"===typeof d)f=d,d=b;!1===f&&(f=t);return this.each(function(){N.event.remove(this,a,f,d)})},bind:function(a,b,d){return this.on(a,null,b,d)},unbind:function(a,b){return this.off(a,
null,b)},delegate:function(a,b,d,f){return this.on(b,a,d,f)},undelegate:function(a,b,d){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",d)},trigger:function(a,b){return this.each(function(){N.event.trigger(a,b,this)})},triggerHandler:function(a,b){var d=this[0];if(d)return N.event.trigger(a,b,d,!0)}});(function(a,b){function d(a){return zb.test(a+"")}function f(){var a,b=[];return a=function(d,f){b.push(d+=" ")>G.cacheLength&&delete a[b.shift()];return a[d]=f}}function h(a){a[X]=!0;
return a}function e(a){var b=U.createElement("div");try{return a(b)}catch(d){return!1}finally{}}function k(a,b,d,f){var h,e,m,n,q;(b?b.ownerDocument||b:Ba)!==U&&ka(b);b=b||U;d=d||[];if(!a||"string"!==typeof a)return d;if(1!==(n=b.nodeType)&&9!==n)return[];if(!va&&!f){if(h=Ve.exec(a))if(m=h[1])if(9===n)if((e=b.getElementById(m))&&e.parentNode){if(e.id===m)return d.push(e),d}else return d;else{if(b.ownerDocument&&(e=b.ownerDocument.getElementById(m))&&wa(b,e)&&e.id===m)return d.push(e),d}else{if(h[2])return ab.apply(d,
lc.call(b.getElementsByTagName(a),0)),d;if((m=h[3])&&Ia.getByClassName&&b.getElementsByClassName)return ab.apply(d,lc.call(b.getElementsByClassName(m),0)),d}if(Ia.qsa&&!Bb.test(a)){h=!0;e=X;m=b;q=9===n&&a;if(1===n&&"object"!==b.nodeName.toLowerCase()){n=x(a);(h=b.getAttribute("id"))?e=h.replace(Je,"\\$&"):b.setAttribute("id",e);e="[id='"+e+"'] ";for(m=n.length;m--;)n[m]=e+t(n[m]);m=Ma.test(a)&&b.parentNode||b;q=n.join(",")}if(q)try{return ab.apply(d,lc.call(m.querySelectorAll(q),0)),d}catch(r){}finally{h||
b.removeAttribute("id")}}}var z;a:{a=a.replace(Ad,"$1");e=x(a);if(!f&&1===e.length){h=e[0]=e[0].slice(0);if(2<h.length&&"ID"===(z=h[0]).type&&9===b.nodeType&&!va&&G.relative[h[1].type]){b=G.find.ID(z.matches[0].replace(hd,qd),b)[0];if(!b){z=d;break a}a=a.slice(h.shift().value.length)}for(n=cc.needsContext.test(a)?0:h.length;n--;){z=h[n];if(G.relative[m=z.type])break;if(m=G.find[m])if(f=m(z.matches[0].replace(hd,qd),Ma.test(h[0].type)&&b.parentNode||b)){h.splice(n,1);a=f.length&&t(h);if(!a){ab.apply(d,
lc.call(f,0));z=d;break a}break}}}P(a,e)(f,b,va,d,Ma.test(a));z=d}return z}function m(a,b){var d=b&&a,f=d&&(~b.sourceIndex||-2147483648)-(~a.sourceIndex||-2147483648);if(f)return f;if(d)for(;d=d.nextSibling;)if(d===b)return-1;return a?1:-1}function n(a){return function(b){return"input"===b.nodeName.toLowerCase()&&b.type===a}}function q(a){return function(b){var d=b.nodeName.toLowerCase();return("input"===d||"button"===d)&&b.type===a}}function r(a){return h(function(b){b=+b;return h(function(d,f){for(var h,
e=a([],d.length,b),k=e.length;k--;)d[h=e[k]]&&(d[h]=!(f[h]=d[h]))})})}function x(a,b){var d,f,h,e,m,n,q;if(m=ba[a+" "])return b?0:m.slice(0);m=a;n=[];for(q=G.preFilter;m;){if(!d||(f=re.exec(m)))f&&(m=m.slice(f[0].length)||m),n.push(h=[]);d=!1;if(f=qe.exec(m))d=f.shift(),h.push({value:d,type:f[0].replace(Ad," ")}),m=m.slice(d.length);for(e in G.filter)!(f=cc[e].exec(m))||q[e]&&!(f=q[e](f))||(d=f.shift(),h.push({value:d,type:e,matches:f}),m=m.slice(d.length));if(!d)break}return b?m.length:m?k.error(a):
ba(a,n).slice(0)}function t(a){for(var b=0,d=a.length,f="";b<d;b++)f+=a[b].value;return f}function z(a,b,d){var f=b.dir,h=d&&"parentNode"===f,e=ha++;return b.first?function(b,d,e){for(;b=b[f];)if(1===b.nodeType||h)return a(b,d,e)}:function(b,d,k){var m,n,q,r=$b+" "+e;if(k)for(;b=b[f];){if((1===b.nodeType||h)&&a(b,d,k))return!0}else for(;b=b[f];)if(1===b.nodeType||h)if(q=b[X]||(b[X]={}),(n=q[f])&&n[0]===r){if(!0===(m=n[1])||m===D)return!0===m}else if(n=q[f]=[r],n[1]=a(b,d,k)||D,!0===n[1])return!0}}
function A(a){return 1<a.length?function(b,d,f){for(var h=a.length;h--;)if(!a[h](b,d,f))return!1;return!0}:a[0]}function y(a,b,d,f,h){for(var e,k=[],m=0,n=a.length,q=null!=b;m<n;m++)if(e=a[m])if(!d||d(e,f,h))k.push(e),q&&b.push(m);return k}function E(a,b,d,f,e,m){f&&!f[X]&&(f=E(f));e&&!e[X]&&(e=E(e,m));return h(function(h,m,n,q){var r,x,t=[],z=[],A=m.length,E;if(!(E=h)){E=b||"*";for(var L=n.nodeType?[n]:n,M=[],O=0,B=L.length;O<B;O++)k(E,L[O],M);E=M}E=!a||!h&&b?E:y(E,t,a,n,q);L=d?e||(h?a:A||f)?[]:
m:E;d&&d(E,L,n,q);if(f)for(r=y(L,z),f(r,[],n,q),n=r.length;n--;)if(x=r[n])L[z[n]]=!(E[z[n]]=x);if(h){if(e||a){if(e){r=[];for(n=L.length;n--;)(x=L[n])&&r.push(E[n]=x);e(null,L=[],r,q)}for(n=L.length;n--;)(x=L[n])&&-1<(r=e?gd.call(h,x):t[n])&&(h[r]=!(m[r]=x))}}else L=y(L===m?L.splice(A,L.length):L),e?e(null,m,L,q):ab.apply(m,L)})}function L(a){var b,d,f,h=a.length,e=G.relative[a[0].type];d=e||G.relative[" "];for(var k=e?1:0,m=z(function(a){return a===b},d,!0),n=z(function(a){return-1<gd.call(b,a)},
d,!0),q=[function(a,d,f){return!e&&(f||d!==ja)||((b=d).nodeType?m(a,d,f):n(a,d,f))}];k<h;k++)if(d=G.relative[a[k].type])q=[z(A(q),d)];else{d=G.filter[a[k].type].apply(null,a[k].matches);if(d[X]){for(f=++k;f<h&&!G.relative[a[f].type];f++);return E(1<k&&A(q),1<k&&t(a.slice(0,k-1)).replace(Ad,"$1"),d,k<f&&L(a.slice(k,f)),f<h&&L(a=a.slice(f)),f<h&&t(a))}q.push(d)}return A(q)}function M(a,b){var d=0,f=0<b.length,e=0<a.length,m=function(h,m,n,q,r){var x,t,z=[],A=0,E="0",L=h&&[],M=null!=r,O=ja,B=h||e&&G.find.TAG("*",
r&&m.parentNode||m),w=$b+=null==O?1:Math.random()||.1;M&&(ja=m!==U&&m,D=d);for(;null!=(r=B[E]);E++){if(e&&r){for(x=0;t=a[x++];)if(t(r,m,n)){q.push(r);break}M&&($b=w,D=++d)}f&&((r=!t&&r)&&A--,h&&L.push(r))}A+=E;if(f&&E!==A){for(x=0;t=b[x++];)t(L,z,m,n);if(h){if(0<A)for(;E--;)L[E]||z[E]||(z[E]=nb.call(q));z=y(z)}ab.apply(q,z);M&&!h&&0<z.length&&1<A+b.length&&k.uniqueSort(q)}M&&($b=w,ja=O);return L};return f?h(m):m}function B(){}var O,D,G,w,Y,P,la,ja,ka,U,da,va,Bb,Z,aa,wa,fa,X="sizzle"+-new Date,Ba=
a.document,Ia={},$b=0,ha=0,Ua=f(),ba=f(),Gc=f(),Ra=typeof b,lb=[],nb=lb.pop,ab=lb.push,lc=lb.slice,gd=lb.indexOf||function(a){for(var b=0,d=this.length;b<d;b++)if(this[b]===a)return b;return-1},lb="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+".replace("w","w#"),dc="\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)[\\x20\\t\\r\\n\\f]*(?:([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+lb+")|)|)[\\x20\\t\\r\\n\\f]*\\]",ra=":((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+
dc.replace(3,8)+")*)|.*)\\)|)",Ad=/^[\x20\t\r\n\f]+|((?:^|[^\\])(?:\\.)*)[\x20\t\r\n\f]+$/g,re=/^[\x20\t\r\n\f]*,[\x20\t\r\n\f]*/,qe=/^[\x20\t\r\n\f]*([\x20\t\r\n\f>+~])[\x20\t\r\n\f]*/,Ie=new RegExp(ra),gc=new RegExp("^"+lb+"$"),cc={ID:/^#((?:\\.|[\w-]|[^\x00-\xa0])+)/,CLASS:/^\.((?:\\.|[\w-]|[^\x00-\xa0])+)/,NAME:/^\[name=['"]?((?:\\.|[\w-]|[^\x00-\xa0])+)['"]?\]/,TAG:new RegExp("^("+"(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+".replace("w","w*")+")"),ATTR:new RegExp("^"+dc),PSEUDO:new RegExp("^"+ra),CHILD:/^:(only|first|last|nth|nth-last)-(child|of-type)(?:\([\x20\t\r\n\f]*(even|odd|(([+-]|)(\d*)n|)[\x20\t\r\n\f]*(?:([+-]|)[\x20\t\r\n\f]*(\d+)|))[\x20\t\r\n\f]*\)|)/i,
needsContext:/^[\x20\t\r\n\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\([\x20\t\r\n\f]*((?:-\d)?\d*)[\x20\t\r\n\f]*\)|)(?=[^-]|$)/i},Ma=/[\x20\t\r\n\f]*[+~]/,zb=/^[^{]+\{\s*\[native code/,Ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Oa=/^(?:input|select|textarea|button)$/i,vb=/^h\d$/i,Je=/'|\\/g,Qa=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,hd=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,qd=function(a,b){var d="0x"+b-65536;return d!==d?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,
d&1023|56320)};try{lc.call(Ba.documentElement.childNodes,0)[0].nodeType}catch(mc){lc=function(a){for(var b,d=[];b=this[a++];)d.push(b);return d}}Y=k.isXML=function(a){return(a=a&&(a.ownerDocument||a).documentElement)?"HTML"!==a.nodeName:!1};ka=k.setDocument=function(a){var f=a?a.ownerDocument||a:Ba;if(f===U||9!==f.nodeType||!f.documentElement)return U;U=f;da=f.documentElement;va=Y(f);Ia.tagNameNoComments=e(function(a){a.appendChild(f.createComment(""));return!a.getElementsByTagName("*").length});
Ia.attributes=e(function(a){a.innerHTML="<select></select>";a=typeof a.lastChild.getAttribute("multiple");return"boolean"!==a&&"string"!==a});Ia.getByClassName=e(function(a){a.innerHTML="<div class='hidden e'></div><div class='hidden'></div>";if(!a.getElementsByClassName||!a.getElementsByClassName("e").length)return!1;a.lastChild.className="e";return 2===a.getElementsByClassName("e").length});Ia.getByName=e(function(a){a.id=X+0;a.innerHTML="<a name='"+X+"'></a><div name='"+X+"'></div>";da.insertBefore(a,
da.firstChild);var b=f.getElementsByName&&f.getElementsByName(X).length===2+f.getElementsByName(X+0).length;Ia.getIdNotName=!f.getElementById(X);da.removeChild(a);return b});G.attrHandle=e(function(a){a.innerHTML="<a href='#'></a>";return a.firstChild&&typeof a.firstChild.getAttribute!==Ra&&"#"===a.firstChild.getAttribute("href")})?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}};Ia.getIdNotName?(G.find.ID=function(a,b){if(typeof b.getElementById!==
Ra&&!va){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}},G.filter.ID=function(a){var b=a.replace(hd,qd);return function(a){return a.getAttribute("id")===b}}):(G.find.ID=function(a,d){if(typeof d.getElementById!==Ra&&!va){var f=d.getElementById(a);return f?f.id===a||typeof f.getAttributeNode!==Ra&&f.getAttributeNode("id").value===a?[f]:b:[]}},G.filter.ID=function(a){var b=a.replace(hd,qd);return function(a){return(a=typeof a.getAttributeNode!==Ra&&a.getAttributeNode("id"))&&a.value===b}});
G.find.TAG=Ia.tagNameNoComments?function(a,b){if(typeof b.getElementsByTagName!==Ra)return b.getElementsByTagName(a)}:function(a,b){var d,f=[],h=0,e=b.getElementsByTagName(a);if("*"===a){for(;d=e[h++];)1===d.nodeType&&f.push(d);return f}return e};G.find.NAME=Ia.getByName&&function(a,b){if(typeof b.getElementsByName!==Ra)return b.getElementsByName(name)};G.find.CLASS=Ia.getByClassName&&function(a,b){if(typeof b.getElementsByClassName!==Ra&&!va)return b.getElementsByClassName(a)};Z=[];Bb=[":focus"];
if(Ia.qsa=d(f.querySelectorAll))e(function(a){a.innerHTML="<select><option selected=''></option></select>";a.querySelectorAll("[selected]").length||Bb.push("\\[[\\x20\\t\\r\\n\\f]*(?:checked|disabled|ismap|multiple|readonly|selected|value)");a.querySelectorAll(":checked").length||Bb.push(":checked")}),e(function(a){a.innerHTML="<input type='hidden' i=''/>";a.querySelectorAll("[i^='']").length&&Bb.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:\"\"|'')");a.querySelectorAll(":enabled").length||Bb.push(":enabled",
":disabled");a.querySelectorAll("*,:x");Bb.push(",.*:")});(Ia.matchesSelector=d(aa=da.matchesSelector||da.mozMatchesSelector||da.webkitMatchesSelector||da.oMatchesSelector||da.msMatchesSelector))&&e(function(a){Ia.disconnectedMatch=aa.call(a,"div");aa.call(a,"[s!='']:x");Z.push("!=",ra)});Bb=new RegExp(Bb.join("|"));Z=new RegExp(Z.join("|"));wa=d(da.contains)||da.compareDocumentPosition?function(a,b){var d=9===a.nodeType?a.documentElement:a,f=b&&b.parentNode;return a===f||!!(f&&1===f.nodeType&&(d.contains?
d.contains(f):a.compareDocumentPosition&&a.compareDocumentPosition(f)&16))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1};fa=da.compareDocumentPosition?function(a,b){var d;return a===b?(la=!0,0):(d=b.compareDocumentPosition&&a.compareDocumentPosition&&a.compareDocumentPosition(b))?d&1||a.parentNode&&11===a.parentNode.nodeType?a===f||wa(Ba,a)?-1:b===f||wa(Ba,b)?1:0:d&4?-1:1:a.compareDocumentPosition?-1:1}:function(a,b){var d,h=0;d=a.parentNode;var e=b.parentNode,k=[a],n=[b];if(a===
b)return la=!0,0;if(!d||!e)return a===f?-1:b===f?1:d?-1:e?1:0;if(d===e)return m(a,b);for(d=a;d=d.parentNode;)k.unshift(d);for(d=b;d=d.parentNode;)n.unshift(d);for(;k[h]===n[h];)h++;return h?m(k[h],n[h]):k[h]===Ba?-1:n[h]===Ba?1:0};la=!1;[0,0].sort(fa);Ia.detectDuplicates=la;return U};k.matches=function(a,b){return k(a,null,null,b)};k.matchesSelector=function(a,b){(a.ownerDocument||a)!==U&&ka(a);b=b.replace(Qa,"='$1']");if(!(!Ia.matchesSelector||va||Z&&Z.test(b)||Bb.test(b)))try{var d=aa.call(a,b);
if(d||Ia.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(f){}return 0<k(b,U,null,[a]).length};k.contains=function(a,b){(a.ownerDocument||a)!==U&&ka(a);return wa(a,b)};k.attr=function(a,b){var d;(a.ownerDocument||a)!==U&&ka(a);va||(b=b.toLowerCase());return(d=G.attrHandle[b])?d(a):va||Ia.attributes?a.getAttribute(b):((d=a.getAttributeNode(b))||a.getAttribute(b))&&!0===a[b]?b:d&&d.specified?d.value:null};k.error=function(a){throw Error("Syntax error, unrecognized expression: "+
a);};k.uniqueSort=function(a){var b,d=[],f=1,h=0;la=!Ia.detectDuplicates;a.sort(fa);if(la){for(;b=a[f];f++)b===a[f-1]&&(h=d.push(f));for(;h--;)a.splice(d[h],1)}return a};w=k.getText=function(a){var b,d="",f=0;b=a.nodeType;if(!b)for(;b=a[f];f++)d+=w(b);else if(1===b||9===b||11===b){if("string"===typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)d+=w(a)}else if(3===b||4===b)return a.nodeValue;return d};G=k.selectors={cacheLength:50,createPseudo:h,match:cc,find:{},relative:{">":{dir:"parentNode",
first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){a[1]=a[1].replace(hd,qd);a[3]=(a[4]||a[5]||"").replace(hd,qd);"~="===a[2]&&(a[3]=" "+a[3]+" ");return a.slice(0,4)},CHILD:function(a){a[1]=a[1].toLowerCase();"nth"===a[1].slice(0,3)?(a[3]||k.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&k.error(a[0]);return a},PSEUDO:function(a){var b,d=!a[5]&&a[2];if(cc.CHILD.test(a[0]))return null;
a[4]?a[2]=a[4]:d&&Ie.test(d)&&(b=x(d,!0))&&(b=d.indexOf(")",d.length-b)-d.length)&&(a[0]=a[0].slice(0,b),a[2]=d.slice(0,b));return a.slice(0,3)}},filter:{TAG:function(a){if("*"===a)return function(){return!0};a=a.replace(hd,qd).toLowerCase();return function(b){return b.nodeName&&b.nodeName.toLowerCase()===a}},CLASS:function(a){var b=Ua[a+" "];return b||(b=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+a+"([\\x20\\t\\r\\n\\f]|$)"))&&Ua(a,function(a){return b.test(a.className||typeof a.getAttribute!==Ra&&a.getAttribute("class")||
"")})},ATTR:function(a,b,d){return function(f){f=k.attr(f,a);if(null==f)return"!="===b;if(!b)return!0;f+="";return"="===b?f===d:"!="===b?f!==d:"^="===b?d&&0===f.indexOf(d):"*="===b?d&&-1<f.indexOf(d):"$="===b?d&&f.slice(-d.length)===d:"~="===b?-1<(" "+f+" ").indexOf(d):"|="===b?f===d||f.slice(0,d.length+1)===d+"-":!1}},CHILD:function(a,b,d,f,h){var e="nth"!==a.slice(0,3),k="last"!==a.slice(-4),m="of-type"===b;return 1===f&&0===h?function(a){return!!a.parentNode}:function(b,d,n){var q,r,x,t,z;d=e!==
k?"nextSibling":"previousSibling";var A=b.parentNode,E=m&&b.nodeName.toLowerCase();n=!n&&!m;if(A){if(e){for(;d;){for(r=b;r=r[d];)if(m?r.nodeName.toLowerCase()===E:1===r.nodeType)return!1;z=d="only"===a&&!z&&"nextSibling"}return!0}z=[k?A.firstChild:A.lastChild];if(k&&n)for(n=A[X]||(A[X]={}),q=n[a]||[],t=q[0]===$b&&q[1],x=q[0]===$b&&q[2],r=t&&A.childNodes[t];r=++t&&r&&r[d]||(x=t=0)||z.pop();){if(1===r.nodeType&&++x&&r===b){n[a]=[$b,t,x];break}}else if(n&&(q=(b[X]||(b[X]={}))[a])&&q[0]===$b)x=q[1];else for(;(r=
++t&&r&&r[d]||(x=t=0)||z.pop())&&((m?r.nodeName.toLowerCase()!==E:1!==r.nodeType)||!++x||(n&&((r[X]||(r[X]={}))[a]=[$b,x]),r!==b)););x-=h;return x===f||0===x%f&&0<=x/f}}},PSEUDO:function(a,b){var d,f=G.pseudos[a]||G.setFilters[a.toLowerCase()]||k.error("unsupported pseudo: "+a);return f[X]?f(b):1<f.length?(d=[a,a,"",b],G.setFilters.hasOwnProperty(a.toLowerCase())?h(function(a,d){for(var h,e=f(a,b),k=e.length;k--;)h=gd.call(a,e[k]),a[h]=!(d[h]=e[k])}):function(a){return f(a,0,d)}):f}},pseudos:{not:h(function(a){var b=
[],d=[],f=P(a.replace(Ad,"$1"));return f[X]?h(function(a,b,d,h){h=f(a,null,h,[]);for(var e=a.length;e--;)if(d=h[e])a[e]=!(b[e]=d)}):function(a,h,e){b[0]=a;f(b,null,e,d);return!d.pop()}}),has:h(function(a){return function(b){return 0<k(a,b).length}}),contains:h(function(a){return function(b){return-1<(b.textContent||b.innerText||w(b)).indexOf(a)}}),lang:h(function(a){gc.test(a||"")||k.error("unsupported lang: "+a);a=a.replace(hd,qd).toLowerCase();return function(b){var d;do if(d=va?b.getAttribute("xml:lang")||
b.getAttribute("lang"):b.lang)return d=d.toLowerCase(),d===a||0===d.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var d=a.location&&a.location.hash;return d&&d.slice(1)===b.id},root:function(a){return a===da},focus:function(a){return a===U.activeElement&&(!U.hasFocus||U.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return!1===a.disabled},disabled:function(a){return!0===a.disabled},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===
b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return!0===a.selected},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if("@"<a.nodeName||3===a.nodeType||4===a.nodeType)return!1;return!0},parent:function(a){return!G.pseudos.empty(a)},header:function(a){return vb.test(a.nodeName)},input:function(a){return Oa.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;
return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||b.toLowerCase()===a.type)},first:r(function(){return[0]}),last:r(function(a,b){return[b-1]}),eq:r(function(a,b,d){return[0>d?d+b:d]}),even:r(function(a,b){for(var d=0;d<b;d+=2)a.push(d);return a}),odd:r(function(a,b){for(var d=1;d<b;d+=2)a.push(d);return a}),lt:r(function(a,b,d){for(b=0>d?d+b:d;0<=--b;)a.push(b);return a}),gt:r(function(a,b,d){for(d=0>d?d+b:d;++d<b;)a.push(d);return a})}};for(O in{radio:!0,
checkbox:!0,file:!0,password:!0,image:!0})G.pseudos[O]=n(O);for(O in{submit:!0,reset:!0})G.pseudos[O]=q(O);P=k.compile=function(a,b){var d,f=[],h=[],e=Gc[a+" "];if(!e){b||(b=x(a));for(d=b.length;d--;)e=L(b[d]),e[X]?f.push(e):h.push(e);e=Gc(a,M(h,f))}return e};G.pseudos.nth=G.pseudos.eq;G.filters=B.prototype=G.pseudos;G.setFilters=new B;ka();k.attr=N.attr;N.find=k;N.expr=k.selectors;N.expr[":"]=N.expr.pseudos;N.unique=k.uniqueSort;N.text=k.getText;N.isXMLDoc=k.isXML;N.contains=k.contains})(a);var jb=
/Until$/,yc=/^(?:parents|prev(?:Until|All))/,Lc=/^.[^:#\[\.,]*$/,Qc=N.expr.match.needsContext,Tb={children:!0,contents:!0,next:!0,prev:!0};N.fn.extend({find:function(a){var b,d,f,h=this.length;if("string"!==typeof a)return f=this,this.pushStack(N(a).filter(function(){for(b=0;b<h;b++)if(N.contains(f[b],this))return!0}));d=[];for(b=0;b<h;b++)N.find(a,this[b],d);d=this.pushStack(1<h?N.unique(d):d);d.selector=(this.selector?this.selector+" ":"")+a;return d},has:function(a){var b,d=N(a,this),f=d.length;
return this.filter(function(){for(b=0;b<f;b++)if(N.contains(this,d[b]))return!0})},not:function(a){return this.pushStack(G(this,a,!1))},filter:function(a){return this.pushStack(G(this,a,!0))},is:function(a){return!!a&&("string"===typeof a?Qc.test(a)?0<=N(a,this.context).index(this[0]):0<N.filter(a,this).length:0<this.filter(a).length)},closest:function(a,b){for(var d,f=0,h=this.length,e=[],k=Qc.test(a)||"string"!==typeof a?N(a,b||this.context):0;f<h;f++)for(d=this[f];d&&d.ownerDocument&&d!==b&&11!==
d.nodeType;){if(k?-1<k.index(d):N.find.matchesSelector(d,a)){e.push(d);break}d=d.parentNode}return this.pushStack(1<e.length?N.unique(e):e)},index:function(a){return a?"string"===typeof a?N.inArray(this[0],N(a)):N.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){var d="string"===typeof a?N(a,b):N.makeArray(a&&a.nodeType?[a]:a),d=N.merge(this.get(),d);return this.pushStack(N.unique(d))},addBack:function(a){return this.add(null==a?this.prevObject:
this.prevObject.filter(a))}});N.fn.andSelf=N.fn.addBack;N.each({parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},parents:function(a){return N.dir(a,"parentNode")},parentsUntil:function(a,b,d){return N.dir(a,"parentNode",d)},next:function(a){return y(a,"nextSibling")},prev:function(a){return y(a,"previousSibling")},nextAll:function(a){return N.dir(a,"nextSibling")},prevAll:function(a){return N.dir(a,"previousSibling")},nextUntil:function(a,b,d){return N.dir(a,"nextSibling",d)},prevUntil:function(a,
b,d){return N.dir(a,"previousSibling",d)},siblings:function(a){return N.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return N.sibling(a.firstChild)},contents:function(a){return N.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:N.merge([],a.childNodes)}},function(a,b){N.fn[a]=function(d,f){var h=N.map(this,b,d);jb.test(a)||(f=d);f&&"string"===typeof f&&(h=N.filter(f,h));h=1<this.length&&!Tb[a]?N.unique(h):h;1<this.length&&yc.test(a)&&(h=h.reverse());return this.pushStack(h)}});
N.extend({filter:function(a,b,d){d&&(a=":not("+a+")");return 1===b.length?N.find.matchesSelector(b[0],a)?[b[0]]:[]:N.find.matches(a,b)},dir:function(a,d,f){var h=[];for(a=a[d];a&&9!==a.nodeType&&(f===b||1!==a.nodeType||!N(a).is(f));)1===a.nodeType&&h.push(a),a=a[d];return h},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&d.push(a);return d}});var Ya="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
zc=/ jQuery\d+="(?:null|\d+)"/g,uc=new RegExp("<(?:"+Ya+")[\\s/>]","i"),nd=/^\s+/,Ed=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Fd=/<([\w:]+)/,jc=/<tbody/i,Gd=/<|&#?\w+;/,Yc=/<(?:script|style|link)/i,dd=/^(?:checkbox|radio)$/i,Qa=/checked\s*(?:[^=]|=\s*.checked.)/i,Pb=/^$|\/(?:java|ecma)script/i,cd=/^true\/(.*)/,ld=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Wb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>",
"</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:N.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Fc=B(Ba).appendChild(Ba.createElement("div"));Wb.optgroup=Wb.option;Wb.tbody=Wb.tfoot=Wb.colgroup=Wb.caption=Wb.thead;Wb.th=Wb.td;N.fn.extend({text:function(a){return N.access(this,function(a){return a===
b?N.text(this):this.empty().append((this[0]&&this[0].ownerDocument||Ba).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(N.isFunction(a))return this.each(function(b){N(this).wrapAll(a.call(this,b))});if(this[0]){var b=N(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return N.isFunction(a)?this.each(function(b){N(this).wrapInner(a.call(this,
b))}):this.each(function(){var b=N(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){var b=N.isFunction(a);return this.each(function(d){N(this).wrapAll(b?a.call(this,d):a)})},unwrap:function(){return this.parent().each(function(){N.nodeName(this,"body")||N(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.appendChild(a)})},prepend:function(){return this.domManip(arguments,
!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.insertBefore(a,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var d,f=0;null!=(d=this[f]);f++)if(!a||0<N.filter(a,[d]).length)b||1!==d.nodeType||N.cleanData(M(d)),d.parentNode&&
(b&&N.contains(d.ownerDocument,d)&&da(M(d,"script")),d.parentNode.removeChild(d));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){for(1===a.nodeType&&N.cleanData(M(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&N.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){a=null==a?!1:a;b=null==b?a:b;return this.map(function(){return N.clone(this,a,b)})},html:function(a){return N.access(this,function(a){var d=this[0]||{},f=0,h=this.length;if(a===b)return 1===
d.nodeType?d.innerHTML.replace(zc,""):b;if(!("string"!==typeof a||Yc.test(a)||!N.support.htmlSerialize&&uc.test(a)||!N.support.leadingWhitespace&&nd.test(a)||Wb[(Fd.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(Ed,"<$1></$2>");try{for(;f<h;f++)d=this[f]||{},1===d.nodeType&&(N.cleanData(M(d,!1)),d.innerHTML=a);d=0}catch(e){}}d&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){N.isFunction(a)||"string"===typeof a||(a=N(a).not(this).detach());return this.domManip([a],!0,
function(a){var b=this.nextSibling,d=this.parentNode;d&&(N(this).remove(),d.insertBefore(a,b))})},detach:function(a){return this.remove(a,!0)},domManip:function(a,d,f){a=zb.apply([],a);var h,e,k,m,n=0,q=this.length,r=this,x=q-1,t=a[0],z=N.isFunction(t);if(z||!(1>=q||"string"!==typeof t||N.support.checkClone)&&Qa.test(t))return this.each(function(h){var e=r.eq(h);z&&(a[0]=t.call(this,h,d?e.html():b));e.domManip(a,d,f)});if(q&&(m=N.buildFragment(a,this[0].ownerDocument,!1,this),h=m.firstChild,1===m.childNodes.length&&
(m=h),h)){d=d&&N.nodeName(h,"tr");k=N.map(M(m,"script"),E);for(e=k.length;n<q;n++)h=m,n!==x&&(h=N.clone(h,!0,!0),e&&N.merge(k,M(h,"script"))),f.call(d&&N.nodeName(this[n],"table")?w(this[n],"tbody"):this[n],h,n);if(e)for(m=k[k.length-1].ownerDocument,N.map(k,P),n=0;n<e;n++)h=k[n],Pb.test(h.type||"")&&!N._data(h,"globalEval")&&N.contains(m,h)&&(h.src?N.ajax({url:h.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):N.globalEval((h.text||h.textContent||h.innerHTML||"").replace(ld,"")));
m=h=null}return this}});N.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){N.fn[a]=function(a){for(var d=0,f=[],h=N(a),e=h.length-1;d<=e;d++)a=d===e?this:this.clone(!0),N(h[d])[b](a),kc.apply(f,a.get());return this.pushStack(f)}});N.extend({clone:function(a,b,d){var f,h,e,k,m,n=N.contains(a.ownerDocument,a);N.support.html5Clone||N.isXMLDoc(a)||!uc.test("<"+a.nodeName+">")?e=a.cloneNode(!0):(Fc.innerHTML=a.outerHTML,Fc.removeChild(e=
Fc.firstChild));if(!(N.support.noCloneEvent&&N.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||N.isXMLDoc(a)))for(f=M(e),m=M(a),k=0;null!=(h=m[k]);++k)if(f[k]){var q=f[k],r=void 0,x=void 0,t=void 0;if(1===q.nodeType){r=q.nodeName.toLowerCase();if(!N.support.noCloneEvent&&q[N.expando]){t=N._data(q);for(x in t.events)N.removeEvent(q,x,t.handle);q.removeAttribute(N.expando)}if("script"===r&&q.text!==h.text)E(q).text=h.text,P(q);else if("object"===r)q.parentNode&&(q.outerHTML=h.outerHTML),N.support.html5Clone&&
h.innerHTML&&!N.trim(q.innerHTML)&&(q.innerHTML=h.innerHTML);else if("input"===r&&dd.test(h.type))q.defaultChecked=q.checked=h.checked,q.value!==h.value&&(q.value=h.value);else if("option"===r)q.defaultSelected=q.selected=h.defaultSelected;else if("input"===r||"textarea"===r)q.defaultValue=h.defaultValue}}if(b)if(d)for(m=m||M(a),f=f||M(e),k=0;null!=(h=m[k]);k++)aa(h,f[k]);else aa(a,e);f=M(e,"script");0<f.length&&da(f,!n&&M(a,"script"));return e},buildFragment:function(a,b,d,f){for(var h,e,k,m,n,q,
r=a.length,x=B(b),t=[],z=0;z<r;z++)if((e=a[z])||0===e)if("object"===N.type(e))N.merge(t,e.nodeType?[e]:e);else if(Gd.test(e)){k=k||x.appendChild(b.createElement("div"));m=(Fd.exec(e)||["",""])[1].toLowerCase();q=Wb[m]||Wb._default;k.innerHTML=q[1]+e.replace(Ed,"<$1></$2>")+q[2];for(h=q[0];h--;)k=k.lastChild;!N.support.leadingWhitespace&&nd.test(e)&&t.push(b.createTextNode(nd.exec(e)[0]));if(!N.support.tbody)for(h=(e="table"!==m||jc.test(e)?"<table>"!==q[1]||jc.test(e)?0:k:k.firstChild)&&e.childNodes.length;h--;)N.nodeName(n=
e.childNodes[h],"tbody")&&!n.childNodes.length&&e.removeChild(n);N.merge(t,k.childNodes);for(k.textContent="";k.firstChild;)k.removeChild(k.firstChild);k=x.lastChild}else t.push(b.createTextNode(e));k&&x.removeChild(k);N.support.appendChecked||N.grep(M(t,"input"),ka);for(z=0;e=t[z++];)if(!f||-1===N.inArray(e,f))if(a=N.contains(e.ownerDocument,e),k=M(x.appendChild(e),"script"),a&&da(k),d)for(h=0;e=k[h++];)Pb.test(e.type||"")&&d.push(e);return x},cleanData:function(a,b){for(var d,f,h,e,k=0,m=N.expando,
n=N.cache,q=N.support.deleteExpando,r=N.event.special;null!=(d=a[k]);k++)if(b||N.acceptData(d))if(e=(h=d[m])&&n[h]){if(e.events)for(f in e.events)r[f]?N.event.remove(d,f):N.removeEvent(d,f,e.handle);n[h]&&(delete n[h],q?delete d[m]:typeof d.removeAttribute!==ab?d.removeAttribute(m):d[m]=null,cc.push(h))}}});var ra,qb,Cc,Hd=/alpha\([^)]*\)/i,Ma=/opacity\s*=\s*([^)]*)/,Zc=/^(top|right|bottom|left)$/,Fb=/^(none|table(?!-c[ea]).+)/,Id=/^margin/,Xd=new RegExp("^("+ed+")(.*)$","i"),Dc=new RegExp("^("+ed+
")(?!px)[a-z%]+$","i"),Jd=new RegExp("^([+-])=("+ed+")","i"),Tc={BODY:"block"},fe={position:"absolute",visibility:"hidden",display:"block"},od={letterSpacing:0,fontWeight:400},Mc=["Top","Right","Bottom","Left"],td=["Webkit","O","Moz","ms"];N.fn.extend({css:function(a,d){return N.access(this,function(a,d,f){var h,e={},k=0;if(N.isArray(d)){h=qb(a);for(f=d.length;k<f;k++)e[d[k]]=N.css(a,d[k],!1,h);return e}return f!==b?N.style(a,d,f):N.css(a,d)},a,d,1<arguments.length)},show:function(){return ba(this,
!0)},hide:function(){return ba(this)},toggle:function(a){var b="boolean"===typeof a;return this.each(function(){(b?a:fa(this))?N(this).show():N(this).hide()})}});N.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=Cc(a,"opacity");return""===d?"1":d}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":N.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,d,f,h){if(a&&3!==a.nodeType&&8!==a.nodeType&&
a.style){var e,k,n,q=N.camelCase(d),r=a.style;d=N.cssProps[q]||(N.cssProps[q]=m(r,q));n=N.cssHooks[d]||N.cssHooks[q];if(f!==b){if(k=typeof f,"string"===k&&(e=Jd.exec(f))&&(f=(e[1]+1)*e[2]+parseFloat(N.css(a,d)),k="number"),!(null==f||"number"===k&&isNaN(f)||("number"!==k||N.cssNumber[q]||(f+="px"),N.support.clearCloneStyle||""!==f||0!==d.indexOf("background")||(r[d]="inherit"),n&&"set"in n&&(f=n.set(a,f,h))===b)))try{r[d]=f}catch(x){}}else return n&&"get"in n&&(e=n.get(a,!1,h))!==b?e:r[d]}},css:function(a,
d,f,h){var e,k;k=N.camelCase(d);d=N.cssProps[k]||(N.cssProps[k]=m(a.style,k));(k=N.cssHooks[d]||N.cssHooks[k])&&"get"in k&&(e=k.get(a,!0,f));e===b&&(e=Cc(a,d,h));"normal"===e&&d in od&&(e=od[d]);return""===f||f?(a=parseFloat(e),!0===f||N.isNumeric(a)?a||0:e):e},swap:function(a,b,d,f){var h,e={};for(h in b)e[h]=a.style[h],a.style[h]=b[h];d=d.apply(a,f||[]);for(h in b)a.style[h]=e[h];return d}});a.getComputedStyle?(qb=function(b){return a.getComputedStyle(b,null)},Cc=function(a,d,f){var h,e=(f=f||qb(a))?
f.getPropertyValue(d)||f[d]:b,k=a.style;f&&(""!==e||N.contains(a.ownerDocument,a)||(e=N.style(a,d)),Dc.test(e)&&Id.test(d)&&(a=k.width,d=k.minWidth,h=k.maxWidth,k.minWidth=k.maxWidth=k.width=e,e=f.width,k.width=a,k.minWidth=d,k.maxWidth=h));return e}):Ba.documentElement.currentStyle&&(qb=function(a){return a.currentStyle},Cc=function(a,d,f){var h,e,k=(f=f||qb(a))?f[d]:b,m=a.style;null==k&&m&&m[d]&&(k=m[d]);if(Dc.test(k)&&!Zc.test(d)){f=m.left;if(e=(h=a.runtimeStyle)&&h.left)h.left=a.currentStyle.left;
m.left="fontSize"===d?"1em":k;k=m.pixelLeft+"px";m.left=f;e&&(h.left=e)}return""===k?"auto":k});N.each(["height","width"],function(a,b){N.cssHooks[b]={get:function(a,d,f){if(d)return 0===a.offsetWidth&&Fb.test(N.css(a,"display"))?N.swap(a,fe,function(){return U(a,b,f)}):U(a,b,f)},set:function(a,d,f){var h=f&&qb(a);return Z(a,d,f?X(a,b,f,N.support.boxSizing&&"border-box"===N.css(a,"boxSizing",!1,h),h):0)}}});N.support.opacity||(N.cssHooks.opacity={get:function(a,b){return Ma.test((b&&a.currentStyle?
a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var d=a.style,f=a.currentStyle,h=N.isNumeric(b)?"alpha(opacity="+100*b+")":"",e=f&&f.filter||d.filter||"";d.zoom=1;if((1<=b||""===b)&&""===N.trim(e.replace(Hd,""))&&d.removeAttribute&&(d.removeAttribute("filter"),""===b||f&&!f.filter))return;d.filter=Hd.test(e)?e.replace(Hd,h):e+" "+h}});N(function(){N.support.reliableMarginRight||(N.cssHooks.marginRight={get:function(a,b){if(b)return N.swap(a,{display:"inline-block"},
Cc,[a,"marginRight"])}});!N.support.pixelPosition&&N.fn.position&&N.each(["top","left"],function(a,b){N.cssHooks[b]={get:function(a,d){if(d)return d=Cc(a,b),Dc.test(d)?N(a).position()[b]+"px":d}}})});N.expr&&N.expr.filters&&(N.expr.filters.hidden=function(a){return 0>=a.offsetWidth&&0>=a.offsetHeight||!N.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||N.css(a,"display"))},N.expr.filters.visible=function(a){return!N.expr.filters.hidden(a)});N.each({margin:"",padding:"",border:"Width"},
function(a,b){N.cssHooks[a+b]={expand:function(d){var f=0,h={};for(d="string"===typeof d?d.split(" "):[d];4>f;f++)h[a+Mc[f]+b]=d[f]||d[f-2]||d[0];return h}};Id.test(a)||(N.cssHooks[a+b].set=Z)});var ge=/%20/g,zd=/\[\]$/,pd=/\r?\n/g,Kd=/^(?:submit|button|image|reset|file)$/i,Bb=/^(?:input|select|textarea|keygen)/i;N.fn.extend({serialize:function(){return N.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=N.prop(this,"elements");return a?N.makeArray(a):this}).filter(function(){var a=
this.type;return this.name&&!N(this).is(":disabled")&&Bb.test(this.nodeName)&&!Kd.test(a)&&(this.checked||!dd.test(a))}).map(function(a,b){var d=N(this).val();return null==d?null:N.isArray(d)?N.map(d,function(a){return{name:b.name,value:a.replace(pd,"\r\n")}}):{name:b.name,value:d.replace(pd,"\r\n")}}).get()}});N.param=function(a,d){var f,h=[],e=function(a,b){b=N.isFunction(b)?b():null==b?"":b;h[h.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};d===b&&(d=N.ajaxSettings&&N.ajaxSettings.traditional);
if(N.isArray(a)||a.jquery&&!N.isPlainObject(a))N.each(a,function(){e(this.name,this.value)});else for(f in a)z(f,a[f],d,e);return h.join("&").replace(ge,"+")};N.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){N.fn[b]=function(a,d){return 0<arguments.length?this.on(b,null,a,d):this.trigger(b)}});N.fn.hover=function(a,
b){return this.mouseenter(a).mouseleave(b||a)};var $b,Gc,gd=N.now(),lc=/\?/,Ie=/#.*$/,qe=/([?&])_=[^&]*/,re=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Ve=/^(?:GET|HEAD)$/,hd=/^\/\//,se=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,We=N.fn.load,lf={},Ad={},Je="*/".concat("*");try{Gc=nb.href}catch(qd){Gc=Ba.createElement("a"),Gc.href="",Gc=Gc.href}$b=se.exec(Gc.toLowerCase())||[];N.fn.load=function(a,d,f){if("string"!==typeof a&&We)return We.apply(this,arguments);var h,e,k,m=this,n=a.indexOf(" ");0<=n&&(h=a.slice(n,
a.length),a=a.slice(0,n));N.isFunction(d)?(f=d,d=b):d&&"object"===typeof d&&(k="POST");0<m.length&&N.ajax({url:a,type:k,dataType:"html",data:d}).done(function(a){e=arguments;m.html(h?N("<div>").append(N.parseHTML(a)).find(h):a)}).complete(f&&function(a,b){m.each(f,e||[a.responseText,b,a])});return this};N.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){N.fn[b]=function(a){return this.on(b,a)}});N.each(["get","post"],function(a,d){N[d]=function(a,f,h,
e){N.isFunction(f)&&(e=e||h,h=f,f=b);return N.ajax({url:a,type:d,dataType:e,data:f,success:h})}});N.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Gc,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test($b[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Je,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,
json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":N.parseJSON,"text xml":N.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?A(A(a,N.ajaxSettings),b):A(N.ajaxSettings,a)},ajaxPrefilter:Y(lf),ajaxTransport:Y(Ad),ajax:function(a,d){function f(a,d,h,e){var x,M,O,D,G=d;if(2!==B){B=2;n&&clearTimeout(n);r=b;m=e||"";w.readyState=0<a?4:0;if(h){D=t;e=w;var Y,P,la,ja,ka=D.contents,U=D.dataTypes,da=D.responseFields;
for(ja in da)ja in h&&(e[da[ja]]=h[ja]);for(;"*"===U[0];)U.shift(),P===b&&(P=D.mimeType||e.getResponseHeader("Content-Type"));if(P)for(ja in ka)if(ka[ja]&&ka[ja].test(P)){U.unshift(ja);break}if(U[0]in h)la=U[0];else{for(ja in h){if(!U[0]||D.converters[ja+" "+U[0]]){la=ja;break}Y||(Y=ja)}la=la||Y}la?(la!==U[0]&&U.unshift(la),D=h[la]):D=void 0}if(200<=a&&300>a||304===a)if(t.ifModified&&((h=w.getResponseHeader("Last-Modified"))&&(N.lastModified[k]=h),(h=w.getResponseHeader("etag"))&&(N.etag[k]=h)),204===
a)x=!0,G="nocontent";else if(304===a)x=!0,G="notmodified";else{a:{M=t;O=D;var va,Bb,G={};Y=0;P=M.dataTypes.slice();la=P[0];M.dataFilter&&(O=M.dataFilter(O,M.dataType));if(P[1])for(Bb in M.converters)G[Bb.toLowerCase()]=M.converters[Bb];for(;h=P[++Y];)if("*"!==h){if("*"!==la&&la!==h){Bb=G[la+" "+h]||G["* "+h];if(!Bb)for(va in G)if(x=va.split(" "),x[1]===h&&(Bb=G[la+" "+x[0]]||G["* "+x[0]])){!0===Bb?Bb=G[va]:!0!==G[va]&&(h=x[0],P.splice(Y--,0,h));break}if(!0!==Bb)if(Bb&&M["throws"])O=Bb(O);else try{O=
Bb(O)}catch(Z){x={state:"parsererror",error:Bb?Z:"No conversion from "+la+" to "+h};break a}}la=h}x={state:"success",data:O}}G=x.state;M=x.data;O=x.error;x=!O}else if(O=G,a||!G)G="error",0>a&&(a=0);w.status=a;w.statusText=(d||G)+"";x?E.resolveWith(z,[M,G,w]):E.rejectWith(z,[w,G,O]);w.statusCode(y);y=b;q&&A.trigger(x?"ajaxSuccess":"ajaxError",[w,t,x?M:O]);L.fireWith(z,[w,G]);q&&(A.trigger("ajaxComplete",[w,t]),--N.active||N.event.trigger("ajaxStop"))}}"object"===typeof a&&(d=a,a=b);d=d||{};var h,e,
k,m,n,q,r,x,t=N.ajaxSetup({},d),z=t.context||t,A=t.context&&(z.nodeType||z.jquery)?N(z):N.event,E=N.Deferred(),L=N.Callbacks("once memory"),y=t.statusCode||{},M={},O={},B=0,G="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===B){if(!x)for(x={};b=re.exec(m);)x[b[1].toLowerCase()]=b[2];b=x[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===B?m:null},setRequestHeader:function(a,b){var d=a.toLowerCase();B||(a=O[d]=O[d]||a,M[a]=b);return this},overrideMimeType:function(a){B||
(t.mimeType=a);return this},statusCode:function(a){var b;if(a)if(2>B)for(b in a)y[b]=[y[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){a=a||G;r&&r.abort(a);f(0,a);return this}};E.promise(w).complete=L.add;w.success=w.done;w.error=w.fail;t.url=((a||t.url||Gc)+"").replace(Ie,"").replace(hd,$b[1]+"//");t.type=d.method||d.type||t.method||t.type;t.dataTypes=N.trim(t.dataType||"*").toLowerCase().match(bc)||[""];null==t.crossDomain&&(h=se.exec(t.url.toLowerCase()),t.crossDomain=!(!h||
h[1]===$b[1]&&h[2]===$b[2]&&(h[3]||("http:"===h[1]?80:443))==($b[3]||("http:"===$b[1]?80:443))));t.data&&t.processData&&"string"!==typeof t.data&&(t.data=N.param(t.data,t.traditional));D(lf,t,d,w);if(2===B)return w;(q=t.global)&&0===N.active++&&N.event.trigger("ajaxStart");t.type=t.type.toUpperCase();t.hasContent=!Ve.test(t.type);k=t.url;t.hasContent||(t.data&&(k=t.url+=(lc.test(k)?"&":"?")+t.data,delete t.data),!1===t.cache&&(t.url=qe.test(k)?k.replace(qe,"$1_="+gd++):k+(lc.test(k)?"&":"?")+"_="+
gd++));t.ifModified&&(N.lastModified[k]&&w.setRequestHeader("If-Modified-Since",N.lastModified[k]),N.etag[k]&&w.setRequestHeader("If-None-Match",N.etag[k]));(t.data&&t.hasContent&&!1!==t.contentType||d.contentType)&&w.setRequestHeader("Content-Type",t.contentType);w.setRequestHeader("Accept",t.dataTypes[0]&&t.accepts[t.dataTypes[0]]?t.accepts[t.dataTypes[0]]+("*"!==t.dataTypes[0]?", "+Je+"; q=0.01":""):t.accepts["*"]);for(e in t.headers)w.setRequestHeader(e,t.headers[e]);if(t.beforeSend&&(!1===t.beforeSend.call(z,
w,t)||2===B))return w.abort();G="abort";for(e in{success:1,error:1,complete:1})w[e](t[e]);if(r=D(Ad,t,d,w)){w.readyState=1;q&&A.trigger("ajaxSend",[w,t]);t.async&&0<t.timeout&&(n=setTimeout(function(){w.abort("timeout")},t.timeout));try{B=1,r.send(M,f)}catch(Y){if(2>B)f(-1,Y);else throw Y;}}else f(-1,"No Transport");return w},getScript:function(a,d){return N.get(a,b,d,"script")},getJSON:function(a,b,d){return N.get(a,b,d,"json")}});N.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},
contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){N.globalEval(a);return a}}});N.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1);a.crossDomain&&(a.type="GET",a.global=!1)});N.ajaxTransport("script",function(a){if(a.crossDomain){var d,f=Ba.head||N("head")[0]||Ba.documentElement;return{send:function(b,h){d=Ba.createElement("script");d.async=!0;a.scriptCharset&&(d.charset=a.scriptCharset);d.src=a.url;d.onload=d.onreadystatechange=function(a,b){if(b||!d.readyState||
/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,d.parentNode&&d.parentNode.removeChild(d),d=null,b||h(200,"success")};f.insertBefore(d,f.firstChild)},abort:function(){if(d)d.onload(b,!0)}}}});var wd=[],Xe=/(=)\?(?=&|$)|\?\?/;N.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=wd.pop()||N.expando+"_"+gd++;this[a]=!0;return a}});N.ajaxPrefilter("json jsonp",function(d,f,h){var e,k,m,n=!1!==d.jsonp&&(Xe.test(d.url)?"url":"string"===typeof d.data&&!(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&
Xe.test(d.data)&&"data");if(n||"jsonp"===d.dataTypes[0])return e=d.jsonpCallback=N.isFunction(d.jsonpCallback)?d.jsonpCallback():d.jsonpCallback,n?d[n]=d[n].replace(Xe,"$1"+e):!1!==d.jsonp&&(d.url+=(lc.test(d.url)?"&":"?")+d.jsonp+"="+e),d.converters["script json"]=function(){m||N.error(e+" was not called");return m[0]},d.dataTypes[0]="json",k=a[e],a[e]=function(){m=arguments},h.always(function(){a[e]=k;d[e]&&(d.jsonpCallback=f.jsonpCallback,wd.push(e));m&&N.isFunction(k)&&k(m[0]);m=k=b}),"script"});
var Ld,he,Wf=0,Ye=a.ActiveXObject&&function(){for(var a in Ld)Ld[a](b,!0)};N.ajaxSettings.xhr=a.ActiveXObject?function(){var b;if(!(b=!this.isLocal&&L()))a:{try{b=new a.ActiveXObject("Microsoft.XMLHTTP");break a}catch(d){}b=void 0}return b}:L;he=N.ajaxSettings.xhr();N.support.cors=!!he&&"withCredentials"in he;(he=N.support.ajax=!!he)&&N.ajaxTransport(function(d){if(!d.crossDomain||N.support.cors){var f;return{send:function(h,e){var k,m,n=d.xhr();d.username?n.open(d.type,d.url,d.async,d.username,d.password):
n.open(d.type,d.url,d.async);if(d.xhrFields)for(m in d.xhrFields)n[m]=d.xhrFields[m];d.mimeType&&n.overrideMimeType&&n.overrideMimeType(d.mimeType);d.crossDomain||h["X-Requested-With"]||(h["X-Requested-With"]="XMLHttpRequest");try{for(m in h)n.setRequestHeader(m,h[m])}catch(q){}n.send(d.hasContent&&d.data||null);f=function(a,h){var m,q,r,x;try{if(f&&(h||4===n.readyState))if(f=b,k&&(n.onreadystatechange=N.noop,Ye&&delete Ld[k]),h)4!==n.readyState&&n.abort();else{x={};m=n.status;q=n.getAllResponseHeaders();
"string"===typeof n.responseText&&(x.text=n.responseText);try{r=n.statusText}catch(t){r=""}m||!d.isLocal||d.crossDomain?1223===m&&(m=204):m=x.text?200:404}}catch(z){h||e(-1,z)}x&&e(m,r,x,q)};d.async?4===n.readyState?setTimeout(f):(k=++Wf,Ye&&(Ld||(Ld={},N(a).unload(Ye)),Ld[k]=f),n.onreadystatechange=f):f()},abort:function(){f&&f(b,!0)}}}});var Zd,Sd,mf=/^(?:toggle|show|hide)$/,Xf=new RegExp("^(?:([+-])=|)("+ed+")([a-z%]*)$","i"),Yf=/queueHooks$/,$d=[function(a,b,d){var f,h,e,k,m,n,q=this,r=a.style,
t={},z=[],A=a.nodeType&&fa(a);d.queue||(m=N._queueHooks(a,"fx"),null==m.unqueued&&(m.unqueued=0,n=m.empty.fire,m.empty.fire=function(){m.unqueued||n()}),m.unqueued++,q.always(function(){q.always(function(){m.unqueued--;N.queue(a,"fx").length||m.empty.fire()})}));1===a.nodeType&&("height"in b||"width"in b)&&(d.overflow=[r.overflow,r.overflowX,r.overflowY],"inline"===N.css(a,"display")&&"none"===N.css(a,"float")&&(N.support.inlineBlockNeedsLayout&&"inline"!==x(a.nodeName)?r.zoom=1:r.display="inline-block"));
d.overflow&&(r.overflow="hidden",N.support.shrinkWrapBlocks||q.always(function(){r.overflow=d.overflow[0];r.overflowX=d.overflow[1];r.overflowY=d.overflow[2]}));for(h in b)e=b[h],mf.exec(e)&&(delete b[h],f=f||"toggle"===e,e!==(A?"hide":"show")&&z.push(h));if(b=z.length)for(e=N._data(a,"fxshow")||N._data(a,"fxshow",{}),("hidden"in e)&&(A=e.hidden),f&&(e.hidden=!A),A?N(a).show():q.done(function(){N(a).hide()}),q.done(function(){var b;N._removeData(a,"fxshow");for(b in t)N.style(a,b,t[b])}),h=0;h<b;h++)f=
z[h],k=q.createTween(f,A?e[f]:0),t[f]=e[f]||N.style(a,f),f in e||(e[f]=k.start,A&&(k.end=k.start,k.start="width"===f||"height"===f?1:0))}],oe={"*":[function(a,b){var d,f,h=this.createTween(a,b),e=Xf.exec(b),k=h.cur(),m=+k||0,n=1,q=20;if(e){d=+e[2];f=e[3]||(N.cssNumber[a]?"":"px");if("px"!==f&&m){m=N.css(h.elem,a,!0)||d||1;do n=n||".5",m/=n,N.style(h.elem,a,m+f);while(n!==(n=h.cur()/k)&&1!==n&&--q)}h.unit=f;h.start=m;h.end=e[1]?m+(e[1]+1)*d:d}return h}]};N.Animation=N.extend(Ia,{tweener:function(a,
b){N.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var d,f=0,h=a.length;f<h;f++)d=a[f],oe[d]=oe[d]||[],oe[d].unshift(b)},prefilter:function(a,b){b?$d.unshift(a):$d.push(a)}});N.Tween=O;O.prototype={constructor:O,init:function(a,b,d,f,h,e){this.elem=a;this.prop=d;this.easing=h||"swing";this.options=b;this.start=this.now=this.cur();this.end=f;this.unit=e||(N.cssNumber[d]?"":"px")},cur:function(){var a=O.propHooks[this.prop];return a&&a.get?a.get(this):O.propHooks._default.get(this)},run:function(a){var b,
d=O.propHooks[this.prop];this.pos=this.options.duration?b=N.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):b=a;this.now=(this.end-this.start)*b+this.start;this.options.step&&this.options.step.call(this.elem,this.now,this);d&&d.set?d.set(this):O.propHooks._default.set(this);return this}};O.prototype.init.prototype=O.prototype;O.propHooks={_default:{get:function(a){return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(a=N.css(a.elem,a.prop,""))&&"auto"!==a?
a:0:a.elem[a.prop]},set:function(a){if(N.fx.step[a.prop])N.fx.step[a.prop](a);else a.elem.style&&(null!=a.elem.style[N.cssProps[a.prop]]||N.cssHooks[a.prop])?N.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}};O.propHooks.scrollTop=O.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}};N.each(["toggle","show","hide"],function(a,b){var d=N.fn[b];N.fn[b]=function(a,f,h){return null==a||"boolean"===typeof a?d.apply(this,arguments):this.animate(wa(b,
!0),a,f,h)}});N.fn.extend({fadeTo:function(a,b,d,f){return this.filter(fa).css("opacity",0).show().end().animate({opacity:b},a,d,f)},animate:function(a,b,d,f){var h=N.isEmptyObject(a),e=N.speed(b,d,f),k=function(){var b=Ia(this,N.extend({},a),e);k.finish=function(){b.stop(!0)};(h||N._data(this,"finish"))&&b.stop(!0)};k.finish=k;return h||!1===e.queue?this.each(k):this.queue(e.queue,k)},stop:function(a,d,f){var h=function(a){var b=a.stop;delete a.stop;b(f)};"string"!==typeof a&&(f=d,d=a,a=b);d&&!1!==
a&&this.queue(a||"fx",[]);return this.each(function(){var b=!0,d=null!=a&&a+"queueHooks",e=N.timers,k=N._data(this);if(d)k[d]&&k[d].stop&&h(k[d]);else for(d in k)k[d]&&k[d].stop&&Yf.test(d)&&h(k[d]);for(d=e.length;d--;)e[d].elem!==this||null!=a&&e[d].queue!==a||(e[d].anim.stop(f),b=!1,e.splice(d,1));!b&&f||N.dequeue(this,a)})},finish:function(a){!1!==a&&(a=a||"fx");return this.each(function(){var b,d=N._data(this),f=d[a+"queue"];b=d[a+"queueHooks"];var h=N.timers,e=f?f.length:0;d.finish=!0;N.queue(this,
a,[]);b&&b.cur&&b.cur.finish&&b.cur.finish.call(this);for(b=h.length;b--;)h[b].elem===this&&h[b].queue===a&&(h[b].anim.stop(!0),h.splice(b,1));for(b=0;b<e;b++)f[b]&&f[b].finish&&f[b].finish.call(this);delete d.finish})}});N.each({slideDown:wa("show"),slideUp:wa("hide"),slideToggle:wa("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){N.fn[a]=function(a,d,f){return this.animate(b,a,d,f)}});N.speed=function(a,b,d){var f=a&&"object"===typeof a?N.extend({},
a):{complete:d||!d&&b||N.isFunction(a)&&a,duration:a,easing:d&&b||b&&!N.isFunction(b)&&b};f.duration=N.fx.off?0:"number"===typeof f.duration?f.duration:f.duration in N.fx.speeds?N.fx.speeds[f.duration]:N.fx.speeds._default;if(null==f.queue||!0===f.queue)f.queue="fx";f.old=f.complete;f.complete=function(){N.isFunction(f.old)&&f.old.call(this);f.queue&&N.dequeue(this,f.queue)};return f};N.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}};N.timers=[];N.fx=O.prototype.init;
N.fx.tick=function(){var a,d=N.timers,f=0;for(Zd=N.now();f<d.length;f++)a=d[f],a()||d[f]!==a||d.splice(f--,1);d.length||N.fx.stop();Zd=b};N.fx.timer=function(a){a()&&N.timers.push(a)&&N.fx.start()};N.fx.interval=13;N.fx.start=function(){Sd||(Sd=setInterval(N.fx.tick,N.fx.interval))};N.fx.stop=function(){clearInterval(Sd);Sd=null};N.fx.speeds={slow:600,fast:200,_default:400};N.fx.step={};N.expr&&N.expr.filters&&(N.expr.filters.animated=function(a){return N.grep(N.timers,function(b){return a===b.elem}).length});
N.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){N.offset.setOffset(this,a,b)});var d,f,h={top:0,left:0},e=(f=this[0])&&f.ownerDocument;if(e){d=e.documentElement;if(!N.contains(d,f))return h;typeof f.getBoundingClientRect!==ab&&(h=f.getBoundingClientRect());f=Ua(e);return{top:h.top+(f.pageYOffset||d.scrollTop)-(d.clientTop||0),left:h.left+(f.pageXOffset||d.scrollLeft)-(d.clientLeft||0)}}};N.offset={setOffset:function(a,b,d){var f=N.css(a,"position");"static"===f&&
(a.style.position="relative");var h=N(a),e=h.offset(),k=N.css(a,"top"),m=N.css(a,"left"),n={},q={};("absolute"===f||"fixed"===f)&&-1<N.inArray("auto",[k,m])?(q=h.position(),f=q.top,m=q.left):(f=parseFloat(k)||0,m=parseFloat(m)||0);N.isFunction(b)&&(b=b.call(a,d,e));null!=b.top&&(n.top=b.top-e.top+f);null!=b.left&&(n.left=b.left-e.left+m);"using"in b?b.using.call(a,n):h.css(n)}};N.fn.extend({position:function(){if(this[0]){var a,b,d={top:0,left:0},f=this[0];"fixed"===N.css(f,"position")?b=f.getBoundingClientRect():
(a=this.offsetParent(),b=this.offset(),N.nodeName(a[0],"html")||(d=a.offset()),d.top+=N.css(a[0],"borderTopWidth",!0),d.left+=N.css(a[0],"borderLeftWidth",!0));return{top:b.top-d.top-N.css(f,"marginTop",!0),left:b.left-d.left-N.css(f,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||Ba.documentElement;a&&!N.nodeName(a,"html")&&"static"===N.css(a,"position");)a=a.offsetParent;return a||Ba.documentElement})}});N.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},
function(a,d){var f=/Y/.test(d);N.fn[a]=function(h){return N.access(this,function(a,h,e){var k=Ua(a);if(e===b)return k?d in k?k[d]:k.document.documentElement[h]:a[h];k?k.scrollTo(f?N(k).scrollLeft():e,f?e:N(k).scrollTop()):a[h]=e},a,h,arguments.length,null)}});N.each({Height:"height",Width:"width"},function(a,d){N.each({padding:"inner"+a,content:d,"":"outer"+a},function(f,h){N.fn[h]=function(h,e){var k=arguments.length&&(f||"boolean"!==typeof h),m=f||(!0===h||!0===e?"margin":"border");return N.access(this,
function(d,f,h){return N.isWindow(d)?d.document.documentElement["client"+a]:9===d.nodeType?(f=d.documentElement,Math.max(d.body["scroll"+a],f["scroll"+a],d.body["offset"+a],f["offset"+a],f["client"+a])):h===b?N.css(d,f,m):N.style(d,f,h,m)},d,k?h:b,k,null)}})});a.jQuery=a.$=N;"function"===typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return N})})(window);
(function(a){"object"===typeof exports&&"undefined"!==typeof module?module.exports=a():"function"===typeof define&&define.amd?define([],a):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).daikon=a()})(function(){return function(){function a(b,e,d){function f(h,q){if(!e[h]){if(!b[h]){var t="function"==typeof require&&require;if(!q&&t)return t(h,!0);if(k)return k(h,!0);t=Error("Cannot find module '"+h+"'");throw t.code="MODULE_NOT_FOUND",t;
}t=e[h]={exports:{}};b[h][0].call(t.exports,function(a){var d=b[h][1][a];return f(d?d:a)},t,t.exports,a,b,e,d)}return e[h].exports}for(var k="function"==typeof require&&require,h=0;h<d.length;h++)f(d[h]);return f}return a}()({1:[function(a,b,e){(function(d,f){var e=function(h){function e(a){eval.call(null,a)}function k(a,b){a||ic("Assertion failed: "+b)}function t(a){var b=h["_"+a];if(!b)try{b=eval("_"+a)}catch(d){}k(b,"Cannot call unknown function "+a+" (perhaps LLVM optimizations or closure removed it?)");
return b}function y(a,b,d,f){d=d||"i8";"*"===d.charAt(d.length-1)&&(d="i32");switch(d){case "i1":Gb[a>>0]=b;break;case "i8":Gb[a>>0]=b;break;case "i16":db[a>>1]=b;break;case "i32":ib[a>>2]=b;break;case "i64":tc=[b>>>0,(Oc=b,1<=+uc(Oc)?0<Oc?(Fd(+Ed(Oc/4294967296),4294967295)|0)>>>0:~~+nd((Oc-+(~~Oc>>>0))/4294967296)>>>0:0)];ib[a>>2]=tc[0];ib[a+4>>2]=tc[1];break;case "float":Ec[a>>2]=b;break;case "double":pc[a>>3]=b;break;default:ic("invalid type for setValue: "+d)}}function G(a,b,d){b=b||"i8";"*"===
b.charAt(b.length-1)&&(b="i32");switch(b){case "i1":return Gb[a>>0];case "i8":return Gb[a>>0];case "i16":return db[a>>1];case "i32":return ib[a>>2];case "i64":return ib[a>>2];case "float":return Ec[a>>2];case "double":return pc[a>>3];default:ic("invalid type for setValue: "+b)}return null}function B(a,b,d,f){var h,e;"number"===typeof a?(h=!0,e=a):(h=!1,e=a.length);var m="string"===typeof b?b:null;d=4==d?f:[Ra,Oa.stackAlloc,Oa.staticAlloc,Oa.dynamicAlloc][void 0===d?2:d](Math.max(e,m?1:b.length));
if(h){f=d;k(0==(d&3));for(a=d+(e&-4);f<a;f+=4)ib[f>>2]=0;for(a=d+e;f<a;)Gb[f++>>0]=0;return d}if("i8"===m)return a.subarray||a.slice?Ab.set(a,d):Ab.set(new Uint8Array(a),d),d;f=0;for(var n,r;f<e;){var x=a[f];"function"===typeof x&&(x=Oa.getFunctionIndex(x));h=m||b[f];0===h?f++:("i64"==h&&(h="i32"),y(d+f,x,h),r!==h&&(n=Oa.getNativeTypeSize(h),r=h),f+=n)}return d}function w(a,b){if(0===b||!a)return"";for(var d=0,f,e=0;;){f=Ab[a+e>>0];d|=f;if(0==f&&!b)break;e++;if(b&&e==b)break}b||(b=e);f="";if(128>
d){for(;0<b;)d=String.fromCharCode.apply(String,Ab.subarray(a,a+Math.min(b,1024))),f=f?f+d:d,a+=1024,b-=1024;return f}return h.UTF8ToString(a)}function E(a,b){for(var d,f,h,e,k,m,n="";;){d=a[b++];if(!d)return n;d&128?(f=a[b++]&63,192==(d&224)?n+=String.fromCharCode((d&31)<<6|f):(h=a[b++]&63,224==(d&240)?d=(d&15)<<12|f<<6|h:(e=a[b++]&63,240==(d&248)?d=(d&7)<<18|f<<12|h<<6|e:(k=a[b++]&63,248==(d&252)?d=(d&3)<<24|f<<18|h<<12|e<<6|k:(m=a[b++]&63,d=(d&1)<<30|f<<24|h<<18|e<<12|k<<6|m))),65536>d?n+=String.fromCharCode(d):
(d-=65536,n+=String.fromCharCode(55296|d>>10,56320|d&1023)))):n+=String.fromCharCode(d)}}function P(a,b,d,f){if(!(0<f))return 0;var h=d;f=d+f-1;for(var e=0;e<a.length;++e){var k=a.charCodeAt(e);55296<=k&&57343>=k&&(k=65536+((k&1023)<<10)|a.charCodeAt(++e)&1023);if(127>=k){if(d>=f)break;b[d++]=k}else{if(2047>=k){if(d+1>=f)break;b[d++]=192|k>>6}else{if(65535>=k){if(d+2>=f)break;b[d++]=224|k>>12}else{if(2097151>=k){if(d+3>=f)break;b[d++]=240|k>>18}else{if(67108863>=k){if(d+4>=f)break;b[d++]=248|k>>24}else{if(d+
5>=f)break;b[d++]=252|k>>30;b[d++]=128|k>>24&63}b[d++]=128|k>>18&63}b[d++]=128|k>>12&63}b[d++]=128|k>>6&63}b[d++]=128|k&63}}b[d]=0;return d-h}function da(a){for(var b=0,d=0;d<a.length;++d){var f=a.charCodeAt(d);55296<=f&&57343>=f&&(f=65536+((f&1023)<<10)|a.charCodeAt(++d)&1023);127>=f?++b:b=2047>=f?b+2:65535>=f?b+3:2097151>=f?b+4:67108863>=f?b+5:b+6}return b}function aa(a){function b(d,f,h){f=f||Infinity;var e="",k=[],m;if("N"===a[n]){n++;"K"===a[n]&&n++;for(m=[];"E"!==a[n];)if("S"===a[n]){n++;var x=
a.indexOf("_",n),z=a.substring(n,x)||0;m.push(r[z]||"?");n=x+1}else if("C"===a[n])m.push(m[m.length-1]),n+=2;else{x=parseInt(a.substr(n));z=x.toString().length;if(!x||!z){n--;break}var A=a.substr(n+z,x);m.push(A);r.push(A);n+=z+x}n++;m=m.join("::");f--;if(0===f)return d?[m]:m}else if(("K"===a[n]||t&&"L"===a[n])&&n++,x=parseInt(a.substr(n)))z=x.toString().length,m=a.substr(n+z,x),n+=z+x;t=!1;"I"===a[n]?(n++,x=b(!0),z=b(!0,1,!0),e+=z[0]+" "+m+"<"+x.join(", ")+">"):e=m;a:for(;n<a.length&&0<f--;)if(m=
a[n++],m in q)k.push(q[m]);else switch(m){case "P":k.push(b(!0,1,!0)[0]+"*");break;case "R":k.push(b(!0,1,!0)[0]+"&");break;case "L":n++;x=a.indexOf("E",n)-n;k.push(a.substr(n,x));n+=x+2;break;case "A":x=parseInt(a.substr(n));n+=x.toString().length;if("_"!==a[n])throw"?";n++;k.push(b(!0,1,!0)[0]+" ["+x+"]");break;case "E":break a;default:e+="?"+m;break a}h||1!==k.length||"void"!==k[0]||(k=[]);return d?(e&&k.push(e+"?"),k):e+("("+k.join(", ")+")")}var d=!!h.___cxa_demangle;if(d)try{var f=Ra(a.length);
x(a.substr(1),f);var e=Ra(4),k=h.___cxa_demangle(f,0,0,e);if(0===G(e,"i32")&&k)return w(k)}catch(m){}finally{f&&wa(f),e&&wa(e),k&&wa(k)}var n=3,q={v:"void",b:"bool",c:"char",s:"short",i:"int",l:"long",f:"float",d:"double",w:"wchar_t",a:"signed char",h:"unsigned char",t:"unsigned short",j:"unsigned int",m:"unsigned long",x:"long long",y:"unsigned long long",z:"..."},r=[],t=!0,f=a;try{if("Object._main"==a||"_main"==a)return"main()";"number"===typeof a&&(a=w(a));if("_"!==a[0]||"_"!==a[1]||"Z"!==a[2])return a;
switch(a[3]){case "n":return"operator new()";case "d":return"operator delete()"}f=b()}catch(z){f+="?"}0<=f.indexOf("?")&&!d&&Oa.warnOnce("warning: a problem occurred in builtin C++ name demangling; build with  -s DEMANGLE_SUPPORT=1  to link in libcxxabi demangling");return f}function M(a){return a.replace(/__Z[\w\d_]+/g,function(a){var b=aa(a);return a===b?a:a+" ["+b+"]"})}function ka(){var a=M,b;a:{b=Error();if(!b.stack){try{throw Error(0);}catch(d){b=d}if(!b.stack){b="(no stack trace available)";
break a}}b=b.stack.toString()}return a(b)}function m(a){0<a%4096&&(a+=4096-a%4096);return a}function fa(){var a=Math.pow(2,31);if(Hb>=a)return!1;for(;Ib<=Hb;)if(Ib<a/2)Ib=m(2*Ib);else{var b=Ib;Ib=m((3*Ib+a)/4);if(Ib<=b)return!1}Ib=Math.max(Ib,16777216);if(Ib>=a)return!1;try{if(ArrayBuffer.transfer)jb=ArrayBuffer.transfer(jb,Ib);else{var d=Gb;jb=new ArrayBuffer(Ib)}}catch(f){return!1}if(!Jd(jb))return!1;h.buffer=jb;h.HEAP8=Gb=new Int8Array(jb);h.HEAP16=db=new Int16Array(jb);h.HEAP32=ib=new Int32Array(jb);
h.HEAPU8=Ab=new Uint8Array(jb);h.HEAPU16=Jc=new Uint16Array(jb);h.HEAPU32=Kc=new Uint32Array(jb);h.HEAPF32=Ec=new Float32Array(jb);h.HEAPF64=pc=new Float64Array(jb);ArrayBuffer.transfer||Gb.set(d);return!0}function ba(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b();else{var d=b.func;"number"===typeof d?void 0===b.arg?Oa.dynCall("v",d):Oa.dynCall("vi",d,[b.arg]):d(void 0===b.arg?null:b.arg)}}}function Z(a){yc.unshift(a)}function X(a){Ya.unshift(a)}function U(a,b,d){d=0<d?d:da(a)+1;
d=Array(d);a=P(a,d,0,d.length);b&&(d.length=a);return d}function x(a,b,d){a=U(a,d);for(d=0;d<a.length;)Gb[b+d>>0]=a[d],d+=1}function n(a,b){for(var d=0;d<a.length;d++)Gb[b++>>0]=a[d]}function z(a,b,d){for(var f=0;f<a.length;++f)Gb[b++>>0]=a.charCodeAt(f);d||(Gb[b>>0]=0)}function Y(a){jc++;h.monitorRunDependencies&&h.monitorRunDependencies(jc)}function D(a){jc--;h.monitorRunDependencies&&h.monitorRunDependencies(jc);0==jc&&(null!==Gd&&(clearInterval(Gd),Gd=null),Yc&&(a=Yc,Yc=null,a()))}function A(a,
b){Tb.unshift({func:a,arg:b})}function L(){return!!L.uncaught_exception}function la(){var a=Qa.last;if(!a)return(Ma.setTempRet0(0),0)|0;var b=Qa.infos[a],d=b.type;if(!d)return(Ma.setTempRet0(0),a)|0;var f=Array.prototype.slice.call(arguments);h.___cxa_is_pointer_type(d);la.buffer||(la.buffer=Ra(4));ib[la.buffer>>2]=a;for(var a=la.buffer,e=0;e<f.length;e++)if(f[e]&&h.___cxa_can_catch(f[e],d,a))return a=ib[a>>2],b.adjusted=a,(Ma.setTempRet0(f[e]),a)|0;a=ib[a>>2];return(Ma.setTempRet0(d),a)|0}function ja(a){return 0===
a%4&&(0!==a%100||0===a%400)}function Ia(a,b){for(var d=0,f=0;f<=b;d+=a[f++]);return d}function va(a,b){for(var d=new Date(a.getTime());0<b;){var f=ja(d.getFullYear()),h=d.getMonth(),f=(f?Pb:cd)[h];if(b>f-d.getDate())b-=f-d.getDate()+1,d.setDate(1),11>h?d.setMonth(h+1):(d.setMonth(0),d.setFullYear(d.getFullYear()+1));else{d.setDate(d.getDate()+b);break}}return d}function O(a,b,d,f){function h(a,b,d){for(a="number"===typeof a?a.toString():a||"";a.length<b;)a=d[0]+a;return a}function e(a,b){return h(a,
b,"0")}function k(a,b){function d(a){return 0>a?-1:0<a?1:0}var f;0===(f=d(a.getFullYear()-b.getFullYear()))&&0===(f=d(a.getMonth()-b.getMonth()))&&(f=d(a.getDate()-b.getDate()));return f}function m(a){switch(a.getDay()){case 0:return new Date(a.getFullYear()-1,11,29);case 1:return a;case 2:return new Date(a.getFullYear(),0,3);case 3:return new Date(a.getFullYear(),0,2);case 4:return new Date(a.getFullYear(),0,1);case 5:return new Date(a.getFullYear()-1,11,31);case 6:return new Date(a.getFullYear()-
1,11,30)}}function q(a){a=va(new Date(a.tm_year+1900,0,1),a.tm_yday);var b=new Date(a.getFullYear(),0,4),d=new Date(a.getFullYear()+1,0,4),b=m(b),d=m(d);return 0>=k(b,a)?0>=k(d,a)?a.getFullYear()+1:a.getFullYear():a.getFullYear()-1}var r=ib[f+40>>2];f={tm_sec:ib[f>>2],tm_min:ib[f+4>>2],tm_hour:ib[f+8>>2],tm_mday:ib[f+12>>2],tm_mon:ib[f+16>>2],tm_year:ib[f+20>>2],tm_wday:ib[f+24>>2],tm_yday:ib[f+28>>2],tm_isdst:ib[f+32>>2],tm_gmtoff:ib[f+36>>2],tm_zone:r?w(r):""};d=w(d);var r={"%c":"%a %b %d %H:%M:%S %Y",
"%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S"},x;for(x in r)d=d.replace(new RegExp(x,"g"),r[x]);var t="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),z="January February March April May June July August September October November December".split(" "),r={"%a":function(a){return t[a.tm_wday].substring(0,3)},"%A":function(a){return t[a.tm_wday]},"%b":function(a){return z[a.tm_mon].substring(0,3)},"%B":function(a){return z[a.tm_mon]},
"%C":function(a){return e((a.tm_year+1900)/100|0,2)},"%d":function(a){return e(a.tm_mday,2)},"%e":function(a){return h(a.tm_mday,2," ")},"%g":function(a){return q(a).toString().substring(2)},"%G":function(a){return q(a)},"%H":function(a){return e(a.tm_hour,2)},"%I":function(a){return e(13>a.tm_hour?a.tm_hour:a.tm_hour-12,2)},"%j":function(a){return e(a.tm_mday+Ia(ja(a.tm_year+1900)?Pb:cd,a.tm_mon-1),3)},"%m":function(a){return e(a.tm_mon+1,2)},"%M":function(a){return e(a.tm_min,2)},"%n":function(){return"\n"},
"%p":function(a){return 0<a.tm_hour&&13>a.tm_hour?"AM":"PM"},"%S":function(a){return e(a.tm_sec,2)},"%t":function(){return"\t"},"%u":function(a){return(new Date(a.tm_year+1900,a.tm_mon+1,a.tm_mday,0,0,0,0)).getDay()||7},"%U":function(a){var b=new Date(a.tm_year+1900,0,1),d=0===b.getDay()?b:va(b,7-b.getDay());a=new Date(a.tm_year+1900,a.tm_mon,a.tm_mday);return 0>k(d,a)?(b=Ia(ja(a.getFullYear())?Pb:cd,a.getMonth()-1)-31,d=31-d.getDate()+b+a.getDate(),e(Math.ceil(d/7),2)):0===k(d,b)?"01":"00"},"%V":function(a){var b=
new Date(a.tm_year+1901,0,4),d=m(new Date(a.tm_year+1900,0,4)),b=m(b),f=va(new Date(a.tm_year+1900,0,1),a.tm_yday);if(0>k(f,d))return"53";if(0>=k(b,f))return"01";a=d.getFullYear()<a.tm_year+1900?a.tm_yday+32-d.getDate():a.tm_yday+1-d.getDate();return e(Math.ceil(a/7),2)},"%w":function(a){return(new Date(a.tm_year+1900,a.tm_mon+1,a.tm_mday,0,0,0,0)).getDay()},"%W":function(a){var b=new Date(a.tm_year,0,1),d=1===b.getDay()?b:va(b,0===b.getDay()?1:7-b.getDay()+1);a=new Date(a.tm_year+1900,a.tm_mon,a.tm_mday);
return 0>k(d,a)?(b=Ia(ja(a.getFullYear())?Pb:cd,a.getMonth()-1)-31,d=31-d.getDate()+b+a.getDate(),e(Math.ceil(d/7),2)):0===k(d,b)?"01":"00"},"%y":function(a){return(a.tm_year+1900).toString().substring(2)},"%Y":function(a){return a.tm_year+1900},"%z":function(a){a=a.tm_gmtoff;var b=0<=a;a=Math.abs(a)/60;return(b?"+":"-")+String("0000"+(a/60*100+a%60)).slice(-4)},"%Z":function(a){return a.tm_zone},"%%":function(){return"%"}};for(x in r)0<=d.indexOf(x)&&(d=d.replace(new RegExp(x,"g"),r[x](f)));x=U(d,
!1);if(x.length>b)return 0;n(x,a);return x.length-1}function wa(){}function Ua(a){try{return wa(a)}catch(b){}}function lb(){if(lb.rethrown)lb.rethrown=!1;else{Ma.setThrew(0);var a=Qa.caught.pop();a&&(Qa.decRef(Qa.deAdjust(a)),Qa.last=0)}}function ha(a,b){ha.seen||(ha.seen={});a in ha.seen||(Oa.dynCall("v",b),ha.seen[a]=1)}function ab(a){h.___errno_location&&(ib[h.___errno_location()>>2]=a);return a}function Ba(a,b){ra.mainLoop.timingMode=a;ra.mainLoop.timingValue=b;if(!ra.mainLoop.func)return 1;if(0==
a)ra.mainLoop.scheduler=function(){setTimeout(ra.mainLoop.runner,b)},ra.mainLoop.method="timeout";else if(1==a)ra.mainLoop.scheduler=function(){ra.requestAnimationFrame(ra.mainLoop.runner)},ra.mainLoop.method="rAF";else if(2==a){if(!window.setImmediate){var d=[];window.addEventListener("message",function(a){a.source===window&&"__emcc"===a.data&&(a.stopPropagation(),d.shift()())},!0);window.setImmediate=function(a){d.push(a);window.postMessage("__emcc","*")}}ra.mainLoop.scheduler=function(){window.setImmediate(ra.mainLoop.runner)};
ra.mainLoop.method="immediate"}return 0}function nb(a,b,d,f,e){h.noExitRuntime=!0;k(!ra.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");ra.mainLoop.func=a;ra.mainLoop.arg=f;var m=ra.mainLoop.currentlyRunningMainloop;ra.mainLoop.runner=function(){if(!Eb)if(0<ra.mainLoop.queue.length){var b=Date.now(),d=ra.mainLoop.queue.shift();d.func(d.arg);if(ra.mainLoop.remainingBlockers){var e=
ra.mainLoop.remainingBlockers,k=0==e%1?e-1:Math.floor(e);ra.mainLoop.remainingBlockers=d.counted?k:(8*e+(k+.5))/9}console.log('main loop blocker "'+d.name+'" took '+(Date.now()-b)+" ms");ra.mainLoop.updateStatus();setTimeout(ra.mainLoop.runner,0)}else m<ra.mainLoop.currentlyRunningMainloop||(ra.mainLoop.currentFrameNumber=ra.mainLoop.currentFrameNumber+1|0,1==ra.mainLoop.timingMode&&1<ra.mainLoop.timingValue&&0!=ra.mainLoop.currentFrameNumber%ra.mainLoop.timingValue?ra.mainLoop.scheduler():("timeout"===
ra.mainLoop.method&&h.ctx&&(h.printErr("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"),ra.mainLoop.method=""),ra.mainLoop.runIter(function(){"undefined"!==typeof f?Oa.dynCall("vi",a,[f]):Oa.dynCall("v",a)}),m<ra.mainLoop.currentlyRunningMainloop||("object"===typeof SDL&&SDL.audio&&SDL.audio.queueNewAudioData&&SDL.audio.queueNewAudioData(),
ra.mainLoop.scheduler())))};e||(b&&0<b?Ba(0,1E3/b):Ba(1,1),ra.mainLoop.scheduler());if(d)throw"SimulateInfiniteLoop";}function Ra(a){return Oa.dynamicAlloc(a+8)+8&4294967288}function dc(a,b){Tb.push(function(){Oa.dynCall("vi",a,[b])});dc.level=Tb.length}function gc(a){var b=gc;b.called||(Hb=m(Hb),b.called=!0,k(Oa.dynamicAlloc),b.alloc=Oa.dynamicAlloc,Oa.dynamicAlloc=function(){ic("cannot dynamically allocate, sbrk now has control")});var d=Hb;return 0==a||b.alloc(a)?d:4294967295}function cc(a,b){qb.varargs=
b;try{qb.get();var d=qb.get(),f=qb.get(),e=0;cc.buffer||(cc.buffer=[]);for(var k=cc.buffer,m=0;m<f;m++){for(var n=ib[d+8*m>>2],q=ib[d+(8*m+4)>>2],r=0;r<q;r++){var x=Ab[n+r];0===x||10===x?(h.print(E(k,0)),k.length=0):k.push(x)}e+=q}return e}catch(t){return"undefined"!==typeof FS&&t instanceof FS.ErrnoError||ic(t),-t.errno}}function zb(a){this.name="ExitStatus";this.message="Program terminated with exit("+a+")";this.status=a}function kc(a){function b(){if(!h.calledRun&&(h.calledRun=!0,!Eb)){zc||(zc=
!0,ba(Lc));ba(Qc);if(h.onRuntimeInitialized)h.onRuntimeInitialized();h._main&&Kd&&h.callMain(a);if(h.postRun)for("function"==typeof h.postRun&&(h.postRun=[h.postRun]);h.postRun.length;)X(h.postRun.shift());ba(Ya)}}a=a||h.arguments;null===zd&&(zd=Date.now());if(!(0<jc)){if(h.preRun)for("function"==typeof h.preRun&&(h.preRun=[h.preRun]);h.preRun.length;)Z(h.preRun.shift());ba(yc);0<jc||h.calledRun||(h.setStatus?(h.setStatus("Running..."),setTimeout(function(){setTimeout(function(){h.setStatus("")},
1);b()},1)):b())}}function mc(a,b){if(!b||!h.noExitRuntime){if(!h.noExitRuntime&&(Eb=!0,xc=ge,ba(Tb),h.onExit))h.onExit(a);ed?(d.stdout.once("drain",function(){d.exit(a)}),console.log(" "),setTimeout(function(){d.exit(a)},500)):bc&&"function"===typeof quit&&quit(a);throw new zb(a);}}function ic(a){void 0!==a?(h.print(a),h.printErr(a),a=JSON.stringify(a)):a="";Eb=!0;var b="abort("+a+") at "+ka()+"\nIf this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.";pd&&pd.forEach(function(d){b=
d(b,a)});throw b;}h=h||{};var vb={},mb;for(mb in h)h.hasOwnProperty(mb)&&(vb[mb]=h[mb]);var nc="object"===typeof window,N="function"===typeof importScripts,ed="object"===typeof d&&"function"===typeof a&&!nc&&!N,bc=!nc&&!ed&&!N;if(ed){h.print||(h.print=function(a){d.stdout.write(a+"\n")});h.printErr||(h.printErr=function(a){d.stderr.write(a+"\n")});var ec=a("fs"),Nc=a("path");h.read=function(a,b){a=Nc.normalize(a);var d=ec.readFileSync(a);d||a==Nc.resolve(a)||(a=path.join(f,"..","src",a),d=ec.readFileSync(a));
d&&!b&&(d=d.toString());return d};h.readBinary=function(a){a=h.read(a,!0);a.buffer||(a=new Uint8Array(a));k(a.buffer);return a};h.load=function(a){e(read(a))};h.thisProgram||(h.thisProgram=1<d.argv.length?d.argv[1].replace(/\\/g,"/"):"unknown-program");h.arguments=d.argv.slice(2);"undefined"!==typeof b&&(b.exports=h);d.on("uncaughtException",function(a){if(!(a instanceof zb))throw a;});h.inspect=function(){return"[Emscripten Module object]"}}else if(bc)h.print||(h.print=print),"undefined"!=typeof printErr&&
(h.printErr=printErr),h.read="undefined"!=typeof read?read:function(){throw"no read() available (jsc?)";},h.readBinary=function(a){if("function"===typeof readbuffer)return new Uint8Array(readbuffer(a));a=read(a,"binary");k("object"===typeof a);return a},"undefined"!=typeof scriptArgs?h.arguments=scriptArgs:"undefined"!=typeof arguments&&(h.arguments=arguments);else if(nc||N)h.read=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},"undefined"!=typeof arguments&&
(h.arguments=arguments),"undefined"!==typeof console?(h.print||(h.print=function(a){console.log(a)}),h.printErr||(h.printErr=function(a){console.log(a)})):h.print||(h.print=function(a){}),N&&(h.load=importScripts),"undefined"===typeof h.setWindowTitle&&(h.setWindowTitle=function(a){document.title=a});else throw"Unknown runtime environment. Where are we?";!h.load&&h.read&&(h.load=function(a){e(h.read(a))});h.print||(h.print=function(){});h.printErr||(h.printErr=h.print);h.arguments||(h.arguments=[]);
h.thisProgram||(h.thisProgram="./this.program");h.print=h.print;h.printErr=h.printErr;h.preRun=[];h.postRun=[];for(mb in vb)vb.hasOwnProperty(mb)&&(h[mb]=vb[mb]);var Oa={setTempRet0:function(a){hc=a},getTempRet0:function(){return hc},stackSave:function(){return xc},stackRestore:function(a){xc=a},getNativeTypeSize:function(a){switch(a){case "i1":case "i8":return 1;case "i16":return 2;case "i32":return 4;case "i64":return 8;case "float":return 4;case "double":return 8;default:return"*"===a[a.length-
1]?Oa.QUANTUM_SIZE:"i"===a[0]?(a=parseInt(a.substr(1)),k(0===a%8),a/8):0}},getNativeFieldSize:function(a){return Math.max(Oa.getNativeTypeSize(a),Oa.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(a,b){"double"===b||"i64"===b?a&7&&(k(4===(a&7)),a+=4):k(0===(a&3));return a},getAlignSize:function(a,b,d){return d||"i64"!=a&&"double"!=a?a?Math.min(b||(a?Oa.getNativeFieldSize(a):0),Oa.QUANTUM_SIZE):Math.min(b,8):8},dynCall:function(a,b,d){return d&&d.length?(d.splice||(d=Array.prototype.slice.call(d)),
d.splice(0,0,b),h["dynCall_"+a].apply(null,d)):h["dynCall_"+a].call(null,b)},functionPointers:[],addFunction:function(a){for(var b=0;b<Oa.functionPointers.length;b++)if(!Oa.functionPointers[b])return Oa.functionPointers[b]=a,2*(1+b);throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.";},removeFunction:function(a){Oa.functionPointers[(a-2)/2]=null},warnOnce:function(a){Oa.warnOnce.shown||(Oa.warnOnce.shown={});Oa.warnOnce.shown[a]||(Oa.warnOnce.shown[a]=
1,h.printErr(a))},funcWrappers:{},getFuncWrapper:function(a,b){k(b);Oa.funcWrappers[b]||(Oa.funcWrappers[b]={});var d=Oa.funcWrappers[b];d[a]||(d[a]=function(){return Oa.dynCall(b,a,arguments)});return d[a]},getCompilerSetting:function(a){throw"You must build with -s RETAIN_COMPILER_SETTINGS=1 for Runtime.getCompilerSetting or emscripten_get_compiler_setting to work";},stackAlloc:function(a){var b=xc;xc=xc+a|0;xc=xc+15&-16;return b},staticAlloc:function(a){var b=Uc;Uc=Uc+a|0;Uc=Uc+15&-16;return b},
dynamicAlloc:function(a){var b=Hb;Hb=Hb+a|0;Hb=Hb+15&-16;return Hb>=Ib&&!fa()?(Hb=b,0):b},alignMemory:function(a,b){return Math.ceil(a/(b?b:16))*(b?b:16)},makeBigInt:function(a,b,d){return d?+(a>>>0)+4294967296*+(b>>>0):+(a>>>0)+4294967296*+(b|0)},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};h.Runtime=Oa;var Eb=!1,Oc,tc,hc,fd,wc;(function(){function a(b){b=b.toString().match(f).slice(1);return{arguments:b[0],body:b[1],returnValue:b[2]}}var b={stackSave:function(){Oa.stackSave()},stackRestore:function(){Oa.stackRestore()},
arrayToC:function(a){var b=Oa.stackAlloc(a.length);n(a,b);return b},stringToC:function(a){var b=0;null!==a&&void 0!==a&&0!==a&&(b=Oa.stackAlloc((a.length<<2)+1),x(a,b));return b}},d={string:b.stringToC,array:b.arrayToC};wc=function(a,b,f,h,e){a=t(a);var k=[],m=0;if(h)for(var n=0;n<h.length;n++){var q=d[f[n]];q?(0===m&&(m=Oa.stackSave()),k[n]=q(h[n])):k[n]=h[n]}f=a.apply(null,k);"string"===b&&(f=w(f));if(0!==m){if(e&&e.async){EmterpreterAsync.asyncFinalizers.push(function(){Oa.stackRestore(m)});return}Oa.stackRestore(m)}return f};
var f=/^function\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/,h={},e;for(e in b)b.hasOwnProperty(e)&&(h[e]=a(b[e]));fd=function(b,d,f){f=f||[];var e=t(b);b=f.every(function(a){return"number"===a});var k="string"!==d;if(k&&b)return e;var m=f.map(function(a,b){return"$"+b});d="(function("+m.join(",")+") {";var n=f.length;if(!b){d+="var stack = "+h.stackSave.body+";";for(var q=0;q<n;q++){var r=m[q],x=f[q];"number"!==x&&(x=h[x+"ToC"],d+="var "+x.arguments+" = "+r+";",d+=x.body+";",d+=
r+"="+x.returnValue+";")}}f=a(function(){return e}).returnValue;d+="var ret = "+f+"("+m.join(",")+");";k||(f=a(function(){return w}).returnValue,d+="ret = "+f+"(ret);");b||(d+=h.stackRestore.body.replace("()","(stack)")+";");return eval(d+"return ret})")}})();h.ccall=wc;h.cwrap=fd;h.setValue=y;h.getValue=G;h.ALLOC_NORMAL=0;h.ALLOC_STACK=1;h.ALLOC_STATIC=2;h.ALLOC_DYNAMIC=3;h.ALLOC_NONE=4;h.allocate=B;h.getMemory=function(a){return Bd?"undefined"!==typeof gc&&!gc.called||!zc?Oa.dynamicAlloc(a):Ra(a):
Oa.staticAlloc(a)};h.Pointer_stringify=w;h.AsciiToString=function(a){for(var b="";;){var d=Gb[a++>>0];if(!d)return b;b+=String.fromCharCode(d)}};h.stringToAscii=function(a,b){return z(a,b,!1)};h.UTF8ArrayToString=E;h.UTF8ToString=function(a){return E(Ab,a)};h.stringToUTF8Array=P;h.stringToUTF8=function(a,b,d){return P(a,Ab,b,d)};h.lengthBytesUTF8=da;h.UTF16ToString=function(a){for(var b=0,d="";;){var f=db[a+2*b>>1];if(0==f)return d;++b;d+=String.fromCharCode(f)}};h.stringToUTF16=function(a,b,d){void 0===
d&&(d=2147483647);if(2>d)return 0;d-=2;var f=b;d=d<2*a.length?d/2:a.length;for(var h=0;h<d;++h){var e=a.charCodeAt(h);db[b>>1]=e;b+=2}db[b>>1]=0;return b-f};h.lengthBytesUTF16=function(a){return 2*a.length};h.UTF32ToString=function(a){for(var b=0,d="";;){var f=ib[a+4*b>>2];if(0==f)return d;++b;65536<=f?(f-=65536,d+=String.fromCharCode(55296|f>>10,56320|f&1023)):d+=String.fromCharCode(f)}};h.stringToUTF32=function(a,b,d){void 0===d&&(d=2147483647);if(4>d)return 0;var f=b;d=f+d-4;for(var h=0;h<a.length;++h){var e=
a.charCodeAt(h);if(55296<=e&&57343>=e)var k=a.charCodeAt(++h),e=65536+((e&1023)<<10)|k&1023;ib[b>>2]=e;b+=4;if(b+4>d)break}ib[b>>2]=0;return b-f};h.lengthBytesUTF32=function(a){for(var b=0,d=0;d<a.length;++d){var f=a.charCodeAt(d);55296<=f&&57343>=f&&++d;b+=4}return b};h.stackTrace=ka;var Gb,Ab,db,Jc,ib,Kc,Ec,pc,qc=0,Uc=0,Bd=!1,Vc=0,xc=0,Qb=0,fc=0,Hb=0,Wc;try{Wc=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get),Wc(new ArrayBuffer(4))}catch(ob){Wc=
function(a){return a.byteLength}}for(var Xc=h.TOTAL_STACK||5242880,Ib=h.TOTAL_MEMORY||16777216,Rb=65536;Rb<Ib||Rb<2*Xc;)Rb=16777216>Rb?2*Rb:Rb+16777216;Rb=Math.max(Rb,16777216);Rb!==Ib&&(Ib=Rb);k("undefined"!==typeof Int32Array&&"undefined"!==typeof Float64Array&&!!(new Int32Array(1)).subarray&&!!(new Int32Array(1)).set,"JS engine does not provide full typed array support");var jb;jb=new ArrayBuffer(Ib);Gb=new Int8Array(jb);db=new Int16Array(jb);ib=new Int32Array(jb);Ab=new Uint8Array(jb);Jc=new Uint16Array(jb);
Kc=new Uint32Array(jb);Ec=new Float32Array(jb);pc=new Float64Array(jb);ib[0]=255;k(255===Ab[0]&&0===Ab[3],"Typed arrays 2 must be run on a little-endian system");h.HEAP=void 0;h.buffer=jb;h.HEAP8=Gb;h.HEAP16=db;h.HEAP32=ib;h.HEAPU8=Ab;h.HEAPU16=Jc;h.HEAPU32=Kc;h.HEAPF32=Ec;h.HEAPF64=pc;var yc=[],Lc=[],Qc=[],Tb=[],Ya=[],zc=!1;h.addOnPreRun=Z;h.addOnInit=function(a){Lc.unshift(a)};h.addOnPreMain=function(a){Qc.unshift(a)};h.addOnExit=function(a){Tb.unshift(a)};h.addOnPostRun=X;h.intArrayFromString=
U;h.intArrayToString=function(a){for(var b=[],d=0;d<a.length;d++){var f=a[d];255<f&&(f&=255);b.push(String.fromCharCode(f))}return b.join("")};h.writeStringToMemory=x;h.writeArrayToMemory=n;h.writeAsciiToMemory=z;Math.imul&&-5===Math.imul(4294967295,5)||(Math.imul=function(a,b){var d=a&65535,f=b&65535;return d*f+((a>>>16)*f+d*(b>>>16)<<16)|0});Math.imul=Math.imul;Math.clz32||(Math.clz32=function(a){a>>>=0;for(var b=0;32>b;b++)if(a&1<<31-b)return b;return 32});Math.clz32=Math.clz32;var uc=Math.abs,
nd=Math.ceil,Ed=Math.floor,Fd=Math.min,jc=0,Gd=null,Yc=null;h.addRunDependency=Y;h.removeRunDependency=D;h.preloadedImages={};h.preloadedAudios={};qc=8;Uc=qc+59744;Lc.push({func:function(){Mc()}},{func:function(){od()}},{func:function(){Tc()}});B([0,0,0,0,0,0,0,0,84,144,0,0,31,194,0,0,216,0,0,0,0,0,0,0,84,144,0,0,237,191,0,0,48,0,0,0,0,0,0,0,44,144,0,0,41,192,0,0,84,144,0,0,55,192,0,0,48,0,0,0,0,0,0,0,84,144,0,0,115,192,0,0,48,0,0,0,0,0,0,0,84,144,0,0,175,192,0,0,152,3,0,0,0,0,0,0,84,144,0,0,241,
192,0,0,216,3,0,0,0,0,0,0,84,144,0,0,55,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,95,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,135,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,175,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,216,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,241,193,0,0,48,0,0,0,0,0,0,0,44,144,0,0,13,194,0,0,84,144,0,0,80,194,0,0,216,0,0,0,0,0,0,0,84,144,0,0,44,195,0,0,216,0,0,0,0,0,0,0,84,144,0,0,139,194,0,0,48,0,0,0,0,0,0,0,84,144,0,0,179,194,0,0,48,0,0,0,0,0,0,0,84,144,0,0,219,194,0,0,48,0,0,0,0,0,0,0,84,144,0,0,3,195,
0,0,48,0,0,0,0,0,0,0,84,144,0,0,103,195,0,0,216,0,0,0,0,0,0,0,84,144,0,0,157,195,0,0,216,0,0,0,0,0,0,0,84,144,0,0,211,195,0,0,216,0,0,0,0,0,0,0,84,144,0,0,8,196,0,0,216,0,0,0,0,0,0,0,84,144,0,0,71,196,0,0,216,0,0,0,0,0,0,0,84,144,0,0,138,196,0,0,160,1,0,0,0,0,0,0,44,144,0,0,120,196,0,0,84,144,0,0,187,196,0,0,160,1,0,0,0,0,0,0,84,144,0,0,246,196,0,0,160,1,0,0,0,0,0,0,84,144,0,0,49,197,0,0,160,1,0,0,0,0,0,0,84,144,0,0,103,197,0,0,160,1,0,0,0,0,0,0,84,144,0,0,157,197,0,0,160,1,0,0,0,0,0,0,84,144,0,0,
210,197,0,0,160,1,0,0,0,0,0,0,84,144,0,0,17,198,0,0,160,1,0,0,0,0,0,0,84,144,0,0,86,198,0,0,72,3,0,0,0,0,0,0,84,144,0,0,162,198,0,0,56,2,0,0,0,0,0,0,44,144,0,0,182,198,0,0,84,144,0,0,196,198,0,0,56,2,0,0,0,0,0,0,84,144,0,0,112,199,0,0,96,2,0,0,0,0,0,0,44,144,0,0,125,199,0,0,84,144,0,0,138,199,0,0,96,2,0,0,0,0,0,0,44,144,0,0,156,199,0,0,84,144,0,0,169,199,0,0,96,2,0,0,0,0,0,0,84,144,0,0,181,199,0,0,120,2,0,0,0,0,0,0,84,144,0,0,214,199,0,0,144,2,0,0,0,0,0,0,84,144,0,0,28,200,0,0,144,2,0,0,0,0,0,0,84,
144,0,0,248,199,0,0,176,2,0,0,0,0,0,0,84,144,0,0,62,200,0,0,160,2,0,0,0,0,0,0,84,144,0,0,99,200,0,0,160,2,0,0,0,0,0,0,84,144,0,0,182,221,0,0,160,3,0,0,0,0,0,0,84,144,0,0,245,221,0,0,160,3,0,0,0,0,0,0,84,144,0,0,13,222,0,0,152,3,0,0,0,0,0,0,84,144,0,0,38,222,0,0,152,3,0,0,0,0,0,0,44,144,0,0,62,222,0,0,84,144,0,0,87,222,0,0,104,2,0,0,0,0,0,0,44,144,0,0,110,222,0,0,84,144,0,0,135,222,0,0,72,3,0,0,0,0,0,0,84,144,0,0,161,222,0,0,56,3,0,0,0,0,0,0,44,144,0,0,187,222,0,0,84,144,0,0,205,222,0,0,112,3,0,0,
0,0,0,0,84,144,0,0,247,222,0,0,112,3,0,0,0,0,0,0,44,144,0,0,33,223,0,0,44,144,0,0,82,223,0,0,124,144,0,0,131,223,0,0,0,0,0,0,1,0,0,0,120,3,0,0,3,244,255,255,124,144,0,0,178,223,0,0,0,0,0,0,1,0,0,0,136,3,0,0,3,244,255,255,124,144,0,0,225,223,0,0,0,0,0,0,1,0,0,0,120,3,0,0,3,244,255,255,124,144,0,0,16,224,0,0,0,0,0,0,1,0,0,0,136,3,0,0,3,244,255,255,84,144,0,0,63,224,0,0,80,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,84,144,0,0,187,224,0,0,48,3,0,0,0,0,0,0,124,144,0,0,209,224,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,64,
10,0,0,2,0,0,0,124,144,0,0,227,224,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,72,10,0,0,2,0,0,0,124,144,0,0,5,225,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,72,10,0,0,2,0,0,0,124,144,0,0,40,225,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,72,10,0,0,2,0,0,0,84,144,0,0,75,225,0,0,144,4,0,0,0,0,0,0,84,144,0,0,109,225,0,0,144,4,0,0,0,0,0,0,124,144,0,0,144,225,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,72,10,0,0,2,0,0,0,84,144,0,0,178,225,0,0,32,4,0,0,0,0,0,0,84,144,0,0,200,225,0,0,32,4,0,0,0,0,0,0,84,144,0,0,220,225,0,0,32,4,
0,0,0,0,0,0,124,144,0,0,240,225,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,64,10,0,0,2,0,0,0,84,144,0,0,2,226,0,0,32,4,0,0,0,0,0,0,84,144,0,0,23,226,0,0,32,4,0,0,0,0,0,0,124,144,0,0,44,226,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,80,10,0,0,0,0,0,0,124,144,0,0,112,226,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,104,10,0,0,0,0,0,0,124,144,0,0,180,226,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,128,10,0,0,0,0,0,0,124,144,0,0,248,226,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,152,10,0,0,0,0,0,0,124,144,0,0,60,227,0,0,0,0,0,0,3,0,
0,0,32,4,0,0,2,0,0,0,176,10,0,0,2,0,0,0,184,10,0,0,0,8,0,0,124,144,0,0,129,227,0,0,0,0,0,0,3,0,0,0,32,4,0,0,2,0,0,0,176,10,0,0,2,0,0,0,192,10,0,0,0,8,0,0,124,144,0,0,198,227,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,200,10,0,0,0,8,0,0,124,144,0,0,11,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,200,10,0,0,0,8,0,0,124,144,0,0,80,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,208,10,0,0,2,0,0,0,124,144,0,0,108,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,208,10,0,0,2,0,0,0,124,144,0,0,136,228,0,0,0,0,0,0,2,0,0,0,32,4,
0,0,2,0,0,0,208,10,0,0,2,0,0,0,124,144,0,0,164,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,208,10,0,0,2,0,0,0,124,144,0,0,192,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,216,10,0,0,0,0,0,0,124,144,0,0,6,229,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,224,10,0,0,0,0,0,0,124,144,0,0,76,229,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,232,10,0,0,0,0,0,0,124,144,0,0,146,229,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,240,10,0,0,0,0,0,0,124,144,0,0,216,229,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,248,10,0,0,2,0,0,0,124,144,0,0,237,229,
0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,248,10,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,144,0,0,73,233,0,0,44,144,0,0,50,233,0,0,124,144,0,0,28,233,0,0,0,0,0,0,1,0,0,0,8,11,0,0,0,0,0,0,124,144,0,0,237,232,0,0,0,0,0,0,1,0,0,
0,8,11,0,0,0,0,0,0,124,144,0,0,215,232,0,0,0,0,0,0,1,0,0,0,0,11,0,0,0,0,0,0,124,144,0,0,168,232,0,0,0,0,0,0,1,0,0,0,0,11,0,0,0,0,0,0,44,144,0,0,149,232,0,0,44,144,0,0,115,232,0,0,44,144,0,0,81,232,0,0,44,144,0,0,60,232,0,0,44,144,0,0,39,232,0,0,44,144,0,0,14,232,0,0,44,144,0,0,245,231,0,0,44,144,0,0,220,231,0,0,44,144,0,0,195,231,0,0,44,144,0,0,171,231,0,0,44,144,0,0,190,232,0,0,44,144,0,0,3,233],"i8",4,Oa.GLOBAL_BASE);B([156,143,0,0,0,0,0,0,8,2,0,0,1,0,0,0,2,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,
248,1,0,0,3,0,0,0,4,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,232,1,0,0,5,0,0,0,6,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,216,1,0,0,7,0,0,0,8,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,200,1,0,0,9,0,0,0,10,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,0,0,0,0,184,1,0,0,11,0,0,0,12,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,0,0,0,0,168,1,0,0,13,0,0,0,14,0,0,0,7,0,0,0,7,0,0,0,7,0,0,0,0,0,0,0,144,1,0,0,15,0,0,0,16,0,0,0,8,0,0,0,8,0,0,0,8,0,0,0,0,0,0,0,128,1,0,0,17,0,0,0,18,0,0,0,9,0,0,0,1,0,0,0,9,0,0,0,0,0,0,0,112,1,0,0,19,0,0,0,20,0,0,0,
10,0,0,0,2,0,0,0,10,0,0,0,0,0,0,0,96,1,0,0,21,0,0,0,22,0,0,0,11,0,0,0,3,0,0,0,11,0,0,0,0,0,0,0,80,1,0,0,23,0,0,0,24,0,0,0,12,0,0,0,4,0,0,0,12,0,0,0,0,0,0,0,64,1,0,0,25,0,0,0,26,0,0,0,13,0,0,0,5,0,0,0,13,0,0,0,0,0,0,0,240,0,0,0,27,0,0,0,28,0,0,0,14,0,0,0,6,0,0,0,14,0,0,0,0,0,0,0,224,0,0,0,29,0,0,0,30,0,0,0,15,0,0,0,7,0,0,0,15,0,0,0,0,0,0,0,16,0,0,0,31,0,0,0,32,0,0,0,16,0,0,0,8,0,0,0,16,0,0,0,0,0,0,0,200,0,0,0,33,0,0,0,34,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,184,0,0,0,33,0,0,0,35,0,0,0,3,0,0,0,4,0,0,0,56,
0,0,0,0,0,0,0,216,3,0,0,36,0,0,0,37,0,0,0,200,255,255,255,200,255,255,255,216,3,0,0,38,0,0,0,39,0,0,0,56,0,0,0,0,0,0,0,104,0,0,0,40,0,0,0,41,0,0,0,200,255,255,255,200,255,255,255,104,0,0,0,42,0,0,0,43,0,0,0,0,0,0,0,88,0,0,0,44,0,0,0,45,0,0,0,17,0,0,0,1,0,0,0,1,0,0,0,5,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,17,0,0,0,3,0,0,0,18,0,0,0,104,141,0,0,64,141,0,0,84,141,0,0,124,141,0,0,0,0,0,0,32,0,0,0,46,0,0,0,47,0,0,0,6,0,0,0,7,0,0,0,0,0,0,0,56,0,0,0,48,0,0,0,49,0,0,0,8,0,0,0,9,0,0,0,0,0,0,0,72,0,
0,0,50,0,0,0,51,0,0,0,10,0,0,0,11,0,0,0,0,0,0,0,120,0,0,0,52,0,0,0,53,0,0,0,12,0,0,0,13,0,0,0,0,0,0,0,136,0,0,0,54,0,0,0,55,0,0,0,14,0,0,0,15,0,0,0,0,0,0,0,152,0,0,0,56,0,0,0,57,0,0,0,16,0,0,0,17,0,0,0,0,0,0,0,168,0,0,0,58,0,0,0,59,0,0,0,18,0,0,0,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,5,0,0,0,5,0,0,0,6,0,0,0,6,0,0,0,7,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,13,0,0,0,14,
0,0,0,15,0,0,0,0,0,0,0,216,0,0,0,60,0,0,0,61,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,62,0,0,0,63,0,0,0,20,0,0,0,21,0,0,0,0,0,0,0,16,1,0,0,64,0,0,0,65,0,0,0,22,0,0,0,23,0,0,0,0,0,0,0,32,1,0,0,66,0,0,0,67,0,0,0,24,0,0,0,25,0,0,0,0,0,0,0,48,1,0,0,68,0,0,0,69,0,0,0,26,0,0,0,27,0,0,0,0,0,0,0,160,1,0,0,70,0,0,0,71,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,24,2,0,0,72,0,0,0,73,0,0,0,5,0,0,0,1,0,0,0,4,0,0,0,5,0,0,0,2,0,0,0,0,0,0,0,40,2,0,0,74,0,0,0,75,0,0,0,18,0,0,0,0,0,0,0,64,2,0,0,76,0,0,0,77,0,0,0,19,
0,0,0,2,0,0,0,0,0,0,0,80,2,0,0,78,0,0,0,79,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,104,2,0,0,80,0,0,0,81,0,0,0,7,0,0,0,0,0,0,0,128,2,0,0,82,0,0,0,83,0,0,0,8,0,0,0,0,0,0,0,160,2,0,0,84,0,0,0,85,0,0,0,86,0,0,0,87,0,0,0,6,0,0,0,2,0,0,0,9,0,0,0,28,0,0,0,0,0,0,0,208,2,0,0,84,0,0,0,88,0,0,0,86,0,0,0,87,0,0,0,6,0,0,0,3,0,0,0,10,0,0,0,29,0,0,0,0,0,0,0,224,2,0,0,84,0,0,0,89,0,0,0,86,0,0,0,87,0,0,0,6,0,0,0,4,0,0,0,11,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,1,203,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,192,3,0,0,192,4,0,0,192,5,0,0,192,6,0,0,192,7,0,0,192,8,0,0,192,9,0,0,192,10,0,0,192,11,0,0,192,12,0,0,192,13,0,0,192,14,0,0,192,15,0,0,192,16,0,0,192,17,0,0,192,18,0,0,192,19,0,0,192,20,0,0,192,21,0,0,192,22,0,0,192,23,0,0,192,24,0,0,192,25,0,0,192,26,0,0,192,27,0,0,192,28,0,0,192,29,0,0,192,30,0,0,192,31,0,0,192,0,0,0,179,1,0,0,195,2,0,0,195,3,0,0,195,4,0,0,195,5,0,0,195,6,0,0,195,7,0,0,195,8,0,0,195,9,0,0,195,10,0,0,195,11,0,0,195,12,0,0,195,13,0,0,211,14,0,0,
195,15,0,0,195,0,0,12,187,1,0,12,195,2,0,12,195,3,0,12,195,4,0,12,211,88,146,0,0,200,146,0,0,56,147,0,0,56,147,0,0,120,187,0,0,168,155,0,0,168,149,0,0,0,0,0,0,10,0,0,0,100,0,0,0,232,3,0,0,16,39,0,0,160,134,1,0,64,66,15,0,128,150,152,0,0,225,245,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,
0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,9,0,0,0,159,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,9,0,0,0,151,215,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,9,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,9,0,0,0,143,211,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,15,0,0,0,16,0,0,0,17,0,0,0,18,0,0,0,19,0,0,0,20,0,0,0,21,0,0,0,22,0,0,0,23,0,0,0,24,0,0,0,25,0,0,0,26,0,0,0,27,0,0,0,28,0,0,0,29,0,0,0,30,0,0,0,31,0,
0,0,32,0,0,0,33,0,0,0,34,0,0,0,35,0,0,0,36,0,0,0,37,0,0,0,38,0,0,0,39,0,0,0,40,0,0,0,41,0,0,0,42,0,0,0,43,0,0,0,44,0,0,0,45,0,0,0,46,0,0,0,47,0,0,0,48,0,0,0,49,0,0,0,50,0,0,0,51,0,0,0,52,0,0,0,53,0,0,0,54,0,0,0,55,0,0,0,56,0,0,0,57,0,0,0,58,0,0,0,59,0,0,0,60,0,0,0,61,0,0,0,62,0,0,0,63,0,0,0,64,0,0,0,65,0,0,0,66,0,0,0,67,0,0,0,68,0,0,0,69,0,0,0,70,0,0,0,71,0,0,0,72,0,0,0,73,0,0,0,74,0,0,0,75,0,0,0,76,0,0,0,77,0,0,0,78,0,0,0,79,0,0,0,80,0,0,0,81,0,0,0,82,0,0,0,83,0,0,0,84,0,0,0,85,0,0,0,86,0,0,0,87,
0,0,0,88,0,0,0,89,0,0,0,90,0,0,0,91,0,0,0,92,0,0,0,93,0,0,0,94,0,0,0,95,0,0,0,96,0,0,0,65,0,0,0,66,0,0,0,67,0,0,0,68,0,0,0,69,0,0,0,70,0,0,0,71,0,0,0,72,0,0,0,73,0,0,0,74,0,0,0,75,0,0,0,76,0,0,0,77,0,0,0,78,0,0,0,79,0,0,0,80,0,0,0,81,0,0,0,82,0,0,0,83,0,0,0,84,0,0,0,85,0,0,0,86,0,0,0,87,0,0,0,88,0,0,0,89,0,0,0,90,0,0,0,123,0,0,0,124,0,0,0,125,0,0,0,126,0,0,0,127],"i8",4,Oa.GLOBAL_BASE+35640);B([1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,13,0,
0,0,14,0,0,0,15,0,0,0,16,0,0,0,17,0,0,0,18,0,0,0,19,0,0,0,20,0,0,0,21,0,0,0,22,0,0,0,23,0,0,0,24,0,0,0,25,0,0,0,26,0,0,0,27,0,0,0,28,0,0,0,29,0,0,0,30,0,0,0,31,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,35,0,0,0,36,0,0,0,37,0,0,0,38,0,0,0,39,0,0,0,40,0,0,0,41,0,0,0,42,0,0,0,43,0,0,0,44,0,0,0,45,0,0,0,46,0,0,0,47,0,0,0,48,0,0,0,49,0,0,0,50,0,0,0,51,0,0,0,52,0,0,0,53,0,0,0,54,0,0,0,55,0,0,0,56,0,0,0,57,0,0,0,58,0,0,0,59,0,0,0,60,0,0,0,61,0,0,0,62,0,0,0,63,0,0,0,64,0,0,0,97,0,0,0,98,0,0,0,99,0,0,0,100,0,0,0,101,
0,0,0,102,0,0,0,103,0,0,0,104,0,0,0,105,0,0,0,106,0,0,0,107,0,0,0,108,0,0,0,109,0,0,0,110,0,0,0,111,0,0,0,112,0,0,0,113,0,0,0,114,0,0,0,115,0,0,0,116,0,0,0,117,0,0,0,118,0,0,0,119,0,0,0,120,0,0,0,121,0,0,0,122,0,0,0,91,0,0,0,92,0,0,0,93,0,0,0,94,0,0,0,95,0,0,0,96,0,0,0,97,0,0,0,98,0,0,0,99,0,0,0,100,0,0,0,101,0,0,0,102,0,0,0,103,0,0,0,104,0,0,0,105,0,0,0,106,0,0,0,107,0,0,0,108,0,0,0,109,0,0,0,110,0,0,0,111,0,0,0,112,0,0,0,113,0,0,0,114,0,0,0,115,0,0,0,116,0,0,0,117,0,0,0,118,0,0,0,119,0,0,0,120,
0,0,0,121,0,0,0,122,0,0,0,123,0,0,0,124,0,0,0,125,0,0,0,126,0,0,0,127],"i8",4,Oa.GLOBAL_BASE+39844);B([240,2,0,0,90,0,0,0,91,0,0,0,20,0,0,0,12,0,0,0,5,0,0,0,31,0,0,0,10,0,0,0,11,0,0,0,13,0,0,0,12,0,0,0,13,0,0,0,19,0,0,0,14,0,0,0,20,0,0,0,0,0,0,0,0,3,0,0,90,0,0,0,92,0,0,0,21,0,0,0,12,0,0,0,5,0,0,0,31,0,0,0,14,0,0,0,11,0,0,0,13,0,0,0,15,0,0,0,16,0,0,0,21,0,0,0,15,0,0,0,22,0,0,0,0,0,0,0,16,3,0,0,93,0,0,0,94,0,0,0,22,0,0,0,1,0,0,0,6,0,0,0,32,0,0,0,17,0,0,0,2,0,0,0,2,0,0,0,18,0,0,0,4,0,0,0,23,0,0,0,16,
0,0,0,24,0,0,0,0,0,0,0,32,3,0,0,93,0,0,0,95,0,0,0,23,0,0,0,1,0,0,0,6,0,0,0,32,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,19,0,0,0,20,0,0,0,25,0,0,0,3,0,0,0,26,0,0,0,0,0,0,0,56,3,0,0,96,0,0,0,97,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,152,3,0,0,93,0,0,0,98,0,0,0,17,0,0,0,1,0,0,0,6,0,0,0,32,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,18,0,0,0,4,0,0,0,23,0,0,0,3,0,0,0,26,0,0,0,0,0,0,0,160,3,0,0,
90,0,0,0,99,0,0,0,24,0,0,0,12,0,0,0,5,0,0,0,31,0,0,0,14,0,0,0,11,0,0,0,13,0,0,0,12,0,0,0,13,0,0,0,19,0,0,0,15,0,0,0,22,0,0,0,8,0,0,0,0,0,0,0,168,3,0,0,100,0,0,0,101,0,0,0,248,255,255,255,248,255,255,255,168,3,0,0,102,0,0,0,103,0,0,0,8,0,0,0,0,0,0,0,192,3,0,0,104,0,0,0,105,0,0,0,248,255,255,255,248,255,255,255,192,3,0,0,106,0,0,0,107,0,0,0,4,0,0,0,0,0,0,0,216,3,0,0,36,0,0,0,37,0,0,0,252,255,255,255,252,255,255,255,216,3,0,0,38,0,0,0,39,0,0,0,4,0,0,0,0,0,0,0,240,3,0,0,108,0,0,0,109,0,0,0,252,255,255,
255,252,255,255,255,240,3,0,0,110,0,0,0,111,0,0,0,0,0,0,0,96,3,0,0,112,0,0,0,113,0,0,0,7,0,0,0,0,0,0,0,112,3,0,0,114,0,0,0,115,0,0,0,0,0,0,0,8,4,0,0,72,0,0,0,116,0,0,0,21,0,0,0,1,0,0,0,4,0,0,0,5,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,117,0,0,0,118,0,0,0,119,0,0,0,1,0,0,0,33,0,0,0,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,5,0,0,120,0,0,0,121,0,0,0,119,0,0,0,2,0,0,0,34,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,5,0,0,122,0,0,0,123,0,0,0,119,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,
0,0,9,0,0,0,10,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,5,0,0,124,0,0,0,125,0,0,0,119,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,15,0,0,0,16,0,0,0,17,0,0,0,18,0,0,0,19,0,0,0,20,0,0,0,21,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,5,0,0,126,0,0,0,127,0,0,0,119,0,0,0,3,0,0,0,4,0,0,0,23,0,0,0,5,0,0,0,24,0,0,0,1,0,0,0,2,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,5,0,0,128,0,0,0,129,0,0,0,119,0,0,0,7,0,0,0,8,0,0,0,25,0,0,0,9,0,0,0,26,0,0,0,3,0,0,0,4,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,5,0,0,130,0,0,0,131,
0,0,0,119,0,0,0,22,0,0,0,27,0,0,0,28,0,0,0,29,0,0,0,30,0,0,0,31,0,0,0,1,0,0,0,248,255,255,255,224,5,0,0,23,0,0,0,24,0,0,0,25,0,0,0,26,0,0,0,27,0,0,0,28,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,6,0,0,132,0,0,0,133,0,0,0,119,0,0,0,30,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,35,0,0,0,36,0,0,0,2,0,0,0,248,255,255,255,8,6,0,0,31,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,35,0,0,0,36,0,0,0,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,6,0,0,134,0,0,0,135,0,0,0,119,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,6,0,0,136,0,0,0,137,0,0,0,
119,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,6,0,0,138,0,0,0,139,0,0,0,119,0,0,0,38,0,0,0,39,0,0,0,25,0,0,0,26,0,0,0,27,0,0,0,28,0,0,0,40,0,0,0,29,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,144,6,0,0,140,0,0,0,141,0,0,0,119,0,0,0,41,0,0,0,42,0,0,0,31,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,43,0,0,0,35,0,0,0,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,176,6,0,0,142,0,0,0,143,0,0,0,119,0,0,0,44,0,0,0,45,0,0,0,37,0,0,0,38,0,0,0,39,0,0,0,40,0,0,0,46,0,0,0,41,0,0,0,42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,208,6,0,0,144,0,0,0,145,
0,0,0,119,0,0,0,47,0,0,0,48,0,0,0,43,0,0,0,44,0,0,0,45,0,0,0,46,0,0,0,49,0,0,0,47,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,6,0,0,146,0,0,0,147,0,0,0,119,0,0,0,3,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,7,0,0,148,0,0,0,149,0,0,0,119,0,0,0,5,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,7,0,0,150,0,0,0,151,0,0,0,119,0,0,0,1,0,0,0,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,7,0,0,152,0,0,0,153,0,0,0,119,0,0,0,2,0,0,0,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,7,0,0,154,0,0,0,155,0,0,0,119,0,0,0,19,0,0,0,7,0,0,0,49,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,144,7,0,0,156,0,0,0,157,0,0,0,119,0,0,0,20,0,0,0,8,0,0,0,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,4,0,0,158,0,0,0,159,0,0,0,119,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,5,0,0,160,0,0,0,161,0,0,0,119,0,0,0,27,0,0,0,21,0,0,0,28,0,0,0,22,0,0,0,29,0,0,0,9,0,0,0,23,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,208,4,0,0,162,0,0,0,163,0,0,0,119,0,0,0,3,0,0,0,4,0,0,0,12,0,0,0,50,0,0,0,51,0,0,0,13,0,0,0,52,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,5,0,0,164,0,0,0,165,0,0,0,119,0,0,0,53,0,0,0,54,0,0,0,51,0,0,0,52,0,0,0,53,0,0,0,0,0,0,0,80,5,0,0,166,0,0,0,167,0,0,0,119,0,0,0,55,0,0,0,56,0,0,0,54,0,0,0,55,0,0,0,56,0,0,0,0,0,0,0,32,4,0,0,168,0,0,0,169,0,0,0,119,0,0,0,0,0,0,0,48,4,0,0,168,0,0,0,170,0,0,0,119,0,0,0,24,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,30,0,0,0,25,0,0,0,31,0,0,0,26,0,0,0,32,0,0,0,13,0,0,0,27,0,0,0,14,0,0,0,0,0,0,0,80,4,0,0,168,0,0,0,171,0,0,0,119,0,0,0,5,0,0,0,6,0,0,0,15,0,0,0,57,0,0,0,58,0,0,0,16,0,
0,0,59,0,0,0,0,0,0,0,112,4,0,0,168,0,0,0,172,0,0,0,119,0,0,0,7,0,0,0,8,0,0,0,17,0,0,0,60,0,0,0,61,0,0,0,18,0,0,0,62,0,0,0,0,0,0,0,144,4,0,0,168,0,0,0,173,0,0,0,119,0,0,0,9,0,0,0,10,0,0,0,19,0,0,0,63,0,0,0,64,0,0,0,20,0,0,0,65,0,0,0,0,0,0,0,176,4,0,0,168,0,0,0,174,0,0,0,119,0,0,0,9,0,0,0,10,0,0,0,19,0,0,0,63,0,0,0,64,0,0,0,20,0,0,0,65,0,0,0,0,0,0,0,192,4,0,0,168,0,0,0,175,0,0,0,119,0,0,0,9,0,0,0,10,0,0,0,19,0,0,0,63,0,0,0,64,0,0,0,20,0,0,0,65,0,0,0,0,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,0,77,0,
0,0,58,0,0,0,37,0,0,0,83,0,0,0,37,0,0,0,109,0,0,0,47,0,0,0,37,0,0,0,100,0,0,0,47,0,0,0,37,0,0,0,121,0,0,0,37,0,0,0,89,0,0,0,45,0,0,0,37,0,0,0,109,0,0,0,45,0,0,0,37,0,0,0,100,0,0,0,37,0,0,0,73,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,32,0,0,0,37,0,0,0,112,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,116,0,0,0,114,0,0,0,117,0,0,0,101,0,0,0,0,0,0,0,102,0,0,0,97,0,0,0,108,0,
0,0,115,0,0,0,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,83,0,0,0,117,0,0,0,110,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,77,0,0,0,111,0,0,0,110,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,84,0,0,0,117,0,0,0,101,0,0,0,115,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,87,0,0,0,101,0,0,0,100,0,0,0,110,0,0,0,101,0,0,0,115,0,0,0,100,0,0,0,97,0,0,0,121,0,
0,0,0,0,0,0,84,0,0,0,104,0,0,0,117,0,0,0,114,0,0,0,115,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,70,0,0,0,114,0,0,0,105,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,83,0,0,0,97,0,0,0,116,0,0,0,117,0,0,0,114,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,83,0,0,0,117,0,0,0,110,0,0,0,0,0,0,0,77,0,0,0,111,0,0,0,110,0,0,0,0,0,0,0,84,0,0,0,117,0,0,0,101,0,0,0,0,0,0,0,87,0,0,0,101,0,0,0,100,0,0,0,0,0,0,0,84,0,0,0,104,0,0,0,117,0,0,0,0,0,0,0,70,0,0,0,114,0,0,0,105,0,0,0,0,0,0,0,83,0,0,0,97,0,0,0,116,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74,0,0,0,97,0,0,0,110,0,0,0,117,0,0,0,97,0,0,0,114,0,0,0,121,0,0,0,0,0,0,0,70,0,0,0,101,0,0,0,98,0,0,0,114,0,0,0,117,0,0,0,97,0,0,0,114,0,0,0,121,0,0,0,0,0,0,0,77,0,0,0,97,0,0,0,114,0,0,0,99,0,0,0,104,0,0,0,0,0,0,0,65,0,0,0,112,0,0,0,114,0,0,0,105,0,0,0,108,0,0,0,0,0,0,0,77,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,74,0,0,0,117,0,0,0,110,
0,0,0,101,0,0,0,0,0,0,0,74,0,0,0,117,0,0,0,108,0,0,0,121,0,0,0,0,0,0,0,65,0,0,0,117,0,0,0,103,0,0,0,117,0,0,0,115,0,0,0,116,0,0,0,0,0,0,0,83,0,0,0,101,0,0,0,112,0,0,0,116,0,0,0,101,0,0,0,109,0,0,0,98,0,0,0,101,0,0,0,114,0,0,0,0,0,0,0,79,0,0,0,99,0,0,0,116,0,0,0,111,0,0,0,98,0,0,0,101,0,0,0,114,0,0,0,0,0,0,0,78,0,0,0,111,0,0,0,118,0,0,0,101,0,0,0,109,0,0,0,98,0,0,0,101,0,0,0,114,0,0,0,0,0,0,0,68,0,0,0,101,0,0,0,99,0,0,0,101,0,0,0,109,0,0,0,98,0,0,0,101,0,0,0,114,0,0,0,0,0,0,0,74,0,0,0,97,0,0,0,110,
0,0,0,0,0,0,0,70,0,0,0,101,0,0,0,98,0,0,0,0,0,0,0,77,0,0,0,97,0,0,0,114,0,0,0,0,0,0,0,65,0,0,0,112,0,0,0,114,0,0,0,0,0,0,0,74,0,0,0,117,0,0,0,110,0,0,0,0,0,0,0,74,0,0,0,117,0,0,0,108,0,0,0,0,0,0,0,65,0,0,0,117,0,0,0,103,0,0,0,0,0,0,0,83,0,0,0,101,0,0,0,112,0,0,0,0,0,0,0,79,0,0,0,99,0,0,0,116,0,0,0,0,0,0,0,78,0,0,0,111,0,0,0,118,0,0,0,0,0,0,0,68,0,0,0,101,0,0,0,99,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,0,0,0,77,0,0,0,0,0,0,0,80,0,0,0,77,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,0,0,0,109,0,0,0,47,0,0,0,37,0,0,0,100,0,0,0,47,0,0,0,37,0,0,0,121,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,0,0,0,97,0,0,0,32,0,0,0,37,0,0,0,98,0,0,0,32,0,0,0,37,0,0,0,100,0,0,0,32,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,
0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,32,0,0,0,37,0,0,0,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,0,0,0,73,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,32,0,0,0,37,0,0,0,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,3,32,2,32,2,32,2,32,2,32,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,96,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,8,216,8,216,
8,216,8,216,8,216,8,216,8,216,8,216,8,216,8,216,4,192,4,192,4,192,4,192,4,192,4,192,4,192,8,213,8,213,8,213,8,213,8,213,8,213,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,4,192,4,192,4,192,4,192,4,192,4,192,8,214,8,214,8,214,8,214,8,214,8,214,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,4,192,4,192,4,192,4,192,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,114,97,119,83,116,114,101,
97,109,32,111,114,32,114,97,119,68,97,116,97,32,110,101,101,100,115,32,116,111,32,114,101,102,101,114,101,110,99,101,32,116,111,32,115,111,109,101,116,104,105,110,103,0,119,105,100,116,104,32,110,101,101,100,115,32,116,111,32,98,101,32,105,110,32,116,104,101,32,114,97,110,103,101,32,91,49,44,32,54,53,53,51,53,93,0,104,101,105,103,104,116,32,110,101,101,100,115,32,116,111,32,98,101,32,105,110,32,116,104,101,32,114,97,110,103,101,32,91,49,44,32,54,53,53,51,53,93,0,98,105,116,115,112,101,114,115,97,
109,112,108,101,32,110,101,101,100,115,32,116,111,32,98,101,32,105,110,32,116,104,101,32,114,97,110,103,101,32,91,50,44,32,49,54,93,0,105,110,116,101,114,108,101,97,118,101,77,111,100,101,32,110,101,101,100,115,32,116,111,32,98,101,32,115,101,116,32,116,111,32,97,32,118,97,108,117,101,32,111,102,32,123,78,111,110,101,44,32,83,97,109,112,108,101,44,32,76,105,110,101,125,0,99,111,109,112,111,110,101,110,116,115,32,110,101,101,100,115,32,116,111,32,98,101,32,105,110,32,116,104,101,32,114,97,110,103,
101,32,91,49,44,32,50,53,53,93,0,117,110,99,111,109,112,114,101,115,115,101,100,32,115,105,122,101,32,100,111,101,115,32,110,111,116,32,109,97,116,99,104,32,119,105,116,104,32,116,104,101,32,111,116,104,101,114,32,112,97,114,97,109,101,116,101,114,115,0,105,110,116,101,114,108,101,97,118,101,77,111,100,101,32,99,97,110,110,111,116,32,98,101,32,115,101,116,32,116,111,32,83,97,109,112,108,101,32,105,110,32,99,111,109,98,105,110,97,116,105,111,110,32,119,105,116,104,32,99,111,109,112,111,110,101,110,
116,115,32,61,32,52,0,105,110,116,101,114,108,101,97,118,101,77,111,100,101,32,99,97,110,32,111,110,108,121,32,98,101,32,115,101,116,32,116,111,32,78,111,110,101,32,105,110,32,99,111,109,98,105,110,97,116,105,111,110,32,119,105,116,104,32,99,111,109,112,111,110,101,110,116,115,32,61,32,49,0,67,111,108,111,114,32,116,114,97,110,115,102,111,114,109,97,116,105,111,110,32,0,78,111,32,109,111,114,101,32,98,121,116,101,115,32,97,118,97,105,108,97,98,108,101,32,105,110,32,105,110,112,117,116,32,98,117,102,
102,101,114,44,32,115,116,105,108,108,32,110,101,101,100,101,100,105,110,103,32,0,65,110,32,111,100,100,32,110,117,109,98,101,114,32,111,102,32,98,121,116,101,115,32,40,0,41,32,99,97,110,110,111,116,32,98,101,32,115,119,97,112,112,101,100,46,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,54,84,114,97,110,115,102,111,114,109,83,104,105,102,116,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,51,73,116,69,69,69,0,49,49,80,114,111,99,101,115,115,76,105,110,
101,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,54,84,114,97,110,115,102,111,114,109,83,104,105,102,116,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,50,73,116,69,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,54,84,114,97,110,115,102,111,114,109,83,104,105,102,116,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,49,73,116,69,69,69,0,78,83,116,51,95,95,49,49,53,98,97,115,105,99,95,115,116,114,105,110,
103,98,117,102,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,78,83,95,57,97,108,108,111,99,97,116,111,114,73,99,69,69,69,69,0,78,83,116,51,95,95,49,49,57,98,97,115,105,99,95,111,115,116,114,105,110,103,115,116,114,101,97,109,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,78,83,95,57,97,108,108,111,99,97,116,111,114,73,99,69,69,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,
109,72,112,51,73,116,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,50,73,116,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,49,73,116,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,51,84,114,97,110,115,102,111,114,109,78,111,110,101,73,116,69,69,0,50,50,80,111,115,116,80,114,111,99,101,115,
83,105,110,103,108,101,83,116,114,101,97,109,0,50,53,80,111,115,116,80,114,111,99,101,115,83,105,110,103,108,101,67,111,109,112,111,110,101,110,116,0,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,116,116,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,116,55,84,114,105,112,
108,101,116,73,116,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,51,73,104,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,50,73,104,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,49,
73,104,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,51,84,114,97,110,115,102,111,114,109,78,111,110,101,73,104,69,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,104,55,84,114,105,112,108,101,116,73,104,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,116,76,105,49,54,69,69,49,53,69,
110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,116,76,105,49,50,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,104,76,105,56,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,
115,84,114,97,105,116,115,84,73,55,84,114,105,112,108,101,116,73,104,69,76,105,56,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,104,104,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,116,116,69,49,
53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,116,55,84,114,105,112,108,101,116,73,116,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,104,55,84,114,105,112,108,101,116,73,104,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,
100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,116,76,105,49,54,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,116,76,105,49,50,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,104,76,105,56,69,69,49,53,68,101,99,111,100,
101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,55,84,114,105,112,108,101,116,73,104,69,76,105,56,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,104,104,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,67,104,97,114,76,83,32,101,114,114,111,114,0,99,104,97,114,108,
115,0,49,53,99,104,97,114,108,115,95,99,97,116,101,103,111,114,121,0,112,97,114,97,109,115,46,88,116,104,117,109,98,110,97,105,108,32,105,115,32,62,32,48,32,98,117,116,32,112,97,114,97,109,115,46,116,104,117,109,98,110,97,105,108,32,61,61,32,110,117,108,108,95,112,116,114,0,49,55,74,112,101,103,77,97,114,107,101,114,83,101,103,109,101,110,116,0,49,49,74,112,101,103,83,101,103,109,101,110,116,0,50,48,74,112,101,103,73,109,97,103,101,68,97,116,97,83,101,103,109,101,110,116,0,69,120,112,101,99,116,101,
100,32,74,80,69,71,32,77,97,114,107,101,114,32,115,116,97,114,116,32,98,121,116,101,32,48,120,70,70,32,98,117,116,32,116,104,101,32,98,121,116,101,32,118,97,108,117,101,32,119,97,115,32,48,120,0,74,80,69,71,32,101,110,99,111,100,105,110,103,32,119,105,116,104,32,109,97,114,107,101,114,32,0,32,105,115,32,110,111,116,32,115,117,112,112,111,114,116,101,100,46,0,85,110,107,110,111,119,110,32,74,80,69,71,32,109,97,114,107,101,114,32,0,32,101,110,99,111,117,110,116,101,114,101,100,46,0,109,114,102,120,
0,83,116,57,98,97,100,95,97,108,108,111,99,0,83,116,57,101,120,99,101,112,116,105,111,110,0,83,116,49,51,114,117,110,116,105,109,101,95,101,114,114,111,114,0,83,116,57,116,121,112,101,95,105,110,102,111,0,83,116,56,98,97,100,95,99,97,115,116,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,54,95,95,115,104,105,109,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,
98,105,118,49,49,57,95,95,112,111,105,110,116,101,114,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,112,98,97,115,101,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,50,48,95,95,115,105,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,50,49,95,95,118,109,105,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,33,34,98,97,115,105,99,95,115,
116,114,105,110,103,32,108,101,110,103,116,104,95,101,114,114,111,114,34,0,47,85,115,101,114,115,47,99,104,97,102,101,121,47,101,109,115,100,107,95,112,111,114,116,97,98,108,101,47,101,109,115,99,114,105,112,116,101,110,47,49,46,51,53,46,48,47,115,121,115,116,101,109,47,105,110,99,108,117,100,101,47,108,105,98,99,120,120,47,115,116,114,105,110,103,0,95,95,116,104,114,111,119,95,108,101,110,103,116,104,95,101,114,114,111,114,0,33,34,118,101,99,116,111,114,32,108,101,110,103,116,104,95,101,114,114,
111,114,34,0,47,85,115,101,114,115,47,99,104,97,102,101,121,47,101,109,115,100,107,95,112,111,114,116,97,98,108,101,47,101,109,115,99,114,105,112,116,101,110,47,49,46,51,53,46,48,47,115,121,115,116,101,109,47,105,110,99,108,117,100,101,47,108,105,98,99,120,120,47,118,101,99,116,111,114,0,112,116,104,114,101,97,100,95,111,110,99,101,32,102,97,105,108,117,114,101,32,105,110,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,95,102,97,115,116,40,41,0,115,116,100,58,58,98,97,100,95,97,108,
108,111,99,0,116,101,114,109,105,110,97,116,101,95,104,97,110,100,108,101,114,32,117,110,101,120,112,101,99,116,101,100,108,121,32,114,101,116,117,114,110,101,100,0,116,101,114,109,105,110,97,116,101,95,104,97,110,100,108,101,114,32,117,110,101,120,112,101,99,116,101,100,108,121,32,116,104,114,101,119,32,97,110,32,101,120,99,101,112,116,105,111,110,0,115,116,100,58,58,98,97,100,95,99,97,115,116,0,99,97,110,110,111,116,32,99,114,101,97,116,101,32,112,116,104,114,101,97,100,32,107,101,121,32,102,111,
114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,99,97,110,110,111,116,32,122,101,114,111,32,111,117,116,32,116,104,114,101,97,100,32,118,97,108,117,101,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,58,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,
32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,102,111,114,101,105,103,110,32,101,120,99,101,112,116,105,111,110,0,116,101,114,109,105,110,97,116,105,110,103,0,117,110,99,97,117,103,104,116,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,
95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,
99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,
116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,
116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,
100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116],"i8",4,Oa.GLOBAL_BASE+42396);B([32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,
110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,
99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,
101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,
118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,
111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,
114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,
117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,
102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,
100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0,105,110,102,105,110,105,116,121,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,255,255,255,255,255,255,255,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,
34,35,255,255,255,255,255,255,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,4,7,3,6,5,0,80,79,83,73,88],"i8",4,Oa.GLOBAL_BASE+52636);B([17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,46,0,0,78,83,116,51,95,95,49,49,49,95,95,115,116,100,111,117,116,98,117,102,73,119,69,69,0,117,
110,115,117,112,112,111,114,116,101,100,32,108,111,99,97,108,101,32,102,111,114,32,115,116,97,110,100,97,114,100,32,105,110,112,117,116,0,78,83,116,51,95,95,49,49,48,95,95,115,116,100,105,110,98,117,102,73,119,69,69,0,78,83,116,51,95,95,49,49,49,95,95,115,116,100,111,117,116,98,117,102,73,99,69,69,0,78,83,116,51,95,95,49,49,48,95,95,115,116,100,105,110,98,117,102,73,99,69,69,0,78,83,116,51,95,95,49,49,52,95,95,115,104,97,114,101,100,95,99,111,117,110,116,69,0,78,83,116,51,95,95,49,49,50,115,121,115,
116,101,109,95,101,114,114,111,114,69,0,78,83,116,51,95,95,49,49,52,101,114,114,111,114,95,99,97,116,101,103,111,114,121,69,0,78,83,116,51,95,95,49,49,50,95,95,100,111,95,109,101,115,115,97,103,101,69,0,58,32,0,78,83,116,51,95,95,49,56,105,111,115,95,98,97,115,101,55,102,97,105,108,117,114,101,69,0,78,83,116,51,95,95,49,56,105,111,115,95,98,97,115,101,69,0,78,83,116,51,95,95,49,57,98,97,115,105,99,95,105,111,115,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,0,78,83,
116,51,95,95,49,57,98,97,115,105,99,95,105,111,115,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,0,78,83,116,51,95,95,49,49,53,98,97,115,105,99,95,115,116,114,101,97,109,98,117,102,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,0,78,83,116,51,95,95,49,49,53,98,97,115,105,99,95,115,116,114,101,97,109,98,117,102,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,0,78,83,116,51,95,95,49,49,51,98,97,115,105,
99,95,105,115,116,114,101,97,109,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,0,78,83,116,51,95,95,49,49,51,98,97,115,105,99,95,105,115,116,114,101,97,109,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,0,78,83,116,51,95,95,49,49,51,98,97,115,105,99,95,111,115,116,114,101,97,109,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,0,78,83,116,51,95,95,49,49,51,98,97,115,105,99,95,111,115,116,114,101,97,109,
73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,0,78,83,116,51,95,95,49,49,57,95,95,105,111,115,116,114,101,97,109,95,99,97,116,101,103,111,114,121,69,0,105,111,115,95,98,97,115,101,58,58,99,108,101,97,114,0,105,111,115,116,114,101,97,109,0,117,110,115,112,101,99,105,102,105,101,100,32,105,111,115,116,114,101,97,109,95,99,97,116,101,103,111,114,121,32,101,114,114,111,114,0,48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102,65,66,67,68,69,70,120,88,43,45,112,80,105,
73,110,78,0,78,83,116,51,95,95,49,54,108,111,99,97,108,101,53,102,97,99,101,116,69,0,78,83,116,51,95,95,49,53,99,116,121,112,101,73,119,69,69,0,78,83,116,51,95,95,49,55,99,111,100,101,99,118,116,73,99,99,49,49,95,95,109,98,115,116,97,116,101,95,116,69,69,0,78,83,116,51,95,95,49,55,99,111,100,101,99,118,116,73,68,115,99,49,49,95,95,109,98,115,116,97,116,101,95,116,69,69,0,78,83,116,51,95,95,49,55,99,111,100,101,99,118,116,73,68,105,99,49,49,95,95,109,98,115,116,97,116,101,95,116,69,69,0,78,83,116,
51,95,95,49,49,54,95,95,110,97,114,114,111,119,95,116,111,95,117,116,102,56,73,76,106,51,50,69,69,69,0,78,83,116,51,95,95,49,49,55,95,95,119,105,100,101,110,95,102,114,111,109,95,117,116,102,56,73,76,106,51,50,69,69,69,0,78,83,116,51,95,95,49,55,99,111,100,101,99,118,116,73,119,99,49,49,95,95,109,98,115,116,97,116,101,95,116,69,69,0,78,83,116,51,95,95,49,54,108,111,99,97,108,101,53,95,95,105,109,112,69,0,78,83,116,51,95,95,49,55,99,111,108,108,97,116,101,73,99,69,69,0,78,83,116,51,95,95,49,55,99,
111,108,108,97,116,101,73,119,69,69,0,78,83,116,51,95,95,49,53,99,116,121,112,101,73,99,69,69,0,78,83,116,51,95,95,49,56,110,117,109,112,117,110,99,116,73,99,69,69,0,78,83,116,51,95,95,49,56,110,117,109,112,117,110,99,116,73,119,69,69,0,78,83,116,51,95,95,49,55,110,117,109,95,103,101,116,73,99,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,55,110,117,
109,95,103,101,116,73,119,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,55,110,117,109,95,112,117,116,73,99,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,55,110,117,109,95,112,117,116,73,119,78,83,95,
49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,116,105,109,101,95,103,101,116,73,99,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,116,105,109,101,95,103,101,116,73,119,78,83,95,49,57,105,115,116,114,101,
97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,116,105,109,101,95,112,117,116,73,99,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,116,105,109,101,95,112,117,116,73,119,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,
101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,112,117,110,99,116,73,99,76,98,48,69,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,112,117,110,99,116,73,99,76,98,49,69,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,112,117,110,99,116,73,119,76,98,48,69,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,112,117,110,99,116,73,119,76,98,49,69,69,69,0,78,83,116,51,95,
95,49,57,109,111,110,101,121,95,103,101,116,73,99,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,57,109,111,110,101,121,95,103,101,116,73,119,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,57,109,111,110,
101,121,95,112,117,116,73,99,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,57,109,111,110,101,121,95,112,117,116,73,119,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,109,101,115,115,97,103,101,115,
73,99,69,69,0,78,83,116,51,95,95,49,56,109,101,115,115,97,103,101,115,73,119,69,69,0,37,112,0,67,0,37,0,0,0,0,0,108,0,108,108,0,0,76,0,37,112,0,0,0,0,37,72,58,37,77,58,37,83,37,109,47,37,100,47,37,121,37,89,45,37,109,45,37,100,37,73,58,37,77,58,37,83,32,37,112,37,72,58,37,77,37,72,58,37,77,58,37,83,108,111,99,97,108,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,48,49,50,51,52,53,54,55,56,57,0,37,76,102,0,109,111,110,101,121,95,103,101,116,32,101,114,114,111,114,0,48,49,50,51,52,53,54,
55,56,57,0,37,46,48,76,102,0,116,114,117,101,0,102,97,108,115,101,0,83,117,110,100,97,121,0,77,111,110,100,97,121,0,84,117,101,115,100,97,121,0,87,101,100,110,101,115,100,97,121,0,84,104,117,114,115,100,97,121,0,70,114,105,100,97,121,0,83,97,116,117,114,100,97,121,0,83,117,110,0,77,111,110,0,84,117,101,0,87,101,100,0,84,104,117,0,70,114,105,0,83,97,116,0,74,97,110,117,97,114,121,0,70,101,98,114,117,97,114,121,0,77,97,114,99,104,0,65,112,114,105,108,0,77,97,121,0,74,117,110,101,0,74,117,108,121,0,
65,117,103,117,115,116,0,83,101,112,116,101,109,98,101,114,0,79,99,116,111,98,101,114,0,78,111,118,101,109,98,101,114,0,68,101,99,101,109,98,101,114,0,74,97,110,0,70,101,98,0,77,97,114,0,65,112,114,0,74,117,110,0,74,117,108,0,65,117,103,0,83,101,112,0,79,99,116,0,78,111,118,0,68,101,99,0,65,77,0,80,77,0,37,109,47,37,100,47,37,121,0,37,72,58,37,77,58,37,83,0,37,97,32,37,98,32,37,100,32,37,72,58,37,77,58,37,83,32,37,89,0,37,73,58,37,77,58,37,83,32,37,112,0,78,83,116,51,95,95,49,49,51,109,101,115,115,
97,103,101,115,95,98,97,115,101,69,0,78,83,116,51,95,95,49,49,49,95,95,109,111,110,101,121,95,112,117,116,73,119,69,69,0,78,83,116,51,95,95,49,49,49,95,95,109,111,110,101,121,95,112,117,116,73,99,69,69,0,78,83,116,51,95,95,49,49,49,95,95,109,111,110,101,121,95,103,101,116,73,119,69,69,0,78,83,116,51,95,95,49,49,49,95,95,109,111,110,101,121,95,103,101,116,73,99,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,95,98,97,115,101,69,0,78,83,116,51,95,95,49,49,48,95,95,116,105,109,101,95,112,117,
116,69,0,78,83,116,51,95,95,49,50,48,95,95,116,105,109,101,95,103,101,116,95,99,95,115,116,111,114,97,103,101,73,119,69,69,0,78,83,116,51,95,95,49,50,48,95,95,116,105,109,101,95,103,101,116,95,99,95,115,116,111,114,97,103,101,73,99,69,69,0,78,83,116,51,95,95,49,57,116,105,109,101,95,98,97,115,101,69,0,78,83,116,51,95,95,49,57,95,95,110,117,109,95,112,117,116,73,119,69,69,0,78,83,116,51,95,95,49,49,52,95,95,110,117,109,95,112,117,116,95,98,97,115,101,69,0,78,83,116,51,95,95,49,57,95,95,110,117,109,
95,112,117,116,73,99,69,69,0,78,83,116,51,95,95,49,57,95,95,110,117,109,95,103,101,116,73,119,69,69,0,78,83,116,51,95,95,49,49,52,95,95,110,117,109,95,103,101,116,95,98,97,115,101,69,0,78,83,116,51,95,95,49,57,95,95,110,117,109,95,103,101,116,73,99,69,69,0,78,83,116,51,95,95,49,49,50,99,111,100,101,99,118,116,95,98,97,115,101,69,0,78,83,116,51,95,95,49,49,48,99,116,121,112,101,95,98,97,115,101,69,0],"i8",4,Oa.GLOBAL_BASE+56215);var dd=Oa.alignMemory(B(12,"i8",2),8);k(0==dd%8);h._i64Subtract=Id;var Qa=
{last:0,caught:[],infos:{},deAdjust:function(a){if(!a||Qa.infos[a])return a;for(var b in Qa.infos)if(Qa.infos[b].adjusted===a)return b;return a},addRef:function(a){a&&Qa.infos[a].refcount++},decRef:function(a){if(a){var b=Qa.infos[a];k(0<b.refcount);b.refcount--;0===b.refcount&&(b.destructor&&Oa.dynCall("vi",b.destructor,[a]),delete Qa.infos[a],Ua(a))}},clearRef:function(a){a&&(Qa.infos[a].refcount=0)}};h._memset=Xd;var Pb=[31,29,31,30,31,30,31,31,30,31,30,31],cd=[31,28,31,30,31,30,31,31,30,31,30,
31];h._free=wa;var ld={},Wb=uc,Fc=1,ra={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){ra.mainLoop.scheduler=null;ra.mainLoop.currentlyRunningMainloop++},resume:function(){ra.mainLoop.currentlyRunningMainloop++;var a=ra.mainLoop.timingMode,b=ra.mainLoop.timingValue,d=ra.mainLoop.func;ra.mainLoop.func=null;nb(d,0,!1,ra.mainLoop.arg,!0);Ba(a,b);ra.mainLoop.scheduler()},updateStatus:function(){if(h.setStatus){var a=
h.statusMessage||"Please wait...",b=ra.mainLoop.remainingBlockers,d=ra.mainLoop.expectedBlockers;b?b<d?h.setStatus(a+" ("+(d-b)+"/"+d+")"):h.setStatus(a):h.setStatus("")}},runIter:function(a){if(!(Eb||h.preMainLoop&&!1===h.preMainLoop())){try{a()}catch(b){if(b instanceof zb)return;b&&"object"===typeof b&&b.stack&&h.printErr("exception thrown: "+[b,b.stack]);throw b;}h.postMainLoop&&h.postMainLoop()}}},isFullScreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init:function(){function a(){ra.pointerLock=
document.pointerLockElement===d||document.mozPointerLockElement===d||document.webkitPointerLockElement===d||document.msPointerLockElement===d}h.preloadPlugins||(h.preloadPlugins=[]);if(!ra.initted){ra.initted=!0;try{new Blob,ra.hasBlobConstructor=!0}catch(b){ra.hasBlobConstructor=!1,console.log("warning: no blob constructor, cannot create blobs with mimetypes")}ra.BlobBuilder="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:ra.hasBlobConstructor?
null:console.log("warning: no BlobBuilder");ra.URLObject="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:void 0;h.noImageDecoding||"undefined"!==typeof ra.URLObject||(console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),h.noImageDecoding=!0);h.preloadPlugins.push({canHandle:function(a){return!h.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(a)},handle:function(a,b,d,f){var e=null;if(ra.hasBlobConstructor)try{e=
new Blob([a],{type:ra.getMimetype(b)}),e.size!==a.length&&(e=new Blob([(new Uint8Array(a)).buffer],{type:ra.getMimetype(b)}))}catch(m){Oa.warnOnce("Blob constructor present but fails: "+m+"; falling back to blob builder")}e||(e=new ra.BlobBuilder,e.append((new Uint8Array(a)).buffer),e=e.getBlob());var n=ra.URLObject.createObjectURL(e),r=new Image;r.onload=function(){k(r.complete,"Image "+b+" could not be decoded");var f=document.createElement("canvas");f.width=r.width;f.height=r.height;f.getContext("2d").drawImage(r,
0,0);h.preloadedImages[b]=f;ra.URLObject.revokeObjectURL(n);d&&d(a)};r.onerror=function(a){console.log("Image "+n+" could not be decoded");f&&f()};r.src=n}});h.preloadPlugins.push({canHandle:function(a){return!h.noAudioDecoding&&a.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},handle:function(a,b,d,f){function e(f){m||(m=!0,h.preloadedAudios[b]=f,d&&d(a))}function k(){m||(m=!0,h.preloadedAudios[b]=new Audio,f&&f())}var m=!1;if(ra.hasBlobConstructor){try{var n=new Blob([a],{type:ra.getMimetype(b)})}catch(q){return k()}var n=
ra.URLObject.createObjectURL(n),r=new Audio;r.addEventListener("canplaythrough",function(){e(r)},!1);r.onerror=function(d){if(!m){console.log("warning: browser could not fully decode audio "+b+", trying slower base64 approach");d="data:audio/x-"+b.substr(-3)+";base64,";for(var f="",h=0,k=0,n=0;n<a.length;n++)for(h=h<<8|a[n],k+=8;6<=k;)var q=h>>k-6&63,k=k-6,f=f+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[q];2==k?(f+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(h&
3)<<4],f+="=="):4==k&&(f+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(h&15)<<2],f+="=");r.src=d+f;e(r)}};r.src=n;ra.safeSetTimeout(function(){e(r)},1E4)}else return k()}});var d=h.canvas;d&&(d.requestPointerLock=d.requestPointerLock||d.mozRequestPointerLock||d.webkitRequestPointerLock||d.msRequestPointerLock||function(){},d.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},d.exitPointerLock=
d.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",a,!1),document.addEventListener("mozpointerlockchange",a,!1),document.addEventListener("webkitpointerlockchange",a,!1),document.addEventListener("mspointerlockchange",a,!1),h.elementPointerLock&&d.addEventListener("click",function(a){!ra.pointerLock&&d.requestPointerLock&&(d.requestPointerLock(),a.preventDefault())},!1))}},createContext:function(a,b,d,f){if(b&&h.ctx&&a==h.canvas)return h.ctx;var e,m;if(b){m={antialias:!1,
alpha:!1};if(f)for(var n in f)m[n]=f[n];if(m=GL.createContext(a,m))e=GL.getContext(m).GLctx;a.style.backgroundColor="black"}else e=a.getContext("2d");if(!e)return null;d&&(b||k("undefined"===typeof GLctx,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),h.ctx=e,b&&GL.makeContextCurrent(m),h.useWebGL=b,ra.moduleContextCreatedCallbacks.forEach(function(a){a()}),ra.init());return e},destroyContext:function(a,b,d){},fullScreenHandlersInstalled:!1,lockPointer:void 0,
resizeCanvas:void 0,requestFullScreen:function(a,b,d){function f(){ra.isFullScreen=!1;var a=e.parentNode;(document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement||document.msFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement)===a?(e.cancelFullScreen=document.cancelFullScreen||document.mozCancelFullScreen||document.webkitCancelFullScreen||
document.msExitFullscreen||document.exitFullscreen||function(){},e.cancelFullScreen=e.cancelFullScreen.bind(document),ra.lockPointer&&e.requestPointerLock(),ra.isFullScreen=!0,ra.resizeCanvas&&ra.setFullScreenCanvasSize()):(a.parentNode.insertBefore(e,a),a.parentNode.removeChild(a),ra.resizeCanvas&&ra.setWindowedCanvasSize());if(h.onFullScreen)h.onFullScreen(ra.isFullScreen);ra.updateCanvasDimensions(e)}ra.lockPointer=a;ra.resizeCanvas=b;ra.vrDevice=d;"undefined"===typeof ra.lockPointer&&(ra.lockPointer=
!0);"undefined"===typeof ra.resizeCanvas&&(ra.resizeCanvas=!1);"undefined"===typeof ra.vrDevice&&(ra.vrDevice=null);var e=h.canvas;ra.fullScreenHandlersInstalled||(ra.fullScreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",f,!1),document.addEventListener("mozfullscreenchange",f,!1),document.addEventListener("webkitfullscreenchange",f,!1),document.addEventListener("MSFullscreenChange",f,!1));var k=document.createElement("div");e.parentNode.insertBefore(k,e);k.appendChild(e);k.requestFullScreen=
k.requestFullScreen||k.mozRequestFullScreen||k.msRequestFullscreen||(k.webkitRequestFullScreen?function(){k.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null);d?k.requestFullScreen({vrDisplay:d}):k.requestFullScreen()},nextRAF:0,fakeRequestAnimationFrame:function(a){var b=Date.now();if(0===ra.nextRAF)ra.nextRAF=b+1E3/60;else for(;b+2>=ra.nextRAF;)ra.nextRAF+=1E3/60;b=Math.max(ra.nextRAF-b,0);setTimeout(a,b)},requestAnimationFrame:function(a){"undefined"===typeof window?ra.fakeRequestAnimationFrame(a):
(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||ra.fakeRequestAnimationFrame),window.requestAnimationFrame(a))},safeCallback:function(a){return function(){if(!Eb)return a.apply(null,arguments)}},allowAsyncCallbacks:!0,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){ra.allowAsyncCallbacks=!1},resumeAsyncCallbacks:function(){ra.allowAsyncCallbacks=
!0;if(0<ra.queuedAsyncCallbacks.length){var a=ra.queuedAsyncCallbacks;ra.queuedAsyncCallbacks=[];a.forEach(function(a){a()})}},safeRequestAnimationFrame:function(a){return ra.requestAnimationFrame(function(){Eb||(ra.allowAsyncCallbacks?a():ra.queuedAsyncCallbacks.push(a))})},safeSetTimeout:function(a,b){h.noExitRuntime=!0;return setTimeout(function(){Eb||(ra.allowAsyncCallbacks?a():ra.queuedAsyncCallbacks.push(a))},b)},safeSetInterval:function(a,b){h.noExitRuntime=!0;return setInterval(function(){Eb||
ra.allowAsyncCallbacks&&a()},b)},getMimetype:function(a){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[a.substr(a.lastIndexOf(".")+1)]},getUserMedia:function(a){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia);window.getUserMedia(a)},getMovementX:function(a){return a.movementX||a.mozMovementX||a.webkitMovementX||0},getMovementY:function(a){return a.movementY||a.mozMovementY||a.webkitMovementY||
0},getMouseWheelDelta:function(a){var b=0;switch(a.type){case "DOMMouseScroll":b=a.detail;break;case "mousewheel":b=a.wheelDelta;break;case "wheel":b=a.deltaY;break;default:throw"unrecognized mouse wheel event: "+a.type;}return b},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(a){if(ra.pointerLock)"mousemove"!=a.type&&"mozMovementX"in a?ra.mouseMovementX=ra.mouseMovementY=0:(ra.mouseMovementX=ra.getMovementX(a),ra.mouseMovementY=ra.getMovementY(a)),
"undefined"!=typeof SDL?(ra.mouseX=SDL.mouseX+ra.mouseMovementX,ra.mouseY=SDL.mouseY+ra.mouseMovementY):(ra.mouseX+=ra.mouseMovementX,ra.mouseY+=ra.mouseMovementY);else{var b=h.canvas.getBoundingClientRect(),d=h.canvas.width,f=h.canvas.height,e="undefined"!==typeof window.scrollX?window.scrollX:window.pageXOffset,k="undefined"!==typeof window.scrollY?window.scrollY:window.pageYOffset;if("touchstart"===a.type||"touchend"===a.type||"touchmove"===a.type){var m=a.touch;if(void 0!==m)if(e=m.pageX-(e+b.left),
k=m.pageY-(k+b.top),e*=d/b.width,k*=f/b.height,b={x:e,y:k},"touchstart"===a.type)ra.lastTouches[m.identifier]=b,ra.touches[m.identifier]=b;else if("touchend"===a.type||"touchmove"===a.type)(a=ra.touches[m.identifier])||(a=b),ra.lastTouches[m.identifier]=a,ra.touches[m.identifier]=b}else m=a.pageX-(e+b.left),a=a.pageY-(k+b.top),m*=d/b.width,a*=f/b.height,ra.mouseMovementX=m-ra.mouseX,ra.mouseMovementY=a-ra.mouseY,ra.mouseX=m,ra.mouseY=a}},xhrLoad:function(a,b,d){var f=new XMLHttpRequest;f.open("GET",
a,!0);f.responseType="arraybuffer";f.onload=function(){200==f.status||0==f.status&&f.response?b(f.response):d()};f.onerror=d;f.send(null)},asyncLoad:function(a,b,d,f){ra.xhrLoad(a,function(d){k(d,'Loading data file "'+a+'" failed (no arrayBuffer).');b(new Uint8Array(d));f||D("al "+a)},function(b){if(d)d();else throw'Loading data file "'+a+'" failed.';});f||Y("al "+a)},resizeListeners:[],updateResizeListeners:function(){var a=h.canvas;ra.resizeListeners.forEach(function(b){b(a.width,a.height)})},setCanvasSize:function(a,
b,d){ra.updateCanvasDimensions(h.canvas,a,b);d||ra.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullScreenCanvasSize:function(){if("undefined"!=typeof SDL){var a=Kc[SDL.screen+0*Oa.QUANTUM_SIZE>>2];ib[SDL.screen+0*Oa.QUANTUM_SIZE>>2]=a|8388608}ra.updateResizeListeners()},setWindowedCanvasSize:function(){if("undefined"!=typeof SDL){var a=Kc[SDL.screen+0*Oa.QUANTUM_SIZE>>2];ib[SDL.screen+0*Oa.QUANTUM_SIZE>>2]=a&-8388609}ra.updateResizeListeners()},updateCanvasDimensions:function(a,b,
d){b&&d?(a.widthNative=b,a.heightNative=d):(b=a.widthNative,d=a.heightNative);var f=b,e=d;h.forcedAspectRatio&&0<h.forcedAspectRatio&&(f/e<h.forcedAspectRatio?f=Math.round(e*h.forcedAspectRatio):e=Math.round(f/h.forcedAspectRatio));if((document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement||document.msFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement)===
a.parentNode&&"undefined"!=typeof screen)var k=Math.min(screen.width/f,screen.height/e),f=Math.round(f*k),e=Math.round(e*k);ra.resizeCanvas?(a.width!=f&&(a.width=f),a.height!=e&&(a.height=e),"undefined"!=typeof a.style&&(a.style.removeProperty("width"),a.style.removeProperty("height"))):(a.width!=b&&(a.width=b),a.height!=d&&(a.height=d),"undefined"!=typeof a.style&&(f!=b||e!=d?(a.style.setProperty("width",f+"px","important"),a.style.setProperty("height",e+"px","important")):(a.style.removeProperty("width"),
a.style.removeProperty("height"))))},wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle:function(){var a=ra.nextWgetRequestHandle;ra.nextWgetRequestHandle++;return a}};h._malloc=Ra;var qb={varargs:0,get:function(a){qb.varargs+=4;return ib[qb.varargs-4>>2]},getStr:function(){return w(qb.get())},get64:function(){var a=qb.get(),b=qb.get();0<=a?k(0===b):k(-1===b);return a},getZero:function(){k(0===qb.get())}};h._i64Add=Zc;h._bitshift64Lshr=fe;h._memcpy=Dc;h._bitshift64Shl=td;h._memmove=
Fb;var Cc=B(1,"i32*",2);h.requestFullScreen=function(a,b,d){ra.requestFullScreen(a,b,d)};h.requestAnimationFrame=function(a){ra.requestAnimationFrame(a)};h.setCanvasSize=function(a,b,d){ra.setCanvasSize(a,b,d)};h.pauseMainLoop=function(){ra.mainLoop.pause()};h.resumeMainLoop=function(){ra.mainLoop.resume()};h.getUserMedia=function(){ra.getUserMedia()};h.createContext=function(a,b,d,f){return ra.createContext(a,b,d,f)};Vc=xc=Oa.alignMemory(Uc);Bd=!0;Qb=Vc+Xc;fc=Hb=Oa.alignMemory(Qb);k(fc<Ib,"TOTAL_MEMORY not big enough for stack");
var Hd=B([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,
1,0,3,0,1,0,2,0,1,0],"i8",3);h.asmGlobalArg={Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array,NaN:NaN,Infinity:Infinity,byteLength:Wc};h.asmLibraryArg={abort:ic,assert:k,invoke_iiiiiiii:function(a,b,d,f,e,k,m,n){try{return h.dynCall_iiiiiiii(a,b,d,f,e,k,m,n)}catch(q){if("number"!==typeof q&&"longjmp"!==q)throw q;Ma.setThrew(1,0)}},invoke_viiiii:function(a,
b,d,f,e,k){try{h.dynCall_viiiii(a,b,d,f,e,k)}catch(m){if("number"!==typeof m&&"longjmp"!==m)throw m;Ma.setThrew(1,0)}},invoke_iiiiiid:function(a,b,d,f,e,k,m){try{return h.dynCall_iiiiiid(a,b,d,f,e,k,m)}catch(n){if("number"!==typeof n&&"longjmp"!==n)throw n;Ma.setThrew(1,0)}},invoke_vi:function(a,b){try{h.dynCall_vi(a,b)}catch(d){if("number"!==typeof d&&"longjmp"!==d)throw d;Ma.setThrew(1,0)}},invoke_vii:function(a,b,d){try{h.dynCall_vii(a,b,d)}catch(f){if("number"!==typeof f&&"longjmp"!==f)throw f;
Ma.setThrew(1,0)}},invoke_iiiiiii:function(a,b,d,f,e,k,m){try{return h.dynCall_iiiiiii(a,b,d,f,e,k,m)}catch(n){if("number"!==typeof n&&"longjmp"!==n)throw n;Ma.setThrew(1,0)}},invoke_ii:function(a,b){try{return h.dynCall_ii(a,b)}catch(d){if("number"!==typeof d&&"longjmp"!==d)throw d;Ma.setThrew(1,0)}},invoke_iiiiiiiiiiii:function(a,b,d,f,e,k,m,n,q,r,x,t){try{return h.dynCall_iiiiiiiiiiii(a,b,d,f,e,k,m,n,q,r,x,t)}catch(z){if("number"!==typeof z&&"longjmp"!==z)throw z;Ma.setThrew(1,0)}},invoke_iiii:function(a,
b,d,f){try{return h.dynCall_iiii(a,b,d,f)}catch(e){if("number"!==typeof e&&"longjmp"!==e)throw e;Ma.setThrew(1,0)}},invoke_viiiiiiiiiiiiiii:function(a,b,d,f,e,k,m,n,q,r,x,t,z,A,E,L){try{h.dynCall_viiiiiiiiiiiiiii(a,b,d,f,e,k,m,n,q,r,x,t,z,A,E,L)}catch(y){if("number"!==typeof y&&"longjmp"!==y)throw y;Ma.setThrew(1,0)}},invoke_viiiiii:function(a,b,d,f,e,k,m){try{h.dynCall_viiiiii(a,b,d,f,e,k,m)}catch(n){if("number"!==typeof n&&"longjmp"!==n)throw n;Ma.setThrew(1,0)}},invoke_viiiiiii:function(a,b,d,
f,e,k,m,n){try{h.dynCall_viiiiiii(a,b,d,f,e,k,m,n)}catch(q){if("number"!==typeof q&&"longjmp"!==q)throw q;Ma.setThrew(1,0)}},invoke_viiiiiiiiii:function(a,b,d,f,e,k,m,n,q,r,x){try{h.dynCall_viiiiiiiiii(a,b,d,f,e,k,m,n,q,r,x)}catch(t){if("number"!==typeof t&&"longjmp"!==t)throw t;Ma.setThrew(1,0)}},invoke_iii:function(a,b,d){try{return h.dynCall_iii(a,b,d)}catch(f){if("number"!==typeof f&&"longjmp"!==f)throw f;Ma.setThrew(1,0)}},invoke_iiiiii:function(a,b,d,f,e,k){try{return h.dynCall_iiiiii(a,b,d,
f,e,k)}catch(m){if("number"!==typeof m&&"longjmp"!==m)throw m;Ma.setThrew(1,0)}},invoke_diii:function(a,b,d,f){try{return h.dynCall_diii(a,b,d,f)}catch(e){if("number"!==typeof e&&"longjmp"!==e)throw e;Ma.setThrew(1,0)}},invoke_i:function(a){try{return h.dynCall_i(a)}catch(b){if("number"!==typeof b&&"longjmp"!==b)throw b;Ma.setThrew(1,0)}},invoke_iiiii:function(a,b,d,f,e){try{return h.dynCall_iiiii(a,b,d,f,e)}catch(k){if("number"!==typeof k&&"longjmp"!==k)throw k;Ma.setThrew(1,0)}},invoke_viii:function(a,
b,d,f){try{h.dynCall_viii(a,b,d,f)}catch(e){if("number"!==typeof e&&"longjmp"!==e)throw e;Ma.setThrew(1,0)}},invoke_v:function(a){try{h.dynCall_v(a)}catch(b){if("number"!==typeof b&&"longjmp"!==b)throw b;Ma.setThrew(1,0)}},invoke_iiiiiiiii:function(a,b,d,f,e,k,m,n,q){try{return h.dynCall_iiiiiiiii(a,b,d,f,e,k,m,n,q)}catch(r){if("number"!==typeof r&&"longjmp"!==r)throw r;Ma.setThrew(1,0)}},invoke_iiiiid:function(a,b,d,f,e,k){try{return h.dynCall_iiiiid(a,b,d,f,e,k)}catch(m){if("number"!==typeof m&&
"longjmp"!==m)throw m;Ma.setThrew(1,0)}},invoke_viiii:function(a,b,d,f,e){try{h.dynCall_viiii(a,b,d,f,e)}catch(k){if("number"!==typeof k&&"longjmp"!==k)throw k;Ma.setThrew(1,0)}},_fabs:Wb,_strftime:O,_pthread_cond_wait:function(){return 0},___lock:function(){},_pthread_key_create:function(a,b){if(0==a)return 22;ib[a>>2]=Fc;ld[Fc]=0;Fc++;return 0},_abort:function(){h.abort()},___cxa_guard_acquire:function(a){return Gb[a>>0]?0:Gb[a>>0]=1},___setErrNo:ab,___gxx_personality_v0:function(){},___assert_fail:function(a,
b,d,f){Eb=!0;throw"Assertion failed: "+w(a)+", at: "+[b?w(b):"unknown filename",d,f?w(f):"unknown function"]+" at "+ka();},___cxa_free_exception:Ua,___cxa_allocate_exception:function(a){return Ra(a)},___cxa_find_matching_catch:la,__isLeapYear:ja,___cxa_guard_release:function(){},__addDays:va,_strftime_l:function(a,b,d,f){return O(a,b,d,f)},_emscripten_set_main_loop_timing:Ba,_llvm_eh_typeid_for:function(a){return a},_sbrk:gc,___cxa_begin_catch:function(a){L.uncaught_exception--;Qa.caught.push(a);
Qa.addRef(Qa.deAdjust(a));return a},_emscripten_memcpy_big:function(a,b,d){Ab.set(Ab.subarray(b,b+d),a);return a},___cxa_end_catch:lb,___resumeException:function(a){Qa.last||(Qa.last=a);Qa.clearRef(Qa.deAdjust(a));throw a;},__ZSt18uncaught_exceptionv:L,_sysconf:function(a){switch(a){case 30:return 4096;case 85:return Rb/4096;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;
case 79:return 0;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;
case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1E3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"===typeof navigator?navigator.hardwareConcurrency||1:1}ab(22);return-1},
_pthread_getspecific:function(a){return ld[a]||0},__arraySum:Ia,_pthread_self:function(){return 0},_pthread_mutex_unlock:function(){},_pthread_once:ha,___syscall54:function(a,b){qb.varargs=b;return 0},___unlock:function(){},_pthread_cleanup_pop:function(){k(dc.level==Tb.length,"cannot pop if something else added meanwhile!");Tb.pop();dc.level=Tb.length},_pthread_cond_broadcast:function(){return 0},_emscripten_set_main_loop:nb,_pthread_setspecific:function(a,b){if(!(a in ld))return 22;ld[a]=b;return 0},
___cxa_atexit:function(){return A.apply(null,arguments)},___cxa_throw:function(a,b,d){Qa.infos[a]={ptr:a,adjusted:a,type:b,destructor:d,refcount:0};Qa.last=a;"uncaught_exception"in L?L.uncaught_exception++:L.uncaught_exception=1;throw a;},___cxa_rethrow:function(){lb.rethrown=!0;var a=Qa.caught.pop();Qa.last=a;throw a;},___syscall6:function(a,b){qb.varargs=b;try{var d=qb.getStreamFromFD();FS.close(d);return 0}catch(f){return"undefined"!==typeof FS&&f instanceof FS.ErrnoError||ic(f),-f.errno}},_pthread_cleanup_push:dc,
___cxa_pure_virtual:function(){Eb=!0;throw"Pure virtual function called!";},_time:function(a){var b=Date.now()/1E3|0;a&&(ib[a>>2]=b);return b},_pthread_mutex_lock:function(){},___cxa_guard_abort:function(){},_atexit:A,___syscall140:function(a,b){qb.varargs=b;try{var d=qb.getStreamFromFD(),f=qb.get(),h=qb.get(),e=qb.get(),m=qb.get();k(0===f);FS.llseek(d,h,m);ib[e>>2]=d.position;d.getdents&&0===h&&0===m&&(d.getdents=null);return 0}catch(n){return"undefined"!==typeof FS&&n instanceof FS.ErrnoError||
ic(n),-n.errno}},___syscall145:function(a,b){qb.varargs=b;try{var d=qb.getStreamFromFD(),f=qb.get(),h=qb.get();return qb.doReadv(d,f,h)}catch(e){return"undefined"!==typeof FS&&e instanceof FS.ErrnoError||ic(e),-e.errno}},___syscall146:cc,STACKTOP:xc,STACK_MAX:Qb,tempDoublePtr:dd,ABORT:Eb,cttz_i8:Hd,___dso_handle:Cc};var Ma=function(a,b,d){function f(p,v,C,a,l){p|=0;v|=0;C|=0;a|=0;l|=0;var K=0,H=0,b=0,d=0,oc=0,ub=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,S=0,S=F;F=F+128|0;e=S+44|0;n=S+8|0;d=S+4|0;ub=S;k=C+4|0;
m=C+8|0;g=0;pa(35,c[C>>2]|0,c[k>>2]|0,c[m>>2]|0,a|0);oc=g;g=0;if(oc&1)q=5;else{H=e;K=H+84|0;do c[H>>2]=c[a>>2],H=H+4|0,a=a+4|0;while((H|0)<(K|0));a=e+12|0;0==(c[a>>2]|0)&&(b=ia(((c[e+8>>2]|0)+7|0)/8|0,c[e>>2]|0)|0,c[a>>2]=b,0!=(c[e+24>>2]|0))&&(oc=ia(c[e+16>>2]|0,b)|0,c[a>>2]=oc);g=0;ta(176,n|0);oc=g;g=0;if(oc&1)q=5;else{a=e+56|0;if(c[a>>2]|0)if(g=0,a=ca(66,a|0)|0,oc=g,g=0,oc&1)q=15;else if(c[d>>2]=a,K=n+28|0,H=c[K>>2]|0,H>>>0<(c[n+32>>2]|0)>>>0)c[H>>2]=a,c[K>>2]=H+4,c[d>>2]=0,q=19;else if(g=0,ga(57,
n+24|0,d|0),oc=g,g=0,oc&1){if(K=J(824,0)|0,a=Fa,H=c[d>>2]|0,c[d>>2]=0,H)Ha[c[(c[H>>2]|0)+4>>2]&255](H)}else{a=c[d>>2]|0;c[d>>2]=0;if(a)Ha[c[(c[a>>2]|0)+4>>2]&255](a);q=19}else q=19;a:do if(19==(q|0))if(H=e+4|0,b=e+8|0,d=e+16|0,g=0,a=fb(14,c[e>>2]|0,c[H>>2]|0,c[b>>2]|0,c[d>>2]|0)|0,oc=g,g=0,oc&1)q=15;else{c[ub>>2]=a;oc=n+28|0;K=c[oc>>2]|0;do if(K>>>0>=(c[n+32>>2]|0)>>>0)if(g=0,ga(57,n+24|0,ub|0),K=g,g=0,K&1){K=J(824,0)|0;a=Fa;H=c[ub>>2]|0;c[ub>>2]=0;if(!H)break a;Ha[c[(c[H>>2]|0)+4>>2]&255](H);break a}else{if(a=
c[ub>>2]|0,c[ub>>2]=0,a)Ha[c[(c[a>>2]|0)+4>>2]&255](a)}else c[K>>2]=a,c[oc>>2]=K+4,c[ub>>2]=0;while(0);a=c[e+28>>2]|0;if(0!=(a|0)&&(g=0,ga(58,n|0,a|0),q=g,g=0,q&1))q=15;else{b:do if(c[e+24>>2]|0){if(g=0,na(4,n|0,C|0,e|0),q=g,g=0,q&1){q=15;break a}}else if(a=ia(c[H>>2]|0,c[e>>2]|0)|0,a=ia(a,((c[b>>2]|0)+7|0)/8|0)|0,0<(c[d>>2]|0)){for(H=0;;){g=0;na(4,n|0,C|0,e|0);q=g;g=0;if(q&1)break;if(K=c[k>>2]|0)c[k>>2]=K+a,c[m>>2]=(c[m>>2]|0)-a;H=H+1|0;if((H|0)>=(c[d>>2]|0))break b}K=J(824,0)|0;a=Fa;q=16;break a}while(0);
g=0;ma(33,n|0,p|0)|0;q=g;g=0;if(q&1)q=15;else{c[v>>2]=c[n+16>>2];l&&(u[l>>0]=0);H=n+24|0;if(a=c[H>>2]|0){K=c[oc>>2]|0;if((K|0)!=(a|0)){do{l=K+-4|0;c[oc>>2]=l;K=c[l>>2]|0;c[l>>2]=0;if(K)Ha[c[(c[K>>2]|0)+4>>2]&255](K);K=c[oc>>2]|0}while((K|0)!=(a|0));a=c[H>>2]|0}Q(a)}l=0;F=S;return l|0}}}while(0);15==(q|0)&&(K=J(824,0)|0,a=Fa,q=16);oc=n+24|0;if(H=c[oc>>2]|0){d=n+28|0;b=c[d>>2]|0;if((b|0)!=(H|0)){do{n=b+-4|0;c[d>>2]=n;b=c[n>>2]|0;c[n>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);b=c[d>>2]|0}while((b|0)!=
(H|0));H=c[oc>>2]|0}Q(H)}}}5==(q|0)&&(K=J(824,0)|0,a=Fa);n=(a|0)==(Zf(824)|0);b=Rc(K|0)|0;a=0==(l|0);if(!n)return a||(u[l>>0]=0),$c(),F=S,14;H=b+12|0;a?q=60:(a=c[H>>2]|0,g=0,K=Va(1)|0,n=g,g=0,n&1||((a|0)==(K|0)?$f(l,Ja[c[(c[b>>2]|0)+8>>2]&127](b)|0)|0:u[l>>0]=0,q=60));if(60==(q|0)&&(r=c[H>>2]|0,g=0,x=Va(1)|0,l=g,g=0,!(l&1)))return l=(r|0)==(x|0)?c[b+8>>2]|0:13,$c(),F=S,l|0;a=J()|0;g=0;rb(3);S=g;g=0;S&1?(S=J(0)|0,h(S)):V(a|0);return 0}function h(p){Rc(p|0)|0;var v=p=0,C=0;g=0;p=Va(2)|0;C=g;g=0;C&1&&
(C=J(0)|0,h(C));0!=(p|0)&&(v=c[p>>2]|0,0!=(v|0))&&(C=v+48|0,1126902528==(c[C>>2]&-256|0)?1129074247==(c[C+4>>2]|0):0)&&yg(c[v+12>>2]|0);C=c[9208]|0;c[9208]=C+0;yg(C)}function e(p,v,C,a){p|=0;v|=0;C|=0;a|=0;var l=0,K=0,H=0,b=0,d=0,f=0,ub=0,ub=F;F=F+128|0;K=ub+116|0;H=ub;g=0;c[K>>2]=c[v>>2];c[K+4>>2]=c[v+4>>2];c[K+8>>2]=c[v+8>>2];ga(59,H|0,K|0);l=g;g=0;if(!(l&1)){if(C){l=H+16|0;v=l+84|0;do c[l>>2]=c[C>>2],l=l+4|0,C=C+4|0;while((l|0)<(v|0))}g=0;c[K>>2]=c[p>>2];c[K+4>>2]=c[p+4>>2];c[K+8>>2]=c[p+8>>2];
ga(60,H|0,K|0);H=g;g=0;if(!(H&1))return a&&(u[a>>0]=0),F=ub,0}p=J(824,0)|0;H=Fa;H=(H|0)==(Zf(824)|0);p=Rc(p|0)|0;v=0==(a|0);if(!H)return v||(u[a>>0]=0),$c(),F=ub,14;l=p+12|0;v?f=10:(v=c[l>>2]|0,g=0,C=Va(1)|0,H=g,g=0,H&1||((v|0)==(C|0)?$f(a,Ja[c[(c[p>>2]|0)+8>>2]&127](p)|0)|0:u[a>>0]=0,f=10));if(10==(f|0)&&(b=c[l>>2]|0,g=0,d=Va(1)|0,f=g,g=0,!(f&1)))return f=(b|0)==(d|0)?c[p+8>>2]|0:13,$c(),F=ub,f|0;v=J()|0;g=0;rb(3);ub=g;g=0;ub&1?(ub=J(0)|0,h(ub)):V(v|0);return 0}function k(p,v,C){p|=0;v|=0;C|=0;var a=
0,l=0,K=0,H=0,b=0,d=0,f=0,d=F;F=F+128|0;l=d+116|0;a=d;g=0;c[l>>2]=c[p>>2];c[l+4>>2]=c[p+4>>2];c[l+8>>2]=c[p+8>>2];ga(59,a|0,l|0);l=g;g=0;if(l&1||(g=0,ta(177,a|0),l=g,g=0,l&1)?0:(g=0,ga(61,a|0,1),l=g,g=0,!(l&1))){p=a+16|0;a=v+84|0;do c[v>>2]=c[p>>2],v=v+4|0,p=p+4|0;while((v|0)<(a|0));C&&(u[C>>0]=0);F=d;return 0}l=J(824,0)|0;v=Fa;v=(v|0)==(Zf(824)|0);l=Rc(l|0)|0;p=0==(C|0);if(!v)return p||(u[C>>0]=0),$c(),F=d,14;v=l+12|0;p?b=13:(p=c[v>>2]|0,g=0,a=Va(1)|0,f=g,g=0,f&1||((p|0)==(a|0)?$f(C,Ja[c[(c[l>>2]|
0)+8>>2]&127](l)|0)|0:u[C>>0]=0,b=13));if(13==(b|0)&&(K=c[v>>2]|0,g=0,H=Va(1)|0,f=g,g=0,!(f&1)))return f=(K|0)==(H|0)?c[l+8>>2]|0:13,$c(),F=d,f|0;p=J()|0;g=0;rb(3);f=g;g=0;f&1?(f=J(0)|0,h(f)):V(p|0);return 0}function m(p,v){p|=0;var C=0,a=0,l=0,K=0,H=0,b=0,d=0,f=0,ub=0,ub=F;F=F+32|0;d=ub;xb(d,(1<<(v|0))+-1|0,0);K=c[d>>2]|0;f=K+1|0;C=f<<1;c[p>>2]=0;H=p+4|0;c[H>>2]=0;c[p+8>>2]=0;a:do if(f){-1>(K|0)&&(g=0,ta(178,p|0),b=g,g=0,b&1)||(a=4);if(4==(a|0)&&(g=0,l=ca(67,C|0)|0,b=g,g=0,!(b&1)))for(c[H>>2]=l,
c[p>>2]=l,c[p+8>>2]=l+C,v=l;;)if(u[v>>0]=0,v=(c[H>>2]|0)+1|0,c[H>>2]=v,C=C+-1|0,!C)break a;C=J()|0;(v=c[p>>2]|0)||V(C|0);(c[H>>2]|0)!=(v|0)&&(c[H>>2]=v);Q(v);V(C|0)}while(0);v=~K;if(!((K|0)<(v|0))){H=d+12|0;b=d+8|0;K=d+4|0;l=v;do v=c[H>>2]|0,(l|0)>(0-v|0)?(C=c[b>>2]|0,(l|0)>(0-C|0)?(a=c[K>>2]|0,v=(l|0)>(0-a|0)?0<=(l|0)?0<(l|0)?(a|0)<=(l|0)?(C|0)>(l|0)?2:(v|0)>(l|0)?3:4:1:0:-1:-2):v=-3):v=-4,u[(c[p>>2]|0)+(l+f)>>0]=v,l=l+1|0;while((l|0)<(f|0))}F=ub}function n(p,v,C){p|=0;v|=0;C|=0;var a=0,l=0,K=0,
H=0,b=0,d=0,f=0,ub=0,h=0,e=0,h=c[C+16>>2]|0;switch(h|0){case 64:case 0:g=0;p=ma(34,p|0,v|0)|0;v=g;g=0;v&1?e=16:a=p;break;default:l=(1<<c[v+8>>2])+-1|0;ub=c[v+20>>2]|0;f=ub<<1;f=((f+l|0)/(f|1)|0)+1|0;for(p=0;;)if((1<<p|0)<(f|0))p=p+1|0;else break;for(a=0;;)if((1<<a|0)<(l|0))a=a+1|0;else{K=a;break}l=c[C>>2]|0;g=0;a=ca(67,4624)|0;d=g;g=0;if(d&1)e=16;else{H=a+4|0;b=v;d=H+84|0;do c[H>>2]=c[b>>2],H=H+4|0,b=b+4|0;while((H|0)<(d|0));H=a+88|0;d=H+40|0;do c[H>>2]=0,H=H+4|0;while((H|0)<(d|0));c[a>>2]=35660;
c[a+128>>2]=l;c[a+132>>2]=f;c[a+136>>2]=ub;c[a+140>>2]=p;c[a+144>>2]=K;c[a+148>>2]=(8>(K|0)?8:K)+K<<1;c[a+152>>2]=h;p=a+156|0;c[p>>2]=0;c[p+4>>2]=0;c[p+8>>2]=0;c[p+12>>2]=0;c[a+172>>2]=c[v>>2];c[a+176>>2]=0;c[a+180>>2]=0;c[a+184>>2]=0;p=a+4568|0;l=a+188|0;do c[l>>2]=0,c[l+4>>2]=0,R[l+8>>1]=0,R[l+10>>1]=1,l=l+12|0;while((l|0)!=(p|0));c[p>>2]=0;c[p+4>>2]=0;R[p+8>>1]=0;u[p+10>>0]=0;v=a+4580|0;c[v>>2]=0;c[v+4>>2]=0;R[v+8>>1]=0;u[v+10>>0]=0;v=a+4592|0;c[v>>2]=0;c[v+4>>2]=0;c[v+8>>2]=0;c[v+12>>2]=0;c[v+
16>>2]=0;c[v+20>>2]=0;c[v+24>>2]=0;u[v+28>>0]=0;c[a+28>>2]|0||(c[a+20>>2]=1)}}16==(e|0)&&(e=J()|0,V(e|0));if(!a)return a|0;g=0;ga(c[(c[a>>2]|0)+12>>2]|0,a|0,C|0);e=g;g=0;if(!(e&1))return a|0;p=J()|0;a||V(p|0);Ha[c[(c[a>>2]|0)+4>>2]&255](a);V(p|0);return 0}function q(p,v,C){p|=0;v|=0;C|=0;var a=0,l=0,K=0,H=0,b=0,d=0,f=0,ub=0,h=0,e=0,h=c[C+16>>2]|0;switch(h|0){case 64:case 0:g=0;p=ma(35,p|0,v|0)|0;v=g;g=0;v&1?e=16:a=p;break;default:l=(1<<c[v+8>>2])+-1|0;ub=c[v+20>>2]|0;f=ub<<1;f=((f+l|0)/(f|1)|0)+1|
0;for(p=0;;)if((1<<p|0)<(f|0))p=p+1|0;else break;for(a=0;;)if((1<<a|0)<(l|0))a=a+1|0;else{K=a;break}l=c[C>>2]|0;g=0;a=ca(67,4632)|0;d=g;g=0;if(d&1)e=16;else{c[a+4>>2]=0;H=a+8|0;b=v;d=H+84|0;do c[H>>2]=c[b>>2],H=H+4|0,b=b+4|0;while((H|0)<(d|0));c[a+92>>2]=0;c[a+96>>2]=0;c[a+100>>2]=32;c[a+104>>2]=0;c[a+108>>2]=0;u[a+112>>0]=0;d=a+116|0;c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;c[d+12>>2]=0;c[d+16>>2]=0;c[a>>2]=35884;c[a+136>>2]=l;c[a+140>>2]=f;c[a+144>>2]=ub;c[a+148>>2]=p;c[a+152>>2]=K;c[a+156>>2]=(8>(K|0)?
8:K)+K<<1;c[a+160>>2]=h;p=a+164|0;c[p>>2]=0;c[p+4>>2]=0;c[p+8>>2]=0;c[p+12>>2]=0;c[a+180>>2]=c[v>>2];c[a+184>>2]=0;c[a+188>>2]=0;c[a+192>>2]=0;p=a+4576|0;l=a+196|0;do c[l>>2]=0,c[l+4>>2]=0,R[l+8>>1]=0,R[l+10>>1]=1,l=l+12|0;while((l|0)!=(p|0));c[p>>2]=0;c[p+4>>2]=0;R[p+8>>1]=0;u[p+10>>0]=0;v=a+4588|0;c[v>>2]=0;c[v+4>>2]=0;R[v+8>>1]=0;u[v+10>>0]=0;v=a+4600|0;c[v>>2]=0;c[v+4>>2]=0;c[v+8>>2]=0;c[v+12>>2]=0;c[v+16>>2]=0;c[v+20>>2]=0;c[v+24>>2]=0;u[v+28>>0]=0;c[a+32>>2]|0||(c[a+24>>2]=1)}}16==(e|0)&&(e=
J()|0,V(e|0));if(!a)return a|0;g=0;ga(c[(c[a>>2]|0)+8>>2]|0,a|0,C|0);e=g;g=0;if(!(e&1))return a|0;p=J()|0;a||V(p|0);Ha[c[(c[a>>2]|0)+4>>2]&255](a);V(p|0);return 0}function r(p,v,C,a,l){p|=0;v|=0;C|=0;a|=0;l|=0;var K=0,H=0,g=0,b=0,d=0,f=0,h=0,b=p+4|0,K=c[b>>2]|0;if(u[K+32>>0]|0)if(H=p+8|0,gb(c[H>>2]|0,v|0,6*a|0)|0,K=c[b>>2]|0,g=c[K+16>>2]|0,0>=(a|0))d=c[H>>2]|0;else{K=v=c[H>>2]|0;for(H=0;d=K+4|0,f=R[K>>1]|0,R[K>>1]=R[d>>1]|0,R[d>>1]=f,H=H+1|0,(H|0)!=(a|0);)K=K+(g<<1)|0;d=v;K=c[b>>2]|0}else d=v;switch(c[K+
16>>2]|0){case 3:if(2==(c[K+24>>2]|0)){if(0>=(a|0))break;K=p+32|0;v=0;do f=c[K>>2]|0,b=oa[d+(6*v|0)+2>>1]<<f,l=32768-b|0,p=l+(oa[d+(6*v|0)+4>>1]<<f)&65535,l=l+(oa[d+(6*v|0)>>1]<<f)&65535,R[C+(6*v|0)>>1]=(b+49152+((p+l|0)>>>2)&65535)>>>f,R[C+(6*v|0)+2>>1]=p>>>f,R[C+(6*v|0)+4>>1]=l>>>f,v=v+1|0;while((v|0)!=(a|0))}else{H=(l|0)<(a|0)?l:a;if(0>=(H|0))break;g=l<<1;K=c[p+32>>2]|0;v=0;do a=oa[d+(6*v|0)+2>>1]<<K,f=32768-a|0,p=f+(oa[d+(6*v|0)+4>>1]<<K)&65535,f=f+(oa[d+(6*v|0)>>1]<<K)&65535,R[C+(v<<1)>>1]=(a+
49152+((p+f|0)>>>2)&65535)>>>K,R[C+(v+l<<1)>>1]=p>>>K,R[C+(v+g<<1)>>1]=f>>>K,v=v+1|0;while((v|0)!=(H|0))}break;case 4:if(1!=(c[K+24>>2]|0))break;H=(l|0)<(a|0)?l:a;if(0>=(H|0))break;g=l<<1;b=3*l|0;K=c[p+32>>2]|0;v=0;do f=R[d+(v<<3)+6>>1]|0,h=oa[d+(v<<3)+2>>1]<<K,p=32768-h|0,a=p+(oa[d+(v<<3)+4>>1]<<K)&65535,p=p+(oa[d+(v<<3)>>1]<<K)&65535,R[C+(v<<1)>>1]=(h+49152+((a+p|0)>>>2)&65535)>>>K,R[C+(v+l<<1)>>1]=a>>>K,R[C+(v+g<<1)>>1]=p>>>K,R[C+(v+b<<1)>>1]=f,v=v+1|0;while((v|0)!=(H|0))}}function x(p,v){p|=0;
v|=0;var C=0,a=0,l=0,K=0,H=0,b=0,d=0,l=F;F=F+176|0;C=l+152|0;d=l+16|0;H=l;if(v&1)b=d+56|0,K=d+4|0,c[d>>2]=36160,c[b>>2]=36180,g=0,ga(62,d+56|0,K|0),l=g,g=0,l&1&&(d=J()|0,sa(b),V(d|0)),c[d+128>>2]=0,c[d+132>>2]=-1,c[d>>2]=36200,c[d+56>>2]=36220,g=0,ta(180,K|0),l=g,g=0,l&1?C=J()|0:(c[K>>2]=36236,l=d+36|0,c[l>>2]=0,c[l+4>>2]=0,c[l+8>>2]=0,c[l+12>>2]=0,c[d+52>>2]=16,c[C>>2]=0,c[C+4>>2]=0,g=c[C+8>>2]=0,ga(63,K|0,C|0),p=g,g=0,p&1?(d=J()|0,W(C),W(l),ya(K),C=d):(W(C),g=0,C=La(28,d|0,49087,24)|0,p=g,g=0,p&
1||(g=0,a=ma(36,C|0,v|0)|0,v=g,g=0,v&1)||(g=0,La(28,a|0,49112,20)|0,v=g,g=0,v&1)||(p=xa(16)|0,g=0,ga(64,H|0,K|0),v=g,g=0,v&1?C=J()|0:(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,p|0,1,35648,H|0),v=g,g=0,v&1?a=1:(g=0,na(6,p|0,824,96),a=g=0),C=J()|0,W(H),a||(H=C,c[d>>2]=36200,c[b>>2]=36220,c[K>>2]=36236,W(l),ya(K),sa(b),V(H|0))),za(p|0),H=C,c[d>>2]=36200,c[b>>2]=36220,c[K>>2]=36236,W(l),ya(K),sa(b),V(H|0)),H=J()|0,c[d>>2]=36200,c[b>>2]=36220,c[K>>2]=36236,W(l),ya(K),sa(b),V(H|0))),
d=C,sa(b),V(d|0);else{C=(v|0)/4|0;if(3<(v|0)){a=0;do d=p+(a<<2)|0,b=c[d>>2]|0,c[d>>2]=b>>>8&16711935|b<<8&-16711936,a=a+1|0;while((a|0)<(C|0))}v&3&&(H=p+(v+-2)|0,d=p+(v+-1)|0,b=u[H>>0]|0,u[H>>0]=u[d>>0]|0,u[d>>0]=b);F=l}}function t(p,v,C,a,l){p|=0;v|=0;C|=0;a|=0;l|=0;var K=0,H=0,g=0,b=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,d=p+4|0,K=c[d>>2]|0;a:do switch(c[K+16>>2]|0){case 3:if(2==(c[K+24>>2]|0)){if(0>=(a|0))break a;K=p+40|0;p=0;do l=c[K>>2]|0,g=oa[v+(6*p|0)+2>>1]<<l,H=oa[v+(6*p|0)+4>>1]<<l,b=(oa[v+(6*p|0)>>
1]<<l)-(H+g>>2)+16384|0,R[C+(6*p|0)>>1]=(H+32768+b&65535)>>>l,R[C+(6*p|0)+2>>1]=(b&65535)>>>l,R[C+(6*p|0)+4>>1]=(g+32768+b&65535)>>>l,p=p+1|0;while((p|0)!=(a|0))}else{H=(a|0)<(l|0)?a:l;if(0>=(H|0))break a;g=l<<1;K=p+40|0;p=0;do b=c[K>>2]|0,h=oa[v+(p+l<<1)>>1]<<b,e=oa[v+(p+g<<1)>>1]<<b,f=(oa[v+(p<<1)>>1]<<b)-(e+h>>2)+16384|0,R[C+(6*p|0)>>1]=(e+32768+f&65535)>>>b,R[C+(6*p|0)+2>>1]=(f&65535)>>>b,R[C+(6*p|0)+4>>1]=(h+32768+f&65535)>>>b,p=p+1|0;while((p|0)!=(H|0))}break;case 4:if(1==(c[K+24>>2]|0)&&(b=
(a|0)<(l|0)?a:l,0<(b|0))){g=l<<1;K=p+40|0;p=3*l|0;H=0;do e=c[K>>2]|0,h=oa[v+(H+l<<1)>>1]<<e,m=oa[v+(H+g<<1)>>1]<<e,f=(oa[v+(H<<1)>>1]<<e)-(m+h>>2)+16384|0,k=R[v+(H+p<<1)>>1]|0,n=yb((f&65535)>>>e&65535|0,0,16)|0,h=(h+32768+f&65535)>>>e|Fa,k=yb(k&65535|0,0,48)|0,k|=n|(m+32768+f&65535)>>>e&65535,h=h&65535|Fa,f=e=C+(H<<3)|0,R[f>>1]=k,R[f+2>>1]=k>>>16,e=e+4|0,R[e>>1]=h,R[e+2>>1]=h>>>16,H=H+1|0;while((H|0)!=(b|0))}}while(0);K=c[d>>2]|0;if(u[K+32>>0]|0&&(H=c[K+16>>2]|0,!(0>=(a|0))))for(K=C,p=0;n=K+4|0,m=
R[K>>1]|0,R[K>>1]=R[n>>1]|0,R[n>>1]=m,p=p+1|0,(p|0)!=(a|0);)K=K+(H<<1)|0}function z(p,v,C,a,l){p|=0;v|=0;C|=0;a|=0;l|=0;var K=0,H=0,g=0,b=0,d=0,f=0,h=0,b=p+4|0,K=c[b>>2]|0;if(u[K+32>>0]|0)if(H=p+8|0,gb(c[H>>2]|0,v|0,6*a|0)|0,K=c[b>>2]|0,g=c[K+16>>2]|0,0>=(a|0))d=c[H>>2]|0;else{K=v=c[H>>2]|0;for(H=0;d=K+4|0,f=R[K>>1]|0,R[K>>1]=R[d>>1]|0,R[d>>1]=f,H=H+1|0,(H|0)!=(a|0);)K=K+(g<<1)|0;d=v;K=c[b>>2]|0}else d=v;switch(c[K+16>>2]|0){case 3:if(2==(c[K+24>>2]|0)){if(0>=(a|0))break;K=p+32|0;v=0;do l=c[K>>2]|
0,b=oa[d+(6*v|0)>>1]<<l,p=oa[d+(6*v|0)+2>>1]<<l,f=((oa[d+(6*v|0)+4>>1]<<l)+32768-((p+b|0)>>>1)&65535)>>>l&65535,R[C+(6*v|0)>>1]=(b+32768-p&65535)>>>l,R[C+(6*v|0)+2>>1]=(p&65535)>>>l,R[C+(6*v|0)+4>>1]=f,v=v+1|0;while((v|0)!=(a|0))}else{H=(l|0)<(a|0)?l:a;if(0>=(H|0))break;g=l<<1;K=c[p+32>>2]|0;v=0;do a=oa[d+(6*v|0)>>1]<<K,p=oa[d+(6*v|0)+2>>1]<<K,f=((oa[d+(6*v|0)+4>>1]<<K)+32768-((p+a|0)>>>1)&65535)>>>K&65535,R[C+(v<<1)>>1]=(a+32768-p&65535)>>>K,R[C+(v+l<<1)>>1]=(p&65535)>>>K,R[C+(v+g<<1)>>1]=f,v=v+
1|0;while((v|0)!=(H|0))}break;case 4:if(1!=(c[K+24>>2]|0))break;H=(l|0)<(a|0)?l:a;if(0>=(H|0))break;g=l<<1;b=3*l|0;K=c[p+32>>2]|0;v=0;do f=R[d+(v<<3)+6>>1]|0,h=oa[d+(v<<3)>>1]<<K,a=oa[d+(v<<3)+2>>1]<<K,p=((oa[d+(v<<3)+4>>1]<<K)+32768-((a+h|0)>>>1)&65535)>>>K&65535,R[C+(v<<1)>>1]=(h+32768-a&65535)>>>K,R[C+(v+l<<1)>>1]=(a&65535)>>>K,R[C+(v+g<<1)>>1]=p,R[C+(v+b<<1)>>1]=f,v=v+1|0;while((v|0)!=(H|0))}}function A(p,v,C,a,l){p|=0;v|=0;C|=0;a|=0;l|=0;var K=0,H=0,g=0,b=0,d=0,f=0,h=0,e=0,k=0,m=0,d=p+4|0,K=
c[d>>2]|0;a:do switch(c[K+16>>2]|0){case 3:if(2==(c[K+24>>2]|0)){if(0>=(a|0))break a;K=p+40|0;p=0;do b=c[K>>2]|0,g=oa[v+(6*p|0)+2>>1]<<b,H=(oa[v+(6*p|0)>>1]<<b)+32768+g&65535,g&=65535,l=((oa[v+(6*p|0)+4>>1]<<b)+32768+((H+g|0)>>>1)&65535)>>>b&65535,R[C+(6*p|0)>>1]=H>>>b,R[C+(6*p|0)+2>>1]=g>>>b,R[C+(6*p|0)+4>>1]=l,p=p+1|0;while((p|0)!=(a|0))}else{H=(a|0)<(l|0)?a:l;if(0>=(H|0))break a;g=l<<1;K=p+40|0;p=0;do f=c[K>>2]|0,h=oa[v+(p+l<<1)>>1]<<f,e=(oa[v+(p<<1)>>1]<<f)+32768+h&65535,h&=65535,b=((oa[v+(p+
g<<1)>>1]<<f)+32768+((e+h|0)>>>1)&65535)>>>f&65535,R[C+(6*p|0)>>1]=e>>>f,R[C+(6*p|0)+2>>1]=h>>>f,R[C+(6*p|0)+4>>1]=b,p=p+1|0;while((p|0)!=(H|0))}break;case 4:if(1==(c[K+24>>2]|0)&&(b=(a|0)<(l|0)?a:l,0<(b|0))){g=l<<1;K=p+40|0;p=3*l|0;H=0;do f=c[K>>2]|0,e=oa[v+(H+l<<1)>>1]<<f,m=(oa[v+(H<<1)>>1]<<f)+32768+e&65535,e&=65535,h=((oa[v+(H+g<<1)>>1]<<f)+32768+((m+e|0)>>>1)&65535)>>>f,k=R[v+(H+p<<1)>>1]|0,e=yb(e>>>f&65535|0,0,16)|0,h|=Fa,k=yb(k&65535|0,0,48)|0,k|=m>>>f&65535|e,h=h&65535|Fa,f=e=C+(H<<3)|0,R[f>>
1]=k,R[f+2>>1]=k>>>16,e=e+4|0,R[e>>1]=h,R[e+2>>1]=h>>>16,H=H+1|0;while((H|0)!=(b|0))}}while(0);K=c[d>>2]|0;if(u[K+32>>0]|0&&(H=c[K+16>>2]|0,!(0>=(a|0))))for(K=C,p=0;m=K+4|0,k=R[K>>1]|0,R[K>>1]=R[m>>1]|0,R[m>>1]=k,p=p+1|0,(p|0)!=(a|0);)K=K+(H<<1)|0}function E(p,v,C,a,l){p|=0;v|=0;C|=0;a|=0;l|=0;var K=0,H=0,g=0,b=0,d=0,f=0,b=p+4|0,K=c[b>>2]|0;if(u[K+32>>0]|0)if(H=p+8|0,gb(c[H>>2]|0,v|0,6*a|0)|0,K=c[b>>2]|0,g=c[K+16>>2]|0,0>=(a|0))d=c[H>>2]|0;else{K=v=c[H>>2]|0;for(H=0;d=K+4|0,f=R[K>>1]|0,R[K>>1]=R[d>>
1]|0,R[d>>1]=f,H=H+1|0,(H|0)!=(a|0);)K=K+(g<<1)|0;d=v;K=c[b>>2]|0}else d=v;switch(c[K+16>>2]|0){case 3:if(2==(c[K+24>>2]|0)){if(0>=(a|0))break;K=p+32|0;v=0;do l=c[K>>2]|0,p=oa[d+(6*v|0)+2>>1]<<l,f=(32768-p+(oa[d+(6*v|0)+4>>1]<<l)&65535)>>>l&65535,R[C+(6*v|0)>>1]=((oa[d+(6*v|0)>>1]<<l)+32768-p&65535)>>>l,R[C+(6*v|0)+2>>1]=(p&65535)>>>l,R[C+(6*v|0)+4>>1]=f,v=v+1|0;while((v|0)!=(a|0))}else{H=(l|0)<(a|0)?l:a;if(0>=(H|0))break;g=l<<1;K=c[p+32>>2]|0;v=0;do p=oa[d+(6*v|0)+2>>1]<<K,f=(32768-p+(oa[d+(6*v|
0)+4>>1]<<K)&65535)>>>K&65535,R[C+(v<<1)>>1]=((oa[d+(6*v|0)>>1]<<K)+32768-p&65535)>>>K,R[C+(v+l<<1)>>1]=(p&65535)>>>K,R[C+(v+g<<1)>>1]=f,v=v+1|0;while((v|0)!=(H|0))}break;case 4:if(1!=(c[K+24>>2]|0))break;g=(l|0)<(a|0)?l:a;if(0>=(g|0))break;b=l<<1;H=3*l|0;K=c[p+32>>2]|0;v=0;do f=R[d+(v<<3)+6>>1]|0,a=oa[d+(v<<3)+2>>1]<<K,p=(32768-a+(oa[d+(v<<3)+4>>1]<<K)&65535)>>>K&65535,R[C+(v<<1)>>1]=((oa[d+(v<<3)>>1]<<K)+32768-a&65535)>>>K,R[C+(v+l<<1)>>1]=(a&65535)>>>K,R[C+(v+b<<1)>>1]=p,R[C+(v+H<<1)>>1]=f,v=v+
1|0;while((v|0)!=(g|0))}}function L(p,v,C,a,l){p|=0;v|=0;C|=0;a|=0;l|=0;var K=0,H=0,g=0,b=0,d=0,f=0,h=0,e=0,k=0,m=0,d=p+4|0,K=c[d>>2]|0;a:do switch(c[K+16>>2]|0){case 3:if(2==(c[K+24>>2]|0)){if(0>=(a|0))break a;K=p+40|0;p=0;do b=c[K>>2]|0,g=oa[v+(6*p|0)+2>>1]<<b,l=(g+32768+(oa[v+(6*p|0)+4>>1]<<b)&65535)>>>b&65535,R[C+(6*p|0)>>1]=((oa[v+(6*p|0)>>1]<<b)+32768+g&65535)>>>b,R[C+(6*p|0)+2>>1]=(g&65535)>>>b,R[C+(6*p|0)+4>>1]=l,p=p+1|0;while((p|0)!=(a|0))}else{H=(a|0)<(l|0)?a:l;if(0>=(H|0))break a;g=l<<
1;K=p+40|0;p=0;do f=c[K>>2]|0,h=oa[v+(p+l<<1)>>1]<<f,b=(h+32768+(oa[v+(p+g<<1)>>1]<<f)&65535)>>>f&65535,R[C+(6*p|0)>>1]=((oa[v+(p<<1)>>1]<<f)+32768+h&65535)>>>f,R[C+(6*p|0)+2>>1]=(h&65535)>>>f,R[C+(6*p|0)+4>>1]=b,p=p+1|0;while((p|0)!=(H|0))}break;case 4:if(1==(c[K+24>>2]|0)&&(b=(a|0)<(l|0)?a:l,0<(b|0))){g=l<<1;K=p+40|0;p=3*l|0;H=0;do e=c[K>>2]|0,m=oa[v+(H+l<<1)>>1]<<e,h=((oa[v+(H<<1)>>1]<<e)+32768+m&65535)>>>e,f=(m+32768+(oa[v+(H+g<<1)>>1]<<e)&65535)>>>e,k=R[v+(H+p<<1)>>1]|0,e=yb((m&65535)>>>e&65535|
0,0,16)|0,f|=Fa,k=yb(k&65535|0,0,48)|0,k|=e|h&65535,f=f&65535|Fa,e=h=C+(H<<3)|0,R[e>>1]=k,R[e+2>>1]=k>>>16,h=h+4|0,R[h>>1]=f,R[h+2>>1]=f>>>16,H=H+1|0;while((H|0)!=(b|0))}}while(0);K=c[d>>2]|0;if(u[K+32>>0]|0&&(H=c[K+16>>2]|0,!(0>=(a|0))))for(K=C,p=0;m=K+4|0,k=R[K>>1]|0,R[K>>1]=R[m>>1]|0,R[m>>1]=k,p=p+1|0,(p|0)!=(a|0);)K=K+(H<<1)|0}function y(p,v,C,a,l,K){p|=0;v|=0;C|=0;a|=0;K|=0;var H=0,b=0,d=0,f=0,ub=0,h=0,e=0,h=F;F=F+16|0;f=h;ub=c[p>>2]|0;if(!ub)return F=h,0;e=v;b=a-e|0;d=(l|0)+12|0;H=c[d>>2]|0;
b=(H|0)>(b|0)?H-b|0:0;H=C;l=H-e|0;if(0<(l|0)&&(cb[c[(c[ub>>2]|0)+48>>2]&63](ub,v,l)|0)!=(l|0))return c[p>>2]=0,F=h,0;if(0<(b|0))if(Kd(f,b,K),g=0,l=La(c[(c[ub>>2]|0)+48>>2]|0,ub|0,(0==(u[f>>0]&1)?f+1|0:c[f+8>>2]|0)|0,b|0)|0,e=g,g=0,e&1&&(e=J()|0,W(f),V(e|0)),(l|0)==(b|0))W(f);else return c[p>>2]=0,W(f),F=h,0;a=a-H|0;if(0<(a|0)&&(cb[c[(c[ub>>2]|0)+48>>2]&63](ub,C,a)|0)!=(a|0))return c[p>>2]=0,F=h,0;c[d>>2]=0;F=h;return ub|0}function M(p,v,C,a,l){p|=0;v|=0;C|=0;a|=0;l|=0;var K=0,H=0,g=0,b=0,d=0,f=0,
g=p+4|0,K=c[g>>2]|0;if(u[K+32>>0]|0)if(p=p+8|0,gb(c[p>>2]|0,v|0,6*a|0)|0,K=c[g>>2]|0,H=c[K+16>>2]|0,0>=(a|0))b=c[p>>2]|0;else{K=p=c[p>>2]|0;for(v=0;b=K+4|0,d=R[K>>1]|0,R[K>>1]=R[b>>1]|0,R[b>>1]=d,v=v+1|0,(v|0)!=(a|0);)K=K+(H<<1)|0;b=p;K=c[g>>2]|0}else b=v;switch(c[K+16>>2]|0){case 3:if(2==(c[K+24>>2]|0)){if(0<(a|0))K=0;else break;do g=oa[b+(6*K|0)+2>>1]|0,l=32768-g+(oa[b+(6*K|0)+4>>1]|0)|0,d=(oa[b+(6*K|0)>>1]|0)-g+32768|0,R[C+(6*K|0)>>1]=g+49152+(((l&65535)+(d&65535)|0)>>>2),R[C+(6*K|0)+2>>1]=l,R[C+
(6*K|0)+4>>1]=d,K=K+1|0;while((K|0)!=(a|0));break}K=(l|0)<(a|0)?l:a;if(0>=(K|0))break;p=l<<1;v=0;do g=oa[b+(6*v|0)+2>>1]|0,a=32768-g+(oa[b+(6*v|0)+4>>1]|0)|0,d=(oa[b+(6*v|0)>>1]|0)-g+32768|0,R[C+(v<<1)>>1]=g+49152+(((a&65535)+(d&65535)|0)>>>2),R[C+(v+l<<1)>>1]=a,R[C+(v+p<<1)>>1]=d,v=v+1|0;while((v|0)!=(K|0));break;case 4:if(1!=(c[K+24>>2]|0))break;K=(l|0)<(a|0)?l:a;if(0>=(K|0))break;p=l<<1;v=3*l|0;H=0;do d=R[b+(H<<3)+6>>1]|0,f=oa[b+(H<<3)+2>>1]|0,g=32768-f+(oa[b+(H<<3)+4>>1]|0)|0,a=(oa[b+(H<<3)>>
1]|0)-f+32768|0,R[C+(H<<1)>>1]=f+49152+(((g&65535)+(a&65535)|0)>>>2),R[C+(H+l<<1)>>1]=g,R[C+(H+p<<1)>>1]=a,R[C+(H+v<<1)>>1]=d,H=H+1|0;while((H|0)!=(K|0))}}function O(p,v,C,a,l){v|=0;C|=0;a|=0;l|=0;var K=0,H=0,g=0,b=0,d=0,f=0,h=0,e=0,k=0,b=(p|0)+4|0;p=c[b>>2]|0;a:do switch(c[p+16>>2]|0){case 3:if(2==(c[p+24>>2]|0)){if(0<(a|0))p=0;else break a;for(;;)if(g=oa[v+(6*p|0)+2>>1]|0,H=oa[v+(6*p|0)+4>>1]|0,l=(oa[v+(6*p|0)>>1]|0)-((H+g|0)>>>2)+16384|0,R[C+(6*p|0)>>1]=H+32768+l,R[C+(6*p|0)+2>>1]=l,R[C+(6*p|0)+
4>>1]=g+32768+l,p=p+1|0,(p|0)==(a|0))break a}p=(a|0)<(l|0)?a:l;if(0<(p|0)){K=l<<1;H=0;do d=oa[v+(H+l<<1)>>1]|0,f=oa[v+(H+K<<1)>>1]|0,g=(oa[v+(H<<1)>>1]|0)-((f+d|0)>>>2)+16384|0,R[C+(6*H|0)>>1]=f+32768+g,R[C+(6*H|0)+2>>1]=g,R[C+(6*H|0)+4>>1]=d+32768+g,H=H+1|0;while((H|0)!=(p|0))}break;case 4:if(1==(c[p+24>>2]|0)&&(g=(a|0)<(l|0)?a:l,0<(g|0))){p=l<<1;K=3*l|0;H=0;do d=oa[v+(H+l<<1)>>1]|0,h=oa[v+(H+p<<1)>>1]|0,f=(oa[v+(H<<1)>>1]|0)-((h+d|0)>>>2)+16384|0,e=R[v+(H+K<<1)>>1]|0,k=yb(f&65535|0,0,16)|0,d=d+
32768+f|Fa,e=yb(e&65535|0,0,48)|0,e|=k|h+32768+f&65535,d=d&65535|Fa,h=f=C+(H<<3)|0,R[h>>1]=e,R[h+2>>1]=e>>>16,f=f+4|0,R[f>>1]=d,R[f+2>>1]=d>>>16,H=H+1|0;while((H|0)!=(g|0))}}while(0);p=c[b>>2]|0;if(u[p+32>>0]|0&&(H=c[p+16>>2]|0,!(0>=(a|0))))for(p=C,K=0;k=p+4|0,e=R[p>>1]|0,R[p>>1]=R[k>>1]|0,R[k>>1]=e,K=K+1|0,(K|0)!=(a|0);)p=p+(H<<1)|0}function B(p,v,C,a,l){p|=0;v|=0;C|=0;a|=0;l|=0;var K=0,H=0,g=0,b=0,d=0,f=0,h=0,g=p+4|0,K=c[g>>2]|0;if(u[K+32>>0]|0)if(p=p+8|0,gb(c[p>>2]|0,v|0,6*a|0)|0,K=c[g>>2]|0,H=
c[K+16>>2]|0,0>=(a|0))b=c[p>>2]|0;else{K=p=c[p>>2]|0;for(v=0;b=K+4|0,d=R[K>>1]|0,R[K>>1]=R[b>>1]|0,R[b>>1]=d,v=v+1|0,(v|0)!=(a|0);)K=K+(H<<1)|0;b=p;K=c[g>>2]|0}else b=v;switch(c[K+16>>2]|0){case 3:if(2==(c[K+24>>2]|0)){if(0<(a|0))K=0;else break;do H=oa[b+(6*K|0)>>1]|0,l=R[b+(6*K|0)+2>>1]|0,g=l&65535,d=(oa[b+(6*K|0)+4>>1]|0)+32768-((g+H|0)>>>1)&65535,R[C+(6*K|0)>>1]=H+32768-g,R[C+(6*K|0)+2>>1]=l,R[C+(6*K|0)+4>>1]=d,K=K+1|0;while((K|0)!=(a|0));break}K=(l|0)<(a|0)?l:a;if(0>=(K|0))break;p=l<<1;v=0;do a=
R[b+(6*v|0)+2>>1]|0,H=oa[b+(6*v|0)>>1]|0,g=a&65535,d=(oa[b+(6*v|0)+4>>1]|0)+32768-((g+H|0)>>>1)&65535,R[C+(v<<1)>>1]=H+32768-g,R[C+(v+l<<1)>>1]=a,R[C+(v+p<<1)>>1]=d,v=v+1|0;while((v|0)!=(K|0));break;case 4:if(1!=(c[K+24>>2]|0))break;K=(l|0)<(a|0)?l:a;if(0>=(K|0))break;p=l<<1;v=3*l|0;H=0;do g=R[b+(H<<3)+2>>1]|0,d=R[b+(H<<3)+6>>1]|0,h=oa[b+(H<<3)>>1]|0,f=g&65535,a=(oa[b+(H<<3)+4>>1]|0)+32768-((f+h|0)>>>1)&65535,R[C+(H<<1)>>1]=h+32768-f,R[C+(H+l<<1)>>1]=g,R[C+(H+p<<1)>>1]=a,R[C+(H+v<<1)>>1]=d,H=H+1|
0;while((H|0)!=(K|0))}}function D(p,v,C,a,l){v|=0;C|=0;a|=0;l|=0;var K=0,H=0,g=0,b=0,d=0,f=0,h=0,e=0,b=(p|0)+4|0;p=c[b>>2]|0;a:do switch(c[p+16>>2]|0){case 3:if(2==(c[p+24>>2]|0)){if(0<(a|0))p=0;else break a;for(;;)if(g=R[v+(6*p|0)+2>>1]|0,l=g&65535,H=(oa[v+(6*p|0)>>1]|0)+32768+l|0,l=(oa[v+(6*p|0)+4>>1]|0)+32768+(((H&65535)+l|0)>>>1)&65535,R[C+(6*p|0)>>1]=H,R[C+(6*p|0)+2>>1]=g,R[C+(6*p|0)+4>>1]=l,p=p+1|0,(p|0)==(a|0))break a}p=(a|0)<(l|0)?a:l;if(0<(p|0)){K=l<<1;H=0;do d=R[v+(H+l<<1)>>1]|0,g=d&65535,
f=(oa[v+(H<<1)>>1]|0)+32768+g|0,g=(oa[v+(H+K<<1)>>1]|0)+32768+(((f&65535)+g|0)>>>1)&65535,R[C+(6*H|0)>>1]=f,R[C+(6*H|0)+2>>1]=d,R[C+(6*H|0)+4>>1]=g,H=H+1|0;while((H|0)!=(p|0))}break;case 4:if(1==(c[p+24>>2]|0)&&(g=(a|0)<(l|0)?a:l,0<(g|0))){p=l<<1;K=3*l|0;H=0;do f=R[v+(H+l<<1)>>1]|0,d=f&65535,h=(oa[v+(H<<1)>>1]|0)+32768+d&65535,d=(oa[v+(H+p<<1)>>1]|0)+32768+((h+d|0)>>>1)|0,e=R[v+(H+K<<1)>>1]|0,f=yb(f&65535|0,0,16)|0,d|=Fa,e=yb(e&65535|0,0,48)|0,e|=h|f,d=d&65535|Fa,h=f=C+(H<<3)|0,R[h>>1]=e,R[h+2>>1]=
e>>>16,f=f+4|0,R[f>>1]=d,R[f+2>>1]=d>>>16,H=H+1|0;while((H|0)!=(g|0))}}while(0);p=c[b>>2]|0;if(u[p+32>>0]|0&&(H=c[p+16>>2]|0,!(0>=(a|0))))for(p=C,K=0;e=p+4|0,h=R[p>>1]|0,R[p>>1]=R[e>>1]|0,R[e>>1]=h,K=K+1|0,(K|0)!=(a|0);)p=p+(H<<1)|0}function G(p,v,C,a,l){p|=0;v|=0;C|=0;a|=0;l|=0;var K=0,H=0,g=0,b=0,d=0,f=0,g=p+4|0,K=c[g>>2]|0;if(u[K+32>>0]|0)if(p=p+8|0,gb(c[p>>2]|0,v|0,6*a|0)|0,K=c[g>>2]|0,H=c[K+16>>2]|0,0>=(a|0))b=c[p>>2]|0;else{K=p=c[p>>2]|0;for(v=0;b=K+4|0,d=R[K>>1]|0,R[K>>1]=R[b>>1]|0,R[b>>1]=
d,v=v+1|0,(v|0)!=(a|0);)K=K+(H<<1)|0;b=p;K=c[g>>2]|0}else b=v;switch(c[K+16>>2]|0){case 3:if(2==(c[K+24>>2]|0)){if(0<(a|0))K=0;else break;do l=R[b+(6*K|0)+2>>1]|0,g=l&65535,d=32768-g+(oa[b+(6*K|0)+4>>1]|0)&65535,R[C+(6*K|0)>>1]=(oa[b+(6*K|0)>>1]|0)+32768-g,R[C+(6*K|0)+2>>1]=l,R[C+(6*K|0)+4>>1]=d,K=K+1|0;while((K|0)!=(a|0));break}K=(l|0)<(a|0)?l:a;if(0>=(K|0))break;p=l<<1;v=0;do a=R[b+(6*v|0)+2>>1]|0,g=a&65535,d=32768-g+(oa[b+(6*v|0)+4>>1]|0)&65535,R[C+(v<<1)>>1]=(oa[b+(6*v|0)>>1]|0)+32768-g,R[C+(v+
l<<1)>>1]=a,R[C+(v+p<<1)>>1]=d,v=v+1|0;while((v|0)!=(K|0));break;case 4:if(1!=(c[K+24>>2]|0))break;K=(l|0)<(a|0)?l:a;if(0>=(K|0))break;p=l<<1;v=3*l|0;H=0;do g=R[b+(H<<3)+2>>1]|0,d=R[b+(H<<3)+6>>1]|0,f=g&65535,a=32768-f+(oa[b+(H<<3)+4>>1]|0)&65535,R[C+(H<<1)>>1]=(oa[b+(H<<3)>>1]|0)+32768-f,R[C+(H+l<<1)>>1]=g,R[C+(H+p<<1)>>1]=a,R[C+(H+v<<1)>>1]=d,H=H+1|0;while((H|0)!=(K|0))}}function w(p,v,C,a,l){v|=0;C|=0;a|=0;l|=0;var K=0,H=0,g=0,b=0,d=0,f=0,h=0,e=0,b=(p|0)+4|0;p=c[b>>2]|0;a:do switch(c[p+16>>2]|
0){case 3:if(2==(c[p+24>>2]|0)){if(0<(a|0))p=0;else break a;for(;;)if(g=R[v+(6*p|0)+2>>1]|0,H=g&65535,l=H+32768+(oa[v+(6*p|0)+4>>1]|0)&65535,R[C+(6*p|0)>>1]=(oa[v+(6*p|0)>>1]|0)+32768+H,R[C+(6*p|0)+2>>1]=g,R[C+(6*p|0)+4>>1]=l,p=p+1|0,(p|0)==(a|0))break a}p=(a|0)<(l|0)?a:l;if(0<(p|0)){K=l<<1;H=0;do d=R[v+(H+l<<1)>>1]|0,f=d&65535,g=f+32768+(oa[v+(H+K<<1)>>1]|0)&65535,R[C+(6*H|0)>>1]=(oa[v+(H<<1)>>1]|0)+32768+f,R[C+(6*H|0)+2>>1]=d,R[C+(6*H|0)+4>>1]=g,H=H+1|0;while((H|0)!=(p|0))}break;case 4:if(1==(c[p+
24>>2]|0)&&(g=(a|0)<(l|0)?a:l,0<(g|0))){p=l<<1;K=3*l|0;H=0;do f=R[v+(H+l<<1)>>1]|0,d=f&65535,h=(oa[v+(H<<1)>>1]|0)+32768+d|0,d=d+32768+(oa[v+(H+p<<1)>>1]|0)|0,e=R[v+(H+K<<1)>>1]|0,f=yb(f&65535|0,0,16)|0,d|=Fa,e=yb(e&65535|0,0,48)|0,e|=h&65535|f,d=d&65535|Fa,h=f=C+(H<<3)|0,R[h>>1]=e,R[h+2>>1]=e>>>16,f=f+4|0,R[f>>1]=d,R[f+2>>1]=d>>>16,H=H+1|0;while((H|0)!=(g|0))}}while(0);p=c[b>>2]|0;if(u[p+32>>0]|0&&(H=c[p+16>>2]|0,!(0>=(a|0))))for(p=C,K=0;e=p+4|0,h=R[p>>1]|0,R[p>>1]=R[e>>1]|0,R[e>>1]=h,K=K+1|0,(K|
0)!=(a|0);)p=p+(H<<1)|0}function Y(p,v,C,a,l){p|=0;v|=0;C|=0;a|=0;l|=0;var K=0,H=0,g=0,b=0,d=0,g=p+4|0,K=c[g>>2]|0;if(u[K+32>>0]|0)if(p=p+8|0,gb(c[p>>2]|0,v|0,6*a|0)|0,K=c[g>>2]|0,H=c[K+16>>2]|0,0>=(a|0))b=c[p>>2]|0;else{K=p=c[p>>2]|0;for(v=0;b=K+4|0,d=R[K>>1]|0,R[K>>1]=R[b>>1]|0,R[b>>1]=d,v=v+1|0,(v|0)!=(a|0);)K=K+(H<<1)|0;b=p;K=c[g>>2]|0}else b=v;switch(c[K+16>>2]|0){case 3:if(2==(c[K+24>>2]|0)){if(0<(a|0))K=0;else break;do l=R[b+(6*K|0)+2>>1]|0,d=R[b+(6*K|0)+4>>1]|0,R[C+(6*K|0)>>1]=R[b+(6*K|0)>>
1]|0,R[C+(6*K|0)+2>>1]=l,R[C+(6*K|0)+4>>1]=d,K=K+1|0;while((K|0)!=(a|0));break}K=(l|0)<(a|0)?l:a;if(0>=(K|0))break;p=l<<1;v=0;do a=R[b+(6*v|0)+2>>1]|0,d=R[b+(6*v|0)+4>>1]|0,R[C+(v<<1)>>1]=R[b+(6*v|0)>>1]|0,R[C+(v+l<<1)>>1]=a,R[C+(v+p<<1)>>1]=d,v=v+1|0;while((v|0)!=(K|0));break;case 4:if(1!=(c[K+24>>2]|0))break;K=(l|0)<(a|0)?l:a;if(0>=(K|0))break;p=l<<1;v=3*l|0;H=0;do g=R[b+(H<<3)+2>>1]|0,a=R[b+(H<<3)+4>>1]|0,d=R[b+(H<<3)+6>>1]|0,R[C+(H<<1)>>1]=R[b+(H<<3)>>1]|0,R[C+(H+l<<1)>>1]=g,R[C+(H+p<<1)>>1]=
a,R[C+(H+v<<1)>>1]=d,H=H+1|0;while((H|0)!=(K|0))}}function P(p,v,C,a,l){v|=0;C|=0;a|=0;l|=0;var K=0,H=0,g=0,b=0,d=0,f=0,h=0,e=0,b=(p|0)+4|0;p=c[b>>2]|0;a:do switch(c[p+16>>2]|0){case 3:if(2==(c[p+24>>2]|0)){if(0<(a|0))p=0;else break a;for(;;)if(g=R[v+(6*p|0)+2>>1]|0,l=R[v+(6*p|0)+4>>1]|0,R[C+(6*p|0)>>1]=R[v+(6*p|0)>>1]|0,R[C+(6*p|0)+2>>1]=g,R[C+(6*p|0)+4>>1]=l,p=p+1|0,(p|0)==(a|0))break a}p=(a|0)<(l|0)?a:l;if(0<(p|0)){K=l<<1;H=0;do d=R[v+(H+l<<1)>>1]|0,g=R[v+(H+K<<1)>>1]|0,R[C+(6*H|0)>>1]=R[v+(H<<
1)>>1]|0,R[C+(6*H|0)+2>>1]=d,R[C+(6*H|0)+4>>1]=g,H=H+1|0;while((H|0)!=(p|0))}break;case 4:if(1==(c[p+24>>2]|0)&&(g=(a|0)<(l|0)?a:l,0<(g|0))){p=l<<1;K=3*l|0;H=0;do d=R[v+(H<<1)>>1]|0,e=R[v+(H+K<<1)>>1]|0,f=oa[v+(H+p<<1)>>1]|0,h=yb(oa[v+(H+l<<1)>>1]|0,0,16)|0,f|=Fa,e=yb(e&65535|0,0,48)|0,e|=h|d&65535,f=f&65535|Fa,h=d=C+(H<<3)|0,R[h>>1]=e,R[h+2>>1]=e>>>16,d=d+4|0,R[d>>1]=f,R[d+2>>1]=f>>>16,H=H+1|0;while((H|0)!=(g|0))}}while(0);p=c[b>>2]|0;if(u[p+32>>0]|0&&(H=c[p+16>>2]|0,!(0>=(a|0))))for(p=C,K=0;e=p+
4|0,h=R[p>>1]|0,R[p>>1]=R[e>>1]|0,R[e>>1]=h,K=K+1|0,(K|0)!=(a|0);)p=p+(H<<1)|0}function la(p,v){p|=0;v|=0;var C=0,a=0,l=0,K=0,H=0,g=0,b=0,d=0,f=0;c[p+112>>2]=0;c[p+108>>2]=0;l=d=c[v>>2]|0;do if(d)if(H=p+92|0,d=p+96|0,g=c[d>>2]|0,C=b=c[H>>2]|0,a=g-C|0,4E4<=a>>>0?(4E4<a>>>0&&(K=b+4E4|0,(g|0)!=(K|0))&&(c[d>>2]=K),K=C):(ja(H,4E4-a|0),K=c[H>>2]|0,l=c[v>>2]|0),C=p+116|0,c[C>>2]=K,g=p+124|0,c[g>>2]=K,b=p+104|0,a=c[b>>2]=l){if((c[a+12>>2]|0)==(c[a+16>>2]|0)){v=-1==(Ja[c[(c[l>>2]|0)+36>>2]&127](a)|0);a=c[g>>
2]|0;if(v)break;l=c[C>>2]|0}else l=a=K;H=a-l|0;if(64>=H>>>0){K=p+92|0;if((a|0)==(l|0))a=l;else{a=l;l=0;do u[(c[K>>2]|0)+l>>0]=u[a+l>>0]|0,l=l+1|0,a=c[C>>2]|0;while(l>>>0<H>>>0);l=c[g>>2]|0}v=K=c[K>>2]|0;f=v-a|0;c[C>>2]=K;a=l+f|0;c[g>>2]=a;K=p+120|0;c[K>>2]=(c[K>>2]|0)+f;b=c[b>>2]|0;a=cb[c[(c[b>>2]|0)+32>>2]&63](b,a,(c[d>>2]|0)-(v+H)|0)|0;a=(c[g>>2]|0)+a|0;c[g>>2]=a}}else a=K;else c[p+104>>2]=0,a=c[v+4>>2]|0,C=p+116|0,c[C>>2]=a,a=a+(c[v+8>>2]|0)|0,c[p+124>>2]=a;while(0);C=c[C>>2]|0;if(C>>>0>=a>>>0)c[(p+
120|0)>>2]=C,aa(p);else{for(;;){if(-1==(u[C>>0]|0)){a=20;break}C=C+1|0;if(C>>>0>=a>>>0){a=20;break}}20==(a|0)&&(c[(p+120|0)>>2]=C,aa(p))}}function ja(p,v){p|=0;v|=0;var C=0,a=0,l=0,K=0,H=0,g=0,b=0,d=0,b=p+8|0,l=c[b>>2]|0,d=p+4|0,a=C=c[d>>2]|0;if((l-a|0)>>>0>=v>>>0){do u[C>>0]=0,C=(c[d>>2]|0)+1|0,c[d>>2]=C,v=v+-1|0;while(0!=(v|0))}else{C=c[p>>2]|0;K=a-C+v|0;0>(K|0)&&(Md(p),l=c[b>>2]|0,C=c[p>>2]|0);a=l-C|0;1073741823>a>>>0?(a<<=1,a=a>>>0<K>>>0?K:a,C=(c[d>>2]|0)-C|0,a?g=8:(H=l=0,K=C)):(a=2147483647,
C=(c[d>>2]|0)-C|0,g=8);8==(g|0)&&(l=a,H=qa(a)|0,K=C);C=H+K|0;l=H+l|0;a=C;do u[a>>0]=0,C=a=C+1|0,v=v+-1|0;while(0!=(v|0));v=c[p>>2]|0;a=(c[d>>2]|0)-v|0;g=H+(K-a)|0;gb(g|0,v|0,a|0)|0;c[p>>2]=g;c[d>>2]=C;c[b>>2]=l;v&&Q(v)}}function N(p){p|=0;var v=0,C=0,a=0,l=0,K=0,H=0,b=0,d=0,f=0,ub=0,h=0,e=0,k=0,u=0,m=0,n=0,q=0,r=0,I=0,x=0,q=F;F=F+32|0;I=q+12|0;n=q;k=p+180|0;u=(c[k>>2]|0)+4|0;m=1==(c[p+32>>2]|0)?c[p+24>>2]|0:1;v=ia(m<<1,u)|0;c[I>>2]=0;x=I+4|0;c[x>>2]=0;c[I+8>>2]=0;v&&(0>(v|0)&&(g=0,ta(178,I|0),r=g,
g=0,r&1)||(H=6),6!=(H|0)||(C=v<<1,g=0,a=ca(67,C|0)|0,r=g,g=0,r&1)?(a=J()|0,(v=c[I>>2]|0)||V(a|0),C=c[x>>2]|0,(C|0)!=(v|0)&&(c[x>>2]=C+(~((C+-2-v|0)>>>1)<<1)),Q(v),V(a|0)):(c[I>>2]=a,r=a+(v<<1)|0,c[I+8>>2]=r,Za(a|0,0,C|0)|0,c[x>>2]=r));c[n>>2]=0;r=n+4|0;c[r>>2]=0;c[n+8>>2]=0;if(m)if(1073741823<m>>>0&&(g=0,ta(178,n|0),e=g,g=0,e&1)||(H=16),16!=(H|0)||(l=m<<2,g=0,K=ca(67,l|0)|0,e=g,g=0,e&1)){if(a=J()|0,C=v=c[n>>2]|0)l=c[r>>2]|0,(l|0)!=(v|0)&&(c[r>>2]=l+(~((l+-4-C|0)>>>2)<<2)),Q(v)}else c[n>>2]=K,H=K+
(m<<2)|0,c[n+8>>2]=H,Za(K|0,0,l|0)|0,c[r>>2]=H,H=18;else H=18;if(18==(H|0)){K=p+12|0;a:do if(0<(c[K>>2]|0)){H=p+4604|0;b=(ia(m,u)|0)+1|0;d=p+4608|0;f=p+92|0;ub=0<(m|0);h=p+4600|0;e=0;b:for(;;){C=c[I>>2]|0;v=C+2|0;c[H>>2]=v;C=C+(b<<1)|0;c[d>>2]=C;e&1?(c[H>>2]=C,c[d>>2]=v):v=C;l=c[f>>2]|0;g=0;pa(c[(c[l>>2]|0)+12>>2]|0,l|0,v|0,c[k>>2]|0,u|0);l=g;g=0;if(l&1){H=28;break}if(ub){v=c[H>>2]|0;C=c[d>>2]|0;a=c[n>>2]|0;l=0;do{c[h>>2]=c[a+(l<<2)>>2];a=c[k>>2]|0;R[v+(a<<1)>>1]=R[v+(a+-1<<1)>>1]|0;R[C+-2>>1]=R[v>>
1]|0;g=0;ga(68,p|0,0);a=g;g=0;if(a&1){H=27;break b}a=c[n>>2]|0;c[a+(l<<2)>>2]=c[h>>2];v=(c[H>>2]|0)+(u<<1)|0;c[H>>2]=v;C=(c[d>>2]|0)+(u<<1)|0;c[d>>2]=C;l=l+1|0}while((l|0)<(m|0))}e=e+1|0;if((e|0)>=(c[K>>2]|0)){H=40;break a}}27==(H|0)?a=J()|0:28==(H|0)&&(a=J()|0)}else H=40;while(0);if(40==(H|0))if(g=0,ta(182,p|0),p=g,g=0,p&1)a=J()|0;else{if(C=v=c[n>>2]|0)a=c[r>>2]|0,(a|0)!=(v|0)&&(c[r>>2]=a+(~((a+-4-C|0)>>>2)<<2)),Q(v);v=c[I>>2]|0;if(!v){F=q;return}C=c[x>>2]|0;(C|0)!=(v|0)&&(c[x>>2]=C+(~((C+-2-v|0)>>>
1)<<1));Q(v);F=q;return}if(C=v=c[n>>2]|0)l=c[r>>2]|0,(l|0)!=(v|0)&&(c[r>>2]=l+(~((l+-4-C|0)>>>2)<<2)),Q(v)}(v=c[I>>2]|0)||V(a|0);C=c[x>>2]|0;(C|0)!=(v|0)&&(c[x>>2]=C+(~((C+-2-v|0)>>>1)<<1));Q(v);V(a|0)}function ka(p){p|=0;var v=0,C=0,a=0,l=0,K=0,v=c[p+132>>2]|0;v||(v=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,v|0,4,35648),p=g,g=0,p&1||Pa(v|0,824,96),p=J()|0,za(v|0),V(p|0));C=p+108|0;a=p+120|0;K=c[a>>2]|0;l=(c[C>>2]|0)-K|0;(cb[c[(c[v>>2]|0)+48>>2]&63](v,K,l)|0)==(l|0)?
(K=c[a>>2]|0,c[C>>2]=K,c[p+104>>2]=(c[p+124>>2]|0)-K):(v=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,v|0,4,35648),K=g,g=0,K&1||Pa(v|0,824,96),K=J()|0,za(v|0),V(K|0))}function U(p,v,C){p|=0;v|=0;var a=0,l=0,K=0,H=0,g=0,b=0,d=0,f=0,h=0,d=p+100|0;C=(c[d>>2]|0)-(C|0)|0;c[d>>2]=C;if(-1<(C|0))f=p+96|0;else{f=p+96|0;c[f>>2]|=v>>0-C;b=p+104|0;4>(c[b>>2]|0)>>>0&&(ka(p),C=c[d>>2]|0);K=p+112|0;H=p+108|0;g=p+116|0;for(a=0;!(31<(C|0));)if(C=c[f>>2]|0,u[K>>0]|0?(u[c[H>>2]>>0]=C>>>25,
c[f>>2]<<=7,C=(c[d>>2]|0)+7|0):(u[c[H>>2]>>0]=C>>>24,c[f>>2]<<=8,C=(c[d>>2]|0)+8|0),c[d>>2]=C,h=c[H>>2]|0,u[K>>0]=-1==(u[h>>0]|0)&1,c[H>>2]=h+1,c[b>>2]=(c[b>>2]|0)+-1,c[g>>2]=(c[g>>2]|0)+1,a=a+1|0,4<=(a|0)){l=11;break}a:do if(11==(l|0)&&0>(C|0)){c[f>>2]|=v>>0-C;4>(c[b>>2]|0)>>>0&&(ka(p),C=c[d>>2]|0);a=0;do{if(31<(C|0))break a;C=c[f>>2]|0;u[K>>0]|0?(u[c[H>>2]>>0]=C>>>25,c[f>>2]<<=7,C=(c[d>>2]|0)+7|0):(u[c[H>>2]>>0]=C>>>24,c[f>>2]<<=8,C=(c[d>>2]|0)+8|0);c[d>>2]=C;h=c[H>>2]|0;u[K>>0]=-1==(u[h>>0]|0)&
1;c[H>>2]=h+1;c[b>>2]=(c[b>>2]|0)+-1;c[g>>2]=(c[g>>2]|0)+1;a=a+1|0}while(4>(a|0))}while(0)}c[f>>2]|=v<<C}function da(p,v,C){p|=0;v|=0;var a=0,l=0,K=0,H=0,g=0,b=0,d=0,f=0,b=(c[p+180>>2]|0)-v|0,d=c[p+4608>>2]|0,f=c[p+4604>>2]|0,l=R[d+(v+-1<<1)>>1]|0,g=l&65535;C=c[p+144>>2]|0;for(K=0;;){a=d+(K+v<<1)|0;H=(oa[a>>1]|0)-g|0;if(((-1<(H|0)?H:0-H|0)|0)>(C|0))break;R[a>>1]=l;K=K+1|0;if((K|0)==(b|0)){K=b;break}}l=(K|0)==(b|0);H=p+4600|0;a=c[36476+(c[H>>2]<<2)>>2]|0;if((1<<a|0)>(K|0))C=K;else{C=K;do U(p,1,1),
a=c[H>>2]|0,C=C-(1<<c[36476+(a<<2)>>2])|0,a=30<(a|0)?31:a+1|0,c[H>>2]=a,a=c[36476+(a<<2)>>2]|0;while((C|0)>=(1<<a|0))}if(!l){U(p,C,a+1|0);b=K+v|0;v=d+(b<<1)|0;C=oa[v>>1]|0;b=oa[f+(b<<1)>>1]|0;p|=0;C|=0;var g=g|0,b=b|0,h=d=l=a=f=0,d=g-b|0,h=p+136|0,l=p+144|0,f=c[l>>2]|0;((-1<(d|0)?d:0-d|0)|0)>(f|0)?(a=b-g>>31|1,C=ia(a,C-b|0)|0,C=0<(C|0)?(f+C|0)/(f<<1|1)|0:(C-f|0)/(f<<1|1)|0,d=p+140|0,f=c[d>>2]|0,g=(0>(C|0)?f:0)+C|0,f=g-((g|0)<((f+1|0)/2|0)?0:f)|0,va(p,p+4576|0,f),f=ia(f,a)|0,a=c[l>>2]|0,l=a<<1|1,f=
(ia(f,l)|0)+b|0):(C=C-g|0,C=0<(C|0)?(f+C|0)/(f<<1|1)|0:(C-f|0)/(f<<1|1)|0,d=p+140|0,f=c[d>>2]|0,a=(0>(C|0)?f:0)+C|0,f=a-((a|0)<((f+1|0)/2|0)?0:f)|0,va(p,p+4588|0,f),a=c[l>>2]|0,l=a<<1|1,f=(ia(l,f)|0)+g|0);(f|0)>=(0-a|0)?(C=c[h>>2]|0,(C+a|0)<(f|0)&&(f=f-(ia(c[d>>2]|0,l)|0)|0)):(f=(ia(c[d>>2]|0,l)|0)+f|0,C=c[h>>2]|0);h=((f&C|0)==(f|0)?f:C&~(f>>31))&65535;C=h|0;R[v>>1]=C|0;p=c[H>>2]|0;c[H>>2]=1>(p|0)?0:p+-1|0;return K+1|0}if(!C)return b|0;U(p,1,1);return b|0}function va(p,v,C){p|=0;v|=0;C|=0;var a=0,
l=0,K=0,H=0,g=0,b=0,d=0,f=0,f=v+9|0,H=ea[f>>0]|0,d=v+4|0,b=c[d>>2]|0,l=(ia(H>>>1,b)|0)+(c[v>>2]|0)|0;if((H|0)<(l|0)){K=H;a=0;do K<<=1,a=a+1|0;while((K|0)<(l|0));l=a}else l=0;0<(C|0)&0==(l|0)&&ea[v+10>>0]<<1>>>0<H>>>0?a=1:g=5;5==(g|0)&&(a=(a=0>(C|0))&&ea[v+10>>0]<<1>>>0>=H>>>0?1:a&0!=(l|0));a=((-1<(C|0)?C:0-C|0)<<1)-b+(a<<31>>31)|0;Z(p,l,a,(c[p+156>>2]|0)+-1-(c[36476+(c[p+4600>>2]<<2)>>2]|0)|0);0>(C|0)&&(p=v+10|0,u[p>>0]=(ea[p>>0]|0)+1);a=(a+1-(c[d>>2]|0)>>1)+(c[v>>2]|0)|0;c[v>>2]=a;l=u[f>>0]|0;l<<
24>>24!=(u[v+8>>0]|0)?v=l:(c[v>>2]=a>>1,p=(l&255)>>>1,u[f>>0]=p,v=v+10|0,u[v>>0]=(ea[v>>0]|0)>>>1,v=p);v=(v&255)+1|0;v&=255;u[f>>0]=v}function Z(p,v,C,a){p|=0;v|=0;C|=0;a|=0;var l=0,K=0,H=0,l=C>>v,K=p+148|0,H=a-(c[K>>2]|0)|0;(l|0)<(H+-1|0)?(30<(l|0)&&(a=(l|0)/2|0,U(p,0,a),l=l-a|0),U(p,1,l+1|0),U(p,(1<<v)+-1&C,v)):(31<(H|0)?(U(p,0,31),U(p,1,a+-31-(c[K>>2]|0)|0)):U(p,1,H),v=c[K>>2]|0,U(p,(1<<v)+-1&C+-1,v))}function aa(p){p|=0;var v=0,C=0,a=0,l=0,K=0,H=0,b=0,d=0,f=0,h=0,b=p+116|0,v=c[b>>2]|0,d=p+120|
0;if(v>>>0<((c[d>>2]|0)+-3|0)>>>0)d=p+112|0,H=c[d>>2]|0,p=p+108|0,c[p>>2]|=(ea[v+1>>0]<<16|ea[v>>0]<<24|ea[v+2>>0]<<8|ea[v+3>>0])>>>H,p=32-H>>3,c[b>>2]=v+p,c[d>>2]=(p<<3)+H;else{H=p+104|0;C=c[H>>2]|0;do if(C){if((c[C+12>>2]|0)==(c[C+16>>2]|0)){if(-1==(Ja[c[(c[C>>2]|0)+36>>2]&127](C)|0))break;v=c[b>>2]|0}l=p+124|0;C=c[l>>2]|0;K=C-v|0;if(64>=K>>>0){a=p+92|0;if((C|0)==(v|0))C=v;else{C=0;do u[(c[a>>2]|0)+C>>0]=u[v+C>>0]|0,C=C+1|0,v=c[b>>2]|0;while(C>>>0<K>>>0);C=v;v=c[l>>2]|0}a=h=c[a>>2]|0;f=a-C|0;c[b>>
2]=h;C=v+f|0;c[l>>2]=C;c[d>>2]=(c[d>>2]|0)+f;H=c[H>>2]|0;H=cb[c[(c[H>>2]|0)+32>>2]&63](H,C,(c[p+96>>2]|0)-(a+K)|0)|0;c[l>>2]=(c[l>>2]|0)+H}}while(0);H=p+112|0;K=p+108|0;p=c[p+124>>2]|0;l=p+-1|0;for(v=c[b>>2]|0;;){if(v>>>0>=p>>>0){C=14;break}a=u[v>>0]|0;C=a&255;if(a=-1==a<<24>>24){if((v|0)==(l|0)){C=25;break}v=v+1|0;if(0>(u[v>>0]|0)){C=25;break}}else v=v+1|0;h=c[H>>2]|0;c[K>>2]|=C<<24-h;c[b>>2]=v;h=h+(a?7:8)|0;c[H>>2]=h;if(24<=(h|0)){C=33;break}}if(14==(C|0))1<=(c[H>>2]|0)||(v=xa(16)|0,0==(u[8]|0)&&
0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,v|0,5,35648),h=g,g=0,h&1||Pa(v|0,824,96),h=J()|0,za(v|0),V(h|0));else if(25==(C|0))1<=(c[H>>2]|0)||(v=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,v|0,5,35648),h=g,g=0,h&1||Pa(v|0,824,96),h=J()|0,za(v|0),V(h|0));else if(33==(C|0)){a:do if(v>>>0<p>>>0){do{if(-1==(u[v>>0]|0))break a;v=v+1|0}while(v>>>0<p>>>0)}while(0);c[d>>2]=v}}}function wa(p){p|=0;var v=0,C=0,a=0,l=0,K=0,H=0,g=0,b=0,d=0,f=0,h=0,e=0,e=F;F=F+32|0;a=e;h=p+
144|0;a:do if(c[h>>2]|0)v=p+152|0;else if(C=c[p+136>>2]|0,v=p+152|0,(C|0)==((1<<c[v>>2])+-1|0)&&(xb(a,C,0),(c[a+4>>2]|0)==(c[p+184>>2]|0))&&(c[a+8>>2]|0)==(c[p+188>>2]|0)&&(c[a+12>>2]|0)==(c[p+192>>2]|0))switch(c[v>>2]|0){case 8:h=c[8900]|0;c[p+4612>>2]=h+(((c[8901]|0)-h|0)>>>1);F=e;return;case 10:h=c[8903]|0;c[p+4612>>2]=h+(((c[8904]|0)-h|0)>>>1);F=e;return;case 12:h=c[8906]|0;c[p+4612>>2]=h+(((c[8907]|0)-h|0)>>>1);F=e;return;case 16:h=c[8909]|0;c[p+4612>>2]=h+(((c[8910]|0)-h|0)>>>1);F=e;return;
default:break a}while(0);f=1<<c[v>>2];C=p+4616|0;a=f<<1;l=p+4620|0;K=c[l>>2]|0;v=c[C>>2]|0;H=K-v|0;a>>>0<=H>>>0?a>>>0<H>>>0&&(g=v+a|0,(K|0)!=(g|0))&&(c[l>>2]=g):(X(C,a-H|0),v=c[C>>2]|0);d=p+4612|0;c[d>>2]=v+f;v=0-f|0;if(!((f|0)<=(v|0))){g=p+192|0;b=p+188|0;H=p+184|0;K=v;do v=c[g>>2]|0,(K|0)>(0-v|0)?(C=c[b>>2]|0,(K|0)>(0-C|0)?(a=c[H>>2]|0,(K|0)>(0-a|0)?(l=c[h>>2]|0,v=(K|0)>=(0-l|0)?(l|0)<(K|0)?(a|0)<=(K|0)?(C|0)>(K|0)?2:(v|0)>(K|0)?3:4:1:0:-1):v=-2):v=-3):v=-4,u[(c[d>>2]|0)+K>>0]=v,K=K+1|0;while((K|
0)!=(f|0))}F=e}function X(p,v){p|=0;v|=0;var C=0,a=0,l=0,K=0,H=0,g=0,b=0,d=0,b=p+8|0,l=c[b>>2]|0,d=p+4|0,a=C=c[d>>2]|0;if((l-a|0)>>>0>=v>>>0){do u[C>>0]=0,C=(c[d>>2]|0)+1|0,c[d>>2]=C,v=v+-1|0;while(0!=(v|0))}else{C=c[p>>2]|0;K=a-C+v|0;0>(K|0)&&(Md(p),l=c[b>>2]|0,C=c[p>>2]|0);a=l-C|0;1073741823>a>>>0?(a<<=1,a=a>>>0<K>>>0?K:a,C=(c[d>>2]|0)-C|0,a?g=8:(H=l=0,K=C)):(a=2147483647,C=(c[d>>2]|0)-C|0,g=8);8==(g|0)&&(l=a,H=qa(a)|0,K=C);C=H+K|0;l=H+l|0;a=C;do u[a>>0]=0,C=a=C+1|0,v=v+-1|0;while(0!=(v|0));v=c[p>>
2]|0;a=(c[d>>2]|0)-v|0;g=H+(K-a)|0;gb(g|0,v|0,a|0)|0;c[p>>2]=g;c[d>>2]=C;c[b>>2]=l;v&&Q(v)}}function fa(p){p|=0;var v=0,C=0,a=0,l=0,K=0,H=0,b=0,d=0,f=0,h=0,e=0,k=0,u=0,m=0,n=0,q=0,r=0,S=0,I=0,x=0,q=F;F=F+32|0;S=q+12|0;n=q;k=p+180|0;u=(c[k>>2]|0)+4|0;m=1==(c[p+32>>2]|0)?c[p+24>>2]|0:1;v=ia(m<<1,u)|0;c[S>>2]=0;I=S+4|0;c[I>>2]=0;c[S+8>>2]=0;do if(v)if(715827882<v>>>0&&(g=0,ta(178,S|0),r=g,g=0,r&1)||(H=6),6!=(H|0)||(g=0,C=ca(67,6*v|0)|0,r=g,g=0,r&1))a=J()|0,(v=c[S>>2]|0)||V(a|0),C=c[I>>2]|0,(C|0)!=(v|
0)&&(c[I>>2]=C+(6*~(((C+-6-v|0)>>>0)/6|0)|0)),Q(v),V(a|0);else{c[I>>2]=C;c[S>>2]=C;a=C+(6*v|0)|0;for(c[S+8>>2]=a;;)if(R[C>>1]=0,R[C+2>>1]=0,R[C+4>>1]=0,v=v+-1|0)C=C+6|0;else break;c[I>>2]=a}while(0);c[n>>2]=0;r=n+4|0;c[r>>2]=0;c[n+8>>2]=0;if(m)if(1073741823<m>>>0&&(g=0,ta(178,n|0),e=g,g=0,e&1)||(H=18),18!=(H|0)||(l=m<<2,g=0,K=ca(67,l|0)|0,e=g,g=0,e&1)){if(a=J()|0,C=v=c[n>>2]|0)l=c[r>>2]|0,(l|0)!=(v|0)&&(c[r>>2]=l+(~((l+-4-C|0)>>>2)<<2)),Q(v)}else c[n>>2]=K,H=K+(m<<2)|0,c[n+8>>2]=H,Za(K|0,0,l|0)|0,
c[r>>2]=H,H=20;else H=20;if(20==(H|0)){l=p+12|0;a:do if(0<(c[l>>2]|0)){K=p+4604|0;H=(ia(m,u)|0)+1|0;b=p+4608|0;d=p+92|0;f=0<(m|0);h=p+4600|0;e=0;b:for(;;){C=c[S>>2]|0;v=C+6|0;c[K>>2]=v;C=C+(6*H|0)|0;c[b>>2]=C;e&1?(c[K>>2]=C,c[b>>2]=v):v=C;a=c[d>>2]|0;g=0;pa(c[(c[a>>2]|0)+12>>2]|0,a|0,v|0,c[k>>2]|0,u|0);a=g;g=0;if(a&1){H=30;break}if(f){v=c[n>>2]|0;C=c[K>>2]|0;a=0;do{c[h>>2]=c[v+(a<<2)>>2];x=c[k>>2]|0;v=C+(6*x|0)|0;C=C+(6*(x+-1|0)|0)|0;R[v>>1]=R[C>>1]|0;R[v+2>>1]=R[C+2>>1]|0;R[v+4>>1]=R[C+4>>1]|0;C=
(c[b>>2]|0)+-6|0;v=c[K>>2]|0;R[C>>1]=R[v>>1]|0;R[C+2>>1]=R[v+2>>1]|0;R[C+4>>1]=R[v+4>>1]|0;g=0;ga(69,p|0,0);C=g;g=0;if(C&1){H=29;break b}v=c[n>>2]|0;c[v+(a<<2)>>2]=c[h>>2];C=(c[K>>2]|0)+(6*u|0)|0;c[K>>2]=C;c[b>>2]=(c[b>>2]|0)+(6*u|0);a=a+1|0}while((a|0)<(m|0))}e=e+1|0;if((e|0)>=(c[l>>2]|0)){H=42;break a}}29==(H|0)?a=J()|0:30==(H|0)&&(a=J()|0)}else H=42;while(0);if(42==(H|0))if(g=0,ta(182,p|0),x=g,g=0,x&1)a=J()|0;else{if(C=v=c[n>>2]|0)a=c[r>>2]|0,(a|0)!=(v|0)&&(c[r>>2]=a+(~((a+-4-C|0)>>>2)<<2)),Q(v);
v=c[S>>2]|0;if(!v){F=q;return}C=c[I>>2]|0;(C|0)!=(v|0)&&(c[I>>2]=C+(6*~(((C+-6-v|0)>>>0)/6|0)|0));Q(v);F=q;return}if(C=v=c[n>>2]|0)l=c[r>>2]|0,(l|0)!=(v|0)&&(c[r>>2]=l+(~((l+-4-C|0)>>>2)<<2)),Q(v)}(v=c[S>>2]|0)||V(a|0);C=c[I>>2]|0;(C|0)!=(v|0)&&(c[I>>2]=C+(6*~(((C+-6-v|0)>>>0)/6|0)|0));Q(v);V(a|0)}function Ba(p,v,C){p|=0;v|=0;var a=0,l=0,K=0,H=0,g=0,b=0,d=0,f=0,h=0,e=0,k=0,u=0,m=0,n=0,q=0,r=0,I=0,x=0,t=0,z=0,A=0,E=0,A=F;F=F+48|0;k=A+30|0;e=A+24|0;h=A+18|0;u=A+12|0;I=A+6|0;x=A;t=(c[p+180>>2]|0)-v|
0;z=c[p+4608>>2]|0;m=c[p+4604>>2]|0;r=v+-1|0;n=R[z+(6*r|0)>>1]|0;q=R[z+(6*r|0)+2>>1]|0;r=R[z+(6*r|0)+4>>1]|0;C=n&65535;a=p+144|0;l=q&65535;K=r&65535;for(f=0;;){b=f+v|0;H=z+(6*b|0)|0;g=z+(6*b|0)+2|0;b=z+(6*b|0)+4|0;E=(oa[H>>1]|0)-C|0;d=c[a>>2]|0;if(((-1<(E|0)?E:0-E|0)|0)>(d|0))break;E=(oa[g>>1]|0)-l|0;if(((-1<(E|0)?E:0-E|0)|0)>(d|0))break;E=(oa[b>>1]|0)-K|0;if(((-1<(E|0)?E:0-E|0)|0)>(d|0))break;R[H>>1]=n;R[g>>1]=q;R[b>>1]=r;f=f+1|0;if((f|0)==(t|0)){f=t;break}}l=(f|0)==(t|0);K=p+4600|0;a=c[36476+(c[K>>
2]<<2)>>2]|0;if((1<<a|0)>(f|0))C=f;else{C=f;do U(p,1,1),a=c[K>>2]|0,C=C-(1<<c[36476+(a<<2)>>2])|0,a=30<(a|0)?31:a+1|0,c[K>>2]=a,a=c[36476+(a<<2)>>2]|0;while((C|0)>=(1<<a|0))}if(!l)return U(p,C,a+1|0),v=f+v|0,E=z+(6*v|0)|0,R[I>>1]=R[E>>1]|0,R[I+2>>1]=R[E+2>>1]|0,R[I+4>>1]=R[E+4>>1]|0,R[x>>1]=n,R[x+2>>1]=q,R[x+4>>1]=r,v=m+(6*v|0)|0,R[h>>1]=R[I>>1]|0,R[h+2>>1]=R[I+2>>1]|0,R[h+4>>1]=R[I+4>>1]|0,R[e>>1]=R[x>>1]|0,R[e+2>>1]=R[x+2>>1]|0,R[e+4>>1]=R[x+4>>1]|0,R[k>>1]=R[v>>1]|0,R[k+2>>1]=R[v+2>>1]|0,R[k+4>>
1]=R[v+4>>1]|0,v=u|0,p|=0,h|=0,e|=0,k|=0,z=t=x=I=r=q=n=m=d=b=g=H=l=a=C=0,q=p+136|0,d=oa[k>>1]|0,m=d-(oa[e>>1]|0)>>31|1,C=ia(m,(oa[h>>1]|0)-d|0)|0,g=p+144|0,a=c[g>>2]|0,C=0<(C|0)?(C+a|0)/(a<<1|1)|0:(C-a|0)/(a<<1|1)|0,z=p+140|0,H=c[z>>2]|0,l=(0>(C|0)?H:0)+C|0,H=l-((l|0)<((H+1|0)/2|0)?0:H)|0,l=p+4576|0,Ua(p,l,H),I=oa[k+2>>1]|0,x=I-(oa[e+2>>1]|0)>>31|1,C=ia(x,(oa[h+2>>1]|0)-I|0)|0,a=c[g>>2]|0,C=0<(C|0)?(C+a|0)/(a<<1|1)|0:(C-a|0)/(a<<1|1)|0,n=c[z>>2]|0,t=(0>(C|0)?n:0)+C|0,n=t-((t|0)<((n+1|0)/2|0)?0:n)|
0,Ua(p,l,n),t=oa[k+4>>1]|0,r=t-(oa[e+4>>1]|0)>>31|1,C=ia(r,(oa[h+4>>1]|0)-t|0)|0,a=c[g>>2]|0,C=0<(C|0)?(C+a|0)/(a<<1|1)|0:(C-a|0)/(a<<1|1)|0,b=c[z>>2]|0,C=(0>(C|0)?b:0)+C|0,b=C-((C|0)<((b+1|0)/2|0)?0:b)|0,Ua(p,l,b),l=c[g>>2]|0,g=l<<1|1,C=(ia(ia(g,H)|0,m)|0)+d|0,h=0-l|0,(C|0)>=(h|0)?(a=c[q>>2]|0,(a+l|0)<(C|0)&&(C=C-(ia(c[z>>2]|0,g)|0)|0),e=a):(C=(ia(c[z>>2]|0,g)|0)+C|0,e=c[q>>2]|0),(C&e|0)!=(C|0)&&(C=e&~(C>>31)),k=C&65535,C=(ia(ia(g,n)|0,x)|0)+I|0,(C|0)>=(h|0)?(e+l|0)<(C|0)&&(C=C-(ia(c[z>>2]|0,g)|
0)|0):C=(ia(c[z>>2]|0,g)|0)+C|0,(C&e|0)!=(C|0)&&(C=e&~(C>>31)),a=C&65535,C=(ia(ia(g,b)|0,r)|0)+t|0,(C|0)>=(h|0)?(e+l|0)<(C|0)&&(C=C-(ia(c[z>>2]|0,g)|0)|0):C=(ia(c[z>>2]|0,g)|0)+C|0,z=(C&e|0)==(C|0)?C:e&~(C>>31),R[v>>1]=k,t=v+2|0,R[t>>1]=a,v=v+4|0,R[v>>1]=z&65535,R[E>>1]=R[u>>1]|0,R[E+2>>1]=R[u+2>>1]|0,R[E+4>>1]=R[u+4>>1]|0,E=c[K>>2]|0,c[K>>2]=1>(E|0)?0:E+-1|0,F=A,f+1|0;if(!C)return F=A,t|0;U(p,1,1);F=A;return t|0}function Ia(p,v,C,a,l){p|=0;v|=0;var K=0,H=0,g=0,b=0,d=0,f=0,h=0,e=0,k=0,u=0,m=0,m=v>>
31,K=(m^v)-m|0,k=p+196+(12*K|0)+10|0,H=R[k>>1]|0,e=p+196+(12*K|0)|0;l=c[e>>2]|0;if((H|0)<(l|0))if((H<<1|0)<(l|0))if((H<<2|0)<(l|0))if((H<<3|0)<(l|0))if((H<<4|0)<(l|0))for(v=5;;)if((H<<v|0)<(l|0))v=v+1|0;else break;else v=4;else v=3;else v=2;else v=1;else v=0;f=p+196+(12*K|0)+8|0;l=(R[f>>1]^m)-m+(a|0)|0;u=p+136|0;a=c[u>>2]|0;d=(l&a|0)==(l|0)?l:a&~(l>>31);l=((C|0)-d^m)-m|0;b=p+144|0;a=c[b>>2]|0;l=0<(l|0)?(l+a|0)/(a<<1|1)|0:(l-a|0)/(a<<1|1)|0;h=p+140|0;g=c[h>>2]|0;C=(0>(l|0)?g:0)+l|0;g=C-((C|0)<((g+
1|0)/2|0)?0:g)|0;K=p+196+(12*K|0)+4|0;l=a|v?0:(c[K>>2]<<1)+-1+H>>31;a=l^g;ha(p,v,a>>30^a<<1,c[p+156>>2]|0);a=c[p+160>>2]|0;v=(c[e>>2]|0)+(-1<(g|0)?g:0-g|0)|0;l=(c[K>>2]|0)+(ia(c[b>>2]<<1|1,g)|0)|0;C=R[k>>1]|0;(C|0)==(a|0)&&(v>>=1,l>>=1,C=a>>1);c[e>>2]=v;a=C+1|0;R[k>>1]=a;v=a+l|0;1<=(v|0)?0<(l|0)&&(l=l-a|0,k=R[f>>1]|0,R[f>>1]=(127>k<<16>>16&1)+(k&65535),l=0<(l|0)?0:l):(l=R[f>>1]|0,R[f>>1]=(l&65535)-(-128<l<<16>>16&1),l=(v|0)>(~C|0)?v:0-C|0);c[K>>2]=l;a=c[b>>2]|0;C=a<<1|1;v=(ia(C,(g^m)-m|0)|0)+d|0;
(v|0)>=(0-a|0)?(l=c[u>>2]|0,(l+a|0)<(v|0)&&(v=v-(ia(c[h>>2]|0,C)|0)|0)):(v=(ia(c[h>>2]|0,C)|0)+v|0,l=c[u>>2]|0);if((v&l|0)==(v|0))return m=v&65535,m|0;m=l&~(v>>31)&65535;return m|0}function ha(p,v,C,a){p|=0;v|=0;C|=0;a|=0;var l=0,K=0,H=0,l=C>>v,K=p+148|0,H=a-(c[K>>2]|0)|0;(l|0)<(H+-1|0)?(30<(l|0)&&(a=(l|0)/2|0,U(p,0,a),l=l-a|0),U(p,1,l+1|0),U(p,(1<<v)+-1&C,v)):(31<(H|0)?(U(p,0,31),U(p,1,a+-31-(c[K>>2]|0)|0)):U(p,1,H),v=c[K>>2]|0,U(p,(1<<v)+-1&C+-1,v))}function Ua(p,v,C){p|=0;v|=0;C|=0;var a=0,l=0,
K=0,H=0,g=0,b=0,d=0,f=0,f=v+9|0,H=ea[f>>0]|0,d=v+4|0,b=c[d>>2]|0,l=(ia(H>>>1,b)|0)+(c[v>>2]|0)|0;if((H|0)<(l|0)){K=H;a=0;do K<<=1,a=a+1|0;while((K|0)<(l|0));l=a}else l=0;0<(C|0)&0==(l|0)&&ea[v+10>>0]<<1>>>0<H>>>0?a=1:g=5;5==(g|0)&&(a=(a=0>(C|0))&&ea[v+10>>0]<<1>>>0>=H>>>0?1:a&0!=(l|0));a=((-1<(C|0)?C:0-C|0)<<1)-b+(a<<31>>31)|0;ha(p,l,a,(c[p+156>>2]|0)+-1-(c[36476+(c[p+4600>>2]<<2)>>2]|0)|0);0>(C|0)&&(p=v+10|0,u[p>>0]=(ea[p>>0]|0)+1);a=(a+1-(c[d>>2]|0)>>1)+(c[v>>2]|0)|0;c[v>>2]=a;l=u[f>>0]|0;l<<24>>
24!=(u[v+8>>0]|0)?v=l:(c[v>>2]=a>>1,p=(l&255)>>>1,u[f>>0]=p,v=v+10|0,u[v>>0]=(ea[v>>0]|0)>>>1,v=p);v=(v&255)+1|0;v&=255;u[f>>0]=v}function ba(p){p|=0;var v=0,C=0,a=0,l=0,K=0,H=0,g=0,b=0,d=0,f=0,h=0,e=0,e=F;F=F+32|0;a=e;h=p+144|0;a:do if(c[h>>2]|0)v=p+152|0;else if(C=c[p+136>>2]|0,v=p+152|0,(C|0)==((1<<c[v>>2])+-1|0)&&(xb(a,C,0),(c[a+4>>2]|0)==(c[p+184>>2]|0))&&(c[a+8>>2]|0)==(c[p+188>>2]|0)&&(c[a+12>>2]|0)==(c[p+192>>2]|0))switch(c[v>>2]|0){case 8:h=c[8900]|0;c[p+4612>>2]=h+(((c[8901]|0)-h|0)>>>1);
F=e;return;case 10:h=c[8903]|0;c[p+4612>>2]=h+(((c[8904]|0)-h|0)>>>1);F=e;return;case 12:h=c[8906]|0;c[p+4612>>2]=h+(((c[8907]|0)-h|0)>>>1);F=e;return;case 16:h=c[8909]|0;c[p+4612>>2]=h+(((c[8910]|0)-h|0)>>>1);F=e;return;default:break a}while(0);f=1<<c[v>>2];C=p+4616|0;a=f<<1;l=p+4620|0;K=c[l>>2]|0;v=c[C>>2]|0;H=K-v|0;a>>>0<=H>>>0?a>>>0<H>>>0&&(g=v+a|0,(K|0)!=(g|0))&&(c[l>>2]=g):(X(C,a-H|0),v=c[C>>2]|0);d=p+4612|0;c[d>>2]=v+f;v=0-f|0;if(!((f|0)<=(v|0))){g=p+192|0;b=p+188|0;H=p+184|0;K=v;do v=c[g>>
2]|0,(K|0)>(0-v|0)?(C=c[b>>2]|0,(K|0)>(0-C|0)?(a=c[H>>2]|0,(K|0)>(0-a|0)?(l=c[h>>2]|0,v=(K|0)>=(0-l|0)?(l|0)<(K|0)?(a|0)<=(K|0)?(C|0)>(K|0)?2:(v|0)>(K|0)?3:4:1:0:-1):v=-2):v=-3):v=-4,u[(c[d>>2]|0)+K>>0]=v,K=K+1|0;while((K|0)!=(f|0))}F=e}function Ra(p,v,C,a,l){p|=0;v|=0;C|=0;a|=0;l|=0;var K=0,H=0,g=0,b=0,d=0,f=0,g=p+4|0,K=c[g>>2]|0;if(u[K+32>>0]|0){H=p+8|0;gb(c[H>>2]|0,v|0,3*a|0)|0;K=c[g>>2]|0;v=c[K+16>>2]|0;if(0<(a|0)){K=c[H>>2]|0;for(p=0;b=K+2|0,d=u[K>>0]|0,u[K>>0]=u[b>>0]|0,u[b>>0]=d,p=p+1|0,(p|
0)!=(a|0);)K=K+v|0;K=c[g>>2]|0}g=c[H>>2]|0}else g=v;switch(c[K+16>>2]|0){case 3:if(2==(c[K+24>>2]|0)){if(0<(a|0))K=0;else break;do H=ea[g+(3*K|0)+1>>0]|0,l=128-H+(ea[g+(3*K|0)+2>>0]|0)|0,b=(ea[g+(3*K|0)>>0]|0)-H+128|0,d=C+(3*K|0)|0,u[d>>0]=H+192+(((l&255)+(b&255)|0)>>>2),u[d+1>>0]=l,u[d+2>>0]=b,K=K+1|0;while((K|0)!=(a|0));break}K=(l|0)<(a|0)?l:a;if(0>=(K|0))break;p=l<<1;v=0;do a=ea[g+(3*v|0)+1>>0]|0,b=128-a+(ea[g+(3*v|0)+2>>0]|0)|0,d=(ea[g+(3*v|0)>>0]|0)-a+128|0,u[C+v>>0]=a+192+(((b&255)+(d&255)|
0)>>>2),u[C+(v+l)>>0]=b,u[C+(v+p)>>0]=d,v=v+1|0;while((v|0)!=(K|0));break;case 4:if(1!=(c[K+24>>2]|0))break;K=(l|0)<(a|0)?l:a;if(0>=(K|0))break;p=l<<1;v=3*l|0;H=0;do d=u[g+(H<<2)+3>>0]|0,f=ea[g+(H<<2)+1>>0]|0,a=128-f+(ea[g+(H<<2)+2>>0]|0)|0,b=(ea[g+(H<<2)>>0]|0)-f+128|0,u[C+H>>0]=f+192+(((a&255)+(b&255)|0)>>>2),u[C+(H+l)>>0]=a,u[C+(H+p)>>0]=b,u[C+(H+v)>>0]=d,H=H+1|0;while((H|0)!=(K|0))}}function lb(p,v,C,a,l){v|=0;C|=0;a|=0;l|=0;var K=0,H=0,g=0,b=0,d=0,f=0,h=0,e=0,b=(p|0)+4|0;p=c[b>>2]|0;a:do switch(c[p+
16>>2]|0){case 3:if(2==(c[p+24>>2]|0)){if(0<(a|0))p=0;else break a;for(;;)if(H=ea[v+(3*p|0)+1>>0]|0,K=ea[v+(3*p|0)+2>>0]|0,g=(ea[v+(3*p|0)>>0]|0)-((K+H|0)>>>2)+64|0,l=C+(3*p|0)|0,u[l>>0]=K+128+g,u[l+1>>0]=g,u[l+2>>0]=H+128+g,p=p+1|0,(p|0)==(a|0))break a}p=(a|0)<(l|0)?a:l;if(0<(p|0)){K=l<<1;H=0;do f=ea[v+(H+l)>>0]|0,h=ea[v+(H+K)>>0]|0,d=(ea[v+H>>0]|0)-((h+f|0)>>>2)+64|0,g=C+(3*H|0)|0,u[g>>0]=h+128+d,u[g+1>>0]=d,u[g+2>>0]=f+128+d,H=H+1|0;while((H|0)!=(p|0))}break;case 4:if(1==(c[p+24>>2]|0)&&(g=(a|
0)<(l|0)?a:l,0<(g|0))){p=l<<1;K=3*l|0;H=0;do d=ea[v+(H+l)>>0]|0,e=ea[v+(H+p)>>0]|0,f=(ea[v+H>>0]|0)-((e+d|0)>>>2)+64|0,h=C+(H<<2)|0,f=f<<8&65280|ea[v+(H+K)>>0]<<24|e+128+f&255|d+128+f<<16&16711680,u[h>>0]=f,u[h+1>>0]=f>>8,u[h+2>>0]=f>>16,u[h+3>>0]=f>>24,H=H+1|0;while((H|0)!=(g|0))}}while(0);p=c[b>>2]|0;if(u[p+32>>0]|0&&(H=c[p+16>>2]|0,0<(a|0)))for(p=C,K=0;e=p+2|0,h=u[p>>0]|0,u[p>>0]=u[e>>0]|0,u[e>>0]=h,K=K+1|0,(K|0)!=(a|0);)p=p+H|0}function ab(p,v,C,a,l){p|=0;v|=0;C|=0;a|=0;l|=0;var K=0,H=0,g=0,b=
0,d=0,f=0,h=0,g=p+4|0,K=c[g>>2]|0;if(u[K+32>>0]|0){H=p+8|0;gb(c[H>>2]|0,v|0,3*a|0)|0;K=c[g>>2]|0;v=c[K+16>>2]|0;if(0<(a|0)){K=c[H>>2]|0;for(p=0;b=K+2|0,d=u[K>>0]|0,u[K>>0]=u[b>>0]|0,u[b>>0]=d,p=p+1|0,(p|0)!=(a|0);)K=K+v|0;K=c[g>>2]|0}g=c[H>>2]|0}else g=v;switch(c[K+16>>2]|0){case 3:if(2==(c[K+24>>2]|0)){if(0<(a|0))K=0;else break;do v=ea[g+(3*K|0)>>0]|0,l=u[g+(3*K|0)+1>>0]|0,H=l&255,b=(ea[g+(3*K|0)+2>>0]|0)+128-((H+v|0)>>>1)&255,d=C+(3*K|0)|0,u[d>>0]=v+128-H,u[d+1>>0]=l,u[d+2>>0]=b,K=K+1|0;while((K|
0)!=(a|0));break}K=(l|0)<(a|0)?l:a;if(0>=(K|0))break;p=l<<1;v=0;do b=u[g+(3*v|0)+1>>0]|0,H=ea[g+(3*v|0)>>0]|0,a=b&255,d=(ea[g+(3*v|0)+2>>0]|0)+128-((a+H|0)>>>1)&255,u[C+v>>0]=H+128-a,u[C+(v+l)>>0]=b,u[C+(v+p)>>0]=d,v=v+1|0;while((v|0)!=(K|0));break;case 4:if(1!=(c[K+24>>2]|0))break;K=(l|0)<(a|0)?l:a;if(0>=(K|0))break;p=l<<1;v=3*l|0;H=0;do a=u[g+(H<<2)+1>>0]|0,d=u[g+(H<<2)+3>>0]|0,h=ea[g+(H<<2)>>0]|0,f=a&255,b=(ea[g+(H<<2)+2>>0]|0)+128-((f+h|0)>>>1)&255,u[C+H>>0]=h+128-f,u[C+(H+l)>>0]=a,u[C+(H+p)>>
0]=b,u[C+(H+v)>>0]=d,H=H+1|0;while((H|0)!=(K|0))}}function nb(p,v,C,a,l){v|=0;C|=0;a|=0;l|=0;var K=0,H=0,g=0,b=0,d=0,f=0,h=0,b=(p|0)+4|0;p=c[b>>2]|0;a:do switch(c[p+16>>2]|0){case 3:if(2==(c[p+24>>2]|0)){if(0<(a|0))p=0;else break a;for(;;)if(H=u[v+(3*p|0)+1>>0]|0,g=H&255,K=(ea[v+(3*p|0)>>0]|0)+128+g|0,g=(ea[v+(3*p|0)+2>>0]|0)+128+(((K&255)+g|0)>>>1)&255,l=C+(3*p|0)|0,u[l>>0]=K,u[l+1>>0]=H,u[l+2>>0]=g,p=p+1|0,(p|0)==(a|0))break a}p=(a|0)<(l|0)?a:l;if(0<(p|0)){K=l<<1;H=0;do f=u[v+(H+l)>>0]|0,d=f&255,
h=(ea[v+H>>0]|0)+128+d|0,d=(ea[v+(H+K)>>0]|0)+128+(((h&255)+d|0)>>>1)&255,g=C+(3*H|0)|0,u[g>>0]=h,u[g+1>>0]=f,u[g+2>>0]=d,H=H+1|0;while((H|0)!=(p|0))}break;case 4:if(1==(c[p+24>>2]|0)&&(g=(a|0)<(l|0)?a:l,0<(g|0))){p=l<<1;K=3*l|0;H=0;do f=ea[v+(H+l)>>0]|0,d=(ea[v+H>>0]|0)+128+f&255,h=C+(H<<2)|0,f=d|f<<8|ea[v+(H+K)>>0]<<24|(ea[v+(H+p)>>0]|0)+128+((d+f|0)>>>1)<<16&16711680,u[h>>0]=f,u[h+1>>0]=f>>8,u[h+2>>0]=f>>16,u[h+3>>0]=f>>24,H=H+1|0;while((H|0)!=(g|0))}}while(0);p=c[b>>2]|0;if(u[p+32>>0]|0&&(H=c[p+
16>>2]|0,0<(a|0)))for(p=C,K=0;h=p+2|0,f=u[p>>0]|0,u[p>>0]=u[h>>0]|0,u[h>>0]=f,K=K+1|0,(K|0)!=(a|0);)p=p+H|0}function dc(p,v,C,a,l){p|=0;v|=0;C|=0;a|=0;l|=0;var K=0,H=0,g=0,b=0,d=0,f=0,g=p+4|0,K=c[g>>2]|0;if(u[K+32>>0]|0){H=p+8|0;gb(c[H>>2]|0,v|0,3*a|0)|0;K=c[g>>2]|0;v=c[K+16>>2]|0;if(0<(a|0)){K=c[H>>2]|0;for(p=0;b=K+2|0,d=u[K>>0]|0,u[K>>0]=u[b>>0]|0,u[b>>0]=d,p=p+1|0,(p|0)!=(a|0);)K=K+v|0;K=c[g>>2]|0}g=c[H>>2]|0}else g=v;switch(c[K+16>>2]|0){case 3:if(2==(c[K+24>>2]|0)){if(0<(a|0))K=0;else break;
do l=u[g+(3*K|0)+1>>0]|0,H=l&255,b=128-H+(ea[g+(3*K|0)+2>>0]|0)&255,d=C+(3*K|0)|0,u[d>>0]=(ea[g+(3*K|0)>>0]|0)+128-H,u[d+1>>0]=l,u[d+2>>0]=b,K=K+1|0;while((K|0)!=(a|0));break}K=(l|0)<(a|0)?l:a;if(0>=(K|0))break;p=l<<1;v=0;do b=u[g+(3*v|0)+1>>0]|0,a=b&255,d=128-a+(ea[g+(3*v|0)+2>>0]|0)&255,u[C+v>>0]=(ea[g+(3*v|0)>>0]|0)+128-a,u[C+(v+l)>>0]=b,u[C+(v+p)>>0]=d,v=v+1|0;while((v|0)!=(K|0));break;case 4:if(1!=(c[K+24>>2]|0))break;K=(l|0)<(a|0)?l:a;if(0>=(K|0))break;p=l<<1;v=3*l|0;H=0;do a=u[g+(H<<2)+1>>
0]|0,d=u[g+(H<<2)+3>>0]|0,f=a&255,b=128-f+(ea[g+(H<<2)+2>>0]|0)&255,u[C+H>>0]=(ea[g+(H<<2)>>0]|0)+128-f,u[C+(H+l)>>0]=a,u[C+(H+p)>>0]=b,u[C+(H+v)>>0]=d,H=H+1|0;while((H|0)!=(K|0))}}function ra(p,v,C,a,l){v|=0;C|=0;a|=0;l|=0;var K=0,H=0,g=0,b=0,d=0,f=0,h=0,b=(p|0)+4|0;p=c[b>>2]|0;a:do switch(c[p+16>>2]|0){case 3:if(2==(c[p+24>>2]|0)){if(0<(a|0))p=0;else break a;for(;;)if(H=u[v+(3*p|0)+1>>0]|0,K=H&255,g=K+128+(ea[v+(3*p|0)+2>>0]|0)&255,l=C+(3*p|0)|0,u[l>>0]=(ea[v+(3*p|0)>>0]|0)+128+K,u[l+1>>0]=H,u[l+
2>>0]=g,p=p+1|0,(p|0)==(a|0))break a}p=(a|0)<(l|0)?a:l;if(0<(p|0)){K=l<<1;H=0;do f=u[v+(H+l)>>0]|0,h=f&255,d=h+128+(ea[v+(H+K)>>0]|0)&255,g=C+(3*H|0)|0,u[g>>0]=(ea[v+H>>0]|0)+128+h,u[g+1>>0]=f,u[g+2>>0]=d,H=H+1|0;while((H|0)!=(p|0))}break;case 4:if(1==(c[p+24>>2]|0)&&(g=(a|0)<(l|0)?a:l,0<(g|0))){p=l<<1;K=3*l|0;H=0;do f=ea[v+(H+l)>>0]|0,h=C+(H<<2)|0,f=(ea[v+H>>0]|0)+128+f&255|f<<8|ea[v+(H+K)>>0]<<24|f+128+(ea[v+(H+p)>>0]|0)<<16&16711680,u[h>>0]=f,u[h+1>>0]=f>>8,u[h+2>>0]=f>>16,u[h+3>>0]=f>>24,H=H+
1|0;while((H|0)!=(g|0))}}while(0);p=c[b>>2]|0;if(u[p+32>>0]|0&&(H=c[p+16>>2]|0,0<(a|0)))for(p=C,K=0;h=p+2|0,f=u[p>>0]|0,u[p>>0]=u[h>>0]|0,u[h>>0]=f,K=K+1|0,(K|0)!=(a|0);)p=p+H|0}function cc(p,v,C,a,l){p|=0;v|=0;C|=0;a|=0;l|=0;var K=0,H=0,g=0,b=0,d=0,g=p+4|0,K=c[g>>2]|0;if(u[K+32>>0]|0){H=p+8|0;gb(c[H>>2]|0,v|0,3*a|0)|0;K=c[g>>2]|0;v=c[K+16>>2]|0;if(0<(a|0)){K=c[H>>2]|0;for(p=0;b=K+2|0,d=u[K>>0]|0,u[K>>0]=u[b>>0]|0,u[b>>0]=d,p=p+1|0,(p|0)!=(a|0);)K=K+v|0;K=c[g>>2]|0}g=c[H>>2]|0}else g=v;switch(c[K+
16>>2]|0){case 3:if(2==(c[K+24>>2]|0)){if(0<(a|0))K=0;else break;do l=u[g+(3*K|0)+1>>0]|0,b=u[g+(3*K|0)+2>>0]|0,d=C+(3*K|0)|0,u[d>>0]=u[g+(3*K|0)>>0]|0,u[d+1>>0]=l,u[d+2>>0]=b,K=K+1|0;while((K|0)!=(a|0));break}K=(l|0)<(a|0)?l:a;if(0>=(K|0))break;p=l<<1;v=0;do b=u[g+(3*v|0)+1>>0]|0,d=u[g+(3*v|0)+2>>0]|0,u[C+v>>0]=u[g+(3*v|0)>>0]|0,u[C+(v+l)>>0]=b,u[C+(v+p)>>0]=d,v=v+1|0;while((v|0)!=(K|0));break;case 4:if(1!=(c[K+24>>2]|0))break;K=(l|0)<(a|0)?l:a;if(0>=(K|0))break;p=l<<1;v=3*l|0;H=0;do a=u[g+(H<<2)+
1>>0]|0,b=u[g+(H<<2)+2>>0]|0,d=u[g+(H<<2)+3>>0]|0,u[C+H>>0]=u[g+(H<<2)>>0]|0,u[C+(H+l)>>0]=a,u[C+(H+p)>>0]=b,u[C+(H+v)>>0]=d,H=H+1|0;while((H|0)!=(K|0))}}function gc(p,v,C,a,l){v|=0;C|=0;a|=0;l|=0;var K=0,H=0,g=0,b=0,d=0,f=0,b=(p|0)+4|0;p=c[b>>2]|0;a:do switch(c[p+16>>2]|0){case 3:if(2==(c[p+24>>2]|0)){if(0<(a|0))p=0;else break a;for(;;)if(H=u[v+(3*p|0)+1>>0]|0,g=u[v+(3*p|0)+2>>0]|0,l=C+(3*p|0)|0,u[l>>0]=u[v+(3*p|0)>>0]|0,u[l+1>>0]=H,u[l+2>>0]=g,p=p+1|0,(p|0)==(a|0))break a}p=(a|0)<(l|0)?a:l;if(0<
(p|0)){K=l<<1;H=0;do f=u[v+(H+l)>>0]|0,d=u[v+(H+K)>>0]|0,g=C+(3*H|0)|0,u[g>>0]=u[v+H>>0]|0,u[g+1>>0]=f,u[g+2>>0]=d,H=H+1|0;while((H|0)!=(p|0))}break;case 4:if(1==(c[p+24>>2]|0)&&(g=(a|0)<(l|0)?a:l,0<(g|0))){p=l<<1;K=3*l|0;H=0;do f=C+(H<<2)|0,d=ea[v+(H+l)>>0]<<8|ea[v+H>>0]|ea[v+(H+p)>>0]<<16|ea[v+(H+K)>>0]<<24,u[f>>0]=d,u[f+1>>0]=d>>8,u[f+2>>0]=d>>16,u[f+3>>0]=d>>24,H=H+1|0;while((H|0)!=(g|0))}}while(0);p=c[b>>2]|0;if(u[p+32>>0]|0&&(H=c[p+16>>2]|0,0<(a|0)))for(p=C,K=0;f=p+2|0,d=u[p>>0]|0,u[p>>0]=u[f>>
0]|0,u[f>>0]=d,K=K+1|0,(K|0)!=(a|0);)p=p+H|0}function Ma(p){p|=0;var v=0,C=0,a=0,l=0,K=0,H=0,b=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,S=0,I=0,ua=0,r=F;F=F+32|0;S=r+12|0;q=r;k=p+180|0;m=(c[k>>2]|0)+4|0;n=1==(c[p+32>>2]|0)?c[p+24>>2]|0:1;v=ia(n<<1,m)|0;c[S>>2]=0;I=S+4|0;c[I>>2]=0;c[S+8>>2]=0;a:do if(v){1431655765<v>>>0&&(g=0,ta(178,S|0),x=g,g=0,x&1)||(K=6);if(6==(K|0)&&(g=0,C=ca(67,3*v|0)|0,x=g,g=0,!(x&1)))for(c[I>>2]=C,c[S>>2]=C,c[S+8>>2]=C+(3*v|0);;)if(u[C>>0]=0,u[C+1>>0]=0,u[C+2>>0]=0,C=(c[I>>
2]|0)+3|0,c[I>>2]=C,v=v+-1|0,!v)break a;a=J()|0;(v=c[S>>2]|0)||V(a|0);C=c[I>>2]|0;(C|0)!=(v|0)&&(c[I>>2]=C+(3*~(((C+-3-v|0)>>>0)/3|0)|0));Q(v);V(a|0)}while(0);c[q>>2]=0;x=q+4|0;c[x>>2]=0;c[q+8>>2]=0;if(n)if(1073741823<n>>>0&&(g=0,ta(178,q|0),e=g,g=0,e&1)||(K=17),17!=(K|0)||(a=n<<2,g=0,l=ca(67,a|0)|0,e=g,g=0,e&1)){if(a=J()|0,C=v=c[q>>2]|0)l=c[x>>2]|0,(l|0)!=(v|0)&&(c[x>>2]=l+(~((l+-4-C|0)>>>2)<<2)),Q(v)}else c[q>>2]=l,K=l+(n<<2)|0,c[q+8>>2]=K,Za(l|0,0,a|0)|0,c[x>>2]=K,K=19;else K=19;if(19==(K|0)){l=
p+12|0;a:do if(0<(c[l>>2]|0)){K=p+4604|0;H=(ia(n,m)|0)+1|0;b=p+4608|0;d=p+92|0;f=0<(n|0);h=p+4600|0;e=0;b:for(;;){a=c[S>>2]|0;v=a+3|0;c[K>>2]=v;C=a+(3*H|0)|0;c[b>>2]=C;e&1?(c[K>>2]=C,c[b>>2]=v,v=1):v=H;C=c[d>>2]|0;g=0;pa(c[(c[C>>2]|0)+12>>2]|0,C|0,a+(3*v|0)|0,c[k>>2]|0,m|0);a=g;g=0;if(a&1){K=29;break}if(f){v=c[q>>2]|0;C=c[K>>2]|0;a=0;do{c[h>>2]=c[v+(a<<2)>>2];ua=c[k>>2]|0;v=C+(3*ua|0)|0;C=C+(3*(ua+-1|0)|0)|0;u[v>>0]=u[C>>0]|0;u[v+1>>0]=u[C+1>>0]|0;u[v+2>>0]=u[C+2>>0]|0;v=c[K>>2]|0;C=(c[b>>2]|0)+-3|
0;u[C>>0]=u[v>>0]|0;u[C+1>>0]=u[v+1>>0]|0;u[C+2>>0]=u[v+2>>0]|0;g=0;ga(70,p|0,0);C=g;g=0;if(C&1){K=28;break b}v=c[q>>2]|0;c[v+(a<<2)>>2]=c[h>>2];C=(c[K>>2]|0)+(3*m|0)|0;c[K>>2]=C;c[b>>2]=(c[b>>2]|0)+(3*m|0);a=a+1|0}while((a|0)<(n|0))}e=e+1|0;if((e|0)>=(c[l>>2]|0)){K=41;break a}}28==(K|0)?a=J()|0:29==(K|0)&&(a=J()|0)}else K=41;while(0);if(41==(K|0))if(g=0,ta(182,p|0),ua=g,g=0,ua&1)a=J()|0;else{if(C=v=c[q>>2]|0)a=c[x>>2]|0,(a|0)!=(v|0)&&(c[x>>2]=a+(~((a+-4-C|0)>>>2)<<2)),Q(v);v=c[S>>2]|0;if(!v){F=r;
return}C=c[I>>2]|0;(C|0)!=(v|0)&&(c[I>>2]=C+(3*~(((C+-3-v|0)>>>0)/3|0)|0));Q(v);F=r;return}if(C=v=c[q>>2]|0)l=c[x>>2]|0,(l|0)!=(v|0)&&(c[x>>2]=l+(~((l+-4-C|0)>>>2)<<2)),Q(v)}(v=c[S>>2]|0)||V(a|0);C=c[I>>2]|0;(C|0)!=(v|0)&&(c[I>>2]=C+(3*~(((C+-3-v|0)>>>0)/3|0)|0));Q(v);V(a|0)}function zb(p,v,C){p|=0;v|=0;var a=0,l=0,K=0,H=0,g=0,b=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,I=0,ua=0,t=0,z=0,A=0,E=0,A=F;F=F+32|0;z=A+15|0;e=A+12|0;h=A+9|0;k=A+6|0;x=A+3|0;I=A;ua=(c[p+180>>2]|0)-v|0;t=c[p+4608>>2]|0;m=c[p+
4604>>2]|0;r=t+(3*(v+-1|0)|0)|0;n=u[r>>0]|0;q=u[r+1>>0]|0;r=u[r+2>>0]|0;C=n&255;a=p+144|0;l=q&255;K=r&255;for(f=0;;){H=t+(3*(f+v|0)|0)|0;g=H+1|0;b=H+2|0;E=(ea[H>>0]|0)-C|0;d=c[a>>2]|0;if(((-1<(E|0)?E:0-E|0)|0)>(d|0))break;E=(ea[g>>0]|0)-l|0;if(((-1<(E|0)?E:0-E|0)|0)>(d|0))break;E=(ea[b>>0]|0)-K|0;if(((-1<(E|0)?E:0-E|0)|0)>(d|0))break;u[H>>0]=n;u[g>>0]=q;u[b>>0]=r;f=f+1|0;if((f|0)==(ua|0)){f=ua;break}}l=(f|0)==(ua|0);K=p+4600|0;a=c[36476+(c[K>>2]<<2)>>2]|0;if((1<<a|0)>(f|0))C=f;else{C=f;do U(p,1,1),
a=c[K>>2]|0,C=C-(1<<c[36476+(a<<2)>>2])|0,a=30<(a|0)?31:a+1|0,c[K>>2]=a,a=c[36476+(a<<2)>>2]|0;while((C|0)>=(1<<a|0))}if(!l)return U(p,C,a+1|0),v=f+v|0,E=t+(3*v|0)|0,u[x>>0]=u[E>>0]|0,u[x+1>>0]=u[E+1>>0]|0,u[x+2>>0]=u[E+2>>0]|0,u[I>>0]=n,u[I+1>>0]=q,u[I+2>>0]=r,v=m+(3*v|0)|0,u[h>>0]=u[x>>0]|0,u[h+1>>0]=u[x+1>>0]|0,u[h+2>>0]=u[x+2>>0]|0,u[e>>0]=u[I>>0]|0,u[e+1>>0]=u[I+1>>0]|0,u[e+2>>0]=u[I+2>>0]|0,u[z>>0]=u[v>>0]|0,u[z+1>>0]=u[v+1>>0]|0,u[z+2>>0]=u[v+2>>0]|0,v=k|0,p|=0,h|=0,e|=0,z|=0,t=ua=I=x=r=q=
n=m=d=b=g=H=l=a=C=0,q=p+136|0,d=ea[z>>0]|0,m=d-(ea[e>>0]|0)>>31|1,C=ia(m,(ea[h>>0]|0)-d|0)|0,g=p+144|0,a=c[g>>2]|0,C=0<(C|0)?(C+a|0)/(a<<1|1)|0:(C-a|0)/(a<<1|1)|0,t=p+140|0,H=c[t>>2]|0,l=(0>(C|0)?H:0)+C|0,H=l-((l|0)<((H+1|0)/2|0)?0:H)|0,l=p+4576|0,Qa(p,l,H),x=ea[z+1>>0]|0,I=x-(ea[e+1>>0]|0)>>31|1,C=ia(I,(ea[h+1>>0]|0)-x|0)|0,a=c[g>>2]|0,C=0<(C|0)?(C+a|0)/(a<<1|1)|0:(C-a|0)/(a<<1|1)|0,n=c[t>>2]|0,ua=(0>(C|0)?n:0)+C|0,n=ua-((ua|0)<((n+1|0)/2|0)?0:n)|0,Qa(p,l,n),ua=ea[z+2>>0]|0,r=ua-(ea[e+2>>0]|0)>>
31|1,C=ia(r,(ea[h+2>>0]|0)-ua|0)|0,a=c[g>>2]|0,C=0<(C|0)?(C+a|0)/(a<<1|1)|0:(C-a|0)/(a<<1|1)|0,b=c[t>>2]|0,C=(0>(C|0)?b:0)+C|0,b=C-((C|0)<((b+1|0)/2|0)?0:b)|0,Qa(p,l,b),l=c[g>>2]|0,g=l<<1|1,C=(ia(ia(g,H)|0,m)|0)+d|0,h=0-l|0,(C|0)>=(h|0)?(a=c[q>>2]|0,(a+l|0)<(C|0)&&(C=C-(ia(c[t>>2]|0,g)|0)|0),e=a):(C=(ia(c[t>>2]|0,g)|0)+C|0,e=c[q>>2]|0),(C&e|0)!=(C|0)&&(C=e&~(C>>31)),z=C&255,C=(ia(ia(g,n)|0,I)|0)+x|0,(C|0)>=(h|0)?(e+l|0)<(C|0)&&(C=C-(ia(c[t>>2]|0,g)|0)|0):C=(ia(c[t>>2]|0,g)|0)+C|0,(C&e|0)!=(C|0)&&
(C=e&~(C>>31)),a=C&255,C=(ia(ia(g,b)|0,r)|0)+ua|0,(C|0)>=(h|0)?(e+l|0)<(C|0)&&(C=C-(ia(c[t>>2]|0,g)|0)|0):C=(ia(c[t>>2]|0,g)|0)+C|0,t=(C&e|0)==(C|0)?C:e&~(C>>31),u[v>>0]=z,ua=v+1|0,u[ua>>0]=a,v=v+2|0,u[v>>0]=t&255,u[E>>0]=u[k>>0]|0,u[E+1>>0]=u[k+1>>0]|0,u[E+2>>0]=u[k+2>>0]|0,E=c[K>>2]|0,c[K>>2]=1>(E|0)?0:E+-1|0,F=A,f+1|0;if(!C)return F=A,ua|0;U(p,1,1);F=A;return ua|0}function Oa(p,v,C,a,l){p|=0;v|=0;var K=0,H=0,g=0,b=0,d=0,f=0,h=0,e=0,k=0,u=0,m=0,m=v>>31,K=(m^v)-m|0,k=p+196+(12*K|0)+10|0,H=R[k>>1]|
0,e=p+196+(12*K|0)|0;l=c[e>>2]|0;if((H|0)<(l|0))if((H<<1|0)<(l|0))if((H<<2|0)<(l|0))if((H<<3|0)<(l|0))if((H<<4|0)<(l|0))for(v=5;;)if((H<<v|0)<(l|0))v=v+1|0;else break;else v=4;else v=3;else v=2;else v=1;else v=0;f=p+196+(12*K|0)+8|0;l=(R[f>>1]^m)-m+(a|0)|0;u=p+136|0;a=c[u>>2]|0;d=(l&a|0)==(l|0)?l:a&~(l>>31);l=((C|0)-d^m)-m|0;b=p+144|0;a=c[b>>2]|0;l=0<(l|0)?(l+a|0)/(a<<1|1)|0:(l-a|0)/(a<<1|1)|0;h=p+140|0;g=c[h>>2]|0;C=(0>(l|0)?g:0)+l|0;g=C-((C|0)<((g+1|0)/2|0)?0:g)|0;K=p+196+(12*K|0)+4|0;l=a|v?0:(c[K>>
2]<<1)+-1+H>>31;a=l^g;vb(p,v,a>>30^a<<1,c[p+156>>2]|0);a=c[p+160>>2]|0;v=(c[e>>2]|0)+(-1<(g|0)?g:0-g|0)|0;l=(c[K>>2]|0)+(ia(c[b>>2]<<1|1,g)|0)|0;C=R[k>>1]|0;(C|0)==(a|0)&&(v>>=1,l>>=1,C=a>>1);c[e>>2]=v;a=C+1|0;R[k>>1]=a;v=a+l|0;1<=(v|0)?0<(l|0)&&(l=l-a|0,k=R[f>>1]|0,R[f>>1]=(127>k<<16>>16&1)+(k&65535),l=0<(l|0)?0:l):(l=R[f>>1]|0,R[f>>1]=(l&65535)-(-128<l<<16>>16&1),l=(v|0)>(~C|0)?v:0-C|0);c[K>>2]=l;a=c[b>>2]|0;C=a<<1|1;v=(ia(C,(g^m)-m|0)|0)+d|0;(v|0)>=(0-a|0)?(l=c[u>>2]|0,(l+a|0)<(v|0)&&(v=v-(ia(c[h>>
2]|0,C)|0)|0)):(v=(ia(c[h>>2]|0,C)|0)+v|0,l=c[u>>2]|0);if((v&l|0)==(v|0))return m=v&255,m|0;m=l&~(v>>31)&255;return m|0}function vb(p,v,C,a){p|=0;v|=0;C|=0;a|=0;var l=0,K=0,H=0,l=C>>v,K=p+148|0,H=a-(c[K>>2]|0)|0;(l|0)<(H+-1|0)?(30<(l|0)&&(a=(l|0)/2|0,U(p,0,a),l=l-a|0),U(p,1,l+1|0),U(p,(1<<v)+-1&C,v)):(31<(H|0)?(U(p,0,31),U(p,1,a+-31-(c[K>>2]|0)|0)):U(p,1,H),v=c[K>>2]|0,U(p,(1<<v)+-1&C+-1,v))}function Qa(p,v,C){p|=0;v|=0;C|=0;var a=0,l=0,K=0,H=0,g=0,b=0,d=0,f=0,f=v+9|0,H=ea[f>>0]|0,d=v+4|0,b=c[d>>
2]|0,l=(ia(H>>>1,b)|0)+(c[v>>2]|0)|0;if((H|0)<(l|0)){K=H;a=0;do K<<=1,a=a+1|0;while((K|0)<(l|0));l=a}else l=0;0<(C|0)&0==(l|0)&&ea[v+10>>0]<<1>>>0<H>>>0?a=1:g=5;5==(g|0)&&(a=(a=0>(C|0))&&ea[v+10>>0]<<1>>>0>=H>>>0?1:a&0!=(l|0));a=((-1<(C|0)?C:0-C|0)<<1)-b+(a<<31>>31)|0;vb(p,l,a,(c[p+156>>2]|0)+-1-(c[36476+(c[p+4600>>2]<<2)>>2]|0)|0);0>(C|0)&&(p=v+10|0,u[p>>0]=(ea[p>>0]|0)+1);a=(a+1-(c[d>>2]|0)>>1)+(c[v>>2]|0)|0;c[v>>2]=a;l=u[f>>0]|0;l<<24>>24!=(u[v+8>>0]|0)?v=l:(c[v>>2]=a>>1,p=(l&255)>>>1,u[f>>0]=
p,v=v+10|0,u[v>>0]=(ea[v>>0]|0)>>>1,v=p);v=(v&255)+1|0;v&=255;u[f>>0]=v}function mc(p){p|=0;var v=0,C=0,a=0,l=0,K=0,H=0,g=0,b=0,d=0,f=0,h=0,e=0,e=F;F=F+32|0;a=e;h=p+144|0;a:do if(c[h>>2]|0)v=p+152|0;else if(C=c[p+136>>2]|0,v=p+152|0,(C|0)==((1<<c[v>>2])+-1|0)&&(xb(a,C,0),(c[a+4>>2]|0)==(c[p+184>>2]|0))&&(c[a+8>>2]|0)==(c[p+188>>2]|0)&&(c[a+12>>2]|0)==(c[p+192>>2]|0))switch(c[v>>2]|0){case 8:h=c[8900]|0;c[p+4612>>2]=h+(((c[8901]|0)-h|0)>>>1);F=e;return;case 10:h=c[8903]|0;c[p+4612>>2]=h+(((c[8904]|
0)-h|0)>>>1);F=e;return;case 12:h=c[8906]|0;c[p+4612>>2]=h+(((c[8907]|0)-h|0)>>>1);F=e;return;case 16:h=c[8909]|0;c[p+4612>>2]=h+(((c[8910]|0)-h|0)>>>1);F=e;return;default:break a}while(0);f=1<<c[v>>2];C=p+4616|0;a=f<<1;l=p+4620|0;K=c[l>>2]|0;v=c[C>>2]|0;H=K-v|0;a>>>0<=H>>>0?a>>>0<H>>>0&&(g=v+a|0,(K|0)!=(g|0))&&(c[l>>2]=g):(X(C,a-H|0),v=c[C>>2]|0);d=p+4612|0;c[d>>2]=v+f;v=0-f|0;if(!((f|0)<=(v|0))){g=p+192|0;b=p+188|0;H=p+184|0;K=v;do v=c[g>>2]|0,(K|0)>(0-v|0)?(C=c[b>>2]|0,(K|0)>(0-C|0)?(a=c[H>>2]|
0,(K|0)>(0-a|0)?(l=c[h>>2]|0,v=(K|0)>=(0-l|0)?(l|0)<(K|0)?(a|0)<=(K|0)?(C|0)>(K|0)?2:(v|0)>(K|0)?3:4:1:0:-1):v=-2):v=-3):v=-4,u[(c[d>>2]|0)+K>>0]=v,K=K+1|0;while((K|0)!=(f|0))}F=e}function kc(p){p|=0;var v=0,C=0,a=0,l=0,K=0,H=0,b=0,d=0,f=0,h=0,e=0,k=0,u=0,m=0,n=0,q=0,r=0,x=0,I=0,t=0,r=F;F=F+32|0;I=r+12|0;q=r;u=p+156|0;m=(c[u>>2]|0)+4|0;n=1==(c[p+32>>2]|0)?c[p+24>>2]|0:1;v=ia(n<<1,m)|0;c[I>>2]=0;t=I+4|0;c[t>>2]=0;c[I+8>>2]=0;v&&(0>(v|0)&&(g=0,ta(178,I|0),x=g,g=0,x&1)||(H=6),6!=(H|0)||(C=v<<1,g=0,a=
ca(67,C|0)|0,x=g,g=0,x&1)?(a=J()|0,(v=c[I>>2]|0)||V(a|0),C=c[t>>2]|0,(C|0)!=(v|0)&&(c[t>>2]=C+(~((C+-2-v|0)>>>1)<<1)),Q(v),V(a|0)):(c[I>>2]=a,x=a+(v<<1)|0,c[I+8>>2]=x,Za(a|0,0,C|0)|0,c[t>>2]=x));c[q>>2]=0;x=q+4|0;c[x>>2]=0;c[q+8>>2]=0;if(n)if(1073741823<n>>>0&&(g=0,ta(178,q|0),k=g,g=0,k&1)||(H=16),16!=(H|0)||(l=n<<2,g=0,K=ca(67,l|0)|0,k=g,g=0,k&1)){if(a=J()|0,C=v=c[q>>2]|0)l=c[x>>2]|0,(l|0)!=(v|0)&&(c[x>>2]=l+(~((l+-4-C|0)>>>2)<<2)),Q(v)}else c[q>>2]=K,H=K+(n<<2)|0,c[q+8>>2]=H,Za(K|0,0,l|0)|0,c[x>>
2]=H,H=18;else H=18;if(18==(H|0)){K=p+12|0;a:do if(0<(c[K>>2]|0)){H=p+4580|0;b=(ia(n,m)|0)+1|0;d=p+4584|0;f=p+92|0;h=0<(n|0);e=p+4576|0;k=0;b:for(;;){C=c[I>>2]|0;v=C+2|0;c[H>>2]=v;C=C+(b<<1)|0;c[d>>2]=C;k&1?(c[H>>2]=C,c[d>>2]=v):v=C;l=c[f>>2]|0;g=0;pa(c[(c[l>>2]|0)+12>>2]|0,l|0,v|0,c[u>>2]|0,m|0);l=g;g=0;if(l&1){H=28;break}if(h){v=c[H>>2]|0;C=c[d>>2]|0;a=c[q>>2]|0;l=0;do{c[e>>2]=c[a+(l<<2)>>2];a=c[u>>2]|0;R[v+(a<<1)>>1]=R[v+(a+-1<<1)>>1]|0;R[C+-2>>1]=R[v>>1]|0;g=0;ga(71,p|0,0);a=g;g=0;if(a&1){H=27;
break b}a=c[q>>2]|0;c[a+(l<<2)>>2]=c[e>>2];v=(c[H>>2]|0)+(m<<1)|0;c[H>>2]=v;C=(c[d>>2]|0)+(m<<1)|0;c[d>>2]=C;l=l+1|0}while((l|0)<(n|0))}k=k+1|0;if((k|0)>=(c[K>>2]|0)){H=40;break a}}27==(H|0)?a=J()|0:28==(H|0)&&(a=J()|0)}else H=40;while(0);if(40==(H|0))if(g=0,ta(182,p|0),p=g,g=0,p&1)a=J()|0;else{if(C=v=c[q>>2]|0)a=c[x>>2]|0,(a|0)!=(v|0)&&(c[x>>2]=a+(~((a+-4-C|0)>>>2)<<2)),Q(v);v=c[I>>2]|0;if(!v){F=r;return}C=c[t>>2]|0;(C|0)!=(v|0)&&(c[t>>2]=C+(~((C+-2-v|0)>>>1)<<1));Q(v);F=r;return}if(C=v=c[q>>2]|
0)l=c[x>>2]|0,(l|0)!=(v|0)&&(c[x>>2]=l+(~((l+-4-C|0)>>>2)<<2)),Q(v)}(v=c[I>>2]|0)||V(a|0);C=c[t>>2]|0;(C|0)!=(v|0)&&(c[t>>2]=C+(~((C+-2-v|0)>>>1)<<1));Q(v);V(a|0)}function mb(p,v,C,a,l){p|=0;v|=0;var K=0,H=0,g=0,b=0,d=0,f=0,h=0,e=0,k=0,u=0,u=v>>31,b=(u^v)-u|0,k=p+172+(12*b|0)+10|0,H=R[k>>1]|0,e=p+172+(12*b|0)|0;l=c[e>>2]|0;if((H|0)<(l|0))if((H<<1|0)<(l|0))if((H<<2|0)<(l|0))if((H<<3|0)<(l|0))if((H<<4|0)<(l|0))for(K=5;;)if((H<<K|0)<(l|0))K=K+1|0;else break;else K=4;else K=3;else K=2;else K=1;else K=
0;h=p+172+(12*b|0)+8|0;l=(R[h>>1]^u)-u+(a|0)|0;f=(l&65535|0)==(l|0)?l:l>>31&65535^65535;g=((C|0)-f^u)-u<<16;d=g>>16;l=K?0:(c[p+172+(12*b|0)+4>>2]<<1)+-1+H>>31;a=l^d;a=a>>30^a<<1;l=a>>K;47>(l|0)?(30<(l|0)&&(H=(l|0)/2|0,U(p,0,H),l=l-H|0),U(p,1,l+1|0),U(p,a&(1<<K)+-1,K)):(U(p,0,31),U(p,1,17),U(p,a+65535&65535,16));a=p+172+(12*b|0)+4|0;H=R[k>>1]|0;l=64==H<<16>>16;K=l&1;C=(c[a>>2]|0)+d>>K;H=l?32:H<<16>>16;c[e>>2]=(c[e>>2]|0)+(-65536<(g|0)?d:0-d|0)>>K;K=H+1|0;R[k>>1]=K;l=K+C|0;if(1>(l|0))return k=R[h>>
1]|0,R[h>>1]=(k&65535)-(-128<k<<16>>16&1),c[a>>2]=(l|0)>(~H|0)?l:0-H|0,v=f+(v>>>31)|0,v=v+(d^u)|0,v&=65535,v|0;if(0>=(C|0))return k=C,c[a>>2]=k,u^=d,v>>>=31,v=f+v|0,v=v+u|0,v&=65535,v|0;k=C-K|0;e=R[h>>1]|0;R[h>>1]=(127>e<<16>>16&1)+(e&65535);k=0<(k|0)?0:k;c[a>>2]=k;u^=d;v>>>=31;v=f+v|0;v=v+u|0;v&=65535;return v|0}function ib(p,v,C){p|=0;v|=0;for(var a=0,l=0,K=0,H=0,g=0,b=0,d=0,f=0,H=(c[p+156>>2]|0)-v|0,g=c[p+4584>>2]|0,d=c[p+4580>>2]|0,l=R[g+(v+-1<<1)>>1]|0,a=0;;){C=g+(a+v<<1)|0;if((R[C>>1]|0)!=l<<
16>>16){f=a;break}R[C>>1]=l;a=a+1|0;if((a|0)==(H|0)){f=H;break}}K=l&65535;l=(f|0)==(H|0);b=p+4576|0;a=c[36476+(c[b>>2]<<2)>>2]|0;if((1<<a|0)>(f|0))C=f;else{C=f;do U(p,1,1),a=c[b>>2]|0,C=C-(1<<c[36476+(a<<2)>>2])|0,a=30<(a|0)?31:a+1|0,c[b>>2]=a,a=c[36476+(a<<2)>>2]|0;while((C|0)>=(1<<a|0))}if(l){if(!C)return H|0;U(p,1,1);return H|0}U(p,C,a+1|0);C=f+v|0;l=g+(C<<1)|0;a=oa[l>>1]|0;C=oa[d+(C<<1)>>1]|0;d=K-C|0;1>((-1<(d|0)?d:0-d|0)|0)?(C=a-K<<16>>16,ic(p,p+4564|0,C),C=C+K|0):(d=C-K>>31|1,v=(ia(a-C<<16,
d)|0)>>16,ic(p,p+4552|0,v),C=(ia(v,d)|0)+C|0);R[l>>1]=C;p=c[b>>2]|0;c[b>>2]=1>(p|0)?0:p+-1|0;return f+1|0}function ic(p,v,C){p|=0;v|=0;C|=0;var a=0,l=0,K=0,H=0,g=0,b=0,d=0,f=0,f=v+9|0,H=ea[f>>0]|0,d=v+4|0,b=c[d>>2]|0,l=(ia(H>>>1,b)|0)+(c[v>>2]|0)|0;if((H|0)<(l|0)){K=H;a=0;do K<<=1,a=a+1|0;while((K|0)<(l|0));l=a}else l=0;0<(C|0)&0==(l|0)&&ea[v+10>>0]<<1>>>0<H>>>0?a=1:g=5;5==(g|0)&&(a=(a=0>(C|0))&&ea[v+10>>0]<<1>>>0>=H>>>0?1:a&0!=(l|0));a=((-1<(C|0)?C:0-C|0)<<1)-b+(a<<31>>31)|0;K=63-(c[36476+(c[p+4576>>
2]<<2)>>2]|0)|0;p|=0;l|=0;H=a|0;K|=0;b=g=0;g=H>>l;b=K+-16|0;(g|0)<(K+-17|0)?(30<(g|0)&&(K=(g|0)/2|0,U(p,0,K),g=g-K|0),U(p,1,g+1|0),U(p,(1<<l)+-1&H,l)):(31<(b|0)?(U(p,0,31),U(p,1,K+-47|0)):U(p,1,b),U(p,H+65535&65535,16));0>(C|0)&&(p=v+10|0,u[p>>0]=(ea[p>>0]|0)+1);a=(a+1-(c[d>>2]|0)>>1)+(c[v>>2]|0)|0;c[v>>2]=a;l=u[f>>0]|0;l<<24>>24!=(u[v+8>>0]|0)?v=l:(c[v>>2]=a>>1,p=(l&255)>>>1,u[f>>0]=p,v=v+10|0,u[v>>0]=(ea[v>>0]|0)>>>1,v=p);v=(v&255)+1|0;v&=255;u[f>>0]=v}function db(p){p|=0;var v=0,C=0,a=0,l=0,K=
0,H=0,b=0,d=0,f=0,h=0,e=0,k=0,u=0,m=0,n=0,q=0,r=0,x=0,I=0,t=0,r=F;F=F+32|0;I=r+12|0;q=r;u=p+156|0;m=(c[u>>2]|0)+4|0;n=1==(c[p+32>>2]|0)?c[p+24>>2]|0:1;v=ia(n<<1,m)|0;c[I>>2]=0;t=I+4|0;c[t>>2]=0;c[I+8>>2]=0;v&&(0>(v|0)&&(g=0,ta(178,I|0),x=g,g=0,x&1)||(H=6),6!=(H|0)||(C=v<<1,g=0,a=ca(67,C|0)|0,x=g,g=0,x&1)?(a=J()|0,(v=c[I>>2]|0)||V(a|0),C=c[t>>2]|0,(C|0)!=(v|0)&&(c[t>>2]=C+(~((C+-2-v|0)>>>1)<<1)),Q(v),V(a|0)):(c[I>>2]=a,x=a+(v<<1)|0,c[I+8>>2]=x,Za(a|0,0,C|0)|0,c[t>>2]=x));c[q>>2]=0;x=q+4|0;c[x>>2]=
0;c[q+8>>2]=0;if(n)if(1073741823<n>>>0&&(g=0,ta(178,q|0),k=g,g=0,k&1)||(H=16),16!=(H|0)||(l=n<<2,g=0,K=ca(67,l|0)|0,k=g,g=0,k&1)){if(a=J()|0,C=v=c[q>>2]|0)l=c[x>>2]|0,(l|0)!=(v|0)&&(c[x>>2]=l+(~((l+-4-C|0)>>>2)<<2)),Q(v)}else c[q>>2]=K,H=K+(n<<2)|0,c[q+8>>2]=H,Za(K|0,0,l|0)|0,c[x>>2]=H,H=18;else H=18;if(18==(H|0)){K=p+12|0;a:do if(0<(c[K>>2]|0)){H=p+4580|0;b=(ia(n,m)|0)+1|0;d=p+4584|0;f=p+92|0;h=0<(n|0);e=p+4576|0;k=0;b:for(;;){C=c[I>>2]|0;v=C+2|0;c[H>>2]=v;C=C+(b<<1)|0;c[d>>2]=C;k&1?(c[H>>2]=C,c[d>>
2]=v):v=C;l=c[f>>2]|0;g=0;pa(c[(c[l>>2]|0)+12>>2]|0,l|0,v|0,c[u>>2]|0,m|0);l=g;g=0;if(l&1){H=28;break}if(h){v=c[H>>2]|0;C=c[d>>2]|0;a=c[q>>2]|0;l=0;do{c[e>>2]=c[a+(l<<2)>>2];a=c[u>>2]|0;R[v+(a<<1)>>1]=R[v+(a+-1<<1)>>1]|0;R[C+-2>>1]=R[v>>1]|0;g=0;ga(72,p|0,0);a=g;g=0;if(a&1){H=27;break b}a=c[q>>2]|0;c[a+(l<<2)>>2]=c[e>>2];v=(c[H>>2]|0)+(m<<1)|0;c[H>>2]=v;C=(c[d>>2]|0)+(m<<1)|0;c[d>>2]=C;l=l+1|0}while((l|0)<(n|0))}k=k+1|0;if((k|0)>=(c[K>>2]|0)){H=40;break a}}27==(H|0)?a=J()|0:28==(H|0)&&(a=J()|0)}else H=
40;while(0);if(40==(H|0))if(g=0,ta(182,p|0),p=g,g=0,p&1)a=J()|0;else{if(C=v=c[q>>2]|0)a=c[x>>2]|0,(a|0)!=(v|0)&&(c[x>>2]=a+(~((a+-4-C|0)>>>2)<<2)),Q(v);v=c[I>>2]|0;if(!v){F=r;return}C=c[t>>2]|0;(C|0)!=(v|0)&&(c[t>>2]=C+(~((C+-2-v|0)>>>1)<<1));Q(v);F=r;return}if(C=v=c[q>>2]|0)l=c[x>>2]|0,(l|0)!=(v|0)&&(c[x>>2]=l+(~((l+-4-C|0)>>>2)<<2)),Q(v)}(v=c[I>>2]|0)||V(a|0);C=c[t>>2]|0;(C|0)!=(v|0)&&(c[t>>2]=C+(~((C+-2-v|0)>>>1)<<1));Q(v);V(a|0)}function qb(p,v,a,T,l){p|=0;v|=0;var K=0,g=0,b=0,d=0,f=0,h=0,e=0,
k=0,u=0,m=0,m=v>>31,d=(m^v)-m|0,u=p+172+(12*d|0)+10|0,g=R[u>>1]|0,k=p+172+(12*d|0)|0;l=c[k>>2]|0;if((g|0)<(l|0))if((g<<1|0)<(l|0))if((g<<2|0)<(l|0))if((g<<3|0)<(l|0))if((g<<4|0)<(l|0))for(K=5;;)if((g<<K|0)<(l|0))K=K+1|0;else break;else K=4;else K=3;else K=2;else K=1;else K=0;e=p+172+(12*d|0)+8|0;l=(R[e>>1]^m)-m+(T|0)|0;h=(l&4095|0)==(l|0)?l:l>>31&4095^4095;b=((a|0)-h^m)-m<<20;f=b>>20;l=K?0:(c[p+172+(12*d|0)+4>>2]<<1)+-1+g>>31;T=l^f;T=T>>30^T<<1;l=T>>K;35>(l|0)?(30<(l|0)&&(g=(l|0)/2|0,U(p,0,g),l=l-
g|0),U(p,1,l+1|0),U(p,T&(1<<K)+-1,K)):(U(p,0,31),U(p,1,5),U(p,T+4095&4095,12));T=p+172+(12*d|0)+4|0;g=R[u>>1]|0;l=64==g<<16>>16;K=l&1;a=(c[T>>2]|0)+f>>K;g=l?32:g<<16>>16;c[k>>2]=(c[k>>2]|0)+(-1048576<(b|0)?f:0-f|0)>>K;K=g+1|0;R[u>>1]=K;l=K+a|0;if(1>(l|0))return u=R[e>>1]|0,R[e>>1]=(u&65535)-(-128<u<<16>>16&1),c[T>>2]=(l|0)>(~g|0)?l:0-g|0,v=h+(v>>>31)|0,v=v+(f^m)|0,v&=4095,v&=65535,v|0;if(0>=(a|0))return u=a,c[T>>2]=u,m^=f,v>>>=31,v=h+v|0,v=v+m|0,v&=4095,v&=65535,v|0;u=a-K|0;k=R[e>>1]|0;R[e>>1]=(127>
k<<16>>16&1)+(k&65535);u=0<(u|0)?0:u;c[T>>2]=u;m^=f;v>>>=31;v=h+v|0;v=v+m|0;v&=4095;v&=65535;return v|0}function jb(p,v,a){p|=0;v|=0;for(var T=0,l=0,K=0,g=0,b=0,d=0,f=0,h=0,g=(c[p+156>>2]|0)-v|0,b=c[p+4584>>2]|0,f=c[p+4580>>2]|0,l=R[b+(v+-1<<1)>>1]|0,T=0;;){a=b+(T+v<<1)|0;if((R[a>>1]|0)!=l<<16>>16){h=T;break}R[a>>1]=l;T=T+1|0;if((T|0)==(g|0)){h=g;break}}K=l&65535;l=(h|0)==(g|0);d=p+4576|0;T=c[36476+(c[d>>2]<<2)>>2]|0;if((1<<T|0)>(h|0))a=h;else{a=h;do U(p,1,1),T=c[d>>2]|0,a=a-(1<<c[36476+(T<<2)>>2])|
0,T=30<(T|0)?31:T+1|0,c[d>>2]=T,T=c[36476+(T<<2)>>2]|0;while((a|0)>=(1<<T|0))}if(l){if(!a)return g|0;U(p,1,1);return g|0}U(p,a,T+1|0);a=h+v|0;l=b+(a<<1)|0;T=oa[l>>1]|0;a=oa[f+(a<<1)>>1]|0;f=K-a|0;1>((-1<(f|0)?f:0-f|0)|0)?(a=T-K<<20>>20,nc(p,p+4564|0,a),a=a+K|0):(f=a-K>>31|1,v=(ia(T-a<<20,f)|0)>>20,nc(p,p+4552|0,v),a=(ia(v,f)|0)+a|0);R[l>>1]=a&4095;p=c[d>>2]|0;c[d>>2]=1>(p|0)?0:p+-1|0;return h+1|0}function nc(p,v,a){p|=0;v|=0;a|=0;var T=0,l=0,g=0,H=0,b=0,d=0,f=0,h=0,h=v+9|0,H=ea[h>>0]|0,f=v+4|0,d=
c[f>>2]|0,l=(ia(H>>>1,d)|0)+(c[v>>2]|0)|0;if((H|0)<(l|0)){g=H;T=0;do g<<=1,T=T+1|0;while((g|0)<(l|0));l=T}else l=0;0<(a|0)&0==(l|0)&&ea[v+10>>0]<<1>>>0<H>>>0?T=1:b=5;5==(b|0)&&(T=(T=0>(a|0))&&ea[v+10>>0]<<1>>>0>=H>>>0?1:T&0!=(l|0));T=((-1<(a|0)?a:0-a|0)<<1)-d+(T<<31>>31)|0;g=47-(c[36476+(c[p+4576>>2]<<2)>>2]|0)|0;p|=0;l|=0;H=T|0;g|=0;d=b=0;b=H>>l;d=g+-12|0;(b|0)<(g+-13|0)?(30<(b|0)&&(g=(b|0)/2|0,U(p,0,g),b=b-g|0),U(p,1,b+1|0),U(p,(1<<l)+-1&H,l)):(31<(d|0)?(U(p,0,31),U(p,1,g+-43|0)):U(p,1,d),U(p,H+
4095&4095,12));0>(a|0)&&(p=v+10|0,u[p>>0]=(ea[p>>0]|0)+1);T=(T+1-(c[f>>2]|0)>>1)+(c[v>>2]|0)|0;c[v>>2]=T;l=u[h>>0]|0;l<<24>>24!=(u[v+8>>0]|0)?v=l:(c[v>>2]=T>>1,p=(l&255)>>>1,u[h>>0]=p,v=v+10|0,u[v>>0]=(ea[v>>0]|0)>>>1,v=p);v=(v&255)+1|0;v&=255;u[h>>0]=v}function wb(p){p|=0;var v=0,a=0,T=0,l=0,K=0,H=0,b=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,S=0,I=0,r=F;F=F+32|0;S=r+12|0;q=r;k=p+156|0;m=(c[k>>2]|0)+4|0;n=1==(c[p+32>>2]|0)?c[p+24>>2]|0:1;v=ia(n<<1,m)|0;c[S>>2]=0;I=S+4|0;c[I>>2]=0;c[S+8>>2]=0;a:do if(v){0>
(v|0)&&(g=0,ta(178,S|0),x=g,g=0,x&1)||(K=6);if(6==(K|0)&&(g=0,a=ca(67,v|0)|0,x=g,g=0,!(x&1)))for(c[I>>2]=a,c[S>>2]=a,c[S+8>>2]=a+v;;)if(u[a>>0]=0,a=(c[I>>2]|0)+1|0,c[I>>2]=a,v=v+-1|0,!v)break a;a=J()|0;(v=c[S>>2]|0)||V(a|0);(c[I>>2]|0)!=(v|0)&&(c[I>>2]=v);Q(v);V(a|0)}while(0);c[q>>2]=0;x=q+4|0;c[x>>2]=0;c[q+8>>2]=0;if(n)if(1073741823<n>>>0&&(g=0,ta(178,q|0),e=g,g=0,e&1)||(K=17),17!=(K|0)||(T=n<<2,g=0,l=ca(67,T|0)|0,e=g,g=0,e&1)){if(a=J()|0,T=v=c[q>>2]|0)l=c[x>>2]|0,(l|0)!=(v|0)&&(c[x>>2]=l+(~((l+
-4-T|0)>>>2)<<2)),Q(v)}else c[q>>2]=l,K=l+(n<<2)|0,c[q+8>>2]=K,Za(l|0,0,T|0)|0,c[x>>2]=K,K=19;else K=19;if(19==(K|0)){l=p+12|0;a:do if(0<(c[l>>2]|0)){K=p+4580|0;H=(ia(n,m)|0)+1|0;b=p+4584|0;d=p+92|0;f=0<(n|0);h=p+4576|0;e=0;b:for(;;){a=c[S>>2]|0;v=a+1|0;c[K>>2]=v;a=a+H|0;c[b>>2]=a;e&1?(c[K>>2]=a,c[b>>2]=v):v=a;T=c[d>>2]|0;g=0;pa(c[(c[T>>2]|0)+12>>2]|0,T|0,v|0,c[k>>2]|0,m|0);T=g;g=0;if(T&1){K=29;break}if(f){v=c[K>>2]|0;a=c[q>>2]|0;T=0;do{c[h>>2]=c[a+(T<<2)>>2];a=c[k>>2]|0;u[v+a>>0]=u[v+(a+-1)>>0]|
0;u[(c[b>>2]|0)+-1>>0]=u[c[K>>2]>>0]|0;g=0;ga(73,p|0,0);a=g;g=0;if(a&1){K=28;break b}a=c[q>>2]|0;c[a+(T<<2)>>2]=c[h>>2];v=(c[K>>2]|0)+m|0;c[K>>2]=v;c[b>>2]=(c[b>>2]|0)+m;T=T+1|0}while((T|0)<(n|0))}e=e+1|0;if((e|0)>=(c[l>>2]|0)){K=41;break a}}28==(K|0)?a=J()|0:29==(K|0)&&(a=J()|0)}else K=41;while(0);if(41==(K|0))if(g=0,ta(182,p|0),p=g,g=0,p&1)a=J()|0;else{if(a=v=c[q>>2]|0)T=c[x>>2]|0,(T|0)!=(v|0)&&(c[x>>2]=T+(~((T+-4-a|0)>>>2)<<2)),Q(v);v=c[S>>2]|0;if(!v){F=r;return}(c[I>>2]|0)!=(v|0)&&(c[I>>2]=v);
Q(v);F=r;return}if(T=v=c[q>>2]|0)l=c[x>>2]|0,(l|0)!=(v|0)&&(c[x>>2]=l+(~((l+-4-T|0)>>>2)<<2)),Q(v)}(v=c[S>>2]|0)||V(a|0);(c[I>>2]|0)!=(v|0)&&(c[I>>2]=v);Q(v);V(a|0)}function Ab(p,v,a,T,l){p|=0;v|=0;var g=0,H=0,b=0,d=0,f=0,h=0,e=0,k=0,u=0,m=0,m=v>>31,d=(m^v)-m|0,u=p+172+(12*d|0)+10|0,H=R[u>>1]|0,k=p+172+(12*d|0)|0;l=c[k>>2]|0;if((H|0)<(l|0))if((H<<1|0)<(l|0))if((H<<2|0)<(l|0))if((H<<3|0)<(l|0))if((H<<4|0)<(l|0))for(g=5;;)if((H<<g|0)<(l|0))g=g+1|0;else break;else g=4;else g=3;else g=2;else g=1;else g=
0;e=p+172+(12*d|0)+8|0;l=(R[e>>1]^m)-m+(T|0)|0;h=(l&255|0)==(l|0)?l:l>>31&255^255;b=((a|0)-h^m)-m<<24;f=b>>24;l=g?0:(c[p+172+(12*d|0)+4>>2]<<1)+-1+H>>31;l^=f;l=l>>30^l<<1;T=l>>g;23>(T|0)?(U(p,1,T+1|0),U(p,l&(1<<g)+-1,g)):(U(p,1,24),U(p,l+255&255,8));T=p+172+(12*d|0)+4|0;H=R[u>>1]|0;l=64==H<<16>>16;g=l&1;a=(c[T>>2]|0)+f>>g;H=l?32:H<<16>>16;c[k>>2]=(c[k>>2]|0)+(-16777216<(b|0)?f:0-f|0)>>g;g=H+1|0;R[u>>1]=g;l=g+a|0;if(1>(l|0))return u=R[e>>1]|0,R[e>>1]=(u&65535)-(-128<u<<16>>16&1),c[T>>2]=(l|0)>(~H|
0)?l:0-H|0,v=h+(v>>>31)|0,v=v+(f^m)|0,v&=255,v|0;if(0>=(a|0))return u=a,c[T>>2]=u,m^=f,v>>>=31,v=h+v|0,v=v+m|0,v&=255,v|0;u=a-g|0;k=R[e>>1]|0;R[e>>1]=(127>k<<16>>16&1)+(k&65535);u=0<(u|0)?0:u;c[T>>2]=u;m^=f;v>>>=31;v=h+v|0;v=v+m|0;v&=255;return v|0}function ob(p,v,a){p|=0;v|=0;for(var T=0,l=0,g=0,H=0,b=0,d=0,f=0,h=0,H=(c[p+156>>2]|0)-v|0,b=c[p+4584>>2]|0,f=c[p+4580>>2]|0,l=u[b+(v+-1)>>0]|0,T=0;;){a=b+(T+v)|0;if((u[a>>0]|0)!=l<<24>>24){h=T;break}u[a>>0]=l;T=T+1|0;if((T|0)==(H|0)){h=H;break}}g=l&255;
l=(h|0)==(H|0);d=p+4576|0;T=c[36476+(c[d>>2]<<2)>>2]|0;if((1<<T|0)>(h|0))a=h;else{a=h;do U(p,1,1),T=c[d>>2]|0,a=a-(1<<c[36476+(T<<2)>>2])|0,T=30<(T|0)?31:T+1|0,c[d>>2]=T,T=c[36476+(T<<2)>>2]|0;while((a|0)>=(1<<T|0))}if(l){if(!a)return H|0;U(p,1,1);return H|0}U(p,a,T+1|0);a=h+v|0;l=b+a|0;T=ea[l>>0]|0;a=ea[f+a>>0]|0;f=g-a|0;1>((-1<(f|0)?f:0-f|0)|0)?(a=T-g<<24>>24,Gb(p,p+4564|0,a),a=a+g|0):(f=a-g>>31|1,v=(ia(T-a<<24,f)|0)>>24,Gb(p,p+4552|0,v),a=(ia(v,f)|0)+a|0);u[l>>0]=a;p=c[d>>2]|0;c[d>>2]=1>(p|0)?
0:p+-1|0;return h+1|0}function Gb(p,v,a){p|=0;v|=0;a|=0;var T=0,l=0,g=0,H=0,b=0,d=0,f=0,h=0,h=v+9|0,H=ea[h>>0]|0,f=v+4|0,d=c[f>>2]|0,l=(ia(H>>>1,d)|0)+(c[v>>2]|0)|0;if((H|0)<(l|0)){g=H;T=0;do g<<=1,T=T+1|0;while((g|0)<(l|0));l=T}else l=0;0<(a|0)&0==(l|0)&&ea[v+10>>0]<<1>>>0<H>>>0?T=1:b=5;5==(b|0)&&(T=(T=0>(a|0))&&ea[v+10>>0]<<1>>>0>=H>>>0?1:T&0!=(l|0));T=((-1<(a|0)?a:0-a|0)<<1)-d+(T<<31>>31)|0;g=31-(c[36476+(c[p+4576>>2]<<2)>>2]|0)|0;p|=0;l|=0;H=T|0;g|=0;d=b=0;b=H>>l;d=g+-8|0;(b|0)<(g+-9|0)?(30<(b|
0)&&(g=(b|0)/2|0,U(p,0,g),b=b-g|0),U(p,1,b+1|0),U(p,(1<<l)+-1&H,l)):(31<(d|0)?(U(p,0,31),U(p,1,g+-39|0)):U(p,1,d),U(p,H+255&255,8));0>(a|0)&&(p=v+10|0,u[p>>0]=(ea[p>>0]|0)+1);T=(T+1-(c[f>>2]|0)>>1)+(c[v>>2]|0)|0;c[v>>2]=T;l=u[h>>0]|0;l<<24>>24!=(u[v+8>>0]|0)?v=l:(c[v>>2]=T>>1,p=(l&255)>>>1,u[h>>0]=p,v=v+10|0,u[v>>0]=(ea[v>>0]|0)>>>1,v=p);v=(v&255)+1|0;v&=255;u[h>>0]=v}function Ib(p){p|=0;var v=0,a=0,T=0,l=0,K=0,H=0,b=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,S=0,I=0,t=0,r=F;F=F+32|0;S=r+12|0;q=r;
k=p+156|0;m=(c[k>>2]|0)+4|0;n=1==(c[p+32>>2]|0)?c[p+24>>2]|0:1;v=ia(n<<1,m)|0;c[S>>2]=0;I=S+4|0;c[I>>2]=0;c[S+8>>2]=0;a:do if(v){1431655765<v>>>0&&(g=0,ta(178,S|0),x=g,g=0,x&1)||(K=6);if(6==(K|0)&&(g=0,a=ca(67,3*v|0)|0,x=g,g=0,!(x&1)))for(c[I>>2]=a,c[S>>2]=a,c[S+8>>2]=a+(3*v|0);;)if(u[a>>0]=0,u[a+1>>0]=0,u[a+2>>0]=0,a=(c[I>>2]|0)+3|0,c[I>>2]=a,v=v+-1|0,!v)break a;T=J()|0;(v=c[S>>2]|0)||V(T|0);a=c[I>>2]|0;(a|0)!=(v|0)&&(c[I>>2]=a+(3*~(((a+-3-v|0)>>>0)/3|0)|0));Q(v);V(T|0)}while(0);c[q>>2]=0;x=q+4|
0;c[x>>2]=0;c[q+8>>2]=0;if(n)if(1073741823<n>>>0&&(g=0,ta(178,q|0),e=g,g=0,e&1)||(K=17),17!=(K|0)||(T=n<<2,g=0,l=ca(67,T|0)|0,e=g,g=0,e&1)){if(T=J()|0,a=v=c[q>>2]|0)l=c[x>>2]|0,(l|0)!=(v|0)&&(c[x>>2]=l+(~((l+-4-a|0)>>>2)<<2)),Q(v)}else c[q>>2]=l,K=l+(n<<2)|0,c[q+8>>2]=K,Za(l|0,0,T|0)|0,c[x>>2]=K,K=19;else K=19;if(19==(K|0)){l=p+12|0;a:do if(0<(c[l>>2]|0)){K=p+4580|0;H=(ia(n,m)|0)+1|0;b=p+4584|0;d=p+92|0;f=0<(n|0);h=p+4576|0;e=0;b:for(;;){T=c[S>>2]|0;v=T+3|0;c[K>>2]=v;a=T+(3*H|0)|0;c[b>>2]=a;e&1?(c[K>>
2]=a,c[b>>2]=v,v=1):v=H;a=c[d>>2]|0;g=0;pa(c[(c[a>>2]|0)+12>>2]|0,a|0,T+(3*v|0)|0,c[k>>2]|0,m|0);T=g;g=0;if(T&1){K=29;break}if(f){v=c[q>>2]|0;a=c[K>>2]|0;T=0;do{c[h>>2]=c[v+(T<<2)>>2];t=c[k>>2]|0;v=a+(3*t|0)|0;a=a+(3*(t+-1|0)|0)|0;u[v>>0]=u[a>>0]|0;u[v+1>>0]=u[a+1>>0]|0;u[v+2>>0]=u[a+2>>0]|0;v=c[K>>2]|0;a=(c[b>>2]|0)+-3|0;u[a>>0]=u[v>>0]|0;u[a+1>>0]=u[v+1>>0]|0;u[a+2>>0]=u[v+2>>0]|0;g=0;ga(74,p|0,0);a=g;g=0;if(a&1){K=28;break b}v=c[q>>2]|0;c[v+(T<<2)>>2]=c[h>>2];a=(c[K>>2]|0)+(3*m|0)|0;c[K>>2]=a;
c[b>>2]=(c[b>>2]|0)+(3*m|0);T=T+1|0}while((T|0)<(n|0))}e=e+1|0;if((e|0)>=(c[l>>2]|0)){K=41;break a}}28==(K|0)?T=J()|0:29==(K|0)&&(T=J()|0)}else K=41;while(0);if(41==(K|0))if(g=0,ta(182,p|0),t=g,g=0,t&1)T=J()|0;else{if(a=v=c[q>>2]|0)T=c[x>>2]|0,(T|0)!=(v|0)&&(c[x>>2]=T+(~((T+-4-a|0)>>>2)<<2)),Q(v);v=c[S>>2]|0;if(!v){F=r;return}a=c[I>>2]|0;(a|0)!=(v|0)&&(c[I>>2]=a+(3*~(((a+-3-v|0)>>>0)/3|0)|0));Q(v);F=r;return}if(a=v=c[q>>2]|0)l=c[x>>2]|0,(l|0)!=(v|0)&&(c[x>>2]=l+(~((l+-4-a|0)>>>2)<<2)),Q(v)}(v=c[S>>
2]|0)||V(T|0);a=c[I>>2]|0;(a|0)!=(v|0)&&(c[I>>2]=a+(3*~(((a+-3-v|0)>>>0)/3|0)|0));Q(v);V(T|0)}function Eb(p,v,a){p|=0;v|=0;for(var T=0,l=0,g=0,b=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,h=(c[p+156>>2]|0)-v|0,e=c[p+4584>>2]|0,k=c[p+4580>>2]|0,f=e+(3*(v+-1|0)|0)|0,m=u[f>>0]|0,d=u[f+1>>0]|0,f=u[f+2>>0]|0,g=0;;){a=e+(3*(g+v|0)|0)|0;T=a+1|0;l=a+2|0;if(!(((u[a>>0]|0)==m<<24>>24?(u[T>>0]|0)==d<<24>>24:0)&(u[l>>0]|0)==f<<24>>24))break;u[a>>0]=m;u[T>>0]=d;u[l>>0]=f;g=g+1|0;if((g|0)==(h|0)){g=h;break}}l=(g|
0)==(h|0);b=p+4576|0;T=c[36476+(c[b>>2]<<2)>>2]|0;if((1<<T|0)>(g|0))a=g;else{a=g;do U(p,1,1),T=c[b>>2]|0,a=a-(1<<c[36476+(T<<2)>>2])|0,T=30<(T|0)?31:T+1|0,c[b>>2]=T,T=c[36476+(T<<2)>>2]|0;while((a|0)>=(1<<T|0))}if(!l)return U(p,a,T+1|0),T=g+v|0,h=e+(3*T|0)|0,e=h+1|0,a=u[e>>0]|0,v=h+2|0,l=u[v>>0]|0,k=k+(3*T|0)|0,T=u[k+1>>0]|0,x=u[k+2>>0]|0,k=ea[k>>0]|0,n=k-(m&255)>>31|1,q=(ia((ea[h>>0]|0)-k<<24,n)|0)>>24,r=p+4552|0,tc(p,r,q),m=T&255,T=m-(d&255)>>31|1,a=(ia((a&255)-m<<24,T)|0)>>24,tc(p,r,a),d=x&255,
f=d-(f&255)>>31|1,l=(ia((l&255)-d<<24,f)|0)>>24,tc(p,r,l),k=(ia(q,n)|0)+k&255,m=(ia(a,T)|0)+m&255,p=(ia(l,f)|0)+d&255,u[h>>0]=k,u[e>>0]=m,u[v>>0]=p,p=c[b>>2]|0,c[b>>2]=1>(p|0)?0:p+-1|0,g+1|0;if(!a)return h|0;U(p,1,1);return h|0}function Fb(p,v,a,T,l){p|=0;v|=0;var g=0,b=0,d=0,f=0,h=0,e=0,k=0,u=0,m=0,n=0,n=v>>31,f=(n^v)-n|0,m=p+172+(12*f|0)+10|0,b=R[m>>1]|0,u=p+172+(12*f|0)|0;l=c[u>>2]|0;if((b|0)<(l|0))if((b<<1|0)<(l|0))if((b<<2|0)<(l|0))if((b<<3|0)<(l|0))if((b<<4|0)<(l|0))for(g=5;;)if((b<<g|0)<(l|
0))g=g+1|0;else break;else g=4;else g=3;else g=2;else g=1;else g=0;k=p+172+(12*f|0)+8|0;l=(R[k>>1]^n)-n+(T|0)|0;e=(l&255|0)==(l|0)?l:l>>31&255^255;d=((a|0)-e^n)-n<<24;h=d>>24;l=g?0:(c[p+172+(12*f|0)+4>>2]<<1)+-1+b>>31;l^=h;l=l>>30^l<<1;T=l>>g;23>(T|0)?(U(p,1,T+1|0),U(p,l&(1<<g)+-1,g)):(U(p,1,24),U(p,l+255&255,8));T=p+172+(12*f|0)+4|0;b=R[m>>1]|0;l=64==b<<16>>16;g=l&1;a=(c[T>>2]|0)+h>>g;b=l?32:b<<16>>16;c[u>>2]=(c[u>>2]|0)+(-16777216<(d|0)?h:0-h|0)>>g;g=b+1|0;R[m>>1]=g;l=g+a|0;if(1>(l|0))return m=
R[k>>1]|0,R[k>>1]=(m&65535)-(-128<m<<16>>16&1),c[T>>2]=(l|0)>(~b|0)?l:0-b|0,v=e+(v>>>31)|0,v=v+(h^n)|0,v&=255,v|0;if(0>=(a|0))return m=a,c[T>>2]=m,n^=h,v>>>=31,v=e+v|0,v=v+n|0,v&=255,v|0;m=a-g|0;u=R[k>>1]|0;R[k>>1]=(127>u<<16>>16&1)+(u&65535);m=0<(m|0)?0:m;c[T>>2]=m;n^=h;v>>>=31;v=e+v|0;v=v+n|0;v&=255;return v|0}function tc(p,v,a){p|=0;v|=0;a|=0;var T=0,l=0,g=0,b=0,d=0,f=0,h=0,e=0,e=v+9|0,b=ea[e>>0]|0,h=v+4|0,f=c[h>>2]|0,l=(ia(b>>>1,f)|0)+(c[v>>2]|0)|0;if((b|0)<(l|0)){g=b;T=0;do g<<=1,T=T+1|0;while((g|
0)<(l|0));l=T}else l=0;0<(a|0)&0==(l|0)&&ea[v+10>>0]<<1>>>0<b>>>0?T=1:d=5;5==(d|0)&&(T=(T=0>(a|0))&&ea[v+10>>0]<<1>>>0>=b>>>0?1:T&0!=(l|0));T=((-1<(a|0)?a:0-a|0)<<1)-f+(T<<31>>31)|0;g=31-(c[36476+(c[p+4576>>2]<<2)>>2]|0)|0;p|=0;l|=0;b=T|0;g|=0;f=d=0;d=b>>l;f=g+-8|0;(d|0)<(g+-9|0)?(30<(d|0)&&(g=(d|0)/2|0,U(p,0,g),d=d-g|0),U(p,1,d+1|0),U(p,(1<<l)+-1&b,l)):(31<(f|0)?(U(p,0,31),U(p,1,g+-39|0)):U(p,1,f),U(p,b+255&255,8));0>(a|0)&&(p=v+10|0,u[p>>0]=(ea[p>>0]|0)+1);T=(T+1-(c[h>>2]|0)>>1)+(c[v>>2]|0)|0;c[v>>
2]=T;l=u[e>>0]|0;l<<24>>24!=(u[v+8>>0]|0)?v=l:(c[v>>2]=T>>1,p=(l&255)>>>1,u[e>>0]=p,v=v+10|0,u[v>>0]=(ea[v>>0]|0)>>>1,v=p);v=(v&255)+1|0;v&=255;u[e>>0]=v}function Tb(p){p|=0;var v=0,a=0,T=0,l=0,b=0,H=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,S=0,I=0,x=F;F=F+32|0;S=x+12|0;r=x;n=p+180|0;q=(c[n>>2]|0)+4|0;k=1==(c[p+32>>2]|0)?c[p+24>>2]|0:1;v=ia(k<<1,q)|0;c[S>>2]=0;I=S+4|0;c[I>>2]=0;c[S+8>>2]=0;a:do if(v){0>(v|0)&&(g=0,ta(178,S|0),t=g,g=0,t&1)||(m=6);if(6==(m|0)&&(g=0,a=ca(67,v|0)|0,t=g,g=0,!(t&1)))for(c[I>>
2]=a,c[S>>2]=a,c[S+8>>2]=a+v;;)if(u[a>>0]=0,a=(c[I>>2]|0)+1|0,c[I>>2]=a,v=v+-1|0,!v)break a;a=J()|0;(v=c[S>>2]|0)||V(a|0);(c[I>>2]|0)!=(v|0)&&(c[I>>2]=v);Q(v);V(a|0)}while(0);c[r>>2]=0;t=r+4|0;c[t>>2]=0;c[r+8>>2]=0;if(k)if(1073741823<k>>>0&&(g=0,ta(178,r|0),e=g,g=0,e&1)||(m=17),17!=(m|0)||(T=k<<2,g=0,l=ca(67,T|0)|0,e=g,g=0,e&1)){if(a=J()|0,T=v=c[r>>2]|0)l=c[t>>2]|0,(l|0)!=(v|0)&&(c[t>>2]=l+(~((l+-4-T|0)>>>2)<<2)),Q(v)}else c[r>>2]=l,m=l+(k<<2)|0,c[r+8>>2]=m,Za(l|0,0,T|0)|0,c[t>>2]=m,m=19;else m=19;
if(19==(m|0)){H=p+12|0;a:do if(0<(c[H>>2]|0))if(d=p+4604|0,f=(ia(k,q)|0)+1|0,h=p+4608|0,e=p+92|0,b=p+4600|0,0<(k|0)){l=0;b:for(;;){a=c[S>>2]|0;v=a+1|0;c[d>>2]=v;a=a+f|0;c[h>>2]=a;l&1?(c[d>>2]=a,c[h>>2]=v):v=a;m=c[e>>2]|0;g=0;pa(c[(c[m>>2]|0)+12>>2]|0,m|0,v|0,c[n>>2]|0,q|0);m=g;g=0;if(m&1){m=28;break}v=c[r>>2]|0;a=c[d>>2]|0;T=0;do{c[b>>2]=c[v+(T<<2)>>2];m=c[n>>2]|0;u[a+m>>0]=u[a+(m+-1)>>0]|0;u[(c[h>>2]|0)+-1>>0]=u[c[d>>2]>>0]|0;g=0;ga(75,p|0,0);m=g;g=0;if(m&1){m=36;break b}v=c[r>>2]|0;c[v+(T<<2)>>
2]=c[b>>2];a=(c[d>>2]|0)+q|0;c[d>>2]=a;c[h>>2]=(c[h>>2]|0)+q;T=T+1|0}while((T|0)<(k|0));l=l+1|0;if((l|0)>=(c[H>>2]|0)){m=45;break a}}28==(m|0)?a=J()|0:36==(m|0)&&(a=J()|0)}else{for(T=0;;){a=c[S>>2]|0;v=a+1|0;c[d>>2]=v;a=a+f|0;c[h>>2]=a;T&1?(c[d>>2]=a,c[h>>2]=v):v=a;k=c[e>>2]|0;g=0;pa(c[(c[k>>2]|0)+12>>2]|0,k|0,v|0,c[n>>2]|0,q|0);k=g;g=0;if(k&1)break;T=T+1|0;if((T|0)>=(c[H>>2]|0)){m=45;break a}}a=J()|0}else m=45;while(0);if(45==(m|0))if(g=0,ta(182,p|0),p=g,g=0,p&1)a=J()|0;else{if(a=v=c[r>>2]|0)T=c[t>>
2]|0,(T|0)!=(v|0)&&(c[t>>2]=T+(~((T+-4-a|0)>>>2)<<2)),Q(v);v=c[S>>2]|0;if(!v){F=x;return}(c[I>>2]|0)!=(v|0)&&(c[I>>2]=v);Q(v);F=x;return}if(T=v=c[r>>2]|0)l=c[t>>2]|0,(l|0)!=(v|0)&&(c[t>>2]=l+(~((l+-4-T|0)>>>2)<<2)),Q(v)}(v=c[S>>2]|0)||V(a|0);(c[I>>2]|0)!=(v|0)&&(c[I>>2]=v);Q(v);V(a|0)}function bc(p,v,a){p|=0;v|=0;var T=0,l=0,g=0,b=0,d=0,f=0,h=0,e=0,f=(c[p+180>>2]|0)-v|0,h=c[p+4608>>2]|0,e=c[p+4604>>2]|0,l=u[h+(v+-1)>>0]|0,d=l&255;a=p+144|0;for(g=0;;){T=h+(g+v)|0;b=(ea[T>>0]|0)-d|0;if(((-1<(b|0)?b:
0-b|0)|0)>(c[a>>2]|0))break;u[T>>0]=l;g=g+1|0;if((g|0)==(f|0)){g=f;break}}l=(g|0)==(f|0);b=p+4600|0;T=c[36476+(c[b>>2]<<2)>>2]|0;if((1<<T|0)>(g|0))a=g;else{a=g;do U(p,1,1),T=c[b>>2]|0,a=a-(1<<c[36476+(T<<2)>>2])|0,T=30<(T|0)?31:T+1|0,c[b>>2]=T,T=c[36476+(T<<2)>>2]|0;while((a|0)>=(1<<T|0))}if(!l){U(p,a,T+1|0);f=g+v|0;v=h+f|0;a=ea[v>>0]|0;f=ea[e+f>>0]|0;p|=0;a|=0;var d=d|0,f=f|0,k=h=l=T=e=0,h=d-f|0,k=p+136|0,l=p+144|0,e=c[l>>2]|0;((-1<(h|0)?h:0-h|0)|0)>(e|0)?(T=f-d>>31|1,a=ia(T,a-f|0)|0,a=0<(a|0)?(e+
a|0)/(e<<1|1)|0:(a-e|0)/(e<<1|1)|0,h=p+140|0,e=c[h>>2]|0,d=(0>(a|0)?e:0)+a|0,e=d-((d|0)<((e+1|0)/2|0)?0:e)|0,hc(p,p+4576|0,e),e=ia(e,T)|0,T=c[l>>2]|0,l=T<<1|1,e=(ia(e,l)|0)+f|0):(a=a-d|0,a=0<(a|0)?(e+a|0)/(e<<1|1)|0:(a-e|0)/(e<<1|1)|0,h=p+140|0,e=c[h>>2]|0,T=(0>(a|0)?e:0)+a|0,e=T-((T|0)<((e+1|0)/2|0)?0:e)|0,hc(p,p+4588|0,e),T=c[l>>2]|0,l=T<<1|1,e=(ia(l,e)|0)+d|0);(e|0)>=(0-T|0)?(a=c[k>>2]|0,(a+T|0)<(e|0)&&(e=e-(ia(c[h>>2]|0,l)|0)|0)):(e=(ia(c[h>>2]|0,l)|0)+e|0,a=c[k>>2]|0);k=((e&a|0)==(e|0)?e:a&~(e>>
31))&255;a=k|0;u[v>>0]=a|0;p=c[b>>2]|0;c[b>>2]=1>(p|0)?0:p+-1|0;return g+1|0}if(!a)return f|0;U(p,1,1);return f|0}function hc(p,v,a){p|=0;v|=0;a|=0;var T=0,l=0,g=0,b=0,d=0,f=0,h=0,e=0,e=v+9|0,b=ea[e>>0]|0,h=v+4|0,f=c[h>>2]|0,l=(ia(b>>>1,f)|0)+(c[v>>2]|0)|0;if((b|0)<(l|0)){g=b;T=0;do g<<=1,T=T+1|0;while((g|0)<(l|0));l=T}else l=0;0<(a|0)&0==(l|0)&&ea[v+10>>0]<<1>>>0<b>>>0?T=1:d=5;5==(d|0)&&(T=(T=0>(a|0))&&ea[v+10>>0]<<1>>>0>=b>>>0?1:T&0!=(l|0));T=((-1<(a|0)?a:0-a|0)<<1)-f+(T<<31>>31)|0;Qb(p,l,T,(c[p+
156>>2]|0)+-1-(c[36476+(c[p+4600>>2]<<2)>>2]|0)|0);0>(a|0)&&(p=v+10|0,u[p>>0]=(ea[p>>0]|0)+1);T=(T+1-(c[h>>2]|0)>>1)+(c[v>>2]|0)|0;c[v>>2]=T;l=u[e>>0]|0;l<<24>>24!=(u[v+8>>0]|0)?v=l:(c[v>>2]=T>>1,p=(l&255)>>>1,u[e>>0]=p,v=v+10|0,u[v>>0]=(ea[v>>0]|0)>>>1,v=p);v=(v&255)+1|0;v&=255;u[e>>0]=v}function Qb(p,v,a,T){p|=0;v|=0;a|=0;T|=0;var l=0,g=0,b=0,l=a>>v,g=p+148|0,b=T-(c[g>>2]|0)|0;(l|0)<(b+-1|0)?(30<(l|0)&&(T=(l|0)/2|0,U(p,0,T),l=l-T|0),U(p,1,l+1|0),U(p,(1<<v)+-1&a,v)):(31<(b|0)?(U(p,0,31),U(p,1,T+
-31-(c[g>>2]|0)|0)):U(p,1,b),v=c[g>>2]|0,U(p,(1<<v)+-1&a+-1,v))}function Rb(p){p|=0;var v=0,a=0,T=0,l=0,g=0,b=0,d=0,f=0,h=0,e=0,k=0,m=0,m=F;F=F+32|0;T=m;k=p+144|0;a:do if(c[k>>2]|0)v=p+152|0;else if(a=c[p+136>>2]|0,v=p+152|0,(a|0)==((1<<c[v>>2])+-1|0)&&(xb(T,a,0),(c[T+4>>2]|0)==(c[p+184>>2]|0))&&(c[T+8>>2]|0)==(c[p+188>>2]|0)&&(c[T+12>>2]|0)==(c[p+192>>2]|0))switch(c[v>>2]|0){case 8:k=c[8900]|0;c[p+4612>>2]=k+(((c[8901]|0)-k|0)>>>1);F=m;return;case 10:k=c[8903]|0;c[p+4612>>2]=k+(((c[8904]|0)-k|0)>>>
1);F=m;return;case 12:k=c[8906]|0;c[p+4612>>2]=k+(((c[8907]|0)-k|0)>>>1);F=m;return;case 16:k=c[8909]|0;c[p+4612>>2]=k+(((c[8910]|0)-k|0)>>>1);F=m;return;default:break a}while(0);e=1<<c[v>>2];a=p+4616|0;T=e<<1;l=p+4620|0;g=c[l>>2]|0;v=c[a>>2]|0;b=g-v|0;T>>>0<=b>>>0?T>>>0<b>>>0&&(d=v+T|0,(g|0)!=(d|0))&&(c[l>>2]=d):(X(a,T-b|0),v=c[a>>2]|0);h=p+4612|0;c[h>>2]=v+e;v=0-e|0;if(!((e|0)<=(v|0))){d=p+192|0;f=p+188|0;b=p+184|0;g=v;do v=c[d>>2]|0,(g|0)>(0-v|0)?(a=c[f>>2]|0,(g|0)>(0-a|0)?(T=c[b>>2]|0,(g|0)>(0-
T|0)?(l=c[k>>2]|0,v=(g|0)>=(0-l|0)?(l|0)<(g|0)?(T|0)<=(g|0)?(a|0)>(g|0)?2:(v|0)>(g|0)?3:4:1:0:-1):v=-2):v=-3):v=-4,u[(c[h>>2]|0)+g>>0]=v,g=g+1|0;while((g|0)!=(e|0))}F=m}function Pb(p,v){p|=0;v|=0;var a=0,T=0,l=0,g=0,b=0,d=0,f=0,h=0,h=v+9|0,a=ea[h>>0]|0,g=v+4|0,l=(ia(a>>>1,c[g>>2]|0)|0)+(c[v>>2]|0)|0;if((a|0)<(l|0)){T=0;do a<<=1,T=T+1|0;while((a|0)<(l|0))}else T=0;b=c[p+148>>2]|0;d=c[36476+(c[p+4592>>2]<<2)>>2]|0;a=c[p+140>>2]|0;l=Ya(p)|0;(l|0)<(b+-2-d-a|0)?T?(d=(Ta(p,T)|0)+(l<<T)|0,T=c[g>>2]|0,l=
d+T|0,a=b=l&1,g=1,l=(b+l|0)/2|0):(T=c[g>>2]|0,p=T+l|0,a=p&1,p=(a+p|0)/2|0,f=8):(l=(Ta(p,a)|0)+1|0,b=c[g>>2]|0,p=l+b|0,a=p&1,p=(a+p|0)/2|0,T?(d=l,g=1,l=p,T=b):(T=b,f=8));8==(f|0)&&(d=l,g=ea[v+10>>0]<<1>>>0>=(ea[h>>0]|0)>>>0,l=p);l=0!=(a|0)^g?l:0-l|0;0>(l|0)&&(f=v+10|0,u[f>>0]=(ea[f>>0]|0)+1);a=(d+1-T>>1)+(c[v>>2]|0)|0;c[v>>2]=a;T=u[h>>0]|0;if(T<<24>>24!=(u[v+8>>0]|0))return v=T&255,v=v+1|0,v&=255,u[h>>0]=v,l|0;c[v>>2]=a>>1;f=(T&255)>>>1;u[h>>0]=f;v=v+10|0;u[v>>0]=(ea[v>>0]|0)>>>1;v=f&255;v=v+1|0;v&=
255;u[h>>0]=v;return l|0}function Ya(p){p|=0;var v=0,a=0,T=0,l=0,g=0,b=0,g=p+112|0;16>(c[g>>2]|0)&&aa(p);b=p+108|0;a=c[b>>2]|0;if(0<=(a|0))if(a&1073741824)v=1;else if(a&536870912)v=2;else if(a&268435456)v=3;else if(a&134217728)v=4;else if(a&67108864)v=5;else if(a&33554432)v=6;else if(a&16777216)v=7;else if(a&8388608)v=8;else if(a&4194304)v=9;else if(a&2097152)v=10;else if(a&1048576)v=11;else if(a&524288)v=12;else if(a&262144)v=13;else if(a&131072)v=14;else{if(l=a>>>12&16,v=l+-1|0,!l){v=(c[g>>2]|0)+
-15|0;c[g>>2]=v;T=a<<15;c[b>>2]=T;a=v;for(v=15;!(1>(a|0)?(aa(p),l=c[b>>2]|0,a=c[g>>2]|0):l=T,a=a+-1|0,c[g>>2]=a,T=l<<1,c[b>>2]=T,0>(l|0));)v=v+1|0;return v|0}}else v=0;p=v+1|0;c[g>>2]=(c[g>>2]|0)-p;c[b>>2]=a<<p;return v|0}function Ta(p,v){p|=0;v|=0;var a=0,T=0,l=0,T=p+112|0,a=c[T>>2]|0;(a|0)<(v|0)&&(aa(p),a=c[T>>2]|0,(a|0)<(v|0)&&(a=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,a|0,5,35648),p=g,g=0,p&1?(p=J()|0,za(a|0),V(p|0)):Pa(a|0,824,96)));l=p+108|0;p=c[l>>2]|0;c[T>>
2]=a-v;c[l>>2]=p<<v;return p>>>(32-v|0)|0}function Hb(p){p|=0;var v=0,a=0,T=0,l=0,g=0,b=0,d=0,f=0,h=0,e=0,k=0,m=0,m=F;F=F+32|0;T=m;k=p+136|0;a:do if(c[k>>2]|0)v=p+144|0;else if(a=c[p+128>>2]|0,v=p+144|0,(a|0)==((1<<c[v>>2])+-1|0)&&(xb(T,a,0),(c[T+4>>2]|0)==(c[p+176>>2]|0))&&(c[T+8>>2]|0)==(c[p+180>>2]|0)&&(c[T+12>>2]|0)==(c[p+184>>2]|0))switch(c[v>>2]|0){case 8:k=c[8900]|0;c[p+4604>>2]=k+(((c[8901]|0)-k|0)>>>1);F=m;return;case 10:k=c[8903]|0;c[p+4604>>2]=k+(((c[8904]|0)-k|0)>>>1);F=m;return;case 12:k=
c[8906]|0;c[p+4604>>2]=k+(((c[8907]|0)-k|0)>>>1);F=m;return;case 16:k=c[8909]|0;c[p+4604>>2]=k+(((c[8910]|0)-k|0)>>>1);F=m;return;default:break a}while(0);e=1<<c[v>>2];a=p+4608|0;T=e<<1;l=p+4612|0;g=c[l>>2]|0;v=c[a>>2]|0;b=g-v|0;T>>>0<=b>>>0?T>>>0<b>>>0&&(d=v+T|0,(g|0)!=(d|0))&&(c[l>>2]=d):(X(a,T-b|0),v=c[a>>2]|0);h=p+4604|0;c[h>>2]=v+e;v=0-e|0;if(!((e|0)<=(v|0))){d=p+184|0;f=p+180|0;b=p+176|0;g=v;do v=c[d>>2]|0,(g|0)>(0-v|0)?(a=c[f>>2]|0,(g|0)>(0-a|0)?(T=c[b>>2]|0,(g|0)>(0-T|0)?(l=c[k>>2]|0,v=(g|
0)>=(0-l|0)?(l|0)<(g|0)?(T|0)<=(g|0)?(a|0)>(g|0)?2:(v|0)>(g|0)?3:4:1:0:-1):v=-2):v=-3):v=-4,u[(c[h>>2]|0)+g>>0]=v,g=g+1|0;while((g|0)!=(e|0))}F=m}function fc(p,v,a,T,l){p|=0;v|=0;var b=0,H=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,q=0,q=v>>31,f=(q^v)-q|0,m=p+188+(12*f|0)+10|0;a=R[m>>1]|0;k=p+188+(12*f|0)|0;l=c[k>>2]|0;if((a|0)<(l|0))if((a<<1|0)<(l|0))if((a<<2|0)<(l|0))if((a<<3|0)<(l|0))if((a<<4|0)<(l|0))for(v=5;;)if((a<<v|0)<(l|0))v=v+1|0;else break;else v=4;else v=3;else v=2;else v=1;else v=0;e=p+188+(12*f|
0)+8|0;a=(R[e>>1]^q)-q+(T|0)|0;n=p+128|0;l=c[n>>2]|0;h=(a&l|0)==(a|0)?a:l&~(a>>31);a=p+112|0;8>(c[a>>2]|0)&&aa(p);l=p+108|0;T=c[l>>2]|0;b=T>>>24;(H=c[2832+(v<<11)+(b<<3)+4>>2]|0)?(c[a>>2]=(c[a>>2]|0)-H,c[l>>2]=T<<H,a=c[2832+(v<<11)+(b<<3)>>2]|0):(d=c[p+148>>2]|0,l=c[p+140>>2]|0,a=Ya(p)|0,(a|0)<(d+-1-l|0)?v&&(a=(Ta(p,v)|0)+(a<<v)|0):a=(Ta(p,l)|0)+1|0,a=a<<31>>31^a>>1,65535<((-1<(a|0)?a:0-a|0)|0)&&(a=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,a|0,5,35648),p=g,g=0,p&1?(p=
J()|0,za(a|0),V(p|0)):Pa(a|0,824,96)));d=p+136|0;T=c[d>>2]|0;v?H=a:(l=T?0:(c[p+188+(12*f|0)+4>>2]<<1)+-1+(R[m>>1]|0)>>31,H=l^a);v=c[p+152>>2]|0;l=(c[k>>2]|0)+(-1<(H|0)?H:0-H|0)|0;b=p+188+(12*f|0)+4|0;a=(c[b>>2]|0)+(ia(T<<1|1,H)|0)|0;T=R[m>>1]|0;(T|0)==(v|0)&&(l>>=1,a>>=1,T=v>>1);c[k>>2]=l;v=T+1|0;R[m>>1]=v;l=v+a|0;1<=(l|0)?0<(a|0)&&(a=a-v|0,m=R[e>>1]|0,R[e>>1]=(127>m<<16>>16&1)+(m&65535),a=0<(a|0)?0:a):(a=R[e>>1]|0,R[e>>1]=(a&65535)-(-128<a<<16>>16&1),a=(l|0)>(~T|0)?l:0-T|0);c[b>>2]=a;v=c[d>>2]|0;
T=v<<1|1;l=(ia(T,(H^q)-q|0)|0)+h|0;(l|0)>=(0-v|0)?(a=c[n>>2]|0,(a+v|0)<(l|0)&&(l=l-(ia(c[p+132>>2]|0,T)|0)|0)):(l=(ia(c[p+132>>2]|0,T)|0)+l|0,a=c[n>>2]|0);if((l&a|0)==(l|0))return p=l&65535,p|0;p=a&~(l>>31)&65535;return p|0}function Wb(p,v){p|=0;v|=0;var a=0,T=0,l=0,g=0,b=0,d=0,f=0,h=0,h=v+9|0,a=ea[h>>0]|0,g=v+4|0,l=(ia(a>>>1,c[g>>2]|0)|0)+(c[v>>2]|0)|0;if((a|0)<(l|0)){T=0;do a<<=1,T=T+1|0;while((a|0)<(l|0))}else T=0;b=c[p+148>>2]|0;d=c[36476+(c[p+4592>>2]<<2)>>2]|0;a=c[p+140>>2]|0;l=Ya(p)|0;(l|0)<
(b+-2-d-a|0)?T?(d=(Ta(p,T)|0)+(l<<T)|0,T=c[g>>2]|0,l=d+T|0,a=b=l&1,g=1,l=(b+l|0)/2|0):(T=c[g>>2]|0,p=T+l|0,a=p&1,p=(a+p|0)/2|0,f=8):(l=(Ta(p,a)|0)+1|0,b=c[g>>2]|0,p=l+b|0,a=p&1,p=(a+p|0)/2|0,T?(d=l,g=1,l=p,T=b):(T=b,f=8));8==(f|0)&&(d=l,g=ea[v+10>>0]<<1>>>0>=(ea[h>>0]|0)>>>0,l=p);l=0!=(a|0)^g?l:0-l|0;0>(l|0)&&(f=v+10|0,u[f>>0]=(ea[f>>0]|0)+1);a=(d+1-T>>1)+(c[v>>2]|0)|0;c[v>>2]=a;T=u[h>>0]|0;if(T<<24>>24!=(u[v+8>>0]|0))return v=T&255,v=v+1|0,v&=255,u[h>>0]=v,l|0;c[v>>2]=a>>1;f=(T&255)>>>1;u[h>>0]=
f;v=v+10|0;u[v>>0]=(ea[v>>0]|0)>>>1;v=f&255;v=v+1|0;v&=255;u[h>>0]=v;return l|0}function wc(p){p|=0;var v=0,a=0,T=0,l=0,g=0,b=0,d=0,f=0,h=0,e=0,k=0,m=0,m=F;F=F+32|0;T=m;k=p+136|0;a:do if(c[k>>2]|0)v=p+144|0;else if(a=c[p+128>>2]|0,v=p+144|0,(a|0)==((1<<c[v>>2])+-1|0)&&(xb(T,a,0),(c[T+4>>2]|0)==(c[p+176>>2]|0))&&(c[T+8>>2]|0)==(c[p+180>>2]|0)&&(c[T+12>>2]|0)==(c[p+184>>2]|0))switch(c[v>>2]|0){case 8:k=c[8900]|0;c[p+4604>>2]=k+(((c[8901]|0)-k|0)>>>1);F=m;return;case 10:k=c[8903]|0;c[p+4604>>2]=k+(((c[8904]|
0)-k|0)>>>1);F=m;return;case 12:k=c[8906]|0;c[p+4604>>2]=k+(((c[8907]|0)-k|0)>>>1);F=m;return;case 16:k=c[8909]|0;c[p+4604>>2]=k+(((c[8910]|0)-k|0)>>>1);F=m;return;default:break a}while(0);e=1<<c[v>>2];a=p+4608|0;T=e<<1;l=p+4612|0;g=c[l>>2]|0;v=c[a>>2]|0;b=g-v|0;T>>>0<=b>>>0?T>>>0<b>>>0&&(d=v+T|0,(g|0)!=(d|0))&&(c[l>>2]=d):(X(a,T-b|0),v=c[a>>2]|0);h=p+4604|0;c[h>>2]=v+e;v=0-e|0;if(!((e|0)<=(v|0))){d=p+184|0;f=p+180|0;b=p+176|0;g=v;do v=c[d>>2]|0,(g|0)>(0-v|0)?(a=c[f>>2]|0,(g|0)>(0-a|0)?(T=c[b>>2]|
0,(g|0)>(0-T|0)?(l=c[k>>2]|0,v=(g|0)>=(0-l|0)?(l|0)<(g|0)?(T|0)<=(g|0)?(a|0)>(g|0)?2:(v|0)>(g|0)?3:4:1:0:-1):v=-2):v=-3):v=-4,u[(c[h>>2]|0)+g>>0]=v,g=g+1|0;while((g|0)!=(e|0))}F=m}function pc(p,v,a,T,l){p|=0;v|=0;var b=0,H=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,q=0,q=v>>31,f=(q^v)-q|0,m=p+188+(12*f|0)+10|0;a=R[m>>1]|0;k=p+188+(12*f|0)|0;l=c[k>>2]|0;if((a|0)<(l|0))if((a<<1|0)<(l|0))if((a<<2|0)<(l|0))if((a<<3|0)<(l|0))if((a<<4|0)<(l|0))for(v=5;;)if((a<<v|0)<(l|0))v=v+1|0;else break;else v=4;else v=3;else v=
2;else v=1;else v=0;e=p+188+(12*f|0)+8|0;a=(R[e>>1]^q)-q+(T|0)|0;n=p+128|0;l=c[n>>2]|0;h=(a&l|0)==(a|0)?a:l&~(a>>31);a=p+112|0;8>(c[a>>2]|0)&&aa(p);l=p+108|0;T=c[l>>2]|0;b=T>>>24;(H=c[2832+(v<<11)+(b<<3)+4>>2]|0)?(c[a>>2]=(c[a>>2]|0)-H,c[l>>2]=T<<H,a=c[2832+(v<<11)+(b<<3)>>2]|0):(d=c[p+148>>2]|0,l=c[p+140>>2]|0,a=Ya(p)|0,(a|0)<(d+-1-l|0)?v&&(a=(Ta(p,v)|0)+(a<<v)|0):a=(Ta(p,l)|0)+1|0,a=a<<31>>31^a>>1,65535<((-1<(a|0)?a:0-a|0)|0)&&(a=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=
0,na(7,a|0,5,35648),p=g,g=0,p&1?(p=J()|0,za(a|0),V(p|0)):Pa(a|0,824,96)));d=p+136|0;T=c[d>>2]|0;v?H=a:(l=T?0:(c[p+188+(12*f|0)+4>>2]<<1)+-1+(R[m>>1]|0)>>31,H=l^a);v=c[p+152>>2]|0;l=(c[k>>2]|0)+(-1<(H|0)?H:0-H|0)|0;b=p+188+(12*f|0)+4|0;a=(c[b>>2]|0)+(ia(T<<1|1,H)|0)|0;T=R[m>>1]|0;(T|0)==(v|0)&&(l>>=1,a>>=1,T=v>>1);c[k>>2]=l;v=T+1|0;R[m>>1]=v;l=v+a|0;1<=(l|0)?0<(a|0)&&(a=a-v|0,m=R[e>>1]|0,R[e>>1]=(127>m<<16>>16&1)+(m&65535),a=0<(a|0)?0:a):(a=R[e>>1]|0,R[e>>1]=(a&65535)-(-128<a<<16>>16&1),a=(l|0)>(~T|
0)?l:0-T|0);c[b>>2]=a;v=c[d>>2]|0;T=v<<1|1;l=(ia(T,(H^q)-q|0)|0)+h|0;(l|0)>=(0-v|0)?(a=c[n>>2]|0,(a+v|0)<(l|0)&&(l=l-(ia(c[p+132>>2]|0,T)|0)|0)):(l=(ia(c[p+132>>2]|0,T)|0)+l|0,a=c[n>>2]|0);if((l&a|0)==(l|0))return p=l&255,p|0;p=a&~(l>>31)&255;return p|0}function qc(p,v){p|=0;v|=0;var a=0,T=0,l=0,g=0,b=0,d=0,f=0,h=0,h=v+9|0,a=ea[h>>0]|0,g=v+4|0,l=(ia(a>>>1,c[g>>2]|0)|0)+(c[v>>2]|0)|0;if((a|0)<(l|0)){T=0;do a<<=1,T=T+1|0;while((a|0)<(l|0))}else T=0;b=c[p+148>>2]|0;d=c[36476+(c[p+4592>>2]<<2)>>2]|0;
a=c[p+140>>2]|0;l=Ya(p)|0;(l|0)<(b+-2-d-a|0)?T?(d=(Ta(p,T)|0)+(l<<T)|0,T=c[g>>2]|0,l=d+T|0,a=b=l&1,g=1,l=(b+l|0)/2|0):(T=c[g>>2]|0,p=T+l|0,a=p&1,p=(a+p|0)/2|0,f=8):(l=(Ta(p,a)|0)+1|0,b=c[g>>2]|0,p=l+b|0,a=p&1,p=(a+p|0)/2|0,T?(d=l,g=1,l=p,T=b):(T=b,f=8));8==(f|0)&&(d=l,g=ea[v+10>>0]<<1>>>0>=(ea[h>>0]|0)>>>0,l=p);l=0!=(a|0)^g?l:0-l|0;0>(l|0)&&(f=v+10|0,u[f>>0]=(ea[f>>0]|0)+1);a=(d+1-T>>1)+(c[v>>2]|0)|0;c[v>>2]=a;T=u[h>>0]|0;if(T<<24>>24!=(u[v+8>>0]|0))return v=T&255,v=v+1|0,v&=255,u[h>>0]=v,l|0;c[v>>
2]=a>>1;f=(T&255)>>>1;u[h>>0]=f;v=v+10|0;u[v>>0]=(ea[v>>0]|0)>>>1;v=f&255;v=v+1|0;v&=255;u[h>>0]=v;return l|0}function xc(p){p|=0;var v=0,a=0,T=0,l=0,g=0,b=0,d=0,f=0,h=0,e=0,k=0,m=0,m=F;F=F+32|0;T=m;k=p+136|0;a:do if(c[k>>2]|0)v=p+144|0;else if(a=c[p+128>>2]|0,v=p+144|0,(a|0)==((1<<c[v>>2])+-1|0)&&(xb(T,a,0),(c[T+4>>2]|0)==(c[p+176>>2]|0))&&(c[T+8>>2]|0)==(c[p+180>>2]|0)&&(c[T+12>>2]|0)==(c[p+184>>2]|0))switch(c[v>>2]|0){case 8:k=c[8900]|0;c[p+4604>>2]=k+(((c[8901]|0)-k|0)>>>1);F=m;return;case 10:k=
c[8903]|0;c[p+4604>>2]=k+(((c[8904]|0)-k|0)>>>1);F=m;return;case 12:k=c[8906]|0;c[p+4604>>2]=k+(((c[8907]|0)-k|0)>>>1);F=m;return;case 16:k=c[8909]|0;c[p+4604>>2]=k+(((c[8910]|0)-k|0)>>>1);F=m;return;default:break a}while(0);e=1<<c[v>>2];a=p+4608|0;T=e<<1;l=p+4612|0;g=c[l>>2]|0;v=c[a>>2]|0;b=g-v|0;T>>>0<=b>>>0?T>>>0<b>>>0&&(d=v+T|0,(g|0)!=(d|0))&&(c[l>>2]=d):(X(a,T-b|0),v=c[a>>2]|0);h=p+4604|0;c[h>>2]=v+e;v=0-e|0;if(!((e|0)<=(v|0))){d=p+184|0;f=p+180|0;b=p+176|0;g=v;do v=c[d>>2]|0,(g|0)>(0-v|0)?(a=
c[f>>2]|0,(g|0)>(0-a|0)?(T=c[b>>2]|0,(g|0)>(0-T|0)?(l=c[k>>2]|0,v=(g|0)>=(0-l|0)?(l|0)<(g|0)?(T|0)<=(g|0)?(a|0)>(g|0)?2:(v|0)>(g|0)?3:4:1:0:-1):v=-2):v=-3):v=-4,u[(c[h>>2]|0)+g>>0]=v,g=g+1|0;while((g|0)!=(e|0))}F=m}function zc(p,v,a,T,l){p|=0;v|=0;var b=0,H=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,n=v>>31,h=(n^v)-n|0,m=p+164+(12*h|0)+10|0;a=R[m>>1]|0;k=p+164+(12*h|0)|0;l=c[k>>2]|0;if((a|0)<(l|0))if((a<<1|0)<(l|0))if((a<<2|0)<(l|0))if((a<<3|0)<(l|0))if((a<<4|0)<(l|0))for(b=5;;)if((a<<b|0)<(l|0))b=b+1|0;else break;
else b=4;else b=3;else b=2;else b=1;else b=0;e=p+164+(12*h|0)+8|0;a=(R[e>>1]^n)-n+(T|0)|0;(a&65535|0)!=(a|0)&&(a=a>>31&65535^65535);l=p+112|0;8>(c[l>>2]|0)&&aa(p);T=p+108|0;H=c[T>>2]|0;d=H>>>24;(f=c[2832+(b<<11)+(d<<3)+4>>2]|0)?(c[l>>2]=(c[l>>2]|0)-f,c[T>>2]=H<<f,l=c[2832+(b<<11)+(d<<3)>>2]|0):(l=Ya(p)|0,47>(l|0)?b&&(l=(Ta(p,b)|0)+(l<<b)|0):l=(Ta(p,16)|0)+1|0,l=l<<31>>31^l>>1,65535<((-1<(l|0)?l:0-l|0)|0)&&(a=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,a|0,5,35648),v=g,
g=0,v&1?(v=J()|0,za(a|0),V(v|0)):Pa(a|0,824,96)));f=p+164+(12*h|0)+4|0;T=c[f>>2]|0;b?b=R[m>>1]|0:(b=p=R[m>>1]|0,l^=(T<<1)+-1+(p<<16>>16)>>31);H=64==b<<16>>16;p=H&1;d=T+l>>p;H=H?32:b<<16>>16;c[k>>2]=(-1<(l|0)?l:0-l|0)+(c[k>>2]|0)>>p;T=H+1|0;R[m>>1]=T;b=T+d|0;if(1>(b|0))return m=R[e>>1]|0,R[e>>1]=(m&65535)-(-128<m<<16>>16&1),c[f>>2]=(b|0)>(~H|0)?b:0-H|0,v=a+(v>>>31)|0,v=v+(l^n)|0,v&=65535,v|0;if(0>=(d|0))return c[f>>2]=d,n^=l,v>>>=31,v=a+v|0,v=v+n|0,v&=65535,v|0;m=d-T|0;k=R[e>>1]|0;R[e>>1]=(127>k<<
16>>16&1)+(k&65535);m=0<(m|0)?0:m;c[f>>2]=m;n^=l;v>>>=31;v=a+v|0;v=v+n|0;v&=65535;return v|0}function uc(p,v){p|=0;v|=0;var a=0,T=0,l=0,g=0,b=0,d=0,f=0,d=v+9|0,a=ea[d>>0]|0,g=v+4|0,l=(ia(a>>>1,c[g>>2]|0)|0)+(c[v>>2]|0)|0;if((a|0)<(l|0)){T=0;do a<<=1,T=T+1|0;while((a|0)<(l|0))}else T=0;l=c[36476+(c[p+4568>>2]<<2)>>2]|0;a=Ya(p)|0;(a|0)<(46-l|0)?T?(a=(Ta(p,T)|0)+(a<<T)|0,p=c[g>>2]|0,l=a+p|0,T=f=l&1,g=1,l=(f+l|0)/2|0):(p=c[g>>2]|0,l=p+a|0,T=l&1,l=(T+l|0)/2|0,b=8):(a=(Ta(p,16)|0)+1|0,p=c[g>>2]|0,l=a+p|
0,g=l&1,l=(g+l|0)/2|0,T?(T=g,g=1):(T=g,b=8));8==(b|0)&&(g=ea[v+10>>0]<<1>>>0>=(ea[d>>0]|0)>>>0);l=0!=(T|0)^g?l:0-l|0;0>(l|0)&&(f=v+10|0,u[f>>0]=(ea[f>>0]|0)+1);a=(a+1-p>>1)+(c[v>>2]|0)|0;c[v>>2]=a;T=u[d>>0]|0;if(T<<24>>24!=(u[v+8>>0]|0))return f=T&255,f=f+1|0,f&=255,u[d>>0]=f,l|0;c[v>>2]=a>>1;f=(T&255)>>>1;u[d>>0]=f;v=v+10|0;u[v>>0]=(ea[v>>0]|0)>>>1;f&=255;f=f+1|0;f&=255;u[d>>0]=f;return l|0}function Ec(p,v,a,T,l){p|=0;v|=0;var b=0,H=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,n=v>>31,h=(n^v)-n|0,m=p+164+(12*h|
0)+10|0;a=R[m>>1]|0;k=p+164+(12*h|0)|0;l=c[k>>2]|0;if((a|0)<(l|0))if((a<<1|0)<(l|0))if((a<<2|0)<(l|0))if((a<<3|0)<(l|0))if((a<<4|0)<(l|0))for(b=5;;)if((a<<b|0)<(l|0))b=b+1|0;else break;else b=4;else b=3;else b=2;else b=1;else b=0;e=p+164+(12*h|0)+8|0;a=(R[e>>1]^n)-n+(T|0)|0;(a&4095|0)!=(a|0)&&(a=a>>31&4095^4095);l=p+112|0;8>(c[l>>2]|0)&&aa(p);T=p+108|0;H=c[T>>2]|0;d=H>>>24;(f=c[2832+(b<<11)+(d<<3)+4>>2]|0)?(c[l>>2]=(c[l>>2]|0)-f,c[T>>2]=H<<f,l=c[2832+(b<<11)+(d<<3)>>2]|0):(l=Ya(p)|0,35>(l|0)?b&&(l=
(Ta(p,b)|0)+(l<<b)|0):l=(Ta(p,12)|0)+1|0,l=l<<31>>31^l>>1,65535<((-1<(l|0)?l:0-l|0)|0)&&(a=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,a|0,5,35648),v=g,g=0,v&1?(v=J()|0,za(a|0),V(v|0)):Pa(a|0,824,96)));f=p+164+(12*h|0)+4|0;T=c[f>>2]|0;b?b=R[m>>1]|0:(b=p=R[m>>1]|0,l^=(T<<1)+-1+(p<<16>>16)>>31);H=64==b<<16>>16;p=H&1;d=T+l>>p;H=H?32:b<<16>>16;c[k>>2]=(-1<(l|0)?l:0-l|0)+(c[k>>2]|0)>>p;T=H+1|0;R[m>>1]=T;b=T+d|0;if(1>(b|0))return m=R[e>>1]|0,R[e>>1]=(m&65535)-(-128<m<<16>>16&
1),c[f>>2]=(b|0)>(~H|0)?b:0-H|0,v=a+(v>>>31)|0,v=v+(l^n)|0,v&=4095,v&=65535,v|0;if(0>=(d|0))return c[f>>2]=d,n^=l,v>>>=31,v=a+v|0,v=v+n|0,v&=4095,v&=65535,v|0;m=d-T|0;k=R[e>>1]|0;R[e>>1]=(127>k<<16>>16&1)+(k&65535);m=0<(m|0)?0:m;c[f>>2]=m;n^=l;v>>>=31;v=a+v|0;v=v+n|0;v&=4095;v&=65535;return v|0}function yc(p,v){p|=0;v|=0;var a=0,T=0,l=0,g=0,b=0,d=0,f=0,d=v+9|0,a=ea[d>>0]|0,g=v+4|0,l=(ia(a>>>1,c[g>>2]|0)|0)+(c[v>>2]|0)|0;if((a|0)<(l|0)){T=0;do a<<=1,T=T+1|0;while((a|0)<(l|0))}else T=0;l=c[36476+(c[p+
4568>>2]<<2)>>2]|0;a=Ya(p)|0;(a|0)<(34-l|0)?T?(a=(Ta(p,T)|0)+(a<<T)|0,p=c[g>>2]|0,l=a+p|0,T=f=l&1,g=1,l=(f+l|0)/2|0):(p=c[g>>2]|0,l=p+a|0,T=l&1,l=(T+l|0)/2|0,b=8):(a=(Ta(p,12)|0)+1|0,p=c[g>>2]|0,l=a+p|0,g=l&1,l=(g+l|0)/2|0,T?(T=g,g=1):(T=g,b=8));8==(b|0)&&(g=ea[v+10>>0]<<1>>>0>=(ea[d>>0]|0)>>>0);l=0!=(T|0)^g?l:0-l|0;0>(l|0)&&(f=v+10|0,u[f>>0]=(ea[f>>0]|0)+1);a=(a+1-p>>1)+(c[v>>2]|0)|0;c[v>>2]=a;T=u[d>>0]|0;if(T<<24>>24!=(u[v+8>>0]|0))return f=T&255,f=f+1|0,f&=255,u[d>>0]=f,l|0;c[v>>2]=a>>1;f=(T&255)>>>
1;u[d>>0]=f;v=v+10|0;u[v>>0]=(ea[v>>0]|0)>>>1;f&=255;f=f+1|0;f&=255;u[d>>0]=f;return l|0}function Fc(p,v,a,T,l){p|=0;v|=0;var b=0,H=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,n=v>>31,h=(n^v)-n|0,m=p+164+(12*h|0)+10|0;a=R[m>>1]|0;k=p+164+(12*h|0)|0;l=c[k>>2]|0;if((a|0)<(l|0))if((a<<1|0)<(l|0))if((a<<2|0)<(l|0))if((a<<3|0)<(l|0))if((a<<4|0)<(l|0))for(b=5;;)if((a<<b|0)<(l|0))b=b+1|0;else break;else b=4;else b=3;else b=2;else b=1;else b=0;e=p+164+(12*h|0)+8|0;a=(R[e>>1]^n)-n+(T|0)|0;(a&255|0)!=(a|0)&&(a=a>>31&255^
255);l=p+112|0;8>(c[l>>2]|0)&&aa(p);T=p+108|0;H=c[T>>2]|0;d=H>>>24;(f=c[2832+(b<<11)+(d<<3)+4>>2]|0)?(c[l>>2]=(c[l>>2]|0)-f,c[T>>2]=H<<f,l=c[2832+(b<<11)+(d<<3)>>2]|0):(l=Ya(p)|0,23>(l|0)?b&&(l=(Ta(p,b)|0)+(l<<b)|0):l=(Ta(p,8)|0)+1|0,l=l<<31>>31^l>>1,65535<((-1<(l|0)?l:0-l|0)|0)&&(a=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,a|0,5,35648),v=g,g=0,v&1?(v=J()|0,za(a|0),V(v|0)):Pa(a|0,824,96)));f=p+164+(12*h|0)+4|0;T=c[f>>2]|0;b?b=R[m>>1]|0:(b=p=R[m>>1]|0,l^=(T<<1)+-1+(p<<
16>>16)>>31);H=64==b<<16>>16;p=H&1;d=T+l>>p;H=H?32:b<<16>>16;c[k>>2]=(-1<(l|0)?l:0-l|0)+(c[k>>2]|0)>>p;T=H+1|0;R[m>>1]=T;b=T+d|0;if(1>(b|0))return m=R[e>>1]|0,R[e>>1]=(m&65535)-(-128<m<<16>>16&1),c[f>>2]=(b|0)>(~H|0)?b:0-H|0,v=a+(v>>>31)|0,v=v+(l^n)|0,v&=255,v|0;if(0>=(d|0))return c[f>>2]=d,n^=l,v>>>=31,v=a+v|0,v=v+n|0,v&=255,v|0;m=d-T|0;k=R[e>>1]|0;R[e>>1]=(127>k<<16>>16&1)+(k&65535);m=0<(m|0)?0:m;c[f>>2]=m;n^=l;v>>>=31;v=a+v|0;v=v+n|0;v&=255;return v|0}function Dc(p,v){p|=0;v|=0;var a=0,T=0,l=0,
g=0,b=0,d=0,f=0,d=v+9|0,a=ea[d>>0]|0,g=v+4|0,l=(ia(a>>>1,c[g>>2]|0)|0)+(c[v>>2]|0)|0;if((a|0)<(l|0)){T=0;do a<<=1,T=T+1|0;while((a|0)<(l|0))}else T=0;l=c[36476+(c[p+4568>>2]<<2)>>2]|0;a=Ya(p)|0;(a|0)<(22-l|0)?T?(a=(Ta(p,T)|0)+(a<<T)|0,p=c[g>>2]|0,l=a+p|0,T=f=l&1,g=1,l=(f+l|0)/2|0):(p=c[g>>2]|0,l=p+a|0,T=l&1,l=(T+l|0)/2|0,b=8):(a=(Ta(p,8)|0)+1|0,p=c[g>>2]|0,l=a+p|0,g=l&1,l=(g+l|0)/2|0,T?(T=g,g=1):(T=g,b=8));8==(b|0)&&(g=ea[v+10>>0]<<1>>>0>=(ea[d>>0]|0)>>>0);l=0!=(T|0)^g?l:0-l|0;0>(l|0)&&(f=v+10|0,
u[f>>0]=(ea[f>>0]|0)+1);a=(a+1-p>>1)+(c[v>>2]|0)|0;c[v>>2]=a;T=u[d>>0]|0;if(T<<24>>24!=(u[v+8>>0]|0))return f=T&255,f=f+1|0,f&=255,u[d>>0]=f,l|0;c[v>>2]=a>>1;f=(T&255)>>>1;u[d>>0]=f;v=v+10|0;u[v>>0]=(ea[v>>0]|0)>>>1;f&=255;f=f+1|0;f&=255;u[d>>0]=f;return l|0}function Cc(p,v,a,T,l){p|=0;v|=0;var b=0,H=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,n=v>>31,h=(n^v)-n|0,m=p+164+(12*h|0)+10|0;a=R[m>>1]|0;k=p+164+(12*h|0)|0;l=c[k>>2]|0;if((a|0)<(l|0))if((a<<1|0)<(l|0))if((a<<2|0)<(l|0))if((a<<3|0)<(l|0))if((a<<4|0)<(l|
0))for(b=5;;)if((a<<b|0)<(l|0))b=b+1|0;else break;else b=4;else b=3;else b=2;else b=1;else b=0;e=p+164+(12*h|0)+8|0;a=(R[e>>1]^n)-n+(T|0)|0;(a&255|0)!=(a|0)&&(a=a>>31&255^255);l=p+112|0;8>(c[l>>2]|0)&&aa(p);T=p+108|0;H=c[T>>2]|0;d=H>>>24;(f=c[2832+(b<<11)+(d<<3)+4>>2]|0)?(c[l>>2]=(c[l>>2]|0)-f,c[T>>2]=H<<f,l=c[2832+(b<<11)+(d<<3)>>2]|0):(l=Ya(p)|0,23>(l|0)?b&&(l=(Ta(p,b)|0)+(l<<b)|0):l=(Ta(p,8)|0)+1|0,l=l<<31>>31^l>>1,65535<((-1<(l|0)?l:0-l|0)|0)&&(a=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,
Ga|0)|0,Ca(8)),g=0,na(7,a|0,5,35648),v=g,g=0,v&1?(v=J()|0,za(a|0),V(v|0)):Pa(a|0,824,96)));f=p+164+(12*h|0)+4|0;T=c[f>>2]|0;b?b=R[m>>1]|0:(b=p=R[m>>1]|0,l^=(T<<1)+-1+(p<<16>>16)>>31);H=64==b<<16>>16;p=H&1;d=T+l>>p;H=H?32:b<<16>>16;c[k>>2]=(-1<(l|0)?l:0-l|0)+(c[k>>2]|0)>>p;T=H+1|0;R[m>>1]=T;b=T+d|0;if(1>(b|0))return m=R[e>>1]|0,R[e>>1]=(m&65535)-(-128<m<<16>>16&1),c[f>>2]=(b|0)>(~H|0)?b:0-H|0,v=a+(v>>>31)|0,v=v+(l^n)|0,v&=255,v|0;if(0>=(d|0))return c[f>>2]=d,n^=l,v>>>=31,v=a+v|0,v=v+n|0,v&=255,v|0;
m=d-T|0;k=R[e>>1]|0;R[e>>1]=(127>k<<16>>16&1)+(k&65535);m=0<(m|0)?0:m;c[f>>2]=m;n^=l;v>>>=31;v=a+v|0;v=v+n|0;v&=255;return v|0}function ed(p,v){p|=0;v|=0;var a=0,T=0,l=0,g=0,b=0,d=0,f=0,d=v+9|0,a=ea[d>>0]|0,g=v+4|0,l=(ia(a>>>1,c[g>>2]|0)|0)+(c[v>>2]|0)|0;if((a|0)<(l|0)){T=0;do a<<=1,T=T+1|0;while((a|0)<(l|0))}else T=0;l=c[36476+(c[p+4568>>2]<<2)>>2]|0;a=Ya(p)|0;(a|0)<(22-l|0)?T?(a=(Ta(p,T)|0)+(a<<T)|0,p=c[g>>2]|0,l=a+p|0,T=f=l&1,g=1,l=(f+l|0)/2|0):(p=c[g>>2]|0,l=p+a|0,T=l&1,l=(T+l|0)/2|0,b=8):(a=
(Ta(p,8)|0)+1|0,p=c[g>>2]|0,l=a+p|0,g=l&1,l=(g+l|0)/2|0,T?(T=g,g=1):(T=g,b=8));8==(b|0)&&(g=ea[v+10>>0]<<1>>>0>=(ea[d>>0]|0)>>>0);l=0!=(T|0)^g?l:0-l|0;0>(l|0)&&(f=v+10|0,u[f>>0]=(ea[f>>0]|0)+1);a=(a+1-p>>1)+(c[v>>2]|0)|0;c[v>>2]=a;T=u[d>>0]|0;if(T<<24>>24!=(u[v+8>>0]|0))return f=T&255,f=f+1|0,f&=255,u[d>>0]=f,l|0;c[v>>2]=a>>1;f=(T&255)>>>1;u[d>>0]=f;v=v+10|0;u[v>>0]=(ea[v>>0]|0)>>>1;f&=255;f=f+1|0;f&=255;u[d>>0]=f;return l|0}function ec(p,v,a,T,l,b,H,d){p|=0;v|=0;a|=0;T|=0;l|=0;b|=0;H|=0;d|=0;var f=
0,h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,S=0,I=0,ua=0,z=0,A=0,A=F;F=F+32|0;x=A+16|0;r=A+12|0;I=A+8|0;t=A+4|0;S=A;f=Lb(T)|0;c[I>>2]=f;g=0;I=ma(37,I|0,44220)|0;q=g;g=0;q&1&&(A=J()|0,Na(f)|0,V(A|0));Na(f)|0;c[l>>2]=0;q=I+8|0;f=c[v>>2]|0;a:do if((H|0)!=(d|0)){b:for(;;){(h=f)?(c[f+12>>2]|0)==(c[f+16>>2]|0)&&-1==(Ja[c[(c[f>>2]|0)+36>>2]&127](f)|0)&&(h=f=c[v>>2]=0):f=0;m=0==(f|0);e=k=c[a>>2]|0;do if(k)if((c[k+12>>2]|0)==(c[k+16>>2]|0)&&-1==(Ja[c[(c[k>>2]|0)+36>>2]&127](k)|0))e=c[a>>2]=0,z=12;else{if(!m){z=
13;break b}}else z=12;while(0);if(12==(z|0))if(z=0,m){z=13;break}else k=0;c:do if(37==(cb[c[(c[I>>2]|0)+36>>2]&63](I,u[H>>0]|0,0)|0)<<24>>24){k=H+1|0;if((k|0)==(d|0)){z=17;break b}n=cb[c[(c[I>>2]|0)+36>>2]&63](I,u[k>>0]|0,0)|0;switch(n<<24>>24){case 48:case 69:m=H+2|0;if((m|0)==(d|0)){z=20;break b}H=k;k=cb[c[(c[I>>2]|0)+36>>2]&63](I,u[m>>0]|0,0)|0;f=n;break;default:k=n,f=0}n=c[(c[p>>2]|0)+36>>2]|0;c[t>>2]=h;c[S>>2]=e;c[r>>2]=c[t>>2];c[x>>2]=c[S>>2];n=Td[n&15](p,r,x,T,l,b,k,f)|0;c[v>>2]=n;H=H+2|0}else{h=
u[H>>0]|0;if(-1<h<<24>>24&&(ua=c[q>>2]|0,0!=(R[ua+(h<<24>>24<<1)>>1]&8192))){do{H=H+1|0;if((H|0)==(d|0)){H=d;break}h=u[H>>0]|0;if(-1>=h<<24>>24)break}while(0!=(R[ua+(h<<24>>24<<1)>>1]&8192));for(h=k;;){f?(c[f+12>>2]|0)==(c[f+16>>2]|0)&&-1==(Ja[c[(c[f>>2]|0)+36>>2]&127](f)|0)&&(f=c[v>>2]=0):f=0;e=0==(f|0);do if(k){if((c[k+12>>2]|0)!=(c[k+16>>2]|0))if(e){n=h;break}else break c;if(-1!=(Ja[c[(c[k>>2]|0)+36>>2]&127](k)|0))if(e^0==(h|0))k=n=h;else break c;else h=c[a>>2]=0,z=39}else z=39;while(0);if(39==
(z|0))if(z=0,e)break c;else n=h,k=0;e=f+12|0;h=c[e>>2]|0;m=f+16|0;h=(h|0)==(c[m>>2]|0)?Ja[c[(c[f>>2]|0)+36>>2]&127](f)|0:ea[h>>0]|0;if(-1>=(h&255)<<24>>24)break c;if(!(R[(c[q>>2]|0)+(h<<24>>24<<1)>>1]&8192))break c;h=c[e>>2]|0;(h|0)==(c[m>>2]|0)?Ja[c[(c[f>>2]|0)+40>>2]&127](f)|0:c[e>>2]=h+1;h=n}}e=f+12|0;h=c[e>>2]|0;k=f+16|0;h=(h|0)==(c[k>>2]|0)?Ja[c[(c[f>>2]|0)+36>>2]&127](f)|0:ea[h>>0]|0;n=vc[c[(c[I>>2]|0)+12>>2]&63](I,h&255)|0;if(n<<24>>24!=(vc[c[(c[I>>2]|0)+12>>2]&63](I,u[H>>0]|0)|0)<<24>>24){z=
57;break b}h=c[e>>2]|0;(h|0)==(c[k>>2]|0)?Ja[c[(c[f>>2]|0)+40>>2]&127](f)|0:c[e>>2]=h+1;H=H+1|0}while(0);f=c[v>>2]|0;if(!((H|0)!=(d|0)&0==(c[l>>2]|0)))break a}13==(z|0)?c[l>>2]=4:17==(z|0)?c[l>>2]=4:20==(z|0)?c[l>>2]=4:57==(z|0)&&(c[l>>2]=4,f=c[v>>2]|0)}while(0);f?(c[f+12>>2]|0)==(c[f+16>>2]|0)&&-1==(Ja[c[(c[f>>2]|0)+36>>2]&127](f)|0)&&(f=c[v>>2]=0):f=0;H=0==(f|0);(h=c[a>>2]|0)?(c[h+12>>2]|0)==(c[h+16>>2]|0)&&-1==(Ja[c[(c[h>>2]|0)+36>>2]&127](h)|0)?(c[a>>2]=0,z=67):H||(z=68):z=67;67==(z|0)&&H&&(z=
68);68==(z|0)&&(c[l>>2]|=2);F=A;return f|0}function Nc(p,v,a,T,l,g){v|=0;a|=0;T|=0;l|=0;g|=0;var b=0,d=0,f=0,b=F;F=F+16|0;d=b+4|0;f=b;p=(p|0)+8|0;p=Ja[c[c[p>>2]>>2]&127](p)|0;c[f>>2]=c[T>>2];c[d>>2]=c[f>>2];a=(nf(a,d,p,p+168|0,g,l,0)|0)-p|0;168>(a|0)&&(c[v>>2]=((a|0)/12|0)%7|0);F=b}function Oc(p,v,a,T,l,g){v|=0;a|=0;T|=0;l|=0;g|=0;var b=0,d=0,f=0,b=F;F=F+16|0;d=b+4|0;f=b;p=(p|0)+8|0;p=Ja[c[(c[p>>2]|0)+4>>2]&127](p)|0;c[f>>2]=c[T>>2];c[d>>2]=c[f>>2];a=(nf(a,d,p,p+288|0,g,l,0)|0)-p|0;288>(a|0)&&(c[v>>
2]=((a|0)/12|0)%12|0);F=b}function Qc(p,v,a,T,l,g){v|=0;l|=0;var b=0,d=0,b=F;F=F+16|0;p=b+4|0;d=b;c[d>>2]=c[(T|0)>>2];c[p>>2]=c[d>>2];p=Nd(a|0,p,l,g|0,4)|0;c[l>>2]&4||(c[v>>2]=(69>(p|0)?p+2E3|0:31>(p+-69|0)>>>0?p+1900|0:p)+-1900);F=b}function jc(p,v,a,T,l,b,H,d){p|=0;v|=0;a|=0;T|=0;l|=0;b|=0;H|=0;d|=0;var f=0,h=0,e=0,k=0,u=0,m=0,n=0,q=0,r=0,x=0,S=0,I=0,t=0,t=F;F=F+32|0;q=t+16|0;n=t+12|0;S=t+8|0;r=t+4|0;x=t;f=Lb(T)|0;c[S>>2]=f;g=0;S=ma(37,S|0,44212)|0;m=g;g=0;m&1&&(t=J()|0,Na(f)|0,V(t|0));Na(f)|0;
c[l>>2]=0;f=c[v>>2]|0;a:do if((H|0)!=(d|0)){b:for(;;){(e=f)?(h=c[f+12>>2]|0,h=(h|0)==(c[f+16>>2]|0)?Ja[c[(c[f>>2]|0)+36>>2]&127](f)|0:c[h>>2]|0,-1==(h|0)?(f=c[v>>2]=0,u=1,m=0):(u=0,m=e)):(f=0,u=1,m=e);h=k=c[a>>2]|0;do if(k)if(e=c[k+12>>2]|0,e=(e|0)==(c[k+16>>2]|0)?Ja[c[(c[k>>2]|0)+36>>2]&127](k)|0:c[e>>2]|0,-1!=(e|0)){if(!u){I=17;break b}}else h=c[a>>2]=0,I=15;else I=15;while(0);if(15==(I|0))if(I=0,u){I=17;break}else k=0;c:do if(37==(cb[c[(c[S>>2]|0)+52>>2]&63](S,c[H>>2]|0,0)|0)<<24>>24){e=H+4|0;
if((e|0)==(d|0)){I=21;break b}u=cb[c[(c[S>>2]|0)+52>>2]&63](S,c[e>>2]|0,0)|0;switch(u<<24>>24){case 48:case 69:k=H+8|0;if((k|0)==(d|0)){I=24;break b}H=e;e=cb[c[(c[S>>2]|0)+52>>2]&63](S,c[k>>2]|0,0)|0;f=u;break;default:e=u,f=0}u=c[(c[p>>2]|0)+36>>2]|0;c[r>>2]=m;c[x>>2]=h;c[n>>2]=c[r>>2];c[q>>2]=c[x>>2];m=Td[u&15](p,n,q,T,l,b,e,f)|0;c[v>>2]=m;H=H+8|0}else if(cb[c[(c[S>>2]|0)+12>>2]&63](S,8192,c[H>>2]|0)|0){do if(H=H+4|0,(H|0)==(d|0)){H=d;break}while(cb[c[(c[S>>2]|0)+12>>2]&63](S,8192,c[H>>2]|0)|0);
for(u=h=k;;){f?(e=c[f+12>>2]|0,e=(e|0)==(c[f+16>>2]|0)?Ja[c[(c[f>>2]|0)+36>>2]&127](f)|0:c[e>>2]|0,-1==(e|0)?(c[v>>2]=0,k=1,f=0):k=0):(k=1,f=0);do if(u)if(e=c[u+12>>2]|0,e=(e|0)==(c[u+16>>2]|0)?Ja[c[(c[u>>2]|0)+36>>2]&127](u)|0:c[e>>2]|0,-1!=(e|0))if(k^0==(h|0))u=m=h;else break c;else h=c[a>>2]=0,I=44;else I=44;while(0);if(44==(I|0))if(I=0,k)break c;else m=h,u=0;e=f+12|0;h=c[e>>2]|0;k=f+16|0;h=(h|0)==(c[k>>2]|0)?Ja[c[(c[f>>2]|0)+36>>2]&127](f)|0:c[h>>2]|0;if(!(cb[c[(c[S>>2]|0)+12>>2]&63](S,8192,h)|
0))break c;h=c[e>>2]|0;(h|0)==(c[k>>2]|0)?Ja[c[(c[f>>2]|0)+40>>2]&127](f)|0:c[e>>2]=h+4;h=m}}else{e=f+12|0;h=c[e>>2]|0;k=f+16|0;h=(h|0)==(c[k>>2]|0)?Ja[c[(c[f>>2]|0)+36>>2]&127](f)|0:c[h>>2]|0;m=vc[c[(c[S>>2]|0)+28>>2]&63](S,h)|0;if((m|0)!=(vc[c[(c[S>>2]|0)+28>>2]&63](S,c[H>>2]|0)|0)){I=61;break b}h=c[e>>2]|0;(h|0)==(c[k>>2]|0)?Ja[c[(c[f>>2]|0)+40>>2]&127](f)|0:c[e>>2]=h+4;H=H+4|0}while(0);f=c[v>>2]|0;if(!((H|0)!=(d|0)&0==(c[l>>2]|0)))break a}17==(I|0)?c[l>>2]=4:21==(I|0)?c[l>>2]=4:24==(I|0)?c[l>>
2]=4:61==(I|0)&&(c[l>>2]=4,f=c[v>>2]|0)}while(0);f?(H=c[f+12>>2]|0,H=(H|0)==(c[f+16>>2]|0)?Ja[c[(c[f>>2]|0)+36>>2]&127](f)|0:c[H>>2]|0,-1==(H|0)?(f=c[v>>2]=0,e=1):e=0):(f=0,e=1);(H=c[a>>2]|0)?(h=c[H+12>>2]|0,H=(h|0)==(c[H+16>>2]|0)?Ja[c[(c[H>>2]|0)+36>>2]&127](H)|0:c[h>>2]|0,-1!=(H|0)?e||(I=76):(c[a>>2]=0,I=74)):I=74;74==(I|0)&&e&&(I=76);76==(I|0)&&(c[l>>2]|=2);F=t;return f|0}function Vc(p,v,a,T,l,g){v|=0;a|=0;T|=0;l|=0;g|=0;var b=0,d=0,f=0,b=F;F=F+16|0;d=b+4|0;f=b;p=(p|0)+8|0;p=Ja[c[c[p>>2]>>2]&
127](p)|0;c[f>>2]=c[T>>2];c[d>>2]=c[f>>2];a=(of(a,d,p,p+168|0,g,l,0)|0)-p|0;168>(a|0)&&(c[v>>2]=((a|0)/12|0)%7|0);F=b}function Wc(p,v,a,T,l,g){v|=0;a|=0;T|=0;l|=0;g|=0;var b=0,d=0,f=0,b=F;F=F+16|0;d=b+4|0;f=b;p=(p|0)+8|0;p=Ja[c[(c[p>>2]|0)+4>>2]&127](p)|0;c[f>>2]=c[T>>2];c[d>>2]=c[f>>2];a=(of(a,d,p,p+288|0,g,l,0)|0)-p|0;288>(a|0)&&(c[v>>2]=((a|0)/12|0)%12|0);F=b}function Zc(p,v,a,T,l,g){v|=0;l|=0;var b=0,d=0,b=F;F=F+16|0;p=b+4|0;d=b;c[d>>2]=c[(T|0)>>2];c[p>>2]=c[d>>2];p=Od(a|0,p,l,g|0,4)|0;c[l>>2]&
4||(c[v>>2]=(69>(p|0)?p+2E3|0:31>(p+-69|0)>>>0?p+1900|0:p)+-1900);F=b}function Lc(p){p|=0;var v=0,a=0,T=0,v=c[p>>2]|0;g=0;a=Va(3)|0;T=g;g=0;if(T&1||(v|0)!=(a|0)&&(g=0,ta(188,c[p>>2]|0),T=g,g=0,T&1))T=J(0)|0,h(T)}function cd(p,v,a,T,l,g){v|=0;a|=0;l|=0;g|=0;var b=0,d=0,f=0,h=0,h=F;F=F+16|0;f=h;u[f>>0]=37;b=f+1|0;u[b>>0]=l;d=f+2|0;u[d>>0]=g;u[f+3>>0]=0;g<<24>>24&&(u[b>>0]=g,u[d>>0]=l);p=v+($h(v|0,(c[a>>2]|0)-v|0,f|0,T|0,c[(p|0)>>2]|0)|0)|0;c[a>>2]=p;F=h}function Mc(c){c|=0;var v=0,v=xa(8)|0;g=0;ga(90,
v|0,c|0);c=g;g=0;c&1?(c=J()|0,za(v|0),V(c|0)):Pa(v|0,616,80)}function rc(p,v,a,T){p|=0;v|=0;a|=0;T|=0;var l=0,g=0,b=0,d=0,l=u[p>>0]|0,b=p+4|0,g=c[b>>2]|0;a:do if((0==(l&1)?(l&255)>>>1:g)|0){if((v|0)!=(a|0)){l=a+-4|0;if(l>>>0>v>>>0){g=v;do d=c[g>>2]|0,c[g>>2]=c[l>>2],c[l>>2]=d,g=g+4|0,l=l+-4|0;while(g>>>0<l>>>0)}l=u[p>>0]|0;g=c[b>>2]|0}b=(d=0==(l&1))?p+1|0:c[p+8>>2]|0;a=a+-4|0;p=b+(d?(l&255)>>>1:g)|0;g=u[b>>0]|0;l=1>g<<24>>24|127==g<<24>>24;b:do if(a>>>0>v>>>0){for(;l||(g<<24>>24|0)==(c[v>>2]|0);)if(b=
1<(p-b|0)?b+1|0:b,v=v+4|0,g=u[b>>0]|0,l=1>g<<24>>24|127==g<<24>>24,v>>>0>=a>>>0)break b;c[T>>2]=4;break a}while(0);if(l?0:((c[a>>2]|0)+-1|0)>>>0>=g<<24>>24>>>0)c[T>>2]=4}while(0)}function Ob(p,v,a){p|=0;v|=0;a|=0;var T=0,l=0;td(v);l=p+8|0;T=c[l>>2]|0;(c[p+12>>2]|0)-T>>2>>>0<=a>>>0&&(g=0,ga(124,l|0,a+1|0),p=g,g=0,p&1?(T=J()|0,v&&Na(v)|0,V(T|0)):T=c[l>>2]|0);if(p=c[T+(a<<2)>>2]|0)Na(p)|0,T=c[l>>2]|0;c[T+(a<<2)>>2]=v}function fd(p){p|=0;var v=0,a=0,T=0,l=0;c[p>>2]=44196;T=p+8|0;l=p+12|0;v=c[T>>2]|0;
if((c[l>>2]|0)!=(v|0)){a=0;do(v=c[v+(a<<2)>>2]|0)&&Na(v)|0,a=a+1|0,v=c[T>>2]|0;while(a>>>0<(c[l>>2]|0)-v>>2>>>0)}W(p+144|0);ag(T)}function Uc(p){p|=0;var v=0,a=0;g=0;v=Va(6)|0;a=g;g=0;a&1?(a=J(0)|0,h(a)):(a=c[v>>2]|0,c[p>>2]=a,td(a))}function Jc(p,v){v=c[(v|0)>>2]|0;c[(p|0)>>2]=v;td(v)}function Vb(p){Na(c[(p|0)>>2]|0)|0}function Jb(p){p|=0;var v=0,a=0,a=F;F=F+16|0;v=a;if(-1!=(c[p>>2]|0)){c[v>>2]=p;c[v+4>>2]=191;c[v+8>>2]=0;var T,l;T=p|0;v|=0;l=192;var b=0;zg(42676)|0;if(1==(c[T>>2]|0)){do ai(42704,
42676)|0;while(1==(c[T>>2]|0))}if(c[T>>2]|0)Ag(42676)|0;else if(c[T>>2]=1,g=0,ca(72,42676)|0,b=g,g=0,b&1||(g=0,ta(l|0,v|0),b=g,g=0,b&1)||(g=0,ca(73,42676)|0,b=g,g=0,b&1)||(c[T>>2]=-1,g=0,ca(72,42676)|0,b=g,g=0,b&1)||(g=0,ca(74,42704)|0,b=g,g=0,b&1))b=J(0)|0,Rc(b|0)|0,g=0,ca(73,42676)|0,b=g,g=0,b&1||(c[T>>2]=0,g=0,ca(72,42676)|0,b=g,g=0,b&1)||(g=0,ca(74,42704)|0,b=g,g=0,b&1)||(g=0,rb(5),g=0),v=J()|0,g=0,rb(3),b=g,g=0,b&1?(b=J(0)|0,h(b)):V(v|0)}F=a;return(c[p+4>>2]|0)+-1|0}function Sb(p,v){p=c[(p|0)>>
2]|0;var a;a=p;var T=Jb(v|0)|0;a|=0;var T=T|0,l,g;l=a|0;g=T|0;var b=0,b=c[l+8>>2]|0,b=(c[l+12>>2]|0)-b>>2>>>0>g>>>0?0!=(c[b+(g<<2)>>2]|0):0;b|0?a=c[(c[a+8>>2]|0)+(T<<2)>>2]|0:(a=xa(4)|0,T=a|0,c[T>>2]=36888,Pa(a|0,640,82),a=0);return a|0}function Kc(){var p=0,v=0;g=0;p=Va(7)|0;v=g;g=0;if(v&1)v=J(0)|0,h(v);else return c[p>>2]|0;return 0}function Yc(){var p=0,v=0;g=0;p=Va(8)|0;v=g;g=0;if(v&1)v=J(0)|0,h(v);else return c[p>>2]|0;return 0}function dd(){var p=0,v=0;g=0;p=Va(9)|0;v=g;g=0;if(v&1)v=J(0)|0,
h(v);else return c[p>>2]|0;return 0}function nd(p){p|=0;var v=0;c[p>>2]=44236;v=c[p+8>>2]|0;0!=(v|0)&&0!=(u[p+12>>0]|0)&&(p=v|0,Q(p))}function ld(p,v,a,T,l){p|=0;a|=0;T|=0;l|=0;var g=0,b=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,S=0,I=0,ua=0,z=0,A=0,E=0,L=0,y=0,M=0,O=0,B=0,D=0,J=0,G=0,w=0,Y=0,P=0,la=0,ja=0,U=0,N=0,ka=0,va=0,da=0,V=0,aa=0,Z=0,wa=0,X=0,fa=0,Ia=0,Ba=0,W=0,Q=0,ha=0,ha=F;F=F+624|0;fa=ha+24|0;Ba=ha+16|0;Ia=ha+588|0;V=ha+576|0;X=ha;ka=ha+536|0;Q=ha+8|0;W=ha+528|0;J=0!=(p|0);N=G=ka+40|
0;ka=ka+39|0;va=Q+4|0;da=V+12|0;V=V+11|0;aa=Ia;Z=da;wa=Z-aa|0;w=-2-aa|0;Y=Z+2|0;P=fa+288|0;ja=la=Ia+9|0;U=Ia+8|0;g=0;r=v|0;v=b=0;a:for(;;){-1<(g|0)&&((b|0)>(2147483647-g|0)?(g=sb()|0,c[g>>2]=75,g=-1):g=b+g|0);b=u[r>>0]|0;if(b<<24>>24)d=r;else{D=245;break}b:for(;;){switch(b<<24>>24){case 37:b=d;D=9;break b;case 0:b=d;break b}B=d+1|0;b=u[B>>0]|0;d=B}b:do if(9==(D|0))for(;;){D=0;if(37!=(u[b+1>>0]|0))break b;d=d+1|0;b=b+2|0;if(37!=(u[b>>0]|0))break}while(0);t=d-r|0;J&&0==(c[p>>2]&32|0)&&sc(r,t,p)|0;if((d|
0)!=(r|0))r=b,b=t;else{e=b+1|0;d=u[e>>0]|0;f=(d<<24>>24)+-48|0;10>f>>>0?(e=(B=36==(u[b+2>>0]|0))?b+3|0:e,d=u[e>>0]|0,n=B?f:-1,v=B?1:v):n=-1;b=d<<24>>24;b:do if(32==(b&-32|0))for(f=0;;){if(!(1<<b+-32&75913)){k=f;b=e;break b}f|=1<<(d<<24>>24)+-32;e=e+1|0;d=u[e>>0]|0;b=d<<24>>24;if(32!=(b&-32|0)){k=f;b=e;break}}else k=0,b=e;while(0);do if(42==d<<24>>24){f=b+1|0;d=(u[f>>0]|0)+-48|0;if(10>d>>>0&&36==(u[b+2>>0]|0))c[l+(d<<2)>>2]=10,v=1,b=b+3|0,d=c[T+((u[f>>0]|0)+-48<<3)>>2]|0;else{if(v){g=-1;break a}if(!J){x=
k;b=f;B=v=0;break}v=(c[a>>2]|0)+3&-4;d=c[v>>2]|0;c[a>>2]=v+4;v=0;b=f}0>(d|0)?(x=k|8192,B=0-d|0):(x=k,B=d)}else if(f=(d<<24>>24)+-48|0,10>f>>>0){d=0;do d=(10*d|0)+f|0,b=b+1|0,f=(u[b>>0]|0)+-48|0;while(10>f>>>0);if(0>(d|0)){g=-1;break a}else x=k,B=d}else x=k,B=0;while(0);b:do if(46==(u[b>>0]|0)){f=b+1|0;d=u[f>>0]|0;if(42!=d<<24>>24){e=(d<<24>>24)+-48|0;if(10>e>>>0)b=f,d=0;else{b=f;e=0;break}for(;;)if(d=(10*d|0)+e|0,b=b+1|0,e=(u[b>>0]|0)+-48|0,10<=e>>>0){e=d;break b}}f=b+2|0;d=(u[f>>0]|0)+-48|0;if(10>
d>>>0&&36==(u[b+3>>0]|0))c[l+(d<<2)>>2]=10,b=b+4|0,e=c[T+((u[f>>0]|0)+-48<<3)>>2]|0;else{if(v){g=-1;break a}J?(b=(c[a>>2]|0)+3&-4,e=c[b>>2]|0,c[a>>2]=b+4,b=f):(b=f,e=0)}}else e=-1;while(0);for(m=0;;){d=(u[b>>0]|0)+-65|0;if(57<d>>>0){g=-1;break a}f=b+1|0;d=u[56223+(58*m|0)+d>>0]|0;k=d&255;if(8>(k+-1|0)>>>0)b=f,m=k;else{O=f;break}}if(!(d<<24>>24)){g=-1;break}f=-1<(n|0);do if(19==d<<24>>24)if(f){g=-1;break a}else D=52;else if(f)c[l+(n<<2)>>2]=k,y=T+(n<<3)|0,M=c[y+4>>2]|0,D=X,c[D>>2]=c[y>>2],c[D+4>>2]=
M,D=52;else{if(!J){g=0;break a}pd(X,k,a)}while(0);if(52!=(D|0)||(D=0,J)){n=u[b>>0]|0;n=0!=(m|0)&3==(n&15|0)?n&-33:n;f=x&-65537;M=0==(x&8192|0)?x:f;b:do switch(n|0){case 110:switch(m|0){case 0:c[c[X>>2]>>2]=g;r=O;b=t;continue a;case 1:c[c[X>>2]>>2]=g;r=O;b=t;continue a;case 2:r=c[X>>2]|0;c[r>>2]=g;c[r+4>>2]=(0>(g|0))<<31>>31;r=O;b=t;continue a;case 3:R[c[X>>2]>>1]=g;r=O;b=t;continue a;case 4:u[c[X>>2]>>0]=g;r=O;b=t;continue a;case 6:c[c[X>>2]>>2]=g;r=O;b=t;continue a;case 7:r=c[X>>2]|0;c[r>>2]=g;c[r+
4>>2]=(0>(g|0))<<31>>31;r=O;b=t;continue a;default:r=O;b=t;continue a}case 112:m=M|8;e=8<e>>>0?e:8;n=120;D=64;break;case 88:case 120:m=M;D=64;break;case 111:f=X;d=c[f>>2]|0;f=c[f+4>>2]|0;if(0==(d|0)&0==(f|0))b=G;else{b=G;do b=b+-1|0,u[b>>0]=d&7|48,d=ie(d|0,f|0,3)|0,f=Fa;while(!(0==(d|0)&0==(f|0)))}M&8?(m=N-b+1|0,d=M,e=(e|0)<(m|0)?m:e):d=M;m=0;k=56703;D=77;break;case 105:case 100:d=X;b=c[d>>2]|0;d=c[d+4>>2]|0;if(0>(d|0)){b=Ud(0,0,b|0,d|0)|0;d=Fa;f=X;c[f>>2]=b;c[f+4>>2]=d;f=1;k=56703;D=76;break b}M&
2048?(f=1,k=56704):(f=k=M&1,k=0==(k|0)?56703:56705);D=76;break;case 117:d=X;b=c[d>>2]|0;d=c[d+4>>2]|0;f=0;k=56703;D=76;break;case 99:u[ka>>0]=c[X>>2];r=ka;d=1;m=0;n=56703;b=G;break;case 109:b=sb()|0;b=Bg(c[b>>2]|0)|0;D=82;break;case 115:b=c[X>>2]|0;b=0!=(b|0)?b:56713;D=82;break;case 67:c[Q>>2]=c[X>>2];c[va>>2]=0;c[X>>2]=Q;e=-1;D=86;break;case 83:e?D=86:(Ac(p,32,B,0,M),b=0,D=98);break;case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:h=+eb[X>>3];c[Ba>>2]=0;eb[pb>>3]=h;0<=(c[pb+4>>
2]|0)?M&2048?(L=1,y=56723):(L=y=M&1,y=0==(y|0)?56721:56726):(h=-h,L=1,y=56720);eb[pb>>3]=h;E=c[pb+4>>2]&2146435072;do if(2146435072>E>>>0|2146435072==(E|0)&0)if(b=h,d=Ba,b=+b,d|=0,q=2*+ + +Cg(b,d),(d=0!=q)&&(c[Ba>>2]=(c[Ba>>2]|0)+-1),z=n|32,97==(z|0)){r=n&32;t=0==(r|0)?y:y+9|0;x=L|2;b=12-e|0;if(11<e>>>0|0==(b|0))h=q;else{h=8;do b=b+-1|0,h*=16;while(0!=(b|0));h=45==(u[t>>0]|0)?-(h+(-q-h)):q+h-h}d=c[Ba>>2]|0;b=0>(d|0)?0-d|0:d;b=Tc(b,(0>(b|0))<<31>>31,da)|0;(b|0)==(da|0)&&(u[V>>0]=48,b=V);u[b+-1>>0]=
(d>>31&2)+43;m=b+-2|0;u[m>>0]=n+15;k=1>(e|0);f=0==(M&8|0);for(d=Ia;y=~~h,b=d+1|0,u[d>>0]=ea[56687+y>>0]|r,h=16*(h-+(y|0)),1!=(b-aa|0)||f&k&0==h||(u[b>>0]=46,b=d+2|0),0!=h;)d=b;e=0!=(e|0)&(w+b|0)<(e|0)?Y+e-m|0:wa-m+b|0;f=e+x|0;Ac(p,32,B,f,M);c[p>>2]&32||sc(t,x,p)|0;Ac(p,48,B,f,M^65536);b=b-aa|0;c[p>>2]&32||sc(Ia,b,p)|0;d=Z-m|0;Ac(p,48,e-(b+d)|0,0,0);c[p>>2]&32||sc(m,d,p)|0;Ac(p,32,B,f,M^8192);b=(f|0)<(B|0)?B:f}else{b=0>(e|0)?6:e;d?(d=(c[Ba>>2]|0)+-28|0,c[Ba>>2]=d,h=268435456*q):(h=q,d=c[Ba>>2]|0);
d=A=E=0>(d|0)?fa:P;do ua=~~h>>>0,c[d>>2]=ua,d=d+4|0,h=1E9*(h-+(ua>>>0));while(0!=h);f=d;d=c[Ba>>2]|0;if(0<(d|0))for(k=E;;){m=29<(d|0)?29:d;e=f+-4|0;if(e>>>0<k>>>0)e=k;else{d=0;do ua=yb(c[e>>2]|0,0,m|0)|0,ua=Mb(ua|0,Fa|0,d|0,0)|0,d=Fa,I=bg(ua|0,d|0,1E9,0)|0,c[e>>2]=I,d=pf(ua|0,d|0,1E9,0)|0,e=e+-4|0;while(e>>>0>=k>>>0);d?(e=k+-4|0,c[e>>2]=d):e=k}for(;!(f>>>0<=e>>>0||(d=f+-4|0,c[d>>2]|0));)f=d;d=(c[Ba>>2]|0)-m|0;c[Ba>>2]=d;if(0<(d|0))k=e;else break}else e=E;if(0>(d|0))for(t=((b+25|0)/9|0)+1|0,S=102==
(z|0),r=e;;){x=0-d|0;x=9<(x|0)?9:x;if(r>>>0<f>>>0){d=(1<<x)+-1|0;k=1E9>>>x;e=0;m=r;do ua=c[m>>2]|0,c[m>>2]=(ua>>>x)+e,e=ia(ua&d,k)|0,m=m+4|0;while(m>>>0<f>>>0);d=0==(c[r>>2]|0)?r+4|0:r;e?(c[f>>2]=e,e=d,f=f+4|0):e=d}else e=0==(c[r>>2]|0)?r+4|0:r;d=S?E:e;f=(f-d>>2|0)>(t|0)?d+(t<<2)|0:f;d=(c[Ba>>2]|0)+x|0;c[Ba>>2]=d;if(0<=(d|0)){r=e;break}else r=e}else r=e;if(r>>>0<f>>>0){if(d=9*(A-r>>2)|0,k=c[r>>2]|0,!(10>k>>>0)){e=10;do e=10*e|0,d=d+1|0;while(k>>>0>=e>>>0)}}else d=0;I=103==(z|0);ua=0!=(b|0);e=b-(102!=
(z|0)?d:0)+((ua&I)<<31>>31)|0;if((e|0)<((9*(f-A>>2)|0)+-9|0)){m=e+9216|0;S=(m|0)/9|0;e=E+(S+-1023<<2)|0;m=((m|0)%9|0)+1|0;if(9>(m|0)){k=10;do k=10*k|0,m=m+1|0;while(9!=(m|0))}else k=10;x=c[e>>2]|0;t=(x>>>0)%(k>>>0)|0;0==(t|0)&&(E+(S+-1022<<2)|0)==(f|0)?k=r:D=163;do if(163==(D|0)){D=0;q=0==(((x>>>0)/(k>>>0)|0)&1|0)?9007199254740992:9007199254740994;m=(k|0)/2|0;h=t>>>0<m>>>0?.5:(t|0)==(m|0)&&(E+(S+-1022<<2)|0)==(f|0)?1:1.5;L&&45==(u[y>>0]|0)&&(q=-q,h=-h);m=x-t|0;c[e>>2]=m;if(q+h!=q){z=m+k|0;c[e>>2]=
z;if(999999999<z>>>0)for(d=r;;)if(k=e+-4|0,c[e>>2]=0,k>>>0<d>>>0&&(d=d+-4|0,c[d>>2]=0),z=(c[k>>2]|0)+1|0,c[k>>2]=z,999999999<z>>>0)e=k;else{r=d;e=k;break}d=9*(A-r>>2)|0;m=c[r>>2]|0;if(!(10>m>>>0)){k=10;do k=10*k|0,d=d+1|0;while(m>>>0>=k>>>0)}}k=r}while(0);z=e+4|0;r=k;f=f>>>0>z>>>0?z:f}for(t=0-d|0;;){if(f>>>0<=r>>>0){S=0;z=f;break}e=f+-4|0;if(c[e>>2]|0){S=1;z=f;break}else f=e}if(I){if(b=(ua&1^1)+b|0,(b|0)>(d|0)&-5<(d|0)?(n=n+-1|0,b=b+-1-d|0):(n=n+-2|0,b=b+-1|0),f=M&8,!f){if(S)if(f=c[z+-4>>2]|0)if((f>>>
0)%10|0)e=0;else{k=10;e=0;do k=10*k|0,e=e+1|0;while(0==((f>>>0)%(k>>>0)|0))}else e=9;else e=9;f=(9*(z-A>>2)|0)+-9|0;f=102==(n|32)?f-e|0:f+d-e|0;f=0>(f|0)?0:f;b=(b|0)<(f|0)?b:f;f=0}}else f=M&8;x=b|f;k=0!=(x|0)&1;if(m=102==(n|32))d=0<(d|0)?d:0,n=0;else{e=0>(d|0)?t:d;e=Tc(e,(0>(e|0))<<31>>31,da)|0;if(2>(Z-e|0)){do e=e+-1|0,u[e>>0]=48;while(2>(Z-e|0))}u[e+-1>>0]=(d>>31&2)+43;A=e+-2|0;u[A>>0]=n;d=Z-A|0;n=A}t=L+1+b+k+d|0;Ac(p,32,B,t,M);c[p>>2]&32||sc(y,L,p)|0;Ac(p,48,B,t,M^65536);do if(m){d=e=r>>>0>E>>>
0?E:r;do{f=Tc(c[d>>2]|0,0,la)|0;if((d|0)==(e|0))(f|0)==(la|0)&&(u[U>>0]=48,f=U);else if(!(f>>>0<=Ia>>>0)){do f=f+-1|0,u[f>>0]=48;while(f>>>0>Ia>>>0)}c[p>>2]&32||sc(f,ja-f|0,p)|0;d=d+4|0}while(d>>>0<=E>>>0);!x||c[p>>2]&32||sc(56755,1,p)|0;if(0<(b|0)&d>>>0<z>>>0)for(f=d;;){d=Tc(c[f>>2]|0,0,la)|0;if(d>>>0>Ia>>>0){do d=d+-1|0,u[d>>0]=48;while(d>>>0>Ia>>>0)}c[p>>2]&32||sc(d,9<(b|0)?9:b,p)|0;f=f+4|0;d=b+-9|0;if(9<(b|0)&f>>>0<z>>>0)b=d;else{b=d;break}}Ac(p,48,b+9|0,9,0)}else{m=S?z:r+4|0;if(-1<(b|0)){k=0==
(f|0);e=r;do{d=Tc(c[e>>2]|0,0,la)|0;(d|0)==(la|0)&&(u[U>>0]=48,d=U);if((e|0)==(r|0))f=d+1|0,c[p>>2]&32||sc(d,1,p)|0,k&1>(b|0)||c[p>>2]&32||sc(56755,1,p)|0,d=f;else if(!(d>>>0<=Ia>>>0)){do d=d+-1|0,u[d>>0]=48;while(d>>>0>Ia>>>0)}f=ja-d|0;c[p>>2]&32||sc(d,(b|0)>(f|0)?f:b,p)|0;b=b-f|0;e=e+4|0}while(e>>>0<m>>>0&-1<(b|0))}Ac(p,48,b+18|0,18,0);c[p>>2]&32||sc(n,Z-n|0,p)|0}while(0);Ac(p,32,B,t,M^8192);b=(t|0)<(B|0)?B:t}else m=0!=(n&32|0),d=(k=h!=h|0)?0:L,e=d+3|0,Ac(p,32,B,e,f),b=c[p>>2]|0,b&32||(sc(y,d,p)|
0,b=c[p>>2]|0),b&32||sc(k?m?56747:56751:m?56739:56743,3,p)|0,Ac(p,32,B,e,M^8192),b=(e|0)<(B|0)?B:e;while(0);r=O;continue a;default:f=M,d=e,m=0,n=56703,b=G}while(0);b:do if(64==(D|0)){f=X;d=c[f>>2]|0;f=c[f+4>>2]|0;k=n&32;if(0==(d|0)&0==(f|0))b=G,d=m,m=0,k=56703;else{b=G;do b=b+-1|0,u[b>>0]=ea[56687+(d&15)>>0]|k,d=ie(d|0,f|0,4)|0,f=Fa;while(!(0==(d|0)&0==(f|0)));D=X;0==(m&8|0)|0==(c[D>>2]|0)&0==(c[D+4>>2]|0)?(d=m,m=0,k=56703):(d=m,m=2,k=56703+(n>>4)|0)}D=77}else if(76==(D|0))b=Tc(b,d,G)|0,d=M,m=f,D=
77;else if(82==(D|0))D=0,M=Dg(b,0,e)|0,y=0==(M|0),r=b,d=y?e:M-b|0,m=0,n=56703,b=y?b+e|0:M;else if(86==(D|0)){b=d=D=0;for(k=c[X>>2]|0;;){f=c[k>>2]|0;if(!f)break;b=Eg(W,f)|0;if(0>(b|0)|b>>>0>(e-d|0)>>>0)break;d=b+d|0;if(e>>>0>d>>>0)k=k+4|0;else break}if(0>(b|0)){g=-1;break a}Ac(p,32,B,d,M);if(d)for(f=0,e=c[X>>2]|0;;){b=c[e>>2]|0;if(!b){b=d;D=98;break b}b=Eg(W,b)|0;f=b+f|0;if((f|0)>(d|0)){b=d;D=98;break b}c[p>>2]&32||sc(W,b,p)|0;if(f>>>0>=d>>>0){b=d;D=98;break}else e=e+4|0}else b=0,D=98}while(0);98==
(D|0)?(D=0,Ac(p,32,B,b,M^8192),r=O,b=(B|0)>(b|0)?B:b):(77==(D|0)&&(D=0,f=-1<(e|0)?d&-65537:d,d=X,d=0!=(c[d>>2]|0)|0!=(c[d+4>>2]|0),0!=(e|0)|d?(d=(d&1^1)+(N-b)|0,r=b,d=(e|0)>(d|0)?e:d):(r=G,d=0),n=k,b=G),k=b-r|0,d=(d|0)<(k|0)?k:d,e=m+d|0,b=(B|0)<(e|0)?e:B,Ac(p,32,b,e,f),c[p>>2]&32||sc(n,m,p)|0,Ac(p,48,b,e,f^65536),Ac(p,48,d,k,0),c[p>>2]&32||sc(r,k,p)|0,Ac(p,32,b,e,f^8192),r=O)}else r=O,b=t}}a:do if(245==(D|0)&&!p)if(v){for(g=1;;){v=c[l+(g<<2)>>2]|0;if(!v)break;pd(T+(g<<3)|0,v,a);g=g+1|0;if(10<=(g|
0)){g=1;break a}}if(10>(g|0))for(;;){if(c[l+(g<<2)>>2]|0){g=-1;break a}g=g+1|0;if(10<=(g|0)){g=1;break}}else g=1}else g=0;while(0);F=ha;return g|0}function od(p,v,a,b,l){p|=0;v|=0;a|=0;b|=0;l|=0;var g=0,d=0,f=0,h=0,h=F;F=F+112|0;f=h;c[f>>2]=0;g=f+4|0;c[g>>2]=p;c[f+44>>2]=p;d=f+8|0;c[d>>2]=0>(p|0)?-1:p+2147483647|0;c[f+76>>2]=-1;id(f,0);b=Fg(f,a,1,b,l)|0;v&&(c[v>>2]=p+((c[g>>2]|0)+(c[f+108>>2]|0)-(c[d>>2]|0)));F=h;return b|0}function pd(p,v,a){p|=0;v|=0;a|=0;var b=0,l=0,b=0;a:do if(20>=v>>>0){do switch(v|
0){case 9:b=(c[a>>2]|0)+3&-4;v=c[b>>2]|0;c[a>>2]=b+4;c[p>>2]=v;break a;case 10:b=(c[a>>2]|0)+3&-4;v=c[b>>2]|0;c[a>>2]=b+4;b=p;c[b>>2]=v;c[b+4>>2]=(0>(v|0))<<31>>31;break a;case 11:b=(c[a>>2]|0)+3&-4;v=c[b>>2]|0;c[a>>2]=b+4;b=p;c[b>>2]=v;c[b+4>>2]=0;break a;case 12:v=b=(c[a>>2]|0)+7&-8;l=c[v>>2]|0;v=c[v+4>>2]|0;c[a>>2]=b+8;b=p;c[b>>2]=l;c[b+4>>2]=v;break a;case 13:l=(c[a>>2]|0)+3&-4;b=c[l>>2]|0;c[a>>2]=l+4;b=(b&65535)<<16>>16;l=p;c[l>>2]=b;c[l+4>>2]=(0>(b|0))<<31>>31;break a;case 14:l=(c[a>>2]|0)+
3&-4;b=c[l>>2]|0;c[a>>2]=l+4;l=p;c[l>>2]=b&65535;c[l+4>>2]=0;break a;case 15:l=(c[a>>2]|0)+3&-4;b=c[l>>2]|0;c[a>>2]=l+4;b=(b&255)<<24>>24;l=p;c[l>>2]=b;c[l+4>>2]=(0>(b|0))<<31>>31;break a;case 16:l=(c[a>>2]|0)+3&-4;b=c[l>>2]|0;c[a>>2]=l+4;l=p;c[l>>2]=b&255;c[l+4>>2]=0;break a;case 17:l=(c[a>>2]|0)+7&-8;b=+eb[l>>3];c[a>>2]=l+8;eb[p>>3]=b;break a;case 18:l=(c[a>>2]|0)+7&-8;b=+eb[l>>3];c[a>>2]=l+8;eb[p>>3]=b;break a;default:break a}while(0)}while(0)}function Tc(c,v,a){c|=0;v|=0;a|=0;var b=0;if(0<v>>>
0|0==(v|0)&4294967295<c>>>0)for(;;)if(b=bg(c|0,v|0,10,0)|0,a=a+-1|0,u[a>>0]=b|48,b=pf(c|0,v|0,10,0)|0,9<v>>>0|9==(v|0)&4294967295<c>>>0)c=b,v=Fa;else{c=b;break}if(c)for(;!(a=a+-1|0,u[a>>0]=(c>>>0)%10|48,10>c>>>0);)c=(c>>>0)/10|0;return a|0}function Ac(p,v,a,b,l){p|=0;v|=0;a|=0;b|=0;l|=0;var g=0,d=0,f=0,f=F;F=F+256|0;d=f;do if((a|0)>(b|0)&0==(l&73728|0)){l=a-b|0;Za(d|0,v|0,(256<l>>>0?256:l)|0)|0;v=c[p>>2]|0;g=0==(v&32|0);if(255<l>>>0){b=a-b|0;do g&&(sc(d,256,p)|0,v=c[p>>2]|0),l=l+-256|0,g=0==(v&32|
0);while(255<l>>>0);if(g)l=b&255;else break}else if(!g)break;sc(d,l,p)|0}while(0);F=f}function Ub(p){p|=0;var v=0,a=0,b=0,l=0,g=0,d=0,f=0,h=0,e=0,k=0,m=0,u=0,n=0,q=0,r=0,x=0,F=0,S=0,I=0,t=0,z=0,A=0,E=0,y=0,L=0,M=0,B=0,D=0,O=0,J=0,G=0,w=0,Y=0,P=0,la=0,ja=0,U=0;do if(245>p>>>0){n=11>p>>>0?16:p+11&-8;p=n>>>3;f=c[10218]|0;a=f>>>p;if(a&3)return p=(a&1^1)+p|0,b=p<<1,a=40912+(b<<2)|0,b=40912+(b+2<<2)|0,l=c[b>>2]|0,g=l+8|0,d=c[g>>2]|0,(a|0)!=(d|0)?(d>>>0<(c[10222]|0)>>>0&&Aa(),v=d+12|0,(c[v>>2]|0)==(l|0)?
(c[v>>2]=a,c[b>>2]=d):Aa()):c[10218]=f&~(1<<p),U=p<<3,c[l+4>>2]=U|3,U=l+(U|4)|0,c[U>>2]|=1,U=g,U|0;d=c[10220]|0;if(n>>>0>d>>>0){if(a)return b=2<<p,b=a<<p&(b|0-b),b=(b&0-b)+-1|0,h=b>>>12&16,b>>>=h,l=b>>>5&8,b>>>=l,g=b>>>2&4,b>>>=g,a=b>>>1&2,b>>>=a,p=b>>>1&1,p=(l|h|g|a|p)+(b>>>p)|0,b=p<<1,a=40912+(b<<2)|0,b=40912+(b+2<<2)|0,g=c[b>>2]|0,h=g+8|0,l=c[h>>2]|0,(a|0)!=(l|0)?(l>>>0<(c[10222]|0)>>>0&&Aa(),v=l+12|0,(c[v>>2]|0)==(g|0)?(c[v>>2]=a,c[b>>2]=l,e=c[10220]|0):Aa()):(c[10218]=f&~(1<<p),e=d),U=p<<3,d=
U-n|0,c[g+4>>2]=n|3,f=g+n|0,c[g+(n|4)>>2]=d|1,c[g+U>>2]=d,e&&(l=c[10223]|0,a=e>>>3,v=a<<1,b=40912+(v<<2)|0,p=c[10218]|0,a=1<<a,p&a?(p=40912+(v+2<<2)|0,v=c[p>>2]|0,v>>>0<(c[10222]|0)>>>0?Aa():(k=p,m=v)):(c[10218]=p|a,k=40912+(v+2<<2)|0,m=b),c[k>>2]=l,c[m+12>>2]=l,c[l+8>>2]=m,c[l+12>>2]=b),c[10220]=d,c[10223]=f,U=h,U|0;if(p=c[10219]|0){a=(p&0-p)+-1|0;ja=a>>>12&16;a>>>=ja;la=a>>>5&8;a>>>=la;U=a>>>2&4;a>>>=U;p=a>>>1&2;a>>>=p;b=a>>>1&1;b=c[41176+((la|ja|U|p|b)+(a>>>b)<<2)>>2]|0;a=(c[b+4>>2]&-8)-n|0;for(p=
b;;){v=c[p+16>>2]|0;if(!v&&(v=c[p+20>>2]|0,!v)){h=a;break}p=(c[v+4>>2]&-8)-n|0;a=(U=p>>>0<a>>>0)?p:a;p=v;b=U?v:b}g=c[10222]|0;b>>>0<g>>>0&&Aa();f=b+n|0;b>>>0>=f>>>0&&Aa();d=c[b+24>>2]|0;a=c[b+12>>2]|0;do if((a|0)==(b|0)){p=b+20|0;v=c[p>>2]|0;if(!v&&(p=b+16|0,v=c[p>>2]|0,!v)){u=0;break}for(;;)if(a=v+20|0,l=c[a>>2]|0)v=l,p=a;else if(a=v+16|0,l=c[a>>2]|0)v=l,p=a;else break;p>>>0<g>>>0?Aa():(c[p>>2]=0,u=v)}else l=c[b+8>>2]|0,l>>>0<g>>>0&&Aa(),v=l+12|0,(c[v>>2]|0)!=(b|0)&&Aa(),p=a+8|0,(c[p>>2]|0)==(b|
0)?(c[v>>2]=a,c[p>>2]=l,u=a):Aa();while(0);do if(d){v=c[b+28>>2]|0;p=41176+(v<<2)|0;if((b|0)==(c[p>>2]|0)){if(c[p>>2]=u,!u){c[10219]&=~(1<<v);break}}else if(d>>>0<(c[10222]|0)>>>0&&Aa(),v=d+16|0,(c[v>>2]|0)==(b|0)?c[v>>2]=u:c[d+20>>2]=u,!u)break;p=c[10222]|0;u>>>0<p>>>0&&Aa();c[u+24>>2]=d;if(v=c[b+16>>2]|0)v>>>0<p>>>0?Aa():(c[u+16>>2]=v,c[v+24>>2]=u);if(v=c[b+20>>2]|0)v>>>0<(c[10222]|0)>>>0?Aa():(c[u+20>>2]=v,c[v+24>>2]=u)}while(0);if(16>h>>>0)U=h+n|0,c[b+4>>2]=U|3,U=b+(U+4)|0,c[U>>2]|=1;else{c[b+
4>>2]=n|3;c[b+(n|4)>>2]=h|1;c[b+(h+n)>>2]=h;if(v=c[10220]|0)g=c[10223]|0,a=v>>>3,v=a<<1,l=40912+(v<<2)|0,p=c[10218]|0,a=1<<a,p&a?(v=40912+(v+2<<2)|0,p=c[v>>2]|0,p>>>0<(c[10222]|0)>>>0?Aa():(q=v,r=p)):(c[10218]=p|a,q=40912+(v+2<<2)|0,r=l),c[q>>2]=g,c[r+12>>2]=g,c[g+8>>2]=r,c[g+12>>2]=l;c[10220]=h;c[10223]=f}U=b+8|0;return U|0}}r=n}else if(4294967231>=p>>>0){p=p+11|0;m=p&-8;if(k=c[10219]|0){a=0-m|0;(p>>>=8)?16777215<m>>>0?e=31:(r=(p+1048320|0)>>>16&8,t=p<<r,q=(t+520192|0)>>>16&4,t<<=q,e=(t+245760|0)>>>
16&2,e=14-(q|r|e)+(t<<e>>>15)|0,e=m>>>(e+7|0)&1|e<<1):e=0;p=c[41176+(e<<2)>>2]|0;a:do if(p)for(d=a,l=0,f=m<<(31==(e|0)?0:25-(e>>>1)|0),h=p,p=0;;){g=c[h+4>>2]&-8;a=g-m|0;if(a>>>0<d>>>0)if((g|0)==(m|0)){p=g=h;t=90;break a}else p=h;else a=d;t=c[h+20>>2]|0;h=c[h+16+(f>>>31<<2)>>2]|0;l=0==(t|0)|(t|0)==(h|0)?l:t;if(h)d=a,f<<=1;else{t=86;break}}else p=l=0,t=86;while(0);if(86==(t|0)){if(0==(l|0)&0==(p|0)){p=2<<e;p=k&(p|0-p);if(!p){r=m;break}p=(p&0-p)+-1|0;u=p>>>12&16;p>>>=u;k=p>>>5&8;p>>>=k;q=p>>>2&4;p>>>=
q;r=p>>>1&2;p>>>=r;l=p>>>1&1;l=c[41176+((k|u|q|r|l)+(p>>>l)<<2)>>2]|0;p=0}l?(g=l,t=90):(f=a,h=p)}if(90==(t|0))for(;;)if(t=0,r=(c[g+4>>2]&-8)-m|0,a=(l=r>>>0<a>>>0)?r:a,p=l?g:p,l=c[g+16>>2]|0)g=l;else if(g=c[g+20>>2]|0,!g){f=a;h=p;break}if(0!=(h|0)&&f>>>0<((c[10220]|0)-m|0)>>>0){l=c[10222]|0;h>>>0<l>>>0&&Aa();d=h+m|0;h>>>0>=d>>>0&&Aa();g=c[h+24>>2]|0;a=c[h+12>>2]|0;do if((a|0)==(h|0)){p=h+20|0;v=c[p>>2]|0;if(!v&&(p=h+16|0,v=c[p>>2]|0,!v)){n=0;break}for(;;)if(a=v+20|0,b=c[a>>2]|0)v=b,p=a;else if(a=v+
16|0,b=c[a>>2]|0)v=b,p=a;else break;p>>>0<l>>>0?Aa():(c[p>>2]=0,n=v)}else b=c[h+8>>2]|0,b>>>0<l>>>0&&Aa(),v=b+12|0,(c[v>>2]|0)!=(h|0)&&Aa(),p=a+8|0,(c[p>>2]|0)==(h|0)?(c[v>>2]=a,c[p>>2]=b,n=a):Aa();while(0);do if(g){v=c[h+28>>2]|0;p=41176+(v<<2)|0;if((h|0)==(c[p>>2]|0)){if(c[p>>2]=n,!n){c[10219]&=~(1<<v);break}}else if(g>>>0<(c[10222]|0)>>>0&&Aa(),v=g+16|0,(c[v>>2]|0)==(h|0)?c[v>>2]=n:c[g+20>>2]=n,!n)break;p=c[10222]|0;n>>>0<p>>>0&&Aa();c[n+24>>2]=g;if(v=c[h+16>>2]|0)v>>>0<p>>>0?Aa():(c[n+16>>2]=
v,c[v+24>>2]=n);if(v=c[h+20>>2]|0)v>>>0<(c[10222]|0)>>>0?Aa():(c[n+20>>2]=v,c[v+24>>2]=n)}while(0);a:do if(16<=f>>>0)if(c[h+4>>2]=m|3,c[h+(m|4)>>2]=f|1,c[h+(f+m)>>2]=f,v=f>>>3,256>f>>>0)p=v<<1,b=40912+(p<<2)|0,a=c[10218]|0,v=1<<v,a&v?(v=40912+(p+2<<2)|0,p=c[v>>2]|0,p>>>0<(c[10222]|0)>>>0?Aa():(F=v,S=p)):(c[10218]=a|v,F=40912+(p+2<<2)|0,S=b),c[F>>2]=d,c[S+12>>2]=d,c[h+(m+8)>>2]=S,c[h+(m+12)>>2]=b;else if((v=f>>>8)?16777215<f>>>0?b=31:(ja=(v+1048320|0)>>>16&8,U=v<<ja,la=(U+520192|0)>>>16&4,U<<=la,b=
(U+245760|0)>>>16&2,b=14-(la|ja|b)+(U<<b>>>15)|0,b=f>>>(b+7|0)&1|b<<1):b=0,v=41176+(b<<2)|0,c[h+(m+28)>>2]=b,c[h+(m+20)>>2]=0,c[h+(m+16)>>2]=0,p=c[10219]|0,a=1<<b,p&a){v=c[v>>2]|0;b:do if((c[v+4>>2]&-8|0)!=(f|0)){for(b=f<<(31==(b|0)?0:25-(b>>>1)|0);;){p=v+16+(b>>>31<<2)|0;a=c[p>>2]|0;if(!a)break;if((c[a+4>>2]&-8|0)==(f|0)){E=a;break b}else b<<=1,v=a}if(p>>>0<(c[10222]|0)>>>0)Aa();else{c[p>>2]=d;c[h+(m+24)>>2]=v;c[h+(m+12)>>2]=d;c[h+(m+8)>>2]=d;break a}}else E=v;while(0);v=E+8|0;p=c[v>>2]|0;U=c[10222]|
0;p>>>0>=U>>>0&E>>>0>=U>>>0?(c[p+12>>2]=d,c[v>>2]=d,c[h+(m+8)>>2]=p,c[h+(m+12)>>2]=E,c[h+(m+24)>>2]=0):Aa()}else c[10219]=p|a,c[v>>2]=d,c[h+(m+24)>>2]=v,c[h+(m+12)>>2]=d,c[h+(m+8)>>2]=d;else U=f+m|0,c[h+4>>2]=U|3,U=h+(U+4)|0,c[U>>2]|=1;while(0);U=h+8|0;return U|0}}r=m}else r=-1;while(0);a=c[10220]|0;if(a>>>0>=r>>>0)return v=a-r|0,p=c[10223]|0,15<v>>>0?(c[10223]=p+r,c[10220]=v,c[p+(r+4)>>2]=v|1,c[p+a>>2]=v,c[p+4>>2]=r|3):(c[10220]=0,c[10223]=0,c[p+4>>2]=a|3,U=p+(a+4)|0,c[U>>2]|=1),p+8|0;p=c[10221]|
0;if(p>>>0>r>>>0)return ja=p-r|0,c[10221]=ja,U=c[10224]|0,c[10224]=U+r,c[U+(r+4)>>2]=ja|1,c[U+4>>2]=r|3,U=U+8|0,U|0;c[10336]|0||(p=bi(30)|0,p+-1&p?Aa():(c[10338]=p,c[10337]=p,c[10339]=-1,c[10340]=-1,c[10341]=0,c[10329]=0,E=(ci(0)|0)&-16^1431655768,c[10336]=E));h=r+48|0;f=c[10338]|0;e=r+47|0;d=f+e|0;f=0-f|0;k=d&f;if(k>>>0<=r>>>0)return 0;p=c[10328]|0;if(0!=(p|0)&&(S=c[10326]|0,E=S+k|0,E>>>0<=S>>>0|E>>>0>p>>>0))return 0;a:do{if(c[10329]&4)p=0;else{p=c[10224]|0;b:do if(p){for(l=41320;;){a=c[l>>2]|0;
if(a>>>0<=p>>>0&&(x=l+4|0,(a+(c[x>>2]|0)|0)>>>0>p>>>0)){g=l;p=x;break}l=c[l+8>>2]|0;if(!l){t=174;break b}}a=d-(c[10221]|0)&f;if(2147483647>a>>>0)if(l=te(a|0)|0,p=(E=(l|0)==((c[g>>2]|0)+(c[p>>2]|0)|0))?a:0,E){if(-1!=(l|0)){z=l;q=p;t=194;break a}}else t=184;else p=0}else t=174;while(0);do if(174==(t|0))if(g=te(0)|0,-1!=(g|0))if(p=g,a=c[10337]|0,l=a+-1|0,a=l&p?k-p+(l+p&0-a)|0:k,p=c[10326]|0,l=p+a|0,a>>>0>r>>>0&2147483647>a>>>0)if(E=c[10328]|0,0!=(E|0)&&l>>>0<=p>>>0|l>>>0>E>>>0)p=0;else if(l=te(a|0)|
0,p=(E=(l|0)==(g|0))?a:0,E){z=g;q=p;t=194;break a}else t=184;else p=0;else p=0;while(0);b:do if(184==(t|0)){g=0-a|0;do if(h>>>0>a>>>0&2147483647>a>>>0&-1!=(l|0)&&(I=c[10338]|0,I=e-a+I&0-I,2147483647>I>>>0))if(-1==(te(I|0)|0)){te(g|0)|0;break b}else a=I+a|0;while(0);if(-1!=(l|0)){z=l;q=a;t=194;break a}}while(0);c[10329]|=4}t=191}while(0);191==(t|0)&&2147483647>k>>>0&&(z=te(k|0)|0,A=te(0)|0,z>>>0<A>>>0&-1!=(z|0)&-1!=(A|0))&&(y=A-z|0,L=y>>>0>(r+40|0)>>>0,L)&&(q=L?y:p,t=194);if(194==(t|0)){p=(c[10326]|
0)+q|0;c[10326]=p;p>>>0>(c[10327]|0)>>>0&&(c[10327]=p);d=c[10224]|0;a:do if(d){g=41320;do{p=c[g>>2]|0;a=g+4|0;l=c[a>>2]|0;if((z|0)==(p+l|0)){M=p;B=a;D=l;O=g;t=204;break}g=c[g+8>>2]|0}while(0!=(g|0));if(204==(t|0)&&0==(c[O+12>>2]&8|0)&&d>>>0<z>>>0&d>>>0>=M>>>0)c[B>>2]=D+q,U=(c[10221]|0)+q|0,ja=d+8|0,ja=0==(ja&7|0)?0:0-ja&7,la=U-ja|0,c[10224]=d+ja,c[10221]=la,c[d+(ja+4)>>2]=la|1,c[d+(U+4)>>2]=40,c[10225]=c[10340];else{p=c[10222]|0;z>>>0<p>>>0&&(p=c[10222]=z);a=z+q|0;for(g=41320;;){if((c[g>>2]|0)==(a|
0)){a=l=g;t=212;break}g=c[g+8>>2]|0;if(!g){a=41320;break}}if(212==(t|0))if(c[a+12>>2]&8)a=41320;else{c[l>>2]=z;u=a+4|0;c[u>>2]=(c[u>>2]|0)+q;u=z+8|0;u=0==(u&7|0)?0:0-u&7;e=z+(q+8)|0;e=0==(e&7|0)?0:0-e&7;v=z+(e+q)|0;m=u+r|0;n=z+m|0;k=v-(z+u)-r|0;c[z+(u+4)>>2]=r|3;b:do if((v|0)!=(d|0))if((v|0)==(c[10223]|0))U=(c[10220]|0)+k|0,c[10220]=U,c[10223]=n,c[z+(m+4)>>2]=U|1,c[z+(U+m)>>2]=U;else{f=q+4|0;a=c[z+(f+e)>>2]|0;if(1==(a&3|0)){h=a&-8;g=a>>>3;c:do if(256<=a>>>0){d=c[z+((e|24)+q)>>2]|0;b=c[z+(q+12+e)>>
2]|0;do if((b|0)==(v|0)){l=e|16;b=z+(f+l)|0;a=c[b>>2]|0;if(!a&&(b=z+(l+q)|0,a=c[b>>2]|0,!a)){P=0;break}for(;;)if(l=a+20|0,g=c[l>>2]|0)a=g,b=l;else if(l=a+16|0,g=c[l>>2]|0)a=g,b=l;else break;b>>>0<p>>>0?Aa():(c[b>>2]=0,P=a)}else l=c[z+((e|8)+q)>>2]|0,l>>>0<p>>>0&&Aa(),p=l+12|0,(c[p>>2]|0)!=(v|0)&&Aa(),a=b+8|0,(c[a>>2]|0)==(v|0)?(c[p>>2]=b,c[a>>2]=l,P=b):Aa();while(0);if(d){p=c[z+(q+28+e)>>2]|0;a=41176+(p<<2)|0;do if((v|0)!=(c[a>>2]|0)){if(d>>>0<(c[10222]|0)>>>0&&Aa(),p=d+16|0,(c[p>>2]|0)==(v|0)?c[p>>
2]=P:c[d+20>>2]=P,!P)break c}else if(c[a>>2]=P,!P){c[10219]&=~(1<<p);break c}while(0);a=c[10222]|0;P>>>0<a>>>0&&Aa();c[P+24>>2]=d;v=e|16;if(p=c[z+(v+q)>>2]|0)p>>>0<a>>>0?Aa():(c[P+16>>2]=p,c[p+24>>2]=P);if(v=c[z+(f+v)>>2]|0)v>>>0<(c[10222]|0)>>>0?Aa():(c[P+20>>2]=v,c[v+24>>2]=P)}}else b=c[z+((e|8)+q)>>2]|0,l=c[z+(q+12+e)>>2]|0,a=40912+(g<<1<<2)|0,(b|0)!=(a|0)&&(b>>>0<p>>>0&&Aa(),(c[b+12>>2]|0)!=(v|0)&&Aa()),(l|0)==(b|0)?c[10218]&=~(1<<g):((l|0)==(a|0)?J=l+8|0:(l>>>0<p>>>0&&Aa(),p=l+8|0,(c[p>>2]|0)==
(v|0)?J=p:Aa()),c[b+12>>2]=l,c[J>>2]=b);while(0);v=z+((h|e)+q)|0;l=h+k|0}else l=k;v=v+4|0;c[v>>2]&=-2;c[z+(m+4)>>2]=l|1;c[z+(l+m)>>2]=l;v=l>>>3;if(256>l>>>0)p=v<<1,b=40912+(p<<2)|0,a=c[10218]|0,v=1<<v,a&v?(v=40912+(p+2<<2)|0,p=c[v>>2]|0,p>>>0>=(c[10222]|0)>>>0?(la=v,ja=p):Aa()):(c[10218]=a|v,la=40912+(p+2<<2)|0,ja=b),c[la>>2]=n,c[ja+12>>2]=n,c[z+(m+8)>>2]=ja,c[z+(m+12)>>2]=b;else if((v=l>>>8)?16777215<l>>>0?b=31:(la=(v+1048320|0)>>>16&8,ja=v<<la,P=(ja+520192|0)>>>16&4,ja<<=P,b=(ja+245760|0)>>>16&
2,b=14-(P|la|b)+(ja<<b>>>15)|0,b=l>>>(b+7|0)&1|b<<1):b=0,v=41176+(b<<2)|0,c[z+(m+28)>>2]=b,c[z+(m+20)>>2]=0,c[z+(m+16)>>2]=0,p=c[10219]|0,a=1<<b,p&a){v=c[v>>2]|0;c:do if((c[v+4>>2]&-8|0)!=(l|0)){for(b=l<<(31==(b|0)?0:25-(b>>>1)|0);;){p=v+16+(b>>>31<<2)|0;a=c[p>>2]|0;if(!a)break;if((c[a+4>>2]&-8|0)==(l|0)){U=a;break c}else b<<=1,v=a}if(p>>>0<(c[10222]|0)>>>0)Aa();else{c[p>>2]=n;c[z+(m+24)>>2]=v;c[z+(m+12)>>2]=n;c[z+(m+8)>>2]=n;break b}}else U=v;while(0);v=U+8|0;p=c[v>>2]|0;ja=c[10222]|0;p>>>0>=ja>>>
0&U>>>0>=ja>>>0?(c[p+12>>2]=n,c[v>>2]=n,c[z+(m+8)>>2]=p,c[z+(m+12)>>2]=U,c[z+(m+24)>>2]=0):Aa()}else c[10219]=p|a,c[v>>2]=n,c[z+(m+24)>>2]=v,c[z+(m+12)>>2]=n,c[z+(m+8)>>2]=n}else U=(c[10221]|0)+k|0,c[10221]=U,c[10224]=n,c[z+(m+4)>>2]=U|1;while(0);U=z+(u|8)|0;return U|0}for(;;){p=c[a>>2]|0;if(p>>>0<=d>>>0&&(v=c[a+4>>2]|0,b=p+v|0,b>>>0>d>>>0))break;a=c[a+8>>2]|0}l=p+(v+-39)|0;p=p+(v+-47+(0==(l&7|0)?0:0-l&7))|0;l=d+16|0;p=p>>>0<l>>>0?d:p;v=p+8|0;a=z+8|0;a=0==(a&7|0)?0:0-a&7;U=q+-40-a|0;c[10224]=z+a;
c[10221]=U;c[z+(a+4)>>2]=U|1;c[z+(q+-36)>>2]=40;c[10225]=c[10340];a=p+4|0;c[a>>2]=27;c[v>>2]=c[10330];c[v+4>>2]=c[10331];c[v+8>>2]=c[10332];c[v+12>>2]=c[10333];c[10330]=z;c[10331]=q;c[10333]=0;c[10332]=v;v=p+28|0;c[v>>2]=7;if((p+32|0)>>>0<b>>>0){do U=v,v=v+4|0,c[v>>2]=7;while((U+8|0)>>>0<b>>>0)}if((p|0)!=(d|0))if(g=p-d|0,c[a>>2]&=-2,c[d+4>>2]=g|1,c[p>>2]=g,v=g>>>3,256>g>>>0)p=v<<1,b=40912+(p<<2)|0,a=c[10218]|0,v=1<<v,a&v?(v=40912+(p+2<<2)|0,p=c[v>>2]|0,p>>>0<(c[10222]|0)>>>0?Aa():(G=v,w=p)):(c[10218]=
a|v,G=40912+(p+2<<2)|0,w=b),c[G>>2]=d,c[w+12>>2]=d,c[d+8>>2]=w,c[d+12>>2]=b;else if((v=g>>>8)?16777215<g>>>0?b=31:(ja=(v+1048320|0)>>>16&8,U=v<<ja,la=(U+520192|0)>>>16&4,U<<=la,b=(U+245760|0)>>>16&2,b=14-(la|ja|b)+(U<<b>>>15)|0,b=g>>>(b+7|0)&1|b<<1):b=0,a=41176+(b<<2)|0,c[d+28>>2]=b,c[d+20>>2]=0,c[l>>2]=0,v=c[10219]|0,p=1<<b,v&p){v=c[a>>2]|0;b:do if((c[v+4>>2]&-8|0)!=(g|0)){for(b=g<<(31==(b|0)?0:25-(b>>>1)|0);;){p=v+16+(b>>>31<<2)|0;a=c[p>>2]|0;if(!a)break;if((c[a+4>>2]&-8|0)==(g|0)){Y=a;break b}else b<<=
1,v=a}if(p>>>0<(c[10222]|0)>>>0)Aa();else{c[p>>2]=d;c[d+24>>2]=v;c[d+12>>2]=d;c[d+8>>2]=d;break a}}else Y=v;while(0);v=Y+8|0;p=c[v>>2]|0;U=c[10222]|0;p>>>0>=U>>>0&Y>>>0>=U>>>0?(c[p+12>>2]=d,c[v>>2]=d,c[d+8>>2]=p,c[d+12>>2]=Y,c[d+24>>2]=0):Aa()}else c[10219]=v|p,c[a>>2]=d,c[d+24>>2]=a,c[d+12>>2]=d,c[d+8>>2]=d}}else{U=c[10222]|0;0==(U|0)|z>>>0<U>>>0&&(c[10222]=z);c[10330]=z;c[10331]=q;c[10333]=0;c[10227]=c[10336];c[10226]=-1;v=0;do U=v<<1,ja=40912+(U<<2)|0,c[40912+(U+3<<2)>>2]=ja,c[40912+(U+2<<2)>>
2]=ja,v=v+1|0;while(32!=(v|0));U=z+8|0;U=0==(U&7|0)?0:0-U&7;ja=q+-40-U|0;c[10224]=z+U;c[10221]=ja;c[z+(U+4)>>2]=ja|1;c[z+(q+-36)>>2]=40;c[10225]=c[10340]}while(0);v=c[10221]|0;if(v>>>0>r>>>0)return ja=v-r|0,c[10221]=ja,U=c[10224]|0,c[10224]=U+r,c[U+(r+4)>>2]=ja|1,c[U+4>>2]=r|3,U=U+8|0,U|0}U=sb()|0;c[U>>2]=12;return 0}function $a(p){p|=0;var v=0,a=0,b=0,l=0,g=0,d=0,f=0,h=0,e=0,k=0,m=0,u=0,n=0,q=0,r=0,x=0,t=0,S=0,I=0;if(p){v=p+-8|0;f=c[10222]|0;v>>>0<f>>>0&&Aa();a=c[p+-4>>2]|0;b=a&3;1==(b|0)&&Aa();
n=a&-8;r=p+(n+-8)|0;do if(a&1)I=v,g=n;else{v=c[v>>2]|0;if(!b)return;h=-8-v|0;k=p+h|0;m=v+n|0;k>>>0<f>>>0&&Aa();if((k|0)==(c[10223]|0)){v=p+(n+-4)|0;a=c[v>>2]|0;if(3!=(a&3|0)){I=k;g=m;break}c[10220]=m;c[v>>2]=a&-2;c[p+(h+4)>>2]=m|1;c[r>>2]=m;return}l=v>>>3;if(256>v>>>0)b=c[p+(h+8)>>2]|0,a=c[p+(h+12)>>2]|0,v=40912+(l<<1<<2)|0,(b|0)!=(v|0)&&(b>>>0<f>>>0&&Aa(),(c[b+12>>2]|0)!=(k|0)&&Aa()),(a|0)==(b|0)?c[10218]&=~(1<<l):((a|0)!=(v|0)?(a>>>0<f>>>0&&Aa(),v=a+8|0,(c[v>>2]|0)==(k|0)?d=v:Aa()):d=a+8|0,c[b+
12>>2]=a,c[d>>2]=b),I=k,g=m;else{d=c[p+(h+24)>>2]|0;b=c[p+(h+12)>>2]|0;do if((b|0)==(k|0)){a=p+(h+20)|0;v=c[a>>2]|0;if(!v&&(a=p+(h+16)|0,v=c[a>>2]|0,!v)){e=0;break}for(;;)if(b=v+20|0,l=c[b>>2]|0)v=l,a=b;else if(b=v+16|0,l=c[b>>2]|0)v=l,a=b;else break;a>>>0<f>>>0?Aa():(c[a>>2]=0,e=v)}else l=c[p+(h+8)>>2]|0,l>>>0<f>>>0&&Aa(),v=l+12|0,(c[v>>2]|0)!=(k|0)&&Aa(),a=b+8|0,(c[a>>2]|0)==(k|0)?(c[v>>2]=b,c[a>>2]=l,e=b):Aa();while(0);if(d){v=c[p+(h+28)>>2]|0;a=41176+(v<<2)|0;if((k|0)==(c[a>>2]|0)){if(c[a>>2]=
e,!e){c[10219]&=~(1<<v);I=k;g=m;break}}else if(d>>>0<(c[10222]|0)>>>0&&Aa(),v=d+16|0,(c[v>>2]|0)==(k|0)?c[v>>2]=e:c[d+20>>2]=e,!e){I=k;g=m;break}a=c[10222]|0;e>>>0<a>>>0&&Aa();c[e+24>>2]=d;if(v=c[p+(h+16)>>2]|0)v>>>0<a>>>0?Aa():(c[e+16>>2]=v,c[v+24>>2]=e);(v=c[p+(h+20)>>2]|0)?v>>>0<(c[10222]|0)>>>0?Aa():(c[e+20>>2]=v,c[v+24>>2]=e,I=k,g=m):(I=k,g=m)}else I=k,g=m}}while(0);I>>>0>=r>>>0&&Aa();v=p+(n+-4)|0;a=c[v>>2]|0;a&1||Aa();if(a&2)c[v>>2]=a&-2,c[I+4>>2]=g|1,c[I+g>>2]=g;else{if((r|0)==(c[10224]|0)){S=
(c[10221]|0)+g|0;c[10221]=S;c[10224]=I;c[I+4>>2]=S|1;if((I|0)!=(c[10223]|0))return;c[10223]=0;c[10220]=0;return}if((r|0)==(c[10223]|0)){S=(c[10220]|0)+g|0;c[10220]=S;c[10223]=I;c[I+4>>2]=S|1;c[I+S>>2]=S;return}g=(a&-8)+g|0;l=a>>>3;do if(256<=a>>>0){d=c[p+(n+16)>>2]|0;v=c[p+(n|4)>>2]|0;do if((v|0)==(r|0)){a=p+(n+12)|0;v=c[a>>2]|0;if(!v&&(a=p+(n+8)|0,v=c[a>>2]|0,!v)){q=0;break}for(;;)if(b=v+20|0,l=c[b>>2]|0)v=l,a=b;else if(b=v+16|0,l=c[b>>2]|0)v=l,a=b;else break;a>>>0<(c[10222]|0)>>>0?Aa():(c[a>>2]=
0,q=v)}else a=c[p+n>>2]|0,a>>>0<(c[10222]|0)>>>0&&Aa(),b=a+12|0,(c[b>>2]|0)!=(r|0)&&Aa(),l=v+8|0,(c[l>>2]|0)==(r|0)?(c[b>>2]=v,c[l>>2]=a,q=v):Aa();while(0);if(d){v=c[p+(n+20)>>2]|0;a=41176+(v<<2)|0;if((r|0)==(c[a>>2]|0)){if(c[a>>2]=q,!q){c[10219]&=~(1<<v);break}}else if(d>>>0<(c[10222]|0)>>>0&&Aa(),v=d+16|0,(c[v>>2]|0)==(r|0)?c[v>>2]=q:c[d+20>>2]=q,!q)break;a=c[10222]|0;q>>>0<a>>>0&&Aa();c[q+24>>2]=d;if(v=c[p+(n+8)>>2]|0)v>>>0<a>>>0?Aa():(c[q+16>>2]=v,c[v+24>>2]=q);if(v=c[p+(n+12)>>2]|0)v>>>0<(c[10222]|
0)>>>0?Aa():(c[q+20>>2]=v,c[v+24>>2]=q)}}else b=c[p+n>>2]|0,a=c[p+(n|4)>>2]|0,v=40912+(l<<1<<2)|0,(b|0)!=(v|0)&&(b>>>0<(c[10222]|0)>>>0&&Aa(),(c[b+12>>2]|0)!=(r|0)&&Aa()),(a|0)==(b|0)?c[10218]&=~(1<<l):((a|0)!=(v|0)?(a>>>0<(c[10222]|0)>>>0&&Aa(),v=a+8|0,(c[v>>2]|0)==(r|0)?u=v:Aa()):u=a+8|0,c[b+12>>2]=a,c[u>>2]=b);while(0);c[I+4>>2]=g|1;c[I+g>>2]=g;if((I|0)==(c[10223]|0)){c[10220]=g;return}}v=g>>>3;if(256>g>>>0)a=v<<1,l=40912+(a<<2)|0,b=c[10218]|0,v=1<<v,b&v?(v=40912+(a+2<<2)|0,a=c[v>>2]|0,a>>>0<(c[10222]|
0)>>>0?Aa():(x=v,t=a)):(c[10218]=b|v,x=40912+(a+2<<2)|0,t=l),c[x>>2]=I,c[t+12>>2]=I,c[I+8>>2]=t,c[I+12>>2]=l;else{(v=g>>>8)?16777215<g>>>0?l=31:(x=(v+1048320|0)>>>16&8,t=v<<x,r=(t+520192|0)>>>16&4,t<<=r,l=(t+245760|0)>>>16&2,l=14-(r|x|l)+(t<<l>>>15)|0,l=g>>>(l+7|0)&1|l<<1):l=0;v=41176+(l<<2)|0;c[I+28>>2]=l;c[I+20>>2]=0;c[I+16>>2]=0;a=c[10219]|0;b=1<<l;a:do if(a&b){v=c[v>>2]|0;b:do if((c[v+4>>2]&-8|0)!=(g|0)){for(l=g<<(31==(l|0)?0:25-(l>>>1)|0);;){a=v+16+(l>>>31<<2)|0;b=c[a>>2]|0;if(!b)break;if((c[b+
4>>2]&-8|0)==(g|0)){S=b;break b}else l<<=1,v=b}if(a>>>0<(c[10222]|0)>>>0)Aa();else{c[a>>2]=I;c[I+24>>2]=v;c[I+12>>2]=I;c[I+8>>2]=I;break a}}else S=v;while(0);v=S+8|0;a=c[v>>2]|0;t=c[10222]|0;a>>>0>=t>>>0&S>>>0>=t>>>0?(c[a+12>>2]=I,c[v>>2]=I,c[I+8>>2]=a,c[I+12>>2]=S,c[I+24>>2]=0):Aa()}else c[10219]=a|b,c[v>>2]=I,c[I+24>>2]=v,c[I+12>>2]=I,c[I+8>>2]=I;while(0);I=(c[10226]|0)+-1|0;c[10226]=I;if(!I){for(v=41328;;)if(v=c[v>>2]|0)v=v+8|0;else break;c[10226]=-1}}}}function Xc(p,v){p|=0;v|=0;var a=0,b=0;if(!p)return p=
Ub(v)|0,p|0;if(4294967231<v>>>0)return p=sb()|0,c[p>>2]=12,0;if(a=Ed(p+-8|0,11>v>>>0?16:v+11&-8)|0)return a+8|0;a=Ub(v)|0;if(!a)return 0;b=c[p+-4>>2]|0;b=(b&-8)-(0==(b&3|0)?8:4)|0;gb(a|0,p|0,(b>>>0<v>>>0?b:v)|0)|0;$a(p);return a|0}function Ed(p,v){p|=0;v|=0;var a=0,b=0,l=0,g=0,d=0,f=0,h=0,e=0,k=0,m=0,u=0,n=0,q=0,n=p+4|0,q=c[n>>2]|0,h=q&-8,k=p+h|0,f=c[10222]|0,a=q&3;1!=(a|0)&p>>>0>=f>>>0&p>>>0<k>>>0||Aa();b=p+(h|4)|0;l=c[b>>2]|0;l&1||Aa();if(!a)return 256>v>>>0?0:h>>>0>=(v+4|0)>>>0&&(h-v|0)>>>0<=c[10338]<<
1>>>0?p|0:0;if(h>>>0>=v>>>0){a=h-v|0;if(15>=a>>>0)return p|0;c[n>>2]=q&1|v|2;c[p+(v+4)>>2]=a|3;c[b>>2]|=1;Bd(p+v|0,a);return p|0}if((k|0)==(c[10224]|0)){a=(c[10221]|0)+h|0;if(a>>>0<=v>>>0)return 0;u=a-v|0;c[n>>2]=q&1|v|2;c[p+(v+4)>>2]=u|1;c[10224]=p+v;c[10221]=u;return p|0}if((k|0)==(c[10223]|0)){b=(c[10220]|0)+h|0;if(b>>>0<v>>>0)return 0;a=b-v|0;15<a>>>0?(c[n>>2]=q&1|v|2,c[p+(v+4)>>2]=a|1,c[p+b>>2]=a,b=p+(b+4)|0,c[b>>2]&=-2,b=p+v|0):(c[n>>2]=q&1|b|2,b=p+(b+4)|0,c[b>>2]|=1,a=b=0);c[10220]=a;c[10223]=
b;return p|0}if(l&2)return 0;m=(l&-8)+h|0;if(m>>>0<v>>>0)return 0;u=m-v|0;g=l>>>3;do if(256<=l>>>0){d=c[p+(h+24)>>2]|0;g=c[p+(h+12)>>2]|0;do if((g|0)==(k|0)){b=p+(h+20)|0;a=c[b>>2]|0;if(!a&&(b=p+(h+16)|0,a=c[b>>2]|0,!a)){e=0;break}for(;;)if(l=a+20|0,g=c[l>>2]|0)a=g,b=l;else if(l=a+16|0,g=c[l>>2]|0)a=g,b=l;else break;b>>>0<f>>>0?Aa():(c[b>>2]=0,e=a)}else l=c[p+(h+8)>>2]|0,l>>>0<f>>>0&&Aa(),a=l+12|0,(c[a>>2]|0)!=(k|0)&&Aa(),b=g+8|0,(c[b>>2]|0)==(k|0)?(c[a>>2]=g,c[b>>2]=l,e=g):Aa();while(0);if(d){a=
c[p+(h+28)>>2]|0;b=41176+(a<<2)|0;if((k|0)==(c[b>>2]|0)){if(c[b>>2]=e,!e){c[10219]&=~(1<<a);break}}else if(d>>>0<(c[10222]|0)>>>0&&Aa(),a=d+16|0,(c[a>>2]|0)==(k|0)?c[a>>2]=e:c[d+20>>2]=e,!e)break;b=c[10222]|0;e>>>0<b>>>0&&Aa();c[e+24>>2]=d;if(a=c[p+(h+16)>>2]|0)a>>>0<b>>>0?Aa():(c[e+16>>2]=a,c[a+24>>2]=e);if(a=c[p+(h+20)>>2]|0)a>>>0<(c[10222]|0)>>>0?Aa():(c[e+20>>2]=a,c[a+24>>2]=e)}}else l=c[p+(h+8)>>2]|0,b=c[p+(h+12)>>2]|0,a=40912+(g<<1<<2)|0,(l|0)!=(a|0)&&(l>>>0<f>>>0&&Aa(),(c[l+12>>2]|0)!=(k|0)&&
Aa()),(b|0)==(l|0)?c[10218]&=~(1<<g):((b|0)!=(a|0)?(b>>>0<f>>>0&&Aa(),a=b+8|0,(c[a>>2]|0)==(k|0)?d=a:Aa()):d=b+8|0,c[l+12>>2]=b,c[d>>2]=l);while(0);16>u>>>0?(c[n>>2]=m|q&1|2,v=p+(m|4)|0,c[v>>2]|=1):(c[n>>2]=q&1|v|2,c[p+(v+4)>>2]=u|3,q=p+(m|4)|0,c[q>>2]|=1,Bd(p+v|0,u));return p|0}function Bd(p,a){p|=0;a|=0;var C=0,b=0,l=0,g=0,d=0,f=0,h=0,e=0,k=0,m=0,u=0,n=0,q=0,r=0,x=0,t=0,S=0,r=p+a|0,C=c[p+4>>2]|0;do if(C&1)S=p,d=a;else{e=c[p>>2]|0;if(!(C&3))return;u=p+(0-e)|0;m=e+a|0;h=c[10222]|0;u>>>0<h>>>0&&Aa();
if((u|0)==(c[10223]|0)){b=p+(a+4)|0;C=c[b>>2]|0;if(3!=(C&3|0)){S=u;d=m;break}c[10220]=m;c[b>>2]=C&-2;c[p+(4-e)>>2]=m|1;c[r>>2]=m;return}g=e>>>3;if(256>e>>>0)l=c[p+(8-e)>>2]|0,b=c[p+(12-e)>>2]|0,C=40912+(g<<1<<2)|0,(l|0)!=(C|0)&&(l>>>0<h>>>0&&Aa(),(c[l+12>>2]|0)!=(u|0)&&Aa()),(b|0)==(l|0)?c[10218]&=~(1<<g):((b|0)!=(C|0)?(b>>>0<h>>>0&&Aa(),C=b+8|0,(c[C>>2]|0)==(u|0)?f=C:Aa()):f=b+8|0,c[l+12>>2]=b,c[f>>2]=l),S=u,d=m;else{f=c[p+(24-e)>>2]|0;l=c[p+(12-e)>>2]|0;do if((l|0)==(u|0)){l=16-e|0;b=p+(l+4)|0;
C=c[b>>2]|0;if(!C&&(b=p+l|0,C=c[b>>2]|0,!C)){k=0;break}for(;;)if(l=C+20|0,g=c[l>>2]|0)C=g,b=l;else if(l=C+16|0,g=c[l>>2]|0)C=g,b=l;else break;b>>>0<h>>>0?Aa():(c[b>>2]=0,k=C)}else g=c[p+(8-e)>>2]|0,g>>>0<h>>>0&&Aa(),C=g+12|0,(c[C>>2]|0)!=(u|0)&&Aa(),b=l+8|0,(c[b>>2]|0)==(u|0)?(c[C>>2]=l,c[b>>2]=g,k=l):Aa();while(0);if(f){C=c[p+(28-e)>>2]|0;b=41176+(C<<2)|0;if((u|0)==(c[b>>2]|0)){if(c[b>>2]=k,!k){c[10219]&=~(1<<C);S=u;d=m;break}}else if(f>>>0<(c[10222]|0)>>>0&&Aa(),C=f+16|0,(c[C>>2]|0)==(u|0)?c[C>>
2]=k:c[f+20>>2]=k,!k){S=u;d=m;break}l=c[10222]|0;k>>>0<l>>>0&&Aa();c[k+24>>2]=f;C=16-e|0;if(b=c[p+C>>2]|0)b>>>0<l>>>0?Aa():(c[k+16>>2]=b,c[b+24>>2]=k);(C=c[p+(C+4)>>2]|0)?C>>>0<(c[10222]|0)>>>0?Aa():(c[k+20>>2]=C,c[C+24>>2]=k,S=u,d=m):(S=u,d=m)}else S=u,d=m}}while(0);h=c[10222]|0;r>>>0<h>>>0&&Aa();C=p+(a+4)|0;b=c[C>>2]|0;if(b&2)c[C>>2]=b&-2,c[S+4>>2]=d|1,c[S+d>>2]=d;else{if((r|0)==(c[10224]|0)){t=(c[10221]|0)+d|0;c[10221]=t;c[10224]=S;c[S+4>>2]=t|1;if((S|0)!=(c[10223]|0))return;c[10223]=0;c[10220]=
0;return}if((r|0)==(c[10223]|0)){t=(c[10220]|0)+d|0;c[10220]=t;c[10223]=S;c[S+4>>2]=t|1;c[S+t>>2]=t;return}d=(b&-8)+d|0;g=b>>>3;do if(256<=b>>>0){f=c[p+(a+24)>>2]|0;l=c[p+(a+12)>>2]|0;do if((l|0)==(r|0)){b=p+(a+20)|0;C=c[b>>2]|0;if(!C&&(b=p+(a+16)|0,C=c[b>>2]|0,!C)){q=0;break}for(;;)if(l=C+20|0,g=c[l>>2]|0)C=g,b=l;else if(l=C+16|0,g=c[l>>2]|0)C=g,b=l;else break;b>>>0<h>>>0?Aa():(c[b>>2]=0,q=C)}else g=c[p+(a+8)>>2]|0,g>>>0<h>>>0&&Aa(),C=g+12|0,(c[C>>2]|0)!=(r|0)&&Aa(),b=l+8|0,(c[b>>2]|0)==(r|0)?(c[C>>
2]=l,c[b>>2]=g,q=l):Aa();while(0);if(f){C=c[p+(a+28)>>2]|0;b=41176+(C<<2)|0;if((r|0)==(c[b>>2]|0)){if(c[b>>2]=q,!q){c[10219]&=~(1<<C);break}}else if(f>>>0<(c[10222]|0)>>>0&&Aa(),C=f+16|0,(c[C>>2]|0)==(r|0)?c[C>>2]=q:c[f+20>>2]=q,!q)break;b=c[10222]|0;q>>>0<b>>>0&&Aa();c[q+24>>2]=f;if(C=c[p+(a+16)>>2]|0)C>>>0<b>>>0?Aa():(c[q+16>>2]=C,c[C+24>>2]=q);if(C=c[p+(a+20)>>2]|0)C>>>0<(c[10222]|0)>>>0?Aa():(c[q+20>>2]=C,c[C+24>>2]=q)}}else l=c[p+(a+8)>>2]|0,b=c[p+(a+12)>>2]|0,C=40912+(g<<1<<2)|0,(l|0)!=(C|0)&&
(l>>>0<h>>>0&&Aa(),(c[l+12>>2]|0)!=(r|0)&&Aa()),(b|0)==(l|0)?c[10218]&=~(1<<g):((b|0)!=(C|0)?(b>>>0<h>>>0&&Aa(),C=b+8|0,(c[C>>2]|0)==(r|0)?n=C:Aa()):n=b+8|0,c[l+12>>2]=b,c[n>>2]=l);while(0);c[S+4>>2]=d|1;c[S+d>>2]=d;if((S|0)==(c[10223]|0)){c[10220]=d;return}}C=d>>>3;if(256>d>>>0)b=C<<1,g=40912+(b<<2)|0,l=c[10218]|0,C=1<<C,l&C?(C=40912+(b+2<<2)|0,b=c[C>>2]|0,b>>>0<(c[10222]|0)>>>0?Aa():(x=C,t=b)):(c[10218]=l|C,x=40912+(b+2<<2)|0,t=g),c[x>>2]=S,c[t+12>>2]=S,c[S+8>>2]=t,c[S+12>>2]=g;else if((C=d>>>8)?
16777215<d>>>0?g=31:(x=(C+1048320|0)>>>16&8,t=C<<x,r=(t+520192|0)>>>16&4,t<<=r,g=(t+245760|0)>>>16&2,g=14-(r|x|g)+(t<<g>>>15)|0,g=d>>>(g+7|0)&1|g<<1):g=0,C=41176+(g<<2)|0,c[S+28>>2]=g,c[S+20>>2]=0,c[S+16>>2]=0,b=c[10219]|0,l=1<<g,b&l){C=c[C>>2]|0;a:do if((c[C+4>>2]&-8|0)!=(d|0)){for(g=d<<(31==(g|0)?0:25-(g>>>1)|0);;){b=C+16+(g>>>31<<2)|0;l=c[b>>2]|0;if(!l)break;if((c[l+4>>2]&-8|0)==(d|0)){C=l;break a}else g<<=1,C=l}b>>>0<(c[10222]|0)>>>0&&Aa();c[b>>2]=S;c[S+24>>2]=C;c[S+12>>2]=S;c[S+8>>2]=S;return}while(0);
b=C+8|0;l=c[b>>2]|0;t=c[10222]|0;l>>>0>=t>>>0&C>>>0>=t>>>0||Aa();c[l+12>>2]=S;c[b>>2]=S;c[S+8>>2]=l;c[S+12>>2]=C;c[S+24>>2]=0}else c[10219]=b|l,c[C>>2]=S,c[S+24>>2]=C,c[S+12>>2]=S,c[S+8>>2]=S}function Fd(p,a,C){p|=0;a|=0;C|=0;var b=0,l=0,d=0,l=F;F=F+16|0;d=l+4|0;b=l;cg(p);c[p>>2]=42536;c[p+32>>2]=a;Jc(d,p+4|0);c[b>>2]=c[d>>2];g=0;a=ma(37,b|0,44280)|0;d=g;g=0;d&1?(d=J()|0,Vb(b),ya(p),V(d|0)):(Vb(b),c[p+36>>2]=a,c[p+40>>2]=C,d=(Ja[c[(c[a>>2]|0)+28>>2]&127](a)|0)&1,u[p+44>>0]=d,F=l)}function Gd(p,a,
C){p|=0;a|=0;C|=0;var b=0,l=0,d=0,l=F;F=F+16|0;d=l+4|0;b=l;Gg(p);c[p>>2]=42408;c[p+32>>2]=a;Jc(d,p+4|0);c[b>>2]=c[d>>2];g=0;a=ma(37,b|0,44288)|0;d=g;g=0;d&1?(d=J()|0,Vb(b),Ze(p),V(d|0)):(Vb(b),c[p+36>>2]=a,c[p+40>>2]=C,d=(Ja[c[(c[a>>2]|0)+28>>2]&127](a)|0)&1,u[p+44>>0]=d,F=l)}function Hd(p,a){p|=0;a|=0;var C=0,b=0,l=0,g=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,r=F;F=F+32|0;q=r+16|0;n=r+8|0;e=r+4|0;k=r;l=p+52|0;a:do if(u[l>>0]|0)b=p+48|0,C=c[b>>2]|0,a&&(c[b>>2]=-1,u[l>>0]=0);else{C=c[p+44>>2]|
0;C=1<(C|0)?C:1;m=p+32|0;if(0<(C|0)){l=0;do{b=qf(c[m>>2]|0)|0;if(-1==(b|0)){C=-1;break a}u[q+l>>0]=b;l=l+1|0}while((l|0)<(C|0))}b:do{if(!(u[p+53>>0]|0))c:for(d=p+40|0,f=p+36|0,h=n+4|0;;){l=x=c[d>>2]|0;b=c[l>>2]|0;l=c[l+4>>2]|0;t=c[f>>2]|0;g=q+C|0;switch(Td[c[(c[t>>2]|0)+16>>2]&15](t,x,q,g,e,n,h,k)|0){case 2:C=-1;break a;case 3:break c;case 1:break;default:break b}t=c[d>>2]|0;c[t>>2]=b;c[t+4>>2]=l;if(8==(C|0)){C=-1;break a}b=qf(c[m>>2]|0)|0;if(-1==(b|0)){C=-1;break a}u[g>>0]=b;C=C+1|0}c[n>>2]=u[q>>
0]}while(0);if(a)C=c[n>>2]|0,c[p+48>>2]=C;else{for(;!(0>=(C|0));)if(C=C+-1|0,-1==(rf(u[q+C>>0]|0,c[m>>2]|0)|0)){C=-1;break a}C=c[n>>2]|0}}while(0);F=r;return C|0}function Jd(p,a){p|=0;a|=0;var C=0,b=0,l=0,g=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,r=F;F=F+32|0;q=r+16|0;n=r+8|0;e=r+4|0;k=r;l=p+52|0;a:do if(u[l>>0]|0)b=p+48|0,C=c[b>>2]|0,a&&(c[b>>2]=-1,u[l>>0]=0);else{C=c[p+44>>2]|0;C=1<(C|0)?C:1;m=p+32|0;if(0<(C|0)){l=0;do{b=qf(c[m>>2]|0)|0;if(-1==(b|0)){C=-1;break a}u[q+l>>0]=b;l=l+1|0}while((l|
0)<(C|0))}b:do{if(!(u[p+53>>0]|0))c:for(d=p+40|0,f=p+36|0,h=n+1|0;;){l=x=c[d>>2]|0;b=c[l>>2]|0;l=c[l+4>>2]|0;t=c[f>>2]|0;g=q+C|0;switch(Td[c[(c[t>>2]|0)+16>>2]&15](t,x,q,g,e,n,h,k)|0){case 2:C=-1;break a;case 3:break c;case 1:break;default:break b}t=c[d>>2]|0;c[t>>2]=b;c[t+4>>2]=l;if(8==(C|0)){C=-1;break a}b=qf(c[m>>2]|0)|0;if(-1==(b|0)){C=-1;break a}u[g>>0]=b;C=C+1|0}u[n>>0]=u[q>>0]|0}while(0);if(a)C=u[n>>0]|0,c[p+48>>2]=C&255;else{for(;!(0>=(C|0));)if(C=C+-1|0,-1==(rf(ea[q+C>>0]|0,c[m>>2]|0)|0)){C=
-1;break a}C=u[n>>0]|0}C&=255}while(0);F=r;return C|0}function td(p){p=(p|0)+4|0;c[p>>2]=(c[p>>2]|0)+1}function Na(p){p|=0;var a=0,C=0,C=p+4|0,a=c[C>>2]|0;c[C>>2]=a+-1;a?p=0:(Ha[c[(c[p>>2]|0)+8>>2]&255](p),p=1);return p|0}function zd(c){sf(c|0)}function Id(p,a){p|=0;a|=0;u[a>>0]&1?Vd(p,c[a+8>>2]|0,c[a+4>>2]|0):(c[p>>2]=c[a>>2],c[p+4>>2]=c[a+4>>2],c[p+8>>2]=c[a+8>>2])}function Vd(p,a,C){p|=0;a|=0;C|=0;var b=0,l=0;4294967279<C>>>0&&jd(p);11>C>>>0?(u[p>>0]=C<<1,p=p+1|0):(l=C+16&-16,b=qa(l)|0,c[p+8>>
2]=b,c[p>>2]=l|1,c[p+4>>2]=C,p=b);gb(p|0,a|0,C|0)|0;u[p+C>>0]=0}function Kd(p,a,C){p|=0;a|=0;C|=0;var b=0,l=0;4294967279<a>>>0&&jd(p);11>a>>>0?(u[p>>0]=a<<1,p=p+1|0):(l=a+16&-16,b=qa(l)|0,c[p+8>>2]=b,c[p>>2]=l|1,c[p+4>>2]=a,p=b);Za(p|0,C|0,a|0)|0;u[p+a>>0]=0}function W(p){p|=0;u[p>>0]&1&&Q(c[p+8>>2]|0)}function Xd(p,a,C){p|=0;a|=0;C|=0;var b=0,l=0,g=0,b=u[p>>0]|0;b&1?(b=c[p>>2]|0,g=(b&-2)+-1|0,b&=255):g=10;l=0==(b&1);g>>>0>=C>>>0?(b=l?p+1|0:c[p+8>>2]|0,tf(b|0,a|0,C|0)|0,u[b+C>>0]=0,u[p>>0]&1?c[p+
4>>2]=C:u[p>>0]=C<<1):(b=l?(b&255)>>>1:c[p+4>>2]|0,Hg(p,g,C-g|0,b,0,b,C,a));return p|0}function fe(p,a,C){p|=0;a|=0;var b=0,l=0,b=u[p>>0]|0,b=(l=0==(b&1))?(b&255)>>>1:c[p+4>>2]|0;if(b>>>0>=a>>>0)l?(u[p+1+a>>0]=0,u[p>>0]=a<<1):(u[(c[p+8>>2]|0)+a>>0]=0,c[p+4>>2]=a);else{C|=0;p|=0;a=a-b|0;C|=0;var g=l=b=0;a&&(b=u[p>>0]|0,b&1?(b=c[p>>2]|0,l=(b&-2)+-1|0,b&=255):l=10,g=b&1?c[p+4>>2]|0:(b&255)>>>1,(l-g|0)>>>0<a>>>0&&(dg(p,l,a-l+g|0,g,g,0,0),b=u[p>>0]|0),l=b&1?c[p+8>>2]|0:p+1|0,Za(l+g|0,C|0,a|0)|0,b=g+a|
0,u[p>>0]&1?c[p+4>>2]=b:u[p>>0]=b<<1,u[l+b>>0]=0);p|0}}function ge(p,a,C){p|=0;a|=0;C|=0;var b=0,l=0,g=0,b=u[p>>0]|0;b&1?(b=c[p>>2]|0,l=(b&-2)+-1|0,b&=255):l=10;g=b&1?c[p+4>>2]|0:(b&255)>>>1;(l-g|0)>>>0>=C>>>0?C&&(l=b&1?c[p+8>>2]|0:p+1|0,gb(l+g|0,a|0,C|0)|0,b=g+C|0,u[p>>0]&1?c[p+4>>2]=b:u[p>>0]=b<<1,u[l+b>>0]=0):Hg(p,l,C-l+g|0,g,g,0,C,a);return p|0}function Hg(p,a,C,b,l,g,d,f){p|=0;a|=0;C|=0;b|=0;l|=0;g|=0;d|=0;f|=0;var h=0,e=0,k=0;(-18-a|0)>>>0<C>>>0&&jd(p);k=u[p>>0]&1?c[p+8>>2]|0:p+1|0;2147483623>
a>>>0?(h=C+a|0,e=a<<1,h=h>>>0<e>>>0?e:h,h=11>h>>>0?11:h+16&-16):h=-17;e=qa(h)|0;l&&gb(e|0,k|0,l|0)|0;d&&gb(e+l|0,f|0,d|0)|0;C=b-g|0;(C|0)!=(l|0)&&gb(e+(d+l)|0,k+(g+l)|0,C-l|0)|0;10!=(a|0)&&Q(k);c[p+8>>2]=e;c[p>>2]=h|1;a=C+d|0;c[p+4>>2]=a;u[e+a>>0]=0}function dg(p,a,C,b,l,g,d){p|=0;a|=0;C|=0;b|=0;l|=0;g|=0;d|=0;var f=0,h=0,e=0;(-17-a|0)>>>0<C>>>0&&jd(p);e=u[p>>0]&1?c[p+8>>2]|0:p+1|0;2147483623>a>>>0?(f=C+a|0,h=a<<1,f=f>>>0<h>>>0?h:f,f=11>f>>>0?11:f+16&-16):f=-17;h=qa(f)|0;l&&gb(h|0,e|0,l|0)|0;C=b-
g|0;(C|0)!=(l|0)&&gb(h+(d+l)|0,e+(g+l)|0,C-l|0)|0;10!=(a|0)&&Q(e);c[p+8>>2]=h;c[p>>2]=f|1}function eg(p,a,C){p|=0;a|=0;C|=0;var b=0,l=0;1073741807<C>>>0&&jd(p);2>C>>>0?(u[p>>0]=C<<1,p=p+4|0):(l=C+4&-4,b=qa(l<<2)|0,c[p+8>>2]=b,c[p>>2]=l|1,c[p+4>>2]=C,p=b);ue(p,a,C)|0;c[p+(C<<2)>>2]=0}function fg(p,a,C){p|=0;a|=0;C|=0;var b=0,l=0;1073741807<a>>>0&&jd(p);2>a>>>0?(u[p>>0]=a<<1,p=p+4|0):(l=a+4&-4,b=qa(l<<2)|0,c[p+8>>2]=b,c[p>>2]=l|1,c[p+4>>2]=a,p=b);b=p|0;C|=0;var l=a|0,g=0;if(l)for(g=b;;)if(l=l+-1|0,
c[g>>2]=C,l)g=g+4|0;else break;b|0;c[p+(a<<2)>>2]=0}function Ka(p){p|=0;u[p>>0]&1&&Q(c[p+8>>2]|0)}function Ig(p,a,C,b,l,g,d){p|=0;a|=0;C|=0;b|=0;l|=0;g|=0;d|=0;var f=0,h=0,e=0;(1073741807-a|0)>>>0<C>>>0&&jd(p);e=u[p>>0]&1?c[p+8>>2]|0:p+4|0;536870887>a>>>0?(f=C+a|0,h=a<<1,f=f>>>0<h>>>0?h:f,f=2>f>>>0?2:f+4&-4):f=1073741807;h=qa(f<<2)|0;l&&ue(h,e,l)|0;C=b-g|0;(C|0)!=(l|0)&&ue(h+(d+l<<2)|0,e+(g+l<<2)|0,C-l|0)|0;1!=(a|0)&&Q(e);c[p+8>>2]=h;c[p>>2]=f|1}function Sc(p){p|=0;var a=0;c[p>>2]=43068;g=0;ga(88,
p|0,0);a=g;g=0;a&1?(a=J(0)|0,h(a)):(Vb(p+28|0),$a(c[p+32>>2]|0),$a(c[p+36>>2]|0),$a(c[p+48>>2]|0),$a(c[p+60>>2]|0))}function sa(c){Sc(c|0)}function Lb(p){var a=0,C=0,C=F;F=F+16|0;a=C;Jc(a,(p|0)+28|0);F=C;return c[a>>2]|0}function uf(c){Sc(c|0)}function ya(p){p|=0;c[p>>2]=42760;Vb(p+4|0)}function cg(p){p|=0;c[p>>2]=42760;Uc(p+4|0);p=p+8|0;c[p>>2]=0;c[p+4>>2]=0;c[p+8>>2]=0;c[p+12>>2]=0;c[p+16>>2]=0;c[p+20>>2]=0}function Ze(p){p|=0;c[p>>2]=42824;Vb(p+4|0)}function Gg(p){p|=0;c[p>>2]=42824;Uc(p+4|0);
p=p+8|0;c[p>>2]=0;c[p+4>>2]=0;c[p+8>>2]=0;c[p+12>>2]=0;c[p+16>>2]=0;c[p+20>>2]=0}function Jg(c){c|=0;Sc(c+8|0);Q(c)}function Kg(p){p|=0;var a=0,C=0,b=0,l=0,b=F;F=F+16|0;C=b;a:do if(c[p+((c[(c[p>>2]|0)+-12>>2]|0)+24)>>2]|0){g=0;ga(65,C|0,p|0);a=g;g=0;b:do if(a&1)a=J(0)|0;else{do if(u[C>>0]|0){a=c[p+((c[(c[p>>2]|0)+-12>>2]|0)+24)>>2]|0;g=0;a=ca(c[(c[a>>2]|0)+24>>2]|0,a|0)|0;l=g;g=0;if(!(l&1)){if(-1!=(a|0))break;l=c[(c[p>>2]|0)+-12>>2]|0;g=0;ga(66,p+l|0,c[p+(l+16)>>2]|1);l=g;g=0;if(!(l&1))break}a=J(0)|
0;je(C);break b}while(0);je(C);break a}while(0);Rc(a|0)|0;g=0;ta(181,p+(c[(c[p>>2]|0)+-12>>2]|0)|0);l=g;g=0;l&1?(a=J()|0,g=0,rb(3),l=g,g=0,l&1?(l=J(0)|0,h(l)):V(a|0)):$c()}while(0);F=b;return p|0}function Lg(c){c|=0;Sc(c+8|0);Q(c)}function Mg(p){p|=0;var a=0,C=0,b=0,l=0,b=F;F=F+16|0;C=b;a:do if(c[p+((c[(c[p>>2]|0)+-12>>2]|0)+24)>>2]|0){g=0;ga(89,C|0,p|0);a=g;g=0;b:do if(a&1)a=J(0)|0;else{do if(u[C>>0]|0){a=c[p+((c[(c[p>>2]|0)+-12>>2]|0)+24)>>2]|0;g=0;a=ca(c[(c[a>>2]|0)+24>>2]|0,a|0)|0;l=g;g=0;if(!(l&
1)){if(-1!=(a|0))break;l=c[(c[p>>2]|0)+-12>>2]|0;g=0;ga(66,p+l|0,c[p+(l+16)>>2]|1);l=g;g=0;if(!(l&1))break}a=J(0)|0;Ng(C);break b}while(0);Ng(C);break a}while(0);Rc(a|0)|0;g=0;ta(181,p+(c[(c[p>>2]|0)+-12>>2]|0)|0);l=g;g=0;l&1?(a=J()|0,g=0,rb(3),l=g,g=0,l&1?(l=J(0)|0,h(l)):V(a|0)):$c()}while(0);F=b;return p|0}function Og(c){c|=0;Sc(c+4|0);Q(c)}function je(p){var a=0,C=0;p=(p|0)+4|0;C=c[p>>2]|0;a=c[(c[C>>2]|0)+-12>>2]|0;do if(0!=(c[C+(a+24)>>2]|0)&&0==(c[C+(a+16)>>2]|0)&&0!=(c[C+(a+4)>>2]&8192|0)&&
!(Pg()|0)){a=c[p>>2]|0;a=c[a+((c[(c[a>>2]|0)+-12>>2]|0)+24)>>2]|0;g=0;a=ca(c[(c[a>>2]|0)+24>>2]|0,a|0)|0;C=g;g=0;if(!(C&1)){if(-1!=(a|0))break;a=c[p>>2]|0;C=c[(c[a>>2]|0)+-12>>2]|0;g=0;ga(66,a+C|0,c[a+(C+16)>>2]|1);C=g;g=0;if(!(C&1))break}C=J(0)|0;Rc(C|0)|0;g=0;rb(3);C=g;g=0;C&1&&(C=J(0)|0,h(C))}while(0)}function Qg(c){c|=0;Sc(c+4|0);Q(c)}function Ng(p){var a=0,C=0;p=(p|0)+4|0;C=c[p>>2]|0;a=c[(c[C>>2]|0)+-12>>2]|0;do if(0!=(c[C+(a+24)>>2]|0)&&0==(c[C+(a+16)>>2]|0)&&0!=(c[C+(a+4)>>2]&8192|0)&&!(Pg()|
0)){a=c[p>>2]|0;a=c[a+((c[(c[a>>2]|0)+-12>>2]|0)+24)>>2]|0;g=0;a=ca(c[(c[a>>2]|0)+24>>2]|0,a|0)|0;C=g;g=0;if(!(C&1)){if(-1!=(a|0))break;a=c[p>>2]|0;C=c[(c[a>>2]|0)+-12>>2]|0;g=0;ga(66,a+C|0,c[a+(C+16)>>2]|1);C=g;g=0;if(!(C&1))break}C=J(0)|0;Rc(C|0)|0;g=0;rb(3);C=g;g=0;C&1&&(C=J(0)|0,h(C))}while(0)}function ve(p,a,C,b,l,g,d,f,h,e){p|=0;a|=0;C|=0;b|=0;l|=0;g|=0;d|=0;f|=0;h|=0;e|=0;var k=0,m=0,n=0,q=0,n=c[b>>2]|0;(q=(n|0)==(C|0))?((k=(u[e+24>>0]|0)==p<<24>>24)?0:(u[e+25>>0]|0)!=p<<24>>24)?m=5:(c[b>>
2]=C+1,u[C>>0]=k?43:45,k=c[l>>2]=0):m=5;a:do if(5==(m|0))if(m=u[d>>0]|0,p<<24>>24==g<<24>>24&&0!=((0==(m&1)?(m&255)>>>1:c[d+4>>2]|0)|0))k=c[h>>2]|0,160<=(k-f|0)||(a=c[l>>2]|0,c[h>>2]=k+4,c[k>>2]=a,c[l>>2]=0),k=0;else{d=e+26|0;for(k=e;(u[k>>0]|0)!=p<<24>>24;)if(k=k+1|0,(k|0)==(d|0)){k=d;break}k=k-e|0;if(23<(k|0))k=-1;else{switch(a|0){case 10:case 8:if((k|0)>=(a|0)){k=-1;break a}break;case 16:if(22<=(k|0)){if(q){k=-1;break a}if(3<=(n-C|0)){k=-1;break a}if(48!=(u[n+-1>>0]|0)){k=-1;break a}c[l>>2]=0;
k=u[57498+k>>0]|0;c[b>>2]=n+1;u[n>>0]=k;k=0;break a}}k=u[57498+k>>0]|0;c[b>>2]=n+1;u[n>>0]=k;c[l>>2]=(c[l>>2]|0)+1;k=0}}while(0);return k|0}function Xb(){var p=0,a=0;0==(u[1968]|0)&&0!=(Da(1968)|0)&&(g=0,p=La(31,2147483647,58885,0)|0,a=g,g=0,a&1?(a=J()|0,Hc(1968),V(a|0)):(c[11196]=p,Ca(1968)));return c[11196]|0}function we(p,a,C,b,l,g,d,f,h,e){p|=0;a|=0;C|=0;b|=0;l|=0;g|=0;d|=0;f|=0;h|=0;e|=0;var k=0,m=0,n=0,q=0,n=c[b>>2]|0;(q=(n|0)==(C|0))?((k=(c[e+96>>2]|0)==(p|0))?0:(c[e+100>>2]|0)!=(p|0))?m=5:
(c[b>>2]=C+1,u[C>>0]=k?43:45,k=c[l>>2]=0):m=5;a:do if(5==(m|0))if(m=u[d>>0]|0,(p|0)==(g|0)&&0!=((0==(m&1)?(m&255)>>>1:c[d+4>>2]|0)|0))k=c[h>>2]|0,160<=(k-f|0)||(a=c[l>>2]|0,c[h>>2]=k+4,c[k>>2]=a,c[l>>2]=0),k=0;else{d=e+104|0;for(k=e;(c[k>>2]|0)!=(p|0);)if(k=k+4|0,(k|0)==(d|0)){k=d;break}k=k-e|0;d=k>>2;if(92<(k|0))k=-1;else{switch(a|0){case 10:case 8:if((d|0)>=(a|0)){k=-1;break a}break;case 16:if(88<=(k|0)){if(q){k=-1;break a}if(3<=(n-C|0)){k=-1;break a}if(48!=(u[n+-1>>0]|0)){k=-1;break a}c[l>>2]=
0;k=u[57498+d>>0]|0;c[b>>2]=n+1;u[n>>0]=k;k=0;break a}}k=u[57498+d>>0]|0;c[b>>2]=n+1;u[n>>0]=k;c[l>>2]=(c[l>>2]|0)+1;k=0}}while(0);return k|0}function Ke(p,a,C,b){p|=0;C|=0;b|=0;var l=0,d=0,H=0,f=0,h=0,e=0,h=F;F=F+16|0;f=h;a=Lb(a|0)|0;c[f>>2]=a;g=0;l=ma(37,f|0,44220)|0;e=g;g=0;e&1||(g=0,fb(c[(c[l>>2]|0)+32>>2]|0,l|0,57498,57524,C|0)|0,e=g,g=0,e&1)||(g=0,H=ma(37,f|0,44360)|0,e=g,g=0,e&1)||(g=0,d=ca(c[(c[H>>2]|0)+16>>2]|0,H|0)|0,e=g,g=0,e&1)||(u[b>>0]=d,g=0,ga(c[(c[H>>2]|0)+20>>2]|0,p|0,H|0),e=g,g=
0,e&1)?(e=J()|0,Na(a)|0,V(e|0)):(Na(a)|0,F=h)}function gg(p,a,C,b,l){p|=0;C|=0;b|=0;l|=0;var d=0,H=0,f=0,h=0,e=0,k=0,m=0,k=F;F=F+16|0;e=k;a=Lb(a|0)|0;c[e>>2]=a;g=0;d=ma(37,e|0,44220)|0;m=g;g=0;m&1||(g=0,fb(c[(c[d>>2]|0)+32>>2]|0,d|0,57498,57530,C|0)|0,m=g,g=0,m&1)||(g=0,h=ma(37,e|0,44360)|0,m=g,g=0,m&1)||(g=0,H=ca(c[(c[h>>2]|0)+12>>2]|0,h|0)|0,m=g,g=0,m&1)||(u[b>>0]=H,g=0,f=ca(c[(c[h>>2]|0)+16>>2]|0,h|0)|0,m=g,g=0,m&1)||(u[l>>0]=f,g=0,ga(c[(c[h>>2]|0)+20>>2]|0,p|0,h|0),m=g,g=0,m&1)?(m=J()|0,Na(a)|
0,V(m|0)):(Na(a)|0,F=k)}function hg(p,a,C,b,l,g,d,f,h,e,k,m){p|=0;a|=0;C|=0;b|=0;l|=0;g|=0;d|=0;f|=0;h|=0;e|=0;k|=0;m|=0;var n=0,q=0;a:do if(p<<24>>24==g<<24>>24)u[a>>0]|0?(u[a>>0]=0,C=c[l>>2]|0,c[l>>2]=C+1,u[C>>0]=46,C=u[f>>0]|0,0!=((0==(C&1)?(C&255)>>>1:c[f+4>>2]|0)|0)&&(n=c[e>>2]|0,160>(n-h|0))&&(h=c[k>>2]|0,c[e>>2]=n+4,c[n>>2]=h),n=0):n=-1;else if(p<<24>>24==d<<24>>24&&(d=u[f>>0]|0,0!=((0==(d&1)?(d&255)>>>1:c[f+4>>2]|0)|0)))u[a>>0]|0?(n=c[e>>2]|0,160<=(n-h|0)||(h=c[k>>2]|0,c[e>>2]=n+4,c[n>>2]=
h,c[k>>2]=0),n=0):n=-1;else{g=m+32|0;for(n=m;(u[n>>0]|0)!=p<<24>>24;)if(n=n+1|0,(n|0)==(g|0)){n=g;break}g=n-m|0;if(31<(g|0))n=-1;else switch(d=u[57498+g>>0]|0,g|0){case 24:case 25:n=c[l>>2]|0;if((n|0)!=(b|0)&&(ea[n+-1>>0]&95|0)!=(ea[C>>0]&127|0)){n=-1;break a}c[l>>2]=n+1;u[n>>0]=d;n=0;break a;case 23:case 22:u[C>>0]=80;n=c[l>>2]|0;c[l>>2]=n+1;u[n>>0]=d;n=0;break a;default:n=d&95;(n|0)==(u[C>>0]|0)&&(u[C>>0]=n|128,0!=(u[a>>0]|0))&&(u[a>>0]=0,C=u[f>>0]|0,0!=((0==(C&1)?(C&255)>>>1:c[f+4>>2]|0)|0))&&
(q=c[e>>2]|0,160>(q-h|0))&&(h=c[k>>2]|0,c[e>>2]=q+4,c[q>>2]=h);e=c[l>>2]|0;c[l>>2]=e+1;u[e>>0]=d;if(21<(g|0)){n=0;break a}c[k>>2]=(c[k>>2]|0)+1;n=0;break a}}while(0);return n|0}function Le(p,a,C,b){p|=0;C|=0;b|=0;var l=0,d=0,H=0,f=0,h=0,e=0,h=F;F=F+16|0;f=h;a=Lb(a|0)|0;c[f>>2]=a;g=0;l=ma(37,f|0,44212)|0;e=g;g=0;e&1||(g=0,fb(c[(c[l>>2]|0)+48>>2]|0,l|0,57498,57524,C|0)|0,e=g,g=0,e&1)||(g=0,H=ma(37,f|0,44368)|0,e=g,g=0,e&1)||(g=0,d=ca(c[(c[H>>2]|0)+16>>2]|0,H|0)|0,e=g,g=0,e&1)||(c[b>>2]=d,g=0,ga(c[(c[H>>
2]|0)+20>>2]|0,p|0,H|0),e=g,g=0,e&1)?(e=J()|0,Na(a)|0,V(e|0)):(Na(a)|0,F=h)}function ig(p,a,C,b,l){p|=0;C|=0;b|=0;l|=0;var d=0,H=0,f=0,h=0,e=0,k=0,m=0,k=F;F=F+16|0;e=k;a=Lb(a|0)|0;c[e>>2]=a;g=0;d=ma(37,e|0,44212)|0;m=g;g=0;m&1||(g=0,fb(c[(c[d>>2]|0)+48>>2]|0,d|0,57498,57530,C|0)|0,m=g,g=0,m&1)||(g=0,h=ma(37,e|0,44368)|0,m=g,g=0,m&1)||(g=0,H=ca(c[(c[h>>2]|0)+12>>2]|0,h|0)|0,m=g,g=0,m&1)||(c[b>>2]=H,g=0,f=ca(c[(c[h>>2]|0)+16>>2]|0,h|0)|0,m=g,g=0,m&1)||(c[l>>2]=f,g=0,ga(c[(c[h>>2]|0)+20>>2]|0,p|0,h|
0),m=g,g=0,m&1)?(m=J()|0,Na(a)|0,V(m|0)):(Na(a)|0,F=k)}function jg(p,a,C,b,l,g,d,f,h,e,k,m){p|=0;a|=0;C|=0;b|=0;l|=0;g|=0;d|=0;f|=0;h|=0;e|=0;k|=0;m|=0;var n=0,q=0;a:do if((p|0)==(g|0))u[a>>0]|0?(u[a>>0]=0,C=c[l>>2]|0,c[l>>2]=C+1,u[C>>0]=46,C=u[f>>0]|0,0!=((0==(C&1)?(C&255)>>>1:c[f+4>>2]|0)|0)&&(n=c[e>>2]|0,160>(n-h|0))&&(h=c[k>>2]|0,c[e>>2]=n+4,c[n>>2]=h),n=0):n=-1;else if((p|0)==(d|0)&&(d=u[f>>0]|0,0!=((0==(d&1)?(d&255)>>>1:c[f+4>>2]|0)|0)))u[a>>0]|0?(n=c[e>>2]|0,160<=(n-h|0)||(h=c[k>>2]|0,c[e>>
2]=n+4,c[n>>2]=h,c[k>>2]=0),n=0):n=-1;else{g=m+128|0;for(n=m;(c[n>>2]|0)!=(p|0);)if(n=n+4|0,(n|0)==(g|0)){n=g;break}g=n-m|0;n=g>>2;if(124>=(g|0)){d=u[57498+n>>0]|0;switch(n|0){case 24:case 25:n=c[l>>2]|0;if((n|0)!=(b|0)&&(ea[n+-1>>0]&95|0)!=(ea[C>>0]&127|0)){n=-1;break a}c[l>>2]=n+1;u[n>>0]=d;n=0;break a;case 23:case 22:u[C>>0]=80;break;default:n=d&95,(n|0)==(u[C>>0]|0)&&(u[C>>0]=n|128,0!=(u[a>>0]|0))&&(u[a>>0]=0,C=u[f>>0]|0,0!=((0==(C&1)?(C&255)>>>1:c[f+4>>2]|0)|0))&&(q=c[e>>2]|0,160>(q-h|0))&&(h=
c[k>>2]|0,c[e>>2]=q+4,c[q>>2]=h)}e=c[l>>2]|0;c[l>>2]=e+1;u[e>>0]=d;84<(g|0)||(c[k>>2]=(c[k>>2]|0)+1);n=0}else n=-1}while(0);return n|0}function ke(c,a,C,b){c|=0;a|=0;C|=0;b|=0;var l=0,g=0;b&2048&&(u[c>>0]=43,c=c+1|0);b&512&&(u[c>>0]=35,c=c+1|0);l=u[a>>0]|0;if(l<<24>>24)for(g=a;;)if(g=g+1|0,a=c+1|0,u[c>>0]=l,l=u[g>>0]|0,l<<24>>24)c=a;else{c=a;break}a:do switch(b&74|0){case 64:u[c>>0]=111;break;case 8:u[c>>0]=b&16384?88:120;break a;default:u[c>>0]=C?100:117;break a}while(0)}function kd(p,a,C){p|=0;
a|=0;C|=0;a:do switch(c[C+4>>2]&176|0){case 16:C=u[p>>0]|0;switch(C<<24>>24){case 43:case 45:p=p+1|0;break a}if(1<(a-p|0)&48==C<<24>>24){switch(u[p+1>>0]|0){case 88:case 120:break;default:break a}p=p+2|0}break;case 32:p=a}while(0);return p|0}function vf(c,a,C){c|=0;a|=0;C|=0;var b=0,l=0,g=0,d=0,f=0;C&2048&&(u[c>>0]=43,c=c+1|0);C&1024&&(u[c>>0]=35,c=c+1|0);d=C&260;l=C>>>14;(f=260==(d|0))?g=0:(u[c>>0]=46,u[c+1>>0]=42,c=c+2|0,g=1);C=u[a>>0]|0;if(C<<24>>24)for(b=c;;)if(a=a+1|0,c=b+1|0,u[b>>0]=C,C=u[a>>
0]|0,C<<24>>24)b=c;else break;a:do switch(d|0){case 4:u[c>>0]=l&1?70:102;break a;case 256:u[c>>0]=l&1?69:101;break a;default:C=0!=(l&1|0);u[c>>0]=f?C?65:97:C?71:103;break a}while(0);return g|0}function Rg(p){p|=0;c[p>>2]=44384;W(p+12|0)}function Sg(p){p|=0;c[p>>2]=44424;W(p+16|0)}function rd(p){switch(c[(p|0)+4>>2]&74|0){case 64:p=8;break;case 8:p=16;break;case 0:p=0;break;default:p=10}return p|0}function Tg(p){p|=0;var a=0,C=0,b=0;c[p>>2]=44304;p=p+8|0;a=c[p>>2]|0;g=0;C=Va(3)|0;b=g;g=0;if(b&1||(a|
0)!=(C|0)&&(g=0,ta(188,c[p>>2]|0),b=g,g=0,b&1))b=J(0)|0,h(b)}function nf(p,a,C,b,l,d,H){p|=0;a|=0;C|=0;b|=0;l|=0;d|=0;H|=0;var f=0,h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,S=0,I=0,ua=0,A=0,ua=F;F=F+112|0;h=ua;k=(b-C|0)/12|0;100<k>>>0?(h=Ub(k)|0,0==(h|0)&&(g=0,rb(6),I=g,g=0,I&1)?(f=0,q=6):(f=h,q=11)):(f=0,q=11);a:do if(11==(q|0)){if((C|0)==(b|0))e=0;else for(q=C,m=0,n=h;e=u[q>>0]|0,(e=e&1?c[q+4>>2]|0:(e&255)>>>1)?(u[n>>0]=1,e=m):(u[n>>0]=2,e=m+1|0,k=k+-1|0),q=q+12|0,(q|0)!=(b|0);)m=e,n=n+1|0;S=(C|0)==
(b|0);I=(C|0)==(b|0);z=0;r=e;b:for(;;){e=c[p>>2]|0;do if(e){if((c[e+12>>2]|0)==(c[e+16>>2]|0)){g=0;e=ca(c[(c[e>>2]|0)+36>>2]|0,e|0)|0;t=g;g=0;if(t&1){q=5;break b}e=-1==(e|0)?c[p>>2]=0:c[p>>2]|0}}else e=0;while(0);q=0==(e|0);if(m=c[a>>2]|0){if((c[m+12>>2]|0)==(c[m+16>>2]|0)){g=0;e=ca(c[(c[m>>2]|0)+36>>2]|0,m|0)|0;t=g;g=0;if(t&1){q=5;break}-1==(e|0)&&(m=c[a>>2]=0)}}else m=0;n=0==(m|0);e=c[p>>2]|0;if(!(0!=(k|0)&(q^n))){q=64;break}m=c[e+12>>2]|0;if((m|0)==(c[e+16>>2]|0)){if(g=0,e=ca(c[(c[e>>2]|0)+36>>
2]|0,e|0)|0,t=g,g=0,t&1){q=5;break}}else e=ea[m>>0]|0;e&=255;if(!H&&(g=0,e=ma(c[(c[l>>2]|0)+12>>2]|0,l|0,e|0)|0,t=g,g=0,t&1)){q=5;break}t=z+1|0;if(S)e=0,q=r;else for(n=0,x=C,q=r,r=h;;){do if(1==(u[r>>0]|0)){m=u[x>>0]&1?c[x+8>>2]|0:x+1|0;m=u[m+z>>0]|0;if(!H&&(g=0,m=ma(c[(c[l>>2]|0)+12>>2]|0,l|0,m|0)|0,A=g,g=0,A&1)){q=4;break b}e<<24>>24!=m<<24>>24?(u[r>>0]=0,m=n,k=k+-1|0):(m=u[x>>0]|0,m=m&1?c[x+4>>2]|0:(m&255)>>>1,(m|0)==(t|0)?(u[r>>0]=2,m=1,q=q+1|0,k=k+-1|0):m=1)}else m=n;while(0);x=x+12|0;if((x|
0)==(b|0)){e=m;break}else n=m,r=r+1|0}if(e){e=c[p>>2]|0;m=e+12|0;n=c[m>>2]|0;if((n|0)==(c[e+16>>2]|0)){if(g=0,ca(c[(c[e>>2]|0)+40>>2]|0,e|0)|0,A=g,g=0,A&1){q=5;break}}else c[m>>2]=n+1;if(2>(q+k|0)>>>0|I)z=t,r=q;else for(e=C,n=q,q=h;;)if(2==(u[q>>0]|0)&&(m=u[e>>0]|0,m=m&1?c[e+4>>2]|0:(m&255)>>>1,(m|0)!=(t|0)&&(u[q>>0]=0,n=n+-1|0)),e=e+12|0,(e|0)==(b|0)){z=t;r=n;continue b}else q=q+1|0}else z=t,r=q}if(4==(q|0))C=J()|0;else if(5==(q|0))C=J()|0;else if(64==(q|0)){do if(e){if((c[e+12>>2]|0)==(c[e+16>>
2]|0)){g=0;e=ca(c[(c[e>>2]|0)+36>>2]|0,e|0)|0;A=g;g=0;if(A&1){q=6;break a}e=-1==(e|0)?c[p>>2]=0:c[p>>2]|0}}else e=0;while(0);k=0==(e|0);do if(n)q=76;else{if((c[m+12>>2]|0)==(c[m+16>>2]|0)){g=0;e=ca(c[(c[m>>2]|0)+36>>2]|0,m|0)|0;A=g;g=0;if(A&1){q=6;break a}if(-1==(e|0)){c[a>>2]=0;q=76;break}}k||(q=77)}while(0);76==(q|0)&&k&&(q=77);77==(q|0)&&(c[d>>2]|=2);b:do if((C|0)==(b|0))q=81;else for(;;){if(2==(u[h>>0]|0))break b;C=C+12|0;if((C|0)==(b|0)){q=81;break}else h=h+1|0}while(0);81==(q|0)&&(c[d>>2]|=
4,C=b);f&&$a(f);F=ua;return C|0}}while(0);6==(q|0)&&(C=J()|0);f&&$a(f);V(C|0);return 0}function of(p,a,C,b,l,d,H){p|=0;a|=0;C|=0;b|=0;l|=0;d|=0;H|=0;var f=0,h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,S=0,I=0,ua=0,A=0,ua=F;F=F+112|0;h=ua;k=(b-C|0)/12|0;100<k>>>0?(h=Ub(k)|0,0==(h|0)&&(g=0,rb(6),I=g,g=0,I&1)?(f=0,n=6):(f=h,n=11)):(f=0,n=11);a:do if(11==(n|0)){if((C|0)==(b|0))e=0;else for(q=C,m=0,n=h;e=u[q>>0]|0,(e=e&1?c[q+4>>2]|0:(e&255)>>>1)?(u[n>>0]=1,e=m):(u[n>>0]=2,e=m+1|0,k=k+-1|0),q=q+12|0,(q|0)!=
(b|0);)m=e,n=n+1|0;S=(C|0)==(b|0);I=(C|0)==(b|0);z=0;r=k;b:for(;;){k=c[p>>2]|0;do if(k){m=c[k+12>>2]|0;if((m|0)==(c[k+16>>2]|0)){if(g=0,k=ca(c[(c[k>>2]|0)+36>>2]|0,k|0)|0,t=g,g=0,t&1){n=5;break b}}else k=c[m>>2]|0;-1==(k|0)?(c[p>>2]=0,q=1):q=0==(c[p>>2]|0)}else q=1;while(0);if(m=c[a>>2]|0){k=c[m+12>>2]|0;if((k|0)==(c[m+16>>2]|0)){if(g=0,k=ca(c[(c[m>>2]|0)+36>>2]|0,m|0)|0,t=g,g=0,t&1){n=5;break}}else k=c[k>>2]|0;-1==(k|0)?(m=c[a>>2]=0,n=1):n=0}else m=0,n=1;k=c[p>>2]|0;if(!(0!=(r|0)&(q^n))){n=66;break}m=
c[k+12>>2]|0;if((m|0)==(c[k+16>>2]|0)){if(g=0,k=ca(c[(c[k>>2]|0)+36>>2]|0,k|0)|0,t=g,g=0,t&1){n=5;break}}else k=c[m>>2]|0;if(!H&&(g=0,k=ma(c[(c[l>>2]|0)+28>>2]|0,l|0,k|0)|0,t=g,g=0,t&1)){n=5;break}t=z+1|0;if(S)k=0,q=r;else for(q=0,x=C,n=r,r=h;;){do if(1==(u[r>>0]|0)){m=u[x>>0]&1?c[x+8>>2]|0:x+4|0;m=c[m+(z<<2)>>2]|0;if(!H&&(g=0,m=ma(c[(c[l>>2]|0)+28>>2]|0,l|0,m|0)|0,A=g,g=0,A&1)){n=4;break b}(k|0)!=(m|0)?(u[r>>0]=0,m=q,n=n+-1|0):(m=u[x>>0]|0,m=m&1?c[x+4>>2]|0:(m&255)>>>1,(m|0)==(t|0)?(u[r>>0]=2,m=
1,e=e+1|0,n=n+-1|0):m=1)}else m=q;while(0);x=x+12|0;if((x|0)==(b|0)){k=m;q=n;break}else q=m,r=r+1|0}if(k){k=c[p>>2]|0;m=k+12|0;n=c[m>>2]|0;if((n|0)==(c[k+16>>2]|0)){if(g=0,ca(c[(c[k>>2]|0)+40>>2]|0,k|0)|0,A=g,g=0,A&1){n=5;break}}else c[m>>2]=n+4;if(2>(e+q|0)>>>0|I)z=t,r=q;else for(k=C,n=h;;)if(2==(u[n>>0]|0)&&(m=u[k>>0]|0,m=m&1?c[k+4>>2]|0:(m&255)>>>1,(m|0)!=(t|0)&&(u[n>>0]=0,e=e+-1|0)),k=k+12|0,(k|0)==(b|0)){z=t;r=q;continue b}else n=n+1|0}else z=t,r=q}if(4==(n|0))C=J()|0;else if(5==(n|0))C=J()|
0;else if(66==(n|0)){do if(k){e=c[k+12>>2]|0;if((e|0)==(c[k+16>>2]|0)){if(g=0,e=ca(c[(c[k>>2]|0)+36>>2]|0,k|0)|0,A=g,g=0,A&1){n=6;break a}}else e=c[e>>2]|0;-1==(e|0)?(c[p>>2]=0,k=1):k=0==(c[p>>2]|0)}else k=1;while(0);do if(m){e=c[m+12>>2]|0;if((e|0)==(c[m+16>>2]|0)){if(g=0,e=ca(c[(c[m>>2]|0)+36>>2]|0,m|0)|0,A=g,g=0,A&1){n=6;break a}}else e=c[e>>2]|0;-1!=(e|0)?k||(n=81):(c[a>>2]=0,n=79)}else n=79;while(0);79==(n|0)&&k&&(n=81);81==(n|0)&&(c[d>>2]|=2);b:do if((C|0)==(b|0))n=85;else for(;;){if(2==(u[h>>
0]|0))break b;C=C+12|0;if((C|0)==(b|0)){n=85;break}else h=h+1|0}while(0);85==(n|0)&&(c[d>>2]|=4,C=b);f&&$a(f);F=ua;return C|0}}while(0);6==(n|0)&&(C=J()|0);f&&$a(f);V(C|0);return 0}function Bc(p,a,C,b,l){p|=0;a|=0;b|=0;var d=0,H=0,d=F;F=F+16|0;H=d;c[H>>2]=l|0;l=md(C|0)|0;C=wf(p,a,b,H)|0;0!=(l|0)&&(g=0,ca(75,l|0)|0,H=g,g=0,H&1)&&(H=J(0)|0,h(H));F=d;return C|0}function Me(p,a,C,b,l,d){p|=0;a|=0;C|=0;b|=0;l|=0;d|=0;var H=0,f=0,h=0,e=0,k=0,m=0,n=0,m=F;F=F+16|0;k=m;H=c[p>>2]|0;a:do if(H)if(n=a,h=b-n>>
2,e=l+12|0,f=c[e>>2]|0,h=(f|0)>(h|0)?f-h|0:0,f=C,n=f-n|0,l=n>>2,0<(n|0)&&(cb[c[(c[H>>2]|0)+48>>2]&63](H,a,l)|0)!=(l|0))H=c[p>>2]=0;else{do if(0<(h|0))if(fg(k,h,d),g=0,l=La(c[(c[H>>2]|0)+48>>2]|0,H|0,(0==(u[k>>0]&1)?k+4|0:c[k+8>>2]|0)|0,h|0)|0,n=g,g=0,n&1&&(n=J()|0,Ka(k),V(n|0)),(l|0)==(h|0))Ka(k);else{c[p>>2]=0;Ka(k);H=0;break a}while(0);n=b-f|0;b=n>>2;0<(n|0)&&(cb[c[(c[H>>2]|0)+48>>2]&63](H,C,b)|0)!=(b|0)?H=c[p>>2]=0:c[e>>2]=0}else H=0;while(0);F=m;return H|0}function Nd(p,a,C,b,l){p|=0;a|=0;C|=
0;b|=0;l|=0;var g=0,d=0,f=0,h=0,e=0,k=0,m=0,u=0,n=0,q=0;(g=c[p>>2]|0)?(c[g+12>>2]|0)==(c[g+16>>2]|0)&&(g=-1==(Ja[c[(c[g>>2]|0)+36>>2]&127](g)|0)?c[p>>2]=0:c[p>>2]|0):g=0;d=0==(g|0);(g=c[a>>2]|0)?(c[g+12>>2]|0)==(c[g+16>>2]|0)&&-1==(Ja[c[(c[g>>2]|0)+36>>2]&127](g)|0)?(c[a>>2]=0,q=11):q=d?13:12:q=11;11==(q|0)&&(d?q=12:(g=0,q=13));a:do if(12==(q|0))c[C>>2]|=6,g=0;else if(13==(q|0))if(d=c[p>>2]|0,f=c[d+12>>2]|0,d=(f|0)==(c[d+16>>2]|0)?Ja[c[(c[d>>2]|0)+36>>2]&127](d)|0:ea[f>>0]|0,f=d&255,-1<f<<24>>24&&
(n=b+8|0,0!=(R[(c[n>>2]|0)+(d<<24>>24<<1)>>1]&2048))){e=(cb[c[(c[b>>2]|0)+36>>2]&63](b,f,0)|0)<<24>>24;d=c[p>>2]|0;f=d+12|0;h=c[f>>2]|0;(h|0)==(c[d+16>>2]|0)?Ja[c[(c[d>>2]|0)+40>>2]&127](d)|0:c[f>>2]=h+1;m=l;l=k=g;for(g=e;;){g=g+-48|0;u=m+-1|0;(d=c[p>>2]|0)?(c[d+12>>2]|0)==(c[d+16>>2]|0)&&(d=-1==(Ja[c[(c[d>>2]|0)+36>>2]&127](d)|0)?c[p>>2]=0:c[p>>2]|0):d=0;h=0==(d|0);l?(c[l+12>>2]|0)==(c[l+16>>2]|0)?l=-1==(Ja[c[(c[l>>2]|0)+36>>2]&127](l)|0)?f=c[a>>2]=0:f=k:f=k:(f=k,l=0);d=c[p>>2]|0;if(!(1<(m|0)&(h^
0==(l|0))))break;h=c[d+12>>2]|0;d=(h|0)==(c[d+16>>2]|0)?Ja[c[(c[d>>2]|0)+36>>2]&127](d)|0:ea[h>>0]|0;h=d&255;if(-1>=h<<24>>24)break a;if(!(R[(c[n>>2]|0)+(d<<24>>24<<1)>>1]&2048))break a;g=((cb[c[(c[b>>2]|0)+36>>2]&63](b,h,0)|0)<<24>>24)+(10*g|0)|0;d=c[p>>2]|0;h=d+12|0;e=c[h>>2]|0;(e|0)==(c[d+16>>2]|0)?Ja[c[(c[d>>2]|0)+40>>2]&127](d)|0:c[h>>2]=e+1;m=u;k=f}d?(c[d+12>>2]|0)==(c[d+16>>2]|0)&&(d=-1==(Ja[c[(c[d>>2]|0)+36>>2]&127](d)|0)?c[p>>2]=0:c[p>>2]|0):d=0;d=0==(d|0);do if(f)if((c[f+12>>2]|0)==(c[f+
16>>2]|0)&&-1==(Ja[c[(c[f>>2]|0)+36>>2]&127](f)|0))c[a>>2]=0,q=50;else{if(d)break a}else q=50;while(0);if(50!=(q|0)||d)c[C>>2]|=2}else c[C>>2]|=4,g=0;while(0);return g|0}function Od(p,a,C,b,l){p|=0;a|=0;C|=0;b|=0;l|=0;var g=0,d=0,f=0,h=0,e=0,k=0,m=0,u=0,n=0;(g=c[p>>2]|0)?(d=c[g+12>>2]|0,g=(d|0)==(c[g+16>>2]|0)?Ja[c[(c[g>>2]|0)+36>>2]&127](g)|0:c[d>>2]|0,-1==(g|0)?(c[p>>2]=0,f=1):f=0==(c[p>>2]|0)):f=1;(d=c[a>>2]|0)?(g=c[d+12>>2]|0,g=(g|0)==(c[d+16>>2]|0)?Ja[c[(c[d>>2]|0)+36>>2]&127](d)|0:c[g>>2]|0,
-1!=(g|0)?n=f?17:16:(c[a>>2]=0,n=14)):n=14;14==(n|0)&&(f?n=16:(d=0,n=17));a:do if(16==(n|0))c[C>>2]|=6,g=0;else if(17==(n|0))if(g=c[p>>2]|0,f=c[g+12>>2]|0,g=(f|0)==(c[g+16>>2]|0)?Ja[c[(c[g>>2]|0)+36>>2]&127](g)|0:c[f>>2]|0,cb[c[(c[b>>2]|0)+12>>2]&63](b,2048,g)|0){g=(cb[c[(c[b>>2]|0)+52>>2]&63](b,g,0)|0)<<24>>24;f=c[p>>2]|0;h=f+12|0;e=c[h>>2]|0;(e|0)==(c[f+16>>2]|0)?Ja[c[(c[f>>2]|0)+40>>2]&127](f)|0:c[h>>2]=e+4;m=l;for(h=k=d;;){g=g+-48|0;u=m+-1|0;(d=c[p>>2]|0)?(f=c[d+12>>2]|0,d=(f|0)==(c[d+16>>2]|
0)?Ja[c[(c[d>>2]|0)+36>>2]&127](d)|0:c[f>>2]|0,-1==(d|0)?(c[p>>2]=0,e=1):e=0==(c[p>>2]|0)):e=1;h?(d=c[h+12>>2]|0,d=(d|0)==(c[h+16>>2]|0)?Ja[c[(c[h>>2]|0)+36>>2]&127](h)|0:c[d>>2]|0,-1==(d|0)?(l=h=c[a>>2]=0,d=1):(l=h=k,d=0==(k|0))):(h=k,l=0,d=1);f=c[p>>2]|0;if(!(1<(m|0)&(e^d)))break;d=c[f+12>>2]|0;d=(d|0)==(c[f+16>>2]|0)?Ja[c[(c[f>>2]|0)+36>>2]&127](f)|0:c[d>>2]|0;if(!(cb[c[(c[b>>2]|0)+12>>2]&63](b,2048,d)|0))break a;g=((cb[c[(c[b>>2]|0)+52>>2]&63](b,d,0)|0)<<24>>24)+(10*g|0)|0;d=c[p>>2]|0;f=d+12|
0;e=c[f>>2]|0;(e|0)==(c[d+16>>2]|0)?Ja[c[(c[d>>2]|0)+40>>2]&127](d)|0:c[f>>2]=e+4;m=u;k=h;h=l}f?(d=c[f+12>>2]|0,d=(d|0)==(c[f+16>>2]|0)?Ja[c[(c[f>>2]|0)+36>>2]&127](f)|0:c[d>>2]|0,-1==(d|0)?(c[p>>2]=0,f=1):f=0==(c[p>>2]|0)):f=1;do if(h)if(d=c[h+12>>2]|0,d=(d|0)==(c[h+16>>2]|0)?Ja[c[(c[h>>2]|0)+36>>2]&127](h)|0:c[d>>2]|0,-1!=(d|0)){if(f)break a}else c[a>>2]=0,n=60;else n=60;while(0);if(60!=(n|0)||f)c[C>>2]|=2}else c[C>>2]|=4,g=0;while(0);return g|0}function ag(p){p|=0;var a=0,C=0,b=0;if(C=c[p>>2]|
0){b=p+4|0;a=c[b>>2]|0;if((a|0)!=(C|0)){do a=a+-4|0;while((a|0)!=(C|0));c[b>>2]=a}(p+16|0)==(C|0)?u[p+128>>0]=0:Q(C)}}function Ug(p,a){var C=0,C=(p|0)+4|0;p=a|0;a=c[C>>2]|0;do c[a>>2]=0,a=(c[C>>2]|0)+4|0,c[C>>2]=a,p=p+-1|0;while(0!=(p|0))}function Ud(c,a,C,b){c|=0;C|=0;b=(a|0)-(b|0)-(C>>>0>c>>>0|0)>>>0;return(Fa=b,c-C>>>0|0)|0}function Za(p,a,C){p|=0;a|=0;C|=0;var b=0,l=0,g=0,d=0,b=p+C|0;if(20<=(C|0)){a&=255;g=p&3;d=a|a<<8|a<<16|a<<24;l=b&-4;if(g)for(g=p+4-g|0;(p|0)<(g|0);)u[p>>0]=a,p=p+1|0;for(;(p|
0)<(l|0);)c[p>>2]=d,p=p+4|0}for(;(p|0)<(b|0);)u[p>>0]=a,p=p+1|0;return p-C|0}function Mb(c,a,C,b){c|=0;C=c+(C|0)>>>0;return(Fa=(a|0)+(b|0)+(C>>>0<c>>>0|0)>>>0,C|0)|0}function ie(c,a,C){a|=0;C|=0;if(32>(C|0))return Fa=a>>>C,(c|0)>>>C|(a&(1<<C)-1)<<32-C;Fa=0;return a>>>C-32|0}function gb(p,a,C){p|=0;a|=0;C|=0;var b=0;if(4096<=(C|0))return di(p|0,a|0,C|0)|0;b=p|0;if((p&3)==(a&3)){for(;p&3;){if(!C)return b|0;u[p>>0]=u[a>>0]|0;p=p+1|0;a=a+1|0;C=C-1|0}for(;4<=(C|0);)c[p>>2]=c[a>>2],p=p+4|0,a=a+4|0,C=C-
4|0}for(;0<(C|0);)u[p>>0]=u[a>>0]|0,p=p+1|0,a=a+1|0,C=C-1|0;return b|0}function yb(c,a,C){c|=0;C|=0;if(32>(C|0))return Fa=(a|0)<<C|(c&(1<<C)-1<<32-C)>>>32-C,c<<C;Fa=c<<C-32;return 0}function tf(c,a,C){c|=0;a|=0;C|=0;var b=0;if((a|0)<(c|0)&(c|0)<(a+C|0)){b=c;a=a+C|0;for(c=c+C|0;0<(C|0);)c=c-1|0,a=a-1|0,C=C-1|0,u[c>>0]=u[a>>0]|0;c=b}else gb(c,a,C)|0;return c|0}function Vg(c){c|=0;var a=0,a=u[xf+(c&255)>>0]|0;if(8>(a|0))return a|0;a=u[xf+(c>>8&255)>>0]|0;if(8>(a|0))return a+8|0;a=u[xf+(c>>16&255)>>0]|
0;return 8>(a|0)?a+16|0:(u[xf+(c>>>24)>>0]|0)+24|0}function Ne(c,a,C,b){a|=0;b|=0;var l=0,g=0,l=c|0,g=C|0;c=l|0;C=g|0;var d=0,f=0,h=0,e=0,e=c&65535,h=C&65535,d=ia(h,e)|0,f=c>>>16;c=(d>>>16)+(ia(h,f)|0)|0;h=C>>>16;C=ia(h,e)|0;C=(Fa=(c>>>16)+(ia(h,f)|0)+(((c&65535)+C|0)>>>16)|0,c+C<<16|d&65535|0)|0;c=Fa;return(Fa=(ia(a,g)|0)+(ia(b,l)|0)+c|c&0,C|0)|0}function pf(c,a,C,b){return Wg(c|0,a|0,C|0,b|0,0)|0}function bg(p,a,C,b){var l=0,g=0,g=F;F=F+16|0;l=g|0;Wg(p|0,a|0,C|0,b|0,l)|0;F=g;return(Fa=c[l+4>>2]|
0,c[l>>2]|0)|0}function Wg(p,a,C,b,l){p|=0;a|=0;C|=0;b|=0;l|=0;var g=0,d=0,f=0,h=0,e=0,k=0,m=0,u=0,n=0,q=0,k=p,e=h=a,d=C,f=u=b;if(!e){g=0!=(l|0);if(f){if(!g)return(Fa=0,0)|0;c[l>>2]=p|0;c[l+4>>2]=a&0;l=u=0}else g&&(c[l>>2]=(k>>>0)%(d>>>0),c[l+4>>2]=0),u=0,l=(k>>>0)/(d>>>0)>>>0;return(Fa=u,l)|0}g=0==(f|0);do if(d){if(!g){g=(Oe(f|0)|0)-(Oe(e|0)|0)|0;if(31>=g>>>0){m=g+1|0;f=31-g|0;a=g-31>>31;d=m;p=k>>>(m>>>0)&a|e<<f;a&=e>>>(m>>>0);g=0;f=k<<f;break}if(!l)return l=u=0,(Fa=u,l)|0;c[l>>2]=p|0;c[l+4>>2]=
h|a&0;l=u=0;return(Fa=u,l)|0}g=d-1|0;if(g&d)f=(Oe(d|0)|0)+33-(Oe(e|0)|0)|0,q=64-f|0,m=32-f|0,h=m>>31,n=f-32|0,a=n>>31,d=f,p=m-1>>31&e>>>(n>>>0)|(e<<m|k>>>(f>>>0))&a,a&=e>>>(f>>>0),g=k<<q&h,f=(e<<q|k>>>(n>>>0))&h|k<<m&f-33>>31;else return l&&(c[l>>2]=g&k,c[l+4>>2]=0),1==(d|0)?(n=h|a&0,q=p|0):(q=Vg(d|0)|0,n=e>>>(q>>>0)|0,q=e<<32-q|k>>>(q>>>0)|0),(Fa=n,q)|0}else{if(g)return l&&(c[l>>2]=(e>>>0)%(d>>>0),c[l+4>>2]=0),n=0,q=(e>>>0)/(d>>>0)>>>0,(Fa=n,q)|0;if(!k)return l&&(c[l>>2]=0,c[l+4>>2]=(e>>>0)%(f>>>
0)),n=0,q=(e>>>0)/(f>>>0)>>>0,(Fa=n,q)|0;g=f-1|0;if(!(g&f))return l&&(c[l>>2]=p|0,c[l+4>>2]=g&e|a&0),n=0,q=e>>>((Vg(f|0)|0)>>>0),(Fa=n,q)|0;g=(Oe(f|0)|0)-(Oe(e|0)|0)|0;if(30>=g>>>0)a=g+1|0,f=31-g|0,d=a,p=e<<f|k>>>(a>>>0),a=e>>>(a>>>0),g=0,f=k<<f;else{if(!l)return q=n=0,(Fa=n,q)|0;c[l>>2]=p|0;c[l+4>>2]=h|a&0;q=n=0;return(Fa=n,q)|0}}while(0);if(d){m=C|0;k=u|b&0;e=Mb(m|0,k|0,-1,-1)|0;C=Fa;h=f;f=0;do b=h,h=g>>>31|h<<1,g=f|g<<1,b=p<<1|b>>>31|0,u=p>>>31|a<<1|0,Ud(e,C,b,u)|0,q=Fa,n=q>>31|(0>(q|0)?-1:0)<<
1,f=n&1,p=Ud(b,u,n&m,((0>(q|0)?-1:0)>>31|(0>(q|0)?-1:0)<<1)&k)|0,a=Fa,d=d-1|0;while(0!=(d|0));e=h;h=0}else e=f,f=h=0;d=0;l&&(c[l>>2]=p,c[l+4>>2]=a);return(Fa=(g|0)>>>31|(e|d)<<1|(d<<1|g>>>31)&0|h,(g<<1|0)&-2|f)|0}function le(c,a,C,b,l,g,d){ac(0);return 0}function $e(c,a,C,b,l){ac(1)}function Xg(c,a,C,b,l,g){ac(2);return 0}function Wa(c){ac(3)}function kg(c,a){ac(4)}function Yb(c,a,C,b,l,g){ac(5);return 0}function Xa(c){ac(6);return 0}function Yg(c,a,C,b,l,g,d,f,h,e,k){ac(7);return 0}function Nb(c,
a,C){ac(8);return 0}function Zg(c,a,C,b,l,g,d,f,h,e,k,m,u,n,q){ac(9)}function me(c,a,C,b,l,g){ac(10)}function yf(c,a,C,b,l,g,d){ac(11)}function zf(c,a,C,b,l,g,d,f,h,e){ac(12)}function Db(c,a){ac(13);return 0}function Pd(c,a,C,b,l){ac(14);return 0}function xe(){ac(16);return 0}function Pe(c,a,C,b){ac(17);return 0}function $g(){ac(19)}function Qe(c,a,C,b,l,g,d,f){ac(20);return 0}function Af(c,a,C,b,l){ac(21);return 0}function Ic(c,a,C,b){ac(22)}function ah(p,a){p|=0;a|=0;var C=0,b=0,l=0,g=0,d=0,f=0,
h=0,e=0,e=a+9|0,C=ea[e>>0]|0,g=a+4|0,l=(ia(C>>>1,c[g>>2]|0)|0)+(c[a>>2]|0)|0;if((C|0)<(l|0)){b=0;do C<<=1,b=b+1|0;while((C|0)<(l|0))}else b=0;d=c[p+148>>2]|0;f=c[36476+(c[p+4592>>2]<<2)>>2]|0;C=c[p+140>>2]|0;l=Ya(p)|0;(l|0)<(d+-2-f-C|0)?b?(f=(Ta(p,b)|0)+(l<<b)|0,b=c[g>>2]|0,l=f+b|0,C=d=l&1,g=1,l=(d+l|0)/2|0):(b=c[g>>2]|0,p=b+l|0,C=p&1,p=(C+p|0)/2|0,h=8):(l=(Ta(p,C)|0)+1|0,d=c[g>>2]|0,p=l+d|0,C=p&1,p=(C+p|0)/2|0,b?(f=l,g=1,l=p,b=d):(b=d,h=8));8==(h|0)&&(f=l,g=ea[a+10>>0]<<1>>>0>=(ea[e>>0]|0)>>>0,l=
p);l=0!=(C|0)^g?l:0-l|0;0>(l|0)&&(h=a+10|0,u[h>>0]=(ea[h>>0]|0)+1);C=(f+1-b>>1)+(c[a>>2]|0)|0;c[a>>2]=C;b=u[e>>0]|0;if(b<<24>>24!=(u[a+8>>0]|0))return a=b&255,a=a+1|0,a&=255,u[e>>0]=a,l|0;c[a>>2]=C>>1;h=(b&255)>>>1;u[e>>0]=h;a=a+10|0;u[a>>0]=(ea[a>>0]|0)>>>1;a=h&255;a=a+1|0;a&=255;u[e>>0]=a;return l|0}function ei(p){p|=0;var a=0,C=0,b=0,l=0,g=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,n=F;F=F+32|0;b=n;m=p+136|0;a:do if(c[m>>2]|0)a=p+144|0;else if(C=c[p+128>>2]|0,a=p+144|0,(C|0)==((1<<c[a>>2])+-1|0)&&(xb(b,C,0),
(c[b+4>>2]|0)==(c[p+176>>2]|0))&&(c[b+8>>2]|0)==(c[p+180>>2]|0)&&(c[b+12>>2]|0)==(c[p+184>>2]|0))switch(c[a>>2]|0){case 8:m=c[8900]|0;c[p+4604>>2]=m+(((c[8901]|0)-m|0)>>>1);F=n;return;case 10:m=c[8903]|0;c[p+4604>>2]=m+(((c[8904]|0)-m|0)>>>1);F=n;return;case 12:m=c[8906]|0;c[p+4604>>2]=m+(((c[8907]|0)-m|0)>>>1);F=n;return;case 16:m=c[8909]|0;c[p+4604>>2]=m+(((c[8910]|0)-m|0)>>>1);F=n;return;default:break a}while(0);k=1<<c[a>>2];C=p+4608|0;b=k<<1;l=p+4612|0;g=c[l>>2]|0;a=c[C>>2]|0;d=g-a|0;b>>>0<=d>>>
0?b>>>0<d>>>0&&(f=a+b|0,(g|0)!=(f|0))&&(c[l>>2]=f):(X(C,b-d|0),a=c[C>>2]|0);e=p+4604|0;c[e>>2]=a+k;a=0-k|0;if(!((k|0)<=(a|0))){f=p+184|0;h=p+180|0;d=p+176|0;g=a;do a=c[f>>2]|0,(g|0)>(0-a|0)?(C=c[h>>2]|0,(g|0)>(0-C|0)?(b=c[d>>2]|0,(g|0)>(0-b|0)?(l=c[m>>2]|0,a=(g|0)>=(0-l|0)?(l|0)<(g|0)?(b|0)<=(g|0)?(C|0)>(g|0)?2:(a|0)>(g|0)?3:4:1:0:-1):a=-2):a=-3):a=-4,u[(c[e>>2]|0)+g>>0]=a,g=g+1|0;while((g|0)!=(k|0))}F=n}function bh(p){p|=0;var a=0,C=0,b=0,l=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,h=F;F=F+16|0;k=h;c[k>>2]=
0;m=k+4|0;c[m>>2]=0;g=c[k+8>>2]=0;a=ca(67,1)|0;f=g;g=0;a:do if(f&1||(f=a+1|0,u[a>>0]=1,c[k>>2]=a,c[m>>2]=f,c[k+8>>2]=f,g=0,ga(84,k|0,c[p>>2]&65535|0),f=g,g=0,f&1)||(g=0,ga(84,k|0,c[p+4>>2]&65535|0),f=g,g=0,f&1)||(g=0,ga(84,k|0,c[p+8>>2]&65535|0),f=g,g=0,f&1)||(g=0,ga(84,k|0,c[p+12>>2]&65535|0),f=g,g=0,f&1)||(g=0,ga(84,k|0,c[p+16>>2]&65535|0),f=g,g=0,f&1)||(g=0,e=ca(67,20)|0,f=g,g=0,f&1))d=25;else{c[e>>2]=36800;u[e+4>>0]=-8;l=e+8|0;c[l>>2]=0;f=e+12|0;c[f>>2]=0;p=e+16|0;c[p>>2]=0;a=c[m>>2]|0;n=c[k>>
2]|0;b=a-n|0;do if((a|0)!=(n|0))if(0>(b|0)&&(g=0,ta(178,l|0),n=g,g=0,n&1)||(d=11),11!=(d|0)||(g=0,C=ca(67,b|0)|0,n=g,g=0,n&1)){C=J()|0;if(a=c[l>>2]|0)(c[f>>2]|0)!=(a|0)&&(c[f>>2]=a),Q(a);Q(e);break a}else if(c[f>>2]=C,c[l>>2]=C,c[p>>2]=C+b,a=c[k>>2]|0,p=c[m>>2]|0,(a|0)!=(p|0)){do u[C>>0]=u[a>>0]|0,C=(c[f>>2]|0)+1|0,c[f>>2]=C,a=a+1|0;while((a|0)!=(p|0));a=c[k>>2]|0}while(0);if(!a)return F=h,e|0;(c[m>>2]|0)!=(a|0)&&(c[m>>2]=a);Q(a);F=h;return e|0}while(0);25==(d|0)&&(C=J()|0);(a=c[k>>2]|0)||V(C|0);
(c[m>>2]|0)!=(a|0)&&(c[m>>2]=a);Q(a);V(C|0);return 0}function fi(p,a,C,b){p|=0;a|=0;C|=0;b|=0;var l=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,S=0,I=0,A=F;F=F+16|0;S=A;c[S>>2]=0;I=S+4|0;c[I>>2]=0;c[S+8>>2]=0;t=S+8|0;g=0;l=ca(67,1)|0;x=g;g=0;a:do if(x&1)z=29;else{x=h=l+1|0;u[l>>0]=a;c[S>>2]=l;c[I>>2]=x;c[t>>2]=x;if(0<(a|0)){f=h;x=0;do{r=x+p&255;if(f>>>0>=h>>>0){e=l=c[S>>2]|0;f=f-e+1|0;if(0>(f|0)){g=0;ta(178,S|0);q=g;g=0;if(q&1){z=28;break}e=c[S>>2]|0;h=c[t>>2]|0;q=e}else q=l;n=q;l=h-n|0;
1073741823>l>>>0?(l<<=1,l=l>>>0<f>>>0?f:l,h=c[I>>2]|0,k=h-n|0,l?z=13:f=m=0):(k=c[I>>2]|0,l=2147483647,h=k,k=k-n|0,z=13);if(13==(z|0))if(g=z=0,f=ca(67,l|0)|0,m=g,g=0,m&1){z=28;break}else m=l;u[f+k>>0]=r;l=f+(k+1)|0;n=h-n|0;r=f+(k-n)|0;gb(r|0,q|0,n|0)|0;c[S>>2]=r;c[I>>2]=l;c[t>>2]=f+m;e&&(Q(e),l=c[I>>2]|0)}else u[f>>0]=r,l=(c[I>>2]|0)+1|0,c[I>>2]=l;h=c[t>>2]|0;if(l>>>0>=h>>>0){f=e=c[S>>2]|0;k=l-f+1|0;if(0>(k|0)){g=0;ta(178,S|0);r=g;g=0;if(r&1){z=28;break}f=e=c[S>>2]|0;h=c[t>>2]|0}n=e;l=h-n|0;1073741823>
l>>>0?(l<<=1,l=l>>>0<k>>>0?k:l,k=c[I>>2]|0,h=k-n|0,l?z=24:m=l=0):(h=c[I>>2]|0,l=2147483647,k=h,h=h-n|0,z=24);if(24==(z|0)&&(g=z=0,m=ca(67,l|0)|0,r=g,g=0,r&1)){z=28;break}u[m+h>>0]=0;q=k-n|0;r=m+(h-q)|0;gb(r|0,e|0,q|0)|0;c[S>>2]=r;c[I>>2]=m+(h+1);c[t>>2]=m+l;f&&Q(f)}else u[l>>0]=0,c[I>>2]=(c[I>>2]|0)+1;x=x+1|0;f=c[I>>2]|0;h=c[t>>2]|0}while((x|0)<(a|0));if(28==(z|0)){d=J()|0;break}l=C&255;f>>>0<h>>>0?(u[f>>0]=l,f=(c[I>>2]|0)+1|0,c[I>>2]=f):z=37}else f=h,l=C&255,z=37;if(37==(z|0)){k=e=c[S>>2]|0;m=f-
k+1|0;if(0>(m|0)){g=0;ta(178,S|0);C=g;g=0;if(C&1){z=29;break}k=c[S>>2]|0;h=c[t>>2]|0;e=k}r=e;f=h-r|0;1073741823>f>>>0?(f<<=1,f=f>>>0<m>>>0?m:f,m=c[I>>2]|0,n=m-r|0,f?z=43:h=q=0):(n=c[I>>2]|0,f=2147483647,m=n,n=n-r|0,z=43);if(43==(z|0))if(g=0,h=ca(67,f|0)|0,C=g,g=0,C&1){z=29;break}else q=f;u[h+n>>0]=l;f=h+(n+1)|0;p=m-r|0;C=h+(n-p)|0;gb(C|0,e|0,p|0)|0;c[S>>2]=C;c[I>>2]=f;c[t>>2]=h+q;k&&(Q(k),f=c[I>>2]|0)}r=b&255;l=c[t>>2]|0;if(f>>>0>=l>>>0){e=h=c[S>>2]|0;f=f-e+1|0;if(0>(f|0)){g=0;ta(178,S|0);b=g;g=0;
if(b&1){z=29;break}e=c[S>>2]|0;l=c[t>>2]|0;h=e}q=h;l=l-q|0;1073741823>l>>>0?(l<<=1,l=l>>>0<f>>>0?f:l,k=c[I>>2]|0,m=k-q|0,l?z=54:f=n=0):(m=c[I>>2]|0,l=2147483647,k=m,m=m-q|0,z=54);if(54==(z|0))if(g=0,f=ca(67,l|0)|0,b=g,g=0,b&1){z=29;break}else n=l;u[f+m>>0]=r;l=f+(m+1)|0;C=k-q|0;b=f+(m-C)|0;gb(b|0,h|0,C|0)|0;c[S>>2]=b;c[I>>2]=l;c[t>>2]=f+n;e&&(Q(e),l=c[I>>2]|0)}else u[f>>0]=r,l=(c[I>>2]|0)+1|0,c[I>>2]=l;f=c[t>>2]|0;if(l>>>0>=f>>>0){e=h=c[S>>2]|0;k=l-e+1|0;if(0>(k|0)){g=0;ta(178,S|0);b=g;g=0;if(b&1){z=
29;break}e=c[S>>2]|0;f=c[t>>2]|0;h=e}n=h;l=f-n|0;1073741823>l>>>0?(l<<=1,l=l>>>0<k>>>0?k:l,f=c[I>>2]|0,m=f-n|0,l?z=65:k=l=0):(m=c[I>>2]|0,l=2147483647,f=m,m=m-n|0,z=65);if(65==(z|0)&&(g=0,k=ca(67,l|0)|0,b=g,g=0,b&1)){z=29;break}u[k+m>>0]=0;C=f-n|0;b=k+(m-C)|0;gb(b|0,h|0,C|0)|0;c[S>>2]=b;c[I>>2]=k+(m+1);c[t>>2]=k+l;e&&Q(e)}else u[l>>0]=0,c[I>>2]=(c[I>>2]|0)+1;g=0;m=ca(67,20)|0;t=g;g=0;if(t&1)z=29;else{c[m>>2]=36800;u[m+4>>0]=-38;e=m+8|0;c[e>>2]=0;k=m+12|0;c[k>>2]=0;f=m+16|0;c[f>>2]=0;l=c[I>>2]|0;t=
c[S>>2]|0;h=l-t|0;do if((l|0)!=(t|0))if(0>(h|0)&&(g=0,ta(178,e|0),t=g,g=0,t&1)||(z=72),72!=(z|0)||(g=0,d=ca(67,h|0)|0,t=g,g=0,t&1)){d=J()|0;if(l=c[e>>2]|0)(c[k>>2]|0)!=(l|0)&&(c[k>>2]=l),Q(l);Q(m);break a}else if(c[k>>2]=d,c[e>>2]=d,c[f>>2]=d+h,l=c[S>>2]|0,f=c[I>>2]|0,(l|0)!=(f|0)){do u[d>>0]=u[l>>0]|0,d=(c[k>>2]|0)+1|0,c[k>>2]=d,l=l+1|0;while((l|0)!=(f|0));l=c[S>>2]|0}while(0);if(!l)return F=A,m|0;(c[I>>2]|0)!=(l|0)&&(c[I>>2]=l);Q(l);F=A;return m|0}}while(0);29==(z|0)&&(d=J()|0);(l=c[S>>2]|0)||V(d|
0);(c[I>>2]|0)!=(l|0)&&(c[I>>2]=l);Q(l);V(d|0);return 0}function xd(p,a){p|=0;a|=0;var C=0,b=0,l=0;(l=c[p+4>>2]|0)?(C=l+24|0,b=c[C>>2]|0,(b|0)==(c[l+28>>2]|0)?vc[c[(c[l>>2]|0)+52>>2]&63](l,a&255)|0:(c[C>>2]=b+1,u[b>>0]=a)):(C=p+16|0,b=c[C>>2]|0,b>>>0<(c[p+12>>2]|0)>>>0?(c[C>>2]=b+1,u[(c[p+8>>2]|0)+b>>0]=a):(C=xa(16)|0,g=0,b=Va(1)|0,a=g,g=0,a&1&&(a=J()|0,za(C|0),V(a|0)),g=0,na(7,C|0,4,b|0),a=g,g=0,a&1?(a=J()|0,za(C|0),V(a|0)):Pa(C|0,824,96)))}function xb(p,a,C){p|=0;a|=0;C|=0;var b=0,l=0,g=0;c[p>>
2]=0;c[p+4>>2]=0;c[p+8>>2]=0;c[p+12>>2]=0;l=4095>(a|0)?(a+128|0)/256|0:16;g=(3*C|0)+2+l|0;b=C+1|0;g=(g|0)<(b|0)|(g|0)>(a|0)?b:g;c[p+4>>2]=g;b=(l<<2|3)+(5*C|0)|0;b=(b|0)>(a|0)|(b|0)<(g|0)?g:b;c[p+8>>2]=b;C=(7*C|0)+4+(17*l|0)|0;c[p+12>>2]=(C|0)>(a|0)|(C|0)<(b|0)?b:C;c[p>>2]=a;c[p+16>>2]=64}function ch(c){c|=0;var a=0,C=0,b=0,l=0;-40!=(lg(c)|0)<<24>>24&&(a=xa(16)|0,g=0,C=Va(1)|0,l=g,g=0,l&1||(g=0,na(7,a|0,5,C|0),l=g,g=0,l&1)||Pa(a|0,824,96),l=J()|0,za(a|0),V(l|0));a=lg(c)|0;if(-38!=a<<24>>24){for(;;){b=
((tb(c)|0)&255)<<8;b|=(tb(c)|0)&255;a=gi(c,a)|0;C=-2-a+b|0;if(0>(C|0))break;if(0<(C|0)){a=b+-2-a|0;C=0;do tb(c)|0,C=C+1|0;while((C|0)!=(a|0))}a=lg(c)|0;if(-38==a<<24>>24){l=8;break}}8!=(l|0)&&(a=xa(16)|0,g=0,C=Va(1)|0,l=g,g=0,l&1||(g=0,na(7,a|0,5,C|0),l=g,g=0,l&1)||Pa(a|0,824,96),l=J()|0,za(a|0),V(l|0))}}function dh(p,a){p|=0;a|=0;var C=0,b=0,l=0;a||(-1!=(tb(p)|0)<<24>>24&&(a=xa(16)|0,g=0,C=Va(1)|0,p=g,g=0,p&1||(g=0,na(7,a|0,12,C|0),p=g,g=0,p&1)||Pa(a|0,824,96),p=J()|0,za(a|0),V(p|0)),-38!=(tb(p)|
0)<<24>>24&&(a=xa(16)|0,g=0,C=Va(1)|0,p=g,g=0,p&1||(g=0,na(7,a|0,5,C|0),p=g,g=0,p&1)||Pa(a|0,824,96),p=J()|0,za(a|0),V(p|0)));tb(p)|0;tb(p)|0;C=tb(p)|0;b=C&255;1==C<<24>>24?(tb(p)|0,C=0,l=20):(b|0)==(c[p+32>>2]|0)?(a=tb(p)|0,C<<24>>24&&(C=0,l=20)):(a=xa(16)|0,g=0,C=Va(1)|0,p=g,g=0,p&1||(g=0,na(7,a|0,2,C|0),p=g,g=0,p&1)||Pa(a|0,824,96),p=J()|0,za(a|0),V(p|0));if(20==(l|0))for(;tb(p)|0,C=C+1|0,a=tb(p)|0,(C|0)!=(b|0););c[p+36>>2]=a&255;l=tb(p)|0;C=p+40|0;c[C>>2]=l&255;3<=(l&255)&&(a=xa(16)|0,g=0,C=Va(1)|
0,p=g,g=0,p&1||(g=0,na(7,a|0,5,C|0),p=g,g=0,p&1)||Pa(a|0,824,96),p=J()|0,za(a|0),V(p|0));(tb(p)|0)<<24>>24&&(a=xa(16)|0,g=0,C=Va(1)|0,p=g,g=0,p&1||(g=0,na(7,a|0,5,C|0),p=g,g=0,p&1)||Pa(a|0,824,96),p=J()|0,za(a|0),V(p|0));b=p+28|0;c[b>>2]|0||((a=c[p+108>>2]|0)||(a=c[p+16>>2]|0),C=c[C>>2]|0?c[p+32>>2]|0:1,l=ia(C,a)|0,p=ia(l,((c[p+24>>2]|0)+7|0)/8|0)|0,c[b>>2]=p)}function tb(p){p|=0;var a=0,C=0,b=0,l=0;if(C=c[p>>2]|0)return p=C+12|0,a=c[p>>2]|0,(a|0)==(c[C+16>>2]|0)?p=Ja[c[(c[C>>2]|0)+40>>2]&127](C)|
0:(c[p>>2]=a+1,p=ea[a>>0]|0),p&255|0;b=p+8|0;if(l=c[b>>2]|0){p=p+4|0;a=c[p>>2]|0;C=u[a>>0]|0;if(!a)return C|0;c[p>>2]=a+1;c[b>>2]=l+-1;return C|0}p=xa(16)|0;g=0;a=Va(1)|0;l=g;g=0;l&1&&(l=J()|0,za(p|0),V(l|0));g=0;na(7,p|0,4,a|0);l=g;g=0;l&1?(l=J()|0,za(p|0),V(l|0)):Pa(p|0,824,96);return 0}function lg(p){p|=0;var a=0,C=0,b=0,l=0,d=0,f=0,h=0,e=0,C=F;F=F+176|0;a=C+152|0;e=C+16|0;f=C;h=tb(p)|0;b=h&255;if(-1==h<<24>>24){do a=tb(p)|0;while(-1==a<<24>>24);F=C;return a|0}h=e+56|0;d=e+4|0;c[e>>2]=36160;c[h>>
2]=36180;g=0;ga(62,e+56|0,d|0);l=g;g=0;l&1&&(e=J()|0,sa(h),V(e|0));c[e+128>>2]=0;c[e+132>>2]=-1;c[e>>2]=36200;c[e+56>>2]=36220;g=0;ta(180,d|0);l=g;g=0;l&1?a=J()|0:(c[d>>2]=36236,l=e+36|0,c[l>>2]=0,c[l+4>>2]=0,c[l+8>>2]=0,c[l+12>>2]=0,c[e+52>>2]=16,c[a>>2]=0,c[a+4>>2]=0,g=c[a+8>>2]=0,ga(63,d|0,a|0),C=g,g=0,C&1?(e=J()|0,W(a),W(l),ya(d),a=e):(W(a),c[e+((c[(c[e>>2]|0)+-12>>2]|0)+76)>>2]=48,g=0,a=La(28,e|0,50907,62)|0,C=g,g=0,C&1||(C=a+((c[(c[a>>2]|0)+-12>>2]|0)+4)|0,c[C>>2]=c[C>>2]&-75|8,C=a+((c[(c[a>>
2]|0)+-12>>2]|0)+4)|0,c[C>>2]|=16384,c[a+((c[(c[a>>2]|0)+-12>>2]|0)+12)>>2]=2,g=0,ma(38,a|0,b|0)|0,b=g,g=0,b&1)||(C=xa(16)|0,g=0,ga(64,f|0,d|0),b=g,g=0,b&1?a=J()|0:(g=0,a=Va(1)|0,b=g,g=0,b&1||(g=0,pa(36,C|0,12,a|0,f|0),b=g,g=0,b&1)?p=1:(g=0,na(6,C|0,824,96),p=g=0),a=J()|0,W(f),p||(f=a,c[e>>2]=36200,c[h>>2]=36220,c[d>>2]=36236,W(l),ya(d),sa(h),V(f|0))),za(C|0),f=a,c[e>>2]=36200,c[h>>2]=36220,c[d>>2]=36236,W(l),ya(d),sa(h),V(f|0)),f=J()|0,c[e>>2]=36200,c[h>>2]=36220,c[d>>2]=36236,W(l),ya(d),sa(h),V(f|
0)));e=a;sa(h);V(e|0);return 0}function gi(p,a){p|=0;a|=0;var C=0,b=0,l=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,u=0,C=F;F=F+320|0;h=C+300|0;m=C+152|0;e=C+288|0;n=C+16|0;k=C;switch(a<<24>>24){case -9:return u=(tb(p)|0)&255,c[p+24>>2]=u,u=((tb(p)|0)&255)<<8|(tb(p)|0)&255,n=((tb(p)|0)&255)<<8|(tb(p)|0)&255,c[p+16>>2]=n,c[p+20>>2]=u,u=(tb(p)|0)&255,c[p+32>>2]=u,F=C,6;case -8:return b=p|0,l=0,1!=(tb(b)|0)<<24>>24?b=1:(l=((tb(b)|0)&255)<<8,l|=(tb(b)|0)&255,c[b+52>>2]=l,l=((tb(b)|0)&255)<<8,l|=(tb(b)|0)&255,c[b+56>>
2]=l,l=((tb(b)|0)&255)<<8,l|=(tb(b)|0)&255,c[b+60>>2]=l,l=((tb(b)|0)&255)<<8,l|=(tb(b)|0)&255,c[b+64>>2]=l,l=((tb(b)|0)&255)<<8,l|=(tb(b)|0)&255,c[b+68>>2]=l,b=11),b|=0,F=C,b|0;case -24:return u=hi(p)|0,F=C,u|0;case -53:case -54:case -55:case -57:case -58:case -59:case -61:case -62:case -63:case -64:f=m+56|0;l=m+4|0;c[m>>2]=36160;c[f>>2]=36180;g=0;ga(62,m+56|0,l|0);n=g;g=0;n&1&&(u=J()|0,sa(f),V(u|0));c[m+128>>2]=0;c[m+132>>2]=-1;c[m>>2]=36200;c[m+56>>2]=36220;g=0;ta(180,l|0);n=g;g=0;do if(n&1)p=J()|
0;else if(c[l>>2]=36236,d=m+36|0,c[d>>2]=0,c[d+4>>2]=0,c[d+8>>2]=0,c[d+12>>2]=0,c[m+52>>2]=16,c[h>>2]=0,c[h+4>>2]=0,g=c[h+8>>2]=0,ga(63,l|0,h|0),n=g,g=0,n&1)p=J()|0,W(h),W(d),ya(l);else{W(h);g=0;p=La(28,m|0,50970,26)|0;n=g;g=0;do if(n&1||(g=0,b=ma(38,p|0,a&255|0)|0,n=g,g=0,n&1)||(g=0,La(28,b|0,50997,18)|0,n=g,g=0,n&1))u=20;else{b=xa(16)|0;g=0;ga(64,e|0,l|0);n=g;g=0;if(n&1)p=J()|0;else if(g=0,p=Va(1)|0,n=g,g=0,n&1||(g=0,pa(36,b|0,10,p|0,e|0),n=g,g=0,n&1)?C=1:(g=0,na(6,b|0,824,96),C=g=0),p=J()|0,W(e),
!C)break;za(b|0)}while(0);20==(u|0)&&(p=J()|0);c[m>>2]=36200;c[f>>2]=36220;c[l>>2]=36236;W(d);ya(l);sa(f);u=p;V(u|0)}while(0);u=p;sa(f);V(u|0);case -25:case -32:case -2:F=C;break;default:e=n+56|0;d=n+4|0;c[n>>2]=36160;c[e>>2]=36180;g=0;ga(62,n+56|0,d|0);m=g;g=0;m&1&&(u=J()|0,sa(e),V(u|0));c[n+128>>2]=0;c[n+132>>2]=-1;c[n>>2]=36200;c[n+56>>2]=36220;g=0;ta(180,d|0);m=g;g=0;do if(m&1)p=J()|0;else if(c[d>>2]=36236,f=n+36|0,c[f>>2]=0,c[f+4>>2]=0,c[f+8>>2]=0,c[f+12>>2]=0,c[n+52>>2]=16,c[h>>2]=0,c[h+4>>
2]=0,g=c[h+8>>2]=0,ga(63,d|0,h|0),m=g,g=0,m&1)p=J()|0,W(h),W(f),ya(d);else{W(h);g=0;p=La(28,n|0,51016,20)|0;m=g;g=0;do if(m&1||(g=0,l=ma(38,p|0,a&255|0)|0,m=g,g=0,m&1)||(g=0,La(28,l|0,51037,13)|0,m=g,g=0,m&1))u=40;else{b=xa(16)|0;g=0;ga(64,k|0,d|0);m=g;g=0;if(m&1)p=J()|0;else if(g=0,p=Va(1)|0,m=g,g=0,m&1||(g=0,pa(36,b|0,11,p|0,k|0),m=g,g=0,m&1)?C=1:(g=0,na(6,b|0,824,96),C=g=0),p=J()|0,W(k),!C)break;za(b|0)}while(0);40==(u|0)&&(p=J()|0);c[n>>2]=36200;c[e>>2]=36220;c[d>>2]=36236;W(f);ya(d);sa(e);u=
p;V(u|0)}while(0);u=p;sa(e);V(u|0)}return 0}function hi(p){p|=0;var a=0,C=0,b=0,l=0,d=0,f=0,C=F;F=F+16|0;l=C;c[l>>2]=0;d=l+4|0;c[d>>2]=0;g=c[l+8>>2]=0;na(9,p|0,l|0,4);a=g;g=0;a:do if(a&1)b=3;else{a=c[l>>2]|0;b:do{var f=a,h=51051,e=4,f=f|0,h=h|0,e=e|0,k=0,m=0;if(e){k=u[f>>0]|0;c:do if(k<<24>>24)for(;;){e=e+-1|0;m=u[h>>0]|0;if(!(k<<24>>24==m<<24>>24&0!=(e|0)&0!=m<<24>>24))break c;f=f+1|0;h=h+1|0;k=u[f>>0]|0;if(!(k<<24>>24)){k=0;break}}else k=0;while(0);h=(k&255)-(ea[h>>0]|0)|0}else h=0;if(h|0)p=4;else{g=
0;a=ca(69,p|0)|0;f=g;g=0;if(f&1){b=3;break a}a&=255;switch(a|0){case 3:case 2:case 1:case 0:c[p+44>>2]=a;p=5;a=c[l>>2]|0;break b;case 5:case 4:a=xa(16)|0;g=0;p=Va(1)|0;f=g;g=0;if(f&1?0:(g=0,na(7,a|0,7,p|0),f=g,g=0,!(f&1))){g=0;na(6,a|0,824,96);g=0;b=3;break a}p=J()|0;za(a|0);break a;default:a=xa(16)|0;g=0;p=Va(1)|0;f=g;g=0;if(f&1?0:(g=0,na(7,a|0,5,p|0),f=g,g=0,!(f&1))){g=0;na(6,a|0,824,96);g=0;b=3;break a}p=J()|0;za(a|0);break a}}}while(0);if(!a)return F=C,p|0;(c[d>>2]|0)!=(a|0)&&(c[d>>2]=a);Q(a);
F=C;return p|0}while(0);3==(b|0)&&(p=J()|0);(a=c[l>>2]|0)||V(p|0);(c[d>>2]|0)!=(a|0)&&(c[d>>2]=a);Q(a);V(p|0);return 0}function ne(p,a){var C=0,C=F;F=F+16|0;c[C>>2]=a|0;a=c[9320]|0;eh(a,p|0,C)|0;var b,C=a;b=10;var C=C|0,l=0,g=0;if((u[C+75>>0]|0)!=(b|0)&&(g=C+20|0,l=c[g>>2]|0,l>>>0<(c[C+16>>2]|0)>>>0))c[g>>2]=l+1,u[l>>0]=b,l=b&255;else{C|=0;b|=0;var d=g=l=0,f=0,h=0,e=0,k=0,k=F;F=F+16|0;e=k;h=b&255;u[e>>0]=h;g=C+16|0;(d=c[g>>2]|0)?f=4:fh(C)|0?l=-1:(d=c[g>>2]|0,f=4);4==(f|0)&&(g=C+20|0,f=c[g>>2]|0,f>>>
0<d>>>0&&(l=b&255,(l|0)!=(u[C+75>>0]|0))?(c[g>>2]=f+1,u[f>>0]=h):l=1==(cb[c[C+36>>2]&63](C,e,1)|0)?ea[e>>0]|0:-1);F=k;l|=0}l|0;Aa()}function jd(c){gh(51337,51366,1164,51442)}function Md(c){gh(51463,51486,303,51442)}function hh(){var p=0,a=0,p=F;F=F+16|0;if(ii(37024,4)|0)ne(51562,p);else return a=ji(c[9255]|0)|0,F=p,a|0;return 0}function qa(p){p|=0;var a=0,a=0==(p|0)?1:p;p=Ub(a)|0;a:do if(!p){for(;;){p=0;p=c[9214]|0;c[9214]=p+0;p|=0;if(!p)break;ih[p&7]();if(p=Ub(a)|0)break a}a=xa(4)|0;c[a>>2]=36844;
Pa(a|0,592,78)}while(0);return p|0}function Q(c){$a(c|0)}function yg(c){var a=0,a=F;F=F+16|0;g=0;rb(c|0);c=g;g=0;c&1||(g=0,ga(85,51626,a|0),g=0);c=J(0)|0;Rc(c|0)|0;g=0;ga(85,51666,a+8|0);g=0;c=J(0)|0;g=0;rb(3);a=g;g=0;a&1?(a=J(0)|0,h(a)):h(c)}function sf(p){p|=0;c[p>>2]=36868;p=p+4|0;var a=0,C=0,C=(c[p>>2]|0)+-4|0,a=c[C>>2]|0;c[C>>2]=a+-1;0>(a+-1|0)&&Q((c[p>>2]|0)+-12|0)}function mg(p,a,C,b){a|=0;C|=0;b|=0;var l=0;p=a+16|0;(l=c[p>>2]|0)?(l|0)!=(C|0)?(b=a+36|0,c[b>>2]=(c[b>>2]|0)+1,c[a+24>>2]=2,u[a+
54>>0]=1):(p=a+24|0,2==(c[p>>2]|0)&&(c[p>>2]=b)):(c[p>>2]=C,c[a+24>>2]=b,c[a+36>>2]=1)}function jh(p,a,C,b){p|=0;C|=0;var l=0,g=0,g=c[p+4>>2]|0,l=g>>8;g&1&&(l=c[(c[C>>2]|0)+l>>2]|0);p=c[p>>2]|0;Bf[c[(c[p>>2]|0)+28>>2]&63](p,a|0,C+l|0,0!=(g&2|0)?b|0:2)}function kh(p,a,C,b){p|=0;C|=0;var l=0,g=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,q=0,q=F;F=F+64|0;n=q;m=c[p>>2]|0;k=p+(c[m+-8>>2]|0)|0;m=c[m+-4>>2]|0;c[n>>2]=C;c[n+4>>2]=p;c[n+8>>2]=a|0;c[n+12>>2]=b|0;b=n+16|0;p=n+20|0;a=n+24|0;l=n+28|0;g=n+32|0;d=n+40|0;f=(m|
0)==(C|0);h=b;e=h+36|0;do c[h>>2]=0,h=h+4|0;while((h|0)<(e|0));R[b+36>>1]=0;u[b+38>>0]=0;a:do if(f)c[n+48>>2]=1,ye[c[(c[C>>2]|0)+20>>2]&15](C,n,k,k,1,0),b=1==(c[a>>2]|0)?k:0;else{Cf[c[(c[m>>2]|0)+24>>2]&15](m,n,k,1,0);switch(c[n+36>>2]|0){case 0:b=1==(c[d>>2]|0)&1==(c[l>>2]|0)&1==(c[g>>2]|0)?c[p>>2]|0:0;break a;case 1:break;default:b=0;break a}b=1==(c[a>>2]|0)||0==(c[d>>2]|0)&1==(c[l>>2]|0)&1==(c[g>>2]|0)?c[b>>2]|0:0}while(0);F=q;return b|0}function ng(p,a,C,b,l){a|=0;C|=0;l|=0;u[a+53>>0]=1;(c[a+
4>>2]|0)==(b|0)&&(u[a+52>>0]=1,b=a+16|0,(p=c[b>>2]|0)?(p|0)!=(C|0)?(l=a+36|0,c[l>>2]=(c[l>>2]|0)+1,u[a+54>>0]=1):(p=a+24|0,b=c[p>>2]|0,2==(b|0)&&(b=c[p>>2]=l),1==(b|0)&&1==(c[a+48>>2]|0)&&(u[a+54>>0]=1)):(c[b>>2]=C,c[a+24>>2]=l,c[a+36>>2]=1,1==(l|0)&&1==(c[a+48>>2]|0)&&(u[a+54>>0]=1)))}function og(p,a,C,b,l,g){p|=0;b|=0;var d=0,f=0,f=c[p+4>>2]|0,d=f>>8;f&1&&(d=c[(c[b>>2]|0)+d>>2]|0);p=c[p>>2]|0;ye[c[(c[p>>2]|0)+20>>2]&15](p,a|0,C|0,b+d|0,0!=(f&2|0)?l|0:2,g|0)}function Df(p,a,C,b,l){p|=0;C|=0;var g=
0,d=0,d=c[p+4>>2]|0,g=d>>8;d&1&&(g=c[(c[C>>2]|0)+g>>2]|0);p=c[p>>2]|0;Cf[c[(c[p>>2]|0)+24>>2]&15](p,a|0,C+g|0,0!=(d&2|0)?b|0:2,l|0)}function Ef(){var p=0,p=xa(4)|0,a;a=p|0;c[a>>2]=36844;Pa(p|0,592,78)}function Ff(c,a,C,b){c|=0;a|=0;C|=0;c=od(c|0,a|0,C|0,-1,-1)|0;c|=0;return c|0}function lh(c,a,C,b){c|=0;a|=0;C|=0;c=od(c|0,a|0,C|0,0,-2147483648)|0;c|=0;return c|0}function Re(c){c|=0;return(32==(c|0)|5>(c+-9|0)>>>0)&1|0}function sb(){var p=0;c[9258]|0?(p=(mh()|0)+60|0,p=c[p>>2]|0):p=37308;return p|
0}function Bg(c){c|=0;for(var a=0,C=0,a=0;;){if((ea[51978+a>>0]|0)==(c|0)){C=2;break}a=a+1|0;if(87==(a|0)){a=87;c=52066;C=5;break}}2==(C|0)&&(a?(c=52066,C=5):c=52066);if(5==(C|0))for(;;){for(C=c;;)if(c=C+1|0,u[C>>0]|0)C=c;else break;a=a+-1|0;if(!a)break}return c|0}function nh(p,a,C){p|=0;C|=0;var b=0,l=0,g=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=n=0,z=0,S=0,I=0,ua=q=0,A=0,E=0,y=0,L=0,M=0,B=0,D=0,O=0,ua=0,O=F;F=F+512|0;L=O;switch(a|0){case 0:D=24;B=-149;I=4;break;case 1:D=53;B=-1074;I=4;break;
case 2:D=53;B=-1074;I=4;break;default:b=0}a:do if(4==(I|0)){A=p+4|0;ua=p+100|0;do a=c[A>>2]|0,a>>>0<(c[ua>>2]|0)>>>0?(c[A>>2]=a+1,a=ea[a>>0]|0):a=hb(p)|0;while(0!=(Re(a)|0));b:do switch(a|0){case 43:case 45:l=1-((45==(a|0)&1)<<1)|0;a=c[A>>2]|0;a>>>0<(c[ua>>2]|0)>>>0?(c[A>>2]=a+1,a=ea[a>>0]|0):a=hb(p)|0;M=l;break b;default:M=1}while(0);l=a;a=0;do{if((l|32)!=(u[53870+a>>0]|0))break;7>a>>>0&&(l=c[A>>2]|0,l>>>0<(c[ua>>2]|0)>>>0?(c[A>>2]=l+1,l=ea[l>>0]|0):l=hb(p)|0);a=a+1|0}while(8>a>>>0);b:do switch(a|
0){case 8:break;case 3:I=23;break;default:d=0!=(C|0);if(d&3<a>>>0){8!=(a|0)&&(I=23);break b}c:do if(!a){a=0;do{if((l|32)!=(u[56747+a>>0]|0))break c;2>a>>>0&&(l=c[A>>2]|0,l>>>0<(c[ua>>2]|0)>>>0?(c[A>>2]=l+1,l=ea[l>>0]|0):l=hb(p)|0);a=a+1|0}while(3>a>>>0)}while(0);switch(a|0){case 3:a=c[A>>2]|0;a>>>0<(c[ua>>2]|0)>>>0?(c[A>>2]=a+1,a=ea[a>>0]|0):a=hb(p)|0;if(40==(a|0))a=1;else{if(!(c[ua>>2]|0)){b=af;break a}c[A>>2]=(c[A>>2]|0)+-1;b=af;break a}for(;;){l=c[A>>2]|0;l>>>0<(c[ua>>2]|0)>>>0?(c[A>>2]=l+1,l=
ea[l>>0]|0):l=hb(p)|0;if(10>(l+-48|0)>>>0|26>(l+-65|0)>>>0?0:!(95==(l|0)|26>(l+-97|0)>>>0))break;a=a+1|0}if(41==(l|0)){b=af;break a}(l=0==(c[ua>>2]|0))||(c[A>>2]=(c[A>>2]|0)+-1);if(!d){D=sb()|0;c[D>>2]=22;id(p,0);b=0;break a}if(!a){b=af;break a}for(;;)if(a=a+-1|0,l||(c[A>>2]=(c[A>>2]|0)+-1),!a){b=af;break a}case 0:do if(48==(l|0))if(a=c[A>>2]|0,a>>>0<(c[ua>>2]|0)>>>0?(c[A>>2]=a+1,a=ea[a>>0]|0):a=hb(p)|0,120!=(a|32))c[ua>>2]|0&&(c[A>>2]=(c[A>>2]|0)+-1),a=48;else{a=c[A>>2]|0;a>>>0<(c[ua>>2]|0)>>>0?
(c[A>>2]=a+1,a=ea[a>>0]|0):a=hb(p)|0;d=0;c:for(;;){switch(a|0){case 46:I=74;break c;case 48:break;default:l=t=f=z=0;e=d;n=k=0;h=1;b=d=0;break c}a=c[A>>2]|0;a>>>0<(c[ua>>2]|0)>>>0?(c[A>>2]=a+1,a=ea[a>>0]|0):a=hb(p)|0;d=1}if(74==(I|0)){a=c[A>>2]|0;a>>>0<(c[ua>>2]|0)>>>0?(c[A>>2]=a+1,a=ea[a>>0]|0):a=hb(p)|0;if(48==(a|0)){l=d=0;do a=c[A>>2]|0,a>>>0<(c[ua>>2]|0)>>>0?(c[A>>2]=a+1,a=ea[a>>0]|0):a=hb(p)|0,d=Mb(d|0,l|0,-1,-1)|0,l=Fa;while(48==(a|0));f=z=0;t=d;e=1}else l=t=f=z=0,e=d;k=1;n=0;h=1;b=d=0}for(;;){r=
a+-48|0;m=a|32;if(10<=r>>>0){x=46==(a|0);if(!(x|6>(m+-97|0)>>>0)){m=t;r=z;break}if(x)if(k){m=t;r=z;a=46;break}else x=f,r=l=z,k=1,m=n,g=h;else I=86}else I=86;86==(I|0)&&(I=0,a=57<(a|0)?m+-87|0:r,0>(z|0)|0==(z|0)&8>f>>>0?(m=n,g=h,d=a+(d<<4)|0):0>(z|0)|0==(z|0)&14>f>>>0?(q=.0625*h,m=n,g=q,b+=q*+(a|0)):0!=(n|0)|0==(a|0)?(m=n,g=h):(m=1,g=h,b+=.5*h),f=Mb(f|0,z|0,1,0)|0,x=t,r=Fa,e=1);a=c[A>>2]|0;a>>>0<(c[ua>>2]|0)>>>0?(c[A>>2]=a+1,z=r,t=x,a=ea[a>>0]|0):(z=r,t=x,a=hb(p)|0);n=m;h=g}if(!e){(a=0==(c[ua>>2]|
0))||(c[A>>2]=(c[A>>2]|0)+-1);if(C){if(a?0:(S=c[A>>2]|0,c[A>>2]=S+-1,0!=(k|0)))c[A>>2]=S+-2}else id(p,0);b=0*+(M|0);break a}k=(e=0==(k|0))?f:m;e=e?r:l;if(0>(r|0)|0==(r|0)&8>f>>>0){l=r;do d<<=4,f=Mb(f|0,l|0,1,0)|0,l=Fa;while(0>(l|0)|0==(l|0)&8>f>>>0)}if(112==(a|32)){if(l=oh(p,C)|0,a=Fa,0==(l|0)&-2147483648==(a|0)){if(!C){id(p,0);b=0;break a}c[ua>>2]|0&&(c[A>>2]=(c[A>>2]|0)+-1);a=l=0}}else c[ua>>2]|0&&(c[A>>2]=(c[A>>2]|0)+-1),a=l=0;L=yb(k|0,e|0,2)|0;L=Mb(L|0,Fa|0,-32,-1)|0;a=Mb(L|0,Fa|0,l|0,a|0)|0;
l=Fa;if(!d){b=0*+(M|0);break a}if(0<(l|0)|0==(l|0)&a>>>0>(0-B|0)>>>0){D=sb()|0;c[D>>2]=34;b=Infinity*+(M|0);break a}L=B+-106|0;y=(0>(L|0))<<31>>31;if((l|0)<(y|0)|(l|0)==(y|0)&a>>>0<L>>>0){D=sb()|0;c[D>>2]=34;b=0*+(M|0);break a}if(-1<(d|0)){do y=!(.5<=b),L=y&1|d<<1,d=L^1,b+=y?b:b+-1,a=Mb(a|0,l|0,-1,-1)|0,l=Fa;while(-1<(L|0))}f=a;h=b;a=Ud(32,0,B|0,(0>(B|0))<<31>>31|0)|0;a=Mb(f|0,l|0,a|0,Fa|0)|0;B=Fa;0>(B|0)|0==(B|0)&D>>>0>a>>>0?0>(a|0)?(a=0,I=127):I=125:(a=D,I=125);125==(I|0)&&(53>(a|0)?I=127:(l=a,
g=+(M|0),b=0));127==(I|0)&&(b=+(M|0),l=a,g=b,b=+ph(+Gf(1,84-a|0),b));D=0==(d&1|0)&0!=h&32>(l|0);b=g*(D?0:h)+(b+g*+(((D&1)+d|0)>>>0))-b;0==b&&(D=sb()|0,c[D>>2]=34);b=+qh(b,f);break a}else a=l;while(0);E=B+D|0;y=0-E|0;d=0;c:for(;;){switch(a|0){case 46:I=138;break c;case 48:break;default:k=m=l=0;break c}a=c[A>>2]|0;a>>>0<(c[ua>>2]|0)>>>0?(c[A>>2]=a+1,a=ea[a>>0]|0):a=hb(p)|0;d=1}if(138==(I|0))if(a=c[A>>2]|0,a>>>0<(c[ua>>2]|0)>>>0?(c[A>>2]=a+1,a=ea[a>>0]|0):a=hb(p)|0,48==(a|0))for(a=l=0;;)if(l=Mb(l|0,
a|0,-1,-1)|0,d=Fa,a=c[A>>2]|0,a>>>0<(c[ua>>2]|0)>>>0?(c[A>>2]=a+1,a=ea[a>>0]|0):a=hb(p)|0,48==(a|0))a=d;else{m=d;k=d=1;break}else m=l=0,k=1;c[L>>2]=0;e=a+-48|0;f=46==(a|0);c:do if(f|10>e>>>0){q=L+496|0;x=z=0;n=f;I=m;r=d;S=k;k=f=d=0;d:for(;;){do if(n)if(S){m=I;a=z;e=x;break d}else l=z,m=x,S=1;else n=Mb(z|0,x|0,1,0)|0,x=Fa,t=48!=(a|0),125<=(f|0)?(t&&(c[q>>2]|=1),m=I,z=n):(m=L+(f<<2)|0,d&&(e=a+-48+(10*(c[m>>2]|0)|0)|0),c[m>>2]=e,d=d+1|0,e=9==(d|0),m=I,z=n,r=1,d=e?0:d,f=(e&1)+f|0,k=t?n:k);while(0);a=
c[A>>2]|0;a>>>0<(c[ua>>2]|0)>>>0?(c[A>>2]=a+1,a=ea[a>>0]|0):a=hb(p)|0;e=a+-48|0;n=46==(a|0);if(n|10>e>>>0)I=m;else{e=S;I=161;break c}}r=0!=(r|0);I=169}else x=z=0,r=d,e=k,k=f=d=0,I=161;while(0);do if(161==(I|0))if(l=(q=0==(e|0))?z:l,m=q?x:m,r=0!=(r|0),101==(a|32)&r){e=oh(p,C)|0;a=Fa;if(0==(e|0)&-2147483648==(a|0)){if(!C){id(p,0);b=0;break}c[ua>>2]|0&&(c[A>>2]=(c[A>>2]|0)+-1);a=e=0}l=Mb(e|0,a|0,l|0,m|0)|0;r=z;m=Fa;e=x;I=173}else-1<(a|0)?(a=z,e=x,I=169):(a=z,e=x,I=171);while(0);169==(I|0)&&(c[ua>>2]|
0?(c[A>>2]=(c[A>>2]|0)+-1,r?(r=a,I=173):I=172):I=171);171==(I|0)&&(r?(r=a,I=173):I=172);do if(172==(I|0))D=sb()|0,c[D>>2]=22,id(p,0),b=0;else if(173==(I|0))if(a=c[L>>2]|0)if((0>(e|0)|0==(e|0)&10>r>>>0)&(l|0)==(r|0)&(m|0)==(e|0)&&30<D>>>0|0==(a>>>D|0))b=+(M|0)*+(a>>>0);else if(p=(B|0)/-2|0,A=(0>(p|0))<<31>>31,(m|0)>(A|0)|(m|0)==(A|0)&l>>>0>p>>>0)D=sb()|0,c[D>>2]=34,b=Infinity*+(M|0);else if(p=B+-106|0,A=(0>(p|0))<<31>>31,(m|0)<(A|0)|(m|0)==(A|0)&l>>>0<p>>>0)D=sb()|0,c[D>>2]=34,b=0*+(M|0);else{if(d){if(9>
(d|0)){e=L+(f<<2)|0;a=c[e>>2]|0;do a=10*a|0,d=d+1|0;while(9!=(d|0));c[e>>2]=a}f=f+1|0}if(9>(k|0)&&(k|0)<=(l|0)&18>(l|0)){if(9==(l|0)){b=+(M|0)*+((c[L>>2]|0)>>>0);break}if(9>(l|0)){b=+(M|0)*+((c[L>>2]|0)>>>0)/+(c[37312+(8-l<<2)>>2]|0);break}p=D+27+(ia(l,-3)|0)|0;a=c[L>>2]|0;if(30<(p|0)|0==(a>>>p|0)){b=+(M|0)*+(a>>>0)*+(c[37312+(l+-10<<2)>>2]|0);break}}if(a=(l|0)%9|0){r=-1<(l|0)?a:a+9|0;e=c[37312+(8-r<<2)>>2]|0;if(f){k=1E9/(e|0)|0;m=a=d=0;do ua=L+(m<<2)|0,A=c[ua>>2]|0,p=((A>>>0)/(e>>>0)|0)+a|0,c[ua>>
2]=p,a=ia((A>>>0)%(e>>>0)|0,k)|0,p=(m|0)==(d|0)&0==(p|0),m=m+1|0,l=p?l+-9|0:l,d=p?m&127:d;while((m|0)!=(f|0));a&&(c[L+(f<<2)>>2]=a,f=f+1|0)}else f=d=0;a=0;l=9-r+l|0}else a=d=0;c:for(;;){x=18>(l|0);n=18==(l|0);t=L+(d<<2)|0;do{if(!x){if(!n)break c;if(9007199<=(c[t>>2]|0)>>>0){l=18;break c}}e=0;for(k=f+127|0;r=k&127,m=L+(r<<2)|0,k=yb(c[m>>2]|0,0,29)|0,k=Mb(k|0,Fa|0,e|0,0)|0,e=Fa,0<e>>>0|0==(e|0)&1E9<k>>>0?(p=pf(k|0,e|0,1E9,0)|0,k=bg(k|0,e|0,1E9,0)|0,e=p):e=0,c[m>>2]=k,p=(r|0)==(d|0),f=(r|0)!=(f+127&
127|0)|p?f:0==(k|0)?r:f,!p;)k=r+-1|0;a=a+-29|0}while(0==(e|0));d=d+127&127;(d|0)==(f|0)&&(p=f+127&127,f=L+((f+126&127)<<2)|0,c[f>>2]|=c[L+(p<<2)>>2],f=p);c[L+(d<<2)>>2]=e;l=l+9|0}c:for(;;){z=f+1&127;for(t=L+((f+127&127)<<2)|0;;){x=18==(l|0);n=27<(l|0)?9:1;for(r=x^1;;){k=d&127;m=(k|0)==(f|0);do if(m)I=219;else if(e=c[L+(k<<2)>>2]|0,9007199>e>>>0)I=219;else if(!(9007199<e>>>0))if(e=d+1&127,(e|0)==(f|0))I=219;else if(e=c[L+(e<<2)>>2]|0,254740991>e>>>0)I=219;else if(!(254740991<e>>>0|r)){l=k;break c}while(0);
if(219==(I|0)&&(I=0,x)){I=220;break c}a=a+n|0;if((d|0)==(f|0))d=f;else break}r=(1<<n)+-1|0;x=1E9>>>n;k=d;e=0;for(m=d;A=L+(m<<2)|0,p=c[A>>2]|0,d=(p>>>n)+e|0,c[A>>2]=d,e=ia(p&r,x)|0,d=(m|0)==(k|0)&0==(d|0),m=m+1&127,l=d?l+-9|0:l,d=d?m:k,(m|0)!=(f|0);)k=d;if(e){if((z|0)!=(d|0))break;c[t>>2]|=1}}c[L+(f<<2)>>2]=e;f=z}220==(I|0)&&(m?(c[L+(z+-1<<2)>>2]=0,l=f,f=z):l=k);b=+((c[L+(l<<2)>>2]|0)>>>0);l=d+1&127;(l|0)==(f|0)&&(f=d+2&127,c[L+(f+-1<<2)>>2]=0);q=+(M|0);g=q*(1E9*b+ +((c[L+(l<<2)>>2]|0)>>>0));x=a+53|
0;m=x-B|0;r=(m|0)<(D|0);l=r&1;k=r?0>(m|0)?0:m:D;53>(k|0)?(ua=+ph(+Gf(1,105-k|0),g),h=+rh(g,+Gf(1,53-k|0)),n=ua,b=h,h=ua+(g-h)):(b=n=0,h=g);e=d+2&127;if((e|0)==(f|0))g=b;else{e=c[L+(e<<2)>>2]|0;if(5E8<=e>>>0)b=5E8<e>>>0?.75*q+b:(d+3&127|0)==(f|0)?.5*q+b:.75*q+b;else if(0!=(e|0)||(d+3&127|0)!=(f|0))b=.25*q+b;g=1>=(53-k|0)?b:0!=+rh(b,1)?b:b+1}b=h+g-n;(x&2147483647|0)>(-2-E|0)&&(9007199254740992<=+ki(+b)&&(l=r&(k|0)==(m|0)?0:l,a=a+1|0,b*=.5),!((a+50|0)<=(y|0))||0!=g&0!=(l|0))&&(D=sb()|0,c[D>>2]=34);b=
+qh(b,a)}else b=0*+(M|0);while(0);break a;default:c[ua>>2]|0&&(c[A>>2]=(c[A>>2]|0)+-1);D=sb()|0;c[D>>2]=22;id(p,0);b=0;break a}}while(0);if(23==(I|0)&&((l=0==(c[ua>>2]|0))||(c[A>>2]=(c[A>>2]|0)+-1),0!=(C|0)&3<a>>>0)){do l||(c[A>>2]=(c[A>>2]|0)+-1),a=a+-1|0;while(3<a>>>0)}b=+(M|0)*li}while(0);F=O;return+b}function Fg(p,a,C,b,l){p|=0;a|=0;C|=0;b|=0;l|=0;var g=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,q=0,r=0;a:do if(36<a>>>0)l=sb()|0,c[l>>2]=22,b=l=0;else{r=p+4|0;q=p+100|0;do g=c[r>>2]|0,g>>>0<(c[q>>2]|0)>>>0?
(c[r>>2]=g+1,g=ea[g>>0]|0):g=hb(p)|0;while(0!=(Re(g)|0));b:do switch(g|0){case 43:case 45:d=(45==(g|0))<<31>>31;g=c[r>>2]|0;g>>>0<(c[q>>2]|0)>>>0?(c[r>>2]=g+1,g=ea[g>>0]|0):g=hb(p)|0;n=d;break b;default:n=0}while(0);d=0==(a|0);do if(0==(a&-17|0)&48==(g|0))if(g=c[r>>2]|0,g>>>0<(c[q>>2]|0)>>>0?(c[r>>2]=g+1,g=ea[g>>0]|0):g=hb(p)|0,120!=(g|32))d?(a=8,k=46):k=32;else if(a=c[r>>2]|0,a>>>0<(c[q>>2]|0)>>>0?(c[r>>2]=a+1,g=ea[a>>0]|0):g=hb(p)|0,15<(ea[53879+(g+1)>>0]|0)){(b=0==(c[q>>2]|0))||(c[r>>2]=(c[r>>
2]|0)+-1);if(!C){id(p,0);b=l=0;break a}if(b){b=l=0;break a}c[r>>2]=(c[r>>2]|0)+-1;b=l=0;break a}else a=16,k=46;else if(a=d?10:a,(ea[53879+(g+1)>>0]|0)>>>0<a>>>0)k=32;else{c[q>>2]|0&&(c[r>>2]=(c[r>>2]|0)+-1);id(p,0);l=sb()|0;c[l>>2]=22;b=l=0;break a}while(0);if(32==(k|0))if(10==(a|0)){a=g+-48|0;if(10>a>>>0)for(g=0;;)if(d=(10*g|0)+a|0,a=c[r>>2]|0,a>>>0<(c[q>>2]|0)>>>0?(c[r>>2]=a+1,g=ea[a>>0]|0):g=hb(p)|0,a=g+-48|0,10>a>>>0&429496729>d>>>0)g=d;else{a=d;break}else a=0;d=0;C=g+-48|0;if(10>C>>>0){for(;;){f=
Ne(a|0,d|0,10,0)|0;h=Fa;e=(0>(C|0))<<31>>31;m=~e;if(h>>>0>m>>>0|(h|0)==(m|0)&f>>>0>~C>>>0){f=a;break}a=Mb(f|0,h|0,C|0,e|0)|0;d=Fa;g=c[r>>2]|0;g>>>0<(c[q>>2]|0)>>>0?(c[r>>2]=g+1,g=ea[g>>0]|0):g=hb(p)|0;C=g+-48|0;if(!(10>C>>>0&(429496729>d>>>0|429496729==(d|0)&2576980378>a>>>0))){f=a;break}}9<C>>>0?(g=f,a=n):(a=10,k=72)}else g=a,a=n}else k=46;b:do if(46==(k|0)){if(!(a+-1&a)){k=u[54136+((23*a|0)>>>5&7)>>0]|0;d=u[53879+(g+1)>>0]|0;C=d&255;if(C>>>0<a>>>0){for(g=0;;)if(f=C|g<<k,g=c[r>>2]|0,g>>>0<(c[q>>
2]|0)>>>0?(c[r>>2]=g+1,g=ea[g>>0]|0):g=hb(p)|0,d=u[53879+(g+1)>>0]|0,C=d&255,134217728>f>>>0&C>>>0<a>>>0)g=f;else break;C=0}else f=C=0;h=ie(-1,-1,k|0)|0;e=Fa;if((d&255)>>>0>=a>>>0|C>>>0>e>>>0|(C|0)==(e|0)&f>>>0>h>>>0){d=C;k=72;break}else g=C;for(;;)if(f=yb(f|0,g|0,k|0)|0,C=Fa,f|=d&255,g=c[r>>2]|0,g>>>0<(c[q>>2]|0)>>>0?(c[r>>2]=g+1,g=ea[g>>0]|0):g=hb(p)|0,d=u[53879+(g+1)>>0]|0,(d&255)>>>0>=a>>>0|C>>>0>e>>>0|(C|0)==(e|0)&f>>>0>h>>>0){d=C;k=72;break b}else g=C}d=u[53879+(g+1)>>0]|0;C=d&255;if(C>>>0<
a>>>0)for(g=0;;)if(f=C+(ia(g,a)|0)|0,g=c[r>>2]|0,g>>>0<(c[q>>2]|0)>>>0?(c[r>>2]=g+1,g=ea[g>>0]|0):g=hb(p)|0,d=u[53879+(g+1)>>0]|0,C=d&255,119304647>f>>>0&C>>>0<a>>>0)g=f;else break;else f=0;C=0;if((d&255)>>>0<a>>>0)for(k=pf(-1,-1,a|0,0)|0,m=Fa,e=C;;){if(e>>>0>m>>>0|(e|0)==(m|0)&f>>>0>k>>>0){d=e;k=72;break b}C=Ne(f|0,e|0,a|0,0)|0;h=Fa;d&=255;if(4294967295<h>>>0|-1==(h|0)&C>>>0>~d>>>0){d=e;k=72;break b}f=Mb(d|0,0,C|0,h|0)|0;C=Fa;g=c[r>>2]|0;g>>>0<(c[q>>2]|0)>>>0?(c[r>>2]=g+1,g=ea[g>>0]|0):g=hb(p)|0;
d=u[53879+(g+1)>>0]|0;if((d&255)>>>0>=a>>>0){d=C;k=72;break}else e=C}else d=C,k=72}while(0);if(72==(k|0))if((ea[53879+(g+1)>>0]|0)>>>0<a>>>0){do g=c[r>>2]|0,g>>>0<(c[q>>2]|0)>>>0?(c[r>>2]=g+1,g=ea[g>>0]|0):g=hb(p)|0;while((ea[53879+(g+1)>>0]|0)>>>0<a>>>0);d=sb()|0;c[d>>2]=34;d=l;g=b;a=0==(b&1|0)&1?n:0}else g=f,a=n;c[q>>2]|0&&(c[r>>2]=(c[r>>2]|0)+-1);if(!(d>>>0<l>>>0|(d|0)==(l|0)&g>>>0<b>>>0)){if(!(0!=(b&1|0)|0|0!=(a|0))){r=sb()|0;c[r>>2]=34;b=Mb(b|0,l|0,-1,-1)|0;l=Fa;break}if(d>>>0>l>>>0|(d|0)==(l|
0)&g>>>0>b>>>0){r=sb()|0;c[r>>2]=34;break}}b=(0>(a|0))<<31>>31;b=Ud(g^a|0,d^b|0,a|0,b|0)|0;l=Fa}while(0);Fa=l;return b|0}function id(p,a){p|=0;a|=0;var b=0,g=0,l=0;c[p+104>>2]=a;b=c[p+4>>2]|0;g=c[p+8>>2]|0;l=g-b|0;c[p+108>>2]=l;c[p+100>>2]=0!=(a|0)&(l|0)>(a|0)?b+a:g}function hb(p){p|=0;var a=0,b=0,g=0,l=0,d=0,f=0,b=p+104|0,d=c[b>>2]|0;0!=(d|0)&&(c[p+108>>2]|0)>=(d|0)?f=4:(a=sh(p)|0,0<=(a|0)?(l=c[b>>2]|0,b=p+8|0,l?(g=c[b>>2]|0,d=c[p+4>>2]|0,b=g,l=l-(c[p+108>>2]|0)+-1|0,(b-d|0)>(l|0)?c[p+100>>2]=d+
l:f=9):(b=g=c[b>>2]|0,f=9),9==(f|0)&&(c[p+100>>2]=b),b=c[p+4>>2]|0,g&&(p=p+108|0,c[p>>2]=g+1-b+(c[p>>2]|0)),b=b+-1|0,(ea[b>>0]|0)!=(a|0)&&(u[b>>0]=a)):f=4);4==(f|0)&&(c[p+100>>2]=0,a=-1);return a|0}function Se(p){p|=0;var a=0;4294963200<p>>>0&&(a=sb()|0,c[a>>2]=0-p,p=-1);return p|0}function md(p){p|=0;var a=0,b=0,a=(mh()|0)+176|0,b=c[a>>2]|0;p&&(c[a>>2]=p);return b|0}function ph(p,a){var b=+p,g=+a,l=0,d=0;eb[pb>>3]=+b;d=c[pb>>2]|0;l=c[pb+4>>2]|0;eb[pb>>3]=+g;l=c[pb+4>>2]&-2147483648|l&2147483647;
c[pb>>2]=d;c[pb+4>>2]=l;return+ + + +eb[pb>>3]}function rh(p,a){var b;a:{b=+p;var g=+a;b=+b;var g=+g,l=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,u=0,q=0,r=0,x=0;eb[pb>>3]=b;l=c[pb>>2]|0;n=c[pb+4>>2]|0;eb[pb>>3]=g;u=c[pb>>2]|0;q=c[pb+4>>2]|0;d=ie(l|0,n|0,52)|0;d&=2047;k=ie(u|0,q|0,52)|0;k&=2047;r=n&-2147483648;e=yb(u|0,q|0,1)|0;m=Fa;b:do if(0==(e|0)&0==(m|0)||(h=q&2147483647,2146435072<h>>>0|2146435072==(h|0)&0<u>>>0|2047==(d|0)))x=3;else{f=yb(l|0,n|0,1)|0;h=Fa;if(!(h>>>0>m>>>0|(h|0)==(m|0)&f>>>0>e>>>0)){b=+((f|
0)==(e|0)&(h|0)==(m|0)?0*b:b);break a}if(d)f=n&1048575|1048576;else{d=yb(l|0,n|0,12)|0;f=Fa;if(-1<(f|0)|-1==(f|0)&4294967295<d>>>0){h=d;d=0;do d=d+-1|0,h=yb(h|0,f|0,1)|0,f=Fa;while(-1<(f|0)|-1==(f|0)&4294967295<h>>>0)}else d=0;l=yb(l|0,n|0,1-d|0)|0;f=Fa}if(k)n=q&1048575|1048576;else{h=yb(u|0,q|0,12)|0;e=Fa;if(-1<(e|0)|-1==(e|0)&4294967295<h>>>0){k=0;do k=k+-1|0,h=yb(h|0,e|0,1)|0,e=Fa;while(-1<(e|0)|-1==(e|0)&4294967295<h>>>0)}else k=0;u=yb(u|0,q|0,1-k|0)|0;n=Fa}m=Ud(l|0,f|0,u|0,n|0)|0;e=Fa;h=-1<(e|
0)|-1==(e|0)&4294967295<m>>>0;c:do if((d|0)>(k|0)){for(;;){if(h)if((l|0)==(u|0)&(f|0)==(n|0))break;else l=m,f=e;l=yb(l|0,f|0,1)|0;f=Fa;d=d+-1|0;m=Ud(l|0,f|0,u|0,n|0)|0;e=Fa;h=-1<(e|0)|-1==(e|0)&4294967295<m>>>0;if((d|0)<=(k|0))break c}g=0*b;break b}while(0);if(h)if((l|0)==(u|0)&(f|0)==(n|0)){g=0*b;break}else f=e,l=m;if(1048576>f>>>0|1048576==(f|0)&0>l>>>0){do l=yb(l|0,f|0,1)|0,f=Fa,d=d+-1|0;while(1048576>f>>>0|1048576==(f|0)&0>l>>>0)}0<(d|0)?(q=Mb(l|0,f|0,0,-1048576)|0,l=Fa,d=yb(d|0,0,52)|0,l|=Fa,
d|=q):(d=ie(l|0,f|0,1-d|0)|0,l=Fa);c[pb>>2]=d;c[pb+4>>2]=l|r;g=+eb[pb>>3]}while(0);3==(x|0)&&(g*=b,g/=g);b=+g}return+ +b}function Cg(p,a){p=+p;a|=0;var b=0,g=0,l=0;eb[pb>>3]=p;b=c[pb>>2]|0;g=c[pb+4>>2]|0;l=ie(b|0,g|0,52)|0;l&=2047;switch(l|0){case 0:0!=p?(p=+Cg(1.8446744073709552E19*p,a),b=(c[a>>2]|0)+-64|0):b=0;c[a>>2]=b;break;case 2047:break;default:c[a>>2]=l+-1022,c[pb>>2]=b,c[pb+4>>2]=g&-2146435073|1071644672,p=+eb[pb>>3]}return+p}function Gf(p,a){p=+p;a|=0;var b=0;1023<(a|0)?(p*=8.98846567431158E307,
b=a+-1023|0,1023<(b|0)&&(b=a+-2046|0,b=1023<(b|0)?1023:b,p*=8.98846567431158E307)):-1022>(a|0)?(p*=2.2250738585072014E-308,b=a+1022|0,-1022>(b|0)&&(b=a+2044|0,b=-1022>(b|0)?-1022:b,p*=2.2250738585072014E-308)):b=a;b=yb(b+1023|0,0,52)|0;a=Fa;c[pb>>2]=b;c[pb+4>>2]=a;return+(p*+eb[pb>>3])}function qh(c,a){return+ +Gf(+c,a|0)}function Hf(p,a,b,g){p|=0;a|=0;b|=0;g|=0;var l=0,d=0,f=0,h=0,e=0,k=0,e=F;F=F+16|0;l=e;f=0==(g|0)?37348:g;g=c[f>>2]|0;a:do if(a){d=0==(p|0)?l:p;if(b){if(g)l=b,h=9;else{g=u[a>>0]|
0;l=g&255;if(-1<g<<24>>24){c[d>>2]=l;g=0!=g<<24>>24&1;break}g=l+-194|0;if(50<g>>>0){h=15;break}g=c[37076+(g<<2)>>2]|0;if(l=b+-1|0)a=a+1|0,h=9}b:do if(9==(h|0)){p=u[a>>0]|0;k=(p&255)>>>3;if(7<(k+-16|k+(g>>26))>>>0){h=15;break a}for(;;){a=a+1|0;g=(p&255)+-128|g<<6;l=l+-1|0;if(0<=(g|0))break;if(!l)break b;p=u[a>>0]|0;if(-128!=(p&-64)<<24>>24){h=15;break a}}c[f>>2]=0;c[d>>2]=g;g=b-l|0;break a}while(0);c[f>>2]=g}g=-2}else g?h=15:g=0;while(0);15==(h|0)&&(c[f>>2]=0,g=sb()|0,c[g>>2]=84,g=-1);F=e;return g|
0}function th(p,a,b,g){p|=0;a|=0;b|=0;g|=0;var l=0,d=0,f=0,h=0,e=0,k=0,l=c[a>>2]|0;0!=(g|0)&&(d=c[g>>2]|0,0!=(d|0))?p?(c[g>>2]=0,e=p,g=b,h=d,k=37):(g=b,f=l,k=16):p?(d=p,g=b,k=6):(g=b,k=7);a:for(;;)if(6==(k|0)){if(g)p=d;else{k=26;break}for(;;){d=u[l>>0]|0;do if(127>((d&255)+-1|0)>>>0&&4<g>>>0&0==(l&3|0)){for(f=l;;){l=c[f>>2]|0;if((l+-16843009|l)&-2139062144){d=l;l=f;k=32;break}c[p>>2]=l&255;c[p+4>>2]=ea[f+1>>0];c[p+8>>2]=ea[f+2>>0];l=f+4|0;d=p+16|0;c[p+12>>2]=ea[f+3>>0];g=g+-4|0;if(4<g>>>0)p=d,f=l;
else{k=31;break}}31==(k|0)?(p=d,d=u[l>>0]|0):32==(k|0)&&(d&=255)}while(0);d&=255;if(127<=(d+-1|0)>>>0)break;l=l+1|0;c[p>>2]=d;if(g=g+-1|0)p=p+4|0;else{k=26;break a}}d=d+-194|0;if(50<d>>>0){k=48;break}e=p;h=c[37076+(d<<2)>>2]|0;l=l+1|0;k=37}else if(7==(k|0)){d=u[l>>0]|0;if(127>((d&255)+-1|0)>>>0&&0==(l&3|0)){d=c[l>>2]|0;if(!((d+-16843009|d)&-2139062144)){do l=l+4|0,g=g+-4|0,d=c[l>>2]|0;while(0==((d+-16843009|d)&-2139062144|0))}d&=255}d&=255;if(127>(d+-1|0)>>>0)g=g+-1|0,l=l+1|0,k=7;else{d=d+-194|0;
if(50<d>>>0){k=48;break}d=c[37076+(d<<2)>>2]|0;f=l+1|0;k=16}}else if(16==(k|0)){k=(ea[f>>0]|0)>>>3;if(7<(k+-16|k+(d>>26))>>>0){k=17;break}l=f+1|0;if(d&33554432){if(-128!=(u[l>>0]&-64)<<24>>24){k=20;break}l=f+2|0;if(d&524288){if(-128!=(u[l>>0]&-64)<<24>>24){k=23;break}l=f+3|0}}g=g+-1|0;k=7}else if(37==(k|0)){d=ea[l>>0]|0;k=d>>>3;if(7<(k+-16|k+(h>>26))>>>0){k=38;break}f=l+1|0;p=d+-128|h<<6;if(0>(p|0)){d=ea[f>>0]|0;if(128!=(d&192|0)){k=41;break}f=l+2|0;p=d+-128|p<<6;if(0>(p|0)){d=ea[f>>0]|0;if(128!=
(d&192|0)){k=44;break}p=d+-128|p<<6;l=l+3|0}else l=f}else l=f;c[e>>2]=p;d=e+4|0;g=g+-1|0;k=6}17==(k|0)?(l=f+-1|0,k=47):20==(k|0)?(l=f+-1|0,k=47):23==(k|0)?(l=f+-1|0,k=47):26==(k|0)?c[a>>2]=l:38==(k|0)?(p=e,d=h,l=l+-1|0,k=47):41==(k|0)?(g=e,b=l+-1|0,k=52):44==(k|0)&&(g=e,b=l+-1|0,k=52);47==(k|0)&&(d?(g=p,b=l,k=52):k=48);48==(k|0)&&(u[l>>0]|0?(g=p,b=l,k=52):(p&&(c[p>>2]=0,c[a>>2]=0),b=b-g|0));52==(k|0)&&(k=sb()|0,c[k>>2]=84,g&&(c[a>>2]=b),b=-1);return b|0}function ze(p,a,b){p|=0;a|=0;p?128>a>>>0?(u[p>>
0]=a,p=1):2048>a>>>0?(u[p>>0]=a>>>6|192,u[p+1>>0]=a&63|128,p=2):55296>a>>>0|57344==(a&-8192|0)?(u[p>>0]=a>>>12|224,u[p+1>>0]=a>>>6&63|128,u[p+2>>0]=a&63|128,p=3):1048576>(a+-65536|0)>>>0?(u[p>>0]=a>>>18|240,u[p+1>>0]=a>>>12&63|128,u[p+2>>0]=a>>>6&63|128,u[p+3>>0]=a&63|128,p=4):(p=sb()|0,c[p>>2]=84,p=-1):p=1;return p|0}function Eg(c,a){c=(c|=0)?ze(c,a|0,0)|0:0;return c|0}function uh(p,a,b){p|=0;b|=0;var g=0,l=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,u=0,q=0,r=0,r=F;F=F+48|0;n=r+16|0;m=r;g=r+32|0;u=p+28|0;l=c[u>>
2]|0;c[g>>2]=l;q=p+20|0;l=(c[q>>2]|0)-l|0;c[g+4>>2]=l;c[g+8>>2]=a|0;c[g+12>>2]=b;e=p+60|0;k=p+44|0;a=2;for(l=l+b|0;;){c[9258]|0?(vh(186,p|0),c[m>>2]=c[e>>2],c[m+4>>2]=g,c[m+8>>2]=a,f=Se(wh(146,m|0)|0)|0,xh(0)):(c[n>>2]=c[e>>2],c[n+4>>2]=g,c[n+8>>2]=a,f=Se(wh(146,n|0)|0)|0);if((l|0)==(f|0)){l=6;break}if(0>(f|0)){l=8;break}l=l-f|0;d=c[g+4>>2]|0;f>>>0<=d>>>0?2==(a|0)?(c[u>>2]=(c[u>>2]|0)+f,h=d,a=2):h=d:(h=c[k>>2]|0,c[u>>2]=h,c[q>>2]=h,h=c[g+12>>2]|0,f=f-d|0,g=g+8|0,a=a+-1|0);c[g>>2]=(c[g>>2]|0)+f;c[g+
4>>2]=h-f}6==(l|0)?(n=c[k>>2]|0,c[p+16>>2]=n+(c[p+48>>2]|0),p=n,c[u>>2]=p,c[q>>2]=p):8==(l|0)&&(c[p+16>>2]=0,c[u>>2]=0,c[q>>2]=0,c[p>>2]|=32,b=2==(a|0)?0:b-(c[g+4>>2]|0)|0);F=r;return b|0}function yh(p){p|=0;var a=0,b=0,a=p+74|0,b=u[a>>0]|0;u[a>>0]=b+255|b;a=p+20|0;b=p+44|0;(c[a>>2]|0)>>>0>(c[b>>2]|0)>>>0&&cb[c[p+36>>2]&63](p,0,0)|0;c[p+16>>2]=0;c[p+28>>2]=0;c[a>>2]=0;a=c[p>>2]|0;a&20?(a&4&&(c[p>>2]=a|32),a=-1):(a=c[b>>2]|0,c[p+8>>2]=a,c[p+4>>2]=a,a=0);return a|0}function fh(p){p|=0;var a=0,b=0,a=
p+74|0,b=u[a>>0]|0;u[a>>0]=b+255|b;a=c[p>>2]|0;a&8?(c[p>>2]=a|32,a=-1):(c[p+8>>2]=0,c[p+4>>2]=0,a=c[p+44>>2]|0,c[p+28>>2]=a,c[p+20>>2]=a,c[p+16>>2]=a+(c[p+48>>2]|0),a=0);return a|0}function sh(p){p|=0;var a=0,b=0,b=F;F=F+16|0;a=b;a=0==(c[p+8>>2]|0)&&0!=(yh(p)|0)?-1:1==(cb[c[p+32>>2]&63](p,a,1)|0)?ea[a>>0]|0:-1;F=b;return a|0}function pg(p){p|=0;var a=0;if(p)a=zh(p)|0;else{a=c[9323]|0?pg(c[9323]|0)|0:0;mi(37060);if(p=c[9264]|0){do(c[p+20>>2]|0)>>>0>(c[p+28>>2]|0)>>>0&&(a|=zh(p)|0),p=c[p+56>>2]|0;while(0!=
(p|0))}ni(37060)}return a|0}function sc(p,a,b){p|=0;a|=0;b|=0;var g=0,l=0,d=0,f=0,g=b+16|0;(l=c[g>>2]|0)?d=4:fh(b)|0?g=0:(l=c[g>>2]|0,d=4);a:do if(4==(d|0))if(f=b+20|0,d=c[f>>2]|0,(l-d|0)>>>0<a>>>0)g=cb[c[b+36>>2]&63](b,p,a)|0;else{b:do if(-1<(u[b+75>>0]|0)){for(g=a;;){if(!g){l=d;g=0;break b}l=g+-1|0;if(10==(u[p+l>>0]|0))break;else g=l}if((cb[c[b+36>>2]&63](b,p,g)|0)>>>0<g>>>0)break a;a=a-g|0;p=p+g|0;l=c[f>>2]|0}else l=d,g=0;while(0);gb(l|0,p|0,a|0)|0;c[f>>2]=(c[f>>2]|0)+a;g=g+a|0}while(0);return g|
0}function Qd(c,a,b,g){c|=0;a|=0;b|=0;g|=0;var l=0,l=ia(b,a)|0;c=sc(c,l,g)|0;(c|0)!=(l|0)&&(b=(c>>>0)/(a>>>0)|0);return b|0}function qf(p){p|=0;var a=0,b=0,a=p+4|0,b=c[a>>2]|0;b>>>0<(c[p+8>>2]|0)>>>0?(c[a>>2]=b+1,a=ea[b>>0]|0):a=sh(p)|0;return a|0}function Ah(p,a,b,g){var l=0,d=0,l=F;F=F+16|0;d=l;c[d>>2]=g|0;g=wf(p|0,a|0,b|0,d)|0;F=l;return g|0}function Bh(p,a,b){var g=0,l=0,g=F;F=F+16|0;l=g;c[l>>2]=b|0;b=Ch(p|0,a|0,l)|0;F=g;return b|0}function rf(p,a){p|=0;a|=0;var b=0,g=0,l=0;if(-1!=(p|0)){if(0!=
(c[a+8>>2]|0)||0==(yh(a)|0))l=6;6==(l|0)&&(b=a+4|0,g=c[b>>2]|0,g>>>0>((c[a+44>>2]|0)+-8|0)>>>0)?(l=g+-1|0,c[b>>2]=l,u[l>>0]=p,c[a>>2]&=-17):p=-1}else p=-1;return p|0}function eh(p,a,b){p|=0;a|=0;var g=0,l=0,d=0,f=0,h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,x=F;F=F+224|0;m=x+80|0;r=x+96|0;q=x;n=x+136|0;g=r;l=g+40|0;do c[g>>2]=0,g=g+4|0;while((g|0)<(l|0));c[m>>2]=c[(b|0)>>2];0>(ld(0,a,m,q,r)|0)?b=-1:(b=c[p>>2]|0,k=b&32,1>(u[p+74>>0]|0)&&(c[p>>2]=b&-33),b=p+48|0,c[b>>2]|0?g=ld(p,a,m,q,r)|0:(l=p+44|0,d=c[l>>2]|
0,c[l>>2]=n,f=p+28|0,c[f>>2]=n,h=p+20|0,c[h>>2]=n,c[b>>2]=80,e=p+16|0,c[e>>2]=n+80,g=ld(p,a,m,q,r)|0,d&&(cb[c[p+36>>2]&63](p,0,0)|0,g=0==(c[h>>2]|0)?-1:g,c[l>>2]=d,c[b>>2]=0,c[e>>2]=0,c[f>>2]=0,c[h>>2]=0)),b=c[p>>2]|0,c[p>>2]=b|k,b=0==(b&32|0)?g:-1);F=x;return b|0}function wf(p,a,b,g){p|=0;a|=0;b|=0;g|=0;var l=0,d=0,f=0,h=0,e=0,k=0,m=0,m=F;F=F+128|0;l=m+112|0;d=k=m;f=37352;h=d+112|0;do c[d>>2]=c[f>>2],d=d+4|0,f=f+4|0;while((d|0)<(h|0));2147483646<(a+-1|0)>>>0?a?(a=sb()|0,c[a>>2]=75,a=-1):(a=1,e=4):
(l=p,e=4);4==(e|0)&&(e=-2-l|0,e=a>>>0>e>>>0?e:a,c[k+48>>2]=e,p=k+20|0,c[p>>2]=l,c[k+44>>2]=l,a=l+e|0,l=k+16|0,c[l>>2]=a,c[k+28>>2]=a,a=eh(k,b,g)|0,e&&(b=c[p>>2]|0,u[b+(((b|0)==(c[l>>2]|0))<<31>>31)>>0]=0));F=m;return a|0}function Ch(p,a,b){p|=0;var g=0,l=0,d=0,f=0,d=F;F=F+112|0;l=g=d;f=l+112|0;do c[l>>2]=0,l=l+4|0;while((l|0)<(f|0));c[g+32>>2]=29;c[g+44>>2]=p;c[g+76>>2]=-1;c[g+84>>2]=p;p=a|0;b|=0;g|=0;p|=0;b|=0;var h=f=l=a=0,e=0,k=0,m=0,n=0,q=k=0,r=0,x=0,t=0,z=0,A=0,S=0,I=0,ua=0,E=0,L=0,y=0,M=0,D=
0,B=0,O=0,J=0,G=0,w=0,P=0,Y=0,la=0,Y=F;F=F+304|0;D=Y+16|0;O=Y+8|0;B=Y+33|0;J=Y;A=Y+32|0;a=u[p>>0]|0;a:do if(a<<24>>24){G=g+4|0;w=g+100|0;M=g+108|0;S=g+8|0;I=B+10|0;ua=B+33|0;E=O+4|0;L=B+46|0;y=B+94|0;f=a;a=0;h=p;p=l=k=0;b:for(;;){c:do if(Re(f&255)|0){for(;;)if(f=h+1|0,Re(ea[f>>0]|0)|0)h=f;else break;id(g,0);do f=c[G>>2]|0,f>>>0<(c[w>>2]|0)>>>0?(c[G>>2]=f+1,f=ea[f>>0]|0):f=hb(g)|0;while(0!=(Re(f)|0));f=c[G>>2]|0;c[w>>2]|0&&(f=f+-1|0,c[G>>2]=f);e=(c[M>>2]|0)+k+f-(c[S>>2]|0)|0}else{f=37==(u[h>>0]|0);
d:do if(f){m=h+1|0;e=u[m>>0]|0;e:do switch(e<<24>>24){case 37:break d;case 42:z=0;e=h+2|0;break;default:e=(e&255)+-48|0;if(10>e>>>0&&36==(u[h+2>>0]|0)){for(c[D>>2]=c[b>>2];;)if(z=(c[D>>2]|0)+3&-4,f=c[z>>2]|0,c[D>>2]=z+4,1<e>>>0)e=e+-1|0;else break;z=f;e=h+3|0;break e}e=(c[b>>2]|0)+3&-4;z=c[e>>2]|0;c[b>>2]=e+4;e=m}while(0);f=u[e>>0]|0;h=f&255;if(10>(h+-48|0)>>>0)for(f=0;!(m=(10*f|0)+-48+h|0,e=e+1|0,f=u[e>>0]|0,h=f&255,10<=(h+-48|0)>>>0);)f=m;else m=0;109==f<<24>>24?(e=e+1|0,n=u[e>>0]|0,f=0!=(z|0)&
1,p=l=0):(n=f,f=0);h=e+1|0;switch(n&255|0){case 104:h=(t=104==(u[h>>0]|0))?e+2|0:h;e=t?-2:-1;break;case 108:h=(t=108==(u[h>>0]|0))?e+2|0:h;e=t?3:1;break;case 106:e=3;break;case 116:case 122:e=1;break;case 76:e=2;break;case 110:case 112:case 67:case 83:case 91:case 99:case 115:case 88:case 71:case 70:case 69:case 65:case 103:case 102:case 101:case 97:case 120:case 117:case 111:case 105:case 100:h=e;e=0;break;default:P=152;break b}n=ea[h>>0]|0;n=(q=3==(n&47|0))?n|32:n;q=q?1:e;switch(n|0){case 99:t=
k;x=1>(m|0)?1:m;break;case 91:t=k;x=m;break;case 110:if(!z){e=k;break c}switch(q|0){case -2:e=u[z>>0]=k;break c;case -1:e=R[z>>1]=k;break c;case 0:e=c[z>>2]=k;break c;case 1:e=c[z>>2]=k;break c;case 3:e=z;c[e>>2]=k;c[e+4>>2]=(0>(k|0))<<31>>31;e=k;break c;default:e=k;break c}default:id(g,0);do e=c[G>>2]|0,e>>>0<(c[w>>2]|0)>>>0?(c[G>>2]=e+1,e=ea[e>>0]|0):e=hb(g)|0;while(0!=(Re(e)|0));e=c[G>>2]|0;c[w>>2]|0&&(e=e+-1|0,c[G>>2]=e);t=(c[M>>2]|0)+k+e-(c[S>>2]|0)|0;x=m}id(g,x);e=c[G>>2]|0;m=c[w>>2]|0;if(e>>>
0<m>>>0)c[G>>2]=e+1;else{if(0>(hb(g)|0)){P=152;break b}m=c[w>>2]|0}m&&(c[G>>2]=(c[G>>2]|0)+-1);e:do switch(n|0){case 91:case 99:case 115:r=99==(n|0);f:do if(99==(n&239|0))Za(B|0,-1,257)|0,u[B>>0]=0,115==(n|0)&&(u[ua>>0]=0,u[I>>0]=0,u[I+1>>0]=0,u[I+2>>0]=0,u[I+3>>0]=0,u[I+4>>0]=0);else{la=h+1|0;k=94==(u[la>>0]|0);e=k&1;n=k?la:h;h=k?h+2|0:la;Za(B|0,k&1|0,257)|0;u[B>>0]=0;switch(u[h>>0]|0){case 45:k=(e^1)&255;u[L>>0]=k;h=n+2|0;break;case 93:k=(e^1)&255;u[y>>0]=k;h=n+2|0;break;default:k=(e^1)&255}for(;;){e=
u[h>>0]|0;g:do switch(e<<24>>24){case 0:P=152;break b;case 93:break f;case 45:n=h+1|0;e=u[n>>0]|0;switch(e<<24>>24){case 93:case 0:e=45;break g}h=u[h+-1>>0]|0;if((h&255)<(e&255)){h&=255;do h=h+1|0,u[B+h>>0]=k,e=u[n>>0]|0;while((h|0)<(e&255|0))}h=n}while(0);u[B+((e&255)+1)>>0]=k;h=h+1|0}}while(0);n=r?x+1|0:31;k=1==(q|0);q=0!=(f|0);f:do if(k){if(q){if(p=Ub(n<<2)|0,!p){l=0;P=152;break b}}else p=z;c[O>>2]=0;l=c[E>>2]=0;g:for(;;){m=0==(p|0);do{h:for(;;){e=c[G>>2]|0;e>>>0<(c[w>>2]|0)>>>0?(c[G>>2]=e+1,e=
ea[e>>0]|0):e=hb(g)|0;if(!(u[B+(e+1)>>0]|0))break g;u[A>>0]=e;switch(Hf(J,A,1,O)|0){case -1:l=0;P=152;break b;case -2:break;default:break h}}m||(c[p+(l<<2)>>2]=c[J>>2],l=l+1|0)}while(!(q&(l|0)==(n|0)));l=n<<1|1;e=Xc(p,l<<2)|0;if(!e){l=0;P=152;break b}la=n;n=l;p=e;l=la}e=O;e=(e|=0)?0==(c[e>>2]|0):1;if(e&1|0)m=l,l=0;else{l=0;P=152;break b}}else{if(q){if(l=Ub(n)|0)e=0;else{p=l=0;P=152;break b}for(;;){do{p=c[G>>2]|0;p>>>0<(c[w>>2]|0)>>>0?(c[G>>2]=p+1,p=ea[p>>0]|0):p=hb(g)|0;if(!(u[B+(p+1)>>0]|0)){m=e;
p=0;break f}u[l+e>>0]=p;e=e+1|0}while((e|0)!=(n|0));p=n<<1|1;if(e=Xc(l,p)|0)la=n,n=p,l=e,e=la;else{p=0;P=152;break b}}}if(z)for(l=0;;){p=c[G>>2]|0;p>>>0<m>>>0?(c[G>>2]=p+1,p=ea[p>>0]|0):p=hb(g)|0;if(!(u[B+(p+1)>>0]|0)){m=l;l=z;p=0;break f}u[z+l>>0]=p;m=c[w>>2]|0;l=l+1|0}else for(l=m;;){p=c[G>>2]|0;p>>>0<l>>>0?(c[G>>2]=p+1,p=ea[p>>0]|0):p=hb(g)|0;if(!(u[B+(p+1)>>0]|0)){p=l=m=0;break f}l=c[w>>2]|0}}while(0);e=c[G>>2]|0;c[w>>2]|0&&(e=e+-1|0,c[G>>2]=e);e=e-(c[S>>2]|0)+(c[M>>2]|0)|0;if(!e)break b;if(!((e|
0)==(x|0)|r^1))break b;q&&(c[z>>2]=k?p:l);if(!r){p&&(c[p+(m<<2)>>2]=0);if(!l){l=0;break e}u[l+m>>0]=0}break;case 120:case 88:case 112:e=16;P=134;break;case 111:e=8;P=134;break;case 117:case 100:e=10;P=134;break;case 105:e=0;P=134;break;case 71:case 103:case 70:case 102:case 69:case 101:case 65:case 97:k=+nh(g,q,0);if((c[M>>2]|0)==((c[S>>2]|0)-(c[G>>2]|0)|0))break b;if(z)switch(q|0){case 0:If[z>>2]=k;break e;case 1:eb[z>>3]=k;break e;case 2:eb[z>>3]=k;break e;default:break e}}while(0);e:do if(134==
(P|0)){P=0;e=Fg(g,e,0,-1,-1)|0;if((c[M>>2]|0)==((c[S>>2]|0)-(c[G>>2]|0)|0))break b;if(0!=(z|0)&112==(n|0))c[z>>2]=e;else if(z)switch(q|0){case -2:u[z>>0]=e;break e;case -1:R[z>>1]=e;break e;case 0:c[z>>2]=e;break e;case 1:c[z>>2]=e;break e;case 3:la=z;c[la>>2]=e;c[la+4>>2]=Fa;break e;default:break e}}while(0);a=(0!=(z|0)&1)+a|0;e=(c[M>>2]|0)+t+(c[G>>2]|0)-(c[S>>2]|0)|0;break c}while(0);h=h+(f&1)|0;id(g,0);f=c[G>>2]|0;f>>>0<(c[w>>2]|0)>>>0?(c[G>>2]=f+1,f=ea[f>>0]|0):f=hb(g)|0;if((f|0)!=(ea[h>>0]|0)){P=
21;break b}e=k+1|0}while(0);h=h+1|0;f=u[h>>0]|0;if(f<<24>>24)k=e;else break a}if(21==(P|0))if(c[w>>2]|0&&(c[G>>2]=(c[G>>2]|0)+-1),0!=(a|0)|-1<(f|0))break;else a=0,P=153;else 152!=(P|0)||a||(a=f,P=153);153==(P|0)&&(f=a,a=-1);f&&($a(l),$a(p))}else a=0;while(0);F=Y;F=d;return a|0}function qg(p,a,b){p|=0;a|=0;p|=0;a|=0;b=2;var g=0,l=0,d=0,f=0,h=0,h=F;F=F+112|0;l=f=h;d=l+112|0;do c[l>>2]=0,l=l+4|0;while((l|0)<(d|0));l=f+4|0;c[l>>2]=p;d=f+8|0;c[d>>2]=-1;c[f+44>>2]=p;c[f+76>>2]=-1;id(f,0);g=+nh(f,b,1);b=
(c[l>>2]|0)-(c[d>>2]|0)+(c[f+108>>2]|0)|0;a&&(c[a>>2]=0!=(b|0)?p+b|0:p);F=h;return+ + +g}function Dg(p,a,b){p|=0;a|=0;b|=0;var g=0,l=0,d=0,f=0,d=a&255,g=0!=(b|0);a:do if(g&0!=(p&3|0))for(l=a&255;;){if((u[p>>0]|0)==l<<24>>24){f=6;break a}p=p+1|0;b=b+-1|0;g=0!=(b|0);if(!(g&0!=(p&3|0))){f=5;break}}else f=5;while(0);5==(f|0)&&(g?f=6:b=0);a:do if(6==(f|0)&&(l=a&255,(u[p>>0]|0)!=l<<24>>24)){g=ia(d,16843009)|0;b:do if(3<b>>>0)for(;;){d=c[p>>2]^g;if((d&-2139062144^-2139062144)&d+-16843009)break;p=p+4|0;b=
b+-4|0;if(3>=b>>>0){f=11;break b}}else f=11;while(0);if(11!=(f|0)||b)for(;;){if((u[p>>0]|0)==l<<24>>24)break a;p=p+1|0;b=b+-1|0;if(!b){b=0;break}}else b=0}while(0);return(0!=(b|0)?p:0)|0}function Dh(c,a){c|=0;a|=0;var b=0,g=0,g=u[c>>0]|0,b=u[a>>0]|0;if(0!=g<<24>>24&&g<<24>>24==b<<24>>24){do c=c+1|0,a=a+1|0,g=u[c>>0]|0,b=u[a>>0]|0;while(0!=g<<24>>24&&g<<24>>24==b<<24>>24)}return(g&255)-(b&255)|0}function $f(p,a){p|=0;var b,g=a|0;b=p|0;var g=g|0,l=0,d=0,l=g;a:do{if(!((l^b)&3)){if(l&3){do{l=u[g>>0]|
0;u[b>>0]=l;if(!(l<<24>>24))break a;g=g+1|0;b=b+1|0}while(0!=(g&3|0))}l=c[g>>2]|0;if(!((l&-2139062144^-2139062144)&l+-16843009))for(d=b;!(g=g+4|0,b=d+4|0,c[d>>2]=l,l=c[g>>2]|0,(l&-2139062144^-2139062144)&l+-16843009);)d=b}d=8}while(0);if(8==(d|0)&&(d=u[g>>0]|0,u[b>>0]=d,d<<24>>24)){do g=g+1|0,b=b+1|0,d=u[g>>0]|0,u[b>>0]=d;while(0!=d<<24>>24)}b|0;return p|0}function Ae(p){p|=0;var a=0,b=0,g=0,g=p;a:do if(g&3)for(a=p,p=g;;){if(!(u[a>>0]|0))break a;p=a=a+1|0;if(!(p&3)){p=a;b=4;break}}else b=4;while(0);
if(4==(b|0)){for(;!(a=c[p>>2]|0,(a&-2139062144^-2139062144)&a+-16843009);)p=p+4|0;if((a&255)<<24>>24){do p=p+1|0;while(0!=(u[p>>0]|0))}}return p-g|0}function Jf(p){p|=0;for(var a=0,a=p;;)if(c[a>>2]|0)a=a+4|0;else break;return a-p>>2|0}function ue(p,a,b){p|=0;a|=0;b|=0;var g=0;if(b)for(g=p;;)if(b=b+-1|0,c[g>>2]=c[a>>2],b)a=a+4|0,g=g+4|0;else break;return p|0}function oh(p,a){p|=0;a|=0;var b=0,g=0,l=0,d=0,f=0,h=0,f=p+4|0,b=c[f>>2]|0,h=p+100|0;b>>>0<(c[h>>2]|0)>>>0?(c[f>>2]=b+1,b=ea[b>>0]|0):b=hb(p)|
0;switch(b|0){case 43:case 45:g=45==(b|0)&1;b=c[f>>2]|0;b>>>0<(c[h>>2]|0)>>>0?(c[f>>2]=b+1,b=ea[b>>0]|0):b=hb(p)|0;0!=(a|0)&9<(b+-48|0)>>>0&&0!=(c[h>>2]|0)&&(c[f>>2]=(c[f>>2]|0)+-1);d=g;break;default:d=0}if(9<(b+-48|0)>>>0)c[h>>2]|0&&(c[f>>2]=(c[f>>2]|0)+-1),g=-2147483648,b=0;else{g=0;do g=b+-48+(10*g|0)|0,b=c[f>>2]|0,b>>>0<(c[h>>2]|0)>>>0?(c[f>>2]=b+1,b=ea[b>>0]|0):b=hb(p)|0;while(10>(b+-48|0)>>>0&214748364>(g|0));a=(0>(g|0))<<31>>31;if(10>(b+-48|0)>>>0){do a=Ne(g|0,a|0,10,0)|0,g=Fa,b=Mb(b|0,(0>
(b|0))<<31>>31|0,-48,-1)|0,g=Mb(b|0,Fa|0,a|0,g|0)|0,a=Fa,b=c[f>>2]|0,b>>>0<(c[h>>2]|0)>>>0?(c[f>>2]=b+1,b=ea[b>>0]|0):b=hb(p)|0;while(10>(b+-48|0)>>>0&(21474836>(a|0)|21474836==(a|0)&2061584302>g>>>0))}l=g;if(10>(b+-48|0)>>>0){do b=c[f>>2]|0,b>>>0<(c[h>>2]|0)>>>0?(c[f>>2]=b+1,b=ea[b>>0]|0):b=hb(p)|0;while(10>(b+-48|0)>>>0)}c[h>>2]|0&&(c[f>>2]=(c[f>>2]|0)+-1);p=0!=(d|0);b=Ud(0,0,l|0,a|0)|0;g=p?Fa:a;b=p?b:l}Fa=g;return b|0}function zh(p){p|=0;var a=0,b=0,g=0,l=0,d=0,f=0,a=p+20|0,d=p+28|0;(c[a>>2]|0)>>>
0>(c[d>>2]|0)>>>0&&(cb[c[p+36>>2]&63](p,0,0)|0,0==(c[a>>2]|0))?a=-1:(f=p+4|0,b=c[f>>2]|0,g=p+8|0,l=c[g>>2]|0,b>>>0<l>>>0&&cb[c[p+40>>2]&63](p,b-l|0,1)|0,c[p+16>>2]=0,c[d>>2]=0,c[a>>2]=0,c[g>>2]=0,a=c[f>>2]=0);return a|0}var Eh=a.Int8Array,Fh=a.Int16Array,Gh=a.Int32Array,Hh=a.Uint8Array,Ih=a.Uint16Array,Jh=a.Uint32Array,Kh=a.Float32Array,Lh=a.Float64Array,u=new Eh(d),R=new Fh(d),c=new Gh(d),ea=new Hh(d),oa=new Ih(d);new Jh(d);var If=new Kh(d),eb=new Lh(d),rg=a.byteLength,F=b.STACKTOP|0,pb=b.tempDoublePtr|
0,xf=b.cttz_i8|0,Ga=b.___dso_handle|0,g=0,af=a.NaN,li=a.Infinity,Fa=0,ki=a.Math.abs,ia=a.Math.imul,Oe=a.Math.clz32,ac=b.abort,Mh=b.invoke_iiiiiiii,oi=b.invoke_viiiii,ta=b.invoke_vi,ga=b.invoke_vii,Wd=b.invoke_iiiiiii,ca=b.invoke_ii,Kf=b.invoke_iiiiiiiiiiii,La=b.invoke_iiii,Lf=b.invoke_viiiiiiiiiiiiiii,sd=b.invoke_viiiiiii,Te=b.invoke_viiiiiiiiii,ma=b.invoke_iii,Mf=b.invoke_iiiiii,Ue=b.invoke_diii,Va=b.invoke_i,fb=b.invoke_iiiii,na=b.invoke_viii,rb=b.invoke_v,Nh=b.invoke_iiiiiiiii,pa=b.invoke_viiii,
ai=b._pthread_cond_wait,mi=b.___lock,pi=b._pthread_key_create,Aa=b._abort,Da=b.___cxa_guard_acquire,gh=b.___assert_fail,za=b.___cxa_free_exception,xa=b.___cxa_allocate_exception,J=b.___cxa_find_matching_catch,Ca=b.___cxa_guard_release,$h=b._strftime_l,Zf=b._llvm_eh_typeid_for,te=b._sbrk,Rc=b.___cxa_begin_catch,di=b._emscripten_memcpy_big,$c=b.___cxa_end_catch,V=b.___resumeException,Pg=b.__ZSt18uncaught_exceptionv,bi=b._sysconf,ji=b._pthread_getspecific,mh=b._pthread_self,Ag=b._pthread_mutex_unlock,
ii=b._pthread_once,qi=b.___syscall54,ni=b.___unlock,xh=b._pthread_cleanup_pop,ri=b._pthread_cond_broadcast,si=b._pthread_setspecific,Ea=b.___cxa_atexit,Pa=b.___cxa_throw,Oh=b.___cxa_rethrow,ti=b.___syscall6,vh=b._pthread_cleanup_push,ui=b.___cxa_pure_virtual,ci=b._time,zg=b._pthread_mutex_lock,Hc=b.___cxa_guard_abort,vi=b.___syscall140,Ph=b.___syscall145,wh=b.___syscall146,wi=[le,function(p,a,b,g,l,d,f){a|=0;var h=0,e=0,e=F;F=F+112|0;h=e+4|0;b=e;c[b>>2]=h+100;cd((p|0)+8|0,h,b,l|0,d|0,f|0);l=c[b>>
2]|0;b=c[a>>2]|0;if((h|0)!=(l|0)){do f=u[h>>0]|0,b?(g=b+24|0,d=c[g>>2]|0,(d|0)==(c[b+28>>2]|0)?b=(a=-1==(vc[c[(c[b>>2]|0)+52>>2]&63](b,f&255)|0))?0:b:(c[g>>2]=d+1,u[d>>0]=f)):b=0,h=h+1|0;while((h|0)!=(l|0))}F=e;return b|0},function(p,a,b,d,l,f,H){a|=0;var e=0,e=F;F=F+416|0;d=e+8|0;b=e;c[b>>2]=d+400;p=(p|0)+8|0;var k;l|=0;f|=0;var m=H|0;p|=0;H=d|0;k=b|0;var n=0,u=0,q=0,r=0,x=0,n=F;F=F+128|0;r=n+16|0;x=n+12|0;u=n;q=n+8|0;c[x>>2]=r+100;cd(p,r,x,l|0,f|0,m|0);f=u;c[f>>2]=0;c[f+4>>2]=0;c[q>>2]=r;f=(c[k>>
2]|0)-H>>2;m=md(c[p>>2]|0)|0;g=0;f=fb(18,H|0,q|0,f|0,u|0)|0;p=g;g=0;p&1&&(f=J()|0,0!=(m|0)&&(g=0,ca(75,m|0)|0,x=g,g=0,x&1)&&(x=J(0)|0,h(x)),V(f|0));0!=(m|0)&&(g=0,ca(75,m|0)|0,x=g,g=0,x&1)&&(x=J(0)|0,h(x));-1==(f|0)?Mc(58955):(c[k>>2]=H+(f<<2),F=n);p=c[b>>2]|0;b=c[a>>2]|0;if((d|0)!=(p|0)){l=d;do d=c[l>>2]|0,b?(f=b+24|0,H=c[f>>2]|0,(H|0)==(c[b+28>>2]|0)?d=vc[c[(c[b>>2]|0)+52>>2]&63](b,d)|0:(c[f>>2]=H+4,c[H>>2]=d),b=-1==(d|0)?0:b):b=0,l=l+4|0;while((l|0)!=(p|0))}F=e;return b|0},function(p,a,b,d,l,f,
H){a|=0;b|=0;d|=0;l|=0;f|=0;H|=0;var e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,E=0,S=0,I=0,ua=0,L=0,y=0,M=0,D=0,B=0,O=0,G=0,w=0,M=F;F=F+240|0;L=M+24|0;y=M;p=M+136|0;B=M+16|0;ua=M+12|0;D=M+8|0;q=M+134|0;k=M+4|0;I=M+124|0;c[B>>2]=p;O=B+4|0;c[O>>2]=189;m=p+100|0;g=0;e=ca(68,l|0)|0;S=g;g=0;if(S&1)k=J()|0,c[B>>2]=0,e=189,w=45;else{c[D>>2]=e;g=0;p=ma(37,D|0,44220)|0;S=g;g=0;a:do if(S&1||(u[q>>0]=0,c[k>>2]=c[b>>2],n=c[l+4>>2]|0,g=0,c[L>>2]=c[k>>2],n=Kf(1,a|0,L|0,d|0,D|0,n|0,f|0,q|0,p|0,B|0,ua|0,m|0)|0,S=g,
g=0,S&1))w=10;else{b:do if(n){g=0;fb(c[(c[p>>2]|0)+32>>2]|0,p|0,58976,58986,I|0)|0;S=g;g=0;if(S&1){w=10;break a}k=c[ua>>2]|0;m=c[B>>2]|0;p=k-m|0;98<(p|0)?(e=p=Ub(p+2|0)|0)?w=13:(g=0,rb(6),S=g,g=0,S&1||(p=0,w=13)):(e=0,p=L,w=13);do if(13==(w|0)){u[q>>0]|0&&(u[p>>0]=45,p=p+1|0);E=I+10|0;S=I;if(m>>>0<k>>>0){n=I+1|0;d=n+1|0;l=d+1|0;q=l+1|0;r=q+1|0;x=r+1|0;t=x+1|0;z=t+1|0;A=z+1|0;do k=u[m>>0]|0,k=(u[I>>0]|0)!=k<<24>>24?(u[n>>0]|0)!=k<<24>>24?(u[d>>0]|0)!=k<<24>>24?(u[l>>0]|0)!=k<<24>>24?(u[q>>0]|0)==k<<
24>>24?q:(u[r>>0]|0)==k<<24>>24?r:(u[x>>0]|0)==k<<24>>24?x:(u[t>>0]|0)==k<<24>>24?t:(u[z>>0]|0)==k<<24>>24?z:(u[A>>0]|0)==k<<24>>24?A:E:l:d:n:I,u[p>>0]=u[58976+(k-S)>>0]|0,m=m+1|0,p=p+1|0;while(m>>>0<(c[ua>>2]|0)>>>0)}u[p>>0]=0;c[y>>2]=H;if(!(1!=(Bh(L,58987,y)|0)&&(g=0,ta(190,58991),H=g,g=0,H&1))){e&&$a(e);break b}}while(0);p=J()|0;if(!e){k=p;e=B;break a}$a(e);k=p;e=B;break a}while(0);p=c[a>>2]|0;do if(p){if((c[p+12>>2]|0)==(c[p+16>>2]|0)){g=0;p=ca(c[(c[p>>2]|0)+36>>2]|0,p|0)|0;H=g;g=0;if(H&1){w=
10;break a}p=-1==(p|0)?c[a>>2]=0:c[a>>2]|0}}else p=0;while(0);e=0==(p|0);p=c[b>>2]|0;do if(p){if((c[p+12>>2]|0)==(c[p+16>>2]|0)){g=0;p=ca(c[(c[p>>2]|0)+36>>2]|0,p|0)|0;H=g;g=0;if(H&1){w=10;break a}if(-1==(p|0)){c[b>>2]=0;w=37;break}}e||(w=38)}else w=37;while(0);37==(w|0)&&e&&(w=38);38==(w|0)&&(c[f>>2]|=2);e=c[a>>2]|0;Na(c[D>>2]|0)|0;p=c[B>>2]|0;c[B>>2]=0;0!=(p|0)&&(g=0,ta(c[O>>2]|0,p|0),w=g,g=0,w&1)&&(w=J(0)|0,h(w));F=M;return e|0}while(0);10==(w|0)&&(k=J()|0,e=B);Na(c[D>>2]|0)|0;p=c[e>>2]|0;c[e>>
2]=0;p?(e=c[O>>2]|0,w=45):G=k}45==(w|0)&&(g=0,ta(e|0,p|0),w=g,g=0,w&1?(w=J(0)|0,h(w)):G=k);V(G|0);return 0},function(p,a,b,d,l,f,H){a|=0;b|=0;d|=0;l|=0;f|=0;H|=0;var e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,E=0,S=0,I=0,ua=0,L=0,y=0,S=F;F=F+144|0;e=S+24|0;p=S+32|0;I=S+16|0;t=S+8|0;q=S+4|0;r=S+28|0;k=S;c[I>>2]=p;y=I+4|0;c[y>>2]=189;m=p+100|0;g=0;E=ca(68,l|0)|0;n=g;g=0;if(n&1)e=J()|0,c[I>>2]=0,L=36;else{c[q>>2]=E;g=0;n=ma(37,q|0,44220)|0;p=g;g=0;a:do if(p&1?0:(u[r>>0]=0,z=c[b>>2]|0,c[k>>2]=z,x=c[l+4>>
2]|0,A=z,g=0,c[e>>2]=c[k>>2],x=Kf(1,a|0,e|0,d|0,q|0,x|0,f|0,r|0,n|0,I|0,t|0,m|0)|0,l=g,g=0,!(l&1))){if(x){u[H>>0]&1?(u[c[H+8>>2]>>0]=0,c[H+4>>2]=0):(u[H+1>>0]=0,u[H>>0]=0);if(u[r>>0]|0){g=0;p=ma(c[(c[n>>2]|0)+28>>2]|0,n|0,45)|0;l=g;g=0;if(l&1)break;g=0;ga(67,H|0,p|0);l=g;g=0;if(l&1)break}g=0;k=ma(c[(c[n>>2]|0)+28>>2]|0,n|0,48)|0;l=g;g=0;if(l&1)break;p=c[I>>2]|0;m=c[t>>2]|0;e=m+-1|0;b:do if(p>>>0<e>>>0){do{if((u[p>>0]|0)!=k<<24>>24)break b;p=p+1|0}while(p>>>0<e>>>0)}while(0);g=0;La(32,H|0,p|0,m|0)|
0;H=g;g=0;if(H&1)break}p=c[a>>2]|0;do if(p){if((c[p+12>>2]|0)==(c[p+16>>2]|0)){g=0;p=ca(c[(c[p>>2]|0)+36>>2]|0,p|0)|0;H=g;g=0;if(H&1)break a;p=-1==(p|0)?c[a>>2]=0:c[a>>2]|0}}else p=0;while(0);e=0==(p|0);do if(z){if((c[A+12>>2]|0)==(c[A+16>>2]|0)){g=0;p=ca(c[(c[z>>2]|0)+36>>2]|0,A|0)|0;A=g;g=0;if(A&1)break a;if(-1==(p|0)){c[b>>2]=0;L=29;break}}e||(L=30)}else L=29;while(0);29==(L|0)&&e&&(L=30);30==(L|0)&&(c[f>>2]|=2);e=c[a>>2]|0;Na(E)|0;p=c[I>>2]|0;c[I>>2]=0;0!=(p|0)&&(g=0,ta(c[y>>2]|0,p|0),y=g,g=0,
y&1)&&(y=J(0)|0,h(y));F=S;return e|0}while(0);e=J()|0;Na(E)|0;p=c[I>>2]|0;c[I>>2]=0;p?L=36:ua=e}36==(L|0)&&(g=0,ta(c[y>>2]|0,p|0),y=g,g=0,y&1?(y=J(0)|0,h(y)):ua=e);V(ua|0);return 0},function(p,a,b,d,l,f,H){a|=0;b|=0;d|=0;l|=0;f|=0;H|=0;var e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,E=0,S=0,I=0,ua=0,L=0,y=0,M=0,B=0,D=0,O=0,G=0,w=0,M=F;F=F+576|0;I=M+424|0;y=M;p=M+24|0;D=M+16|0;ua=M+12|0;B=M+8|0;q=M+464|0;k=M+4|0;L=M+468|0;c[D>>2]=p;G=D+4|0;c[G>>2]=189;m=p+400|0;g=0;e=ca(68,l|0)|0;S=g;g=0;if(S&1)k=J()|
0,c[D>>2]=0,e=189,w=47;else{c[B>>2]=e;g=0;p=ma(37,B|0,44212)|0;S=g;g=0;a:do if(S&1||(u[q>>0]=0,c[k>>2]=c[b>>2],n=c[l+4>>2]|0,g=0,c[I>>2]=c[k>>2],n=Kf(2,a|0,I|0,d|0,B|0,n|0,f|0,q|0,p|0,D|0,ua|0,m|0)|0,S=g,g=0,S&1))w=10;else{b:do if(n){g=0;fb(c[(c[p>>2]|0)+48>>2]|0,p|0,59007,59017,I|0)|0;S=g;g=0;if(S&1){w=10;break a}k=c[ua>>2]|0;m=c[D>>2]|0;p=k-m|0;392<(p|0)?(e=p=Ub((p>>2)+2|0)|0)?w=13:(g=0,rb(6),S=g,g=0,S&1||(p=0,w=13)):(e=0,p=L,w=13);do if(13==(w|0)){u[q>>0]|0&&(u[p>>0]=45,p=p+1|0);E=I+40|0;S=I;if(m>>>
0<k>>>0){n=I+4|0;d=n+4|0;l=d+4|0;q=l+4|0;r=q+4|0;x=r+4|0;t=x+4|0;z=t+4|0;A=z+4|0;do k=c[m>>2]|0,k=(c[I>>2]|0)!=(k|0)?(c[n>>2]|0)!=(k|0)?(c[d>>2]|0)!=(k|0)?(c[l>>2]|0)!=(k|0)?(c[q>>2]|0)==(k|0)?q:(c[r>>2]|0)==(k|0)?r:(c[x>>2]|0)==(k|0)?x:(c[t>>2]|0)==(k|0)?t:(c[z>>2]|0)==(k|0)?z:(c[A>>2]|0)==(k|0)?A:E:l:d:n:I,u[p>>0]=u[59007+(k-S>>2)>>0]|0,m=m+4|0,p=p+1|0;while(m>>>0<(c[ua>>2]|0)>>>0)}u[p>>0]=0;c[y>>2]=H;if(!(1!=(Bh(L,58987,y)|0)&&(g=0,ta(190,58991),H=g,g=0,H&1))){e&&$a(e);break b}}while(0);p=J()|
0;if(!e){k=p;e=D;break a}$a(e);k=p;e=D;break a}while(0);p=c[a>>2]|0;do if(p){e=c[p+12>>2]|0;if((e|0)==(c[p+16>>2]|0)){if(g=0,p=ca(c[(c[p>>2]|0)+36>>2]|0,p|0)|0,H=g,g=0,H&1){w=10;break a}}else p=c[e>>2]|0;-1==(p|0)?(c[a>>2]=0,k=1):k=0==(c[a>>2]|0)}else k=1;while(0);p=c[b>>2]|0;do if(p){e=c[p+12>>2]|0;if((e|0)==(c[p+16>>2]|0)){if(g=0,p=ca(c[(c[p>>2]|0)+36>>2]|0,p|0)|0,H=g,g=0,H&1){w=10;break a}}else p=c[e>>2]|0;-1!=(p|0)?k||(w=40):(c[b>>2]=0,w=38)}else w=38;while(0);38==(w|0)&&k&&(w=40);40==(w|0)&&
(c[f>>2]|=2);e=c[a>>2]|0;Na(c[B>>2]|0)|0;p=c[D>>2]|0;c[D>>2]=0;0!=(p|0)&&(g=0,ta(c[G>>2]|0,p|0),w=g,g=0,w&1)&&(w=J(0)|0,h(w));F=M;return e|0}while(0);10==(w|0)&&(k=J()|0,e=D);Na(c[B>>2]|0)|0;p=c[e>>2]|0;c[e>>2]=0;p?(e=c[G>>2]|0,w=47):O=k}47==(w|0)&&(g=0,ta(e|0,p|0),w=g,g=0,w&1?(w=J(0)|0,h(w)):O=k);V(O|0);return 0},function(p,a,b,d,l,f,H){a|=0;b|=0;d|=0;l|=0;f|=0;H|=0;var e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,E=0,S=0,I=0,ua=0,L=0,y=0,S=F;F=F+432|0;e=S+424|0;p=S+24|0;ua=S+16|0;t=S+8|0;q=S+4|0;r=S+
428|0;k=S;c[ua>>2]=p;y=ua+4|0;c[y>>2]=189;m=p+400|0;g=0;E=ca(68,l|0)|0;n=g;g=0;if(n&1)e=J()|0,c[ua>>2]=0,L=38;else{c[q>>2]=E;g=0;n=ma(37,q|0,44212)|0;p=g;g=0;a:do if(p&1?0:(u[r>>0]=0,z=c[b>>2]|0,c[k>>2]=z,x=c[l+4>>2]|0,A=z,g=0,c[e>>2]=c[k>>2],x=Kf(2,a|0,e|0,d|0,q|0,x|0,f|0,r|0,n|0,ua|0,t|0,m|0)|0,l=g,g=0,!(l&1))){if(x){u[H>>0]&1?c[c[H+8>>2]>>2]=0:u[H>>0]=0;c[H+4>>2]=0;if(u[r>>0]|0){g=0;p=ma(c[(c[n>>2]|0)+44>>2]|0,n|0,45)|0;l=g;g=0;if(l&1)break;g=0;ga(92,H|0,p|0);l=g;g=0;if(l&1)break}g=0;k=ma(c[(c[n>>
2]|0)+44>>2]|0,n|0,48)|0;l=g;g=0;if(l&1)break;p=c[ua>>2]|0;m=c[t>>2]|0;e=m+-4|0;b:do if(p>>>0<e>>>0){do{if((c[p>>2]|0)!=(k|0))break b;p=p+4|0}while(p>>>0<e>>>0)}while(0);g=0;La(33,H|0,p|0,m|0)|0;H=g;g=0;if(H&1)break}p=c[a>>2]|0;do if(p){e=c[p+12>>2]|0;if((e|0)==(c[p+16>>2]|0)){if(g=0,p=ca(c[(c[p>>2]|0)+36>>2]|0,p|0)|0,H=g,g=0,H&1)break a}else p=c[e>>2]|0;-1==(p|0)?(c[a>>2]=0,e=1):e=0==(c[a>>2]|0)}else e=1;while(0);do if(z){p=c[A+12>>2]|0;if((p|0)==(c[A+16>>2]|0)){if(g=0,p=ca(c[(c[z>>2]|0)+36>>2]|
0,A|0)|0,A=g,g=0,A&1)break a}else p=c[p>>2]|0;-1!=(p|0)?e||(L=32):(c[b>>2]=0,L=30)}else L=30;while(0);30==(L|0)&&e&&(L=32);32==(L|0)&&(c[f>>2]|=2);e=c[a>>2]|0;Na(E)|0;p=c[ua>>2]|0;c[ua>>2]=0;0!=(p|0)&&(g=0,ta(c[y>>2]|0,p|0),y=g,g=0,y&1)&&(y=J(0)|0,h(y));F=S;return e|0}while(0);e=J()|0;Na(E)|0;p=c[ua>>2]|0;c[ua>>2]=0;p?L=38:I=e}38==(L|0)&&(g=0,ta(c[y>>2]|0,p|0),y=g,g=0,y&1?(y=J(0)|0,h(y)):I=e);V(I|0);return 0},nf,of,le,le,le,le,le,le,le],Cf=[$e,function(p,a,b,d,l){p|=0;a|=0;b|=0;d|=0;l|=0;var f=0,
H=0,H=p+88|0,f=c[a>>2]|0;c[a>>2]=0;a=c[H>>2]|0;c[H>>2]=f;if(a)Ha[c[(c[a>>2]|0)+4>>2]&255](a);H=d+4|0;f=c[H>>2]|0;u[p+4620>>0]=l&1;a=p+156|0;c[a>>2]=c[b>>2];c[a+4>>2]=c[b+4>>2];c[a+8>>2]=c[b+8>>2];c[a+12>>2]=c[b+12>>2];la(p,d);a:{a=p|0;var h=l=b=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,S=0,I=0,ua=0,E=0,L=0,y=0,M=0,D=0,B=0,O=0,w=0,G=0,B=F;F=F+32|0;w=B+12|0;D=B;n=a+172|0;M=(c[n>>2]|0)+4|0;q=1==(c[a+28>>2]|0)?c[a+20>>2]|0:1;b=ia(q<<1,M)|0;c[w>>2]=0;G=w+4|0;c[G>>2]=0;c[w+8>>2]=0;b:do if(b){0>(b|0)&&(g=
0,ta(178,w|0),O=g,g=0,O&1)||(y=6);if(6==(y|0)&&(g=0,l=ca(67,b|0)|0,O=g,g=0,!(O&1)))for(c[G>>2]=l,c[w>>2]=l,c[w+8>>2]=l+b;;)if(u[l>>0]=0,l=(c[G>>2]|0)+1|0,c[G>>2]=l,b=b+-1|0,!b)break b;l=J()|0;(b=c[w>>2]|0)||V(l|0);(c[G>>2]|0)!=(b|0)&&(c[G>>2]=b);Q(b);V(l|0)}while(0);c[D>>2]=0;O=D+4|0;c[O>>2]=0;c[D+8>>2]=0;if(q)if(1073741823<q>>>0&&(g=0,ta(178,D|0),L=g,g=0,L&1)||(y=17),17!=(y|0)||(h=q<<2,g=0,e=ca(67,h|0)|0,L=g,g=0,L&1)){if(l=J()|0,h=b=c[D>>2]|0)e=c[O>>2]|0,(e|0)!=(b|0)&&(c[O>>2]=e+(~((e+-4-h|0)>>>
2)<<2)),Q(b)}else c[D>>2]=e,y=e+(q<<2)|0,c[D+8>>2]=y,Za(e|0,0,h|0)|0,c[O>>2]=y,y=19;else y=19;if(19==(y|0)){r=a+8|0;b=c[r>>2]|0;b:do if(0<(b|0))if(x=a+4596|0,t=ia(q,M)|0,z=t+1|0,A=a+4600|0,S=a+160|0,I=a+168|0,ua=a+164|0,E=a+156|0,L=a+88|0,m=a+4592|0,0<(q|0)){k=0;c:for(;;){l=c[w>>2]|0;b=l+1|0;c[x>>2]=b;l=l+z|0;c[A>>2]=l;k&1&&(c[x>>2]=l,c[A>>2]=b,b=l);e=c[D>>2]|0;l=b;h=0;do{c[m>>2]=c[e+(h<<2)>>2];y=c[n>>2]|0;u[l+y>>0]=u[l+(y+-1)>>0]|0;u[(c[A>>2]|0)+-1>>0]=u[c[x>>2]>>0]|0;g=0;ga(83,a|0,0);y=g;g=0;if(y&
1){y=38;break c}e=c[D>>2]|0;c[e+(h<<2)>>2]=c[m>>2];l=(c[x>>2]|0)+M|0;c[x>>2]=l;b=c[A>>2]|0;c[A>>2]=b+M;h=h+1|0}while((h|0)<(q|0));y=c[S>>2]|0;if((y|0)<=(k|0)&&(k|0)<((c[I>>2]|0)+y|0)&&(y=c[L>>2]|0,g=0,pa(c[(c[y>>2]|0)+8>>2]|0,y|0,b+(M+((c[E>>2]|0)-t))|0,c[ua>>2]|0,M|0),y=g,g=0,y&1)){y=30;break}k=k+1|0;if((k|0)>=(c[r>>2]|0)){y=50;break b}}30==(y|0)?l=J()|0:38==(y|0)&&(l=J()|0)}else{for(k=0;;){e=c[w>>2]|0;l=e+1|0;c[x>>2]=l;h=e+z|0;c[A>>2]=h;k&1?(c[x>>2]=h,c[A>>2]=l,l=1):l=z;q=c[S>>2]|0;if((q|0)<=(k|
0)&&(k|0)<((c[I>>2]|0)+q|0)){q=c[L>>2]|0;g=0;pa(c[(c[q>>2]|0)+8>>2]|0,q|0,e+(l+((c[E>>2]|0)-t))|0,c[ua>>2]|0,M|0);q=g;g=0;if(q&1)break;b=c[r>>2]|0}k=k+1|0;if((k|0)>=(b|0)){y=50;break b}}l=J()|0}else y=50;while(0);do if(50==(y|0))if(g=0,ta(183,a|0),a=g,g=0,a&1)l=J()|0;else{if(l=b=c[D>>2]|0)h=c[O>>2]|0,(h|0)!=(b|0)&&(c[O>>2]=h+(~((h+-4-l|0)>>>2)<<2)),Q(b);b=c[w>>2]|0;if(!b){F=B;break a}(c[G>>2]|0)!=(b|0)&&(c[G>>2]=b);Q(b);F=B;break a}while(0);if(h=b=c[D>>2]|0)e=c[O>>2]|0,(e|0)!=(b|0)&&(c[O>>2]=e+(~((e+
-4-h|0)>>>2)<<2)),Q(b)}(b=c[w>>2]|0)||V(l|0);(c[G>>2]|0)!=(b|0)&&(c[G>>2]=b);Q(b);V(l|0)}a=c[p+116>>2]|0;for(p=c[p+112>>2]|0;!(l=a+-1|0,b=-1==(u[l>>0]|0)?7:8,(p|0)<(b|0));)a=l,p=p-b|0;a=a-f|0;if(l=c[H>>2]|0)c[H>>2]=l+a,d=d+8|0,c[d>>2]=(c[d>>2]|0)-a},function(p,a,b,d,l){p|=0;a|=0;b|=0;d|=0;l|=0;var f=0,H=0,H=p+88|0,f=c[a>>2]|0;c[a>>2]=0;a=c[H>>2]|0;c[H>>2]=f;if(a)Ha[c[(c[a>>2]|0)+4>>2]&255](a);H=d+4|0;f=c[H>>2]|0;u[p+4596>>0]=l&1;a=p+132|0;c[a>>2]=c[b>>2];c[a+4>>2]=c[b+4>>2];c[a+8>>2]=c[b+8>>2];c[a+
12>>2]=c[b+12>>2];la(p,d);a:{a=p|0;var h=l=b=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,S=0,I=0,ua=0,E=0,y=0,L=0,M=0,D=0,B=0,O=0,w=0,G=0,B=F;F=F+32|0;w=B+12|0;D=B;y=a+148|0;L=(c[y>>2]|0)+4|0;M=1==(c[a+28>>2]|0)?c[a+20>>2]|0:1;b=ia(M<<1,L)|0;c[w>>2]=0;G=w+4|0;c[G>>2]=0;c[w+8>>2]=0;b:do if(b){1431655765<b>>>0&&(g=0,ta(178,w|0),O=g,g=0,O&1)||(k=6);if(6==(k|0)&&(g=0,l=ca(67,3*b|0)|0,O=g,g=0,!(O&1)))for(c[G>>2]=l,c[w>>2]=l,c[w+8>>2]=l+(3*b|0);;)if(u[l>>0]=0,u[l+1>>0]=0,u[l+2>>0]=0,l=(c[G>>2]|0)+3|0,c[G>>
2]=l,b=b+-1|0,!b)break b;h=J()|0;(b=c[w>>2]|0)||V(h|0);l=c[G>>2]|0;(l|0)!=(b|0)&&(c[G>>2]=l+(3*~(((l+-3-b|0)>>>0)/3|0)|0));Q(b);V(h|0)}while(0);c[D>>2]=0;O=D+4|0;c[O>>2]=0;c[D+8>>2]=0;if(M)if(1073741823<M>>>0&&(g=0,ta(178,D|0),E=g,g=0,E&1)||(k=17),17!=(k|0)||(h=M<<2,g=0,e=ca(67,h|0)|0,E=g,g=0,E&1)){if(h=J()|0,l=b=c[D>>2]|0)e=c[O>>2]|0,(e|0)!=(b|0)&&(c[O>>2]=e+(~((e+-4-l|0)>>>2)<<2)),Q(b)}else c[D>>2]=e,k=e+(M<<2)|0,c[D+8>>2]=k,Za(e|0,0,h|0)|0,c[O>>2]=k,k=19;else k=19;if(19==(k|0)){k=a+8|0;b:do if(0<
(c[k>>2]|0)){m=a+4572|0;n=ia(M,L)|0;q=n+1|0;r=a+4576|0;x=0<(M|0);t=a+136|0;z=a+144|0;A=a+140|0;S=a+132|0;I=a+88|0;ua=a+4568|0;E=0;c:for(;;){h=c[w>>2]|0;l=h+3|0;c[m>>2]=l;h=h+(3*q|0)|0;c[r>>2]=h;E&1?(c[m>>2]=h,b=c[r>>2]=l,l=h):b=h;if(x){e=c[D>>2]|0;h=0;do{c[ua>>2]=c[e+(h<<2)>>2];b=c[y>>2]|0;e=l+(3*b|0)|0;l=l+(3*(b+-1|0)|0)|0;u[e>>0]=u[l>>0]|0;u[e+1>>0]=u[l+1>>0]|0;u[e+2>>0]=u[l+2>>0]|0;l=c[m>>2]|0;e=(c[r>>2]|0)+-3|0;u[e>>0]=u[l>>0]|0;u[e+1>>0]=u[l+1>>0]|0;u[e+2>>0]=u[l+2>>0]|0;g=0;ga(82,a|0,0);e=g;
g=0;if(e&1){k=30;break c}e=c[D>>2]|0;c[e+(h<<2)>>2]=c[ua>>2];l=(c[m>>2]|0)+(3*L|0)|0;c[m>>2]=l;b=(c[r>>2]|0)+(3*L|0)|0;c[r>>2]=b;h=h+1|0}while((h|0)<(M|0))}e=c[t>>2]|0;if((e|0)<=(E|0)&&(E|0)<((c[z>>2]|0)+e|0)&&(e=c[I>>2]|0,g=0,pa(c[(c[e>>2]|0)+8>>2]|0,e|0,b+(3*((c[S>>2]|0)-n|0)|0)|0,c[A>>2]|0,L|0),e=g,g=0,e&1)){k=31;break}E=E+1|0;if((E|0)>=(c[k>>2]|0)){k=43;break b}}30==(k|0)?h=J()|0:31==(k|0)&&(h=J()|0)}else k=43;while(0);do if(43==(k|0))if(g=0,ta(183,a|0),a=g,g=0,a&1)h=J()|0;else{if(l=b=c[D>>2]|
0)h=c[O>>2]|0,(h|0)!=(b|0)&&(c[O>>2]=h+(~((h+-4-l|0)>>>2)<<2)),Q(b);b=c[w>>2]|0;if(!b){F=B;break a}l=c[G>>2]|0;(l|0)!=(b|0)&&(c[G>>2]=l+(3*~(((l+-3-b|0)>>>0)/3|0)|0));Q(b);F=B;break a}while(0);if(l=b=c[D>>2]|0)e=c[O>>2]|0,(e|0)!=(b|0)&&(c[O>>2]=e+(~((e+-4-l|0)>>>2)<<2)),Q(b)}(b=c[w>>2]|0)||V(h|0);l=c[G>>2]|0;(l|0)!=(b|0)&&(c[G>>2]=l+(3*~(((l+-3-b|0)>>>0)/3|0)|0));Q(b);V(h|0)}a=c[p+116>>2]|0;for(p=c[p+112>>2]|0;!(l=a+-1|0,b=-1==(u[l>>0]|0)?7:8,(p|0)<(b|0));)a=l,p=p-b|0;a=a-f|0;if(l=c[H>>2]|0)c[H>>
2]=l+a,d=d+8|0,c[d>>2]=(c[d>>2]|0)-a},function(p,a,b,d,l){p|=0;a|=0;b|=0;d|=0;l|=0;var f=0,H=0,H=p+88|0,f=c[a>>2]|0;c[a>>2]=0;a=c[H>>2]|0;c[H>>2]=f;if(a)Ha[c[(c[a>>2]|0)+4>>2]&255](a);H=d+4|0;f=c[H>>2]|0;u[p+4596>>0]=l&1;a=p+132|0;c[a>>2]=c[b>>2];c[a+4>>2]=c[b+4>>2];c[a+8>>2]=c[b+8>>2];c[a+12>>2]=c[b+12>>2];la(p,d);a:{a=p|0;var h=l=b=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,S=0,I=0,ua=0,E=0,y=0,L=0,M=0,D=0,B=0,O=0,w=0,G=0,B=F;F=F+32|0;w=B+12|0;D=B;y=a+148|0;L=(c[y>>2]|0)+4|0;M=1==(c[a+28>>2]|0)?
c[a+20>>2]|0:1;b=ia(M<<1,L)|0;c[w>>2]=0;G=w+4|0;c[G>>2]=0;c[w+8>>2]=0;b:do if(b){0>(b|0)&&(g=0,ta(178,w|0),O=g,g=0,O&1)||(k=6);if(6==(k|0)&&(g=0,l=ca(67,b|0)|0,O=g,g=0,!(O&1)))for(c[G>>2]=l,c[w>>2]=l,c[w+8>>2]=l+b;;)if(u[l>>0]=0,l=(c[G>>2]|0)+1|0,c[G>>2]=l,b=b+-1|0,!b)break b;l=J()|0;(b=c[w>>2]|0)||V(l|0);(c[G>>2]|0)!=(b|0)&&(c[G>>2]=b);Q(b);V(l|0)}while(0);c[D>>2]=0;O=D+4|0;c[O>>2]=0;c[D+8>>2]=0;if(M)if(1073741823<M>>>0&&(g=0,ta(178,D|0),E=g,g=0,E&1)||(k=17),17!=(k|0)||(h=M<<2,g=0,e=ca(67,h|0)|0,
E=g,g=0,E&1)){if(l=J()|0,h=b=c[D>>2]|0)e=c[O>>2]|0,(e|0)!=(b|0)&&(c[O>>2]=e+(~((e+-4-h|0)>>>2)<<2)),Q(b)}else c[D>>2]=e,k=e+(M<<2)|0,c[D+8>>2]=k,Za(e|0,0,h|0)|0,c[O>>2]=k,k=19;else k=19;if(19==(k|0)){k=a+8|0;b:do if(0<(c[k>>2]|0)){m=a+4572|0;n=ia(M,L)|0;q=n+1|0;r=a+4576|0;x=0<(M|0);t=a+136|0;z=a+144|0;A=a+140|0;S=a+132|0;I=a+88|0;ua=a+4568|0;E=0;c:for(;;){h=c[w>>2]|0;l=h+1|0;c[m>>2]=l;h=h+q|0;c[r>>2]=h;E&1?(c[m>>2]=h,b=c[r>>2]=l,l=h):b=h;if(x){e=c[D>>2]|0;h=0;do{c[ua>>2]=c[e+(h<<2)>>2];e=c[y>>2]|
0;u[l+e>>0]=u[l+(e+-1)>>0]|0;u[(c[r>>2]|0)+-1>>0]=u[c[m>>2]>>0]|0;g=0;ga(81,a|0,0);e=g;g=0;if(e&1){k=30;break c}e=c[D>>2]|0;c[e+(h<<2)>>2]=c[ua>>2];l=(c[m>>2]|0)+L|0;c[m>>2]=l;b=(c[r>>2]|0)+L|0;c[r>>2]=b;h=h+1|0}while((h|0)<(M|0))}e=c[t>>2]|0;if((e|0)<=(E|0)&&(E|0)<((c[z>>2]|0)+e|0)&&(e=c[I>>2]|0,g=0,pa(c[(c[e>>2]|0)+8>>2]|0,e|0,b+((c[S>>2]|0)-n)|0,c[A>>2]|0,L|0),e=g,g=0,e&1)){k=31;break}E=E+1|0;if((E|0)>=(c[k>>2]|0)){k=43;break b}}30==(k|0)?l=J()|0:31==(k|0)&&(l=J()|0)}else k=43;while(0);do if(43==
(k|0))if(g=0,ta(183,a|0),a=g,g=0,a&1)l=J()|0;else{if(l=b=c[D>>2]|0)h=c[O>>2]|0,(h|0)!=(b|0)&&(c[O>>2]=h+(~((h+-4-l|0)>>>2)<<2)),Q(b);b=c[w>>2]|0;if(!b){F=B;break a}(c[G>>2]|0)!=(b|0)&&(c[G>>2]=b);Q(b);F=B;break a}while(0);if(h=b=c[D>>2]|0)e=c[O>>2]|0,(e|0)!=(b|0)&&(c[O>>2]=e+(~((e+-4-h|0)>>>2)<<2)),Q(b)}(b=c[w>>2]|0)||V(l|0);(c[G>>2]|0)!=(b|0)&&(c[G>>2]=b);Q(b);V(l|0)}a=c[p+116>>2]|0;for(p=c[p+112>>2]|0;!(l=a+-1|0,b=-1==(u[l>>0]|0)?7:8,(p|0)<(b|0));)a=l,p=p-b|0;a=a-f|0;if(l=c[H>>2]|0)c[H>>2]=l+a,
d=d+8|0,c[d>>2]=(c[d>>2]|0)-a},function(p,a,b,d,l){p|=0;a|=0;b|=0;d|=0;l|=0;var f=0,H=0,H=p+88|0,f=c[a>>2]|0;c[a>>2]=0;a=c[H>>2]|0;c[H>>2]=f;if(a)Ha[c[(c[a>>2]|0)+4>>2]&255](a);H=d+4|0;f=c[H>>2]|0;u[p+4596>>0]=l&1;a=p+132|0;c[a>>2]=c[b>>2];c[a+4>>2]=c[b+4>>2];c[a+8>>2]=c[b+8>>2];c[a+12>>2]=c[b+12>>2];la(p,d);a:{a=p|0;var h=l=b=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,S=0,I=0,ua=0,E=0,y=0,L=0,M=0,D=0,B=0,O=0,w=0,G=0,B=F;F=F+32|0;w=B+12|0;D=B;y=a+148|0;L=(c[y>>2]|0)+4|0;M=1==(c[a+28>>2]|0)?c[a+20>>
2]|0:1;b=ia(M<<1,L)|0;c[w>>2]=0;G=w+4|0;c[G>>2]=0;c[w+8>>2]=0;b&&(0>(b|0)&&(g=0,ta(178,w|0),O=g,g=0,O&1)||(m=6),6!=(m|0)||(l=b<<1,g=0,h=ca(67,l|0)|0,O=g,g=0,O&1)?(h=J()|0,(b=c[w>>2]|0)||V(h|0),l=c[G>>2]|0,(l|0)!=(b|0)&&(c[G>>2]=l+(~((l+-2-b|0)>>>1)<<1)),Q(b),V(h|0)):(c[w>>2]=h,O=h+(b<<1)|0,c[w+8>>2]=O,Za(h|0,0,l|0)|0,c[G>>2]=O));c[D>>2]=0;O=D+4|0;c[O>>2]=0;c[D+8>>2]=0;if(M)if(1073741823<M>>>0&&(g=0,ta(178,D|0),E=g,g=0,E&1)||(m=16),16!=(m|0)||(e=M<<2,g=0,k=ca(67,e|0)|0,E=g,g=0,E&1)){if(h=J()|0,l=b=
c[D>>2]|0)e=c[O>>2]|0,(e|0)!=(b|0)&&(c[O>>2]=e+(~((e+-4-l|0)>>>2)<<2)),Q(b)}else c[D>>2]=k,m=k+(M<<2)|0,c[D+8>>2]=m,Za(k|0,0,e|0)|0,c[O>>2]=m,m=18;else m=18;if(18==(m|0)){k=a+8|0;b:do if(0<(c[k>>2]|0)){m=a+4572|0;n=ia(M,L)|0;q=n+1|0;r=a+4576|0;x=0<(M|0);t=a+136|0;z=a+144|0;A=a+140|0;S=a+132|0;I=a+88|0;ua=a+4568|0;E=0;c:for(;;){h=c[w>>2]|0;l=h+2|0;c[m>>2]=l;h=h+(q<<1)|0;c[r>>2]=h;E&1?(c[m>>2]=h,b=c[r>>2]=l,l=h):b=h;if(x){e=c[D>>2]|0;h=0;do{c[ua>>2]=c[e+(h<<2)>>2];e=c[y>>2]|0;R[l+(e<<1)>>1]=R[l+(e+
-1<<1)>>1]|0;R[b+-2>>1]=R[l>>1]|0;g=0;ga(80,a|0,0);e=g;g=0;if(e&1){m=29;break c}e=c[D>>2]|0;c[e+(h<<2)>>2]=c[ua>>2];l=(c[m>>2]|0)+(L<<1)|0;c[m>>2]=l;b=(c[r>>2]|0)+(L<<1)|0;c[r>>2]=b;h=h+1|0}while((h|0)<(M|0))}e=c[t>>2]|0;if((e|0)<=(E|0)&&(E|0)<((c[z>>2]|0)+e|0)&&(e=c[I>>2]|0,g=0,pa(c[(c[e>>2]|0)+8>>2]|0,e|0,b+((c[S>>2]|0)-n<<1)|0,c[A>>2]|0,L|0),e=g,g=0,e&1)){m=30;break}E=E+1|0;if((E|0)>=(c[k>>2]|0)){m=42;break b}}29==(m|0)?h=J()|0:30==(m|0)&&(h=J()|0)}else m=42;while(0);do if(42==(m|0))if(g=0,ta(183,
a|0),a=g,g=0,a&1)h=J()|0;else{if(l=b=c[D>>2]|0)h=c[O>>2]|0,(h|0)!=(b|0)&&(c[O>>2]=h+(~((h+-4-l|0)>>>2)<<2)),Q(b);b=c[w>>2]|0;if(!b){F=B;break a}l=c[G>>2]|0;(l|0)!=(b|0)&&(c[G>>2]=l+(~((l+-2-b|0)>>>1)<<1));Q(b);F=B;break a}while(0);if(l=b=c[D>>2]|0)e=c[O>>2]|0,(e|0)!=(b|0)&&(c[O>>2]=e+(~((e+-4-l|0)>>>2)<<2)),Q(b)}(b=c[w>>2]|0)||V(h|0);l=c[G>>2]|0;(l|0)!=(b|0)&&(c[G>>2]=l+(~((l+-2-b|0)>>>1)<<1));Q(b);V(h|0)}a=c[p+116>>2]|0;for(p=c[p+112>>2]|0;!(l=a+-1|0,b=-1==(u[l>>0]|0)?7:8,(p|0)<(b|0));)a=l,p=p-b|
0;a=a-f|0;if(l=c[H>>2]|0)c[H>>2]=l+a,d=d+8|0,c[d>>2]=(c[d>>2]|0)-a},function(p,a,b,d,l){p|=0;a|=0;b|=0;d|=0;l|=0;var f=0,h=0,h=p+88|0,f=c[a>>2]|0;c[a>>2]=0;a=c[h>>2]|0;c[h>>2]=f;if(a)Ha[c[(c[a>>2]|0)+4>>2]&255](a);h=d+4|0;f=c[h>>2]|0;u[p+4596>>0]=l&1;a=p+132|0;c[a>>2]=c[b>>2];c[a+4>>2]=c[b+4>>2];c[a+8>>2]=c[b+8>>2];c[a+12>>2]=c[b+12>>2];la(p,d);a:{a=p|0;var e=l=b=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,E=0,S=0,I=0,ua=0,y=0,L=0,M=0,D=0,B=0,O=0,w=0,G=0,P=0,O=F;F=F+32|0;G=O+12|0;B=O;L=a+148|0;M=(c[L>>
2]|0)+4|0;D=1==(c[a+28>>2]|0)?c[a+20>>2]|0:1;b=ia(D<<1,M)|0;c[G>>2]=0;P=G+4|0;c[P>>2]=0;c[G+8>>2]=0;b&&(0>(b|0)&&(g=0,ta(178,G|0),w=g,g=0,w&1)||(n=6),6!=(n|0)||(l=b<<1,g=0,e=ca(67,l|0)|0,w=g,g=0,w&1)?(e=J()|0,(b=c[G>>2]|0)||V(e|0),l=c[P>>2]|0,(l|0)!=(b|0)&&(c[P>>2]=l+(~((l+-2-b|0)>>>1)<<1)),Q(b),V(e|0)):(c[G>>2]=e,w=e+(b<<1)|0,c[G+8>>2]=w,Za(e|0,0,l|0)|0,c[P>>2]=w));c[B>>2]=0;w=B+4|0;c[w>>2]=0;c[B+8>>2]=0;if(D)if(1073741823<D>>>0&&(g=0,ta(178,B|0),y=g,g=0,y&1)||(n=16),16!=(n|0)||(k=D<<2,g=0,m=ca(67,
k|0)|0,y=g,g=0,y&1)){if(e=J()|0,l=b=c[B>>2]|0)k=c[w>>2]|0,(k|0)!=(b|0)&&(c[w>>2]=k+(~((k+-4-l|0)>>>2)<<2)),Q(b)}else c[B>>2]=m,n=m+(D<<2)|0,c[B+8>>2]=n,Za(m|0,0,k|0)|0,c[w>>2]=n,n=18;else n=18;if(18==(n|0)){m=a+8|0;b:do if(0<(c[m>>2]|0)){n=a+4572|0;q=ia(D,M)|0;r=q+1|0;x=a+4576|0;t=0<(D|0);z=a+136|0;A=a+144|0;E=a+140|0;S=a+132|0;I=a+88|0;ua=a+4568|0;y=0;c:for(;;){e=c[G>>2]|0;l=e+2|0;c[n>>2]=l;e=e+(r<<1)|0;c[x>>2]=e;y&1?(c[n>>2]=e,b=c[x>>2]=l,l=e):b=e;if(t){k=c[B>>2]|0;e=0;do{c[ua>>2]=c[k+(e<<2)>>2];
k=c[L>>2]|0;R[l+(k<<1)>>1]=R[l+(k+-1<<1)>>1]|0;R[b+-2>>1]=R[l>>1]|0;g=0;ga(79,a|0,0);k=g;g=0;if(k&1){n=29;break c}k=c[B>>2]|0;c[k+(e<<2)>>2]=c[ua>>2];l=(c[n>>2]|0)+(M<<1)|0;c[n>>2]=l;b=(c[x>>2]|0)+(M<<1)|0;c[x>>2]=b;e=e+1|0}while((e|0)<(D|0))}k=c[z>>2]|0;if((k|0)<=(y|0)&&(y|0)<((c[A>>2]|0)+k|0)&&(k=c[I>>2]|0,g=0,pa(c[(c[k>>2]|0)+8>>2]|0,k|0,b+((c[S>>2]|0)-q<<1)|0,c[E>>2]|0,M|0),k=g,g=0,k&1)){n=30;break}y=y+1|0;if((y|0)>=(c[m>>2]|0)){n=42;break b}}29==(n|0)?e=J()|0:30==(n|0)&&(e=J()|0)}else n=42;while(0);
do if(42==(n|0))if(g=0,ta(183,a|0),a=g,g=0,a&1)e=J()|0;else{if(l=b=c[B>>2]|0)e=c[w>>2]|0,(e|0)!=(b|0)&&(c[w>>2]=e+(~((e+-4-l|0)>>>2)<<2)),Q(b);b=c[G>>2]|0;if(!b){F=O;break a}l=c[P>>2]|0;(l|0)!=(b|0)&&(c[P>>2]=l+(~((l+-2-b|0)>>>1)<<1));Q(b);F=O;break a}while(0);if(l=b=c[B>>2]|0)k=c[w>>2]|0,(k|0)!=(b|0)&&(c[w>>2]=k+(~((k+-4-l|0)>>>2)<<2)),Q(b)}(b=c[G>>2]|0)||V(e|0);l=c[P>>2]|0;(l|0)!=(b|0)&&(c[P>>2]=l+(~((l+-2-b|0)>>>1)<<1));Q(b);V(e|0)}a=c[p+116>>2]|0;for(p=c[p+112>>2]|0;!(l=a+-1|0,b=-1==(u[l>>0]|
0)?7:8,(p|0)<(b|0));)a=l,p=p-b|0;a=a-f|0;if(l=c[h>>2]|0)c[h>>2]=l+a,d=d+8|0,c[d>>2]=(c[d>>2]|0)-a},function(p,a,b,d,l){p|=0;a|=0;b|=0;d|=0;l|=0;var f=0,h=0,h=p+88|0,f=c[a>>2]|0;c[a>>2]=0;a=c[h>>2]|0;c[h>>2]=f;if(a)Ha[c[(c[a>>2]|0)+4>>2]&255](a);h=d+4|0;f=c[h>>2]|0;u[p+4620>>0]=l&1;a=p+156|0;c[a>>2]=c[b>>2];c[a+4>>2]=c[b+4>>2];c[a+8>>2]=c[b+8>>2];c[a+12>>2]=c[b+12>>2];la(p,d);a:{a=p|0;var e=l=b=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,E=0,S=0,I=0,ua=0,y=0,L=0,M=0,D=0,B=0,O=0,w=0,G=0,P=0,O=F;F=F+32|0;
G=O+12|0;B=O;L=a+172|0;M=(c[L>>2]|0)+4|0;D=1==(c[a+28>>2]|0)?c[a+20>>2]|0:1;b=ia(D<<1,M)|0;c[G>>2]=0;P=G+4|0;c[P>>2]=0;c[G+8>>2]=0;b:do if(b){1431655765<b>>>0&&(g=0,ta(178,G|0),w=g,g=0,w&1)||(m=6);if(6==(m|0)&&(g=0,l=ca(67,3*b|0)|0,w=g,g=0,!(w&1)))for(c[P>>2]=l,c[G>>2]=l,c[G+8>>2]=l+(3*b|0);;)if(u[l>>0]=0,u[l+1>>0]=0,u[l+2>>0]=0,l=(c[P>>2]|0)+3|0,c[P>>2]=l,b=b+-1|0,!b)break b;e=J()|0;(b=c[G>>2]|0)||V(e|0);l=c[P>>2]|0;(l|0)!=(b|0)&&(c[P>>2]=l+(3*~(((l+-3-b|0)>>>0)/3|0)|0));Q(b);V(e|0)}while(0);c[B>>
2]=0;w=B+4|0;c[w>>2]=0;c[B+8>>2]=0;if(D)if(1073741823<D>>>0&&(g=0,ta(178,B|0),y=g,g=0,y&1)||(m=17),17!=(m|0)||(e=D<<2,g=0,k=ca(67,e|0)|0,y=g,g=0,y&1)){if(e=J()|0,l=b=c[B>>2]|0)k=c[w>>2]|0,(k|0)!=(b|0)&&(c[w>>2]=k+(~((k+-4-l|0)>>>2)<<2)),Q(b)}else c[B>>2]=k,m=k+(D<<2)|0,c[B+8>>2]=m,Za(k|0,0,e|0)|0,c[w>>2]=m,m=19;else m=19;if(19==(m|0)){m=a+8|0;b:do if(0<(c[m>>2]|0)){n=a+4596|0;q=ia(D,M)|0;r=q+1|0;x=a+4600|0;t=0<(D|0);z=a+160|0;A=a+168|0;E=a+164|0;S=a+156|0;I=a+88|0;ua=a+4592|0;y=0;c:for(;;){e=c[G>>
2]|0;l=e+3|0;c[n>>2]=l;e=e+(3*r|0)|0;c[x>>2]=e;y&1?(c[n>>2]=e,b=c[x>>2]=l,l=e):b=e;if(t){k=c[B>>2]|0;e=0;do{c[ua>>2]=c[k+(e<<2)>>2];b=c[L>>2]|0;k=l+(3*b|0)|0;l=l+(3*(b+-1|0)|0)|0;u[k>>0]=u[l>>0]|0;u[k+1>>0]=u[l+1>>0]|0;u[k+2>>0]=u[l+2>>0]|0;l=c[n>>2]|0;k=(c[x>>2]|0)+-3|0;u[k>>0]=u[l>>0]|0;u[k+1>>0]=u[l+1>>0]|0;u[k+2>>0]=u[l+2>>0]|0;g=0;ga(78,a|0,0);k=g;g=0;if(k&1){m=30;break c}k=c[B>>2]|0;c[k+(e<<2)>>2]=c[ua>>2];l=(c[n>>2]|0)+(3*M|0)|0;c[n>>2]=l;b=(c[x>>2]|0)+(3*M|0)|0;c[x>>2]=b;e=e+1|0}while((e|
0)<(D|0))}k=c[z>>2]|0;if((k|0)<=(y|0)&&(y|0)<((c[A>>2]|0)+k|0)&&(k=c[I>>2]|0,g=0,pa(c[(c[k>>2]|0)+8>>2]|0,k|0,b+(3*((c[S>>2]|0)-q|0)|0)|0,c[E>>2]|0,M|0),k=g,g=0,k&1)){m=31;break}y=y+1|0;if((y|0)>=(c[m>>2]|0)){m=43;break b}}30==(m|0)?e=J()|0:31==(m|0)&&(e=J()|0)}else m=43;while(0);do if(43==(m|0))if(g=0,ta(183,a|0),a=g,g=0,a&1)e=J()|0;else{if(l=b=c[B>>2]|0)e=c[w>>2]|0,(e|0)!=(b|0)&&(c[w>>2]=e+(~((e+-4-l|0)>>>2)<<2)),Q(b);b=c[G>>2]|0;if(!b){F=O;break a}l=c[P>>2]|0;(l|0)!=(b|0)&&(c[P>>2]=l+(3*~(((l+
-3-b|0)>>>0)/3|0)|0));Q(b);F=O;break a}while(0);if(l=b=c[B>>2]|0)k=c[w>>2]|0,(k|0)!=(b|0)&&(c[w>>2]=k+(~((k+-4-l|0)>>>2)<<2)),Q(b)}(b=c[G>>2]|0)||V(e|0);l=c[P>>2]|0;(l|0)!=(b|0)&&(c[P>>2]=l+(3*~(((l+-3-b|0)>>>0)/3|0)|0));Q(b);V(e|0)}a=c[p+116>>2]|0;for(p=c[p+112>>2]|0;!(l=a+-1|0,b=-1==(u[l>>0]|0)?7:8,(p|0)<(b|0));)a=l,p=p-b|0;a=a-f|0;if(l=c[h>>2]|0)c[h>>2]=l+a,d=d+8|0,c[d>>2]=(c[d>>2]|0)-a},function(p,a,b,d,l){p|=0;a|=0;b|=0;d|=0;l|=0;var f=0,h=0,h=p+88|0,f=c[a>>2]|0;c[a>>2]=0;a=c[h>>2]|0;c[h>>2]=
f;if(a)Ha[c[(c[a>>2]|0)+4>>2]&255](a);h=d+4|0;f=c[h>>2]|0;u[p+4620>>0]=l&1;a=p+156|0;c[a>>2]=c[b>>2];c[a+4>>2]=c[b+4>>2];c[a+8>>2]=c[b+8>>2];c[a+12>>2]=c[b+12>>2];la(p,d);a:{a=p|0;var e=l=b=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,E=0,S=0,I=0,ua=0,y=0,L=0,M=0,D=0,B=0,O=0,w=0,G=0,P=0,O=F;F=F+32|0;G=O+12|0;B=O;L=a+172|0;M=(c[L>>2]|0)+4|0;D=1==(c[a+28>>2]|0)?c[a+20>>2]|0:1;b=ia(D<<1,M)|0;c[G>>2]=0;P=G+4|0;c[P>>2]=0;c[G+8>>2]=0;do if(b)if(715827882<b>>>0&&(g=0,ta(178,G|0),w=g,g=0,w&1)||(n=6),6!=(n|0)||(g=
0,l=ca(67,6*b|0)|0,w=g,g=0,w&1))e=J()|0,(b=c[G>>2]|0)||V(e|0),l=c[P>>2]|0,(l|0)!=(b|0)&&(c[P>>2]=l+(6*~(((l+-6-b|0)>>>0)/6|0)|0)),Q(b),V(e|0);else{c[P>>2]=l;c[G>>2]=l;e=l+(6*b|0)|0;for(c[G+8>>2]=e;;)if(R[l>>1]=0,R[l+2>>1]=0,R[l+4>>1]=0,b=b+-1|0)l=l+6|0;else break;c[P>>2]=e}while(0);c[B>>2]=0;w=B+4|0;c[w>>2]=0;c[B+8>>2]=0;if(D)if(1073741823<D>>>0&&(g=0,ta(178,B|0),y=g,g=0,y&1)||(n=18),18!=(n|0)||(k=D<<2,g=0,m=ca(67,k|0)|0,y=g,g=0,y&1)){if(e=J()|0,l=b=c[B>>2]|0)k=c[w>>2]|0,(k|0)!=(b|0)&&(c[w>>2]=k+
(~((k+-4-l|0)>>>2)<<2)),Q(b)}else c[B>>2]=m,n=m+(D<<2)|0,c[B+8>>2]=n,Za(m|0,0,k|0)|0,c[w>>2]=n,n=20;else n=20;if(20==(n|0)){m=a+8|0;b:do if(0<(c[m>>2]|0)){n=a+4596|0;q=ia(D,M)|0;r=q+1|0;x=a+4600|0;t=0<(D|0);z=a+160|0;A=a+168|0;E=a+164|0;S=a+156|0;I=a+88|0;ua=a+4592|0;y=0;c:for(;;){e=c[G>>2]|0;l=e+6|0;c[n>>2]=l;e=e+(6*r|0)|0;c[x>>2]=e;y&1?(c[n>>2]=e,b=c[x>>2]=l,l=e):b=e;if(t){k=c[B>>2]|0;e=0;do{c[ua>>2]=c[k+(e<<2)>>2];b=c[L>>2]|0;k=l+(6*b|0)|0;l=l+(6*(b+-1|0)|0)|0;R[k>>1]=R[l>>1]|0;R[k+2>>1]=R[l+2>>
1]|0;R[k+4>>1]=R[l+4>>1]|0;k=(c[x>>2]|0)+-6|0;l=c[n>>2]|0;R[k>>1]=R[l>>1]|0;R[k+2>>1]=R[l+2>>1]|0;R[k+4>>1]=R[l+4>>1]|0;g=0;ga(77,a|0,0);k=g;g=0;if(k&1){n=31;break c}k=c[B>>2]|0;c[k+(e<<2)>>2]=c[ua>>2];l=(c[n>>2]|0)+(6*M|0)|0;c[n>>2]=l;b=(c[x>>2]|0)+(6*M|0)|0;c[x>>2]=b;e=e+1|0}while((e|0)<(D|0))}k=c[z>>2]|0;if((k|0)<=(y|0)&&(y|0)<((c[A>>2]|0)+k|0)&&(k=c[I>>2]|0,g=0,pa(c[(c[k>>2]|0)+8>>2]|0,k|0,b+(6*((c[S>>2]|0)-q|0)|0)|0,c[E>>2]|0,M|0),k=g,g=0,k&1)){n=32;break}y=y+1|0;if((y|0)>=(c[m>>2]|0)){n=44;
break b}}31==(n|0)?e=J()|0:32==(n|0)&&(e=J()|0)}else n=44;while(0);do if(44==(n|0))if(g=0,ta(183,a|0),a=g,g=0,a&1)e=J()|0;else{if(l=b=c[B>>2]|0)e=c[w>>2]|0,(e|0)!=(b|0)&&(c[w>>2]=e+(~((e+-4-l|0)>>>2)<<2)),Q(b);b=c[G>>2]|0;if(!b){F=O;break a}l=c[P>>2]|0;(l|0)!=(b|0)&&(c[P>>2]=l+(6*~(((l+-6-b|0)>>>0)/6|0)|0));Q(b);F=O;break a}while(0);if(l=b=c[B>>2]|0)k=c[w>>2]|0,(k|0)!=(b|0)&&(c[w>>2]=k+(~((k+-4-l|0)>>>2)<<2)),Q(b)}(b=c[G>>2]|0)||V(e|0);l=c[P>>2]|0;(l|0)!=(b|0)&&(c[P>>2]=l+(6*~(((l+-6-b|0)>>>0)/6|
0)|0));Q(b);V(e|0)}a=c[p+116>>2]|0;for(p=c[p+112>>2]|0;!(l=a+-1|0,b=-1==(u[l>>0]|0)?7:8,(p|0)<(b|0));)a=l,p=p-b|0;a=a-f|0;if(l=c[h>>2]|0)c[h>>2]=l+a,d=d+8|0,c[d>>2]=(c[d>>2]|0)-a},function(p,a,b,d,l){p|=0;a|=0;b|=0;d|=0;l|=0;var f=0,h=0,h=p+88|0,f=c[a>>2]|0;c[a>>2]=0;a=c[h>>2]|0;c[h>>2]=f;if(a)Ha[c[(c[a>>2]|0)+4>>2]&255](a);h=d+4|0;f=c[h>>2]|0;u[p+4620>>0]=l&1;a=p+156|0;c[a>>2]=c[b>>2];c[a+4>>2]=c[b+4>>2];c[a+8>>2]=c[b+8>>2];c[a+12>>2]=c[b+12>>2];la(p,d);a:{a=p|0;var e=l=b=0,k=0,m=0,n=0,q=0,r=0,x=
0,t=0,z=0,A=0,E=0,S=0,I=0,ua=0,y=0,L=0,M=0,D=0,B=0,O=0,w=0,G=0,P=0,O=F;F=F+32|0;G=O+12|0;B=O;L=a+172|0;M=(c[L>>2]|0)+4|0;D=1==(c[a+28>>2]|0)?c[a+20>>2]|0:1;b=ia(D<<1,M)|0;c[G>>2]=0;P=G+4|0;c[P>>2]=0;c[G+8>>2]=0;b&&(0>(b|0)&&(g=0,ta(178,G|0),w=g,g=0,w&1)||(n=6),6!=(n|0)||(l=b<<1,g=0,e=ca(67,l|0)|0,w=g,g=0,w&1)?(e=J()|0,(b=c[G>>2]|0)||V(e|0),l=c[P>>2]|0,(l|0)!=(b|0)&&(c[P>>2]=l+(~((l+-2-b|0)>>>1)<<1)),Q(b),V(e|0)):(c[G>>2]=e,w=e+(b<<1)|0,c[G+8>>2]=w,Za(e|0,0,l|0)|0,c[P>>2]=w));c[B>>2]=0;w=B+4|0;c[w>>
2]=0;c[B+8>>2]=0;if(D)if(1073741823<D>>>0&&(g=0,ta(178,B|0),y=g,g=0,y&1)||(n=16),16!=(n|0)||(k=D<<2,g=0,m=ca(67,k|0)|0,y=g,g=0,y&1)){if(e=J()|0,l=b=c[B>>2]|0)k=c[w>>2]|0,(k|0)!=(b|0)&&(c[w>>2]=k+(~((k+-4-l|0)>>>2)<<2)),Q(b)}else c[B>>2]=m,n=m+(D<<2)|0,c[B+8>>2]=n,Za(m|0,0,k|0)|0,c[w>>2]=n,n=18;else n=18;if(18==(n|0)){m=a+8|0;b:do if(0<(c[m>>2]|0)){n=a+4596|0;q=ia(D,M)|0;r=q+1|0;x=a+4600|0;t=0<(D|0);z=a+160|0;A=a+168|0;E=a+164|0;S=a+156|0;I=a+88|0;ua=a+4592|0;y=0;c:for(;;){e=c[G>>2]|0;l=e+2|0;c[n>>
2]=l;e=e+(r<<1)|0;c[x>>2]=e;y&1?(c[n>>2]=e,b=c[x>>2]=l,l=e):b=e;if(t){k=c[B>>2]|0;e=0;do{c[ua>>2]=c[k+(e<<2)>>2];k=c[L>>2]|0;R[l+(k<<1)>>1]=R[l+(k+-1<<1)>>1]|0;R[b+-2>>1]=R[l>>1]|0;g=0;ga(76,a|0,0);k=g;g=0;if(k&1){n=29;break c}k=c[B>>2]|0;c[k+(e<<2)>>2]=c[ua>>2];l=(c[n>>2]|0)+(M<<1)|0;c[n>>2]=l;b=(c[x>>2]|0)+(M<<1)|0;c[x>>2]=b;e=e+1|0}while((e|0)<(D|0))}k=c[z>>2]|0;if((k|0)<=(y|0)&&(y|0)<((c[A>>2]|0)+k|0)&&(k=c[I>>2]|0,g=0,pa(c[(c[k>>2]|0)+8>>2]|0,k|0,b+((c[S>>2]|0)-q<<1)|0,c[E>>2]|0,M|0),k=g,g=0,
k&1)){n=30;break}y=y+1|0;if((y|0)>=(c[m>>2]|0)){n=42;break b}}29==(n|0)?e=J()|0:30==(n|0)&&(e=J()|0)}else n=42;while(0);do if(42==(n|0))if(g=0,ta(183,a|0),a=g,g=0,a&1)e=J()|0;else{if(l=b=c[B>>2]|0)e=c[w>>2]|0,(e|0)!=(b|0)&&(c[w>>2]=e+(~((e+-4-l|0)>>>2)<<2)),Q(b);b=c[G>>2]|0;if(!b){F=O;break a}l=c[P>>2]|0;(l|0)!=(b|0)&&(c[P>>2]=l+(~((l+-2-b|0)>>>1)<<1));Q(b);F=O;break a}while(0);if(l=b=c[B>>2]|0)k=c[w>>2]|0,(k|0)!=(b|0)&&(c[w>>2]=k+(~((k+-4-l|0)>>>2)<<2)),Q(b)}(b=c[G>>2]|0)||V(e|0);l=c[P>>2]|0;(l|
0)!=(b|0)&&(c[P>>2]=l+(~((l+-2-b|0)>>>1)<<1));Q(b);V(e|0)}a=c[p+116>>2]|0;for(p=c[p+112>>2]|0;!(l=a+-1|0,b=-1==(u[l>>0]|0)?7:8,(p|0)<(b|0));)a=l,p=p-b|0;a=a-f|0;if(l=c[h>>2]|0)c[h>>2]=l+a,d=d+8|0,c[d>>2]=(c[d>>2]|0)-a},function(p,a,b,g,l){p|=0;a|=0;b|=0;g|=0;var d=l=0;(p|0)==(c[a+8>>2]|0)?(c[a+4>>2]|0)==(b|0)&&(d=a+28|0,1!=(c[d>>2]|0))&&(c[d>>2]=g):(p|0)==(c[a>>2]|0)&&((c[a+16>>2]|0)!=(b|0)&&(l=a+20|0,(c[l>>2]|0)!=(b|0))?(c[a+32>>2]=g,c[l>>2]=b,l=a+40|0,c[l>>2]=(c[l>>2]|0)+1,1==(c[a+36>>2]|0)&&2==
(c[a+24>>2]|0)&&(u[a+54>>0]=1),c[a+44>>2]=4):1==(g|0)&&(c[a+32>>2]=1))},function(p,a,b,g,l){p|=0;a|=0;b|=0;g|=0;l|=0;var d=0,f=0,h=0,e=0;a:do if((p|0)==(c[a+8>>2]|0))(c[a+4>>2]|0)==(b|0)&&(d=a+28|0,1!=(c[d>>2]|0))&&(c[d>>2]=g);else if((p|0)!=(c[a>>2]|0))h=c[p+8>>2]|0,Cf[c[(c[h>>2]|0)+24>>2]&15](h,a,b,g,l);else if((c[a+16>>2]|0)!=(b|0)&&(f=a+20|0,(c[f>>2]|0)!=(b|0))){if(c[a+32>>2]=g,g=a+44|0,4!=(c[g>>2]|0)){d=a+52|0;u[d>>0]=0;e=a+53|0;u[e>>0]=0;p=c[p+8>>2]|0;ye[c[(c[p>>2]|0)+20>>2]&15](p,a,b,b,1,l);
u[e>>0]|0?u[d>>0]|0||(d=1,h=13):(d=0,h=13);do if(13==(h|0)){c[f>>2]=b;e=a+40|0;c[e>>2]=(c[e>>2]|0)+1;if(1==(c[a+36>>2]|0)&&2==(c[a+24>>2]|0)){if(u[a+54>>0]=1,d)break}else h=16;if(16!=(h|0)||!d){c[g>>2]=4;break a}}while(0);c[g>>2]=3}}else 1==(g|0)&&(c[a+32>>2]=1);while(0)},function(p,a,b,g,l){p|=0;a|=0;b|=0;g|=0;l|=0;var d=0,f=0,h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0;a:do if((p|0)==(c[a+8>>2]|0))(c[a+4>>2]|0)==(b|0)&&(d=a+28|0,1!=(c[d>>2]|0))&&(c[d>>2]=g);else{if((p|0)!=(c[a>>2]|0)){x=c[p+12>>2]|0;h=p+16+
(x<<3)|0;Df(p+16|0,a,b,g,l);d=p+24|0;if(1>=(x|0))break;f=c[p+8>>2]|0;if(0==(f&2|0)&&(e=a+36|0,1!=(c[e>>2]|0))){if(!(f&1))for(f=a+54|0;;){if(u[f>>0]|0)break a;if(1==(c[e>>2]|0))break a;Df(d,a,b,g,l);d=d+8|0;if(d>>>0>=h>>>0)break a}f=a+24|0;for(p=a+54|0;;){if(u[p>>0]|0)break a;if(1==(c[e>>2]|0)&&1==(c[f>>2]|0))break a;Df(d,a,b,g,l);d=d+8|0;if(d>>>0>=h>>>0)break a}}for(f=a+54|0;;){if(u[f>>0]|0)break a;Df(d,a,b,g,l);d=d+8|0;if(d>>>0>=h>>>0)break a}}if((c[a+16>>2]|0)!=(b|0)&&(r=a+20|0,(c[r>>2]|0)!=(b|
0))){if(c[a+32>>2]=g,m=a+44|0,4!=(c[m>>2]|0)){f=c[p+12>>2]|0;h=p+16+(f<<3)|0;e=a+52|0;g=a+53|0;n=a+54|0;k=p+8|0;q=a+24|0;b:do if(0<(f|0))for(d=f=0,p=p+16|0;;){u[e>>0]=0;u[g>>0]=0;og(p,a,b,b,1,l);if(u[n>>0]|0){x=20;break b}do if(u[g>>0]|0){if(!(u[e>>0]|0))if(c[k>>2]&1){d=1;break}else{d=1;x=20;break b}if(1==(c[q>>2]|0))break b;if(c[k>>2]&2)d=f=1;else break b}while(0);p=p+8|0;if(p>>>0>=h>>>0){x=20;break}}else d=f=0,x=20;while(0);do if(20==(x|0)){if((f?0:(c[r>>2]=b,b=a+40|0,c[b>>2]=(c[b>>2]|0)+1,1==(c[a+
36>>2]|0)))&&2==(c[q>>2]|0)){if(u[n>>0]=1,d)break}else x=24;if(24!=(x|0)||!d){c[m>>2]=4;break a}}while(0);c[m>>2]=3}}else 1==(g|0)&&(c[a+32>>2]=1)}while(0)},$e,$e,$e,$e],xi=[Xg,function(p,a,b,d,l,f){a|=0;b|=0;d|=0;l|=0;f=+f;var h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,E=0,S=0,I=0,ua=0,y=0,L=0,M=0,D=0,B=0,w=0,O=0,G=0,P=0,D=F;F=F+384|0;A=D+8|0;h=D;k=D+284|0;m=D+72|0;e=D+184|0;w=D+68|0;y=D+80|0;S=D+77|0;L=D+76|0;O=D+56|0;P=D+44|0;G=D+32|0;n=D+28|0;z=D+84|0;ua=D+24|0;I=D+20|0;E=D+16|0;c[m>>2]=k;eb[A>>
3]=f;k=Ah(k,100,59018,A)|0;do if(99<k>>>0)if(g=0,p=Va(3)|0,M=g,g=0,M&1||(g=0,eb[h>>3]=f,x=fb(17,m|0,p|0,59018,h|0)|0,M=g,g=0,M&1))h=p=0,M=7;else{p=c[m>>2]|0;if(!p){g=0;rb(6);M=g;g=0;if(M&1){h=p=0;M=7;break}p=c[m>>2]|0}(h=e=Ub(x)|0)?(t=e,M=10):(g=0,rb(6),M=g,g=0,M&1?M=7:(t=0,M=10))}else p=h=0,t=e,x=k,M=10;while(0);if(10==(M|0))if(g=0,e=ca(68,d|0)|0,r=g,g=0,r&1)M=7;else{c[w>>2]=e;g=0;r=ma(37,w|0,44220)|0;q=g;g=0;if(q&1||(q=c[m>>2]|0,g=0,fb(c[(c[r>>2]|0)+32>>2]|0,r|0,q|0,q+x|0,t|0)|0,q=g,g=0,q&1))k=
J()|0;else{q=x?45==(u[c[m>>2]>>0]|0):0;c[O>>2]=0;c[O+4>>2]=0;c[O+8>>2]=0;c[P>>2]=0;c[P+4>>2]=0;c[P+8>>2]=0;c[G>>2]=0;c[G+4>>2]=0;g=c[G+8>>2]=0;Te(3,b|0,q|0,w|0,y|0,S|0,L|0,O|0,P|0,G|0,n|0);b=g;g=0;if(b&1)k=J()|0;else{n=c[n>>2]|0;(x|0)>(n|0)?(b=u[G>>0]|0,k=u[P>>0]|0,k=(x-n<<1|1)+n+(0==(b&1)?(b&255)>>>1:c[G+4>>2]|0)+(0==(k&1)?(k&255)>>>1:c[P+4>>2]|0)|0):(b=u[G>>0]|0,k=u[P>>0]|0,k=n+2+(0==(b&1)?(b&255)>>>1:c[G+4>>2]|0)+(0==(k&1)?(k&255)>>>1:c[P+4>>2]|0)|0);100<k>>>0?(m=k=Ub(k)|0)?M=26:(g=0,rb(6),z=g,
g=0,z&1||(k=0,M=26)):(m=0,k=z,M=26);if(26==(M|0)&&(g=0,Lf(1,k|0,ua|0,I|0,c[d+4>>2]|0,t|0,t+x|0,r|0,q|0,y|0,u[S>>0]|0,u[L>>0]|0,O|0,P|0,G|0,n|0),L=g,g=0,L&1?0:(c[E>>2]=c[a>>2],a=c[ua>>2]|0,B=c[I>>2]|0,g=0,c[A>>2]=c[E>>2],B=Wd(39,A|0,k|0,a|0,B|0,d|0,l|0)|0,a=g,g=0,!(a&1))))return m&&($a(m),e=c[w>>2]|0),W(G),W(P),W(O),Na(e)|0,h&&$a(h),p&&$a(p),F=D,B|0;k=J()|0;m&&($a(m),e=c[w>>2]|0)}W(G);W(P);W(O)}Na(e)|0}7==(M|0)&&(k=J()|0);h&&$a(h);p&&$a(p);V(k|0);return 0},function(p,a,b,d,l,f){a|=0;b|=0;d|=0;l|=0;
f=+f;var h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,E=0,S=0,I=0,ua=0,y=0,M=0,L=0,D=0,B=0,w=0,O=0,G=0,P=0,D=F;F=F+992|0;A=D+8|0;h=D;k=D+888|0;m=D+880|0;e=D+480|0;w=D+76|0;y=D+884|0;S=D+72|0;M=D+68|0;O=D+56|0;P=D+44|0;G=D+32|0;n=D+28|0;z=D+80|0;ua=D+24|0;I=D+20|0;E=D+16|0;c[m>>2]=k;eb[A>>3]=f;k=Ah(k,100,59018,A)|0;do if(99<k>>>0)if(g=0,p=Va(3)|0,L=g,g=0,L&1||(g=0,eb[h>>3]=f,x=fb(17,m|0,p|0,59018,h|0)|0,L=g,g=0,L&1))h=p=0,L=7;else{p=c[m>>2]|0;if(!p){g=0;rb(6);L=g;g=0;if(L&1){h=p=0;L=7;break}p=c[m>>
2]|0}(h=e=Ub(x<<2)|0)?(t=e,L=10):(g=0,rb(6),L=g,g=0,L&1?L=7:(t=0,L=10))}else p=h=0,t=e,x=k,L=10;while(0);if(10==(L|0))if(g=0,e=ca(68,d|0)|0,r=g,g=0,r&1)L=7;else{c[w>>2]=e;g=0;r=ma(37,w|0,44212)|0;q=g;g=0;if(q&1||(q=c[m>>2]|0,g=0,fb(c[(c[r>>2]|0)+48>>2]|0,r|0,q|0,q+x|0,t|0)|0,q=g,g=0,q&1))k=J()|0;else{q=x?45==(u[c[m>>2]>>0]|0):0;c[O>>2]=0;c[O+4>>2]=0;c[O+8>>2]=0;c[P>>2]=0;c[P+4>>2]=0;c[P+8>>2]=0;c[G>>2]=0;c[G+4>>2]=0;g=c[G+8>>2]=0;Te(4,b|0,q|0,w|0,y|0,S|0,M|0,O|0,P|0,G|0,n|0);b=g;g=0;if(b&1)k=J()|
0;else{n=c[n>>2]|0;(x|0)>(n|0)?(b=u[G>>0]|0,k=u[P>>0]|0,k=(x-n<<1|1)+n+(0==(b&1)?(b&255)>>>1:c[G+4>>2]|0)+(0==(k&1)?(k&255)>>>1:c[P+4>>2]|0)|0):(b=u[G>>0]|0,k=u[P>>0]|0,k=n+2+(0==(b&1)?(b&255)>>>1:c[G+4>>2]|0)+(0==(k&1)?(k&255)>>>1:c[P+4>>2]|0)|0);100<k>>>0?(m=k=Ub(k<<2)|0)?L=26:(g=0,rb(6),z=g,g=0,z&1||(k=0,L=26)):(m=0,k=z,L=26);if(26==(L|0)&&(g=0,Lf(2,k|0,ua|0,I|0,c[d+4>>2]|0,t|0,t+(x<<2)|0,r|0,q|0,y|0,c[S>>2]|0,c[M>>2]|0,O|0,P|0,G|0,n|0),M=g,g=0,M&1?0:(c[E>>2]=c[a>>2],a=c[ua>>2]|0,B=c[I>>2]|0,g=
0,c[A>>2]=c[E>>2],B=Wd(40,A|0,k|0,a|0,B|0,d|0,l|0)|0,a=g,g=0,!(a&1))))return m&&($a(m),e=c[w>>2]|0),Ka(G),Ka(P),W(O),Na(e)|0,h&&$a(h),p&&$a(p),F=D,B|0;k=J()|0;m&&($a(m),e=c[w>>2]|0)}Ka(G);Ka(P);W(O)}Na(e)|0}7==(L|0)&&(k=J()|0);h&&$a(h);p&&$a(p);V(k|0);return 0},Xg],Ha=[Wa,function(p){p|=0;var a=0,b=0;c[p>>2]=35660;if(a=c[p+4608>>2]|0)b=p+4612|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);c[p>>2]=36736;if(a=c[p+92>>2]|0)b=p+96|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);p=p+88|0;a=c[p>>2]|0;c[p>>2]=0;if(a)Ha[c[(c[a>>
2]|0)+4>>2]&255](a)},function(p){p|=0;var a=0,b=0;c[p>>2]=35660;if(a=c[p+4608>>2]|0)b=p+4612|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);c[p>>2]=36736;if(a=c[p+92>>2]|0)b=p+96|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);b=p+88|0;a=c[b>>2]|0;c[b>>2]=0;if(a)Ha[c[(c[a>>2]|0)+4>>2]&255](a);Q(p)},function(p){p|=0;var a=0,b=0;c[p>>2]=35688;if(a=c[p+4584>>2]|0)b=p+4588|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);c[p>>2]=36736;if(a=c[p+92>>2]|0)b=p+96|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);p=p+88|0;a=c[p>>2]|0;c[p>>2]=
0;if(a)Ha[c[(c[a>>2]|0)+4>>2]&255](a)},function(p){p|=0;var a=0,b=0;c[p>>2]=35688;if(a=c[p+4584>>2]|0)b=p+4588|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);c[p>>2]=36736;if(a=c[p+92>>2]|0)b=p+96|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);b=p+88|0;a=c[b>>2]|0;c[b>>2]=0;if(a)Ha[c[(c[a>>2]|0)+4>>2]&255](a);Q(p)},function(p){p|=0;var a=0,b=0;c[p>>2]=35716;if(a=c[p+4584>>2]|0)b=p+4588|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);c[p>>2]=36736;if(a=c[p+92>>2]|0)b=p+96|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);p=p+88|0;a=
c[p>>2]|0;c[p>>2]=0;if(a)Ha[c[(c[a>>2]|0)+4>>2]&255](a)},function(p){p|=0;var a=0,b=0;c[p>>2]=35716;if(a=c[p+4584>>2]|0)b=p+4588|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);c[p>>2]=36736;if(a=c[p+92>>2]|0)b=p+96|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);b=p+88|0;a=c[b>>2]|0;c[b>>2]=0;if(a)Ha[c[(c[a>>2]|0)+4>>2]&255](a);Q(p)},function(p){p|=0;var a=0,b=0;c[p>>2]=35744;if(a=c[p+4584>>2]|0)b=p+4588|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);c[p>>2]=36736;if(a=c[p+92>>2]|0)b=p+96|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),
Q(a);p=p+88|0;a=c[p>>2]|0;c[p>>2]=0;if(a)Ha[c[(c[a>>2]|0)+4>>2]&255](a)},function(p){p|=0;var a=0,b=0;c[p>>2]=35744;if(a=c[p+4584>>2]|0)b=p+4588|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);c[p>>2]=36736;if(a=c[p+92>>2]|0)b=p+96|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);b=p+88|0;a=c[b>>2]|0;c[b>>2]=0;if(a)Ha[c[(c[a>>2]|0)+4>>2]&255](a);Q(p)},function(p){p|=0;var a=0,b=0;c[p>>2]=35772;if(a=c[p+4584>>2]|0)b=p+4588|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);c[p>>2]=36736;if(a=c[p+92>>2]|0)b=p+96|0,(c[b>>2]|0)!=(a|
0)&&(c[b>>2]=a),Q(a);p=p+88|0;a=c[p>>2]|0;c[p>>2]=0;if(a)Ha[c[(c[a>>2]|0)+4>>2]&255](a)},function(p){p|=0;var a=0,b=0;c[p>>2]=35772;if(a=c[p+4584>>2]|0)b=p+4588|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);c[p>>2]=36736;if(a=c[p+92>>2]|0)b=p+96|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);b=p+88|0;a=c[b>>2]|0;c[b>>2]=0;if(a)Ha[c[(c[a>>2]|0)+4>>2]&255](a);Q(p)},function(p){p|=0;var a=0,b=0;c[p>>2]=35800;if(a=c[p+4608>>2]|0)b=p+4612|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);c[p>>2]=36736;if(a=c[p+92>>2]|0)b=p+96|
0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);p=p+88|0;a=c[p>>2]|0;c[p>>2]=0;if(a)Ha[c[(c[a>>2]|0)+4>>2]&255](a)},function(p){p|=0;var a=0,b=0;c[p>>2]=35800;if(a=c[p+4608>>2]|0)b=p+4612|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);c[p>>2]=36736;if(a=c[p+92>>2]|0)b=p+96|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);b=p+88|0;a=c[b>>2]|0;c[b>>2]=0;if(a)Ha[c[(c[a>>2]|0)+4>>2]&255](a);Q(p)},function(p){p|=0;var a=0,b=0;c[p>>2]=35828;if(a=c[p+4608>>2]|0)b=p+4612|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);c[p>>2]=36736;if(a=c[p+
92>>2]|0)b=p+96|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);p=p+88|0;a=c[p>>2]|0;c[p>>2]=0;if(a)Ha[c[(c[a>>2]|0)+4>>2]&255](a)},function(p){p|=0;var a=0,b=0;c[p>>2]=35828;if(a=c[p+4608>>2]|0)b=p+4612|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);c[p>>2]=36736;if(a=c[p+92>>2]|0)b=p+96|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);b=p+88|0;a=c[b>>2]|0;c[b>>2]=0;if(a)Ha[c[(c[a>>2]|0)+4>>2]&255](a);Q(p)},function(p){p|=0;var a=0,b=0;c[p>>2]=35856;if(a=c[p+4608>>2]|0)b=p+4612|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);c[p>>
2]=36736;if(a=c[p+92>>2]|0)b=p+96|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);p=p+88|0;a=c[p>>2]|0;c[p>>2]=0;if(a)Ha[c[(c[a>>2]|0)+4>>2]&255](a)},function(p){p|=0;var a=0,b=0;c[p>>2]=35856;if(a=c[p+4608>>2]|0)b=p+4612|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);c[p>>2]=36736;if(a=c[p+92>>2]|0)b=p+96|0,(c[b>>2]|0)!=(a|0)&&(c[b>>2]=a),Q(a);b=p+88|0;a=c[b>>2]|0;c[b>>2]=0;if(a)Ha[c[(c[a>>2]|0)+4>>2]&255](a);Q(p)},function(a){a|=0;var b=0,g=0;c[a>>2]=35884;if(b=c[a+4616>>2]|0)g=a+4620|0,(c[g>>2]|0)!=(b|0)&&(c[g>>
2]=b),Q(b);c[a>>2]=36612;if(b=c[a+120>>2]|0)g=a+124|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);g=a+92|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=c[a>>2]|0;c[a>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b)},function(a){a|=0;var b=0,g=0;c[a>>2]=35884;if(b=c[a+4616>>2]|0)g=a+4620|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);c[a>>2]=36612;if(b=c[a+120>>2]|0)g=a+124|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);g=a+92|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);g=a+4|0;b=c[g>>2]|
0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);Q(a)},function(a){a|=0;var b=0,g=0;c[a>>2]=35912;if(b=c[a+4592>>2]|0)g=a+4596|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);c[a>>2]=36612;if(b=c[a+120>>2]|0)g=a+124|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);g=a+92|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=c[a>>2]|0;c[a>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b)},function(a){a|=0;var b=0,g=0;c[a>>2]=35912;if(b=c[a+4592>>2]|0)g=a+4596|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);c[a>>2]=36612;
if(b=c[a+120>>2]|0)g=a+124|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);g=a+92|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);g=a+4|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);Q(a)},function(a){a|=0;var b=0,g=0;c[a>>2]=35940;if(b=c[a+4592>>2]|0)g=a+4596|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);c[a>>2]=36612;if(b=c[a+120>>2]|0)g=a+124|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);g=a+92|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=c[a>>2]|0;c[a>>2]=0;if(b)Ha[c[(c[b>>
2]|0)+4>>2]&255](b)},function(a){a|=0;var b=0,g=0;c[a>>2]=35940;if(b=c[a+4592>>2]|0)g=a+4596|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);c[a>>2]=36612;if(b=c[a+120>>2]|0)g=a+124|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);g=a+92|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);g=a+4|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);Q(a)},function(a){a|=0;var b=0,g=0;c[a>>2]=35968;if(b=c[a+4592>>2]|0)g=a+4596|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);c[a>>2]=36612;if(b=c[a+120>>2]|0)g=a+124|
0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);g=a+92|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=c[a>>2]|0;c[a>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b)},function(a){a|=0;var b=0,g=0;c[a>>2]=35968;if(b=c[a+4592>>2]|0)g=a+4596|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);c[a>>2]=36612;if(b=c[a+120>>2]|0)g=a+124|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);g=a+92|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);g=a+4|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);Q(a)},
function(a){a|=0;var b=0,g=0;c[a>>2]=35996;if(b=c[a+4592>>2]|0)g=a+4596|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);c[a>>2]=36612;if(b=c[a+120>>2]|0)g=a+124|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);g=a+92|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=c[a>>2]|0;c[a>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b)},function(a){a|=0;var b=0,g=0;c[a>>2]=35996;if(b=c[a+4592>>2]|0)g=a+4596|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);c[a>>2]=36612;if(b=c[a+120>>2]|0)g=a+124|0,(c[g>>2]|0)!=(b|0)&&(c[g>>
2]=b),Q(b);g=a+92|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);g=a+4|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);Q(a)},function(a){a|=0;var b=0,g=0;c[a>>2]=36024;if(b=c[a+4616>>2]|0)g=a+4620|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);c[a>>2]=36612;if(b=c[a+120>>2]|0)g=a+124|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);g=a+92|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=c[a>>2]|0;c[a>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b)},function(a){a|=0;var b=0,g=
0;c[a>>2]=36024;if(b=c[a+4616>>2]|0)g=a+4620|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);c[a>>2]=36612;if(b=c[a+120>>2]|0)g=a+124|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);g=a+92|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);g=a+4|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);Q(a)},function(a){a|=0;var b=0,g=0;c[a>>2]=36052;if(b=c[a+4616>>2]|0)g=a+4620|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);c[a>>2]=36612;if(b=c[a+120>>2]|0)g=a+124|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);g=a+92|
0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=c[a>>2]|0;c[a>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b)},function(a){a|=0;var b=0,g=0;c[a>>2]=36052;if(b=c[a+4616>>2]|0)g=a+4620|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);c[a>>2]=36612;if(b=c[a+120>>2]|0)g=a+124|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);g=a+92|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);g=a+4|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);Q(a)},function(a){a|=0;var b=0,g=0;c[a>>2]=36080;if(b=
c[a+4616>>2]|0)g=a+4620|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);c[a>>2]=36612;if(b=c[a+120>>2]|0)g=a+124|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);g=a+92|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=c[a>>2]|0;c[a>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b)},function(a){a|=0;var b=0,g=0;c[a>>2]=36080;if(b=c[a+4616>>2]|0)g=a+4620|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);c[a>>2]=36612;if(b=c[a+120>>2]|0)g=a+124|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);g=a+92|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>
2]|0)+4>>2]&255](b);g=a+4|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);Q(a)},function(c){},function(c){Q(c|0)},function(c){Q(c|0)},function(c){Sc((c|0)+4|0)},Og,function(a){a|=0;Sc(a+((c[(c[a>>2]|0)+-12>>2]|0)+4)|0)},function(a){a|=0;Og(a+(c[(c[a>>2]|0)+-12>>2]|0)|0)},function(a){a|=0;var b=0,g=0;c[a>>2]=36200;b=a+56|0;c[b>>2]=36220;g=a+4|0;c[g>>2]=36236;W(a+36|0);ya(g);sa(b)},function(a){a|=0;var b=0,g=0;c[a>>2]=36200;b=a+56|0;c[b>>2]=36220;g=a+4|0;c[g>>2]=36236;W(a+36|0);ya(g);sa(b);
Q(a)},function(a){a|=0;var b=0,g=0,d=0,d=c[(c[a>>2]|0)+-12>>2]|0;c[a+d>>2]=36200;b=a+(d+56)|0;c[b>>2]=36220;g=a+(d+4)|0;c[g>>2]=36236;W(a+(d+36)|0);ya(g);sa(b)},function(a){a|=0;var b=0,g=0,d=0,l=0,l=c[(c[a>>2]|0)+-12>>2]|0,b=a+l|0;c[b>>2]=36200;g=a+(l+56)|0;c[g>>2]=36220;d=a+(l+4)|0;c[d>>2]=36236;W(a+(l+36)|0);ya(d);sa(g);Q(b)},function(a){a|=0;c[a>>2]=36236;W(a+32|0);ya(a)},function(a){a|=0;c[a>>2]=36236;W(a+32|0);ya(a);Q(a)},function(a){a|=0;var b=0,g=0,d=0;c[a>>2]=36316;if(b=c[a+20>>2]|0)g=a+
24|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);if(d=c[a+8>>2]|0)b=a+12|0,g=c[b>>2]|0,(g|0)!=(d|0)&&(c[b>>2]=g+(~((g+-2-d|0)>>>1)<<1)),Q(d)},function(a){a|=0;var b=0,g=0,d=0;c[a>>2]=36316;if(b=c[a+20>>2]|0)g=a+24|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);if(d=c[a+8>>2]|0)b=a+12|0,g=c[b>>2]|0,(g|0)!=(d|0)&&(c[b>>2]=g+(~((g+-2-d|0)>>>1)<<1)),Q(d);Q(a)},function(a){a|=0;var b=0,g=0,d=0;c[a>>2]=36340;if(b=c[a+20>>2]|0)g=a+24|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);if(d=c[a+8>>2]|0)b=a+12|0,g=c[b>>2]|0,(g|0)!=(d|
0)&&(c[b>>2]=g+(~((g+-2-d|0)>>>1)<<1)),Q(d)},function(a){a|=0;var b=0,g=0,d=0;c[a>>2]=36340;if(b=c[a+20>>2]|0)g=a+24|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);if(d=c[a+8>>2]|0)b=a+12|0,g=c[b>>2]|0,(g|0)!=(d|0)&&(c[b>>2]=g+(~((g+-2-d|0)>>>1)<<1)),Q(d);Q(a)},function(a){a|=0;var b=0,g=0,d=0;c[a>>2]=36364;if(b=c[a+20>>2]|0)g=a+24|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);if(d=c[a+8>>2]|0)b=a+12|0,g=c[b>>2]|0,(g|0)!=(d|0)&&(c[b>>2]=g+(~((g+-2-d|0)>>>1)<<1)),Q(d)},function(a){a|=0;var b=0,g=0,d=0;c[a>>2]=36364;
if(b=c[a+20>>2]|0)g=a+24|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);if(d=c[a+8>>2]|0)b=a+12|0,g=c[b>>2]|0,(g|0)!=(d|0)&&(c[b>>2]=g+(~((g+-2-d|0)>>>1)<<1)),Q(d);Q(a)},function(a){a|=0;var b=0,g=0,d=0;c[a>>2]=36388;if(b=c[a+20>>2]|0)g=a+24|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);if(d=c[a+8>>2]|0)b=a+12|0,g=c[b>>2]|0,(g|0)!=(d|0)&&(c[b>>2]=g+(~((g+-2-d|0)>>>1)<<1)),Q(d)},function(a){a|=0;var b=0,g=0,d=0;c[a>>2]=36388;if(b=c[a+20>>2]|0)g=a+24|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);if(d=c[a+8>>2]|0)b=a+12|
0,g=c[b>>2]|0,(g|0)!=(d|0)&&(c[b>>2]=g+(~((g+-2-d|0)>>>1)<<1)),Q(d);Q(a)},function(a){a|=0;var b=0,g=0,d=0;c[a>>2]=36412;if(b=c[a+20>>2]|0)g=a+24|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);if(d=c[a+8>>2]|0)b=a+12|0,g=c[b>>2]|0,(g|0)!=(d|0)&&(c[b>>2]=g+(~((g+-2-d|0)>>>1)<<1)),Q(d)},function(a){a|=0;var b=0,g=0,d=0;c[a>>2]=36412;if(b=c[a+20>>2]|0)g=a+24|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);if(d=c[a+8>>2]|0)b=a+12|0,g=c[b>>2]|0,(g|0)!=(d|0)&&(c[b>>2]=g+(~((g+-2-d|0)>>>1)<<1)),Q(d);Q(a)},function(a){a|=
0;var b=0,g=0,d=0;c[a>>2]=36436;if(b=c[a+20>>2]|0)g=a+24|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);if(d=c[a+8>>2]|0)b=a+12|0,g=c[b>>2]|0,(g|0)!=(d|0)&&(c[b>>2]=g+(~((g+-2-d|0)>>>1)<<1)),Q(d)},function(a){a|=0;var b=0,g=0,d=0;c[a>>2]=36436;if(b=c[a+20>>2]|0)g=a+24|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);if(d=c[a+8>>2]|0)b=a+12|0,g=c[b>>2]|0,(g|0)!=(d|0)&&(c[b>>2]=g+(~((g+-2-d|0)>>>1)<<1)),Q(d);Q(a)},function(a){a|=0;var b=0,g=0,d=0;c[a>>2]=36460;if(b=c[a+20>>2]|0)g=a+24|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=
b),Q(b);if(d=c[a+8>>2]|0)b=a+12|0,g=c[b>>2]|0,(g|0)!=(d|0)&&(c[b>>2]=g+(~((g+-2-d|0)>>>1)<<1)),Q(d)},function(a){a|=0;var b=0,g=0,d=0;c[a>>2]=36460;if(b=c[a+20>>2]|0)g=a+24|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);if(d=c[a+8>>2]|0)b=a+12|0,g=c[b>>2]|0,(g|0)!=(d|0)&&(c[b>>2]=g+(~((g+-2-d|0)>>>1)<<1)),Q(d);Q(a)},function(a){a|=0;var b=0,g=0;c[a>>2]=36612;if(b=c[a+120>>2]|0)g=a+124|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);g=a+92|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);a=a+4|0;b=c[a>>
2]|0;c[a>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b)},function(a){a|=0;var b=0,g=0;c[a>>2]=36612;if(b=c[a+120>>2]|0)g=a+124|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);g=a+92|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);g=a+4|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);Q(a)},function(a){a|=0;var b=0,g=0;c[a>>2]=36640;if(b=c[a+20>>2]|0)g=a+24|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);if(g=c[a+8>>2]|0)b=a+12|0,(c[b>>2]|0)!=(g|0)&&(c[b>>2]=g),Q(g)},function(a){a|=0;var b=0,g=0;c[a>>
2]=36640;if(b=c[a+20>>2]|0)g=a+24|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);if(b=c[a+8>>2]|0)g=a+12|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);Q(a)},function(a){a|=0;var b=0,g=0;c[a>>2]=36664;if(b=c[a+20>>2]|0)g=a+24|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);if(g=c[a+8>>2]|0)b=a+12|0,(c[b>>2]|0)!=(g|0)&&(c[b>>2]=g),Q(g)},function(a){a|=0;var b=0,g=0;c[a>>2]=36664;if(b=c[a+20>>2]|0)g=a+24|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);if(b=c[a+8>>2]|0)g=a+12|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);Q(a)},function(a){a|=
0;var b=0,g=0;c[a>>2]=36688;if(b=c[a+20>>2]|0)g=a+24|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);if(g=c[a+8>>2]|0)b=a+12|0,(c[b>>2]|0)!=(g|0)&&(c[b>>2]=g),Q(g)},function(a){a|=0;var b=0,g=0;c[a>>2]=36688;if(b=c[a+20>>2]|0)g=a+24|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);if(b=c[a+8>>2]|0)g=a+12|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);Q(a)},function(a){a|=0;var b=0,g=0;c[a>>2]=36712;if(b=c[a+20>>2]|0)g=a+24|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);if(g=c[a+8>>2]|0)b=a+12|0,(c[b>>2]|0)!=(g|0)&&(c[b>>2]=g),Q(g)},
function(a){a|=0;var b=0,g=0;c[a>>2]=36712;if(b=c[a+20>>2]|0)g=a+24|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);if(b=c[a+8>>2]|0)g=a+12|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);Q(a)},function(a){a|=0;var b=0,g=0;c[a>>2]=36736;if(b=c[a+92>>2]|0)g=a+96|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);a=a+88|0;b=c[a>>2]|0;c[a>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b)},function(a){a|=0;var b=0,g=0;c[a>>2]=36736;if(b=c[a+92>>2]|0)g=a+96|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);g=a+88|0;b=c[g>>2]|0;c[g>>2]=0;if(b)Ha[c[(c[b>>
2]|0)+4>>2]&255](b);Q(a)},function(c){},function(c){Q(c|0)},function(a){a|=0;var b=0;c[a>>2]=36800;if(b=c[a+8>>2]|0)a=a+12|0,(c[a>>2]|0)!=(b|0)&&(c[a>>2]=b),Q(b)},function(a){a|=0;var b=0,g=0;c[a>>2]=36800;if(b=c[a+8>>2]|0)g=a+12|0,(c[g>>2]|0)!=(b|0)&&(c[g>>2]=b),Q(b);Q(a)},function(c){},function(c){Q(c|0)},function(c){},function(c){Q(c|0)},sf,function(c){c|=0;sf(c);Q(c)},function(c){},function(c){Q(c|0)},function(c){},function(c){Q(c|0)},function(c){},function(c){},function(c){Q(c|0)},function(c){Q(c|
0)},Ze,function(c){c|=0;Ze(c);Q(c)},function(c){c|=0;Ze(c);Q(c)},ya,function(c){c|=0;ya(c);Q(c)},function(c){c|=0;ya(c);Q(c)},zd,function(c){c|=0;sf(c);Q(c)},function(a){a|=0;c[a>>2]=42760;Vb(a+4|0);Q(a)},function(a){a|=0;c[a>>2]=42824;Vb(a+4|0);Q(a)},function(c){Sc((c|0)+8|0)},Jg,function(a){a|=0;Sc(a+((c[(c[a>>2]|0)+-12>>2]|0)+8)|0)},function(a){a|=0;Jg(a+(c[(c[a>>2]|0)+-12>>2]|0)|0)},function(c){Sc((c|0)+8|0)},Lg,function(a){a|=0;Sc(a+((c[(c[a>>2]|0)+-12>>2]|0)+8)|0)},function(a){a|=0;Lg(a+(c[(c[a>>
2]|0)+-12>>2]|0)|0)},function(c){Sc((c|0)+4|0)},Qg,function(a){a|=0;Sc(a+((c[(c[a>>2]|0)+-12>>2]|0)+4)|0)},function(a){a|=0;Qg(a+(c[(c[a>>2]|0)+-12>>2]|0)|0)},function(c){zd(c|0)},function(c){c|=0;zd(c);Q(c)},Sc,function(c){c|=0;Sc(c);Q(c)},function(c){Q(c|0)},function(c){},function(c){Q(c|0)},function(a){if(a|=0)Ha[c[(c[a>>2]|0)+4>>2]&255](a)},function(c){},function(c){Q(c|0)},function(c){},function(c){Q(c|0)},function(c){},function(c){Q(c|0)},function(c){},function(c){Q(c|0)},function(c){},function(c){Q(c|
0)},function(c){},function(c){Q(c|0)},function(c){},function(c){Q(c|0)},function(c){Lc((c|0)+8|0)},function(c){c|=0;Lc(c+8|0);Q(c)},function(c){Lc((c|0)+8|0)},function(c){c|=0;Lc(c+8|0);Q(c)},function(c){},function(c){Q(c|0)},function(c){},function(c){Q(c|0)},function(c){},function(c){Q(c|0)},function(c){},function(c){Q(c|0)},function(c){},function(c){Q(c|0)},function(c){},function(c){Q(c|0)},function(c){},function(c){Q(c|0)},function(c){},function(c){Q(c|0)},function(c){},function(c){Q(c|0)},function(c){},
function(c){Q(c|0)},fd,function(c){c|=0;fd(c);Q(c)},nd,function(c){c|=0;nd(c);Q(c)},Tg,function(c){c|=0;Tg(c);Q(c)},Rg,function(c){c|=0;Rg(c);Q(c)},Sg,function(c){c|=0;Sg(c);Q(c)},function(c){},function(c){Q(c|0)},function(c){Q(c|0)},function(c){Q(c|0)},function(c){Q(c|0)},function(c){Q(c|0)},function(c){Q(c|0)},function(c){Q(c|0)},function(a){a|=0;u[a>>0]=0;a=a+4|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[a+16>>2]=0;c[a+20>>2]=0;c[a+24>>2]=0;c[a+28>>2]=0},ch,Md,function(a){a|=0;var b=0;if(b=
c[a>>2]|0)a=a+4|0,(c[a>>2]|0)!=(b|0)&&(c[a>>2]=b),Q(b)},cg,function(a){a|=0;var b=0,b=a+16|0;c[b>>2]|=1;c[a+20>>2]&1&&Oh()},function(a){a|=0;var b=0,g=0,d=0,l=0,f=0,h=0,e=0,k=0,m=0,n=0,l=a+104|0;4>(c[l>>2]|0)>>>0&&ka(a);f=a+100|0;h=a+112|0;e=a+96|0;k=a+108|0;m=a+116|0;b=c[f>>2]|0;d=0;do{g=u[h>>0]|0;if(31<(b|0))break;b=c[e>>2]|0;g<<24>>24?(u[c[k>>2]>>0]=b>>>25,c[e>>2]<<=7,b=(c[f>>2]|0)+7|0):(u[c[k>>2]>>0]=b>>>24,c[e>>2]<<=8,b=(c[f>>2]|0)+8|0);c[f>>2]=b;n=c[k>>2]|0;g=-1==(u[n>>0]|0)&1;u[h>>0]=g;c[k>>
2]=n+1;c[l>>2]=(c[l>>2]|0)+-1;c[m>>2]=(c[m>>2]|0)+1;d=d+1|0}while(4>(d|0));g<<24>>24?U(a,0,(b+-1|0)%8|0):U(a,0,(b|0)%8|0);4>(c[l>>2]|0)>>>0&&ka(a);b=c[f>>2]|0;g=0;do{if(31<(b|0))break;b=c[e>>2]|0;u[h>>0]|0?(u[c[k>>2]>>0]=b>>>25,c[e>>2]<<=7,b=(c[f>>2]|0)+7|0):(u[c[k>>2]>>0]=b>>>24,c[e>>2]<<=8,b=(c[f>>2]|0)+8|0);c[f>>2]=b;n=c[k>>2]|0;u[h>>0]=-1==(u[n>>0]|0)&1;c[k>>2]=n+1;c[l>>2]=(c[l>>2]|0)+-1;c[m>>2]=(c[m>>2]|0)+1;g=g+1|0}while(4>(g|0));c[a+132>>2]|0&&ka(a)},function(a){a|=0;var b=0,d=0,f=0,l=0,f=
a+116|0,d=c[f>>2]|0;-1!=(u[d>>0]|0)?(l=a+112|0,b=c[l>>2]|0,1>(b|0)&&(aa(a),b=c[l>>2]|0,d=c[f>>2]|0),a=a+108|0,f=c[a>>2]|0,c[l>>2]=b+-1,b=f<<1,c[a>>2]=b,-1!=(u[d>>0]|0)&&(b=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,b|0,6,35648),a=g,g=0,a&1||Pa(b|0,824,96),a=J()|0,za(b|0),V(a|0))):b=c[a+108>>2]|0;b&&(b=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,b|0,6,35648),a=g,g=0,a&1||Pa(b|0,824,96),a=J()|0,za(b|0),V(a|0))},function(a){var b=0,b=F;F=F+16|
0;$a(a|0);si(c[9255]|0,0)|0?ne(51780,b):F=b},function(c){},function(c){},function(c){g=0;ca(70,41456)|0;c=g;g=0;if(c&1||(g=0,ca(70,41624)|0,c=g,g=0,c&1)||(g=0,ca(71,41796)|0,c=g,g=0,c&1)||(g=0,ca(71,41964)|0,c=g,g=0,c&1))c=J(0)|0,h(c)},function(c){$a(c|0)},function(c){},Mc,function(a){var b=0,b=c[11052]|0;c[11052]=b+1;c[(a|0)+4>>2]=b+1},function(a){a|=0;var b=0,g=0,g=a+4|0,b=c[g>>2]|0,g=c[g+4>>2]|0;a=(c[a>>2]|0)+(g>>1)|0;g&1&&(b=c[(c[a>>2]|0)+b>>2]|0);Ha[b&255](a)},function(c){W(45196);W(45184);W(45172);
W(45160);W(45148);W(45136);W(45124);W(45112);W(45100);W(45088);W(45076);W(45064);W(45052);W(45040)},function(c){Ka(45368);Ka(45356);Ka(45344);Ka(45332);Ka(45320);Ka(45308);Ka(45296);Ka(45284);Ka(45272);Ka(45260);Ka(45248);Ka(45236);Ka(45224);Ka(45212)},function(c){W(46E3);W(45988);W(45976);W(45964);W(45952);W(45940);W(45928);W(45916);W(45904);W(45892);W(45880);W(45868);W(45856);W(45844);W(45832);W(45820);W(45808);W(45796);W(45784);W(45772);W(45760);W(45748);W(45736);W(45724)},function(c){Ka(46292);
Ka(46280);Ka(46268);Ka(46256);Ka(46244);Ka(46232);Ka(46220);Ka(46208);Ka(46196);Ka(46184);Ka(46172);Ka(46160);Ka(46148);Ka(46136);Ka(46124);Ka(46112);Ka(46100);Ka(46088);Ka(46076);Ka(46064);Ka(46052);Ka(46040);Ka(46028);Ka(46016)},function(c){W(47104);W(47092);W(47080);W(47068);W(47056);W(47044);W(47032);W(47020);W(47008);W(46996);W(46984);W(46972);W(46960);W(46948);W(46936);W(46924);W(46912);W(46900);W(46888);W(46876);W(46864);W(46852);W(46840);W(46828)},function(c){Ka(47396);Ka(47384);Ka(47372);
Ka(47360);Ka(47348);Ka(47336);Ka(47324);Ka(47312);Ka(47300);Ka(47288);Ka(47276);Ka(47264);Ka(47252);Ka(47240);Ka(47228);Ka(47216);Ka(47204);Ka(47192);Ka(47180);Ka(47168);Ka(47156);Ka(47144);Ka(47132);Ka(47120)},W,Ka,$a,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa,Wa],bb=[kg,function(a,b){a|=0;b|=0;var g=0,d=0,l=0,f=0,h=0,e=0,k=0,h=F;F=F+32|0;k=h;xb(k,c[a+128>>2]|0,c[a+136>>2]|0);e=c[b+
4>>2]|0;f=c[b+8>>2]|0;f=0==(f|0)?c[k+8>>2]|0:f;l=c[b+12>>2]|0;l=0==(l|0)?c[k+12>>2]|0:l;g=c[b+16>>2]|0;d=c[k+16>>2]|0;c[a+176>>2]=0==(e|0)?c[k+4>>2]|0:e;c[a+180>>2]=f;c[a+184>>2]=l;ei(a);l=a+132|0;b=(c[l>>2]|0)+32|0;b=128>(b|0)?2:(b|0)/64|0;f=0;do c[a+188+(12*f|0)>>2]=b,c[a+188+(12*f|0)+4>>2]=0,R[a+188+(12*f|0)+8>>1]=0,R[a+188+(12*f|0)+10>>1]=1,f=f+1|0;while(365!=(f|0));e=(c[l>>2]|0)+32|0;e=128>(e|0)?2:(e|0)/64|0;k=(0==(g|0)?d:g)&255;c[a+4568>>2]=e;c[a+4572>>2]=0;u[a+4576>>0]=k;u[a+4577>>0]=1;u[a+
4578>>0]=0;c[a+4580>>2]=e;c[a+4584>>2]=1;u[a+4588>>0]=k;u[a+4589>>0]=1;u[a+4590>>0]=0;c[a+4592>>2]=0;F=h},function(a,b){a|=0;b|=0;var g=0,d=0,l=0,f=0,h=0,e=0,l=F;F=F+32|0;e=l;xb(e,255,0);h=c[b+4>>2]|0;f=c[b+8>>2]|0;f=0==(f|0)?c[e+8>>2]|0:f;d=c[b+12>>2]|0;d=0==(d|0)?c[e+12>>2]|0:d;b=c[b+16>>2]|0;g=c[e+16>>2]|0;c[a+152>>2]=0==(h|0)?c[e+4>>2]|0:h;c[a+156>>2]=f;c[a+160>>2]=d;var d=a|0,k=e=h=f=0,m=0,n=0,q=0,r=0,x=0,x=F;F=F+32|0;q=x;xb(q,255,0);r=d+152|0;if((c[q+4>>2]|0)==(c[r>>2]|0)&&(c[q+8>>2]|0)==(c[d+
156>>2]|0)&&(c[q+12>>2]|0)==(c[d+160>>2]|0))r=c[8900]|0,c[d+4580>>2]=r+(((c[8901]|0)-r|0)>>>1);else for(h=d+4584|0,e=d+4588|0,k=c[e>>2]|0,f=c[h>>2]|0,m=k-f|0,512<=m>>>0?512<m>>>0&&(n=f+512|0,(k|0)!=(n|0))&&(c[e>>2]=n):(X(h,512-m|0),f=c[h>>2]|0),q=d+4580|0,c[q>>2]=f+256,n=d+160|0,k=d+156|0,m=-256;;){f=c[n>>2]|0;if((m|0)>(0-f|0))if(h=c[k>>2]|0,(m|0)>(0-h|0))if(e=c[r>>2]|0,(m|0)>(0-e|0))if(0<=(m|0)){if(1>(m|0)){u[(c[q>>2]|0)+m>>0]=0;m=1;continue}f=(e|0)<=(m|0)?(h|0)>(m|0)?2:(f|0)>(m|0)?3:4:1}else f=
-1;else f=-2;else f=-3;else f=-4;u[(c[q>>2]|0)+m>>0]=f;m=m+1|0;if(256==(m|0))break}F=x;d=0;do c[a+164+(12*d|0)>>2]=4,c[a+164+(12*d|0)+4>>2]=0,R[a+164+(12*d|0)+8>>1]=0,R[a+164+(12*d|0)+10>>1]=1,d=d+1|0;while(365!=(d|0));e=(0==(b|0)?g:b)&255;c[a+4544>>2]=4;c[a+4548>>2]=0;u[a+4552>>0]=e;u[a+4553>>0]=1;u[a+4554>>0]=0;c[a+4556>>2]=4;c[a+4560>>2]=1;u[a+4564>>0]=e;u[a+4565>>0]=1;u[a+4566>>0]=0;c[a+4568>>2]=0;F=l},function(a,b){a|=0;b|=0;var g=0,d=0,l=0,f=0,h=0,e=0,l=F;F=F+32|0;e=l;xb(e,255,0);h=c[b+4>>2]|
0;f=c[b+8>>2]|0;f=0==(f|0)?c[e+8>>2]|0:f;d=c[b+12>>2]|0;d=0==(d|0)?c[e+12>>2]|0:d;b=c[b+16>>2]|0;g=c[e+16>>2]|0;c[a+152>>2]=0==(h|0)?c[e+4>>2]|0:h;c[a+156>>2]=f;c[a+160>>2]=d;var d=a|0,k=e=h=f=0,m=0,n=0,q=0,r=0,x=0,x=F;F=F+32|0;q=x;xb(q,255,0);r=d+152|0;if((c[q+4>>2]|0)==(c[r>>2]|0)&&(c[q+8>>2]|0)==(c[d+156>>2]|0)&&(c[q+12>>2]|0)==(c[d+160>>2]|0))r=c[8900]|0,c[d+4580>>2]=r+(((c[8901]|0)-r|0)>>>1);else for(h=d+4584|0,e=d+4588|0,k=c[e>>2]|0,f=c[h>>2]|0,m=k-f|0,512<=m>>>0?512<m>>>0&&(n=f+512|0,(k|0)!=
(n|0))&&(c[e>>2]=n):(X(h,512-m|0),f=c[h>>2]|0),q=d+4580|0,c[q>>2]=f+256,n=d+160|0,k=d+156|0,m=-256;;){f=c[n>>2]|0;if((m|0)>(0-f|0))if(h=c[k>>2]|0,(m|0)>(0-h|0))if(e=c[r>>2]|0,(m|0)>(0-e|0))if(0<=(m|0)){if(1>(m|0)){u[(c[q>>2]|0)+m>>0]=0;m=1;continue}f=(e|0)<=(m|0)?(h|0)>(m|0)?2:(f|0)>(m|0)?3:4:1}else f=-1;else f=-2;else f=-3;else f=-4;u[(c[q>>2]|0)+m>>0]=f;m=m+1|0;if(256==(m|0))break}F=x;d=0;do c[a+164+(12*d|0)>>2]=4,c[a+164+(12*d|0)+4>>2]=0,R[a+164+(12*d|0)+8>>1]=0,R[a+164+(12*d|0)+10>>1]=1,d=d+1|
0;while(365!=(d|0));e=(0==(b|0)?g:b)&255;c[a+4544>>2]=4;c[a+4548>>2]=0;u[a+4552>>0]=e;u[a+4553>>0]=1;u[a+4554>>0]=0;c[a+4556>>2]=4;c[a+4560>>2]=1;u[a+4564>>0]=e;u[a+4565>>0]=1;u[a+4566>>0]=0;c[a+4568>>2]=0;F=l},function(a,b){a|=0;b|=0;var g=0,d=0,l=0,f=0,h=0,e=0,l=F;F=F+32|0;e=l;xb(e,4095,0);h=c[b+4>>2]|0;f=c[b+8>>2]|0;f=0==(f|0)?c[e+8>>2]|0:f;d=c[b+12>>2]|0;d=0==(d|0)?c[e+12>>2]|0:d;b=c[b+16>>2]|0;g=c[e+16>>2]|0;c[a+152>>2]=0==(h|0)?c[e+4>>2]|0:h;c[a+156>>2]=f;c[a+160>>2]=d;var d=a|0,k=e=h=f=0,m=
0,n=0,q=0,r=0,x=0,x=F;F=F+32|0;q=x;xb(q,4095,0);r=d+152|0;if((c[q+4>>2]|0)==(c[r>>2]|0)&&(c[q+8>>2]|0)==(c[d+156>>2]|0)&&(c[q+12>>2]|0)==(c[d+160>>2]|0))r=c[8906]|0,c[d+4580>>2]=r+(((c[8907]|0)-r|0)>>>1);else for(h=d+4584|0,e=d+4588|0,k=c[e>>2]|0,f=c[h>>2]|0,m=k-f|0,8192<=m>>>0?8192<m>>>0&&(n=f+8192|0,(k|0)!=(n|0))&&(c[e>>2]=n):(X(h,8192-m|0),f=c[h>>2]|0),q=d+4580|0,c[q>>2]=f+4096,n=d+160|0,k=d+156|0,m=-4096;;){f=c[n>>2]|0;if((m|0)>(0-f|0))if(h=c[k>>2]|0,(m|0)>(0-h|0))if(e=c[r>>2]|0,(m|0)>(0-e|0))if(0<=
(m|0)){if(1>(m|0)){u[(c[q>>2]|0)+m>>0]=0;m=1;continue}f=(e|0)<=(m|0)?(h|0)>(m|0)?2:(f|0)>(m|0)?3:4:1}else f=-1;else f=-2;else f=-3;else f=-4;u[(c[q>>2]|0)+m>>0]=f;m=m+1|0;if(4096==(m|0))break}F=x;d=0;do c[a+164+(12*d|0)>>2]=64,c[a+164+(12*d|0)+4>>2]=0,R[a+164+(12*d|0)+8>>1]=0,R[a+164+(12*d|0)+10>>1]=1,d=d+1|0;while(365!=(d|0));e=(0==(b|0)?g:b)&255;c[a+4544>>2]=64;c[a+4548>>2]=0;u[a+4552>>0]=e;u[a+4553>>0]=1;u[a+4554>>0]=0;c[a+4556>>2]=64;c[a+4560>>2]=1;u[a+4564>>0]=e;u[a+4565>>0]=1;u[a+4566>>0]=0;
c[a+4568>>2]=0;F=l},function(a,b){a|=0;b|=0;var g=0,d=0,l=0,f=0,e=0,h=0,l=F;F=F+32|0;h=l;xb(h,65535,0);e=c[b+4>>2]|0;f=c[b+8>>2]|0;f=0==(f|0)?c[h+8>>2]|0:f;d=c[b+12>>2]|0;d=0==(d|0)?c[h+12>>2]|0:d;b=c[b+16>>2]|0;g=c[h+16>>2]|0;c[a+152>>2]=0==(e|0)?c[h+4>>2]|0:e;c[a+156>>2]=f;c[a+160>>2]=d;var d=a|0,k=h=e=f=0,m=0,n=0,q=0,r=0,x=0,x=F;F=F+32|0;q=x;xb(q,65535,0);r=d+152|0;if((c[q+4>>2]|0)==(c[r>>2]|0)&&(c[q+8>>2]|0)==(c[d+156>>2]|0)&&(c[q+12>>2]|0)==(c[d+160>>2]|0))r=c[8909]|0,c[d+4580>>2]=r+(((c[8910]|
0)-r|0)>>>1);else for(e=d+4584|0,h=d+4588|0,k=c[h>>2]|0,f=c[e>>2]|0,m=k-f|0,131072<=m>>>0?131072<m>>>0&&(n=f+131072|0,(k|0)!=(n|0))&&(c[h>>2]=n):(X(e,131072-m|0),f=c[e>>2]|0),q=d+4580|0,c[q>>2]=f+65536,n=d+160|0,k=d+156|0,m=-65536;;){f=c[n>>2]|0;if((m|0)>(0-f|0))if(e=c[k>>2]|0,(m|0)>(0-e|0))if(h=c[r>>2]|0,(m|0)>(0-h|0))if(0<=(m|0)){if(1>(m|0)){u[(c[q>>2]|0)+m>>0]=0;m=1;continue}f=(h|0)<=(m|0)?(e|0)>(m|0)?2:(f|0)>(m|0)?3:4:1}else f=-1;else f=-2;else f=-3;else f=-4;u[(c[q>>2]|0)+m>>0]=f;m=m+1|0;if(65536==
(m|0))break}F=x;d=0;do c[a+164+(12*d|0)>>2]=1024,c[a+164+(12*d|0)+4>>2]=0,R[a+164+(12*d|0)+8>>1]=0,R[a+164+(12*d|0)+10>>1]=1,d=d+1|0;while(365!=(d|0));h=(0==(b|0)?g:b)&255;c[a+4544>>2]=1024;c[a+4548>>2]=0;u[a+4552>>0]=h;u[a+4553>>0]=1;u[a+4554>>0]=0;c[a+4556>>2]=1024;c[a+4560>>2]=1;u[a+4564>>0]=h;u[a+4565>>0]=1;u[a+4566>>0]=0;c[a+4568>>2]=0;F=l},function(a,b){a|=0;b|=0;var g=0,d=0,l=0,f=0,h=0,e=0,k=0,h=F;F=F+32|0;k=h;xb(k,c[a+128>>2]|0,c[a+136>>2]|0);e=c[b+4>>2]|0;f=c[b+8>>2]|0;f=0==(f|0)?c[k+8>>
2]|0:f;l=c[b+12>>2]|0;l=0==(l|0)?c[k+12>>2]|0:l;g=c[b+16>>2]|0;d=c[k+16>>2]|0;c[a+176>>2]=0==(e|0)?c[k+4>>2]|0:e;c[a+180>>2]=f;c[a+184>>2]=l;xc(a);l=a+132|0;b=(c[l>>2]|0)+32|0;b=128>(b|0)?2:(b|0)/64|0;f=0;do c[a+188+(12*f|0)>>2]=b,c[a+188+(12*f|0)+4>>2]=0,R[a+188+(12*f|0)+8>>1]=0,R[a+188+(12*f|0)+10>>1]=1,f=f+1|0;while(365!=(f|0));e=(c[l>>2]|0)+32|0;e=128>(e|0)?2:(e|0)/64|0;k=(0==(g|0)?d:g)&255;c[a+4568>>2]=e;c[a+4572>>2]=0;u[a+4576>>0]=k;u[a+4577>>0]=1;u[a+4578>>0]=0;c[a+4580>>2]=e;c[a+4584>>2]=
1;u[a+4588>>0]=k;u[a+4589>>0]=1;u[a+4590>>0]=0;c[a+4592>>2]=0;F=h},function(a,b){a|=0;b|=0;var g=0,d=0,l=0,f=0,e=0,h=0,k=0,e=F;F=F+32|0;k=e;xb(k,c[a+128>>2]|0,c[a+136>>2]|0);h=c[b+4>>2]|0;f=c[b+8>>2]|0;f=0==(f|0)?c[k+8>>2]|0:f;l=c[b+12>>2]|0;l=0==(l|0)?c[k+12>>2]|0:l;g=c[b+16>>2]|0;d=c[k+16>>2]|0;c[a+176>>2]=0==(h|0)?c[k+4>>2]|0:h;c[a+180>>2]=f;c[a+184>>2]=l;wc(a);l=a+132|0;b=(c[l>>2]|0)+32|0;b=128>(b|0)?2:(b|0)/64|0;f=0;do c[a+188+(12*f|0)>>2]=b,c[a+188+(12*f|0)+4>>2]=0,R[a+188+(12*f|0)+8>>1]=0,
R[a+188+(12*f|0)+10>>1]=1,f=f+1|0;while(365!=(f|0));h=(c[l>>2]|0)+32|0;h=128>(h|0)?2:(h|0)/64|0;k=(0==(g|0)?d:g)&255;c[a+4568>>2]=h;c[a+4572>>2]=0;u[a+4576>>0]=k;u[a+4577>>0]=1;u[a+4578>>0]=0;c[a+4580>>2]=h;c[a+4584>>2]=1;u[a+4588>>0]=k;u[a+4589>>0]=1;u[a+4590>>0]=0;c[a+4592>>2]=0;F=e},function(a,b){a|=0;b|=0;var g=0,d=0,l=0,f=0,h=0,e=0,k=0,h=F;F=F+32|0;k=h;xb(k,c[a+128>>2]|0,c[a+136>>2]|0);e=c[b+4>>2]|0;f=c[b+8>>2]|0;f=0==(f|0)?c[k+8>>2]|0:f;l=c[b+12>>2]|0;l=0==(l|0)?c[k+12>>2]|0:l;g=c[b+16>>2]|
0;d=c[k+16>>2]|0;c[a+176>>2]=0==(e|0)?c[k+4>>2]|0:e;c[a+180>>2]=f;c[a+184>>2]=l;Hb(a);l=a+132|0;b=(c[l>>2]|0)+32|0;b=128>(b|0)?2:(b|0)/64|0;f=0;do c[a+188+(12*f|0)>>2]=b,c[a+188+(12*f|0)+4>>2]=0,R[a+188+(12*f|0)+8>>1]=0,R[a+188+(12*f|0)+10>>1]=1,f=f+1|0;while(365!=(f|0));e=(c[l>>2]|0)+32|0;e=128>(e|0)?2:(e|0)/64|0;k=(0==(g|0)?d:g)&255;c[a+4568>>2]=e;c[a+4572>>2]=0;u[a+4576>>0]=k;u[a+4577>>0]=1;u[a+4578>>0]=0;c[a+4580>>2]=e;c[a+4584>>2]=1;u[a+4588>>0]=k;u[a+4589>>0]=1;u[a+4590>>0]=0;c[a+4592>>2]=0;
F=h},function(a,b){a|=0;b|=0;var g=0,d=0,l=0,f=0,e=0,h=0,k=0,e=F;F=F+32|0;k=e;xb(k,c[a+136>>2]|0,c[a+144>>2]|0);h=c[b+4>>2]|0;f=c[b+8>>2]|0;f=0==(f|0)?c[k+8>>2]|0:f;l=c[b+12>>2]|0;l=0==(l|0)?c[k+12>>2]|0:l;g=c[b+16>>2]|0;d=c[k+16>>2]|0;c[a+184>>2]=0==(h|0)?c[k+4>>2]|0:h;c[a+188>>2]=f;c[a+192>>2]=l;Rb(a);l=a+140|0;b=(c[l>>2]|0)+32|0;b=128>(b|0)?2:(b|0)/64|0;f=0;do c[a+196+(12*f|0)>>2]=b,c[a+196+(12*f|0)+4>>2]=0,R[a+196+(12*f|0)+8>>1]=0,R[a+196+(12*f|0)+10>>1]=1,f=f+1|0;while(365!=(f|0));h=(c[l>>2]|
0)+32|0;h=128>(h|0)?2:(h|0)/64|0;k=(0==(g|0)?d:g)&255;c[a+4576>>2]=h;c[a+4580>>2]=0;u[a+4584>>0]=k;u[a+4585>>0]=1;u[a+4586>>0]=0;c[a+4588>>2]=h;c[a+4592>>2]=1;u[a+4596>>0]=k;u[a+4597>>0]=1;u[a+4598>>0]=0;c[a+4600>>2]=0;F=e},function(a,b){a|=0;b|=0;var g=0,d=0,l=0,f=0,h=0,e=0,l=F;F=F+32|0;e=l;xb(e,255,0);h=c[b+4>>2]|0;f=c[b+8>>2]|0;f=0==(f|0)?c[e+8>>2]|0:f;d=c[b+12>>2]|0;d=0==(d|0)?c[e+12>>2]|0:d;b=c[b+16>>2]|0;g=c[e+16>>2]|0;c[a+160>>2]=0==(h|0)?c[e+4>>2]|0:h;c[a+164>>2]=f;c[a+168>>2]=d;var d=a|0,
k=e=h=f=0,m=0,n=0,q=0,r=0,x=0,x=F;F=F+32|0;q=x;xb(q,255,0);r=d+160|0;if((c[q+4>>2]|0)==(c[r>>2]|0)&&(c[q+8>>2]|0)==(c[d+164>>2]|0)&&(c[q+12>>2]|0)==(c[d+168>>2]|0))r=c[8900]|0,c[d+4588>>2]=r+(((c[8901]|0)-r|0)>>>1);else for(h=d+4592|0,e=d+4596|0,k=c[e>>2]|0,f=c[h>>2]|0,m=k-f|0,512<=m>>>0?512<m>>>0&&(n=f+512|0,(k|0)!=(n|0))&&(c[e>>2]=n):(X(h,512-m|0),f=c[h>>2]|0),q=d+4588|0,c[q>>2]=f+256,n=d+168|0,k=d+164|0,m=-256;;){f=c[n>>2]|0;if((m|0)>(0-f|0))if(h=c[k>>2]|0,(m|0)>(0-h|0))if(e=c[r>>2]|0,(m|0)>(0-
e|0))if(0<=(m|0)){if(1>(m|0)){u[(c[q>>2]|0)+m>>0]=0;m=1;continue}f=(e|0)<=(m|0)?(h|0)>(m|0)?2:(f|0)>(m|0)?3:4:1}else f=-1;else f=-2;else f=-3;else f=-4;u[(c[q>>2]|0)+m>>0]=f;m=m+1|0;if(256==(m|0))break}F=x;d=0;do c[a+172+(12*d|0)>>2]=4,c[a+172+(12*d|0)+4>>2]=0,R[a+172+(12*d|0)+8>>1]=0,R[a+172+(12*d|0)+10>>1]=1,d=d+1|0;while(365!=(d|0));e=(0==(b|0)?g:b)&255;c[a+4552>>2]=4;c[a+4556>>2]=0;u[a+4560>>0]=e;u[a+4561>>0]=1;u[a+4562>>0]=0;c[a+4564>>2]=4;c[a+4568>>2]=1;u[a+4572>>0]=e;u[a+4573>>0]=1;u[a+4574>>
0]=0;c[a+4576>>2]=0;F=l},function(a,b){a|=0;b|=0;var g=0,d=0,l=0,f=0,e=0,h=0,l=F;F=F+32|0;h=l;xb(h,255,0);e=c[b+4>>2]|0;f=c[b+8>>2]|0;f=0==(f|0)?c[h+8>>2]|0:f;d=c[b+12>>2]|0;d=0==(d|0)?c[h+12>>2]|0:d;b=c[b+16>>2]|0;g=c[h+16>>2]|0;c[a+160>>2]=0==(e|0)?c[h+4>>2]|0:e;c[a+164>>2]=f;c[a+168>>2]=d;var d=a|0,k=h=e=f=0,m=0,n=0,q=0,r=0,x=0,x=F;F=F+32|0;q=x;xb(q,255,0);r=d+160|0;if((c[q+4>>2]|0)==(c[r>>2]|0)&&(c[q+8>>2]|0)==(c[d+164>>2]|0)&&(c[q+12>>2]|0)==(c[d+168>>2]|0))r=c[8900]|0,c[d+4588>>2]=r+(((c[8901]|
0)-r|0)>>>1);else for(e=d+4592|0,h=d+4596|0,k=c[h>>2]|0,f=c[e>>2]|0,m=k-f|0,512<=m>>>0?512<m>>>0&&(n=f+512|0,(k|0)!=(n|0))&&(c[h>>2]=n):(X(e,512-m|0),f=c[e>>2]|0),q=d+4588|0,c[q>>2]=f+256,n=d+168|0,k=d+164|0,m=-256;;){f=c[n>>2]|0;if((m|0)>(0-f|0))if(e=c[k>>2]|0,(m|0)>(0-e|0))if(h=c[r>>2]|0,(m|0)>(0-h|0))if(0<=(m|0)){if(1>(m|0)){u[(c[q>>2]|0)+m>>0]=0;m=1;continue}f=(h|0)<=(m|0)?(e|0)>(m|0)?2:(f|0)>(m|0)?3:4:1}else f=-1;else f=-2;else f=-3;else f=-4;u[(c[q>>2]|0)+m>>0]=f;m=m+1|0;if(256==(m|0))break}F=
x;d=0;do c[a+172+(12*d|0)>>2]=4,c[a+172+(12*d|0)+4>>2]=0,R[a+172+(12*d|0)+8>>1]=0,R[a+172+(12*d|0)+10>>1]=1,d=d+1|0;while(365!=(d|0));h=(0==(b|0)?g:b)&255;c[a+4552>>2]=4;c[a+4556>>2]=0;u[a+4560>>0]=h;u[a+4561>>0]=1;u[a+4562>>0]=0;c[a+4564>>2]=4;c[a+4568>>2]=1;u[a+4572>>0]=h;u[a+4573>>0]=1;u[a+4574>>0]=0;c[a+4576>>2]=0;F=l},function(a,b){a|=0;b|=0;var g=0,d=0,l=0,f=0,h=0,e=0,l=F;F=F+32|0;e=l;xb(e,4095,0);h=c[b+4>>2]|0;f=c[b+8>>2]|0;f=0==(f|0)?c[e+8>>2]|0:f;d=c[b+12>>2]|0;d=0==(d|0)?c[e+12>>2]|0:d;
b=c[b+16>>2]|0;g=c[e+16>>2]|0;c[a+160>>2]=0==(h|0)?c[e+4>>2]|0:h;c[a+164>>2]=f;c[a+168>>2]=d;var d=a|0,k=e=h=f=0,m=0,n=0,q=0,r=0,x=0,x=F;F=F+32|0;q=x;xb(q,4095,0);r=d+160|0;if((c[q+4>>2]|0)==(c[r>>2]|0)&&(c[q+8>>2]|0)==(c[d+164>>2]|0)&&(c[q+12>>2]|0)==(c[d+168>>2]|0))r=c[8906]|0,c[d+4588>>2]=r+(((c[8907]|0)-r|0)>>>1);else for(h=d+4592|0,e=d+4596|0,k=c[e>>2]|0,f=c[h>>2]|0,m=k-f|0,8192<=m>>>0?8192<m>>>0&&(n=f+8192|0,(k|0)!=(n|0))&&(c[e>>2]=n):(X(h,8192-m|0),f=c[h>>2]|0),q=d+4588|0,c[q>>2]=f+4096,n=
d+168|0,k=d+164|0,m=-4096;;){f=c[n>>2]|0;if((m|0)>(0-f|0))if(h=c[k>>2]|0,(m|0)>(0-h|0))if(e=c[r>>2]|0,(m|0)>(0-e|0))if(0<=(m|0)){if(1>(m|0)){u[(c[q>>2]|0)+m>>0]=0;m=1;continue}f=(e|0)<=(m|0)?(h|0)>(m|0)?2:(f|0)>(m|0)?3:4:1}else f=-1;else f=-2;else f=-3;else f=-4;u[(c[q>>2]|0)+m>>0]=f;m=m+1|0;if(4096==(m|0))break}F=x;d=0;do c[a+172+(12*d|0)>>2]=64,c[a+172+(12*d|0)+4>>2]=0,R[a+172+(12*d|0)+8>>1]=0,R[a+172+(12*d|0)+10>>1]=1,d=d+1|0;while(365!=(d|0));e=(0==(b|0)?g:b)&255;c[a+4552>>2]=64;c[a+4556>>2]=
0;u[a+4560>>0]=e;u[a+4561>>0]=1;u[a+4562>>0]=0;c[a+4564>>2]=64;c[a+4568>>2]=1;u[a+4572>>0]=e;u[a+4573>>0]=1;u[a+4574>>0]=0;c[a+4576>>2]=0;F=l},function(a,b){a|=0;b|=0;var g=0,d=0,l=0,f=0,e=0,h=0,l=F;F=F+32|0;h=l;xb(h,65535,0);e=c[b+4>>2]|0;f=c[b+8>>2]|0;f=0==(f|0)?c[h+8>>2]|0:f;d=c[b+12>>2]|0;d=0==(d|0)?c[h+12>>2]|0:d;b=c[b+16>>2]|0;g=c[h+16>>2]|0;c[a+160>>2]=0==(e|0)?c[h+4>>2]|0:e;c[a+164>>2]=f;c[a+168>>2]=d;var d=a|0,k=h=e=f=0,m=0,n=0,q=0,r=0,x=0,x=F;F=F+32|0;q=x;xb(q,65535,0);r=d+160|0;if((c[q+
4>>2]|0)==(c[r>>2]|0)&&(c[q+8>>2]|0)==(c[d+164>>2]|0)&&(c[q+12>>2]|0)==(c[d+168>>2]|0))r=c[8909]|0,c[d+4588>>2]=r+(((c[8910]|0)-r|0)>>>1);else for(e=d+4592|0,h=d+4596|0,k=c[h>>2]|0,f=c[e>>2]|0,m=k-f|0,131072<=m>>>0?131072<m>>>0&&(n=f+131072|0,(k|0)!=(n|0))&&(c[h>>2]=n):(X(e,131072-m|0),f=c[e>>2]|0),q=d+4588|0,c[q>>2]=f+65536,n=d+168|0,k=d+164|0,m=-65536;;){f=c[n>>2]|0;if((m|0)>(0-f|0))if(e=c[k>>2]|0,(m|0)>(0-e|0))if(h=c[r>>2]|0,(m|0)>(0-h|0))if(0<=(m|0)){if(1>(m|0)){u[(c[q>>2]|0)+m>>0]=0;m=1;continue}f=
(h|0)<=(m|0)?(e|0)>(m|0)?2:(f|0)>(m|0)?3:4:1}else f=-1;else f=-2;else f=-3;else f=-4;u[(c[q>>2]|0)+m>>0]=f;m=m+1|0;if(65536==(m|0))break}F=x;d=0;do c[a+172+(12*d|0)>>2]=1024,c[a+172+(12*d|0)+4>>2]=0,R[a+172+(12*d|0)+8>>1]=0,R[a+172+(12*d|0)+10>>1]=1,d=d+1|0;while(365!=(d|0));h=(0==(b|0)?g:b)&255;c[a+4552>>2]=1024;c[a+4556>>2]=0;u[a+4560>>0]=h;u[a+4561>>0]=1;u[a+4562>>0]=0;c[a+4564>>2]=1024;c[a+4568>>2]=1;u[a+4572>>0]=h;u[a+4573>>0]=1;u[a+4574>>0]=0;c[a+4576>>2]=0;F=l},function(a,b){a|=0;b|=0;var g=
0,d=0,l=0,f=0,h=0,e=0,k=0,h=F;F=F+32|0;k=h;xb(k,c[a+136>>2]|0,c[a+144>>2]|0);e=c[b+4>>2]|0;f=c[b+8>>2]|0;f=0==(f|0)?c[k+8>>2]|0:f;l=c[b+12>>2]|0;l=0==(l|0)?c[k+12>>2]|0:l;g=c[b+16>>2]|0;d=c[k+16>>2]|0;c[a+184>>2]=0==(e|0)?c[k+4>>2]|0:e;c[a+188>>2]=f;c[a+192>>2]=l;mc(a);l=a+140|0;b=(c[l>>2]|0)+32|0;b=128>(b|0)?2:(b|0)/64|0;f=0;do c[a+196+(12*f|0)>>2]=b,c[a+196+(12*f|0)+4>>2]=0,R[a+196+(12*f|0)+8>>1]=0,R[a+196+(12*f|0)+10>>1]=1,f=f+1|0;while(365!=(f|0));e=(c[l>>2]|0)+32|0;e=128>(e|0)?2:(e|0)/64|0;k=
(0==(g|0)?d:g)&255;c[a+4576>>2]=e;c[a+4580>>2]=0;u[a+4584>>0]=k;u[a+4585>>0]=1;u[a+4586>>0]=0;c[a+4588>>2]=e;c[a+4592>>2]=1;u[a+4596>>0]=k;u[a+4597>>0]=1;u[a+4598>>0]=0;c[a+4600>>2]=0;F=h},function(a,b){a|=0;b|=0;var g=0,d=0,l=0,f=0,e=0,h=0,k=0,e=F;F=F+32|0;k=e;xb(k,c[a+136>>2]|0,c[a+144>>2]|0);h=c[b+4>>2]|0;f=c[b+8>>2]|0;f=0==(f|0)?c[k+8>>2]|0:f;l=c[b+12>>2]|0;l=0==(l|0)?c[k+12>>2]|0:l;g=c[b+16>>2]|0;d=c[k+16>>2]|0;c[a+184>>2]=0==(h|0)?c[k+4>>2]|0:h;c[a+188>>2]=f;c[a+192>>2]=l;ba(a);l=a+140|0;b=
(c[l>>2]|0)+32|0;b=128>(b|0)?2:(b|0)/64|0;f=0;do c[a+196+(12*f|0)>>2]=b,c[a+196+(12*f|0)+4>>2]=0,R[a+196+(12*f|0)+8>>1]=0,R[a+196+(12*f|0)+10>>1]=1,f=f+1|0;while(365!=(f|0));h=(c[l>>2]|0)+32|0;h=128>(h|0)?2:(h|0)/64|0;k=(0==(g|0)?d:g)&255;c[a+4576>>2]=h;c[a+4580>>2]=0;u[a+4584>>0]=k;u[a+4585>>0]=1;u[a+4586>>0]=0;c[a+4588>>2]=h;c[a+4592>>2]=1;u[a+4596>>0]=k;u[a+4597>>0]=1;u[a+4598>>0]=0;c[a+4600>>2]=0;F=e},function(a,b){a|=0;b|=0;var g=0,d=0,l=0,f=0,h=0,e=0,k=0,h=F;F=F+32|0;k=h;xb(k,c[a+136>>2]|0,
c[a+144>>2]|0);e=c[b+4>>2]|0;f=c[b+8>>2]|0;f=0==(f|0)?c[k+8>>2]|0:f;l=c[b+12>>2]|0;l=0==(l|0)?c[k+12>>2]|0:l;g=c[b+16>>2]|0;d=c[k+16>>2]|0;c[a+184>>2]=0==(e|0)?c[k+4>>2]|0:e;c[a+188>>2]=f;c[a+192>>2]=l;wa(a);l=a+140|0;b=(c[l>>2]|0)+32|0;b=128>(b|0)?2:(b|0)/64|0;f=0;do c[a+196+(12*f|0)>>2]=b,c[a+196+(12*f|0)+4>>2]=0,R[a+196+(12*f|0)+8>>1]=0,R[a+196+(12*f|0)+10>>1]=1,f=f+1|0;while(365!=(f|0));e=(c[l>>2]|0)+32|0;e=128>(e|0)?2:(e|0)/64|0;k=(0==(g|0)?d:g)&255;c[a+4576>>2]=e;c[a+4580>>2]=0;u[a+4584>>0]=
k;u[a+4585>>0]=1;u[a+4586>>0]=0;c[a+4588>>2]=e;c[a+4592>>2]=1;u[a+4596>>0]=k;u[a+4597>>0]=1;u[a+4598>>0]=0;c[a+4600>>2]=0;F=h},function(c,a){},function(a,b){a|=0;b|=0;var g=0,d=0,l=0;xd(b,-1);xd(b,u[a+4>>0]|0);l=a+12|0;d=a+8|0;a=(c[l>>2]|0)-(c[d>>2]|0)+2|0;xd(b,(a&65535)>>>8&255);xd(b,a&255);a=c[d>>2]|0;if((c[l>>2]|0)!=(a|0)){g=0;do xd(b,u[a+g>>0]|0),g=g+1|0,a=c[d>>2]|0;while(g>>>0<((c[l>>2]|0)-a|0)>>>0)}},function(a,b){a|=0;b|=0;var d=0,f=0,l=0,e=0,h=d=0,k=0,m=0,n=0,m=F;F=F+128|0;h=m+100|0;f=m+16|
0;k=m+4|0;n=m;l=f;e=a+20|0;d=l+84|0;do c[l>>2]=c[e>>2],l=l+4|0,e=e+4|0;while((l|0)<(d|0));c[f+16>>2]=c[a+4>>2];e=q(m+112|0,f,a+56|0)|0;d=c[(c[e>>2]|0)+16>>2]|0;a=a+8|0;g=0;c[h>>2]=c[a>>2];c[h+4>>2]=c[a+4>>2];c[h+8>>2]=c[a+8>>2];d=ma(d|0,e|0,h|0)|0;a=g;g=0;if(a&1)d=J()|0;else if(l=b+4|0,c[k>>2]=c[l>>2],c[k+4>>2]=c[l+4>>2],c[k+8>>2]=c[l+8>>2],l=b+16|0,a=c[l>>2]|0,h=k+8|0,c[h>>2]=(c[h>>2]|0)-a,h=k+4|0,c[h>>2]=(c[h>>2]|0)+a,h=c[(c[e>>2]|0)+12>>2]|0,c[n>>2]=d,g=0,d=fb(h|0,e|0,n|0,k|0,(0==(u[b>>0]|0)?0:
(c[b+8>>2]|0)+a|0)|0)|0,k=g,g=0,k&1){if(d=J()|0,f=c[n>>2]|0,c[n>>2]=0,f)Ha[c[(c[f>>2]|0)+4>>2]&255](f)}else{f=c[n>>2]|0;c[n>>2]=0;if(f)Ha[c[(c[f>>2]|0)+4>>2]&255](f);c[b+4>>2]|0||(c[l>>2]=(c[l>>2]|0)+d);if(!e){F=m;return}Ha[c[(c[e>>2]|0)+4>>2]&255](e);F=m;return}e||V(d|0);Ha[c[(c[e>>2]|0)+4>>2]&255](e);V(d|0)},function(a,b){a|=0;b|=0;Ja[c[(c[a>>2]|0)+24>>2]&127](a)|0;b=Sb(b,44288)|0;c[a+36>>2]=b;b=(Ja[c[(c[b>>2]|0)+28>>2]&127](b)|0)&1;u[a+44>>0]=b},function(a,b){a|=0;var g=0,d=0,d=Sb(b|0,44288)|0,
g=a+36|0;c[g>>2]=d;d=Ja[c[(c[d>>2]|0)+24>>2]&127](d)|0;b=a+44|0;c[b>>2]=d;g=c[g>>2]|0;g=(Ja[c[(c[g>>2]|0)+28>>2]&127](g)|0)&1;u[a+53>>0]=g;8<(c[b>>2]|0)&&Mc(56783)},function(a,b){a|=0;b|=0;Ja[c[(c[a>>2]|0)+24>>2]&127](a)|0;b=Sb(b,44280)|0;c[a+36>>2]=b;b=(Ja[c[(c[b>>2]|0)+28>>2]&127](b)|0)&1;u[a+44>>0]=b},function(a,b){a|=0;var g=0,d=0,d=Sb(b|0,44280)|0,g=a+36|0;c[g>>2]=d;d=Ja[c[(c[d>>2]|0)+24>>2]&127](d)|0;b=a+44|0;c[b>>2]=d;g=c[g>>2]|0;g=(Ja[c[(c[g>>2]|0)+28>>2]&127](g)|0)&1;u[a+53>>0]=g;8<(c[b>>
2]|0)&&Mc(56783)},function(c,a){},function(a,b){a|=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0},function(a,b){a|=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0},function(a,b){a|=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0},function(c,a){Kd(c|0,1,45)},function(c,a){c|=0;u[c>>0]=2;u[c+1>>0]=3;u[c+2>>0]=0;u[c+3>>0]=4},function(c,a){c|=0;u[c>>0]=2;u[c+1>>0]=3;u[c+2>>0]=0;u[c+3>>0]=4},function(a,b){a|=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0},function(a,b){a|=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0},function(a,b){a|=0;c[a>>2]=0;c[a+4>>2]=
0;c[a+8>>2]=0},function(c,a){Kd(c|0,1,45)},function(c,a){c|=0;u[c>>0]=2;u[c+1>>0]=3;u[c+2>>0]=0;u[c+3>>0]=4},function(c,a){c|=0;u[c>>0]=2;u[c+1>>0]=3;u[c+2>>0]=0;u[c+3>>0]=4},function(a,b){a|=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0},function(a,b){a|=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0},function(a,b){a|=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0},function(c,a){fg(c|0,1,45)},function(c,a){c|=0;u[c>>0]=2;u[c+1>>0]=3;u[c+2>>0]=0;u[c+3>>0]=4},function(c,a){c|=0;u[c>>0]=2;u[c+1>>0]=3;u[c+2>>0]=0;u[c+3>>0]=4},function(a,
b){a|=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0},function(a,b){a|=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0},function(a,b){a|=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0},function(c,a){fg(c|0,1,45)},function(c,a){c|=0;u[c>>0]=2;u[c+1>>0]=3;u[c+2>>0]=0;u[c+3>>0]=4},function(c,a){c|=0;u[c>>0]=2;u[c+1>>0]=3;u[c+2>>0]=0;u[c+3>>0]=4},function(c,a){},function(c,a){},function(c,a){Id(c|0,(a|0)+12|0)},function(c,a){Vd(c|0,59024,4)},function(c,a){Vd(c|0,59029,5)},function(c,a){Id(c|0,(a|0)+16|0)},function(c,a){eg(c|0,44996,Jf(44996)|
0)},function(c,a){eg(c|0,45016,Jf(45016)|0)},function(a,b){a|=0;b|=0;var g=0,d=0,l=0,f=0,e=0,h=0,k=0,m=0,n=0,m=a+4|0,g=c[a>>2]|0,l=((c[m>>2]|0)-g>>2)+1|0;1073741823<l>>>0&&(Md(a),g=c[a>>2]|0);n=a+8|0;d=(c[n>>2]|0)-g|0;536870911>d>>2>>>0?(d>>=1,d=d>>>0<l>>>0?l:d,g=(c[m>>2]|0)-g>>2,d?h=6:e=f=0):(d=1073741823,g=(c[m>>2]|0)-g>>2,h=6);6==(h|0)&&(f=d,e=qa(d<<2)|0);d=l=e+(g<<2)|0;k=e+(f<<2)|0;h=c[b>>2]|0;c[b>>2]=0;c[l>>2]=h;h=e+(g+1<<2)|0;e=c[a>>2]|0;g=c[m>>2]|0;if((g|0)==(e|0))l=a,f=m;else{do g=g+-4|0,
b=c[g>>2]|0,c[g>>2]=0,c[l+-4>>2]=b,d=l=d+-4|0;while((g|0)!=(e|0));l=a;f=m;e=c[a>>2]|0;g=c[m>>2]|0}c[l>>2]=d;c[f>>2]=h;c[n>>2]=k;l=e;if((g|0)!=(l|0)){do if(g=g+-4|0,d=c[g>>2]|0,c[g>>2]=0,d)Ha[c[(c[d>>2]|0)+4>>2]&255](d);while((g|0)!=(l|0))}e&&Q(e)},function(a,b){a|=0;var d=0,f=0,l=0,e=0,l=F;F=F+16|0;e=l;var d=b|0,d=d|0,h=f=0,k=0,m=0,n=0,q=0,n=qa(5)|0;u[n>>0]=109;u[n+1>>0]=114;u[n+2>>0]=102;u[n+3>>0]=120;u[n+4>>0]=d;g=0;m=ca(67,20)|0;k=g;g=0;k&1&&(m=J()|0,Q(n),V(m|0));c[m>>2]=36800;u[m+4>>0]=-24;d=
m+8|0;c[d>>2]=0;f=m+12|0;c[f>>2]=0;h=m+16|0;g=c[h>>2]=0;k=ca(67,5)|0;q=g;g=0;q&1?(q=J()|0,Q(m),Q(n),V(q|0),d=0):(c[f>>2]=k,c[d>>2]=k,c[h>>2]=k+5,u[k>>0]=109,q=(c[f>>2]|0)+1|0,c[f>>2]=q,k=n+1|0,u[q>>0]=u[k>>0]|0,q=(c[f>>2]|0)+1|0,c[f>>2]=q,k=k+1|0,u[q>>0]=u[k>>0]|0,q=(c[f>>2]|0)+1|0,c[f>>2]=q,k=k+1|0,u[q>>0]=u[k>>0]|0,q=(c[f>>2]|0)+1|0,c[f>>2]=q,u[q>>0]=u[k+1>>0]|0,c[f>>2]=(c[f>>2]|0)+1,Q(n),d=m|0);b=d|0;c[e>>2]=b;d=a+28|0;f=c[d>>2]|0;if(f>>>0<(c[a+32>>2]|0)>>>0)c[f>>2]=b,c[d>>2]=f+4,c[e>>2]=0,F=l;
else if(g=0,ga(57,a+24|0,e|0),a=g,g=0,a&1)b=J()|0,d=c[e>>2]|0,c[e>>2]=0,d||V(b|0),Ha[c[(c[d>>2]|0)+4>>2]&255](d),V(b|0);else{b=c[e>>2]|0;c[e>>2]=0;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);F=l}},function(a,b){a|=0;b|=0;c[a>>2]=c[b>>2];c[a+4>>2]=c[b+4>>2];c[a+8>>2]=c[b+8>>2];u[a+12>>0]=0;b=a+16|0;a=b+100|0;do c[b>>2]=0,b=b+4|0;while((b|0)<(a|0))},function(a,b){a|=0;b|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,q=0,r=0,x=0,t=0,z=0,A=0,E=0,y=0,L=0,S=0,I=0,L=F;F=F+32|0;y=L+4|0;t=L+16|0;S=L;ch(a);z=a+16|0;l=c[a+24>>
2]|0;a:do if(14>=(l+-2|0)>>>0)if(A=a+40|0,d=c[A>>2]|0,2<d>>>0)d=5;else{E=a+32|0;e=c[E>>2]|0;switch(e|0){case 0:d=1;break a;case 4:if(2==(d|0)){d=2;break a}break;case 3:break;default:if(d){d=2;break a}}x=a+100|0;d=a+108|0;f=c[d>>2]|0;1>(f|0)?(f=c[z>>2]|0,c[d>>2]=f,d=c[a+20>>2]|0,c[a+112>>2]=d):d=c[a+112>>2]|0;m=Ne(d|0,(0>(d|0))<<31>>31|0,f|0,(0>(f|0))<<31>>31|0)|0;k=(l+7|0)/8|0;k=Ne(m|0,Fa|0,k|0,(0>(k|0))<<31>>31|0)|0;m=b+4|0;d=c[m>>2]|0;h=b+8|0;0!=(d|0)&&(q=c[h>>2]|0,r=Ne(e|0,(0>(e|0))<<31>>31|0,
k|0,Fa|0)|0,l=Fa,0<(l|0)|0==(l|0)&q>>>0<r>>>0)&&(d=xa(16)|0,g=0,f=Va(1)|0,S=g,g=0,S&1||(g=0,na(7,d|0,3,f|0),S=g,g=0,S&1)||Pa(d|0,824,96),S=J()|0,za(d|0),V(S|0));q=a+52|0;r=a+12|0;if(0<(e|0))e=0;else{F=L;return}for(;;){dh(a,0==(e|0));f=n(t,z,q)|0;l=c[(c[f>>2]|0)+8>>2]|0;g=0;c[y>>2]=c[b>>2];c[y+4>>2]=c[b+4>>2];c[y+8>>2]=c[b+8>>2];l=ma(l|0,f|0,y|0)|0;I=g;g=0;if(I&1){l=32;break}I=c[(c[f>>2]|0)+16>>2]|0;c[S>>2]=l;g=0;oi(I|0,f|0,S|0,x|0,a|0,0!=(u[r>>0]|0)|0);I=g;g=0;if(I&1){l=30;break}l=c[S>>2]|0;c[S>>
2]=0;if(l)Ha[c[(c[l>>2]|0)+4>>2]&255](l);d?(d=d+k|0,c[m>>2]=d,c[h>>2]=(c[h>>2]|0)-k):d=0;l=0==(c[A>>2]|0);e=(l&1)+e|0;if(f)Ha[c[(c[f>>2]|0)+4>>2]&255](f);if(!l){l=34;break}if((e|0)>=(c[E>>2]|0)){l=34;break}}if(30==(l|0)){if(d=J()|0,l=c[S>>2]|0,c[S>>2]=0,l)Ha[c[(c[l>>2]|0)+4>>2]&255](l)}else if(32==(l|0))d=J()|0,f||(I=d,V(I|0));else if(34==(l|0)){F=L;return}Ha[c[(c[f>>2]|0)+4>>2]&255](f);I=d;V(I|0)}else d=2;while(0);f=xa(16)|0;g=0;l=Va(1)|0;I=g;g=0;I&1||(g=0,na(7,f|0,d|0,l|0),I=g,g=0,I&1)||Pa(f|0,
824,96);I=J()|0;za(f|0);V(I|0)},dh,function(a,b){a|=0;b|=0;var g=0;c[a+24>>2]=b;c[a+16>>2]=0==(b|0)&1;c[a+20>>2]=0;c[a+4>>2]=4098;c[a+12>>2]=0;c[a+8>>2]=6;g=a+28|0;b=a+32|0;a=b+40|0;do c[b>>2]=0,b=b+4|0;while((b|0)<(a|0));Uc(g)},function(a,b){a|=0;var g=0,d=0,l=0,f=0,e=0,h=0,e=a+32|0,d=b|0,g=e|0,d=d|0,f=l=0;(g|0)!=(d|0)&&(l=u[d>>0]|0,f=0==(l&1),Xd(g,f?d+1|0:c[d+8>>2]|0,f?(l&255)>>>1:c[d+4>>2]|0)|0);g|0;f=a+44|0;c[f>>2]=0;h=a+48|0;l=c[h>>2]|0;l&8&&(b=u[e>>0]|0,b&1?(b=(c[a+40>>2]|0)+(c[a+36>>2]|0)|
0,c[f>>2]=b,g=d=c[a+40>>2]|0):(b=((b&255)>>>1)+(e+1)|0,c[f>>2]=b,g=e+1|0,d=e+1|0),c[a+8>>2]=g,c[a+12>>2]=d,c[a+16>>2]=b);l&16&&(b=u[e>>0]|0,b&1?(l=c[a+36>>2]|0,c[f>>2]=(c[a+40>>2]|0)+l,b=(c[e>>2]&-2)+-1|0):(l=(b&255)>>>1,c[f>>2]=e+1+l,b=10),f=l,fe(e,b,0),b=u[e>>0]|0,b&1?(l=g=c[a+40>>2]|0,d=c[a+36>>2]|0):(l=e+1|0,d=(b&255)>>>1,g=e+1|0),b=a+24|0,c[b>>2]=g,c[a+20>>2]=g,c[a+28>>2]=l+d,c[h>>2]&3&&(c[b>>2]=g+f))},function(a,b){a|=0;b|=0;var g=0,d=0,l=0,f=0,g=c[b+48>>2]|0;if(g&16){g=b+44|0;d=c[g>>2]|0;l=
c[b+24>>2]|0;d>>>0<l>>>0?c[g>>2]=l:l=d;d=c[b+20>>2]|0;f=l-d|0;4294967279<f>>>0&&jd(a);11>f>>>0?(u[a>>0]=f<<1,g=a+1|0):(b=f+16&-16,g=qa(b)|0,c[a+8>>2]=g,c[a>>2]=b|1,c[a+4>>2]=f);if((d|0)!=(l|0)){for(b=g;u[b>>0]=u[d>>0]|0,d=d+1|0,(d|0)!=(l|0);)b=b+1|0;g=g+f|0}u[g>>0]=0}else if(g&8){d=c[b+8>>2]|0;b=c[b+16>>2]|0;f=b-d|0;4294967279<f>>>0&&jd(a);11>f>>>0?(u[a>>0]=f<<1,g=a+1|0):(l=f+16&-16,g=qa(l)|0,c[a+8>>2]=g,c[a>>2]=l|1,c[a+4>>2]=f);if((d|0)!=(b|0)){for(l=g;u[l>>0]=u[d>>0]|0,d=d+1|0,(d|0)!=(b|0);)l=l+
1|0;g=g+f|0}u[g>>0]=0}else c[a>>2]=0,c[a+4>>2]=0,c[a+8>>2]=0},function(a,b){a|=0;b|=0;var g=0;u[a>>0]=0;c[a+4>>2]=b;g=c[(c[b>>2]|0)+-12>>2]|0;c[b+(g+16)>>2]|0||((g=c[b+(g+72)>>2]|0)&&Kg(g)|0,u[a>>0]=1)},function(a,b){a|=0;b|=0;var d=0,f=0,l=0,d=F;F=F+16|0;f=d;l=0==(c[a+24>>2]|0);c[a+16>>2]=l&1|b;(l&1|b)&c[a+20>>2]?(b=xa(16)|0,0==(u[1048]|0)&&0!=(Da(1048)|0)&&(c[10778]=43084,Ea(72,43112,Ga|0)|0,Ca(1048)),43112,c[f>>2]=1,c[f+4>>2]=43112,g=0,na(11,b|0,57437,f|0),l=g,g=0,l&1?(l=J()|0,za(b|0),V(l|0)):
Pa(b|0,864,112)):F=d},function(a,b){a|=0;b|=0;var g=0,d=0,l=0,f=0,g=u[a>>0]|0;(d=0!=(g&1))?(l=(c[a>>2]&-2)+-1|0,f=c[a+4>>2]|0):(l=10,f=(g&255)>>>1);(f|0)==(l|0)?(dg(a,l,1,l,l,0,0),l=u[a>>0]&1?8:7):l=d?8:7;7==(l|0)?(u[a>>0]=(f<<1)+2,g=a+1|0,d=f+1|0):8==(l|0)&&(g=c[a+8>>2]|0,d=f+1|0,c[a+4>>2]=d);u[g+f>>0]=b;u[g+d>>0]=0},function(a,b){a|=0;var g=0,d=0,l=0,f=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,q=a+4604|0;b=c[q>>2]|0;t=a+180|0;if(!(0>=(c[t>>2]|0)))for(r=a+4608|0,x=a+4612|0,l=b,f=oa[b+-2>>1]|0,b=oa[b>>
1]|0,n=0;;){m=c[r>>2]|0;k=oa[m+(n+-1<<1)>>1]|0;d=n+1|0;g=oa[l+(d<<1)>>1]|0;h=c[x>>2]|0;e=b-f|0;l=f-k|0;if(h=(9*((9*(u[h+(g-b)>>0]|0)|0)+(u[h+e>>0]|0)|0)|0)+(u[h+l>>0]|0)|0){f=b-k>>31;l=0>(f^l|0)?b:k+(0>(f^e|0)?0:e)|0;var f=a,m=oa[m+(n<<1)>>1]|0,e=0,f=f|0,h=h|0,m=m|0,l=l|0,z=k=0,F=0,A=0,S=0,I=0,ua=0,E=0,y=0,L=0,M=0,M=h>>31,k=(M^h)-M|0,y=f+196+(12*k|0)+10|0,z=R[y>>1]|0,E=f+196+(12*k|0)|0,e=c[E>>2]|0;if((z|0)<(e|0))if((z<<1|0)<(e|0))if((z<<2|0)<(e|0))if((z<<3|0)<(e|0))if((z<<4|0)<(e|0))for(h=5;;)if((z<<
h|0)<(e|0))h=h+1|0;else break;else h=4;else h=3;else h=2;else h=1;else h=0;I=f+196+(12*k|0)+8|0;e=(R[I>>1]^M)-M+l|0;L=f+136|0;l=c[L>>2]|0;S=(e&l|0)==(e|0)?e:l&~(e>>31);e=(m-S^M)-M|0;A=f+144|0;l=c[A>>2]|0;e=0<(e|0)?(e+l|0)/(l<<1|1)|0:(e-l|0)/(l<<1|1)|0;ua=f+140|0;F=c[ua>>2]|0;m=(0>(e|0)?F:0)+e|0;F=m-((m|0)<((F+1|0)/2|0)?0:F)|0;k=f+196+(12*k|0)+4|0;e=l|h?0:(c[k>>2]<<1)+-1+z>>31;l=e^F;Z(f,h,l>>30^l<<1,c[f+156>>2]|0);l=c[f+160>>2]|0;h=(c[E>>2]|0)+(-1<(F|0)?F:0-F|0)|0;e=(c[k>>2]|0)+(ia(c[A>>2]<<1|1,F)|
0)|0;m=R[y>>1]|0;(m|0)==(l|0)&&(h>>=1,e>>=1,m=l>>1);c[E>>2]=h;l=m+1|0;R[y>>1]=l;h=l+e|0;1<=(h|0)?0<(e|0)&&(e=e-l|0,y=R[I>>1]|0,R[I>>1]=(127>y<<16>>16&1)+(y&65535),e=0<(e|0)?0:e):(e=R[I>>1]|0,R[I>>1]=(e&65535)-(-128<e<<16>>16&1),e=(h|0)>(~m|0)?h:0-m|0);c[k>>2]=e;l=c[A>>2]|0;m=l<<1|1;h=(ia(m,(F^M)-M|0)|0)+S|0;(h|0)>=(0-l|0)?(e=c[L>>2]|0,(e+l|0)<(h|0)&&(h=h-(ia(c[ua>>2]|0,m)|0)|0)):(h=(ia(c[ua>>2]|0,m)|0)+h|0,e=c[L>>2]|0);M=(h&e|0)==(h|0)?h:e&~(h>>31);M&=65535;f=M|0;m=f|0;R[(c[r>>2]|0)+(n<<1)>>1]=m}else d=
(da(a,n,0)|0)+n|0,g=c[q>>2]|0,b=oa[g+(d+-1<<1)>>1]|0,g=oa[g+(d<<1)>>1]|0;if((d|0)>=(c[t>>2]|0))break;l=c[q>>2]|0;f=b;b=g;n=d}},function(a,b){a|=0;var g=0,d=0,l=0,f=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,F=0,A=0,S=0,I=0,ua=0,E=0,y=0,L=0,M=0,D=0,B=0,L=a+180|0;if(!(0>=(c[L>>2]|0)))for(M=a+4608|0,D=a+4604|0,B=a+4612|0,y=0;;)if(I=y+-1|0,f=c[M>>2]|0,e=c[D>>2]|0,b=y+1|0,l=oa[e+(6*y|0)>>1]|0,E=c[B>>2]|0,h=oa[e+(6*I|0)>>1]|0,k=l-h|0,m=oa[f+(6*I|0)>>1]|0,n=h-m|0,q=(9*((9*(u[E+((oa[e+(6*b|0)>>1]|0)-l)>>0]|
0)|0)+(u[E+k>>0]|0)|0)|0)+(u[E+n>>0]|0)|0,d=oa[e+(6*y|0)+2>>1]|0,r=oa[e+(6*I|0)+2>>1]|0,x=d-r|0,t=oa[f+(6*I|0)+2>>1]|0,z=r-t|0,F=(9*((9*(u[E+((oa[e+(6*b|0)+2>>1]|0)-d)>>0]|0)|0)+(u[E+x>>0]|0)|0)|0)+(u[E+z>>0]|0)|0,g=oa[e+(6*y|0)+4>>1]|0,A=oa[e+(6*I|0)+4>>1]|0,S=g-A|0,I=oa[f+(6*I|0)+4>>1]|0,ua=A-I|0,E=(9*((9*(u[E+((oa[e+(6*b|0)+4>>1]|0)-g)>>0]|0)|0)+(u[E+S>>0]|0)|0)|0)+(u[E+ua>>0]|0)|0,F|q|E?(e=oa[f+(6*y|0)>>1]|0,f=l-m>>31,0<=(f^n|0)&&(l=0>(f^k|0)?m:m-h+l|0),e=Ia(a,q,e,l,0)|0,f=oa[(c[M>>2]|0)+(6*y|
0)+2>>1]|0,l=d-t>>31,0<=(l^z|0)&&(d=0>(l^x|0)?t:t-r+d|0),l=Ia(a,F,f,d,0)|0,f=oa[(c[M>>2]|0)+(6*y|0)+4>>1]|0,d=g-I>>31,0<=(d^ua|0)&&(g=0>(d^S|0)?I:I-A+g|0),ua=Ia(a,E,f,g,0)|0,E=c[M>>2]|0,R[E+(6*y|0)>>1]=e,R[E+(6*y|0)+2>>1]=l,R[E+(6*y|0)+4>>1]=ua):b=(Ba(a,y,0)|0)+y|0,(b|0)<(c[L>>2]|0))y=b;else break},function(a,b){a|=0;var g=0,d=0,l=0,f=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,F=0,A=0,S=0,I=0,ua=0,E=0,y=0,L=0,M=0,D=0,B=0,L=a+180|0;if(!(0>=(c[L>>2]|0)))for(M=a+4608|0,D=a+4604|0,B=a+4612|0,y=0;;)if(I=
y+-1|0,f=c[M>>2]|0,e=c[D>>2]|0,b=y+1|0,l=ea[e+(3*y|0)>>0]|0,E=c[B>>2]|0,h=ea[e+(3*I|0)>>0]|0,k=l-h|0,m=ea[f+(3*I|0)>>0]|0,n=h-m|0,q=(9*((9*(u[E+((ea[e+(3*b|0)>>0]|0)-l)>>0]|0)|0)+(u[E+k>>0]|0)|0)|0)+(u[E+n>>0]|0)|0,d=ea[e+(3*y|0)+1>>0]|0,r=ea[e+(3*I|0)+1>>0]|0,x=d-r|0,t=ea[f+(3*I|0)+1>>0]|0,z=r-t|0,F=(9*((9*(u[E+((ea[e+(3*b|0)+1>>0]|0)-d)>>0]|0)|0)+(u[E+x>>0]|0)|0)|0)+(u[E+z>>0]|0)|0,g=ea[e+(3*y|0)+2>>0]|0,A=ea[e+(3*I|0)+2>>0]|0,S=g-A|0,I=ea[f+(3*I|0)+2>>0]|0,ua=A-I|0,E=(9*((9*(u[E+((ea[e+(3*b|0)+
2>>0]|0)-g)>>0]|0)|0)+(u[E+S>>0]|0)|0)|0)+(u[E+ua>>0]|0)|0,F|q|E?(e=ea[f+(3*y|0)>>0]|0,f=l-m>>31,0<=(f^n|0)&&(l=0>(f^k|0)?m:m-h+l|0),e=Oa(a,q,e,l,0)|0,f=ea[(c[M>>2]|0)+(3*y|0)+1>>0]|0,l=d-t>>31,0<=(l^z|0)&&(d=0>(l^x|0)?t:t-r+d|0),l=Oa(a,F,f,d,0)|0,f=ea[(c[M>>2]|0)+(3*y|0)+2>>0]|0,d=g-I>>31,0<=(d^ua|0)&&(g=0>(d^S|0)?I:I-A+g|0),E=Oa(a,E,f,g,0)|0,y=(c[M>>2]|0)+(3*y|0)|0,u[y>>0]=e,u[y+1>>0]=l,u[y+2>>0]=E):b=(zb(a,y,0)|0)+y|0,(b|0)<(c[L>>2]|0))y=b;else break},function(a,b){a|=0;var g=0,d=0,l=0,f=0,e=0,
h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,q=a+4580|0;b=c[q>>2]|0;t=a+156|0;if(!(0>=(c[t>>2]|0)))for(r=a+4584|0,x=a+4588|0,l=b,f=oa[b+-2>>1]|0,b=oa[b>>1]|0,n=0;;){m=c[r>>2]|0;k=oa[m+(n+-1<<1)>>1]|0;d=n+1|0;g=oa[l+(d<<1)>>1]|0;h=c[x>>2]|0;e=b-f|0;l=f-k|0;(h=(9*((9*(u[h+(g-b)>>0]|0)|0)+(u[h+e>>0]|0)|0)|0)+(u[h+l>>0]|0)|0)?(f=b-k>>31,l=0>(f^l|0)?b:k+(0>(f^e|0)?0:e)|0,m=mb(a,h,oa[m+(n<<1)>>1]|0,l,0)|0,R[(c[r>>2]|0)+(n<<1)>>1]=m):(d=(ib(a,n,0)|0)+n|0,g=c[q>>2]|0,b=oa[g+(d+-1<<1)>>1]|0,g=oa[g+(d<<1)>>1]|0);if((d|
0)>=(c[t>>2]|0))break;l=c[q>>2]|0;f=b;b=g;n=d}},function(a,b){a|=0;var g=0,d=0,l=0,f=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,q=a+4580|0;b=c[q>>2]|0;t=a+156|0;if(!(0>=(c[t>>2]|0)))for(r=a+4584|0,x=a+4588|0,l=b,f=oa[b+-2>>1]|0,b=oa[b>>1]|0,n=0;;){m=c[r>>2]|0;k=oa[m+(n+-1<<1)>>1]|0;d=n+1|0;g=oa[l+(d<<1)>>1]|0;h=c[x>>2]|0;e=b-f|0;l=f-k|0;(h=(9*((9*(u[h+(g-b)>>0]|0)|0)+(u[h+e>>0]|0)|0)|0)+(u[h+l>>0]|0)|0)?(f=b-k>>31,l=0>(f^l|0)?b:k+(0>(f^e|0)?0:e)|0,m=qb(a,h,oa[m+(n<<1)>>1]|0,l,0)|0,R[(c[r>>2]|0)+(n<<1)>>
1]=m):(d=(jb(a,n,0)|0)+n|0,g=c[q>>2]|0,b=oa[g+(d+-1<<1)>>1]|0,g=oa[g+(d<<1)>>1]|0);if((d|0)>=(c[t>>2]|0))break;l=c[q>>2]|0;f=b;b=g;n=d}},function(a,b){a|=0;var g=0,d=0,l=0,f=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,q=a+4580|0;b=c[q>>2]|0;t=a+156|0;if(!(0>=(c[t>>2]|0)))for(r=a+4584|0,x=a+4588|0,l=b,f=ea[b+-1>>0]|0,b=ea[b>>0]|0,n=0;;){m=c[r>>2]|0;k=ea[m+(n+-1)>>0]|0;d=n+1|0;g=ea[l+d>>0]|0;h=c[x>>2]|0;e=b-f|0;l=f-k|0;(h=(9*((9*(u[h+(g-b)>>0]|0)|0)+(u[h+e>>0]|0)|0)|0)+(u[h+l>>0]|0)|0)?(f=b-k>>31,l=0>(f^
l|0)?b:k+(0>(f^e|0)?0:e)|0,m=Ab(a,h,ea[m+n>>0]|0,l,0)|0,u[(c[r>>2]|0)+n>>0]=m):(d=(ob(a,n,0)|0)+n|0,g=c[q>>2]|0,b=ea[g+(d+-1)>>0]|0,g=ea[g+d>>0]|0);if((d|0)>=(c[t>>2]|0))break;l=c[q>>2]|0;f=b;b=g;n=d}},function(a,b){a|=0;var g=0,d=0,l=0,f=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,F=0,A=0,S=0,I=0,E=0,y=0,L=0,M=0,D=0,B=0,w=0,M=a+156|0;if(!(0>=(c[M>>2]|0)))for(D=a+4584|0,B=a+4580|0,w=a+4588|0,L=0;;)if(I=L+-1|0,f=c[D>>2]|0,e=c[B>>2]|0,b=L+1|0,l=ea[e+(3*L|0)>>0]|0,y=c[w>>2]|0,h=ea[e+(3*I|0)>>0]|0,k=l-
h|0,m=ea[f+(3*I|0)>>0]|0,n=h-m|0,q=(9*((9*(u[y+((ea[e+(3*b|0)>>0]|0)-l)>>0]|0)|0)+(u[y+k>>0]|0)|0)|0)+(u[y+n>>0]|0)|0,d=ea[e+(3*L|0)+1>>0]|0,r=ea[e+(3*I|0)+1>>0]|0,x=d-r|0,t=ea[f+(3*I|0)+1>>0]|0,z=r-t|0,F=(9*((9*(u[y+((ea[e+(3*b|0)+1>>0]|0)-d)>>0]|0)|0)+(u[y+x>>0]|0)|0)|0)+(u[y+z>>0]|0)|0,g=ea[e+(3*L|0)+2>>0]|0,A=ea[e+(3*I|0)+2>>0]|0,S=g-A|0,I=ea[f+(3*I|0)+2>>0]|0,E=A-I|0,y=(9*((9*(u[y+((ea[e+(3*b|0)+2>>0]|0)-g)>>0]|0)|0)+(u[y+S>>0]|0)|0)|0)+(u[y+E>>0]|0)|0,F|q|y?(e=ea[f+(3*L|0)>>0]|0,f=l-m>>31,0<=
(f^n|0)&&(l=0>(f^k|0)?m:m-h+l|0),e=Fb(a,q,e,l,0)|0,f=ea[(c[D>>2]|0)+(3*L|0)+1>>0]|0,l=d-t>>31,0<=(l^z|0)&&(d=0>(l^x|0)?t:t-r+d|0),l=Fb(a,F,f,d,0)|0,f=ea[(c[D>>2]|0)+(3*L|0)+2>>0]|0,d=g-I>>31,0<=(d^E|0)&&(g=0>(d^S|0)?I:I-A+g|0),y=Fb(a,y,f,g,0)|0,L=(c[D>>2]|0)+(3*L|0)|0,u[L>>0]=e,u[L+1>>0]=l,u[L+2>>0]=y):b=(Eb(a,L,0)|0)+L|0,(b|0)<(c[M>>2]|0))L=b;else break},function(a,b){a|=0;var g=0,d=0,l=0,f=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,q=a+4604|0;b=c[q>>2]|0;t=a+180|0;if(!(0>=(c[t>>2]|0)))for(r=a+4608|0,
x=a+4612|0,l=b,f=ea[b+-1>>0]|0,b=ea[b>>0]|0,n=0;;){m=c[r>>2]|0;k=ea[m+(n+-1)>>0]|0;d=n+1|0;g=ea[l+d>>0]|0;h=c[x>>2]|0;e=b-f|0;l=f-k|0;if(h=(9*((9*(u[h+(g-b)>>0]|0)|0)+(u[h+e>>0]|0)|0)|0)+(u[h+l>>0]|0)|0){f=b-k>>31;l=0>(f^l|0)?b:k+(0>(f^e|0)?0:e)|0;var f=a,m=ea[m+n>>0]|0,e=0,f=f|0,h=h|0,m=m|0,l=l|0,z=k=0,F=0,A=0,S=0,I=0,y=0,E=0,L=0,M=0,D=0,D=h>>31,k=(D^h)-D|0,L=f+196+(12*k|0)+10|0,z=R[L>>1]|0,E=f+196+(12*k|0)|0,e=c[E>>2]|0;if((z|0)<(e|0))if((z<<1|0)<(e|0))if((z<<2|0)<(e|0))if((z<<3|0)<(e|0))if((z<<
4|0)<(e|0))for(h=5;;)if((z<<h|0)<(e|0))h=h+1|0;else break;else h=4;else h=3;else h=2;else h=1;else h=0;I=f+196+(12*k|0)+8|0;e=(R[I>>1]^D)-D+l|0;M=f+136|0;l=c[M>>2]|0;S=(e&l|0)==(e|0)?e:l&~(e>>31);e=(m-S^D)-D|0;A=f+144|0;l=c[A>>2]|0;e=0<(e|0)?(e+l|0)/(l<<1|1)|0:(e-l|0)/(l<<1|1)|0;y=f+140|0;F=c[y>>2]|0;m=(0>(e|0)?F:0)+e|0;F=m-((m|0)<((F+1|0)/2|0)?0:F)|0;k=f+196+(12*k|0)+4|0;e=l|h?0:(c[k>>2]<<1)+-1+z>>31;l=e^F;Qb(f,h,l>>30^l<<1,c[f+156>>2]|0);l=c[f+160>>2]|0;h=(c[E>>2]|0)+(-1<(F|0)?F:0-F|0)|0;e=(c[k>>
2]|0)+(ia(c[A>>2]<<1|1,F)|0)|0;m=R[L>>1]|0;(m|0)==(l|0)&&(h>>=1,e>>=1,m=l>>1);c[E>>2]=h;l=m+1|0;R[L>>1]=l;h=l+e|0;1<=(h|0)?0<(e|0)&&(e=e-l|0,L=R[I>>1]|0,R[I>>1]=(127>L<<16>>16&1)+(L&65535),e=0<(e|0)?0:e):(e=R[I>>1]|0,R[I>>1]=(e&65535)-(-128<e<<16>>16&1),e=(h|0)>(~m|0)?h:0-m|0);c[k>>2]=e;l=c[A>>2]|0;m=l<<1|1;h=(ia(m,(F^D)-D|0)|0)+S|0;(h|0)>=(0-l|0)?(e=c[M>>2]|0,(e+l|0)<(h|0)&&(h=h-(ia(c[y>>2]|0,m)|0)|0)):(h=(ia(c[y>>2]|0,m)|0)+h|0,e=c[M>>2]|0);D=(h&e|0)==(h|0)?h:e&~(h>>31);D&=255;f=D|0;m=f|0;u[(c[r>>
2]|0)+n>>0]=m}else d=(bc(a,n,0)|0)+n|0,g=c[q>>2]|0,b=ea[g+(d+-1)>>0]|0,g=ea[g+d>>0]|0;if((d|0)>=(c[t>>2]|0))break;l=c[q>>2]|0;f=b;b=g;n=d}},function(a,b){a|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,F=0,A=0,x=a+4596|0,d=c[x>>2]|0,A=a+172|0;b=c[A>>2]|0;if(!(0>=(b|0)))for(t=a+4600|0,z=a+4604|0,F=a+4592|0,k=d,e=oa[d+-2>>1]|0,d=oa[d>>1]|0,r=0;;){n=c[t>>2]|0;h=R[n+(r+-1<<1)>>1]|0;q=h&65535;l=r+1|0;f=oa[k+(l<<1)>>1]|0;m=c[z>>2]|0;k=d-e|0;e=e-q|0;m=(9*((9*(u[m+(f-d)>>0]|0)|0)+(u[m+k>>0]|
0)|0)|0)+(u[m+e>>0]|0)|0;n=n+(r<<1)|0;if(m){b=d-q>>31;b=0>(b^e|0)?d:q+(0>(b^k|0)?0:k)|0;var q=a,h=m,n=oa[n>>1]|0,m=b,e=0,q=q|0,h=h|0,m=m|0,y=k=0,S=0,I=0,E=0,L=0,M=0,D=0,B=0,w=0,w=h>>31,I=(w^h)-w|0,D=q+188+(12*I|0)+10|0,n=R[D>>1]|0,M=q+188+(12*I|0)|0,e=c[M>>2]|0;if((n|0)<(e|0))if((n<<1|0)<(e|0))if((n<<2|0)<(e|0))if((n<<3|0)<(e|0))if((n<<4|0)<(e|0))for(h=5;;)if((n<<h|0)<(e|0))h=h+1|0;else break;else h=4;else h=3;else h=2;else h=1;else h=0;L=q+188+(12*I|0)+8|0;n=(R[L>>1]^w)-w+m|0;B=q+128|0;e=c[B>>2]|
0;E=(n&e|0)==(n|0)?n:e&~(n>>31);n=q+112|0;8>(c[n>>2]|0)&&aa(q);e=q+108|0;m=c[e>>2]|0;k=m>>>24;(y=c[2832+(h<<11)+(k<<3)+4>>2]|0)?(c[n>>2]=(c[n>>2]|0)-y,c[e>>2]=m<<y,n=c[2832+(h<<11)+(k<<3)>>2]|0):(S=c[q+148>>2]|0,e=c[q+140>>2]|0,n=Ya(q)|0,(n|0)<(S+-1-e|0)?h&&(n=(Ta(q,h)|0)+(n<<h)|0):n=(Ta(q,e)|0)+1|0,n=n<<31>>31^n>>1,65535<((-1<(n|0)?n:0-n|0)|0)&&(n=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,n|0,5,35648),q=g,g=0,q&1?(q=J()|0,za(n|0),V(q|0)):Pa(n|0,824,96)));S=q+136|0;
m=c[S>>2]|0;h?y=n:(e=m?0:(c[q+188+(12*I|0)+4>>2]<<1)+-1+(R[D>>1]|0)>>31,y=e^n);h=c[q+152>>2]|0;e=(c[M>>2]|0)+(-1<(y|0)?y:0-y|0)|0;k=q+188+(12*I|0)+4|0;n=(c[k>>2]|0)+(ia(m<<1|1,y)|0)|0;m=R[D>>1]|0;(m|0)==(h|0)&&(e>>=1,n>>=1,m=h>>1);c[M>>2]=e;h=m+1|0;R[D>>1]=h;e=h+n|0;1<=(e|0)?0<(n|0)&&(n=n-h|0,D=R[L>>1]|0,R[L>>1]=(127>D<<16>>16&1)+(D&65535),n=0<(n|0)?0:n):(n=R[L>>1]|0,R[L>>1]=(n&65535)-(-128<n<<16>>16&1),n=(e|0)>(~m|0)?e:0-m|0);c[k>>2]=n;h=c[S>>2]|0;m=h<<1|1;e=(ia(m,(y^w)-w|0)|0)+E|0;(e|0)>=(0-h|0)?
(n=c[B>>2]|0,(n+h|0)<(e|0)&&(e=e-(ia(c[q+132>>2]|0,m)|0)|0)):(e=(ia(c[q+132>>2]|0,m)|0)+e|0,n=c[B>>2]|0);q=(e&n|0)==(e|0)?e:n&~(e>>31);q&=65535;q|=0;q|=0;R[(c[t>>2]|0)+(r<<1)>>1]=q}else{d=a;f=h;l=n;h=b-r|0;d|=0;f|=0;l|=0;h|=0;L=E=I=S=y=k=e=m=n=0;k=d+112|0;y=d+108|0;S=d+4592|0;n=c[k>>2]|0;for(m=0;;){1>(n|0)&&(aa(d),n=c[k>>2]|0);e=c[y>>2]|0;n=n+-1|0;c[k>>2]=n;c[y>>2]=e<<1;if(0<=(e|0)){I=8;break}e=c[S>>2]|0;E=1<<c[36476+(e<<2)>>2];L=h-m|0;L=(E|0)<(L|0)?E:L;m=L+m|0;(L|0)==(E|0)&&(c[S>>2]=30<(e|0)?31:
e+1|0);if((m|0)==(h|0)){n=h;break}}8==(I|0)&&((m|0)!=(h|0)?(n=c[S>>2]|0,n=28>(n+-4|0)>>>0?Ta(d,c[36476+(n<<2)>>2]|0)|0:0,n=n+m|0,(n|0)>(h|0)&&(n=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,n|0,5,35648),L=g,g=0,L&1?(L=J()|0,za(n|0),V(L|0)):Pa(n|0,824,96))):n=h);if(0<(n|0)){m=0;do R[l+(m<<1)>>1]=f,m=m+1|0;while((m|0)!=(n|0))}d=n|0;b=d|0;d=b+r|0;(d|0)!=(c[A>>2]|0)&&(f=a,l=q,q=oa[(c[x>>2]|0)+(d<<1)>>1]|0,f|=0,l|=0,q|=0,e=m=n=h=0,m=l-q|0,e=f+128|0,h=f+136|0,((-1<(m|0)?m:0-
m|0)|0)>(c[h>>2]|0)?(l=ia(Pb(f,f+4568|0)|0,q-l>>31|1)|0,n=c[h>>2]|0,m=n<<1|1,l=(ia(l,m)|0)+q|0,(l|0)>=(0-n|0)?(h=c[e>>2]|0,(h+n|0)<(l|0)&&(l=l-(ia(c[f+132>>2]|0,m)|0)|0)):(l=(ia(c[f+132>>2]|0,m)|0)+l|0,h=c[e>>2]|0)):(q=Pb(f,f+4580|0)|0,m=c[h>>2]|0,n=m<<1|1,l=(ia(n,q)|0)+l|0,(l|0)>=(0-m|0)?(h=c[e>>2]|0,(h+m|0)<(l|0)&&(l=l-(ia(c[f+132>>2]|0,n)|0)|0)):(l=(ia(c[f+132>>2]|0,n)|0)+l|0,h=c[e>>2]|0)),f=(l&h|0)==(l|0)?l:h&~(l>>31),f&=65535,f|=0,q=f|0,R[(c[t>>2]|0)+(d<<1)>>1]=q,q=c[F>>2]|0,c[F>>2]=1>(q|0)?
0:q+-1|0,b=b+1|0);l=b+r|0;f=c[x>>2]|0;d=oa[f+(l+-1<<1)>>1]|0;f=oa[f+(l<<1)>>1]|0}b=c[A>>2]|0;if((b|0)<=(l|0))break;k=c[x>>2]|0;e=d;d=f;r=l}},function(a,b){a|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,y=0,E=0,S=0,I=0,L=0,M=0,D=0,B=0,w=0,O=0,G=0,P=0,Y=0,la=0,U=0,ja=0,N=0,ka=0,da=0,va=0,da=F;F=F+32|0;w=da+24|0;ka=da+18|0;N=da+12|0;O=da+6|0;G=da;P=a+172|0;b=c[P>>2]|0;if(!(0>=(b|0)))for(Y=a+4600|0,la=a+4596|0,U=a+4604|0,ja=a+4592|0,B=0;;){f=B+-1|0;l=c[Y>>2]|0;va=c[la>>2]|0;d=B+1|0;
e=oa[va+(6*B|0)>>1]|0;D=c[U>>2]|0;h=oa[va+(6*f|0)>>1]|0;k=e-h|0;m=oa[l+(6*f|0)>>1]|0;n=h-m|0;q=(9*((9*(u[D+((oa[va+(6*d|0)>>1]|0)-e)>>0]|0)|0)+(u[D+k>>0]|0)|0)|0)+(u[D+n>>0]|0)|0;r=oa[va+(6*B|0)+2>>1]|0;x=oa[va+(6*f|0)+2>>1]|0;t=r-x|0;z=oa[l+(6*f|0)+2>>1]|0;A=x-z|0;y=(9*((9*(u[D+((oa[va+(6*d|0)+2>>1]|0)-r)>>0]|0)|0)+(u[D+t>>0]|0)|0)|0)+(u[D+A>>0]|0)|0;E=oa[va+(6*B|0)+4>>1]|0;S=oa[va+(6*f|0)+4>>1]|0;I=E-S|0;L=oa[l+(6*f|0)+4>>1]|0;M=S-L|0;D=(9*((9*(u[D+((oa[va+(6*d|0)+4>>1]|0)-E)>>0]|0)|0)+(u[D+I>>
0]|0)|0)|0)+(u[D+M>>0]|0)|0;if(y|q|D)f=oa[l+(6*B|0)>>1]|0,b=e-m>>31,b=0<=(b^n|0)?0>(b^k|0)?m:m-h+e|0:e,e=fc(a,q,f,b,0)|0,f=oa[(c[Y>>2]|0)+(6*B|0)+2>>1]|0,b=r-z>>31,b=0<=(b^A|0)?0>(b^t|0)?z:z-x+r|0:r,f=fc(a,y,f,b,0)|0,l=oa[(c[Y>>2]|0)+(6*B|0)+4>>1]|0,b=E-L>>31,b=0<=(b^M|0)?0>(b^I|0)?L:L-S+E|0:E,D=fc(a,D,l,b,0)|0,va=c[Y>>2]|0,R[va+(6*B|0)>>1]=e,R[va+(6*B|0)+2>>1]=f,R[va+(6*B|0)+4>>1]=D;else{d=l+(6*f|0)|0;R[N>>1]=R[d>>1]|0;R[N+2>>1]=R[d+2>>1]|0;R[N+4>>1]=R[d+4>>1]|0;R[w>>1]=R[d>>1]|0;R[w+2>>1]=R[d+2>>
1]|0;R[w+4>>1]=R[d+4>>1]|0;va=a;d=w;l=l+(6*B|0)|0;f=b-B|0;va|=0;d|=0;l|=0;f|=0;t=x=r=q=n=m=k=h=e=0;m=va+112|0;n=va+108|0;q=va+4592|0;e=c[m>>2]|0;for(h=0;;){1>(e|0)&&(aa(va),e=c[m>>2]|0);k=c[n>>2]|0;e=e+-1|0;c[m>>2]=e;c[n>>2]=k<<1;if(0<=(k|0)){r=8;break}k=c[q>>2]|0;x=1<<c[36476+(k<<2)>>2];t=f-h|0;t=(x|0)<(t|0)?x:t;h=t+h|0;(t|0)==(x|0)&&(c[q>>2]=30<(k|0)?31:k+1|0);if((h|0)==(f|0)){e=f;break}}8==(r|0)&&((h|0)!=(f|0)?(e=c[q>>2]|0,e=28>(e+-4|0)>>>0?Ta(va,c[36476+(e<<2)>>2]|0)|0:0,e=e+h|0,(e|0)>(f|0)&&
(e=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,e|0,5,35648),t=g,g=0,t&1?(t=J()|0,za(e|0),V(t|0)):Pa(e|0,824,96))):e=f);if(!(0>=(e|0))){h=0;do t=l+(6*h|0)|0,R[t>>1]=R[d>>1]|0,R[t+2>>1]=R[d+2>>1]|0,R[t+4>>1]=R[d+4>>1]|0,h=h+1|0;while((h|0)!=(e|0))}va=e|0;b=va|0;d=b+B|0;(d|0)!=(c[P>>2]|0)&&(va=(c[la>>2]|0)+(6*d|0)|0,R[G>>1]=R[va>>1]|0,R[G+2>>1]=R[va+2>>1]|0,R[G+4>>1]=R[va+4>>1]|0,va=(c[Y>>2]|0)+(6*d|0)|0,R[ka>>1]=R[N>>1]|0,R[ka+2>>1]=R[N+2>>1]|0,R[ka+4>>1]=R[N+4>>1]|0,R[w>>
1]=R[G>>1]|0,R[w+2>>1]=R[G+2>>1]|0,R[w+4>>1]=R[G+4>>1]|0,l=O,d=a,f=ka,e=w,l|=0,d|=0,f|=0,e|=0,t=x=r=q=n=m=k=h=0,q=d+4568|0,t=Wb(d,q)|0,m=Wb(d,q)|0,q=Wb(d,q)|0,k=d+128|0,h=oa[e>>1]|0,r=c[d+136>>2]|0,x=r<<1|1,h=(ia(ia(x,t)|0,h-(oa[f>>1]|0)>>31|1)|0)+h|0,t=0-r|0,(h|0)>=(t|0)?(k=c[k>>2]|0,(k+r|0)<(h|0)&&(h=h-(ia(c[d+132>>2]|0,x)|0)|0)):(h=(ia(c[d+132>>2]|0,x)|0)+h|0,k=c[k>>2]|0),(h&k|0)!=(h|0)&&(h=k&~(h>>31)),n=h&65535,h=oa[e+2>>1]|0,h=(ia(ia(x,m)|0,h-(oa[f+2>>1]|0)>>31|1)|0)+h|0,(h|0)>=(t|0)?(k+r|0)<
(h|0)&&(h=h-(ia(c[d+132>>2]|0,x)|0)|0):h=(ia(c[d+132>>2]|0,x)|0)+h|0,(h&k|0)!=(h|0)&&(h=k&~(h>>31)),m=h&65535,h=oa[e+4>>1]|0,h=(ia(ia(x,q)|0,h-(oa[f+4>>1]|0)>>31|1)|0)+h|0,(h|0)>=(t|0)?(k+r|0)<(h|0)&&(h=h-(ia(c[d+132>>2]|0,x)|0)|0):h=(ia(c[d+132>>2]|0,x)|0)+h|0,d=(h&k|0)==(h|0)?h:k&~(h>>31),d&=65535,R[l>>1]=n,t=l+2|0,R[t>>1]=m,l=l+4|0,R[l>>1]=d,R[va>>1]=R[O>>1]|0,R[va+2>>1]=R[O+2>>1]|0,R[va+4>>1]=R[O+4>>1]|0,va=c[ja>>2]|0,c[ja>>2]=1>(va|0)?0:va+-1|0,b=b+1|0);d=b+B|0}b=c[P>>2]|0;if((d|0)>=(b|0))break;
else B=d}F=da},function(a,b){a|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,y=0,E=0,S=0,I=0,L=0,D=0,M=0,B=0,w=0,O=0,G=0,P=0,Y=0,la=0,U=0,ja=0,N=0,R=0,va=0,ka=0,va=F;F=F+16|0;w=va+12|0;R=va+9|0;N=va+6|0;O=va+3|0;G=va;P=a+172|0;b=c[P>>2]|0;if(!(0>=(b|0)))for(Y=a+4600|0,la=a+4596|0,U=a+4604|0,ja=a+4592|0,B=0;;){L=B+-1|0;f=c[Y>>2]|0;l=f+(3*L|0)|0;ka=c[la>>2]|0;d=B+1|0;e=ea[ka+(3*B|0)>>0]|0;M=c[U>>2]|0;h=ea[ka+(3*L|0)>>0]|0;k=e-h|0;m=ea[l>>0]|0;n=h-m|0;q=(9*((9*(u[M+((ea[ka+(3*d|0)>>
0]|0)-e)>>0]|0)|0)+(u[M+k>>0]|0)|0)|0)+(u[M+n>>0]|0)|0;r=ea[ka+(3*B|0)+1>>0]|0;x=ea[ka+(3*L|0)+1>>0]|0;t=r-x|0;z=ea[f+(3*L|0)+1>>0]|0;A=x-z|0;y=(9*((9*(u[M+((ea[ka+(3*d|0)+1>>0]|0)-r)>>0]|0)|0)+(u[M+t>>0]|0)|0)|0)+(u[M+A>>0]|0)|0;E=ea[ka+(3*B|0)+2>>0]|0;S=ea[ka+(3*L|0)+2>>0]|0;I=E-S|0;L=ea[f+(3*L|0)+2>>0]|0;D=S-L|0;M=(9*((9*(u[M+((ea[ka+(3*d|0)+2>>0]|0)-E)>>0]|0)|0)+(u[M+I>>0]|0)|0)|0)+(u[M+D>>0]|0)|0;if(y|q|M)f=ea[f+(3*B|0)>>0]|0,b=e-m>>31,b=0<=(b^n|0)?0>(b^k|0)?m:m-h+e|0:e,e=pc(a,q,f,b,0)|0,f=ea[(c[Y>>
2]|0)+(3*B|0)+1>>0]|0,b=r-z>>31,b=0<=(b^A|0)?0>(b^t|0)?z:z-x+r|0:r,f=pc(a,y,f,b,0)|0,l=ea[(c[Y>>2]|0)+(3*B|0)+2>>0]|0,b=E-L>>31,b=0<=(b^D|0)?0>(b^I|0)?L:L-S+E|0:E,M=pc(a,M,l,b,0)|0,ka=(c[Y>>2]|0)+(3*B|0)|0,u[ka>>0]=e,u[ka+1>>0]=f,u[ka+2>>0]=M;else{u[N>>0]=u[l>>0]|0;u[N+1>>0]=u[l+1>>0]|0;u[N+2>>0]=u[l+2>>0]|0;u[w>>0]=u[l>>0]|0;u[w+1>>0]=u[l+1>>0]|0;u[w+2>>0]=u[l+2>>0]|0;d=a;ka=w;f=f+(3*B|0)|0;l=b-B|0;d|=0;ka|=0;f|=0;l|=0;t=x=r=q=n=m=k=h=e=0;m=d+112|0;n=d+108|0;q=d+4592|0;e=c[m>>2]|0;for(h=0;;){1>(e|
0)&&(aa(d),e=c[m>>2]|0);k=c[n>>2]|0;e=e+-1|0;c[m>>2]=e;c[n>>2]=k<<1;if(0<=(k|0)){r=8;break}k=c[q>>2]|0;x=1<<c[36476+(k<<2)>>2];t=l-h|0;t=(x|0)<(t|0)?x:t;h=t+h|0;(t|0)==(x|0)&&(c[q>>2]=30<(k|0)?31:k+1|0);if((h|0)==(l|0)){e=l;break}}8==(r|0)&&((h|0)!=(l|0)?(e=c[q>>2]|0,e=28>(e+-4|0)>>>0?Ta(d,c[36476+(e<<2)>>2]|0)|0:0,e=e+h|0,(e|0)>(l|0)&&(e=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,e|0,5,35648),t=g,g=0,t&1?(t=J()|0,za(e|0),V(t|0)):Pa(e|0,824,96))):e=l);if(!(0>=(e|0))){h=
0;do t=f+(3*h|0)|0,u[t>>0]=u[ka>>0]|0,u[t+1>>0]=u[ka+1>>0]|0,u[t+2>>0]=u[ka+2>>0]|0,h=h+1|0;while((h|0)!=(e|0))}d=e|0;b=d|0;d=b+B|0;(d|0)!=(c[P>>2]|0)&&(ka=(c[la>>2]|0)+(3*d|0)|0,u[G>>0]=u[ka>>0]|0,u[G+1>>0]=u[ka+1>>0]|0,u[G+2>>0]=u[ka+2>>0]|0,ka=c[Y>>2]|0,u[R>>0]=u[N>>0]|0,u[R+1>>0]=u[N+1>>0]|0,u[R+2>>0]=u[N+2>>0]|0,u[w>>0]=u[G>>0]|0,u[w+1>>0]=u[G+1>>0]|0,u[w+2>>0]=u[G+2>>0]|0,f=O,l=a,e=R,h=w,f|=0,l|=0,e|=0,h|=0,z=t=x=r=q=n=m=k=0,r=l+4568|0,z=qc(l,r)|0,n=qc(l,r)|0,r=qc(l,r)|0,m=l+128|0,k=ea[h>>0]|
0,x=c[l+136>>2]|0,t=x<<1|1,k=(ia(ia(t,z)|0,k-(ea[e>>0]|0)>>31|1)|0)+k|0,z=0-x|0,(k|0)>=(z|0)?(m=c[m>>2]|0,(m+x|0)<(k|0)&&(k=k-(ia(c[l+132>>2]|0,t)|0)|0)):(k=(ia(c[l+132>>2]|0,t)|0)+k|0,m=c[m>>2]|0),(k&m|0)!=(k|0)&&(k=m&~(k>>31)),q=k&255,k=ea[h+1>>0]|0,k=(ia(ia(t,n)|0,k-(ea[e+1>>0]|0)>>31|1)|0)+k|0,(k|0)>=(z|0)?(m+x|0)<(k|0)&&(k=k-(ia(c[l+132>>2]|0,t)|0)|0):k=(ia(c[l+132>>2]|0,t)|0)+k|0,(k&m|0)!=(k|0)&&(k=m&~(k>>31)),n=k&255,k=ea[h+2>>0]|0,k=(ia(ia(t,r)|0,k-(ea[e+2>>0]|0)>>31|1)|0)+k|0,(k|0)>=(z|0)?
(m+x|0)<(k|0)&&(k=k-(ia(c[l+132>>2]|0,t)|0)|0):k=(ia(c[l+132>>2]|0,t)|0)+k|0,l=(k&m|0)==(k|0)?k:m&~(k>>31),l&=255,u[f>>0]=q,z=f+1|0,u[z>>0]=n,f=f+2|0,u[f>>0]=l,ka=ka+(3*d|0)|0,u[ka>>0]=u[O>>0]|0,u[ka+1>>0]=u[O+1>>0]|0,u[ka+2>>0]=u[O+2>>0]|0,ka=c[ja>>2]|0,c[ja>>2]=1>(ka|0)?0:ka+-1|0,b=b+1|0);d=b+B|0}b=c[P>>2]|0;if((d|0)>=(b|0))break;else B=d}F=va},function(a,b){a|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,r=a+4572|0;b=c[r>>2]|0;z=a+148|0;if(!(0>=(c[z>>2]|0)))for(x=a+4576|0,t=a+4580|
0,l=b,e=oa[b+-2>>1]|0,b=oa[b>>1]|0,q=0;;){n=c[x>>2]|0;m=oa[n+(q+-1<<1)>>1]|0;f=q+1|0;d=oa[l+(f<<1)>>1]|0;k=c[t>>2]|0;h=b-e|0;l=e-m|0;if(k=(9*((9*(u[k+(d-b)>>0]|0)|0)+(u[k+h>>0]|0)|0)|0)+(u[k+l>>0]|0)|0)e=b-m>>31,l=0>(e^l|0)?b:m+(0>(e^h|0)?0:h)|0,n=zc(a,k,oa[n+(q<<1)>>1]|0,l,0)|0,R[(c[x>>2]|0)+(q<<1)>>1]=n;else{d=a;f=q;l=0;d|=0;f|=0;h=e=n=k=0;e=d+4576|0;n=c[e>>2]|0;l=R[n+(f+-1<<1)>>1]|0;h=d+148|0;for(var k=d,m=l,n=n+(f<<1)|0,F=(c[h>>2]|0)-f|0,k=k|0,m=m|0,n=n|0,F=F|0,A=0,y=0,S=0,I=0,E=0,L=0,M=0,D=0,
B=0,I=k+112|0,E=k+108|0,L=k+4568|0,A=c[I>>2]|0,y=0;;){1>(A|0)&&(aa(k),A=c[I>>2]|0);S=c[E>>2]|0;A=A+-1|0;c[I>>2]=A;c[E>>2]=S<<1;if(0<=(S|0)){M=8;break}S=c[L>>2]|0;D=1<<c[36476+(S<<2)>>2];B=F-y|0;B=(D|0)<(B|0)?D:B;y=B+y|0;(B|0)==(D|0)&&(c[L>>2]=30<(S|0)?31:S+1|0);if((y|0)==(F|0)){A=F;break}}8==(M|0)&&((y|0)!=(F|0)?(A=c[L>>2]|0,A=28>(A+-4|0)>>>0?Ta(k,c[36476+(A<<2)>>2]|0)|0:0,A=A+y|0,(A|0)>(F|0)&&(A=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,A|0,5,35648),B=g,g=0,B&1?(B=
J()|0,za(A|0),V(B|0)):Pa(A|0,824,96))):A=F);if(0<(A|0)){y=0;do R[n+(y<<1)>>1]=m,y=y+1|0;while((y|0)!=(A|0))}k=A|0;n=k|0;k=n+f|0;(k|0)==(c[h>>2]|0)?h=n:(l&=65535,f=oa[(c[d+4572>>2]|0)+(k<<1)>>1]|0,h=l-f|0,l=1>((-1<(h|0)?h:0-h|0)|0)?(uc(d,d+4556|0)|0)+l|0:(ia(uc(d,d+4544|0)|0,f-l>>31|1)|0)+f|0,R[(c[e>>2]|0)+(k<<1)>>1]=l,h=d+4568|0,d=c[h>>2]|0,c[h>>2]=1>(d|0)?0:d+-1|0,h=n+1|0);d=h|0;f=(d|0)+q|0;d=c[r>>2]|0;b=oa[d+(f+-1<<1)>>1]|0;d=oa[d+(f<<1)>>1]|0}if((f|0)>=(c[z>>2]|0))break;l=c[r>>2]|0;e=b;b=d;q=f}},
function(a,b){a|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,r=a+4572|0;b=c[r>>2]|0;z=a+148|0;if(!(0>=(c[z>>2]|0)))for(x=a+4576|0,t=a+4580|0,l=b,e=oa[b+-2>>1]|0,b=oa[b>>1]|0,q=0;;){n=c[x>>2]|0;m=oa[n+(q+-1<<1)>>1]|0;f=q+1|0;d=oa[l+(f<<1)>>1]|0;k=c[t>>2]|0;h=b-e|0;l=e-m|0;if(k=(9*((9*(u[k+(d-b)>>0]|0)|0)+(u[k+h>>0]|0)|0)|0)+(u[k+l>>0]|0)|0)e=b-m>>31,l=0>(e^l|0)?b:m+(0>(e^h|0)?0:h)|0,n=Ec(a,k,oa[n+(q<<1)>>1]|0,l,0)|0,R[(c[x>>2]|0)+(q<<1)>>1]=n;else{d=a;f=q;l=0;d|=0;f|=0;h=e=n=k=0;e=d+
4576|0;n=c[e>>2]|0;l=R[n+(f+-1<<1)>>1]|0;h=d+148|0;for(var k=d,m=l,n=n+(f<<1)|0,F=(c[h>>2]|0)-f|0,k=k|0,m=m|0,n=n|0,F=F|0,A=0,y=0,S=0,I=0,E=0,L=0,M=0,D=0,B=0,I=k+112|0,E=k+108|0,L=k+4568|0,A=c[I>>2]|0,y=0;;){1>(A|0)&&(aa(k),A=c[I>>2]|0);S=c[E>>2]|0;A=A+-1|0;c[I>>2]=A;c[E>>2]=S<<1;if(0<=(S|0)){M=8;break}S=c[L>>2]|0;D=1<<c[36476+(S<<2)>>2];B=F-y|0;B=(D|0)<(B|0)?D:B;y=B+y|0;(B|0)==(D|0)&&(c[L>>2]=30<(S|0)?31:S+1|0);if((y|0)==(F|0)){A=F;break}}8==(M|0)&&((y|0)!=(F|0)?(A=c[L>>2]|0,A=28>(A+-4|0)>>>0?Ta(k,
c[36476+(A<<2)>>2]|0)|0:0,A=A+y|0,(A|0)>(F|0)&&(A=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,A|0,5,35648),B=g,g=0,B&1?(B=J()|0,za(A|0),V(B|0)):Pa(A|0,824,96))):A=F);if(0<(A|0)){y=0;do R[n+(y<<1)>>1]=m,y=y+1|0;while((y|0)!=(A|0))}k=A|0;n=k|0;k=n+f|0;(k|0)==(c[h>>2]|0)?h=n:(l&=65535,f=oa[(c[d+4572>>2]|0)+(k<<1)>>1]|0,h=l-f|0,l=1>((-1<(h|0)?h:0-h|0)|0)?(yc(d,d+4556|0)|0)+l|0:(ia(yc(d,d+4544|0)|0,f-l>>31|1)|0)+f|0,R[(c[e>>2]|0)+(k<<1)>>1]=l&4095,h=d+4568|0,d=c[h>>2]|0,c[h>>
2]=1>(d|0)?0:d+-1|0,h=n+1|0);d=h|0;f=(d|0)+q|0;d=c[r>>2]|0;b=oa[d+(f+-1<<1)>>1]|0;d=oa[d+(f<<1)>>1]|0}if((f|0)>=(c[z>>2]|0))break;l=c[r>>2]|0;e=b;b=d;q=f}},function(a,b){a|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,r=a+4572|0;b=c[r>>2]|0;z=a+148|0;if(!(0>=(c[z>>2]|0)))for(x=a+4576|0,t=a+4580|0,l=b,e=ea[b+-1>>0]|0,b=ea[b>>0]|0,q=0;;){n=c[x>>2]|0;m=ea[n+(q+-1)>>0]|0;f=q+1|0;d=ea[l+f>>0]|0;k=c[t>>2]|0;h=b-e|0;l=e-m|0;if(k=(9*((9*(u[k+(d-b)>>0]|0)|0)+(u[k+h>>0]|0)|0)|0)+(u[k+l>>0]|0)|
0)e=b-m>>31,l=0>(e^l|0)?b:m+(0>(e^h|0)?0:h)|0,n=Fc(a,k,ea[n+q>>0]|0,l,0)|0,u[(c[x>>2]|0)+q>>0]=n;else{d=a;f=q;l=0;d|=0;f|=0;h=e=n=k=0;e=d+4576|0;n=c[e>>2]|0;l=u[n+(f+-1)>>0]|0;h=d+148|0;for(var k=d,m=l,n=n+f|0,F=(c[h>>2]|0)-f|0,k=k|0,m=m|0,n=n|0,F=F|0,A=0,y=0,S=0,I=0,E=0,L=0,M=0,D=0,B=0,I=k+112|0,E=k+108|0,L=k+4568|0,A=c[I>>2]|0,y=0;;){1>(A|0)&&(aa(k),A=c[I>>2]|0);S=c[E>>2]|0;A=A+-1|0;c[I>>2]=A;c[E>>2]=S<<1;if(0<=(S|0)){M=8;break}S=c[L>>2]|0;D=1<<c[36476+(S<<2)>>2];B=F-y|0;B=(D|0)<(B|0)?D:B;y=B+y|
0;(B|0)==(D|0)&&(c[L>>2]=30<(S|0)?31:S+1|0);if((y|0)==(F|0)){A=F;break}}8==(M|0)&&((y|0)!=(F|0)?(A=c[L>>2]|0,A=28>(A+-4|0)>>>0?Ta(k,c[36476+(A<<2)>>2]|0)|0:0,A=A+y|0,(A|0)>(F|0)&&(A=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,A|0,5,35648),B=g,g=0,B&1?(B=J()|0,za(A|0),V(B|0)):Pa(A|0,824,96))):A=F);0>=(A|0)||Za(n|0,m|0,A|0)|0;k=A|0;n=k|0;k=n+f|0;(k|0)==(c[h>>2]|0)?h=n:(l&=255,f=ea[(c[d+4572>>2]|0)+k>>0]|0,h=l-f|0,l=1>((-1<(h|0)?h:0-h|0)|0)?(Dc(d,d+4556|0)|0)+l|0:(ia(Dc(d,
d+4544|0)|0,f-l>>31|1)|0)+f|0,u[(c[e>>2]|0)+k>>0]=l,h=d+4568|0,d=c[h>>2]|0,c[h>>2]=1>(d|0)?0:d+-1|0,h=n+1|0);d=h|0;f=(d|0)+q|0;d=c[r>>2]|0;b=ea[d+(f+-1)>>0]|0;d=ea[d+f>>0]|0}if((f|0)>=(c[z>>2]|0))break;l=c[r>>2]|0;e=b;b=d;q=f}},function(a,b){a|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,y=0,E=0,S=0,I=0,L=0,M=0,D=0,B=0,w=0,O=0,G=0,B=a+148|0;if(!(0>=(c[B>>2]|0)))for(w=a+4576|0,O=a+4572|0,G=a+4580|0,D=0;;){I=D+-1|0;e=c[w>>2]|0;h=c[O>>2]|0;b=D+1|0;l=ea[h+(3*D|0)>>0]|0;M=c[G>>2]|0;k=
ea[h+(3*I|0)>>0]|0;m=l-k|0;n=ea[e+(3*I|0)>>0]|0;q=k-n|0;r=(9*((9*(u[M+((ea[h+(3*b|0)>>0]|0)-l)>>0]|0)|0)+(u[M+m>>0]|0)|0)|0)+(u[M+q>>0]|0)|0;f=ea[h+(3*D|0)+1>>0]|0;x=ea[h+(3*I|0)+1>>0]|0;t=f-x|0;z=ea[e+(3*I|0)+1>>0]|0;A=x-z|0;y=(9*((9*(u[M+((ea[h+(3*b|0)+1>>0]|0)-f)>>0]|0)|0)+(u[M+t>>0]|0)|0)|0)+(u[M+A>>0]|0)|0;d=ea[h+(3*D|0)+2>>0]|0;E=ea[h+(3*I|0)+2>>0]|0;S=d-E|0;I=ea[e+(3*I|0)+2>>0]|0;L=E-I|0;M=(9*((9*(u[M+((ea[h+(3*b|0)+2>>0]|0)-d)>>0]|0)|0)+(u[M+S>>0]|0)|0)|0)+(u[M+L>>0]|0)|0;if(y|r|M)h=ea[e+
(3*D|0)>>0]|0,e=l-n>>31,0<=(e^q|0)&&(l=0>(e^m|0)?n:n-k+l|0),h=Cc(a,r,h,l,0)|0,e=ea[(c[w>>2]|0)+(3*D|0)+1>>0]|0,l=f-z>>31,0<=(l^A|0)&&(f=0>(l^t|0)?z:z-x+f|0),l=Cc(a,y,e,f,0)|0,e=ea[(c[w>>2]|0)+(3*D|0)+2>>0]|0,f=d-I>>31,0<=(f^L|0)&&(d=0>(f^S|0)?I:I-E+d|0),M=Cc(a,M,e,d,0)|0,D=(c[w>>2]|0)+(3*D|0)|0,u[D>>0]=h,u[D+1>>0]=l,u[D+2>>0]=M;else{d=a;f=D;x=0;d|=0;f|=0;A=z=q=r=n=m=k=h=e=t=l=0;m=F;F=F+16|0;r=m+3|0;q=m;e=d+4576|0;x=c[e>>2]|0;l=x+(3*(f+-1|0)|0)|0;h=u[l>>0]|0;k=u[l+1>>0]|0;l=u[l+2>>0]|0;u[q>>0]=h;u[q+
1>>0]=k;u[q+2>>0]=l;n=d+148|0;t=(c[n>>2]|0)-f|0;u[r>>0]=u[q>>0]|0;u[r+1>>0]=u[q+1>>0]|0;u[r+2>>0]=u[q+2>>0]|0;for(var q=d,x=x+(3*f|0)|0,q=q|0,r=r|0,x=x|0,t=t|0,P=M=L=I=S=E=y=A=z=0,E=q+112|0,S=q+108|0,I=q+4568|0,z=c[E>>2]|0,A=0;;){1>(z|0)&&(aa(q),z=c[E>>2]|0);y=c[S>>2]|0;z=z+-1|0;c[E>>2]=z;c[S>>2]=y<<1;if(0<=(y|0)){L=8;break}y=c[I>>2]|0;M=1<<c[36476+(y<<2)>>2];P=t-A|0;P=(M|0)<(P|0)?M:P;A=P+A|0;(P|0)==(M|0)&&(c[I>>2]=30<(y|0)?31:y+1|0);if((A|0)==(t|0)){z=t;break}}8==(L|0)&&((A|0)!=(t|0)?(z=c[I>>2]|
0,z=28>(z+-4|0)>>>0?Ta(q,c[36476+(z<<2)>>2]|0)|0:0,z=z+A|0,(z|0)>(t|0)&&(z=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,z|0,5,35648),P=g,g=0,P&1?(P=J()|0,za(z|0),V(P|0)):Pa(z|0,824,96))):z=t);if(!(0>=(z|0))){A=0;do P=x+(3*A|0)|0,u[P>>0]=u[r>>0]|0,u[P+1>>0]=u[r+1>>0]|0,u[P+2>>0]=u[r+2>>0]|0,A=A+1|0;while((A|0)!=(z|0))}q=z|0;t=q|0;x=t+f|0;(x|0)==(c[n>>2]|0)?q=t:(r=(c[d+4572>>2]|0)+(3*x|0)|0,f=u[r>>0]|0,n=u[r+1>>0]|0,r=u[r+2>>0]|0,q=c[e>>2]|0,e=d+4544|0,A=ed(d,e)|0,z=ed(d,
e)|0,f&=255,f=(ia(f-(h&255)>>31|1,A)|0)+f&255,n&=255,n=(ia(n-(k&255)>>31|1,z)|0)+n&255,r&=255,r=(ia(r-(l&255)>>31|1,ed(d,e)|0)|0)+r&255,q=q+(3*x|0)|0,u[q>>0]=f,u[q+1>>0]=n,u[q+2>>0]=r,q=d+4568|0,r=c[q>>2]|0,c[q>>2]=1>(r|0)?0:r+-1|0,q=t+1|0);F=m;d=q|0;b=(d|0)+D|0}if((b|0)<(c[B>>2]|0))D=b;else break}},function(a,b){a|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,F=0,A=0,x=a+4596|0,d=c[x>>2]|0,A=a+172|0;b=c[A>>2]|0;if(!(0>=(b|0)))for(t=a+4600|0,z=a+4604|0,F=a+4592|0,k=d,e=ea[d+-1>>0]|0,
d=ea[d>>0]|0,r=0;;){n=c[t>>2]|0;h=u[n+(r+-1)>>0]|0;q=h&255;l=r+1|0;f=ea[k+l>>0]|0;m=c[z>>2]|0;k=d-e|0;e=e-q|0;m=(9*((9*(u[m+(f-d)>>0]|0)|0)+(u[m+k>>0]|0)|0)|0)+(u[m+e>>0]|0)|0;n=n+r|0;if(m){b=d-q>>31;b=0>(b^e|0)?d:q+(0>(b^k|0)?0:k)|0;var q=a,h=m,n=ea[n>>0]|0,m=b,e=0,q=q|0,h=h|0,m=m|0,y=k=0,S=0,I=0,E=0,L=0,M=0,D=0,B=0,w=0,w=h>>31,I=(w^h)-w|0,D=q+188+(12*I|0)+10|0,n=R[D>>1]|0,M=q+188+(12*I|0)|0,e=c[M>>2]|0;if((n|0)<(e|0))if((n<<1|0)<(e|0))if((n<<2|0)<(e|0))if((n<<3|0)<(e|0))if((n<<4|0)<(e|0))for(h=
5;;)if((n<<h|0)<(e|0))h=h+1|0;else break;else h=4;else h=3;else h=2;else h=1;else h=0;L=q+188+(12*I|0)+8|0;n=(R[L>>1]^w)-w+m|0;B=q+128|0;e=c[B>>2]|0;E=(n&e|0)==(n|0)?n:e&~(n>>31);n=q+112|0;8>(c[n>>2]|0)&&aa(q);e=q+108|0;m=c[e>>2]|0;k=m>>>24;(y=c[2832+(h<<11)+(k<<3)+4>>2]|0)?(c[n>>2]=(c[n>>2]|0)-y,c[e>>2]=m<<y,n=c[2832+(h<<11)+(k<<3)>>2]|0):(S=c[q+148>>2]|0,e=c[q+140>>2]|0,n=Ya(q)|0,(n|0)<(S+-1-e|0)?h&&(n=(Ta(q,h)|0)+(n<<h)|0):n=(Ta(q,e)|0)+1|0,n=n<<31>>31^n>>1,65535<((-1<(n|0)?n:0-n|0)|0)&&(n=xa(16)|
0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,n|0,5,35648),q=g,g=0,q&1?(q=J()|0,za(n|0),V(q|0)):Pa(n|0,824,96)));S=q+136|0;m=c[S>>2]|0;h?y=n:(e=m?0:(c[q+188+(12*I|0)+4>>2]<<1)+-1+(R[D>>1]|0)>>31,y=e^n);h=c[q+152>>2]|0;e=(c[M>>2]|0)+(-1<(y|0)?y:0-y|0)|0;k=q+188+(12*I|0)+4|0;n=(c[k>>2]|0)+(ia(m<<1|1,y)|0)|0;m=R[D>>1]|0;(m|0)==(h|0)&&(e>>=1,n>>=1,m=h>>1);c[M>>2]=e;h=m+1|0;R[D>>1]=h;e=h+n|0;1<=(e|0)?0<(n|0)&&(n=n-h|0,D=R[L>>1]|0,R[L>>1]=(127>D<<16>>16&1)+(D&65535),n=0<(n|0)?0:n):(n=
R[L>>1]|0,R[L>>1]=(n&65535)-(-128<n<<16>>16&1),n=(e|0)>(~m|0)?e:0-m|0);c[k>>2]=n;h=c[S>>2]|0;m=h<<1|1;e=(ia(m,(y^w)-w|0)|0)+E|0;(e|0)>=(0-h|0)?(n=c[B>>2]|0,(n+h|0)<(e|0)&&(e=e-(ia(c[q+132>>2]|0,m)|0)|0)):(e=(ia(c[q+132>>2]|0,m)|0)+e|0,n=c[B>>2]|0);q=(e&n|0)==(e|0)?e:n&~(e>>31);q&=255;q|=0;q|=0;u[(c[t>>2]|0)+r>>0]=q}else{d=a;f=h;l=n;h=b-r|0;d|=0;f|=0;l|=0;h|=0;L=E=I=S=y=k=e=m=n=0;k=d+112|0;y=d+108|0;S=d+4592|0;n=c[k>>2]|0;for(m=0;;){1>(n|0)&&(aa(d),n=c[k>>2]|0);e=c[y>>2]|0;n=n+-1|0;c[k>>2]=n;c[y>>
2]=e<<1;if(0<=(e|0)){I=8;break}e=c[S>>2]|0;E=1<<c[36476+(e<<2)>>2];L=h-m|0;L=(E|0)<(L|0)?E:L;m=L+m|0;(L|0)==(E|0)&&(c[S>>2]=30<(e|0)?31:e+1|0);if((m|0)==(h|0)){n=h;break}}8==(I|0)&&((m|0)!=(h|0)?(n=c[S>>2]|0,n=28>(n+-4|0)>>>0?Ta(d,c[36476+(n<<2)>>2]|0)|0:0,n=n+m|0,(n|0)>(h|0)&&(n=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,n|0,5,35648),L=g,g=0,L&1?(L=J()|0,za(n|0),V(L|0)):Pa(n|0,824,96))):n=h);0>=(n|0)||Za(l|0,f|0,n|0)|0;d=n|0;b=d|0;d=b+r|0;(d|0)!=(c[A>>2]|0)&&(f=a,l=
q,q=ea[(c[x>>2]|0)+d>>0]|0,f|=0,l|=0,q|=0,e=m=n=h=0,m=l-q|0,e=f+128|0,h=f+136|0,((-1<(m|0)?m:0-m|0)|0)>(c[h>>2]|0)?(l=ia(ah(f,f+4568|0)|0,q-l>>31|1)|0,n=c[h>>2]|0,m=n<<1|1,l=(ia(l,m)|0)+q|0,(l|0)>=(0-n|0)?(h=c[e>>2]|0,(h+n|0)<(l|0)&&(l=l-(ia(c[f+132>>2]|0,m)|0)|0)):(l=(ia(c[f+132>>2]|0,m)|0)+l|0,h=c[e>>2]|0)):(q=ah(f,f+4580|0)|0,m=c[h>>2]|0,n=m<<1|1,l=(ia(n,q)|0)+l|0,(l|0)>=(0-m|0)?(h=c[e>>2]|0,(h+m|0)<(l|0)&&(l=l-(ia(c[f+132>>2]|0,n)|0)|0)):(l=(ia(c[f+132>>2]|0,n)|0)+l|0,h=c[e>>2]|0)),f=(l&h|0)==
(l|0)?l:h&~(l>>31),f&=255,f|=0,q=f|0,u[(c[t>>2]|0)+d>>0]=q,q=c[F>>2]|0,c[F>>2]=1>(q|0)?0:q+-1|0,b=b+1|0);l=b+r|0;f=c[x>>2]|0;d=ea[f+(l+-1)>>0]|0;f=ea[f+l>>0]|0}b=c[A>>2]|0;if((b|0)<=(l|0))break;k=c[x>>2]|0;e=d;d=f;r=l}},function(a,b){a|=0;b|=0;var g=0,d=0,l=0,f=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,q=(b&65535)>>>8&255,r=a+4|0,g=c[r>>2]|0,x=a+8|0,d=c[x>>2]|0;g>>>0>=d>>>0?(f=l=c[a>>2]|0,e=g-f+1|0,0>(e|0)&&(Md(a),f=c[a>>2]|0,d=c[x>>2]|0,l=f),n=l,g=d-n|0,1073741823>g>>>0?(g<<=1,g=g>>>0<e>>>0?e:g,e=c[r>>
2]|0,d=e-n|0,g?t=8:(k=m=0,h=d,g=e)):(d=c[r>>2]|0,g=2147483647,e=d,d=d-n|0,t=8),8==(t|0)&&(m=g,k=qa(g)|0,h=d,g=e),u[k+h>>0]=q,d=k+(h+1)|0,n=g-n|0,q=k+(h-n)|0,gb(q|0,l|0,n|0)|0,c[a>>2]=q,c[r>>2]=d,c[x>>2]=k+m,f&&(Q(f),d=c[r>>2]|0)):(u[g>>0]=q,d=(c[r>>2]|0)+1|0,c[r>>2]=d);n=b&255;g=c[x>>2]|0;d>>>0<g>>>0?(u[d>>0]=n,c[r>>2]=(c[r>>2]|0)+1):(f=l=c[a>>2]|0,d=d-f+1|0,0>(d|0)&&(Md(a),f=c[a>>2]|0,g=c[x>>2]|0,l=f),m=l,g=g-m|0,1073741823>g>>>0?(g<<=1,g=g>>>0<d>>>0?d:g,e=c[r>>2]|0,d=e-m|0,g?t=18:(h=k=0,g=e)):(d=
c[r>>2]|0,g=2147483647,e=d,d=d-m|0,t=18),18==(t|0)&&(k=g,h=qa(g)|0,g=e),u[h+d>>0]=n,b=g-m|0,t=h+(d-b)|0,gb(t|0,l|0,b|0)|0,c[a>>2]=t,c[r>>2]=h+(d+1),c[x>>2]=h+k,f&&Q(f))},ne,function(a,b){a|=0;b|=0;var g=0,d=0,d=Ae(b)|0,g=qa(d+13|0)|0;c[g>>2]=d;c[g+4>>2]=d;c[g+8>>2]=0;g=g+12|0;gb(g|0,b|0,d+1|0)|0;c[a>>2]=g},function(a,b){a|=0;b|=0;c[a>>2]=36868;g=0;ga(86,a+4|0,(0==(u[b>>0]&1)?b+1|0:c[b+8>>2]|0)|0);a=g;g=0;a&1&&(a=J()|0,V(a|0))},function(a,b){a|=0;b|=0;var g=0,d=0,l=0,g=c[a+40>>2]|0,d=a+32|0,l=a+36|
0;if(g){do g=g+-1|0,Nf[c[(c[d>>2]|0)+(g<<2)>>2]&15](b,a,c[(c[l>>2]|0)+(g<<2)>>2]|0);while(0!=(g|0))}},function(a,b){a|=0;b|=0;var g=0;u[a>>0]=0;c[a+4>>2]=b;g=c[(c[b>>2]|0)+-12>>2]|0;c[b+(g+16)>>2]|0||((g=c[b+(g+72)>>2]|0)&&Mg(g)|0,u[a>>0]=1)},function(a,b){a|=0;c[a>>2]=36868;g=0;ga(86,a+4|0,b|0);a=g;g=0;a&1&&(a=J()|0,V(a|0))},function(a,b){a|=0;b|=0;var d=0,f=0,l=0,e=0,h=0,k=0;4294967279<b>>>0&&jd(a);d=u[a>>0]|0;d&1?(d=c[a>>2]|0,f=(d&-2)+-1|0,d&=255):f=10;k=d&1?c[a+4>>2]|0:(d&255)>>>1;b=k>>>0>b>>>
0?k:b;h=11>b>>>0?10:(b+16&-16)+-1|0;a:do if((h|0)!=(f|0)){do if(10!=(h|0)){b=h+1|0;if(h>>>0<=f>>>0){if(g=0,b=ca(67,b|0)|0,e=g,g=0,e&1){a=J(0)|0;Rc(a|0)|0;$c();break a}}else b=qa(b)|0;d&1?(f=1,l=c[a+8>>2]|0,e=1):(f=1,l=a+1|0,e=0)}else b=a+1|0,f=0,l=c[a+8>>2]|0,e=1;while(0);d=d&1?c[a+4>>2]|0:(d&255)>>>1;gb(b|0,l|0,d+1|0)|0;e&&Q(l);f?(c[a>>2]=h+1|1,c[a+4>>2]=k,c[a+8>>2]=b):u[a>>0]=k<<1}while(0)},function(a,b){a|=0;b|=0;var g=0,d=0,l=0,f=0,g=u[a>>0]|0;(d=0!=(g&1))?(l=(c[a>>2]&-2)+-1|0,f=c[a+4>>2]|0):
(l=1,f=(g&255)>>>1);(f|0)==(l|0)?(Ig(a,l,1,l,l,0,0),l=u[a>>0]&1?8:7):l=d?8:7;7==(l|0)?(u[a>>0]=(f<<1)+2,g=a+4|0,d=f+1|0):8==(l|0)&&(g=c[a+8>>2]|0,d=f+1|0,c[a+4>>2]=d);c[g+(f<<2)>>2]=b;c[g+(d<<2)>>2]=0},function(a,b){a|=0;b|=0;var d=0,f=0,l=0,e=0,h=0,k=0;1073741807<b>>>0&&jd(a);d=u[a>>0]|0;d&1?(d=c[a>>2]|0,f=(d&-2)+-1|0,d&=255):f=1;k=d&1?c[a+4>>2]|0:(d&255)>>>1;b=k>>>0>b>>>0?k:b;h=2>b>>>0?1:(b+4&-4)+-1|0;a:do if((h|0)!=(f|0)){do if(1!=(h|0)){b=(h<<2)+4|0;if(h>>>0<=f>>>0){if(g=0,b=ca(67,b|0)|0,e=g,
g=0,e&1){a=J(0)|0;Rc(a|0)|0;$c();break a}}else b=qa(b)|0;d&1?(f=1,l=c[a+8>>2]|0,e=1):(f=1,l=a+4|0,e=0)}else b=a+4|0,f=0,l=c[a+8>>2]|0,e=1;while(0);d=d&1?c[a+4>>2]|0:(d&255)>>>1;ue(b,l,d+1|0)|0;e&&Q(l);f?(c[a>>2]=h+1|1,c[a+4>>2]=k,c[a+8>>2]=b):u[a>>0]=k<<1}while(0)},function(a,b){a|=0;b|=0;var d=0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;u[a+128>>0]=0;b&&(g=0,ga(125,a|0,b|0),d=g,g=0,d&1?(d=J()|0,ag(a),V(d|0)):Ug(a,b))},function(c,a){Ob(c|0,a|0,Jb(43148)|0)},function(c,a){Ob(c|0,a|0,Jb(43188)|0)},function(c,
a){Ob(c|0,a|0,Jb(44220)|0)},function(c,a){Ob(c|0,a|0,Jb(44212)|0)},function(c,a){Ob(c|0,a|0,Jb(44280)|0)},function(a,b){a|=0;var d=0;c[a+4>>2]=(b|0)+-1;c[a>>2]=44304;g=0;b=Va(3)|0;d=g;g=0;d&1?(d=J()|0,V(d|0)):c[a+8>>2]=b},function(c,a){Ob(c|0,a|0,Jb(44288)|0)},function(c,a){Ob(c|0,a|0,Jb(44344)|0)},function(c,a){Ob(c|0,a|0,Jb(44352)|0)},function(c,a){Ob(c|0,a|0,Jb(44360)|0)},function(c,a){Ob(c|0,a|0,Jb(44368)|0)},function(c,a){Ob(c|0,a|0,Jb(43260)|0)},function(c,a){Ob(c|0,a|0,Jb(43332)|0)},function(c,
a){Ob(c|0,a|0,Jb(43392)|0)},function(c,a){Ob(c|0,a|0,Jb(43452)|0)},function(c,a){Ob(c|0,a|0,Jb(43764)|0)},function(c,a){Ob(c|0,a|0,Jb(43828)|0)},function(c,a){Ob(c|0,a|0,Jb(43892)|0)},function(c,a){Ob(c|0,a|0,Jb(43956)|0)},function(c,a){Ob(c|0,a|0,Jb(43992)|0)},function(c,a){Ob(c|0,a|0,Jb(44028)|0)},function(c,a){Ob(c|0,a|0,Jb(44064)|0)},function(c,a){Ob(c|0,a|0,Jb(44100)|0)},function(c,a){Ob(c|0,a|0,Jb(43544)|0)},function(c,a){Ob(c|0,a|0,Jb(43636)|0)},function(c,a){Ob(c|0,a|0,Jb(43668)|0)},function(c,
a){Ob(c|0,a|0,Jb(43700)|0)},function(c,a){Ob(c|0,a|0,Jb(44140)|0)},function(c,a){Ob(c|0,a|0,Jb(44180)|0)},function(a,b){a|=0;b|=0;var g=0,d=0,l=0,f=0,e=0,e=a+4|0,g=c[e>>2]|0,d=c[a>>2]|0,l=g-d>>2;if(l>>>0>=b>>>0){if(l>>>0>b>>>0&&(f=d+(b<<2)|0,(g|0)!=(f|0))){do g=g+-4|0;while((g|0)!=(f|0));c[e>>2]=g}}else{var d=a|0,f=b-l|0,h=0,k=0,m=0,n=0,l=g=e=0,l=F;F=F+32|0;g=l;n=c[d+8>>2]|0;h=c[d+4>>2]|0;if(n-h>>2>>>0<f>>>0){k=c[d>>2]|0;e=h-k>>2;m=e+f|0;1073741823<m>>>0&&Md(d);h=n-k|0;536870911>h>>2>>>0?(h>>=1,h=
h>>>0<m>>>0?m:h):h=1073741823;m=d+16|0;k=g|0;h|=0;e|=0;m|=0;n=0;c[k+12>>2]=0;c[k+16>>2]=m;h?(n=m+112|0,29>h>>>0&0==(u[n>>0]|0)?u[n>>0]=1:m=qa(h<<2)|0):m=0;c[k>>2]=m;e=m+(e<<2)|0;c[k+8>>2]=e;c[k+4>>2]=e;c[k+12>>2]=m+(h<<2);e=g+8|0;n=c[e>>2]|0;Za(n|0,0,f<<2|0)|0;c[e>>2]=n+(f<<2);d|=0;f=g|0;n=m=k=h=e=0;h=c[d>>2]|0;m=d+4|0;e=f+4|0;k=(c[m>>2]|0)-h|0;n=(c[e>>2]|0)+(0-(k>>2)<<2)|0;c[e>>2]=n;gb(n|0,h|0,k|0)|0;k=c[d>>2]|0;c[d>>2]=c[e>>2];c[e>>2]=k;k=f+8|0;h=c[m>>2]|0;c[m>>2]=c[k>>2];c[k>>2]=h;k=d+8|0;d=f+
12|0;h=c[k>>2]|0;c[k>>2]=c[d>>2];c[d>>2]=h;c[f>>2]=c[e>>2];g|=0;e=f=d=0;f=c[g+4>>2]|0;e=g+8|0;d=c[e>>2]|0;if((d|0)!=(f|0)){do d=d+-4|0;while((d|0)!=(f|0));c[e>>2]=d}if(f=c[g>>2]|0)d=c[g+16>>2]|0,(d|0)==(f|0)?u[d+112>>0]=0:Q(f)}else Ug(d,f);F=l}},function(a,b){a|=0;b|=0;var g=0;1073741823<b>>>0&&Md(a);g=a+128|0;29>b>>>0&0==(u[g>>0]|0)?(u[g>>0]=1,g=a+16|0):g=qa(b<<2)|0;c[a+4>>2]=g;c[a>>2]=g;c[a+8>>2]=g+(b<<2)},kg,kg],bf=[Yb,function(a,b,d,f,l,e){a|=0;b|=0;d|=0;f|=0;l|=0;e|=0;var h=0,k=0,m=0,n=0,q=0,
r=0,x=0,t=0,z=0,A=0,z=F;F=F+64|0;x=z+56|0;h=z+52|0;q=z+48|0;k=z+44|0;m=z+40|0;n=z+36|0;r=z+32|0;A=z+8|0;t=z;a:do if(c[f+4>>2]&1){h=Lb(f)|0;c[n>>2]=h;g=0;a=ma(37,n|0,44220)|0;q=g;g=0;do if(q&1)A=J()|0,Na(h)|0,h=A;else if(Na(h)|0,h=Lb(f)|0,c[r>>2]=h,g=0,m=ma(37,r|0,44360)|0,r=g,g=0,r&1)A=J()|0,Na(h)|0,h=A;else{Na(h)|0;g=0;ga(c[(c[m>>2]|0)+24>>2]|0,A|0,m|0);r=g;g=0;if(r&1)k=A;else if(k=A+12|0,g=0,ga(c[(c[m>>2]|0)+28>>2]|0,k|0,m|0),r=g,g=0,!(r&1))if(c[t>>2]=c[d>>2],g=0,c[x>>2]=c[t>>2],h=Mh(7,b|0,x|0,
A|0,A+24|0,a|0,l|0,1)|0,l=g,g=0,l&1){h=J()|0;W(A+12|0);W(A);break}else{u[e>>0]=(h|0)==(A|0)&1;h=c[b>>2]|0;W(A+12|0);W(A);break a}h=J()|0;m=Fa;if((A|0)!=(k|0)){do k=k+-12|0,W(k);while((k|0)!=(A|0))}}while(0);V(h|0)}else switch(c[q>>2]=-1,A=c[(c[a>>2]|0)+16>>2]|0,c[k>>2]=c[b>>2],c[m>>2]=c[d>>2],c[h>>2]=c[k>>2],c[x>>2]=c[m>>2],h=bf[A&63](a,h,x,f,l,q)|0,c[b>>2]=h,c[q>>2]|0){case 0:u[e>>0]=0;break a;case 1:u[e>>0]=1;break a;default:u[e>>0]=1;c[l>>2]=4;break a}while(0);F=z;return h|0},function(a,b,d,f,
l,e){var h=0,k=0,m=0,n=0,q=0,h=F;F=F+16|0;k=h+12|0;m=h+8|0;q=h+4|0;n=h;c[q>>2]=c[(b|0)>>2];c[n>>2]=c[(d|0)>>2];c[m>>2]=c[q>>2];c[k>>2]=c[n>>2];a:{a|=0;f|=0;l|=0;e|=0;m|=0;k|=0;f|=0;l|=0;e|=0;var r=q=n=d=b=0,x=0,t=0,z=0,A=0,y=0,L=0,S=0,I=0,E=0,M=0,D=0,B=0,w=0,O=0,G=0,D=F;F=F+240|0;A=D+202|0;b=D+200|0;w=D+24|0;B=D+12|0;L=D+8|0;E=D+40|0;M=D+4|0;S=D;y=rd(f)|0;Ke(w,f,A,b);c[B>>2]=0;c[B+4>>2]=0;c[B+8>>2]=0;a=u[B>>0]&1?(c[B>>2]&-2)+-1|0:10;g=0;na(8,B|0,a|0,0);z=g;g=0;b:do if(z&1)O=25;else{x=B+8|0;t=B+1|
0;f=0==(u[B>>0]&1)?t:c[x>>2]|0;c[L>>2]=f;c[M>>2]=E;c[S>>2]=0;z=B+4|0;r=u[b>>0]|0;a=c[m>>2]|0;c:for(;;){if(a){if((c[a+12>>2]|0)==(c[a+16>>2]|0)){g=0;b=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0;q=g;g=0;if(q&1){O=24;break}-1==(b|0)&&(a=c[m>>2]=0)}}else a=0;d=0==(a|0);b=c[k>>2]|0;do if(b){if((c[b+12>>2]|0)!=(c[b+16>>2]|0))if(d)break;else break c;g=0;n=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0;q=g;g=0;if(q&1){O=24;break c}if(-1!=(n|0)){if(!d)break c}else c[k>>2]=0,O=16}else O=16;while(0);if(16==(O|0))if(O=0,d){b=0;break}else b=
0;d=u[B>>0]|0;d=0==(d&1)?(d&255)>>>1:c[z>>2]|0;if((c[L>>2]|0)==(f+d|0)){g=0;na(8,B|0,d<<1|0,0);q=g;g=0;if(q&1){O=24;break}f=u[B>>0]&1?(c[B>>2]&-2)+-1|0:10;g=0;na(8,B|0,f|0,0);q=g;g=0;if(q&1){O=24;break}f=0==(u[B>>0]&1)?t:c[x>>2]|0;c[L>>2]=f+d}n=a+12|0;d=c[n>>2]|0;q=a+16|0;if((d|0)==(c[q>>2]|0)){if(g=0,d=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0,G=g,g=0,G&1){O=24;break}}else d=ea[d>>0]|0;if(ve(d&255,y,f,L,S,r,w,E,M,A)|0)break;b=c[n>>2]|0;if((b|0)==(c[q>>2]|0)){if(g=0,ca(c[(c[a>>2]|0)+40>>2]|0,a|0)|0,G=g,g=
0,G&1){O=24;break}}else c[n>>2]=b+1}if(24==(O|0))a=J()|0;else if(G=u[w>>0]|0,0!=((0==(G&1)?(G&255)>>>1:c[w+4>>2]|0)|0)&&(I=c[M>>2]|0,160>(I-E|0))&&(G=c[S>>2]|0,c[M>>2]=I+4,c[I>>2]=G),g=0,f=fb(21,f|0,c[L>>2]|0,l|0,y|0)|0,G=g,g=0,G&1)O=25;else{c[e>>2]=f;rc(w,E,c[M>>2]|0,l);if(a){if((c[a+12>>2]|0)==(c[a+16>>2]|0)){g=0;f=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0;G=g;g=0;if(G&1){O=25;break}-1==(f|0)&&(a=c[m>>2]=0)}}else a=0;f=0==(a|0);do if(b){if((c[b+12>>2]|0)==(c[b+16>>2]|0)){g=0;a=ca(c[(c[b>>2]|0)+36>>2]|0,
b|0)|0;G=g;g=0;if(G&1){O=25;break b}if(-1==(a|0)){c[k>>2]=0;O=49;break}}f||(O=50)}else O=49;while(0);49==(O|0)&&f&&(O=50);50==(O|0)&&(c[l>>2]|=2);G=c[m>>2]|0;W(B);W(w);F=D;a=G|0;break a}}while(0);25==(O|0)&&(a=J()|0);W(B);W(w);V(a|0);a=0}F=h;return a|0},function(a,b,d,f,l,e){var h=0,k=0,m=0,n=0,q=0,h=F;F=F+16|0;k=h+12|0;m=h+8|0;q=h+4|0;n=h;c[q>>2]=c[(b|0)>>2];c[n>>2]=c[(d|0)>>2];c[m>>2]=c[q>>2];c[k>>2]=c[n>>2];a:{a|=0;f|=0;l|=0;e|=0;m|=0;k|=0;f|=0;l|=0;e|=0;var r=q=n=d=b=0,x=0,t=0,z=0,A=0,y=0,L=0,
S=0,I=0,E=0,M=0,D=0,B=0,w=0,O=0,G=0,D=F;F=F+240|0;A=D+202|0;b=D+200|0;w=D+24|0;B=D+12|0;L=D+8|0;E=D+40|0;M=D+4|0;S=D;y=rd(f)|0;Ke(w,f,A,b);c[B>>2]=0;c[B+4>>2]=0;c[B+8>>2]=0;a=u[B>>0]&1?(c[B>>2]&-2)+-1|0:10;g=0;na(8,B|0,a|0,0);z=g;g=0;b:do if(z&1)O=25;else{x=B+8|0;t=B+1|0;f=0==(u[B>>0]&1)?t:c[x>>2]|0;c[L>>2]=f;c[M>>2]=E;c[S>>2]=0;z=B+4|0;r=u[b>>0]|0;a=c[m>>2]|0;c:for(;;){if(a){if((c[a+12>>2]|0)==(c[a+16>>2]|0)){g=0;b=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0;q=g;g=0;if(q&1){O=24;break}-1==(b|0)&&(a=c[m>>2]=
0)}}else a=0;b=0==(a|0);d=c[k>>2]|0;do if(d){if((c[d+12>>2]|0)!=(c[d+16>>2]|0))if(b)break;else break c;g=0;n=ca(c[(c[d>>2]|0)+36>>2]|0,d|0)|0;q=g;g=0;if(q&1){O=24;break c}if(-1!=(n|0)){if(!b)break c}else c[k>>2]=0,O=16}else O=16;while(0);if(16==(O|0))if(O=0,b){d=0;break}else d=0;b=u[B>>0]|0;b=0==(b&1)?(b&255)>>>1:c[z>>2]|0;if((c[L>>2]|0)==(f+b|0)){g=0;na(8,B|0,b<<1|0,0);q=g;g=0;if(q&1){O=24;break}f=u[B>>0]&1?(c[B>>2]&-2)+-1|0:10;g=0;na(8,B|0,f|0,0);q=g;g=0;if(q&1){O=24;break}f=0==(u[B>>0]&1)?t:c[x>>
2]|0;c[L>>2]=f+b}n=a+12|0;b=c[n>>2]|0;q=a+16|0;if((b|0)==(c[q>>2]|0)){if(g=0,b=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0,G=g,g=0,G&1){O=24;break}}else b=ea[b>>0]|0;if(ve(b&255,y,f,L,S,r,w,E,M,A)|0)break;b=c[n>>2]|0;if((b|0)==(c[q>>2]|0)){if(g=0,ca(c[(c[a>>2]|0)+40>>2]|0,a|0)|0,G=g,g=0,G&1){O=24;break}}else c[n>>2]=b+1}if(24==(O|0))a=J()|0;else if(G=u[w>>0]|0,0!=((0==(G&1)?(G&255)>>>1:c[w+4>>2]|0)|0)&&(I=c[M>>2]|0,160>(I-E|0))&&(G=c[S>>2]|0,c[M>>2]=I+4,c[I>>2]=G),g=0,f=fb(22,f|0,c[L>>2]|0,l|0,y|0)|0,b=Fa,G=
g,g=0,G&1)O=25;else{G=e;c[G>>2]=f;c[G+4>>2]=b;rc(w,E,c[M>>2]|0,l);if(a){if((c[a+12>>2]|0)==(c[a+16>>2]|0)){g=0;f=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0;G=g;g=0;if(G&1){O=25;break}-1==(f|0)&&(a=c[m>>2]=0)}}else a=0;f=0==(a|0);do if(d){if((c[d+12>>2]|0)==(c[d+16>>2]|0)){g=0;a=ca(c[(c[d>>2]|0)+36>>2]|0,d|0)|0;G=g;g=0;if(G&1){O=25;break b}if(-1==(a|0)){c[k>>2]=0;O=49;break}}f||(O=50)}else O=49;while(0);49==(O|0)&&f&&(O=50);50==(O|0)&&(c[l>>2]|=2);G=c[m>>2]|0;W(B);W(w);F=D;a=G|0;break a}}while(0);25==(O|0)&&
(a=J()|0);W(B);W(w);V(a|0);a=0}F=h;return a|0},function(a,b,d,f,l,e){var h=0,k=0,m=0,n=0,q=0,h=F;F=F+16|0;k=h+12|0;m=h+8|0;q=h+4|0;n=h;c[q>>2]=c[(b|0)>>2];c[n>>2]=c[(d|0)>>2];c[m>>2]=c[q>>2];c[k>>2]=c[n>>2];a:{a|=0;f|=0;l|=0;e|=0;m|=0;k|=0;f|=0;l|=0;e|=0;var r=q=n=d=b=0,x=0,t=0,z=0,A=0,y=0,L=0,S=0,I=0,E=0,D=0,M=0,B=0,w=0,O=0,G=0,M=F;F=F+240|0;A=M+202|0;b=M+200|0;w=M+24|0;B=M+12|0;L=M+8|0;E=M+40|0;D=M+4|0;S=M;y=rd(f)|0;Ke(w,f,A,b);c[B>>2]=0;c[B+4>>2]=0;c[B+8>>2]=0;a=u[B>>0]&1?(c[B>>2]&-2)+-1|0:10;
g=0;na(8,B|0,a|0,0);z=g;g=0;b:do if(z&1)O=25;else{x=B+8|0;t=B+1|0;f=0==(u[B>>0]&1)?t:c[x>>2]|0;c[L>>2]=f;c[D>>2]=E;c[S>>2]=0;z=B+4|0;r=u[b>>0]|0;a=c[m>>2]|0;c:for(;;){if(a){if((c[a+12>>2]|0)==(c[a+16>>2]|0)){g=0;b=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0;q=g;g=0;if(q&1){O=24;break}-1==(b|0)&&(a=c[m>>2]=0)}}else a=0;d=0==(a|0);b=c[k>>2]|0;do if(b){if((c[b+12>>2]|0)!=(c[b+16>>2]|0))if(d)break;else break c;g=0;n=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0;q=g;g=0;if(q&1){O=24;break c}if(-1!=(n|0)){if(!d)break c}else c[k>>
2]=0,O=16}else O=16;while(0);if(16==(O|0))if(O=0,d){b=0;break}else b=0;d=u[B>>0]|0;d=0==(d&1)?(d&255)>>>1:c[z>>2]|0;if((c[L>>2]|0)==(f+d|0)){g=0;na(8,B|0,d<<1|0,0);q=g;g=0;if(q&1){O=24;break}f=u[B>>0]&1?(c[B>>2]&-2)+-1|0:10;g=0;na(8,B|0,f|0,0);q=g;g=0;if(q&1){O=24;break}f=0==(u[B>>0]&1)?t:c[x>>2]|0;c[L>>2]=f+d}n=a+12|0;d=c[n>>2]|0;q=a+16|0;if((d|0)==(c[q>>2]|0)){if(g=0,d=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0,G=g,g=0,G&1){O=24;break}}else d=ea[d>>0]|0;if(ve(d&255,y,f,L,S,r,w,E,D,A)|0)break;b=c[n>>2]|0;
if((b|0)==(c[q>>2]|0)){if(g=0,ca(c[(c[a>>2]|0)+40>>2]|0,a|0)|0,G=g,g=0,G&1){O=24;break}}else c[n>>2]=b+1}if(24==(O|0))a=J()|0;else if(G=u[w>>0]|0,0!=((0==(G&1)?(G&255)>>>1:c[w+4>>2]|0)|0)&&(I=c[D>>2]|0,160>(I-E|0))&&(G=c[S>>2]|0,c[D>>2]=I+4,c[I>>2]=G),g=0,f=fb(23,f|0,c[L>>2]|0,l|0,y|0)|0,G=g,g=0,G&1)O=25;else{R[e>>1]=f;rc(w,E,c[D>>2]|0,l);if(a){if((c[a+12>>2]|0)==(c[a+16>>2]|0)){g=0;f=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0;G=g;g=0;if(G&1){O=25;break}-1==(f|0)&&(a=c[m>>2]=0)}}else a=0;f=0==(a|0);do if(b){if((c[b+
12>>2]|0)==(c[b+16>>2]|0)){g=0;a=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0;G=g;g=0;if(G&1){O=25;break b}if(-1==(a|0)){c[k>>2]=0;O=49;break}}f||(O=50)}else O=49;while(0);49==(O|0)&&f&&(O=50);50==(O|0)&&(c[l>>2]|=2);G=c[m>>2]|0;W(B);W(w);F=M;a=G|0;break a}}while(0);25==(O|0)&&(a=J()|0);W(B);W(w);V(a|0);a=0}F=h;return a|0},function(a,b,d,f,l,e){var h=0,k=0,m=0,n=0,q=0,h=F;F=F+16|0;k=h+12|0;m=h+8|0;q=h+4|0;n=h;c[q>>2]=c[(b|0)>>2];c[n>>2]=c[(d|0)>>2];c[m>>2]=c[q>>2];c[k>>2]=c[n>>2];a:{a|=0;f|=0;l|=0;e|=0;m|=0;
k|=0;f|=0;l|=0;e|=0;var r=q=n=d=b=0,x=0,t=0,z=0,A=0,y=0,L=0,S=0,I=0,E=0,M=0,D=0,B=0,O=0,w=0,G=0,D=F;F=F+240|0;A=D+202|0;b=D+200|0;O=D+24|0;B=D+12|0;L=D+8|0;E=D+40|0;M=D+4|0;S=D;y=rd(f)|0;Ke(O,f,A,b);c[B>>2]=0;c[B+4>>2]=0;c[B+8>>2]=0;a=u[B>>0]&1?(c[B>>2]&-2)+-1|0:10;g=0;na(8,B|0,a|0,0);z=g;g=0;b:do if(z&1)w=25;else{x=B+8|0;t=B+1|0;f=0==(u[B>>0]&1)?t:c[x>>2]|0;c[L>>2]=f;c[M>>2]=E;c[S>>2]=0;z=B+4|0;r=u[b>>0]|0;a=c[m>>2]|0;c:for(;;){if(a){if((c[a+12>>2]|0)==(c[a+16>>2]|0)){g=0;b=ca(c[(c[a>>2]|0)+36>>
2]|0,a|0)|0;q=g;g=0;if(q&1){w=24;break}-1==(b|0)&&(a=c[m>>2]=0)}}else a=0;d=0==(a|0);b=c[k>>2]|0;do if(b){if((c[b+12>>2]|0)!=(c[b+16>>2]|0))if(d)break;else break c;g=0;n=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0;q=g;g=0;if(q&1){w=24;break c}if(-1!=(n|0)){if(!d)break c}else c[k>>2]=0,w=16}else w=16;while(0);if(16==(w|0))if(w=0,d){b=0;break}else b=0;d=u[B>>0]|0;d=0==(d&1)?(d&255)>>>1:c[z>>2]|0;if((c[L>>2]|0)==(f+d|0)){g=0;na(8,B|0,d<<1|0,0);q=g;g=0;if(q&1){w=24;break}f=u[B>>0]&1?(c[B>>2]&-2)+-1|0:10;g=0;na(8,
B|0,f|0,0);q=g;g=0;if(q&1){w=24;break}f=0==(u[B>>0]&1)?t:c[x>>2]|0;c[L>>2]=f+d}n=a+12|0;d=c[n>>2]|0;q=a+16|0;if((d|0)==(c[q>>2]|0)){if(g=0,d=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0,G=g,g=0,G&1){w=24;break}}else d=ea[d>>0]|0;if(ve(d&255,y,f,L,S,r,O,E,M,A)|0)break;b=c[n>>2]|0;if((b|0)==(c[q>>2]|0)){if(g=0,ca(c[(c[a>>2]|0)+40>>2]|0,a|0)|0,G=g,g=0,G&1){w=24;break}}else c[n>>2]=b+1}if(24==(w|0))a=J()|0;else if(G=u[O>>0]|0,0!=((0==(G&1)?(G&255)>>>1:c[O+4>>2]|0)|0)&&(I=c[M>>2]|0,160>(I-E|0))&&(G=c[S>>2]|0,c[M>>
2]=I+4,c[I>>2]=G),g=0,f=fb(24,f|0,c[L>>2]|0,l|0,y|0)|0,G=g,g=0,G&1)w=25;else{c[e>>2]=f;rc(O,E,c[M>>2]|0,l);if(a){if((c[a+12>>2]|0)==(c[a+16>>2]|0)){g=0;f=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0;G=g;g=0;if(G&1){w=25;break}-1==(f|0)&&(a=c[m>>2]=0)}}else a=0;f=0==(a|0);do if(b){if((c[b+12>>2]|0)==(c[b+16>>2]|0)){g=0;a=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0;G=g;g=0;if(G&1){w=25;break b}if(-1==(a|0)){c[k>>2]=0;w=49;break}}f||(w=50)}else w=49;while(0);49==(w|0)&&f&&(w=50);50==(w|0)&&(c[l>>2]|=2);G=c[m>>2]|0;W(B);W(O);
F=D;a=G|0;break a}}while(0);25==(w|0)&&(a=J()|0);W(B);W(O);V(a|0);a=0}F=h;return a|0},function(a,b,d,f,l,e){var h=0,k=0,m=0,n=0,q=0,h=F;F=F+16|0;k=h+12|0;m=h+8|0;q=h+4|0;n=h;c[q>>2]=c[(b|0)>>2];c[n>>2]=c[(d|0)>>2];c[m>>2]=c[q>>2];c[k>>2]=c[n>>2];a:{a|=0;f|=0;l|=0;e|=0;m|=0;k|=0;f|=0;l|=0;e|=0;var r=q=n=d=b=0,x=0,t=0,z=0,A=0,y=0,L=0,S=0,I=0,E=0,D=0,M=0,B=0,w=0,O=0,G=0,M=F;F=F+240|0;A=M+202|0;b=M+200|0;w=M+24|0;B=M+12|0;L=M+8|0;E=M+40|0;D=M+4|0;S=M;y=rd(f)|0;Ke(w,f,A,b);c[B>>2]=0;c[B+4>>2]=0;c[B+8>>
2]=0;a=u[B>>0]&1?(c[B>>2]&-2)+-1|0:10;g=0;na(8,B|0,a|0,0);z=g;g=0;b:do if(z&1)O=25;else{x=B+8|0;t=B+1|0;f=0==(u[B>>0]&1)?t:c[x>>2]|0;c[L>>2]=f;c[D>>2]=E;c[S>>2]=0;z=B+4|0;r=u[b>>0]|0;a=c[m>>2]|0;c:for(;;){if(a){if((c[a+12>>2]|0)==(c[a+16>>2]|0)){g=0;b=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0;q=g;g=0;if(q&1){O=24;break}-1==(b|0)&&(a=c[m>>2]=0)}}else a=0;d=0==(a|0);b=c[k>>2]|0;do if(b){if((c[b+12>>2]|0)!=(c[b+16>>2]|0))if(d)break;else break c;g=0;n=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0;q=g;g=0;if(q&1){O=24;break c}if(-1!=
(n|0)){if(!d)break c}else c[k>>2]=0,O=16}else O=16;while(0);if(16==(O|0))if(O=0,d){b=0;break}else b=0;d=u[B>>0]|0;d=0==(d&1)?(d&255)>>>1:c[z>>2]|0;if((c[L>>2]|0)==(f+d|0)){g=0;na(8,B|0,d<<1|0,0);q=g;g=0;if(q&1){O=24;break}f=u[B>>0]&1?(c[B>>2]&-2)+-1|0:10;g=0;na(8,B|0,f|0,0);q=g;g=0;if(q&1){O=24;break}f=0==(u[B>>0]&1)?t:c[x>>2]|0;c[L>>2]=f+d}n=a+12|0;d=c[n>>2]|0;q=a+16|0;if((d|0)==(c[q>>2]|0)){if(g=0,d=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0,G=g,g=0,G&1){O=24;break}}else d=ea[d>>0]|0;if(ve(d&255,y,f,L,S,
r,w,E,D,A)|0)break;b=c[n>>2]|0;if((b|0)==(c[q>>2]|0)){if(g=0,ca(c[(c[a>>2]|0)+40>>2]|0,a|0)|0,G=g,g=0,G&1){O=24;break}}else c[n>>2]=b+1}if(24==(O|0))a=J()|0;else if(G=u[w>>0]|0,0!=((0==(G&1)?(G&255)>>>1:c[w+4>>2]|0)|0)&&(I=c[D>>2]|0,160>(I-E|0))&&(G=c[S>>2]|0,c[D>>2]=I+4,c[I>>2]=G),g=0,f=fb(25,f|0,c[L>>2]|0,l|0,y|0)|0,G=g,g=0,G&1)O=25;else{c[e>>2]=f;rc(w,E,c[D>>2]|0,l);if(a){if((c[a+12>>2]|0)==(c[a+16>>2]|0)){g=0;f=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0;G=g;g=0;if(G&1){O=25;break}-1==(f|0)&&(a=c[m>>2]=
0)}}else a=0;f=0==(a|0);do if(b){if((c[b+12>>2]|0)==(c[b+16>>2]|0)){g=0;a=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0;G=g;g=0;if(G&1){O=25;break b}if(-1==(a|0)){c[k>>2]=0;O=49;break}}f||(O=50)}else O=49;while(0);49==(O|0)&&f&&(O=50);50==(O|0)&&(c[l>>2]|=2);G=c[m>>2]|0;W(B);W(w);F=M;a=G|0;break a}}while(0);25==(O|0)&&(a=J()|0);W(B);W(w);V(a|0);a=0}F=h;return a|0},function(a,b,d,f,l,e){var h=0,k=0,m=0,n=0,q=0,h=F;F=F+16|0;k=h+12|0;m=h+8|0;q=h+4|0;n=h;c[q>>2]=c[(b|0)>>2];c[n>>2]=c[(d|0)>>2];c[m>>2]=c[q>>2];c[k>>
2]=c[n>>2];a:{a|=0;f|=0;l|=0;e|=0;m|=0;k|=0;f|=0;l|=0;e|=0;var r=q=n=d=b=0,x=0,t=0,z=0,A=0,y=0,L=0,S=0,I=0,E=0,M=0,D=0,B=0,O=0,w=0,G=0,D=F;F=F+240|0;A=D+202|0;b=D+200|0;O=D+24|0;B=D+12|0;L=D+8|0;E=D+40|0;M=D+4|0;S=D;y=rd(f)|0;Ke(O,f,A,b);c[B>>2]=0;c[B+4>>2]=0;c[B+8>>2]=0;a=u[B>>0]&1?(c[B>>2]&-2)+-1|0:10;g=0;na(8,B|0,a|0,0);z=g;g=0;b:do if(z&1)w=25;else{x=B+8|0;t=B+1|0;f=0==(u[B>>0]&1)?t:c[x>>2]|0;c[L>>2]=f;c[M>>2]=E;c[S>>2]=0;z=B+4|0;r=u[b>>0]|0;a=c[m>>2]|0;c:for(;;){if(a){if((c[a+12>>2]|0)==(c[a+
16>>2]|0)){g=0;b=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0;q=g;g=0;if(q&1){w=24;break}-1==(b|0)&&(a=c[m>>2]=0)}}else a=0;b=0==(a|0);d=c[k>>2]|0;do if(d){if((c[d+12>>2]|0)!=(c[d+16>>2]|0))if(b)break;else break c;g=0;n=ca(c[(c[d>>2]|0)+36>>2]|0,d|0)|0;q=g;g=0;if(q&1){w=24;break c}if(-1!=(n|0)){if(!b)break c}else c[k>>2]=0,w=16}else w=16;while(0);if(16==(w|0))if(w=0,b){d=0;break}else d=0;b=u[B>>0]|0;b=0==(b&1)?(b&255)>>>1:c[z>>2]|0;if((c[L>>2]|0)==(f+b|0)){g=0;na(8,B|0,b<<1|0,0);q=g;g=0;if(q&1){w=24;break}f=
u[B>>0]&1?(c[B>>2]&-2)+-1|0:10;g=0;na(8,B|0,f|0,0);q=g;g=0;if(q&1){w=24;break}f=0==(u[B>>0]&1)?t:c[x>>2]|0;c[L>>2]=f+b}n=a+12|0;b=c[n>>2]|0;q=a+16|0;if((b|0)==(c[q>>2]|0)){if(g=0,b=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0,G=g,g=0,G&1){w=24;break}}else b=ea[b>>0]|0;if(ve(b&255,y,f,L,S,r,O,E,M,A)|0)break;b=c[n>>2]|0;if((b|0)==(c[q>>2]|0)){if(g=0,ca(c[(c[a>>2]|0)+40>>2]|0,a|0)|0,G=g,g=0,G&1){w=24;break}}else c[n>>2]=b+1}if(24==(w|0))a=J()|0;else if(G=u[O>>0]|0,0!=((0==(G&1)?(G&255)>>>1:c[O+4>>2]|0)|0)&&(I=c[M>>
2]|0,160>(I-E|0))&&(G=c[S>>2]|0,c[M>>2]=I+4,c[I>>2]=G),g=0,f=fb(26,f|0,c[L>>2]|0,l|0,y|0)|0,b=Fa,G=g,g=0,G&1)w=25;else{G=e;c[G>>2]=f;c[G+4>>2]=b;rc(O,E,c[M>>2]|0,l);if(a){if((c[a+12>>2]|0)==(c[a+16>>2]|0)){g=0;f=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0;G=g;g=0;if(G&1){w=25;break}-1==(f|0)&&(a=c[m>>2]=0)}}else a=0;f=0==(a|0);do if(d){if((c[d+12>>2]|0)==(c[d+16>>2]|0)){g=0;a=ca(c[(c[d>>2]|0)+36>>2]|0,d|0)|0;G=g;g=0;if(G&1){w=25;break b}if(-1==(a|0)){c[k>>2]=0;w=49;break}}f||(w=50)}else w=49;while(0);49==(w|
0)&&f&&(w=50);50==(w|0)&&(c[l>>2]|=2);G=c[m>>2]|0;W(B);W(O);F=D;a=G|0;break a}}while(0);25==(w|0)&&(a=J()|0);W(B);W(O);V(a|0);a=0}F=h;return a|0},function(a,b,d,f,l,e){var h=0,k=0,m=0,n=0,q=0,h=F;F=F+16|0;k=h+12|0;m=h+8|0;q=h+4|0;n=h;c[q>>2]=c[(b|0)>>2];c[n>>2]=c[(d|0)>>2];c[m>>2]=c[q>>2];c[k>>2]=c[n>>2];a:{a|=0;f|=0;l|=0;e|=0;m|=0;k|=0;l|=0;e|=0;var r=0,x=r=d=b=0,t=0,z=0,A=0,y=0,L=q=n=0,S=0,I=0,E=0,B=0,D=0,M=0,w=0,G=0,O=0,P=0,Y=0,w=F;F=F+240|0;q=w+208|0;b=w+203|0;d=w+202|0;O=w+24|0;G=w+12|0;S=w+
8|0;D=w+40|0;M=w+4|0;I=w;E=w+201|0;L=w+200|0;gg(O,f|0,q,b,d);c[G>>2]=0;c[G+4>>2]=0;c[G+8>>2]=0;a=u[G>>0]&1?(c[G>>2]&-2)+-1|0:10;g=0;na(8,G|0,a|0,0);n=g;g=0;b:do if(n&1)P=25;else{A=G+8|0;y=G+1|0;f=0==(u[G>>0]&1)?y:c[A>>2]|0;c[S>>2]=f;c[M>>2]=D;c[I>>2]=0;u[E>>0]=1;u[L>>0]=69;n=G+4|0;z=u[b>>0]|0;t=u[d>>0]|0;a=c[m>>2]|0;c:for(;;){if(a){if((c[a+12>>2]|0)==(c[a+16>>2]|0)){g=0;b=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0;x=g;g=0;if(x&1){P=24;break}-1==(b|0)&&(a=c[m>>2]=0)}}else a=0;d=0==(a|0);b=c[k>>2]|0;do if(b){if((c[b+
12>>2]|0)!=(c[b+16>>2]|0))if(d)break;else break c;g=0;r=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0;x=g;g=0;if(x&1){P=24;break c}if(-1!=(r|0)){if(!d)break c}else c[k>>2]=0,P=16}else P=16;while(0);if(16==(P|0))if(P=0,d){b=0;break}else b=0;d=u[G>>0]|0;d=0==(d&1)?(d&255)>>>1:c[n>>2]|0;if((c[S>>2]|0)==(f+d|0)){g=0;na(8,G|0,d<<1|0,0);x=g;g=0;if(x&1){P=24;break}f=u[G>>0]&1?(c[G>>2]&-2)+-1|0:10;g=0;na(8,G|0,f|0,0);x=g;g=0;if(x&1){P=24;break}f=0==(u[G>>0]&1)?y:c[A>>2]|0;c[S>>2]=f+d}r=a+12|0;d=c[r>>2]|0;x=a+16|0;if((d|
0)==(c[x>>2]|0)){if(g=0,d=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0,Y=g,g=0,Y&1){P=24;break}}else d=ea[d>>0]|0;if(hg(d&255,E,L,f,S,z,t,O,D,M,I,q)|0)break;b=c[r>>2]|0;if((b|0)==(c[x>>2]|0)){if(g=0,ca(c[(c[a>>2]|0)+40>>2]|0,a|0)|0,Y=g,g=0,Y&1){P=24;break}}else c[r>>2]=b+1}if(24==(P|0))a=J()|0;else if(Y=u[O>>0]|0,0!=(u[E>>0]|0)&&0!=((0==(Y&1)?(Y&255)>>>1:c[O+4>>2]|0)|0)&&(B=c[M>>2]|0,160>(B-D|0))&&(Y=c[I>>2]|0,c[M>>2]=B+4,c[B>>2]=Y),g=0,r=+Ue(1,f|0,c[S>>2]|0,l|0),Y=g,g=0,Y&1)P=25;else{If[e>>2]=r;rc(O,D,c[M>>
2]|0,l);if(a){if((c[a+12>>2]|0)==(c[a+16>>2]|0)){g=0;f=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0;Y=g;g=0;if(Y&1){P=25;break}-1==(f|0)&&(a=c[m>>2]=0)}}else a=0;f=0==(a|0);do if(b){if((c[b+12>>2]|0)==(c[b+16>>2]|0)){g=0;a=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0;Y=g;g=0;if(Y&1){P=25;break b}if(-1==(a|0)){c[k>>2]=0;P=49;break}}f||(P=50)}else P=49;while(0);49==(P|0)&&f&&(P=50);50==(P|0)&&(c[l>>2]|=2);Y=c[m>>2]|0;W(G);W(O);F=w;a=Y|0;break a}}while(0);25==(P|0)&&(a=J()|0);W(G);W(O);V(a|0);a=0}F=h;return a|0},function(a,
b,d,f,l,e){var h=0,k=0,m=0,n=0,q=0,h=F;F=F+16|0;k=h+12|0;m=h+8|0;q=h+4|0;n=h;c[q>>2]=c[(b|0)>>2];c[n>>2]=c[(d|0)>>2];c[m>>2]=c[q>>2];c[k>>2]=c[n>>2];a:{a|=0;f|=0;l|=0;e|=0;m|=0;k|=0;l|=0;e|=0;var r=0,x=r=d=b=0,t=0,z=0,A=0,y=0,L=q=n=0,S=0,I=0,E=0,B=0,D=0,M=0,G=0,w=0,O=0,P=0,Y=0,G=F;F=F+240|0;q=G+208|0;b=G+203|0;d=G+202|0;O=G+24|0;w=G+12|0;S=G+8|0;D=G+40|0;M=G+4|0;I=G;E=G+201|0;L=G+200|0;gg(O,f|0,q,b,d);c[w>>2]=0;c[w+4>>2]=0;c[w+8>>2]=0;a=u[w>>0]&1?(c[w>>2]&-2)+-1|0:10;g=0;na(8,w|0,a|0,0);n=g;g=0;b:do if(n&
1)P=25;else{A=w+8|0;y=w+1|0;f=0==(u[w>>0]&1)?y:c[A>>2]|0;c[S>>2]=f;c[M>>2]=D;c[I>>2]=0;u[E>>0]=1;u[L>>0]=69;n=w+4|0;z=u[b>>0]|0;t=u[d>>0]|0;a=c[m>>2]|0;c:for(;;){if(a){if((c[a+12>>2]|0)==(c[a+16>>2]|0)){g=0;b=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0;x=g;g=0;if(x&1){P=24;break}-1==(b|0)&&(a=c[m>>2]=0)}}else a=0;d=0==(a|0);b=c[k>>2]|0;do if(b){if((c[b+12>>2]|0)!=(c[b+16>>2]|0))if(d)break;else break c;g=0;r=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0;x=g;g=0;if(x&1){P=24;break c}if(-1!=(r|0)){if(!d)break c}else c[k>>2]=
0,P=16}else P=16;while(0);if(16==(P|0))if(P=0,d){b=0;break}else b=0;d=u[w>>0]|0;d=0==(d&1)?(d&255)>>>1:c[n>>2]|0;if((c[S>>2]|0)==(f+d|0)){g=0;na(8,w|0,d<<1|0,0);x=g;g=0;if(x&1){P=24;break}f=u[w>>0]&1?(c[w>>2]&-2)+-1|0:10;g=0;na(8,w|0,f|0,0);x=g;g=0;if(x&1){P=24;break}f=0==(u[w>>0]&1)?y:c[A>>2]|0;c[S>>2]=f+d}r=a+12|0;d=c[r>>2]|0;x=a+16|0;if((d|0)==(c[x>>2]|0)){if(g=0,d=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0,Y=g,g=0,Y&1){P=24;break}}else d=ea[d>>0]|0;if(hg(d&255,E,L,f,S,z,t,O,D,M,I,q)|0)break;b=c[r>>2]|0;
if((b|0)==(c[x>>2]|0)){if(g=0,ca(c[(c[a>>2]|0)+40>>2]|0,a|0)|0,Y=g,g=0,Y&1){P=24;break}}else c[r>>2]=b+1}if(24==(P|0))a=J()|0;else if(Y=u[O>>0]|0,0!=(u[E>>0]|0)&&0!=((0==(Y&1)?(Y&255)>>>1:c[O+4>>2]|0)|0)&&(B=c[M>>2]|0,160>(B-D|0))&&(Y=c[I>>2]|0,c[M>>2]=B+4,c[B>>2]=Y),g=0,r=+Ue(2,f|0,c[S>>2]|0,l|0),Y=g,g=0,Y&1)P=25;else{eb[e>>3]=r;rc(O,D,c[M>>2]|0,l);if(a){if((c[a+12>>2]|0)==(c[a+16>>2]|0)){g=0;f=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0;Y=g;g=0;if(Y&1){P=25;break}-1==(f|0)&&(a=c[m>>2]=0)}}else a=0;f=0==(a|
0);do if(b){if((c[b+12>>2]|0)==(c[b+16>>2]|0)){g=0;a=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0;Y=g;g=0;if(Y&1){P=25;break b}if(-1==(a|0)){c[k>>2]=0;P=49;break}}f||(P=50)}else P=49;while(0);49==(P|0)&&f&&(P=50);50==(P|0)&&(c[l>>2]|=2);Y=c[m>>2]|0;W(w);W(O);F=G;a=Y|0;break a}}while(0);25==(P|0)&&(a=J()|0);W(w);W(O);V(a|0);a=0}F=h;return a|0},function(a,b,d,f,l,e){var h=0,k=0,m=0,n=0,q=0,h=F;F=F+16|0;k=h+12|0;m=h+8|0;q=h+4|0;n=h;c[q>>2]=c[(b|0)>>2];c[n>>2]=c[(d|0)>>2];c[m>>2]=c[q>>2];c[k>>2]=c[n>>2];a:{a|=0;
f|=0;l|=0;e|=0;m|=0;k|=0;l|=0;e|=0;var r=0,x=r=d=b=0,t=0,z=0,A=0,y=0,L=q=n=0,S=0,I=0,E=0,B=0,D=0,M=0,w=0,G=0,O=0,P=0,Y=0,w=F;F=F+240|0;q=w+208|0;b=w+203|0;d=w+202|0;O=w+24|0;G=w+12|0;S=w+8|0;D=w+40|0;M=w+4|0;I=w;E=w+201|0;L=w+200|0;gg(O,f|0,q,b,d);c[G>>2]=0;c[G+4>>2]=0;c[G+8>>2]=0;a=u[G>>0]&1?(c[G>>2]&-2)+-1|0:10;g=0;na(8,G|0,a|0,0);n=g;g=0;b:do if(n&1)P=25;else{A=G+8|0;y=G+1|0;f=0==(u[G>>0]&1)?y:c[A>>2]|0;c[S>>2]=f;c[M>>2]=D;c[I>>2]=0;u[E>>0]=1;u[L>>0]=69;n=G+4|0;z=u[b>>0]|0;t=u[d>>0]|0;a=c[m>>2]|
0;c:for(;;){if(a){if((c[a+12>>2]|0)==(c[a+16>>2]|0)){g=0;b=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0;x=g;g=0;if(x&1){P=24;break}-1==(b|0)&&(a=c[m>>2]=0)}}else a=0;d=0==(a|0);b=c[k>>2]|0;do if(b){if((c[b+12>>2]|0)!=(c[b+16>>2]|0))if(d)break;else break c;g=0;r=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0;x=g;g=0;if(x&1){P=24;break c}if(-1!=(r|0)){if(!d)break c}else c[k>>2]=0,P=16}else P=16;while(0);if(16==(P|0))if(P=0,d){b=0;break}else b=0;d=u[G>>0]|0;d=0==(d&1)?(d&255)>>>1:c[n>>2]|0;if((c[S>>2]|0)==(f+d|0)){g=0;na(8,G|
0,d<<1|0,0);x=g;g=0;if(x&1){P=24;break}f=u[G>>0]&1?(c[G>>2]&-2)+-1|0:10;g=0;na(8,G|0,f|0,0);x=g;g=0;if(x&1){P=24;break}f=0==(u[G>>0]&1)?y:c[A>>2]|0;c[S>>2]=f+d}r=a+12|0;d=c[r>>2]|0;x=a+16|0;if((d|0)==(c[x>>2]|0)){if(g=0,d=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0,Y=g,g=0,Y&1){P=24;break}}else d=ea[d>>0]|0;if(hg(d&255,E,L,f,S,z,t,O,D,M,I,q)|0)break;b=c[r>>2]|0;if((b|0)==(c[x>>2]|0)){if(g=0,ca(c[(c[a>>2]|0)+40>>2]|0,a|0)|0,Y=g,g=0,Y&1){P=24;break}}else c[r>>2]=b+1}if(24==(P|0))a=J()|0;else if(Y=u[O>>0]|0,0!=
(u[E>>0]|0)&&0!=((0==(Y&1)?(Y&255)>>>1:c[O+4>>2]|0)|0)&&(B=c[M>>2]|0,160>(B-D|0))&&(Y=c[I>>2]|0,c[M>>2]=B+4,c[B>>2]=Y),g=0,r=+Ue(3,f|0,c[S>>2]|0,l|0),Y=g,g=0,Y&1)P=25;else{eb[e>>3]=r;rc(O,D,c[M>>2]|0,l);if(a){if((c[a+12>>2]|0)==(c[a+16>>2]|0)){g=0;f=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0;Y=g;g=0;if(Y&1){P=25;break}-1==(f|0)&&(a=c[m>>2]=0)}}else a=0;f=0==(a|0);do if(b){if((c[b+12>>2]|0)==(c[b+16>>2]|0)){g=0;a=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0;Y=g;g=0;if(Y&1){P=25;break b}if(-1==(a|0)){c[k>>2]=0;P=49;break}}f||
(P=50)}else P=49;while(0);49==(P|0)&&f&&(P=50);50==(P|0)&&(c[l>>2]|=2);Y=c[m>>2]|0;W(G);W(O);F=w;a=Y|0;break a}}while(0);25==(P|0)&&(a=J()|0);W(G);W(O);V(a|0);a=0}F=h;return a|0},function(a,b,d,f,l,e){b|=0;d|=0;l|=0;e|=0;var h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,y=0,L=0,S=0,I=0,E=0,B=0,D=0,M=0,G=0,w=0,O=0,P=0,M=F;F=F+240|0;S=M;t=M+208|0;w=M+32|0;a=M+28|0;G=M+16|0;L=M+12|0;A=M+48|0;y=M+8|0;z=M+4|0;c[w>>2]=0;c[w+4>>2]=0;g=c[w+8>>2]=0;f=ca(68,f|0)|0;x=g;g=0;do if(x&1)a=J()|0;else if(c[a>>2]=f,g=0,
a=ma(37,a|0,44220)|0,x=g,g=0,x&1||(g=0,fb(c[(c[a>>2]|0)+32>>2]|0,a|0,57498,57524,t|0)|0,x=g,g=0,x&1))a=J()|0,Na(f)|0;else{Na(f)|0;c[G>>2]=0;c[G+4>>2]=0;c[G+8>>2]=0;a=u[G>>0]&1?(c[G>>2]&-2)+-1|0:10;g=0;na(8,G|0,a|0,0);x=g;g=0;a:do if(x&1)O=30;else{r=G+8|0;x=G+1|0;f=0==(u[G>>0]&1)?x:c[r>>2]|0;c[L>>2]=f;c[y>>2]=A;c[z>>2]=0;q=G+4|0;a=c[b>>2]|0;b:for(;;){if(a){if((c[a+12>>2]|0)==(c[a+16>>2]|0)){g=0;h=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0;n=g;g=0;if(n&1){O=29;break}-1==(h|0)&&(a=c[b>>2]=0)}}else a=0;k=0==(a|
0);h=c[d>>2]|0;do if(h){if((c[h+12>>2]|0)!=(c[h+16>>2]|0))if(k)break;else break b;g=0;m=ca(c[(c[h>>2]|0)+36>>2]|0,h|0)|0;n=g;g=0;if(n&1){O=29;break b}if(-1!=(m|0)){if(!k)break b}else c[d>>2]=0,O=19}else O=19;while(0);if(19==(O|0))if(O=0,k){h=0;break}else h=0;k=u[G>>0]|0;k=0==(k&1)?(k&255)>>>1:c[q>>2]|0;if((c[L>>2]|0)==(f+k|0)){g=0;na(8,G|0,k<<1|0,0);n=g;g=0;if(n&1){O=29;break}f=u[G>>0]&1?(c[G>>2]&-2)+-1|0:10;g=0;na(8,G|0,f|0,0);n=g;g=0;if(n&1){O=29;break}f=0==(u[G>>0]&1)?x:c[r>>2]|0;c[L>>2]=f+k}m=
a+12|0;k=c[m>>2]|0;n=a+16|0;if((k|0)==(c[n>>2]|0)){if(g=0,k=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0,P=g,g=0,P&1){O=29;break}}else k=ea[k>>0]|0;if(ve(k&255,16,f,L,z,0,w,A,y,t)|0)break;h=c[m>>2]|0;if((h|0)==(c[n>>2]|0)){if(g=0,ca(c[(c[a>>2]|0)+40>>2]|0,a|0)|0,P=g,g=0,P&1){O=29;break}}else c[m>>2]=h+1}if(29==(O|0))a=J()|0;else if(g=0,na(8,G|0,(c[L>>2]|0)-f|0,0),P=g,g=0,P&1||(I=u[G>>0]|0,E=c[r>>2]|0,g=0,B=Va(3)|0,P=g,g=0,P&1)||(g=0,c[S>>2]=e,D=fb(16,(0==(I&1)?x:E)|0,B|0,58882,S|0)|0,P=g,g=0,P&1))O=30;else{1!=
(D|0)&&(c[l>>2]=4);if(a){if((c[a+12>>2]|0)==(c[a+16>>2]|0)){g=0;f=ca(c[(c[a>>2]|0)+36>>2]|0,a|0)|0;P=g;g=0;if(P&1){O=30;break}-1==(f|0)&&(a=c[b>>2]=0)}}else a=0;f=0==(a|0);do if(h){if((c[h+12>>2]|0)==(c[h+16>>2]|0)){g=0;a=ca(c[(c[h>>2]|0)+36>>2]|0,h|0)|0;P=g;g=0;if(P&1){O=30;break a}if(-1==(a|0)){c[d>>2]=0;O=55;break}}f||(O=56)}else O=55;while(0);55==(O|0)&&f&&(O=56);56==(O|0)&&(c[l>>2]|=2);P=c[b>>2]|0;W(G);W(w);F=M;return P|0}}while(0);30==(O|0)&&(a=J()|0);W(G)}while(0);W(w);V(a|0);return 0},function(a,
b,d,f,l,e){a|=0;b|=0;d|=0;f|=0;l|=0;e|=0;var h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,z=F;F=F+64|0;x=z+56|0;h=z+52|0;q=z+48|0;k=z+44|0;m=z+40|0;n=z+36|0;r=z+32|0;A=z+8|0;t=z;a:do if(c[f+4>>2]&1){h=Lb(f)|0;c[n>>2]=h;g=0;a=ma(37,n|0,44212)|0;q=g;g=0;do if(q&1)A=J()|0,Na(h)|0,h=A;else if(Na(h)|0,h=Lb(f)|0,c[r>>2]=h,g=0,m=ma(37,r|0,44368)|0,r=g,g=0,r&1)A=J()|0,Na(h)|0,h=A;else{Na(h)|0;g=0;ga(c[(c[m>>2]|0)+24>>2]|0,A|0,m|0);r=g;g=0;if(r&1)k=A;else if(k=A+12|0,g=0,ga(c[(c[m>>2]|0)+28>>2]|0,k|0,m|0),r=g,
g=0,!(r&1))if(c[t>>2]=c[d>>2],g=0,c[x>>2]=c[t>>2],h=Mh(8,b|0,x|0,A|0,A+24|0,a|0,l|0,1)|0,l=g,g=0,l&1){h=J()|0;Ka(A+12|0);Ka(A);break}else{u[e>>0]=(h|0)==(A|0)&1;h=c[b>>2]|0;Ka(A+12|0);Ka(A);break a}h=J()|0;m=Fa;if((A|0)!=(k|0)){do k=k+-12|0,Ka(k);while((k|0)!=(A|0))}}while(0);V(h|0)}else switch(c[q>>2]=-1,A=c[(c[a>>2]|0)+16>>2]|0,c[k>>2]=c[b>>2],c[m>>2]=c[d>>2],c[h>>2]=c[k>>2],c[x>>2]=c[m>>2],h=bf[A&63](a,h,x,f,l,q)|0,c[b>>2]=h,c[q>>2]|0){case 0:u[e>>0]=0;break a;case 1:u[e>>0]=1;break a;default:u[e>>
0]=1;c[l>>2]=4;break a}while(0);F=z;return h|0},function(a,b,d,f,l,h){var e=0,k=0,m=0,n=0,q=0,e=F;F=F+16|0;k=e+12|0;m=e+8|0;q=e+4|0;n=e;c[q>>2]=c[(b|0)>>2];c[n>>2]=c[(d|0)>>2];c[m>>2]=c[q>>2];c[k>>2]=c[n>>2];a:{a|=0;f|=0;l|=0;h|=0;m|=0;k|=0;f|=0;l|=0;h|=0;var r=q=n=d=b=0,x=0,t=0,z=0,A=0,y=0,L=0,S=0,I=0,E=0,M=0,B=0,D=0,G=0,w=0,O=0,B=F;F=F+320|0;A=B+208|0;b=B+200|0;G=B+24|0;D=B+12|0;L=B+8|0;E=B+40|0;M=B+4|0;S=B;y=rd(f)|0;Le(G,f,A,b);c[D>>2]=0;c[D+4>>2]=0;c[D+8>>2]=0;a=u[D>>0]&1?(c[D>>2]&-2)+-1|0:10;
g=0;na(8,D|0,a|0,0);z=g;g=0;b:do if(z&1)w=26;else{x=D+8|0;t=D+1|0;a=0==(u[D>>0]&1)?t:c[x>>2]|0;c[L>>2]=a;c[M>>2]=E;c[S>>2]=0;z=D+4|0;r=c[b>>2]|0;b=c[m>>2]|0;c:for(;;){if(b){f=c[b+12>>2]|0;if((f|0)==(c[b+16>>2]|0)){if(g=0,f=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0,q=g,g=0,q&1){w=25;break}}else f=c[f>>2]|0;-1==(f|0)?(f=c[m>>2]=0,d=1):(f=b,d=0)}else f=0,d=1;n=c[k>>2]|0;do if(n){b=c[n+12>>2]|0;if((b|0)==(c[n+16>>2]|0)){if(g=0,b=ca(c[(c[n>>2]|0)+36>>2]|0,n|0)|0,q=g,g=0,q&1){w=25;break c}}else b=c[b>>2]|0;if(-1!=
(b|0)){if(!d){b=n;break c}}else c[k>>2]=0,w=17}else w=17;while(0);if(17==(w|0))if(w=0,d){b=0;break}else n=0;b=u[D>>0]|0;b=0==(b&1)?(b&255)>>>1:c[z>>2]|0;if((c[L>>2]|0)==(a+b|0)){g=0;na(8,D|0,b<<1|0,0);q=g;g=0;if(q&1){w=25;break}a=u[D>>0]&1?(c[D>>2]&-2)+-1|0:10;g=0;na(8,D|0,a|0,0);q=g;g=0;if(q&1){w=25;break}a=0==(u[D>>0]&1)?t:c[x>>2]|0;c[L>>2]=a+b}d=f+12|0;b=c[d>>2]|0;q=f+16|0;if((b|0)==(c[q>>2]|0)){if(g=0,b=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0,O=g,g=0,O&1){w=25;break}}else b=c[b>>2]|0;if(we(b,y,a,L,S,
r,G,E,M,A)|0){b=n;break}b=c[d>>2]|0;if((b|0)==(c[q>>2]|0))if(g=0,ca(c[(c[f>>2]|0)+40>>2]|0,f|0)|0,O=g,g=0,O&1){w=25;break}else b=f;else c[d>>2]=b+4,b=f}if(25==(w|0))a=J()|0;else if(O=u[G>>0]|0,0!=((0==(O&1)?(O&255)>>>1:c[G+4>>2]|0)|0)&&(I=c[M>>2]|0,160>(I-E|0))&&(O=c[S>>2]|0,c[M>>2]=I+4,c[I>>2]=O),g=0,a=fb(21,a|0,c[L>>2]|0,l|0,y|0)|0,O=g,g=0,O&1)w=26;else{c[h>>2]=a;rc(G,E,c[M>>2]|0,l);if(f){a=c[f+12>>2]|0;if((a|0)==(c[f+16>>2]|0)){if(g=0,a=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0,O=g,g=0,O&1){w=26;break}}else a=
c[a>>2]|0;-1==(a|0)?(c[m>>2]=0,f=1):f=0}else f=1;do if(b){a=c[b+12>>2]|0;if((a|0)==(c[b+16>>2]|0)){if(g=0,a=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0,O=g,g=0,O&1){w=26;break b}}else a=c[a>>2]|0;-1!=(a|0)?f||(w=53):(c[k>>2]=0,w=51)}else w=51;while(0);51==(w|0)&&f&&(w=53);53==(w|0)&&(c[l>>2]|=2);O=c[m>>2]|0;W(D);W(G);F=B;a=O|0;break a}}while(0);26==(w|0)&&(a=J()|0);W(D);W(G);V(a|0);a=0}F=e;return a|0},function(a,b,d,f,l,h){var e=0,k=0,m=0,n=0,q=0,e=F;F=F+16|0;k=e+12|0;m=e+8|0;q=e+4|0;n=e;c[q>>2]=c[(b|0)>>2];
c[n>>2]=c[(d|0)>>2];c[m>>2]=c[q>>2];c[k>>2]=c[n>>2];a:{a|=0;f|=0;l|=0;h|=0;m|=0;k|=0;f|=0;l|=0;h|=0;var r=q=n=d=b=0,x=0,t=0,z=0,A=0,y=0,L=0,S=0,I=0,E=0,D=0,M=0,B=0,G=0,w=0,O=0,M=F;F=F+320|0;A=M+208|0;b=M+200|0;G=M+24|0;B=M+12|0;L=M+8|0;E=M+40|0;D=M+4|0;S=M;y=rd(f)|0;Le(G,f,A,b);c[B>>2]=0;c[B+4>>2]=0;c[B+8>>2]=0;a=u[B>>0]&1?(c[B>>2]&-2)+-1|0:10;g=0;na(8,B|0,a|0,0);z=g;g=0;b:do if(z&1)w=26;else{x=B+8|0;t=B+1|0;a=0==(u[B>>0]&1)?t:c[x>>2]|0;c[L>>2]=a;c[D>>2]=E;c[S>>2]=0;z=B+4|0;r=c[b>>2]|0;b=c[m>>2]|
0;c:for(;;){if(b){f=c[b+12>>2]|0;if((f|0)==(c[b+16>>2]|0)){if(g=0,f=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0,q=g,g=0,q&1){w=25;break}}else f=c[f>>2]|0;-1==(f|0)?(b=c[m>>2]=0,n=1):n=0}else b=0,n=1;d=c[k>>2]|0;do if(d){f=c[d+12>>2]|0;if((f|0)==(c[d+16>>2]|0)){if(g=0,f=ca(c[(c[d>>2]|0)+36>>2]|0,d|0)|0,q=g,g=0,q&1){w=25;break c}}else f=c[f>>2]|0;if(-1!=(f|0)){if(!n)break c}else c[k>>2]=0,w=17}else w=17;while(0);if(17==(w|0))if(w=0,n){d=0;break}else d=0;f=u[B>>0]|0;f=0==(f&1)?(f&255)>>>1:c[z>>2]|0;if((c[L>>2]|
0)==(a+f|0)){g=0;na(8,B|0,f<<1|0,0);q=g;g=0;if(q&1){w=25;break}a=u[B>>0]&1?(c[B>>2]&-2)+-1|0:10;g=0;na(8,B|0,a|0,0);q=g;g=0;if(q&1){w=25;break}a=0==(u[B>>0]&1)?t:c[x>>2]|0;c[L>>2]=a+f}n=b+12|0;f=c[n>>2]|0;q=b+16|0;if((f|0)==(c[q>>2]|0)){if(g=0,f=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0,O=g,g=0,O&1){w=25;break}}else f=c[f>>2]|0;if(we(f,y,a,L,S,r,G,E,D,A)|0)break;f=c[n>>2]|0;if((f|0)==(c[q>>2]|0)){if(g=0,ca(c[(c[b>>2]|0)+40>>2]|0,b|0)|0,O=g,g=0,O&1){w=25;break}}else c[n>>2]=f+4}if(25==(w|0))a=J()|0;else if(O=
u[G>>0]|0,0!=((0==(O&1)?(O&255)>>>1:c[G+4>>2]|0)|0)&&(I=c[D>>2]|0,160>(I-E|0))&&(O=c[S>>2]|0,c[D>>2]=I+4,c[I>>2]=O),g=0,a=fb(22,a|0,c[L>>2]|0,l|0,y|0)|0,f=Fa,O=g,g=0,O&1)w=26;else{O=h;c[O>>2]=a;c[O+4>>2]=f;rc(G,E,c[D>>2]|0,l);if(b){a=c[b+12>>2]|0;if((a|0)==(c[b+16>>2]|0)){if(g=0,a=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0,O=g,g=0,O&1){w=26;break}}else a=c[a>>2]|0;-1==(a|0)?(c[m>>2]=0,f=1):f=0}else f=1;do if(d){a=c[d+12>>2]|0;if((a|0)==(c[d+16>>2]|0)){if(g=0,a=ca(c[(c[d>>2]|0)+36>>2]|0,d|0)|0,O=g,g=0,O&1){w=
26;break b}}else a=c[a>>2]|0;-1!=(a|0)?f||(w=53):(c[k>>2]=0,w=51)}else w=51;while(0);51==(w|0)&&f&&(w=53);53==(w|0)&&(c[l>>2]|=2);O=c[m>>2]|0;W(B);W(G);F=M;a=O|0;break a}}while(0);26==(w|0)&&(a=J()|0);W(B);W(G);V(a|0);a=0}F=e;return a|0},function(a,b,d,f,l,h){var e=0,k=0,m=0,n=0,q=0,e=F;F=F+16|0;k=e+12|0;m=e+8|0;q=e+4|0;n=e;c[q>>2]=c[(b|0)>>2];c[n>>2]=c[(d|0)>>2];c[m>>2]=c[q>>2];c[k>>2]=c[n>>2];a:{a|=0;f|=0;l|=0;h|=0;m|=0;k|=0;f|=0;l|=0;h|=0;var r=q=n=d=b=0,x=0,t=0,z=0,A=0,y=0,L=0,S=0,I=0,E=0,B=0,
D=0,M=0,w=0,G=0,O=0,D=F;F=F+320|0;A=D+208|0;b=D+200|0;w=D+24|0;M=D+12|0;L=D+8|0;E=D+40|0;B=D+4|0;S=D;y=rd(f)|0;Le(w,f,A,b);c[M>>2]=0;c[M+4>>2]=0;c[M+8>>2]=0;a=u[M>>0]&1?(c[M>>2]&-2)+-1|0:10;g=0;na(8,M|0,a|0,0);z=g;g=0;b:do if(z&1)G=26;else{x=M+8|0;t=M+1|0;a=0==(u[M>>0]&1)?t:c[x>>2]|0;c[L>>2]=a;c[B>>2]=E;c[S>>2]=0;z=M+4|0;r=c[b>>2]|0;b=c[m>>2]|0;c:for(;;){if(b){f=c[b+12>>2]|0;if((f|0)==(c[b+16>>2]|0)){if(g=0,f=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0,q=g,g=0,q&1){G=25;break}}else f=c[f>>2]|0;-1==(f|0)?(f=
c[m>>2]=0,d=1):(f=b,d=0)}else f=0,d=1;n=c[k>>2]|0;do if(n){b=c[n+12>>2]|0;if((b|0)==(c[n+16>>2]|0)){if(g=0,b=ca(c[(c[n>>2]|0)+36>>2]|0,n|0)|0,q=g,g=0,q&1){G=25;break c}}else b=c[b>>2]|0;if(-1!=(b|0)){if(!d){b=n;break c}}else c[k>>2]=0,G=17}else G=17;while(0);if(17==(G|0))if(G=0,d){b=0;break}else n=0;b=u[M>>0]|0;b=0==(b&1)?(b&255)>>>1:c[z>>2]|0;if((c[L>>2]|0)==(a+b|0)){g=0;na(8,M|0,b<<1|0,0);q=g;g=0;if(q&1){G=25;break}a=u[M>>0]&1?(c[M>>2]&-2)+-1|0:10;g=0;na(8,M|0,a|0,0);q=g;g=0;if(q&1){G=25;break}a=
0==(u[M>>0]&1)?t:c[x>>2]|0;c[L>>2]=a+b}d=f+12|0;b=c[d>>2]|0;q=f+16|0;if((b|0)==(c[q>>2]|0)){if(g=0,b=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0,O=g,g=0,O&1){G=25;break}}else b=c[b>>2]|0;if(we(b,y,a,L,S,r,w,E,B,A)|0){b=n;break}b=c[d>>2]|0;if((b|0)==(c[q>>2]|0))if(g=0,ca(c[(c[f>>2]|0)+40>>2]|0,f|0)|0,O=g,g=0,O&1){G=25;break}else b=f;else c[d>>2]=b+4,b=f}if(25==(G|0))a=J()|0;else if(O=u[w>>0]|0,0!=((0==(O&1)?(O&255)>>>1:c[w+4>>2]|0)|0)&&(I=c[B>>2]|0,160>(I-E|0))&&(O=c[S>>2]|0,c[B>>2]=I+4,c[I>>2]=O),g=0,a=fb(23,
a|0,c[L>>2]|0,l|0,y|0)|0,O=g,g=0,O&1)G=26;else{R[h>>1]=a;rc(w,E,c[B>>2]|0,l);if(f){a=c[f+12>>2]|0;if((a|0)==(c[f+16>>2]|0)){if(g=0,a=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0,O=g,g=0,O&1){G=26;break}}else a=c[a>>2]|0;-1==(a|0)?(c[m>>2]=0,f=1):f=0}else f=1;do if(b){a=c[b+12>>2]|0;if((a|0)==(c[b+16>>2]|0)){if(g=0,a=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0,O=g,g=0,O&1){G=26;break b}}else a=c[a>>2]|0;-1!=(a|0)?f||(G=53):(c[k>>2]=0,G=51)}else G=51;while(0);51==(G|0)&&f&&(G=53);53==(G|0)&&(c[l>>2]|=2);O=c[m>>2]|0;W(M);
W(w);F=D;a=O|0;break a}}while(0);26==(G|0)&&(a=J()|0);W(M);W(w);V(a|0);a=0}F=e;return a|0},function(a,b,d,f,l,h){var e=0,k=0,m=0,n=0,q=0,e=F;F=F+16|0;k=e+12|0;m=e+8|0;q=e+4|0;n=e;c[q>>2]=c[(b|0)>>2];c[n>>2]=c[(d|0)>>2];c[m>>2]=c[q>>2];c[k>>2]=c[n>>2];a:{a|=0;f|=0;l|=0;h|=0;m|=0;k|=0;f|=0;l|=0;h|=0;var r=q=n=d=b=0,x=0,t=0,z=0,A=0,y=0,L=0,S=0,I=0,M=0,E=0,B=0,D=0,G=0,w=0,O=0,B=F;F=F+320|0;A=B+208|0;b=B+200|0;G=B+24|0;D=B+12|0;L=B+8|0;M=B+40|0;E=B+4|0;S=B;y=rd(f)|0;Le(G,f,A,b);c[D>>2]=0;c[D+4>>2]=0;c[D+
8>>2]=0;a=u[D>>0]&1?(c[D>>2]&-2)+-1|0:10;g=0;na(8,D|0,a|0,0);z=g;g=0;b:do if(z&1)w=26;else{x=D+8|0;t=D+1|0;a=0==(u[D>>0]&1)?t:c[x>>2]|0;c[L>>2]=a;c[E>>2]=M;c[S>>2]=0;z=D+4|0;r=c[b>>2]|0;b=c[m>>2]|0;c:for(;;){if(b){f=c[b+12>>2]|0;if((f|0)==(c[b+16>>2]|0)){if(g=0,f=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0,q=g,g=0,q&1){w=25;break}}else f=c[f>>2]|0;-1==(f|0)?(f=c[m>>2]=0,d=1):(f=b,d=0)}else f=0,d=1;n=c[k>>2]|0;do if(n){b=c[n+12>>2]|0;if((b|0)==(c[n+16>>2]|0)){if(g=0,b=ca(c[(c[n>>2]|0)+36>>2]|0,n|0)|0,q=g,g=0,
q&1){w=25;break c}}else b=c[b>>2]|0;if(-1!=(b|0)){if(!d){b=n;break c}}else c[k>>2]=0,w=17}else w=17;while(0);if(17==(w|0))if(w=0,d){b=0;break}else n=0;b=u[D>>0]|0;b=0==(b&1)?(b&255)>>>1:c[z>>2]|0;if((c[L>>2]|0)==(a+b|0)){g=0;na(8,D|0,b<<1|0,0);q=g;g=0;if(q&1){w=25;break}a=u[D>>0]&1?(c[D>>2]&-2)+-1|0:10;g=0;na(8,D|0,a|0,0);q=g;g=0;if(q&1){w=25;break}a=0==(u[D>>0]&1)?t:c[x>>2]|0;c[L>>2]=a+b}d=f+12|0;b=c[d>>2]|0;q=f+16|0;if((b|0)==(c[q>>2]|0)){if(g=0,b=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0,O=g,g=0,O&1){w=
25;break}}else b=c[b>>2]|0;if(we(b,y,a,L,S,r,G,M,E,A)|0){b=n;break}b=c[d>>2]|0;if((b|0)==(c[q>>2]|0))if(g=0,ca(c[(c[f>>2]|0)+40>>2]|0,f|0)|0,O=g,g=0,O&1){w=25;break}else b=f;else c[d>>2]=b+4,b=f}if(25==(w|0))a=J()|0;else if(O=u[G>>0]|0,0!=((0==(O&1)?(O&255)>>>1:c[G+4>>2]|0)|0)&&(I=c[E>>2]|0,160>(I-M|0))&&(O=c[S>>2]|0,c[E>>2]=I+4,c[I>>2]=O),g=0,a=fb(24,a|0,c[L>>2]|0,l|0,y|0)|0,O=g,g=0,O&1)w=26;else{c[h>>2]=a;rc(G,M,c[E>>2]|0,l);if(f){a=c[f+12>>2]|0;if((a|0)==(c[f+16>>2]|0)){if(g=0,a=ca(c[(c[f>>2]|
0)+36>>2]|0,f|0)|0,O=g,g=0,O&1){w=26;break}}else a=c[a>>2]|0;-1==(a|0)?(c[m>>2]=0,f=1):f=0}else f=1;do if(b){a=c[b+12>>2]|0;if((a|0)==(c[b+16>>2]|0)){if(g=0,a=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0,O=g,g=0,O&1){w=26;break b}}else a=c[a>>2]|0;-1!=(a|0)?f||(w=53):(c[k>>2]=0,w=51)}else w=51;while(0);51==(w|0)&&f&&(w=53);53==(w|0)&&(c[l>>2]|=2);O=c[m>>2]|0;W(D);W(G);F=B;a=O|0;break a}}while(0);26==(w|0)&&(a=J()|0);W(D);W(G);V(a|0);a=0}F=e;return a|0},function(a,b,d,f,l,h){var e=0,k=0,m=0,n=0,q=0,e=F;F=F+16|
0;k=e+12|0;m=e+8|0;q=e+4|0;n=e;c[q>>2]=c[(b|0)>>2];c[n>>2]=c[(d|0)>>2];c[m>>2]=c[q>>2];c[k>>2]=c[n>>2];a:{a|=0;f|=0;l|=0;h|=0;m|=0;k|=0;f|=0;l|=0;h|=0;var r=q=n=d=b=0,x=0,t=0,z=0,A=0,y=0,D=0,S=0,I=0,L=0,M=0,B=0,E=0,w=0,G=0,O=0,B=F;F=F+320|0;A=B+208|0;b=B+200|0;w=B+24|0;E=B+12|0;D=B+8|0;L=B+40|0;M=B+4|0;S=B;y=rd(f)|0;Le(w,f,A,b);c[E>>2]=0;c[E+4>>2]=0;c[E+8>>2]=0;a=u[E>>0]&1?(c[E>>2]&-2)+-1|0:10;g=0;na(8,E|0,a|0,0);z=g;g=0;b:do if(z&1)G=26;else{x=E+8|0;t=E+1|0;a=0==(u[E>>0]&1)?t:c[x>>2]|0;c[D>>2]=a;
c[M>>2]=L;c[S>>2]=0;z=E+4|0;r=c[b>>2]|0;b=c[m>>2]|0;c:for(;;){if(b){f=c[b+12>>2]|0;if((f|0)==(c[b+16>>2]|0)){if(g=0,f=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0,q=g,g=0,q&1){G=25;break}}else f=c[f>>2]|0;-1==(f|0)?(f=c[m>>2]=0,d=1):(f=b,d=0)}else f=0,d=1;n=c[k>>2]|0;do if(n){b=c[n+12>>2]|0;if((b|0)==(c[n+16>>2]|0)){if(g=0,b=ca(c[(c[n>>2]|0)+36>>2]|0,n|0)|0,q=g,g=0,q&1){G=25;break c}}else b=c[b>>2]|0;if(-1!=(b|0)){if(!d){b=n;break c}}else c[k>>2]=0,G=17}else G=17;while(0);if(17==(G|0))if(G=0,d){b=0;break}else n=
0;b=u[E>>0]|0;b=0==(b&1)?(b&255)>>>1:c[z>>2]|0;if((c[D>>2]|0)==(a+b|0)){g=0;na(8,E|0,b<<1|0,0);q=g;g=0;if(q&1){G=25;break}a=u[E>>0]&1?(c[E>>2]&-2)+-1|0:10;g=0;na(8,E|0,a|0,0);q=g;g=0;if(q&1){G=25;break}a=0==(u[E>>0]&1)?t:c[x>>2]|0;c[D>>2]=a+b}d=f+12|0;b=c[d>>2]|0;q=f+16|0;if((b|0)==(c[q>>2]|0)){if(g=0,b=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0,O=g,g=0,O&1){G=25;break}}else b=c[b>>2]|0;if(we(b,y,a,D,S,r,w,L,M,A)|0){b=n;break}b=c[d>>2]|0;if((b|0)==(c[q>>2]|0))if(g=0,ca(c[(c[f>>2]|0)+40>>2]|0,f|0)|0,O=g,g=0,
O&1){G=25;break}else b=f;else c[d>>2]=b+4,b=f}if(25==(G|0))a=J()|0;else if(O=u[w>>0]|0,0!=((0==(O&1)?(O&255)>>>1:c[w+4>>2]|0)|0)&&(I=c[M>>2]|0,160>(I-L|0))&&(O=c[S>>2]|0,c[M>>2]=I+4,c[I>>2]=O),g=0,a=fb(25,a|0,c[D>>2]|0,l|0,y|0)|0,O=g,g=0,O&1)G=26;else{c[h>>2]=a;rc(w,L,c[M>>2]|0,l);if(f){a=c[f+12>>2]|0;if((a|0)==(c[f+16>>2]|0)){if(g=0,a=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0,O=g,g=0,O&1){G=26;break}}else a=c[a>>2]|0;-1==(a|0)?(c[m>>2]=0,f=1):f=0}else f=1;do if(b){a=c[b+12>>2]|0;if((a|0)==(c[b+16>>2]|0)){if(g=
0,a=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0,O=g,g=0,O&1){G=26;break b}}else a=c[a>>2]|0;-1!=(a|0)?f||(G=53):(c[k>>2]=0,G=51)}else G=51;while(0);51==(G|0)&&f&&(G=53);53==(G|0)&&(c[l>>2]|=2);O=c[m>>2]|0;W(E);W(w);F=B;a=O|0;break a}}while(0);26==(G|0)&&(a=J()|0);W(E);W(w);V(a|0);a=0}F=e;return a|0},function(a,b,d,f,l,h){var e=0,k=0,m=0,n=0,q=0,e=F;F=F+16|0;k=e+12|0;m=e+8|0;q=e+4|0;n=e;c[q>>2]=c[(b|0)>>2];c[n>>2]=c[(d|0)>>2];c[m>>2]=c[q>>2];c[k>>2]=c[n>>2];a:{a|=0;f|=0;l|=0;h|=0;m|=0;k|=0;f|=0;l|=0;h|=0;var r=
q=n=d=b=0,x=0,t=0,z=0,A=0,y=0,E=0,S=0,I=0,D=0,L=0,B=0,M=0,G=0,w=0,O=0,B=F;F=F+320|0;A=B+208|0;b=B+200|0;G=B+24|0;M=B+12|0;E=B+8|0;D=B+40|0;L=B+4|0;S=B;y=rd(f)|0;Le(G,f,A,b);c[M>>2]=0;c[M+4>>2]=0;c[M+8>>2]=0;a=u[M>>0]&1?(c[M>>2]&-2)+-1|0:10;g=0;na(8,M|0,a|0,0);z=g;g=0;b:do if(z&1)w=26;else{x=M+8|0;t=M+1|0;a=0==(u[M>>0]&1)?t:c[x>>2]|0;c[E>>2]=a;c[L>>2]=D;c[S>>2]=0;z=M+4|0;r=c[b>>2]|0;b=c[m>>2]|0;c:for(;;){if(b){f=c[b+12>>2]|0;if((f|0)==(c[b+16>>2]|0)){if(g=0,f=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0,q=g,g=
0,q&1){w=25;break}}else f=c[f>>2]|0;-1==(f|0)?(b=c[m>>2]=0,n=1):n=0}else b=0,n=1;d=c[k>>2]|0;do if(d){f=c[d+12>>2]|0;if((f|0)==(c[d+16>>2]|0)){if(g=0,f=ca(c[(c[d>>2]|0)+36>>2]|0,d|0)|0,q=g,g=0,q&1){w=25;break c}}else f=c[f>>2]|0;if(-1!=(f|0)){if(!n)break c}else c[k>>2]=0,w=17}else w=17;while(0);if(17==(w|0))if(w=0,n){d=0;break}else d=0;f=u[M>>0]|0;f=0==(f&1)?(f&255)>>>1:c[z>>2]|0;if((c[E>>2]|0)==(a+f|0)){g=0;na(8,M|0,f<<1|0,0);q=g;g=0;if(q&1){w=25;break}a=u[M>>0]&1?(c[M>>2]&-2)+-1|0:10;g=0;na(8,M|
0,a|0,0);q=g;g=0;if(q&1){w=25;break}a=0==(u[M>>0]&1)?t:c[x>>2]|0;c[E>>2]=a+f}n=b+12|0;f=c[n>>2]|0;q=b+16|0;if((f|0)==(c[q>>2]|0)){if(g=0,f=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0,O=g,g=0,O&1){w=25;break}}else f=c[f>>2]|0;if(we(f,y,a,E,S,r,G,D,L,A)|0)break;f=c[n>>2]|0;if((f|0)==(c[q>>2]|0)){if(g=0,ca(c[(c[b>>2]|0)+40>>2]|0,b|0)|0,O=g,g=0,O&1){w=25;break}}else c[n>>2]=f+4}if(25==(w|0))a=J()|0;else if(O=u[G>>0]|0,0!=((0==(O&1)?(O&255)>>>1:c[G+4>>2]|0)|0)&&(I=c[L>>2]|0,160>(I-D|0))&&(O=c[S>>2]|0,c[L>>2]=I+4,
c[I>>2]=O),g=0,a=fb(26,a|0,c[E>>2]|0,l|0,y|0)|0,f=Fa,O=g,g=0,O&1)w=26;else{O=h;c[O>>2]=a;c[O+4>>2]=f;rc(G,D,c[L>>2]|0,l);if(b){a=c[b+12>>2]|0;if((a|0)==(c[b+16>>2]|0)){if(g=0,a=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0,O=g,g=0,O&1){w=26;break}}else a=c[a>>2]|0;-1==(a|0)?(c[m>>2]=0,f=1):f=0}else f=1;do if(d){a=c[d+12>>2]|0;if((a|0)==(c[d+16>>2]|0)){if(g=0,a=ca(c[(c[d>>2]|0)+36>>2]|0,d|0)|0,O=g,g=0,O&1){w=26;break b}}else a=c[a>>2]|0;-1!=(a|0)?f||(w=53):(c[k>>2]=0,w=51)}else w=51;while(0);51==(w|0)&&f&&(w=53);
53==(w|0)&&(c[l>>2]|=2);O=c[m>>2]|0;W(M);W(G);F=B;a=O|0;break a}}while(0);26==(w|0)&&(a=J()|0);W(M);W(G);V(a|0);a=0}F=e;return a|0},function(a,b,d,f,l,h){var e=0,k=0,m=0,n=0,q=0,e=F;F=F+16|0;k=e+12|0;m=e+8|0;q=e+4|0;n=e;c[q>>2]=c[(b|0)>>2];c[n>>2]=c[(d|0)>>2];c[m>>2]=c[q>>2];c[k>>2]=c[n>>2];a:{a|=0;f|=0;l|=0;h|=0;m|=0;k|=0;l|=0;h|=0;var r=0,x=r=d=b=0,t=0,z=0,A=0,M=0,y=q=n=0,S=0,I=0,E=0,B=0,D=0,L=0,w=0,O=0,G=0,P=0,Y=0,w=F;F=F+352|0;q=w+208|0;b=w+40|0;d=w+36|0;G=w+24|0;O=w+12|0;S=w+8|0;D=w+48|0;L=w+
4|0;I=w;E=w+337|0;y=w+336|0;ig(G,f|0,q,b,d);c[O>>2]=0;c[O+4>>2]=0;c[O+8>>2]=0;a=u[O>>0]&1?(c[O>>2]&-2)+-1|0:10;g=0;na(8,O|0,a|0,0);n=g;g=0;b:do if(n&1)P=26;else{A=O+8|0;M=O+1|0;a=0==(u[O>>0]&1)?M:c[A>>2]|0;c[S>>2]=a;c[L>>2]=D;c[I>>2]=0;u[E>>0]=1;u[y>>0]=69;n=O+4|0;z=c[b>>2]|0;t=c[d>>2]|0;f=c[m>>2]|0;c:for(;;){if(f){b=c[f+12>>2]|0;if((b|0)==(c[f+16>>2]|0)){if(g=0,b=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0,x=g,g=0,x&1){P=25;break}}else b=c[b>>2]|0;-1==(b|0)?(f=c[m>>2]=0,r=1):r=0}else f=0,r=1;b=c[k>>2]|0;do if(b){d=
c[b+12>>2]|0;if((d|0)==(c[b+16>>2]|0)){if(g=0,d=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0,x=g,g=0,x&1){P=25;break c}}else d=c[d>>2]|0;if(-1!=(d|0)){if(!r)break c}else c[k>>2]=0,P=17}else P=17;while(0);if(17==(P|0))if(P=0,r){b=0;break}else b=0;d=u[O>>0]|0;d=0==(d&1)?(d&255)>>>1:c[n>>2]|0;if((c[S>>2]|0)==(a+d|0)){g=0;na(8,O|0,d<<1|0,0);x=g;g=0;if(x&1){P=25;break}a=u[O>>0]&1?(c[O>>2]&-2)+-1|0:10;g=0;na(8,O|0,a|0,0);x=g;g=0;if(x&1){P=25;break}a=0==(u[O>>0]&1)?M:c[A>>2]|0;c[S>>2]=a+d}r=f+12|0;d=c[r>>2]|0;x=f+16|
0;if((d|0)==(c[x>>2]|0)){if(g=0,d=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0,Y=g,g=0,Y&1){P=25;break}}else d=c[d>>2]|0;if(jg(d,E,y,a,S,z,t,G,D,L,I,q)|0)break;b=c[r>>2]|0;if((b|0)==(c[x>>2]|0)){if(g=0,ca(c[(c[f>>2]|0)+40>>2]|0,f|0)|0,Y=g,g=0,Y&1){P=25;break}}else c[r>>2]=b+4}if(25==(P|0))a=J()|0;else if(Y=u[G>>0]|0,0!=(u[E>>0]|0)&&0!=((0==(Y&1)?(Y&255)>>>1:c[G+4>>2]|0)|0)&&(B=c[L>>2]|0,160>(B-D|0))&&(Y=c[I>>2]|0,c[L>>2]=B+4,c[B>>2]=Y),g=0,r=+Ue(1,a|0,c[S>>2]|0,l|0),Y=g,g=0,Y&1)P=26;else{If[h>>2]=r;rc(G,D,c[L>>
2]|0,l);if(f){a=c[f+12>>2]|0;if((a|0)==(c[f+16>>2]|0)){if(g=0,a=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0,Y=g,g=0,Y&1){P=26;break}}else a=c[a>>2]|0;-1==(a|0)?(c[m>>2]=0,f=1):f=0}else f=1;do if(b){a=c[b+12>>2]|0;if((a|0)==(c[b+16>>2]|0)){if(g=0,a=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0,Y=g,g=0,Y&1){P=26;break b}}else a=c[a>>2]|0;-1!=(a|0)?f||(P=53):(c[k>>2]=0,P=51)}else P=51;while(0);51==(P|0)&&f&&(P=53);53==(P|0)&&(c[l>>2]|=2);Y=c[m>>2]|0;W(O);W(G);F=w;a=Y|0;break a}}while(0);26==(P|0)&&(a=J()|0);W(O);W(G);V(a|0);
a=0}F=e;return a|0},function(a,b,d,f,l,h){var e=0,k=0,m=0,n=0,q=0,e=F;F=F+16|0;k=e+12|0;m=e+8|0;q=e+4|0;n=e;c[q>>2]=c[(b|0)>>2];c[n>>2]=c[(d|0)>>2];c[m>>2]=c[q>>2];c[k>>2]=c[n>>2];a:{a|=0;f|=0;l|=0;h|=0;m|=0;k|=0;l|=0;h|=0;var r=0,x=r=d=b=0,t=0,z=0,A=0,M=0,y=q=n=0,S=0,I=0,E=0,L=0,B=0,D=0,w=0,O=0,G=0,P=0,Y=0,w=F;F=F+352|0;q=w+208|0;b=w+40|0;d=w+36|0;G=w+24|0;O=w+12|0;S=w+8|0;B=w+48|0;D=w+4|0;I=w;E=w+337|0;y=w+336|0;ig(G,f|0,q,b,d);c[O>>2]=0;c[O+4>>2]=0;c[O+8>>2]=0;a=u[O>>0]&1?(c[O>>2]&-2)+-1|0:10;
g=0;na(8,O|0,a|0,0);n=g;g=0;b:do if(n&1)P=26;else{A=O+8|0;M=O+1|0;a=0==(u[O>>0]&1)?M:c[A>>2]|0;c[S>>2]=a;c[D>>2]=B;c[I>>2]=0;u[E>>0]=1;u[y>>0]=69;n=O+4|0;z=c[b>>2]|0;t=c[d>>2]|0;f=c[m>>2]|0;c:for(;;){if(f){b=c[f+12>>2]|0;if((b|0)==(c[f+16>>2]|0)){if(g=0,b=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0,x=g,g=0,x&1){P=25;break}}else b=c[b>>2]|0;-1==(b|0)?(f=c[m>>2]=0,r=1):r=0}else f=0,r=1;b=c[k>>2]|0;do if(b){d=c[b+12>>2]|0;if((d|0)==(c[b+16>>2]|0)){if(g=0,d=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0,x=g,g=0,x&1){P=25;break c}}else d=
c[d>>2]|0;if(-1!=(d|0)){if(!r)break c}else c[k>>2]=0,P=17}else P=17;while(0);if(17==(P|0))if(P=0,r){b=0;break}else b=0;d=u[O>>0]|0;d=0==(d&1)?(d&255)>>>1:c[n>>2]|0;if((c[S>>2]|0)==(a+d|0)){g=0;na(8,O|0,d<<1|0,0);x=g;g=0;if(x&1){P=25;break}a=u[O>>0]&1?(c[O>>2]&-2)+-1|0:10;g=0;na(8,O|0,a|0,0);x=g;g=0;if(x&1){P=25;break}a=0==(u[O>>0]&1)?M:c[A>>2]|0;c[S>>2]=a+d}r=f+12|0;d=c[r>>2]|0;x=f+16|0;if((d|0)==(c[x>>2]|0)){if(g=0,d=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0,Y=g,g=0,Y&1){P=25;break}}else d=c[d>>2]|0;if(jg(d,
E,y,a,S,z,t,G,B,D,I,q)|0)break;b=c[r>>2]|0;if((b|0)==(c[x>>2]|0)){if(g=0,ca(c[(c[f>>2]|0)+40>>2]|0,f|0)|0,Y=g,g=0,Y&1){P=25;break}}else c[r>>2]=b+4}if(25==(P|0))a=J()|0;else if(Y=u[G>>0]|0,0!=(u[E>>0]|0)&&0!=((0==(Y&1)?(Y&255)>>>1:c[G+4>>2]|0)|0)&&(L=c[D>>2]|0,160>(L-B|0))&&(Y=c[I>>2]|0,c[D>>2]=L+4,c[L>>2]=Y),g=0,r=+Ue(2,a|0,c[S>>2]|0,l|0),Y=g,g=0,Y&1)P=26;else{eb[h>>3]=r;rc(G,B,c[D>>2]|0,l);if(f){a=c[f+12>>2]|0;if((a|0)==(c[f+16>>2]|0)){if(g=0,a=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0,Y=g,g=0,Y&1){P=26;
break}}else a=c[a>>2]|0;-1==(a|0)?(c[m>>2]=0,f=1):f=0}else f=1;do if(b){a=c[b+12>>2]|0;if((a|0)==(c[b+16>>2]|0)){if(g=0,a=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0,Y=g,g=0,Y&1){P=26;break b}}else a=c[a>>2]|0;-1!=(a|0)?f||(P=53):(c[k>>2]=0,P=51)}else P=51;while(0);51==(P|0)&&f&&(P=53);53==(P|0)&&(c[l>>2]|=2);Y=c[m>>2]|0;W(O);W(G);F=w;a=Y|0;break a}}while(0);26==(P|0)&&(a=J()|0);W(O);W(G);V(a|0);a=0}F=e;return a|0},function(a,b,d,f,l,e){var h=0,k=0,m=0,n=0,q=0,h=F;F=F+16|0;k=h+12|0;m=h+8|0;q=h+4|0;n=h;c[q>>
2]=c[(b|0)>>2];c[n>>2]=c[(d|0)>>2];c[m>>2]=c[q>>2];c[k>>2]=c[n>>2];a:{a|=0;f|=0;l|=0;e|=0;m|=0;k|=0;l|=0;e|=0;var r=0,x=r=d=b=0,t=0,z=0,A=0,M=0,E=q=n=0,S=0,I=0,D=0,y=0,B=0,L=0,O=0,w=0,G=0,P=0,Y=0,O=F;F=F+352|0;q=O+208|0;b=O+40|0;d=O+36|0;G=O+24|0;w=O+12|0;S=O+8|0;B=O+48|0;L=O+4|0;I=O;D=O+337|0;E=O+336|0;ig(G,f|0,q,b,d);c[w>>2]=0;c[w+4>>2]=0;c[w+8>>2]=0;a=u[w>>0]&1?(c[w>>2]&-2)+-1|0:10;g=0;na(8,w|0,a|0,0);n=g;g=0;b:do if(n&1)P=26;else{A=w+8|0;M=w+1|0;a=0==(u[w>>0]&1)?M:c[A>>2]|0;c[S>>2]=a;c[L>>2]=
B;c[I>>2]=0;u[D>>0]=1;u[E>>0]=69;n=w+4|0;z=c[b>>2]|0;t=c[d>>2]|0;f=c[m>>2]|0;c:for(;;){if(f){b=c[f+12>>2]|0;if((b|0)==(c[f+16>>2]|0)){if(g=0,b=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0,x=g,g=0,x&1){P=25;break}}else b=c[b>>2]|0;-1==(b|0)?(f=c[m>>2]=0,r=1):r=0}else f=0,r=1;b=c[k>>2]|0;do if(b){d=c[b+12>>2]|0;if((d|0)==(c[b+16>>2]|0)){if(g=0,d=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0,x=g,g=0,x&1){P=25;break c}}else d=c[d>>2]|0;if(-1!=(d|0)){if(!r)break c}else c[k>>2]=0,P=17}else P=17;while(0);if(17==(P|0))if(P=0,r){b=
0;break}else b=0;d=u[w>>0]|0;d=0==(d&1)?(d&255)>>>1:c[n>>2]|0;if((c[S>>2]|0)==(a+d|0)){g=0;na(8,w|0,d<<1|0,0);x=g;g=0;if(x&1){P=25;break}a=u[w>>0]&1?(c[w>>2]&-2)+-1|0:10;g=0;na(8,w|0,a|0,0);x=g;g=0;if(x&1){P=25;break}a=0==(u[w>>0]&1)?M:c[A>>2]|0;c[S>>2]=a+d}r=f+12|0;d=c[r>>2]|0;x=f+16|0;if((d|0)==(c[x>>2]|0)){if(g=0,d=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0,Y=g,g=0,Y&1){P=25;break}}else d=c[d>>2]|0;if(jg(d,D,E,a,S,z,t,G,B,L,I,q)|0)break;b=c[r>>2]|0;if((b|0)==(c[x>>2]|0)){if(g=0,ca(c[(c[f>>2]|0)+40>>2]|0,
f|0)|0,Y=g,g=0,Y&1){P=25;break}}else c[r>>2]=b+4}if(25==(P|0))a=J()|0;else if(Y=u[G>>0]|0,0!=(u[D>>0]|0)&&0!=((0==(Y&1)?(Y&255)>>>1:c[G+4>>2]|0)|0)&&(y=c[L>>2]|0,160>(y-B|0))&&(Y=c[I>>2]|0,c[L>>2]=y+4,c[y>>2]=Y),g=0,r=+Ue(3,a|0,c[S>>2]|0,l|0),Y=g,g=0,Y&1)P=26;else{eb[e>>3]=r;rc(G,B,c[L>>2]|0,l);if(f){a=c[f+12>>2]|0;if((a|0)==(c[f+16>>2]|0)){if(g=0,a=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0,Y=g,g=0,Y&1){P=26;break}}else a=c[a>>2]|0;-1==(a|0)?(c[m>>2]=0,f=1):f=0}else f=1;do if(b){a=c[b+12>>2]|0;if((a|0)==(c[b+
16>>2]|0)){if(g=0,a=ca(c[(c[b>>2]|0)+36>>2]|0,b|0)|0,Y=g,g=0,Y&1){P=26;break b}}else a=c[a>>2]|0;-1!=(a|0)?f||(P=53):(c[k>>2]=0,P=51)}else P=51;while(0);51==(P|0)&&f&&(P=53);53==(P|0)&&(c[l>>2]|=2);Y=c[m>>2]|0;W(w);W(G);F=O;a=Y|0;break a}}while(0);26==(P|0)&&(a=J()|0);W(w);W(G);V(a|0);a=0}F=h;return a|0},function(a,b,d,f,l,h){b|=0;d|=0;l|=0;h|=0;var e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,w=0,M=0,S=0,I=0,L=0,O=0,B=0,D=0,y=0,E=0,G=0,P=0,D=F;F=F+320|0;S=D;t=D+208|0;E=D+32|0;a=D+28|0;y=D+16|0;M=D+12|
0;A=D+48|0;w=D+8|0;z=D+4|0;c[E>>2]=0;c[E+4>>2]=0;g=c[E+8>>2]=0;f=ca(68,f|0)|0;x=g;g=0;do if(x&1)a=J()|0;else if(c[a>>2]=f,g=0,a=ma(37,a|0,44212)|0,x=g,g=0,x&1||(g=0,fb(c[(c[a>>2]|0)+48>>2]|0,a|0,57498,57524,t|0)|0,x=g,g=0,x&1))a=J()|0,Na(f)|0;else{Na(f)|0;c[y>>2]=0;c[y+4>>2]=0;c[y+8>>2]=0;a=u[y>>0]&1?(c[y>>2]&-2)+-1|0:10;g=0;na(8,y|0,a|0,0);x=g;g=0;a:do if(x&1)G=31;else{r=y+8|0;x=y+1|0;a=0==(u[y>>0]&1)?x:c[r>>2]|0;c[M>>2]=a;c[w>>2]=A;c[z>>2]=0;q=y+4|0;e=c[b>>2]|0;b:for(;;){if(e){f=c[e+12>>2]|0;if((f|
0)==(c[e+16>>2]|0)){if(g=0,f=ca(c[(c[e>>2]|0)+36>>2]|0,e|0)|0,n=g,g=0,n&1){G=30;break}}else f=c[f>>2]|0;-1==(f|0)?(f=c[b>>2]=0,k=1):(f=e,k=0)}else f=0,k=1;m=c[d>>2]|0;do if(m){e=c[m+12>>2]|0;if((e|0)==(c[m+16>>2]|0)){if(g=0,e=ca(c[(c[m>>2]|0)+36>>2]|0,m|0)|0,n=g,g=0,n&1){G=30;break b}}else e=c[e>>2]|0;if(-1!=(e|0))if(k)e=m;else{e=m;break b}else c[d>>2]=0,G=20}else G=20;while(0);if(20==(G|0))if(G=0,k){e=0;break}else e=0;k=u[y>>0]|0;k=0==(k&1)?(k&255)>>>1:c[q>>2]|0;if((c[M>>2]|0)==(a+k|0)){g=0;na(8,
y|0,k<<1|0,0);n=g;g=0;if(n&1){G=30;break}a=u[y>>0]&1?(c[y>>2]&-2)+-1|0:10;g=0;na(8,y|0,a|0,0);n=g;g=0;if(n&1){G=30;break}a=0==(u[y>>0]&1)?x:c[r>>2]|0;c[M>>2]=a+k}m=f+12|0;k=c[m>>2]|0;n=f+16|0;if((k|0)==(c[n>>2]|0)){if(g=0,k=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0,P=g,g=0,P&1){G=30;break}}else k=c[k>>2]|0;if(we(k,16,a,M,z,0,E,A,w,t)|0)break;e=c[m>>2]|0;if((e|0)==(c[n>>2]|0))if(g=0,ca(c[(c[f>>2]|0)+40>>2]|0,f|0)|0,P=g,g=0,P&1){G=30;break}else e=f;else c[m>>2]=e+4,e=f}if(30==(G|0))a=J()|0;else if(g=0,na(8,
y|0,(c[M>>2]|0)-a|0,0),P=g,g=0,P&1||(I=u[y>>0]|0,L=c[r>>2]|0,g=0,O=Va(3)|0,P=g,g=0,P&1)||(g=0,c[S>>2]=h,B=fb(16,(0==(I&1)?x:L)|0,O|0,58882,S|0)|0,P=g,g=0,P&1))G=31;else{1!=(B|0)&&(c[l>>2]=4);if(f){a=c[f+12>>2]|0;if((a|0)==(c[f+16>>2]|0)){if(g=0,a=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0,P=g,g=0,P&1){G=31;break}}else a=c[a>>2]|0;-1==(a|0)?(c[b>>2]=0,f=1):f=0}else f=1;do if(e){a=c[e+12>>2]|0;if((a|0)==(c[e+16>>2]|0)){if(g=0,a=ca(c[(c[e>>2]|0)+36>>2]|0,e|0)|0,P=g,g=0,P&1){G=31;break a}}else a=c[a>>2]|0;-1!=
(a|0)?f||(G=59):(c[d>>2]=0,G=57)}else G=57;while(0);57==(G|0)&&f&&(G=59);59==(G|0)&&(c[l>>2]|=2);P=c[b>>2]|0;W(y);W(E);F=D;return P|0}}while(0);31==(G|0)&&(a=J()|0);W(y)}while(0);W(E);V(a|0);return 0},function(a,b,d,f,l,e){b|=0;d|=0;f|=0;l|=0;e|=0;var h=0,k=0,m=0,n=0,q=0,u=0,r=0,x=0,t=0,z=0,u=F;F=F+96|0;h=u+8|0;a=u;x=u+74|0;m=u+32|0;q=u+28|0;n=u+24|0;r=u+20|0;k=u+16|0;t=a;c[t>>2]=37;c[t+4>>2]=0;ke(a+1|0,58895,1,c[d+4>>2]|0);t=Xb()|0;z=h;c[z>>2]=l;c[z+4>>2]=e;e=x+(Bc(x,22,t,a,h)|0)|0;l=kd(x,e,d)|0;
a=Lb(d)|0;c[r>>2]=a;g=0;sd(1,x|0,l|0,e|0,m|0,q|0,n|0,r|0);e=g;g=0;if(e&1)z=J()|0,Na(a)|0,V(z|0);else return Na(a)|0,c[k>>2]=c[b>>2],t=c[q>>2]|0,z=c[n>>2]|0,c[h>>2]=c[k>>2],z=y(h,m,t,z,d,f)|0,F=u,z|0;return 0},function(a,b,d,f,l,e){b|=0;d|=0;f|=0;l|=0;e|=0;var h=0,k=0,m=0,n=0,q=0,u=0,r=0,x=0,t=0,z=0,u=F;F=F+112|0;h=u+8|0;a=u;x=u+75|0;m=u+32|0;q=u+28|0;n=u+24|0;r=u+20|0;k=u+16|0;t=a;c[t>>2]=37;c[t+4>>2]=0;ke(a+1|0,58895,0,c[d+4>>2]|0);t=Xb()|0;z=h;c[z>>2]=l;c[z+4>>2]=e;e=x+(Bc(x,23,t,a,h)|0)|0;l=kd(x,
e,d)|0;a=Lb(d)|0;c[r>>2]=a;g=0;sd(1,x|0,l|0,e|0,m|0,q|0,n|0,r|0);e=g;g=0;if(e&1)z=J()|0,Na(a)|0,V(z|0);else return Na(a)|0,c[k>>2]=c[b>>2],t=c[q>>2]|0,z=c[n>>2]|0,c[h>>2]=c[k>>2],z=y(h,m,t,z,d,f)|0,F=u,z|0;return 0},function(a,b,d,f,l,e){b|=0;d|=0;f|=0;l|=0;e|=0;var h=0,k=0,m=0,n=0,q=0,u=0,r=0,x=0,t=0,z=0,u=F;F=F+224|0;h=u+8|0;a=u;x=u+196|0;m=u+32|0;q=u+28|0;n=u+24|0;r=u+20|0;k=u+16|0;t=a;c[t>>2]=37;c[t+4>>2]=0;ke(a+1|0,58895,1,c[d+4>>2]|0);t=Xb()|0;z=h;c[z>>2]=l;c[z+4>>2]=e;e=x+(Bc(x,22,t,a,h)|0)|
0;l=kd(x,e,d)|0;a=Lb(d)|0;c[r>>2]=a;g=0;sd(3,x|0,l|0,e|0,m|0,q|0,n|0,r|0);e=g;g=0;if(e&1)z=J()|0,Na(a)|0,V(z|0);else return Na(a)|0,c[k>>2]=c[b>>2],t=c[q>>2]|0,z=c[n>>2]|0,c[h>>2]=c[k>>2],z=Me(h,m,t,z,d,f)|0,F=u,z|0;return 0},function(a,b,d,f,l,e){b|=0;d|=0;f|=0;l|=0;e|=0;var h=0,k=0,m=0,n=0,q=0,u=0,r=0,x=0,t=0,z=0,u=F;F=F+240|0;h=u+8|0;a=u;x=u+204|0;m=u+32|0;q=u+28|0;n=u+24|0;r=u+20|0;k=u+16|0;t=a;c[t>>2]=37;c[t+4>>2]=0;ke(a+1|0,58895,0,c[d+4>>2]|0);t=Xb()|0;z=h;c[z>>2]=l;c[z+4>>2]=e;e=x+(Bc(x,23,
t,a,h)|0)|0;l=kd(x,e,d)|0;a=Lb(d)|0;c[r>>2]=a;g=0;sd(3,x|0,l|0,e|0,m|0,q|0,n|0,r|0);e=g;g=0;if(e&1)z=J()|0,Na(a)|0,V(z|0);else return Na(a)|0,c[k>>2]=c[b>>2],t=c[q>>2]|0,z=c[n>>2]|0,c[h>>2]=c[k>>2],z=Me(h,m,t,z,d,f)|0,F=u,z|0;return 0},function(a,b,g,d,f,e){var h=0,k=0,m=0,n=0,q=0,h=F;F=F+16|0;k=h+12|0;m=h+8|0;q=h+4|0;n=h;c[q>>2]=c[(b|0)>>2];c[n>>2]=c[(g|0)>>2];c[m>>2]=c[q>>2];c[k>>2]=c[n>>2];a=ec(a|0,m,k,d|0,f|0,e|0,58907,58915)|0;F=h;return a|0},function(a,b,g,d,f,e){a|=0;b|=0;g|=0;d|=0;f|=0;e|=
0;var h=0,k=0,m=0,n=0,q=0,r=0,x=0,h=F;F=F+16|0;k=h+12|0;m=h+8|0;q=h+4|0;n=h;r=a+8|0;r=Ja[c[(c[r>>2]|0)+20>>2]&127](r)|0;c[q>>2]=c[b>>2];c[n>>2]=c[g>>2];g=u[r>>0]|0;b=(x=0==(g&1))?r+1|0:c[r+8>>2]|0;g=b+(x?(g&255)>>>1:c[r+4>>2]|0)|0;c[m>>2]=c[q>>2];c[k>>2]=c[n>>2];a=ec(a,m,k,d,f,e,b,g)|0;F=h;return a|0},function(a,b,d,f,l,e){a|=0;b|=0;d|=0;l|=0;e|=0;var h=0,k=0,m=0,n=0,q=0,n=F;F=F+16|0;k=n+8|0;h=n+4|0;m=n;f=Lb(f|0)|0;c[h>>2]=f;g=0;h=ma(37,h|0,44220)|0;q=g;g=0;if(q&1)q=J()|0,Na(f)|0,V(q|0);else return Na(f)|
0,c[m>>2]=c[d>>2],c[k>>2]=c[m>>2],Nc(a,e+24|0,b,k,l,h),F=n,c[b>>2]|0;return 0},function(a,b,d,f,l,e){a|=0;b|=0;d|=0;l|=0;e|=0;var h=0,k=0,m=0,n=0,q=0,n=F;F=F+16|0;k=n+8|0;h=n+4|0;m=n;f=Lb(f|0)|0;c[h>>2]=f;g=0;h=ma(37,h|0,44220)|0;q=g;g=0;if(q&1)q=J()|0,Na(f)|0,V(q|0);else return Na(f)|0,c[m>>2]=c[d>>2],c[k>>2]=c[m>>2],Oc(a,e+16|0,b,k,l,h),F=n,c[b>>2]|0;return 0},function(a,b,d,f,l,e){a|=0;b|=0;d|=0;l|=0;e|=0;var h=0,k=0,m=0,n=0,q=0,n=F;F=F+16|0;k=n+8|0;h=n+4|0;m=n;f=Lb(f|0)|0;c[h>>2]=f;g=0;h=ma(37,
h|0,44220)|0;q=g;g=0;if(q&1)q=J()|0,Na(f)|0,V(q|0);else return Na(f)|0,c[m>>2]=c[d>>2],c[k>>2]=c[m>>2],Qc(a,e+20|0,b,k,l,h),F=n,c[b>>2]|0;return 0},function(a,b,g,d,f,e){var h=0,k=0,m=0,n=0,q=0,h=F;F=F+16|0;k=h+12|0;m=h+8|0;q=h+4|0;n=h;c[q>>2]=c[(b|0)>>2];c[n>>2]=c[(g|0)>>2];c[m>>2]=c[q>>2];c[k>>2]=c[n>>2];a=jc(a|0,m,k,d|0,f|0,e|0,44788,44820)|0;F=h;return a|0},function(a,b,g,d,f,e){a|=0;b|=0;g|=0;d|=0;f|=0;e|=0;var h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,h=F;F=F+16|0;k=h+12|0;m=h+8|0;q=h+4|0;n=h;t=a+8|0;
t=Ja[c[(c[t>>2]|0)+20>>2]&127](t)|0;c[q>>2]=c[b>>2];c[n>>2]=c[g>>2];r=u[t>>0]|0;x=0==(r&1);g=t+4|0;b=x?g:c[t+8>>2]|0;g=b+((x?(r&255)>>>1:c[g>>2]|0)<<2)|0;c[m>>2]=c[q>>2];c[k>>2]=c[n>>2];a=jc(a,m,k,d,f,e,b,g)|0;F=h;return a|0},function(a,b,d,f,l,e){a|=0;b|=0;d|=0;l|=0;e|=0;var h=0,k=0,m=0,n=0,q=0,n=F;F=F+16|0;k=n+8|0;h=n+4|0;m=n;f=Lb(f|0)|0;c[h>>2]=f;g=0;h=ma(37,h|0,44212)|0;q=g;g=0;if(q&1)q=J()|0,Na(f)|0,V(q|0);else return Na(f)|0,c[m>>2]=c[d>>2],c[k>>2]=c[m>>2],Vc(a,e+24|0,b,k,l,h),F=n,c[b>>2]|0;
return 0},function(a,b,d,f,l,e){a|=0;b|=0;d|=0;l|=0;e|=0;var h=0,k=0,m=0,n=0,q=0,n=F;F=F+16|0;k=n+8|0;h=n+4|0;m=n;f=Lb(f|0)|0;c[h>>2]=f;g=0;h=ma(37,h|0,44212)|0;q=g;g=0;if(q&1)q=J()|0,Na(f)|0,V(q|0);else return Na(f)|0,c[m>>2]=c[d>>2],c[k>>2]=c[m>>2],Wc(a,e+16|0,b,k,l,h),F=n,c[b>>2]|0;return 0},function(a,b,d,f,l,e){a|=0;b|=0;d|=0;l|=0;e|=0;var h=0,k=0,m=0,n=0,q=0,n=F;F=F+16|0;k=n+8|0;h=n+4|0;m=n;f=Lb(f|0)|0;c[h>>2]=f;g=0;h=ma(37,h|0,44212)|0;q=g;g=0;if(q&1)q=J()|0,Na(f)|0,V(q|0);else return Na(f)|
0,c[m>>2]=c[d>>2],c[k>>2]=c[m>>2],Zc(a,e+20|0,b,k,l,h),F=n,c[b>>2]|0;return 0},function(a,b,d,f,l,e){b|=0;d|=0;f|=0;l|=0;e|=0;var h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,y=0,D=0,S=0,I=0,M=0,w=0,E=0,L=0,O=0,B=0,G=0,P=0,Y=0,w=F;F=F+176|0;t=w+56|0;L=w+52|0;I=w+64|0;y=w+61|0;M=w+60|0;O=w+40|0;G=w+28|0;B=w+16|0;n=w+12|0;x=w+68|0;S=w+8|0;D=w+4|0;z=w;a=Lb(f)|0;c[L>>2]=a;g=0;A=ma(37,L|0,44220)|0;r=g;g=0;do if(r&1)P=13;else{q=u[e>>0]|0;h=0==(q&1);r=e+4|0;if((h?(q&255)>>>1:c[r>>2]|0)|0){h=u[(h?e+1|0:c[e+8>>
2]|0)>>0]|0;g=0;k=ma(c[(c[A>>2]|0)+28>>2]|0,A|0,45)|0;q=g;g=0;if(q&1){P=13;break}q=h<<24>>24==k<<24>>24}else q=0;c[O>>2]=0;c[O+4>>2]=0;c[O+8>>2]=0;c[G>>2]=0;c[G+4>>2]=0;c[G+8>>2]=0;c[B>>2]=0;c[B+4>>2]=0;g=c[B+8>>2]=0;Te(3,d|0,q|0,L|0,I|0,y|0,M|0,O|0,G|0,B|0,n|0);m=g;g=0;if(m&1)h=J()|0;else{m=u[e>>0]|0;d=c[r>>2]|0;h=0==(m&1)?(m&255)>>>1:d;n=c[n>>2]|0;(h|0)>(n|0)?(Y=u[B>>0]|0,k=u[G>>0]|0,h=(h-n<<1|1)+n+(0==(Y&1)?(Y&255)>>>1:c[B+4>>2]|0)+(0==(k&1)?(k&255)>>>1:c[G+4>>2]|0)|0):(Y=u[B>>0]|0,h=u[G>>0]|0,
h=n+2+(0==(Y&1)?(Y&255)>>>1:c[B+4>>2]|0)+(0==(h&1)?(h&255)>>>1:c[G+4>>2]|0)|0);100<h>>>0?(k=h=Ub(h)|0)?P=17:(g=0,rb(6),Y=g,g=0,Y&1||(m=u[e>>0]|0,d=c[r>>2]|0,h=0,P=17)):(k=0,h=x,P=17);if(17==(P|0)&&(e=(Y=0==(m&1))?e+1|0:c[e+8>>2]|0,g=0,Lf(1,h|0,S|0,D|0,c[f+4>>2]|0,e|0,e+(Y?(m&255)>>>1:d)|0,A|0,q|0,I|0,u[y>>0]|0,u[M>>0]|0,O|0,G|0,B|0,n|0),Y=g,g=0,Y&1?0:(c[z>>2]=c[b>>2],Y=c[S>>2]|0,E=c[D>>2]|0,g=0,c[t>>2]=c[z>>2],E=Wd(39,t|0,h|0,Y|0,E|0,f|0,l|0)|0,Y=g,g=0,!(Y&1))))return k&&($a(k),a=c[L>>2]|0),W(B),
W(G),W(O),Na(a)|0,F=w,E|0;h=J()|0;k&&($a(k),a=c[L>>2]|0)}W(B);W(G);W(O)}while(0);13==(P|0)&&(h=J()|0);Na(a)|0;V(h|0);return 0},function(a,b,d,f,l,h){b|=0;d|=0;f|=0;l|=0;h|=0;var e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,y=0,w=0,S=0,I=0,B=0,D=0,M=0,O=0,E=0,L=0,G=0,P=0,Y=0,D=F;F=F+480|0;x=D+468|0;O=D+464|0;I=D+472|0;y=D+56|0;B=D+52|0;E=D+40|0;G=D+28|0;L=D+16|0;n=D+12|0;r=D+64|0;S=D+8|0;w=D+4|0;t=D;a=Lb(f)|0;c[O>>2]=a;g=0;z=ma(37,O|0,44212)|0;A=g;g=0;do if(A&1)P=13;else{q=u[h>>0]|0;e=0==(q&1);A=h+4|0;
if((e?(q&255)>>>1:c[A>>2]|0)|0){e=c[(e?A:c[h+8>>2]|0)>>2]|0;g=0;k=ma(c[(c[z>>2]|0)+44>>2]|0,z|0,45)|0;q=g;g=0;if(q&1){P=13;break}q=(e|0)==(k|0)}else q=0;c[E>>2]=0;c[E+4>>2]=0;c[E+8>>2]=0;c[G>>2]=0;c[G+4>>2]=0;c[G+8>>2]=0;c[L>>2]=0;c[L+4>>2]=0;g=c[L+8>>2]=0;Te(4,d|0,q|0,O|0,I|0,y|0,B|0,E|0,G|0,L|0,n|0);m=g;g=0;if(m&1)e=J()|0;else{m=u[h>>0]|0;d=c[A>>2]|0;e=0==(m&1)?(m&255)>>>1:d;n=c[n>>2]|0;(e|0)>(n|0)?(Y=u[L>>0]|0,k=u[G>>0]|0,e=(e-n<<1|1)+n+(0==(Y&1)?(Y&255)>>>1:c[L+4>>2]|0)+(0==(k&1)?(k&255)>>>1:
c[G+4>>2]|0)|0):(Y=u[L>>0]|0,e=u[G>>0]|0,e=n+2+(0==(Y&1)?(Y&255)>>>1:c[L+4>>2]|0)+(0==(e&1)?(e&255)>>>1:c[G+4>>2]|0)|0);100<e>>>0?(k=e=Ub(e<<2)|0)?P=17:(g=0,rb(6),Y=g,g=0,Y&1||(m=u[h>>0]|0,d=c[A>>2]|0,e=0,P=17)):(k=0,e=r,P=17);if(17==(P|0)&&(h=(Y=0==(m&1))?A:c[h+8>>2]|0,g=0,Lf(2,e|0,S|0,w|0,c[f+4>>2]|0,h|0,h+((Y?(m&255)>>>1:d)<<2)|0,z|0,q|0,I|0,c[y>>2]|0,c[B>>2]|0,E|0,G|0,L|0,n|0),Y=g,g=0,Y&1?0:(c[t>>2]=c[b>>2],Y=c[S>>2]|0,M=c[w>>2]|0,g=0,c[x>>2]=c[t>>2],M=Wd(40,x|0,e|0,Y|0,M|0,f|0,l|0)|0,Y=g,g=0,
!(Y&1))))return k&&($a(k),a=c[O>>2]|0),Ka(L),Ka(G),W(E),Na(a)|0,F=D,M|0;e=J()|0;k&&($a(k),a=c[O>>2]|0)}Ka(L);Ka(G);W(E)}while(0);13==(P|0)&&(e=J()|0);Na(a)|0;V(e|0);return 0},y,Me,Yb,Yb,Yb,Yb,Yb,Yb,Yb,Yb,Yb,Yb,Yb,Yb,Yb,Yb,Yb,Yb,Yb,Yb,Yb,Yb,Yb,Yb,Yb],Ja=[Xa,function(c){return 0},function(c){return 0},function(a){a|=0;var b=0,g=0,d=0,f=0,b=a+44|0,g=c[b>>2]|0,d=c[a+24>>2]|0;g>>>0<d>>>0&&(g=c[b>>2]=d);if(!(c[a+48>>2]&8))return-1;f=a+16|0;b=c[f>>2]|0;d=a+12|0;b>>>0<g>>>0?(d=c[d>>2]|0,b=c[f>>2]=g):d=c[d>>
2]|0;if(d>>>0>=b>>>0)return-1;a=ea[d>>0]|0;return a|0},function(a){a|=0;var b=0;-1==(Ja[c[(c[a>>2]|0)+36>>2]&127](a)|0)?a=-1:(b=a+12|0,a=c[b>>2]|0,c[b>>2]=a+1,a=ea[a>>0]|0);return a|0},function(c){return 50767},function(c){return 51611},function(a){return c[(a|0)+4>>2]|0},function(c){return 51716},function(a){var b=0,g=0,b=F;F=F+16|0;g=b;c[g>>2]=c[(a|0)+60>>2];a=Se(ti(6,g|0)|0)|0;F=b;return a|0},function(a){a|=0;var b=0,g=0,d=0,f=0,e=0,h=0,k=0,m=0,n=0,q=0,n=F;F=F+16|0;k=n+8|0;h=n;g=a+36|0;d=a+40|
0;f=k+8|0;e=k;b=a+32|0;a:for(;;){a=c[g>>2]|0;a=cf[c[(c[a>>2]|0)+20>>2]&31](a,c[d>>2]|0,k,f,h)|0;q=(c[h>>2]|0)-e|0;if((Qd(k,1,q,c[b>>2]|0)|0)!=(q|0)){a=-1;break}switch(a|0){case 1:break;case 2:a=-1;break a;default:m=4;break a}}4==(m|0)&&(a=(0!=(pg(c[b>>2]|0)|0))<<31>>31);F=n;return a|0},function(c){return 0},function(c){return-1},function(a){a|=0;var b=0;-1==(Ja[c[(c[a>>2]|0)+36>>2]&127](a)|0)?a=-1:(b=a+12|0,a=c[b>>2]|0,c[b>>2]=a+4,a=c[a>>2]|0);return a|0},function(c){return 0},function(c){return Hd(c|
0,0)|0},function(c){return Hd(c|0,1)|0},function(a){a|=0;var b=0,g=0,d=0,f=0,e=0,h=0,k=0,m=0,n=0,q=0,n=F;F=F+16|0;k=n+8|0;h=n;g=a+36|0;d=a+40|0;f=k+8|0;e=k;b=a+32|0;a:for(;;){a=c[g>>2]|0;a=cf[c[(c[a>>2]|0)+20>>2]&31](a,c[d>>2]|0,k,f,h)|0;q=(c[h>>2]|0)-e|0;if((Qd(k,1,q,c[b>>2]|0)|0)!=(q|0)){a=-1;break}switch(a|0){case 1:break;case 2:a=-1;break a;default:m=4;break a}}4==(m|0)&&(a=(0!=(pg(c[b>>2]|0)|0))<<31>>31);F=n;return a|0},function(c){return-1},function(c){return Jd(c|0,0)|0},function(c){return Jd(c|
0,1)|0},function(c){return 57453},function(c){return 2},function(a){if(0==(u[2464]|0)&&0!=(Da(2464)|0)){if(0==(u[2472]|0)&&0!=(Da(2472)|0)){a=45040;do c[a>>2]=0,c[a+4>>2]=0,c[a+8>>2]=0,a=a+12|0;while(45208!=(a|0));Ea(193,0,Ga|0)|0;Ca(2472)}g=0;ma(41,45040,59035)|0;a=g;g=0;a&1||(g=0,ma(41,45052,59042)|0,a=g,g=0,a&1)||(g=0,ma(41,45064,59049)|0,a=g,g=0,a&1)||(g=0,ma(41,45076,59057)|0,a=g,g=0,a&1)||(g=0,ma(41,45088,59067)|0,a=g,g=0,a&1)||(g=0,ma(41,45100,59076)|0,a=g,g=0,a&1)||(g=0,ma(41,45112,59083)|
0,a=g,g=0,a&1)||(g=0,ma(41,45124,59092)|0,a=g,g=0,a&1)||(g=0,ma(41,45136,59096)|0,a=g,g=0,a&1)||(g=0,ma(41,45148,59100)|0,a=g,g=0,a&1)||(g=0,ma(41,45160,59104)|0,a=g,g=0,a&1)||(g=0,ma(41,45172,59108)|0,a=g,g=0,a&1)||(g=0,ma(41,45184,59112)|0,a=g,g=0,a&1)||(g=0,ma(41,45196,59116)|0,a=g,g=0,a&1)?(a=J()|0,Hc(2464),V(a|0)):(c[11302]=45040,Ca(2464))}return c[11302]|0},function(a){a:do if(0==(u[2496]|0)&&0!=(Da(2496)|0)){if(0==(u[2504]|0)&&0!=(Da(2504)|0)){a=45724;do c[a>>2]=0,c[a+4>>2]=0,c[a+8>>2]=0,a=
a+12|0;while(46012!=(a|0));Ea(195,0,Ga|0)|0;Ca(2504)}g=0;ma(41,45724,59120)|0;a=g;g=0;do if(a&1||(g=0,ma(41,45736,59128)|0,a=g,g=0,a&1)||(g=0,ma(41,45748,59137)|0,a=g,g=0,a&1)||(g=0,ma(41,45760,59143)|0,a=g,g=0,a&1)||(g=0,ma(41,45772,59149)|0,a=g,g=0,a&1)||(g=0,ma(41,45784,59153)|0,a=g,g=0,a&1)||(g=0,ma(41,45796,59158)|0,a=g,g=0,a&1)||(g=0,ma(41,45808,59163)|0,a=g,g=0,a&1)||(g=0,ma(41,45820,59170)|0,a=g,g=0,a&1)||(g=0,ma(41,45832,59180)|0,a=g,g=0,a&1)||(g=0,ma(41,45844,59188)|0,a=g,g=0,a&1)||(g=0,
ma(41,45856,59197)|0,a=g,g=0,a&1)||(g=0,ma(41,45868,59206)|0,a=g,g=0,a&1)||(g=0,ma(41,45880,59210)|0,a=g,g=0,a&1)?0:(g=0,ma(41,45892,59214)|0,a=g,g=0,!(a&1)))if(g=0,ma(41,45904,59218)|0,a=g,g=0,!(a&1||(g=0,ma(41,45916,59149)|0,a=g,g=0,a&1||(g=0,ma(41,45928,59222)|0,a=g,g=0,a&1||(g=0,ma(41,45940,59226)|0,a=g,g=0,a&1||(g=0,ma(41,45952,59230)|0,a=g,g=0,a&1||(g=0,ma(41,45964,59234)|0,a=g,g=0,a&1||(g=0,ma(41,45976,59238)|0,a=g,g=0,a&1||(g=0,ma(41,45988,59242)|0,a=g,g=0,a&1||(g=0,ma(41,46E3,59246)|0,a=
g,g=0,a&1)))))))))){c[11503]=45724;Ca(2496);break a}while(0);a=J()|0;Hc(2496);V(a|0)}while(0);return c[11503]|0},function(a){if(0==(u[2528]|0)&&0!=(Da(2528)|0)){if(0==(u[2536]|0)&&0!=(Da(2536)|0)){a=46828;do c[a>>2]=0,c[a+4>>2]=0,c[a+8>>2]=0,a=a+12|0;while(47116!=(a|0));Ea(197,0,Ga|0)|0;Ca(2536)}g=0;ma(41,46828,59250)|0;a=g;g=0;a&1||(g=0,ma(41,46840,59253)|0,a=g,g=0,a&1)?(a=J()|0,Hc(2528),V(a|0)):(c[11779]=46828,Ca(2528))}return c[11779]|0},function(c){0==(u[2592]|0)&&0!=(Da(2592)|0)&&(g=0,na(5,47556,
59274,20),c=g,g=0,c&1?(c=J()|0,Hc(2592),V(c|0)):(Ea(199,47556,Ga|0)|0,Ca(2592)));return 47556},function(c){0==(u[2608]|0)&&0!=(Da(2608)|0)&&(g=0,na(5,47664,59295,11),c=g,g=0,c&1?(c=J()|0,Hc(2608),V(c|0)):(Ea(199,47664,Ga|0)|0,Ca(2608)));return 47664},function(c){0==(u[2560]|0)&&0!=(Da(2560)|0)&&(g=0,na(5,47436,59256,8),c=g,g=0,c&1?(c=J()|0,Hc(2560),V(c|0)):(Ea(199,47436,Ga|0)|0,Ca(2560)));return 47436},function(c){0==(u[2576]|0)&&0!=(Da(2576)|0)&&(g=0,na(5,47496,59265,8),c=g,g=0,c&1?(c=J()|0,Hc(2576),
V(c|0)):(Ea(199,47496,Ga|0)|0,Ca(2576)));return 47496},function(c){return 2},function(a){if(0==(u[2480]|0)&&0!=(Da(2480)|0)){if(0==(u[2488]|0)&&0!=(Da(2488)|0)){a=45212;do c[a>>2]=0,c[a+4>>2]=0,c[a+8>>2]=0,a=a+12|0;while(45380!=(a|0));Ea(194,0,Ga|0)|0;Ca(2488)}g=0;ma(42,45212,45380)|0;a=g;g=0;a&1||(g=0,ma(42,45224,45408)|0,a=g,g=0,a&1)||(g=0,ma(42,45236,45436)|0,a=g,g=0,a&1)||(g=0,ma(42,45248,45468)|0,a=g,g=0,a&1)||(g=0,ma(42,45260,45508)|0,a=g,g=0,a&1)||(g=0,ma(42,45272,45544)|0,a=g,g=0,a&1)||(g=
0,ma(42,45284,45572)|0,a=g,g=0,a&1)||(g=0,ma(42,45296,45608)|0,a=g,g=0,a&1)||(g=0,ma(42,45308,45624)|0,a=g,g=0,a&1)||(g=0,ma(42,45320,45640)|0,a=g,g=0,a&1)||(g=0,ma(42,45332,45656)|0,a=g,g=0,a&1)||(g=0,ma(42,45344,45672)|0,a=g,g=0,a&1)||(g=0,ma(42,45356,45688)|0,a=g,g=0,a&1)||(g=0,ma(42,45368,45704)|0,a=g,g=0,a&1)?(a=J()|0,Hc(2480),V(a|0)):(c[11430]=45212,Ca(2480))}return c[11430]|0},function(a){a:do if(0==(u[2512]|0)&&0!=(Da(2512)|0)){if(0==(u[2520]|0)&&0!=(Da(2520)|0)){a=46016;do c[a>>2]=0,c[a+
4>>2]=0,c[a+8>>2]=0,a=a+12|0;while(46304!=(a|0));Ea(196,0,Ga|0)|0;Ca(2520)}g=0;ma(42,46016,46304)|0;a=g;g=0;do if(a&1||(g=0,ma(42,46028,46336)|0,a=g,g=0,a&1)||(g=0,ma(42,46040,46372)|0,a=g,g=0,a&1)||(g=0,ma(42,46052,46396)|0,a=g,g=0,a&1)||(g=0,ma(42,46064,46420)|0,a=g,g=0,a&1)||(g=0,ma(42,46076,46436)|0,a=g,g=0,a&1)||(g=0,ma(42,46088,46456)|0,a=g,g=0,a&1)||(g=0,ma(42,46100,46476)|0,a=g,g=0,a&1)||(g=0,ma(42,46112,46504)|0,a=g,g=0,a&1)||(g=0,ma(42,46124,46544)|0,a=g,g=0,a&1)||(g=0,ma(42,46136,46576)|
0,a=g,g=0,a&1)||(g=0,ma(42,46148,46612)|0,a=g,g=0,a&1)||(g=0,ma(42,46160,46648)|0,a=g,g=0,a&1)||(g=0,ma(42,46172,46664)|0,a=g,g=0,a&1)?0:(g=0,ma(42,46184,46680)|0,a=g,g=0,!(a&1)))if(g=0,ma(42,46196,46696)|0,a=g,g=0,!(a&1||(g=0,ma(42,46208,46420)|0,a=g,g=0,a&1||(g=0,ma(42,46220,46712)|0,a=g,g=0,a&1||(g=0,ma(42,46232,46728)|0,a=g,g=0,a&1||(g=0,ma(42,46244,46744)|0,a=g,g=0,a&1||(g=0,ma(42,46256,46760)|0,a=g,g=0,a&1||(g=0,ma(42,46268,46776)|0,a=g,g=0,a&1||(g=0,ma(42,46280,46792)|0,a=g,g=0,a&1||(g=0,ma(42,
46292,46808)|0,a=g,g=0,a&1)))))))))){c[11706]=46016;Ca(2512);break a}while(0);a=J()|0;Hc(2512);V(a|0)}while(0);return c[11706]|0},function(a){if(0==(u[2544]|0)&&0!=(Da(2544)|0)){if(0==(u[2552]|0)&&0!=(Da(2552)|0)){a=47120;do c[a>>2]=0,c[a+4>>2]=0,c[a+8>>2]=0,a=a+12|0;while(47408!=(a|0));Ea(198,0,Ga|0)|0;Ca(2552)}g=0;ma(42,47120,47408)|0;a=g;g=0;a&1||(g=0,ma(42,47132,47420)|0,a=g,g=0,a&1)?(a=J()|0,Hc(2544),V(a|0)):(c[11858]=47120,Ca(2544))}return c[11858]|0},function(c){var a=0;0==(u[2600]|0)&&0!=
(Da(2600)|0)&&(g=0,c=ca(76,47568)|0,a=g,g=0,a&1||(g=0,na(15,47652,47568,c|0),a=g,g=0,a&1)?(a=J()|0,Hc(2600),V(a|0)):(Ea(200,47652,Ga|0)|0,Ca(2600)));return 47652},function(c){var a=0;0==(u[2616]|0)&&0!=(Da(2616)|0)&&(g=0,c=ca(76,47676)|0,a=g,g=0,a&1||(g=0,na(15,47724,47676,c|0),a=g,g=0,a&1)?(a=J()|0,Hc(2616),V(a|0)):(Ea(200,47724,Ga|0)|0,Ca(2616)));return 47724},function(c){var a=0;0==(u[2568]|0)&&0!=(Da(2568)|0)&&(g=0,c=ca(76,47448)|0,a=g,g=0,a&1||(g=0,na(15,47484,47448,c|0),a=g,g=0,a&1)?(a=J()|
0,Hc(2568),V(a|0)):(Ea(200,47484,Ga|0)|0,Ca(2568)));return 47484},function(c){var a=0;0==(u[2584]|0)&&0!=(Da(2584)|0)&&(g=0,c=ca(76,47508)|0,a=g,g=0,a&1||(g=0,na(15,47544,47508,c|0),a=g,g=0,a&1)?(a=J()|0,Hc(2584),V(a|0)):(Ea(200,47544,Ga|0)|0,Ca(2584)));return 47544},function(c){return 127},function(c){return 127},function(c){return 0},function(c){return 127},function(c){return 127},function(c){return 0},function(c){return 2147483647},function(c){return 2147483647},function(c){return 0},function(c){return 2147483647},
function(c){return 2147483647},function(c){return 0},function(a){a|=0;var b=0,d=0,f=0,l=0,e=0,k=0,b=a+8|0;g=0;d=ca(75,c[b>>2]|0)|0;f=g;g=0;do if(f&1)l=16;else{g=0;f=La(35,0,0,4)|0;a=g;g=0;if(a&1){a=J(0)|0;if(!d)break;g=0;ca(75,d|0)|0;k=g;g=0;if(!(k&1))break;k=J(0)|0;h(k)}0!=(d|0)&&(g=0,ca(75,d|0)|0,k=g,g=0,k&1)&&(k=J(0)|0,h(k));if(f)e=-1;else if(a=c[b>>2]|0){g=0;a=ca(75,a|0)|0;k=g;g=0;if(k&1){l=16;break}0!=(a|0)&&(g=0,ca(75,a|0)|0,k=g,g=0,k&1)?(k=J(0)|0,h(k)):e=0}else e=1;return e|0}while(0);16==
(l|0)&&(a=J(0)|0);h(a);return 0},function(c){return 0},function(a){var b=0,d=0;(a=c[(a|0)+8>>2]|0)?(g=0,a=ca(75,a|0)|0,d=g,g=0,d&1&&(d=J(0)|0,h(d)),0!=(a|0)&&(g=0,ca(75,a|0)|0,d=g,g=0,d&1)?(d=J(0)|0,h(d)):b=4):b=1;return b|0},function(c){return u[(c|0)+8>>0]|0},function(c){return u[(c|0)+9>>0]|0},function(a){return c[(a|0)+8>>2]|0},function(a){return c[(a|0)+12>>2]|0},function(c){return 1},function(c){return 1},function(c){return 1},function(c){return 0},function(c){return 0},function(c){return 4},
function(c){return 0},function(c){return 0},function(c){return 4},function(a){a|=0;var b=0,d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,D=0,y=0,S=0,I=0,w=0,D=F;F=F+32|0;t=D+28|0;S=D+16|0;A=D+4|0;z=D;c[S>>2]=0;I=S+4|0;c[I>>2]=0;c[S+8>>2]=0;r=qa(5)|0;c[S>>2]=r;x=S+8|0;c[x>>2]=r+5;u[r>>0]=74;u[r+1>>0]=70;u[r+2>>0]=73;u[r+3>>0]=70;u[r+4>>0]=0;c[I>>2]=r+5;g=0;ga(84,S|0,c[a>>2]&65535|0);r=g;g=0;a:do if(r&1)y=43;else{n=c[a+4>>2]&255;b=c[I>>2]|0;f=c[x>>2]|0;if(b>>>0>=f>>>0){e=l=c[S>>2]|0;h=b-e+
1|0;if(0>(h|0)){g=0;ta(178,S|0);r=g;g=0;if(r&1){y=43;break}e=c[S>>2]|0;f=c[x>>2]|0;l=e}m=l;b=f-m|0;1073741823>b>>>0?(b<<=1,b=b>>>0<h>>>0?h:b,f=c[I>>2]|0,k=f-m|0,b?y=10:h=b=0):(k=c[I>>2]|0,b=2147483647,f=k,k=k-m|0,y=10);if(10==(y|0)&&(g=0,h=ca(67,b|0)|0,r=g,g=0,r&1)){y=43;break}u[h+k>>0]=n;q=f-m|0;r=h+(k-q)|0;gb(r|0,l|0,q|0)|0;c[S>>2]=r;c[I>>2]=h+(k+1);c[x>>2]=h+b;e&&Q(e)}else u[b>>0]=n,c[I>>2]=(c[I>>2]|0)+1;g=0;ga(84,S|0,c[a+8>>2]&65535|0);r=g;g=0;if(r&1||(g=0,ga(84,S|0,c[a+12>>2]&65535|0),r=g,g=
0,r&1))y=43;else{r=a+16|0;q=c[r>>2]&255;b=c[I>>2]|0;l=c[x>>2]|0;if(b>>>0>=l>>>0){f=e=c[S>>2]|0;h=b-f+1|0;if(0>(h|0)){g=0;ta(178,S|0);n=g;g=0;if(n&1){y=43;break}f=e=c[S>>2]|0;l=c[x>>2]|0}n=e;b=l-n|0;1073741823>b>>>0?(b<<=1,b=b>>>0<h>>>0?h:b,h=c[I>>2]|0,k=h-n|0,b?y=23:l=m=0):(k=c[I>>2]|0,b=2147483647,h=k,k=k-n|0,y=23);if(23==(y|0))if(g=0,l=ca(67,b|0)|0,m=g,g=0,m&1){y=43;break}else m=b;u[l+k>>0]=q;b=l+(k+1)|0;n=h-n|0;q=l+(k-n)|0;gb(q|0,e|0,n|0)|0;c[S>>2]=q;c[I>>2]=b;c[x>>2]=l+m;f&&(Q(f),b=c[I>>2]|0)}else u[b>>
0]=q,b=(c[I>>2]|0)+1|0,c[I>>2]=b;q=a+20|0;n=c[q>>2]&255;f=c[x>>2]|0;if(b>>>0>=f>>>0){e=l=c[S>>2]|0;h=b-e+1|0;if(0>(h|0)){g=0;ta(178,S|0);m=g;g=0;if(m&1){y=43;break}e=c[S>>2]|0;f=c[x>>2]|0;l=e}m=l;b=f-m|0;1073741823>b>>>0?(b<<=1,b=b>>>0<h>>>0?h:b,f=c[I>>2]|0,k=f-m|0,b?y=34:h=b=0):(k=c[I>>2]|0,b=2147483647,f=k,k=k-m|0,y=34);if(34==(y|0)&&(g=0,h=ca(67,b|0)|0,w=g,g=0,w&1)){y=43;break}u[h+k>>0]=n;n=f-m|0;w=h+(k-n)|0;gb(w|0,l|0,n|0)|0;c[S>>2]=w;c[I>>2]=h+(k+1);c[x>>2]=h+b;e&&Q(e)}else u[b>>0]=n,c[I>>2]=
(c[I>>2]|0)+1;b=c[r>>2]|0;do if(0<(b|0)){if(!(c[a+24>>2]|0))if(c[z>>2]=c[I>>2],w=0+(ia(3*b|0,c[q>>2]|0)|0)|0,g=0,c[t>>2]=c[z>>2],fb(15,S|0,t|0,0,w|0)|0,w=g,g=0,w&1){y=43;break a}else break;f=xa(16)|0;g=0;na(5,A|0,50792,57);w=g;g=0;if(w&1)b=J()|0;else if(g=0,b=Va(1)|0,w=g,g=0,w&1||(g=0,pa(36,f|0,1,b|0,A|0),w=g,g=0,w&1)?d=1:(g=0,na(6,f|0,824,96),d=g=0),b=J()|0,W(A),!d){d=b;break a}za(f|0);d=b;break a}while(0);g=0;k=ca(67,20)|0;w=g;g=0;if(w&1)y=43;else{c[k>>2]=36800;u[k+4>>0]=-32;e=k+8|0;c[e>>2]=0;h=
k+12|0;c[h>>2]=0;f=k+16|0;c[f>>2]=0;b=c[I>>2]|0;w=c[S>>2]|0;l=b-w|0;do if((b|0)!=(w|0))if(0>(l|0)&&(g=0,ta(178,e|0),w=g,g=0,w&1)||(y=53),53!=(y|0)||(g=0,d=ca(67,l|0)|0,w=g,g=0,w&1)){b=J()|0;if(d=c[e>>2]|0)(c[h>>2]|0)!=(d|0)&&(c[h>>2]=d),Q(d);Q(k);y=44;break a}else if(c[h>>2]=d,c[e>>2]=d,c[f>>2]=d+l,b=c[S>>2]|0,f=c[I>>2]|0,(b|0)!=(f|0)){do u[d>>0]=u[b>>0]|0,d=(c[h>>2]|0)+1|0,c[h>>2]=d,b=b+1|0;while((b|0)!=(f|0));b=c[S>>2]|0}while(0);if(!b)return F=D,k|0;(c[I>>2]|0)!=(b|0)&&(c[I>>2]=b);Q(b);F=D;return k|
0}}}while(0);43==(y|0)&&(b=J()|0,y=44);44==(y|0)&&(d=b);(b=c[S>>2]|0)||V(d|0);(c[I>>2]|0)!=(b|0)&&(c[I>>2]=b);Q(b);V(d|0);return 0},qa,Lb,tb,Kg,Mg,function(c){return Ag(c|0)|0},function(c){return zg(c|0)|0},function(c){return ri(c|0)|0},md,Jf,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa,Xa],yi=[Yg,function(a,b,d,f,l,e,k,m,n,q,r){a|=0;b|=0;f|=0;l|=0;e|=0;k|=0;m|=0;n|=0;q|=0;var x=0,t=0,z=0,A=0,
y=0,w=0,D=0,S=0,I=0,L=0,E=0,B=0,O=0,G=0,M=0,P=0,Y=0,la=0,U=0,ja=0,N=0,ka=0,va=0,da=0,aa=0,Z=0,X=0,wa=0,fa=0,Ba=0,Ia=0,Q=0,ha=0,Ua=0,ba=0,Ra=0,lb=0,ab=0,nb=0,ia=0,ma=0,nb=F;F=F+512|0;aa=nb+88|0;A=nb+96|0;ma=nb+80|0;fa=nb+72|0;wa=nb+68|0;Ba=nb+500|0;Z=nb+497|0;Ia=nb+496|0;Ua=nb+56|0;ab=nb+44|0;Ra=nb+32|0;ba=nb+20|0;lb=nb+8|0;X=nb+4|0;ha=nb;c[aa>>2]=r|0;c[ma>>2]=A;ia=ma+4|0;c[ia>>2]=189;c[fa>>2]=A;c[wa>>2]=A+400;c[Ua>>2]=0;c[Ua+4>>2]=0;c[Ua+8>>2]=0;c[ab>>2]=0;c[ab+4>>2]=0;c[ab+8>>2]=0;c[Ra>>2]=0;c[Ra+
4>>2]=0;c[Ra+8>>2]=0;c[ba>>2]=0;c[ba+4>>2]=0;c[ba+8>>2]=0;c[lb>>2]=0;c[lb+4>>2]=0;g=c[lb+8>>2]=0;Te(1,d|0,f|0,Ba|0,Z|0,Ia|0,Ua|0,ab|0,Ra|0,ba|0,X|0);da=g;g=0;a:do if(da&1)m=J()|0;else{c[q>>2]=c[n>>2];la=m+8|0;U=Ra+4|0;ja=ba+4|0;N=ba+8|0;ka=ba+1|0;va=Ra+8|0;da=Ra+1|0;I=0!=(l&512|0);L=ab+8|0;E=ab+1|0;B=ab+4|0;O=lb+4|0;G=lb+8|0;M=lb+1|0;P=Ba+3|0;Y=Ua+4|0;z=S=0;b:for(;;){r=c[a>>2]|0;do if(r){if((c[r+12>>2]|0)==(c[r+16>>2]|0)){g=0;r=ca(c[(c[r>>2]|0)+36>>2]|0,r|0)|0;D=g;g=0;if(D&1){Q=24;break b}r=-1==(r|
0)?c[a>>2]=0:c[a>>2]|0}}else r=0;while(0);r=0==(r|0);m=c[b>>2]|0;do if(m){if((c[m+12>>2]|0)!=(c[m+16>>2]|0))if(r){D=m;break}else{Q=235;break b}g=0;d=ca(c[(c[m>>2]|0)+36>>2]|0,m|0)|0;D=g;g=0;if(D&1){Q=24;break b}if(-1!=(d|0))if(r)D=m;else{Q=235;break b}else c[b>>2]=0,Q=15}else Q=15;while(0);if(15==(Q|0))if(Q=0,r){Q=235;break}else D=0;c:do switch(u[Ba+S>>0]|0){case 1:if(3!=(S|0)){r=c[a>>2]|0;m=c[r+12>>2]|0;if((m|0)==(c[r+16>>2]|0)){if(g=0,r=ca(c[(c[r>>2]|0)+36>>2]|0,r|0)|0,Q=g,g=0,Q&1){Q=24;break b}}else r=
ea[m>>0]|0;if(-1>=(r&255)<<24>>24){Q=40;break b}if(!(R[(c[la>>2]|0)+(r<<24>>24<<1)>>1]&8192)){Q=40;break b}r=c[a>>2]|0;m=r+12|0;d=c[m>>2]|0;if((d|0)==(c[r+16>>2]|0)){if(g=0,r=ca(c[(c[r>>2]|0)+40>>2]|0,r|0)|0,Q=g,g=0,Q&1){Q=24;break b}}else c[m>>2]=d+1,r=ea[d>>0]|0;g=0;ga(67,lb|0,r&255|0);Q=g;g=0;if(Q&1){Q=24;break b}else f=r=D,Q=42}break;case 0:3!=(S|0)&&(f=r=D,Q=42);break;case 3:m=u[Ra>>0]|0;r=0==(m&1)?(m&255)>>>1:c[U>>2]|0;d=u[ba>>0]|0;f=0==(d&1)?(d&255)>>>1:c[ja>>2]|0;if((r|0)!=(0-f|0)){if(!r){r=
c[a>>2]|0;m=c[r+12>>2]|0;if((m|0)==(c[r+16>>2]|0)){g=0;r=ca(c[(c[r>>2]|0)+36>>2]|0,r|0)|0;D=g;g=0;if(D&1){Q=24;break b}m=u[ba>>0]|0}else r=ea[m>>0]|0,m=d;if((r&255)<<24>>24!=(u[(0==(m&1)?ka:c[N>>2]|0)>>0]|0))break c;r=c[a>>2]|0;m=r+12|0;d=c[m>>2]|0;if((d|0)==(c[r+16>>2]|0)){if(g=0,ca(c[(c[r>>2]|0)+40>>2]|0,r|0)|0,D=g,g=0,D&1){Q=24;break b}}else c[m>>2]=d+1;u[k>>0]=1;D=u[ba>>0]|0;z=1<(0==(D&1)?(D&255)>>>1:c[ja>>2]|0)>>>0?ba:z;break c}l=c[a>>2]|0;x=c[l+12>>2]|0;d=c[l+16>>2]|0;r=(x|0)==(d|0);if(!f){if(r){g=
0;r=ca(c[(c[l>>2]|0)+36>>2]|0,l|0)|0;D=g;g=0;if(D&1){Q=24;break b}m=u[Ra>>0]|0}else r=ea[x>>0]|0;if((r&255)<<24>>24!=(u[(0==(m&1)?da:c[va>>2]|0)>>0]|0)){u[k>>0]=1;break c}r=c[a>>2]|0;m=r+12|0;d=c[m>>2]|0;if((d|0)==(c[r+16>>2]|0)){if(g=0,ca(c[(c[r>>2]|0)+40>>2]|0,r|0)|0,D=g,g=0,D&1){Q=24;break b}}else c[m>>2]=d+1;D=u[Ra>>0]|0;z=1<(0==(D&1)?(D&255)>>>1:c[U>>2]|0)>>>0?Ra:z;break c}if(r){g=0;r=ca(c[(c[l>>2]|0)+36>>2]|0,l|0)|0;D=g;g=0;if(D&1){Q=24;break b}d=c[a>>2]|0;m=u[Ra>>0]|0;l=d;x=c[d+12>>2]|0;d=
c[d+16>>2]|0}else r=ea[x>>0]|0;f=l+12|0;d=(x|0)==(d|0);if((r&255)<<24>>24==(u[(0==(m&1)?da:c[va>>2]|0)>>0]|0)){if(d){if(g=0,ca(c[(c[l>>2]|0)+40>>2]|0,l|0)|0,D=g,g=0,D&1){Q=24;break b}}else c[f>>2]=x+1;D=u[Ra>>0]|0;z=1<(0==(D&1)?(D&255)>>>1:c[U>>2]|0)>>>0?Ra:z;break c}if(d){if(g=0,r=ca(c[(c[l>>2]|0)+36>>2]|0,l|0)|0,D=g,g=0,D&1){Q=24;break b}}else r=ea[x>>0]|0;if((r&255)<<24>>24!=(u[(0==(u[ba>>0]&1)?ka:c[N>>2]|0)>>0]|0)){Q=104;break b}r=c[a>>2]|0;m=r+12|0;d=c[m>>2]|0;if((d|0)==(c[r+16>>2]|0)){if(g=
0,ca(c[(c[r>>2]|0)+40>>2]|0,r|0)|0,D=g,g=0,D&1){Q=24;break b}}else c[m>>2]=d+1;u[k>>0]=1;D=u[ba>>0]|0;z=1<(0==(D&1)?(D&255)>>>1:c[ja>>2]|0)>>>0?ba:z}break;case 2:if(2>S>>>0|0!=(z|0)?0:!(I|2==(S|0)&0!=(u[P>>0]|0))){z=0;break c}y=u[ab>>0]|0;r=0==(y&1);w=c[L>>2]|0;t=d=r?E:w;d:do if(0!=(S|0)&&2>(ea[Ba+(S+-1)>>0]|0)){x=r?(y&255)>>>1:c[B>>2]|0;f=d+x|0;l=c[la>>2]|0;e:do if(x){x=d;m=t;do{r=u[x>>0]|0;if(-1>=r<<24>>24)break e;if(!(R[l+(r<<24>>24<<1)>>1]&8192))break e;m=x=x+1|0}while((x|0)!=(f|0))}else m=t;
while(0);f=m-t|0;l=u[lb>>0]|0;l=(r=0==(l&1))?(l&255)>>>1:c[O>>2]|0;if(l>>>0>=f>>>0){if(r=r?M:c[G>>2]|0,x=r+l|0,(m|0)!=(t|0))for(r=r+(l-f)|0;;){if((u[r>>0]|0)!=(u[d>>0]|0)){m=t;break d}r=r+1|0;if((r|0)==(x|0))break;else d=d+1|0}}else m=t}else m=t;while(0);r=0==(y&1);r=(r?E:w)+(r?(y&255)>>>1:c[B>>2]|0)|0;d:do if((m|0)!=(r|0))for(f=l=D,r=m;;){m=c[a>>2]|0;do if(m){if((c[m+12>>2]|0)==(c[m+16>>2]|0)){g=0;m=ca(c[(c[m>>2]|0)+36>>2]|0,m|0)|0;D=g;g=0;if(D&1){Q=21;break b}m=-1==(m|0)?c[a>>2]=0:c[a>>2]|0}}else m=
0;while(0);d=0==(m|0);do if(f){if((c[f+12>>2]|0)!=(c[f+16>>2]|0))if(d){m=l;x=f;break}else break d;g=0;m=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0;D=g;g=0;if(D&1){Q=21;break b}if(-1!=(m|0))if(d^0==(l|0))x=m=l;else break d;else m=c[b>>2]=0,Q=131}else m=l,Q=131;while(0);if(131==(Q|0))if(Q=0,d)break d;else x=0;d=c[a>>2]|0;f=c[d+12>>2]|0;if((f|0)==(c[d+16>>2]|0)){if(g=0,d=ca(c[(c[d>>2]|0)+36>>2]|0,d|0)|0,D=g,g=0,D&1){Q=21;break b}}else d=ea[f>>0]|0;if((d&255)<<24>>24!=(u[r>>0]|0))break d;d=c[a>>2]|0;f=d+12|0;l=
c[f>>2]|0;if((l|0)==(c[d+16>>2]|0)){if(g=0,ca(c[(c[d>>2]|0)+40>>2]|0,d|0)|0,D=g,g=0,D&1){Q=21;break b}}else c[f>>2]=l+1;r=r+1|0;d=u[ab>>0]|0;D=0==(d&1);d=(D?E:c[L>>2]|0)+(D?(d&255)>>>1:c[B>>2]|0)|0;if((r|0)==(d|0)){r=d;break}else l=m,f=x}while(0);if(I&&(D=u[ab>>0]|0,w=0==(D&1),(r|0)!=((w?E:c[L>>2]|0)+(w?(D&255)>>>1:c[B>>2]|0)|0))){Q=143;break b}break;case 4:t=u[Ia>>0]|0;l=m=D;r=0;d:for(;;){d=c[a>>2]|0;do if(d){if((c[d+12>>2]|0)==(c[d+16>>2]|0)){g=0;d=ca(c[(c[d>>2]|0)+36>>2]|0,d|0)|0;D=g;g=0;if(D&
1){Q=23;break b}d=-1==(d|0)?c[a>>2]=0:c[a>>2]|0}}else d=0;while(0);f=0==(d|0);do if(l){if((c[l+12>>2]|0)!=(c[l+16>>2]|0))if(f){x=m;break}else{f=m;break d}g=0;d=ca(c[(c[l>>2]|0)+36>>2]|0,l|0)|0;D=g;g=0;if(D&1){Q=23;break b}if(-1!=(d|0))if(f^0==(m|0))l=x=m;else{f=m;break d}else m=c[b>>2]=0,Q=156}else Q=156;while(0);if(156==(Q|0))if(Q=0,f){f=m;break}else x=m,l=0;m=c[a>>2]|0;d=c[m+12>>2]|0;if((d|0)==(c[m+16>>2]|0)){if(g=0,m=ca(c[(c[m>>2]|0)+36>>2]|0,m|0)|0,D=g,g=0,D&1){Q=23;break b}}else m=ea[d>>0]|0;
d=m&255;if(-1<d<<24>>24&&0!=(R[(c[la>>2]|0)+(m<<24>>24<<1)>>1]&2048)){m=c[q>>2]|0;if((m|0)==(c[aa>>2]|0)){g=0;na(12,n|0,q|0,aa|0);D=g;g=0;if(D&1){Q=23;break b}m=c[q>>2]|0}c[q>>2]=m+1;u[m>>0]=d;r=r+1|0}else{D=u[Ua>>0]|0;if(!(d<<24>>24==t<<24>>24&(0!=(r|0)?0!=((0==(D&1)?(D&255)>>>1:c[Y>>2]|0)|0):0))){f=x;break}if((A|0)==(c[wa>>2]|0)){g=0;na(13,ma|0,fa|0,wa|0);D=g;g=0;if(D&1){Q=23;break b}A=c[fa>>2]|0}D=A+4|0;c[fa>>2]=D;c[A>>2]=r;A=D;r=0}m=c[a>>2]|0;d=m+12|0;f=c[d>>2]|0;if((f|0)==(c[m+16>>2]|0))if(g=
0,ca(c[(c[m>>2]|0)+40>>2]|0,m|0)|0,D=g,g=0,D&1){Q=23;break b}else m=x;else c[d>>2]=f+1,m=x}if(0!=(r|0)&&(c[ma>>2]|0)!=(A|0)){if((A|0)==(c[wa>>2]|0)){g=0;na(13,ma|0,fa|0,wa|0);D=g;g=0;if(D&1){Q=24;break b}A=c[fa>>2]|0}D=A+4|0;c[fa>>2]=D;c[A>>2]=r;A=D}x=c[X>>2]|0;if(0<(x|0)){r=c[a>>2]|0;do if(r){if((c[r+12>>2]|0)==(c[r+16>>2]|0)){g=0;r=ca(c[(c[r>>2]|0)+36>>2]|0,r|0)|0;D=g;g=0;if(D&1){Q=24;break b}r=-1==(r|0)?c[a>>2]=0:c[a>>2]|0}}else r=0;while(0);r=0==(r|0);do if(f){if((c[f+12>>2]|0)==(c[f+16>>2]|0)){g=
0;m=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0;D=g;g=0;if(D&1){Q=24;break b}if(-1==(m|0)){c[b>>2]=0;Q=193;break}}if(!r){Q=198;break b}}else Q=193;while(0);if(193==(Q|0))if(Q=0,r){Q=198;break b}else f=0;r=c[a>>2]|0;m=c[r+12>>2]|0;if((m|0)==(c[r+16>>2]|0)){if(g=0,r=ca(c[(c[r>>2]|0)+36>>2]|0,r|0)|0,D=g,g=0,D&1){Q=24;break b}}else r=ea[m>>0]|0;if((r&255)<<24>>24!=(u[Z>>0]|0)){Q=198;break b}r=c[a>>2]|0;m=r+12|0;d=c[m>>2]|0;if((d|0)==(c[r+16>>2]|0)){if(g=0,ca(c[(c[r>>2]|0)+40>>2]|0,r|0)|0,D=g,g=0,D&1){Q=24;break b}}else c[m>>
2]=d+1;if(0<(x|0))for(d=l=f,t=x;;){r=c[a>>2]|0;do if(r){if((c[r+12>>2]|0)==(c[r+16>>2]|0)){g=0;r=ca(c[(c[r>>2]|0)+36>>2]|0,r|0)|0;D=g;g=0;if(D&1){Q=22;break b}r=-1==(r|0)?c[a>>2]=0:c[a>>2]|0}}else r=0;while(0);m=0==(r|0);do if(d){if((c[d+12>>2]|0)!=(c[d+16>>2]|0))if(m){r=l;x=d;break}else{Q=222;break b}g=0;r=ca(c[(c[d>>2]|0)+36>>2]|0,d|0)|0;D=g;g=0;if(D&1){Q=22;break b}if(-1!=(r|0))if(m^0==(l|0))x=r=l;else{Q=222;break b}else r=c[b>>2]=0,Q=215}else r=l,Q=215;while(0);if(215==(Q|0))if(Q=0,m){Q=222;break b}else x=
0;m=c[a>>2]|0;d=c[m+12>>2]|0;if((d|0)==(c[m+16>>2]|0)){if(g=0,m=ca(c[(c[m>>2]|0)+36>>2]|0,m|0)|0,D=g,g=0,D&1){Q=22;break b}}else m=ea[d>>0]|0;if(-1>=(m&255)<<24>>24){Q=222;break b}if(!(R[(c[la>>2]|0)+(m<<24>>24<<1)>>1]&2048)){Q=222;break b}if((c[q>>2]|0)==(c[aa>>2]|0)&&(g=0,na(12,n|0,q|0,aa|0),D=g,g=0,D&1)){Q=22;break b}m=c[a>>2]|0;d=c[m+12>>2]|0;if((d|0)==(c[m+16>>2]|0)){if(g=0,m=ca(c[(c[m>>2]|0)+36>>2]|0,m|0)|0,D=g,g=0,D&1){Q=22;break b}}else m=ea[d>>0]|0;d=c[q>>2]|0;c[q>>2]=d+1;u[d>>0]=m;m=t;t=
t+-1|0;c[X>>2]=t;d=c[a>>2]|0;f=d+12|0;l=c[f>>2]|0;if((l|0)==(c[d+16>>2]|0)){if(g=0,ca(c[(c[d>>2]|0)+40>>2]|0,d|0)|0,D=g,g=0,D&1){Q=22;break b}}else c[f>>2]=l+1;if(1>=(m|0))break;else l=r,d=x}}if((c[q>>2]|0)==(c[n>>2]|0)){Q=233;break b}}while(0);c:do if(42==(Q|0))for(;;){Q=0;m=c[a>>2]|0;do if(m){if((c[m+12>>2]|0)==(c[m+16>>2]|0)){g=0;m=ca(c[(c[m>>2]|0)+36>>2]|0,m|0)|0;D=g;g=0;if(D&1){Q=20;break b}m=-1==(m|0)?c[a>>2]=0:c[a>>2]|0}}else m=0;while(0);d=0==(m|0);do if(f){if((c[f+12>>2]|0)!=(c[f+16>>2]|
0))if(d){l=r;break}else break c;g=0;m=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0;D=g;g=0;if(D&1){Q=20;break b}if(-1!=(m|0))if(d^0==(r|0))f=l=r;else break c;else r=c[b>>2]=0,Q=54}else Q=54;while(0);if(54==(Q|0))if(Q=0,d)break c;else l=r,f=0;r=c[a>>2]|0;m=c[r+12>>2]|0;if((m|0)==(c[r+16>>2]|0)){if(g=0,r=ca(c[(c[r>>2]|0)+36>>2]|0,r|0)|0,D=g,g=0,D&1){Q=20;break b}}else r=ea[m>>0]|0;if(-1>=(r&255)<<24>>24)break c;if(!(R[(c[la>>2]|0)+(r<<24>>24<<1)>>1]&8192))break c;r=c[a>>2]|0;m=r+12|0;d=c[m>>2]|0;if((d|0)==(c[r+
16>>2]|0)){if(g=0,r=ca(c[(c[r>>2]|0)+40>>2]|0,r|0)|0,Q=g,g=0,Q&1){Q=20;break b}}else c[m>>2]=d+1,r=ea[d>>0]|0;g=0;ga(67,lb|0,r&255|0);Q=g;g=0;if(Q&1){Q=20;break b}else r=l}while(0);S=S+1|0;if(4<=S>>>0){Q=235;break}}b:switch(Q|0){case 20:m=J()|0;break a;case 21:m=J()|0;break a;case 22:m=J()|0;break a;case 23:m=J()|0;break a;case 24:m=J()|0;break a;case 40:c[e>>2]|=4;m=0;break;case 104:c[e>>2]|=4;m=0;break;case 143:c[e>>2]|=4;m=0;break;case 198:c[e>>2]|=4;m=0;break;case 222:c[e>>2]|=4;m=0;break;case 233:c[e>>
2]|=4;m=0;break;case 235:c:do if(z){l=z+1|0;x=z+8|0;t=z+4|0;d=1;d:for(;;){r=u[z>>0]|0;r=r&1?c[t>>2]|0:(r&255)>>>1;if(d>>>0>=r>>>0)break c;r=c[a>>2]|0;do if(r){if((c[r+12>>2]|0)==(c[r+16>>2]|0)){g=0;r=ca(c[(c[r>>2]|0)+36>>2]|0,r|0)|0;q=g;g=0;if(q&1){Q=19;break d}r=-1==(r|0)?c[a>>2]=0:c[a>>2]|0}}else r=0;while(0);m=0==(r|0);r=c[b>>2]|0;do if(r){if((c[r+12>>2]|0)==(c[r+16>>2]|0)){g=0;r=ca(c[(c[r>>2]|0)+36>>2]|0,r|0)|0;q=g;g=0;if(q&1){Q=19;break d}if(-1==(r|0)){c[b>>2]=0;Q=253;break}}if(!m){Q=260;break d}}else Q=
253;while(0);if(253==(Q|0)&&(Q=0,m)){Q=260;break}r=c[a>>2]|0;m=c[r+12>>2]|0;if((m|0)==(c[r+16>>2]|0)){if(g=0,r=ca(c[(c[r>>2]|0)+36>>2]|0,r|0)|0,q=g,g=0,q&1){Q=19;break}}else r=ea[m>>0]|0;m=u[z>>0]&1?c[x>>2]|0:l;if((r&255)<<24>>24!=(u[m+d>>0]|0)){Q=260;break}r=d+1|0;m=c[a>>2]|0;d=m+12|0;f=c[d>>2]|0;if((f|0)==(c[m+16>>2]|0))if(g=0,ca(c[(c[m>>2]|0)+40>>2]|0,m|0)|0,q=g,g=0,q&1){Q=19;break}else d=r;else c[d>>2]=f+1,d=r}if(19==(Q|0)){m=J()|0;break a}else if(260==(Q|0)){c[e>>2]|=4;m=0;break b}}while(0);
r=c[ma>>2]|0;(r|0)!=(A|0)&&(c[ha>>2]=0,rc(Ua,r,A,ha),0!=(c[ha>>2]|0))?(c[e>>2]|=4,m=0):m=1}W(lb);W(ba);W(Ra);W(ab);W(Ua);r=c[ma>>2]|0;c[ma>>2]=0;0!=(r|0)&&(g=0,ta(c[ia>>2]|0,r|0),ma=g,g=0,ma&1)&&(ma=J(0)|0,h(ma));F=nb;return m|0}while(0);W(lb);W(ba);W(Ra);W(ab);W(Ua);r=c[ma>>2]|0;c[ma>>2]=0;0!=(r|0)&&(g=0,ta(c[ia>>2]|0,r|0),ma=g,g=0,ma&1)&&(ma=J(0)|0,h(ma));V(m|0);return 0},function(a,b,d,f,l,e,k,m,n,q,r){a|=0;b|=0;l|=0;e|=0;k|=0;m|=0;n|=0;q|=0;var x=0,t=0,z=0,A=0,D=0,y=0,w=0,S=0,I=0,L=0,E=0,B=0,
O=0,G=0,M=0,P=0,Y=0,la=0,U=0,ja=0,N=0,ka=0,R=0,va=0,da=0,aa=0,Z=0,Q=0,X=0,wa=0,fa=0,Ba=0,Ia=0,ha=0,ba=0,Ua=0,Ra=0,ba=F;F=F+512|0;N=ba+96|0;x=ba+104|0;Ra=ba+88|0;da=ba+80|0;va=ba+76|0;aa=ba+504|0;ka=ba+72|0;Z=ba+68|0;wa=ba+56|0;ha=ba+44|0;Ba=ba+32|0;fa=ba+20|0;Ia=ba+8|0;R=ba+4|0;X=ba;c[N>>2]=r|0;c[Ra>>2]=x;Ua=Ra+4|0;c[Ua>>2]=189;c[da>>2]=x;c[va>>2]=x+400;c[wa>>2]=0;c[wa+4>>2]=0;c[wa+8>>2]=0;c[ha>>2]=0;c[ha+4>>2]=0;c[ha+8>>2]=0;c[Ba>>2]=0;c[Ba+4>>2]=0;c[Ba+8>>2]=0;c[fa>>2]=0;c[fa+4>>2]=0;c[fa+8>>2]=
0;c[Ia>>2]=0;c[Ia+4>>2]=0;g=c[Ia+8>>2]=0;Te(2,d|0,f|0,aa|0,ka|0,Z|0,wa|0,ha|0,Ba|0,fa|0,R|0);ja=g;g=0;a:do if(ja&1)d=J()|0;else{c[q>>2]=c[n>>2];Y=Ba+4|0;la=fa+4|0;U=fa+8|0;ja=Ba+8|0;L=0!=(l&512|0);E=ha+8|0;B=ha+4|0;O=Ia+4|0;G=Ia+8|0;M=aa+3|0;P=wa+4|0;z=I=0;b:for(;;){r=c[a>>2]|0;do if(r){d=c[r+12>>2]|0;if((d|0)==(c[r+16>>2]|0)){if(g=0,r=ca(c[(c[r>>2]|0)+36>>2]|0,r|0)|0,S=g,g=0,S&1){Q=26;break b}}else r=c[d>>2]|0;-1==(r|0)?(c[a>>2]=0,f=1):f=0==(c[a>>2]|0)}else f=1;while(0);d=c[b>>2]|0;do if(d){r=c[d+
12>>2]|0;if((r|0)==(c[d+16>>2]|0)){if(g=0,r=ca(c[(c[d>>2]|0)+36>>2]|0,d|0)|0,S=g,g=0,S&1){Q=26;break b}}else r=c[r>>2]|0;if(-1!=(r|0))if(f)S=d;else{A=x;Q=244;break b}else c[b>>2]=0,Q=16}else Q=16;while(0);if(16==(Q|0))if(Q=0,f){A=x;Q=244;break}else S=0;c:do switch(u[aa+I>>0]|0){case 1:if(3!=(I|0)){r=c[a>>2]|0;d=c[r+12>>2]|0;if((d|0)==(c[r+16>>2]|0)){if(g=0,r=ca(c[(c[r>>2]|0)+36>>2]|0,r|0)|0,Q=g,g=0,Q&1){Q=26;break b}}else r=c[d>>2]|0;g=0;r=La(c[(c[m>>2]|0)+12>>2]|0,m|0,8192,r|0)|0;Q=g;g=0;if(Q&1){Q=
26;break b}if(!r){Q=42;break b}r=c[a>>2]|0;d=r+12|0;f=c[d>>2]|0;if((f|0)==(c[r+16>>2]|0)){if(g=0,r=ca(c[(c[r>>2]|0)+40>>2]|0,r|0)|0,Q=g,g=0,Q&1){Q=26;break b}}else c[d>>2]=f+4,r=c[f>>2]|0;g=0;ga(92,Ia|0,r|0);Q=g;g=0;if(Q&1){Q=26;break b}else l=r=S,Q=44}else r=x;break;case 0:3==(I|0)?r=x:(l=r=S,Q=44);break;case 3:d=u[Ba>>0]|0;r=0==(d&1)?(d&255)>>>1:c[Y>>2]|0;f=u[fa>>0]|0;l=0==(f&1)?(f&255)>>>1:c[la>>2]|0;if((r|0)==(0-l|0))r=x;else{if(!r){r=c[a>>2]|0;d=c[r+12>>2]|0;if((d|0)==(c[r+16>>2]|0)){g=0;r=ca(c[(c[r>>
2]|0)+36>>2]|0,r|0)|0;S=g;g=0;if(S&1){Q=26;break b}d=u[fa>>0]|0}else r=c[d>>2]|0,d=f;if((r|0)!=(c[(0==(d&1)?la:c[U>>2]|0)>>2]|0)){r=x;break c}r=c[a>>2]|0;d=r+12|0;f=c[d>>2]|0;if((f|0)==(c[r+16>>2]|0)){if(g=0,ca(c[(c[r>>2]|0)+40>>2]|0,r|0)|0,S=g,g=0,S&1){Q=26;break b}}else c[d>>2]=f+4;u[k>>0]=1;S=u[fa>>0]|0;r=x;z=1<(0==(S&1)?(S&255)>>>1:c[la>>2]|0)>>>0?fa:z;break c}t=c[a>>2]|0;A=c[t+12>>2]|0;f=c[t+16>>2]|0;r=(A|0)==(f|0);if(!l){if(r){g=0;r=ca(c[(c[t>>2]|0)+36>>2]|0,t|0)|0;S=g;g=0;if(S&1){Q=26;break b}d=
u[Ba>>0]|0}else r=c[A>>2]|0;if((r|0)!=(c[(0==(d&1)?Y:c[ja>>2]|0)>>2]|0)){u[k>>0]=1;r=x;break c}r=c[a>>2]|0;d=r+12|0;f=c[d>>2]|0;if((f|0)==(c[r+16>>2]|0)){if(g=0,ca(c[(c[r>>2]|0)+40>>2]|0,r|0)|0,S=g,g=0,S&1){Q=26;break b}}else c[d>>2]=f+4;S=u[Ba>>0]|0;r=x;z=1<(0==(S&1)?(S&255)>>>1:c[Y>>2]|0)>>>0?Ba:z;break c}if(r){g=0;r=ca(c[(c[t>>2]|0)+36>>2]|0,t|0)|0;S=g;g=0;if(S&1){Q=26;break b}f=c[a>>2]|0;d=u[Ba>>0]|0;t=f;A=c[f+12>>2]|0;f=c[f+16>>2]|0}else r=c[A>>2]|0;l=t+12|0;f=(A|0)==(f|0);if((r|0)==(c[(0==(d&
1)?Y:c[ja>>2]|0)>>2]|0)){if(f){if(g=0,ca(c[(c[t>>2]|0)+40>>2]|0,t|0)|0,S=g,g=0,S&1){Q=26;break b}}else c[l>>2]=A+4;S=u[Ba>>0]|0;r=x;z=1<(0==(S&1)?(S&255)>>>1:c[Y>>2]|0)>>>0?Ba:z;break c}if(f){if(g=0,r=ca(c[(c[t>>2]|0)+36>>2]|0,t|0)|0,S=g,g=0,S&1){Q=26;break b}}else r=c[A>>2]|0;if((r|0)!=(c[(0==(u[fa>>0]&1)?la:c[U>>2]|0)>>2]|0)){Q=107;break b}r=c[a>>2]|0;d=r+12|0;f=c[d>>2]|0;if((f|0)==(c[r+16>>2]|0)){if(g=0,ca(c[(c[r>>2]|0)+40>>2]|0,r|0)|0,S=g,g=0,S&1){Q=26;break b}}else c[d>>2]=f+4;u[k>>0]=1;S=u[fa>>
0]|0;r=x;z=1<(0==(S&1)?(S&255)>>>1:c[la>>2]|0)>>>0?fa:z}break;case 2:if(2>I>>>0|0!=(z|0)?0:!(L|2==(I|0)&0!=(u[M>>0]|0))){r=x;z=0;break c}l=u[ha>>0]|0;f=c[E>>2]|0;r=d=0==(l&1)?B:f;d:do if(0!=(I|0)&&2>(ea[aa+(I+-1)>>0]|0)){w=0==(l&1);e:do if((d|0)!=((w?B:f)+((w?(l&255)>>>1:c[B>>2]|0)<<2)|0)){for(l=d;;){g=0;d=La(c[(c[m>>2]|0)+12>>2]|0,m|0,8192,c[l>>2]|0)|0;w=g;g=0;if(w&1){Q=23;break b}if(!d)break;r=l=l+4|0;d=u[ha>>0]|0;f=c[E>>2]|0;w=0==(d&1);if((l|0)==((w?B:f)+((w?(d&255)>>>1:c[B>>2]|0)<<2)|0)){l=d;
break e}}l=u[ha>>0]|0;f=c[E>>2]|0}while(0);d=A=0==(l&1)?B:f;D=r-d>>2;y=u[Ia>>0]|0;y=(t=0==(y&1))?(y&255)>>>1:c[O>>2]|0;if(y>>>0>=D>>>0)if(t=t?O:c[G>>2]|0,w=t+(y<<2)|0,D)for(t=t+(y-D<<2)|0;;){if((c[t>>2]|0)!=(c[A>>2]|0))break d;t=t+4|0;if((t|0)==(w|0)){d=r;break}else A=A+4|0}else d=r}else d=r;while(0);r=0==(l&1);r=(r?B:f)+((r?(l&255)>>>1:c[B>>2]|0)<<2)|0;d:do if((d|0)!=(r|0))for(l=t=S,r=d;;){d=c[a>>2]|0;do if(d){f=c[d+12>>2]|0;if((f|0)==(c[d+16>>2]|0)){if(g=0,d=ca(c[(c[d>>2]|0)+36>>2]|0,d|0)|0,S=g,
g=0,S&1){Q=22;break b}}else d=c[f>>2]|0;-1==(d|0)?(c[a>>2]=0,f=1):f=0==(c[a>>2]|0)}else f=1;while(0);do if(l){d=c[l+12>>2]|0;if((d|0)==(c[l+16>>2]|0)){if(g=0,d=ca(c[(c[l>>2]|0)+36>>2]|0,l|0)|0,S=g,g=0,S&1){Q=22;break b}}else d=c[d>>2]|0;if(-1!=(d|0))if(f^0==(t|0))A=d=t;else break d;else d=c[b>>2]=0,Q=136}else d=t,Q=136;while(0);if(136==(Q|0))if(Q=0,f)break d;else A=0;f=c[a>>2]|0;l=c[f+12>>2]|0;if((l|0)==(c[f+16>>2]|0)){if(g=0,f=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0,S=g,g=0,S&1){Q=22;break b}}else f=c[l>>
2]|0;if((f|0)!=(c[r>>2]|0))break d;f=c[a>>2]|0;l=f+12|0;t=c[l>>2]|0;if((t|0)==(c[f+16>>2]|0)){if(g=0,ca(c[(c[f>>2]|0)+40>>2]|0,f|0)|0,S=g,g=0,S&1){Q=22;break b}}else c[l>>2]=t+4;r=r+4|0;f=u[ha>>0]|0;S=0==(f&1);f=(S?B:c[E>>2]|0)+((S?(f&255)>>>1:c[B>>2]|0)<<2)|0;if((r|0)==(f|0)){r=f;break}else t=d,l=A}while(0);if(L&&(S=u[ha>>0]|0,w=0==(S&1),(r|0)!=((w?B:c[E>>2]|0)+((w?(S&255)>>>1:c[B>>2]|0)<<2)|0))){Q=148;break b}else r=x;break;case 4:y=c[Z>>2]|0;t=D=S;r=x;d=0;d:for(;;){f=c[a>>2]|0;do if(f){l=c[f+12>>
2]|0;if((l|0)==(c[f+16>>2]|0)){if(g=0,f=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0,S=g,g=0,S&1){Q=25;break b}}else f=c[l>>2]|0;-1==(f|0)?(c[a>>2]=0,l=1):l=0==(c[a>>2]|0)}else l=1;while(0);do if(t){f=c[t+12>>2]|0;if((f|0)==(c[t+16>>2]|0)){if(g=0,f=ca(c[(c[t>>2]|0)+36>>2]|0,t|0)|0,S=g,g=0,S&1){Q=25;break b}}else f=c[f>>2]|0;if(-1!=(f|0))if(l^0==(D|0))A=f=D;else{x=D;break d}else f=c[b>>2]=0,Q=162}else f=D,Q=162;while(0);if(162==(Q|0))if(Q=0,l){x=f;break}else A=0;l=c[a>>2]|0;x=c[l+12>>2]|0;if((x|0)==(c[l+16>>2]|
0)){if(g=0,l=ca(c[(c[l>>2]|0)+36>>2]|0,l|0)|0,S=g,g=0,S&1){Q=25;break b}}else l=c[x>>2]|0;g=0;x=La(c[(c[m>>2]|0)+12>>2]|0,m|0,2048,l|0)|0;S=g;g=0;if(S&1){Q=25;break b}if(x){x=c[q>>2]|0;if((x|0)==(c[N>>2]|0)){g=0;na(14,n|0,q|0,N|0);S=g;g=0;if(S&1){Q=25;break b}x=c[q>>2]|0}c[q>>2]=x+4;c[x>>2]=l;d=d+1|0}else{S=u[wa>>0]|0;if(!((l|0)==(y|0)&(0!=(d|0)?0!=((0==(S&1)?(S&255)>>>1:c[P>>2]|0)|0):0))){x=f;break}if((r|0)==(c[va>>2]|0)){g=0;na(13,Ra|0,da|0,va|0);S=g;g=0;if(S&1){Q=25;break b}r=c[da>>2]|0}S=r+4|
0;c[da>>2]=S;c[r>>2]=d;r=S;d=0}l=c[a>>2]|0;x=l+12|0;t=c[x>>2]|0;if((t|0)==(c[l+16>>2]|0))if(g=0,ca(c[(c[l>>2]|0)+40>>2]|0,l|0)|0,S=g,g=0,S&1){Q=25;break b}else D=f,t=A;else c[x>>2]=t+4,D=f,t=A}if(0!=(d|0)&&(c[Ra>>2]|0)!=(r|0)){if((r|0)==(c[va>>2]|0)){g=0;na(13,Ra|0,da|0,va|0);S=g;g=0;if(S&1){Q=26;break b}r=c[da>>2]|0}S=r+4|0;c[da>>2]=S;c[r>>2]=d;r=S}A=c[R>>2]|0;if(0<(A|0)){d=c[a>>2]|0;do if(d){f=c[d+12>>2]|0;if((f|0)==(c[d+16>>2]|0)){if(g=0,d=ca(c[(c[d>>2]|0)+36>>2]|0,d|0)|0,S=g,g=0,S&1){Q=26;break b}}else d=
c[f>>2]|0;-1==(d|0)?(c[a>>2]=0,f=1):f=0==(c[a>>2]|0)}else f=1;while(0);do if(x){d=c[x+12>>2]|0;if((d|0)==(c[x+16>>2]|0)){if(g=0,d=ca(c[(c[x>>2]|0)+36>>2]|0,x|0)|0,S=g,g=0,S&1){Q=26;break b}}else d=c[d>>2]|0;if(-1!=(d|0)){if(!f){Q=206;break b}}else c[b>>2]=0,Q=200}else Q=200;while(0);if(200==(Q|0))if(Q=0,f){Q=206;break b}else x=0;d=c[a>>2]|0;f=c[d+12>>2]|0;if((f|0)==(c[d+16>>2]|0)){if(g=0,d=ca(c[(c[d>>2]|0)+36>>2]|0,d|0)|0,S=g,g=0,S&1){Q=26;break b}}else d=c[f>>2]|0;if((d|0)!=(c[ka>>2]|0)){Q=206;break b}d=
c[a>>2]|0;f=d+12|0;l=c[f>>2]|0;if((l|0)==(c[d+16>>2]|0)){if(g=0,ca(c[(c[d>>2]|0)+40>>2]|0,d|0)|0,S=g,g=0,S&1){Q=26;break b}}else c[f>>2]=l+4;if(0<(A|0))for(l=t=x,D=A;;){d=c[a>>2]|0;do if(d){f=c[d+12>>2]|0;if((f|0)==(c[d+16>>2]|0)){if(g=0,d=ca(c[(c[d>>2]|0)+36>>2]|0,d|0)|0,S=g,g=0,S&1){Q=24;break b}}else d=c[f>>2]|0;-1==(d|0)?(c[a>>2]=0,f=1):f=0==(c[a>>2]|0)}else f=1;while(0);do if(l){d=c[l+12>>2]|0;if((d|0)==(c[l+16>>2]|0)){if(g=0,d=ca(c[(c[l>>2]|0)+36>>2]|0,l|0)|0,S=g,g=0,S&1){Q=24;break b}}else d=
c[d>>2]|0;if(-1!=(d|0))if(f^0==(t|0))A=d=t;else{Q=231;break b}else d=c[b>>2]=0,Q=224}else d=t,Q=224;while(0);if(224==(Q|0))if(Q=0,f){Q=231;break b}else A=0;f=c[a>>2]|0;l=c[f+12>>2]|0;if((l|0)==(c[f+16>>2]|0)){if(g=0,f=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0,S=g,g=0,S&1){Q=24;break b}}else f=c[l>>2]|0;g=0;f=La(c[(c[m>>2]|0)+12>>2]|0,m|0,2048,f|0)|0;S=g;g=0;if(S&1){Q=24;break b}if(!f){Q=231;break b}if((c[q>>2]|0)==(c[N>>2]|0)&&(g=0,na(14,n|0,q|0,N|0),S=g,g=0,S&1)){Q=24;break b}f=c[a>>2]|0;l=c[f+12>>2]|0;if((l|
0)==(c[f+16>>2]|0)){if(g=0,f=ca(c[(c[f>>2]|0)+36>>2]|0,f|0)|0,S=g,g=0,S&1){Q=24;break b}}else f=c[l>>2]|0;l=c[q>>2]|0;c[q>>2]=l+4;c[l>>2]=f;f=D;D=D+-1|0;c[R>>2]=D;l=c[a>>2]|0;x=l+12|0;t=c[x>>2]|0;if((t|0)==(c[l+16>>2]|0)){if(g=0,ca(c[(c[l>>2]|0)+40>>2]|0,l|0)|0,S=g,g=0,S&1){Q=24;break b}}else c[x>>2]=t+4;if(1>=(f|0))break;else t=d,l=A}}if((c[q>>2]|0)==(c[n>>2]|0)){Q=242;break b}break;default:r=x}while(0);c:do if(44==(Q|0))for(;;){Q=0;d=c[a>>2]|0;do if(d){f=c[d+12>>2]|0;if((f|0)==(c[d+16>>2]|0)){if(g=
0,d=ca(c[(c[d>>2]|0)+36>>2]|0,d|0)|0,S=g,g=0,S&1){Q=21;break b}}else d=c[f>>2]|0;-1==(d|0)?(c[a>>2]=0,f=1):f=0==(c[a>>2]|0)}else f=1;while(0);do if(l){d=c[l+12>>2]|0;if((d|0)==(c[l+16>>2]|0)){if(g=0,d=ca(c[(c[l>>2]|0)+36>>2]|0,l|0)|0,S=g,g=0,S&1){Q=21;break b}}else d=c[d>>2]|0;if(-1!=(d|0))if(f^0==(r|0))l=t=r;else{r=x;break c}else r=c[b>>2]=0,Q=57}else Q=57;while(0);if(57==(Q|0))if(Q=0,f){r=x;break c}else t=r,l=0;r=c[a>>2]|0;d=c[r+12>>2]|0;if((d|0)==(c[r+16>>2]|0)){if(g=0,r=ca(c[(c[r>>2]|0)+36>>2]|
0,r|0)|0,S=g,g=0,S&1){Q=21;break b}}else r=c[d>>2]|0;g=0;r=La(c[(c[m>>2]|0)+12>>2]|0,m|0,8192,r|0)|0;S=g;g=0;if(S&1){Q=21;break b}if(!r){r=x;break c}r=c[a>>2]|0;d=r+12|0;f=c[d>>2]|0;if((f|0)==(c[r+16>>2]|0)){if(g=0,r=ca(c[(c[r>>2]|0)+40>>2]|0,r|0)|0,Q=g,g=0,Q&1){Q=21;break b}}else c[d>>2]=f+4,r=c[f>>2]|0;g=0;ga(92,Ia|0,r|0);Q=g;g=0;if(Q&1){Q=21;break b}else r=t}while(0);I=I+1|0;if(4<=I>>>0){A=r;Q=244;break}else x=r}b:switch(Q|0){case 21:d=J()|0;break a;case 22:d=J()|0;break a;case 23:d=J()|0;break a;
case 24:d=J()|0;break a;case 25:d=J()|0;break a;case 26:d=J()|0;break a;case 42:c[e>>2]|=4;d=0;break;case 107:c[e>>2]|=4;d=0;break;case 148:c[e>>2]|=4;d=0;break;case 206:c[e>>2]|=4;d=0;break;case 231:c[e>>2]|=4;d=0;break;case 242:c[e>>2]|=4;d=0;break;case 244:c:do if(z){x=z+4|0;t=z+8|0;l=1;d:for(;;){r=u[z>>0]|0;r=r&1?c[x>>2]|0:(r&255)>>>1;if(l>>>0>=r>>>0)break c;r=c[a>>2]|0;do if(r){d=c[r+12>>2]|0;if((d|0)==(c[r+16>>2]|0)){if(g=0,r=ca(c[(c[r>>2]|0)+36>>2]|0,r|0)|0,q=g,g=0,q&1){Q=20;break d}}else r=
c[d>>2]|0;-1==(r|0)?(c[a>>2]=0,f=1):f=0==(c[a>>2]|0)}else f=1;while(0);r=c[b>>2]|0;do if(r){d=c[r+12>>2]|0;if((d|0)==(c[r+16>>2]|0)){if(g=0,r=ca(c[(c[r>>2]|0)+36>>2]|0,r|0)|0,q=g,g=0,q&1){Q=20;break d}}else r=c[d>>2]|0;if(-1!=(r|0)){if(!f){Q=271;break d}}else c[b>>2]=0,Q=263}else Q=263;while(0);if(263==(Q|0)&&(Q=0,f)){Q=271;break}r=c[a>>2]|0;d=c[r+12>>2]|0;if((d|0)==(c[r+16>>2]|0)){if(g=0,r=ca(c[(c[r>>2]|0)+36>>2]|0,r|0)|0,q=g,g=0,q&1){Q=20;break}}else r=c[d>>2]|0;d=u[z>>0]&1?c[t>>2]|0:x;if((r|0)!=
(c[d+(l<<2)>>2]|0)){Q=271;break}r=l+1|0;d=c[a>>2]|0;f=d+12|0;l=c[f>>2]|0;if((l|0)==(c[d+16>>2]|0))if(g=0,ca(c[(c[d>>2]|0)+40>>2]|0,d|0)|0,q=g,g=0,q&1){Q=20;break}else l=r;else c[f>>2]=l+4,l=r}if(20==(Q|0)){d=J()|0;break a}else if(271==(Q|0)){c[e>>2]|=4;d=0;break b}}while(0);r=c[Ra>>2]|0;(r|0)!=(A|0)&&(c[X>>2]=0,rc(wa,r,A,X),0!=(c[X>>2]|0))?(c[e>>2]|=4,d=0):d=1}Ka(Ia);Ka(fa);Ka(Ba);Ka(ha);W(wa);r=c[Ra>>2]|0;c[Ra>>2]=0;0!=(r|0)&&(g=0,ta(c[Ua>>2]|0,r|0),Ra=g,g=0,Ra&1)&&(Ra=J(0)|0,h(Ra));F=ba;return d|
0}while(0);Ka(Ia);Ka(fa);Ka(Ba);Ka(ha);W(wa);r=c[Ra>>2]|0;c[Ra>>2]=0;0!=(r|0)&&(g=0,ta(c[Ua>>2]|0,r|0),Ra=g,g=0,Ra&1)&&(Ra=J(0)|0,h(Ra));V(d|0);return 0},Yg],cb=[Nb,function(c,a,b){return c|0},function(a,b,d){a|=0;b|=0;d|=0;var g=0,f=0,e=0,h=0,e=a+12|0,h=a+16|0;a:do if(0<(d|0))for(f=b,b=0;;){g=c[e>>2]|0;if(g>>>0<(c[h>>2]|0)>>>0)c[e>>2]=g+1,g=u[g>>0]|0;else{g=Ja[c[(c[a>>2]|0)+40>>2]&127](a)|0;if(-1==(g|0))break a;g&=255}u[f>>0]=g;b=b+1|0;if((b|0)<(d|0))f=f+1|0;else break}else b=0;while(0);return b|
0},function(a,b,d){a|=0;b|=0;d|=0;var g=0,f=0,e=0,h=0,k=0,e=a+24|0,h=a+28|0;a:do if(0<(d|0))for(f=b,b=0;;){g=c[e>>2]|0;if(g>>>0>=(c[h>>2]|0)>>>0){if(-1==(vc[c[(c[a>>2]|0)+52>>2]&63](a,ea[f>>0]|0)|0))break a}else k=u[f>>0]|0,c[e>>2]=g+1,u[g>>0]=k;b=b+1|0;if((b|0)<(d|0))f=f+1|0;else break}else b=0;while(0);return b|0},function(a,b,d){a|=0;d|=0;var g=0,f=0,f=F;F=F+16|0;g=f;Nf[c[(c[a>>2]|0)+12>>2]&15](g,a,b|0);g=(c[g+4>>2]|0)==(c[d+4>>2]|0)?(c[g>>2]|0)==(c[d>>2]|0):0;F=f;return g|0},function(a,b,d){b|=
0;return((c[b>>2]|0)==(d|0)?(c[b+4>>2]|0)==(a|0):0)|0},function(a,b,d){a|=0;b|=0;d|=0;var g=0,f=0,e=0,h=0,h=F;F=F+64|0;e=h;if((a|0)!=(b|0))if(0!=(b|0)&&(f=kh(b,656,672,0)|0,0!=(f|0))){b=e;g=b+56|0;do c[b>>2]=0,b=b+4|0;while((b|0)<(g|0));c[e>>2]=f;c[e+8>>2]=a;c[e+12>>2]=-1;c[e+48>>2]=1;Bf[c[(c[f>>2]|0)+28>>2]&63](f,e,c[d>>2]|0,1);1==(c[e+24>>2]|0)?(c[d>>2]=c[e+16>>2],b=1):b=0}else b=0;else b=1;F=h;return b|0},function(a,b,d){a|=0;d|=0;var g=0,f=0,g=a+20|0,f=c[g>>2]|0;a=(c[a+16>>2]|0)-f|0;a=a>>>0>d>>>
0?d:a;gb(f|0,b|0,a|0)|0;c[g>>2]=(c[g>>2]|0)+a;return d|0},uh,function(a,b,d){var g=0,f=0,e=0,f=F;F=F+32|0;e=f;g=f+20|0;c[e>>2]=c[(a|0)+60>>2];c[e+4>>2]=0;c[e+8>>2]=b|0;c[e+12>>2]=g;c[e+16>>2]=d|0;a=0>(Se(vi(140,e|0)|0)|0)?c[g>>2]=-1:c[g>>2]|0;F=f;return a|0},function(a,b,d){a|=0;b|=0;d|=0;var g=0,f=0,e=0,h=0,k=0,m=0,n=0,q=0,n=F;F=F+48|0;e=n+16|0;f=n;g=n+32|0;c[g>>2]=b;h=g+4|0;m=a+48|0;q=c[m>>2]|0;c[h>>2]=d-(0!=(q|0)&1);k=a+44|0;c[g+8>>2]=c[k>>2];c[g+12>>2]=q;c[9258]|0?(vh(185,a|0),c[f>>2]=c[a+60>>
2],c[f+4>>2]=g,c[f+8>>2]=2,g=Se(Ph(145,f|0)|0)|0,xh(0)):(c[e>>2]=c[a+60>>2],c[e+4>>2]=g,c[e+8>>2]=2,g=Se(Ph(145,e|0)|0)|0);1<=(g|0)?(h=c[h>>2]|0,g>>>0>h>>>0&&(e=c[k>>2]|0,f=a+4|0,c[f>>2]=e,c[a+8>>2]=e+(g-h),c[m>>2]|0&&(c[f>>2]=e+1,u[b+(d+-1)>>0]=u[e>>0]|0),g=d)):(c[a>>2]|=g&48^16,c[a+8>>2]=0,c[a+4>>2]=0);F=n;return g|0},function(a,b,d){a|=0;b|=0;d|=0;var g=0,f=0,f=F;F=F+80|0;g=f;c[a+36>>2]=8;0==(c[a>>2]&64|0)&&(c[g>>2]=c[a+60>>2],c[g+4>>2]=21505,c[g+8>>2]=f+12,0!=(qi(54,g|0)|0))&&(u[a+75>>0]=-1);
g=uh(a,b,d)|0;F=f;return g|0},function(c,a,b){return c|0},function(a,b,d){a|=0;b|=0;d|=0;var g=0,f=0,e=0,h=0,e=a+12|0,h=a+16|0;a:do if(0<(d|0))for(f=b,b=0;;){g=c[e>>2]|0;if(g>>>0>=(c[h>>2]|0)>>>0){if(g=Ja[c[(c[a>>2]|0)+40>>2]&127](a)|0,-1==(g|0))break a}else c[e>>2]=g+4,g=c[g>>2]|0;c[f>>2]=g;b=b+1|0;if((b|0)<(d|0))f=f+4|0;else break}else b=0;while(0);return b|0},function(a,b,d){a|=0;b|=0;d|=0;var g=0;a:do if(u[a+44>>0]|0)b=Qd(b,4,d,c[a+32>>2]|0)|0;else if(0<(d|0))for(g=b,b=0;;){if(-1==(vc[c[(c[a>>
2]|0)+52>>2]&63](a,c[g>>2]|0)|0))break a;b=b+1|0;if((b|0)<(d|0))g=g+4|0;else break}else b=0;while(0);return b|0},function(a,b,d){a|=0;b|=0;d|=0;var g=0,f=0,e=0,h=0,k=0,e=a+24|0,h=a+28|0;a:do if(0<(d|0))for(f=b,b=0;;){g=c[e>>2]|0;if(g>>>0>=(c[h>>2]|0)>>>0){if(-1==(vc[c[(c[a>>2]|0)+52>>2]&63](a,c[f>>2]|0)|0))break a}else k=c[f>>2]|0,c[e>>2]=g+4,c[g>>2]=k;b=b+1|0;if((b|0)<(d|0))f=f+4|0;else break}else b=0;while(0);return b|0},function(a,b,d){a|=0;b|=0;d|=0;var g=0;a:do if(u[a+44>>0]|0)b=Qd(b,1,d,c[a+
32>>2]|0)|0;else if(0<(d|0))for(g=b,b=0;;){if(-1==(vc[c[(c[a>>2]|0)+52>>2]&63](a,ea[g>>0]|0)|0))break a;b=b+1|0;if((b|0)<(d|0))g=g+1|0;else break}else b=0;while(0);return b|0},function(c,a,b){a|=0;b|=0;var d=0;if((a|0)==(b|0))c=0;else{c=0;do c=(u[a>>0]|0)+(c<<4)|0,d=c&-268435456,c^=d>>>24|d,a=a+1|0;while((a|0)!=(b|0))}return c|0},function(a,b,d){b|=0;d|=0;var g=0;if((b|0)==(d|0))a=0;else{a=0;do a=(c[b>>2]|0)+(a<<4)|0,g=a&-268435456,a^=g>>>24|g,b=b+4|0;while((b|0)!=(d|0))}return a|0},function(c,a,
b){c=-1;return c>>>(-1!=(c|0)&1)|0},function(c,a,b){c=-1;return c>>>(-1!=(c|0)&1)|0},function(a,b,d){b|=0;d|=0;if((b|0)!=(d|0)){a=b;do b=u[a>>0]|0,-1<b<<24>>24&&(b=(Yc()|0)+(b<<24>>24<<2)|0,b=c[b>>2]&255),u[a>>0]=b,a=a+1|0;while((a|0)!=(d|0))}return d|0},function(a,b,d){b|=0;d|=0;if((b|0)!=(d|0)){a=b;do b=u[a>>0]|0,-1<b<<24>>24&&(b=(dd()|0)+(b<<24>>24<<2)|0,b=c[b>>2]&255),u[a>>0]=b,a=a+1|0;while((a|0)!=(d|0))}return d|0},function(c,a,b){a|=0;return(-1<a<<24>>24?a:b|0)|0},function(c,a,b){a|=0;b|=0;
128>b>>>0?(b=(Kc()|0)+(b<<1)|0,b=0!=(R[b>>1]&a)<<16>>16):b=0;return b|0},function(a,b,d){b|=0;d|=0;var g=0,f=0,f=(d-b|0)>>>2;if((b|0)!=(d|0)){g=b;do a=c[g>>2]|0,128>a>>>0&&(a=(Yc()|0)+(a<<2)|0,a=c[a>>2]|0),c[g>>2]=a,g=g+4|0;while((g|0)!=(d|0))}return b+(f<<2)|0},function(a,b,d){b|=0;d|=0;var g=0,f=0,f=(d-b|0)>>>2;if((b|0)!=(d|0)){g=b;do a=c[g>>2]|0,128>a>>>0&&(a=(dd()|0)+(a<<2)|0,a=c[a>>2]|0),c[g>>2]=a,g=g+4|0;while((g|0)!=(d|0))}return b+(f<<2)|0},function(c,a,b){a|=0;return(128>a>>>0?a&255:b|0)|
0},function(a,b,d){a|=0;b|=0;d|=0;var f=0,l=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,t=F;F=F+32|0;k=t+16|0;x=t+8|0;m=t;g=0;ga(65,x|0,a|0);q=g;g=0;a:do if(q&1)d=J(0)|0,l=f=a;else{do if(u[x>>0]|0){f=c[(c[a>>2]|0)+-12>>2]|0;c[m>>2]=c[a+(f+24)>>2];n=a+f|0;q=c[a+(f+4)>>2]|0;l=b+d|0;f=a+(f+76)|0;d=c[f>>2]|0;-1==(d|0)?(g=0,d=ca(68,n|0)|0,z=g,g=0,z&1?r=13:(c[k>>2]=d,g=0,d=ma(37,k|0,44220)|0,z=g,g=0,z&1||(g=0,e=ma(c[(c[d>>2]|0)+28>>2]|0,d|0,32)|0,z=g,g=0,z&1)?(d=J(0)|0,Vb(k)):(Vb(k),d=e<<24>>24,c[f>>2]=d,r=9))):
r=9;if(9==(r|0))if(g=0,c[k>>2]=c[m>>2],d=Wd(39,k|0,b|0,(32==(q&176|0)?l:b)|0,l|0,n|0,d&255|0)|0,z=g,g=0,z&1)r=13;else{if(d)break;z=c[(c[a>>2]|0)+-12>>2]|0;g=0;ga(66,a+z|0,c[a+(z+16)>>2]|5);z=g;g=0;if(z&1)r=13;else break}13==(r|0)&&(d=J(0)|0);je(x);l=f=a;break a}while(0);je(x);F=t;return a|0}while(0);Rc(d|0)|0;g=0;ta(181,f+(c[(c[l>>2]|0)+-12>>2]|0)|0);z=g;g=0;if(!(z&1))return $c(),F=t,a|0;d=J()|0;g=0;rb(3);z=g;g=0;z&1?(z=J(0)|0,h(z)):V(d|0);return 0},function(a,b,d){a|=0;b|=0;d|=0;a|=0;b|=0;d|=0;var g=
0,f=0,e=0,h=0,g=a+84|0,e=c[g>>2]|0,h=d+256|0,f=Dg(e,0,h)|0,f=0==(f|0)?h:f-e|0;d=f>>>0<d>>>0?f:d;gb(b|0,e|0,d|0)|0;c[a+4>>2]=e+d;b=e+f|0;c[a+8>>2]=b;c[g>>2]=b;return d|0},ge,function(a,b,d){b|=0;d|=0;0!=(u[b>>0]|0)&&0!=(Dh(b,58885)|0)&&0!=(Dh(b,54145)|0)?d=0:d||(a=1,b=4,d=0,a?(d=ia(b,a)|0,65535<(b|a)>>>0&&(d=((d>>>0)/(a>>>0)|0)==(b|0)?d:-1)):d=0,(b=Ub(d)|0)&&c[b+-4>>2]&3&&Za(b|0,0,d|0)|0,d=b|0);return d|0},function(a,b,d){a|=0;b|=0;d|=0;var g=0,f=0,e=0,h=0,k=0,m=0,e=b,g=u[a>>0]|0;g&1?(g=c[a>>2]|0,
f=(g&-2)+-1|0,m=c[a+4>>2]|0,g&=255):(f=10,m=(g&255)>>>1);k=d-e|0;if((d|0)!=(b|0)){(f-m|0)>>>0<k>>>0&&(dg(a,f,m+k-f|0,m,m,0,0),g=u[a>>0]|0);h=g&1?c[a+8>>2]|0:a+1|0;e=d+(m-e)|0;if((b|0)!=(d|0))for(g=b,f=h+m|0;u[f>>0]=u[g>>0]|0,g=g+1|0,(g|0)!=(d|0);)f=f+1|0;u[h+e>>0]=0;g=m+k|0;u[a>>0]&1?c[a+4>>2]=g:u[a>>0]=g<<1}return a|0},function(a,b,d){a|=0;b|=0;d|=0;var g=0,f=0,e=0,h=0,k=0,m=0,e=b,g=u[a>>0]|0;g&1?(g=c[a>>2]|0,f=(g&-2)+-1|0,m=c[a+4>>2]|0,g&=255):(f=1,m=(g&255)>>>1);k=d-e>>2;if(k){(f-m|0)>>>0<k>>>
0&&(Ig(a,f,m+k-f|0,m,m,0,0),g=u[a>>0]|0);h=g&1?c[a+8>>2]|0:a+4|0;e=m+((d-e|0)>>>2)|0;if((b|0)!=(d|0))for(g=b,f=h+(m<<2)|0;c[f>>2]=c[g>>2],g=g+4|0,(g|0)!=(d|0);)f=f+4|0;c[h+(e<<2)>>2]=0;g=m+k|0;u[a>>0]&1?c[a+4>>2]=g:u[a>>0]=g<<1}return a|0},ze,function(a,b,d){a|=0;b|=0;d|=0;var g=0,f=0,e=0,h=0,h=F;F=F+16|0;g=h;a:do if(b){do if(d){e=0==(a|0)?g:a;g=u[b>>0]|0;a=g&255;if(-1<g<<24>>24){c[e>>2]=a;g=0!=g<<24>>24&1;break a}g=a+-194|0;if(50>=g>>>0&&(a=b+1|0,f=c[37076+(g<<2)>>2]|0,!(4>d>>>0&&0!=(f&-2147483648>>>
((6*d|0)+-6|0)|0))&&(g=ea[a>>0]|0,d=g>>>3,7>=(d+-16|d+(f>>26))>>>0))){g=g+-128|f<<6;if(0<=(g|0)){c[e>>2]=g;g=2;break a}a=ea[b+2>>0]|0;if(128==(a&192|0)){a=a+-128|g<<6;if(0<=(a|0)){c[e>>2]=a;g=3;break a}g=ea[b+3>>0]|0;if(128==(g&192|0)){c[e>>2]=g+-128|a<<6;g=4;break a}}}}while(0);g=sb()|0;c[g>>2]=84;g=-1}else g=0;while(0);F=h;return g|0},function(c,a,b){b|=0;return Hf(0,c|0,a|0,0!=(b|0)?b:37344)|0},function(a,b,d){a|=0;b|=0;d|=0;var g=0,f=0,e=0,h=0,k=0,k=F;F=F+16|0;g=k;(f=Ub(240)|0)?(c[g>>2]=c[d>>
2],g=wf(f,240,b,g)|0,240>g>>>0?(b=Xc(f,g+1|0)|0,c[a>>2]=0!=(b|0)?b:f):($a(f),g=0<=(g|0)&&(h=g+1|0,e=Ub(h)|0,c[a>>2]=e,0!=(e|0))?wf(e,h,b,d)|0:-1)):g=-1;F=k;return g|0},Nb,Nb,Nb,Nb,Nb,Nb,Nb,Nb,Nb,Nb,Nb,Nb,Nb,Nb,Nb,Nb,Nb,Nb,Nb,Nb,Nb,Nb,Nb,Nb,Nb,Nb],zi=[Zg,function(a,b,d,g,f,e,h,k,m,n,q,r,x,t,z){a|=0;b|=0;d|=0;g|=0;f|=0;e|=0;h|=0;k|=0;m|=0;n|=0;q|=0;r|=0;x|=0;t|=0;z|=0;var A=0,D=0,F=0,S=0,I=0,w=0,y=0,B=0,E=0,L=0,O=0,G=0,M=0,P=0,Y=0,J=0,la=0,U=0,ja=0,N=0,ka=0,Q=0,va=0,da=0;c[d>>2]=a;Q=t+4|0;va=t+8|0;
da=t+1|0;J=x+4|0;la=0==(g&512|0);U=x+8|0;ja=x+1|0;N=h+8|0;ka=0<(z|0);E=r+4|0;L=r+8|0;O=r+1|0;G=z+1|0;P=-2-z-(0>(z|0)?~z:-1)|0;Y=0<(z|0);B=0;do{switch(u[m+B>>0]|0){case 0:c[b>>2]=c[d>>2];break;case 1:c[b>>2]=c[d>>2];w=vc[c[(c[h>>2]|0)+28>>2]&63](h,32)|0;y=c[d>>2]|0;c[d>>2]=y+1;u[y>>0]=w;break;case 3:y=u[t>>0]|0;A=0==(y&1);(A?(y&255)>>>1:c[Q>>2]|0)|0&&(w=u[(A?da:c[va>>2]|0)>>0]|0,y=c[d>>2]|0,c[d>>2]=y+1,u[y>>0]=w);break;case 2:F=u[x>>0]|0;F=(A=0==(F&1))?(F&255)>>>1:c[J>>2]|0;if(!(la|0==(F|0))){D=A?
ja:c[U>>2]|0;S=D+F|0;A=c[d>>2]|0;if(F){do u[A>>0]=u[D>>0]|0,D=D+1|0,A=A+1|0;while((D|0)!=(S|0))}c[d>>2]=A}break;case 4:A=c[d>>2]|0;I=f=k?f+1|0:f;S=c[N>>2]|0;a:do if(f>>>0<e>>>0){D=f;do{F=u[D>>0]|0;if(-1>=F<<24>>24)break a;if(!(R[S+(F<<24>>24<<1)>>1]&2048))break a;D=D+1|0}while(D>>>0<e>>>0)}else D=f;while(0);F=D;if(ka){w=-2-F-~(F>>>0>I>>>0?I:F)|0;w=P>>>0>w>>>0?P:w;if(D>>>0>f>>>0&Y)for(F=D,I=z;;)if(F=F+-1|0,y=u[F>>0]|0,S=c[d>>2]|0,c[d>>2]=S+1,u[S>>0]=y,S=1<(I|0),F>>>0>f>>>0&S)I=I+-1|0;else break;else S=
Y;y=G+w|0;F=D+(w+1)|0;I=S?vc[c[(c[h>>2]|0)+28>>2]&63](h,48)|0:0;D=c[d>>2]|0;c[d>>2]=D+1;if(0<(y|0))for(S=y;;)if(u[D>>0]=I,D=c[d>>2]|0,c[d>>2]=D+1,1<(S|0))S=S+-1|0;else break;u[D>>0]=n}else F=D;if((F|0)!=(f|0)){if(y=u[r>>0]|0,D=0==(y&1),D=(D?(y&255)>>>1:c[E>>2]|0)|0?u[(D?O:c[L>>2]|0)>>0]|0:-1,(F|0)!=(f|0))for(I=S=0;(I|0)==(D|0)&&(y=c[d>>2]|0,c[d>>2]=y+1,u[y>>0]=q,S=S+1|0,y=u[r>>0]|0,D=0==(y&1),S>>>0<(D?(y&255)>>>1:c[E>>2]|0)>>>0?(D=u[(D?O:c[L>>2]|0)+S>>0]|0,D=127==D<<24>>24?-1:D<<24>>24):D=I,I=0),
F=F+-1|0,w=u[F>>0]|0,y=c[d>>2]|0,c[d>>2]=y+1,u[y>>0]=w,(F|0)!=(f|0);)I=I+1|0}else w=vc[c[(c[h>>2]|0)+28>>2]&63](h,48)|0,y=c[d>>2]|0,c[d>>2]=y+1,u[y>>0]=w;D=c[d>>2]|0;if((A|0)!=(D|0)&&(M=D+-1|0,A>>>0<M>>>0)){D=M;do y=u[A>>0]|0,u[A>>0]=u[D>>0]|0,u[D>>0]=y,A=A+1|0,D=D+-1|0;while(A>>>0<D>>>0)}}B=B+1|0}while(4!=(B|0));D=u[t>>0]|0;D=(f=0==(D&1))?(D&255)>>>1:c[Q>>2]|0;if(1<D>>>0){A=f?da:c[va>>2]|0;F=A+D|0;f=c[d>>2]|0;if(1!=(D|0)){A=A+1|0;do u[f>>0]=u[A>>0]|0,f=f+1|0,A=A+1|0;while((A|0)!=(F|0))}c[d>>2]=f}switch(g&
176|0){case 32:c[b>>2]=c[d>>2];break;case 16:break;default:c[b>>2]=a}},function(a,b,d,g,f,e,h,k,m,n,q,r,x,t,z){a|=0;b|=0;d|=0;g|=0;f|=0;e|=0;h|=0;k|=0;m|=0;n|=0;q|=0;r|=0;x|=0;t|=0;z|=0;var A=0,D=0,F=0,y=0,I=0,w=0,B=0,E=0,L=0,O=0,M=0,G=0,P=0,Y=0,J=0,la=0,U=0,ja=0,N=0,ka=0;c[d>>2]=a;N=t+4|0;ka=t+8|0;G=x+4|0;P=0==(g&512|0);Y=x+8|0;J=0<(z|0);la=r+4|0;U=r+8|0;ja=r+1|0;O=0<(z|0);L=0;do{switch(u[m+L>>0]|0){case 0:c[b>>2]=c[d>>2];break;case 1:c[b>>2]=c[d>>2];B=vc[c[(c[h>>2]|0)+44>>2]&63](h,32)|0;E=c[d>>
2]|0;c[d>>2]=E+4;c[E>>2]=B;break;case 3:E=u[t>>0]|0;A=0==(E&1);(A?(E&255)>>>1:c[N>>2]|0)|0&&(B=c[(A?N:c[ka>>2]|0)>>2]|0,E=c[d>>2]|0,c[d>>2]=E+4,c[E>>2]=B);break;case 2:I=u[x>>0]|0;I=(A=0==(I&1))?(I&255)>>>1:c[G>>2]|0;if(!(P|0==(I|0))){A=A?G:c[Y>>2]|0;F=A+(I<<2)|0;y=c[d>>2]|0;if(I)for(D=y;c[D>>2]=c[A>>2],A=A+4|0,(A|0)!=(F|0);)D=D+4|0;c[d>>2]=y+(I<<2)}break;case 4:A=c[d>>2]|0;f=k?f+4|0:f;a:do if(f>>>0<e>>>0){D=f;do{if(!(cb[c[(c[h>>2]|0)+12>>2]&63](h,2048,c[D>>2]|0)|0))break a;D=D+4|0}while(D>>>0<e>>>
0)}else D=f;while(0);if(J){if(D>>>0>f>>>0&O){I=c[d>>2]|0;for(y=z;;)if(D=D+-4|0,F=I+4|0,c[I>>2]=c[D>>2],w=y+-1|0,y=1<(y|0),D>>>0>f>>>0&y)I=F,y=w;else{I=w;break}c[d>>2]=F;F=I}else y=O,F=z;w=y?vc[c[(c[h>>2]|0)+44>>2]&63](h,48)|0:0;B=c[d>>2]|0;y=F+(0>(F|0)?~F:-1)|0;if(0<(F|0))for(I=B;;)if(c[I>>2]=w,1<(F|0))I=I+4|0,F=F+-1|0;else break;c[d>>2]=B+(y+2<<2);c[B+(y+1<<2)>>2]=n}if((D|0)==(f|0))B=vc[c[(c[h>>2]|0)+44>>2]&63](h,48)|0,E=c[d>>2]|0,D=E+4|0,c[d>>2]=D,c[E>>2]=B;else{B=u[r>>0]|0;F=0==(B&1);E=c[la>>2]|
0;F=(F?(B&255)>>>1:E)|0?u[(F?ja:c[U>>2]|0)>>0]|0:-1;if((D|0)!=(f|0))for(B=w=0;y=c[d>>2]|0,(B|0)==(F|0)?(I=y+4|0,c[d>>2]=I,c[y>>2]=q,w=w+1|0,y=u[r>>0]|0,F=0==(y&1),w>>>0<(F?(y&255)>>>1:E)>>>0?(F=u[(F?ja:c[U>>2]|0)+w>>0]|0,y=I,F=127==F<<24>>24?-1:F<<24>>24):(y=I,F=B),I=0):I=B,D=D+-4|0,B=c[D>>2]|0,c[d>>2]=y+4,c[y>>2]=B,(D|0)!=(f|0);)B=I+1|0;D=c[d>>2]|0}if((A|0)!=(D|0)&&(M=D+-4|0,A>>>0<M>>>0)){D=M;do E=c[A>>2]|0,c[A>>2]=c[D>>2],c[D>>2]=E,A=A+4|0,D=D+-4|0;while(A>>>0<D>>>0)}}L=L+1|0}while(4!=(L|0));A=
u[t>>0]|0;A=(f=0==(A&1))?(A&255)>>>1:c[N>>2]|0;if(1<A>>>0){D=f?N:c[ka>>2]|0;f=D+4|0;D=D+(A<<2)|0;F=c[d>>2]|0;y=D-f|0;if(1!=(A|0))for(A=F;c[A>>2]=c[f>>2],f=f+4|0,(f|0)!=(D|0);)A=A+4|0;c[d>>2]=F+(y>>>2<<2)}switch(g&176|0){case 32:c[b>>2]=c[d>>2];break;case 16:break;default:c[b>>2]=a}},Zg],ye=[me,function(a,b,d,g,f,e){a|=0;b|=0;f|=0;e|=0;var h=0,k=0,m=0,n=0,q=0,h=b+44|0,k=c[h>>2]|0,n=b+24|0,q=c[n>>2]|0;k>>>0<q>>>0&&(k=c[h>>2]=q);m=k;if((h=e&24)&&!(1==(f|0)&24==(h|0))){a:do switch(f|0){case 0:f=h=0;break;
case 1:h=f=e&8?(c[b+12>>2]|0)-(c[b+8>>2]|0)|0:q-(c[b+20>>2]|0)|0;f=(0>(f|0))<<31>>31;break a;case 2:h=b+32|0;h=u[h>>0]&1?c[b+40>>2]|0:h+1|0;h=f=k-h|0;f=(0>(f|0))<<31>>31;break;default:b=a;c[b>>2]=0;c[b+4>>2]=0;b=a+8|0;c[b>>2]=-1;c[b+4>>2]=-1;return}while(0);f=Mb(h|0,f|0,d|0,g|0)|0;d=Fa;if(0<=(d|0)&&(h=b+32|0,h=u[h>>0]&1?c[b+40>>2]|0:h+1|0,g=k-h|0,k=(0>(g|0))<<31>>31,!((k|0)<(d|0)|(k|0)==(d|0)&g>>>0<f>>>0))){h=e&8;if(!(0==(f|0)&0==(d|0))){if(0!=(h|0)&&0==(c[b+12>>2]|0)){b=a;c[b>>2]=0;c[b+4>>2]=0;b=
a+8|0;c[b>>2]=-1;c[b+4>>2]=-1;return}if(0!=(e&16|0)&0==(q|0)){b=a;c[b>>2]=0;c[b+4>>2]=0;b=a+8|0;c[b>>2]=-1;c[b+4>>2]=-1;return}}h&&(c[b+12>>2]=(c[b+8>>2]|0)+f,c[b+16>>2]=m);e&16&&(c[n>>2]=(c[b+20>>2]|0)+f);b=a;c[b>>2]=0;c[b+4>>2]=0;b=a+8|0;c[b>>2]=f;c[b+4>>2]=d;return}}b=a;c[b>>2]=0;c[b+4>>2]=0;b=a+8|0;c[b>>2]=-1;c[b+4>>2]=-1},function(a,b,d,g,f,e){b|=0;(a|0)==(c[b+8>>2]|0)&&ng(0,b,d|0,g|0,f|0)},function(a,b,d,g,f,e){a|=0;b|=0;d|=0;g|=0;f|=0;e|=0;(a|0)==(c[b+8>>2]|0)?ng(0,b,d,g,f):(a=c[a+8>>2]|0,
ye[c[(c[a>>2]|0)+20>>2]&15](a,b,d,g,f,e))},function(a,b,d,g,f,e){a|=0;b|=0;d|=0;g|=0;f|=0;e|=0;var h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0;if((a|0)==(c[b+8>>2]|0))ng(0,b,d,g,f);else{q=b+52|0;r=u[q>>0]|0;x=b+53|0;t=u[x>>0]|0;n=c[a+12>>2]|0;h=a+16+(n<<3)|0;u[q>>0]=0;u[x>>0]=0;og(a+16|0,b,d,g,f,e);a:do if(1<(n|0)){k=b+24|0;m=a+8|0;n=b+54|0;a=a+24|0;do{if(u[n>>0]|0)break a;if(u[q>>0]|0){if(1==(c[k>>2]|0))break a;if(!(c[m>>2]&2))break a}else if(0!=(u[x>>0]|0)&&0==(c[m>>2]&1|0))break a;u[q>>0]=0;u[x>>0]=0;og(a,
b,d,g,f,e);a=a+8|0}while(a>>>0<h>>>0)}while(0);u[q>>0]=r;u[x>>0]=t}},function(a,b,d,g,f,e){b=a|=0;c[b>>2]=0;c[b+4>>2]=0;b=a+8|0;c[b>>2]=-1;c[b+4>>2]=-1},function(a,b,d,g,f,e){b=a|=0;c[b>>2]=0;c[b+4>>2]=0;b=a+8|0;c[b>>2]=-1;c[b+4>>2]=-1},function(a,b,d,f,l,e){a|=0;d|=0;f|=0;l|=0;e|=0;var h=0,k=0,m=0,n=0,k=F;F=F+16|0;m=k;c[m>>2]=0;c[m+4>>2]=0;c[m+8>>2]=0;h=u[e>>0]|0;b=(n=0==(h&1))?e+1|0:c[e+8>>2]|0;h=n?(h&255)>>>1:c[e+4>>2]|0;e=b+h|0;a:do if(0<(h|0)){for(;;){g=0;ga(67,m|0,u[b>>0]|0);n=g;g=0;if(n&1)break;
b=b+1|0;if(b>>>0>=e>>>0){h=4;break a}}b=J()|0;h=7}else h=4;while(0);a:do if(4==(h|0))if(g=0,b=fb(19,(-1==(d|0)?-1:d<<1)|0,f|0,l|0,(0==(u[m>>0]&1)?m+1|0:c[m+8>>2]|0)|0)|0,n=g,g=0,n&1)b=J()|0;else{c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;n=Ae(b)|0;e=b+n|0;b:do if(0<(n|0)){for(;;){g=0;ga(67,a|0,u[b>>0]|0);n=g;g=0;if(n&1)break;b=b+1|0;if(b>>>0>=e>>>0)break b}b=J()|0;W(a);break a}while(0);W(m);F=k;return}while(0);W(m);V(b|0)},function(a,b,d,f,l,e){a|=0;d|=0;f|=0;l|=0;e|=0;var h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,
z=0,A=0,D=0,y=0,w=0,I=0,B=0,w=F;F=F+224|0;r=w+184|0;q=w+192|0;n=w+180|0;x=w+176|0;D=w+168|0;A=w+40|0;z=w+32|0;y=w+28|0;I=w+16|0;m=w+8|0;t=w;c[I>>2]=0;c[I+4>>2]=0;c[I+8>>2]=0;c[m+4>>2]=0;c[m>>2]=44696;k=u[e>>0]|0;B=0==(k&1);h=e+4|0;b=B?h:c[e+8>>2]|0;e=B?(k&255)>>>1:c[h>>2]|0;h=b+(e<<2)|0;k=q+32|0;a:do if(0<(e|0)){b:for(;;){c[x>>2]=b;g=0;e=Nh(c[(c[m>>2]|0)+12>>2]|0,m|0,r|0,b|0,h|0,x|0,q|0,k|0,n|0)|0;B=g;g=0;if(B&1){e=12;break}if(2==(e|0)||(c[x>>2]|0)==(b|0)){e=5;break}if(q>>>0<(c[n>>2]|0)>>>0){b=q;
do{g=0;ga(67,I|0,u[b>>0]|0);B=g;g=0;if(B&1){e=11;break b}b=b+1|0}while(b>>>0<(c[n>>2]|0)>>>0)}b=c[x>>2]|0;if(!(2!=(e|0)&b>>>0<h>>>0)){e=9;break a}}5==(e|0)?(g=0,ta(190,58955),g=0,b=J()|0):11==(e|0)?b=J()|0:12==(e|0)&&(b=J()|0)}else e=9;while(0);a:do if(9==(e|0))if(g=0,b=fb(19,(-1==(d|0)?-1:d<<1)|0,f|0,l|0,(0==(u[I>>0]&1)?I+1|0:c[I+8>>2]|0)|0)|0,B=g,g=0,B&1)b=J()|0;else{c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[t+4>>2]=0;c[t>>2]=44744;B=Ae(b)|0;k=h=b+B|0;m=A+128|0;b:do if(0<(B|0)){c:for(;;){c[y>>2]=b;g=
0;e=Nh(c[(c[t>>2]|0)+16>>2]|0,t|0,D|0,b|0,(32<(k-b|0)?b+32|0:h)|0,y|0,A|0,m|0,z|0)|0;B=g;g=0;if(B&1){e=24;break}if(2==(e|0)||(c[y>>2]|0)==(b|0)){e=18;break}if(A>>>0<(c[z>>2]|0)>>>0){b=A;do{g=0;ga(92,a|0,c[b>>2]|0);B=g;g=0;if(B&1){e=23;break c}b=b+4|0}while(b>>>0<(c[z>>2]|0)>>>0)}b=c[y>>2]|0;if(!(2!=(e|0)&b>>>0<h>>>0))break b}18==(e|0)?(g=0,ta(190,58955),g=0,b=J()|0):23==(e|0)?b=J()|0:24==(e|0)&&(b=J()|0);Ka(a);break a}while(0);W(I);F=w;return}while(0);W(I);V(b|0)},me,me,me,me,me,me,me],Ai=[yf,function(a,
b,d,f,l,e,h){a|=0;b|=0;d|=0;f|=0;l|=0;e|=0;h|=0;var k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,D=0,y=0,w=0,I=0,y=F;F=F+16|0;w=y;A=Sb(h,44220)|0;n=Sb(h,44360)|0;bb[c[(c[n>>2]|0)+20>>2]&127](w,n);t=u[w>>0]|0;z=w+4|0;a:do if((0==(t&1)?(t&255)>>>1:c[z>>2]|0)|0){c[e>>2]=f;h=u[a>>0]|0;switch(h<<24>>24){case 43:case 45:g=0;h=ma(c[(c[A>>2]|0)+28>>2]|0,A|0,h|0)|0;t=g;g=0;if(t&1){D=5;break a}m=c[e>>2]|0;c[e>>2]=m+1;u[m>>0]=h;m=a+1|0;break;default:m=a}b:do if(1<(d-m|0)&&48==(u[m>>0]|0)){h=m+1|0;switch(u[h>>0]|0){case 88:case 120:break;
default:break b}g=0;k=ma(c[(c[A>>2]|0)+28>>2]|0,A|0,48)|0;t=g;g=0;if(t&1){D=5;break a}t=c[e>>2]|0;c[e>>2]=t+1;u[t>>0]=k;g=0;h=ma(c[(c[A>>2]|0)+28>>2]|0,A|0,u[h>>0]|0)|0;t=g;g=0;if(t&1){D=5;break a}t=c[e>>2]|0;c[e>>2]=t+1;u[t>>0]=h;m=m+2|0}while(0);if((m|0)!=(d|0)&&(q=d+-1|0,m>>>0<q>>>0)){k=m;h=q;do t=u[k>>0]|0,u[k>>0]=u[h>>0]|0,u[h>>0]=t,k=k+1|0,h=h+-1|0;while(k>>>0<h>>>0)}g=0;q=ca(c[(c[n>>2]|0)+16>>2]|0,n|0)|0;t=g;g=0;if(t&1)D=5;else{r=w+8|0;x=w+1|0;b:do if(m>>>0<d>>>0){k=h=0;for(t=m;;){n=u[(0==
(u[w>>0]&1)?x:c[r>>2]|0)+k>>0]|0;0!=n<<24>>24&(h|0)==(n<<24>>24|0)?(h=c[e>>2]|0,c[e>>2]=h+1,u[h>>0]=q,h=u[w>>0]|0,n=0,k=(k>>>0<((0==(h&1)?(h&255)>>>1:c[z>>2]|0)+-1|0)>>>0&1)+k|0):n=h;g=0;h=ma(c[(c[A>>2]|0)+28>>2]|0,A|0,u[t>>0]|0)|0;I=g;g=0;if(I&1)break;I=c[e>>2]|0;c[e>>2]=I+1;u[I>>0]=h;t=t+1|0;if(t>>>0>=d>>>0)break b;else h=n+1|0}h=J()|0;break a}while(0);k=a;h=f+(m-k)|0;a=c[e>>2]|0;if((h|0)==(a|0))a=k;else{a=a+-1|0;if(h>>>0<a>>>0){do I=u[h>>0]|0,u[h>>0]=u[a>>0]|0,u[a>>0]=I,h=h+1|0,a=a+-1|0;while(h>>>
0<a>>>0)}a=k;h=c[e>>2]|0}D=29}}else g=0,fb(c[(c[A>>2]|0)+32>>2]|0,A|0,a|0,d|0,f|0)|0,D=g,g=0,D&1?D=5:(h=f+(d-a)|0,c[e>>2]=h,D=29);while(0);if(5==(D|0))h=J()|0;else if(29==(D|0)){c[l>>2]=(b|0)==(d|0)?h:f+(b-a)|0;W(w);F=y;return}W(w);V(h|0)},function(a,b,d,f,l,e,h){a|=0;b|=0;d|=0;f|=0;l|=0;e|=0;h|=0;var k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,D=0,y=0,w=0,I=0,B=0,E=0,L=0,O=0,E=F;F=F+16|0;L=E;B=Sb(h,44220)|0;w=Sb(h,44360)|0;bb[c[(c[w>>2]|0)+20>>2]&127](L,w);c[e>>2]=f;h=u[a>>0]|0;switch(h<<24>>24){case 43:case 45:g=
0;h=ma(c[(c[B>>2]|0)+28>>2]|0,B|0,h|0)|0;I=g;g=0;I&1?y=8:(q=c[e>>2]|0,c[e>>2]=q+1,u[q>>0]=h,q=a+1|0,y=10);break;default:q=a,y=10}a:do if(10==(y|0)){I=d;b:do if(1<(I-q|0)&&48==(u[q>>0]|0)){m=q+1|0;switch(u[m>>0]|0){case 88:case 120:break;default:y=11;break b}g=0;h=ma(c[(c[B>>2]|0)+28>>2]|0,B|0,48)|0;D=g;g=0;if(D&1){y=8;break a}D=c[e>>2]|0;c[e>>2]=D+1;u[D>>0]=h;q=q+2|0;g=0;h=ma(c[(c[B>>2]|0)+28>>2]|0,B|0,u[m>>0]|0)|0;D=g;g=0;if(D&1){y=8;break a}D=c[e>>2]|0;c[e>>2]=D+1;u[D>>0]=h;if(q>>>0<d>>>0){for(h=
q;;){m=u[h>>0]|0;g=0;n=Va(3)|0;D=g;g=0;if(D&1)break;g=0;m=ma(39,m<<24>>24|0,n|0)|0;D=g;g=0;if(D&1)break;if(!m){D=q;break b}h=h+1|0;if(h>>>0>=d>>>0){D=q;break b}}h=J()|0;break a}else h=D=q}else y=11;while(0);b:do if(11==(y|0))if(q>>>0<d>>>0){for(h=q;;){m=u[h>>0]|0;g=0;n=Va(3)|0;D=g;g=0;if(D&1)break;g=0;m=ma(40,m<<24>>24|0,n|0)|0;D=g;g=0;if(D&1)break;if(!m){D=q;break b}h=h+1|0;if(h>>>0>=d>>>0){D=q;break b}}h=J()|0;break a}else h=D=q;while(0);z=u[L>>0]|0;A=L+4|0;if((0==(z&1)?(z&255)>>>1:c[A>>2]|0)|0){if((D|
0)!=(h|0)&&(r=h+-1|0,D>>>0<r>>>0)){n=D;m=r;do z=u[n>>0]|0,u[n>>0]=u[m>>0]|0,u[m>>0]=z,n=n+1|0,m=m+-1|0;while(n>>>0<m>>>0)}g=0;r=ca(c[(c[w>>2]|0)+16>>2]|0,w|0)|0;z=g;g=0;if(z&1){y=8;break}x=L+8|0;t=L+1|0;b:do if(D>>>0<h>>>0){n=m=0;for(z=D;;){q=u[(0==(u[L>>0]&1)?t:c[x>>2]|0)+n>>0]|0;0<q<<24>>24&(m|0)==(q<<24>>24|0)?(m=c[e>>2]|0,c[e>>2]=m+1,u[m>>0]=r,m=u[L>>0]|0,q=0,n=(n>>>0<((0==(m&1)?(m&255)>>>1:c[A>>2]|0)+-1|0)>>>0&1)+n|0):q=m;g=0;m=ma(c[(c[B>>2]|0)+28>>2]|0,B|0,u[z>>0]|0)|0;O=g;g=0;if(O&1)break;
O=c[e>>2]|0;c[e>>2]=O+1;u[O>>0]=m;z=z+1|0;if(z>>>0>=h>>>0)break b;else m=q+1|0}h=J()|0;break a}while(0);m=f+(D-a)|0;n=c[e>>2]|0;if((m|0)!=(n|0)&&(k=n+-1|0,m>>>0<k>>>0)){do O=u[m>>0]|0,u[m>>0]=u[k>>0]|0,u[k>>0]=O,m=m+1|0,k=k+-1|0;while(m>>>0<k>>>0)}}else{g=0;fb(c[(c[B>>2]|0)+32>>2]|0,B|0,D|0,h|0,c[e>>2]|0)|0;O=g;g=0;if(O&1){y=8;break}c[e>>2]=(c[e>>2]|0)+(h-D)}m=B;b:do if(h>>>0<d>>>0){for(;;){k=u[h>>0]|0;if(46==k<<24>>24)break;g=0;k=ma(c[(c[m>>2]|0)+28>>2]|0,B|0,k|0)|0;O=g;g=0;if(O&1){y=4;break}O=c[e>>
2]|0;c[e>>2]=O+1;u[O>>0]=k;h=h+1|0;if(h>>>0>=d>>>0)break b}if(4==(y|0)){h=J()|0;break a}g=0;k=ca(c[(c[w>>2]|0)+12>>2]|0,w|0)|0;O=g;g=0;if(O&1){y=8;break a}O=c[e>>2]|0;c[e>>2]=O+1;u[O>>0]=k;h=h+1|0}while(0);g=0;fb(c[(c[B>>2]|0)+32>>2]|0,B|0,h|0,d|0,c[e>>2]|0)|0;O=g;g=0;if(O&1)y=8;else{O=(c[e>>2]|0)+(I-h)|0;c[e>>2]=O;c[l>>2]=(b|0)==(d|0)?O:f+(b-a)|0;W(L);F=E;return}}while(0);8==(y|0)&&(h=J()|0);W(L);V(h|0)},function(a,b,d,f,l,e,h){a|=0;b|=0;d|=0;f|=0;l|=0;e|=0;h|=0;var k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=
0,D=0,A=0,y=0,w=0,I=0,y=F;F=F+16|0;w=y;D=Sb(h,44212)|0;n=Sb(h,44368)|0;bb[c[(c[n>>2]|0)+20>>2]&127](w,n);t=u[w>>0]|0;z=w+4|0;a:do if((0==(t&1)?(t&255)>>>1:c[z>>2]|0)|0){c[e>>2]=f;h=u[a>>0]|0;switch(h<<24>>24){case 43:case 45:g=0;h=ma(c[(c[D>>2]|0)+44>>2]|0,D|0,h|0)|0;t=g;g=0;if(t&1){A=5;break a}m=c[e>>2]|0;c[e>>2]=m+4;c[m>>2]=h;m=a+1|0;break;default:m=a}b:do if(1<(d-m|0)&&48==(u[m>>0]|0)){h=m+1|0;switch(u[h>>0]|0){case 88:case 120:break;default:t=m;break b}g=0;k=ma(c[(c[D>>2]|0)+44>>2]|0,D|0,48)|
0;t=g;g=0;if(t&1){A=5;break a}t=c[e>>2]|0;c[e>>2]=t+4;c[t>>2]=k;g=0;h=ma(c[(c[D>>2]|0)+44>>2]|0,D|0,u[h>>0]|0)|0;t=g;g=0;if(t&1){A=5;break a}t=c[e>>2]|0;c[e>>2]=t+4;c[t>>2]=h;t=m+2|0}else t=m;while(0);if((t|0)!=(d|0)&&(q=d+-1|0,t>>>0<q>>>0)){k=t;h=q;do x=u[k>>0]|0,u[k>>0]=u[h>>0]|0,u[h>>0]=x,k=k+1|0,h=h+-1|0;while(k>>>0<h>>>0)}g=0;n=ca(c[(c[n>>2]|0)+16>>2]|0,n|0)|0;x=g;g=0;if(x&1)A=5;else{q=w+8|0;r=w+1|0;b:do if(t>>>0<d>>>0){k=h=0;for(x=t;;){m=u[(0==(u[w>>0]&1)?r:c[q>>2]|0)+k>>0]|0;0!=m<<24>>24&(h|
0)==(m<<24>>24|0)?(h=c[e>>2]|0,c[e>>2]=h+4,c[h>>2]=n,h=u[w>>0]|0,m=0,k=(k>>>0<((0==(h&1)?(h&255)>>>1:c[z>>2]|0)+-1|0)>>>0&1)+k|0):m=h;g=0;h=ma(c[(c[D>>2]|0)+44>>2]|0,D|0,u[x>>0]|0)|0;I=g;g=0;if(I&1)break;I=c[e>>2]|0;c[e>>2]=I+4;c[I>>2]=h;x=x+1|0;if(x>>>0>=d>>>0)break b;else h=m+1|0}h=J()|0;break a}while(0);m=a;h=f+(t-m<<2)|0;k=c[e>>2]|0;if((h|0)!=(k|0)){a=k+-4|0;if(h>>>0<a>>>0){do I=c[h>>2]|0,c[h>>2]=c[a>>2],c[a>>2]=I,h=h+4|0,a=a+-4|0;while(h>>>0<a>>>0)}a=m;h=k}else a=m;A=28}}else g=0,fb(c[(c[D>>
2]|0)+48>>2]|0,D|0,a|0,d|0,f|0)|0,A=g,g=0,A&1?A=5:(h=f+(d-a<<2)|0,c[e>>2]=h,A=28);while(0);if(5==(A|0))h=J()|0;else if(28==(A|0)){c[l>>2]=(b|0)==(d|0)?h:f+(b-a<<2)|0;W(w);F=y;return}W(w);V(h|0)},function(a,b,d,f,l,h,e){a|=0;b|=0;d|=0;f|=0;l|=0;h|=0;e|=0;var k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,D=0,A=0,y=0,w=0,I=0,B=0,E=0,O=0,B=F;F=F+16|0;E=B;I=Sb(e,44212)|0;y=Sb(e,44368)|0;bb[c[(c[y>>2]|0)+20>>2]&127](E,y);c[h>>2]=f;e=u[a>>0]|0;switch(e<<24>>24){case 43:case 45:g=0;e=ma(c[(c[I>>2]|0)+44>>2]|0,I|0,e|0)|
0;w=g;g=0;w&1?A=8:(n=c[h>>2]|0,c[h>>2]=n+4,c[n>>2]=e,n=a+1|0,A=10);break;default:n=a,A=10}a:do if(10==(A|0)){w=d;b:do if(1<(w-n|0)&&48==(u[n>>0]|0)){k=n+1|0;switch(u[k>>0]|0){case 88:case 120:break;default:A=11;break b}g=0;e=ma(c[(c[I>>2]|0)+44>>2]|0,I|0,48)|0;D=g;g=0;if(D&1){A=8;break a}D=c[h>>2]|0;c[h>>2]=D+4;c[D>>2]=e;n=n+2|0;g=0;e=ma(c[(c[I>>2]|0)+44>>2]|0,I|0,u[k>>0]|0)|0;D=g;g=0;if(D&1){A=8;break a}D=c[h>>2]|0;c[h>>2]=D+4;c[D>>2]=e;if(n>>>0<d>>>0){for(e=n;;){k=u[e>>0]|0;g=0;m=Va(3)|0;D=g;g=
0;if(D&1)break;g=0;k=ma(39,k<<24>>24|0,m|0)|0;D=g;g=0;if(D&1)break;if(!k){D=n;break b}e=e+1|0;if(e>>>0>=d>>>0){D=n;break b}}e=J()|0;break a}else e=D=n}else A=11;while(0);b:do if(11==(A|0))if(n>>>0<d>>>0){for(e=n;;){k=u[e>>0]|0;g=0;m=Va(3)|0;D=g;g=0;if(D&1)break;g=0;k=ma(40,k<<24>>24|0,m|0)|0;D=g;g=0;if(D&1)break;if(!k){D=n;break b}e=e+1|0;if(e>>>0>=d>>>0){D=n;break b}}e=J()|0;break a}else e=D=n;while(0);t=u[E>>0]|0;z=E+4|0;if((0==(t&1)?(t&255)>>>1:c[z>>2]|0)|0){if((D|0)!=(e|0)&&(q=e+-1|0,D>>>0<q>>>
0)){m=D;k=q;do t=u[m>>0]|0,u[m>>0]=u[k>>0]|0,u[k>>0]=t,m=m+1|0,k=k+-1|0;while(m>>>0<k>>>0)}g=0;q=ca(c[(c[y>>2]|0)+16>>2]|0,y|0)|0;t=g;g=0;if(t&1){A=8;break}r=E+8|0;x=E+1|0;b:do if(D>>>0<e>>>0){m=k=0;for(t=D;;){n=u[(0==(u[E>>0]&1)?x:c[r>>2]|0)+m>>0]|0;0<n<<24>>24&(k|0)==(n<<24>>24|0)?(k=c[h>>2]|0,c[h>>2]=k+4,c[k>>2]=q,k=u[E>>0]|0,n=0,m=(m>>>0<((0==(k&1)?(k&255)>>>1:c[z>>2]|0)+-1|0)>>>0&1)+m|0):n=k;g=0;k=ma(c[(c[I>>2]|0)+44>>2]|0,I|0,u[t>>0]|0)|0;O=g;g=0;if(O&1)break;O=c[h>>2]|0;c[h>>2]=O+4;c[O>>2]=
k;t=t+1|0;if(t>>>0>=e>>>0)break b;else k=n+1|0}e=J()|0;break a}while(0);k=f+(D-a<<2)|0;n=c[h>>2]|0;if((k|0)!=(n|0)){m=n+-4|0;if(k>>>0<m>>>0){do O=c[k>>2]|0,c[k>>2]=c[m>>2],c[m>>2]=O,k=k+4|0,m=m+-4|0;while(k>>>0<m>>>0)}q=I;k=n}else q=I}else{g=0;fb(c[(c[I>>2]|0)+48>>2]|0,I|0,D|0,e|0,c[h>>2]|0)|0;O=g;g=0;if(O&1){A=8;break}k=(c[h>>2]|0)+(e-D<<2)|0;c[h>>2]=k;q=I}b:do if(e>>>0<d>>>0){for(;;){k=u[e>>0]|0;if(46==k<<24>>24){m=e;break}g=0;m=ma(c[(c[q>>2]|0)+44>>2]|0,I|0,k|0)|0;O=g;g=0;if(O&1){A=4;break}O=c[h>>
2]|0;k=O+4|0;c[h>>2]=k;c[O>>2]=m;e=e+1|0;if(e>>>0>=d>>>0)break b}if(4==(A|0)){e=J()|0;break a}g=0;e=ca(c[(c[y>>2]|0)+12>>2]|0,y|0)|0;O=g;g=0;if(O&1){A=8;break a}O=c[h>>2]|0;k=O+4|0;c[h>>2]=k;c[O>>2]=e;e=m+1|0}while(0);g=0;fb(c[(c[I>>2]|0)+48>>2]|0,I|0,e|0,d|0,k|0)|0;O=g;g=0;if(O&1)A=8;else{O=(c[h>>2]|0)+(w-e<<2)|0;c[h>>2]=O;c[l>>2]=(b|0)==(d|0)?O:f+(b-a<<2)|0;W(E);F=B;return}}while(0);8==(A|0)&&(e=J()|0);W(E);V(e|0)},yf,yf,yf],Bi=[zf,function(a,b,d,f,l,e,k,m,n,q){b|=0;d|=0;f|=0;l|=0;e|=0;k|=0;m|=
0;n|=0;q|=0;var r=0,x=0,t=0,z=0,D=0,A=0,y=0,w=0,B=0,I=0,O=0,E=0,E=F;F=F+112|0;r=E+100|0;x=E+88|0;t=E+76|0;z=E+64|0;D=E+52|0;A=E+48|0;y=E+36|0;w=E+24|0;B=E+12|0;I=E;a|0?(a=Sb(b,43828)|0,bb[c[(c[a>>2]|0)+44>>2]&127](r,a),I=c[r>>2]|0,u[d>>0]=I,u[d+1>>0]=I>>8,u[d+2>>0]=I>>16,u[d+3>>0]=I>>24,bb[c[(c[a>>2]|0)+32>>2]&127](x,a),u[n>>0]&1?(u[c[n+8>>2]>>0]=0,c[n+4>>2]=0):(u[n+1>>0]=0,u[n>>0]=0),g=0,ga(91,n|0,0),d=g,g=0,d&1&&(d=J(0)|0,h(d)),c[n>>2]=c[x>>2],c[n+4>>2]=c[x+4>>2],c[n+8>>2]=c[x+8>>2],c[x>>2]=0,c[x+
4>>2]=0,c[x+8>>2]=0,W(x),bb[c[(c[a>>2]|0)+28>>2]&127](t,a),u[m>>0]&1?(u[c[m+8>>2]>>0]=0,c[m+4>>2]=0):(u[m+1>>0]=0,u[m>>0]=0),g=0,ga(91,m|0,0),d=g,g=0,d&1&&(d=J(0)|0,h(d)),c[m>>2]=c[t>>2],c[m+4>>2]=c[t+4>>2],c[m+8>>2]=c[t+8>>2],c[t>>2]=0,c[t+4>>2]=0,c[t+8>>2]=0,W(t),m=Ja[c[(c[a>>2]|0)+12>>2]&127](a)|0,u[f>>0]=m,m=Ja[c[(c[a>>2]|0)+16>>2]&127](a)|0,u[l>>0]=m,bb[c[(c[a>>2]|0)+20>>2]&127](z,a),u[e>>0]&1?(u[c[e+8>>2]>>0]=0,c[e+4>>2]=0):(u[e+1>>0]=0,u[e>>0]=0),g=0,ga(91,e|0,0),l=g,g=0,l&1&&(l=J(0)|0,h(l)),
c[e>>2]=c[z>>2],c[e+4>>2]=c[z+4>>2],c[e+8>>2]=c[z+8>>2],c[z>>2]=0,c[z+4>>2]=0,c[z+8>>2]=0,W(z),bb[c[(c[a>>2]|0)+24>>2]&127](D,a),u[k>>0]&1?(u[c[k+8>>2]>>0]=0,c[k+4>>2]=0):(u[k+1>>0]=0,u[k>>0]=0),g=0,ga(91,k|0,0),l=g,g=0,l&1?(l=J(0)|0,h(l)):(c[k>>2]=c[D>>2],c[k+4>>2]=c[D+4>>2],c[k+8>>2]=c[D+8>>2],c[D>>2]=0,c[D+4>>2]=0,c[D+8>>2]=0,W(D),O=Ja[c[(c[a>>2]|0)+36>>2]&127](a)|0)):(a=Sb(b,43764)|0,bb[c[(c[a>>2]|0)+44>>2]&127](A,a),A=c[A>>2]|0,u[d>>0]=A,u[d+1>>0]=A>>8,u[d+2>>0]=A>>16,u[d+3>>0]=A>>24,bb[c[(c[a>>
2]|0)+32>>2]&127](y,a),u[n>>0]&1?(u[c[n+8>>2]>>0]=0,c[n+4>>2]=0):(u[n+1>>0]=0,u[n>>0]=0),g=0,ga(91,n|0,0),d=g,g=0,d&1&&(d=J(0)|0,h(d)),c[n>>2]=c[y>>2],c[n+4>>2]=c[y+4>>2],c[n+8>>2]=c[y+8>>2],c[y>>2]=0,c[y+4>>2]=0,c[y+8>>2]=0,W(y),bb[c[(c[a>>2]|0)+28>>2]&127](w,a),u[m>>0]&1?(u[c[m+8>>2]>>0]=0,c[m+4>>2]=0):(u[m+1>>0]=0,u[m>>0]=0),g=0,ga(91,m|0,0),d=g,g=0,d&1&&(d=J(0)|0,h(d)),c[m>>2]=c[w>>2],c[m+4>>2]=c[w+4>>2],c[m+8>>2]=c[w+8>>2],c[w>>2]=0,c[w+4>>2]=0,c[w+8>>2]=0,W(w),m=Ja[c[(c[a>>2]|0)+12>>2]&127](a)|
0,u[f>>0]=m,m=Ja[c[(c[a>>2]|0)+16>>2]&127](a)|0,u[l>>0]=m,bb[c[(c[a>>2]|0)+20>>2]&127](B,a),u[e>>0]&1?(u[c[e+8>>2]>>0]=0,c[e+4>>2]=0):(u[e+1>>0]=0,u[e>>0]=0),g=0,ga(91,e|0,0),l=g,g=0,l&1&&(l=J(0)|0,h(l)),c[e>>2]=c[B>>2],c[e+4>>2]=c[B+4>>2],c[e+8>>2]=c[B+8>>2],c[B>>2]=0,c[B+4>>2]=0,c[B+8>>2]=0,W(B),bb[c[(c[a>>2]|0)+24>>2]&127](I,a),u[k>>0]&1?(u[c[k+8>>2]>>0]=0,c[k+4>>2]=0):(u[k+1>>0]=0,u[k>>0]=0),g=0,ga(91,k|0,0),l=g,g=0,l&1?(l=J(0)|0,h(l)):(c[k>>2]=c[I>>2],c[k+4>>2]=c[I+4>>2],c[k+8>>2]=c[I+8>>2],
c[I>>2]=0,c[I+4>>2]=0,c[I+8>>2]=0,W(I),O=Ja[c[(c[a>>2]|0)+36>>2]&127](a)|0));c[q>>2]=O;F=E},function(a,b,d,f,l,e,k,m,n,q){b|=0;d|=0;f|=0;l|=0;e|=0;k|=0;m|=0;n|=0;q|=0;var r=0,x=0,t=0,z=0,D=0,A=0,y=0,w=0,B=0,I=0,O=0,E=0,E=F;F=F+112|0;r=E+100|0;x=E+88|0;t=E+76|0;z=E+64|0;D=E+52|0;A=E+48|0;y=E+36|0;w=E+24|0;B=E+12|0;I=E;a|0?(a=Sb(b,43956)|0,bb[c[(c[a>>2]|0)+44>>2]&127](r,a),I=c[r>>2]|0,u[d>>0]=I,u[d+1>>0]=I>>8,u[d+2>>0]=I>>16,u[d+3>>0]=I>>24,bb[c[(c[a>>2]|0)+32>>2]&127](x,a),u[n>>0]&1?c[c[n+8>>2]>>2]=
0:u[n>>0]=0,g=c[n+4>>2]=0,ga(93,n|0,0),d=g,g=0,d&1&&(d=J(0)|0,h(d)),c[n>>2]=c[x>>2],c[n+4>>2]=c[x+4>>2],c[n+8>>2]=c[x+8>>2],c[x>>2]=0,c[x+4>>2]=0,c[x+8>>2]=0,Ka(x),bb[c[(c[a>>2]|0)+28>>2]&127](t,a),u[m>>0]&1?c[c[m+8>>2]>>2]=0:u[m>>0]=0,g=c[m+4>>2]=0,ga(93,m|0,0),d=g,g=0,d&1&&(d=J(0)|0,h(d)),c[m>>2]=c[t>>2],c[m+4>>2]=c[t+4>>2],c[m+8>>2]=c[t+8>>2],c[t>>2]=0,c[t+4>>2]=0,c[t+8>>2]=0,Ka(t),m=Ja[c[(c[a>>2]|0)+12>>2]&127](a)|0,c[f>>2]=m,m=Ja[c[(c[a>>2]|0)+16>>2]&127](a)|0,c[l>>2]=m,bb[c[(c[a>>2]|0)+20>>
2]&127](z,a),u[e>>0]&1?(u[c[e+8>>2]>>0]=0,c[e+4>>2]=0):(u[e+1>>0]=0,u[e>>0]=0),g=0,ga(91,e|0,0),l=g,g=0,l&1&&(l=J(0)|0,h(l)),c[e>>2]=c[z>>2],c[e+4>>2]=c[z+4>>2],c[e+8>>2]=c[z+8>>2],c[z>>2]=0,c[z+4>>2]=0,c[z+8>>2]=0,W(z),bb[c[(c[a>>2]|0)+24>>2]&127](D,a),u[k>>0]&1?c[c[k+8>>2]>>2]=0:u[k>>0]=0,g=c[k+4>>2]=0,ga(93,k|0,0),l=g,g=0,l&1?(l=J(0)|0,h(l)):(c[k>>2]=c[D>>2],c[k+4>>2]=c[D+4>>2],c[k+8>>2]=c[D+8>>2],c[D>>2]=0,c[D+4>>2]=0,c[D+8>>2]=0,Ka(D),O=Ja[c[(c[a>>2]|0)+36>>2]&127](a)|0)):(a=Sb(b,43892)|0,bb[c[(c[a>>
2]|0)+44>>2]&127](A,a),A=c[A>>2]|0,u[d>>0]=A,u[d+1>>0]=A>>8,u[d+2>>0]=A>>16,u[d+3>>0]=A>>24,bb[c[(c[a>>2]|0)+32>>2]&127](y,a),u[n>>0]&1?c[c[n+8>>2]>>2]=0:u[n>>0]=0,g=c[n+4>>2]=0,ga(93,n|0,0),d=g,g=0,d&1&&(d=J(0)|0,h(d)),c[n>>2]=c[y>>2],c[n+4>>2]=c[y+4>>2],c[n+8>>2]=c[y+8>>2],c[y>>2]=0,c[y+4>>2]=0,c[y+8>>2]=0,Ka(y),bb[c[(c[a>>2]|0)+28>>2]&127](w,a),u[m>>0]&1?c[c[m+8>>2]>>2]=0:u[m>>0]=0,g=c[m+4>>2]=0,ga(93,m|0,0),d=g,g=0,d&1&&(d=J(0)|0,h(d)),c[m>>2]=c[w>>2],c[m+4>>2]=c[w+4>>2],c[m+8>>2]=c[w+8>>2],c[w>>
2]=0,c[w+4>>2]=0,c[w+8>>2]=0,Ka(w),m=Ja[c[(c[a>>2]|0)+12>>2]&127](a)|0,c[f>>2]=m,m=Ja[c[(c[a>>2]|0)+16>>2]&127](a)|0,c[l>>2]=m,bb[c[(c[a>>2]|0)+20>>2]&127](B,a),u[e>>0]&1?(u[c[e+8>>2]>>0]=0,c[e+4>>2]=0):(u[e+1>>0]=0,u[e>>0]=0),g=0,ga(91,e|0,0),l=g,g=0,l&1&&(l=J(0)|0,h(l)),c[e>>2]=c[B>>2],c[e+4>>2]=c[B+4>>2],c[e+8>>2]=c[B+8>>2],c[B>>2]=0,c[B+4>>2]=0,c[B+8>>2]=0,W(B),bb[c[(c[a>>2]|0)+24>>2]&127](I,a),u[k>>0]&1?c[c[k+8>>2]>>2]=0:u[k>>0]=0,g=c[k+4>>2]=0,ga(93,k|0,0),l=g,g=0,l&1?(l=J(0)|0,h(l)):(c[k>>
2]=c[I>>2],c[k+4>>2]=c[I+4>>2],c[k+8>>2]=c[I+8>>2],c[I>>2]=0,c[I+4>>2]=0,c[I+8>>2]=0,Ka(I),O=Ja[c[(c[a>>2]|0)+36>>2]&127](a)|0));c[q>>2]=O;F=E},function(a,b,d,f,l,e,k,m,n,q){b|=0;d|=0;f|=0;l|=0;e|=0;k|=0;m|=0;n|=0;q|=0;var r=0,x=0,t=0,z=0,D=0,A=0,y=0,w=0,B=0,I=0,E=0,O=0,L=0,M=0,G=0,P=0,P=F;F=F+112|0;t=P+108|0;z=P+96|0;y=P+92|0;w=P+80|0;B=P+68|0;I=P+56|0;E=P+52|0;O=P+40|0;L=P+36|0;M=P+24|0;D=P+12|0;A=P;a|0?(a=Sb(d,43828)|0,d=c[a>>2]|0,b?(bb[c[d+44>>2]&127](t,a),b=c[t>>2]|0,u[f>>0]=b,u[f+1>>0]=b>>8,
u[f+2>>0]=b>>16,u[f+3>>0]=b>>24,bb[c[(c[a>>2]|0)+32>>2]&127](z,a),u[n>>0]&1?(u[c[n+8>>2]>>0]=0,c[n+4>>2]=0):(u[n+1>>0]=0,u[n>>0]=0),g=0,ga(91,n|0,0),f=g,g=0,f&1?(n=J(0)|0,h(n)):(c[n>>2]=c[z>>2],c[n+4>>2]=c[z+4>>2],c[n+8>>2]=c[z+8>>2],c[z>>2]=0,c[z+4>>2]=0,c[z+8>>2]=0,W(z),x=a)):(bb[c[d+40>>2]&127](y,a),b=c[y>>2]|0,u[f>>0]=b,u[f+1>>0]=b>>8,u[f+2>>0]=b>>16,u[f+3>>0]=b>>24,bb[c[(c[a>>2]|0)+28>>2]&127](w,a),u[n>>0]&1?(u[c[n+8>>2]>>0]=0,c[n+4>>2]=0):(u[n+1>>0]=0,u[n>>0]=0),g=0,ga(91,n|0,0),f=g,g=0,f&1?
(n=J(0)|0,h(n)):(c[n>>2]=c[w>>2],c[n+4>>2]=c[w+4>>2],c[n+8>>2]=c[w+8>>2],c[w>>2]=0,c[w+4>>2]=0,c[w+8>>2]=0,W(w),x=a)),n=Ja[c[(c[a>>2]|0)+12>>2]&127](a)|0,u[l>>0]=n,n=Ja[c[(c[a>>2]|0)+16>>2]&127](a)|0,u[e>>0]=n,bb[c[(c[x>>2]|0)+20>>2]&127](B,a),u[k>>0]&1?(u[c[k+8>>2]>>0]=0,c[k+4>>2]=0):(u[k+1>>0]=0,u[k>>0]=0),g=0,ga(91,k|0,0),e=g,g=0,e&1&&(e=J(0)|0,h(e)),c[k>>2]=c[B>>2],c[k+4>>2]=c[B+4>>2],c[k+8>>2]=c[B+8>>2],c[B>>2]=0,c[B+4>>2]=0,c[B+8>>2]=0,W(B),bb[c[(c[x>>2]|0)+24>>2]&127](I,a),u[m>>0]&1?(u[c[m+
8>>2]>>0]=0,c[m+4>>2]=0):(u[m+1>>0]=0,u[m>>0]=0),g=0,ga(91,m|0,0),e=g,g=0,e&1?(e=J(0)|0,h(e)):(c[m>>2]=c[I>>2],c[m+4>>2]=c[I+4>>2],c[m+8>>2]=c[I+8>>2],c[I>>2]=0,c[I+4>>2]=0,c[I+8>>2]=0,W(I),G=Ja[c[(c[a>>2]|0)+36>>2]&127](a)|0)):(a=Sb(d,43764)|0,d=c[a>>2]|0,b?(bb[c[d+44>>2]&127](E,a),b=c[E>>2]|0,u[f>>0]=b,u[f+1>>0]=b>>8,u[f+2>>0]=b>>16,u[f+3>>0]=b>>24,bb[c[(c[a>>2]|0)+32>>2]&127](O,a),u[n>>0]&1?(u[c[n+8>>2]>>0]=0,c[n+4>>2]=0):(u[n+1>>0]=0,u[n>>0]=0),g=0,ga(91,n|0,0),f=g,g=0,f&1?(n=J(0)|0,h(n)):(c[n>>
2]=c[O>>2],c[n+4>>2]=c[O+4>>2],c[n+8>>2]=c[O+8>>2],c[O>>2]=0,c[O+4>>2]=0,c[O+8>>2]=0,W(O),r=a)):(bb[c[d+40>>2]&127](L,a),b=c[L>>2]|0,u[f>>0]=b,u[f+1>>0]=b>>8,u[f+2>>0]=b>>16,u[f+3>>0]=b>>24,bb[c[(c[a>>2]|0)+28>>2]&127](M,a),u[n>>0]&1?(u[c[n+8>>2]>>0]=0,c[n+4>>2]=0):(u[n+1>>0]=0,u[n>>0]=0),g=0,ga(91,n|0,0),f=g,g=0,f&1?(n=J(0)|0,h(n)):(c[n>>2]=c[M>>2],c[n+4>>2]=c[M+4>>2],c[n+8>>2]=c[M+8>>2],c[M>>2]=0,c[M+4>>2]=0,c[M+8>>2]=0,W(M),r=a)),n=Ja[c[(c[a>>2]|0)+12>>2]&127](a)|0,u[l>>0]=n,n=Ja[c[(c[a>>2]|0)+
16>>2]&127](a)|0,u[e>>0]=n,bb[c[(c[r>>2]|0)+20>>2]&127](D,a),u[k>>0]&1?(u[c[k+8>>2]>>0]=0,c[k+4>>2]=0):(u[k+1>>0]=0,u[k>>0]=0),g=0,ga(91,k|0,0),e=g,g=0,e&1&&(e=J(0)|0,h(e)),c[k>>2]=c[D>>2],c[k+4>>2]=c[D+4>>2],c[k+8>>2]=c[D+8>>2],c[D>>2]=0,c[D+4>>2]=0,c[D+8>>2]=0,W(D),bb[c[(c[r>>2]|0)+24>>2]&127](A,a),u[m>>0]&1?(u[c[m+8>>2]>>0]=0,c[m+4>>2]=0):(u[m+1>>0]=0,u[m>>0]=0),g=0,ga(91,m|0,0),e=g,g=0,e&1?(e=J(0)|0,h(e)):(c[m>>2]=c[A>>2],c[m+4>>2]=c[A+4>>2],c[m+8>>2]=c[A+8>>2],c[A>>2]=0,c[A+4>>2]=0,c[A+8>>2]=
0,W(A),G=Ja[c[(c[a>>2]|0)+36>>2]&127](a)|0));c[q>>2]=G;F=P},function(a,b,d,f,l,e,k,m,n,q){b|=0;d|=0;f|=0;l|=0;e|=0;k|=0;m|=0;n|=0;q|=0;var r=0,x=0,t=0,z=0,D=0,A=0,y=0,w=0,B=0,I=0,O=0,E=0,L=0,M=0,M=F;F=F+112|0;r=M+108|0;x=M+96|0;D=M+92|0;A=M+80|0;y=M+68|0;w=M+56|0;B=M+52|0;I=M+40|0;O=M+36|0;E=M+24|0;t=M+12|0;z=M;a|0?(a=Sb(d,43956)|0,d=c[a>>2]|0,b?(bb[c[d+44>>2]&127](r,a),b=c[r>>2]|0,u[f>>0]=b,u[f+1>>0]=b>>8,u[f+2>>0]=b>>16,u[f+3>>0]=b>>24,bb[c[(c[a>>2]|0)+32>>2]&127](x,a),u[n>>0]&1?c[c[n+8>>2]>>2]=
0:u[n>>0]=0,g=c[n+4>>2]=0,ga(93,n|0,0),f=g,g=0,f&1?(n=J(0)|0,h(n)):(c[n>>2]=c[x>>2],c[n+4>>2]=c[x+4>>2],c[n+8>>2]=c[x+8>>2],c[x>>2]=0,c[x+4>>2]=0,c[x+8>>2]=0,Ka(x))):(bb[c[d+40>>2]&127](D,a),b=c[D>>2]|0,u[f>>0]=b,u[f+1>>0]=b>>8,u[f+2>>0]=b>>16,u[f+3>>0]=b>>24,bb[c[(c[a>>2]|0)+28>>2]&127](A,a),u[n>>0]&1?c[c[n+8>>2]>>2]=0:u[n>>0]=0,g=c[n+4>>2]=0,ga(93,n|0,0),f=g,g=0,f&1?(n=J(0)|0,h(n)):(c[n>>2]=c[A>>2],c[n+4>>2]=c[A+4>>2],c[n+8>>2]=c[A+8>>2],c[A>>2]=0,c[A+4>>2]=0,c[A+8>>2]=0,Ka(A))),n=Ja[c[(c[a>>2]|
0)+12>>2]&127](a)|0,c[l>>2]=n,n=Ja[c[(c[a>>2]|0)+16>>2]&127](a)|0,c[e>>2]=n,bb[c[(c[a>>2]|0)+20>>2]&127](y,a),u[k>>0]&1?(u[c[k+8>>2]>>0]=0,c[k+4>>2]=0):(u[k+1>>0]=0,u[k>>0]=0),g=0,ga(91,k|0,0),e=g,g=0,e&1&&(e=J(0)|0,h(e)),c[k>>2]=c[y>>2],c[k+4>>2]=c[y+4>>2],c[k+8>>2]=c[y+8>>2],c[y>>2]=0,c[y+4>>2]=0,c[y+8>>2]=0,W(y),bb[c[(c[a>>2]|0)+24>>2]&127](w,a),u[m>>0]&1?c[c[m+8>>2]>>2]=0:u[m>>0]=0,g=c[m+4>>2]=0,ga(93,m|0,0),e=g,g=0,e&1?(e=J(0)|0,h(e)):(c[m>>2]=c[w>>2],c[m+4>>2]=c[w+4>>2],c[m+8>>2]=c[w+8>>2],
c[w>>2]=0,c[w+4>>2]=0,c[w+8>>2]=0,Ka(w),L=Ja[c[(c[a>>2]|0)+36>>2]&127](a)|0)):(a=Sb(d,43892)|0,d=c[a>>2]|0,b?(bb[c[d+44>>2]&127](B,a),b=c[B>>2]|0,u[f>>0]=b,u[f+1>>0]=b>>8,u[f+2>>0]=b>>16,u[f+3>>0]=b>>24,bb[c[(c[a>>2]|0)+32>>2]&127](I,a),u[n>>0]&1?c[c[n+8>>2]>>2]=0:u[n>>0]=0,g=c[n+4>>2]=0,ga(93,n|0,0),f=g,g=0,f&1?(n=J(0)|0,h(n)):(c[n>>2]=c[I>>2],c[n+4>>2]=c[I+4>>2],c[n+8>>2]=c[I+8>>2],c[I>>2]=0,c[I+4>>2]=0,c[I+8>>2]=0,Ka(I))):(bb[c[d+40>>2]&127](O,a),b=c[O>>2]|0,u[f>>0]=b,u[f+1>>0]=b>>8,u[f+2>>0]=
b>>16,u[f+3>>0]=b>>24,bb[c[(c[a>>2]|0)+28>>2]&127](E,a),u[n>>0]&1?c[c[n+8>>2]>>2]=0:u[n>>0]=0,g=c[n+4>>2]=0,ga(93,n|0,0),f=g,g=0,f&1?(n=J(0)|0,h(n)):(c[n>>2]=c[E>>2],c[n+4>>2]=c[E+4>>2],c[n+8>>2]=c[E+8>>2],c[E>>2]=0,c[E+4>>2]=0,c[E+8>>2]=0,Ka(E))),n=Ja[c[(c[a>>2]|0)+12>>2]&127](a)|0,c[l>>2]=n,n=Ja[c[(c[a>>2]|0)+16>>2]&127](a)|0,c[e>>2]=n,bb[c[(c[a>>2]|0)+20>>2]&127](t,a),u[k>>0]&1?(u[c[k+8>>2]>>0]=0,c[k+4>>2]=0):(u[k+1>>0]=0,u[k>>0]=0),g=0,ga(91,k|0,0),e=g,g=0,e&1&&(e=J(0)|0,h(e)),c[k>>2]=c[t>>2],
c[k+4>>2]=c[t+4>>2],c[k+8>>2]=c[t+8>>2],c[t>>2]=0,c[t+4>>2]=0,c[t+8>>2]=0,W(t),bb[c[(c[a>>2]|0)+24>>2]&127](z,a),u[m>>0]&1?c[c[m+8>>2]>>2]=0:u[m>>0]=0,g=c[m+4>>2]=0,ga(93,m|0,0),e=g,g=0,e&1?(e=J(0)|0,h(e)):(c[m>>2]=c[z>>2],c[m+4>>2]=c[z+4>>2],c[m+8>>2]=c[z+8>>2],c[z>>2]=0,c[z+4>>2]=0,c[z+8>>2]=0,Ka(z),L=Ja[c[(c[a>>2]|0)+36>>2]&127](a)|0));c[q>>2]=L;F=M},zf,zf,zf],vc=[Db,function(a,b){a|=0;b|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,D=0,A=0,y=0,w=0,I=0,B=0,y=F;F=F+352|0;w=y+328|0;
I=y+192|0;d=y+343|0;f=y+342|0;l=y+341|0;e=y+340|0;x=y+176|0;k=y+168|0;m=y+160|0;n=y+152|0;A=y;z=y+136|0;if(0!=(c[a+28>>2]|0)&&1!=(c[a+20>>2]|0)){t=a+4|0;D=a+32|0;h=c[D>>2]|0;if(!h){a=qa(48)|0;g=0;c[I>>2]=c[b>>2];c[I+4>>2]=c[b+4>>2];c[I+8>>2]=c[b+8>>2];u[w>>0]=u[d>>0]|0;pa(44,a|0,I|0,t|0,w|0);B=g;g=0;if(!(B&1))return F=y,a|0;B=J()|0;Q(a);V(B|0)}a=c[a+12>>2]|0;if(8==(a|0))switch(h|0){case 1:a=qa(48)|0;g=0;c[I>>2]=c[b>>2];c[I+4>>2]=c[b+4>>2];c[I+8>>2]=c[b+8>>2];u[w>>0]=u[f>>0]|0;pa(45,a|0,I|0,t|0,w|
0);B=g;g=0;if(!(B&1))return F=y,a|0;B=J()|0;Q(a);V(B|0);case 2:a=qa(48)|0;g=0;c[I>>2]=c[b>>2];c[I+4>>2]=c[b+4>>2];c[I+8>>2]=c[b+8>>2];u[w>>0]=u[l>>0]|0;pa(46,a|0,I|0,t|0,w|0);B=g;g=0;if(!(B&1))return F=y,a|0;B=J()|0;Q(a);V(B|0);case 3:a=qa(48)|0;g=0;c[I>>2]=c[b>>2];c[I+4>>2]=c[b+4>>2];c[I+8>>2]=c[b+8>>2];u[w>>0]=u[e>>0]|0;pa(47,a|0,I|0,t|0,w|0);B=g;g=0;if(!(B&1))return F=y,a|0;B=J()|0;Q(a);V(B|0);default:h=I+56|0;l=I+4|0;c[I>>2]=36160;c[h>>2]=36180;g=0;ga(62,I+56|0,l|0);y=g;g=0;y&1&&(B=J()|0,sa(h),
V(B|0));c[I+128>>2]=0;c[I+132>>2]=-1;c[I>>2]=36200;c[I+56>>2]=36220;g=0;ta(180,l|0);y=g;g=0;do if(y&1)a=J()|0;else if(c[l>>2]=36236,e=I+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[I+52>>2]=16,c[w>>2]=0,c[w+4>>2]=0,g=c[w+8>>2]=0,ga(63,l|0,w|0),y=g,g=0,y&1)a=J()|0,W(w),W(e),ya(l);else{W(w);g=0;a=La(28,I|0,49007,21)|0;w=g;g=0;do if(w&1||(g=0,q=ma(36,a|0,c[D>>2]|0)|0,w=g,g=0,w&1)||(g=0,La(28,q|0,50997,18)|0,w=g,g=0,w&1))B=34;else{f=xa(16)|0;g=0;ga(64,x|0,l|0);w=g;g=0;if(w&1)a=J()|0;else if(0==
(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,x|0),w=g,g=0,w&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(x),!d)break;za(f|0)}while(0);34==(B|0)&&(a=J()|0);c[I>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);B=a;V(B|0)}while(0);B=a;sa(h);V(B|0)}8>=(a|0)&&(a=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,a|0,8,35648),B=g,g=0,B&1||Pa(a|0,824,96),B=J()|0,za(a|0),V(B|0));d=16-a|0;switch(h|0){case 1:a=qa(60)|0;c[k>>2]=d;g=0;c[I>>2]=c[b>>2];c[I+
4>>2]=c[b+4>>2];c[I+8>>2]=c[b+8>>2];c[w>>2]=c[k>>2];c[w+4>>2]=c[k+4>>2];pa(41,a|0,I|0,t|0,w|0);B=g;g=0;if(!(B&1))return F=y,a|0;B=J()|0;Q(a);V(B|0);case 2:a=qa(60)|0;c[m>>2]=d;g=0;c[I>>2]=c[b>>2];c[I+4>>2]=c[b+4>>2];c[I+8>>2]=c[b+8>>2];c[w>>2]=c[m>>2];c[w+4>>2]=c[m+4>>2];pa(42,a|0,I|0,t|0,w|0);B=g;g=0;if(!(B&1))return F=y,a|0;B=J()|0;Q(a);V(B|0);case 3:a=qa(60)|0;c[n>>2]=d;g=0;c[I>>2]=c[b>>2];c[I+4>>2]=c[b+4>>2];c[I+8>>2]=c[b+8>>2];c[w>>2]=c[n>>2];c[w+4>>2]=c[n+4>>2];pa(43,a|0,I|0,t|0,w|0);B=g;g=
0;if(!(B&1))return F=y,a|0;B=J()|0;Q(a);V(B|0);default:h=A+56|0;l=A+4|0;c[A>>2]=36160;c[h>>2]=36180;g=0;ga(62,A+56|0,l|0);I=g;g=0;I&1&&(B=J()|0,sa(h),V(B|0));c[A+128>>2]=0;c[A+132>>2]=-1;c[A>>2]=36200;c[A+56>>2]=36220;g=0;ta(180,l|0);I=g;g=0;do if(I&1)a=J()|0;else if(c[l>>2]=36236,e=A+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[A+52>>2]=16,c[w>>2]=0,c[w+4>>2]=0,g=c[w+8>>2]=0,ga(63,l|0,w|0),I=g,g=0,I&1)a=J()|0,W(w),W(e),ya(l);else{W(w);g=0;a=La(28,A|0,49007,21)|0;I=g;g=0;do if(I&1||(g=0,
r=ma(36,a|0,c[D>>2]|0)|0,I=g,g=0,I&1)||(g=0,La(28,r|0,50997,18)|0,I=g,g=0,I&1))B=64;else{f=xa(16)|0;g=0;ga(64,z|0,l|0);I=g;g=0;if(I&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,z|0),I=g,g=0,I&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(z),!d)break;za(f|0)}while(0);64==(B|0)&&(a=J()|0);c[A>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);B=a;V(B|0)}while(0);B=a;sa(h);V(B|0)}}d=c[b+4>>2]|0;f=qa(16)|0;a=c[a+16>>2]|0;d?(c[f>>2]=36108,c[f+4>>2]=
d):(B=c[b>>2]|0,c[f>>2]=36132,c[f+4>>2]=B);c[f+8>>2]=1;c[f+12>>2]=a;F=y;return f|0},function(a,b){a|=0;b|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,D=0,A=0,y=0,w=0,I=0,B=0,y=F;F=F+352|0;w=y+328|0;I=y+192|0;d=y+343|0;f=y+342|0;l=y+341|0;e=y+340|0;x=y+176|0;k=y+168|0;m=y+160|0;n=y+152|0;A=y;z=y+136|0;if(0!=(c[a+28>>2]|0)&&1!=(c[a+20>>2]|0)){t=a+4|0;D=a+32|0;h=c[D>>2]|0;if(!h){a=qa(48)|0;g=0;c[I>>2]=c[b>>2];c[I+4>>2]=c[b+4>>2];c[I+8>>2]=c[b+8>>2];u[w>>0]=u[d>>0]|0;pa(44,a|0,I|0,t|0,w|
0);B=g;g=0;if(!(B&1))return F=y,a|0;B=J()|0;Q(a);V(B|0)}a=c[a+12>>2]|0;if(8==(a|0))switch(h|0){case 1:a=qa(48)|0;g=0;c[I>>2]=c[b>>2];c[I+4>>2]=c[b+4>>2];c[I+8>>2]=c[b+8>>2];u[w>>0]=u[f>>0]|0;pa(45,a|0,I|0,t|0,w|0);B=g;g=0;if(!(B&1))return F=y,a|0;B=J()|0;Q(a);V(B|0);case 2:a=qa(48)|0;g=0;c[I>>2]=c[b>>2];c[I+4>>2]=c[b+4>>2];c[I+8>>2]=c[b+8>>2];u[w>>0]=u[l>>0]|0;pa(46,a|0,I|0,t|0,w|0);B=g;g=0;if(!(B&1))return F=y,a|0;B=J()|0;Q(a);V(B|0);case 3:a=qa(48)|0;g=0;c[I>>2]=c[b>>2];c[I+4>>2]=c[b+4>>2];c[I+
8>>2]=c[b+8>>2];u[w>>0]=u[e>>0]|0;pa(47,a|0,I|0,t|0,w|0);B=g;g=0;if(!(B&1))return F=y,a|0;B=J()|0;Q(a);V(B|0);default:h=I+56|0;l=I+4|0;c[I>>2]=36160;c[h>>2]=36180;g=0;ga(62,I+56|0,l|0);y=g;g=0;y&1&&(B=J()|0,sa(h),V(B|0));c[I+128>>2]=0;c[I+132>>2]=-1;c[I>>2]=36200;c[I+56>>2]=36220;g=0;ta(180,l|0);y=g;g=0;do if(y&1)a=J()|0;else if(c[l>>2]=36236,e=I+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[I+52>>2]=16,c[w>>2]=0,c[w+4>>2]=0,g=c[w+8>>2]=0,ga(63,l|0,w|0),y=g,g=0,y&1)a=J()|0,W(w),W(e),ya(l);
else{W(w);g=0;a=La(28,I|0,49007,21)|0;w=g;g=0;do if(w&1||(g=0,q=ma(36,a|0,c[D>>2]|0)|0,w=g,g=0,w&1)||(g=0,La(28,q|0,50997,18)|0,w=g,g=0,w&1))B=34;else{f=xa(16)|0;g=0;ga(64,x|0,l|0);w=g;g=0;if(w&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,x|0),w=g,g=0,w&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(x),!d)break;za(f|0)}while(0);34==(B|0)&&(a=J()|0);c[I>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);B=a;V(B|0)}while(0);B=a;sa(h);V(B|0)}8>=(a|
0)&&(a=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,a|0,8,35648),B=g,g=0,B&1||Pa(a|0,824,96),B=J()|0,za(a|0),V(B|0));d=16-a|0;switch(h|0){case 1:a=qa(60)|0;c[k>>2]=d;g=0;c[I>>2]=c[b>>2];c[I+4>>2]=c[b+4>>2];c[I+8>>2]=c[b+8>>2];c[w>>2]=c[k>>2];c[w+4>>2]=c[k+4>>2];pa(41,a|0,I|0,t|0,w|0);B=g;g=0;if(!(B&1))return F=y,a|0;B=J()|0;Q(a);V(B|0);case 2:a=qa(60)|0;c[m>>2]=d;g=0;c[I>>2]=c[b>>2];c[I+4>>2]=c[b+4>>2];c[I+8>>2]=c[b+8>>2];c[w>>2]=c[m>>2];c[w+4>>2]=c[m+4>>2];pa(42,a|0,I|
0,t|0,w|0);B=g;g=0;if(!(B&1))return F=y,a|0;B=J()|0;Q(a);V(B|0);case 3:a=qa(60)|0;c[n>>2]=d;g=0;c[I>>2]=c[b>>2];c[I+4>>2]=c[b+4>>2];c[I+8>>2]=c[b+8>>2];c[w>>2]=c[n>>2];c[w+4>>2]=c[n+4>>2];pa(43,a|0,I|0,t|0,w|0);B=g;g=0;if(!(B&1))return F=y,a|0;B=J()|0;Q(a);V(B|0);default:h=A+56|0;l=A+4|0;c[A>>2]=36160;c[h>>2]=36180;g=0;ga(62,A+56|0,l|0);I=g;g=0;I&1&&(B=J()|0,sa(h),V(B|0));c[A+128>>2]=0;c[A+132>>2]=-1;c[A>>2]=36200;c[A+56>>2]=36220;g=0;ta(180,l|0);I=g;g=0;do if(I&1)a=J()|0;else if(c[l>>2]=36236,e=
A+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[A+52>>2]=16,c[w>>2]=0,c[w+4>>2]=0,g=c[w+8>>2]=0,ga(63,l|0,w|0),I=g,g=0,I&1)a=J()|0,W(w),W(e),ya(l);else{W(w);g=0;a=La(28,A|0,49007,21)|0;I=g;g=0;do if(I&1||(g=0,r=ma(36,a|0,c[D>>2]|0)|0,I=g,g=0,I&1)||(g=0,La(28,r|0,50997,18)|0,I=g,g=0,I&1))B=64;else{f=xa(16)|0;g=0;ga(64,z|0,l|0);I=g;g=0;if(I&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,z|0),I=g,g=0,I&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,
W(z),!d)break;za(f|0)}while(0);64==(B|0)&&(a=J()|0);c[A>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);B=a;V(B|0)}while(0);B=a;sa(h);V(B|0)}}d=c[b+4>>2]|0;f=qa(16)|0;a=c[a+16>>2]|0;d?(c[f>>2]=36108,c[f+4>>2]=d):(B=c[b>>2]|0,c[f>>2]=36132,c[f+4>>2]=B);c[f+8>>2]=3;c[f+12>>2]=a;F=y;return f|0},function(a,b){a|=0;b|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,D=0,A=0,w=0,y=0,I=0,B=0,w=F;F=F+352|0;y=w+328|0;I=w+192|0;d=w+343|0;f=w+342|0;l=w+341|0;e=w+340|0;x=w+176|0;k=w+168|0;m=w+
160|0;n=w+152|0;A=w;z=w+136|0;if(0!=(c[a+28>>2]|0)&&1!=(c[a+20>>2]|0)){t=a+4|0;D=a+32|0;h=c[D>>2]|0;if(!h){a=qa(48)|0;g=0;c[I>>2]=c[b>>2];c[I+4>>2]=c[b+4>>2];c[I+8>>2]=c[b+8>>2];u[y>>0]=u[d>>0]|0;pa(44,a|0,I|0,t|0,y|0);B=g;g=0;if(!(B&1))return F=w,a|0;B=J()|0;Q(a);V(B|0)}a=c[a+12>>2]|0;if(8==(a|0))switch(h|0){case 1:a=qa(48)|0;g=0;c[I>>2]=c[b>>2];c[I+4>>2]=c[b+4>>2];c[I+8>>2]=c[b+8>>2];u[y>>0]=u[f>>0]|0;pa(45,a|0,I|0,t|0,y|0);B=g;g=0;if(!(B&1))return F=w,a|0;B=J()|0;Q(a);V(B|0);case 2:a=qa(48)|0;
g=0;c[I>>2]=c[b>>2];c[I+4>>2]=c[b+4>>2];c[I+8>>2]=c[b+8>>2];u[y>>0]=u[l>>0]|0;pa(46,a|0,I|0,t|0,y|0);B=g;g=0;if(!(B&1))return F=w,a|0;B=J()|0;Q(a);V(B|0);case 3:a=qa(48)|0;g=0;c[I>>2]=c[b>>2];c[I+4>>2]=c[b+4>>2];c[I+8>>2]=c[b+8>>2];u[y>>0]=u[e>>0]|0;pa(47,a|0,I|0,t|0,y|0);B=g;g=0;if(!(B&1))return F=w,a|0;B=J()|0;Q(a);V(B|0);default:h=I+56|0;l=I+4|0;c[I>>2]=36160;c[h>>2]=36180;g=0;ga(62,I+56|0,l|0);w=g;g=0;w&1&&(B=J()|0,sa(h),V(B|0));c[I+128>>2]=0;c[I+132>>2]=-1;c[I>>2]=36200;c[I+56>>2]=36220;g=0;
ta(180,l|0);w=g;g=0;do if(w&1)a=J()|0;else if(c[l>>2]=36236,e=I+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[I+52>>2]=16,c[y>>2]=0,c[y+4>>2]=0,g=c[y+8>>2]=0,ga(63,l|0,y|0),w=g,g=0,w&1)a=J()|0,W(y),W(e),ya(l);else{W(y);g=0;a=La(28,I|0,49007,21)|0;y=g;g=0;do if(y&1||(g=0,q=ma(36,a|0,c[D>>2]|0)|0,y=g,g=0,y&1)||(g=0,La(28,q|0,50997,18)|0,y=g,g=0,y&1))B=34;else{f=xa(16)|0;g=0;ga(64,x|0,l|0);y=g;g=0;if(y&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,
x|0),y=g,g=0,y&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(x),!d)break;za(f|0)}while(0);34==(B|0)&&(a=J()|0);c[I>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);B=a;V(B|0)}while(0);B=a;sa(h);V(B|0)}8>=(a|0)&&(a=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,a|0,8,35648),B=g,g=0,B&1||Pa(a|0,824,96),B=J()|0,za(a|0),V(B|0));d=16-a|0;switch(h|0){case 1:a=qa(60)|0;c[k>>2]=d;g=0;c[I>>2]=c[b>>2];c[I+4>>2]=c[b+4>>2];c[I+8>>2]=c[b+8>>2];c[y>>2]=c[k>>2];c[y+4>>2]=c[k+4>>2];
pa(41,a|0,I|0,t|0,y|0);B=g;g=0;if(!(B&1))return F=w,a|0;B=J()|0;Q(a);V(B|0);case 2:a=qa(60)|0;c[m>>2]=d;g=0;c[I>>2]=c[b>>2];c[I+4>>2]=c[b+4>>2];c[I+8>>2]=c[b+8>>2];c[y>>2]=c[m>>2];c[y+4>>2]=c[m+4>>2];pa(42,a|0,I|0,t|0,y|0);B=g;g=0;if(!(B&1))return F=w,a|0;B=J()|0;Q(a);V(B|0);case 3:a=qa(60)|0;c[n>>2]=d;g=0;c[I>>2]=c[b>>2];c[I+4>>2]=c[b+4>>2];c[I+8>>2]=c[b+8>>2];c[y>>2]=c[n>>2];c[y+4>>2]=c[n+4>>2];pa(43,a|0,I|0,t|0,y|0);B=g;g=0;if(!(B&1))return F=w,a|0;B=J()|0;Q(a);V(B|0);default:h=A+56|0;l=A+4|0;
c[A>>2]=36160;c[h>>2]=36180;g=0;ga(62,A+56|0,l|0);I=g;g=0;I&1&&(B=J()|0,sa(h),V(B|0));c[A+128>>2]=0;c[A+132>>2]=-1;c[A>>2]=36200;c[A+56>>2]=36220;g=0;ta(180,l|0);I=g;g=0;do if(I&1)a=J()|0;else if(c[l>>2]=36236,e=A+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[A+52>>2]=16,c[y>>2]=0,c[y+4>>2]=0,g=c[y+8>>2]=0,ga(63,l|0,y|0),I=g,g=0,I&1)a=J()|0,W(y),W(e),ya(l);else{W(y);g=0;a=La(28,A|0,49007,21)|0;I=g;g=0;do if(I&1||(g=0,r=ma(36,a|0,c[D>>2]|0)|0,I=g,g=0,I&1)||(g=0,La(28,r|0,50997,18)|0,I=g,g=
0,I&1))B=64;else{f=xa(16)|0;g=0;ga(64,z|0,l|0);I=g;g=0;if(I&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,z|0),I=g,g=0,I&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(z),!d)break;za(f|0)}while(0);64==(B|0)&&(a=J()|0);c[A>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);B=a;V(B|0)}while(0);B=a;sa(h);V(B|0)}}d=c[b+4>>2]|0;f=qa(16)|0;a=c[a+16>>2]|0;d?(c[f>>2]=36108,c[f+4>>2]=d):(B=c[b>>2]|0,c[f>>2]=36132,c[f+4>>2]=B);c[f+8>>2]=1;c[f+12>>2]=a;F=w;
return f|0},function(a,b){a|=0;b|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,D=0,A=0,y=0,w=0,B=0,E=0,y=F;F=F+352|0;w=y+328|0;B=y+192|0;d=y+343|0;f=y+342|0;l=y+341|0;e=y+340|0;x=y+176|0;k=y+168|0;m=y+160|0;n=y+152|0;A=y;z=y+136|0;if(0!=(c[a+28>>2]|0)&&1!=(c[a+20>>2]|0)){t=a+4|0;D=a+32|0;h=c[D>>2]|0;if(!h){a=qa(48)|0;g=0;c[B>>2]=c[b>>2];c[B+4>>2]=c[b+4>>2];c[B+8>>2]=c[b+8>>2];u[w>>0]=u[d>>0]|0;pa(37,a|0,B|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=y,a|0;E=J()|0;Q(a);V(E|0)}a=c[a+12>>2]|0;
if(16==(a|0))switch(h|0){case 1:a=qa(48)|0;g=0;c[B>>2]=c[b>>2];c[B+4>>2]=c[b+4>>2];c[B+8>>2]=c[b+8>>2];u[w>>0]=u[f>>0]|0;pa(38,a|0,B|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=y,a|0;E=J()|0;Q(a);V(E|0);case 2:a=qa(48)|0;g=0;c[B>>2]=c[b>>2];c[B+4>>2]=c[b+4>>2];c[B+8>>2]=c[b+8>>2];u[w>>0]=u[l>>0]|0;pa(39,a|0,B|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=y,a|0;E=J()|0;Q(a);V(E|0);case 3:a=qa(48)|0;g=0;c[B>>2]=c[b>>2];c[B+4>>2]=c[b+4>>2];c[B+8>>2]=c[b+8>>2];u[w>>0]=u[e>>0]|0;pa(40,a|0,B|0,t|0,w|0);E=g;g=0;if(!(E&
1))return F=y,a|0;E=J()|0;Q(a);V(E|0);default:h=B+56|0;l=B+4|0;c[B>>2]=36160;c[h>>2]=36180;g=0;ga(62,B+56|0,l|0);y=g;g=0;y&1&&(E=J()|0,sa(h),V(E|0));c[B+128>>2]=0;c[B+132>>2]=-1;c[B>>2]=36200;c[B+56>>2]=36220;g=0;ta(180,l|0);y=g;g=0;do if(y&1)a=J()|0;else if(c[l>>2]=36236,e=B+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[B+52>>2]=16,c[w>>2]=0,c[w+4>>2]=0,g=c[w+8>>2]=0,ga(63,l|0,w|0),y=g,g=0,y&1)a=J()|0,W(w),W(e),ya(l);else{W(w);g=0;a=La(28,B|0,49007,21)|0;w=g;g=0;do if(w&1||(g=0,q=ma(36,a|
0,c[D>>2]|0)|0,w=g,g=0,w&1)||(g=0,La(28,q|0,50997,18)|0,w=g,g=0,w&1))E=34;else{f=xa(16)|0;g=0;ga(64,x|0,l|0);w=g;g=0;if(w&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,x|0),w=g,g=0,w&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(x),!d)break;za(f|0)}while(0);34==(E|0)&&(a=J()|0);c[B>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);E=a;V(E|0)}while(0);E=a;sa(h);V(E|0)}8>=(a|0)&&(a=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=
0,na(7,a|0,8,35648),E=g,g=0,E&1||Pa(a|0,824,96),E=J()|0,za(a|0),V(E|0));d=16-a|0;switch(h|0){case 1:a=qa(60)|0;c[k>>2]=d;g=0;c[B>>2]=c[b>>2];c[B+4>>2]=c[b+4>>2];c[B+8>>2]=c[b+8>>2];c[w>>2]=c[k>>2];c[w+4>>2]=c[k+4>>2];pa(41,a|0,B|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=y,a|0;E=J()|0;Q(a);V(E|0);case 2:a=qa(60)|0;c[m>>2]=d;g=0;c[B>>2]=c[b>>2];c[B+4>>2]=c[b+4>>2];c[B+8>>2]=c[b+8>>2];c[w>>2]=c[m>>2];c[w+4>>2]=c[m+4>>2];pa(42,a|0,B|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=y,a|0;E=J()|0;Q(a);V(E|0);case 3:a=
qa(60)|0;c[n>>2]=d;g=0;c[B>>2]=c[b>>2];c[B+4>>2]=c[b+4>>2];c[B+8>>2]=c[b+8>>2];c[w>>2]=c[n>>2];c[w+4>>2]=c[n+4>>2];pa(43,a|0,B|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=y,a|0;E=J()|0;Q(a);V(E|0);default:h=A+56|0;l=A+4|0;c[A>>2]=36160;c[h>>2]=36180;g=0;ga(62,A+56|0,l|0);B=g;g=0;B&1&&(E=J()|0,sa(h),V(E|0));c[A+128>>2]=0;c[A+132>>2]=-1;c[A>>2]=36200;c[A+56>>2]=36220;g=0;ta(180,l|0);B=g;g=0;do if(B&1)a=J()|0;else if(c[l>>2]=36236,e=A+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[A+52>>2]=16,c[w>>
2]=0,c[w+4>>2]=0,g=c[w+8>>2]=0,ga(63,l|0,w|0),B=g,g=0,B&1)a=J()|0,W(w),W(e),ya(l);else{W(w);g=0;a=La(28,A|0,49007,21)|0;B=g;g=0;do if(B&1||(g=0,r=ma(36,a|0,c[D>>2]|0)|0,B=g,g=0,B&1)||(g=0,La(28,r|0,50997,18)|0,B=g,g=0,B&1))E=64;else{f=xa(16)|0;g=0;ga(64,z|0,l|0);B=g;g=0;if(B&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,z|0),B=g,g=0,B&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(z),!d)break;za(f|0)}while(0);64==(E|0)&&(a=J()|0);c[A>>2]=36200;c[h>>2]=
36220;c[l>>2]=36236;W(e);ya(l);sa(h);E=a;V(E|0)}while(0);E=a;sa(h);V(E|0)}}d=c[b+4>>2]|0;f=qa(16)|0;a=c[a+16>>2]|0;d?(c[f>>2]=36108,c[f+4>>2]=d):(E=c[b>>2]|0,c[f>>2]=36132,c[f+4>>2]=E);c[f+8>>2]=2;c[f+12>>2]=a;F=y;return f|0},function(a,b){a|=0;b|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,A=0,D=0,B=0,w=0,y=0,E=0,B=F;F=F+352|0;w=B+328|0;y=B+192|0;d=B+343|0;f=B+342|0;l=B+341|0;e=B+340|0;x=B+176|0;k=B+168|0;m=B+160|0;n=B+152|0;D=B;z=B+136|0;if(0!=(c[a+28>>2]|0)&&1!=(c[a+20>>2]|0)){t=
a+4|0;A=a+32|0;h=c[A>>2]|0;if(!h){a=qa(48)|0;g=0;c[y>>2]=c[b>>2];c[y+4>>2]=c[b+4>>2];c[y+8>>2]=c[b+8>>2];u[w>>0]=u[d>>0]|0;pa(37,a|0,y|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0)}a=c[a+12>>2]|0;if(16==(a|0))switch(h|0){case 1:a=qa(48)|0;g=0;c[y>>2]=c[b>>2];c[y+4>>2]=c[b+4>>2];c[y+8>>2]=c[b+8>>2];u[w>>0]=u[f>>0]|0;pa(38,a|0,y|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0);case 2:a=qa(48)|0;g=0;c[y>>2]=c[b>>2];c[y+4>>2]=c[b+4>>2];c[y+8>>2]=c[b+8>>2];u[w>>0]=u[l>>
0]|0;pa(39,a|0,y|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0);case 3:a=qa(48)|0;g=0;c[y>>2]=c[b>>2];c[y+4>>2]=c[b+4>>2];c[y+8>>2]=c[b+8>>2];u[w>>0]=u[e>>0]|0;pa(40,a|0,y|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0);default:h=y+56|0;l=y+4|0;c[y>>2]=36160;c[h>>2]=36180;g=0;ga(62,y+56|0,l|0);B=g;g=0;B&1&&(E=J()|0,sa(h),V(E|0));c[y+128>>2]=0;c[y+132>>2]=-1;c[y>>2]=36200;c[y+56>>2]=36220;g=0;ta(180,l|0);B=g;g=0;do if(B&1)a=J()|0;else if(c[l>>2]=36236,e=y+36|0,c[e>>
2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[y+52>>2]=16,c[w>>2]=0,c[w+4>>2]=0,g=c[w+8>>2]=0,ga(63,l|0,w|0),B=g,g=0,B&1)a=J()|0,W(w),W(e),ya(l);else{W(w);g=0;a=La(28,y|0,49007,21)|0;w=g;g=0;do if(w&1||(g=0,q=ma(36,a|0,c[A>>2]|0)|0,w=g,g=0,w&1)||(g=0,La(28,q|0,50997,18)|0,w=g,g=0,w&1))E=34;else{f=xa(16)|0;g=0;ga(64,x|0,l|0);w=g;g=0;if(w&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,x|0),w=g,g=0,w&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(x),!d)break;
za(f|0)}while(0);34==(E|0)&&(a=J()|0);c[y>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);E=a;V(E|0)}while(0);E=a;sa(h);V(E|0)}8>=(a|0)&&(a=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,a|0,8,35648),E=g,g=0,E&1||Pa(a|0,824,96),E=J()|0,za(a|0),V(E|0));d=16-a|0;switch(h|0){case 1:a=qa(60)|0;c[k>>2]=d;g=0;c[y>>2]=c[b>>2];c[y+4>>2]=c[b+4>>2];c[y+8>>2]=c[b+8>>2];c[w>>2]=c[k>>2];c[w+4>>2]=c[k+4>>2];pa(41,a|0,y|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|
0);case 2:a=qa(60)|0;c[m>>2]=d;g=0;c[y>>2]=c[b>>2];c[y+4>>2]=c[b+4>>2];c[y+8>>2]=c[b+8>>2];c[w>>2]=c[m>>2];c[w+4>>2]=c[m+4>>2];pa(42,a|0,y|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0);case 3:a=qa(60)|0;c[n>>2]=d;g=0;c[y>>2]=c[b>>2];c[y+4>>2]=c[b+4>>2];c[y+8>>2]=c[b+8>>2];c[w>>2]=c[n>>2];c[w+4>>2]=c[n+4>>2];pa(43,a|0,y|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0);default:h=D+56|0;l=D+4|0;c[D>>2]=36160;c[h>>2]=36180;g=0;ga(62,D+56|0,l|0);y=g;g=0;y&1&&(E=J()|0,sa(h),
V(E|0));c[D+128>>2]=0;c[D+132>>2]=-1;c[D>>2]=36200;c[D+56>>2]=36220;g=0;ta(180,l|0);y=g;g=0;do if(y&1)a=J()|0;else if(c[l>>2]=36236,e=D+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[D+52>>2]=16,c[w>>2]=0,c[w+4>>2]=0,g=c[w+8>>2]=0,ga(63,l|0,w|0),y=g,g=0,y&1)a=J()|0,W(w),W(e),ya(l);else{W(w);g=0;a=La(28,D|0,49007,21)|0;y=g;g=0;do if(y&1||(g=0,r=ma(36,a|0,c[A>>2]|0)|0,y=g,g=0,y&1)||(g=0,La(28,r|0,50997,18)|0,y=g,g=0,y&1))E=64;else{f=xa(16)|0;g=0;ga(64,z|0,l|0);y=g;g=0;if(y&1)a=J()|0;else if(0==
(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,z|0),y=g,g=0,y&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(z),!d)break;za(f|0)}while(0);64==(E|0)&&(a=J()|0);c[D>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);E=a;V(E|0)}while(0);E=a;sa(h);V(E|0)}}d=c[b+4>>2]|0;f=qa(16)|0;a=c[a+16>>2]|0;d?(c[f>>2]=36108,c[f+4>>2]=d):(E=c[b>>2]|0,c[f>>2]=36132,c[f+4>>2]=E);c[f+8>>2]=2;c[f+12>>2]=a;F=B;return f|0},function(a,b){a|=0;b|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=
0,t=0,z=0,D=0,A=0,y=0,w=0,B=0,E=0,y=F;F=F+352|0;w=y+328|0;B=y+192|0;d=y+343|0;f=y+342|0;l=y+341|0;e=y+340|0;x=y+176|0;k=y+168|0;m=y+160|0;n=y+152|0;A=y;z=y+136|0;if(0!=(c[a+28>>2]|0)&&1!=(c[a+20>>2]|0)){t=a+4|0;D=a+32|0;h=c[D>>2]|0;if(!h){a=qa(48)|0;g=0;c[B>>2]=c[b>>2];c[B+4>>2]=c[b+4>>2];c[B+8>>2]=c[b+8>>2];u[w>>0]=u[d>>0]|0;pa(44,a|0,B|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=y,a|0;E=J()|0;Q(a);V(E|0)}a=c[a+12>>2]|0;if(8==(a|0))switch(h|0){case 1:a=qa(48)|0;g=0;c[B>>2]=c[b>>2];c[B+4>>2]=c[b+4>>2];
c[B+8>>2]=c[b+8>>2];u[w>>0]=u[f>>0]|0;pa(45,a|0,B|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=y,a|0;E=J()|0;Q(a);V(E|0);case 2:a=qa(48)|0;g=0;c[B>>2]=c[b>>2];c[B+4>>2]=c[b+4>>2];c[B+8>>2]=c[b+8>>2];u[w>>0]=u[l>>0]|0;pa(46,a|0,B|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=y,a|0;E=J()|0;Q(a);V(E|0);case 3:a=qa(48)|0;g=0;c[B>>2]=c[b>>2];c[B+4>>2]=c[b+4>>2];c[B+8>>2]=c[b+8>>2];u[w>>0]=u[e>>0]|0;pa(47,a|0,B|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=y,a|0;E=J()|0;Q(a);V(E|0);default:h=B+56|0;l=B+4|0;c[B>>2]=36160;c[h>>
2]=36180;g=0;ga(62,B+56|0,l|0);y=g;g=0;y&1&&(E=J()|0,sa(h),V(E|0));c[B+128>>2]=0;c[B+132>>2]=-1;c[B>>2]=36200;c[B+56>>2]=36220;g=0;ta(180,l|0);y=g;g=0;do if(y&1)a=J()|0;else if(c[l>>2]=36236,e=B+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[B+52>>2]=16,c[w>>2]=0,c[w+4>>2]=0,g=c[w+8>>2]=0,ga(63,l|0,w|0),y=g,g=0,y&1)a=J()|0,W(w),W(e),ya(l);else{W(w);g=0;a=La(28,B|0,49007,21)|0;w=g;g=0;do if(w&1||(g=0,q=ma(36,a|0,c[D>>2]|0)|0,w=g,g=0,w&1)||(g=0,La(28,q|0,50997,18)|0,w=g,g=0,w&1))E=34;else{f=
xa(16)|0;g=0;ga(64,x|0,l|0);w=g;g=0;if(w&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,x|0),w=g,g=0,w&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(x),!d)break;za(f|0)}while(0);34==(E|0)&&(a=J()|0);c[B>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);E=a;V(E|0)}while(0);E=a;sa(h);V(E|0)}8>=(a|0)&&(a=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,a|0,8,35648),E=g,g=0,E&1||Pa(a|0,824,96),E=J()|0,za(a|0),V(E|0));d=16-a|0;
switch(h|0){case 1:a=qa(60)|0;c[k>>2]=d;g=0;c[B>>2]=c[b>>2];c[B+4>>2]=c[b+4>>2];c[B+8>>2]=c[b+8>>2];c[w>>2]=c[k>>2];c[w+4>>2]=c[k+4>>2];pa(41,a|0,B|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=y,a|0;E=J()|0;Q(a);V(E|0);case 2:a=qa(60)|0;c[m>>2]=d;g=0;c[B>>2]=c[b>>2];c[B+4>>2]=c[b+4>>2];c[B+8>>2]=c[b+8>>2];c[w>>2]=c[m>>2];c[w+4>>2]=c[m+4>>2];pa(42,a|0,B|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=y,a|0;E=J()|0;Q(a);V(E|0);case 3:a=qa(60)|0;c[n>>2]=d;g=0;c[B>>2]=c[b>>2];c[B+4>>2]=c[b+4>>2];c[B+8>>2]=c[b+8>>2];c[w>>
2]=c[n>>2];c[w+4>>2]=c[n+4>>2];pa(43,a|0,B|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=y,a|0;E=J()|0;Q(a);V(E|0);default:h=A+56|0;l=A+4|0;c[A>>2]=36160;c[h>>2]=36180;g=0;ga(62,A+56|0,l|0);B=g;g=0;B&1&&(E=J()|0,sa(h),V(E|0));c[A+128>>2]=0;c[A+132>>2]=-1;c[A>>2]=36200;c[A+56>>2]=36220;g=0;ta(180,l|0);B=g;g=0;do if(B&1)a=J()|0;else if(c[l>>2]=36236,e=A+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[A+52>>2]=16,c[w>>2]=0,c[w+4>>2]=0,g=c[w+8>>2]=0,ga(63,l|0,w|0),B=g,g=0,B&1)a=J()|0,W(w),W(e),ya(l);else{W(w);
g=0;a=La(28,A|0,49007,21)|0;B=g;g=0;do if(B&1||(g=0,r=ma(36,a|0,c[D>>2]|0)|0,B=g,g=0,B&1)||(g=0,La(28,r|0,50997,18)|0,B=g,g=0,B&1))E=64;else{f=xa(16)|0;g=0;ga(64,z|0,l|0);B=g;g=0;if(B&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,z|0),B=g,g=0,B&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(z),!d)break;za(f|0)}while(0);64==(E|0)&&(a=J()|0);c[A>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);E=a;V(E|0)}while(0);E=a;sa(h);V(E|0)}}d=c[b+4>>2]|0;f=
qa(16)|0;a=c[a+16>>2]|0;d?(c[f>>2]=36108,c[f+4>>2]=d):(E=c[b>>2]|0,c[f>>2]=36132,c[f+4>>2]=E);c[f+8>>2]=3;c[f+12>>2]=a;F=y;return f|0},function(a,b){a|=0;b|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,B=0,w=0,A=0,D=0,y=0,E=0,A=F;F=F+352|0;D=A+328|0;y=A+192|0;d=A+343|0;f=A+342|0;l=A+341|0;e=A+340|0;x=A+176|0;k=A+168|0;m=A+160|0;n=A+152|0;w=A;z=A+136|0;if(0!=(c[a+28>>2]|0)&&1!=(c[a+20>>2]|0)){t=a+4|0;B=a+32|0;h=c[B>>2]|0;if(!h){a=qa(48)|0;g=0;c[y>>2]=c[b>>2];c[y+4>>2]=c[b+4>>2];c[y+8>>
2]=c[b+8>>2];u[D>>0]=u[d>>0]|0;pa(37,a|0,y|0,t|0,D|0);E=g;g=0;if(!(E&1))return F=A,a|0;E=J()|0;Q(a);V(E|0)}a=c[a+12>>2]|0;if(16==(a|0))switch(h|0){case 1:a=qa(48)|0;g=0;c[y>>2]=c[b>>2];c[y+4>>2]=c[b+4>>2];c[y+8>>2]=c[b+8>>2];u[D>>0]=u[f>>0]|0;pa(38,a|0,y|0,t|0,D|0);E=g;g=0;if(!(E&1))return F=A,a|0;E=J()|0;Q(a);V(E|0);case 2:a=qa(48)|0;g=0;c[y>>2]=c[b>>2];c[y+4>>2]=c[b+4>>2];c[y+8>>2]=c[b+8>>2];u[D>>0]=u[l>>0]|0;pa(39,a|0,y|0,t|0,D|0);E=g;g=0;if(!(E&1))return F=A,a|0;E=J()|0;Q(a);V(E|0);case 3:a=qa(48)|
0;g=0;c[y>>2]=c[b>>2];c[y+4>>2]=c[b+4>>2];c[y+8>>2]=c[b+8>>2];u[D>>0]=u[e>>0]|0;pa(40,a|0,y|0,t|0,D|0);E=g;g=0;if(!(E&1))return F=A,a|0;E=J()|0;Q(a);V(E|0);default:h=y+56|0;l=y+4|0;c[y>>2]=36160;c[h>>2]=36180;g=0;ga(62,y+56|0,l|0);A=g;g=0;A&1&&(E=J()|0,sa(h),V(E|0));c[y+128>>2]=0;c[y+132>>2]=-1;c[y>>2]=36200;c[y+56>>2]=36220;g=0;ta(180,l|0);A=g;g=0;do if(A&1)a=J()|0;else if(c[l>>2]=36236,e=y+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[y+52>>2]=16,c[D>>2]=0,c[D+4>>2]=0,g=c[D+8>>2]=0,ga(63,
l|0,D|0),A=g,g=0,A&1)a=J()|0,W(D),W(e),ya(l);else{W(D);g=0;a=La(28,y|0,49007,21)|0;D=g;g=0;do if(D&1||(g=0,q=ma(36,a|0,c[B>>2]|0)|0,D=g,g=0,D&1)||(g=0,La(28,q|0,50997,18)|0,D=g,g=0,D&1))E=34;else{f=xa(16)|0;g=0;ga(64,x|0,l|0);D=g;g=0;if(D&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,x|0),D=g,g=0,D&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(x),!d)break;za(f|0)}while(0);34==(E|0)&&(a=J()|0);c[y>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);
E=a;V(E|0)}while(0);E=a;sa(h);V(E|0)}8>=(a|0)&&(a=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,a|0,8,35648),E=g,g=0,E&1||Pa(a|0,824,96),E=J()|0,za(a|0),V(E|0));d=16-a|0;switch(h|0){case 1:a=qa(60)|0;c[k>>2]=d;g=0;c[y>>2]=c[b>>2];c[y+4>>2]=c[b+4>>2];c[y+8>>2]=c[b+8>>2];c[D>>2]=c[k>>2];c[D+4>>2]=c[k+4>>2];pa(41,a|0,y|0,t|0,D|0);E=g;g=0;if(!(E&1))return F=A,a|0;E=J()|0;Q(a);V(E|0);case 2:a=qa(60)|0;c[m>>2]=d;g=0;c[y>>2]=c[b>>2];c[y+4>>2]=c[b+4>>2];c[y+8>>2]=c[b+8>>2];c[D>>
2]=c[m>>2];c[D+4>>2]=c[m+4>>2];pa(42,a|0,y|0,t|0,D|0);E=g;g=0;if(!(E&1))return F=A,a|0;E=J()|0;Q(a);V(E|0);case 3:a=qa(60)|0;c[n>>2]=d;g=0;c[y>>2]=c[b>>2];c[y+4>>2]=c[b+4>>2];c[y+8>>2]=c[b+8>>2];c[D>>2]=c[n>>2];c[D+4>>2]=c[n+4>>2];pa(43,a|0,y|0,t|0,D|0);E=g;g=0;if(!(E&1))return F=A,a|0;E=J()|0;Q(a);V(E|0);default:h=w+56|0;l=w+4|0;c[w>>2]=36160;c[h>>2]=36180;g=0;ga(62,w+56|0,l|0);y=g;g=0;y&1&&(E=J()|0,sa(h),V(E|0));c[w+128>>2]=0;c[w+132>>2]=-1;c[w>>2]=36200;c[w+56>>2]=36220;g=0;ta(180,l|0);y=g;g=0;
do if(y&1)a=J()|0;else if(c[l>>2]=36236,e=w+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[w+52>>2]=16,c[D>>2]=0,c[D+4>>2]=0,g=c[D+8>>2]=0,ga(63,l|0,D|0),y=g,g=0,y&1)a=J()|0,W(D),W(e),ya(l);else{W(D);g=0;a=La(28,w|0,49007,21)|0;y=g;g=0;do if(y&1||(g=0,r=ma(36,a|0,c[B>>2]|0)|0,y=g,g=0,y&1)||(g=0,La(28,r|0,50997,18)|0,y=g,g=0,y&1))E=64;else{f=xa(16)|0;g=0;ga(64,z|0,l|0);y=g;g=0;if(y&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,z|0),y=g,g=0,y&
1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(z),!d)break;za(f|0)}while(0);64==(E|0)&&(a=J()|0);c[w>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);E=a;V(E|0)}while(0);E=a;sa(h);V(E|0)}}d=c[b+4>>2]|0;f=qa(16)|0;a=c[a+16>>2]|0;d?(c[f>>2]=36108,c[f+4>>2]=d):(E=c[b>>2]|0,c[f>>2]=36132,c[f+4>>2]=E);c[f+8>>2]=6;c[f+12>>2]=a;F=A;return f|0},function(a,b){a|=0;b|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,y=0,D=0,A=0,B=0,w=0,E=0,A=F;F=F+352|0;B=A+328|0;w=A+192|0;d=A+343|0;f=A+342|0;
l=A+341|0;e=A+340|0;x=A+176|0;k=A+168|0;m=A+160|0;n=A+152|0;D=A;z=A+136|0;if(0!=(c[a+28>>2]|0)&&1!=(c[a+20>>2]|0)){t=a+4|0;y=a+32|0;h=c[y>>2]|0;if(!h){a=qa(48)|0;g=0;c[w>>2]=c[b>>2];c[w+4>>2]=c[b+4>>2];c[w+8>>2]=c[b+8>>2];u[B>>0]=u[d>>0]|0;pa(37,a|0,w|0,t|0,B|0);E=g;g=0;if(!(E&1))return F=A,a|0;E=J()|0;Q(a);V(E|0)}a=c[a+12>>2]|0;if(16==(a|0))switch(h|0){case 1:a=qa(48)|0;g=0;c[w>>2]=c[b>>2];c[w+4>>2]=c[b+4>>2];c[w+8>>2]=c[b+8>>2];u[B>>0]=u[f>>0]|0;pa(38,a|0,w|0,t|0,B|0);E=g;g=0;if(!(E&1))return F=
A,a|0;E=J()|0;Q(a);V(E|0);case 2:a=qa(48)|0;g=0;c[w>>2]=c[b>>2];c[w+4>>2]=c[b+4>>2];c[w+8>>2]=c[b+8>>2];u[B>>0]=u[l>>0]|0;pa(39,a|0,w|0,t|0,B|0);E=g;g=0;if(!(E&1))return F=A,a|0;E=J()|0;Q(a);V(E|0);case 3:a=qa(48)|0;g=0;c[w>>2]=c[b>>2];c[w+4>>2]=c[b+4>>2];c[w+8>>2]=c[b+8>>2];u[B>>0]=u[e>>0]|0;pa(40,a|0,w|0,t|0,B|0);E=g;g=0;if(!(E&1))return F=A,a|0;E=J()|0;Q(a);V(E|0);default:h=w+56|0;l=w+4|0;c[w>>2]=36160;c[h>>2]=36180;g=0;ga(62,w+56|0,l|0);A=g;g=0;A&1&&(E=J()|0,sa(h),V(E|0));c[w+128>>2]=0;c[w+132>>
2]=-1;c[w>>2]=36200;c[w+56>>2]=36220;g=0;ta(180,l|0);A=g;g=0;do if(A&1)a=J()|0;else if(c[l>>2]=36236,e=w+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[w+52>>2]=16,c[B>>2]=0,c[B+4>>2]=0,g=c[B+8>>2]=0,ga(63,l|0,B|0),A=g,g=0,A&1)a=J()|0,W(B),W(e),ya(l);else{W(B);g=0;a=La(28,w|0,49007,21)|0;B=g;g=0;do if(B&1||(g=0,q=ma(36,a|0,c[y>>2]|0)|0,B=g,g=0,B&1)||(g=0,La(28,q|0,50997,18)|0,B=g,g=0,B&1))E=34;else{f=xa(16)|0;g=0;ga(64,x|0,l|0);B=g;g=0;if(B&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,
35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,x|0),B=g,g=0,B&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(x),!d)break;za(f|0)}while(0);34==(E|0)&&(a=J()|0);c[w>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);E=a;V(E|0)}while(0);E=a;sa(h);V(E|0)}8>=(a|0)&&(a=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,a|0,8,35648),E=g,g=0,E&1||Pa(a|0,824,96),E=J()|0,za(a|0),V(E|0));d=16-a|0;switch(h|0){case 1:a=qa(60)|0;c[k>>2]=d;g=0;c[w>>2]=c[b>>2];c[w+4>>2]=c[b+4>>2];c[w+8>>2]=c[b+
8>>2];c[B>>2]=c[k>>2];c[B+4>>2]=c[k+4>>2];pa(41,a|0,w|0,t|0,B|0);E=g;g=0;if(!(E&1))return F=A,a|0;E=J()|0;Q(a);V(E|0);case 2:a=qa(60)|0;c[m>>2]=d;g=0;c[w>>2]=c[b>>2];c[w+4>>2]=c[b+4>>2];c[w+8>>2]=c[b+8>>2];c[B>>2]=c[m>>2];c[B+4>>2]=c[m+4>>2];pa(42,a|0,w|0,t|0,B|0);E=g;g=0;if(!(E&1))return F=A,a|0;E=J()|0;Q(a);V(E|0);case 3:a=qa(60)|0;c[n>>2]=d;g=0;c[w>>2]=c[b>>2];c[w+4>>2]=c[b+4>>2];c[w+8>>2]=c[b+8>>2];c[B>>2]=c[n>>2];c[B+4>>2]=c[n+4>>2];pa(43,a|0,w|0,t|0,B|0);E=g;g=0;if(!(E&1))return F=A,a|0;E=J()|
0;Q(a);V(E|0);default:h=D+56|0;l=D+4|0;c[D>>2]=36160;c[h>>2]=36180;g=0;ga(62,D+56|0,l|0);w=g;g=0;w&1&&(E=J()|0,sa(h),V(E|0));c[D+128>>2]=0;c[D+132>>2]=-1;c[D>>2]=36200;c[D+56>>2]=36220;g=0;ta(180,l|0);w=g;g=0;do if(w&1)a=J()|0;else if(c[l>>2]=36236,e=D+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[D+52>>2]=16,c[B>>2]=0,c[B+4>>2]=0,g=c[B+8>>2]=0,ga(63,l|0,B|0),w=g,g=0,w&1)a=J()|0,W(B),W(e),ya(l);else{W(B);g=0;a=La(28,D|0,49007,21)|0;w=g;g=0;do if(w&1||(g=0,r=ma(36,a|0,c[y>>2]|0)|0,w=g,g=0,
w&1)||(g=0,La(28,r|0,50997,18)|0,w=g,g=0,w&1))E=64;else{f=xa(16)|0;g=0;ga(64,z|0,l|0);w=g;g=0;if(w&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,z|0),w=g,g=0,w&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(z),!d)break;za(f|0)}while(0);64==(E|0)&&(a=J()|0);c[D>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);E=a;V(E|0)}while(0);E=a;sa(h);V(E|0)}}d=c[b+4>>2]|0;f=qa(16)|0;a=c[a+16>>2]|0;d?(c[f>>2]=36108,c[f+4>>2]=d):(E=c[b>>2]|0,c[f>>2]=36132,c[f+
4>>2]=E);c[f+8>>2]=2;c[f+12>>2]=a;F=A;return f|0},function(a,b){a|=0;b|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,w=0,B=0,y=0,A=0,D=0,E=0,y=F;F=F+352|0;A=y+328|0;D=y+192|0;d=y+343|0;f=y+342|0;l=y+341|0;e=y+340|0;x=y+176|0;k=y+168|0;m=y+160|0;n=y+152|0;B=y;z=y+136|0;if(0!=(c[a+32>>2]|0)&&1!=(c[a+24>>2]|0)){t=a+8|0;w=a+36|0;h=c[w>>2]|0;if(!h){a=qa(48)|0;g=0;c[D>>2]=c[b>>2];c[D+4>>2]=c[b+4>>2];c[D+8>>2]=c[b+8>>2];u[A>>0]=u[d>>0]|0;pa(44,a|0,D|0,t|0,A|0);E=g;g=0;if(!(E&1))return F=y,a|
0;E=J()|0;Q(a);V(E|0)}a=c[a+16>>2]|0;if(8==(a|0))switch(h|0){case 1:a=qa(48)|0;g=0;c[D>>2]=c[b>>2];c[D+4>>2]=c[b+4>>2];c[D+8>>2]=c[b+8>>2];u[A>>0]=u[f>>0]|0;pa(45,a|0,D|0,t|0,A|0);E=g;g=0;if(!(E&1))return F=y,a|0;E=J()|0;Q(a);V(E|0);case 2:a=qa(48)|0;g=0;c[D>>2]=c[b>>2];c[D+4>>2]=c[b+4>>2];c[D+8>>2]=c[b+8>>2];u[A>>0]=u[l>>0]|0;pa(46,a|0,D|0,t|0,A|0);E=g;g=0;if(!(E&1))return F=y,a|0;E=J()|0;Q(a);V(E|0);case 3:a=qa(48)|0;g=0;c[D>>2]=c[b>>2];c[D+4>>2]=c[b+4>>2];c[D+8>>2]=c[b+8>>2];u[A>>0]=u[e>>0]|0;
pa(47,a|0,D|0,t|0,A|0);E=g;g=0;if(!(E&1))return F=y,a|0;E=J()|0;Q(a);V(E|0);default:h=D+56|0;l=D+4|0;c[D>>2]=36160;c[h>>2]=36180;g=0;ga(62,D+56|0,l|0);y=g;g=0;y&1&&(E=J()|0,sa(h),V(E|0));c[D+128>>2]=0;c[D+132>>2]=-1;c[D>>2]=36200;c[D+56>>2]=36220;g=0;ta(180,l|0);y=g;g=0;do if(y&1)a=J()|0;else if(c[l>>2]=36236,e=D+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[D+52>>2]=16,c[A>>2]=0,c[A+4>>2]=0,g=c[A+8>>2]=0,ga(63,l|0,A|0),y=g,g=0,y&1)a=J()|0,W(A),W(e),ya(l);else{W(A);g=0;a=La(28,D|0,49007,21)|
0;A=g;g=0;do if(A&1||(g=0,q=ma(36,a|0,c[w>>2]|0)|0,A=g,g=0,A&1)||(g=0,La(28,q|0,50997,18)|0,A=g,g=0,A&1))E=34;else{f=xa(16)|0;g=0;ga(64,x|0,l|0);A=g;g=0;if(A&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,x|0),A=g,g=0,A&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(x),!d)break;za(f|0)}while(0);34==(E|0)&&(a=J()|0);c[D>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);E=a;V(E|0)}while(0);E=a;sa(h);V(E|0)}8>=(a|0)&&(a=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|
0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,a|0,8,35648),E=g,g=0,E&1||Pa(a|0,824,96),E=J()|0,za(a|0),V(E|0));d=16-a|0;switch(h|0){case 1:a=qa(60)|0;c[k>>2]=d;g=0;c[D>>2]=c[b>>2];c[D+4>>2]=c[b+4>>2];c[D+8>>2]=c[b+8>>2];c[A>>2]=c[k>>2];c[A+4>>2]=c[k+4>>2];pa(41,a|0,D|0,t|0,A|0);E=g;g=0;if(!(E&1))return F=y,a|0;E=J()|0;Q(a);V(E|0);case 2:a=qa(60)|0;c[m>>2]=d;g=0;c[D>>2]=c[b>>2];c[D+4>>2]=c[b+4>>2];c[D+8>>2]=c[b+8>>2];c[A>>2]=c[m>>2];c[A+4>>2]=c[m+4>>2];pa(42,a|0,D|0,t|0,A|0);E=g;g=0;if(!(E&1))return F=
y,a|0;E=J()|0;Q(a);V(E|0);case 3:a=qa(60)|0;c[n>>2]=d;g=0;c[D>>2]=c[b>>2];c[D+4>>2]=c[b+4>>2];c[D+8>>2]=c[b+8>>2];c[A>>2]=c[n>>2];c[A+4>>2]=c[n+4>>2];pa(43,a|0,D|0,t|0,A|0);E=g;g=0;if(!(E&1))return F=y,a|0;E=J()|0;Q(a);V(E|0);default:h=B+56|0;l=B+4|0;c[B>>2]=36160;c[h>>2]=36180;g=0;ga(62,B+56|0,l|0);D=g;g=0;D&1&&(E=J()|0,sa(h),V(E|0));c[B+128>>2]=0;c[B+132>>2]=-1;c[B>>2]=36200;c[B+56>>2]=36220;g=0;ta(180,l|0);D=g;g=0;do if(D&1)a=J()|0;else if(c[l>>2]=36236,e=B+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=
0,c[e+12>>2]=0,c[B+52>>2]=16,c[A>>2]=0,c[A+4>>2]=0,g=c[A+8>>2]=0,ga(63,l|0,A|0),D=g,g=0,D&1)a=J()|0,W(A),W(e),ya(l);else{W(A);g=0;a=La(28,B|0,49007,21)|0;D=g;g=0;do if(D&1||(g=0,r=ma(36,a|0,c[w>>2]|0)|0,D=g,g=0,D&1)||(g=0,La(28,r|0,50997,18)|0,D=g,g=0,D&1))E=64;else{f=xa(16)|0;g=0;ga(64,z|0,l|0);D=g;g=0;if(D&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,z|0),D=g,g=0,D&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(z),!d)break;za(f|0)}while(0);64==(E|
0)&&(a=J()|0);c[B>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);E=a;V(E|0)}while(0);E=a;sa(h);V(E|0)}}d=c[b+4>>2]|0;f=qa(16)|0;a=c[a+20>>2]|0;d?(c[f>>2]=36108,c[f+4>>2]=d):(E=c[b>>2]|0,c[f>>2]=36132,c[f+4>>2]=E);c[f+8>>2]=1;c[f+12>>2]=a;F=y;return f|0},function(a,b){a|=0;b|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,D=0,z=0,A=0,y=0,w=0,B=0,E=0,y=F;F=F+352|0;w=y+328|0;B=y+192|0;d=y+343|0;f=y+342|0;l=y+341|0;e=y+340|0;x=y+176|0;k=y+168|0;m=y+160|0;n=y+152|0;A=y;D=y+136|0;if(0!=(c[a+
32>>2]|0)&&1!=(c[a+24>>2]|0)){t=a+8|0;z=a+36|0;h=c[z>>2]|0;if(!h){a=qa(48)|0;g=0;c[B>>2]=c[b>>2];c[B+4>>2]=c[b+4>>2];c[B+8>>2]=c[b+8>>2];u[w>>0]=u[d>>0]|0;pa(44,a|0,B|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=y,a|0;E=J()|0;Q(a);V(E|0)}a=c[a+16>>2]|0;if(8==(a|0))switch(h|0){case 1:a=qa(48)|0;g=0;c[B>>2]=c[b>>2];c[B+4>>2]=c[b+4>>2];c[B+8>>2]=c[b+8>>2];u[w>>0]=u[f>>0]|0;pa(45,a|0,B|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=y,a|0;E=J()|0;Q(a);V(E|0);case 2:a=qa(48)|0;g=0;c[B>>2]=c[b>>2];c[B+4>>2]=c[b+4>>2];c[B+
8>>2]=c[b+8>>2];u[w>>0]=u[l>>0]|0;pa(46,a|0,B|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=y,a|0;E=J()|0;Q(a);V(E|0);case 3:a=qa(48)|0;g=0;c[B>>2]=c[b>>2];c[B+4>>2]=c[b+4>>2];c[B+8>>2]=c[b+8>>2];u[w>>0]=u[e>>0]|0;pa(47,a|0,B|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=y,a|0;E=J()|0;Q(a);V(E|0);default:h=B+56|0;l=B+4|0;c[B>>2]=36160;c[h>>2]=36180;g=0;ga(62,B+56|0,l|0);y=g;g=0;y&1&&(E=J()|0,sa(h),V(E|0));c[B+128>>2]=0;c[B+132>>2]=-1;c[B>>2]=36200;c[B+56>>2]=36220;g=0;ta(180,l|0);y=g;g=0;do if(y&1)a=J()|0;else if(c[l>>
2]=36236,e=B+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[B+52>>2]=16,c[w>>2]=0,c[w+4>>2]=0,g=c[w+8>>2]=0,ga(63,l|0,w|0),y=g,g=0,y&1)a=J()|0,W(w),W(e),ya(l);else{W(w);g=0;a=La(28,B|0,49007,21)|0;w=g;g=0;do if(w&1||(g=0,q=ma(36,a|0,c[z>>2]|0)|0,w=g,g=0,w&1)||(g=0,La(28,q|0,50997,18)|0,w=g,g=0,w&1))E=34;else{f=xa(16)|0;g=0;ga(64,x|0,l|0);w=g;g=0;if(w&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,x|0),w=g,g=0,w&1?d=1:(g=0,na(6,f|0,824,96),d=g=
0),a=J()|0,W(x),!d)break;za(f|0)}while(0);34==(E|0)&&(a=J()|0);c[B>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);E=a;V(E|0)}while(0);E=a;sa(h);V(E|0)}8>=(a|0)&&(a=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,a|0,8,35648),E=g,g=0,E&1||Pa(a|0,824,96),E=J()|0,za(a|0),V(E|0));d=16-a|0;switch(h|0){case 1:a=qa(60)|0;c[k>>2]=d;g=0;c[B>>2]=c[b>>2];c[B+4>>2]=c[b+4>>2];c[B+8>>2]=c[b+8>>2];c[w>>2]=c[k>>2];c[w+4>>2]=c[k+4>>2];pa(41,a|0,B|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=
y,a|0;E=J()|0;Q(a);V(E|0);case 2:a=qa(60)|0;c[m>>2]=d;g=0;c[B>>2]=c[b>>2];c[B+4>>2]=c[b+4>>2];c[B+8>>2]=c[b+8>>2];c[w>>2]=c[m>>2];c[w+4>>2]=c[m+4>>2];pa(42,a|0,B|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=y,a|0;E=J()|0;Q(a);V(E|0);case 3:a=qa(60)|0;c[n>>2]=d;g=0;c[B>>2]=c[b>>2];c[B+4>>2]=c[b+4>>2];c[B+8>>2]=c[b+8>>2];c[w>>2]=c[n>>2];c[w+4>>2]=c[n+4>>2];pa(43,a|0,B|0,t|0,w|0);E=g;g=0;if(!(E&1))return F=y,a|0;E=J()|0;Q(a);V(E|0);default:h=A+56|0;l=A+4|0;c[A>>2]=36160;c[h>>2]=36180;g=0;ga(62,A+56|0,l|0);
B=g;g=0;B&1&&(E=J()|0,sa(h),V(E|0));c[A+128>>2]=0;c[A+132>>2]=-1;c[A>>2]=36200;c[A+56>>2]=36220;g=0;ta(180,l|0);B=g;g=0;do if(B&1)a=J()|0;else if(c[l>>2]=36236,e=A+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[A+52>>2]=16,c[w>>2]=0,c[w+4>>2]=0,g=c[w+8>>2]=0,ga(63,l|0,w|0),B=g,g=0,B&1)a=J()|0,W(w),W(e),ya(l);else{W(w);g=0;a=La(28,A|0,49007,21)|0;B=g;g=0;do if(B&1||(g=0,r=ma(36,a|0,c[z>>2]|0)|0,B=g,g=0,B&1)||(g=0,La(28,r|0,50997,18)|0,B=g,g=0,B&1))E=64;else{f=xa(16)|0;g=0;ga(64,D|0,l|0);B=g;
g=0;if(B&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,D|0),B=g,g=0,B&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(D),!d)break;za(f|0)}while(0);64==(E|0)&&(a=J()|0);c[A>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);E=a;V(E|0)}while(0);E=a;sa(h);V(E|0)}}d=c[b+4>>2]|0;f=qa(16)|0;a=c[a+20>>2]|0;d?(c[f>>2]=36108,c[f+4>>2]=d):(E=c[b>>2]|0,c[f>>2]=36132,c[f+4>>2]=E);c[f+8>>2]=3;c[f+12>>2]=a;F=y;return f|0},function(a,b){a|=0;b|=0;var d=0,f=0,l=0,
e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,B=0,w=0,D=0,z=0,y=0,A=0,E=0,z=F;F=F+352|0;y=z+328|0;A=z+192|0;d=z+343|0;f=z+342|0;l=z+341|0;e=z+340|0;x=z+176|0;k=z+168|0;m=z+160|0;n=z+152|0;D=z;B=z+136|0;if(0!=(c[a+32>>2]|0)&&1!=(c[a+24>>2]|0)){t=a+8|0;w=a+36|0;h=c[w>>2]|0;if(!h){a=qa(48)|0;g=0;c[A>>2]=c[b>>2];c[A+4>>2]=c[b+4>>2];c[A+8>>2]=c[b+8>>2];u[y>>0]=u[d>>0]|0;pa(44,a|0,A|0,t|0,y|0);E=g;g=0;if(!(E&1))return F=z,a|0;E=J()|0;Q(a);V(E|0)}a=c[a+16>>2]|0;if(8==(a|0))switch(h|0){case 1:a=qa(48)|0;g=0;c[A>>2]=
c[b>>2];c[A+4>>2]=c[b+4>>2];c[A+8>>2]=c[b+8>>2];u[y>>0]=u[f>>0]|0;pa(45,a|0,A|0,t|0,y|0);E=g;g=0;if(!(E&1))return F=z,a|0;E=J()|0;Q(a);V(E|0);case 2:a=qa(48)|0;g=0;c[A>>2]=c[b>>2];c[A+4>>2]=c[b+4>>2];c[A+8>>2]=c[b+8>>2];u[y>>0]=u[l>>0]|0;pa(46,a|0,A|0,t|0,y|0);E=g;g=0;if(!(E&1))return F=z,a|0;E=J()|0;Q(a);V(E|0);case 3:a=qa(48)|0;g=0;c[A>>2]=c[b>>2];c[A+4>>2]=c[b+4>>2];c[A+8>>2]=c[b+8>>2];u[y>>0]=u[e>>0]|0;pa(47,a|0,A|0,t|0,y|0);E=g;g=0;if(!(E&1))return F=z,a|0;E=J()|0;Q(a);V(E|0);default:h=A+56|
0;l=A+4|0;c[A>>2]=36160;c[h>>2]=36180;g=0;ga(62,A+56|0,l|0);z=g;g=0;z&1&&(E=J()|0,sa(h),V(E|0));c[A+128>>2]=0;c[A+132>>2]=-1;c[A>>2]=36200;c[A+56>>2]=36220;g=0;ta(180,l|0);z=g;g=0;do if(z&1)a=J()|0;else if(c[l>>2]=36236,e=A+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[A+52>>2]=16,c[y>>2]=0,c[y+4>>2]=0,g=c[y+8>>2]=0,ga(63,l|0,y|0),z=g,g=0,z&1)a=J()|0,W(y),W(e),ya(l);else{W(y);g=0;a=La(28,A|0,49007,21)|0;y=g;g=0;do if(y&1||(g=0,q=ma(36,a|0,c[w>>2]|0)|0,y=g,g=0,y&1)||(g=0,La(28,q|0,50997,18)|
0,y=g,g=0,y&1))E=34;else{f=xa(16)|0;g=0;ga(64,x|0,l|0);y=g;g=0;if(y&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,x|0),y=g,g=0,y&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(x),!d)break;za(f|0)}while(0);34==(E|0)&&(a=J()|0);c[A>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);E=a;V(E|0)}while(0);E=a;sa(h);V(E|0)}8>=(a|0)&&(a=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,a|0,8,35648),E=g,g=0,E&1||Pa(a|0,824,96),E=J()|
0,za(a|0),V(E|0));d=16-a|0;switch(h|0){case 1:a=qa(60)|0;c[k>>2]=d;g=0;c[A>>2]=c[b>>2];c[A+4>>2]=c[b+4>>2];c[A+8>>2]=c[b+8>>2];c[y>>2]=c[k>>2];c[y+4>>2]=c[k+4>>2];pa(41,a|0,A|0,t|0,y|0);E=g;g=0;if(!(E&1))return F=z,a|0;E=J()|0;Q(a);V(E|0);case 2:a=qa(60)|0;c[m>>2]=d;g=0;c[A>>2]=c[b>>2];c[A+4>>2]=c[b+4>>2];c[A+8>>2]=c[b+8>>2];c[y>>2]=c[m>>2];c[y+4>>2]=c[m+4>>2];pa(42,a|0,A|0,t|0,y|0);E=g;g=0;if(!(E&1))return F=z,a|0;E=J()|0;Q(a);V(E|0);case 3:a=qa(60)|0;c[n>>2]=d;g=0;c[A>>2]=c[b>>2];c[A+4>>2]=c[b+
4>>2];c[A+8>>2]=c[b+8>>2];c[y>>2]=c[n>>2];c[y+4>>2]=c[n+4>>2];pa(43,a|0,A|0,t|0,y|0);E=g;g=0;if(!(E&1))return F=z,a|0;E=J()|0;Q(a);V(E|0);default:h=D+56|0;l=D+4|0;c[D>>2]=36160;c[h>>2]=36180;g=0;ga(62,D+56|0,l|0);A=g;g=0;A&1&&(E=J()|0,sa(h),V(E|0));c[D+128>>2]=0;c[D+132>>2]=-1;c[D>>2]=36200;c[D+56>>2]=36220;g=0;ta(180,l|0);A=g;g=0;do if(A&1)a=J()|0;else if(c[l>>2]=36236,e=D+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[D+52>>2]=16,c[y>>2]=0,c[y+4>>2]=0,g=c[y+8>>2]=0,ga(63,l|0,y|0),A=g,g=0,
A&1)a=J()|0,W(y),W(e),ya(l);else{W(y);g=0;a=La(28,D|0,49007,21)|0;A=g;g=0;do if(A&1||(g=0,r=ma(36,a|0,c[w>>2]|0)|0,A=g,g=0,A&1)||(g=0,La(28,r|0,50997,18)|0,A=g,g=0,A&1))E=64;else{f=xa(16)|0;g=0;ga(64,B|0,l|0);A=g;g=0;if(A&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,B|0),A=g,g=0,A&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(B),!d)break;za(f|0)}while(0);64==(E|0)&&(a=J()|0);c[D>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);E=a;V(E|0)}while(0);
E=a;sa(h);V(E|0)}}d=c[b+4>>2]|0;f=qa(16)|0;a=c[a+20>>2]|0;d?(c[f>>2]=36108,c[f+4>>2]=d):(E=c[b>>2]|0,c[f>>2]=36132,c[f+4>>2]=E);c[f+8>>2]=1;c[f+12>>2]=a;F=z;return f|0},function(a,b){a|=0;b|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,A=0,y=0,z=0,B=0,D=0,w=0,E=0,B=F;F=F+352|0;D=B+328|0;w=B+192|0;d=B+343|0;f=B+342|0;l=B+341|0;e=B+340|0;x=B+176|0;k=B+168|0;m=B+160|0;n=B+152|0;z=B;A=B+136|0;if(0!=(c[a+32>>2]|0)&&1!=(c[a+24>>2]|0)){t=a+8|0;y=a+36|0;h=c[y>>2]|0;if(!h){a=qa(48)|0;g=0;c[w>>2]=
c[b>>2];c[w+4>>2]=c[b+4>>2];c[w+8>>2]=c[b+8>>2];u[D>>0]=u[d>>0]|0;pa(37,a|0,w|0,t|0,D|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0)}a=c[a+16>>2]|0;if(16==(a|0))switch(h|0){case 1:a=qa(48)|0;g=0;c[w>>2]=c[b>>2];c[w+4>>2]=c[b+4>>2];c[w+8>>2]=c[b+8>>2];u[D>>0]=u[f>>0]|0;pa(38,a|0,w|0,t|0,D|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0);case 2:a=qa(48)|0;g=0;c[w>>2]=c[b>>2];c[w+4>>2]=c[b+4>>2];c[w+8>>2]=c[b+8>>2];u[D>>0]=u[l>>0]|0;pa(39,a|0,w|0,t|0,D|0);E=g;g=0;if(!(E&1))return F=B,
a|0;E=J()|0;Q(a);V(E|0);case 3:a=qa(48)|0;g=0;c[w>>2]=c[b>>2];c[w+4>>2]=c[b+4>>2];c[w+8>>2]=c[b+8>>2];u[D>>0]=u[e>>0]|0;pa(40,a|0,w|0,t|0,D|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0);default:h=w+56|0;l=w+4|0;c[w>>2]=36160;c[h>>2]=36180;g=0;ga(62,w+56|0,l|0);B=g;g=0;B&1&&(E=J()|0,sa(h),V(E|0));c[w+128>>2]=0;c[w+132>>2]=-1;c[w>>2]=36200;c[w+56>>2]=36220;g=0;ta(180,l|0);B=g;g=0;do if(B&1)a=J()|0;else if(c[l>>2]=36236,e=w+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[w+52>>2]=16,
c[D>>2]=0,c[D+4>>2]=0,g=c[D+8>>2]=0,ga(63,l|0,D|0),B=g,g=0,B&1)a=J()|0,W(D),W(e),ya(l);else{W(D);g=0;a=La(28,w|0,49007,21)|0;D=g;g=0;do if(D&1||(g=0,q=ma(36,a|0,c[y>>2]|0)|0,D=g,g=0,D&1)||(g=0,La(28,q|0,50997,18)|0,D=g,g=0,D&1))E=34;else{f=xa(16)|0;g=0;ga(64,x|0,l|0);D=g;g=0;if(D&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,x|0),D=g,g=0,D&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(x),!d)break;za(f|0)}while(0);34==(E|0)&&(a=J()|0);c[w>>2]=36200;c[h>>
2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);E=a;V(E|0)}while(0);E=a;sa(h);V(E|0)}8>=(a|0)&&(a=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,a|0,8,35648),E=g,g=0,E&1||Pa(a|0,824,96),E=J()|0,za(a|0),V(E|0));d=16-a|0;switch(h|0){case 1:a=qa(60)|0;c[k>>2]=d;g=0;c[w>>2]=c[b>>2];c[w+4>>2]=c[b+4>>2];c[w+8>>2]=c[b+8>>2];c[D>>2]=c[k>>2];c[D+4>>2]=c[k+4>>2];pa(41,a|0,w|0,t|0,D|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0);case 2:a=qa(60)|0;c[m>>2]=d;g=0;c[w>>2]=c[b>>2];c[w+
4>>2]=c[b+4>>2];c[w+8>>2]=c[b+8>>2];c[D>>2]=c[m>>2];c[D+4>>2]=c[m+4>>2];pa(42,a|0,w|0,t|0,D|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0);case 3:a=qa(60)|0;c[n>>2]=d;g=0;c[w>>2]=c[b>>2];c[w+4>>2]=c[b+4>>2];c[w+8>>2]=c[b+8>>2];c[D>>2]=c[n>>2];c[D+4>>2]=c[n+4>>2];pa(43,a|0,w|0,t|0,D|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0);default:h=z+56|0;l=z+4|0;c[z>>2]=36160;c[h>>2]=36180;g=0;ga(62,z+56|0,l|0);w=g;g=0;w&1&&(E=J()|0,sa(h),V(E|0));c[z+128>>2]=0;c[z+132>>2]=-1;c[z>>2]=36200;
c[z+56>>2]=36220;g=0;ta(180,l|0);w=g;g=0;do if(w&1)a=J()|0;else if(c[l>>2]=36236,e=z+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[z+52>>2]=16,c[D>>2]=0,c[D+4>>2]=0,g=c[D+8>>2]=0,ga(63,l|0,D|0),w=g,g=0,w&1)a=J()|0,W(D),W(e),ya(l);else{W(D);g=0;a=La(28,z|0,49007,21)|0;w=g;g=0;do if(w&1||(g=0,r=ma(36,a|0,c[y>>2]|0)|0,w=g,g=0,w&1)||(g=0,La(28,r|0,50997,18)|0,w=g,g=0,w&1))E=64;else{f=xa(16)|0;g=0;ga(64,A|0,l|0);w=g;g=0;if(w&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),
g=0,pa(36,f|0,9,35648,A|0),w=g,g=0,w&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(A),!d)break;za(f|0)}while(0);64==(E|0)&&(a=J()|0);c[z>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);E=a;V(E|0)}while(0);E=a;sa(h);V(E|0)}}d=c[b+4>>2]|0;f=qa(16)|0;a=c[a+20>>2]|0;d?(c[f>>2]=36108,c[f+4>>2]=d):(E=c[b>>2]|0,c[f>>2]=36132,c[f+4>>2]=E);c[f+8>>2]=2;c[f+12>>2]=a;F=B;return f|0},function(a,b){a|=0;b|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,w=0,A=0,D=0,B=0,y=0,z=0,E=0,B=F;F=F+352|0;y=B+
328|0;z=B+192|0;d=B+343|0;f=B+342|0;l=B+341|0;e=B+340|0;x=B+176|0;k=B+168|0;m=B+160|0;n=B+152|0;D=B;w=B+136|0;if(0!=(c[a+32>>2]|0)&&1!=(c[a+24>>2]|0)){t=a+8|0;A=a+36|0;h=c[A>>2]|0;if(!h){a=qa(48)|0;g=0;c[z>>2]=c[b>>2];c[z+4>>2]=c[b+4>>2];c[z+8>>2]=c[b+8>>2];u[y>>0]=u[d>>0]|0;pa(37,a|0,z|0,t|0,y|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0)}a=c[a+16>>2]|0;if(16==(a|0))switch(h|0){case 1:a=qa(48)|0;g=0;c[z>>2]=c[b>>2];c[z+4>>2]=c[b+4>>2];c[z+8>>2]=c[b+8>>2];u[y>>0]=u[f>>0]|0;pa(38,a|0,z|0,
t|0,y|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0);case 2:a=qa(48)|0;g=0;c[z>>2]=c[b>>2];c[z+4>>2]=c[b+4>>2];c[z+8>>2]=c[b+8>>2];u[y>>0]=u[l>>0]|0;pa(39,a|0,z|0,t|0,y|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0);case 3:a=qa(48)|0;g=0;c[z>>2]=c[b>>2];c[z+4>>2]=c[b+4>>2];c[z+8>>2]=c[b+8>>2];u[y>>0]=u[e>>0]|0;pa(40,a|0,z|0,t|0,y|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0);default:h=z+56|0;l=z+4|0;c[z>>2]=36160;c[h>>2]=36180;g=0;ga(62,z+56|0,l|0);B=g;g=0;B&1&&(E=J()|
0,sa(h),V(E|0));c[z+128>>2]=0;c[z+132>>2]=-1;c[z>>2]=36200;c[z+56>>2]=36220;g=0;ta(180,l|0);B=g;g=0;do if(B&1)a=J()|0;else if(c[l>>2]=36236,e=z+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[z+52>>2]=16,c[y>>2]=0,c[y+4>>2]=0,g=c[y+8>>2]=0,ga(63,l|0,y|0),B=g,g=0,B&1)a=J()|0,W(y),W(e),ya(l);else{W(y);g=0;a=La(28,z|0,49007,21)|0;y=g;g=0;do if(y&1||(g=0,q=ma(36,a|0,c[A>>2]|0)|0,y=g,g=0,y&1)||(g=0,La(28,q|0,50997,18)|0,y=g,g=0,y&1))E=34;else{f=xa(16)|0;g=0;ga(64,x|0,l|0);y=g;g=0;if(y&1)a=J()|0;
else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,x|0),y=g,g=0,y&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(x),!d)break;za(f|0)}while(0);34==(E|0)&&(a=J()|0);c[z>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);E=a;V(E|0)}while(0);E=a;sa(h);V(E|0)}8>=(a|0)&&(a=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,a|0,8,35648),E=g,g=0,E&1||Pa(a|0,824,96),E=J()|0,za(a|0),V(E|0));d=16-a|0;switch(h|0){case 1:a=qa(60)|0;c[k>>2]=d;g=0;c[z>>2]=
c[b>>2];c[z+4>>2]=c[b+4>>2];c[z+8>>2]=c[b+8>>2];c[y>>2]=c[k>>2];c[y+4>>2]=c[k+4>>2];pa(41,a|0,z|0,t|0,y|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0);case 2:a=qa(60)|0;c[m>>2]=d;g=0;c[z>>2]=c[b>>2];c[z+4>>2]=c[b+4>>2];c[z+8>>2]=c[b+8>>2];c[y>>2]=c[m>>2];c[y+4>>2]=c[m+4>>2];pa(42,a|0,z|0,t|0,y|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0);case 3:a=qa(60)|0;c[n>>2]=d;g=0;c[z>>2]=c[b>>2];c[z+4>>2]=c[b+4>>2];c[z+8>>2]=c[b+8>>2];c[y>>2]=c[n>>2];c[y+4>>2]=c[n+4>>2];pa(43,a|0,z|0,t|0,
y|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0);default:h=D+56|0;l=D+4|0;c[D>>2]=36160;c[h>>2]=36180;g=0;ga(62,D+56|0,l|0);z=g;g=0;z&1&&(E=J()|0,sa(h),V(E|0));c[D+128>>2]=0;c[D+132>>2]=-1;c[D>>2]=36200;c[D+56>>2]=36220;g=0;ta(180,l|0);z=g;g=0;do if(z&1)a=J()|0;else if(c[l>>2]=36236,e=D+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[D+52>>2]=16,c[y>>2]=0,c[y+4>>2]=0,g=c[y+8>>2]=0,ga(63,l|0,y|0),z=g,g=0,z&1)a=J()|0,W(y),W(e),ya(l);else{W(y);g=0;a=La(28,D|0,49007,21)|0;z=g;g=0;do if(z&
1||(g=0,r=ma(36,a|0,c[A>>2]|0)|0,z=g,g=0,z&1)||(g=0,La(28,r|0,50997,18)|0,z=g,g=0,z&1))E=64;else{f=xa(16)|0;g=0;ga(64,w|0,l|0);z=g;g=0;if(z&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,w|0),z=g,g=0,z&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(w),!d)break;za(f|0)}while(0);64==(E|0)&&(a=J()|0);c[D>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);E=a;V(E|0)}while(0);E=a;sa(h);V(E|0)}}d=c[b+4>>2]|0;f=qa(16)|0;a=c[a+20>>2]|0;d?(c[f>>2]=36108,c[f+
4>>2]=d):(E=c[b>>2]|0,c[f>>2]=36132,c[f+4>>2]=E);c[f+8>>2]=2;c[f+12>>2]=a;F=B;return f|0},function(a,b){a|=0;b|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,z=0,E=0,y=0,B=0,w=0,D=0,A=0,B=F;F=F+352|0;w=B+328|0;D=B+192|0;d=B+343|0;f=B+342|0;l=B+341|0;e=B+340|0;x=B+176|0;k=B+168|0;m=B+160|0;n=B+152|0;y=B;z=B+136|0;if(0!=(c[a+32>>2]|0)&&1!=(c[a+24>>2]|0)){t=a+8|0;E=a+36|0;h=c[E>>2]|0;if(!h){a=qa(48)|0;g=0;c[D>>2]=c[b>>2];c[D+4>>2]=c[b+4>>2];c[D+8>>2]=c[b+8>>2];u[w>>0]=u[d>>0]|0;pa(44,a|0,D|0,
t|0,w|0);A=g;g=0;if(!(A&1))return F=B,a|0;A=J()|0;Q(a);V(A|0)}a=c[a+16>>2]|0;if(8==(a|0))switch(h|0){case 1:a=qa(48)|0;g=0;c[D>>2]=c[b>>2];c[D+4>>2]=c[b+4>>2];c[D+8>>2]=c[b+8>>2];u[w>>0]=u[f>>0]|0;pa(45,a|0,D|0,t|0,w|0);A=g;g=0;if(!(A&1))return F=B,a|0;A=J()|0;Q(a);V(A|0);case 2:a=qa(48)|0;g=0;c[D>>2]=c[b>>2];c[D+4>>2]=c[b+4>>2];c[D+8>>2]=c[b+8>>2];u[w>>0]=u[l>>0]|0;pa(46,a|0,D|0,t|0,w|0);A=g;g=0;if(!(A&1))return F=B,a|0;A=J()|0;Q(a);V(A|0);case 3:a=qa(48)|0;g=0;c[D>>2]=c[b>>2];c[D+4>>2]=c[b+4>>2];
c[D+8>>2]=c[b+8>>2];u[w>>0]=u[e>>0]|0;pa(47,a|0,D|0,t|0,w|0);A=g;g=0;if(!(A&1))return F=B,a|0;A=J()|0;Q(a);V(A|0);default:h=D+56|0;l=D+4|0;c[D>>2]=36160;c[h>>2]=36180;g=0;ga(62,D+56|0,l|0);B=g;g=0;B&1&&(A=J()|0,sa(h),V(A|0));c[D+128>>2]=0;c[D+132>>2]=-1;c[D>>2]=36200;c[D+56>>2]=36220;g=0;ta(180,l|0);B=g;g=0;do if(B&1)a=J()|0;else if(c[l>>2]=36236,e=D+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[D+52>>2]=16,c[w>>2]=0,c[w+4>>2]=0,g=c[w+8>>2]=0,ga(63,l|0,w|0),B=g,g=0,B&1)a=J()|0,W(w),W(e),ya(l);
else{W(w);g=0;a=La(28,D|0,49007,21)|0;w=g;g=0;do if(w&1||(g=0,q=ma(36,a|0,c[E>>2]|0)|0,w=g,g=0,w&1)||(g=0,La(28,q|0,50997,18)|0,w=g,g=0,w&1))A=34;else{f=xa(16)|0;g=0;ga(64,x|0,l|0);w=g;g=0;if(w&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,x|0),w=g,g=0,w&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(x),!d)break;za(f|0)}while(0);34==(A|0)&&(a=J()|0);c[D>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);A=a;V(A|0)}while(0);A=a;sa(h);V(A|0)}8>=(a|
0)&&(a=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,a|0,8,35648),A=g,g=0,A&1||Pa(a|0,824,96),A=J()|0,za(a|0),V(A|0));d=16-a|0;switch(h|0){case 1:a=qa(60)|0;c[k>>2]=d;g=0;c[D>>2]=c[b>>2];c[D+4>>2]=c[b+4>>2];c[D+8>>2]=c[b+8>>2];c[w>>2]=c[k>>2];c[w+4>>2]=c[k+4>>2];pa(41,a|0,D|0,t|0,w|0);A=g;g=0;if(!(A&1))return F=B,a|0;A=J()|0;Q(a);V(A|0);case 2:a=qa(60)|0;c[m>>2]=d;g=0;c[D>>2]=c[b>>2];c[D+4>>2]=c[b+4>>2];c[D+8>>2]=c[b+8>>2];c[w>>2]=c[m>>2];c[w+4>>2]=c[m+4>>2];pa(42,a|0,D|
0,t|0,w|0);A=g;g=0;if(!(A&1))return F=B,a|0;A=J()|0;Q(a);V(A|0);case 3:a=qa(60)|0;c[n>>2]=d;g=0;c[D>>2]=c[b>>2];c[D+4>>2]=c[b+4>>2];c[D+8>>2]=c[b+8>>2];c[w>>2]=c[n>>2];c[w+4>>2]=c[n+4>>2];pa(43,a|0,D|0,t|0,w|0);A=g;g=0;if(!(A&1))return F=B,a|0;A=J()|0;Q(a);V(A|0);default:h=y+56|0;l=y+4|0;c[y>>2]=36160;c[h>>2]=36180;g=0;ga(62,y+56|0,l|0);D=g;g=0;D&1&&(A=J()|0,sa(h),V(A|0));c[y+128>>2]=0;c[y+132>>2]=-1;c[y>>2]=36200;c[y+56>>2]=36220;g=0;ta(180,l|0);D=g;g=0;do if(D&1)a=J()|0;else if(c[l>>2]=36236,e=
y+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[y+52>>2]=16,c[w>>2]=0,c[w+4>>2]=0,g=c[w+8>>2]=0,ga(63,l|0,w|0),D=g,g=0,D&1)a=J()|0,W(w),W(e),ya(l);else{W(w);g=0;a=La(28,y|0,49007,21)|0;D=g;g=0;do if(D&1||(g=0,r=ma(36,a|0,c[E>>2]|0)|0,D=g,g=0,D&1)||(g=0,La(28,r|0,50997,18)|0,D=g,g=0,D&1))A=64;else{f=xa(16)|0;g=0;ga(64,z|0,l|0);D=g;g=0;if(D&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,z|0),D=g,g=0,D&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,
W(z),!d)break;za(f|0)}while(0);64==(A|0)&&(a=J()|0);c[y>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);A=a;V(A|0)}while(0);A=a;sa(h);V(A|0)}}d=c[b+4>>2]|0;f=qa(16)|0;a=c[a+20>>2]|0;d?(c[f>>2]=36108,c[f+4>>2]=d):(A=c[b>>2]|0,c[f>>2]=36132,c[f+4>>2]=A);c[f+8>>2]=3;c[f+12>>2]=a;F=B;return f|0},function(a,b){a|=0;b|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,D=0,A=0,w=0,B=0,z=0,y=0,E=0,B=F;F=F+352|0;z=B+328|0;y=B+192|0;d=B+343|0;f=B+342|0;l=B+341|0;e=B+340|0;x=B+176|0;k=B+168|0;m=B+
160|0;n=B+152|0;w=B;D=B+136|0;if(0!=(c[a+32>>2]|0)&&1!=(c[a+24>>2]|0)){t=a+8|0;A=a+36|0;h=c[A>>2]|0;if(!h){a=qa(48)|0;g=0;c[y>>2]=c[b>>2];c[y+4>>2]=c[b+4>>2];c[y+8>>2]=c[b+8>>2];u[z>>0]=u[d>>0]|0;pa(37,a|0,y|0,t|0,z|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0)}a=c[a+16>>2]|0;if(16==(a|0))switch(h|0){case 1:a=qa(48)|0;g=0;c[y>>2]=c[b>>2];c[y+4>>2]=c[b+4>>2];c[y+8>>2]=c[b+8>>2];u[z>>0]=u[f>>0]|0;pa(38,a|0,y|0,t|0,z|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0);case 2:a=qa(48)|0;
g=0;c[y>>2]=c[b>>2];c[y+4>>2]=c[b+4>>2];c[y+8>>2]=c[b+8>>2];u[z>>0]=u[l>>0]|0;pa(39,a|0,y|0,t|0,z|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0);case 3:a=qa(48)|0;g=0;c[y>>2]=c[b>>2];c[y+4>>2]=c[b+4>>2];c[y+8>>2]=c[b+8>>2];u[z>>0]=u[e>>0]|0;pa(40,a|0,y|0,t|0,z|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0);default:h=y+56|0;l=y+4|0;c[y>>2]=36160;c[h>>2]=36180;g=0;ga(62,y+56|0,l|0);B=g;g=0;B&1&&(E=J()|0,sa(h),V(E|0));c[y+128>>2]=0;c[y+132>>2]=-1;c[y>>2]=36200;c[y+56>>2]=36220;g=0;
ta(180,l|0);B=g;g=0;do if(B&1)a=J()|0;else if(c[l>>2]=36236,e=y+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[y+52>>2]=16,c[z>>2]=0,c[z+4>>2]=0,g=c[z+8>>2]=0,ga(63,l|0,z|0),B=g,g=0,B&1)a=J()|0,W(z),W(e),ya(l);else{W(z);g=0;a=La(28,y|0,49007,21)|0;z=g;g=0;do if(z&1||(g=0,q=ma(36,a|0,c[A>>2]|0)|0,z=g,g=0,z&1)||(g=0,La(28,q|0,50997,18)|0,z=g,g=0,z&1))E=34;else{f=xa(16)|0;g=0;ga(64,x|0,l|0);z=g;g=0;if(z&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,
x|0),z=g,g=0,z&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(x),!d)break;za(f|0)}while(0);34==(E|0)&&(a=J()|0);c[y>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);E=a;V(E|0)}while(0);E=a;sa(h);V(E|0)}8>=(a|0)&&(a=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,a|0,8,35648),E=g,g=0,E&1||Pa(a|0,824,96),E=J()|0,za(a|0),V(E|0));d=16-a|0;switch(h|0){case 1:a=qa(60)|0;c[k>>2]=d;g=0;c[y>>2]=c[b>>2];c[y+4>>2]=c[b+4>>2];c[y+8>>2]=c[b+8>>2];c[z>>2]=c[k>>2];c[z+4>>2]=c[k+4>>2];
pa(41,a|0,y|0,t|0,z|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0);case 2:a=qa(60)|0;c[m>>2]=d;g=0;c[y>>2]=c[b>>2];c[y+4>>2]=c[b+4>>2];c[y+8>>2]=c[b+8>>2];c[z>>2]=c[m>>2];c[z+4>>2]=c[m+4>>2];pa(42,a|0,y|0,t|0,z|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0);case 3:a=qa(60)|0;c[n>>2]=d;g=0;c[y>>2]=c[b>>2];c[y+4>>2]=c[b+4>>2];c[y+8>>2]=c[b+8>>2];c[z>>2]=c[n>>2];c[z+4>>2]=c[n+4>>2];pa(43,a|0,y|0,t|0,z|0);E=g;g=0;if(!(E&1))return F=B,a|0;E=J()|0;Q(a);V(E|0);default:h=w+56|0;l=w+4|0;
c[w>>2]=36160;c[h>>2]=36180;g=0;ga(62,w+56|0,l|0);y=g;g=0;y&1&&(E=J()|0,sa(h),V(E|0));c[w+128>>2]=0;c[w+132>>2]=-1;c[w>>2]=36200;c[w+56>>2]=36220;g=0;ta(180,l|0);y=g;g=0;do if(y&1)a=J()|0;else if(c[l>>2]=36236,e=w+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[w+52>>2]=16,c[z>>2]=0,c[z+4>>2]=0,g=c[z+8>>2]=0,ga(63,l|0,z|0),y=g,g=0,y&1)a=J()|0,W(z),W(e),ya(l);else{W(z);g=0;a=La(28,w|0,49007,21)|0;y=g;g=0;do if(y&1||(g=0,r=ma(36,a|0,c[A>>2]|0)|0,y=g,g=0,y&1)||(g=0,La(28,r|0,50997,18)|0,y=g,g=
0,y&1))E=64;else{f=xa(16)|0;g=0;ga(64,D|0,l|0);y=g;g=0;if(y&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,D|0),y=g,g=0,y&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(D),!d)break;za(f|0)}while(0);64==(E|0)&&(a=J()|0);c[w>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);E=a;V(E|0)}while(0);E=a;sa(h);V(E|0)}}d=c[b+4>>2]|0;f=qa(16)|0;a=c[a+20>>2]|0;d?(c[f>>2]=36108,c[f+4>>2]=d):(E=c[b>>2]|0,c[f>>2]=36132,c[f+4>>2]=E);c[f+8>>2]=6;c[f+12>>2]=a;F=B;
return f|0},function(a,b){a|=0;b|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,y=0,z=0,E=0,B=0,D=0,w=0,A=0,B=F;F=F+352|0;D=B+328|0;w=B+192|0;d=B+343|0;f=B+342|0;l=B+341|0;e=B+340|0;x=B+176|0;k=B+168|0;m=B+160|0;n=B+152|0;E=B;y=B+136|0;if(0!=(c[a+32>>2]|0)&&1!=(c[a+24>>2]|0)){t=a+8|0;z=a+36|0;h=c[z>>2]|0;if(!h){a=qa(48)|0;g=0;c[w>>2]=c[b>>2];c[w+4>>2]=c[b+4>>2];c[w+8>>2]=c[b+8>>2];u[D>>0]=u[d>>0]|0;pa(37,a|0,w|0,t|0,D|0);A=g;g=0;if(!(A&1))return F=B,a|0;A=J()|0;Q(a);V(A|0)}a=c[a+16>>2]|0;
if(16==(a|0))switch(h|0){case 1:a=qa(48)|0;g=0;c[w>>2]=c[b>>2];c[w+4>>2]=c[b+4>>2];c[w+8>>2]=c[b+8>>2];u[D>>0]=u[f>>0]|0;pa(38,a|0,w|0,t|0,D|0);A=g;g=0;if(!(A&1))return F=B,a|0;A=J()|0;Q(a);V(A|0);case 2:a=qa(48)|0;g=0;c[w>>2]=c[b>>2];c[w+4>>2]=c[b+4>>2];c[w+8>>2]=c[b+8>>2];u[D>>0]=u[l>>0]|0;pa(39,a|0,w|0,t|0,D|0);A=g;g=0;if(!(A&1))return F=B,a|0;A=J()|0;Q(a);V(A|0);case 3:a=qa(48)|0;g=0;c[w>>2]=c[b>>2];c[w+4>>2]=c[b+4>>2];c[w+8>>2]=c[b+8>>2];u[D>>0]=u[e>>0]|0;pa(40,a|0,w|0,t|0,D|0);A=g;g=0;if(!(A&
1))return F=B,a|0;A=J()|0;Q(a);V(A|0);default:h=w+56|0;l=w+4|0;c[w>>2]=36160;c[h>>2]=36180;g=0;ga(62,w+56|0,l|0);B=g;g=0;B&1&&(A=J()|0,sa(h),V(A|0));c[w+128>>2]=0;c[w+132>>2]=-1;c[w>>2]=36200;c[w+56>>2]=36220;g=0;ta(180,l|0);B=g;g=0;do if(B&1)a=J()|0;else if(c[l>>2]=36236,e=w+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[w+52>>2]=16,c[D>>2]=0,c[D+4>>2]=0,g=c[D+8>>2]=0,ga(63,l|0,D|0),B=g,g=0,B&1)a=J()|0,W(D),W(e),ya(l);else{W(D);g=0;a=La(28,w|0,49007,21)|0;D=g;g=0;do if(D&1||(g=0,q=ma(36,a|
0,c[z>>2]|0)|0,D=g,g=0,D&1)||(g=0,La(28,q|0,50997,18)|0,D=g,g=0,D&1))A=34;else{f=xa(16)|0;g=0;ga(64,x|0,l|0);D=g;g=0;if(D&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,x|0),D=g,g=0,D&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(x),!d)break;za(f|0)}while(0);34==(A|0)&&(a=J()|0);c[w>>2]=36200;c[h>>2]=36220;c[l>>2]=36236;W(e);ya(l);sa(h);A=a;V(A|0)}while(0);A=a;sa(h);V(A|0)}8>=(a|0)&&(a=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=
0,na(7,a|0,8,35648),A=g,g=0,A&1||Pa(a|0,824,96),A=J()|0,za(a|0),V(A|0));d=16-a|0;switch(h|0){case 1:a=qa(60)|0;c[k>>2]=d;g=0;c[w>>2]=c[b>>2];c[w+4>>2]=c[b+4>>2];c[w+8>>2]=c[b+8>>2];c[D>>2]=c[k>>2];c[D+4>>2]=c[k+4>>2];pa(41,a|0,w|0,t|0,D|0);A=g;g=0;if(!(A&1))return F=B,a|0;A=J()|0;Q(a);V(A|0);case 2:a=qa(60)|0;c[m>>2]=d;g=0;c[w>>2]=c[b>>2];c[w+4>>2]=c[b+4>>2];c[w+8>>2]=c[b+8>>2];c[D>>2]=c[m>>2];c[D+4>>2]=c[m+4>>2];pa(42,a|0,w|0,t|0,D|0);A=g;g=0;if(!(A&1))return F=B,a|0;A=J()|0;Q(a);V(A|0);case 3:a=
qa(60)|0;c[n>>2]=d;g=0;c[w>>2]=c[b>>2];c[w+4>>2]=c[b+4>>2];c[w+8>>2]=c[b+8>>2];c[D>>2]=c[n>>2];c[D+4>>2]=c[n+4>>2];pa(43,a|0,w|0,t|0,D|0);A=g;g=0;if(!(A&1))return F=B,a|0;A=J()|0;Q(a);V(A|0);default:h=E+56|0;l=E+4|0;c[E>>2]=36160;c[h>>2]=36180;g=0;ga(62,E+56|0,l|0);w=g;g=0;w&1&&(A=J()|0,sa(h),V(A|0));c[E+128>>2]=0;c[E+132>>2]=-1;c[E>>2]=36200;c[E+56>>2]=36220;g=0;ta(180,l|0);w=g;g=0;do if(w&1)a=J()|0;else if(c[l>>2]=36236,e=E+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[E+52>>2]=16,c[D>>
2]=0,c[D+4>>2]=0,g=c[D+8>>2]=0,ga(63,l|0,D|0),w=g,g=0,w&1)a=J()|0,W(D),W(e),ya(l);else{W(D);g=0;a=La(28,E|0,49007,21)|0;w=g;g=0;do if(w&1||(g=0,r=ma(36,a|0,c[z>>2]|0)|0,w=g,g=0,w&1)||(g=0,La(28,r|0,50997,18)|0,w=g,g=0,w&1))A=64;else{f=xa(16)|0;g=0;ga(64,y|0,l|0);w=g;g=0;if(w&1)a=J()|0;else if(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,f|0,9,35648,y|0),w=g,g=0,w&1?d=1:(g=0,na(6,f|0,824,96),d=g=0),a=J()|0,W(y),!d)break;za(f|0)}while(0);64==(A|0)&&(a=J()|0);c[E>>2]=36200;c[h>>2]=
36220;c[l>>2]=36236;W(e);ya(l);sa(h);A=a;V(A|0)}while(0);A=a;sa(h);V(A|0)}}d=c[b+4>>2]|0;f=qa(16)|0;a=c[a+20>>2]|0;d?(c[f>>2]=36108,c[f+4>>2]=d):(A=c[b>>2]|0,c[f>>2]=36132,c[f+4>>2]=A);c[f+8>>2]=2;c[f+12>>2]=a;F=B;return f|0},function(a,b){a|=0;b|=0;var d=0,g=0,f=0,e=0,h=0,k=0,m=0,g=a+44|0,d=c[g>>2]|0,f=c[a+24>>2]|0;d>>>0<f>>>0&&(d=c[g>>2]=f);k=a+8|0;g=c[k>>2]|0;m=a+12|0;e=c[m>>2]|0;h=g;if(g>>>0>=e>>>0)return-1;if(-1==(b|0))return c[k>>2]=g,c[m>>2]=e+-1,c[a+16>>2]=d,0;if(c[a+48>>2]&16)f=b&255,g=e+
-1|0;else if(f=b&255,g=e+-1|0,f<<24>>24!=(u[g>>0]|0))return-1;c[k>>2]=h;c[m>>2]=g;c[a+16>>2]=d;u[g>>0]=f;return b|0},function(a,b){a|=0;b|=0;var d=0,f=0,l=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,w=0,D=0,A=0,D=F;F=F+16|0;q=D;if(-1==(b|0))return F=D,0;r=a+12|0;x=a+8|0;t=(c[r>>2]|0)-(c[x>>2]|0)|0;w=a+24|0;d=c[w>>2]|0;n=a+28|0;f=c[n>>2]|0;do{if((d|0)==(f|0)){k=a+48|0;if(!(c[k>>2]&16))return a=-1,F=D,a|0;m=a+20|0;h=c[m>>2]|0;l=d-h|0;e=a+44|0;h=(c[e>>2]|0)-h|0;f=a+32|0;g=0;ga(67,f|0,0);d=g;g=0;if(!(d&1||
(d=u[f>>0]&1?(c[f>>2]&-2)+-1|0:10,g=0,na(8,f|0,d|0,0),d=g,g=0,d&1))){d=u[f>>0]|0;d&1?(f=c[a+40>>2]|0,d=c[a+36>>2]|0):(f=f+1|0,d=(d&255)>>>1);A=f+d|0;c[m>>2]=f;c[n>>2]=A;m=f+l|0;c[w>>2]=m;d=f+h|0;c[e>>2]=d;f=A;break}A=J(0)|0;Rc(A|0)|0;$c();A=-1;F=D;return A|0}A=a+44|0;k=a+48|0;e=A;m=d;d=c[A>>2]|0}while(0);h=m+1|0;c[q>>2]=h;l=c[(h>>>0<d>>>0?e:q)>>2]|0;c[e>>2]=l;c[k>>2]&8&&(d=a+32|0,d=u[d>>0]&1?c[a+40>>2]|0:d+1|0,c[x>>2]=d,c[r>>2]=d+t,c[a+16>>2]=l);(m|0)==(f|0)?A=vc[c[(c[a>>2]|0)+52>>2]&63](a,b&255)|
0:(c[w>>2]=h,u[m>>0]=b,A=b&255);F=D;return A|0},function(c,a){return-1},function(a,b){a|=0;b|=0;var d=0,g=0,f=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,w=0,A=0,A=F;F=F+32|0;x=A+16|0;d=A+8|0;r=A+4|0;q=A;t=-1==(b|0);a:do if(t)w=11;else if(c[d>>2]=b,u[a+44>>0]|0)1==(Qd(d,4,1,c[a+32>>2]|0)|0)?w=11:d=-1;else{c[r>>2]=x;m=d+4|0;n=a+36|0;f=a+40|0;e=x+8|0;h=x;for(k=a+32|0;;){a=c[n>>2]|0;a=Td[c[(c[a>>2]|0)+12>>2]&15](a,c[f>>2]|0,d,m,q,x,e,r)|0;if((c[q>>2]|0)==(d|0)){d=-1;break a}if(3==(a|0))break;g=1==(a|0);if(2<=
a>>>0){d=-1;break a}a=(c[r>>2]|0)-h|0;if((Qd(x,1,a,c[k>>2]|0)|0)!=(a|0)){d=-1;break a}if(g)d=g?c[q>>2]|0:d;else{w=11;break a}}1!=(Qd(d,1,1,c[k>>2]|0)|0)?d=-1:w=11}while(0);11==(w|0)&&(d=t?0:b);F=A;return d|0},function(a,b){a|=0;b|=0;var d=0,g=0,f=0,e=0,h=0,k=0,m=0,n=0,n=F;F=F+32|0;m=n+16|0;k=n+8|0;g=n+4|0;f=n;e=a+52|0;d=0!=(u[e>>0]|0);a:do if(-1==(b|0))d?b=-1:(b=c[a+48>>2]|0,u[e>>0]=-1!=(b|0)&1);else{h=a+48|0;b:do if(d){c[g>>2]=c[h>>2];d=c[a+36>>2]|0;switch(Td[c[(c[d>>2]|0)+12>>2]&15](d,c[a+40>>2]|
0,g,g+4|0,f,m,m+8|0,k)|0){case 1:case 2:b=-1;break a;case 3:u[m>>0]=c[h>>2],c[k>>2]=m+1}for(d=a+32|0;;){g=c[k>>2]|0;if(g>>>0<=m>>>0)break b;a=g+-1|0;c[k>>2]=a;if(-1==(rf(u[a>>0]|0,c[d>>2]|0)|0)){b=-1;break a}}}while(0);c[h>>2]=b;u[e>>0]=1}while(0);F=n;return b|0},function(c,a){return-1},function(c,a){return-1},function(a,b){a|=0;b|=0;var d=0,g=0,f=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,w=0,A=0,A=F;F=F+32|0;x=A+16|0;d=A+8|0;r=A+4|0;q=A;t=-1==(b|0);a:do if(t)w=11;else if(u[d>>0]=b,u[a+44>>0]|0)1==(Qd(d,
1,1,c[a+32>>2]|0)|0)?w=11:d=-1;else{c[r>>2]=x;n=d+1|0;f=a+36|0;e=a+40|0;h=x+8|0;k=x;for(m=a+32|0;;){a=c[f>>2]|0;a=Td[c[(c[a>>2]|0)+12>>2]&15](a,c[e>>2]|0,d,n,q,x,h,r)|0;if((c[q>>2]|0)==(d|0)){d=-1;break a}if(3==(a|0))break;g=1==(a|0);if(2<=a>>>0){d=-1;break a}a=(c[r>>2]|0)-k|0;if((Qd(x,1,a,c[m>>2]|0)|0)!=(a|0)){d=-1;break a}if(g)d=g?c[q>>2]|0:d;else{w=11;break a}}1!=(Qd(d,1,1,c[m>>2]|0)|0)?d=-1:w=11}while(0);11==(w|0)&&(d=t?0:b);F=A;return d|0},function(a,b){a|=0;b|=0;var d=0,g=0,f=0,e=0,h=0,k=0,
m=0,n=0,n=F;F=F+32|0;m=n+16|0;k=n+4|0;g=n+8|0;f=n;e=a+52|0;d=0!=(u[e>>0]|0);a:do if(-1==(b|0))d?b=-1:(b=c[a+48>>2]|0,u[e>>0]=-1!=(b|0)&1);else{h=a+48|0;b:do if(d){u[g>>0]=c[h>>2];d=c[a+36>>2]|0;switch(Td[c[(c[d>>2]|0)+12>>2]&15](d,c[a+40>>2]|0,g,g+1|0,f,m,m+8|0,k)|0){case 1:case 2:b=-1;break a;case 3:u[m>>0]=c[h>>2],c[k>>2]=m+1}for(d=a+32|0;;){g=c[k>>2]|0;if(g>>>0<=m>>>0)break b;a=g+-1|0;c[k>>2]=a;if(-1==(rf(u[a>>0]|0,c[d>>2]|0)|0)){b=-1;break a}}}while(0);c[h>>2]=b;u[e>>0]=1}while(0);F=n;return b|
0},function(c,a){return-1},function(a,b){b|=0;-1<b<<24>>24&&(b=(Yc()|0)+((b&255)<<2)|0,b=c[b>>2]&255);return b|0},function(a,b){b|=0;-1<b<<24>>24&&(b=(dd()|0)+(b<<24>>24<<2)|0,b=c[b>>2]&255);return b|0},function(c,a){return a|0},function(a,b){b|=0;128>b>>>0&&(b=(Yc()|0)+(b<<2)|0,b=c[b>>2]|0);return b|0},function(a,b){b|=0;128>b>>>0&&(b=(dd()|0)+(b<<2)|0,b=c[b>>2]|0);return b|0},function(c,a){return(a|0)<<24>>24|0},function(a,b){a|=0;b|=0;var d=0,g=0,f=0,e=0,g=a+4|0;c[g>>2]=c[b>>2];c[g+4>>2]=c[b+4>>
2];c[g+8>>2]=c[b+8>>2];xd(a,-1);xd(a,-40);g=a+28|0;f=a+24|0;b=c[f>>2]|0;if((c[g>>2]|0)==(b|0))return xd(a,-1),xd(a,-39),a=c[(a+16|0)>>2]|0,a|0;d=0;do e=c[b+(d<<2)>>2]|0,bb[c[(c[e>>2]|0)+8>>2]&127](e,a),d=d+1|0,b=c[f>>2]|0;while(d>>>0<(c[g>>2]|0)-b>>2>>>0);xd(a,-1);xd(a,-39);e=a+16|0;e=c[e>>2]|0;return e|0},function(a,b){b|=0;var d=0,g=0,f=0,e=0,h=0,k=0,m=0,n=0,q=0;if((d=2==(c[b+24>>2]|0))&&3!=(c[b+16>>2]|0))return 0;q=c[b+20>>2]|0;a=c[b+8>>2]|0;a:do if(!q){if(d){if(8!=(a|0))break;g=qa(4600)|0;h=g+
4|0;k=b;m=h+84|0;do c[h>>2]=c[k>>2],h=h+4|0,k=k+4|0;while((h|0)<(m|0));h=g+88|0;m=h+40|0;do c[h>>2]=0,h=h+4|0;while((h|0)<(m|0));c[g>>2]=35688;a=g+132|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[g+148>>2]=c[b>>2];c[g+152>>2]=0;c[g+156>>2]=0;c[g+160>>2]=0;a=g+4544|0;d=g+164|0;do c[d>>2]=0,c[d+4>>2]=0,R[d+8>>1]=0,R[d+10>>1]=1,d=d+12|0;while((d|0)!=(a|0));c[a>>2]=0;c[a+4>>2]=0;R[a+8>>1]=0;u[a+10>>0]=0;b=g+4556|0;c[b>>2]=0;c[b+4>>2]=0;R[b+8>>1]=0;u[b+10>>0]=0;b=g+4568|0;c[b>>2]=0;c[b+4>>2]=0;c[b+
8>>2]=0;c[b+12>>2]=0;c[b+16>>2]=0;c[b+20>>2]=0;c[b+24>>2]=0;u[b+28>>0]=0;c[g+28>>2]|0||(c[g+20>>2]=1);b=g;return b|0}switch(a|0){case 8:g=qa(4600)|0;h=g+4|0;k=b;m=h+84|0;do c[h>>2]=c[k>>2],h=h+4|0,k=k+4|0;while((h|0)<(m|0));h=g+88|0;m=h+40|0;do c[h>>2]=0,h=h+4|0;while((h|0)<(m|0));c[g>>2]=35716;a=g+132|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[g+148>>2]=c[b>>2];c[g+152>>2]=0;c[g+156>>2]=0;c[g+160>>2]=0;a=g+4544|0;d=g+164|0;do c[d>>2]=0,c[d+4>>2]=0,R[d+8>>1]=0,R[d+10>>1]=1,d=d+12|0;while((d|
0)!=(a|0));c[a>>2]=0;c[a+4>>2]=0;R[a+8>>1]=0;u[a+10>>0]=0;b=g+4556|0;c[b>>2]=0;c[b+4>>2]=0;R[b+8>>1]=0;u[b+10>>0]=0;b=g+4568|0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;c[b+16>>2]=0;c[b+20>>2]=0;c[b+24>>2]=0;u[b+28>>0]=0;c[g+28>>2]|0||(c[g+20>>2]=1);b=g;return b|0;case 12:g=qa(4600)|0;h=g+4|0;k=b;m=h+84|0;do c[h>>2]=c[k>>2],h=h+4|0,k=k+4|0;while((h|0)<(m|0));h=g+88|0;m=h+40|0;do c[h>>2]=0,h=h+4|0;while((h|0)<(m|0));c[g>>2]=35744;a=g+132|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[g+148>>
2]=c[b>>2];c[g+152>>2]=0;c[g+156>>2]=0;c[g+160>>2]=0;a=g+4544|0;d=g+164|0;do c[d>>2]=0,c[d+4>>2]=0,R[d+8>>1]=0,R[d+10>>1]=1,d=d+12|0;while((d|0)!=(a|0));c[a>>2]=0;c[a+4>>2]=0;R[a+8>>1]=0;u[a+10>>0]=0;b=g+4556|0;c[b>>2]=0;c[b+4>>2]=0;R[b+8>>1]=0;u[b+10>>0]=0;b=g+4568|0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;c[b+16>>2]=0;c[b+20>>2]=0;c[b+24>>2]=0;u[b+28>>0]=0;c[g+28>>2]|0||(c[g+20>>2]=1);b=g;return b|0;case 16:g=qa(4600)|0;h=g+4|0;k=b;m=h+84|0;do c[h>>2]=c[k>>2],h=h+4|0,k=k+4|0;while((h|0)<
(m|0));h=g+88|0;m=h+40|0;do c[h>>2]=0,h=h+4|0;while((h|0)<(m|0));c[g>>2]=35772;a=g+132|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[g+148>>2]=c[b>>2];c[g+152>>2]=0;c[g+156>>2]=0;c[g+160>>2]=0;a=g+4544|0;d=g+164|0;do c[d>>2]=0,c[d+4>>2]=0,R[d+8>>1]=0,R[d+10>>1]=1,d=d+12|0;while((d|0)!=(a|0));c[a>>2]=0;c[a+4>>2]=0;R[a+8>>1]=0;u[a+10>>0]=0;b=g+4556|0;c[b>>2]=0;c[b+4>>2]=0;R[b+8>>1]=0;u[b+10>>0]=0;b=g+4568|0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;c[b+16>>2]=0;c[b+20>>2]=0;c[b+24>>2]=0;u[b+
28>>0]=0;c[g+28>>2]|0||(c[g+20>>2]=1);b=g;return b|0;default:break a}}while(0);n=(1<<a)+-1|0;if(9>(a|0)){e=q<<1;e=((e+n|0)/(e|1)|0)+1|0;if(d){for(a=0;;)if((1<<a|0)<(e|0))a=a+1|0;else break;for(d=0;;)if((1<<d|0)<(n|0))d=d+1|0;else break;g=(8>(d|0)?8:d)+d<<1;f=qa(4624)|0;h=f+4|0;k=b;m=h+84|0;do c[h>>2]=c[k>>2],h=h+4|0,k=k+4|0;while((h|0)<(m|0));h=f+88|0;m=h+40|0;do c[h>>2]=0,h=h+4|0;while((h|0)<(m|0));c[f>>2]=35800}else{for(a=0;;)if((1<<a|0)<(e|0))a=a+1|0;else break;for(d=0;;)if((1<<d|0)<(n|0))d=d+
1|0;else break;g=(8>(d|0)?8:d)+d<<1;f=qa(4624)|0;h=f+4|0;k=b;m=h+84|0;do c[h>>2]=c[k>>2],h=h+4|0,k=k+4|0;while((h|0)<(m|0));h=f+88|0;m=h+40|0;do c[h>>2]=0,h=h+4|0;while((h|0)<(m|0));c[f>>2]=35660}c[f+128>>2]=n;c[f+132>>2]=e;c[f+136>>2]=q;c[f+140>>2]=a;c[f+144>>2]=d;c[f+148>>2]=g;c[f+152>>2]=64;a=f+156|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[f+172>>2]=c[b>>2];c[f+176>>2]=0;c[f+180>>2]=0;c[f+184>>2]=0;a=f+4568|0;d=f+188|0;do c[d>>2]=0,c[d+4>>2]=0,R[d+8>>1]=0,R[d+10>>1]=1,d=d+12|0;while((d|
0)!=(a|0));c[a>>2]=0;c[a+4>>2]=0;R[a+8>>1]=0;u[a+10>>0]=0;b=f+4580|0;c[b>>2]=0;c[b+4>>2]=0;R[b+8>>1]=0;u[b+10>>0]=0;b=f+4592|0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;c[b+16>>2]=0;c[b+20>>2]=0;c[b+24>>2]=0;u[b+28>>0]=0;c[f+28>>2]|0||(c[f+20>>2]=1);return f|0}if(17<=(a|0))return 0;e=q<<1;e=((e+n|0)/(e|1)|0)+1|0;if(d){for(a=0;;)if((1<<a|0)<(e|0))a=a+1|0;else break;for(d=0;;)if((1<<d|0)<(n|0))d=d+1|0;else break;g=(8>(d|0)?8:d)+d<<1;f=qa(4624)|0;h=f+4|0;k=b;m=h+84|0;do c[h>>2]=c[k>>2],h=h+4|0,
k=k+4|0;while((h|0)<(m|0));h=f+88|0;m=h+40|0;do c[h>>2]=0,h=h+4|0;while((h|0)<(m|0));c[f>>2]=35828}else{for(a=0;;)if((1<<a|0)<(e|0))a=a+1|0;else break;for(d=0;;)if((1<<d|0)<(n|0))d=d+1|0;else break;g=(8>(d|0)?8:d)+d<<1;f=qa(4624)|0;h=f+4|0;k=b;m=h+84|0;do c[h>>2]=c[k>>2],h=h+4|0,k=k+4|0;while((h|0)<(m|0));h=f+88|0;m=h+40|0;do c[h>>2]=0,h=h+4|0;while((h|0)<(m|0));c[f>>2]=35856}c[f+128>>2]=n;c[f+132>>2]=e;c[f+136>>2]=q;c[f+140>>2]=a;c[f+144>>2]=d;c[f+148>>2]=g;c[f+152>>2]=64;a=f+156|0;c[a>>2]=0;c[a+
4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[f+172>>2]=c[b>>2];c[f+176>>2]=0;c[f+180>>2]=0;c[f+184>>2]=0;a=f+4568|0;d=f+188|0;do c[d>>2]=0,c[d+4>>2]=0,R[d+8>>1]=0,R[d+10>>1]=1,d=d+12|0;while((d|0)!=(a|0));c[a>>2]=0;c[a+4>>2]=0;R[a+8>>1]=0;u[a+10>>0]=0;b=f+4580|0;c[b>>2]=0;c[b+4>>2]=0;R[b+8>>1]=0;u[b+10>>0]=0;b=f+4592|0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;c[b+16>>2]=0;c[b+20>>2]=0;c[b+24>>2]=0;u[b+28>>0]=0;c[f+28>>2]|0||(c[f+20>>2]=1);return f|0},function(a,b){b|=0;var d=0,g=0,f=0,e=0,h=0,k=0,m=0,
n=0,q=0;if((d=2==(c[b+24>>2]|0))&&3!=(c[b+16>>2]|0))return 0;q=c[b+20>>2]|0;a=c[b+8>>2]|0;a:do if(!q){if(d){if(8!=(a|0))break;g=qa(4608)|0;c[g+4>>2]=0;h=g+8|0;k=b;m=h+84|0;do c[h>>2]=c[k>>2],h=h+4|0,k=k+4|0;while((h|0)<(m|0));c[g+92>>2]=0;c[g+96>>2]=0;c[g+100>>2]=32;c[g+104>>2]=0;c[g+108>>2]=0;u[g+112>>0]=0;a=g+116|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[a+16>>2]=0;c[g>>2]=35912;a=g+140|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[g+156>>2]=c[b>>2];c[g+160>>2]=0;c[g+164>>2]=0;c[g+
168>>2]=0;a=g+4552|0;d=g+172|0;do c[d>>2]=0,c[d+4>>2]=0,R[d+8>>1]=0,R[d+10>>1]=1,d=d+12|0;while((d|0)!=(a|0));c[a>>2]=0;c[a+4>>2]=0;R[a+8>>1]=0;u[a+10>>0]=0;b=g+4564|0;c[b>>2]=0;c[b+4>>2]=0;R[b+8>>1]=0;u[b+10>>0]=0;b=g+4576|0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;c[b+16>>2]=0;c[b+20>>2]=0;c[b+24>>2]=0;u[b+28>>0]=0;c[g+32>>2]|0||(c[g+24>>2]=1);b=g;return b|0}switch(a|0){case 8:g=qa(4608)|0;c[g+4>>2]=0;h=g+8|0;k=b;m=h+84|0;do c[h>>2]=c[k>>2],h=h+4|0,k=k+4|0;while((h|0)<(m|0));c[g+92>>2]=0;
c[g+96>>2]=0;c[g+100>>2]=32;c[g+104>>2]=0;c[g+108>>2]=0;u[g+112>>0]=0;a=g+116|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[a+16>>2]=0;c[g>>2]=35940;a=g+140|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[g+156>>2]=c[b>>2];c[g+160>>2]=0;c[g+164>>2]=0;c[g+168>>2]=0;a=g+4552|0;d=g+172|0;do c[d>>2]=0,c[d+4>>2]=0,R[d+8>>1]=0,R[d+10>>1]=1,d=d+12|0;while((d|0)!=(a|0));c[a>>2]=0;c[a+4>>2]=0;R[a+8>>1]=0;u[a+10>>0]=0;b=g+4564|0;c[b>>2]=0;c[b+4>>2]=0;R[b+8>>1]=0;u[b+10>>0]=0;b=g+4576|0;c[b>>2]=0;c[b+
4>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;c[b+16>>2]=0;c[b+20>>2]=0;c[b+24>>2]=0;u[b+28>>0]=0;c[g+32>>2]|0||(c[g+24>>2]=1);b=g;return b|0;case 12:g=qa(4608)|0;c[g+4>>2]=0;h=g+8|0;k=b;m=h+84|0;do c[h>>2]=c[k>>2],h=h+4|0,k=k+4|0;while((h|0)<(m|0));c[g+92>>2]=0;c[g+96>>2]=0;c[g+100>>2]=32;c[g+104>>2]=0;c[g+108>>2]=0;u[g+112>>0]=0;a=g+116|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[a+16>>2]=0;c[g>>2]=35968;a=g+140|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[g+156>>2]=c[b>>2];c[g+160>>2]=0;c[g+164>>
2]=0;c[g+168>>2]=0;a=g+4552|0;d=g+172|0;do c[d>>2]=0,c[d+4>>2]=0,R[d+8>>1]=0,R[d+10>>1]=1,d=d+12|0;while((d|0)!=(a|0));c[a>>2]=0;c[a+4>>2]=0;R[a+8>>1]=0;u[a+10>>0]=0;b=g+4564|0;c[b>>2]=0;c[b+4>>2]=0;R[b+8>>1]=0;u[b+10>>0]=0;b=g+4576|0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;c[b+16>>2]=0;c[b+20>>2]=0;c[b+24>>2]=0;u[b+28>>0]=0;c[g+32>>2]|0||(c[g+24>>2]=1);b=g;return b|0;case 16:g=qa(4608)|0;c[g+4>>2]=0;h=g+8|0;k=b;m=h+84|0;do c[h>>2]=c[k>>2],h=h+4|0,k=k+4|0;while((h|0)<(m|0));c[g+92>>2]=0;c[g+
96>>2]=0;c[g+100>>2]=32;c[g+104>>2]=0;c[g+108>>2]=0;u[g+112>>0]=0;a=g+116|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[a+16>>2]=0;c[g>>2]=35996;a=g+140|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[g+156>>2]=c[b>>2];c[g+160>>2]=0;c[g+164>>2]=0;c[g+168>>2]=0;a=g+4552|0;d=g+172|0;do c[d>>2]=0,c[d+4>>2]=0,R[d+8>>1]=0,R[d+10>>1]=1,d=d+12|0;while((d|0)!=(a|0));c[a>>2]=0;c[a+4>>2]=0;R[a+8>>1]=0;u[a+10>>0]=0;b=g+4564|0;c[b>>2]=0;c[b+4>>2]=0;R[b+8>>1]=0;u[b+10>>0]=0;b=g+4576|0;c[b>>2]=0;c[b+4>>
2]=0;c[b+8>>2]=0;c[b+12>>2]=0;c[b+16>>2]=0;c[b+20>>2]=0;c[b+24>>2]=0;u[b+28>>0]=0;c[g+32>>2]|0||(c[g+24>>2]=1);b=g;return b|0;default:break a}}while(0);n=(1<<a)+-1|0;if(9>(a|0)){e=q<<1;e=((e+n|0)/(e|1)|0)+1|0;if(d){for(a=0;;)if((1<<a|0)<(e|0))a=a+1|0;else break;for(d=0;;)if((1<<d|0)<(n|0))d=d+1|0;else break;g=(8>(d|0)?8:d)+d<<1;f=qa(4632)|0;c[f+4>>2]=0;h=f+8|0;k=b;m=h+84|0;do c[h>>2]=c[k>>2],h=h+4|0,k=k+4|0;while((h|0)<(m|0));c[f+92>>2]=0;c[f+96>>2]=0;c[f+100>>2]=32;c[f+104>>2]=0;c[f+108>>2]=0;u[f+
112>>0]=0;m=f+116|0;c[m>>2]=0;c[m+4>>2]=0;c[m+8>>2]=0;c[m+12>>2]=0;c[m+16>>2]=0;c[f>>2]=36024}else{for(a=0;;)if((1<<a|0)<(e|0))a=a+1|0;else break;for(d=0;;)if((1<<d|0)<(n|0))d=d+1|0;else break;g=(8>(d|0)?8:d)+d<<1;f=qa(4632)|0;c[f+4>>2]=0;h=f+8|0;k=b;m=h+84|0;do c[h>>2]=c[k>>2],h=h+4|0,k=k+4|0;while((h|0)<(m|0));c[f+92>>2]=0;c[f+96>>2]=0;c[f+100>>2]=32;c[f+104>>2]=0;c[f+108>>2]=0;u[f+112>>0]=0;m=f+116|0;c[m>>2]=0;c[m+4>>2]=0;c[m+8>>2]=0;c[m+12>>2]=0;c[m+16>>2]=0;c[f>>2]=35884}c[f+136>>2]=n;c[f+140>>
2]=e;c[f+144>>2]=q;c[f+148>>2]=a;c[f+152>>2]=d;c[f+156>>2]=g;c[f+160>>2]=64;a=f+164|0;c[a>>2]=0;c[a+4>>2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[f+180>>2]=c[b>>2];c[f+184>>2]=0;c[f+188>>2]=0;c[f+192>>2]=0;a=f+4576|0;d=f+196|0;do c[d>>2]=0,c[d+4>>2]=0,R[d+8>>1]=0,R[d+10>>1]=1,d=d+12|0;while((d|0)!=(a|0));c[a>>2]=0;c[a+4>>2]=0;R[a+8>>1]=0;u[a+10>>0]=0;b=f+4588|0;c[b>>2]=0;c[b+4>>2]=0;R[b+8>>1]=0;u[b+10>>0]=0;b=f+4600|0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;c[b+16>>2]=0;c[b+20>>2]=0;c[b+24>>2]=0;u[b+
28>>0]=0;c[f+32>>2]|0||(c[f+24>>2]=1);return f|0}if(17<=(a|0))return 0;e=q<<1;e=((e+n|0)/(e|1)|0)+1|0;if(d){for(a=0;;)if((1<<a|0)<(e|0))a=a+1|0;else break;for(d=0;;)if((1<<d|0)<(n|0))d=d+1|0;else break;g=(8>(d|0)?8:d)+d<<1;f=qa(4632)|0;c[f+4>>2]=0;h=f+8|0;k=b;m=h+84|0;do c[h>>2]=c[k>>2],h=h+4|0,k=k+4|0;while((h|0)<(m|0));c[f+92>>2]=0;c[f+96>>2]=0;c[f+100>>2]=32;c[f+104>>2]=0;c[f+108>>2]=0;u[f+112>>0]=0;m=f+116|0;c[m>>2]=0;c[m+4>>2]=0;c[m+8>>2]=0;c[m+12>>2]=0;c[m+16>>2]=0;c[f>>2]=36052}else{for(a=
0;;)if((1<<a|0)<(e|0))a=a+1|0;else break;for(d=0;;)if((1<<d|0)<(n|0))d=d+1|0;else break;g=(8>(d|0)?8:d)+d<<1;f=qa(4632)|0;c[f+4>>2]=0;h=f+8|0;k=b;m=h+84|0;do c[h>>2]=c[k>>2],h=h+4|0,k=k+4|0;while((h|0)<(m|0));c[f+92>>2]=0;c[f+96>>2]=0;c[f+100>>2]=32;c[f+104>>2]=0;c[f+108>>2]=0;u[f+112>>0]=0;m=f+116|0;c[m>>2]=0;c[m+4>>2]=0;c[m+8>>2]=0;c[m+12>>2]=0;c[m+16>>2]=0;c[f>>2]=36080}c[f+136>>2]=n;c[f+140>>2]=e;c[f+144>>2]=q;c[f+148>>2]=a;c[f+152>>2]=d;c[f+156>>2]=g;c[f+160>>2]=64;a=f+164|0;c[a>>2]=0;c[a+4>>
2]=0;c[a+8>>2]=0;c[a+12>>2]=0;c[f+180>>2]=c[b>>2];c[f+184>>2]=0;c[f+188>>2]=0;c[f+192>>2]=0;a=f+4576|0;d=f+196|0;do c[d>>2]=0,c[d+4>>2]=0,R[d+8>>1]=0,R[d+10>>1]=1,d=d+12|0;while((d|0)!=(a|0));c[a>>2]=0;c[a+4>>2]=0;R[a+8>>1]=0;u[a+10>>0]=0;b=f+4588|0;c[b>>2]=0;c[b+4>>2]=0;R[b+8>>1]=0;u[b+10>>0]=0;b=f+4600|0;c[b>>2]=0;c[b+4>>2]=0;c[b+8>>2]=0;c[b+12>>2]=0;c[b+16>>2]=0;c[b+20>>2]=0;c[b+24>>2]=0;u[b+28>>0]=0;c[f+32>>2]|0||(c[f+24>>2]=1);return f|0},function(a,b){a|=0;b|=0;var d=0,f=0,l=0,e=0,k=0,m=0,n=
0,q=0,r=0,x=0,t=0,w=0,t=F;F=F+32|0;m=t+20|0;n=t+16|0;r=t+8|0;d=t;g=0;ga(65,r|0,a|0);q=g;g=0;a:do if(q&1)d=J(0)|0,l=f=a,x=19;else{do if(u[r>>0]|0){q=Lb(a+(c[(c[a>>2]|0)+-12>>2]|0)|0)|0;c[d>>2]=q;g=0;q=ma(37,d|0,43392)|0;k=g;g=0;if(k&1)x=J(0)|0,Vb(d),d=x;else if(Vb(d),l=c[(c[a>>2]|0)+-12>>2]|0,k=c[a+(l+24)>>2]|0,f=a+l|0,l=a+(l+76)|0,d=c[l>>2]|0,-1==(d|0)?(d=Lb(f)|0,c[m>>2]=d,g=0,d=ma(37,m|0,44220)|0,w=g,g=0,w&1||(g=0,e=ma(c[(c[d>>2]|0)+28>>2]|0,d|0,32)|0,w=g,g=0,w&1)?(d=J(0)|0,Vb(m)):(Vb(m),d=e<<24>>
24,c[l>>2]=d,x=10)):x=10,10==(x|0)){w=c[(c[q>>2]|0)+16>>2]|0;c[n>>2]=k;g=0;c[m>>2]=c[n>>2];d=Mf(w|0,q|0,m|0,f|0,d&255|0,b|0)|0;w=g;g=0;if(!(w&1)){if(d)break;w=c[(c[a>>2]|0)+-12>>2]|0;g=0;ga(66,a+w|0,c[a+(w+16)>>2]|5);w=g;g=0;if(!(w&1))break}d=J(0)|0}je(r);l=f=a;x=19;break a}while(0);je(r)}while(0);19==(x|0)&&(Rc(d|0)|0,g=0,ta(181,f+(c[(c[l>>2]|0)+-12>>2]|0)|0),w=g,g=0,w&1?(d=J()|0,g=0,rb(3),w=g,g=0,w&1?(w=J(0)|0,h(w)):V(d|0)):$c());F=t;return a|0},Sb,function(a,b){a|=0;b|=0;var d=0,f=0,l=0,e=0,k=
0,m=0,n=0,q=0,r=0,x=0,t=0,w=0,t=F;F=F+32|0;m=t+20|0;n=t+16|0;r=t+8|0;d=t;g=0;ga(65,r|0,a|0);q=g;g=0;a:do if(q&1)d=J(0)|0,l=f=a,x=19;else{do if(u[r>>0]|0){q=Lb(a+(c[(c[a>>2]|0)+-12>>2]|0)|0)|0;c[d>>2]=q;g=0;q=ma(37,d|0,43392)|0;k=g;g=0;if(k&1)x=J(0)|0,Vb(d),d=x;else if(Vb(d),l=c[(c[a>>2]|0)+-12>>2]|0,k=c[a+(l+24)>>2]|0,f=a+l|0,l=a+(l+76)|0,d=c[l>>2]|0,-1==(d|0)?(d=Lb(f)|0,c[m>>2]=d,g=0,d=ma(37,m|0,44220)|0,w=g,g=0,w&1||(g=0,e=ma(c[(c[d>>2]|0)+28>>2]|0,d|0,32)|0,w=g,g=0,w&1)?(d=J(0)|0,Vb(m)):(Vb(m),
d=e<<24>>24,c[l>>2]=d,x=10)):x=10,10==(x|0)){w=c[(c[q>>2]|0)+24>>2]|0;c[n>>2]=k;g=0;c[m>>2]=c[n>>2];d=Mf(w|0,q|0,m|0,f|0,d&255|0,b|0)|0;w=g;g=0;if(!(w&1)){if(d)break;w=c[(c[a>>2]|0)+-12>>2]|0;g=0;ga(66,a+w|0,c[a+(w+16)>>2]|5);w=g;g=0;if(!(w&1))break}d=J(0)|0}je(r);l=f=a;x=19;break a}while(0);je(r)}while(0);19==(x|0)&&(Rc(d|0)|0,g=0,ta(181,f+(c[(c[l>>2]|0)+-12>>2]|0)|0),w=g,g=0,w&1?(d=J()|0,g=0,rb(3),w=g,g=0,w&1?(w=J(0)|0,h(w)):V(d|0)):$c());F=t;return a|0},function(c,a){var b=c|0,b=b|0;return(10>
(b+-48|0)>>>0?1:6>((b|32)+-97|0)>>>0)&1|0},function(c,a){return 10>((c|0)+-48|0)>>>0|0},function(c,a){a|=0;return Xd(c|0,a,Ae(a)|0)|0},function(a,b){b|=0;var d=a|0,g=b,f=Jf(b)|0,d=d|0,g=g|0,f=f|0,h=0,e=0,k=0,h=u[d>>0]|0;h&1?(h=c[d>>2]|0,k=(h&-2)+-1|0,h&=255):k=1;e=0==(h&1);if(k>>>0>=f>>>0){var h=e?d+4|0:c[d+8>>2]|0,m,e=h|0;m=g|0;var k=f|0,n=0,n=0==(k|0);if(e-m>>2>>>0<k>>>0){if(!n){do k=k+-1|0,c[e+(k<<2)>>2]=c[m+(k<<2)>>2];while(0!=(k|0))}}else if(!n)for(n=m,m=e;;)if(k=k+-1|0,c[m>>2]=c[n>>2],k)n=n+
4|0,m=m+4|0;else break;e|0;c[h+(f<<2)>>2]=0;u[d>>0]&1?c[d+4>>2]=f:u[d>>0]=f<<1}else{var h=e?(h&255)>>>1:c[d+4>>2]|0,q,e=d|0;m=k|0;k=f-k|0;n=h|0;q=0;var h=h|0,f=f|0,g=g|0,r=0,x=0,t=0;(1073741806-m|0)>>>0<k>>>0&&jd(e);t=u[e>>0]&1?c[e+8>>2]|0:e+4|0;536870887>m>>>0?(r=k+m|0,x=m<<1,r=r>>>0<x>>>0?x:r,r=2>r>>>0?2:r+4&-4):r=1073741807;x=qa(r<<2)|0;q&&ue(x,t,q)|0;f&&ue(x+(q<<2)|0,g,f)|0;k=n-h|0;(k|0)!=(q|0)&&ue(x+(f+q<<2)|0,t+(h+q<<2)|0,k-q|0)|0;1!=(m|0)&&Q(t);c[e+8>>2]=x;c[e>>2]=r|1;m=k+f|0;c[e+4>>2]=m;c[x+
(m<<2)>>2]=0}return d|0},Db,Db,Db,Db,Db,Db,Db,Db,Db,Db,Db,Db,Db,Db,Db,Db,Db,Db,Db,Db,Db],cf=[Pd,function(c,a,b,d,g){a|=0;b|=0;d|=0;g|=0;var f=0,h=0;a:do if((d|0)==(g|0))h=6;else for(;;){if((a|0)==(b|0)){a=-1;break a}c=u[a>>0]|0;f=u[d>>0]|0;if(c<<24>>24<f<<24>>24){a=-1;break a}if(f<<24>>24<c<<24>>24){a=1;break a}a=a+1|0;d=d+1|0;if((d|0)==(g|0)){h=6;break}}while(0);6==(h|0)&&(a=(a|0)!=(b|0)&1);return a|0},function(a,b,d,g,f){b|=0;d|=0;g|=0;f|=0;var h=0,e=0;a:do if((g|0)==(f|0))e=6;else for(;;){if((b|
0)==(d|0)){b=-1;break a}a=c[b>>2]|0;h=c[g>>2]|0;if((a|0)<(h|0)){b=-1;break a}if((h|0)<(a|0)){b=1;break a}b=b+4|0;g=g+4|0;if((g|0)==(f|0)){e=6;break}}while(0);6==(e|0)&&(b=(b|0)!=(d|0)&1);return b|0},function(a,b,d,f,l){a|=0;b|=0;d|=0;f|=0;l|=0;var h=0,e=0,k=0,m=0,n=0,q=0,q=F;F=F+32|0;h=q+20|0;e=q+16|0;k=q+12|0;n=q;a:do if(c[d+4>>2]&1){h=Lb(d)|0;c[k>>2]=h;g=0;e=ma(37,k|0,44360)|0;m=g;g=0;b:do if(m&1)q=J()|0,Na(h)|0,h=q;else{Na(h)|0;h=c[e>>2]|0;if(l)bb[c[h+24>>2]&127](n,e);else bb[c[h+28>>2]&127](n,
e);a=u[n>>0]|0;m=0==(a&1);h=n+1|0;l=n+8|0;k=m?h:n+1|0;h=m?h:c[n+8>>2]|0;m=n+4|0;d=0==(a&1);c:do if((h|0)!=((d?k:c[l>>2]|0)+(d?(a&255)>>>1:c[m>>2]|0)|0)){d:for(;;){e=u[h>>0]|0;f=c[b>>2]|0;do if(f)if(d=f+24|0,a=c[d>>2]|0,(a|0)!=(c[f+28>>2]|0))c[d>>2]=a+1,u[a>>0]=e;else{g=0;e=ma(c[(c[f>>2]|0)+52>>2]|0,f|0,e&255|0)|0;a=g;g=0;if(a&1)break d;-1==(e|0)&&(c[b>>2]=0)}while(0);h=h+1|0;a=u[n>>0]|0;d=0==(a&1);if((h|0)==((d?k:c[l>>2]|0)+(d?(a&255)>>>1:c[m>>2]|0)|0))break c}h=J()|0;W(n);break b}while(0);h=c[b>>
2]|0;W(n);break a}while(0);V(h|0)}else n=c[(c[a>>2]|0)+24>>2]|0,c[e>>2]=c[b>>2],c[h>>2]=c[e>>2],h=cf[n&31](a,h,d,f,l&1)|0;while(0);F=q;return h|0},function(a,b,d,f,l){b|=0;d|=0;f|=0;l|=0;var h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,q=F;F=F+64|0;h=q;x=q+56|0;t=q+44|0;k=q+20|0;n=q+16|0;m=q+12|0;r=q+8|0;e=q+4|0;u[x>>0]=u[58887]|0;u[x+1>>0]=u[58888]|0;u[x+2>>0]=u[58889]|0;u[x+3>>0]=u[58890]|0;u[x+4>>0]=u[58891]|0;u[x+5>>0]=u[58892]|0;ke(x+1|0,58893,1,c[d+4>>2]|0);a=Xb()|0;c[h>>2]=l;l=t+(Bc(t,12,a,x,h)|0)|
0;x=kd(t,l,d)|0;a=Lb(d)|0;c[r>>2]=a;g=0;sd(1,t|0,x|0,l|0,k|0,n|0,m|0,r|0);l=g;g=0;if(l&1)t=J()|0,Na(a)|0,V(t|0);else return Na(a)|0,c[e>>2]=c[b>>2],x=c[n>>2]|0,t=c[m>>2]|0,c[h>>2]=c[e>>2],t=y(h,k,x,t,d,f)|0,F=q,t|0;return 0},function(a,b,d,f,l){b|=0;d|=0;f|=0;l|=0;var h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,q=F;F=F+64|0;h=q;x=q+56|0;t=q+44|0;k=q+20|0;n=q+16|0;m=q+12|0;r=q+8|0;e=q+4|0;u[x>>0]=u[58887]|0;u[x+1>>0]=u[58888]|0;u[x+2>>0]=u[58889]|0;u[x+3>>0]=u[58890]|0;u[x+4>>0]=u[58891]|0;u[x+5>>0]=u[58892]|
0;ke(x+1|0,58893,0,c[d+4>>2]|0);a=Xb()|0;c[h>>2]=l;l=t+(Bc(t,12,a,x,h)|0)|0;x=kd(t,l,d)|0;a=Lb(d)|0;c[r>>2]=a;g=0;sd(1,t|0,x|0,l|0,k|0,n|0,m|0,r|0);l=g;g=0;if(l&1)t=J()|0,Na(a)|0,V(t|0);else return Na(a)|0,c[e>>2]=c[b>>2],x=c[n>>2]|0,t=c[m>>2]|0,c[h>>2]=c[e>>2],t=y(h,k,x,t,d,f)|0,F=q,t|0;return 0},function(a,b,d,f,l){b|=0;d|=0;f|=0;l|=0;var h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,x=F;F=F+80|0;m=x;a=x+70|0;q=x+12|0;r=x+32|0;k=x+8|0;n=x+4|0;u[a>>0]=u[58901]|0;u[a+1>>0]=u[58902]|0;u[a+2>>0]=u[58903]|0;u[a+
3>>0]=u[58904]|0;u[a+4>>0]=u[58905]|0;u[a+5>>0]=u[58906]|0;h=Xb()|0;c[m>>2]=l;a=Bc(q,20,h,a,m)|0;l=q+a|0;h=kd(q,l,d)|0;e=Lb(d)|0;c[k>>2]=e;g=0;k=ma(37,k|0,44220)|0;t=g;g=0;if(t&1)t=J()|0,Na(e)|0,V(t|0);else return Na(e)|0,sg[c[(c[k>>2]|0)+32>>2]&31](k,q,l,r)|0,t=r+a|0,c[n>>2]=c[b>>2],c[m>>2]=c[n>>2],t=y(m,r,(h|0)==(l|0)?t:r+(h-q)|0,t,d,f)|0,F=x,t|0;return 0},function(a,b,d,f,l){a|=0;b|=0;d|=0;f|=0;l|=0;var h=0,e=0,k=0,m=0,n=0,n=F;F=F+32|0;h=n+20|0;e=n+16|0;k=n+12|0;m=n;a:do if(c[d+4>>2]&1){h=Lb(d)|
0;c[k>>2]=h;g=0;e=ma(37,k|0,44368)|0;k=g;g=0;b:do if(k&1)n=J()|0,Na(h)|0,h=n;else{Na(h)|0;h=c[e>>2]|0;if(l)bb[c[h+24>>2]&127](m,e);else bb[c[h+28>>2]&127](m,e);a=u[m>>0]|0;d=0==(a&1);h=m+4|0;l=m+8|0;k=d?h:m+4|0;h=d?h:c[m+8>>2]|0;d=0==(a&1);c:do if((h|0)!=((d?k:c[l>>2]|0)+((d?(a&255)>>>1:c[k>>2]|0)<<2)|0)){for(;;){e=c[h>>2]|0;if(f=c[b>>2]|0){d=f+24|0;a=c[d>>2]|0;if((a|0)==(c[f+28>>2]|0)){if(g=0,e=ma(c[(c[f>>2]|0)+52>>2]|0,f|0,e|0)|0,a=g,g=0,a&1)break}else c[d>>2]=a+4,c[a>>2]=e;-1==(e|0)&&(c[b>>2]=
0)}h=h+4|0;a=u[m>>0]|0;d=0==(a&1);if((h|0)==((d?k:c[l>>2]|0)+((d?(a&255)>>>1:c[k>>2]|0)<<2)|0))break c}h=J()|0;Ka(m);break b}while(0);h=c[b>>2]|0;Ka(m);break a}while(0);V(h|0)}else m=c[(c[a>>2]|0)+24>>2]|0,c[e>>2]=c[b>>2],c[h>>2]=c[e>>2],h=cf[m&31](a,h,d,f,l&1)|0;while(0);F=n;return h|0},function(a,b,d,f,l){b|=0;d|=0;f|=0;l|=0;var h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,q=F;F=F+128|0;h=q;x=q+116|0;t=q+104|0;k=q+20|0;n=q+16|0;m=q+12|0;r=q+8|0;e=q+4|0;u[x>>0]=u[58887]|0;u[x+1>>0]=u[58888]|0;u[x+2>>0]=u[58889]|
0;u[x+3>>0]=u[58890]|0;u[x+4>>0]=u[58891]|0;u[x+5>>0]=u[58892]|0;ke(x+1|0,58893,1,c[d+4>>2]|0);a=Xb()|0;c[h>>2]=l;l=t+(Bc(t,12,a,x,h)|0)|0;x=kd(t,l,d)|0;a=Lb(d)|0;c[r>>2]=a;g=0;sd(3,t|0,x|0,l|0,k|0,n|0,m|0,r|0);l=g;g=0;if(l&1)t=J()|0,Na(a)|0,V(t|0);else return Na(a)|0,c[e>>2]=c[b>>2],x=c[n>>2]|0,t=c[m>>2]|0,c[h>>2]=c[e>>2],t=Me(h,k,x,t,d,f)|0,F=q,t|0;return 0},function(a,b,d,f,l){b|=0;d|=0;f|=0;l|=0;var h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,q=F;F=F+128|0;h=q;x=q+116|0;t=q+104|0;k=q+20|0;n=q+16|0;m=
q+12|0;r=q+8|0;e=q+4|0;u[x>>0]=u[58887]|0;u[x+1>>0]=u[58888]|0;u[x+2>>0]=u[58889]|0;u[x+3>>0]=u[58890]|0;u[x+4>>0]=u[58891]|0;u[x+5>>0]=u[58892]|0;ke(x+1|0,58893,0,c[d+4>>2]|0);a=Xb()|0;c[h>>2]=l;l=t+(Bc(t,12,a,x,h)|0)|0;x=kd(t,l,d)|0;a=Lb(d)|0;c[r>>2]=a;g=0;sd(3,t|0,x|0,l|0,k|0,n|0,m|0,r|0);l=g;g=0;if(l&1)t=J()|0,Na(a)|0,V(t|0);else return Na(a)|0,c[e>>2]=c[b>>2],x=c[n>>2]|0,t=c[m>>2]|0,c[h>>2]=c[e>>2],t=Me(h,k,x,t,d,f)|0,F=q,t|0;return 0},function(a,b,d,f,l){b|=0;d|=0;f|=0;l|=0;var h=0,e=0,k=0,
m=0,n=0,q=0,r=0,x=0,t=0,x=F;F=F+192|0;m=x;a=x+180|0;q=x+160|0;r=x+12|0;k=x+8|0;n=x+4|0;u[a>>0]=u[58901]|0;u[a+1>>0]=u[58902]|0;u[a+2>>0]=u[58903]|0;u[a+3>>0]=u[58904]|0;u[a+4>>0]=u[58905]|0;u[a+5>>0]=u[58906]|0;h=Xb()|0;c[m>>2]=l;a=Bc(q,20,h,a,m)|0;l=q+a|0;h=kd(q,l,d)|0;e=Lb(d)|0;c[k>>2]=e;g=0;k=ma(37,k|0,44212)|0;t=g;g=0;if(t&1)t=J()|0,Na(e)|0,V(t|0);else return Na(e)|0,sg[c[(c[k>>2]|0)+48>>2]&31](k,q,l,r)|0,t=r+(a<<2)|0,c[n>>2]=c[b>>2],c[m>>2]=c[n>>2],t=Me(m,r,(h|0)==(l|0)?t:r+(h-q<<2)|0,t,d,f)|
0,F=x,t|0;return 0},function(c,a,b,d,g){a|=0;b|=0;d|=0;g|=0;if((a|0)!=(b|0))for(;c=u[a>>0]|0,u[g>>0]=-1<c<<24>>24?c:d,a=a+1|0,(a|0)!=(b|0);)g=g+1|0;return b|0},function(a,b,d,f,l){b|=0;f|=0;l|=0;var e=0,k=0,k=F;F=F+16|0;e=k;c[l>>2]=d|0;d=md(c[(a|0)+8>>2]|0)|0;g=0;a=La(34,e|0,0,b|0)|0;b=g;g=0;b&1&&(e=J()|0,0!=(d|0)&&(g=0,ca(75,d|0)|0,k=g,g=0,k&1)&&(k=J(0)|0,h(k)),V(e|0));0!=(d|0)&&(g=0,ca(75,d|0)|0,b=g,g=0,b&1)&&(b=J(0)|0,h(b));switch(a|0){case 0:case -1:e=2;break;default:if(a=a+-1|0,a>>>0<=(f-(c[l>>
2]|0)|0)>>>0)if(a)for(;;)if(b=u[e>>0]|0,f=c[l>>2]|0,c[l>>2]=f+1,u[f>>0]=b,a=a+-1|0)e=e+1|0;else{e=0;break}else e=0;else e=1}F=k;return e|0},function(a,b,d,f,l){b|=0;d|=0;f|=0;l|=0;var e=0,k=0,m=0,n=0,q=0,r=0,x=0,u=0,q=f,n=(a|0)+8|0;a:do if((d|0)==(f|0)|0==(l|0))a=0;else{for(m=a=0;;){k=md(c[n>>2]|0)|0;g=0;e=La(36,d|0,q-d|0,b|0)|0;u=g;g=0;if(u&1){x=k;break}if(0!=(k|0)&&(g=0,ca(75,k|0)|0,u=g,g=0,u&1)){r=5;break}switch(e|0){case -2:case -1:break a;case 0:d=d+1|0;e=1;break;default:d=d+e|0}a=e+a|0;m=m+
1|0;if((d|0)==(f|0)|m>>>0>=l>>>0)break a}5==(r|0)&&(u=J(0)|0,h(u));a=J()|0;0!=(x|0)&&(g=0,ca(75,x|0)|0,u=g,g=0,u&1)&&(u=J(0)|0,h(u));V(a|0)}while(0);return a|0},function(a,b,d,f,g){b|=0;d|=0;f|=0;var h=0;if((b|0)!=(d|0))for(h=b,a=g|0;g=c[h>>2]|0,u[a>>0]=128>g>>>0?g&255:f,h=h+4|0,(h|0)!=(d|0);)a=a+1|0;return b+((d-b|0)>>>2<<2)|0},function(a,b,d,f,g){c[(g|0)>>2]=d|0;return 3},function(c,a,b,d,f){f|=0;c=(d|0)-(b|0)|0;return(c>>>0<f>>>0?c:f)|0},function(a,b,d,f,g){c[(g|0)>>2]=d|0;return 3},function(c,
a,b,d,f){c=b|0;d|=0;f|=0;c|=0;d|=0;f|=0;a=1114111;var g=0,h=0,e=0,k=0,m=0,n=0,q=0,q=d;b=c;a:do if(0!=(f|0)&b>>>0<d>>>0){n=b;g=0;b:for(;;){b=u[n>>0]|0;m=b&255;if(m>>>0>a>>>0){b=n;g=42;break a}do if(-1<b<<24>>24)b=n+1|0;else{if(194>(b&255)){b=n;g=42;break a}if(224>(b&255)){if(2>(q-n|0)){b=n;g=42;break a}b=ea[n+1>>0]|0;if(128!=(b&192|0)){b=n;g=42;break a}if((b&63|m<<6&1984)>>>0>a>>>0){b=n;g=42;break a}b=n+2|0}else if(240>(b&255)){b=n;if(3>(q-b|0)){b=n;g=42;break a}e=u[n+1>>0]|0;h=u[n+2>>0]|0;switch(m|
0){case 224:if(-96!=(e&-32)<<24>>24){g=20;break b}break;case 237:if(-128!=(e&-32)<<24>>24){g=22;break b}break;default:if(-128!=(e&-64)<<24>>24){g=24;break b}}b=h&255;if(128!=(b&192|0)){b=n;g=42;break a}if(((e&255)<<6&4032|m<<12&61440|b&63)>>>0>a>>>0){b=n;g=42;break a}b=n+3|0}else{if(245<=(b&255)){b=n;g=42;break a}b=n;if(2>(f-g|0)>>>0|4>(q-b|0)){b=n;g=42;break a}k=u[n+1>>0]|0;h=u[n+2>>0]|0;e=u[n+3>>0]|0;switch(m|0){case 240:if(48<=(k+112&255)){g=32;break b}break;case 244:if(-128!=(k&-16)<<24>>24){g=
34;break b}break;default:if(-128!=(k&-64)<<24>>24){g=36;break b}}h&=255;if(128!=(h&192|0)){b=n;g=42;break a}b=e&255;if(128!=(b&192|0)){b=n;g=42;break a}if(((k&255)<<12&258048|m<<18&1835008|h<<6&4032|b&63)>>>0>a>>>0){b=n;g=42;break a}b=n+4|0;g=g+1|0}}while(0);g=g+1|0;if(g>>>0<f>>>0&b>>>0<d>>>0)n=b;else{g=42;break a}}20==(g|0)?b=b-c|0:22==(g|0)?b=b-c|0:24==(g|0)?b=b-c|0:32==(g|0)?b=b-c|0:34==(g|0)?b=b-c|0:36==(g|0)&&(b=b-c|0)}else g=42;while(0);42==(g|0)&&(b=b-c|0);return b|0},function(a,b,d,g,f){c[(f|
0)>>2]=d|0;return 3},function(c,a,b,d,g){c=b|0;d|=0;g|=0;c|=0;d|=0;g|=0;a=1114111;var f=0,h=0,e=0,k=0,m=0,n=0,q=0,q=d;b=c;a:do if(0!=(g|0)&b>>>0<d>>>0){m=b;n=0;b:for(;;){b=u[m>>0]|0;k=b&255;do if(-1<b<<24>>24){if(k>>>0>a>>>0){b=m;f=42;break a}b=m+1|0}else{if(194>(b&255)){b=m;f=42;break a}if(224>(b&255)){if(2>(q-m|0)){b=m;f=42;break a}b=ea[m+1>>0]|0;if(128!=(b&192|0)){b=m;f=42;break a}if((b&63|k<<6&1984)>>>0>a>>>0){b=m;f=42;break a}b=m+2|0}else if(240>(b&255)){b=m;if(3>(q-b|0)){b=m;f=42;break a}h=
u[m+1>>0]|0;f=u[m+2>>0]|0;switch(k|0){case 224:if(-96!=(h&-32)<<24>>24){f=20;break b}break;case 237:if(-128!=(h&-32)<<24>>24){f=22;break b}break;default:if(-128!=(h&-64)<<24>>24){f=24;break b}}b=f&255;if(128!=(b&192|0)){b=m;f=42;break a}if(((h&255)<<6&4032|k<<12&61440|b&63)>>>0>a>>>0){b=m;f=42;break a}b=m+3|0}else{if(245<=(b&255)){b=m;f=42;break a}b=m;if(4>(q-b|0)){b=m;f=42;break a}e=u[m+1>>0]|0;f=u[m+2>>0]|0;h=u[m+3>>0]|0;switch(k|0){case 240:if(48<=(e+112&255)){f=32;break b}break;case 244:if(-128!=
(e&-16)<<24>>24){f=34;break b}break;default:if(-128!=(e&-64)<<24>>24){f=36;break b}}f&=255;if(128!=(f&192|0)){b=m;f=42;break a}b=h&255;if(128!=(b&192|0)){b=m;f=42;break a}if(((e&255)<<12&258048|k<<18&1835008|f<<6&4032|b&63)>>>0>a>>>0){b=m;f=42;break a}b=m+4|0}}while(0);n=n+1|0;if(n>>>0<g>>>0&b>>>0<d>>>0)m=b;else{f=42;break a}}20==(f|0)?b=b-c|0:22==(f|0)?b=b-c|0:24==(f|0)?b=b-c|0:32==(f|0)?b=b-c|0:34==(f|0)?b=b-c|0:36==(f|0)&&(b=b-c|0)}else f=42;while(0);42==(f|0)&&(b=b-c|0);return b|0},function(a,
b,d,f,g){a|=0;b|=0;d|=0;var h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,q=F;F=F+272|0;k=q+8|0;n=q;e=c[b>>2]|0;c[n>>2]=e;g=(m=0!=(a|0))?f|0:256;f=m?a:k;a=e;a:do if(0!=(g|0)&0!=(e|0)){e=g;h=a;for(g=0;;){a=d>>>0>=e>>>0;if(!(a|32<d>>>0)){a=h;break a}a=a?e:d;d=d-a|0;h=f;r=n;x=0;h|=0;r|=0;a|=0;var t=0,w=0,A=0,D=0,D=F;F=F+16|0;A=D;b:do if(h){c:do if(3<a>>>0){x=a;for(t=c[r>>2]|0;;){w=c[t>>2]|0;if(126<(w+-1|0)>>>0){if(!w)break;w=ze(h,w,0)|0;if(-1==(w|0)){a=-1;break b}h=h+w|0;x=x-w|0}else u[h>>0]=w,h=h+1|0,x=x+-1|0,t=
c[r>>2]|0;t=t+4|0;c[r>>2]=t;if(3>=x>>>0)break c}u[h>>0]=0;c[r>>2]=0;a=a-x|0;break b}else x=a;while(0);if(x){for(t=c[r>>2]|0;;){w=c[t>>2]|0;if(126<(w+-1|0)>>>0){if(!w){t=19;break}w=ze(A,w,0)|0;if(-1==(w|0)){a=-1;break b}if(x>>>0<w>>>0){t=22;break}ze(h,c[t>>2]|0,0)|0;h=h+w|0;x=x-w|0}else u[h>>0]=w,h=h+1|0,x=x+-1|0,t=c[r>>2]|0;t=t+4|0;c[r>>2]=t;if(!x)break b}19==(t|0)?(u[h>>0]=0,c[r>>2]=0,a=a-x|0):22==(t|0)&&(a=a-x|0)}}else if(h=c[r>>2]|0,x=c[h>>2]|0){a=0;do{if(127<x>>>0){if(x=ze(A,x,0)|0,-1==(x|0)){a=
-1;break b}}else x=1;a=x+a|0;h=h+4|0;x=c[h>>2]|0}while(0!=(x|0))}else a=0;while(0);F=D;a|=0;if(-1==(a|0)){g=d;break}r=(x=(f|0)==(k|0))?0:a;h=e-r|0;f=x?f:f+a|0;g=a+g|0;a=c[n>>2]|0;if((e|0)!=(r|0)&0!=(a|0))e=h,h=a;else{e=h;break a}}d=g;e=0;a=c[n>>2]|0;g=-1}else e=g,g=0;while(0);a:do if(0!=(a|0)&&0!=(e|0)&0!=(d|0)){h=a;for(a=f;;){f=ze(a,c[h>>2]|0,0)|0;if(2>(f+1|0)>>>0)break;h=(c[n>>2]|0)+4|0;c[n>>2]=h;d=d+-1|0;g=g+1|0;if((e|0)!=(f|0)&0!=(d|0))e=e-f|0,a=a+f|0;else break a}f?g=-1:c[n>>2]=0}while(0);m&&
(c[b>>2]=c[n>>2]);F=q;return g|0},function(a,b,d,f,g){a|=0;b|=0;d|=0;g|=0;var h=0,e=0,k=0,m=0,n=0,q=0,r=0,x=0,u=0,x=F;F=F+1040|0;n=x+8|0;r=x;m=c[b>>2]|0;c[r>>2]=m;f=(q=0!=(a|0))?f|0:256;a=q?a:n;h=m;a:do if(0!=(f|0)&0!=(m|0)){k=f;m=h;for(f=0;;){h=d>>>2;e=h>>>0>=k>>>0;if(!(131<d>>>0|e)){h=m;break a}h=e?k:h;d=d-h|0;h=th(a,r,h,g)|0;if(-1==(h|0)){f=d;break}m=(u=(a|0)==(n|0))?0:h;e=k-m|0;a=u?a:a+(h<<2)|0;f=h+f|0;h=c[r>>2]|0;if((k|0)!=(m|0)&0!=(h|0))k=e,m=h;else{k=e;break a}}d=f;k=0;h=c[r>>2]|0;f=-1}else k=
f,f=0;while(0);a:do if(0!=(h|0)&&0!=(k|0)&0!=(d|0)){e=h;for(h=a;;){a=Hf(h,e,d,g)|0;if(3>(a+2|0)>>>0)break;e=(c[r>>2]|0)+a|0;c[r>>2]=e;k=k+-1|0;f=f+1|0;if(0!=(k|0)&(d|0)!=(a|0))d=d-a|0,h=h+4|0;else break a}switch(a|0){case -1:f=-1;break a;case 0:c[r>>2]=0;break a;default:c[g>>2]=0;break a}}while(0);q&&(c[b>>2]=c[r>>2]);F=x;return f|0},Pd,Pd,Pd,Pd,Pd,Pd,Pd,Pd,Pd],Ci=[function(c,a,b){ac(15);return 0},function(a,b,d){a|=0;b|=0;d|=0;var f=0,g=0,h=0,e=0,k=0,k=F;F=F+16|0;e=k;(a|0)==(b|0)?(c[d>>2]=4,f=0):
(g=sb()|0,h=c[g>>2]|0,c[g>>2]=0,f=+qg(a,e,Xb()|0),(a=c[g>>2]|0)||(c[g>>2]=h),(c[e>>2]|0)!=(b|0)?(c[d>>2]=4,f=0):34==(a|0)&&(c[d>>2]=4));F=k;return+f},function(a,b,d){a|=0;b|=0;d|=0;var f=0,g=0,h=0,e=0,k=0,k=F;F=F+16|0;e=k;(a|0)!=(b|0)?(g=sb()|0,h=c[g>>2]|0,c[g>>2]=0,f=+qg(a,e,Xb()|0),(a=c[g>>2]|0)||(c[g>>2]=h),(c[e>>2]|0)!=(b|0)?(c[d>>2]=4,f=0):34==(a|0)&&(c[d>>2]=4)):(c[d>>2]=4,f=0);F=k;return+f},function(a,b,d){a|=0;b|=0;d|=0;var f=0,g=0,h=0,e=0,k=0,k=F;F=F+16|0;e=k;(a|0)!=(b|0)?(g=sb()|0,h=c[g>>
2]|0,c[g>>2]=0,f=+qg(a,e,Xb()|0),(a=c[g>>2]|0)||(c[g>>2]=h),(c[e>>2]|0)!=(b|0)?(c[d>>2]=4,f=0):34==(a|0)&&(c[d>>2]=4)):(c[d>>2]=4,f=0);F=k;return+f}],Di=[xe,function(){if(u[8]|0||!(Da(8)|0))return 35648;Ea(72,35648,Ga|0)|0;Ca(8);return 35648},hh,Xb,function(){a:{var a,b;a=2296;var d=0,f=0,h=0,e=0,k=0;c[a+4>>2]=0;c[a>>2]=44196;e=a+8|0;g=0;ga(94,e|0,28);h=g;g=0;if(h&1)b=J()|0;else{h=a+144|0;g=0;na(5,h|0,58885,1);f=g;g=0;if(f&1)b=J()|0;else{d=c[e>>2]|0;f=a+12|0;b=c[f>>2]|0;if((b|0)!=(d|0)){do b=b+-4|
0;while((b|0)!=(d|0));c[f>>2]=b}c[495]=0;c[494]=43124;g=0;ga(95,a|0,1976);f=g;g=0;do{if(!(d=f&1||(c[497]=0,c[496]=43164,g=0,ga(96,a|0,1984),f=g,g=0,f&1)||(c[499]=0,c[498]=44236,c[500]=0,u[2004]=0,f=Kc()|0,c[500]=f,g=0,ga(97,a|0,1992),f=g,g=0,f&1)||(c[503]=0,c[502]=44484,g=0,ga(98,a|0,2008),f=g,g=0,f&1)||(c[505]=0,c[504]=44552,g=0,ga(99,a|0,2016),f=g,g=0,f&1)||(g=0,ga(100,2024,1),f=g,g=0,f&1)||(g=0,ga(101,a|0,2024),f=g,g=0,f&1)||(c[511]=0,c[510]=44600,g=0,ga(102,a|0,2040),f=g,g=0,f&1)||(c[513]=0,c[512]=
44648,g=0,ga(103,a|0,2048),f=g,g=0,f&1))){var d=2056,m=1,d=d|0,m=m|0;c[d+4>>2]=m+-1;c[d>>2]=44384;u[d+8>>0]=46;u[d+9>>0]=44;d=d+12|0;c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;d=(g=0,ga(104,a|0,2056),f=g,g=0,f&1)}d||(d=2080,m=1,d|=0,m|=0,c[d+4>>2]=m+-1,c[d>>2]=44424,c[d+8>>2]=46,c[d+12>>2]=44,d=d+16|0,c[d>>2]=0,c[d+4>>2]=0,c[d+8>>2]=0,d=(g=0,ga(105,a|0,2080),f=g,g=0,f&1));if(d||(c[529]=0,c[528]=43204,g=0,ga(106,a|0,2112),f=g,g=0,f&1)||(c[531]=0,c[530]=43276,g=0,ga(107,a|0,2120),f=g,g=0,f&1)||(c[533]=0,c[532]=
43348,g=0,ga(108,a|0,2128),f=g,g=0,f&1))k=42;else if(c[535]=0,c[534]=43408,g=0,ga(109,a|0,2136),f=g,g=0,f&1)k=42;else if(c[537]=0,c[536]=43716,g=0,ga(110,a|0,2144),f=g,g=0,f&1)k=42;else if(c[539]=0,c[538]=43780,g=0,ga(111,a|0,2152),f=g,g=0,f&1)k=42;else if(c[541]=0,c[540]=43844,g=0,ga(112,a|0,2160),f=g,g=0,f&1)k=42;else if(c[543]=0,c[542]=43908,g=0,ga(113,a|0,2168),f=g,g=0,f&1)k=42;else if(c[545]=0,c[544]=43972,g=0,ga(114,a|0,2176),f=g,g=0,f&1)k=42;else if(c[547]=0,c[546]=44008,g=0,ga(115,a|0,2184),
f=g,g=0,f&1)k=42;else if(c[549]=0,c[548]=44044,g=0,ga(116,a|0,2192),f=g,g=0,f&1)k=42;else if(c[551]=0,c[550]=44080,g=0,ga(117,a|0,2200),f=g,g=0,f&1)k=42;else if(c[553]=0,c[552]=43468,c[554]=43516,g=0,ga(118,a|0,2208),f=g,g=0,f&1)k=42;else if(c[557]=0,c[556]=43560,c[558]=43608,g=0,ga(119,a|0,2224),f=g,g=0,f&1)k=42;else if(c[561]=0,c[560]=44464,g=0,b=Va(3)|0,f=g,g=0,f&1)b=J()|0;else if(c[562]=b,c[560]=43652,g=0,ga(120,a|0,2240),f=g,g=0,f&1)k=42;else if(c[565]=0,c[564]=44464,g=0,b=Va(3)|0,f=g,g=0,f&
1)b=J()|0;else if(c[566]=b,c[564]=43684,g=0,ga(121,a|0,2256),k=g,g=0,k&1)k=42;else if(c[569]=0,c[568]=44116,g=0,ga(122,a|0,2272),k=g,g=0,k&1)k=42;else if(c[571]=0,c[570]=44156,g=0,ga(123,a|0,2280),k=g,g=0,k&1)k=42;else break a}while(0);42==(k|0)&&(b=J()|0);W(h)}ag(e)}V(b|0)}c[11245]=2296;return 44980},function(){var a=0,a=0;0==(u[2288]|0)&&0!=(Da(2288)|0)&&(g=0,Va(4)|0,a=g,g=0,a&1?(a=J()|0,Hc(2288),V(a|0)):(c[11246]=44980,Ca(2288)));a=c[11246]|0;a=c[a>>2]|0;c[11247]=a;td(a);return 44988},function(){var a=
0;0==(u[2456]|0)&&0!=(Da(2456)|0)&&(g=0,Va(5)|0,a=g,g=0,a&1?(a=J()|0,Hc(2456),V(a|0)):(c[11248]=44988,Ca(2456)));return c[11248]|0},function(){return 37296},function(){return 37304},function(){return 37300},xe,xe,xe,xe,xe,xe],sg=[Pe,function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var g=0,h=0,e=0,k=0,m=0,n=0,q=0,q=F;F=F+16|0;m=q;k=a+92|0;e=c[b>>2]|0;c[b>>2]=0;b=c[k>>2]|0;c[k>>2]=e;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);c[m>>2]=0;c[m+4>>2]=f;k=d+8|0;c[m+8>>2]=c[k>>2];if(f){b=qa(4624)|0;f=a+8|0;g=b+4|0;h=f;e=g+84|
0;do c[g>>2]=c[h>>2],g=g+4|0,h=h+4|0;while((g|0)<(e|0));g=b+88|0;e=g+40|0;do c[g>>2]=0,g=g+4|0;while((g|0)<(e|0));c[b>>2]=35660;c[b+128>>2]=c[a+136>>2];c[b+132>>2]=c[a+140>>2];c[b+136>>2]=c[a+144>>2];c[b+140>>2]=c[a+148>>2];c[b+144>>2]=c[a+152>>2];c[b+148>>2]=c[a+156>>2];c[b+152>>2]=c[a+160>>2];g=b+156|0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;c[b+172>>2]=c[f>>2];c[b+176>>2]=0;c[b+180>>2]=0;c[b+184>>2]=0;g=b+4568|0;f=b+188|0;do c[f>>2]=0,c[f+4>>2]=0,R[f+8>>1]=0,R[f+10>>1]=1,f=f+12|0;while((f|
0)!=(g|0));h=a+4|0;c[g>>2]=0;c[g+4>>2]=0;R[g+8>>1]=0;u[g+10>>0]=0;e=b+4580|0;c[e>>2]=0;c[e+4>>2]=0;R[e+8>>1]=0;u[e+10>>0]=0;e=b+4592|0;c[e>>2]=0;c[e+4>>2]=0;c[e+8>>2]=0;c[e+12>>2]=0;c[e+16>>2]=0;c[e+20>>2]=0;c[e+24>>2]=0;u[e+28>>0]=0;c[b+28>>2]|0||(c[b+20>>2]=1);f=c[h>>2]|0;c[h>>2]=b;f&&(Ha[c[(c[f>>2]|0)+4>>2]&255](f),b=c[h>>2]|0);la(b,m)}m=a+100|0;c[m>>2]=32;c[a+96>>2]=0;b=c[d>>2]|0;if(!b)return c[a+108>>2]=c[d+4>>2],c[a+104>>2]=c[k>>2],Tb(a),n=c[(a+116|0)>>2]|0,a=c[m>>2]|0,a=(a+-32|0)/8|0,a=n-a|
0,F=q,a|0;c[a+132>>2]=b;g=a+120|0;k=a+124|0;f=c[k>>2]|0;h=b=c[g>>2]|0;e=f-h|0;4E3<=e>>>0?4E3<e>>>0&&(n=b+4E3|0,(f|0)!=(n|0))&&(f=c[k>>2]=n):(ja(g,4E3-e|0),h=b=c[g>>2]|0,f=c[k>>2]|0);c[a+108>>2]=h;c[a+104>>2]=f-b;Tb(a);n=a+116|0;n=c[n>>2]|0;a=c[m>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=n-a|0;F=q;return a|0},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var g=0,h=0,e=0,k=0,m=0,n=0,q=0,q=F;F=F+16|0;m=q;k=a+92|0;e=c[b>>2]|0;c[b>>2]=0;b=c[k>>2]|0;c[k>>2]=e;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);c[m>>2]=0;c[m+4>>2]=f;k=d+8|
0;c[m+8>>2]=c[k>>2];if(f){b=qa(4600)|0;f=a+8|0;g=b+4|0;h=f;e=g+84|0;do c[g>>2]=c[h>>2],g=g+4|0,h=h+4|0;while((g|0)<(e|0));g=b+88|0;e=g+40|0;do c[g>>2]=0,g=g+4|0;while((g|0)<(e|0));c[b>>2]=35688;g=b+132|0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;c[b+148>>2]=c[f>>2];c[b+152>>2]=0;c[b+156>>2]=0;c[b+160>>2]=0;g=b+4544|0;f=b+164|0;do c[f>>2]=0,c[f+4>>2]=0,R[f+8>>1]=0,R[f+10>>1]=1,f=f+12|0;while((f|0)!=(g|0));h=a+4|0;c[g>>2]=0;c[g+4>>2]=0;R[g+8>>1]=0;u[g+10>>0]=0;e=b+4556|0;c[e>>2]=0;c[e+4>>2]=0;
R[e+8>>1]=0;u[e+10>>0]=0;e=b+4568|0;c[e>>2]=0;c[e+4>>2]=0;c[e+8>>2]=0;c[e+12>>2]=0;c[e+16>>2]=0;c[e+20>>2]=0;c[e+24>>2]=0;u[e+28>>0]=0;c[b+28>>2]|0||(c[b+20>>2]=1);f=c[h>>2]|0;c[h>>2]=b;f&&(Ha[c[(c[f>>2]|0)+4>>2]&255](f),b=c[h>>2]|0);la(b,m)}m=a+100|0;c[m>>2]=32;c[a+96>>2]=0;b=c[d>>2]|0;if(!b)return c[a+108>>2]=c[d+4>>2],c[a+104>>2]=c[k>>2],Ib(a),n=c[(a+116|0)>>2]|0,a=c[m>>2]|0,a=(a+-32|0)/8|0,a=n-a|0,F=q,a|0;c[a+132>>2]=b;g=a+120|0;k=a+124|0;f=c[k>>2]|0;h=b=c[g>>2]|0;e=f-h|0;4E3<=e>>>0?4E3<e>>>0&&
(n=b+4E3|0,(f|0)!=(n|0))&&(f=c[k>>2]=n):(ja(g,4E3-e|0),h=b=c[g>>2]|0,f=c[k>>2]|0);c[a+108>>2]=h;c[a+104>>2]=f-b;Ib(a);n=a+116|0;n=c[n>>2]|0;a=c[m>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=n-a|0;F=q;return a|0},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var g=0,h=0,e=0,k=0,m=0,n=0,q=0,q=F;F=F+16|0;m=q;k=a+92|0;e=c[b>>2]|0;c[b>>2]=0;b=c[k>>2]|0;c[k>>2]=e;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);c[m>>2]=0;c[m+4>>2]=f;k=d+8|0;c[m+8>>2]=c[k>>2];if(f){b=qa(4600)|0;f=a+8|0;g=b+4|0;h=f;e=g+84|0;do c[g>>2]=c[h>>2],g=g+4|0,h=h+
4|0;while((g|0)<(e|0));g=b+88|0;e=g+40|0;do c[g>>2]=0,g=g+4|0;while((g|0)<(e|0));c[b>>2]=35716;g=b+132|0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;c[b+148>>2]=c[f>>2];c[b+152>>2]=0;c[b+156>>2]=0;c[b+160>>2]=0;g=b+4544|0;f=b+164|0;do c[f>>2]=0,c[f+4>>2]=0,R[f+8>>1]=0,R[f+10>>1]=1,f=f+12|0;while((f|0)!=(g|0));h=a+4|0;c[g>>2]=0;c[g+4>>2]=0;R[g+8>>1]=0;u[g+10>>0]=0;e=b+4556|0;c[e>>2]=0;c[e+4>>2]=0;R[e+8>>1]=0;u[e+10>>0]=0;e=b+4568|0;c[e>>2]=0;c[e+4>>2]=0;c[e+8>>2]=0;c[e+12>>2]=0;c[e+16>>2]=0;c[e+
20>>2]=0;c[e+24>>2]=0;u[e+28>>0]=0;c[b+28>>2]|0||(c[b+20>>2]=1);f=c[h>>2]|0;c[h>>2]=b;f&&(Ha[c[(c[f>>2]|0)+4>>2]&255](f),b=c[h>>2]|0);la(b,m)}m=a+100|0;c[m>>2]=32;c[a+96>>2]=0;b=c[d>>2]|0;if(!b)return c[a+108>>2]=c[d+4>>2],c[a+104>>2]=c[k>>2],wb(a),n=c[(a+116|0)>>2]|0,a=c[m>>2]|0,a=(a+-32|0)/8|0,a=n-a|0,F=q,a|0;c[a+132>>2]=b;g=a+120|0;k=a+124|0;f=c[k>>2]|0;h=b=c[g>>2]|0;e=f-h|0;4E3<=e>>>0?4E3<e>>>0&&(n=b+4E3|0,(f|0)!=(n|0))&&(f=c[k>>2]=n):(ja(g,4E3-e|0),h=b=c[g>>2]|0,f=c[k>>2]|0);c[a+108>>2]=h;c[a+
104>>2]=f-b;wb(a);n=a+116|0;n=c[n>>2]|0;a=c[m>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=n-a|0;F=q;return a|0},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var g=0,h=0,e=0,k=0,m=0,n=0,q=0,q=F;F=F+16|0;m=q;k=a+92|0;e=c[b>>2]|0;c[b>>2]=0;b=c[k>>2]|0;c[k>>2]=e;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);c[m>>2]=0;c[m+4>>2]=f;k=d+8|0;c[m+8>>2]=c[k>>2];if(f){b=qa(4600)|0;f=a+8|0;g=b+4|0;h=f;e=g+84|0;do c[g>>2]=c[h>>2],g=g+4|0,h=h+4|0;while((g|0)<(e|0));g=b+88|0;e=g+40|0;do c[g>>2]=0,g=g+4|0;while((g|0)<(e|0));c[b>>2]=35744;g=b+132|
0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;c[b+148>>2]=c[f>>2];c[b+152>>2]=0;c[b+156>>2]=0;c[b+160>>2]=0;g=b+4544|0;f=b+164|0;do c[f>>2]=0,c[f+4>>2]=0,R[f+8>>1]=0,R[f+10>>1]=1,f=f+12|0;while((f|0)!=(g|0));h=a+4|0;c[g>>2]=0;c[g+4>>2]=0;R[g+8>>1]=0;u[g+10>>0]=0;e=b+4556|0;c[e>>2]=0;c[e+4>>2]=0;R[e+8>>1]=0;u[e+10>>0]=0;e=b+4568|0;c[e>>2]=0;c[e+4>>2]=0;c[e+8>>2]=0;c[e+12>>2]=0;c[e+16>>2]=0;c[e+20>>2]=0;c[e+24>>2]=0;u[e+28>>0]=0;c[b+28>>2]|0||(c[b+20>>2]=1);f=c[h>>2]|0;c[h>>2]=b;f&&(Ha[c[(c[f>>2]|
0)+4>>2]&255](f),b=c[h>>2]|0);la(b,m)}m=a+100|0;c[m>>2]=32;c[a+96>>2]=0;b=c[d>>2]|0;if(!b)return c[a+108>>2]=c[d+4>>2],c[a+104>>2]=c[k>>2],db(a),n=c[(a+116|0)>>2]|0,a=c[m>>2]|0,a=(a+-32|0)/8|0,a=n-a|0,F=q,a|0;c[a+132>>2]=b;g=a+120|0;k=a+124|0;f=c[k>>2]|0;h=b=c[g>>2]|0;e=f-h|0;4E3<=e>>>0?4E3<e>>>0&&(n=b+4E3|0,(f|0)!=(n|0))&&(f=c[k>>2]=n):(ja(g,4E3-e|0),h=b=c[g>>2]|0,f=c[k>>2]|0);c[a+108>>2]=h;c[a+104>>2]=f-b;db(a);n=a+116|0;n=c[n>>2]|0;a=c[m>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=n-a|0;F=q;return a|0},function(a,
b,d,f){a|=0;b|=0;d|=0;f|=0;var g=0,h=0,e=0,k=0,m=0,n=0,q=0,q=F;F=F+16|0;m=q;k=a+92|0;e=c[b>>2]|0;c[b>>2]=0;b=c[k>>2]|0;c[k>>2]=e;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);c[m>>2]=0;c[m+4>>2]=f;k=d+8|0;c[m+8>>2]=c[k>>2];if(f){b=qa(4600)|0;f=a+8|0;g=b+4|0;h=f;e=g+84|0;do c[g>>2]=c[h>>2],g=g+4|0,h=h+4|0;while((g|0)<(e|0));g=b+88|0;e=g+40|0;do c[g>>2]=0,g=g+4|0;while((g|0)<(e|0));c[b>>2]=35772;g=b+132|0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;c[b+148>>2]=c[f>>2];c[b+152>>2]=0;c[b+156>>2]=0;c[b+160>>
2]=0;g=b+4544|0;f=b+164|0;do c[f>>2]=0,c[f+4>>2]=0,R[f+8>>1]=0,R[f+10>>1]=1,f=f+12|0;while((f|0)!=(g|0));h=a+4|0;c[g>>2]=0;c[g+4>>2]=0;R[g+8>>1]=0;u[g+10>>0]=0;e=b+4556|0;c[e>>2]=0;c[e+4>>2]=0;R[e+8>>1]=0;u[e+10>>0]=0;e=b+4568|0;c[e>>2]=0;c[e+4>>2]=0;c[e+8>>2]=0;c[e+12>>2]=0;c[e+16>>2]=0;c[e+20>>2]=0;c[e+24>>2]=0;u[e+28>>0]=0;c[b+28>>2]|0||(c[b+20>>2]=1);f=c[h>>2]|0;c[h>>2]=b;f&&(Ha[c[(c[f>>2]|0)+4>>2]&255](f),b=c[h>>2]|0);la(b,m)}m=a+100|0;c[m>>2]=32;c[a+96>>2]=0;b=c[d>>2]|0;if(!b)return c[a+108>>
2]=c[d+4>>2],c[a+104>>2]=c[k>>2],kc(a),n=c[(a+116|0)>>2]|0,a=c[m>>2]|0,a=(a+-32|0)/8|0,a=n-a|0,F=q,a|0;c[a+132>>2]=b;g=a+120|0;k=a+124|0;f=c[k>>2]|0;h=b=c[g>>2]|0;e=f-h|0;4E3<=e>>>0?4E3<e>>>0&&(n=b+4E3|0,(f|0)!=(n|0))&&(f=c[k>>2]=n):(ja(g,4E3-e|0),h=b=c[g>>2]|0,f=c[k>>2]|0);c[a+108>>2]=h;c[a+104>>2]=f-b;kc(a);n=a+116|0;n=c[n>>2]|0;a=c[m>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=n-a|0;F=q;return a|0},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var g=0,h=0,e=0,k=0,m=0,n=0,q=0,q=F;F=F+16|0;m=q;k=a+92|0;e=c[b>>2]|0;c[b>>
2]=0;b=c[k>>2]|0;c[k>>2]=e;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);c[m>>2]=0;c[m+4>>2]=f;k=d+8|0;c[m+8>>2]=c[k>>2];if(f){b=qa(4624)|0;f=a+8|0;g=b+4|0;h=f;e=g+84|0;do c[g>>2]=c[h>>2],g=g+4|0,h=h+4|0;while((g|0)<(e|0));g=b+88|0;e=g+40|0;do c[g>>2]=0,g=g+4|0;while((g|0)<(e|0));c[b>>2]=35800;c[b+128>>2]=c[a+136>>2];c[b+132>>2]=c[a+140>>2];c[b+136>>2]=c[a+144>>2];c[b+140>>2]=c[a+148>>2];c[b+144>>2]=c[a+152>>2];c[b+148>>2]=c[a+156>>2];c[b+152>>2]=c[a+160>>2];g=b+156|0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+
12>>2]=0;c[b+172>>2]=c[f>>2];c[b+176>>2]=0;c[b+180>>2]=0;c[b+184>>2]=0;g=b+4568|0;f=b+188|0;do c[f>>2]=0,c[f+4>>2]=0,R[f+8>>1]=0,R[f+10>>1]=1,f=f+12|0;while((f|0)!=(g|0));h=a+4|0;c[g>>2]=0;c[g+4>>2]=0;R[g+8>>1]=0;u[g+10>>0]=0;e=b+4580|0;c[e>>2]=0;c[e+4>>2]=0;R[e+8>>1]=0;u[e+10>>0]=0;e=b+4592|0;c[e>>2]=0;c[e+4>>2]=0;c[e+8>>2]=0;c[e+12>>2]=0;c[e+16>>2]=0;c[e+20>>2]=0;c[e+24>>2]=0;u[e+28>>0]=0;c[b+28>>2]|0||(c[b+20>>2]=1);f=c[h>>2]|0;c[h>>2]=b;f&&(Ha[c[(c[f>>2]|0)+4>>2]&255](f),b=c[h>>2]|0);la(b,m)}m=
a+100|0;c[m>>2]=32;c[a+96>>2]=0;b=c[d>>2]|0;if(!b)return c[a+108>>2]=c[d+4>>2],c[a+104>>2]=c[k>>2],Ma(a),n=c[(a+116|0)>>2]|0,a=c[m>>2]|0,a=(a+-32|0)/8|0,a=n-a|0,F=q,a|0;c[a+132>>2]=b;g=a+120|0;k=a+124|0;f=c[k>>2]|0;h=b=c[g>>2]|0;e=f-h|0;4E3<=e>>>0?4E3<e>>>0&&(n=b+4E3|0,(f|0)!=(n|0))&&(f=c[k>>2]=n):(ja(g,4E3-e|0),h=b=c[g>>2]|0,f=c[k>>2]|0);c[a+108>>2]=h;c[a+104>>2]=f-b;Ma(a);n=a+116|0;n=c[n>>2]|0;a=c[m>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=n-a|0;F=q;return a|0},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var g=
0,e=0,h=0,k=0,m=0,n=0,q=0,q=F;F=F+16|0;m=q;k=a+92|0;h=c[b>>2]|0;c[b>>2]=0;b=c[k>>2]|0;c[k>>2]=h;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);c[m>>2]=0;c[m+4>>2]=f;k=d+8|0;c[m+8>>2]=c[k>>2];if(f){b=qa(4624)|0;f=a+8|0;g=b+4|0;e=f;h=g+84|0;do c[g>>2]=c[e>>2],g=g+4|0,e=e+4|0;while((g|0)<(h|0));g=b+88|0;h=g+40|0;do c[g>>2]=0,g=g+4|0;while((g|0)<(h|0));c[b>>2]=35828;c[b+128>>2]=c[a+136>>2];c[b+132>>2]=c[a+140>>2];c[b+136>>2]=c[a+144>>2];c[b+140>>2]=c[a+148>>2];c[b+144>>2]=c[a+152>>2];c[b+148>>2]=c[a+156>>2];c[b+
152>>2]=c[a+160>>2];g=b+156|0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;c[b+172>>2]=c[f>>2];c[b+176>>2]=0;c[b+180>>2]=0;c[b+184>>2]=0;g=b+4568|0;f=b+188|0;do c[f>>2]=0,c[f+4>>2]=0,R[f+8>>1]=0,R[f+10>>1]=1,f=f+12|0;while((f|0)!=(g|0));e=a+4|0;c[g>>2]=0;c[g+4>>2]=0;R[g+8>>1]=0;u[g+10>>0]=0;h=b+4580|0;c[h>>2]=0;c[h+4>>2]=0;R[h+8>>1]=0;u[h+10>>0]=0;h=b+4592|0;c[h>>2]=0;c[h+4>>2]=0;c[h+8>>2]=0;c[h+12>>2]=0;c[h+16>>2]=0;c[h+20>>2]=0;c[h+24>>2]=0;u[h+28>>0]=0;c[b+28>>2]|0||(c[b+20>>2]=1);f=c[e>>2]|
0;c[e>>2]=b;f&&(Ha[c[(c[f>>2]|0)+4>>2]&255](f),b=c[e>>2]|0);la(b,m)}m=a+100|0;c[m>>2]=32;c[a+96>>2]=0;b=c[d>>2]|0;if(!b)return c[a+108>>2]=c[d+4>>2],c[a+104>>2]=c[k>>2],fa(a),n=c[(a+116|0)>>2]|0,a=c[m>>2]|0,a=(a+-32|0)/8|0,a=n-a|0,F=q,a|0;c[a+132>>2]=b;g=a+120|0;k=a+124|0;f=c[k>>2]|0;e=b=c[g>>2]|0;h=f-e|0;4E3<=h>>>0?4E3<h>>>0&&(n=b+4E3|0,(f|0)!=(n|0))&&(f=c[k>>2]=n):(ja(g,4E3-h|0),e=b=c[g>>2]|0,f=c[k>>2]|0);c[a+108>>2]=e;c[a+104>>2]=f-b;fa(a);n=a+116|0;n=c[n>>2]|0;a=c[m>>2]|0;a=a+-32|0;a=(a|0)/8|
0;a=n-a|0;F=q;return a|0},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var g=0,h=0,e=0,k=0,m=0,n=0,q=0,q=F;F=F+16|0;m=q;k=a+92|0;e=c[b>>2]|0;c[b>>2]=0;b=c[k>>2]|0;c[k>>2]=e;if(b)Ha[c[(c[b>>2]|0)+4>>2]&255](b);c[m>>2]=0;c[m+4>>2]=f;k=d+8|0;c[m+8>>2]=c[k>>2];if(f){b=qa(4624)|0;f=a+8|0;g=b+4|0;h=f;e=g+84|0;do c[g>>2]=c[h>>2],g=g+4|0,h=h+4|0;while((g|0)<(e|0));g=b+88|0;e=g+40|0;do c[g>>2]=0,g=g+4|0;while((g|0)<(e|0));c[b>>2]=35856;c[b+128>>2]=c[a+136>>2];c[b+132>>2]=c[a+140>>2];c[b+136>>2]=c[a+144>>2];c[b+140>>
2]=c[a+148>>2];c[b+144>>2]=c[a+152>>2];c[b+148>>2]=c[a+156>>2];c[b+152>>2]=c[a+160>>2];g=b+156|0;c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;c[g+12>>2]=0;c[b+172>>2]=c[f>>2];c[b+176>>2]=0;c[b+180>>2]=0;c[b+184>>2]=0;g=b+4568|0;f=b+188|0;do c[f>>2]=0,c[f+4>>2]=0,R[f+8>>1]=0,R[f+10>>1]=1,f=f+12|0;while((f|0)!=(g|0));h=a+4|0;c[g>>2]=0;c[g+4>>2]=0;R[g+8>>1]=0;u[g+10>>0]=0;e=b+4580|0;c[e>>2]=0;c[e+4>>2]=0;R[e+8>>1]=0;u[e+10>>0]=0;e=b+4592|0;c[e>>2]=0;c[e+4>>2]=0;c[e+8>>2]=0;c[e+12>>2]=0;c[e+16>>2]=0;c[e+20>>2]=
0;c[e+24>>2]=0;u[e+28>>0]=0;c[b+28>>2]|0||(c[b+20>>2]=1);f=c[h>>2]|0;c[h>>2]=b;f&&(Ha[c[(c[f>>2]|0)+4>>2]&255](f),b=c[h>>2]|0);la(b,m)}m=a+100|0;c[m>>2]=32;c[a+96>>2]=0;b=c[d>>2]|0;if(!b)return c[a+108>>2]=c[d+4>>2],c[a+104>>2]=c[k>>2],N(a),n=c[(a+116|0)>>2]|0,a=c[m>>2]|0,a=(a+-32|0)/8|0,a=n-a|0,F=q,a|0;c[a+132>>2]=b;g=a+120|0;k=a+124|0;f=c[k>>2]|0;h=b=c[g>>2]|0;e=f-h|0;4E3<=e>>>0?4E3<e>>>0&&(n=b+4E3|0,(f|0)!=(n|0))&&(f=c[k>>2]=n):(ja(g,4E3-e|0),h=b=c[g>>2]|0,f=c[k>>2]|0);c[a+108>>2]=h;c[a+104>>2]=
f-b;N(a);n=a+116|0;n=c[n>>2]|0;a=c[m>>2]|0;a=a+-32|0;a=(a|0)/8|0;a=n-a|0;F=q;return a|0},function(c,a,b,d){a|=0;b|=0;d|=0;if((a|0)!=(b|0))for(;u[d>>0]=u[a>>0]|0,a=a+1|0,(a|0)!=(b|0);)d=d+1|0;return b|0},function(a,b,d,f){b|=0;d|=0;f|=0;var g=0,e=0,e=(d-b|0)>>>2;if((b|0)!=(d|0))for(g=b;a=c[g>>2]|0,128>a>>>0?(a=(Kc()|0)+(a<<1)|0,a=oa[a>>1]|0):a=0,R[f>>1]=a,g=g+4|0,(g|0)!=(d|0);)f=f+2|0;return b+(e<<2)|0},function(a,b,d,f){b|=0;d|=0;f|=0;a:do if((d|0)==(f|0))d=f;else for(;;){a=c[d>>2]|0;if(128>a>>>0&&
(a=(Kc()|0)+(a<<1)|0,0!=(R[a>>1]&b)<<16>>16))break a;d=d+4|0;if((d|0)==(f|0)){d=f;break}}while(0);return d|0},function(a,b,d,f){b|=0;d|=0;f|=0;a:do if((d|0)==(f|0))d=f;else for(;;){a=c[d>>2]|0;if(128<=a>>>0)break a;a=(Kc()|0)+(a<<1)|0;if(!((R[a>>1]&b)<<16>>16))break a;d=d+4|0;if((d|0)==(f|0)){d=f;break}}while(0);return d|0},function(a,b,d,f){b|=0;d|=0;f|=0;if((b|0)!=(d|0))for(;c[f>>2]=u[b>>0],b=b+1|0,(b|0)!=(d|0);)f=f+4|0;return d|0},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var e=0,h=0,k=0,m=0,n=0,q=
0,r=0,x=0,t=0,w=0,A=0,D=0,B=0,A=F;F=F+16|0;D=A;c[D>>2]=0;B=D+4|0;c[B>>2]=0;c[D+8>>2]=0;t=D+8|0;g=0;e=ca(67,1)|0;x=g;g=0;a:do if(x&1||(x=e+1|0,u[e>>0]=d,c[D>>2]=e,c[B>>2]=x,c[t>>2]=x,g=0,ga(84,D|0,b&65535|0),x=g,g=0,x&1)||(g=0,ga(84,D|0,a&65535|0),x=g,g=0,x&1))w=52;else{q=f&255;e=c[B>>2]|0;d=c[t>>2]|0;if(e>>>0>=d>>>0){a=b=c[D>>2]|0;k=e-a+1|0;if(0>(k|0)){g=0;ta(178,D|0);x=g;g=0;if(x&1){w=52;break}a=c[D>>2]|0;d=c[t>>2]|0;b=a}n=b;e=d-n|0;1073741823>e>>>0?(e<<=1,e=e>>>0<k>>>0?k:e,d=c[B>>2]|0,m=d-n|0,e?
w=12:k=e=0):(m=c[B>>2]|0,e=2147483647,d=m,m=m-n|0,w=12);if(12==(w|0)&&(g=0,k=ca(67,e|0)|0,x=g,g=0,x&1)){w=52;break}u[k+m>>0]=q;r=d-n|0;x=k+(m-r)|0;gb(x|0,b|0,r|0)|0;c[D>>2]=x;c[B>>2]=k+(m+1);c[t>>2]=k+e;a&&Q(a)}else u[e>>0]=q,c[B>>2]=(c[B>>2]|0)+1;b:do if(0<(f|0)){for(x=0;;){x=x+1|0;r=x&255;e=c[B>>2]|0;b=c[t>>2]|0;if(e>>>0>=b>>>0){d=a=c[D>>2]|0;k=e-d+1|0;if(0>(k|0)){g=0;ta(178,D|0);q=g;g=0;if(q&1)break;d=a=c[D>>2]|0;b=c[t>>2]|0}q=a;e=b-q|0;1073741823>e>>>0?(e<<=1,e=e>>>0<k>>>0?k:e,b=c[B>>2]|0,m=b-
q|0,e?w=25:k=n=0):(m=c[B>>2]|0,e=2147483647,b=m,m=m-q|0,w=25);if(25==(w|0))if(g=w=0,k=ca(67,e|0)|0,n=g,g=0,n&1)break;else n=e;u[k+m>>0]=r;e=k+(m+1)|0;q=b-q|0;r=k+(m-q)|0;gb(r|0,a|0,q|0)|0;c[D>>2]=r;c[B>>2]=e;c[t>>2]=k+n;d&&(Q(d),e=c[B>>2]|0)}else u[e>>0]=r,e=(c[B>>2]|0)+1|0,c[B>>2]=e;d=c[t>>2]|0;if(e>>>0>=d>>>0){a=b=c[D>>2]|0;k=e-a+1|0;if(0>(k|0)){g=0;ta(178,D|0);r=g;g=0;if(r&1)break;a=c[D>>2]|0;d=c[t>>2]|0;b=a}q=b;e=d-q|0;1073741823>e>>>0?(e<<=1,e=e>>>0<k>>>0?k:e,k=c[B>>2]|0,m=k-q|0,e?w=36:d=n=0):
(m=c[B>>2]|0,e=2147483647,k=m,m=m-q|0,w=36);if(36==(w|0))if(g=w=0,d=ca(67,e|0)|0,r=g,g=0,r&1)break;else n=e;u[d+m>>0]=17;e=d+(m+1)|0;q=k-q|0;r=d+(m-q)|0;gb(r|0,b|0,q|0)|0;c[D>>2]=r;c[B>>2]=e;c[t>>2]=d+n;a&&(Q(a),e=c[B>>2]|0)}else u[e>>0]=17,e=(c[B>>2]|0)+1|0,c[B>>2]=e;d=c[t>>2]|0;if(e>>>0>=d>>>0){a=b=c[D>>2]|0;k=e-a+1|0;if(0>(k|0)){g=0;ta(178,D|0);r=g;g=0;if(r&1)break;a=c[D>>2]|0;d=c[t>>2]|0;b=a}n=b;e=d-n|0;1073741823>e>>>0?(e<<=1,e=e>>>0<k>>>0?k:e,d=c[B>>2]|0,m=d-n|0,e?w=48:k=e=0):(m=c[B>>2]|0,e=
2147483647,d=m,m=m-n|0,w=48);if(48==(w|0)&&(g=w=0,k=ca(67,e|0)|0,r=g,g=0,r&1))break;u[k+m>>0]=0;q=d-n|0;r=k+(m-q)|0;gb(r|0,b|0,q|0)|0;c[D>>2]=r;c[B>>2]=k+(m+1);c[t>>2]=k+e;a&&Q(a)}else u[e>>0]=0,c[B>>2]=(c[B>>2]|0)+1;if((x|0)>=(f|0))break b}h=J()|0;break a}while(0);g=0;m=ca(67,20)|0;f=g;g=0;if(f&1)w=52;else{c[m>>2]=36800;u[m+4>>0]=-9;a=m+8|0;c[a>>2]=0;k=m+12|0;c[k>>2]=0;d=m+16|0;c[d>>2]=0;e=c[B>>2]|0;f=c[D>>2]|0;b=e-f|0;do if((e|0)!=(f|0))if(0>(b|0)&&(g=0,ta(178,a|0),f=g,g=0,f&1)||(w=62),62!=(w|0)||
(g=0,h=ca(67,b|0)|0,f=g,g=0,f&1)){h=J()|0;if(e=c[a>>2]|0)(c[k>>2]|0)!=(e|0)&&(c[k>>2]=e),Q(e);Q(m);break a}else if(c[k>>2]=h,c[a>>2]=h,c[d>>2]=h+b,e=c[D>>2]|0,d=c[B>>2]|0,(e|0)!=(d|0)){do u[h>>0]=u[e>>0]|0,h=(c[k>>2]|0)+1|0,c[k>>2]=h,e=e+1|0;while((e|0)!=(d|0));e=c[D>>2]|0}while(0);if(!e)return F=A,m|0;(c[B>>2]|0)!=(e|0)&&(c[B>>2]=e);Q(e);F=A;return m|0}}while(0);52==(w|0)&&(h=J()|0);(e=c[D>>2]|0)||V(h|0);(c[B>>2]|0)!=(e|0)&&(c[B>>2]=e);Q(e);V(h|0);return 0},function(a,b,d,f){a|=0;d|=0;f|=0;var g=
0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,w=0,D=0,g=c[a>>2]|0,t=w=c[(b|0)>>2]|0,m=g,r=d,n=f-r|0;if(0>=(n|0))return w|0;x=a+8|0;b=c[x>>2]|0;D=a+4|0;e=q=c[D>>2]|0;if((n|0)<=(b-e|0)){k=e-t|0;if((n|0)>(k|0)){h=d+k|0;if((h|0)==(f|0))b=q;else{e=h;b=q;do u[b>>0]=u[e>>0]|0,b=(c[D>>2]|0)+1|0,c[D>>2]=b,e=e+1|0;while((e|0)!=(f|0))}if(0<(k|0))k=b;else return w|0}else k=q,h=f;g=k-(g+(n-m+t))|0;b=w+g|0;if(b>>>0<q>>>0){e=k;do u[e>>0]=u[b>>0]|0,b=b+1|0,e=(c[D>>2]|0)+1|0,c[D>>2]=e;while((b|0)!=(q|0))}tf(k+(0-g)|0,w|0,
g|0)|0;tf(w|0,d|0,h-r|0)|0;return w|0}e=e-m+n|0;0>(e|0)&&(Md(a),b=c[x>>2]|0,g=c[a>>2]|0);h=g;b=b-h|0;1073741823>b>>>0?(b<<=1,b=b>>>0<e>>>0?e:b,e=t-h|0,b?k=15:n=h=0):(b=2147483647,e=t-h|0,k=15);15==(k|0)&&(h=b,n=qa(b)|0);b=m=n+e|0;k=n+h|0;if((d|0)!=(f|0)){g=d;h=m;do u[h>>0]=u[g>>0]|0,b=h=b+1|0,g=g+1|0;while((g|0)!=(f|0));g=c[a>>2]|0}d=t-g|0;f=n+(e-d)|0;gb(f|0,g|0,d|0)|0;t=(c[D>>2]|0)-t|0;d=b;gb(d|0,w|0,t|0)|0;b=c[a>>2]|0;c[a>>2]=f;c[D>>2]=d+t;c[x>>2]=k;if(!b)return m|0;Q(b);return m|0},function(a,
b,d,f){a|=0;d|=0;var e=0,k=0,e=F;F=F+16|0;k=e;c[k>>2]=f|0;f=md(b|0)|0;b=Ch(a,d,k)|0;0!=(f|0)&&(g=0,ca(75,f|0)|0,k=g,g=0,k&1)&&(k=J(0)|0,h(k));F=e;return b|0},function(a,b,d,f){a|=0;d|=0;var e=0,k=0,e=F;F=F+16|0;k=e;c[k>>2]=f|0;f=md(b|0)|0;g=0;b=La(37,a|0,d|0,k|0)|0;a=g;g=0;if(a&1)b=J()|0,0!=(f|0)&&(g=0,ca(75,f|0)|0,k=g,g=0,k&1)&&(k=J(0)|0,h(k)),V(b|0);else return 0!=(f|0)&&(g=0,ca(75,f|0)|0,k=g,g=0,k&1)&&(k=J(0)|0,h(k)),F=e,b|0;return 0},th,function(c,a,b,d){return d|0},Hf,function(a,b,d,f){a|=0;
b|=0;d|=0;f|=0;var g=0,e=0,h=0,k=0,m=0,m=F;F=F+16|0;k=m;a:do if((a|0)==(b|0))c[d>>2]=4,a=0;else if(e=sb()|0,h=c[e>>2]|0,c[e>>2]=0,a=lh(a,k,f,Xb()|0)|0,f=Fa,(g=c[e>>2]|0)||(c[e>>2]=h),(c[k>>2]|0)!=(b|0))c[d>>2]=4,a=0;else{do if(34==(g|0)){if(c[d>>2]=4,0<(f|0)|0==(f|0)&0<a>>>0){a=2147483647;break a}}else if(-1>(f|0)|-1==(f|0)&2147483648>a>>>0)c[d>>2]=4;else{0<(f|0)|0==(f|0)&2147483647<a>>>0&&(c[d>>2]=4,a=2147483647);break a}while(0);a=-2147483648}while(0);F=m;return a|0},function(a,b,d,f){a|=0;b|=0;
d|=0;f|=0;var g=0,e=0,h=0,k=0,m=0,m=F;F=F+16|0;k=m;if((a|0)!=(b|0))if(e=sb()|0,h=c[e>>2]|0,c[e>>2]=0,a=lh(a,k,f,Xb()|0)|0,f=Fa,(g=c[e>>2]|0)||(c[e>>2]=h),(c[k>>2]|0)!=(b|0))c[d>>2]=4,a=f=0;else{if(34==(g|0))return c[d>>2]=4,Fa=(k=0<(f|0)|0==(f|0)&0<a>>>0)?2147483647:-2147483648,F=m,(k?-1:0)|0}else c[d>>2]=4,a=f=0;Fa=f;F=m;return a|0},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var g=0,e=0,h=0,k=0,m=0,m=F;F=F+16|0;k=m;(a|0)!=(b|0)?45==(u[a>>0]|0)?(c[d>>2]=4,a=0):(e=sb()|0,h=c[e>>2]|0,c[e>>2]=0,a=Ff(a,k,
f,Xb()|0)|0,f=Fa,(g=c[e>>2]|0)||(c[e>>2]=h),(c[k>>2]|0)!=(b|0)?(c[d>>2]=4,a=0):0<f>>>0|0==(f|0)&65535<a>>>0|34==(g|0)?(c[d>>2]=4,a=-1):a&=65535):(c[d>>2]=4,a=0);F=m;return a|0},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var g=0,e=0,h=0,k=0,m=0,m=F;F=F+16|0;k=m;(a|0)!=(b|0)?45==(u[a>>0]|0)?(c[d>>2]=4,a=0):(e=sb()|0,h=c[e>>2]|0,c[e>>2]=0,a=Ff(a,k,f,Xb()|0)|0,f=Fa,(g=c[e>>2]|0)||(c[e>>2]=h),(c[k>>2]|0)!=(b|0)?(c[d>>2]=4,a=0):0<f>>>0|0==(f|0)&4294967295<a>>>0|34==(g|0)&&(c[d>>2]=4,a=-1)):(c[d>>2]=4,a=0);F=
m;return a|0},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var g=0,e=0,h=0,k=0,m=0,m=F;F=F+16|0;k=m;(a|0)!=(b|0)?45==(u[a>>0]|0)?(c[d>>2]=4,a=0):(e=sb()|0,h=c[e>>2]|0,c[e>>2]=0,a=Ff(a,k,f,Xb()|0)|0,f=Fa,(g=c[e>>2]|0)||(c[e>>2]=h),(c[k>>2]|0)!=(b|0)?(c[d>>2]=4,a=0):0<f>>>0|0==(f|0)&4294967295<a>>>0|34==(g|0)&&(c[d>>2]=4,a=-1)):(c[d>>2]=4,a=0);F=m;return a|0},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var g=0,e=0,h=0,k=0,k=F;F=F+16|0;h=k;(a|0)!=(b|0)?45==(u[a>>0]|0)?(c[d>>2]=4,a=f=0):(g=sb()|0,e=c[g>>2]|0,c[g>>
2]=0,a=Ff(a,h,f,Xb()|0)|0,(f=c[g>>2]|0)||(c[g>>2]=e),(c[h>>2]|0)!=(b|0)?(c[d>>2]=4,a=f=0):34==(f|0)?(c[d>>2]=4,a=f=-1):f=Fa):(c[d>>2]=4,a=f=0);Fa=f;F=k;return a|0},Pe,Pe,Pe,Pe,Pe],Nf=[function(c,a,b){ac(18)},function(a,b,d){a|=0;c[a>>2]=d|0;c[a+4>>2]=b|0},function(c,a,b){Vd(c|0,50754,12)},function(c,a,b){c|=0;a|=0;b|=0;1!=(b|0)&257>(b|0)?(c|=0,b|=0,a=Bg(b)|0,Vd(c,a,Ae(a)|0)):Vd(c,57462,35)},function(a,b,d){a|=0;b|=0;d|=0;var f=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,u=0,x=F;F=F+48|0;m=x+32|0;e=x+12|0;n=
x+8|0;r=x+4|0;u=x;f=d+36|0;if(0==(c[f>>2]|0)&&0==(c[d+40>>2]|0)&&0==(c[d+44>>2]|0)&&0==(c[d+48>>2]|0)&&0==(c[d+52>>2]|0))if(f=c[d+8>>2]|0,12>=(f|0))h=a+28|0,k=a+32|0;else if(xb(e,(1<<f)+-1|0,c[d+20>>2]|0),f=bh(e)|0,c[n>>2]=f,h=a+28|0,e=c[h>>2]|0,k=a+32|0,e>>>0<(c[k>>2]|0)>>>0)c[e>>2]=f,c[h>>2]=e+4,c[n>>2]=0;else if(g=0,ga(57,a+24|0,n|0),m=g,g=0,m&1)d=J()|0,f=c[n>>2]|0,c[n>>2]=0,f||V(d|0),Ha[c[(c[f>>2]|0)+4>>2]&255](f),u=d,V(u|0);else{if(f=c[n>>2]|0,c[n>>2]=0,f)Ha[c[(c[f>>2]|0)+4>>2]&255](f)}else q=
6;if(6==(q|0))if(f=bh(f)|0,c[m>>2]=f,h=a+28|0,e=c[h>>2]|0,k=a+32|0,e>>>0<(c[k>>2]|0)>>>0)c[e>>2]=f,c[h>>2]=e+4,c[m>>2]=0;else if(g=0,ga(57,a+24|0,m|0),q=g,g=0,q&1)d=J()|0,f=c[m>>2]|0,c[m>>2]=0,f||V(d|0),Ha[c[(c[f>>2]|0)+4>>2]&255](f),u=d,V(u|0);else if(f=c[m>>2]|0,c[m>>2]=0,f)Ha[c[(c[f>>2]|0)+4>>2]&255](f);f=a+20|0;e=(c[f>>2]|0)+1|0;c[f>>2]=e;f=c[d+24>>2]|0;m=0==(f|0)?1:c[d+16>>2]|0;f=fi(e,m,c[d+20>>2]|0,f)|0;c[r>>2]=f;e=c[h>>2]|0;if(e>>>0<(c[k>>2]|0)>>>0)c[e>>2]=f,c[h>>2]=e+4,c[r>>2]=0;else if(g=
0,ga(57,a+24|0,r|0),q=g,g=0,q&1)d=J()|0,f=c[r>>2]|0,c[r>>2]=0,f||V(d|0),Ha[c[(c[f>>2]|0)+4>>2]&255](f),u=d,V(u|0);else if(f=c[r>>2]|0,c[r>>2]=0,f)Ha[c[(c[f>>2]|0)+4>>2]&255](f);n=qa(104)|0;c[n>>2]=36820;c[n+4>>2]=m;e=n+8|0;c[e>>2]=c[b>>2];c[e+4>>2]=c[b+4>>2];c[e+8>>2]=c[b+8>>2];e=n+20|0;f=e+84|0;do c[e>>2]=c[d>>2],e=e+4|0,d=d+4|0;while((e|0)<(f|0));c[u>>2]=n;d=c[h>>2]|0;if(d>>>0<(c[k>>2]|0)>>>0)c[d>>2]=n,c[h>>2]=d+4,c[u>>2]=0,F=x;else if(g=0,ga(57,a+24|0,u|0),a=g,g=0,a&1)d=J()|0,f=c[u>>2]|0,c[u>>
2]=0,f||V(d|0),Ha[c[(c[f>>2]|0)+4>>2]&255](f),V(d|0);else{d=c[u>>2]|0;c[u>>2]=0;if(d)Ha[c[(c[d>>2]|0)+4>>2]&255](d);F=x}},Vd,function(c,a,b){Pa(c|0,a|0,b|0)},function(a,b,d){a|=0;b|=0;d|=0;var f=0,e=0,h=0,k=0,e=F;F=F+48|0;f=e+24|0;k=e+16|0;h=e;c[k>>2]=b;c[k+4>>2]=d;Vd(h,58898,0);g=0;na(10,f|0,k|0,h|0);k=g;g=0;if(k&1)f=J()|0;else if(g=0,ga(87,a|0,f|0),k=g,g=0,k&1)k=J()|0,W(f),f=k;else{W(f);W(h);c[a>>2]=42664;c[a+8>>2]=b;c[a+12>>2]=d;F=e;return}W(h);V(f|0)},fe,function(a,b,d){a|=0;b|=0;d|=0;var f=0,
g=0,e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,w=0,D=0;if(!(0>=(d|0))){r=b+4|0;x=b+8|0;w=0;do t=tb(a)|0,f=c[r>>2]|0,g=c[x>>2]|0,f>>>0>=g>>>0?(h=e=c[b>>2]|0,k=f-h+1|0,0>(k|0)&&(Md(b),h=c[b>>2]|0,g=c[x>>2]|0,e=h),q=e,f=g-q|0,1073741823>f>>>0?(f<<=1,f=f>>>0<k>>>0?k:f,k=c[r>>2]|0,g=k-q|0,f?D=10:(m=n=0,f=k)):(g=c[r>>2]|0,f=2147483647,k=g,g=g-q|0,D=10),10==(D|0)&&(D=0,n=f,m=qa(f)|0,f=k),u[m+g>>0]=t,q=f-q|0,t=m+(g-q)|0,gb(t|0,e|0,q|0)|0,c[b>>2]=t,c[r>>2]=m+(g+1),c[x>>2]=m+n,h&&Q(h)):(u[f>>0]=t,c[r>>2]=(c[r>>2]|
0)+1),w=w+1|0;while((w|0)!=(d|0))}},function(a,b,d){a|=0;b|=0;d|=0;var f=0,e=0,h=0,k=0,k=F;F=F+16|0;h=k;if(f=c[b>>2]|0){e=u[d>>0]|0;if(e=e&1?c[d+4>>2]|0:(e&255)>>>1)f=d|0,e=56990,f=ge(f,e,Ae(e)|0)|0,f|0,f=c[b>>2]|0;b=c[b+4>>2]|0;Nf[c[(c[b>>2]|0)+24>>2]&15](h,b,f);b=u[h>>0]|0;e=0==(b&1);g=0;La(30,d|0,(e?h+1|0:c[h+8>>2]|0)|0,(e?(b&255)>>>1:c[h+4>>2]|0)|0)|0;b=g;g=0;b&1?(k=J()|0,W(h),V(k|0)):W(h)}c[a>>2]=c[d>>2];c[a+4>>2]=c[d+4>>2];c[a+8>>2]=c[d+8>>2];c[d>>2]=0;c[d+4>>2]=0;c[d+8>>2]=0;F=k},function(a,
b,d){a|=0;var f=0,e=0,h=0,k=0,m=0,f=F;F=F+16|0;e=f+8|0;h=f;m=d|0;k=c[m+4>>2]|0;d=h;c[d>>2]=c[m>>2];c[d+4>>2]=k;c[e>>2]=c[h>>2];c[e+4>>2]=c[h+4>>2];a:{d=b|0;b=a|0;e|=0;d|=0;m=k=h=0;k=F;F=F+32|0;h=k+12|0;m=k;Vd(m,d,Ae(d)|0);g=0;na(10,h|0,e|0,m|0);d=g;g=0;do if(d&1)h=J()|0;else if(g=0,ga(87,b|0,h|0),d=g,g=0,d&1)k=J()|0,W(h),h=k;else{W(h);W(m);c[b>>2]=42664;d=c[e+4>>2]|0;m=b+8|0;c[m>>2]=c[e>>2];c[m+4>>2]=d;F=k;break a}while(0);W(m);V(h|0)}c[a>>2]=43048;F=f},function(a,b,d){a|=0;b|=0;d|=0;var f=0,e=0,
k=0,m=0,n=0,q=0,k=a+4|0,f=189!=(c[k>>2]|0),m=n=c[a>>2]|0,e=(c[d>>2]|0)-m|0,e=2147483647>e>>>0?e<<1:-1,m=(c[b>>2]|0)-m|0;(n=Xc(f?n:0,e)|0)||Ef();f?q=c[a>>2]=n:(f=c[a>>2]|0,c[a>>2]=n,f?(g=0,ta(c[k>>2]|0,f|0),n=g,g=0,n&1?(n=J(0)|0,h(n)):q=c[a>>2]|0):q=n);c[k>>2]=201;c[b>>2]=q+m;c[d>>2]=(c[a>>2]|0)+e},function(a,b,d){a|=0;b|=0;d|=0;var f=0,e=0,k=0,m=0,n=0,q=0,k=a+4|0,f=189!=(c[k>>2]|0),m=n=c[a>>2]|0,e=(c[d>>2]|0)-m|0,e=2147483647>e>>>0?e<<1:-1,m=(c[b>>2]|0)-m>>2;(n=Xc(f?n:0,e)|0)||Ef();f?q=c[a>>2]=n:
(f=c[a>>2]|0,c[a>>2]=n,f?(g=0,ta(c[k>>2]|0,f|0),n=g,g=0,n&1?(n=J(0)|0,h(n)):q=c[a>>2]|0):q=n);c[k>>2]=201;c[b>>2]=q+(m<<2);c[d>>2]=(c[a>>2]|0)+(e>>>2<<2)},function(a,b,d){a|=0;b|=0;d|=0;var f=0,e=0,k=0,m=0,n=0,q=0,k=a+4|0,f=189!=(c[k>>2]|0),m=n=c[a>>2]|0,e=(c[d>>2]|0)-m|0,e=2147483647>e>>>0?e<<1:-1,m=(c[b>>2]|0)-m>>2;(n=Xc(f?n:0,e)|0)||Ef();f?q=c[a>>2]=n:(f=c[a>>2]|0,c[a>>2]=n,f?(g=0,ta(c[k>>2]|0,f|0),n=g,g=0,n&1?(n=J(0)|0,h(n)):q=c[a>>2]|0):q=n);c[k>>2]=201;c[b>>2]=q+(m<<2);c[d>>2]=(c[a>>2]|0)+(e>>>
2<<2)},eg],ih=[$g,function(){ui()},function(){var a=0,b=0,d=0,f=0,g=0,e=0,h=0,k=0,g=F;F=F+48|0;h=g+32|0;d=g+24|0;k=g+16|0;e=g;g=g+36|0;a=hh()|0;0!=(a|0)&&(f=c[a>>2]|0,0!=(f|0))&&(a=f+48|0,b=c[a>>2]|0,a=c[a+4>>2]|0,1126902528==(b&-256|0)&1129074247==(a|0)||(c[d>>2]=c[9257],ne(51919,d)),a=1126902529==(b|0)&1129074247==(a|0)?c[f+44>>2]|0:f+80|0,c[g>>2]=a,f=c[f>>2]|0,a=c[f+4>>2]|0,cb[c[(c[152]|0)+16>>2]&63](608,f,g)|0?(k=c[g>>2]|0,g=c[9257]|0,k=Ja[c[(c[k>>2]|0)+8>>2]&127](k)|0,c[e>>2]=g,c[e+4>>2]=a,c[e+
8>>2]=k,ne(51833,e)):(c[k>>2]=c[9257],c[k+4>>2]=a,ne(51878,k)));ne(51957,h)},function(){$c()},function(){var c=0,c=F;F=F+16|0;pi(37020,184)|0?ne(51730,c):F=c},function(){Oh()},Ef,$g],Td=[Qe,function(a,b,d,f,e,h,k,m){a|=0;b|=0;d|=0;f|=0;e|=0;h|=0;k|=0;var n=0,q=0,r=0,x=0,t=0,w=0,D=0,A=0,B=0,y=0,E=0,z=0,O=0,L=0,M=0,G=0,P=0,Y=0,la=0,U=0,ja=0,N=0,ka=0,Q=0,va=0,da=0,aa=0,Z=0,wa=0,X=0,fa=0,Ba=0,Ia=0,W=0,ha=0,ba=0,Ua=0,ha=F;F=F+144|0;n=ha+132|0;m=ha+116|0;Z=ha+128|0;z=ha+124|0;ka=ha+120|0;wa=ha+112|0;X=
ha+108|0;fa=ha+104|0;Ba=ha+100|0;Ia=ha+96|0;W=ha+92|0;q=ha+88|0;r=ha+84|0;x=ha+80|0;t=ha+76|0;w=ha+72|0;D=ha+68|0;A=ha+64|0;B=ha+60|0;y=ha+56|0;E=ha+52|0;O=ha+48|0;L=ha+44|0;M=ha+40|0;G=ha+36|0;P=ha+32|0;Y=ha+28|0;la=ha+24|0;U=ha+20|0;ja=ha+16|0;N=ha+12|0;Q=ha+8|0;va=ha+4|0;da=ha;c[e>>2]=0;aa=Lb(f)|0;c[Z>>2]=aa;g=0;Z=ma(37,Z|0,44220)|0;Ua=g;g=0;Ua&1&&(Ua=J()|0,Na(aa)|0,V(Ua|0));Na(aa)|0;do switch(k<<24>>24|0){case 65:case 97:c[z>>2]=c[d>>2];c[n>>2]=c[z>>2];Nc(a,h+24|0,b,n,e,Z);ba=28;break;case 104:case 66:case 98:c[ka>>
2]=c[d>>2];c[n>>2]=c[ka>>2];Oc(a,h+16|0,b,n,e,Z);ba=28;break;case 99:ba=a+8|0;ba=Ja[c[(c[ba>>2]|0)+12>>2]&127](ba)|0;c[wa>>2]=c[b>>2];c[X>>2]=c[d>>2];k=u[ba>>0]|0;Ua=(d=0==(k&1))?ba+1|0:c[ba+8>>2]|0;ba=Ua+(d?(k&255)>>>1:c[ba+4>>2]|0)|0;c[m>>2]=c[wa>>2];c[n>>2]=c[X>>2];ba=ec(a,m,n,f,e,h,Ua,ba)|0;c[b>>2]=ba;ba=28;break;case 101:case 100:c[fa>>2]=c[d>>2];c[n>>2]=c[fa>>2];var Ra=a,ca=h+12|0,lb=b,ab=n,nb=e,ga=Z,ca=ca|0,lb=lb|0,ab=ab|0,nb=nb|0,ga=ga|0,ia=0,na=0,ia=F;F=F+16|0;Ra=ia+4|0;na=ia;c[na>>2]=c[ab>>
2];c[Ra>>2]=c[na>>2];Ra=Nd(lb,Ra,nb,ga,2)|0;lb=c[nb>>2]|0;31>(Ra+-1|0)>>>0&0==(lb&4|0)?c[ca>>2]=Ra:c[nb>>2]=lb|4;F=ia;ba=28;break;case 68:c[Ba>>2]=c[b>>2];c[Ia>>2]=c[d>>2];c[m>>2]=c[Ba>>2];c[n>>2]=c[Ia>>2];ba=ec(a,m,n,f,e,h,58915,58923)|0;c[b>>2]=ba;ba=28;break;case 70:c[W>>2]=c[b>>2];c[q>>2]=c[d>>2];c[m>>2]=c[W>>2];c[n>>2]=c[q>>2];ba=ec(a,m,n,f,e,h,58923,58931)|0;c[b>>2]=ba;ba=28;break;case 72:c[r>>2]=c[d>>2];c[n>>2]=c[r>>2];var dc=a,oa=h+8|0,pa=b,qa=n,ra=e,sa=Z,oa=oa|0,pa=pa|0,qa=qa|0,ra=ra|0,sa=
sa|0,ta=0,ya=0,ta=F;F=F+16|0;dc=ta+4|0;ya=ta;c[ya>>2]=c[qa>>2];c[dc>>2]=c[ya>>2];dc=Nd(pa,dc,ra,sa,2)|0;pa=c[ra>>2]|0;24>(dc|0)&0==(pa&4|0)?c[oa>>2]=dc:c[ra>>2]=pa|4;F=ta;ba=28;break;case 73:c[x>>2]=c[d>>2];c[n>>2]=c[x>>2];var xa=a,za=h+8|0,Aa=b,Da=n,Ca=e,Fa=Z,za=za|0,Aa=Aa|0,Da=Da|0,Ca=Ca|0,Fa=Fa|0,Ea=0,Ga=0,Ea=F;F=F+16|0;xa=Ea+4|0;Ga=Ea;c[Ga>>2]=c[Da>>2];c[xa>>2]=c[Ga>>2];xa=Nd(Aa,xa,Ca,Fa,2)|0;Aa=c[Ca>>2]|0;12>(xa+-1|0)>>>0&0==(Aa&4|0)?c[za>>2]=xa:c[Ca>>2]=Aa|4;F=Ea;ba=28;break;case 106:c[t>>2]=
c[d>>2];c[n>>2]=c[t>>2];var Ha=a,Ka=h+28|0,La=b,cc=n,gc=e,Ma=Z,Ka=Ka|0,La=La|0,cc=cc|0,gc=gc|0,Ma=Ma|0,zb=0,Oa=0,zb=F;F=F+16|0;Ha=zb+4|0;Oa=zb;c[Oa>>2]=c[cc>>2];c[Ha>>2]=c[Oa>>2];Ha=Nd(La,Ha,gc,Ma,3)|0;La=c[gc>>2]|0;366>(Ha|0)&0==(La&4|0)?c[Ka>>2]=Ha:c[gc>>2]=La|4;F=zb;ba=28;break;case 109:c[w>>2]=c[d>>2];c[n>>2]=c[w>>2];var vb=a,Qa=h+16|0,Pa=b,mc=n,Va=e,Za=Z,Qa=Qa|0,Pa=Pa|0,mc=mc|0,Va=Va|0,Za=Za|0,Wa=0,bb=0,Wa=F;F=F+16|0;vb=Wa+4|0;bb=Wa;c[bb>>2]=c[mc>>2];c[vb>>2]=c[bb>>2];vb=Nd(Pa,vb,Va,Za,2)|0;
Pa=c[Va>>2]|0;13>(vb|0)&0==(Pa&4|0)?c[Qa>>2]=vb+-1:c[Va>>2]=Pa|4;F=Wa;ba=28;break;case 77:c[D>>2]=c[d>>2];c[n>>2]=c[D>>2];var kc=a,$a=h+4|0,Xa=b,mb=n,fb=e,gb=Z,$a=$a|0,Xa=Xa|0,mb=mb|0,fb=fb|0,gb=gb|0,ib=0,ic=0,ib=F;F=F+16|0;kc=ib+4|0;ic=ib;c[ic>>2]=c[mb>>2];c[kc>>2]=c[ic>>2];kc=Nd(Xa,kc,fb,gb,2)|0;Xa=c[fb>>2]|0;60>(kc|0)&0==(Xa&4|0)?c[$a>>2]=kc:c[fb>>2]=Xa|4;F=ib;ba=28;break;case 116:case 110:c[A>>2]=c[d>>2];c[n>>2]=c[A>>2];var kb=a,eb=b,Ta=n,db=e,Cb=Z,kb=kb|0,eb=eb|0,Ta=Ta|0,db=db|0,Cb=Cb|0,hb=0,
qb=0,Ya=0,qb=Cb+8|0;a:for(;;){(Cb=c[eb>>2]|0)?(c[Cb+12>>2]|0)==(c[Cb+16>>2]|0)&&(Cb=-1==(Ja[c[(c[Cb>>2]|0)+36>>2]&127](Cb)|0)?c[eb>>2]=0:c[eb>>2]|0):Cb=0;Cb=0==(Cb|0);kb=c[Ta>>2]|0;do if(kb){if((c[kb+12>>2]|0)!=(c[kb+16>>2]|0))if(Cb)break;else break a;if(-1!=(Ja[c[(c[kb>>2]|0)+36>>2]&127](kb)|0)){if(!Cb)break a}else c[Ta>>2]=0,Ya=12}else Ya=12;while(0);if(12==(Ya|0))if(Ya=0,Cb){kb=0;break}else kb=0;Cb=c[eb>>2]|0;hb=c[Cb+12>>2]|0;Cb=(hb|0)==(c[Cb+16>>2]|0)?Ja[c[(c[Cb>>2]|0)+36>>2]&127](Cb)|0:ea[hb>>
0]|0;if(-1>=(Cb&255)<<24>>24)break;if(!(R[(c[qb>>2]|0)+(Cb<<24>>24<<1)>>1]&8192))break;Cb=c[eb>>2]|0;kb=Cb+12|0;hb=c[kb>>2]|0;(hb|0)==(c[Cb+16>>2]|0)?Ja[c[(c[Cb>>2]|0)+40>>2]&127](Cb)|0:c[kb>>2]=hb+1}(Cb=c[eb>>2]|0)?(c[Cb+12>>2]|0)==(c[Cb+16>>2]|0)&&(Cb=-1==(Ja[c[(c[Cb>>2]|0)+36>>2]&127](Cb)|0)?c[eb>>2]=0:c[eb>>2]|0):Cb=0;Cb=0==(Cb|0);kb?(c[kb+12>>2]|0)==(c[kb+16>>2]|0)&&-1==(Ja[c[(c[kb>>2]|0)+36>>2]&127](kb)|0)?(c[Ta>>2]=0,Ya=32):Cb||(Ya=33):Ya=32;32==(Ya|0)&&Cb&&(Ya=33);33==(Ya|0)&&(c[db>>2]|=2);
ba=28;break;case 112:c[B>>2]=c[d>>2];c[n>>2]=c[B>>2];var jb=a,tb=h+8|0,rb=b,xb=n,sb=e,nc=Z,jb=jb|0,tb=tb|0,rb=rb|0,xb=xb|0,sb=sb|0,nc=nc|0,wb=0,yb=0,Ab=0,pb=0,Gb=0,Gb=F;F=F+16|0;yb=Gb+4|0;Ab=Gb;pb=jb+8|0;pb=Ja[c[(c[pb>>2]|0)+8>>2]&127](pb)|0;jb=u[pb>>0]|0;wb=jb&1?c[pb+4>>2]|0:(jb&255)>>>1;jb=u[pb+12>>0]|0;jb=jb&1?c[pb+16>>2]|0:(jb&255)>>>1;(wb|0)!=(0-jb|0)?(c[Ab>>2]=c[xb>>2],c[yb>>2]=c[Ab>>2],jb=nf(rb,yb,pb,pb+24|0,nc,sb,0)|0,wb=c[tb>>2]|0,(jb|0)==(pb|0)&12==(wb|0)?c[tb>>2]=0:12>(wb|0)&12==(jb-pb|
0)&&(c[tb>>2]=wb+12)):c[sb>>2]|=4;F=Gb;ba=28;break;case 114:c[y>>2]=c[b>>2];c[E>>2]=c[d>>2];c[m>>2]=c[y>>2];c[n>>2]=c[E>>2];ba=ec(a,m,n,f,e,h,58931,58942)|0;c[b>>2]=ba;ba=28;break;case 82:c[O>>2]=c[b>>2];c[L>>2]=c[d>>2];c[m>>2]=c[O>>2];c[n>>2]=c[L>>2];ba=ec(a,m,n,f,e,h,58942,58947)|0;c[b>>2]=ba;ba=28;break;case 83:c[M>>2]=c[d>>2];c[n>>2]=c[M>>2];var ob=a,Jb=h,Bb=b,$b=n,Ib=e,Ob=Z,Jb=Jb|0,Bb=Bb|0,$b=$b|0,Ib=Ib|0,Ob=Ob|0,Fb=0,Nb=0,Fb=F;F=F+16|0;ob=Fb+4|0;Nb=Fb;c[Nb>>2]=c[$b>>2];c[ob>>2]=c[Nb>>2];ob=
Nd(Bb,ob,Ib,Ob,2)|0;Bb=c[Ib>>2]|0;61>(ob|0)&0==(Bb&4|0)?c[Jb>>2]=ob:c[Ib>>2]=Bb|4;F=Fb;ba=28;break;case 84:c[G>>2]=c[b>>2];c[P>>2]=c[d>>2];c[m>>2]=c[G>>2];c[n>>2]=c[P>>2];ba=ec(a,m,n,f,e,h,58947,58955)|0;c[b>>2]=ba;ba=28;break;case 119:c[Y>>2]=c[d>>2];c[n>>2]=c[Y>>2];var Eb=a,tc=h+24|0,Kb=b,Ub=n,Tb=e,Xb=Z,tc=tc|0,Kb=Kb|0,Ub=Ub|0,Tb=Tb|0,Xb=Xb|0,Yb=0,hc=0,Yb=F;F=F+16|0;Eb=Yb+4|0;hc=Yb;c[hc>>2]=c[Ub>>2];c[Eb>>2]=c[hc>>2];Eb=Nd(Kb,Eb,Tb,Xb,1)|0;Kb=c[Tb>>2]|0;7>(Eb|0)&0==(Kb&4|0)?c[tc>>2]=Eb:c[Tb>>2]=
Kb|4;F=Yb;ba=28;break;case 120:Ua=c[(c[a>>2]|0)+20>>2]|0;c[la>>2]=c[b>>2];c[U>>2]=c[d>>2];c[m>>2]=c[la>>2];c[n>>2]=c[U>>2];m=bf[Ua&63](a,m,n,f,e,h)|0;break;case 88:ba=a+8|0;ba=Ja[c[(c[ba>>2]|0)+24>>2]&127](ba)|0;c[ja>>2]=c[b>>2];c[N>>2]=c[d>>2];k=u[ba>>0]|0;Ua=(d=0==(k&1))?ba+1|0:c[ba+8>>2]|0;ba=Ua+(d?(k&255)>>>1:c[ba+4>>2]|0)|0;c[m>>2]=c[ja>>2];c[n>>2]=c[N>>2];ba=ec(a,m,n,f,e,h,Ua,ba)|0;c[b>>2]=ba;ba=28;break;case 121:c[Q>>2]=c[d>>2];c[n>>2]=c[Q>>2];Qc(a,h+20|0,b,n,e,Z);ba=28;break;case 89:c[va>>
2]=c[d>>2];c[n>>2]=c[va>>2];var Qb=a,Vb=h+20|0,jc=b,Pb=n,ac=e,bc=Z,Vb=Vb|0,jc=jc|0,Pb=Pb|0,ac=ac|0,bc=bc|0,fc=0,Rb=0,fc=F;F=F+16|0;Qb=fc+4|0;Rb=fc;c[Rb>>2]=c[Pb>>2];c[Qb>>2]=c[Rb>>2];Qb=Nd(jc,Qb,ac,bc,4)|0;c[ac>>2]&4||(c[Vb>>2]=Qb+-1900);F=fc;ba=28;break;case 37:c[da>>2]=c[d>>2];c[n>>2]=c[da>>2];var Sa=a,Db=b,Hb=n,Sb=e,Wb=Z,Db=Db|0,Hb=Hb|0,Sb=Sb|0,Wb=Wb|0,Zb=0,lc=0,ad=0;(Sa=c[Db>>2]|0)?(c[Sa+12>>2]|0)==(c[Sa+16>>2]|0)&&(Sa=-1==(Ja[c[(c[Sa>>2]|0)+36>>2]&127](Sa)|0)?c[Db>>2]=0:c[Db>>2]|0):Sa=0;Zb=0==
(Sa|0);(Sa=c[Hb>>2]|0)?(c[Sa+12>>2]|0)==(c[Sa+16>>2]|0)&&-1==(Ja[c[(c[Sa>>2]|0)+36>>2]&127](Sa)|0)?(c[Hb>>2]=0,ad=11):Zb?(lc=Sa,ad=13):ad=12:ad=11;11==(ad|0)&&(Zb?ad=12:(lc=0,ad=13));a:do if(12==(ad|0))c[Sb>>2]|=6;else if(13==(ad|0))if(Sa=c[Db>>2]|0,Zb=c[Sa+12>>2]|0,Sa=(Zb|0)==(c[Sa+16>>2]|0)?Ja[c[(c[Sa>>2]|0)+36>>2]&127](Sa)|0:ea[Zb>>0]|0,37!=(cb[c[(c[Wb>>2]|0)+36>>2]&63](Wb,Sa&255,0)|0)<<24>>24)c[Sb>>2]|=4;else{Sa=c[Db>>2]|0;Zb=Sa+12|0;Wb=c[Zb>>2]|0;(Wb|0)==(c[Sa+16>>2]|0)?(Ja[c[(c[Sa>>2]|0)+40>>
2]&127](Sa)|0,(Sa=c[Db>>2]|0)?ad=21:Sa=0):(c[Zb>>2]=Wb+1,ad=21);21==(ad|0)&&(c[Sa+12>>2]|0)==(c[Sa+16>>2]|0)&&(Sa=-1==(Ja[c[(c[Sa>>2]|0)+36>>2]&127](Sa)|0)?c[Db>>2]=0:c[Db>>2]|0);Sa=0==(Sa|0);do if(lc)if((c[lc+12>>2]|0)==(c[lc+16>>2]|0)&&-1==(Ja[c[(c[lc>>2]|0)+36>>2]&127](lc)|0))c[Hb>>2]=0,ad=30;else{if(Sa)break a}else ad=30;while(0);if(30!=(ad|0)||Sa)c[Sb>>2]|=2}while(0);ba=28;break;default:c[e>>2]|=4,ba=28}while(0);28==(ba|0)&&(m=c[b>>2]|0);F=ha;return m|0},function(a,b,d,f,e,h,k,m){a|=0;b|=0;d|=
0;f|=0;e|=0;h|=0;k|=0;var n=0,q=0,r=0,x=0,t=0,w=0,D=0,A=0,B=0,y=0,E=0,z=0,O=0,L=0,M=0,G=0,P=0,Y=0,la=0,U=0,ja=0,N=0,ka=0,Q=0,va=0,R=0,da=0,Z=0,aa=0,wa=0,X=0,fa=0,Ba=0,Ia=0,ha=0,W=0,ba=0,ha=F;F=F+144|0;n=ha+132|0;m=ha+116|0;Z=ha+128|0;z=ha+124|0;ka=ha+120|0;aa=ha+112|0;wa=ha+108|0;X=ha+104|0;fa=ha+100|0;Ba=ha+96|0;Ia=ha+92|0;q=ha+88|0;r=ha+84|0;x=ha+80|0;t=ha+76|0;w=ha+72|0;D=ha+68|0;A=ha+64|0;B=ha+60|0;y=ha+56|0;E=ha+52|0;O=ha+48|0;L=ha+44|0;M=ha+40|0;G=ha+36|0;P=ha+32|0;Y=ha+28|0;la=ha+24|0;U=ha+
20|0;ja=ha+16|0;N=ha+12|0;Q=ha+8|0;va=ha+4|0;R=ha;c[e>>2]=0;da=Lb(f)|0;c[Z>>2]=da;g=0;Z=ma(37,Z|0,44212)|0;ba=g;g=0;ba&1&&(ba=J()|0,Na(da)|0,V(ba|0));Na(da)|0;do switch(k<<24>>24|0){case 65:case 97:c[z>>2]=c[d>>2];c[n>>2]=c[z>>2];Vc(a,h+24|0,b,n,e,Z);W=28;break;case 104:case 66:case 98:c[ka>>2]=c[d>>2];c[n>>2]=c[ka>>2];Wc(a,h+16|0,b,n,e,Z);W=28;break;case 99:ba=a+8|0;ba=Ja[c[(c[ba>>2]|0)+12>>2]&127](ba)|0;c[aa>>2]=c[b>>2];c[wa>>2]=c[d>>2];k=u[ba>>0]|0;d=0==(k&1);W=ba+4|0;ba=d?W:c[ba+8>>2]|0;W=ba+
((d?(k&255)>>>1:c[W>>2]|0)<<2)|0;c[m>>2]=c[aa>>2];c[n>>2]=c[wa>>2];W=jc(a,m,n,f,e,h,ba,W)|0;c[b>>2]=W;W=28;break;case 101:case 100:c[X>>2]=c[d>>2];c[n>>2]=c[X>>2];var Ua=a,Ra=h+12|0,ca=b,lb=n,ea=e,nb=Z,Ra=Ra|0,ca=ca|0,lb=lb|0,ea=ea|0,nb=nb|0,ab=0,ga=0,ab=F;F=F+16|0;Ua=ab+4|0;ga=ab;c[ga>>2]=c[lb>>2];c[Ua>>2]=c[ga>>2];Ua=Od(ca,Ua,ea,nb,2)|0;ca=c[ea>>2]|0;31>(Ua+-1|0)>>>0&0==(ca&4|0)?c[Ra>>2]=Ua:c[ea>>2]=ca|4;F=ab;W=28;break;case 68:c[fa>>2]=c[b>>2];c[Ba>>2]=c[d>>2];c[m>>2]=c[fa>>2];c[n>>2]=c[Ba>>2];
W=jc(a,m,n,f,e,h,44820,44852)|0;c[b>>2]=W;W=28;break;case 70:c[Ia>>2]=c[b>>2];c[q>>2]=c[d>>2];c[m>>2]=c[Ia>>2];c[n>>2]=c[q>>2];W=jc(a,m,n,f,e,h,44852,44884)|0;c[b>>2]=W;W=28;break;case 72:c[r>>2]=c[d>>2];c[n>>2]=c[r>>2];var ia=a,na=h+8|0,dc=b,oa=n,pa=e,ra=Z,na=na|0,dc=dc|0,oa=oa|0,pa=pa|0,ra=ra|0,qa=0,sa=0,qa=F;F=F+16|0;ia=qa+4|0;sa=qa;c[sa>>2]=c[oa>>2];c[ia>>2]=c[sa>>2];ia=Od(dc,ia,pa,ra,2)|0;dc=c[pa>>2]|0;24>(ia|0)&0==(dc&4|0)?c[na>>2]=ia:c[pa>>2]=dc|4;F=qa;W=28;break;case 73:c[x>>2]=c[d>>2];c[n>>
2]=c[x>>2];var ta=a,ya=h+8|0,xa=b,Aa=n,za=e,Ca=Z,ya=ya|0,xa=xa|0,Aa=Aa|0,za=za|0,Ca=Ca|0,Da=0,Fa=0,Da=F;F=F+16|0;ta=Da+4|0;Fa=Da;c[Fa>>2]=c[Aa>>2];c[ta>>2]=c[Fa>>2];ta=Od(xa,ta,za,Ca,2)|0;xa=c[za>>2]|0;12>(ta+-1|0)>>>0&0==(xa&4|0)?c[ya>>2]=ta:c[za>>2]=xa|4;F=Da;W=28;break;case 106:c[t>>2]=c[d>>2];c[n>>2]=c[t>>2];var Ea=a,Ga=h+28|0,Ha=b,La=n,Ka=e,cc=Z,Ga=Ga|0,Ha=Ha|0,La=La|0,Ka=Ka|0,cc=cc|0,gc=0,Ma=0,gc=F;F=F+16|0;Ea=gc+4|0;Ma=gc;c[Ma>>2]=c[La>>2];c[Ea>>2]=c[Ma>>2];Ea=Od(Ha,Ea,Ka,cc,3)|0;Ha=c[Ka>>
2]|0;366>(Ea|0)&0==(Ha&4|0)?c[Ga>>2]=Ea:c[Ka>>2]=Ha|4;F=gc;W=28;break;case 109:c[w>>2]=c[d>>2];c[n>>2]=c[w>>2];var zb=a,vb=h+16|0,Oa=b,Pa=n,Qa=e,mc=Z,vb=vb|0,Oa=Oa|0,Pa=Pa|0,Qa=Qa|0,mc=mc|0,Va=0,kc=0,Va=F;F=F+16|0;zb=Va+4|0;kc=Va;c[kc>>2]=c[Pa>>2];c[zb>>2]=c[kc>>2];zb=Od(Oa,zb,Qa,mc,2)|0;Oa=c[Qa>>2]|0;13>(zb|0)&0==(Oa&4|0)?c[vb>>2]=zb+-1:c[Qa>>2]=Oa|4;F=Va;W=28;break;case 77:c[D>>2]=c[d>>2];c[n>>2]=c[D>>2];var Wa=a,Za=h+4|0,Xa=b,bb=n,$a=e,fb=Z,Za=Za|0,Xa=Xa|0,bb=bb|0,$a=$a|0,fb=fb|0,eb=0,ib=0,eb=
F;F=F+16|0;Wa=eb+4|0;ib=eb;c[ib>>2]=c[bb>>2];c[Wa>>2]=c[ib>>2];Wa=Od(Xa,Wa,$a,fb,2)|0;Xa=c[$a>>2]|0;60>(Wa|0)&0==(Xa&4|0)?c[Za>>2]=Wa:c[$a>>2]=Xa|4;F=eb;W=28;break;case 116:case 110:c[A>>2]=c[d>>2];c[n>>2]=c[A>>2];var kb=a,mb=b,gb=n,jb=e,ic=Z,mb=mb|0,gb=gb|0,jb=jb|0,ic=ic|0,Ta=0,Ya=0,hb=0;a:for(;;){(kb=c[mb>>2]|0)?(Ta=c[kb+12>>2]|0,kb=(Ta|0)==(c[kb+16>>2]|0)?Ja[c[(c[kb>>2]|0)+36>>2]&127](kb)|0:c[Ta>>2]|0,-1==(kb|0)?(c[mb>>2]=0,Ya=1):Ya=0==(c[mb>>2]|0)):Ya=1;Ta=c[gb>>2]|0;do if(Ta)if(kb=c[Ta+12>>2]|
0,kb=(kb|0)==(c[Ta+16>>2]|0)?Ja[c[(c[Ta>>2]|0)+36>>2]&127](Ta)|0:c[kb>>2]|0,-1!=(kb|0))if(Ya)Ya=Ta;else{Ya=Ta;break a}else c[gb>>2]=0,hb=15;else hb=15;while(0);if(15==(hb|0))if(hb=0,Ya){Ya=0;break}else Ya=0;kb=c[mb>>2]|0;Ta=c[kb+12>>2]|0;kb=(Ta|0)==(c[kb+16>>2]|0)?Ja[c[(c[kb>>2]|0)+36>>2]&127](kb)|0:c[Ta>>2]|0;if(!(cb[c[(c[ic>>2]|0)+12>>2]&63](ic,8192,kb)|0))break;kb=c[mb>>2]|0;Ta=kb+12|0;Ya=c[Ta>>2]|0;(Ya|0)==(c[kb+16>>2]|0)?Ja[c[(c[kb>>2]|0)+40>>2]&127](kb)|0:c[Ta>>2]=Ya+4}(kb=c[mb>>2]|0)?(Ta=c[kb+
12>>2]|0,kb=(Ta|0)==(c[kb+16>>2]|0)?Ja[c[(c[kb>>2]|0)+36>>2]&127](kb)|0:c[Ta>>2]|0,-1==(kb|0)?(c[mb>>2]=0,Ta=1):Ta=0==(c[mb>>2]|0)):Ta=1;Ya?(kb=c[Ya+12>>2]|0,kb=(kb|0)==(c[Ya+16>>2]|0)?Ja[c[(c[Ya>>2]|0)+36>>2]&127](Ya)|0:c[kb>>2]|0,-1!=(kb|0)?Ta||(hb=39):(c[gb>>2]=0,hb=37)):hb=37;37==(hb|0)&&Ta&&(hb=39);39==(hb|0)&&(c[jb>>2]|=2);W=28;break;case 112:c[B>>2]=c[d>>2];c[n>>2]=c[B>>2];var db=a,pb=h+8|0,qb=b,tb=n,sb=e,wb=Z,db=db|0,pb=pb|0,qb=qb|0,tb=tb|0,sb=sb|0,wb=wb|0,rb=0,xb=0,nc=0,ob=0,Bb=0,Bb=F;F=
F+16|0;xb=Bb+4|0;nc=Bb;ob=db+8|0;ob=Ja[c[(c[ob>>2]|0)+8>>2]&127](ob)|0;db=u[ob>>0]|0;rb=db&1?c[ob+4>>2]|0:(db&255)>>>1;db=u[ob+12>>0]|0;db=db&1?c[ob+16>>2]|0:(db&255)>>>1;(rb|0)!=(0-db|0)?(c[nc>>2]=c[tb>>2],c[xb>>2]=c[nc>>2],db=of(qb,xb,ob,ob+24|0,wb,sb,0)|0,rb=c[pb>>2]|0,(db|0)==(ob|0)&12==(rb|0)?c[pb>>2]=0:12>(rb|0)&12==(db-ob|0)&&(c[pb>>2]=rb+12)):c[sb>>2]|=4;F=Bb;W=28;break;case 114:c[y>>2]=c[b>>2];c[E>>2]=c[d>>2];c[m>>2]=c[y>>2];c[n>>2]=c[E>>2];W=jc(a,m,n,f,e,h,44884,44928)|0;c[b>>2]=W;W=28;
break;case 82:c[O>>2]=c[b>>2];c[L>>2]=c[d>>2];c[m>>2]=c[O>>2];c[n>>2]=c[L>>2];W=jc(a,m,n,f,e,h,44928,44948)|0;c[b>>2]=W;W=28;break;case 83:c[M>>2]=c[d>>2];c[n>>2]=c[M>>2];var yb=a,Gb=h,Ab=b,Ib=n,Eb=e,Kb=Z,Gb=Gb|0,Ab=Ab|0,Ib=Ib|0,Eb=Eb|0,Kb=Kb|0,Jb=0,$b=0,Jb=F;F=F+16|0;yb=Jb+4|0;$b=Jb;c[$b>>2]=c[Ib>>2];c[yb>>2]=c[$b>>2];yb=Od(Ab,yb,Eb,Kb,2)|0;Ab=c[Eb>>2]|0;61>(yb|0)&0==(Ab&4|0)?c[Gb>>2]=yb:c[Eb>>2]=Ab|4;F=Jb;W=28;break;case 84:c[G>>2]=c[b>>2];c[P>>2]=c[d>>2];c[m>>2]=c[G>>2];c[n>>2]=c[P>>2];W=jc(a,
m,n,f,e,h,44948,44980)|0;c[b>>2]=W;W=28;break;case 119:c[Y>>2]=c[d>>2];c[n>>2]=c[Y>>2];var Db=a,Ob=h+24|0,Fb=b,Tb=n,Nb=e,tc=Z,Ob=Ob|0,Fb=Fb|0,Tb=Tb|0,Nb=Nb|0,tc=tc|0,Sb=0,Ub=0,Sb=F;F=F+16|0;Db=Sb+4|0;Ub=Sb;c[Ub>>2]=c[Tb>>2];c[Db>>2]=c[Ub>>2];Db=Od(Fb,Db,Nb,tc,1)|0;Fb=c[Nb>>2]|0;7>(Db|0)&0==(Fb&4|0)?c[Ob>>2]=Db:c[Nb>>2]=Fb|4;F=Sb;W=28;break;case 120:ba=c[(c[a>>2]|0)+20>>2]|0;c[la>>2]=c[b>>2];c[U>>2]=c[d>>2];c[m>>2]=c[la>>2];c[n>>2]=c[U>>2];m=bf[ba&63](a,m,n,f,e,h)|0;break;case 88:ba=a+8|0;ba=Ja[c[(c[ba>>
2]|0)+24>>2]&127](ba)|0;c[ja>>2]=c[b>>2];c[N>>2]=c[d>>2];k=u[ba>>0]|0;d=0==(k&1);W=ba+4|0;ba=d?W:c[ba+8>>2]|0;W=ba+((d?(k&255)>>>1:c[W>>2]|0)<<2)|0;c[m>>2]=c[ja>>2];c[n>>2]=c[N>>2];W=jc(a,m,n,f,e,h,ba,W)|0;c[b>>2]=W;W=28;break;case 121:c[Q>>2]=c[d>>2];c[n>>2]=c[Q>>2];Zc(a,h+20|0,b,n,e,Z);W=28;break;case 89:c[va>>2]=c[d>>2];c[n>>2]=c[va>>2];var Qb=a,Wb=h+20|0,lc=b,Yb=n,Xb=e,ac=Z,Wb=Wb|0,lc=lc|0,Yb=Yb|0,Xb=Xb|0,ac=ac|0,hc=0,fc=0,hc=F;F=F+16|0;Qb=hc+4|0;fc=hc;c[fc>>2]=c[Yb>>2];c[Qb>>2]=c[fc>>2];Qb=Od(lc,
Qb,Xb,ac,4)|0;c[Xb>>2]&4||(c[Wb>>2]=Qb+-1900);F=hc;W=28;break;case 37:c[R>>2]=c[d>>2];c[n>>2]=c[R>>2];var Sa=a,Hb=b,Vb=n,Pb=e,bc=Z,Hb=Hb|0,Vb=Vb|0,Pb=Pb|0,bc=bc|0,Zb=0,Rb=0,ec=0,Mb=0;(Sa=c[Hb>>2]|0)?(Zb=c[Sa+12>>2]|0,Sa=(Zb|0)==(c[Sa+16>>2]|0)?Ja[c[(c[Sa>>2]|0)+36>>2]&127](Sa)|0:c[Zb>>2]|0,-1==(Sa|0)?(c[Hb>>2]=0,Rb=1):Rb=0==(c[Hb>>2]|0)):Rb=1;(Zb=c[Vb>>2]|0)?(Sa=c[Zb+12>>2]|0,Sa=(Sa|0)==(c[Zb+16>>2]|0)?Ja[c[(c[Zb>>2]|0)+36>>2]&127](Zb)|0:c[Sa>>2]|0,-1!=(Sa|0)?Rb?(ec=Zb,Mb=17):Mb=16:(c[Vb>>2]=0,Mb=
14)):Mb=14;14==(Mb|0)&&(Rb?Mb=16:(ec=0,Mb=17));a:do if(16==(Mb|0))c[Pb>>2]|=6;else if(17==(Mb|0))if(Sa=c[Hb>>2]|0,Zb=c[Sa+12>>2]|0,Sa=(Zb|0)==(c[Sa+16>>2]|0)?Ja[c[(c[Sa>>2]|0)+36>>2]&127](Sa)|0:c[Zb>>2]|0,37!=(cb[c[(c[bc>>2]|0)+52>>2]&63](bc,Sa,0)|0)<<24>>24)c[Pb>>2]|=4;else{Sa=c[Hb>>2]|0;Zb=Sa+12|0;Rb=c[Zb>>2]|0;(Rb|0)==(c[Sa+16>>2]|0)?(Ja[c[(c[Sa>>2]|0)+40>>2]&127](Sa)|0,(Sa=c[Hb>>2]|0)?Mb=25:Zb=1):(c[Zb>>2]=Rb+4,Mb=25);25==(Mb|0)&&(Zb=c[Sa+12>>2]|0,Sa=(Zb|0)==(c[Sa+16>>2]|0)?Ja[c[(c[Sa>>2]|0)+
36>>2]&127](Sa)|0:c[Zb>>2]|0,-1==(Sa|0)?(c[Hb>>2]=0,Zb=1):Zb=0==(c[Hb>>2]|0));do if(ec)if(Sa=c[ec+12>>2]|0,Sa=(Sa|0)==(c[ec+16>>2]|0)?Ja[c[(c[ec>>2]|0)+36>>2]&127](ec)|0:c[Sa>>2]|0,-1!=(Sa|0)){if(Zb)break a}else c[Vb>>2]=0,Mb=37;else Mb=37;while(0);if(37!=(Mb|0)||Zb)c[Pb>>2]|=2}while(0);W=28;break;default:c[e>>2]|=4,W=28}while(0);28==(W|0)&&(m=c[b>>2]|0);F=ha;return m|0},function(a,b,d,f,e,k,m,n){b|=0;d|=0;f|=0;e|=0;k|=0;m|=0;n|=0;var q=0,r=0,x=0,t=0,w=0,D=0,A=0,B=0,y=0,E=0,z=0,y=F;F=F+16|0;A=y;w=
y+8|0;a:do if((d|0)==(f|0))q=f;else for(q=d;;){if(!(c[q>>2]|0))break a;q=q+4|0;if((q|0)==(f|0)){q=f;break}}while(0);c[n>>2]=k;c[e>>2]=d;x=m;D=(a|0)+8|0;a:do if((k|0)==(m|0)|(d|0)==(f|0))E=47;else{a=k;r=q;b:for(;;){z=b;k=c[z+4>>2]|0;q=A;c[q>>2]=c[z>>2];c[q+4>>2]=k;q=md(c[D>>2]|0)|0;g=0;k=Mf(21,a|0,e|0,r-d>>2|0,x-a|0,b|0)|0;z=g;g=0;if(z&1){E=9;break}if(0!=(q|0)&&(g=0,ca(75,q|0)|0,z=g,g=0,z&1)){E=8;break}switch(k|0){case 0:t=1;break a;case -1:q=a;E=14;break b}q=(c[n>>2]|0)+k|0;c[n>>2]=q;if((q|0)==(m|
0)){E=27;break}if((r|0)==(f|0))d=c[e>>2]|0,a=q,q=f;else{q=md(c[D>>2]|0)|0;g=0;d=La(34,w|0,0,b|0)|0;z=g;g=0;if(z&1){E=35;break}if(0!=(q|0)&&(g=0,ca(75,q|0)|0,z=g,g=0,z&1)){E=34;break}if(-1==(d|0)){t=2;break a}if(d>>>0>(x-(c[n>>2]|0)|0)>>>0){t=1;break a}if(d)for(q=w;;)if(r=u[q>>0]|0,z=c[n>>2]|0,c[n>>2]=z+1,u[z>>0]=r,d=d+-1|0)q=q+1|0;else break;d=(c[e>>2]|0)+4|0;c[e>>2]=d;c:do if((d|0)==(f|0))q=f;else for(q=d;;){if(!(c[q>>2]|0))break c;q=q+4|0;if((q|0)==(f|0)){q=f;break}}while(0);a=c[n>>2]|0}if((a|0)==
(m|0)|(d|0)==(f|0)){E=47;break a}else r=q}if(8==(E|0))z=J(0)|0,h(z);else if(9==(E|0))d=J()|0,0!=(q|0)&&(g=0,ca(75,q|0)|0,z=g,g=0,z&1)&&(z=J(0)|0,h(z)),V(d|0);else if(14==(E|0)){c[n>>2]=q;b:do if((d|0)!=(c[e>>2]|0)){for(;;){z=c[d>>2]|0;a=md(c[D>>2]|0)|0;g=0;q=La(34,q|0,z|0,A|0)|0;z=g;g=0;if(z&1){B=a;break}if(0!=(a|0)&&(g=0,ca(75,a|0)|0,z=g,g=0,z&1)){E=18;break}if(-1==(q|0))break b;q=(c[n>>2]|0)+q|0;c[n>>2]=q;d=d+4|0;if((d|0)==(c[e>>2]|0))break b}18==(E|0)&&(z=J(0)|0,h(z));d=J()|0;0!=(B|0)&&(g=0,ca(75,
B|0)|0,z=g,g=0,z&1)&&(z=J(0)|0,h(z));V(d|0)}while(0);c[e>>2]=d;t=2}else 27==(E|0)?(d=c[e>>2]|0,E=47):34==(E|0)?(z=J(0)|0,h(z)):35==(E|0)&&(d=J()|0,0!=(q|0)&&(g=0,ca(75,q|0)|0,z=g,g=0,z&1)&&(z=J(0)|0,h(z)),V(d|0))}while(0);47==(E|0)&&(t=(d|0)!=(f|0)&1);F=y;return t|0},function(a,b,d,f,e,k,m,n){b|=0;d|=0;f|=0;e|=0;k|=0;m|=0;n|=0;var q=0,r=0,x=0,t=0,w=0,D=0,A=0,B=0,z=0,E=0,y=0,z=F;F=F+16|0;B=z;a:do if((d|0)==(f|0))q=f;else for(q=d;;){if(!(u[q>>0]|0))break a;q=q+1|0;if((q|0)==(f|0)){q=f;break}}while(0);
c[n>>2]=k;c[e>>2]=d;t=m;D=(a|0)+8|0;a:do if((k|0)==(m|0)|(d|0)==(f|0))E=47;else{a=k;x=q;b:for(;;){r=b;q=c[r+4>>2]|0;k=B;c[k>>2]=c[r>>2];c[k+4>>2]=q;k=x;q=md(c[D>>2]|0)|0;g=0;r=Mf(22,a|0,e|0,k-d|0,t-a>>2|0,b|0)|0;y=g;g=0;if(y&1){E=9;break}if(0!=(q|0)&&(g=0,ca(75,q|0)|0,y=g,g=0,y&1)){E=8;break}switch(r|0){case 0:w=2;break a;case -1:q=a;E=14;break b}a=(c[n>>2]|0)+(r<<2)|0;c[n>>2]=a;if((a|0)==(m|0)){E=31;break}d=c[e>>2]|0;if((x|0)==(f|0))q=f;else{q=md(c[D>>2]|0)|0;g=0;d=fb(20,a|0,d|0,1,b|0)|0;y=g;g=0;
if(y&1){E=38;break}if(0!=(q|0)&&(g=0,ca(75,q|0)|0,y=g,g=0,y&1)){E=37;break}if(d){w=2;break a}c[n>>2]=(c[n>>2]|0)+4;d=(c[e>>2]|0)+1|0;c[e>>2]=d;c:do if((d|0)==(f|0))q=f;else for(q=d;;){if(!(u[q>>0]|0))break c;q=q+1|0;if((q|0)==(f|0)){q=f;break}}while(0);a=c[n>>2]|0}if((a|0)==(m|0)|(d|0)==(f|0)){E=47;break a}else x=q}if(8==(E|0))y=J(0)|0,h(y);else if(9==(E|0))d=J()|0,0!=(q|0)&&(g=0,ca(75,q|0)|0,y=g,g=0,y&1)&&(y=J(0)|0,h(y)),V(d|0);else if(14==(E|0)){c[n>>2]=q;b:do if((d|0)!=(c[e>>2]|0)){a=q;c:for(;;){q=
md(c[D>>2]|0)|0;g=0;a=fb(20,a|0,d|0,k-d|0,B|0)|0;y=g;g=0;if(y&1){E=19;break}if(0!=(q|0)&&(g=0,ca(75,q|0)|0,y=g,g=0,y&1)){E=18;break}switch(a|0){case -1:E=25;break c;case -2:E=26;break c;case 0:d=d+1|0;break;default:d=d+a|0}a=(c[n>>2]|0)+4|0;c[n>>2]=a;if((d|0)==(c[e>>2]|0)){A=d;break b}}if(18==(E|0))y=J(0)|0,h(y);else if(19==(E|0))d=J()|0,0!=(q|0)&&(g=0,ca(75,q|0)|0,y=g,g=0,y&1)&&(y=J(0)|0,h(y)),V(d|0);else if(25==(E|0)){c[e>>2]=d;w=2;break a}else if(26==(E|0)){c[e>>2]=d;w=1;break a}}else A=d;while(0);
c[e>>2]=A;w=(A|0)!=(f|0)&1}else 31==(E|0)?(d=c[e>>2]|0,E=47):37==(E|0)?(y=J(0)|0,h(y)):38==(E|0)&&(d=J()|0,0!=(q|0)&&(g=0,ca(75,q|0)|0,y=g,g=0,y&1)&&(y=J(0)|0,h(y)),V(d|0))}while(0);47==(E|0)&&(w=(d|0)!=(f|0)&1);F=z;return w|0},function(a,b,d,f,g,e,h,k){c[(g|0)>>2]=d|0;c[(k|0)>>2]=e|0;return 3},function(a,b,d,f,g,e,h,k){c[(g|0)>>2]=d|0;c[(k|0)>>2]=e|0;return 3},function(a,b,d,f,g,e,h,k){d|=0;e|=0;var m=0;a=F;F=F+16|0;m=a+4|0;b=a;c[m>>2]=d;c[b>>2]=e;f|=0;var n;h|=0;var q,r,x;d|=0;f|=0;n=m|0;e|=0;h|=
0;q=b|0;r=1114111;var t=0,w=0;c[n>>2]=d;c[q>>2]=e;t=4;a:do if(4==(t|0))if(w=f,d=c[n>>2]|0,d>>>0<f>>>0)for(;;){x=R[d>>1]|0;t=x&65535;if(t>>>0>r>>>0){d=2;break a}do if(128>(x&65535)){d=c[q>>2]|0;if(1>(h-d|0)){d=1;break a}c[q>>2]=d+1;u[d>>0]=x}else if(2048>(x&65535)){d=c[q>>2]|0;if(2>(h-d|0)){d=1;break a}c[q>>2]=d+1;u[d>>0]=t>>>6|192;e=c[q>>2]|0;c[q>>2]=e+1;u[e>>0]=t&63|128}else if(55296>(x&65535)){d=c[q>>2]|0;if(3>(h-d|0)){d=1;break a}c[q>>2]=d+1;u[d>>0]=t>>>12|224;e=c[q>>2]|0;c[q>>2]=e+1;u[e>>0]=t>>>
6&63|128;e=c[q>>2]|0;c[q>>2]=e+1;u[e>>0]=t&63|128}else if(56320<=(x&65535)){if(57344>(x&65535)){d=2;break a}d=c[q>>2]|0;if(3>(h-d|0)){d=1;break a}c[q>>2]=d+1;u[d>>0]=t>>>12|224;e=c[q>>2]|0;c[q>>2]=e+1;u[e>>0]=t>>>6&63|128;e=c[q>>2]|0;c[q>>2]=e+1;u[e>>0]=t&63|128}else{if(4>(w-d|0)){d=1;break a}d=d+2|0;x=oa[d>>1]|0;if(56320!=(x&64512|0)){d=2;break a}if(4>(h-(c[q>>2]|0)|0)){d=1;break a}e=t&960;if(((e<<10)+65536|t<<10&64512|x&1023)>>>0>r>>>0){d=2;break a}c[n>>2]=d;d=(e>>>6)+1|0;e=c[q>>2]|0;c[q>>2]=e+
1;u[e>>0]=d>>>2|240;e=c[q>>2]|0;c[q>>2]=e+1;u[e>>0]=t>>>2&15|d<<4&48|128;e=c[q>>2]|0;c[q>>2]=e+1;u[e>>0]=t<<4&48|x>>>6&15|128;t=c[q>>2]|0;c[q>>2]=t+1;u[t>>0]=x&63|128}while(0);d=(c[n>>2]|0)+2|0;c[n>>2]=d;if(d>>>0>=f>>>0){d=0;break}}else d=0;while(0);h=d|0;c[(g|0)>>2]=c[m>>2];c[(k|0)>>2]=c[b>>2];F=a;return h|0},function(a,b,d,f,g,e,h,k){d|=0;e|=0;var m=0;a=F;F=F+16|0;m=a+4|0;b=a;c[m>>2]=d;c[b>>2]=e;f|=0;var n;h|=0;var q,r,x;d|=0;f|=0;n=m|0;e|=0;h|=0;q=b|0;r=1114111;var t=0,w=0,D=0,A=0,B=0,E=0;c[n>>
2]=d;t=c[q>>2]=e;x=f;B=h;e=c[n>>2]|0;d=e>>>0<f>>>0;a:do if(d&t>>>0<h>>>0)for(;;){d=u[e>>0]|0;D=d&255;if(D>>>0>r>>>0){d=2;break a}do if(-1<d<<24>>24)R[t>>1]=d&255,c[n>>2]=e+1;else{if(194>(d&255)){d=2;break a}if(224>(d&255)){if(2>(x-e|0)){d=1;break a}d=ea[e+1>>0]|0;if(128!=(d&192|0)){d=2;break a}d=d&63|D<<6&1984;if(d>>>0>r>>>0){d=2;break a}R[t>>1]=d;c[n>>2]=e+2}else if(240>(d&255)){if(3>(x-e|0)){d=1;break a}w=u[e+1>>0]|0;d=u[e+2>>0]|0;switch(D|0){case 224:if(-96!=(w&-32)<<24>>24){d=2;break a}break;
case 237:if(-128!=(w&-32)<<24>>24){d=2;break a}break;default:if(-128!=(w&-64)<<24>>24){d=2;break a}}d&=255;if(128!=(d&192|0)){d=2;break a}d=(w&255)<<6&4032|D<<12|d&63;if((d&65535)>>>0>r>>>0){d=2;break a}R[t>>1]=d;c[n>>2]=e+3}else{if(245<=(d&255)){d=2;break a}if(4>(x-e|0)){d=1;break a}w=u[e+1>>0]|0;d=u[e+2>>0]|0;e=u[e+3>>0]|0;switch(D|0){case 240:if(48<=(w+112&255)){d=2;break a}break;case 244:if(-128!=(w&-16)<<24>>24){d=2;break a}break;default:if(-128!=(w&-64)<<24>>24){d=2;break a}}A=d&255;if(128!=
(A&192|0)){d=2;break a}d=e&255;if(128!=(d&192|0)){d=2;break a}if(4>(B-t|0)){d=1;break a}D&=7;e=w&255;w=A<<6;d&=63;if((e<<12&258048|D<<18|w&4032|d)>>>0>r>>>0){d=2;break a}R[t>>1]=e<<2&60|A>>>4&3|((e>>>4&3|D<<2)<<6)+16320|55296;A=t+2|0;c[q>>2]=A;R[A>>1]=d|w&960|56320;c[n>>2]=(c[n>>2]|0)+4}}while(0);t=(c[q>>2]|0)+2|0;c[q>>2]=t;e=c[n>>2]|0;d=e>>>0<f>>>0;if(!(d&t>>>0<h>>>0)){E=39;break}}else E=39;while(0);39==(E|0)&&(d&=1);h=d|0;c[(g|0)>>2]=c[m>>2];c[(k|0)>>2]=c[b>>2];F=a;return h|0},function(a,b,d,f,
g,e,h,k){d|=0;e|=0;var m=0;a=F;F=F+16|0;m=a+4|0;b=a;c[m>>2]=d;c[b>>2]=e;f|=0;var n,q;h|=0;var r;d|=0;f|=0;n=m|0;q=e|0;e=b|0;r=1114111;var x=0,t=0;c[n>>2]=d;c[e>>2]=q;t=h|0;x=4;a:do if(4==(x|0))if(d=c[n>>2]|0,d>>>0<f>>>0)for(;;){q=c[d>>2]|0;if(q>>>0>r>>>0|55296==(q&-2048|0)){d=2;break a}do if(128<=q>>>0){if(2048>q>>>0){d=c[e>>2]|0;if(2>(t-d|0)){d=1;break a}c[e>>2]=d+1;u[d>>0]=q>>>6|192}else{d=c[e>>2]|0;h=t-d|0;if(65536>q>>>0){if(3>(h|0)){d=1;break a}c[e>>2]=d+1;u[d>>0]=q>>>12|224}else{if(4>(h|0)){d=
1;break a}c[e>>2]=d+1;u[d>>0]=q>>>18|240;x=c[e>>2]|0;c[e>>2]=x+1;u[x>>0]=q>>>12&63|128}x=c[e>>2]|0;c[e>>2]=x+1;u[x>>0]=q>>>6&63|128}x=c[e>>2]|0;c[e>>2]=x+1;u[x>>0]=q&63|128}else{d=c[e>>2]|0;if(1>(t-d|0)){d=1;break a}c[e>>2]=d+1;u[d>>0]=q}while(0);d=(c[n>>2]|0)+4|0;c[n>>2]=d;if(d>>>0>=f>>>0){d=0;break}}else d=0;while(0);h=d|0;c[(g|0)>>2]=c[m>>2];c[(k|0)>>2]=c[b>>2];F=a;return h|0},function(a,b,d,f,g,e,h,k){d|=0;e|=0;var m=0;a=F;F=F+16|0;m=a+4|0;b=a;c[m>>2]=d;c[b>>2]=e;f|=0;var n;h|=0;var q,r,x;d|=
0;f|=0;n=m|0;e|=0;h|=0;q=b|0;r=1114111;var t=0,w=0,D=0,A=0,B=0,E=0;c[n>>2]=d;c[q>>2]=e;B=f;x=c[n>>2]|0;d=x>>>0<f>>>0;a:do if(d&e>>>0<h>>>0)for(;;){d=u[x>>0]|0;A=d&255;do if(-1<d<<24>>24){if(A>>>0>r>>>0){d=2;break a}c[e>>2]=A;c[n>>2]=x+1}else{if(194>(d&255)){d=2;break a}if(224>(d&255)){if(2>(B-x|0)){d=1;break a}d=ea[x+1>>0]|0;if(128!=(d&192|0)){d=2;break a}d=d&63|A<<6&1984;if(d>>>0>r>>>0){d=2;break a}c[e>>2]=d;c[n>>2]=x+2}else if(240>(d&255)){if(3>(B-x|0)){d=1;break a}t=u[x+1>>0]|0;d=u[x+2>>0]|0;switch(A|
0){case 224:if(-96!=(t&-32)<<24>>24){d=2;break a}break;case 237:if(-128!=(t&-32)<<24>>24){d=2;break a}break;default:if(-128!=(t&-64)<<24>>24){d=2;break a}}d&=255;if(128!=(d&192|0)){d=2;break a}d=(t&255)<<6&4032|A<<12&61440|d&63;if(d>>>0>r>>>0){d=2;break a}c[e>>2]=d;c[n>>2]=x+3}else{if(245<=(d&255)){d=2;break a}if(4>(B-x|0)){d=1;break a}D=u[x+1>>0]|0;d=u[x+2>>0]|0;t=u[x+3>>0]|0;switch(A|0){case 240:if(48<=(D+112&255)){d=2;break a}break;case 244:if(-128!=(D&-16)<<24>>24){d=2;break a}break;default:if(-128!=
(D&-64)<<24>>24){d=2;break a}}w=d&255;if(128!=(w&192|0)){d=2;break a}d=t&255;if(128!=(d&192|0)){d=2;break a}d=(D&255)<<12&258048|A<<18&1835008|w<<6&4032|d&63;if(d>>>0>r>>>0){d=2;break a}c[e>>2]=d;c[n>>2]=x+4}}while(0);e=(c[q>>2]|0)+4|0;c[q>>2]=e;x=c[n>>2]|0;d=x>>>0<f>>>0;if(!(d&e>>>0<h>>>0)){E=38;break}}else E=38;while(0);38==(E|0)&&(d&=1);h=d|0;c[(g|0)>>2]=c[m>>2];c[(k|0)>>2]=c[b>>2];F=a;return h|0},Qe,Qe,Qe,Qe,Qe],Ei=[Af,function(a,b,d,f,e){b|=0;d|=0;f|=0;e=+e;var h=0,k=0,m=0,n=0,q=0,r=0,x=0,u=
0,t=0,w=0,D=0,A=0,B=0,E=0,y=0,z=0,O=0,L=0,O=F;F=F+176|0;A=O+84|0;u=O+48|0;x=O+32|0;n=O+24|0;h=O+8|0;r=O;w=O+88|0;D=O+80|0;m=O+118|0;z=O+76|0;y=O+72|0;B=O+68|0;E=O+64|0;q=r;c[q>>2]=37;c[q+4>>2]=0;q=vf(r+1|0,58898,c[d+4>>2]|0)|0;c[D>>2]=w;a=Xb()|0;q?(c[h>>2]=c[d+8>>2],eb[h+8>>3]=e,h=Bc(w,30,a,r,h)|0):(eb[n>>3]=e,h=Bc(w,30,a,r,n)|0);a:do if(29<(h|0)){g=0;a=Va(3)|0;h=g;g=0;h&=1;q?h||(g=0,c[x>>2]=c[d+8>>2],eb[x+8>>3]=e,k=fb(17,D|0,a|0,r|0,x|0)|0,t=g,g=0,t&1)||(L=12):h||(g=0,c[u>>2]=c[d+8>>2],eb[u+8>>3]=
e,t=fb(17,D|0,a|0,r|0,u|0)|0,u=g,g=0,u&1)||(k=t,L=12);do if(12==(L|0)){if(a=c[D>>2]|0)h=a;else{g=0;rb(6);t=g;g=0;if(t&1)break;h=c[D>>2]|0}r=a=h;L=16;break a}while(0);a=J()|0}else a=c[D>>2]|0,r=0,k=h,L=16;while(0);if(16==(L|0)){n=a+k|0;q=kd(a,n,d)|0;do{if((a|0)==(w|0))a=w,h=0;else{k=Ub(k<<1)|0;if(!k){g=0;rb(6);L=g;g=0;if(L&1){h=0;L=20;break}a=c[D>>2]|0}m=h=k}L=22}while(0);if(22==(L|0))if(g=0,k=ca(68,d|0)|0,D=g,g=0,D&1)L=20;else if(c[B>>2]=k,g=0,sd(2,a|0,q|0,n|0,m|0,z|0,y|0,B|0),B=g,g=0,B&1)a=J()|0,
Na(k)|0;else if(Na(k)|0,c[E>>2]=c[b>>2],L=c[z>>2]|0,a=c[y>>2]|0,g=0,c[A>>2]=c[E>>2],a=Wd(39,A|0,m|0,L|0,a|0,d|0,f|0)|0,L=g,g=0,L&1)L=20;else return c[b>>2]=a,h&&$a(h),r&&$a(r),F=O,a|0;20==(L|0)&&(a=J()|0);h&&$a(h);r&&$a(r)}V(a|0);return 0},function(a,b,d,f,e){b|=0;d|=0;f|=0;e=+e;var h=0,k=0,m=0,n=0,q=0,r=0,x=0,u=0,t=0,w=0,D=0,A=0,B=0,E=0,y=0,z=0,O=0,L=0,O=F;F=F+176|0;A=O+76|0;u=O+48|0;x=O+32|0;n=O+24|0;h=O+8|0;r=O;w=O+80|0;D=O+72|0;m=O+110|0;z=O+68|0;y=O+64|0;B=O+60|0;E=O+56|0;q=r;c[q>>2]=37;c[q+
4>>2]=0;q=vf(r+1|0,58899,c[d+4>>2]|0)|0;c[D>>2]=w;a=Xb()|0;q?(c[h>>2]=c[d+8>>2],eb[h+8>>3]=e,h=Bc(w,30,a,r,h)|0):(eb[n>>3]=e,h=Bc(w,30,a,r,n)|0);a:do if(29<(h|0)){g=0;a=Va(3)|0;h=g;g=0;h&=1;q?h||(g=0,c[x>>2]=c[d+8>>2],eb[x+8>>3]=e,k=fb(17,D|0,a|0,r|0,x|0)|0,t=g,g=0,t&1)||(L=12):h||(g=0,eb[u>>3]=e,t=fb(17,D|0,a|0,r|0,u|0)|0,u=g,g=0,u&1)||(k=t,L=12);do if(12==(L|0)){if(a=c[D>>2]|0)h=a;else{g=0;rb(6);t=g;g=0;if(t&1)break;h=c[D>>2]|0}r=a=h;L=16;break a}while(0);a=J()|0}else a=c[D>>2]|0,r=0,k=h,L=16;while(0);
if(16==(L|0)){n=a+k|0;q=kd(a,n,d)|0;do{if((a|0)==(w|0))a=w,h=0;else{k=Ub(k<<1)|0;if(!k){g=0;rb(6);L=g;g=0;if(L&1){h=0;L=20;break}a=c[D>>2]|0}m=h=k}L=22}while(0);if(22==(L|0))if(g=0,k=ca(68,d|0)|0,D=g,g=0,D&1)L=20;else if(c[B>>2]=k,g=0,sd(2,a|0,q|0,n|0,m|0,z|0,y|0,B|0),B=g,g=0,B&1)a=J()|0,Na(k)|0;else if(Na(k)|0,c[E>>2]=c[b>>2],L=c[z>>2]|0,a=c[y>>2]|0,g=0,c[A>>2]=c[E>>2],a=Wd(39,A|0,m|0,L|0,a|0,d|0,f|0)|0,L=g,g=0,L&1)L=20;else return c[b>>2]=a,h&&$a(h),r&&$a(r),F=O,a|0;20==(L|0)&&(a=J()|0);h&&$a(h);
r&&$a(r)}V(a|0);return 0},function(a,b,d,f,e){b|=0;d|=0;f|=0;e=+e;var h=0,k=0,m=0,n=0,q=0,r=0,x=0,u=0,t=0,w=0,D=0,A=0,B=0,E=0,y=0,z=0,O=0,L=0,O=F;F=F+352|0;A=O+312|0;u=O+48|0;x=O+32|0;n=O+24|0;h=O+8|0;r=O;w=O+316|0;D=O+80|0;m=O+84|0;z=O+76|0;y=O+72|0;B=O+68|0;E=O+64|0;q=r;c[q>>2]=37;c[q+4>>2]=0;q=vf(r+1|0,58898,c[d+4>>2]|0)|0;c[D>>2]=w;a=Xb()|0;q?(c[h>>2]=c[d+8>>2],eb[h+8>>3]=e,h=Bc(w,30,a,r,h)|0):(eb[n>>3]=e,h=Bc(w,30,a,r,n)|0);a:do if(29<(h|0)){g=0;a=Va(3)|0;h=g;g=0;h&=1;q?h||(g=0,c[x>>2]=c[d+8>>
2],eb[x+8>>3]=e,k=fb(17,D|0,a|0,r|0,x|0)|0,t=g,g=0,t&1)||(L=12):h||(g=0,c[u>>2]=c[d+8>>2],eb[u+8>>3]=e,t=fb(17,D|0,a|0,r|0,u|0)|0,u=g,g=0,u&1)||(k=t,L=12);do if(12==(L|0)){if(a=c[D>>2]|0)h=a;else{g=0;rb(6);t=g;g=0;if(t&1)break;h=c[D>>2]|0}r=a=h;L=16;break a}while(0);a=J()|0}else a=c[D>>2]|0,r=0,k=h,L=16;while(0);if(16==(L|0)){n=a+k|0;q=kd(a,n,d)|0;do{if((a|0)==(w|0))a=w,h=0;else{k=Ub(k<<3)|0;if(!k){g=0;rb(6);L=g;g=0;if(L&1){h=0;L=20;break}a=c[D>>2]|0}m=h=k}L=22}while(0);if(22==(L|0))if(g=0,k=ca(68,
d|0)|0,D=g,g=0,D&1)L=20;else if(c[B>>2]=k,g=0,sd(4,a|0,q|0,n|0,m|0,z|0,y|0,B|0),B=g,g=0,B&1)a=J()|0,Na(k)|0;else if(Na(k)|0,c[E>>2]=c[b>>2],L=c[z>>2]|0,a=c[y>>2]|0,g=0,c[A>>2]=c[E>>2],a=Wd(40,A|0,m|0,L|0,a|0,d|0,f|0)|0,L=g,g=0,L&1)L=20;else return c[b>>2]=a,h&&$a(h),r&&$a(r),F=O,a|0;20==(L|0)&&(a=J()|0);h&&$a(h);r&&$a(r)}V(a|0);return 0},function(a,b,d,f,e){b|=0;d|=0;f|=0;e=+e;var h=0,k=0,m=0,n=0,q=0,r=0,x=0,u=0,t=0,w=0,D=0,A=0,B=0,E=0,y=0,z=0,O=0,L=0,O=F;F=F+352|0;A=O+304|0;u=O+48|0;x=O+32|0;n=O+
24|0;h=O+8|0;r=O;w=O+308|0;D=O+72|0;m=O+76|0;z=O+68|0;y=O+64|0;B=O+60|0;E=O+56|0;q=r;c[q>>2]=37;c[q+4>>2]=0;q=vf(r+1|0,58899,c[d+4>>2]|0)|0;c[D>>2]=w;a=Xb()|0;q?(c[h>>2]=c[d+8>>2],eb[h+8>>3]=e,h=Bc(w,30,a,r,h)|0):(eb[n>>3]=e,h=Bc(w,30,a,r,n)|0);a:do if(29<(h|0)){g=0;a=Va(3)|0;h=g;g=0;h&=1;q?h||(g=0,c[x>>2]=c[d+8>>2],eb[x+8>>3]=e,k=fb(17,D|0,a|0,r|0,x|0)|0,t=g,g=0,t&1)||(L=12):h||(g=0,eb[u>>3]=e,t=fb(17,D|0,a|0,r|0,u|0)|0,u=g,g=0,u&1)||(k=t,L=12);do if(12==(L|0)){if(a=c[D>>2]|0)h=a;else{g=0;rb(6);
t=g;g=0;if(t&1)break;h=c[D>>2]|0}r=a=h;L=16;break a}while(0);a=J()|0}else a=c[D>>2]|0,r=0,k=h,L=16;while(0);if(16==(L|0)){n=a+k|0;q=kd(a,n,d)|0;do{if((a|0)==(w|0))a=w,h=0;else{k=Ub(k<<3)|0;if(!k){g=0;rb(6);L=g;g=0;if(L&1){h=0;L=20;break}a=c[D>>2]|0}m=h=k}L=22}while(0);if(22==(L|0))if(g=0,k=ca(68,d|0)|0,D=g,g=0,D&1)L=20;else if(c[B>>2]=k,g=0,sd(4,a|0,q|0,n|0,m|0,z|0,y|0,B|0),B=g,g=0,B&1)a=J()|0,Na(k)|0;else if(Na(k)|0,c[E>>2]=c[b>>2],L=c[z>>2]|0,a=c[y>>2]|0,g=0,c[A>>2]=c[E>>2],a=Wd(40,A|0,m|0,L|0,
a|0,d|0,f|0)|0,L=g,g=0,L&1)L=20;else return c[b>>2]=a,h&&$a(h),r&&$a(r),F=O,a|0;20==(L|0)&&(a=J()|0);h&&$a(h);r&&$a(r)}V(a|0);return 0},Af,Af,Af],Bf=[Ic,function(a,b,d,f){a|=0;f=a+4|0;gb(c[f>>2]|0,b|0,ia(c[a+8>>2]|0,d|0)|0)|0;c[f>>2]=(c[f>>2]|0)+(c[a+12>>2]|0)},function(a,b,d,f){a|=0;f=a+4|0;gb(b|0,c[f>>2]|0,ia(c[a+8>>2]|0,d|0)|0)|0;c[f>>2]=(c[f>>2]|0)+(c[a+12>>2]|0)},function(a,b,d,f){a|=0;b|=0;d=ia(c[a+8>>2]|0,d|0)|0;a=c[a+4>>2]|0;(cb[c[(c[a>>2]|0)+48>>2]&63](a,b,d)|0)!=(d|0)&&(f=xa(16)|0,0==(u[8]|
0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,f|0,3,35648),a=g,g=0,a&1?(a=J()|0,za(f|0),V(a|0)):Pa(f|0,824,96))},function(a,b,d,f){a|=0;b|=0;d|=0;var e=0,h=0,k=0,m=0,n=0,q=0,r=0,r=F;F=F+16|0;q=r;n=a+8|0;e=c[n>>2]|0;f=ia(e,d)|0;do if(f){k=a+4|0;for(h=f;;){e=c[k>>2]|0;e=cb[c[(c[e>>2]|0)+32>>2]&63](e,b,h)|0;if(!e)break;f=h-e|0;if((h|0)==(e|0)){m=11;break}else h=f}11==(m|0)?(e=c[n>>2]|0,h=f):(f=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,f|0,3,35648),a=g,g=0,a&1?
(a=J()|0,za(f|0),V(a|0)):Pa(f|0,824,96))}else h=0;while(0);2==(e|0)&&(x(b,d<<1),e=c[n>>2]|0);f=c[a+12>>2]|0;(f|0)<=(ia(e,d)|0)||(a=c[a+4>>2]|0,ye[c[(c[a>>2]|0)+16>>2]&15](q,a,f-h|0,0,1,24));F=r},function(a,b,d,f){b|=0;d=(d|0)+8|0;ye[c[(c[b>>2]|0)+16>>2]&15](a|0,b,c[d>>2]|0,c[d+4>>2]|0,0,f|0)},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var e=0,h=0,k=0,m=0,n=0,e=a+48|0;c[e>>2]|0?(n=a+4|0,h=d<<1,k=ia(h,c[(c[n>>2]|0)+16>>2]|0)|0,m=a+20|0,t(a,b,c[m>>2]|0,d,f),b=c[n>>2]|0,536870912==(c[b+28>>2]|0)&&x(c[m>>2]|
0,ia(h,c[b+16>>2]|0)|0),n=c[e>>2]|0,(cb[c[(c[n>>2]|0)+48>>2]&63](n,c[m>>2]|0,k)|0)!=(k|0)&&(b=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,b|0,3,35648),n=g,g=0,n&1?(n=J()|0,za(b|0),V(n|0)):Pa(b|0,824,96))):(m=a+52|0,t(a,b,c[m>>2]|0,d,f),c[m>>2]=(c[m>>2]|0)+(c[(c[a+4>>2]|0)+12>>2]|0))},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var e=0;if(e=c[a+48>>2]|0){a|=0;e|=0;b|=0;d|=0;f|=0;var h=0,k=0,m=0,n=0,q=0,t=0,w=0,D=0,A=0,B=0,w=F;F=F+176|0;D=w+152|0;B=w+16|0;A=w;n=a+4|0;h=c[n>>2]|
0;t=d<<1;k=ia(t,c[h+16>>2]|0)|0;do if(k){for(m=a+20|0;;){h=cb[c[(c[e>>2]|0)+32>>2]&63](e,c[m>>2]|0,k)|0;if(!h)break;if((k|0)==(h|0)){q=26;break}else k=k-h|0}26==(q|0)?h=c[n>>2]|0:(q=B+56|0,n=B+4|0,c[B>>2]=36160,c[q>>2]=36180,g=0,ga(62,B+56|0,n|0),w=g,g=0,w&1&&(B=J()|0,sa(q),V(B|0)),c[B+128>>2]=0,c[B+132>>2]=-1,c[B>>2]=36200,c[B+56>>2]=36220,g=0,ta(180,n|0),w=g,g=0,w&1?h=J()|0:(c[n>>2]=36236,e=B+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[B+52>>2]=16,c[D>>2]=0,c[D+4>>2]=0,g=c[D+8>>2]=0,ga(63,
n|0,D|0),w=g,g=0,w&1?(h=J()|0,W(D),W(e),ya(n)):(W(D),g=0,h=La(28,B|0,49029,57)|0,D=g,g=0,D&1||(g=0,ma(36,h|0,0)|0,D=g,g=0,D&1)||(m=xa(16)|0,g=0,ga(64,A|0,n|0),D=g,g=0,D&1?h=J()|0:(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,m|0,3,35648,A|0),D=g,g=0,D&1?k=1:(g=0,na(6,m|0,824,96),k=g=0),h=J()|0,W(A),k||(A=h,c[B>>2]=36200,c[q>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(q),V(A|0))),za(m|0),A=h,c[B>>2]=36200,c[q>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(q),V(A|0)),A=J()|0,c[B>>2]=36200,c[q>>
2]=36220,c[n>>2]=36236,W(e),ya(n),sa(q),V(A|0))),B=h,sa(q),V(B|0))}while(0);k=a+20|0;536870912==(c[h+28>>2]|0)&&x(c[k>>2]|0,ia(t,c[h+16>>2]|0)|0);B=c[k>>2]|0;r(a,B,b,d,f);F=w}else e=a+52|0,r(a,c[e>>2]|0,b,d,f),c[e>>2]=(c[e>>2]|0)+(c[(c[a+4>>2]|0)+12>>2]|0)},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var e=0,h=0,k=0,m=0,n=0,e=a+48|0;c[e>>2]|0?(n=a+4|0,h=d<<1,k=ia(h,c[(c[n>>2]|0)+16>>2]|0)|0,m=a+20|0,A(a,b,c[m>>2]|0,d,f),b=c[n>>2]|0,536870912==(c[b+28>>2]|0)&&x(c[m>>2]|0,ia(h,c[b+16>>2]|0)|0),n=c[e>>2]|
0,(cb[c[(c[n>>2]|0)+48>>2]&63](n,c[m>>2]|0,k)|0)!=(k|0)&&(b=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,b|0,3,35648),n=g,g=0,n&1?(n=J()|0,za(b|0),V(n|0)):Pa(b|0,824,96))):(m=a+52|0,A(a,b,c[m>>2]|0,d,f),c[m>>2]=(c[m>>2]|0)+(c[(c[a+4>>2]|0)+12>>2]|0))},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var e=0;if(e=c[a+48>>2]|0){a|=0;e|=0;b|=0;d|=0;f|=0;var h=0,k=0,m=0,n=0,q=0,r=0,t=0,w=0,D=0,A=0,t=F;F=F+176|0;w=t+152|0;A=t+16|0;D=t;n=a+4|0;h=c[n>>2]|0;r=d<<1;k=ia(r,c[h+16>>2]|0)|0;
do if(k){for(m=a+20|0;;){h=cb[c[(c[e>>2]|0)+32>>2]&63](e,c[m>>2]|0,k)|0;if(!h)break;if((k|0)==(h|0)){q=26;break}else k=k-h|0}26==(q|0)?h=c[n>>2]|0:(q=A+56|0,n=A+4|0,c[A>>2]=36160,c[q>>2]=36180,g=0,ga(62,A+56|0,n|0),t=g,g=0,t&1&&(A=J()|0,sa(q),V(A|0)),c[A+128>>2]=0,c[A+132>>2]=-1,c[A>>2]=36200,c[A+56>>2]=36220,g=0,ta(180,n|0),t=g,g=0,t&1?h=J()|0:(c[n>>2]=36236,e=A+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[A+52>>2]=16,c[w>>2]=0,c[w+4>>2]=0,g=c[w+8>>2]=0,ga(63,n|0,w|0),t=g,g=0,t&1?(h=J()|
0,W(w),W(e),ya(n)):(W(w),g=0,h=La(28,A|0,49029,57)|0,w=g,g=0,w&1||(g=0,ma(36,h|0,0)|0,w=g,g=0,w&1)||(m=xa(16)|0,g=0,ga(64,D|0,n|0),w=g,g=0,w&1?h=J()|0:(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,m|0,3,35648,D|0),w=g,g=0,w&1?k=1:(g=0,na(6,m|0,824,96),k=g=0),h=J()|0,W(D),k||(D=h,c[A>>2]=36200,c[q>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(q),V(D|0))),za(m|0),D=h,c[A>>2]=36200,c[q>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(q),V(D|0)),D=J()|0,c[A>>2]=36200,c[q>>2]=36220,c[n>>2]=36236,W(e),
ya(n),sa(q),V(D|0))),A=h,sa(q),V(A|0))}while(0);k=a+20|0;536870912==(c[h+28>>2]|0)&&x(c[k>>2]|0,ia(r,c[h+16>>2]|0)|0);A=c[k>>2]|0;z(a,A,b,d,f);F=t}else e=a+52|0,z(a,c[e>>2]|0,b,d,f),c[e>>2]=(c[e>>2]|0)+(c[(c[a+4>>2]|0)+12>>2]|0)},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var e=0,h=0,k=0,m=0,n=0,e=a+48|0;c[e>>2]|0?(n=a+4|0,h=d<<1,k=ia(h,c[(c[n>>2]|0)+16>>2]|0)|0,m=a+20|0,L(a,b,c[m>>2]|0,d,f),b=c[n>>2]|0,536870912==(c[b+28>>2]|0)&&x(c[m>>2]|0,ia(h,c[b+16>>2]|0)|0),n=c[e>>2]|0,(cb[c[(c[n>>2]|0)+48>>2]&63](n,
c[m>>2]|0,k)|0)!=(k|0)&&(b=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,b|0,3,35648),n=g,g=0,n&1?(n=J()|0,za(b|0),V(n|0)):Pa(b|0,824,96))):(m=a+52|0,L(a,b,c[m>>2]|0,d,f),c[m>>2]=(c[m>>2]|0)+(c[(c[a+4>>2]|0)+12>>2]|0))},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var e=0;if(e=c[a+48>>2]|0){a|=0;e|=0;b|=0;d|=0;f|=0;var h=0,k=0,m=0,n=0,q=0,r=0,t=0,w=0,D=0,A=0,t=F;F=F+176|0;w=t+152|0;A=t+16|0;D=t;n=a+4|0;h=c[n>>2]|0;r=d<<1;k=ia(r,c[h+16>>2]|0)|0;do if(k){for(m=a+20|0;;){h=cb[c[(c[e>>
2]|0)+32>>2]&63](e,c[m>>2]|0,k)|0;if(!h)break;if((k|0)==(h|0)){q=26;break}else k=k-h|0}26==(q|0)?h=c[n>>2]|0:(q=A+56|0,n=A+4|0,c[A>>2]=36160,c[q>>2]=36180,g=0,ga(62,A+56|0,n|0),t=g,g=0,t&1&&(A=J()|0,sa(q),V(A|0)),c[A+128>>2]=0,c[A+132>>2]=-1,c[A>>2]=36200,c[A+56>>2]=36220,g=0,ta(180,n|0),t=g,g=0,t&1?h=J()|0:(c[n>>2]=36236,e=A+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[A+52>>2]=16,c[w>>2]=0,c[w+4>>2]=0,g=c[w+8>>2]=0,ga(63,n|0,w|0),t=g,g=0,t&1?(h=J()|0,W(w),W(e),ya(n)):(W(w),g=0,h=La(28,
A|0,49029,57)|0,w=g,g=0,w&1||(g=0,ma(36,h|0,0)|0,w=g,g=0,w&1)||(m=xa(16)|0,g=0,ga(64,D|0,n|0),w=g,g=0,w&1?h=J()|0:(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,m|0,3,35648,D|0),w=g,g=0,w&1?k=1:(g=0,na(6,m|0,824,96),k=g=0),h=J()|0,W(D),k||(D=h,c[A>>2]=36200,c[q>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(q),V(D|0))),za(m|0),D=h,c[A>>2]=36200,c[q>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(q),V(D|0)),D=J()|0,c[A>>2]=36200,c[q>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(q),V(D|0))),A=h,sa(q),V(A|0))}while(0);
k=a+20|0;536870912==(c[h+28>>2]|0)&&x(c[k>>2]|0,ia(r,c[h+16>>2]|0)|0);A=c[k>>2]|0;E(a,A,b,d,f);F=t}else e=a+52|0,E(a,c[e>>2]|0,b,d,f),c[e>>2]=(c[e>>2]|0)+(c[(c[a+4>>2]|0)+12>>2]|0)},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var e=0,h=0,k=0,m=0,n=0,e=a+36|0;c[e>>2]|0?(n=a+4|0,h=d<<1,k=ia(h,c[(c[n>>2]|0)+16>>2]|0)|0,m=a+20|0,O(a,b,c[m>>2]|0,d,f),b=c[n>>2]|0,536870912==(c[b+28>>2]|0)&&x(c[m>>2]|0,ia(h,c[b+16>>2]|0)|0),n=c[e>>2]|0,(cb[c[(c[n>>2]|0)+48>>2]&63](n,c[m>>2]|0,k)|0)!=(k|0)&&(b=xa(16)|0,0==(u[8]|
0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,b|0,3,35648),n=g,g=0,n&1?(n=J()|0,za(b|0),V(n|0)):Pa(b|0,824,96))):(m=a+40|0,O(a,b,c[m>>2]|0,d,f),c[m>>2]=(c[m>>2]|0)+(c[(c[a+4>>2]|0)+12>>2]|0))},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var e=0;if(e=c[a+36>>2]|0){a|=0;e|=0;b|=0;d|=0;f|=0;var h=0,k=0,m=0,n=0,q=0,r=0,t=0,w=0,D=0,A=0,t=F;F=F+176|0;w=t+152|0;A=t+16|0;D=t;n=a+4|0;h=c[n>>2]|0;r=d<<1;k=ia(r,c[h+16>>2]|0)|0;do if(k){for(m=a+20|0;;){h=cb[c[(c[e>>2]|0)+32>>2]&63](e,c[m>>2]|0,k)|0;if(!h)break;
if((k|0)==(h|0)){q=26;break}else k=k-h|0}26==(q|0)?h=c[n>>2]|0:(q=A+56|0,n=A+4|0,c[A>>2]=36160,c[q>>2]=36180,g=0,ga(62,A+56|0,n|0),t=g,g=0,t&1&&(A=J()|0,sa(q),V(A|0)),c[A+128>>2]=0,c[A+132>>2]=-1,c[A>>2]=36200,c[A+56>>2]=36220,g=0,ta(180,n|0),t=g,g=0,t&1?h=J()|0:(c[n>>2]=36236,e=A+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[A+52>>2]=16,c[w>>2]=0,c[w+4>>2]=0,g=c[w+8>>2]=0,ga(63,n|0,w|0),t=g,g=0,t&1?(h=J()|0,W(w),W(e),ya(n)):(W(w),g=0,h=La(28,A|0,49029,57)|0,w=g,g=0,w&1||(g=0,ma(36,h|0,0)|
0,w=g,g=0,w&1)||(m=xa(16)|0,g=0,ga(64,D|0,n|0),w=g,g=0,w&1?h=J()|0:(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,m|0,3,35648,D|0),w=g,g=0,w&1?k=1:(g=0,na(6,m|0,824,96),k=g=0),h=J()|0,W(D),k||(D=h,c[A>>2]=36200,c[q>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(q),V(D|0))),za(m|0),D=h,c[A>>2]=36200,c[q>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(q),V(D|0)),D=J()|0,c[A>>2]=36200,c[q>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(q),V(D|0))),A=h,sa(q),V(A|0))}while(0);k=a+20|0;536870912==(c[h+28>>2]|0)&&
x(c[k>>2]|0,ia(r,c[h+16>>2]|0)|0);A=c[k>>2]|0;M(a,A,b,d,f);F=t}else e=a+40|0,M(a,c[e>>2]|0,b,d,f),c[e>>2]=(c[e>>2]|0)+(c[(c[a+4>>2]|0)+12>>2]|0)},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var e=0,h=0,k=0,m=0,n=0,e=a+36|0;c[e>>2]|0?(n=a+4|0,h=d<<1,k=ia(h,c[(c[n>>2]|0)+16>>2]|0)|0,m=a+20|0,D(a,b,c[m>>2]|0,d,f),b=c[n>>2]|0,536870912==(c[b+28>>2]|0)&&x(c[m>>2]|0,ia(h,c[b+16>>2]|0)|0),n=c[e>>2]|0,(cb[c[(c[n>>2]|0)+48>>2]&63](n,c[m>>2]|0,k)|0)!=(k|0)&&(b=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|
0)|0,Ca(8)),g=0,na(7,b|0,3,35648),n=g,g=0,n&1?(n=J()|0,za(b|0),V(n|0)):Pa(b|0,824,96))):(m=a+40|0,D(a,b,c[m>>2]|0,d,f),c[m>>2]=(c[m>>2]|0)+(c[(c[a+4>>2]|0)+12>>2]|0))},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var e=0;if(e=c[a+36>>2]|0){a|=0;e|=0;b|=0;d|=0;f|=0;var h=0,k=0,m=0,n=0,q=0,r=0,t=0,w=0,D=0,A=0,t=F;F=F+176|0;w=t+152|0;A=t+16|0;D=t;n=a+4|0;h=c[n>>2]|0;r=d<<1;k=ia(r,c[h+16>>2]|0)|0;do if(k){for(m=a+20|0;;){h=cb[c[(c[e>>2]|0)+32>>2]&63](e,c[m>>2]|0,k)|0;if(!h)break;if((k|0)==(h|0)){q=26;break}else k=
k-h|0}26==(q|0)?h=c[n>>2]|0:(q=A+56|0,n=A+4|0,c[A>>2]=36160,c[q>>2]=36180,g=0,ga(62,A+56|0,n|0),t=g,g=0,t&1&&(A=J()|0,sa(q),V(A|0)),c[A+128>>2]=0,c[A+132>>2]=-1,c[A>>2]=36200,c[A+56>>2]=36220,g=0,ta(180,n|0),t=g,g=0,t&1?h=J()|0:(c[n>>2]=36236,e=A+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[A+52>>2]=16,c[w>>2]=0,c[w+4>>2]=0,g=c[w+8>>2]=0,ga(63,n|0,w|0),t=g,g=0,t&1?(h=J()|0,W(w),W(e),ya(n)):(W(w),g=0,h=La(28,A|0,49029,57)|0,w=g,g=0,w&1||(g=0,ma(36,h|0,0)|0,w=g,g=0,w&1)||(m=xa(16)|0,g=0,ga(64,
D|0,n|0),w=g,g=0,w&1?h=J()|0:(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,m|0,3,35648,D|0),w=g,g=0,w&1?k=1:(g=0,na(6,m|0,824,96),k=g=0),h=J()|0,W(D),k||(D=h,c[A>>2]=36200,c[q>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(q),V(D|0))),za(m|0),D=h,c[A>>2]=36200,c[q>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(q),V(D|0)),D=J()|0,c[A>>2]=36200,c[q>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(q),V(D|0))),A=h,sa(q),V(A|0))}while(0);k=a+20|0;536870912==(c[h+28>>2]|0)&&x(c[k>>2]|0,ia(r,c[h+16>>2]|0)|0);A=c[k>>
2]|0;B(a,A,b,d,f);F=t}else e=a+40|0,B(a,c[e>>2]|0,b,d,f),c[e>>2]=(c[e>>2]|0)+(c[(c[a+4>>2]|0)+12>>2]|0)},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var e=0,h=0,k=0,m=0,n=0,e=a+36|0;c[e>>2]|0?(n=a+4|0,h=d<<1,k=ia(h,c[(c[n>>2]|0)+16>>2]|0)|0,m=a+20|0,w(a,b,c[m>>2]|0,d,f),b=c[n>>2]|0,536870912==(c[b+28>>2]|0)&&x(c[m>>2]|0,ia(h,c[b+16>>2]|0)|0),n=c[e>>2]|0,(cb[c[(c[n>>2]|0)+48>>2]&63](n,c[m>>2]|0,k)|0)!=(k|0)&&(b=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,b|0,3,35648),n=g,g=0,
n&1?(n=J()|0,za(b|0),V(n|0)):Pa(b|0,824,96))):(m=a+40|0,w(a,b,c[m>>2]|0,d,f),c[m>>2]=(c[m>>2]|0)+(c[(c[a+4>>2]|0)+12>>2]|0))},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var e=0;if(e=c[a+36>>2]|0){a|=0;e|=0;b|=0;d|=0;f|=0;var h=0,k=0,m=0,n=0,q=0,r=0,t=0,w=0,D=0,A=0,t=F;F=F+176|0;w=t+152|0;A=t+16|0;D=t;n=a+4|0;h=c[n>>2]|0;r=d<<1;k=ia(r,c[h+16>>2]|0)|0;do if(k){for(m=a+20|0;;){h=cb[c[(c[e>>2]|0)+32>>2]&63](e,c[m>>2]|0,k)|0;if(!h)break;if((k|0)==(h|0)){q=26;break}else k=k-h|0}26==(q|0)?h=c[n>>2]|0:(q=A+56|
0,n=A+4|0,c[A>>2]=36160,c[q>>2]=36180,g=0,ga(62,A+56|0,n|0),t=g,g=0,t&1&&(A=J()|0,sa(q),V(A|0)),c[A+128>>2]=0,c[A+132>>2]=-1,c[A>>2]=36200,c[A+56>>2]=36220,g=0,ta(180,n|0),t=g,g=0,t&1?h=J()|0:(c[n>>2]=36236,e=A+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[A+52>>2]=16,c[w>>2]=0,c[w+4>>2]=0,g=c[w+8>>2]=0,ga(63,n|0,w|0),t=g,g=0,t&1?(h=J()|0,W(w),W(e),ya(n)):(W(w),g=0,h=La(28,A|0,49029,57)|0,w=g,g=0,w&1||(g=0,ma(36,h|0,0)|0,w=g,g=0,w&1)||(m=xa(16)|0,g=0,ga(64,D|0,n|0),w=g,g=0,w&1?h=J()|0:(0==
(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,m|0,3,35648,D|0),w=g,g=0,w&1?k=1:(g=0,na(6,m|0,824,96),k=g=0),h=J()|0,W(D),k||(D=h,c[A>>2]=36200,c[q>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(q),V(D|0))),za(m|0),D=h,c[A>>2]=36200,c[q>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(q),V(D|0)),D=J()|0,c[A>>2]=36200,c[q>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(q),V(D|0))),A=h,sa(q),V(A|0))}while(0);k=a+20|0;536870912==(c[h+28>>2]|0)&&x(c[k>>2]|0,ia(r,c[h+16>>2]|0)|0);A=c[k>>2]|0;G(a,A,b,d,f);F=t}else e=
a+40|0,G(a,c[e>>2]|0,b,d,f),c[e>>2]=(c[e>>2]|0)+(c[(c[a+4>>2]|0)+12>>2]|0)},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var e=0,h=0,k=0,m=0,n=0,e=a+36|0;c[e>>2]|0?(n=a+4|0,h=d<<1,k=ia(h,c[(c[n>>2]|0)+16>>2]|0)|0,m=a+20|0,P(a,b,c[m>>2]|0,d,f),b=c[n>>2]|0,536870912==(c[b+28>>2]|0)&&x(c[m>>2]|0,ia(h,c[b+16>>2]|0)|0),n=c[e>>2]|0,(cb[c[(c[n>>2]|0)+48>>2]&63](n,c[m>>2]|0,k)|0)!=(k|0)&&(b=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,b|0,3,35648),n=g,g=0,n&1?(n=J()|0,za(b|0),V(n|0)):
Pa(b|0,824,96))):(m=a+40|0,P(a,b,c[m>>2]|0,d,f),c[m>>2]=(c[m>>2]|0)+(c[(c[a+4>>2]|0)+12>>2]|0))},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var e=0;if(e=c[a+36>>2]|0){a|=0;e|=0;b|=0;d|=0;f|=0;var h=0,k=0,m=0,n=0,q=0,r=0,t=0,w=0,A=0,D=0,t=F;F=F+176|0;w=t+152|0;D=t+16|0;A=t;n=a+4|0;h=c[n>>2]|0;r=d<<1;k=ia(r,c[h+16>>2]|0)|0;do if(k){for(m=a+20|0;;){h=cb[c[(c[e>>2]|0)+32>>2]&63](e,c[m>>2]|0,k)|0;if(!h)break;if((k|0)==(h|0)){q=26;break}else k=k-h|0}26==(q|0)?h=c[n>>2]|0:(q=D+56|0,n=D+4|0,c[D>>2]=36160,c[q>>
2]=36180,g=0,ga(62,D+56|0,n|0),t=g,g=0,t&1&&(D=J()|0,sa(q),V(D|0)),c[D+128>>2]=0,c[D+132>>2]=-1,c[D>>2]=36200,c[D+56>>2]=36220,g=0,ta(180,n|0),t=g,g=0,t&1?h=J()|0:(c[n>>2]=36236,e=D+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[D+52>>2]=16,c[w>>2]=0,c[w+4>>2]=0,g=c[w+8>>2]=0,ga(63,n|0,w|0),t=g,g=0,t&1?(h=J()|0,W(w),W(e),ya(n)):(W(w),g=0,h=La(28,D|0,49029,57)|0,w=g,g=0,w&1||(g=0,ma(36,h|0,0)|0,w=g,g=0,w&1)||(m=xa(16)|0,g=0,ga(64,A|0,n|0),w=g,g=0,w&1?h=J()|0:(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,
35648,Ga|0)|0,Ca(8)),g=0,pa(36,m|0,3,35648,A|0),w=g,g=0,w&1?k=1:(g=0,na(6,m|0,824,96),k=g=0),h=J()|0,W(A),k||(A=h,c[D>>2]=36200,c[q>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(q),V(A|0))),za(m|0),A=h,c[D>>2]=36200,c[q>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(q),V(A|0)),A=J()|0,c[D>>2]=36200,c[q>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(q),V(A|0))),D=h,sa(q),V(D|0))}while(0);k=a+20|0;536870912==(c[h+28>>2]|0)&&x(c[k>>2]|0,ia(r,c[h+16>>2]|0)|0);D=c[k>>2]|0;Y(a,D,b,d,f);F=t}else e=a+40|0,Y(a,c[e>>2]|0,b,d,f),c[e>>
2]=(c[e>>2]|0)+(c[(c[a+4>>2]|0)+12>>2]|0)},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var e=0,h=0,k=0,e=a+36|0;c[e>>2]|0?(h=ia(c[(c[a+4>>2]|0)+16>>2]|0,d)|0,k=a+20|0,lb(a,b,c[k>>2]|0,d,f),a=c[e>>2]|0,(cb[c[(c[a>>2]|0)+48>>2]&63](a,c[k>>2]|0,h)|0)!=(h|0)&&(e=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,e|0,3,35648),k=g,g=0,k&1?(k=J()|0,za(e|0),V(k|0)):Pa(e|0,824,96))):(e=a+40|0,lb(a,b,c[e>>2]|0,d,f),c[e>>2]=(c[e>>2]|0)+(c[(c[a+4>>2]|0)+12>>2]|0))},function(a,b,d,f){a|=0;b|=0;
d|=0;f|=0;var e=0;if(e=c[a+36>>2]|0){a|=0;e|=0;b|=0;d|=0;f|=0;var h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,w=0,r=F;F=F+176|0;x=r+152|0;w=r+16|0;t=r;k=ia(c[(c[a+4>>2]|0)+16>>2]|0,d)|0;n=a+20|0;h=c[n>>2]|0;if(k){for(;;){m=cb[c[(c[e>>2]|0)+32>>2]&63](e,h,k)|0;if(!m)break;h=c[n>>2]|0;if((k|0)==(m|0)){q=26;break}else k=k-m|0}26==(q|0)?(Ra(a,h,b,d,f),F=r):(b=w+56|0,n=w+4|0,c[w>>2]=36160,c[b>>2]=36180,g=0,ga(62,w+56|0,n|0),r=g,g=0,r&1&&(w=J()|0,sa(b),V(w|0)),c[w+128>>2]=0,c[w+132>>2]=-1,c[w>>2]=36200,c[w+56>>2]=
36220,g=0,ta(180,n|0),r=g,g=0,r&1?h=J()|0:(c[n>>2]=36236,e=w+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[w+52>>2]=16,c[x>>2]=0,c[x+4>>2]=0,g=c[x+8>>2]=0,ga(63,n|0,x|0),r=g,g=0,r&1?(h=J()|0,W(x),W(e),ya(n)):(W(x),g=0,h=La(28,w|0,49029,57)|0,x=g,g=0,x&1||(g=0,ma(36,h|0,0)|0,x=g,g=0,x&1)||(m=xa(16)|0,g=0,ga(64,t|0,n|0),x=g,g=0,x&1?h=J()|0:(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,m|0,3,35648,t|0),x=g,g=0,x&1?k=1:(g=0,na(6,m|0,824,96),k=g=0),h=J()|0,W(t),k||(t=h,c[w>>
2]=36200,c[b>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(b),V(t|0))),za(m|0),t=h,c[w>>2]=36200,c[b>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(b),V(t|0)),t=J()|0,c[w>>2]=36200,c[b>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(b),V(t|0))),w=h,sa(b),V(w|0))}else Ra(a,h,b,d,f),F=r}else e=a+40|0,Ra(a,c[e>>2]|0,b,d,f),c[e>>2]=(c[e>>2]|0)+(c[(c[a+4>>2]|0)+12>>2]|0)},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var e=0,h=0,k=0,e=a+36|0;c[e>>2]|0?(h=ia(c[(c[a+4>>2]|0)+16>>2]|0,d)|0,k=a+20|0,nb(a,b,c[k>>2]|0,d,f),a=c[e>>2]|0,(cb[c[(c[a>>
2]|0)+48>>2]&63](a,c[k>>2]|0,h)|0)!=(h|0)&&(e=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,e|0,3,35648),k=g,g=0,k&1?(k=J()|0,za(e|0),V(k|0)):Pa(e|0,824,96))):(e=a+40|0,nb(a,b,c[e>>2]|0,d,f),c[e>>2]=(c[e>>2]|0)+(c[(c[a+4>>2]|0)+12>>2]|0))},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var e=0;if(e=c[a+36>>2]|0){a|=0;e|=0;b|=0;d|=0;f|=0;var h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,w=0,r=F;F=F+176|0;x=r+152|0;w=r+16|0;t=r;k=ia(c[(c[a+4>>2]|0)+16>>2]|0,d)|0;n=a+20|0;h=c[n>>2]|0;if(k){for(;;){m=
cb[c[(c[e>>2]|0)+32>>2]&63](e,h,k)|0;if(!m)break;h=c[n>>2]|0;if((k|0)==(m|0)){q=26;break}else k=k-m|0}26==(q|0)?(ab(a,h,b,d,f),F=r):(b=w+56|0,n=w+4|0,c[w>>2]=36160,c[b>>2]=36180,g=0,ga(62,w+56|0,n|0),r=g,g=0,r&1&&(w=J()|0,sa(b),V(w|0)),c[w+128>>2]=0,c[w+132>>2]=-1,c[w>>2]=36200,c[w+56>>2]=36220,g=0,ta(180,n|0),r=g,g=0,r&1?h=J()|0:(c[n>>2]=36236,e=w+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[w+52>>2]=16,c[x>>2]=0,c[x+4>>2]=0,g=c[x+8>>2]=0,ga(63,n|0,x|0),r=g,g=0,r&1?(h=J()|0,W(x),W(e),ya(n)):
(W(x),g=0,h=La(28,w|0,49029,57)|0,x=g,g=0,x&1||(g=0,ma(36,h|0,0)|0,x=g,g=0,x&1)||(m=xa(16)|0,g=0,ga(64,t|0,n|0),x=g,g=0,x&1?h=J()|0:(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,m|0,3,35648,t|0),x=g,g=0,x&1?k=1:(g=0,na(6,m|0,824,96),k=g=0),h=J()|0,W(t),k||(t=h,c[w>>2]=36200,c[b>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(b),V(t|0))),za(m|0),t=h,c[w>>2]=36200,c[b>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(b),V(t|0)),t=J()|0,c[w>>2]=36200,c[b>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(b),V(t|0))),
w=h,sa(b),V(w|0))}else ab(a,h,b,d,f),F=r}else e=a+40|0,ab(a,c[e>>2]|0,b,d,f),c[e>>2]=(c[e>>2]|0)+(c[(c[a+4>>2]|0)+12>>2]|0)},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var e=0,h=0,k=0,e=a+36|0;c[e>>2]|0?(h=ia(c[(c[a+4>>2]|0)+16>>2]|0,d)|0,k=a+20|0,ra(a,b,c[k>>2]|0,d,f),a=c[e>>2]|0,(cb[c[(c[a>>2]|0)+48>>2]&63](a,c[k>>2]|0,h)|0)!=(h|0)&&(e=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,e|0,3,35648),k=g,g=0,k&1?(k=J()|0,za(e|0),V(k|0)):Pa(e|0,824,96))):(e=a+40|0,ra(a,b,c[e>>2]|0,
d,f),c[e>>2]=(c[e>>2]|0)+(c[(c[a+4>>2]|0)+12>>2]|0))},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var e=0;if(e=c[a+36>>2]|0){a|=0;e|=0;b|=0;d|=0;f|=0;var h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,w=0,r=F;F=F+176|0;x=r+152|0;w=r+16|0;t=r;k=ia(c[(c[a+4>>2]|0)+16>>2]|0,d)|0;n=a+20|0;h=c[n>>2]|0;if(k){for(;;){m=cb[c[(c[e>>2]|0)+32>>2]&63](e,h,k)|0;if(!m)break;h=c[n>>2]|0;if((k|0)==(m|0)){q=26;break}else k=k-m|0}26==(q|0)?(dc(a,h,b,d,f),F=r):(b=w+56|0,n=w+4|0,c[w>>2]=36160,c[b>>2]=36180,g=0,ga(62,w+56|0,n|0),r=g,g=0,
r&1&&(w=J()|0,sa(b),V(w|0)),c[w+128>>2]=0,c[w+132>>2]=-1,c[w>>2]=36200,c[w+56>>2]=36220,g=0,ta(180,n|0),r=g,g=0,r&1?h=J()|0:(c[n>>2]=36236,e=w+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[w+52>>2]=16,c[x>>2]=0,c[x+4>>2]=0,g=c[x+8>>2]=0,ga(63,n|0,x|0),r=g,g=0,r&1?(h=J()|0,W(x),W(e),ya(n)):(W(x),g=0,h=La(28,w|0,49029,57)|0,x=g,g=0,x&1||(g=0,ma(36,h|0,0)|0,x=g,g=0,x&1)||(m=xa(16)|0,g=0,ga(64,t|0,n|0),x=g,g=0,x&1?h=J()|0:(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,m|0,3,
35648,t|0),x=g,g=0,x&1?k=1:(g=0,na(6,m|0,824,96),k=g=0),h=J()|0,W(t),k||(t=h,c[w>>2]=36200,c[b>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(b),V(t|0))),za(m|0),t=h,c[w>>2]=36200,c[b>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(b),V(t|0)),t=J()|0,c[w>>2]=36200,c[b>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(b),V(t|0))),w=h,sa(b),V(w|0))}else dc(a,h,b,d,f),F=r}else e=a+40|0,dc(a,c[e>>2]|0,b,d,f),c[e>>2]=(c[e>>2]|0)+(c[(c[a+4>>2]|0)+12>>2]|0)},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var e=0,h=0,k=0,e=a+36|0;c[e>>2]|0?(h=
ia(c[(c[a+4>>2]|0)+16>>2]|0,d)|0,k=a+20|0,gc(a,b,c[k>>2]|0,d,f),a=c[e>>2]|0,(cb[c[(c[a>>2]|0)+48>>2]&63](a,c[k>>2]|0,h)|0)!=(h|0)&&(e=xa(16)|0,0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,na(7,e|0,3,35648),k=g,g=0,k&1?(k=J()|0,za(e|0),V(k|0)):Pa(e|0,824,96))):(e=a+40|0,gc(a,b,c[e>>2]|0,d,f),c[e>>2]=(c[e>>2]|0)+(c[(c[a+4>>2]|0)+12>>2]|0))},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var e=0;if(e=c[a+36>>2]|0){a|=0;e|=0;b|=0;d|=0;f|=0;var h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,w=0,r=F;F=F+176|0;x=
r+152|0;w=r+16|0;t=r;k=ia(c[(c[a+4>>2]|0)+16>>2]|0,d)|0;n=a+20|0;h=c[n>>2]|0;if(k){for(;;){m=cb[c[(c[e>>2]|0)+32>>2]&63](e,h,k)|0;if(!m)break;h=c[n>>2]|0;if((k|0)==(m|0)){q=26;break}else k=k-m|0}26==(q|0)?(cc(a,h,b,d,f),F=r):(b=w+56|0,n=w+4|0,c[w>>2]=36160,c[b>>2]=36180,g=0,ga(62,w+56|0,n|0),r=g,g=0,r&1&&(w=J()|0,sa(b),V(w|0)),c[w+128>>2]=0,c[w+132>>2]=-1,c[w>>2]=36200,c[w+56>>2]=36220,g=0,ta(180,n|0),r=g,g=0,r&1?h=J()|0:(c[n>>2]=36236,e=w+36|0,c[e>>2]=0,c[e+4>>2]=0,c[e+8>>2]=0,c[e+12>>2]=0,c[w+52>>
2]=16,c[x>>2]=0,c[x+4>>2]=0,g=c[x+8>>2]=0,ga(63,n|0,x|0),r=g,g=0,r&1?(h=J()|0,W(x),W(e),ya(n)):(W(x),g=0,h=La(28,w|0,49029,57)|0,x=g,g=0,x&1||(g=0,ma(36,h|0,0)|0,x=g,g=0,x&1)||(m=xa(16)|0,g=0,ga(64,t|0,n|0),x=g,g=0,x&1?h=J()|0:(0==(u[8]|0)&&0!=(Da(8)|0)&&(Ea(72,35648,Ga|0)|0,Ca(8)),g=0,pa(36,m|0,3,35648,t|0),x=g,g=0,x&1?k=1:(g=0,na(6,m|0,824,96),k=g=0),h=J()|0,W(t),k||(t=h,c[w>>2]=36200,c[b>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(b),V(t|0))),za(m|0),t=h,c[w>>2]=36200,c[b>>2]=36220,c[n>>2]=36236,W(e),
ya(n),sa(b),V(t|0)),t=J()|0,c[w>>2]=36200,c[b>>2]=36220,c[n>>2]=36236,W(e),ya(n),sa(b),V(t|0))),w=h,sa(b),V(w|0))}else cc(a,h,b,d,f),F=r}else e=a+40|0,cc(a,c[e>>2]|0,b,d,f),c[e>>2]=(c[e>>2]|0)+(c[(c[a+4>>2]|0)+12>>2]|0)},function(a,b,d,f){b|=0;(a|0)==(c[b+8>>2]|0)&&mg(0,b,d|0,f|0)},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;(a|0)==(c[b+8>>2]|0)?mg(0,b,d,f):(a=c[a+8>>2]|0,Bf[c[(c[a>>2]|0)+28>>2]&63](a,b,d,f))},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var g=0,e=0;a:do if((a|0)!=(c[b+8>>2]|0)){if(e=c[a+12>>
2]|0,g=a+16+(e<<3)|0,jh(a+16|0,b,d,f),1<(e|0)){e=b+54|0;a=a+24|0;do{jh(a,b,d,f);if(u[e>>0]|0)break a;a=a+8|0}while(a>>>0<g>>>0)}}else mg(0,b,d,f);while(0)},function(a,b,d,f){b=a|=0;c[b>>2]=0;c[b+4>>2]=0;b=a+8|0;c[b>>2]=-1;c[b+4>>2]=-1},function(a,b,d,f){b=a|=0;c[b>>2]=0;c[b+4>>2]=0;b=a+8|0;c[b>>2]=-1;c[b+4>>2]=-1},function(a,b,d,f){a|=0;d|=0;f|=0;a|=0;d|=0;f|=0;var g=b=0,e=0,h=0,g=d;b=f-g|0;4294967279<b>>>0&&jd(a);11>b>>>0?(u[a>>0]=b<<1,e=a+1|0):(h=b+16&-16,e=qa(h)|0,c[a+8>>2]=e,c[a>>2]=h|1,c[a+4>>
2]=b);if((d|0)!=(f|0))for(b=e;u[b>>0]=u[d>>0]|0,d=d+1|0,(d|0)!=(f|0);)b=b+1|0;u[e+(f-g|0)>>0]=0},function(a,b,d,f){a|=0;d|=0;f|=0;a|=0;d|=0;f|=0;var g=b=0,e=0,h=0,e=d;b=f-e|0;g=b>>2;1073741807<g>>>0&&jd(a);2>g>>>0?(u[a>>0]=b>>>1,a=a+4|0):(h=g+4&-4,b=qa(h<<2)|0,c[a+8>>2]=b,c[a>>2]=h|1,c[a+4>>2]=g,a=b);if((d|0)!=(f|0))for(b=a;c[b>>2]=c[d>>2],d=d+4|0,(d|0)!=(f|0);)b=b+4|0;c[a+((f-e|0)>>>2<<2)>>2]=0},function(a,b,d,f){d|=0;f|=0;var e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,u=0,t=0,w=0,D=0,A=0,q=F;F=F+112|0;h=q+
96|0;n=q+84|0;r=q+72|0;x=q+60|0;u=q+48|0;t=q+36|0;w=q+24|0;D=q+12|0;A=q;m=0==(b|0);0==(a|0)&m&&(e=xa(16)|0,g=0,na(5,h|0,48504,52),A=g,g=0,A&1?b=J()|0:(g=0,b=Va(1)|0,A=g,g=0,A&1||(g=0,pa(36,e|0,1,b|0,h|0),A=g,g=0,A&1)?a=1:(g=0,na(6,e|0,824,96),a=g=0),b=J()|0,W(h),a||(A=b,V(A|0))),za(e|0),A=b,V(A|0));k=c[f>>2]|0;65534<(k+-1|0)>>>0&&(e=xa(16)|0,g=0,na(5,n|0,48557,41),A=g,g=0,A&1?b=J()|0:(g=0,b=Va(1)|0,A=g,g=0,A&1||(g=0,pa(36,e|0,1,b|0,n|0),A=g,g=0,A&1)?a=1:(g=0,na(6,e|0,824,96),a=g=0),b=J()|0,W(n),a||
(A=b,V(A|0))),za(e|0),A=b,V(A|0));h=c[f+4>>2]|0;65534<(h+-1|0)>>>0&&(e=xa(16)|0,g=0,na(5,r|0,48599,42),A=g,g=0,A&1?b=J()|0:(g=0,b=Va(1)|0,A=g,g=0,A&1||(g=0,pa(36,e|0,1,b|0,r|0),A=g,g=0,A&1)?a=1:(g=0,na(6,e|0,824,96),a=g=0),b=J()|0,W(r),a||(A=b,V(A|0))),za(e|0),A=b,V(A|0));e=c[f+8>>2]|0;14<(e+-2|0)>>>0&&(e=xa(16)|0,g=0,na(5,x|0,48642,46),A=g,g=0,A&1?b=J()|0:(g=0,b=Va(1)|0,A=g,g=0,A&1||(g=0,pa(36,e|0,1,b|0,x|0),A=g,g=0,A&1)?a=1:(g=0,na(6,e|0,824,96),a=g=0),b=J()|0,W(x),a||(A=b,V(A|0))),za(e|0),A=b,
V(A|0));a=c[f+24>>2]|0;3<=a>>>0&&(e=xa(16)|0,g=0,na(5,u|0,48689,65),A=g,g=0,A&1?b=J()|0:(g=0,b=Va(1)|0,A=g,g=0,A&1||(g=0,pa(36,e|0,1,b|0,u|0),A=g,g=0,A&1)?a=1:(g=0,na(6,e|0,824,96),a=g=0),b=J()|0,W(u),a||(A=b,V(A|0))),za(e|0),A=b,V(A|0));b=c[f+16>>2]|0;254<(b+-1|0)>>>0&&(e=xa(16)|0,g=0,na(5,t|0,48755,44),A=g,g=0,A&1?b=J()|0:(g=0,b=Va(1)|0,A=g,g=0,A&1||(g=0,pa(36,e|0,1,b|0,t|0),A=g,g=0,A&1)?a=1:(g=0,na(6,e|0,824,96),a=g=0),b=J()|0,W(t),a||(A=b,V(A|0))),za(e|0),A=b,V(A|0));if(m?0:(t=ia(h,k)|0,(ia(ia(t,
8<(e|0)?2:1)|0,b)|0)>>>0>d>>>0))e=xa(16)|0,g=0,na(5,w|0,48800,58),A=g,g=0,A&1?b=J()|0:(g=0,b=Va(1)|0,A=g,g=0,A&1||(g=0,pa(36,e|0,1,b|0,w|0),A=g,g=0,A&1)?a=1:(g=0,na(6,e|0,824,96),a=g=0),b=J()|0,W(w),a||(A=b,V(A|0))),za(e|0),A=b,V(A|0);switch(b|0){case 4:if(2!=(a|0)){F=q;break}e=xa(16)|0;g=0;na(5,D|0,48859,73);A=g;g=0;A&1?b=J()|0:(g=0,b=Va(1)|0,A=g,g=0,A&1||(g=0,pa(36,e|0,1,b|0,D|0),A=g,g=0,A&1)?a=1:(g=0,na(6,e|0,824,96),a=g=0),b=J()|0,W(D),a||(A=b,V(A|0)));za(e|0);A=b;V(A|0);case 3:F=q;break;default:if(!a){F=
q;break}e=xa(16)|0;g=0;na(5,A|0,48933,73);D=g;g=0;D&1?b=J()|0:(g=0,b=Va(1)|0,D=g,g=0,D&1||(g=0,pa(36,e|0,1,b|0,A|0),D=g,g=0,D&1)?a=1:(g=0,na(6,e|0,824,96),a=g=0),b=J()|0,W(A),a||(A=b,V(A|0)));za(e|0);A=b;V(A|0)}},function(a,b,d,f){a|=0;b|=0;d|=0;var e=0,h=0,k=0,m=0,h=F;F=F+48|0;e=h+24|0;m=h+16|0;k=h;c[m>>2]=b;c[m+4>>2]=d;Id(k,f|0);g=0;na(10,e|0,m|0,k|0);f=g;g=0;if(f&1)e=J()|0;else if(g=0,ga(87,a|0,e|0),m=g,g=0,m&1)m=J()|0,W(e),e=m;else{W(e);W(k);c[a>>2]=42664;c[a+8>>2]=b;c[a+12>>2]=d;F=h;return}W(k);
V(e|0)},function(a,b,d,f){a|=0;b|=0;d|=0;var e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0;c[a>>2]=36460;c[a+4>>2]=d;x=a+8|0;h=c[d>>2]|0;q=d+16|0;f=c[q>>2]|0;k=ia(f,h)|0;c[x>>2]=0;t=a+12|0;c[t>>2]=0;c[a+16>>2]=0;if(k)if(0>(k|0)&&(g=0,ta(178,x|0),h=g,g=0,h&1)||(r=4),4!=(r|0)||(m=k<<1,g=0,n=ca(67,m|0)|0,h=g,g=0,h&1)){k=J()|0;if(f=e=c[x>>2]|0)h=c[t>>2]|0,(h|0)!=(e|0)&&(c[t>>2]=h+(~((h+-2-f|0)>>>1)<<1)),Q(e);t=k;V(t|0)}else c[x>>2]=n,h=n+(k<<1)|0,c[a+16>>2]=h,Za(n|0,0,m|0)|0,c[t>>2]=h,h=c[d>>2]|0,f=c[q>>2]|0;k=
a+20|0;f=ia(h<<1,f)|0;c[k>>2]=0;m=a+24|0;c[m>>2]=0;c[a+28>>2]=0;if(f)if(0>(f|0)&&(g=0,ta(178,k|0),d=g,g=0,d&1)||(r=13),13!=(r|0)||(g=0,e=ca(67,f|0)|0,r=g,g=0,r&1)){h=J()|0;if(e=c[k>>2]|0)(c[m>>2]|0)!=(e|0)&&(c[m>>2]=e),Q(e);e=c[x>>2]|0;e||(t=h,V(t|0));f=c[t>>2]|0;(f|0)!=(e|0)&&(c[t>>2]=f+(~((f+-2-e|0)>>>1)<<1));Q(e);V(h|0)}else{c[m>>2]=e;c[k>>2]=e;c[a+28>>2]=e+f;do u[e>>0]=0,e=(c[m>>2]|0)+1|0,c[m>>2]=e,f=f+-1|0;while(0!=(f|0));t=a+36|0;c[t>>2]=c[b>>2];c[t+4>>2]=c[b+4>>2];c[t+8>>2]=c[b+8>>2]}else t=
a+36|0,c[t>>2]=c[b>>2],c[t+4>>2]=c[b+4>>2],c[t+8>>2]=c[b+8>>2]},function(a,b,d,f){a|=0;b|=0;d|=0;var e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0;c[a>>2]=36436;c[a+4>>2]=d;x=a+8|0;h=c[d>>2]|0;q=d+16|0;f=c[q>>2]|0;k=ia(f,h)|0;c[x>>2]=0;t=a+12|0;c[t>>2]=0;c[a+16>>2]=0;if(k)if(0>(k|0)&&(g=0,ta(178,x|0),h=g,g=0,h&1)||(r=4),4!=(r|0)||(m=k<<1,g=0,n=ca(67,m|0)|0,h=g,g=0,h&1)){k=J()|0;if(f=e=c[x>>2]|0)h=c[t>>2]|0,(h|0)!=(e|0)&&(c[t>>2]=h+(~((h+-2-f|0)>>>1)<<1)),Q(e);t=k;V(t|0)}else c[x>>2]=n,h=n+(k<<1)|0,c[a+16>>
2]=h,Za(n|0,0,m|0)|0,c[t>>2]=h,h=c[d>>2]|0,f=c[q>>2]|0;k=a+20|0;f=ia(h<<1,f)|0;c[k>>2]=0;m=a+24|0;c[m>>2]=0;c[a+28>>2]=0;if(f)if(0>(f|0)&&(g=0,ta(178,k|0),d=g,g=0,d&1)||(r=13),13!=(r|0)||(g=0,e=ca(67,f|0)|0,r=g,g=0,r&1)){h=J()|0;if(e=c[k>>2]|0)(c[m>>2]|0)!=(e|0)&&(c[m>>2]=e),Q(e);e=c[x>>2]|0;e||(t=h,V(t|0));f=c[t>>2]|0;(f|0)!=(e|0)&&(c[t>>2]=f+(~((f+-2-e|0)>>>1)<<1));Q(e);V(h|0)}else{c[m>>2]=e;c[k>>2]=e;c[a+28>>2]=e+f;do u[e>>0]=0,e=(c[m>>2]|0)+1|0,c[m>>2]=e,f=f+-1|0;while(0!=(f|0));t=a+36|0;c[t>>
2]=c[b>>2];c[t+4>>2]=c[b+4>>2];c[t+8>>2]=c[b+8>>2]}else t=a+36|0,c[t>>2]=c[b>>2],c[t+4>>2]=c[b+4>>2],c[t+8>>2]=c[b+8>>2]},function(a,b,d,f){a|=0;b|=0;d|=0;var e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0;c[a>>2]=36412;c[a+4>>2]=d;x=a+8|0;h=c[d>>2]|0;q=d+16|0;f=c[q>>2]|0;k=ia(f,h)|0;c[x>>2]=0;t=a+12|0;c[t>>2]=0;c[a+16>>2]=0;if(k)if(0>(k|0)&&(g=0,ta(178,x|0),h=g,g=0,h&1)||(r=4),4!=(r|0)||(m=k<<1,g=0,n=ca(67,m|0)|0,h=g,g=0,h&1)){k=J()|0;if(f=e=c[x>>2]|0)h=c[t>>2]|0,(h|0)!=(e|0)&&(c[t>>2]=h+(~((h+-2-f|0)>>>1)<<
1)),Q(e);t=k;V(t|0)}else c[x>>2]=n,h=n+(k<<1)|0,c[a+16>>2]=h,Za(n|0,0,m|0)|0,c[t>>2]=h,h=c[d>>2]|0,f=c[q>>2]|0;k=a+20|0;f=ia(h<<1,f)|0;c[k>>2]=0;m=a+24|0;c[m>>2]=0;c[a+28>>2]=0;if(f)if(0>(f|0)&&(g=0,ta(178,k|0),d=g,g=0,d&1)||(r=13),13!=(r|0)||(g=0,e=ca(67,f|0)|0,r=g,g=0,r&1)){h=J()|0;if(e=c[k>>2]|0)(c[m>>2]|0)!=(e|0)&&(c[m>>2]=e),Q(e);e=c[x>>2]|0;e||(t=h,V(t|0));f=c[t>>2]|0;(f|0)!=(e|0)&&(c[t>>2]=f+(~((f+-2-e|0)>>>1)<<1));Q(e);V(h|0)}else{c[m>>2]=e;c[k>>2]=e;c[a+28>>2]=e+f;do u[e>>0]=0,e=(c[m>>2]|
0)+1|0,c[m>>2]=e,f=f+-1|0;while(0!=(f|0));t=a+36|0;c[t>>2]=c[b>>2];c[t+4>>2]=c[b+4>>2];c[t+8>>2]=c[b+8>>2]}else t=a+36|0,c[t>>2]=c[b>>2],c[t+4>>2]=c[b+4>>2],c[t+8>>2]=c[b+8>>2]},function(a,b,d,f){a|=0;b|=0;d|=0;var e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0;c[a>>2]=36388;c[a+4>>2]=d;x=a+8|0;h=c[d>>2]|0;q=d+16|0;f=c[q>>2]|0;k=ia(f,h)|0;c[x>>2]=0;t=a+12|0;c[t>>2]=0;c[a+16>>2]=0;if(k)if(0>(k|0)&&(g=0,ta(178,x|0),h=g,g=0,h&1)||(r=4),4!=(r|0)||(m=k<<1,g=0,n=ca(67,m|0)|0,h=g,g=0,h&1)){k=J()|0;if(f=e=c[x>>2]|0)h=
c[t>>2]|0,(h|0)!=(e|0)&&(c[t>>2]=h+(~((h+-2-f|0)>>>1)<<1)),Q(e);t=k;V(t|0)}else c[x>>2]=n,h=n+(k<<1)|0,c[a+16>>2]=h,Za(n|0,0,m|0)|0,c[t>>2]=h,h=c[d>>2]|0,f=c[q>>2]|0;k=a+20|0;f=ia(h<<1,f)|0;c[k>>2]=0;m=a+24|0;c[m>>2]=0;c[a+28>>2]=0;if(f)if(0>(f|0)&&(g=0,ta(178,k|0),d=g,g=0,d&1)||(r=13),13!=(r|0)||(g=0,e=ca(67,f|0)|0,r=g,g=0,r&1)){h=J()|0;if(e=c[k>>2]|0)(c[m>>2]|0)!=(e|0)&&(c[m>>2]=e),Q(e);e=c[x>>2]|0;e||(t=h,V(t|0));f=c[t>>2]|0;(f|0)!=(e|0)&&(c[t>>2]=f+(~((f+-2-e|0)>>>1)<<1));Q(e);V(h|0)}else{c[m>>
2]=e;c[k>>2]=e;c[a+28>>2]=e+f;do u[e>>0]=0,e=(c[m>>2]|0)+1|0,c[m>>2]=e,f=f+-1|0;while(0!=(f|0));t=a+36|0;c[t>>2]=c[b>>2];c[t+4>>2]=c[b+4>>2];c[t+8>>2]=c[b+8>>2]}else t=a+36|0,c[t>>2]=c[b>>2],c[t+4>>2]=c[b+4>>2],c[t+8>>2]=c[b+8>>2]},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,w=0;c[a>>2]=36364;c[a+4>>2]=d;t=a+8|0;k=c[d>>2]|0;r=d+16|0;h=c[r>>2]|0;q=ia(h,k)|0;c[t>>2]=0;w=a+12|0;c[w>>2]=0;c[a+16>>2]=0;if(q)if(0>(q|0)&&(g=0,ta(178,t|0),k=g,g=0,k&1)||(x=4),4!=(x|0)||(m=
q<<1,g=0,n=ca(67,m|0)|0,k=g,g=0,k&1)){m=J()|0;if(h=e=c[t>>2]|0)k=c[w>>2]|0,(k|0)!=(e|0)&&(c[w>>2]=k+(~((k+-2-h|0)>>>1)<<1)),Q(e);w=m;V(w|0)}else c[t>>2]=n,k=n+(q<<1)|0,c[a+16>>2]=k,Za(n|0,0,m|0)|0,c[w>>2]=k,k=c[d>>2]|0,h=c[r>>2]|0;m=a+20|0;h=ia(k<<1,h)|0;c[m>>2]=0;n=a+24|0;c[n>>2]=0;c[a+28>>2]=0;if(h)if(0>(h|0)&&(g=0,ta(178,m|0),r=g,g=0,r&1)||(x=13),13!=(x|0)||(g=0,e=ca(67,h|0)|0,x=g,g=0,x&1)){k=J()|0;if(e=c[m>>2]|0)(c[n>>2]|0)!=(e|0)&&(c[n>>2]=e),Q(e);e=c[t>>2]|0;e||(w=k,V(w|0));h=c[w>>2]|0;(h|0)!=
(e|0)&&(c[w>>2]=h+(~((h+-2-e|0)>>>1)<<1));Q(e);V(k|0)}else{c[n>>2]=e;c[m>>2]=e;c[a+28>>2]=e+h;do u[e>>0]=0,e=(c[n>>2]|0)+1|0,c[n>>2]=e,h=h+-1|0;while(0!=(h|0));w=a+32|0;t=c[f>>2]|0;f=c[(f+4|0)>>2]|0;x=w;c[x>>2]=t;w=w+4|0;c[w>>2]=f;c[(a+40|0)>>2]=t;w=a+48|0;c[w>>2]=c[b>>2];c[w+4>>2]=c[b+4>>2];c[w+8>>2]=c[b+8>>2]}else w=a+32|0,t=f,t=c[t>>2]|0,f=f+4|0,f=c[f>>2]|0,x=w,c[x>>2]=t,w=w+4|0,c[w>>2]=f,c[(a+40|0)>>2]=t,w=a+48|0,c[w>>2]=c[b>>2],c[w+4>>2]=c[b+4>>2],c[w+8>>2]=c[b+8>>2]},function(a,b,d,f){a|=0;
b|=0;d|=0;f|=0;var e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,w=0;c[a>>2]=36340;c[a+4>>2]=d;t=a+8|0;k=c[d>>2]|0;r=d+16|0;h=c[r>>2]|0;q=ia(h,k)|0;c[t>>2]=0;w=a+12|0;c[w>>2]=0;c[a+16>>2]=0;if(q)if(0>(q|0)&&(g=0,ta(178,t|0),k=g,g=0,k&1)||(x=4),4!=(x|0)||(m=q<<1,g=0,n=ca(67,m|0)|0,k=g,g=0,k&1)){m=J()|0;if(h=e=c[t>>2]|0)k=c[w>>2]|0,(k|0)!=(e|0)&&(c[w>>2]=k+(~((k+-2-h|0)>>>1)<<1)),Q(e);w=m;V(w|0)}else c[t>>2]=n,k=n+(q<<1)|0,c[a+16>>2]=k,Za(n|0,0,m|0)|0,c[w>>2]=k,k=c[d>>2]|0,h=c[r>>2]|0;m=a+20|0;h=ia(k<<1,h)|0;
c[m>>2]=0;n=a+24|0;c[n>>2]=0;c[a+28>>2]=0;if(h)if(0>(h|0)&&(g=0,ta(178,m|0),r=g,g=0,r&1)||(x=13),13!=(x|0)||(g=0,e=ca(67,h|0)|0,x=g,g=0,x&1)){k=J()|0;if(e=c[m>>2]|0)(c[n>>2]|0)!=(e|0)&&(c[n>>2]=e),Q(e);e=c[t>>2]|0;e||(w=k,V(w|0));h=c[w>>2]|0;(h|0)!=(e|0)&&(c[w>>2]=h+(~((h+-2-e|0)>>>1)<<1));Q(e);V(k|0)}else{c[n>>2]=e;c[m>>2]=e;c[a+28>>2]=e+h;do u[e>>0]=0,e=(c[n>>2]|0)+1|0,c[n>>2]=e,h=h+-1|0;while(0!=(h|0));w=a+32|0;t=c[f>>2]|0;f=c[(f+4|0)>>2]|0;x=w;c[x>>2]=t;w=w+4|0;c[w>>2]=f;c[(a+40|0)>>2]=t;w=a+
48|0;c[w>>2]=c[b>>2];c[w+4>>2]=c[b+4>>2];c[w+8>>2]=c[b+8>>2]}else w=a+32|0,t=f,t=c[t>>2]|0,f=f+4|0,f=c[f>>2]|0,x=w,c[x>>2]=t,w=w+4|0,c[w>>2]=f,c[(a+40|0)>>2]=t,w=a+48|0,c[w>>2]=c[b>>2],c[w+4>>2]=c[b+4>>2],c[w+8>>2]=c[b+8>>2]},function(a,b,d,f){a|=0;b|=0;d|=0;f|=0;var e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0,t=0,w=0;c[a>>2]=36316;c[a+4>>2]=d;t=a+8|0;k=c[d>>2]|0;r=d+16|0;h=c[r>>2]|0;q=ia(h,k)|0;c[t>>2]=0;w=a+12|0;c[w>>2]=0;c[a+16>>2]=0;if(q)if(0>(q|0)&&(g=0,ta(178,t|0),k=g,g=0,k&1)||(x=4),4!=(x|0)||(m=q<<1,
g=0,n=ca(67,m|0)|0,k=g,g=0,k&1)){m=J()|0;if(h=e=c[t>>2]|0)k=c[w>>2]|0,(k|0)!=(e|0)&&(c[w>>2]=k+(~((k+-2-h|0)>>>1)<<1)),Q(e);w=m;V(w|0)}else c[t>>2]=n,k=n+(q<<1)|0,c[a+16>>2]=k,Za(n|0,0,m|0)|0,c[w>>2]=k,k=c[d>>2]|0,h=c[r>>2]|0;m=a+20|0;h=ia(k<<1,h)|0;c[m>>2]=0;n=a+24|0;c[n>>2]=0;c[a+28>>2]=0;if(h)if(0>(h|0)&&(g=0,ta(178,m|0),r=g,g=0,r&1)||(x=13),13!=(x|0)||(g=0,e=ca(67,h|0)|0,x=g,g=0,x&1)){k=J()|0;if(e=c[m>>2]|0)(c[n>>2]|0)!=(e|0)&&(c[n>>2]=e),Q(e);e=c[t>>2]|0;e||(w=k,V(w|0));h=c[w>>2]|0;(h|0)!=(e|
0)&&(c[w>>2]=h+(~((h+-2-e|0)>>>1)<<1));Q(e);V(k|0)}else{c[n>>2]=e;c[m>>2]=e;c[a+28>>2]=e+h;do u[e>>0]=0,e=(c[n>>2]|0)+1|0,c[n>>2]=e,h=h+-1|0;while(0!=(h|0));w=a+32|0;t=c[f>>2]|0;f=c[(f+4|0)>>2]|0;x=w;c[x>>2]=t;w=w+4|0;c[w>>2]=f;c[(a+40|0)>>2]=t;w=a+48|0;c[w>>2]=c[b>>2];c[w+4>>2]=c[b+4>>2];c[w+8>>2]=c[b+8>>2]}else w=a+32|0,t=f,t=c[t>>2]|0,f=f+4|0,f=c[f>>2]|0,x=w,c[x>>2]=t,w=w+4|0,c[w>>2]=f,c[(a+40|0)>>2]=t,w=a+48|0,c[w>>2]=c[b>>2],c[w+4>>2]=c[b+4>>2],c[w+8>>2]=c[b+8>>2]},function(a,b,d,f){a|=0;b|=
0;d|=0;var e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0;c[a>>2]=36712;c[a+4>>2]=d;r=a+8|0;f=c[d>>2]|0;n=d+16|0;k=c[n>>2]|0;h=ia(k,f)|0;c[r>>2]=0;x=a+12|0;c[x>>2]=0;c[a+16>>2]=0;if(h)if(0>(h|0)&&(g=0,ta(178,r|0),k=g,g=0,k&1)||(q=4),4!=(q|0)||(g=0,m=ca(67,h|0)|0,k=g,g=0,k&1)){f=J()|0;if(e=c[r>>2]|0)(c[x>>2]|0)!=(e|0)&&(c[x>>2]=e),Q(e);x=f;V(x|0)}else{c[x>>2]=m;c[r>>2]=m;c[a+16>>2]=m+h;f=m;do u[f>>0]=0,f=(c[x>>2]|0)+1|0,c[x>>2]=f,h=h+-1|0;while(0!=(h|0));h=c[n>>2]|0;f=c[d>>2]|0}else h=k;k=a+20|0;f=ia(h,f)|0;c[k>>
2]=0;h=a+24|0;c[h>>2]=0;c[a+28>>2]=0;if(f)if(0>(f|0)&&(g=0,ta(178,k|0),d=g,g=0,d&1)||(q=15),15!=(q|0)||(g=0,e=ca(67,f|0)|0,q=g,g=0,q&1)){f=J()|0;if(e=c[k>>2]|0)(c[h>>2]|0)!=(e|0)&&(c[h>>2]=e),Q(e);e=c[r>>2]|0;e||(x=f,V(x|0));(c[x>>2]|0)!=(e|0)&&(c[x>>2]=e);Q(e);V(f|0)}else{c[h>>2]=e;c[k>>2]=e;c[a+28>>2]=e+f;do u[e>>0]=0,e=(c[h>>2]|0)+1|0,c[h>>2]=e,f=f+-1|0;while(0!=(f|0));x=a+36|0;c[x>>2]=c[b>>2];c[x+4>>2]=c[b+4>>2];c[x+8>>2]=c[b+8>>2]}else x=a+36|0,c[x>>2]=c[b>>2],c[x+4>>2]=c[b+4>>2],c[x+8>>2]=c[b+
8>>2]},function(a,b,d,f){a|=0;b|=0;d|=0;var e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0;c[a>>2]=36688;c[a+4>>2]=d;r=a+8|0;f=c[d>>2]|0;n=d+16|0;k=c[n>>2]|0;h=ia(k,f)|0;c[r>>2]=0;x=a+12|0;c[x>>2]=0;c[a+16>>2]=0;if(h)if(0>(h|0)&&(g=0,ta(178,r|0),k=g,g=0,k&1)||(q=4),4!=(q|0)||(g=0,m=ca(67,h|0)|0,k=g,g=0,k&1)){f=J()|0;if(e=c[r>>2]|0)(c[x>>2]|0)!=(e|0)&&(c[x>>2]=e),Q(e);x=f;V(x|0)}else{c[x>>2]=m;c[r>>2]=m;c[a+16>>2]=m+h;f=m;do u[f>>0]=0,f=(c[x>>2]|0)+1|0,c[x>>2]=f,h=h+-1|0;while(0!=(h|0));h=c[n>>2]|0;f=c[d>>2]|0}else h=
k;k=a+20|0;f=ia(h,f)|0;c[k>>2]=0;h=a+24|0;c[h>>2]=0;c[a+28>>2]=0;if(f)if(0>(f|0)&&(g=0,ta(178,k|0),d=g,g=0,d&1)||(q=15),15!=(q|0)||(g=0,e=ca(67,f|0)|0,q=g,g=0,q&1)){f=J()|0;if(e=c[k>>2]|0)(c[h>>2]|0)!=(e|0)&&(c[h>>2]=e),Q(e);e=c[r>>2]|0;e||(x=f,V(x|0));(c[x>>2]|0)!=(e|0)&&(c[x>>2]=e);Q(e);V(f|0)}else{c[h>>2]=e;c[k>>2]=e;c[a+28>>2]=e+f;do u[e>>0]=0,e=(c[h>>2]|0)+1|0,c[h>>2]=e,f=f+-1|0;while(0!=(f|0));x=a+36|0;c[x>>2]=c[b>>2];c[x+4>>2]=c[b+4>>2];c[x+8>>2]=c[b+8>>2]}else x=a+36|0,c[x>>2]=c[b>>2],c[x+
4>>2]=c[b+4>>2],c[x+8>>2]=c[b+8>>2]},function(a,b,d,f){a|=0;b|=0;d|=0;var e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0;c[a>>2]=36664;c[a+4>>2]=d;r=a+8|0;f=c[d>>2]|0;n=d+16|0;k=c[n>>2]|0;h=ia(k,f)|0;c[r>>2]=0;x=a+12|0;c[x>>2]=0;c[a+16>>2]=0;if(h)if(0>(h|0)&&(g=0,ta(178,r|0),k=g,g=0,k&1)||(q=4),4!=(q|0)||(g=0,m=ca(67,h|0)|0,k=g,g=0,k&1)){f=J()|0;if(e=c[r>>2]|0)(c[x>>2]|0)!=(e|0)&&(c[x>>2]=e),Q(e);x=f;V(x|0)}else{c[x>>2]=m;c[r>>2]=m;c[a+16>>2]=m+h;f=m;do u[f>>0]=0,f=(c[x>>2]|0)+1|0,c[x>>2]=f,h=h+-1|0;while(0!=(h|
0));h=c[n>>2]|0;f=c[d>>2]|0}else h=k;k=a+20|0;f=ia(h,f)|0;c[k>>2]=0;h=a+24|0;c[h>>2]=0;c[a+28>>2]=0;if(f)if(0>(f|0)&&(g=0,ta(178,k|0),d=g,g=0,d&1)||(q=15),15!=(q|0)||(g=0,e=ca(67,f|0)|0,q=g,g=0,q&1)){f=J()|0;if(e=c[k>>2]|0)(c[h>>2]|0)!=(e|0)&&(c[h>>2]=e),Q(e);e=c[r>>2]|0;e||(x=f,V(x|0));(c[x>>2]|0)!=(e|0)&&(c[x>>2]=e);Q(e);V(f|0)}else{c[h>>2]=e;c[k>>2]=e;c[a+28>>2]=e+f;do u[e>>0]=0,e=(c[h>>2]|0)+1|0,c[h>>2]=e,f=f+-1|0;while(0!=(f|0));x=a+36|0;c[x>>2]=c[b>>2];c[x+4>>2]=c[b+4>>2];c[x+8>>2]=c[b+8>>2]}else x=
a+36|0,c[x>>2]=c[b>>2],c[x+4>>2]=c[b+4>>2],c[x+8>>2]=c[b+8>>2]},function(a,b,d,f){a|=0;b|=0;d|=0;var e=0,h=0,k=0,m=0,n=0,q=0,r=0,x=0;c[a>>2]=36640;c[a+4>>2]=d;r=a+8|0;f=c[d>>2]|0;n=d+16|0;k=c[n>>2]|0;h=ia(k,f)|0;c[r>>2]=0;x=a+12|0;c[x>>2]=0;c[a+16>>2]=0;if(h)if(0>(h|0)&&(g=0,ta(178,r|0),k=g,g=0,k&1)||(q=4),4!=(q|0)||(g=0,m=ca(67,h|0)|0,k=g,g=0,k&1)){f=J()|0;if(e=c[r>>2]|0)(c[x>>2]|0)!=(e|0)&&(c[x>>2]=e),Q(e);x=f;V(x|0)}else{c[x>>2]=m;c[r>>2]=m;c[a+16>>2]=m+h;f=m;do u[f>>0]=0,f=(c[x>>2]|0)+1|0,c[x>>
2]=f,h=h+-1|0;while(0!=(h|0));h=c[n>>2]|0;f=c[d>>2]|0}else h=k;k=a+20|0;f=ia(h,f)|0;c[k>>2]=0;h=a+24|0;c[h>>2]=0;c[a+28>>2]=0;if(f)if(0>(f|0)&&(g=0,ta(178,k|0),d=g,g=0,d&1)||(q=15),15!=(q|0)||(g=0,e=ca(67,f|0)|0,q=g,g=0,q&1)){f=J()|0;if(e=c[k>>2]|0)(c[h>>2]|0)!=(e|0)&&(c[h>>2]=e),Q(e);e=c[r>>2]|0;e||(x=f,V(x|0));(c[x>>2]|0)!=(e|0)&&(c[x>>2]=e);Q(e);V(f|0)}else{c[h>>2]=e;c[k>>2]=e;c[a+28>>2]=e+f;do u[e>>0]=0,e=(c[h>>2]|0)+1|0,c[h>>2]=e,f=f+-1|0;while(0!=(f|0));x=a+36|0;c[x>>2]=c[b>>2];c[x+4>>2]=c[b+
4>>2];c[x+8>>2]=c[b+8>>2]}else x=a+36|0,c[x>>2]=c[b>>2],c[x+4>>2]=c[b+4>>2],c[x+8>>2]=c[b+8>>2]},Ic,Ic,Ic,Ic,Ic,Ic,Ic,Ic,Ic,Ic,Ic,Ic,Ic,Ic,Ic,Ic];return{_jpegls_encode:function(a,b,d,g,e,h,k,m,n){a|=0;b|=0;m|=0;n|=0;var q=0,r=0,x=0,t=0,x=F;F=F+96|0;q=x+4|0;k=x;r=q;t=r+84|0;do c[r>>2]=0,r=r+4|0;while((r|0)<(t|0));c[q+16>>2]=h|0;c[q+8>>2]=e|0;c[q>>2]=d|0;c[q+4>>2]=g|0;d=Ub(b)|0;c[m>>2]=d;c[k>>2]=0;d=m|0;g=b|0;e=k|0;a|=0;b|=0;var q=q|0,u=t=r=m=h=0,u=F;F=F+48|0;m=u+36|0;h=u+24|0;r=u+12|0;t=u;0!=(d|0)&
0!=(e|0)&0!=(a|0)&0!=(q|0)?(c[r>>2]=0,c[r+4>>2]=d,c[r+8>>2]=g,c[t>>2]=0,c[t+4>>2]=a,c[t+8>>2]=b,c[h>>2]=c[r>>2],c[h+4>>2]=c[r+4>>2],c[h+8>>2]=c[r+8>>2],c[m>>2]=c[t>>2],c[m+4>>2]=c[t+4>>2],c[m+8>>2]=c[t+8>>2],b=f(h,e,m,q,0)|0):b=1;F=u;q=b|0;c[n>>2]=c[k>>2];F=x;return q|0},___cxa_can_catch:function(a,b,d){a|=0;d|=0;var f=0,g=0,g=F;F=F+16|0;f=g;c[f>>2]=c[d>>2];(a=cb[c[(c[a>>2]|0)+16>>2]&63](a,b|0,f)|0)&&(c[d>>2]=c[f>>2]);F=g;return a&1|0},_free:$a,_jpegls_decode:function(a,b,d,f,g,h,m,n,q,r,x){a|=0;
b|=0;d|=0;f|=0;g|=0;h|=0;m|=0;n|=0;q|=0;r|=0;x|=0;var t=0,w=0,A=0,D=0,B=0,E=0,y=0,A=F;F=F+96|0;var w=A,t=a|0,D=b|0,B=w|0,z=y=E=0,O=0,E=F;F=F+32|0;y=E+12|0;O=z=E;c[O>>2]=0;c[O+4>>2]=0;c[z+4>>2]=t;c[z+8>>2]=D;c[y>>2]=c[z>>2];c[y+4>>2]=c[z+4>>2];c[y+8>>2]=c[z+8>>2];B=k(y,B,0)|0;F=E;if(t=B|0)return F=A,t|0;u[w+32>>0]=0;B=c[w+8>>2]|0;y=c[w>>2]|0;E=c[w+4>>2]|0;t=ia(E,y)|0;D=c[w+16>>2]|0;t=ia(ia(t,9>(B|0)?1:2)|0,D)|0;c[f>>2]=t;t=Ub(t)|0;c[d>>2]=t;c[g>>2]=y;c[h>>2]=E;c[m>>2]=B;c[n>>2]=c[w+12>>2];c[q>>2]=
D;c[r>>2]=c[w+20>>2];c[x>>2]=c[w+24>>2];d=c[f>>2]|0;f=t|0;a|=0;b|=0;q=n=m=h=g=0;g=F;F=F+48|0;h=g+36|0;m=g+24|0;q=g+12|0;n=g;c[q>>2]=0;c[q+4>>2]=f;c[q+8>>2]=d|0;c[n>>2]=0;c[n+4>>2]=a;c[n+8>>2]=b;c[m>>2]=c[q>>2];c[m+4>>2]=c[q+4>>2];c[m+8>>2]=c[q+8>>2];c[h>>2]=c[n>>2];c[h+4>>2]=c[n+4>>2];c[h+8>>2]=c[n+8>>2];b=e(m,h,0,0)|0;F=g;g=b|0;F=A;return g|0},___cxa_is_pointer_type:function(a){a=(a|=0)?0!=(kh(a,656,704,0)|0):0;return a&1|0},_i64Add:Mb,_memmove:tf,_i64Subtract:Ud,_memset:Za,_malloc:Ub,_memcpy:gb,
_bitshift64Lshr:ie,_bitshift64Shl:yb,__GLOBAL__I_000101:function(){var a=0,b=0,d=0,f=0,e=0,h=0,k=0,f=c[9321]|0,e=42048,h=f|0,a=42104,k=d=b=0,d=F;F=F+16|0;k=d+4|0;b=d;cg(e);c[e>>2]=42600;c[e+32>>2]=h;c[e+40>>2]=a;c[e+48>>2]=-1;u[e+52>>0]=0;Jc(k,e+4|0);c[b>>2]=c[k>>2];g=0;ga(23,e|0,b|0);a=g;g=0;a&1?(k=J()|0,Vb(b),ya(e),V(k|0)):(Vb(b),F=d);c[10342]=42892;c[10344]=42912;c[10343]=0;a=c[10720]|0;g=0;ga(62,41368+a|0,42048);h=g;g=0;h&1&&(h=J()|0,sa(41376),V(h|0));c[41368+(a+72)>>2]=0;c[41368+(a+76)>>2]=-1;
e=c[9322]|0;Fd(42152,e,42112);c[10364]=42972;c[10365]=42992;d=c[10740]|0;g=0;ga(62,41456+d|0,42152);h=g;g=0;h&1&&(h=J()|0,sa(41460),V(h|0));a=d+72|0;c[41456+a>>2]=0;b=d+76|0;c[41456+b>>2]=-1;h=c[9320]|0;Fd(42200,h,42120);c[10385]=42972;c[10386]=42992;g=0;ga(62,41540+d|0,42200);k=g;g=0;k&1&&(k=J()|0,sa(41544),V(k|0));c[41540+a>>2]=0;c[41540+b>>2]=-1;k=c[41540+((c[(c[10385]|0)+-12>>2]|0)+24)>>2]|0;c[10406]=42972;c[10407]=42992;g=0;ga(62,41624+d|0,k|0);k=g;g=0;k&1&&(k=J()|0,sa(41628),V(k|0));c[41624+
a>>2]=0;c[41624+b>>2]=-1;c[41368+((c[(c[10342]|0)+-12>>2]|0)+72)>>2]=41456;a=41540+((c[(c[10385]|0)+-12>>2]|0)+4)|0;c[a>>2]|=8192;c[41540+((c[(c[10385]|0)+-12>>2]|0)+72)>>2]=41456;var a=42248,f=f|0,b=42128,m=k=d=0,k=F;F=F+16|0;m=k+4|0;d=k;Gg(a);c[a>>2]=42472;c[a+32>>2]=f;c[a+40>>2]=b;c[a+48>>2]=-1;u[a+52>>0]=0;Jc(m,a+4|0);c[d>>2]=c[m>>2];g=0;ga(21,a|0,d|0);b=g;g=0;b&1?(m=J()|0,Vb(d),Ze(a),V(m|0)):(Vb(d),F=k);c[10427]=42932;c[10429]=42952;c[10428]=0;a=c[10730]|0;g=0;ga(62,41708+a|0,42248);k=g;g=0;
k&1&&(k=J()|0,uf(41716),V(k|0));c[41708+(a+72)>>2]=0;c[41708+(a+76)>>2]=-1;Gd(42304,e,42136);c[10449]=43012;c[10450]=43032;d=c[10750]|0;g=0;ga(62,41796+d|0,42304);k=g;g=0;k&1&&(k=J()|0,uf(41800),V(k|0));a=d+72|0;c[41796+a>>2]=0;b=d+76|0;c[41796+b>>2]=-1;Gd(42352,h,42144);c[10470]=43012;c[10471]=43032;g=0;ga(62,41880+d|0,42352);k=g;g=0;k&1&&(k=J()|0,uf(41884),V(k|0));c[41880+a>>2]=0;c[41880+b>>2]=-1;k=c[41880+((c[(c[10470]|0)+-12>>2]|0)+24)>>2]|0;c[10491]=43012;c[10492]=43032;g=0;ga(62,41964+d|0,k|
0);k=g;g=0;k&1?(k=J()|0,uf(41968),V(k|0)):(c[41964+a>>2]=0,c[41964+b>>2]=-1,c[41708+((c[(c[10427]|0)+-12>>2]|0)+72)>>2]=41796,k=41880+((c[(c[10470]|0)+-12>>2]|0)+4)|0,c[k>>2]|=8192,c[41880+((c[(c[10470]|0)+-12>>2]|0)+72)>>2]=41796);Ea(187,56757,Ga|0)|0},__GLOBAL__sub_I_jpegls_cpp:function(){var a=0,b=0,d=0,f=0,g=0,e=0,h=0,a=2832;do c[a>>2]=0,c[a+4>>2]=0,a=a+8|0;while(4880!=(a|0));Za(2832,0,2048)|0;a=0;do h=2832+(a+128<<3)|0,c[h>>2]=0,c[h+4>>2]=1,a=a+1|0;while(128!=(a|0));a=3088;c[a>>2]=1;c[a+4>>2]=
3;a=3096;c[a>>2]=1;c[a+4>>2]=3;a=3104;c[a>>2]=1;c[a+4>>2]=3;a=3112;c[a>>2]=1;c[a+4>>2]=3;a=3120;c[a>>2]=1;c[a+4>>2]=3;a=3128;c[a>>2]=1;c[a+4>>2]=3;a=3136;c[a>>2]=1;c[a+4>>2]=3;a=3144;c[a>>2]=1;c[a+4>>2]=3;a=3152;c[a>>2]=1;c[a+4>>2]=3;a=3160;c[a>>2]=1;c[a+4>>2]=3;a=3168;c[a>>2]=1;c[a+4>>2]=3;a=3176;c[a>>2]=1;c[a+4>>2]=3;a=3184;c[a>>2]=1;c[a+4>>2]=3;a=3192;c[a>>2]=1;c[a+4>>2]=3;a=3200;c[a>>2]=1;c[a+4>>2]=3;a=3208;c[a>>2]=1;c[a+4>>2]=3;a=3216;c[a>>2]=1;c[a+4>>2]=3;a=3224;c[a>>2]=1;c[a+4>>2]=3;a=3232;
c[a>>2]=1;c[a+4>>2]=3;a=3240;c[a>>2]=1;c[a+4>>2]=3;a=3248;c[a>>2]=1;c[a+4>>2]=3;a=3256;c[a>>2]=1;c[a+4>>2]=3;a=3264;c[a>>2]=1;c[a+4>>2]=3;a=3272;c[a>>2]=1;c[a+4>>2]=3;a=3280;c[a>>2]=1;c[a+4>>2]=3;a=3288;c[a>>2]=1;c[a+4>>2]=3;a=3296;c[a>>2]=1;c[a+4>>2]=3;a=3304;c[a>>2]=1;c[a+4>>2]=3;a=3312;c[a>>2]=1;c[a+4>>2]=3;a=3320;c[a>>2]=1;c[a+4>>2]=3;a=3328;c[a>>2]=1;c[a+4>>2]=3;a=3336;c[a>>2]=1;c[a+4>>2]=3;a=2896;c[a>>2]=2;c[a+4>>2]=5;a=2904;c[a>>2]=2;c[a+4>>2]=5;a=2912;c[a>>2]=2;c[a+4>>2]=5;a=2920;c[a>>2]=
2;c[a+4>>2]=5;a=2928;c[a>>2]=2;c[a+4>>2]=5;a=2936;c[a>>2]=2;c[a+4>>2]=5;a=2944;c[a>>2]=2;c[a+4>>2]=5;a=2952;c[a>>2]=2;c[a+4>>2]=5;a=2848;c[a>>2]=3;c[a+4>>2]=7;a=2856;c[a>>2]=3;c[a+4>>2]=7;a=0;do h=2832+(a+64<<3)|0,c[h>>2]=-1,c[h+4>>2]=2,a=a+1|0;while(64!=(a|0));a=2960;c[a>>2]=-2;c[a+4>>2]=4;a=2968;c[a>>2]=-2;c[a+4>>2]=4;a=2976;c[a>>2]=-2;c[a+4>>2]=4;a=2984;c[a>>2]=-2;c[a+4>>2]=4;a=2992;c[a>>2]=-2;c[a+4>>2]=4;a=3E3;c[a>>2]=-2;c[a+4>>2]=4;a=3008;c[a>>2]=-2;c[a+4>>2]=4;a=3016;c[a>>2]=-2;c[a+4>>2]=4;
a=3024;c[a>>2]=-2;c[a+4>>2]=4;a=3032;c[a>>2]=-2;c[a+4>>2]=4;a=3040;c[a>>2]=-2;c[a+4>>2]=4;a=3048;c[a>>2]=-2;c[a+4>>2]=4;a=3056;c[a>>2]=-2;c[a+4>>2]=4;a=3064;c[a>>2]=-2;c[a+4>>2]=4;a=3072;c[a>>2]=-2;c[a+4>>2]=4;a=3080;c[a>>2]=-2;c[a+4>>2]=4;a=2864;c[a>>2]=-3;c[a+4>>2]=6;a=2872;c[a>>2]=-3;c[a+4>>2]=6;a=2880;c[a>>2]=-3;c[a+4>>2]=6;a=2888;c[a>>2]=-3;c[a+4>>2]=6;a=2840;c[a>>2]=-4;c[a+4>>2]=8;a=4880;do c[a>>2]=0,c[a+4>>2]=0,a=a+8|0;while(6928!=(a|0));Za(4880,0,2048)|0;d=2;for(e=g=a=0;;){d=d<<16>>16;b=8-
d|0;f=1<<b;if(31!=(b|0)){a=(a&1|2)<<b;b=0;do h=4880+(b+a<<3)|0,c[h>>2]=g,c[h+4>>2]=d,b=b+1|0;while((b|0)<(f|0))}b=(e<<16)+65536|0;a=b>>31^b>>15;e=e+1|0;if(7==(e|0)){b=2;g=1;h=e=-1;break}else d=(a>>1)+2|0,g=b>>16}for(;;){d=b<<16>>16;a=8-d|0;f=1<<a;if(31!=(a|0)){a=(g&1|2)<<a;b=0;do g=4880+(b+a<<3)|0,c[g>>2]=e,c[g+4>>2]=d,b=b+1|0;while((b|0)<(f|0))}a=(h<<16)+-65536|0;g=a>>31^a>>15;b=(g>>1)+2|0;if(8<(b|0)){a=6928;break}else e=a>>16,h=h+-1|0}do c[a>>2]=0,c[a+4>>2]=0,a=a+8|0;while(8976!=(a|0));Za(6928,
0,2048)|0;g=3;for(e=f=a=0;;){b=8-g|0;d=1<<b;if(31!=(b|0)){a=(a&3|4)<<b;b=0;do h=6928+(b+a<<3)|0,c[h>>2]=f,c[h+4>>2]=g,b=b+1|0;while((b|0)<(d|0))}b=(e<<16)+65536|0;a=b>>31^b>>15;e=e+1|0;if(12==(e|0)){g=3;b=1;e=f=-1;break}else g=(a>>2)+3|0,f=b>>16}for(;;){a=8-g|0;d=1<<a;if(31!=(a|0)){a=(b&3|4)<<a;b=0;do h=6928+(b+a<<3)|0,c[h>>2]=f,c[h+4>>2]=g,b=b+1|0;while((b|0)<(d|0))}a=(e<<16)+-65536|0;b=a>>31^a>>15;g=(b>>2)+3|0;if(8<(g|0)){a=8976;break}else f=a>>16,e=e+-1|0}do c[a>>2]=0,c[a+4>>2]=0,a=a+8|0;while(11024!=
(a|0));Za(8976,0,2048)|0;g=4;for(e=f=a=0;;){b=8-g|0;d=1<<b;if(31!=(b|0)){a=(a&7|8)<<b;b=0;do h=8976+(b+a<<3)|0,c[h>>2]=f,c[h+4>>2]=g,b=b+1|0;while((b|0)<(d|0))}b=(e<<16)+65536|0;a=b>>31^b>>15;e=e+1|0;if(20==(e|0)){g=4;b=1;e=f=-1;break}else g=(a>>3)+4|0,f=b>>16}for(;;){a=8-g|0;d=1<<a;if(31!=(a|0)){a=(b&7|8)<<a;b=0;do h=8976+(b+a<<3)|0,c[h>>2]=f,c[h+4>>2]=g,b=b+1|0;while((b|0)<(d|0))}a=(e<<16)+-65536|0;b=a>>31^a>>15;g=(b>>3)+4|0;if(8<(g|0)){a=11024;break}else f=a>>16,e=e+-1|0}do c[a>>2]=0,c[a+4>>2]=
0,a=a+8|0;while(13072!=(a|0));Za(11024,0,2048)|0;g=5;for(e=f=a=0;;){b=8-g|0;d=1<<b;if(31!=(b|0)){a=(a&15|16)<<b;b=0;do h=11024+(b+a<<3)|0,c[h>>2]=f,c[h+4>>2]=g,b=b+1|0;while((b|0)<(d|0))}b=(e<<16)+65536|0;a=b>>31^b>>15;e=e+1|0;if(32==(e|0)){g=5;b=1;e=f=-1;break}else g=(a>>4)+5|0,f=b>>16}for(;;){a=8-g|0;d=1<<a;if(31!=(a|0)){a=(b&15|16)<<a;b=0;do h=11024+(b+a<<3)|0,c[h>>2]=f,c[h+4>>2]=g,b=b+1|0;while((b|0)<(d|0))}a=(e<<16)+-65536|0;b=a>>31^a>>15;g=(b>>4)+5|0;if(8<(g|0)){a=13072;break}else f=a>>16,e=
e+-1|0}do c[a>>2]=0,c[a+4>>2]=0,a=a+8|0;while(15120!=(a|0));Za(13072,0,2048)|0;g=6;for(e=f=a=0;;){b=8-g|0;d=1<<b;if(31!=(b|0)){a=(a&31|32)<<b;b=0;do h=13072+(b+a<<3)|0,c[h>>2]=f,c[h+4>>2]=g,b=b+1|0;while((b|0)<(d|0))}b=(e<<16)+65536|0;a=b>>31^b>>15;e=e+1|0;if(48==(e|0)){g=6;b=1;e=f=-1;break}else g=(a>>5)+6|0,f=b>>16}for(;;){a=8-g|0;d=1<<a;if(31!=(a|0)){a=(b&31|32)<<a;b=0;do h=13072+(b+a<<3)|0,c[h>>2]=f,c[h+4>>2]=g,b=b+1|0;while((b|0)<(d|0))}a=(e<<16)+-65536|0;b=a>>31^a>>15;g=(b>>5)+6|0;if(8<(g|0)){a=
15120;break}else f=a>>16,e=e+-1|0}do c[a>>2]=0,c[a+4>>2]=0,a=a+8|0;while(17168!=(a|0));Za(15120,0,2048)|0;g=7;for(e=f=a=0;;){b=8-g|0;d=1<<b;if(31!=(b|0)){a=(a&63|64)<<b;b=0;do h=15120+(b+a<<3)|0,c[h>>2]=f,c[h+4>>2]=g,b=b+1|0;while((b|0)<(d|0))}b=(e<<16)+65536|0;a=b>>31^b>>15;e=e+1|0;if(64==(e|0)){g=7;b=1;e=f=-1;break}else g=(a>>6)+7|0,f=b>>16}for(;;){a=8-g|0;d=1<<a;if(31!=(a|0)){a=(b&63|64)<<a;b=0;do h=15120+(b+a<<3)|0,c[h>>2]=f,c[h+4>>2]=g,b=b+1|0;while((b|0)<(d|0))}a=(e<<16)+-65536|0;b=a>>31^a>>
15;g=(b>>6)+7|0;if(8<(g|0)){a=17168;break}else f=a>>16,e=e+-1|0}do c[a>>2]=0,c[a+4>>2]=0,a=a+8|0;while(19216!=(a|0));Za(17168,0,2048)|0;g=8;for(e=f=a=0;;){b=8-g|0;d=1<<b;if(31!=(b|0)){a=(a&127|128)<<b;b=0;do h=17168+(b+a<<3)|0,c[h>>2]=f,c[h+4>>2]=g,b=b+1|0;while((b|0)<(d|0))}b=(e<<16)+65536|0;a=b>>31^b>>15;e=e+1|0;if(64==(e|0)){e=8;f=1;h=g=-1;break}else g=(a>>7)+8|0,f=b>>16}for(;;){a=8-e|0;d=1<<a;if(31!=(a|0)){a=(f&127|128)<<a;b=0;do f=17168+(b+a<<3)|0,c[f>>2]=g,c[f+4>>2]=e,b=b+1|0;while((b|0)<(d|
0))}b=(h<<16)+-65536|0;f=b>>31^b>>15;a=f>>7;if(0<(a|0)){a=19216;break}else e=a+8|0,g=b>>16,h=h+-1|0}do c[a>>2]=0,c[a+4>>2]=0,a=a+8|0;while(21264!=(a|0));Za(19216,0,2048)|0;a=21264;do c[a>>2]=0,c[a+4>>2]=0,a=a+8|0;while(23312!=(a|0));Za(21264,0,2048)|0;a=23312;do c[a>>2]=0,c[a+4>>2]=0,a=a+8|0;while(25360!=(a|0));Za(23312,0,2048)|0;a=25360;do c[a>>2]=0,c[a+4>>2]=0,a=a+8|0;while(27408!=(a|0));Za(25360,0,2048)|0;a=27408;do c[a>>2]=0,c[a+4>>2]=0,a=a+8|0;while(29456!=(a|0));Za(27408,0,2048)|0;a=29456;do c[a>>
2]=0,c[a+4>>2]=0,a=a+8|0;while(31504!=(a|0));Za(29456,0,2048)|0;a=31504;do c[a>>2]=0,c[a+4>>2]=0,a=a+8|0;while(33552!=(a|0));Za(31504,0,2048)|0;a=33552;do c[a>>2]=0,c[a+4>>2]=0,a=a+8|0;while(35600!=(a|0));Za(33552,0,2048)|0;m(35600,8);Ea(179,35600,Ga|0)|0;m(35612,10);Ea(179,35612,Ga|0)|0;m(35624,12);Ea(179,35624,Ga|0)|0;m(35636,16);Ea(179,35636,Ga|0)|0},__GLOBAL__sub_I_iostream_cpp:function(){},runPostSets:function(){},_emscripten_replace_memory:function(a){if(rg(a)&16777215||16777215>=rg(a)||2147483648<
rg(a))return!1;u=new Eh(a);R=new Fh(a);c=new Gh(a);ea=new Hh(a);oa=new Ih(a);new Jh(a);If=new Kh(a);eb=new Lh(a);d=a;return!0},stackAlloc:function(a){var c=0,c=F;F=F+(a|0)|0;F=F+15&-16;return c|0},stackSave:function(){return F|0},stackRestore:function(a){F=a|0},establishStackSpace:function(a,c){F=a|0},setThrew:function(a,c){g||(g=a|0)},setTempRet0:function(a){Fa=a|0},getTempRet0:function(){return Fa|0},dynCall_iiiiiiii:function(a,c,b,d,f,g,e,h){return wi[(a|0)&15](c|0,b|0,d|0,f|0,g|0,e|0,h|0)|0},
dynCall_viiiii:function(a,c,b,d,f,g){Cf[(a|0)&15](c|0,b|0,d|0,f|0,g|0)},dynCall_iiiiiid:function(a,c,b,d,f,g,e){return xi[(a|0)&3](c|0,b|0,d|0,f|0,g|0,+ +e)|0},dynCall_vi:function(a,c){Ha[(a|0)&255](c|0)},dynCall_vii:function(a,c,b){bb[(a|0)&127](c|0,b|0)},dynCall_iiiiiii:function(a,c,b,d,f,g,e){return bf[(a|0)&63](c|0,b|0,d|0,f|0,g|0,e|0)|0},dynCall_ii:function(a,c){return Ja[(a|0)&127](c|0)|0},dynCall_iiiiiiiiiiii:function(a,c,b,d,f,g,e,h,k,m,n,q){return yi[(a|0)&3](c|0,b|0,d|0,f|0,g|0,e|0,h|0,
k|0,m|0,n|0,q|0)|0},dynCall_iiii:function(a,c,b,d){return cb[(a|0)&63](c|0,b|0,d|0)|0},dynCall_viiiiiiiiiiiiiii:function(a,c,b,d,f,g,e,h,k,m,n,q,r,x,t,u){zi[(a|0)&3](c|0,b|0,d|0,f|0,g|0,e|0,h|0,k|0,m|0,n|0,q|0,r|0,x|0,t|0,u|0)},dynCall_viiiiii:function(a,c,b,d,f,g,e){ye[(a|0)&15](c|0,b|0,d|0,f|0,g|0,e|0)},dynCall_viiiiiii:function(a,c,b,d,f,g,e,h){Ai[(a|0)&7](c|0,b|0,d|0,f|0,g|0,e|0,h|0)},dynCall_viiiiiiiiii:function(a,c,b,d,f,g,e,h,k,m,n){Bi[(a|0)&7](c|0,b|0,d|0,f|0,g|0,e|0,h|0,k|0,m|0,n|0)},dynCall_iii:function(a,
c,b){return vc[(a|0)&63](c|0,b|0)|0},dynCall_iiiiii:function(a,c,b,d,f,g){return cf[(a|0)&31](c|0,b|0,d|0,f|0,g|0)|0},dynCall_diii:function(a,c,b,d){return+Ci[(a|0)&3](c|0,b|0,d|0)},dynCall_i:function(a){return Di[(a|0)&15]()|0},dynCall_iiiii:function(a,c,b,d,f){return sg[(a|0)&31](c|0,b|0,d|0,f|0)|0},dynCall_viii:function(a,c,b,d){Nf[(a|0)&15](c|0,b|0,d|0)},dynCall_v:function(a){ih[(a|0)&7]()},dynCall_iiiiiiiii:function(a,c,b,d,f,g,e,h,k){return Td[(a|0)&15](c|0,b|0,d|0,f|0,g|0,e|0,h|0,k|0)|0},dynCall_iiiiid:function(a,
c,b,d,f,g){return Ei[(a|0)&7](c|0,b|0,d|0,f|0,+ +g)|0},dynCall_viiii:function(a,c,b,d,f){Bf[(a|0)&63](c|0,b|0,d|0,f|0)}}}(h.asmGlobalArg,h.asmLibraryArg,jb);h._jpegls_encode=Ma._jpegls_encode;h.___cxa_can_catch=Ma.___cxa_can_catch;wa=h._free=Ma._free;h._jpegls_decode=Ma._jpegls_decode;h.___cxa_is_pointer_type=Ma.___cxa_is_pointer_type;var Zc=h._i64Add=Ma._i64Add,Fb=h._memmove=Ma._memmove,Id=h._i64Subtract=Ma._i64Subtract,Xd=h._memset=Ma._memset,Ra=h._malloc=Ma._malloc,Dc=h._memcpy=Ma._memcpy,Jd=h._emscripten_replace_memory=
Ma._emscripten_replace_memory;h.runPostSets=Ma.runPostSets;var Tc=h.__GLOBAL__sub_I_iostream_cpp=Ma.__GLOBAL__sub_I_iostream_cpp,fe=h._bitshift64Lshr=Ma._bitshift64Lshr,od=h.__GLOBAL__sub_I_jpegls_cpp=Ma.__GLOBAL__sub_I_jpegls_cpp,Mc=h.__GLOBAL__I_000101=Ma.__GLOBAL__I_000101,td=h._bitshift64Shl=Ma._bitshift64Shl;h.dynCall_iiiiiiii=Ma.dynCall_iiiiiiii;h.dynCall_viiiii=Ma.dynCall_viiiii;h.dynCall_iiiiiid=Ma.dynCall_iiiiiid;h.dynCall_vi=Ma.dynCall_vi;h.dynCall_vii=Ma.dynCall_vii;h.dynCall_iiiiiii=Ma.dynCall_iiiiiii;
h.dynCall_ii=Ma.dynCall_ii;h.dynCall_iiiiiiiiiiii=Ma.dynCall_iiiiiiiiiiii;h.dynCall_iiii=Ma.dynCall_iiii;h.dynCall_viiiiiiiiiiiiiii=Ma.dynCall_viiiiiiiiiiiiiii;h.dynCall_viiiiii=Ma.dynCall_viiiiii;h.dynCall_viiiiiii=Ma.dynCall_viiiiiii;h.dynCall_viiiiiiiiii=Ma.dynCall_viiiiiiiiii;h.dynCall_iii=Ma.dynCall_iii;h.dynCall_iiiiii=Ma.dynCall_iiiiii;h.dynCall_diii=Ma.dynCall_diii;h.dynCall_i=Ma.dynCall_i;h.dynCall_iiiii=Ma.dynCall_iiiii;h.dynCall_viii=Ma.dynCall_viii;h.dynCall_v=Ma.dynCall_v;h.dynCall_iiiiiiiii=
Ma.dynCall_iiiiiiiii;h.dynCall_iiiiid=Ma.dynCall_iiiiid;h.dynCall_viiii=Ma.dynCall_viiii;Oa.stackAlloc=Ma.stackAlloc;Oa.stackSave=Ma.stackSave;Oa.stackRestore=Ma.stackRestore;Oa.establishStackSpace=Ma.establishStackSpace;Oa.setTempRet0=Ma.setTempRet0;Oa.getTempRet0=Ma.getTempRet0;zb.prototype=Error();zb.prototype.constructor=zb;var ge,zd=null,Yc=function $b(){h.calledRun||kc();h.calledRun||(Yc=$b)};h.callMain=h.callMain=function(a){function b(){for(var a=0;3>a;a++)f.push(0)}k(0==jc,"cannot call main when async dependencies remain! (listen on __ATMAIN__)");
k(0==yc.length,"cannot call main when preRun functions remain to be called");a=a||[];zc||(zc=!0,ba(Lc));var d=a.length+1,f=[B(U(h.thisProgram),"i8",0)];b();for(var e=0;e<d-1;e+=1)f.push(B(U(a[e]),"i8",0)),b();f.push(0);f=B(f,"i32",0);try{var m=h._main(d,f,0);mc(m,!0)}catch(n){if(!(n instanceof zb))if("SimulateInfiniteLoop"==n)h.noExitRuntime=!0;else throw n&&"object"===typeof n&&n.stack&&h.printErr("exception thrown: "+[n,n.stack]),n;}finally{}};h.run=h.run=kc;h.exit=h.exit=mc;var pd=[];h.abort=h.abort=
ic;if(h.preInit)for("function"==typeof h.preInit&&(h.preInit=[h.preInit]);0<h.preInit.length;)h.preInit.pop()();var Kd=!0;h.noInitialRun&&(Kd=!1);kc();return h};"undefined"!==typeof b&&b.exports&&(b.exports=e)}).call(this,a("_process"),"/lib")},{_process:33,fs:5,path:32}],2:[function(a,b,e){var d={Unkown:0,Grayscale:1,AdobeRGB:2,RGB:3,CYMK:4};a=function(){function a(){}function b(a,d){for(var f=0,e=[],h,k,q=16;0<q&&!a[q-1];)q--;e.push({children:[],index:0});var r=e[0],t;for(h=0;h<q;h++){for(k=0;k<
a[h];k++){r=e.pop();for(r.children[r.index]=d[f];0<r.index;)r=e.pop();r.index++;for(e.push(r);e.length<=h;)e.push(t={children:[],index:0}),r.children[r.index]=t.children,r=t;f++}h+1<q&&(e.push(t={children:[],index:0}),r.children[r.index]=t.children,r=t)}return e[0].children}function e(a,b,d,f,h,k,q,r,M){function ka(){if(0<A)return A--,D>>A&1;D=a[b++];if(255==D){var d=a[b++];if(d)throw"unexpected marker: "+(D<<8|d).toString(16);}A=7;return D>>>7}function m(a){for(var b;null!==(b=ka());){a=a[b];if("number"===
typeof a)return a;if("object"!==typeof a)throw"invalid huffman sequence";}return null}function fa(a){for(var b=0;0<a;){var d=ka();if(null===d)return;b=b<<1|d;a--}return b}function ba(a){var b=fa(a);return b>=1<<a-1?b:b+(-1<<a)+1}function Z(a,b){var d=m(a.huffmanTableDC),d=0===d?0:ba(d);a.blockData[b]=a.pred+=d;for(d=1;64>d;){var f=m(a.huffmanTableAC),e=f&15,f=f>>4;if(0===e){if(15>f)break;d+=16}else d+=f,a.blockData[b+t[d]]=ba(e),d++}}function X(a,b){var d=m(a.huffmanTableDC),d=0===d?0:ba(d)<<M;a.blockData[b]=
a.pred+=d}function U(a,b){a.blockData[b]|=ka()<<M}function x(a,b){if(0<L)L--;else for(var d=k;d<=q;){var f=m(a.huffmanTableAC),e=f&15,f=f>>4;if(0===e){if(15>f){L=fa(f)+(1<<f)-1;break}d+=16}else d+=f,a.blockData[b+t[d]]=ba(e)*(1<<M),d++}}function n(a,b){for(var d=k,f=0;d<=q;){var e=t[d];switch(la){case 0:f=m(a.huffmanTableAC);e=f&15;f>>=4;if(0===e)15>f?(L=fa(f)+(1<<f),la=4):(f=16,la=1);else{if(1!==e)throw"invalid ACn encoding";ja=ba(e);la=f?2:3}continue;case 1:case 2:a.blockData[b+e]?a.blockData[b+
e]+=ka()<<M:(f--,0===f&&(la=2==la?3:0));break;case 3:a.blockData[b+e]?a.blockData[b+e]+=ka()<<M:(a.blockData[b+e]=ja<<M,la=0);break;case 4:a.blockData[b+e]&&(a.blockData[b+e]+=ka()<<M)}d++}4===la&&(L--,0===L&&(la=0))}var z=d.mcusPerLine,Y=b,D=0,A=0,L=0,la=0,ja,Ia=f.length,va,O,wa,Ua,lb;r=d.progressive?0===k?0===r?X:U:0===r?x:n:Z;var ha=0;d=1==Ia?f[0].blocksPerLine*f[0].blocksPerColumn:z*d.mcusPerColumn;h||(h=d);for(var ab,Ba;ha<d;){for(O=0;O<Ia;O++)f[O].pred=0;L=0;if(1==Ia)for(va=f[0],lb=0;lb<h;lb++)r(va,
64*((va.blocksPerLine+1)*(ha/va.blocksPerLine|0)+ha%va.blocksPerLine)),ha++;else for(lb=0;lb<h;lb++){for(O=0;O<Ia;O++)for(va=f[O],ab=va.h,Ba=va.v,wa=0;wa<Ba;wa++)for(Ua=0;Ua<ab;Ua++)r(va,64*((va.blocksPerLine+1)*((ha/z|0)*va.v+wa)+(ha%z*va.h+Ua)));ha++}A=0;va=a[b]<<8|a[b+1];if(65280>=va)throw"marker was not found";if(65488<=va&&65495>=va)b+=2;else break}return b-Y}function r(a,b){for(var d=b.blocksPerLine,f=b.blocksPerColumn,e=new Int32Array(64),h=0;h<f;h++)for(var k=0;k<d;k++){for(var q=b,r=64*((b.blocksPerLine+
1)*h+k),t=e,m=q.quantizationTable,fa=void 0,ba=void 0,Z=void 0,X=void 0,U=void 0,x=void 0,n=void 0,z=void 0,Y=void 0,D=void 0,D=0;64>D;D++)t[D]=q.blockData[r+D]*m[D];for(D=0;8>D;++D)m=8*D,0===t[1+m]&&0===t[2+m]&&0===t[3+m]&&0===t[4+m]&&0===t[5+m]&&0===t[6+m]&&0===t[7+m]?(Y=5793*t[0+m]+512>>10,t[0+m]=Y,t[1+m]=Y,t[2+m]=Y,t[3+m]=Y,t[4+m]=Y,t[5+m]=Y,t[6+m]=Y,t[7+m]=Y):(fa=5793*t[0+m]+128>>8,ba=5793*t[4+m]+128>>8,Z=t[2+m],X=t[6+m],U=2896*(t[1+m]-t[7+m])+128>>8,z=2896*(t[1+m]+t[7+m])+128>>8,x=t[3+m]<<4,
n=t[5+m]<<4,Y=fa-ba+1>>1,fa=fa+ba+1>>1,ba=Y,Y=3784*Z+1567*X+128>>8,Z=1567*Z-3784*X+128>>8,X=Y,Y=U-n+1>>1,U=U+n+1>>1,n=Y,Y=z+x+1>>1,x=z-x+1>>1,z=Y,Y=fa-X+1>>1,fa=fa+X+1>>1,X=Y,Y=ba-Z+1>>1,ba=ba+Z+1>>1,Z=Y,Y=2276*U+3406*z+2048>>12,U=3406*U-2276*z+2048>>12,z=Y,Y=799*x+4017*n+2048>>12,x=4017*x-799*n+2048>>12,n=Y,t[0+m]=fa+z,t[7+m]=fa-z,t[1+m]=ba+n,t[6+m]=ba-n,t[2+m]=Z+x,t[5+m]=Z-x,t[3+m]=X+U,t[4+m]=X-U);for(D=0;8>D;++D)m=D,0===t[8+m]&&0===t[16+m]&&0===t[24+m]&&0===t[32+m]&&0===t[40+m]&&0===t[48+m]&&0===
t[56+m]?(Y=5793*t[D+0]+8192>>14,t[0+m]=Y,t[8+m]=Y,t[16+m]=Y,t[24+m]=Y,t[32+m]=Y,t[40+m]=Y,t[48+m]=Y,t[56+m]=Y):(fa=5793*t[0+m]+2048>>12,ba=5793*t[32+m]+2048>>12,Z=t[16+m],X=t[48+m],U=2896*(t[8+m]-t[56+m])+2048>>12,z=2896*(t[8+m]+t[56+m])+2048>>12,x=t[24+m],n=t[40+m],Y=fa-ba+1>>1,fa=fa+ba+1>>1,ba=Y,Y=3784*Z+1567*X+2048>>12,Z=1567*Z-3784*X+2048>>12,X=Y,Y=U-n+1>>1,U=U+n+1>>1,n=Y,Y=z+x+1>>1,x=z-x+1>>1,z=Y,Y=fa-X+1>>1,fa=fa+X+1>>1,X=Y,Y=ba-Z+1>>1,ba=ba+Z+1>>1,Z=Y,Y=2276*U+3406*z+2048>>12,U=3406*U-2276*
z+2048>>12,z=Y,Y=799*x+4017*n+2048>>12,x=4017*x-799*n+2048>>12,n=Y,t[0+m]=fa+z,t[56+m]=fa-z,t[8+m]=ba+n,t[48+m]=ba-n,t[16+m]=Z+x,t[40+m]=Z-x,t[24+m]=X+U,t[32+m]=X-U);for(D=0;64>D;++D)fa=r+D,ba=t[D],ba=ba<=-2056/q.bitConversion?0:ba>=2024/q.bitConversion?255/q.bitConversion:ba+2056/q.bitConversion>>4,q.blockData[fa]=ba}return b.blockData}function q(a){return 0>=a?0:255<=a?255:a|0}var t=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,
57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);a.prototype={load:function(a){var b=function(a){this.parse(a);if(this.onload)this.onload()}.bind(this);if(-1<a.indexOf("data:")){var d=a.indexOf("base64,")+7;a=atob(a.substring(d));for(var d=new Uint8Array(a.length),f=a.length-1;0<=f;f--)d[f]=a.charCodeAt(f);b(a)}else{var e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";e.onload=function(){var a=new Uint8Array(e.response);b(a)}.bind(this);e.send(null)}},
parse:function(a){function f(){var b=a[E]<<8|a[E+1];E+=2;return b}function q(){var b=f(),b=a.subarray(E,E+b-2);E+=b.length;return b}function w(a){for(var b=Math.ceil(a.samplesPerLine/8/a.maxH),d=Math.ceil(a.scanLines/8/a.maxV),f=0;f<a.components.length;f++){D=a.components[f];var e=Math.ceil(Math.ceil(a.samplesPerLine/8)*D.h/a.maxH),h=Math.ceil(Math.ceil(a.scanLines/8)*D.v/a.maxV);D.blockData=new Int16Array(64*d*D.v*(b*D.h+1));D.blocksPerLine=e;D.blocksPerColumn=h}a.mcusPerLine=b;a.mcusPerColumn=d}
var E=0,P=null,da=null,aa,M,ka=[],m=[],fa=[],ba=f();if(65496!=ba)throw"SOI not found";for(ba=f();65497!=ba;){var Z,X;switch(ba){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:Z=q();65504===ba&&74===Z[0]&&70===Z[1]&&73===Z[2]&&70===Z[3]&&0===Z[4]&&(P={version:{major:Z[5],minor:Z[6]},densityUnits:Z[7],xDensity:Z[8]<<8|Z[9],yDensity:Z[10]<<8|Z[11],thumbWidth:Z[12],
thumbHeight:Z[13],thumbData:Z.subarray(14,14+3*Z[12]*Z[13])});65518===ba&&65===Z[0]&&100===Z[1]&&111===Z[2]&&98===Z[3]&&101===Z[4]&&0===Z[5]&&(da={version:Z[6],flags0:Z[7]<<8|Z[8],flags1:Z[9]<<8|Z[10],transformCode:Z[11]});break;case 65499:for(ba=f()+E-2;E<ba;){var U=a[E++],x=new Int32Array(64);if(0===U>>4)for(Z=0;64>Z;Z++)x[t[Z]]=a[E++];else if(1===U>>4)for(Z=0;64>Z;Z++)x[t[Z]]=f();else throw"DQT: invalid table spec";ka[U&15]=x}break;case 65472:case 65473:case 65474:if(aa)throw"Only single frame JPEGs supported";
f();aa={};aa.extended=65473===ba;aa.progressive=65474===ba;aa.precision=a[E++];aa.scanLines=f();aa.samplesPerLine=f();aa.components=[];aa.componentIds={};Z=a[E++];for(var n=x=0,ba=0;ba<Z;ba++){U=a[E];X=a[E+1]>>4;var z=a[E+1]&15;x<X&&(x=X);n<z&&(n=z);var Y=a[E+2];X=aa.components.push({h:X,v:z,quantizationTable:ka[Y],quantizationTableId:Y,bitConversion:255/((1<<aa.precision)-1)});aa.componentIds[U]=X-1;E+=3}aa.maxH=x;aa.maxV=n;w(aa);break;case 65476:U=f();for(ba=2;ba<U;){x=a[E++];n=new Uint8Array(16);
for(Z=X=0;16>Z;Z++,E++)X+=n[Z]=a[E];z=new Uint8Array(X);for(Z=0;Z<X;Z++,E++)z[Z]=a[E];ba+=17+X;(0===x>>4?fa:m)[x&15]=b(n,z)}break;case 65501:f();M=f();break;case 65498:f();U=a[E++];Z=[];for(var D,ba=0;ba<U;ba++)x=aa.componentIds[a[E++]],D=aa.components[x],x=a[E++],D.huffmanTableDC=fa[x>>4],D.huffmanTableAC=m[x&15],Z.push(D);ba=a[E++];U=a[E++];x=a[E++];ba=e(a,E,aa,Z,M,ba,U,x>>4,x&15);E+=ba;break;default:if(255==a[E-3]&&192<=a[E-2]&&254>=a[E-2]){E-=3;break}throw"unknown JPEG marker "+ba.toString(16);
}ba=f()}this.width=aa.samplesPerLine;this.height=aa.scanLines;this.jfif=P;this.adobe=da;this.components=[];switch(aa.components.length){case 1:this.colorspace=d.Grayscale;break;case 3:this.colorspace=this.adobe?d.AdobeRGB:d.RGB;break;case 4:this.colorspace=d.CYMK;break;default:this.colorspace=d.Unknown}for(ba=0;ba<aa.components.length;ba++)D=aa.components[ba],D.quantizationTable||null===D.quantizationTableId||(D.quantizationTable=ka[D.quantizationTableId]),this.components.push({output:r(aa,D),scaleX:D.h/
aa.maxH,scaleY:D.v/aa.maxV,blocksPerLine:D.blocksPerLine,blocksPerColumn:D.blocksPerColumn,bitConversion:D.bitConversion})},getData16:function(a,b){if(1!==this.components.length)throw"Unsupported color mode";var d=this.width/a,f=this.height/b,e,h,k,q,r,t=0,m=this.components.length,fa=new Uint16Array(a*b*m),ba=new Uint16Array((this.components[0].blocksPerLine<<3)*this.components[0].blocksPerColumn*8);for(r=0;r<m;r++){e=this.components[r];h=e.blocksPerLine;k=e.blocksPerColumn;for(var Z=h<<3,X,U=0,x=
0;x<k;x++)for(var n=x<<3,z=0;z<h;z++){var Y=64*((e.blocksPerLine+1)*x+z),t=0,D=z<<3;for(q=0;8>q;q++)for(U=(n+q)*Z,X=0;8>X;X++)ba[U+D+X]=e.output[Y+t++]}h=e.scaleX*d;e=e.scaleY*f;t=r;for(q=0;q<b;q++)for(k=0;k<a;k++)U=0|q*e,X=0|k*h,X=U*Z+X,fa[t]=ba[X],t+=m}return fa},getData:function(a,b){var d=this.width/a,f=this.height/b,e,h,k,r,t,ka=0,m,fa=this.components.length,ba=a*b*fa,Z=new Uint8Array(ba);m=new Uint8Array((this.components[0].blocksPerLine<<3)*this.components[0].blocksPerColumn*8);for(t=0;t<fa;t++){e=
this.components[t];h=e.blocksPerLine;k=e.blocksPerColumn;for(var X=h<<3,U,x=0,n=0;n<k;n++)for(var z=n<<3,Y=0;Y<h;Y++){var D=64*((e.blocksPerLine+1)*n+Y),ka=0,A=Y<<3;for(r=0;8>r;r++)for(x=(z+r)*X,U=0;8>U;U++)m[x+A+U]=e.output[D+ka++]*e.bitConversion}h=e.scaleX*d;e=e.scaleY*f;ka=t;for(r=0;r<b;r++)for(k=0;k<a;k++)x=0|r*e,U=0|k*h,U=x*X+U,Z[ka]=m[U],ka+=fa}switch(fa){case 1:case 2:break;case 3:t=!0;this.adobe&&this.adobe.transformCode?t=!0:"undefined"!==typeof this.colorTransform&&(t=!!this.colorTransform);
if(t)for(t=0;t<ba;t+=fa)d=Z[t],f=Z[t+1],m=Z[t+2],ka=q(d-179.456+1.402*m),m=q(d+135.459-.344*f-.714*m),d=q(d-226.816+1.772*f),Z[t]=ka,Z[t+1]=m,Z[t+2]=d;break;case 4:if(!this.adobe)throw"Unsupported color mode (4 components)";t=!1;this.adobe&&this.adobe.transformCode?t=!0:"undefined"!==typeof this.colorTransform&&(t=!!this.colorTransform);if(t)for(t=0;t<ba;t+=fa)d=Z[t],f=Z[t+1],m=Z[t+2],ka=q(434.456-d-1.402*m),m=q(119.541-d+.344*f+.714*m),d=q(481.816-d-1.772*f),Z[t]=ka,Z[t+1]=m,Z[t+2]=d;break;default:throw"Unsupported color mode";
}return Z}};return a}();"undefined"!==typeof b&&b.exports&&(b.exports={JpegImage:a})},{}],3:[function(a,b,e){var d=d||("undefined"!==typeof a?a("../lib/charLS-DynamicMemory-browser.js"):null);a=function(){function a(){}var b;a.prototype={decodeJPEGLS:function(a,f){if("undefined"===typeof d)throw"No JPEG-LS decoder loaded";if(!b&&(b=d(),!b||!b._jpegls_decode))throw"JPEG-LS failed to initialize";var e=b._malloc(a.length);b.writeArrayToMemory(a,e);var t=b._malloc(4),y=b._malloc(4),G=b._malloc(4),B=b._malloc(4),
w=b._malloc(4),E=b._malloc(4),P=b._malloc(4),da=b._malloc(4),aa=b._malloc(4),M=b.ccall("jpegls_decode","number","number number number number number number number number number number number".split(" "),[e,a.length,t,y,G,B,w,E,da,P,aa]),ka=b.getValue(G,"i32"),m=b.getValue(B,"i32"),fa=b.getValue(w,"i32");b.getValue(E,"i32");var ba=b.getValue(da,"i32");b.getValue(P,"i32");b.getValue(aa,"i32");var P=void 0,Z=b.getValue(t,"*");8>=fa?(P=new Uint8Array(ka*m*ba),P.set(new Uint8Array(b.HEAP8.buffer,Z,P.length))):
f?(P=new Int16Array(ka*m*ba),P.set(new Int16Array(b.HEAP16.buffer,Z,P.length))):(P=new Uint16Array(ka*m*ba),P.set(new Uint16Array(b.HEAP16.buffer,Z,P.length)));b._free(e);b._free(Z);b._free(t);b._free(y);b._free(G);b._free(B);b._free(w);b._free(E);b._free(da);b._free(aa);if(0!==M&&6!==M)throw"JPEG-LS decoder failed to decode frame (error code "+M+")";e={};e.columns=ka;e.rows=m;e.pixelData=P;return e}};return a}();"undefined"!==typeof b&&b.exports&&(b.exports=a)},{"../lib/charLS-DynamicMemory-browser.js":1}],
4:[function(a,b,e){function d(a){y.verbosity>=y.VERBOSITY_LEVELS.warnings&&console.log("Warning: "+a)}function f(a,b,d){Object.defineProperty(a,b,{value:d,enumerable:!0,configurable:!0,writable:!1});return d}function k(a){for(var b=1,d=0;a>b;)b<<=1,d++;return d}function h(a,b){return a[b]<<8|a[b+1]}function r(a,b){return(a[b]<<24|a[b+1]<<16|a[b+2]<<8|a[b+3])>>>0}a=function(){function a(){this.failOnCorruptedImage=!1}function b(a,d,f){a=f.xcb_;f=f.ycb_;var e=1<<a,h=1<<f,k=d.tbx0>>a,m=d.tby0>>f,n=d.tbx1+
e-1>>a,q=d.tby1+h-1>>f,r=d.resolution.precinctParameters,x=[],t=[],w,z,B,E;for(z=m;z<q;z++)for(w=k;w<n;w++)if(B={cbx:w,cby:z,tbx0:e*w,tby0:h*z,tbx1:e*(w+1),tby1:h*(z+1)},B.tbx0_=Math.max(d.tbx0,B.tbx0),B.tby0_=Math.max(d.tby0,B.tby0),B.tbx1_=Math.min(d.tbx1,B.tbx1),B.tby1_=Math.min(d.tby1,B.tby1),E=Math.floor((B.tbx0_-d.tbx0)/r.precinctWidthInSubband)+Math.floor((B.tby0_-d.tby0)/r.precinctHeightInSubband)*r.numprecinctswide,B.precinctNumber=E,B.subbandType=d.type,B.Lblock=3,!(B.tbx1_<=B.tbx0_||B.tby1_<=
B.tby0_)){x.push(B);var y=t[E];void 0!==y?(w<y.cbxMin?y.cbxMin=w:w>y.cbxMax&&(y.cbxMax=w),z<y.cbyMin?y.cbxMin=z:z>y.cbyMax&&(y.cbyMax=z)):t[E]=y={cbxMin:w,cbyMin:z,cbxMax:w,cbyMax:z};B.precinct=y}d.codeblockParameters={codeblockWidth:a,codeblockHeight:f,numcodeblockwide:n-k+1,numcodeblockhigh:q-m+1};d.codeblocks=x;d.precincts=t}function f(a,b,d){var e=[];a=a.subbands;for(var h=0,k=a.length;h<k;h++)for(var m=a[h].codeblocks,n=0,q=m.length;n<q;n++){var r=m[n];r.precinctNumber===b&&e.push(r)}return{layerNumber:d,
codeblocks:e}}function e(a){var b=a.tiles[a.currentTile.index],d=b.codingStyleDefaultParameters.layersCount,h=a.SIZ.Csiz,k=0;for(a=0;a<h;a++)k=Math.max(k,b.components[a].codingStyleParameters.decompositionLevelsCount);var m=0,n=0,q=0,r=0;this.nextPacket=function(){for(;m<d;m++){for(;n<=k;n++){for(;q<h;q++){var a=b.components[q];if(!(n>a.codingStyleParameters.decompositionLevelsCount)){for(var a=a.resolutions[n],e=a.precinctParameters.numprecincts;r<e;)return a=f(a,r,m),r++,a;r=0}}q=0}n=0}}}function t(a){var b=
a.tiles[a.currentTile.index],d=b.codingStyleDefaultParameters.layersCount,e=a.SIZ.Csiz,h=0;for(a=0;a<e;a++)h=Math.max(h,b.components[a].codingStyleParameters.decompositionLevelsCount);var k=0,m=0,n=0,q=0;this.nextPacket=function(){for(;k<=h;k++){for(;m<d;m++){for(;n<e;n++){var a=b.components[n];if(!(k>a.codingStyleParameters.decompositionLevelsCount)){for(var a=a.resolutions[k],r=a.precinctParameters.numprecincts;q<r;)return a=f(a,q,m),q++,a;q=0}}n=0}m=0}}}function G(a){var b=a.tiles[a.currentTile.index],
d=b.codingStyleDefaultParameters.layersCount,e=a.SIZ.Csiz,h,k,m,n,q=0;for(m=0;m<e;m++)q=Math.max(q,b.components[m].codingStyleParameters.decompositionLevelsCount);var r=new Int32Array(q+1);for(k=0;k<=q;++k){for(m=a=0;m<e;++m){var x=b.components[m].resolutions;k<x.length&&(a=Math.max(a,x[k].precinctParameters.numprecincts))}r[k]=a}n=m=k=h=0;this.nextPacket=function(){for(;k<=q;k++){for(;n<r[k];n++){for(;m<e;m++){var a=b.components[m];if(!(k>a.codingStyleParameters.decompositionLevelsCount||(a=a.resolutions[k],
n>=a.precinctParameters.numprecincts))){for(;h<d;)return a=f(a,n,h),h++,a;h=0}}m=0}n=0}}}function M(a){var b=a.tiles[a.currentTile.index],d=b.codingStyleDefaultParameters.layersCount,e=a.SIZ.Csiz,h=fa(b),k=0,n=0,q=0,r=0,x=0;this.nextPacket=function(){for(;x<h.maxNumHigh;x++){for(;r<h.maxNumWide;r++){for(;q<e;q++){for(var a=b.components[q],t=a.codingStyleParameters.decompositionLevelsCount;n<=t;n++){var w=a.resolutions[n],D=m(r,x,h.components[q].resolutions[n],h,w);if(null!==D){for(;k<d;)return a=
f(w,D,k),k++,a;k=0}}n=0}q=0}r=0}}}function ka(a){var b=a.tiles[a.currentTile.index],d=b.codingStyleDefaultParameters.layersCount,e=a.SIZ.Csiz,h=fa(b),k=0,n=0,q=0,r=0,x=0;this.nextPacket=function(){for(;q<e;++q){for(var a=b.components[q],t=h.components[q],w=a.codingStyleParameters.decompositionLevelsCount;x<t.maxNumHigh;x++){for(;r<t.maxNumWide;r++){for(;n<=w;n++){var D=a.resolutions[n],B=m(r,x,t.resolutions[n],t,D);if(null!==B){for(;k<d;)return a=f(D,B,k),k++,a;k=0}}n=0}r=0}x=0}}}function m(a,b,d,
f,e){a*=f.minWidth;b*=f.minHeight;return 0!==a%d.width||0!==b%d.height?null:a/d.height+b/d.width*e.precinctParameters.numprecinctswide}function fa(a){for(var b=a.components.length,d=Number.MAX_VALUE,f=Number.MAX_VALUE,e=0,h=0,k=Array(b),m=0;m<b;m++){for(var n=a.components[m],q=n.codingStyleParameters.decompositionLevelsCount,r=Array(q+1),x=Number.MAX_VALUE,t=Number.MAX_VALUE,w=0,B=0,z=1;0<=q;--q){var E=n.resolutions[q],y=z*E.precinctParameters.precinctWidth,M=z*E.precinctParameters.precinctHeight,
x=Math.min(x,y),t=Math.min(t,M),w=Math.max(w,E.precinctParameters.numprecinctswide),B=Math.max(B,E.precinctParameters.numprecinctshigh);r[q]={width:y,height:M};z<<=1}d=Math.min(d,x);f=Math.min(f,t);e=Math.max(e,w);h=Math.max(h,B);k[m]={resolutions:r,minWidth:x,minHeight:t,maxNumWide:w,maxNumHigh:B}}return{components:k,minWidth:d,minHeight:f,maxNumWide:e,maxNumHigh:h}}function ba(a,b,d,f){function e(a){for(;r<a;){if(d+n>=b.length)throw Error("Unexpected EOF");var f=b[d+n];n++;x?(q=q<<7|f,r+=7,x=!1):
(q=q<<8|f,r+=8);255===f&&(x=!0)}r-=a;return q>>>r&(1<<a)-1}function h(a){return 255===b[d+n-1]&&b[d+n]===a?(n+=1,!0):255===b[d+n]&&b[d+n+1]===a?(n+=2,!0):!1}function m(){if(0===e(1))return 1;if(0===e(1))return 2;var a=e(2);if(3>a)return a+3;a=e(5);if(31>a)return a+6;a=e(7);return a+37}var n=0,q,r=0,x=!1,t=a.COD.sopMarkerUsed,w=a.COD.ephMarkerUsed;for(a=a.tiles[a.currentTile.index].packetsIterator;n<f;)try{r=0;x&&(n++,x=!1);t&&h(145)&&(n+=4);var B=a.nextPacket();if(void 0===B)return;if(e(1)){for(var z=
B.layerNumber,E=[],y,M=0,G=B.codeblocks.length;M<G;M++){y=B.codeblocks[M];var P=y.precinct,Y=y.cbx-P.cbxMin,Z=y.cby-P.cbyMin,ka=!1,da=!1,aa;if(void 0!==y.included)ka=!!e(1);else{var P=y.precinct,fa,N;if(void 0!==P.inclusionTree)fa=P.inclusionTree;else{var ba=P.cbxMax-P.cbxMin+1,bc=P.cbyMax-P.cbyMin+1;fa=new U(ba,bc);N=new X(ba,bc);P.inclusionTree=fa;P.zeroBitPlanesTree=N}for(fa.reset(Y,Z,z);;){if(n>=b.length)return;if(fa.isAboveThreshold())break;if(fa.isKnown())fa.nextLevel();else if(e(1))if(fa.setKnown(),
fa.isLeaf()){ka=da=y.included=!0;break}else fa.nextLevel();else fa.incrementValue()}}if(ka){if(da){N=P.zeroBitPlanesTree;for(N.reset(Y,Z);;){if(n>=b.length)return;if(e(1)){if(aa=!N.nextLevel())break}else N.incrementValue()}y.zeroBitPlanes=N.value}for(var ec=m();e(1);)y.Lblock++;var Nc=k(ec),Oa=e((ec<1<<Nc?Nc-1:Nc)+y.Lblock);E.push({codeblock:y,codingpasses:ec,dataLength:Oa})}}r=0;x&&(n++,x=!1);for(w&&h(146);0<E.length;){var Eb=E.shift();y=Eb.codeblock;void 0===y.data&&(y.data=[]);y.data.push({data:b,
start:d+n,end:d+n+Eb.dataLength,codingpasses:Eb.codingpasses});n+=Eb.dataLength}}}catch(Oc){return}return n}var Z={LL:0,LH:1,HL:1,HH:2};a.prototype={parse:function(a){if(65359===h(a,0))this.parseCodestream(a,0,a.length);else for(var b=0,f=a.length;b<f;){var e=8,k=r(a,b),m=r(a,b+4),b=b+e;1===k&&(k=4294967296*r(a,b)+r(a,b+4),b+=8,e+=8);0===k&&(k=f-b+e);if(k<e)throw Error("JPX Error: Invalid box field size");e=k-e;k=!0;switch(m){case 1785737832:k=!1;break;case 1668246642:m=a[b];if(1===m)switch(m=r(a,
b+3),m){case 16:case 17:case 18:break;default:d("Unknown colorspace "+m)}else 2===m&&y.verbosity>=y.VERBOSITY_LEVELS.infos&&console.log("Info: ICC profile not supported");break;case 1785737827:this.parseCodestream(a,b,b+e);break;case 1783636E3:218793738!==r(a,b)&&d("Invalid JP2 signature");break;case 1783634458:case 1718909296:case 1920099697:case 1919251232:case 1768449138:break;default:var n=String.fromCharCode(m>>24&255,m>>16&255,m>>8&255,m&255);d("Unsupported header type "+m+" ("+n+")")}k&&(b+=
e)}},parseImageProperties:function(a){for(var b=a.getByte();0<=b;){var d=b,b=a.getByte();if(65361===(d<<8|b)){a.skip(4);var b=a.getInt32()>>>0,d=a.getInt32()>>>0,f=a.getInt32()>>>0,e=a.getInt32()>>>0;a.skip(16);a=a.getUint16();this.width=b-f;this.height=d-e;this.componentsCount=a;this.bitsPerComponent=8;return}}throw Error("JPX Error: No size marker found in JPX stream");},parseCodestream:function(a,f,k){var m={};try{for(var n=!1,B=f;B+1<k;){var y=h(a,B),B=B+2,E=0,U,X,fa,ha,ab,Ba;switch(y){case 65359:m.mainHeader=
!0;break;case 65497:break;case 65361:var E=h(a,B),nb={};nb.Xsiz=r(a,B+4);nb.Ysiz=r(a,B+8);nb.XOsiz=r(a,B+12);nb.YOsiz=r(a,B+16);nb.XTsiz=r(a,B+20);nb.YTsiz=r(a,B+24);nb.XTOsiz=r(a,B+28);nb.YTOsiz=r(a,B+32);var Ra=h(a,B+36);nb.Csiz=Ra;var dc=[];U=B+38;for(var gc=0;gc<Ra;gc++){var cc={precision:(a[U]&127)+1,isSigned:!!(a[U]&128),XRsiz:a[U+1],YRsiz:a[U+1]},zb=cc,kc=nb;zb.x0=Math.ceil(kc.XOsiz/zb.XRsiz);zb.x1=Math.ceil(kc.Xsiz/zb.XRsiz);zb.y0=Math.ceil(kc.YOsiz/zb.YRsiz);zb.y1=Math.ceil(kc.Ysiz/zb.YRsiz);
zb.width=zb.x1-zb.x0;zb.height=zb.y1-zb.y0;dc.push(cc)}m.SIZ=nb;m.components=dc;for(var mc=m,ic=dc,vb=mc.SIZ,mb=void 0,nc=[],N=Math.ceil((vb.Xsiz-vb.XTOsiz)/vb.XTsiz),ed=Math.ceil((vb.Ysiz-vb.YTOsiz)/vb.YTsiz),bc=0;bc<ed;bc++)for(var ec=0;ec<N;ec++)mb={},mb.tx0=Math.max(vb.XTOsiz+ec*vb.XTsiz,vb.XOsiz),mb.ty0=Math.max(vb.YTOsiz+bc*vb.YTsiz,vb.YOsiz),mb.tx1=Math.min(vb.XTOsiz+(ec+1)*vb.XTsiz,vb.Xsiz),mb.ty1=Math.min(vb.YTOsiz+(bc+1)*vb.YTsiz,vb.Ysiz),mb.width=mb.tx1-mb.tx0,mb.height=mb.ty1-mb.ty0,mb.components=
[],nc.push(mb);mc.tiles=nc;for(var Nc=0,Oa=vb.Csiz;Nc<Oa;Nc++)for(var Eb=ic[Nc],Oc=0,tc=nc.length;Oc<tc;Oc++){var hc={},mb=nc[Oc];hc.tcx0=Math.ceil(mb.tx0/Eb.XRsiz);hc.tcy0=Math.ceil(mb.ty0/Eb.YRsiz);hc.tcx1=Math.ceil(mb.tx1/Eb.XRsiz);hc.tcy1=Math.ceil(mb.ty1/Eb.YRsiz);hc.width=hc.tcx1-hc.tcx0;hc.height=hc.tcy1-hc.tcy0;mb.components[Nc]=hc}m.QCC=[];m.COC=[];break;case 65372:var E=h(a,B),fd={};U=B+2;X=a[U++];switch(X&31){case 0:ha=8;ab=!0;break;case 1:ha=16;ab=!1;break;case 2:ha=16;ab=!0;break;default:throw Error("JPX Error: Invalid SQcd value "+
X);}fd.noQuantization=8===ha;fd.scalarExpounded=ab;fd.guardBits=X>>5;for(fa=[];U<E+B;){var wc={};8===ha?(wc.epsilon=a[U++]>>3,wc.mu=0):(wc.epsilon=a[U]>>3,wc.mu=(a[U]&7)<<8|a[U+1],U+=2);fa.push(wc)}fd.SPqcds=fa;m.mainHeader?m.QCD=fd:(m.currentTile.QCD=fd,m.currentTile.QCC=[]);break;case 65373:var E=h(a,B),Gb={};U=B+2;var Ab;257>m.SIZ.Csiz?Ab=a[U++]:(Ab=h(a,U),U+=2);X=a[U++];switch(X&31){case 0:ha=8;ab=!0;break;case 1:ha=16;ab=!1;break;case 2:ha=16;ab=!0;break;default:throw Error("JPX Error: Invalid SQcd value "+
X);}Gb.noQuantization=8===ha;Gb.scalarExpounded=ab;Gb.guardBits=X>>5;for(fa=[];U<E+B;)wc={},8===ha?(wc.epsilon=a[U++]>>3,wc.mu=0):(wc.epsilon=a[U]>>3,wc.mu=(a[U]&7)<<8|a[U+1],U+=2),fa.push(wc);Gb.SPqcds=fa;m.mainHeader?m.QCC[Ab]=Gb:m.currentTile.QCC[Ab]=Gb;break;case 65362:var E=h(a,B),db={};U=B+2;var Jc=a[U++];db.entropyCoderWithCustomPrecincts=!!(Jc&1);db.sopMarkerUsed=!!(Jc&2);db.ephMarkerUsed=!!(Jc&4);db.progressionOrder=a[U++];db.layersCount=h(a,U);U+=2;db.multipleComponentTransform=a[U++];db.decompositionLevelsCount=
a[U++];db.xcb=(a[U++]&15)+2;db.ycb=(a[U++]&15)+2;var ib=a[U++];db.selectiveArithmeticCodingBypass=!!(ib&1);db.resetContextProbabilities=!!(ib&2);db.terminationOnEachCodingPass=!!(ib&4);db.verticalyStripe=!!(ib&8);db.predictableTermination=!!(ib&16);db.segmentationSymbolUsed=!!(ib&32);db.reversibleTransformation=a[U++];if(db.entropyCoderWithCustomPrecincts){for(var Kc=[];U<E+B;){var Ec=a[U++];Kc.push({PPx:Ec&15,PPy:Ec>>4})}db.precinctsSizes=Kc}var pc=[];db.selectiveArithmeticCodingBypass&&pc.push("selectiveArithmeticCodingBypass");
db.resetContextProbabilities&&pc.push("resetContextProbabilities");db.terminationOnEachCodingPass&&pc.push("terminationOnEachCodingPass");db.verticalyStripe&&pc.push("verticalyStripe");db.predictableTermination&&pc.push("predictableTermination");if(0<pc.length)throw n=!0,Error("JPX Error: Unsupported COD options ("+pc.join(", ")+")");m.mainHeader?m.COD=db:(m.currentTile.COD=db,m.currentTile.COC=[]);break;case 65424:E=h(a,B);Ba={};Ba.index=h(a,B+2);Ba.length=r(a,B+4);Ba.dataEnd=Ba.length+B-2;Ba.partIndex=
a[B+8];Ba.partsCount=a[B+9];m.mainHeader=!1;0===Ba.partIndex&&(Ba.COD=m.COD,Ba.COC=m.COC.slice(0),Ba.QCD=m.QCD,Ba.QCC=m.QCC.slice(0));m.currentTile=Ba;break;case 65427:Ba=m.currentTile;if(0===Ba.partIndex){for(var qc=m,Uc=qc.SIZ.Csiz,Bd=qc.tiles[Ba.index],Vc=0;Vc<Uc;Vc++){var xc=Bd.components[Vc];xc.quantizationParameters=void 0!==qc.currentTile.QCC[Vc]?qc.currentTile.QCC[Vc]:qc.currentTile.QCD;xc.codingStyleParameters=void 0!==qc.currentTile.COC[Vc]?qc.currentTile.COC[Vc]:qc.currentTile.COD}Bd.codingStyleDefaultParameters=
qc.currentTile.COD;for(var Qb=m,fc=Qb.tiles[Qb.currentTile.index],Hb=Qb.SIZ.Csiz,Wc=0;Wc<Hb;Wc++){for(var ob=fc.components[Wc],Xc=ob.codingStyleParameters.decompositionLevelsCount,Ib=[],Rb=[],jb=0;jb<=Xc;jb++){var yc,Lc=jb,Qc=ob.codingStyleParameters,Tb={};Qc.entropyCoderWithCustomPrecincts?(Tb.PPx=Qc.precinctsSizes[Lc].PPx,Tb.PPy=Qc.precinctsSizes[Lc].PPy):(Tb.PPx=15,Tb.PPy=15);Tb.xcb_=0<Lc?Math.min(Qc.xcb,Tb.PPx-1):Math.min(Qc.xcb,Tb.PPx);Tb.ycb_=0<Lc?Math.min(Qc.ycb,Tb.PPy-1):Math.min(Qc.ycb,Tb.PPy);
yc=Tb;var Ya={},zc=1<<Xc-jb;Ya.trx0=Math.ceil(ob.tcx0/zc);Ya.try0=Math.ceil(ob.tcy0/zc);Ya.trx1=Math.ceil(ob.tcx1/zc);Ya.try1=Math.ceil(ob.tcy1/zc);Ya.resLevel=jb;var uc=Ya,nd=1<<yc.PPx,Ed=1<<yc.PPy,Fd=0===uc.resLevel,jc=1<<yc.PPx+(Fd?0:-1),Gd=1<<yc.PPy+(Fd?0:-1),Yc=uc.trx1>uc.trx0?Math.ceil(uc.trx1/nd)-Math.floor(uc.trx0/nd):0,dd=uc.try1>uc.try0?Math.ceil(uc.try1/Ed)-Math.floor(uc.try0/Ed):0;uc.precinctParameters={precinctWidth:nd,precinctHeight:Ed,numprecinctswide:Yc,numprecinctshigh:dd,numprecincts:Yc*
dd,precinctWidthInSubband:jc,precinctHeightInSubband:Gd};Ib.push(Ya);var Qa;if(0===jb)Qa={type:"LL"},Qa.tbx0=Math.ceil(ob.tcx0/zc),Qa.tby0=Math.ceil(ob.tcy0/zc),Qa.tbx1=Math.ceil(ob.tcx1/zc),Qa.tby1=Math.ceil(ob.tcy1/zc),Qa.resolution=Ya,b(Qb,Qa,yc),Rb.push(Qa),Ya.subbands=[Qa];else{var Pb=1<<Xc-jb+1,cd=[];Qa={type:"HL"};Qa.tbx0=Math.ceil(ob.tcx0/Pb-.5);Qa.tby0=Math.ceil(ob.tcy0/Pb);Qa.tbx1=Math.ceil(ob.tcx1/Pb-.5);Qa.tby1=Math.ceil(ob.tcy1/Pb);Qa.resolution=Ya;b(Qb,Qa,yc);Rb.push(Qa);cd.push(Qa);
Qa={type:"LH"};Qa.tbx0=Math.ceil(ob.tcx0/Pb);Qa.tby0=Math.ceil(ob.tcy0/Pb-.5);Qa.tbx1=Math.ceil(ob.tcx1/Pb);Qa.tby1=Math.ceil(ob.tcy1/Pb-.5);Qa.resolution=Ya;b(Qb,Qa,yc);Rb.push(Qa);cd.push(Qa);Qa={type:"HH"};Qa.tbx0=Math.ceil(ob.tcx0/Pb-.5);Qa.tby0=Math.ceil(ob.tcy0/Pb-.5);Qa.tbx1=Math.ceil(ob.tcx1/Pb-.5);Qa.tby1=Math.ceil(ob.tcy1/Pb-.5);Qa.resolution=Ya;b(Qb,Qa,yc);Rb.push(Qa);cd.push(Qa);Ya.subbands=cd}}ob.resolutions=Ib;ob.subbands=Rb}var ld=fc.codingStyleDefaultParameters.progressionOrder;switch(ld){case 0:fc.packetsIterator=
new e(Qb);break;case 1:fc.packetsIterator=new t(Qb);break;case 2:fc.packetsIterator=new G(Qb);break;case 3:fc.packetsIterator=new M(Qb);break;case 4:fc.packetsIterator=new ka(Qb);break;default:throw Error("JPX Error: Unsupported progression order "+ld);}}E=Ba.dataEnd-B;ba(m,a,B,E);break;case 65365:case 65367:case 65368:case 65380:E=h(a,B);break;case 65363:throw Error("JPX Error: Codestream code 0xFF53 (COC) is not implemented");default:throw Error("JPX Error: Unknown codestream code: "+y.toString(16));
}B+=E}}catch(Wb){if(n||this.failOnCorruptedImage)throw Wb;d("Trying to recover from "+Wb.message)}for(var Fc=m.components,ra=m.SIZ.Csiz,qb=[],Cc=0,Hd=m.tiles.length;Cc<Hd;Cc++){var Ma=m.tiles[Cc],Zc=[],Fb;for(Fb=0;Fb<ra;Fb++){for(var Id=Zc,Xd=Fb,Dc=Ma.components[Fb],Jd=Dc.codingStyleParameters,Tc=Dc.quantizationParameters,fe=Jd.decompositionLevelsCount,od=Tc.SPqcds,Mc=Tc.scalarExpounded,td=Tc.guardBits,ge=Jd.segmentationSymbolUsed,zd=m.components[Fb].precision,pd=Jd.reversibleTransformation,Kd=pd?
new Y:new z,Bb=[],$b=0,Gc=0;Gc<=fe;Gc++){for(var gd=Dc.resolutions[Gc],lc=gd.trx1-gd.trx0,Ie=gd.try1-gd.try0,qe=new Float32Array(lc*Ie),re=0,Ve=gd.subbands.length;re<Ve;re++){var hd,se;Mc?(hd=od[$b].mu,se=od[$b].epsilon,$b++):(hd=od[0].mu,se=od[0].epsilon+(0<Gc?1-Gc:0));for(var We=gd.subbands[re],lf=Z[We.type],Ad=pd?1:Math.pow(2,zd+lf-se)*(1+hd/2048),Je=qe,qd=lc,wd=We,Xe=Ad,Ld=td+se-1,he=pd,Wf=ge,Ye=wd.tbx0,Zd=wd.tby0,Sd=wd.tbx1-wd.tbx0,mf=wd.codeblocks,Xf="H"===wd.type.charAt(0)?1:0,Yf="H"===wd.type.charAt(1)?
qd:0,$d=0,oe=mf.length;$d<oe;++$d){var yd=mf[$d],df=yd.tbx1_-yd.tbx0_,Of=yd.tby1_-yd.tby0_;if(0!==df&&0!==Of&&void 0!==yd.data){var Rd,Be;Rd=new x(df,Of,yd.subbandType,yd.zeroBitPlanes,Ld);Be=2;var ef=yd.data,ff=0,Pf=0,bd,gf,Yd;bd=0;for(gf=ef.length;bd<gf;bd++)Yd=ef[bd],ff+=Yd.end-Yd.start,Pf+=Yd.codingpasses;var tg=new Int16Array(ff),ae=0;bd=0;for(gf=ef.length;bd<gf;bd++){Yd=ef[bd];var hf=Yd.data.subarray(Yd.start,Yd.end);tg.set(hf,ae);ae+=hf.length}var Qh=new q(tg,0,ff);Rd.setDecoder(Qh);for(bd=
0;bd<Pf;bd++){switch(Be){case 0:Rd.runSignificancePropogationPass();break;case 1:Rd.runMagnitudeRefinementPass();break;case 2:Rd.runCleanupPass(),Wf&&Rd.checkSegmentationSymbol()}Be=(Be+1)%3}var Ce=yd.tbx0_-Ye+(yd.tby0_-Zd)*Sd,Rh=Rd.coefficentsSign,Sh=Rd.coefficentsMagnitude,Wh=Rd.bitsDecoded,Xh=he?0:.5,Uf,ee,Qf,ae=0,Yh="LL"!==wd.type;for(bd=0;bd<Of;bd++){var Zh=2*(Ce/Sd|0)*(qd-Sd)+Xf+Yf;for(Uf=0;Uf<df;Uf++)ee=Sh[ae],0!==ee&&(ee=(ee+Xh)*Xe,0!==Rh[ae]&&(ee=-ee),Qf=Wh[ae],Je[Yh?Zh+(Ce<<1):Ce]=he&&Qf>=
Ld?ee:ee*(1<<Ld-Qf)),Ce++,ae++;Ce+=Sd-df}}}}Bb.push({width:lc,height:Ie,items:qe})}var Rf=Kd.calculate(Bb,Dc.tcx0,Dc.tcy0);Id[Xd]={left:Dc.tcx0,top:Dc.tcy0,width:Rf.width,height:Rf.height,items:Rf.items}}var Ge=Zc[0],Sf=Fc[0].isSigned,ud=Sf?new Int16Array(Ge.items.length*ra):new Uint16Array(Ge.items.length*ra),Th={left:Ge.left,top:Ge.top,width:Ge.width,height:Ge.height,items:ud},Pc,be,vd,jf,Vf,Kb=0,wb,Cd,De,Ee,Fe,de,Dd,ce,kf,He;if(Ma.codingStyleDefaultParameters.multipleComponentTransform){var wg=
4===ra,Tf=Zc[0].items,ug=Zc[1].items,vg=Zc[2].items,Vh=wg?Zc[3].items:null;Pc=Fc[0].precision-8;be=(128<<Pc)+.5;vd=255*(1<<Pc);Vf=.5*vd;jf=-Vf;var Ta=Ma.components[0],xg=ra-3;Cd=Tf.length;if(Ta.codingStyleParameters.reversibleTransformation)for(wb=0;wb<Cd;wb++,Kb+=xg)De=Tf[wb]+be,Ee=ug[wb],Fe=vg[wb],Dd=De-(Fe+Ee>>2),de=Dd+Fe,ce=Dd+Ee,ud[Kb++]=0>=de?0:de>=vd?255:de>>Pc,ud[Kb++]=0>=Dd?0:Dd>=vd?255:Dd>>Pc,ud[Kb++]=0>=ce?0:ce>=vd?255:ce>>Pc;else for(wb=0;wb<Cd;wb++,Kb+=xg)De=Tf[wb]+be,Ee=ug[wb],Fe=vg[wb],
de=De+1.402*Fe,Dd=De-.34413*Ee-.71414*Fe,ce=De+1.772*Ee,ud[Kb++]=0>=de?0:de>=vd?255:de>>Pc,ud[Kb++]=0>=Dd?0:Dd>=vd?255:Dd>>Pc,ud[Kb++]=0>=ce?0:ce>=vd?255:ce>>Pc;if(wg)for(wb=0,Kb=3;wb<Cd;wb++,Kb+=4)kf=Vh[wb],ud[Kb]=kf<=jf?0:kf>=Vf?255:kf+be>>Pc}else for(Fb=0;Fb<ra;Fb++)if(8===Fc[Fb].precision){var pe=Zc[Fb].items;Pc=Fc[Fb].precision-8;be=(128<<Pc)+.5;vd=127.5*(1<<Pc);jf=-vd;Kb=Fb;wb=0;for(Cd=pe.length;wb<Cd;wb++)He=pe[wb],ud[Kb]=He<=jf?0:He>=vd?255:He+be>>Pc,Kb+=ra}else if(Sf=Fc[Fb].isSigned,pe=Zc[Fb].items,
Sf)for(Kb=Fb,wb=0,Cd=pe.length;wb<Cd;wb++)ud[Kb]=pe[wb],Kb+=ra;else{Pc=Fc[Fb].precision-8;be=(128<<Pc)+.5;var Uh=Math.pow(2,Fc[Fb].precision)-1,Kb=Fb;wb=0;for(Cd=pe.length;wb<Cd;wb++)He=pe[wb],ud[Kb]=Math.max(Math.min(He+be,Uh),0),Kb+=ra}qb.push(Th)}this.tiles=qb;this.width=m.SIZ.Xsiz-m.SIZ.XOsiz;this.height=m.SIZ.Ysiz-m.SIZ.YOsiz;this.componentsCount=m.SIZ.Csiz}};var X=function(){function a(b,d){var f=k(Math.max(b,d))+1;this.levels=[];for(var e=0;e<f;e++)this.levels.push({width:b,height:d,items:[]}),
b=Math.ceil(b/2),d=Math.ceil(d/2)}a.prototype={reset:function(a,b){for(var d=0,f=0,e;d<this.levels.length;){e=this.levels[d];var h=a+b*e.width;if(void 0!==e.items[h]){f=e.items[h];break}e.index=h;a>>=1;b>>=1;d++}d--;e=this.levels[d];e.items[e.index]=f;this.currentLevel=d;delete this.value},incrementValue:function(){var a=this.levels[this.currentLevel];a.items[a.index]++},nextLevel:function(){var a=this.currentLevel,b=this.levels[a],d=b.items[b.index];a--;if(0>a)return this.value=d,!1;this.currentLevel=
a;b=this.levels[a];b.items[b.index]=d;return!0}};return a}(),U=function(){function a(b,d){var f=k(Math.max(b,d))+1;this.levels=[];for(var e=0;e<f;e++){for(var h=new Uint8Array(b*d),m=new Uint8Array(b*d),n=0,q=h.length;n<q;n++)h[n]=0,m[n]=0;this.levels.push({width:b,height:d,items:h,status:m});b=Math.ceil(b/2);d=Math.ceil(d/2)}}a.prototype={reset:function(a,b,d){this.currentStopValue=d;for(d=0;d<this.levels.length;){var f=this.levels[d];f.index=a+b*f.width;a>>=1;b>>=1;d++}this.currentLevel=this.levels.length-
1;this.minValue=this.levels[this.currentLevel].items[0]},incrementValue:function(){var a=this.levels[this.currentLevel];a.items[a.index]+=1;a.items[a.index]>this.minValue&&(this.minValue=a.items[a.index])},nextLevel:function(){var a=this.currentLevel;a--;if(0>a)return!1;this.currentLevel=a;a=this.levels[a];a.items[a.index]<this.minValue?a.items[a.index]=this.minValue:a.items[a.index]>this.minValue&&(this.minValue=a.items[a.index]);return!0},isLeaf:function(){return 0===this.currentLevel},isAboveThreshold:function(){var a=
this.levels[this.currentLevel];return a.items[a.index]>this.currentStopValue},isKnown:function(){var a=this.levels[this.currentLevel];return 0<a.status[a.index]},setKnown:function(){var a=this.levels[this.currentLevel];a.status[a.index]=1}};return a}(),x=function(){function a(e,h,k,m,n){this.width=e;this.height=h;this.contextLabelTable="HH"===k?f:"HL"===k?d:b;e*=h;this.neighborsSignificance=new Uint8Array(e);this.coefficentsSign=new Uint8Array(e);this.coefficentsMagnitude=14<n?new Uint32Array(e):
6<n?new Uint16Array(e):new Uint8Array(e);this.processingFlags=new Uint8Array(e);n=new Uint8Array(e);if(0!==m)for(h=0;h<e;h++)n[h]=m;this.bitsDecoded=n;this.reset()}var b=new Uint8Array([0,5,8,0,3,7,8,0,4,7,8,0,0,0,0,0,1,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8]),d=new Uint8Array([0,3,4,0,5,7,7,0,8,8,8,0,0,0,0,0,1,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,
8,8]),f=new Uint8Array([0,1,2,0,1,2,2,0,2,2,2,0,0,0,0,0,3,4,5,0,4,5,5,0,5,5,5,0,0,0,0,0,6,7,7,0,7,7,7,0,7,7,7,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8]);a.prototype={setDecoder:function(a){this.decoder=a},reset:function(){this.contexts=new Int8Array(19);this.contexts[0]=8;this.contexts[17]=92;this.contexts[18]=6},setNeighborsSignificance:function(a,b,d){var f=this.neighborsSignificance,e=this.width,h=this.height,k=0<b;b=b+1<e;var m;0<a&&(m=d-e,k&&(f[m-1]+=16),b&&(f[m+1]+=16),
f[m]+=4);a+1<h&&(m=d+e,k&&(f[m-1]+=16),b&&(f[m+1]+=16),f[m]+=4);k&&(f[d-1]+=1);b&&(f[d+1]+=1);f[d]|=128},runSignificancePropogationPass:function(){for(var a=this.decoder,b=this.width,d=this.height,f=this.coefficentsMagnitude,e=this.coefficentsSign,h=this.neighborsSignificance,k=this.processingFlags,m=this.contexts,n=this.contextLabelTable,q=this.bitsDecoded,r=0;r<d;r+=4)for(var x=0;x<b;x++)for(var t=r*b+x,w=0;4>w;w++,t+=b){var A=r+w;if(A>=d)break;k[t]&=-2;if(!f[t]&&h[t]){if(a.readBit(m,n[h[t]])){var B=
this.decodeSignBit(A,x,t);e[t]=B;f[t]=1;this.setNeighborsSignificance(A,x,t);k[t]|=2}q[t]++;k[t]|=1}}},decodeSignBit:function(a,b,d){var f=this.width,e=this.height,h=this.coefficentsMagnitude,k=this.coefficentsSign,m;m=0<b&&0!==h[d-1];b+1<f&&0!==h[d+1]?(b=k[d+1],m?(m=k[d-1],b=1-b-m):b=1-b-b):m?(m=k[d-1],b=1-m-m):b=0;var n=3*b;m=0<a&&0!==h[d-f];a+1<e&&0!==h[d+f]?(b=k[d+f],m?(m=k[d-f],b=1-b-m+n):b=1-b-b+n):m?(m=k[d-f],b=1-m-m+n):b=n;return a=0<=b?this.decoder.readBit(this.contexts,9+b):this.decoder.readBit(this.contexts,
9-b)^1},runMagnitudeRefinementPass:function(){for(var a=this.decoder,b=this.width,d=this.coefficentsMagnitude,f=this.neighborsSignificance,e=this.contexts,h=this.bitsDecoded,k=this.processingFlags,m=b*this.height,n=4*b,q=0,r;q<m;q=r){r=Math.min(m,q+n);for(var x=0;x<b;x++)for(var t=q+x;t<r;t+=b)if(d[t]&&0===(k[t]&1)){var w=16;0!==(k[t]&2)&&(k[t]^=2,w=0===(f[t]&127)?15:14);w=a.readBit(e,w);d[t]=d[t]<<1|w;h[t]++;k[t]|=1}}},runCleanupPass:function(){for(var a=this.decoder,b=this.width,d=this.height,f=
this.neighborsSignificance,e=this.coefficentsMagnitude,h=this.coefficentsSign,k=this.contexts,m=this.contextLabelTable,n=this.bitsDecoded,q=this.processingFlags,r=2*b,x=3*b,t,w=0;w<d;w=t){t=Math.min(w+4,d);for(var A=w*b,B=w+3<d,D=0;D<b;D++){var z=A+D,E=0,y=z,L=w,M;if(B&&0===q[z]&&0===q[z+b]&&0===q[z+r]&&0===q[z+x]&&0===f[z]&&0===f[z+b]&&0===f[z+r]&&0===f[z+x]){if(!a.readBit(k,18)){n[z]++;n[z+b]++;n[z+r]++;n[z+x]++;continue}E=a.readBit(k,17)<<1|a.readBit(k,17);0!==E&&(L=w+E,y+=E*b);M=this.decodeSignBit(L,
D,y);h[y]=M;e[y]=1;this.setNeighborsSignificance(L,D,y);q[y]|=2;y=z;for(z=w;z<=L;z++,y+=b)n[y]++;E++}for(L=w+E;L<t;L++,y+=b)e[y]||0!==(q[y]&1)||(1===a.readBit(k,m[f[y]])&&(M=this.decodeSignBit(L,D,y),h[y]=M,e[y]=1,this.setNeighborsSignificance(L,D,y),q[y]|=2),n[y]++)}}},checkSegmentationSymbol:function(){var a=this.decoder,b=this.contexts;if(10!==(a.readBit(b,17)<<3|a.readBit(b,17)<<2|a.readBit(b,17)<<1|a.readBit(b,17)))throw Error("JPX Error: Invalid segmentation symbol");}};return a}(),n=function(){function a(){}
a.prototype.calculate=function(a,b,d){for(var f=a[0],e=1,h=a.length;e<h;e++)f=this.iterate(f,a[e],b,d);return f};a.prototype.extend=function(a,b,d){var f=b-1,e=b+1,h=b+d-2;b+=d;a[f--]=a[e++];a[b++]=a[h--];a[f--]=a[e++];a[b++]=a[h--];a[f--]=a[e++];a[b++]=a[h--];a[f]=a[e];a[b]=a[h]};a.prototype.iterate=function(a,b,d,f){var e=a.width,h=a.height,k=a.items,m=b.width,n=b.height;b=b.items;var q,r,x,t;for(q=x=0;q<h;q++)for(t=2*q*m,r=0;r<e;r++,x++,t+=2)b[t]=k[x];a.items=null;a=new Float32Array(m+8);if(1===
m){if(0!==(d&1))for(x=t=0;t<n;t++,x+=m)b[x]*=.5}else for(x=t=0;t<n;t++,x+=m)a.set(b.subarray(x,x+m),4),this.extend(a,4,m),this.filter(a,4,m),b.set(a.subarray(4,4+m),x);d=16;e=[];for(q=0;q<d;q++)e.push(new Float32Array(n+8));q=0;a=4+n;if(1===n){if(0!==(f&1))for(f=0;f<m;f++)b[f]*=.5}else for(f=0;f<m;f++){if(0===q){d=Math.min(m-f,d);x=f;for(t=4;t<a;x+=m,t++)for(h=0;h<d;h++)e[h][t]=b[x+h];q=d}q--;x=e[q];this.extend(x,4,n);this.filter(x,4,n);if(0===q)for(x=f-d+1,t=4;t<a;x+=m,t++)for(h=0;h<d;h++)b[x+h]=
e[h][t]}return{width:m,height:n,items:b}};return a}(),z=function(){function a(){n.call(this)}a.prototype=Object.create(n.prototype);a.prototype.filter=function(a,b,d){d>>=1;b|=0;var f,e,h,k;f=b-3;for(e=d+4;e--;f+=2)a[f]*=.8128930661159609;f=b-2;h=.443506852043971*a[f-1];for(e=d+3;e--;f+=2)if(k=.443506852043971*a[f+1],a[f]=1.230174104914001*a[f]-h-k,e--)f+=2,h=.443506852043971*a[f+1],a[f]=1.230174104914001*a[f]-h-k;else break;f=b-1;h=.882911075530934*a[f-1];for(e=d+2;e--;f+=2)if(k=.882911075530934*
a[f+1],a[f]-=h+k,e--)f+=2,h=.882911075530934*a[f+1],a[f]-=h+k;else break;f=b;h=-.052980118572961*a[f-1];for(e=d+1;e--;f+=2)if(k=-.052980118572961*a[f+1],a[f]-=h+k,e--)f+=2,h=-.052980118572961*a[f+1],a[f]-=h+k;else break;if(0!==d)for(f=b+1,h=-1.586134342059924*a[f-1],e=d;e--;f+=2)if(k=-1.586134342059924*a[f+1],a[f]-=h+k,e--)f+=2,h=-1.586134342059924*a[f+1],a[f]-=h+k;else break};return a}(),Y=function(){function a(){n.call(this)}a.prototype=Object.create(n.prototype);a.prototype.filter=function(a,b,
d){d>>=1;b|=0;var f,e;f=b;for(e=d+1;e--;f+=2)a[f]-=a[f-1]+a[f+1]+2>>2;f=b+1;for(e=d;e--;f+=2)a[f]+=a[f-1]+a[f+1]>>1};return a}();return a}();"use strict";var q=function(){function a(b,d,f){this.data=b;this.bp=d;this.dataEnd=f;this.chigh=b[d];this.clow=0;this.byteIn();this.chigh=this.chigh<<7&65535|this.clow>>9&127;this.clow=this.clow<<7&65535;this.ct-=7;this.a=32768}var b=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,
nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,
nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},
{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,
nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}];a.prototype={byteIn:function(){var a=this.data,b=this.bp;255===a[b]?143<a[b+1]?(this.clow+=65280,this.ct=8):(b++,this.clow+=a[b]<<9,this.ct=7,this.bp=b):(b++,this.clow+=b<this.dataEnd?a[b]<<8:65280,this.ct=8,this.bp=b);65535<this.clow&&(this.chigh+=this.clow>>16,this.clow&=65535)},readBit:function(a,d){var f=a[d]>>1,e=a[d]&
1,f=b[f],h=f.qe,k=this.a-h;if(this.chigh<h)k<h?(k=h,h=e,f=f.nmps):(k=h,h=1^e,1===f.switchFlag&&(e=h),f=f.nlps);else{this.chigh-=h;if(0!==(k&32768))return this.a=k,e;k<h?(h=1^e,1===f.switchFlag&&(e=h),f=f.nlps):(h=e,f=f.nmps)}do 0===this.ct&&this.byteIn(),k<<=1,this.chigh=this.chigh<<1&65535|this.clow>>15&1,this.clow=this.clow<<1&65535,this.ct--;while(0===(k&32768));this.a=k;a[d]=f<<1|e;return h}};return a}();"use strict";var t="undefined"===typeof window?this:window;t.PDFJS||(t.PDFJS={});var y=y||
{};y.VERBOSITY_LEVELS={errors:0,warnings:1,infos:5};y.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,
setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,
beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,
paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};y.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font"};y.UnsupportedManager=function(){var a=[];return{listen:function(b){a.push(b)},notify:function(b){d('Unsupported feature "'+b+'"');for(var f=0,e=a.length;f<e;f++)a[f](b)}}}();y.isValidUrl=function(a,b){if(!a)return!1;var d=/^[a-z][a-z0-9+\-.]*(?=:)/i.exec(a);
if(!d)return b;d=d[0].toLowerCase();switch(d){case "http":case "https":case "ftp":case "mailto":case "tel":return!0;default:return!1}};y.shadow=f;y.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};e=function(){function a(b,d){this.name="PasswordException";this.message=b;this.code=d}a.prototype=Error();return a.constructor=a}();y.PasswordException=e;e=function(){function a(b,d){this.name="UnknownErrorException";this.message=b;this.details=d}a.prototype=Error();return a.constructor=a}();y.UnknownErrorException=
e;e=function(){function a(b){this.name="InvalidPDFException";this.message=b}a.prototype=Error();return a.constructor=a}();y.InvalidPDFException=e;e=function(){function a(b){this.name="MissingPDFException";this.message=b}a.prototype=Error();return a.constructor=a}();y.MissingPDFException=e;e=function(){function a(b,d){this.name="UnexpectedResponseException";this.message=b;this.status=d}a.prototype=Error();return a.constructor=a}();y.UnexpectedResponseException=e;(function(){function a(b){this.message=
b}a.prototype=Error();a.prototype.name="NotImplementedException";return a.constructor=a})();(function(){function a(b,d){this.begin=b;this.end=d;this.message="Missing data ["+b+", "+d+")"}a.prototype=Error();a.prototype.name="MissingDataException";return a.constructor=a})();(function(){function a(b){this.message=b}a.prototype=Error();a.prototype.name="XRefParseException";return a.constructor=a})();Object.defineProperty(y,"isLittleEndian",{configurable:!0,get:function(){var a=y,b=new Uint8Array(2);
b[0]=1;b=new Uint16Array(b.buffer);return f(a,"isLittleEndian",1===b[0])}});Object.defineProperty(y,"hasCanvasTypedArrays",{configurable:!0,get:function(){var a=y,b=document.createElement("canvas");b.width=b.height=1;b=b.getContext("2d").createImageData(1,1);return f(a,"hasCanvasTypedArrays","undefined"!==typeof b.data.buffer)}});(function(){function a(f,e){this.buffer=f;this.byteLength=f.length;for(var h=this.length=void 0===e?this.byteLength>>2:e;d<h;)Object.defineProperty(a.prototype,d,b(d)),d++}
function b(a){return{get:function(){var b=this.buffer,d=a<<2;return(b[d]|b[d+1]<<8|b[d+2]<<16|b[d+3]<<24)>>>0},set:function(b){var d=this.buffer,f=a<<2;d[f]=b&255;d[f+1]=b>>8&255;d[f+2]=b>>16&255;d[f+3]=b>>>24&255}}}a.prototype=Object.create(null);var d=0;return a})();var G=y.Util=function(){function a(){}var b=["rgb(",0,",",0,",",0,")"];a.makeCssRgb=function(a,d,f){b[1]=a;b[3]=d;b[5]=f;return b.join("")};a.transform=function(a,b){return[a[0]*b[0]+a[2]*b[1],a[1]*b[0]+a[3]*b[1],a[0]*b[2]+a[2]*b[3],
a[1]*b[2]+a[3]*b[3],a[0]*b[4]+a[2]*b[5]+a[4],a[1]*b[4]+a[3]*b[5]+a[5]]};a.applyTransform=function(a,b){return[a[0]*b[0]+a[1]*b[2]+b[4],a[0]*b[1]+a[1]*b[3]+b[5]]};a.applyInverseTransform=function(a,b){var d=b[0]*b[3]-b[1]*b[2];return[(a[0]*b[3]-a[1]*b[2]+b[2]*b[5]-b[4]*b[3])/d,(-a[0]*b[1]+a[1]*b[0]+b[4]*b[1]-b[5]*b[0])/d]};a.getAxialAlignedBoundingBox=function(b,d){var f=a.applyTransform(b,d),e=a.applyTransform(b.slice(2,4),d),h=a.applyTransform([b[0],b[3]],d),k=a.applyTransform([b[2],b[1]],d);return[Math.min(f[0],
e[0],h[0],k[0]),Math.min(f[1],e[1],h[1],k[1]),Math.max(f[0],e[0],h[0],k[0]),Math.max(f[1],e[1],h[1],k[1])]};a.inverseTransform=function(a){var b=a[0]*a[3]-a[1]*a[2];return[a[3]/b,-a[1]/b,-a[2]/b,a[0]/b,(a[2]*a[5]-a[4]*a[3])/b,(a[4]*a[1]-a[5]*a[0])/b]};a.apply3dTransform=function(a,b){return[a[0]*b[0]+a[1]*b[1]+a[2]*b[2],a[3]*b[0]+a[4]*b[1]+a[5]*b[2],a[6]*b[0]+a[7]*b[1]+a[8]*b[2]]};a.singularValueDecompose2dScale=function(a){var b=[a[0],a[2],a[1],a[3]],d=a[0]*b[0]+a[1]*b[2],f=a[2]*b[1]+a[3]*b[3],e=
(d+f)/2;a=Math.sqrt((d+f)*(d+f)-4*(d*f-(a[2]*b[0]+a[3]*b[2])*(a[0]*b[1]+a[1]*b[3])))/2;b=e-a||1;return[Math.sqrt(e+a||1),Math.sqrt(b)]};a.normalizeRect=function(a){var b=a.slice(0);a[0]>a[2]&&(b[0]=a[2],b[2]=a[0]);a[1]>a[3]&&(b[1]=a[3],b[3]=a[1]);return b};a.intersect=function(b,d){function f(a,b){return a-b}var e=[b[0],b[2],d[0],d[2]].sort(f),h=[b[1],b[3],d[1],d[3]].sort(f),k=[];b=a.normalizeRect(b);d=a.normalizeRect(d);if(e[0]===b[0]&&e[1]===d[0]||e[0]===d[0]&&e[1]===b[0])k[0]=e[1],k[2]=e[2];else return!1;
if(h[0]===b[1]&&h[1]===d[1]||h[0]===d[1]&&h[1]===b[1])k[1]=h[1],k[3]=h[2];else return!1;return k};a.sign=function(a){return 0>a?-1:1};a.appendToArray=function(a,b){Array.prototype.push.apply(a,b)};a.prependToArray=function(a,b){Array.prototype.unshift.apply(a,b)};a.extendObj=function(a,b){for(var d in b)a[d]=b[d]};a.getInheritableProperty=function(a,b){for(;a&&!a.has(b);)a=a.get("Parent");return a?a.get(b):null};a.inherit=function(a,b,d){a.prototype=Object.create(b.prototype);a.prototype.constructor=
a;for(var f in d)a.prototype[f]=d[f]};a.loadScript=function(a,b){var d=document.createElement("script"),f=!1;d.setAttribute("src",a);b&&(d.onload=function(){f||b();f=!0});document.getElementsByTagName("head")[0].appendChild(d)};return a}();y.PageViewport=function(){function a(b,d,f,e,h,k){this.viewBox=b;this.scale=d;this.rotation=f;this.offsetX=e;this.offsetY=h;var q=(b[2]+b[0])/2,m=(b[3]+b[1])/2,r,t,y;f%=360;switch(0>f?f+360:f){case 180:f=-1;t=r=0;y=1;break;case 90:f=0;t=r=1;y=0;break;case 270:f=
0;t=r=-1;y=0;break;default:f=1,t=r=0,y=-1}k&&(t=-t,y=-y);0===f?(e=Math.abs(m-b[1])*d+e,h=Math.abs(q-b[0])*d+h,k=Math.abs(b[3]-b[1])*d,b=Math.abs(b[2]-b[0])*d):(e=Math.abs(q-b[0])*d+e,h=Math.abs(m-b[1])*d+h,k=Math.abs(b[2]-b[0])*d,b=Math.abs(b[3]-b[1])*d);this.transform=[f*d,r*d,t*d,y*d,e-f*d*q-t*d*m,h-r*d*q-y*d*m];this.width=k;this.height=b;this.fontScale=d}a.prototype={clone:function(b){b=b||{};var d="scale"in b?b.scale:this.scale,f="rotation"in b?b.rotation:this.rotation;return new a(this.viewBox.slice(),
d,f,this.offsetX,this.offsetY,b.dontFlip)},convertToViewportPoint:function(a,b){return G.applyTransform([a,b],this.transform)},convertToViewportRectangle:function(a){var b=G.applyTransform([a[0],a[1]],this.transform);a=G.applyTransform([a[2],a[3]],this.transform);return[b[0],b[1],a[0],a[1]]},convertToPdfPoint:function(a,b){return G.applyInverseTransform([a,b],this.transform)}};return a}();y.createPromiseCapability=function(){var a={};a.promise=new Promise(function(b,d){a.resolve=b;a.reject=d});return a};
(function(){function a(b){this._status=0;this._handlers=[];try{b.call(this,this._resolve.bind(this),this._reject.bind(this))}catch(d){this._reject(d)}}if(t.Promise)"function"!==typeof t.Promise.all&&(t.Promise.all=function(a){var b=0,d=[],f,e,h=new t.Promise(function(a,b){f=a;e=b});a.forEach(function(a,h){b++;a.then(function(a){d[h]=a;b--;0===b&&f(d)},e)});0===b&&f(d);return h}),"function"!==typeof t.Promise.resolve&&(t.Promise.resolve=function(a){return new t.Promise(function(b){b(a)})}),"function"!==
typeof t.Promise.reject&&(t.Promise.reject=function(a){return new t.Promise(function(b,d){d(a)})}),"function"!==typeof t.Promise.prototype.catch2&&(t.Promise.prototype.catch2=function(a){return t.Promise.prototype.then(void 0,a)});else{var b={handlers:[],running:!1,unhandledRejections:[],pendingRejectionCheck:!1,scheduleHandlers:function(a){0!==a._status&&(this.handlers=this.handlers.concat(a._handlers),a._handlers=[],this.running||(this.running=!0,setTimeout(this.runHandlers.bind(this),0)))},runHandlers:function(){for(var a=
Date.now()+1;0<this.handlers.length;){var b=this.handlers.shift(),d=b.thisPromise._status,f=b.thisPromise._value;try{1===d?"function"===typeof b.onResolve&&(f=b.onResolve(f)):"function"===typeof b.onReject&&(f=b.onReject(f),d=1,b.thisPromise._unhandledRejection&&this.removeUnhandeledRejection(b.thisPromise))}catch(e){d=2,f=e}b.nextPromise._updateStatus(d,f);if(Date.now()>=a)break}0<this.handlers.length?setTimeout(this.runHandlers.bind(this),0):this.running=!1},addUnhandledRejection:function(a){this.unhandledRejections.push({promise:a,
time:Date.now()});this.scheduleRejectionCheck()},removeUnhandeledRejection:function(a){a._unhandledRejection=!1;for(var b=0;b<this.unhandledRejections.length;b++)this.unhandledRejections[b].promise===a&&(this.unhandledRejections.splice(b),b--)},scheduleRejectionCheck:function(){this.pendingRejectionCheck||(this.pendingRejectionCheck=!0,setTimeout(function(){this.pendingRejectionCheck=!1;for(var a=Date.now(),b=0;b<this.unhandledRejections.length;b++)if(500<a-this.unhandledRejections[b].time){var f=
this.unhandledRejections[b].promise._value,e="Unhandled rejection: "+f;f.stack&&(e+="\n"+f.stack);d(e);this.unhandledRejections.splice(b);b--}this.unhandledRejections.length&&this.scheduleRejectionCheck()}.bind(this),500))}};a.all=function(b){function d(a){2!==h._status&&(m=[],e(a))}var f,e,h=new a(function(a,b){f=a;e=b}),k=b.length,m=[];if(0===k)return f(m),h;for(var q=0,r=b.length;q<r;++q){var t=b[q],w=function(a){return function(b){2!==h._status&&(m[a]=b,k--,0===k&&f(m))}}(q);a.isPromise(t)?t.then(w,
d):w(t)}return h};a.isPromise=function(a){return a&&"function"===typeof a.then};a.resolve=function(b){return new a(function(a){a(b)})};a.reject=function(b){return new a(function(a,d){d(b)})};a.prototype={_status:null,_value:null,_handlers:null,_unhandledRejection:null,_updateStatus:function(d,f){1!==this._status&&2!==this._status&&(1===d&&a.isPromise(f)?f.then(this._updateStatus.bind(this,1),this._updateStatus.bind(this,2)):(this._status=d,this._value=f,2===d&&0===this._handlers.length&&(this._unhandledRejection=
!0,b.addUnhandledRejection(this)),b.scheduleHandlers(this)))},_resolve:function(a){this._updateStatus(1,a)},_reject:function(a){this._updateStatus(2,a)},then:function(d,f){var e=new a(function(a,b){this.resolve=a;this.reject=b});this._handlers.push({thisPromise:this,onResolve:d,onReject:f,nextPromise:e});b.scheduleHandlers(this);return e},catch2:function(a){return this.then(void 0,a)}};t.Promise=a}})();(function(){function a(){this.started={};this.times=[];this.enabled=!0}a.prototype={time:function(a){this.enabled&&
(a in this.started&&d("Timer is already running for "+a),this.started[a]=Date.now())},timeEnd:function(a){this.enabled&&(a in this.started||d("Timer has not been started for "+a),this.times.push({name:a,start:this.started[a],end:Date.now()}),delete this.started[a])},toString:function(){var a,b,d=this.times,f="",e=0;a=0;for(b=d.length;a<b;++a){var h=d[a].name;h.length>e&&(e=h.length)}a=0;for(b=d.length;a<b;++a){for(var k=d[a],h=k.end-k.start,k=k.name;k.length<e;)k+=" ";f+=k+" "+h+"ms\n"}return f}};
return a})();y.createBlob=function(a,b){if("undefined"!==typeof Blob)return new Blob([a],{type:b});var d=new MozBlobBuilder;d.append(a);return d.getBlob(b)};y.createObjectURL=function(){return function(a,b){if(!y.disableCreateObjectURL&&"undefined"!==typeof URL&&URL.createObjectURL){var d=y.createBlob(a,b);return URL.createObjectURL(d)}for(var d="data:"+b+";base64,",f=0,e=a.length;f<e;f+=3)var h=a[f]&255,k=a[f+1]&255,q=a[f+2]&255,d=d+("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="[h>>
2]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="[(h&3)<<4|k>>4]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="[f+1<e?(k&15)<<2|q>>6:64]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="[f+2<e?q&63:64]);return d}}();"undefined"!==typeof b&&b.exports&&(b.exports=a)},{}],5:[function(a,b,e){},{}],6:[function(a,b,e){var d=d||{};d.lossless=d.lossless||{};d.lossless.ComponentSpec=d.lossless.ComponentSpec||function(){this.vSamp=this.quantTableSel=
this.hSamp=0};"undefined"!==typeof b&&b.exports&&(b.exports=d.lossless.ComponentSpec)},{}],7:[function(a,b,e){var d=d||{};d.lossless=d.lossless||{};d.lossless.DataStream=d.lossless.DataStream||function(a,b,d){this.buffer=void 0===b&&void 0===d?new Uint8Array(a):new Uint8Array(a,b,d);this.index=0};d.lossless.DataStream.prototype.get16=function(){var a=(this.buffer[this.index]<<8)+this.buffer[this.index+1];this.index+=2;return a};d.lossless.DataStream.prototype.get8=function(){var a=this.buffer[this.index];
this.index+=1;return a};"undefined"!==typeof b&&b.exports&&(b.exports=d.lossless.DataStream)},{}],8:[function(a,b,e){var d=d||{};d.lossless=d.lossless||{};d.lossless.DataStream=d.lossless.DataStream||("undefined"!==typeof a?a("./data-stream.js"):null);d.lossless.HuffmanTable=d.lossless.HuffmanTable||("undefined"!==typeof a?a("./huffman-table.js"):null);d.lossless.QuantizationTable=d.lossless.QuantizationTable||("undefined"!==typeof a?a("./quantization-table.js"):null);d.lossless.ScanHeader=d.lossless.ScanHeader||
("undefined"!==typeof a?a("./scan-header.js"):null);d.lossless.FrameHeader=d.lossless.FrameHeader||("undefined"!==typeof a?a("./frame-header.js"):null);d.lossless.Utils=d.lossless.Utils||("undefined"!==typeof a?a("./utils.js"):null);d.lossless.Decoder=d.lossless.Decoder||function(a,b){this.buffer=a;this.frame=new d.lossless.FrameHeader;this.huffTable=new d.lossless.HuffmanTable;this.quantTable=new d.lossless.QuantizationTable;this.scan=new d.lossless.ScanHeader;this.DU=d.lossless.Utils.createArray(10,
4,64);this.HuffTab=d.lossless.Utils.createArray(4,2,12800);this.IDCT_Source=[];this.nBlock=[];this.acTab=d.lossless.Utils.createArray(10,1);this.dcTab=d.lossless.Utils.createArray(10,1);this.qTab=d.lossless.Utils.createArray(10,1);this.numBytes=this.yLoc=this.xLoc=this.yDim=this.xDim=this.selection=this.restartInterval=this.numComp=this.markerIndex=this.marker=0;this.outputData=null;this.restarting=!1;this.mask=0;"undefined"!==typeof b&&(this.numBytes=b)};d.lossless.Decoder.IDCT_P=[0,5,40,16,45,2,
7,42,21,56,8,61,18,47,1,4,41,23,58,13,32,24,37,10,63,17,44,3,6,43,20,57,15,34,29,48,53,26,39,9,60,19,46,22,59,12,33,31,50,55,25,36,11,62,14,35,28,49,52,27,38,30,51,54];d.lossless.Decoder.TABLE=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63];d.lossless.Decoder.MAX_HUFFMAN_SUBTREE=50;d.lossless.Decoder.MSB=2147483648;d.lossless.Decoder.RESTART_MARKER_BEGIN=65488;d.lossless.Decoder.RESTART_MARKER_END=
65495;d.lossless.Decoder.prototype.decompress=function(a,b,d){return this.decode(a,b,d).buffer};d.lossless.Decoder.prototype.decode=function(a,b,e,r){var q=0,t=[],y=[],G=[];"undefined"!==typeof a&&(this.buffer=a);"undefined"!==typeof r&&(this.numBytes=r);this.stream=new d.lossless.DataStream(this.buffer,b,e);this.buffer=null;this.yLoc=this.xLoc=0;a=this.stream.get16();if(65496!==a)throw Error("Not a JPEG file");for(a=this.stream.get16();4092!==a>>4||65476===a;){switch(a){case 65476:this.huffTable.read(this.stream,
this.HuffTab);break;case 65484:throw Error("Program doesn't support arithmetic coding. (format throw new IOException)");case 65499:this.quantTable.read(this.stream,d.lossless.Decoder.TABLE);break;case 65501:this.restartInterval=this.readNumber();break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:this.readApp();break;case 65534:this.readComment();break;default:if(255!==
a>>8)throw Error("ERROR: format throw new IOException! (decode)");}a=this.stream.get16()}if(65472>a||65479<a)throw Error("ERROR: could not handle arithmetic code!");this.frame.read(this.stream);a=this.stream.get16();do{for(;65498!==a;){switch(a){case 65476:this.huffTable.read(this.stream,this.HuffTab);break;case 65484:throw Error("Program doesn't support arithmetic coding. (format throw new IOException)");case 65499:this.quantTable.read(this.stream,d.lossless.Decoder.TABLE);break;case 65501:this.restartInterval=
this.readNumber();break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:this.readApp();break;case 65534:this.readComment();break;default:if(255!==a>>8)throw Error("ERROR: format throw new IOException! (Parser.decode)");}a=this.stream.get16()}this.precision=this.frame.precision;this.components=this.frame.components;this.numBytes||(this.numBytes=parseInt(Math.ceil(this.precision/
8)));this.mask=1==this.numBytes?255:65535;this.scan.read(this.stream);this.numComp=this.scan.numComp;this.selection=this.scan.selection;1===this.numBytes?3===this.numComp?(this.getter=this.getValueRGB,this.setter=this.setValueRGB,this.output=this.outputRGB):(this.getter=this.getValue8,this.setter=this.setValue8,this.output=this.outputSingle):(this.getter=this.getValue16,this.setter=this.setValue16,this.output=this.outputSingle);switch(this.selection){case 2:this.selector=this.select2;break;case 3:this.selector=
this.select3;break;case 4:this.selector=this.select4;break;case 5:this.selector=this.select5;break;case 6:this.selector=this.select6;break;case 7:this.selector=this.select7;break;default:this.selector=this.select1}this.scanComps=this.scan.components;this.quantTables=this.quantTable.quantTables;for(b=0;b<this.numComp;b+=1)e=this.scanComps[b].scanCompSel,this.qTab[b]=this.quantTables[this.components[e].quantTableSel],this.nBlock[b]=this.components[e].vSamp*this.components[e].hSamp,this.dcTab[b]=this.HuffTab[this.scanComps[b].dcTabSel][0],
this.acTab[b]=this.HuffTab[this.scanComps[b].acTabSel][1];this.xDim=this.frame.dimX;this.yDim=this.frame.dimY;this.outputData=1==this.numBytes?new Uint8Array(new ArrayBuffer(this.xDim*this.yDim*this.numBytes*this.numComp)):new Uint16Array(new ArrayBuffer(this.xDim*this.yDim*this.numBytes*this.numComp));for(q+=1;;){y[0]=0;for(b=G[0]=0;10>b;b+=1)t[b]=1<<this.precision-1;if(0===this.restartInterval){for(a=this.decodeUnit(t,y,G);0===a&&this.xLoc<this.xDim&&this.yLoc<this.yDim;)this.output(t),a=this.decodeUnit(t,
y,G);break}for(b=0;b<this.restartInterval&&(this.restarting=0==b,a=this.decodeUnit(t,y,G),this.output(t),0===a);b+=1);0===a&&(0!==this.markerIndex?(a=65280|this.marker,this.markerIndex=0):a=this.stream.get16());if(!(a>=d.lossless.Decoder.RESTART_MARKER_BEGIN&&a<=d.lossless.Decoder.RESTART_MARKER_END))break}65500===a&&1===q&&(this.readNumber(),a=this.stream.get16())}while(65497!==a&&this.xLoc<this.xDim&&this.yLoc<this.yDim&&0===q);return this.outputData};d.lossless.Decoder.prototype.decodeUnit=function(a,
b,d){return 1==this.numComp?this.decodeSingle(a,b,d):3==this.numComp?this.decodeRGB(a,b,d):-1};d.lossless.Decoder.prototype.select1=function(a){return this.getPreviousX(a)};d.lossless.Decoder.prototype.select2=function(a){return this.getPreviousY(a)};d.lossless.Decoder.prototype.select3=function(a){return this.getPreviousXY(a)};d.lossless.Decoder.prototype.select4=function(a){return this.getPreviousX(a)+this.getPreviousY(a)-this.getPreviousXY(a)};d.lossless.Decoder.prototype.select5=function(a){return this.getPreviousX(a)+
(this.getPreviousY(a)-this.getPreviousXY(a)>>1)};d.lossless.Decoder.prototype.select6=function(a){return this.getPreviousY(a)+(this.getPreviousX(a)-this.getPreviousXY(a)>>1)};d.lossless.Decoder.prototype.select7=function(a){return(this.getPreviousX(a)+this.getPreviousY(a))/2};d.lossless.Decoder.prototype.decodeRGB=function(a,b,e){var r,q,t,y,G,B,w;a[0]=this.selector(0);a[1]=this.selector(1);a[2]=this.selector(2);for(G=0;G<this.numComp;G+=1)for(y=this.qTab[G],q=this.acTab[G],t=this.dcTab[G],B=0;B<
this.nBlock[G];B+=1){for(r=0;r<this.IDCT_Source.length;r+=1)this.IDCT_Source[r]=0;r=this.getHuffmanValue(t,b,e);if(65280<=r)return r;a[G]=this.IDCT_Source[0]=a[G]+this.getn(e,r,b,e);this.IDCT_Source[0]*=y[0];for(w=1;64>w;w+=1){r=this.getHuffmanValue(q,b,e);if(65280<=r)return r;w+=r>>4;if(0===(r&15)){if(0===r>>4)break}else this.IDCT_Source[d.lossless.Decoder.IDCT_P[w]]=this.getn(e,r&15,b,e)*y[w]}}return 0};d.lossless.Decoder.prototype.decodeSingle=function(a,b,e){var r,q,t;this.restarting?(this.restarting=
!1,a[0]=1<<this.frame.precision-1):a[0]=this.selector();for(q=0;q<this.nBlock[0];q+=1){r=this.getHuffmanValue(this.dcTab[0],b,e);if(65280<=r)return r;r=this.getn(a,r,b,e);t=r>>8;if(t>=d.lossless.Decoder.RESTART_MARKER_BEGIN&&t<=d.lossless.Decoder.RESTART_MARKER_END)return t;a[0]+=r}return 0};d.lossless.Decoder.prototype.getHuffmanValue=function(a,b,e){var r,q;8>e[0]?(b[0]<<=8,q=this.stream.get8(),255===q&&(this.marker=this.stream.get8(),0!==this.marker&&(this.markerIndex=9)),b[0]|=q):e[0]-=8;r=a[b[0]>>
e[0]];if(0!==(r&d.lossless.Decoder.MSB)){if(0!==this.markerIndex)return this.markerIndex=0,65280|this.marker;b[0]&=65535>>16-e[0];b[0]<<=8;q=this.stream.get8();255===q&&(this.marker=this.stream.get8(),0!==this.marker&&(this.markerIndex=9));b[0]|=q;r=a[256*(r&255)+(b[0]>>e[0])];e[0]+=8}e[0]+=8-(r>>8);if(0>e[0])throw Error("index="+e[0]+" temp="+b[0]+" code="+r+" in HuffmanValue()");if(e[0]<this.markerIndex)return this.markerIndex=0,65280|this.marker;b[0]&=65535>>16-e[0];return r&255};d.lossless.Decoder.prototype.getn=
function(a,b,d,e){if(0===b)return 0;if(16===b)return 0<=a[0]?-32768:32768;e[0]-=b;if(0<=e[0]){if(e[0]<this.markerIndex&&!this.isLastPixel())return this.markerIndex=0,(65280|this.marker)<<8}else{d[0]<<=8;a=this.stream.get8();255===a&&(this.marker=this.stream.get8(),0!==this.marker&&(this.markerIndex=9));d[0]|=a;e[0]+=8;if(0>e[0]){if(0!==this.markerIndex)return this.markerIndex=0,(65280|this.marker)<<8;d[0]<<=8;a=this.stream.get8();255===a&&(this.marker=this.stream.get8(),0!==this.marker&&(this.markerIndex=
9));d[0]|=a;e[0]+=8}if(0>e[0])throw Error("index="+e[0]+" in getn()");if(e[0]<this.markerIndex)return this.markerIndex=0,(65280|this.marker)<<8}a=d[0]>>e[0];d[0]&=65535>>16-e[0];a<1<<b-1&&(a+=(-1<<b)+1);return a};d.lossless.Decoder.prototype.getPreviousX=function(a){return 0<this.xLoc?this.getter(this.yLoc*this.xDim+this.xLoc-1,a):0<this.yLoc?this.getPreviousY(a):1<<this.frame.precision-1};d.lossless.Decoder.prototype.getPreviousXY=function(a){return 0<this.xLoc&&0<this.yLoc?this.getter((this.yLoc-
1)*this.xDim+this.xLoc-1,a):this.getPreviousY(a)};d.lossless.Decoder.prototype.getPreviousY=function(a){return 0<this.yLoc?this.getter((this.yLoc-1)*this.xDim+this.xLoc,a):this.getPreviousX(a)};d.lossless.Decoder.prototype.isLastPixel=function(){return this.xLoc===this.xDim-1&&this.yLoc===this.yDim-1};d.lossless.Decoder.prototype.outputSingle=function(a){this.xLoc<this.xDim&&this.yLoc<this.yDim&&(this.setter(this.yLoc*this.xDim+this.xLoc,this.mask&a[0]),this.xLoc+=1,this.xLoc>=this.xDim&&(this.yLoc+=
1,this.xLoc=0))};d.lossless.Decoder.prototype.outputRGB=function(a){var b=this.yLoc*this.xDim+this.xLoc;this.xLoc<this.xDim&&this.yLoc<this.yDim&&(this.setter(b,a[0],0),this.setter(b,a[1],1),this.setter(b,a[2],2),this.xLoc+=1,this.xLoc>=this.xDim&&(this.yLoc+=1,this.xLoc=0))};d.lossless.Decoder.prototype.setValue8=function(a,b){this.outputData[a]=b};d.lossless.Decoder.prototype.getValue8=function(a){return this.outputData[a]};(function(){var a=new ArrayBuffer(2);(new DataView(a)).setInt16(0,256,!0);
return 256===(new Int16Array(a))[0]})()?(d.lossless.Decoder.prototype.setValue16=d.lossless.Decoder.prototype.setValue8,d.lossless.Decoder.prototype.getValue16=d.lossless.Decoder.prototype.getValue8):(d.lossless.Decoder.prototype.setValue16=function(a,b){this.outputData[a]=(b&255)<<8|b>>8&255},d.lossless.Decoder.prototype.getValue16=function(a){a=this.outputData[a];return(a&255)<<8|a>>8&255});d.lossless.Decoder.prototype.setValueRGB=function(a,b,d){this.outputData[3*a+d]=b};d.lossless.Decoder.prototype.getValueRGB=
function(a,b){return this.outputData[3*a+b]};d.lossless.Decoder.prototype.readApp=function(){for(var a=0,b=this.stream.get16(),a=a+2;a<b;)this.stream.get8(),a+=1;return b};d.lossless.Decoder.prototype.readComment=function(){var a="",b=0,d;d=this.stream.get16();for(b+=2;b<d;)a+=this.stream.get8(),b+=1;return a};d.lossless.Decoder.prototype.readNumber=function(){if(4!==this.stream.get16())throw Error("ERROR: Define number format throw new IOException [Ld!=4]");return this.stream.get16()};"undefined"!==
typeof b&&b.exports&&(b.exports=d.lossless.Decoder)},{"./data-stream.js":7,"./frame-header.js":9,"./huffman-table.js":10,"./quantization-table.js":12,"./scan-header.js":14,"./utils.js":15}],9:[function(a,b,e){var d=d||{};d.lossless=d.lossless||{};d.lossless.ComponentSpec=d.lossless.ComponentSpec||("undefined"!==typeof a?a("./component-spec.js"):null);d.lossless.DataStream=d.lossless.DataStream||("undefined"!==typeof a?a("./data-stream.js"):null);d.lossless.FrameHeader=d.lossless.FrameHeader||function(){this.components=
[];this.precision=this.numComp=this.dimY=this.dimX=0};d.lossless.FrameHeader.prototype.read=function(a){var b=0,e,r,q,t;e=a.get16();b+=2;this.precision=a.get8();b+=1;this.dimY=a.get16();b+=2;this.dimX=a.get16();b+=2;this.numComp=a.get8();b+=1;for(r=1;r<=this.numComp;r+=1){if(b>e)throw Error("ERROR: frame format error");q=a.get8();b+=1;if(b>=e)throw Error("ERROR: frame format error [c>=Lf]");t=a.get8();b+=1;this.components[q]||(this.components[q]=new d.lossless.ComponentSpec);this.components[q].hSamp=
t>>4;this.components[q].vSamp=t&15;this.components[q].quantTableSel=a.get8();b+=1}if(b!==e)throw Error("ERROR: frame format error [Lf!=count]");return 1};"undefined"!==typeof b&&b.exports&&(b.exports=d.lossless.FrameHeader)},{"./component-spec.js":6,"./data-stream.js":7}],10:[function(a,b,e){var d=d||{};d.lossless=d.lossless||{};d.lossless.DataStream=d.lossless.DataStream||("undefined"!==typeof a?a("./data-stream.js"):null);d.lossless.Utils=d.lossless.Utils||("undefined"!==typeof a?a("./utils.js"):
null);d.lossless.HuffmanTable=d.lossless.HuffmanTable||function(){this.l=d.lossless.Utils.createArray(4,2,16);this.th=[];this.v=d.lossless.Utils.createArray(4,2,16,200);this.tc=d.lossless.Utils.createArray(4,2);this.tc[0][0]=0;this.tc[1][0]=0;this.tc[2][0]=0;this.tc[3][0]=0;this.tc[0][1]=0;this.tc[1][1]=0;this.tc[2][1]=0;this.tc[3][1]=0;this.th[0]=0;this.th[1]=0;this.th[2]=0;this.th[3]=0};d.lossless.HuffmanTable.MSB=2147483648;d.lossless.HuffmanTable.prototype.read=function(a,b){var d=0,e,q,t,y,G;
e=a.get16();for(d+=2;d<e;){q=a.get8();d+=1;t=q&15;if(3<t)throw Error("ERROR: Huffman table ID > 3");q>>=4;if(2<q)throw Error("ERROR: Huffman table [Table class > 2 ]");this.th[t]=1;this.tc[t][q]=1;for(y=0;16>y;y+=1)this.l[t][q][y]=a.get8(),d+=1;for(y=0;16>y;y+=1)for(G=0;G<this.l[t][q][y];G+=1){if(d>e)throw Error("ERROR: Huffman table format error [count>Lh]");this.v[t][q][y][G]=a.get8();d+=1}}if(d!==e)throw Error("ERROR: Huffman table format error [count!=Lf]");for(y=0;4>y;y+=1)for(G=0;2>G;G+=1)0!==
this.tc[y][G]&&this.buildHuffTable(b[y][G],this.l[y][G],this.v[y][G]);return 1};d.lossless.HuffmanTable.prototype.buildHuffTable=function(a,b,e){var r,q,t,y,G;for(t=q=0;8>t;t+=1)for(y=0;y<b[t];y+=1)for(G=0;G<256>>t+1;G+=1)a[q]=e[t][y]|t+1<<8,q+=1;for(t=1;256>q;t+=1,q+=1)a[q]=t|d.lossless.HuffmanTable.MSB;r=1;q=0;for(t=8;16>t;t+=1)for(y=0;y<b[t];y+=1){for(G=0;G<256>>t-7;G+=1)a[256*r+q]=e[t][y]|t+1<<8,q+=1;if(256<=q){if(256<q)throw Error("ERROR: Huffman table error(1)!");q=0;r+=1}}};"undefined"!==typeof b&&
b.exports&&(b.exports=d.lossless.HuffmanTable)},{"./data-stream.js":7,"./utils.js":15}],11:[function(a,b,e){var d=d||{};d.lossless=d.lossless||{};d.lossless.ComponentSpec=d.lossless.ComponentSpec||("undefined"!==typeof a?a("./component-spec.js"):null);d.lossless.DataStream=d.lossless.DataStream||("undefined"!==typeof a?a("./data-stream.js"):null);d.lossless.Decoder=d.lossless.Decoder||("undefined"!==typeof a?a("./decoder.js"):null);d.lossless.FrameHeader=d.lossless.FrameHeader||("undefined"!==typeof a?
a("./frame-header.js"):null);d.lossless.HuffmanTable=d.lossless.HuffmanTable||("undefined"!==typeof a?a("./huffman-table.js"):null);d.lossless.QuantizationTable=d.lossless.QuantizationTable||("undefined"!==typeof a?a("./quantization-table.js"):null);d.lossless.ScanComponent=d.lossless.ScanComponent||("undefined"!==typeof a?a("./scan-component.js"):null);d.lossless.ScanHeader=d.lossless.ScanHeader||("undefined"!==typeof a?a("./scan-header.js"):null);d.lossless.Utils=d.lossless.Utils||("undefined"!==
typeof a?a("./utils.js"):null);"undefined"!==typeof b&&b.exports&&(b.exports=d)},{"./component-spec.js":6,"./data-stream.js":7,"./decoder.js":8,"./frame-header.js":9,"./huffman-table.js":10,"./quantization-table.js":12,"./scan-component.js":13,"./scan-header.js":14,"./utils.js":15}],12:[function(a,b,e){var d=d||{};d.lossless=d.lossless||{};d.lossless.DataStream=d.lossless.DataStream||("undefined"!==typeof a?a("./data-stream.js"):null);d.lossless.Utils=d.lossless.Utils||("undefined"!==typeof a?a("./utils.js"):
null);d.lossless.QuantizationTable=d.lossless.QuantizationTable||function(){this.precision=[];this.tq=[];this.quantTables=d.lossless.Utils.createArray(4,64);this.tq[0]=0;this.tq[1]=0;this.tq[2]=0;this.tq[3]=0};d.lossless.QuantizationTable.enhanceQuantizationTable=function(a,b){var d;for(d=0;8>d;d+=1)a[b[0+d]]*=90,a[b[32+d]]*=90,a[b[16+d]]*=118,a[b[48+d]]*=49,a[b[40+d]]*=71,a[b[8+d]]*=126,a[b[56+d]]*=25,a[b[24+d]]*=106;for(d=0;8>d;d+=1)a[b[0+8*d]]*=90,a[b[4+8*d]]*=90,a[b[2+8*d]]*=118,a[b[6+8*d]]*=
49,a[b[5+8*d]]*=71,a[b[1+8*d]]*=126,a[b[7+8*d]]*=25,a[b[3+8*d]]*=106;for(d=0;64>d;d+=1)a[d]>>=6};d.lossless.QuantizationTable.prototype.read=function(a,b){var e=0,r,q,t;r=a.get16();for(e+=2;e<r;){q=a.get8();e+=1;t=q&15;if(3<t)throw Error("ERROR: Quantization table ID > 3");this.precision[t]=q>>4;if(0===this.precision[t])this.precision[t]=8;else if(1===this.precision[t])this.precision[t]=16;else throw Error("ERROR: Quantization table precision error");this.tq[t]=1;if(8===this.precision[t])for(q=0;64>
q;q+=1){if(e>r)throw Error("ERROR: Quantization table format error");this.quantTables[t][q]=a.get8();e+=1}else for(q=0;64>q;q+=1){if(e>r)throw Error("ERROR: Quantization table format error");this.quantTables[t][q]=a.get16();e+=2}d.lossless.QuantizationTable.enhanceQuantizationTable(this.quantTables[t],b)}if(e!==r)throw Error("ERROR: Quantization table error [count!=Lq]");return 1};"undefined"!==typeof b&&b.exports&&(b.exports=d.lossless.QuantizationTable)},{"./data-stream.js":7,"./utils.js":15}],
13:[function(a,b,e){var d=d||{};d.lossless=d.lossless||{};d.lossless.ScanComponent=d.lossless.ScanComponent||function(){this.scanCompSel=this.dcTabSel=this.acTabSel=0};"undefined"!==typeof b&&b.exports&&(b.exports=d.lossless.ScanComponent)},{}],14:[function(a,b,e){var d=d||{};d.lossless=d.lossless||{};d.lossless.DataStream=d.lossless.DataStream||("undefined"!==typeof a?a("./data-stream.js"):null);d.lossless.ScanComponent=d.lossless.ScanComponent||("undefined"!==typeof a?a("./scan-component.js"):null);
d.lossless.ScanHeader=d.lossless.ScanHeader||function(){this.spectralEnd=this.selection=this.numComp=this.al=this.ah=0;this.components=[]};d.lossless.ScanHeader.prototype.read=function(a){var b=0,e,r,q;e=a.get16();b+=2;this.numComp=a.get8();b+=1;for(r=0;r<this.numComp;r+=1){this.components[r]=new d.lossless.ScanComponent;if(b>e)throw Error("ERROR: scan header format error");this.components[r].scanCompSel=a.get8();b+=1;q=a.get8();b+=1;this.components[r].dcTabSel=q>>4;this.components[r].acTabSel=q&
15}this.selection=a.get8();b+=1;this.spectralEnd=a.get8();b+=1;q=a.get8();this.ah=q>>4;this.al=q&15;if(b+1!==e)throw Error("ERROR: scan header format error [count!=Ns]");return 1};"undefined"!==typeof b&&b.exports&&(b.exports=d.lossless.ScanHeader)},{"./data-stream.js":7,"./scan-component.js":13}],15:[function(a,b,e){var d=d||{};d.lossless=d.lossless||{};d.lossless.Utils=d.lossless.Utils||{};d.lossless.Utils.createArray=function(a){var b=Array(a||0),e=a;if(1<arguments.length)for(var r=Array.prototype.slice.call(arguments,
1);e--;)b[a-1-e]=d.lossless.Utils.createArray.apply(this,r);return b};d.lossless.Utils.makeCRCTable=function(){for(var a,b=[],d=0;256>d;d++){a=d;for(var e=0;8>e;e++)a=a&1?3988292384^a>>>1:a>>>1;b[d]=a}return b};d.lossless.Utils.crc32=function(a){a=new Uint8Array(a.buffer);for(var b=d.lossless.Utils.crcTable||(d.lossless.Utils.crcTable=d.lossless.Utils.makeCRCTable()),e=-1,r=0;r<a.length;r++)e=e>>>8^b[(e^a[r])&255];return(e^-1)>>>0};"undefined"!==typeof b&&b.exports&&(b.exports=d.lossless.Utils)},
{}],16:[function(a,b,e){e=a("./lib/utils/common").assign;var d=a("./lib/deflate"),f=a("./lib/inflate");a=a("./lib/zlib/constants");var k={};e(k,d,f,a);b.exports=k},{"./lib/deflate":17,"./lib/inflate":18,"./lib/utils/common":19,"./lib/zlib/constants":22}],17:[function(a,b,e){function d(a){if(!(this instanceof d))return new d(a);a=this.options=h.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},a||{});a.raw&&0<a.windowBits?a.windowBits=-a.windowBits:a.gzip&&0<a.windowBits&&
16>a.windowBits&&(a.windowBits+=16);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new t;this.strm.avail_out=0;var b=k.deflateInit2(this.strm,a.level,a.method,a.windowBits,a.memLevel,a.strategy);if(0!==b)throw Error(q[b]);a.header&&k.deflateSetHeader(this.strm,a.header);if(a.dictionary){a="string"===typeof a.dictionary?r.string2buf(a.dictionary):"[object ArrayBuffer]"===y.call(a.dictionary)?new Uint8Array(a.dictionary):a.dictionary;b=k.deflateSetDictionary(this.strm,a);if(0!==b)throw Error(q[b]);
this._dict_set=!0}}function f(a,b){var f=new d(b);f.push(a,!0);if(f.err)throw f.msg||q[f.err];return f.result}var k=a("./zlib/deflate"),h=a("./utils/common"),r=a("./utils/strings"),q=a("./zlib/messages"),t=a("./zlib/zstream"),y=Object.prototype.toString;d.prototype.push=function(a,b){var d=this.strm,f=this.options.chunkSize,e,q;if(this.ended)return!1;q=b===~~b?b:!0===b?4:0;"string"===typeof a?d.input=r.string2buf(a):"[object ArrayBuffer]"===y.call(a)?d.input=new Uint8Array(a):d.input=a;d.next_in=
0;d.avail_in=d.input.length;do{0===d.avail_out&&(d.output=new h.Buf8(f),d.next_out=0,d.avail_out=f);e=k.deflate(d,q);if(1!==e&&0!==e)return this.onEnd(e),this.ended=!0,!1;if(0===d.avail_out||0===d.avail_in&&(4===q||2===q))if("string"===this.options.to)this.onData(r.buf2binstring(h.shrinkBuf(d.output,d.next_out)));else this.onData(h.shrinkBuf(d.output,d.next_out))}while((0<d.avail_in||0===d.avail_out)&&1!==e);if(4===q)return e=k.deflateEnd(this.strm),this.onEnd(e),this.ended=!0,0===e;2===q&&(this.onEnd(0),
d.avail_out=0);return!0};d.prototype.onData=function(a){this.chunks.push(a)};d.prototype.onEnd=function(a){0===a&&(this.result="string"===this.options.to?this.chunks.join(""):h.flattenChunks(this.chunks));this.chunks=[];this.err=a;this.msg=this.strm.msg};e.Deflate=d;e.deflate=f;e.deflateRaw=function(a,b){b=b||{};b.raw=!0;return f(a,b)};e.gzip=function(a,b){b=b||{};b.gzip=!0;return f(a,b)}},{"./utils/common":19,"./utils/strings":20,"./zlib/deflate":24,"./zlib/messages":29,"./zlib/zstream":31}],18:[function(a,
b,e){function d(a){if(!(this instanceof d))return new d(a);var b=this.options=h.assign({chunkSize:16384,windowBits:0,to:""},a||{});b.raw&&0<=b.windowBits&&16>b.windowBits&&(b.windowBits=-b.windowBits,0===b.windowBits&&(b.windowBits=-15));!(0<=b.windowBits&&16>b.windowBits)||a&&a.windowBits||(b.windowBits+=32);15<b.windowBits&&48>b.windowBits&&0===(b.windowBits&15)&&(b.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new y;this.strm.avail_out=0;a=k.inflateInit2(this.strm,
b.windowBits);if(a!==q.Z_OK)throw Error(t[a]);this.header=new G;k.inflateGetHeader(this.strm,this.header)}function f(a,b){var f=new d(b);f.push(a,!0);if(f.err)throw f.msg||t[f.err];return f.result}var k=a("./zlib/inflate"),h=a("./utils/common"),r=a("./utils/strings"),q=a("./zlib/constants"),t=a("./zlib/messages"),y=a("./zlib/zstream"),G=a("./zlib/gzheader"),B=Object.prototype.toString;d.prototype.push=function(a,b){var d=this.strm,f=this.options.chunkSize,e=this.options.dictionary,t,y,m,G,ba,Z=!1;
if(this.ended)return!1;y=b===~~b?b:!0===b?q.Z_FINISH:q.Z_NO_FLUSH;"string"===typeof a?d.input=r.binstring2buf(a):"[object ArrayBuffer]"===B.call(a)?d.input=new Uint8Array(a):d.input=a;d.next_in=0;d.avail_in=d.input.length;do{0===d.avail_out&&(d.output=new h.Buf8(f),d.next_out=0,d.avail_out=f);t=k.inflate(d,q.Z_NO_FLUSH);t===q.Z_NEED_DICT&&e&&(t="string"===typeof e?r.string2buf(e):"[object ArrayBuffer]"===B.call(e)?new Uint8Array(e):e,t=k.inflateSetDictionary(this.strm,t));t===q.Z_BUF_ERROR&&!0===
Z&&(t=q.Z_OK,Z=!1);if(t!==q.Z_STREAM_END&&t!==q.Z_OK)return this.onEnd(t),this.ended=!0,!1;if(d.next_out&&(0===d.avail_out||t===q.Z_STREAM_END||0===d.avail_in&&(y===q.Z_FINISH||y===q.Z_SYNC_FLUSH)))if("string"===this.options.to)m=r.utf8border(d.output,d.next_out),G=d.next_out-m,ba=r.buf2string(d.output,m),d.next_out=G,d.avail_out=f-G,G&&h.arraySet(d.output,d.output,m,G,0),this.onData(ba);else this.onData(h.shrinkBuf(d.output,d.next_out));0===d.avail_in&&0===d.avail_out&&(Z=!0)}while((0<d.avail_in||
0===d.avail_out)&&t!==q.Z_STREAM_END);t===q.Z_STREAM_END&&(y=q.Z_FINISH);if(y===q.Z_FINISH)return t=k.inflateEnd(this.strm),this.onEnd(t),this.ended=!0,t===q.Z_OK;y===q.Z_SYNC_FLUSH&&(this.onEnd(q.Z_OK),d.avail_out=0);return!0};d.prototype.onData=function(a){this.chunks.push(a)};d.prototype.onEnd=function(a){a===q.Z_OK&&(this.result="string"===this.options.to?this.chunks.join(""):h.flattenChunks(this.chunks));this.chunks=[];this.err=a;this.msg=this.strm.msg};e.Inflate=d;e.inflate=f;e.inflateRaw=function(a,
b){b=b||{};b.raw=!0;return f(a,b)};e.ungzip=f},{"./utils/common":19,"./utils/strings":20,"./zlib/constants":22,"./zlib/gzheader":25,"./zlib/inflate":27,"./zlib/messages":29,"./zlib/zstream":31}],19:[function(a,b,e){a="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Int32Array;e.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var d=b.shift();if(d){if("object"!==typeof d)throw new TypeError(d+"must be non-object");for(var f in d)Object.prototype.hasOwnProperty.call(d,
f)&&(a[f]=d[f])}}return a};e.shrinkBuf=function(a,b){if(a.length===b)return a;if(a.subarray)return a.subarray(0,b);a.length=b;return a};var d={arraySet:function(a,b,d,f,e){if(b.subarray&&a.subarray)a.set(b.subarray(d,d+f),e);else for(var y=0;y<f;y++)a[e+y]=b[d+y]},flattenChunks:function(a){var b,d,f,e,y;b=f=0;for(d=a.length;b<d;b++)f+=a[b].length;y=new Uint8Array(f);b=f=0;for(d=a.length;b<d;b++)e=a[b],y.set(e,f),f+=e.length;return y}},f={arraySet:function(a,b,d,f,e){for(var y=0;y<f;y++)a[e+y]=b[d+
y]},flattenChunks:function(a){return[].concat.apply([],a)}};e.setTyped=function(a){a?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,d)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,f))};e.setTyped(a)},{}],20:[function(a,b,e){function d(a,b){if(65537>b&&(a.subarray&&h||!a.subarray&&k))return String.fromCharCode.apply(null,f.shrinkBuf(a,b));for(var d="",e=0;e<b;e++)d+=String.fromCharCode(a[e]);return d}var f=a("./common"),k=!0,h=!0;try{String.fromCharCode.apply(null,[0])}catch(r){k=
!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(q){h=!1}var t=new f.Buf8(256);for(a=0;256>a;a++)t[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;t[254]=t[254]=1;e.string2buf=function(a){var b,d,e,h,k,q=a.length,r=0;for(h=0;h<q;h++)d=a.charCodeAt(h),55296===(d&64512)&&h+1<q&&(e=a.charCodeAt(h+1),56320===(e&64512)&&(d=65536+(d-55296<<10)+(e-56320),h++)),r+=128>d?1:2048>d?2:65536>d?3:4;b=new f.Buf8(r);for(h=k=0;k<r;h++)d=a.charCodeAt(h),55296===(d&64512)&&h+1<q&&(e=a.charCodeAt(h+1),
56320===(e&64512)&&(d=65536+(d-55296<<10)+(e-56320),h++)),128>d?b[k++]=d:(2048>d?b[k++]=192|d>>>6:(65536>d?b[k++]=224|d>>>12:(b[k++]=240|d>>>18,b[k++]=128|d>>>12&63),b[k++]=128|d>>>6&63),b[k++]=128|d&63);return b};e.buf2binstring=function(a){return d(a,a.length)};e.binstring2buf=function(a){for(var b=new f.Buf8(a.length),d=0,e=b.length;d<e;d++)b[d]=a.charCodeAt(d);return b};e.buf2string=function(a,b){var f,e,h,k,q=b||a.length,r=Array(2*q);for(f=e=0;f<q;)if(h=a[f++],128>h)r[e++]=h;else if(k=t[h],4<
k)r[e++]=65533,f+=k-1;else{for(h&=2===k?31:3===k?15:7;1<k&&f<q;)h=h<<6|a[f++]&63,k--;1<k?r[e++]=65533:65536>h?r[e++]=h:(h-=65536,r[e++]=55296|h>>10&1023,r[e++]=56320|h&1023)}return d(r,e)};e.utf8border=function(a,b){var d;b=b||a.length;b>a.length&&(b=a.length);for(d=b-1;0<=d&&128===(a[d]&192);)d--;return 0>d||0===d?b:d+t[a[d]]>b?d:b}},{"./common":19}],21:[function(a,b,e){b.exports=function(a,b,e,h){var r=a&65535|0;a=a>>>16&65535|0;for(var q=0;0!==e;){q=2E3<e?2E3:e;e-=q;do r=r+b[h++]|0,a=a+r|0;while(--q);
r%=65521;a%=65521}return r|a<<16|0}},{}],22:[function(a,b,e){b.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],23:[function(a,b,e){var d=function(){for(var a,
b=[],d=0;256>d;d++){a=d;for(var e=0;8>e;e++)a=a&1?3988292384^a>>>1:a>>>1;b[d]=a}return b}();b.exports=function(a,b,e,r){e=r+e;for(a^=-1;r<e;r++)a=a>>>8^d[(a^b[r])&255];return a^-1}},{}],24:[function(a,b,e){function d(a,b){a.msg=X[b];return b}function f(a){for(var b=a.length;0<=--b;)a[b]=0}function k(a){var b=a.state,d=b.pending;d>a.avail_out&&(d=a.avail_out);0!==d&&(m.arraySet(a.output,b.pending_buf,b.pending_out,d,a.next_out),a.next_out+=d,b.pending_out+=d,a.total_out+=d,a.avail_out-=d,b.pending-=
d,0===b.pending&&(b.pending_out=0))}function h(a,b){fa._tr_flush_block(a,0<=a.block_start?a.block_start:-1,a.strstart-a.block_start,b);a.block_start=a.strstart;k(a.strm)}function r(a,b){a.pending_buf[a.pending++]=b}function q(a,b){a.pending_buf[a.pending++]=b>>>8&255;a.pending_buf[a.pending++]=b&255}function t(a,b){var d=a.max_chain_length,f=a.strstart,e,h=a.prev_length,k=a.nice_match,m=a.strstart>a.w_size-262?a.strstart-(a.w_size-262):0,q=a.window,r=a.w_mask,t=a.prev,w=a.strstart+258,y=q[f+h-1],
B=q[f+h];a.prev_length>=a.good_match&&(d>>=2);k>a.lookahead&&(k=a.lookahead);do if(e=b,q[e+h]===B&&q[e+h-1]===y&&q[e]===q[f]&&q[++e]===q[f+1]){f+=2;for(e++;q[++f]===q[++e]&&q[++f]===q[++e]&&q[++f]===q[++e]&&q[++f]===q[++e]&&q[++f]===q[++e]&&q[++f]===q[++e]&&q[++f]===q[++e]&&q[++f]===q[++e]&&f<w;);e=258-(w-f);f=w-258;if(e>h){a.match_start=b;h=e;if(e>=k)break;y=q[f+h-1];B=q[f+h]}}while((b=t[b&r])>m&&0!==--d);return h<=a.lookahead?h:a.lookahead}function y(a){var b=a.w_size,d,f,e,h;do{h=a.window_size-
a.lookahead-a.strstart;if(a.strstart>=b+(b-262)){m.arraySet(a.window,a.window,b,b,0);a.match_start-=b;a.strstart-=b;a.block_start-=b;d=f=a.hash_size;do e=a.head[--d],a.head[d]=e>=b?e-b:0;while(--f);d=f=b;do e=a.prev[--d],a.prev[d]=e>=b?e-b:0;while(--f);h+=b}if(0===a.strm.avail_in)break;d=a.strm;f=a.window;e=a.strstart+a.lookahead;var k=d.avail_in;k>h&&(k=h);0===k?f=0:(d.avail_in-=k,m.arraySet(f,d.input,d.next_in,k,e),1===d.state.wrap?d.adler=ba(d.adler,f,k,e):2===d.state.wrap&&(d.adler=Z(d.adler,
f,k,e)),d.next_in+=k,d.total_in+=k,f=k);a.lookahead+=f;if(3<=a.lookahead+a.insert)for(h=a.strstart-a.insert,a.ins_h=a.window[h],a.ins_h=(a.ins_h<<a.hash_shift^a.window[h+1])&a.hash_mask;a.insert&&!(a.ins_h=(a.ins_h<<a.hash_shift^a.window[h+3-1])&a.hash_mask,a.prev[h&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=h,h++,a.insert--,3>a.lookahead+a.insert););}while(262>a.lookahead&&0!==a.strm.avail_in)}function G(a,b){for(var d;;){if(262>a.lookahead){y(a);if(262>a.lookahead&&0===b)return 1;if(0===a.lookahead)break}d=
0;3<=a.lookahead&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+3-1])&a.hash_mask,d=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart);0!==d&&a.strstart-d<=a.w_size-262&&(a.match_length=t(a,d));if(3<=a.match_length)if(d=fa._tr_tally(a,a.strstart-a.match_start,a.match_length-3),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&3<=a.lookahead){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+3-1])&a.hash_mask,a.prev[a.strstart&
a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart;while(0!==--a.match_length);a.strstart++}else a.strstart+=a.match_length,a.match_length=0,a.ins_h=a.window[a.strstart],a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+1])&a.hash_mask;else d=fa._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++;if(d&&(h(a,!1),0===a.strm.avail_out))return 1}a.insert=2>a.strstart?a.strstart:2;return 4===b?(h(a,!0),0===a.strm.avail_out?3:4):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?1:2}function B(a,
b){for(var d,f;;){if(262>a.lookahead){y(a);if(262>a.lookahead&&0===b)return 1;if(0===a.lookahead)break}d=0;3<=a.lookahead&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+3-1])&a.hash_mask,d=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart);a.prev_length=a.match_length;a.prev_match=a.match_start;a.match_length=2;0!==d&&a.prev_length<a.max_lazy_match&&a.strstart-d<=a.w_size-262&&(a.match_length=t(a,d),5>=a.match_length&&(1===a.strategy||3===a.match_length&&4096<a.strstart-
a.match_start)&&(a.match_length=2));if(3<=a.prev_length&&a.match_length<=a.prev_length){f=a.strstart+a.lookahead-3;d=fa._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-3);a.lookahead-=a.prev_length-1;a.prev_length-=2;do++a.strstart<=f&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+3-1])&a.hash_mask,a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart);while(0!==--a.prev_length);a.match_available=0;a.match_length=2;a.strstart++;if(d&&(h(a,!1),0===a.strm.avail_out))return 1}else if(a.match_available){if((d=
fa._tr_tally(a,0,a.window[a.strstart-1]))&&h(a,!1),a.strstart++,a.lookahead--,0===a.strm.avail_out)return 1}else a.match_available=1,a.strstart++,a.lookahead--}a.match_available&&(fa._tr_tally(a,0,a.window[a.strstart-1]),a.match_available=0);a.insert=2>a.strstart?a.strstart:2;return 4===b?(h(a,!0),0===a.strm.avail_out?3:4):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?1:2}function w(a,b){for(var d,f,e,k=a.window;;){if(258>=a.lookahead){y(a);if(258>=a.lookahead&&0===b)return 1;if(0===a.lookahead)break}a.match_length=
0;if(3<=a.lookahead&&0<a.strstart&&(f=a.strstart-1,d=k[f],d===k[++f]&&d===k[++f]&&d===k[++f])){for(e=a.strstart+258;d===k[++f]&&d===k[++f]&&d===k[++f]&&d===k[++f]&&d===k[++f]&&d===k[++f]&&d===k[++f]&&d===k[++f]&&f<e;);a.match_length=258-(e-f);a.match_length>a.lookahead&&(a.match_length=a.lookahead)}3<=a.match_length?(d=fa._tr_tally(a,1,a.match_length-3),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(d=fa._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++);if(d&&
(h(a,!1),0===a.strm.avail_out))return 1}a.insert=0;return 4===b?(h(a,!0),0===a.strm.avail_out?3:4):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?1:2}function E(a,b){for(var d;;){if(0===a.lookahead&&(y(a),0===a.lookahead)){if(0===b)return 1;break}a.match_length=0;d=fa._tr_tally(a,0,a.window[a.strstart]);a.lookahead--;a.strstart++;if(d&&(h(a,!1),0===a.strm.avail_out))return 1}a.insert=0;return 4===b?(h(a,!0),0===a.strm.avail_out?3:4):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?1:2}function P(a,b,d,f,e){this.good_length=
a;this.max_lazy=b;this.nice_length=d;this.max_chain=f;this.func=e}function da(){this.strm=null;this.status=0;this.pending_buf=null;this.wrap=this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=8;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=
this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new m.Buf16(1146);this.dyn_dtree=new m.Buf16(122);this.bl_tree=new m.Buf16(78);f(this.dyn_ltree);f(this.dyn_dtree);f(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new m.Buf16(16);this.heap=new m.Buf16(573);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new m.Buf16(573);f(this.depth);this.bi_valid=
this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=this.lit_bufsize=this.l_buf=0}function aa(a){var b;if(!a||!a.state)return d(a,-2);a.total_in=a.total_out=0;a.data_type=2;b=a.state;b.pending=0;b.pending_out=0;0>b.wrap&&(b.wrap=-b.wrap);b.status=b.wrap?42:113;a.adler=2===b.wrap?0:1;b.last_flush=0;fa._tr_init(b);return 0}function M(a){var b=aa(a);0===b&&(a=a.state,a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=U[a.level].max_lazy,a.good_match=U[a.level].good_length,
a.nice_match=U[a.level].nice_length,a.max_chain_length=U[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=2,a.match_available=0,a.ins_h=0);return b}function ka(a,b,f,e,h,k){if(!a)return-2;var q=1;-1===b&&(b=6);0>e?(q=0,e=-e):15<e&&(q=2,e-=16);if(1>h||9<h||8!==f||8>e||15<e||0>b||9<b||0>k||4<k)return d(a,-2);8===e&&(e=9);var r=new da;a.state=r;r.strm=a;r.wrap=q;r.gzhead=null;r.w_bits=e;r.w_size=1<<r.w_bits;r.w_mask=r.w_size-1;r.hash_bits=h+7;r.hash_size=
1<<r.hash_bits;r.hash_mask=r.hash_size-1;r.hash_shift=~~((r.hash_bits+3-1)/3);r.window=new m.Buf8(2*r.w_size);r.head=new m.Buf16(r.hash_size);r.prev=new m.Buf16(r.w_size);r.lit_bufsize=1<<h+6;r.pending_buf_size=4*r.lit_bufsize;r.pending_buf=new m.Buf8(r.pending_buf_size);r.d_buf=1*r.lit_bufsize;r.l_buf=3*r.lit_bufsize;r.level=b;r.strategy=k;r.method=f;return M(a)}var m=a("../utils/common"),fa=a("./trees"),ba=a("./adler32"),Z=a("./crc32"),X=a("./messages"),U;U=[new P(0,0,0,0,function(a,b){var d=65535;
for(d>a.pending_buf_size-5&&(d=a.pending_buf_size-5);;){if(1>=a.lookahead){y(a);if(0===a.lookahead&&0===b)return 1;if(0===a.lookahead)break}a.strstart+=a.lookahead;a.lookahead=0;var f=a.block_start+d;if(0===a.strstart||a.strstart>=f)if(a.lookahead=a.strstart-f,a.strstart=f,h(a,!1),0===a.strm.avail_out)return 1;if(a.strstart-a.block_start>=a.w_size-262&&(h(a,!1),0===a.strm.avail_out))return 1}a.insert=0;if(4===b)return h(a,!0),0===a.strm.avail_out?3:4;a.strstart>a.block_start&&h(a,!1);return 1}),new P(4,
4,8,4,G),new P(4,5,16,8,G),new P(4,6,32,32,G),new P(4,4,16,16,B),new P(8,16,32,32,B),new P(8,16,128,128,B),new P(8,32,128,256,B),new P(32,128,258,1024,B),new P(32,258,258,4096,B)];e.deflateInit=function(a,b){return ka(a,b,8,15,8,0)};e.deflateInit2=ka;e.deflateReset=M;e.deflateResetKeep=aa;e.deflateSetHeader=function(a,b){if(!a||!a.state||2!==a.state.wrap)return-2;a.state.gzhead=b;return 0};e.deflate=function(a,b){var e,h,m,t;if(!a||!a.state||5<b||0>b)return a?d(a,-2):-2;h=a.state;if(!a.output||!a.input&&
0!==a.avail_in||666===h.status&&4!==b)return d(a,0===a.avail_out?-5:-2);h.strm=a;e=h.last_flush;h.last_flush=b;42===h.status&&(2===h.wrap?(a.adler=0,r(h,31),r(h,139),r(h,8),h.gzhead?(r(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),r(h,h.gzhead.time&255),r(h,h.gzhead.time>>8&255),r(h,h.gzhead.time>>16&255),r(h,h.gzhead.time>>24&255),r(h,9===h.level?2:2<=h.strategy||2>h.level?4:0),r(h,h.gzhead.os&255),h.gzhead.extra&&h.gzhead.extra.length&&
(r(h,h.gzhead.extra.length&255),r(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=Z(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=69):(r(h,0),r(h,0),r(h,0),r(h,0),r(h,0),r(h,9===h.level?2:2<=h.strategy||2>h.level?4:0),r(h,3),h.status=113)):(m=8+(h.w_bits-8<<4)<<8,t=-1,t=2<=h.strategy||2>h.level?0:6>h.level?1:6===h.level?2:3,m|=t<<6,0!==h.strstart&&(m|=32),h.status=113,q(h,m+(31-m%31)),0!==h.strstart&&(q(h,a.adler>>>16),q(h,a.adler&65535)),a.adler=1));if(69===h.status)if(h.gzhead.extra){for(m=
h.pending;h.gzindex<(h.gzhead.extra.length&65535)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>m&&(a.adler=Z(a.adler,h.pending_buf,h.pending-m,m)),k(a),m=h.pending,h.pending!==h.pending_buf_size));)r(h,h.gzhead.extra[h.gzindex]&255),h.gzindex++;h.gzhead.hcrc&&h.pending>m&&(a.adler=Z(a.adler,h.pending_buf,h.pending-m,m));h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=73)}else h.status=73;if(73===h.status)if(h.gzhead.name){m=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&
h.pending>m&&(a.adler=Z(a.adler,h.pending_buf,h.pending-m,m)),k(a),m=h.pending,h.pending===h.pending_buf_size)){t=1;break}t=h.gzindex<h.gzhead.name.length?h.gzhead.name.charCodeAt(h.gzindex++)&255:0;r(h,t)}while(0!==t);h.gzhead.hcrc&&h.pending>m&&(a.adler=Z(a.adler,h.pending_buf,h.pending-m,m));0===t&&(h.gzindex=0,h.status=91)}else h.status=91;if(91===h.status)if(h.gzhead.comment){m=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>m&&(a.adler=Z(a.adler,h.pending_buf,h.pending-
m,m)),k(a),m=h.pending,h.pending===h.pending_buf_size)){t=1;break}t=h.gzindex<h.gzhead.comment.length?h.gzhead.comment.charCodeAt(h.gzindex++)&255:0;r(h,t)}while(0!==t);h.gzhead.hcrc&&h.pending>m&&(a.adler=Z(a.adler,h.pending_buf,h.pending-m,m));0===t&&(h.status=103)}else h.status=103;103===h.status&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&k(a),h.pending+2<=h.pending_buf_size&&(r(h,a.adler&255),r(h,a.adler>>8&255),a.adler=0,h.status=113)):h.status=113);if(0!==h.pending){if(k(a),0===a.avail_out)return h.last_flush=
-1,0}else if(0===a.avail_in&&(b<<1)-(4<b?9:0)<=(e<<1)-(4<e?9:0)&&4!==b)return d(a,-5);if(666===h.status&&0!==a.avail_in)return d(a,-5);if(0!==a.avail_in||0!==h.lookahead||0!==b&&666!==h.status){e=2===h.strategy?E(h,b):3===h.strategy?w(h,b):U[h.level].func(h,b);if(3===e||4===e)h.status=666;if(1===e||3===e)return 0===a.avail_out&&(h.last_flush=-1),0;if(2===e&&(1===b?fa._tr_align(h):5!==b&&(fa._tr_stored_block(h,0,0,!1),3===b&&(f(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),k(a),
0===a.avail_out))return h.last_flush=-1,0}if(4!==b)return 0;if(0>=h.wrap)return 1;2===h.wrap?(r(h,a.adler&255),r(h,a.adler>>8&255),r(h,a.adler>>16&255),r(h,a.adler>>24&255),r(h,a.total_in&255),r(h,a.total_in>>8&255),r(h,a.total_in>>16&255),r(h,a.total_in>>24&255)):(q(h,a.adler>>>16),q(h,a.adler&65535));k(a);0<h.wrap&&(h.wrap=-h.wrap);return 0!==h.pending?0:1};e.deflateEnd=function(a){var b;if(!a||!a.state)return-2;b=a.state.status;if(42!==b&&69!==b&&73!==b&&91!==b&&103!==b&&113!==b&&666!==b)return d(a,
-2);a.state=null;return 113===b?d(a,-3):0};e.deflateSetDictionary=function(a,b){var d=b.length,e,h,k,q,r,t;if(!a||!a.state)return-2;e=a.state;k=e.wrap;if(2===k||1===k&&42!==e.status||e.lookahead)return-2;1===k&&(a.adler=ba(a.adler,b,d,0));e.wrap=0;d>=e.w_size&&(0===k&&(f(e.head),e.strstart=0,e.block_start=0,e.insert=0),q=new m.Buf8(e.w_size),m.arraySet(q,b,d-e.w_size,e.w_size,0),b=q,d=e.w_size);q=a.avail_in;r=a.next_in;t=a.input;a.avail_in=d;a.next_in=0;a.input=b;for(y(e);3<=e.lookahead;){d=e.strstart;
h=e.lookahead-2;do e.ins_h=(e.ins_h<<e.hash_shift^e.window[d+3-1])&e.hash_mask,e.prev[d&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=d,d++;while(--h);e.strstart=d;e.lookahead=2;y(e)}e.strstart+=e.lookahead;e.block_start=e.strstart;e.insert=e.lookahead;e.lookahead=0;e.match_length=e.prev_length=2;e.match_available=0;a.next_in=r;a.input=t;a.avail_in=q;e.wrap=k;return 0};e.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":19,"./adler32":21,"./crc32":23,"./messages":29,"./trees":30}],
25:[function(a,b,e){b.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],26:[function(a,b,e){b.exports=function(a,b){var e,h,r,q,t,y,G,B,w,E,P,da,aa,M,ka,m,fa,ba,Z,X,U,x,n,z;e=a.state;h=a.next_in;n=a.input;r=h+(a.avail_in-5);q=a.next_out;z=a.output;t=q-(b-a.avail_out);y=q+(a.avail_out-257);G=e.dmax;B=e.wsize;w=e.whave;E=e.wnext;P=e.window;da=e.hold;aa=e.bits;M=e.lencode;ka=e.distcode;m=(1<<e.lenbits)-
1;fa=(1<<e.distbits)-1;a:do b:for(15>aa&&(da+=n[h++]<<aa,aa+=8,da+=n[h++]<<aa,aa+=8),ba=M[da&m];;){Z=ba>>>24;da>>>=Z;aa-=Z;Z=ba>>>16&255;if(0===Z)z[q++]=ba&65535;else if(Z&16){X=ba&65535;if(Z&=15)aa<Z&&(da+=n[h++]<<aa,aa+=8),X+=da&(1<<Z)-1,da>>>=Z,aa-=Z;15>aa&&(da+=n[h++]<<aa,aa+=8,da+=n[h++]<<aa,aa+=8);ba=ka[da&fa];c:for(;;){Z=ba>>>24;da>>>=Z;aa-=Z;Z=ba>>>16&255;if(Z&16){ba&=65535;Z&=15;aa<Z&&(da+=n[h++]<<aa,aa+=8,aa<Z&&(da+=n[h++]<<aa,aa+=8));ba+=da&(1<<Z)-1;if(ba>G){a.msg="invalid distance too far back";
e.mode=30;break a}da>>>=Z;aa-=Z;Z=q-t;if(ba>Z){Z=ba-Z;if(Z>w&&e.sane){a.msg="invalid distance too far back";e.mode=30;break a}U=0;x=P;if(0===E){if(U+=B-Z,Z<X){X-=Z;do z[q++]=P[U++];while(--Z);U=q-ba;x=z}}else if(E<Z){if(U+=B+E-Z,Z-=E,Z<X){X-=Z;do z[q++]=P[U++];while(--Z);U=0;if(E<X){Z=E;X-=Z;do z[q++]=P[U++];while(--Z);U=q-ba;x=z}}}else if(U+=E-Z,Z<X){X-=Z;do z[q++]=P[U++];while(--Z);U=q-ba;x=z}for(;2<X;)z[q++]=x[U++],z[q++]=x[U++],z[q++]=x[U++],X-=3;X&&(z[q++]=x[U++],1<X&&(z[q++]=x[U++]))}else{U=
q-ba;do z[q++]=z[U++],z[q++]=z[U++],z[q++]=z[U++],X-=3;while(2<X);X&&(z[q++]=z[U++],1<X&&(z[q++]=z[U++]))}}else if(0===(Z&64)){ba=ka[(ba&65535)+(da&(1<<Z)-1)];continue c}else{a.msg="invalid distance code";e.mode=30;break a}break}}else if(0===(Z&64)){ba=M[(ba&65535)+(da&(1<<Z)-1)];continue b}else{Z&32?e.mode=12:(a.msg="invalid literal/length code",e.mode=30);break a}break}while(h<r&&q<y);X=aa>>3;h-=X;aa-=X<<3;a.next_in=h;a.next_out=q;a.avail_in=h<r?5+(r-h):5-(h-r);a.avail_out=q<y?257+(y-q):257-(q-
y);e.hold=da&(1<<aa)-1;e.bits=aa}},{}],27:[function(a,b,e){function d(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}function f(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=
new y.Buf16(320);this.work=new y.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function k(a){var b;if(!a||!a.state)return-2;b=a.state;a.total_in=a.total_out=b.total=0;a.msg="";b.wrap&&(a.adler=b.wrap&1);b.mode=1;b.last=0;b.havedict=0;b.dmax=32768;b.head=null;b.hold=0;b.bits=0;b.lencode=b.lendyn=new y.Buf32(852);b.distcode=b.distdyn=new y.Buf32(592);b.sane=1;b.back=-1;return 0}function h(a){var b;if(!a||!a.state)return-2;b=a.state;b.wsize=0;b.whave=0;b.wnext=0;return k(a)}
function r(a,b){var d,f;if(!a||!a.state)return-2;f=a.state;0>b?(d=0,b=-b):(d=(b>>4)+1,48>b&&(b&=15));if(b&&(8>b||15<b))return-2;null!==f.window&&f.wbits!==b&&(f.window=null);f.wrap=d;f.wbits=b;return h(a)}function q(a,b){var d;if(!a)return-2;d=new f;a.state=d;d.window=null;d=r(a,b);0!==d&&(a.state=null);return d}function t(a,b,d,f){var e=a.state;null===e.window&&(e.wsize=1<<e.wbits,e.wnext=0,e.whave=0,e.window=new y.Buf8(e.wsize));f>=e.wsize?(y.arraySet(e.window,b,d-e.wsize,e.wsize,0),e.wnext=0,e.whave=
e.wsize):(a=e.wsize-e.wnext,a>f&&(a=f),y.arraySet(e.window,b,d-f,a,e.wnext),(f-=a)?(y.arraySet(e.window,b,d-f,f,0),e.wnext=f,e.whave=e.wsize):(e.wnext+=a,e.wnext===e.wsize&&(e.wnext=0),e.whave<e.wsize&&(e.whave+=a)));return 0}var y=a("../utils/common"),G=a("./adler32"),B=a("./crc32"),w=a("./inffast"),E=a("./inftrees"),P=!0,da,aa;e.inflateReset=h;e.inflateReset2=r;e.inflateResetKeep=k;e.inflateInit=function(a){return q(a,15)};e.inflateInit2=q;e.inflate=function(a,b){var f,e,h,k,q,r,x,n,z,Y,D,A,L,la,
ja=0,Ia,va,O,wa=new y.Buf8(4),Ua=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!a||!a.state||!a.output||!a.input&&0!==a.avail_in)return-2;f=a.state;12===f.mode&&(f.mode=13);q=a.next_out;h=a.output;x=a.avail_out;k=a.next_in;e=a.input;r=a.avail_in;n=f.hold;z=f.bits;Y=r;D=x;O=0;a:for(;;)switch(f.mode){case 1:if(0===f.wrap){f.mode=13;break}for(;16>z;){if(0===r)break a;r--;n+=e[k++]<<z;z+=8}if(f.wrap&2&&35615===n){f.check=0;wa[0]=n&255;wa[1]=n>>>8&255;f.check=B(f.check,wa,2,0);z=n=0;f.mode=2;break}f.flags=
0;f.head&&(f.head.done=!1);if(!(f.wrap&1)||(((n&255)<<8)+(n>>8))%31){a.msg="incorrect header check";f.mode=30;break}if(8!==(n&15)){a.msg="unknown compression method";f.mode=30;break}n>>>=4;z-=4;L=(n&15)+8;if(0===f.wbits)f.wbits=L;else if(L>f.wbits){a.msg="invalid window size";f.mode=30;break}f.dmax=1<<L;a.adler=f.check=1;f.mode=n&512?10:12;z=n=0;break;case 2:for(;16>z;){if(0===r)break a;r--;n+=e[k++]<<z;z+=8}f.flags=n;if(8!==(f.flags&255)){a.msg="unknown compression method";f.mode=30;break}if(f.flags&
57344){a.msg="unknown header flags set";f.mode=30;break}f.head&&(f.head.text=n>>8&1);f.flags&512&&(wa[0]=n&255,wa[1]=n>>>8&255,f.check=B(f.check,wa,2,0));z=n=0;f.mode=3;case 3:for(;32>z;){if(0===r)break a;r--;n+=e[k++]<<z;z+=8}f.head&&(f.head.time=n);f.flags&512&&(wa[0]=n&255,wa[1]=n>>>8&255,wa[2]=n>>>16&255,wa[3]=n>>>24&255,f.check=B(f.check,wa,4,0));z=n=0;f.mode=4;case 4:for(;16>z;){if(0===r)break a;r--;n+=e[k++]<<z;z+=8}f.head&&(f.head.xflags=n&255,f.head.os=n>>8);f.flags&512&&(wa[0]=n&255,wa[1]=
n>>>8&255,f.check=B(f.check,wa,2,0));z=n=0;f.mode=5;case 5:if(f.flags&1024){for(;16>z;){if(0===r)break a;r--;n+=e[k++]<<z;z+=8}f.length=n;f.head&&(f.head.extra_len=n);f.flags&512&&(wa[0]=n&255,wa[1]=n>>>8&255,f.check=B(f.check,wa,2,0));z=n=0}else f.head&&(f.head.extra=null);f.mode=6;case 6:if(f.flags&1024&&(A=f.length,A>r&&(A=r),A&&(f.head&&(L=f.head.extra_len-f.length,f.head.extra||(f.head.extra=Array(f.head.extra_len)),y.arraySet(f.head.extra,e,k,A,L)),f.flags&512&&(f.check=B(f.check,e,A,k)),r-=
A,k+=A,f.length-=A),f.length))break a;f.length=0;f.mode=7;case 7:if(f.flags&2048){if(0===r)break a;A=0;do L=e[k+A++],f.head&&L&&65536>f.length&&(f.head.name+=String.fromCharCode(L));while(L&&A<r);f.flags&512&&(f.check=B(f.check,e,A,k));r-=A;k+=A;if(L)break a}else f.head&&(f.head.name=null);f.length=0;f.mode=8;case 8:if(f.flags&4096){if(0===r)break a;A=0;do L=e[k+A++],f.head&&L&&65536>f.length&&(f.head.comment+=String.fromCharCode(L));while(L&&A<r);f.flags&512&&(f.check=B(f.check,e,A,k));r-=A;k+=A;
if(L)break a}else f.head&&(f.head.comment=null);f.mode=9;case 9:if(f.flags&512){for(;16>z;){if(0===r)break a;r--;n+=e[k++]<<z;z+=8}if(n!==(f.check&65535)){a.msg="header crc mismatch";f.mode=30;break}z=n=0}f.head&&(f.head.hcrc=f.flags>>9&1,f.head.done=!0);a.adler=f.check=0;f.mode=12;break;case 10:for(;32>z;){if(0===r)break a;r--;n+=e[k++]<<z;z+=8}a.adler=f.check=d(n);z=n=0;f.mode=11;case 11:if(0===f.havedict)return a.next_out=q,a.avail_out=x,a.next_in=k,a.avail_in=r,f.hold=n,f.bits=z,2;a.adler=f.check=
1;f.mode=12;case 12:if(5===b||6===b)break a;case 13:if(f.last){n>>>=z&7;z-=z&7;f.mode=27;break}for(;3>z;){if(0===r)break a;r--;n+=e[k++]<<z;z+=8}f.last=n&1;n>>>=1;--z;switch(n&3){case 0:f.mode=14;break;case 1:A=f;if(P){L=void 0;da=new y.Buf32(512);aa=new y.Buf32(32);for(L=0;144>L;)A.lens[L++]=8;for(;256>L;)A.lens[L++]=9;for(;280>L;)A.lens[L++]=7;for(;288>L;)A.lens[L++]=8;E(1,A.lens,0,288,da,0,A.work,{bits:9});for(L=0;32>L;)A.lens[L++]=5;E(2,A.lens,0,32,aa,0,A.work,{bits:5});P=!1}A.lencode=da;A.lenbits=
9;A.distcode=aa;A.distbits=5;f.mode=20;if(6===b){n>>>=2;z-=2;break a}break;case 2:f.mode=17;break;case 3:a.msg="invalid block type",f.mode=30}n>>>=2;z-=2;break;case 14:n>>>=z&7;for(z-=z&7;32>z;){if(0===r)break a;r--;n+=e[k++]<<z;z+=8}if((n&65535)!==(n>>>16^65535)){a.msg="invalid stored block lengths";f.mode=30;break}f.length=n&65535;z=n=0;f.mode=15;if(6===b)break a;case 15:f.mode=16;case 16:if(A=f.length){A>r&&(A=r);A>x&&(A=x);if(0===A)break a;y.arraySet(h,e,k,A,q);r-=A;k+=A;x-=A;q+=A;f.length-=A;
break}f.mode=12;break;case 17:for(;14>z;){if(0===r)break a;r--;n+=e[k++]<<z;z+=8}f.nlen=(n&31)+257;n>>>=5;z-=5;f.ndist=(n&31)+1;n>>>=5;z-=5;f.ncode=(n&15)+4;n>>>=4;z-=4;if(286<f.nlen||30<f.ndist){a.msg="too many length or distance symbols";f.mode=30;break}f.have=0;f.mode=18;case 18:for(;f.have<f.ncode;){for(;3>z;){if(0===r)break a;r--;n+=e[k++]<<z;z+=8}f.lens[Ua[f.have++]]=n&7;n>>>=3;z-=3}for(;19>f.have;)f.lens[Ua[f.have++]]=0;f.lencode=f.lendyn;f.lenbits=7;A={bits:f.lenbits};O=E(0,f.lens,0,19,f.lencode,
0,f.work,A);f.lenbits=A.bits;if(O){a.msg="invalid code lengths set";f.mode=30;break}f.have=0;f.mode=19;case 19:for(;f.have<f.nlen+f.ndist;){for(;;){ja=f.lencode[n&(1<<f.lenbits)-1];A=ja>>>24;ja&=65535;if(A<=z)break;if(0===r)break a;r--;n+=e[k++]<<z;z+=8}if(16>ja)n>>>=A,z-=A,f.lens[f.have++]=ja;else{if(16===ja){for(L=A+2;z<L;){if(0===r)break a;r--;n+=e[k++]<<z;z+=8}n>>>=A;z-=A;if(0===f.have){a.msg="invalid bit length repeat";f.mode=30;break}L=f.lens[f.have-1];A=3+(n&3);n>>>=2;z-=2}else if(17===ja){for(L=
A+3;z<L;){if(0===r)break a;r--;n+=e[k++]<<z;z+=8}n>>>=A;z-=A;L=0;A=3+(n&7);n>>>=3;z-=3}else{for(L=A+7;z<L;){if(0===r)break a;r--;n+=e[k++]<<z;z+=8}n>>>=A;z-=A;L=0;A=11+(n&127);n>>>=7;z-=7}if(f.have+A>f.nlen+f.ndist){a.msg="invalid bit length repeat";f.mode=30;break}for(;A--;)f.lens[f.have++]=L}}if(30===f.mode)break;if(0===f.lens[256]){a.msg="invalid code -- missing end-of-block";f.mode=30;break}f.lenbits=9;A={bits:f.lenbits};O=E(1,f.lens,0,f.nlen,f.lencode,0,f.work,A);f.lenbits=A.bits;if(O){a.msg=
"invalid literal/lengths set";f.mode=30;break}f.distbits=6;f.distcode=f.distdyn;A={bits:f.distbits};O=E(2,f.lens,f.nlen,f.ndist,f.distcode,0,f.work,A);f.distbits=A.bits;if(O){a.msg="invalid distances set";f.mode=30;break}f.mode=20;if(6===b)break a;case 20:f.mode=21;case 21:if(6<=r&&258<=x){a.next_out=q;a.avail_out=x;a.next_in=k;a.avail_in=r;f.hold=n;f.bits=z;w(a,D);q=a.next_out;h=a.output;x=a.avail_out;k=a.next_in;e=a.input;r=a.avail_in;n=f.hold;z=f.bits;12===f.mode&&(f.back=-1);break}for(f.back=
0;;){ja=f.lencode[n&(1<<f.lenbits)-1];A=ja>>>24;L=ja>>>16&255;ja&=65535;if(A<=z)break;if(0===r)break a;r--;n+=e[k++]<<z;z+=8}if(L&&0===(L&240)){la=A;Ia=L;for(va=ja;;){ja=f.lencode[va+((n&(1<<la+Ia)-1)>>la)];A=ja>>>24;L=ja>>>16&255;ja&=65535;if(la+A<=z)break;if(0===r)break a;r--;n+=e[k++]<<z;z+=8}n>>>=la;z-=la;f.back+=la}n>>>=A;z-=A;f.back+=A;f.length=ja;if(0===L){f.mode=26;break}if(L&32){f.back=-1;f.mode=12;break}if(L&64){a.msg="invalid literal/length code";f.mode=30;break}f.extra=L&15;f.mode=22;
case 22:if(f.extra){for(L=f.extra;z<L;){if(0===r)break a;r--;n+=e[k++]<<z;z+=8}f.length+=n&(1<<f.extra)-1;n>>>=f.extra;z-=f.extra;f.back+=f.extra}f.was=f.length;f.mode=23;case 23:for(;;){ja=f.distcode[n&(1<<f.distbits)-1];A=ja>>>24;L=ja>>>16&255;ja&=65535;if(A<=z)break;if(0===r)break a;r--;n+=e[k++]<<z;z+=8}if(0===(L&240)){la=A;Ia=L;for(va=ja;;){ja=f.distcode[va+((n&(1<<la+Ia)-1)>>la)];A=ja>>>24;L=ja>>>16&255;ja&=65535;if(la+A<=z)break;if(0===r)break a;r--;n+=e[k++]<<z;z+=8}n>>>=la;z-=la;f.back+=
la}n>>>=A;z-=A;f.back+=A;if(L&64){a.msg="invalid distance code";f.mode=30;break}f.offset=ja;f.extra=L&15;f.mode=24;case 24:if(f.extra){for(L=f.extra;z<L;){if(0===r)break a;r--;n+=e[k++]<<z;z+=8}f.offset+=n&(1<<f.extra)-1;n>>>=f.extra;z-=f.extra;f.back+=f.extra}if(f.offset>f.dmax){a.msg="invalid distance too far back";f.mode=30;break}f.mode=25;case 25:if(0===x)break a;A=D-x;if(f.offset>A){A=f.offset-A;if(A>f.whave&&f.sane){a.msg="invalid distance too far back";f.mode=30;break}A>f.wnext?(A-=f.wnext,
L=f.wsize-A):L=f.wnext-A;A>f.length&&(A=f.length);la=f.window}else la=h,L=q-f.offset,A=f.length;A>x&&(A=x);x-=A;f.length-=A;do h[q++]=la[L++];while(--A);0===f.length&&(f.mode=21);break;case 26:if(0===x)break a;h[q++]=f.length;x--;f.mode=21;break;case 27:if(f.wrap){for(;32>z;){if(0===r)break a;r--;n|=e[k++]<<z;z+=8}D-=x;a.total_out+=D;f.total+=D;D&&(a.adler=f.check=f.flags?B(f.check,h,D,q-D):G(f.check,h,D,q-D));D=x;if((f.flags?n:d(n))!==f.check){a.msg="incorrect data check";f.mode=30;break}z=n=0}f.mode=
28;case 28:if(f.wrap&&f.flags){for(;32>z;){if(0===r)break a;r--;n+=e[k++]<<z;z+=8}if(n!==(f.total&4294967295)){a.msg="incorrect length check";f.mode=30;break}z=n=0}f.mode=29;case 29:O=1;break a;case 30:O=-3;break a;case 31:return-4;default:return-2}a.next_out=q;a.avail_out=x;a.next_in=k;a.avail_in=r;f.hold=n;f.bits=z;if((f.wsize||D!==a.avail_out&&30>f.mode&&(27>f.mode||4!==b))&&t(a,a.output,a.next_out,D-a.avail_out))return f.mode=31,-4;Y-=a.avail_in;D-=a.avail_out;a.total_in+=Y;a.total_out+=D;f.total+=
D;f.wrap&&D&&(a.adler=f.check=f.flags?B(f.check,h,D,a.next_out-D):G(f.check,h,D,a.next_out-D));a.data_type=f.bits+(f.last?64:0)+(12===f.mode?128:0)+(20===f.mode||15===f.mode?256:0);(0===Y&&0===D||4===b)&&0===O&&(O=-5);return O};e.inflateEnd=function(a){if(!a||!a.state)return-2;var b=a.state;b.window&&(b.window=null);a.state=null;return 0};e.inflateGetHeader=function(a,b){var d;if(!a||!a.state)return-2;d=a.state;if(0===(d.wrap&2))return-2;d.head=b;b.done=!1;return 0};e.inflateSetDictionary=function(a,
b){var d=b.length,f,e;if(!a||!a.state)return-2;f=a.state;if(0!==f.wrap&&11!==f.mode)return-2;if(11===f.mode&&(e=G(1,b,d,0),e!==f.check))return-3;if(t(a,b,d,d))return f.mode=31,-4;f.havedict=1;return 0};e.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":19,"./adler32":21,"./crc32":23,"./inffast":26,"./inftrees":28}],28:[function(a,b,e){var d=a("../utils/common"),f=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],k=[16,16,16,16,16,16,16,
16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],h=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],r=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];b.exports=function(a,b,e,G,B,w,E,P){for(var da=P.bits,aa=0,M=0,ka=0,m=0,fa=0,ba=0,Z=0,X=0,U=0,x=0,n,z,Y=null,D=0,A,L=new d.Buf16(16),ba=new d.Buf16(16),la=null,ja=0,Ia,va,O,aa=0;15>=aa;aa++)L[aa]=0;for(M=0;M<
G;M++)L[b[e+M]]++;fa=da;for(m=15;1<=m&&0===L[m];m--);fa>m&&(fa=m);if(0===m)return B[w++]=20971520,B[w++]=20971520,P.bits=1,0;for(ka=1;ka<m&&0===L[ka];ka++);fa<ka&&(fa=ka);for(aa=X=1;15>=aa;aa++)if(X<<=1,X-=L[aa],0>X)return-1;if(0<X&&(0===a||1!==m))return-1;ba[1]=0;for(aa=1;15>aa;aa++)ba[aa+1]=ba[aa]+L[aa];for(M=0;M<G;M++)0!==b[e+M]&&(E[ba[b[e+M]]++]=M);0===a?(Y=la=E,A=19):1===a?(Y=f,D-=257,la=k,ja-=257,A=256):(Y=h,la=r,A=-1);M=x=0;aa=ka;da=w;ba=fa;Z=0;z=-1;U=1<<fa;G=U-1;if(1===a&&852<U||2===a&&592<
U)return 1;for(;;){Ia=aa-Z;E[M]<A?(va=0,O=E[M]):E[M]>A?(va=la[ja+E[M]],O=Y[D+E[M]]):(va=96,O=0);X=1<<aa-Z;ka=n=1<<ba;do n-=X,B[da+(x>>Z)+n]=Ia<<24|va<<16|O|0;while(0!==n);for(X=1<<aa-1;x&X;)X>>=1;0!==X?(x&=X-1,x+=X):x=0;M++;if(0===--L[aa]){if(aa===m)break;aa=b[e+E[M]]}if(aa>fa&&(x&G)!==z){0===Z&&(Z=fa);da+=ka;ba=aa-Z;for(X=1<<ba;ba+Z<m;){X-=L[ba+Z];if(0>=X)break;ba++;X<<=1}U+=1<<ba;if(1===a&&852<U||2===a&&592<U)return 1;z=x&G;B[z]=fa<<24|ba<<16|da-w|0}}0!==x&&(B[da+x]=aa-Z<<24|4194304);P.bits=fa;
return 0}},{"../utils/common":19}],29:[function(a,b,e){b.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],30:[function(a,b,e){function d(a){for(var b=a.length;0<=--b;)a[b]=0}function f(a,b,d,f,e){this.static_tree=a;this.extra_bits=b;this.extra_base=d;this.elems=f;this.max_length=e;this.has_stree=a&&a.length}function k(a,b){this.dyn_tree=a;this.max_code=0;this.stat_desc=
b}function h(a,b){a.pending_buf[a.pending++]=b&255;a.pending_buf[a.pending++]=b>>>8&255}function r(a,b,d){a.bi_valid>16-d?(a.bi_buf|=b<<a.bi_valid&65535,h(a,a.bi_buf),a.bi_buf=b>>16-a.bi_valid,a.bi_valid+=d-16):(a.bi_buf|=b<<a.bi_valid&65535,a.bi_valid+=d)}function q(a,b,d){r(a,d[2*b],d[2*b+1])}function t(a,b){var d=0;do d|=a&1,a>>>=1,d<<=1;while(0<--b);return d>>>1}function y(a,b,d){var f=Array(16),e=0,h;for(h=1;15>=h;h++)f[h]=e=e+d[h-1]<<1;for(d=0;d<=b;d++)e=a[2*d+1],0!==e&&(a[2*d]=t(f[e]++,e))}
function G(a){var b;for(b=0;286>b;b++)a.dyn_ltree[2*b]=0;for(b=0;30>b;b++)a.dyn_dtree[2*b]=0;for(b=0;19>b;b++)a.bl_tree[2*b]=0;a.dyn_ltree[512]=1;a.opt_len=a.static_len=0;a.last_lit=a.matches=0}function B(a){8<a.bi_valid?h(a,a.bi_buf):0<a.bi_valid&&(a.pending_buf[a.pending++]=a.bi_buf);a.bi_buf=0;a.bi_valid=0}function w(a,b,d,f){var e=2*b,h=2*d;return a[e]<a[h]||a[e]===a[h]&&f[b]<=f[d]}function E(a,b,d){for(var f=a.heap[d],e=d<<1;e<=a.heap_len;){e<a.heap_len&&w(b,a.heap[e+1],a.heap[e],a.depth)&&e++;
if(w(b,f,a.heap[e],a.depth))break;a.heap[d]=a.heap[e];d=e;e<<=1}a.heap[d]=f}function P(a,b,d){var f,e,h=0,k,m;if(0!==a.last_lit){do f=a.pending_buf[a.d_buf+2*h]<<8|a.pending_buf[a.d_buf+2*h+1],e=a.pending_buf[a.l_buf+h],h++,0===f?q(a,e,b):(k=Y[e],q(a,k+256+1,b),m=ba[k],0!==m&&(e-=D[k],r(a,e,m)),f--,k=256>f?z[f]:z[256+(f>>>7)],q(a,k,d),m=Z[k],0!==m&&(f-=A[k],r(a,f,m)));while(h<a.last_lit)}q(a,256,b)}function da(a,b){var d=b.dyn_tree,f=b.stat_desc.static_tree,e=b.stat_desc.has_stree,h=b.stat_desc.elems,
k,m=-1,n;a.heap_len=0;a.heap_max=573;for(k=0;k<h;k++)0!==d[2*k]?(a.heap[++a.heap_len]=m=k,a.depth[k]=0):d[2*k+1]=0;for(;2>a.heap_len;)n=a.heap[++a.heap_len]=2>m?++m:0,d[2*n]=1,a.depth[n]=0,a.opt_len--,e&&(a.static_len-=f[2*n+1]);b.max_code=m;for(k=a.heap_len>>1;1<=k;k--)E(a,d,k);n=h;do k=a.heap[1],a.heap[1]=a.heap[a.heap_len--],E(a,d,1),f=a.heap[1],a.heap[--a.heap_max]=k,a.heap[--a.heap_max]=f,d[2*n]=d[2*k]+d[2*f],a.depth[n]=(a.depth[k]>=a.depth[f]?a.depth[k]:a.depth[f])+1,d[2*k+1]=d[2*f+1]=n,a.heap[1]=
n++,E(a,d,1);while(2<=a.heap_len);a.heap[--a.heap_max]=a.heap[1];k=b.dyn_tree;n=b.max_code;for(var q=b.stat_desc.static_tree,r=b.stat_desc.has_stree,t=b.stat_desc.extra_bits,x=b.stat_desc.extra_base,w=b.stat_desc.max_length,D,A,z=0,h=0;15>=h;h++)a.bl_count[h]=0;k[2*a.heap[a.heap_max]+1]=0;for(f=a.heap_max+1;573>f;f++)e=a.heap[f],h=k[2*k[2*e+1]+1]+1,h>w&&(h=w,z++),k[2*e+1]=h,e>n||(a.bl_count[h]++,D=0,e>=x&&(D=t[e-x]),A=k[2*e],a.opt_len+=A*(h+D),r&&(a.static_len+=A*(q[2*e+1]+D)));if(0!==z){do{for(h=
w-1;0===a.bl_count[h];)h--;a.bl_count[h]--;a.bl_count[h+1]+=2;a.bl_count[w]--;z-=2}while(0<z);for(h=w;0!==h;h--)for(e=a.bl_count[h];0!==e;)q=a.heap[--f],q>n||(k[2*q+1]!==h&&(a.opt_len+=(h-k[2*q+1])*k[2*q],k[2*q+1]=h),e--)}y(d,m,a.bl_count)}function aa(a,b,d){var f,e=-1,h,k=b[1],m=0,n=7,q=4;0===k&&(n=138,q=3);b[2*(d+1)+1]=65535;for(f=0;f<=d;f++)h=k,k=b[2*(f+1)+1],++m<n&&h===k||(m<q?a.bl_tree[2*h]+=m:0!==h?(h!==e&&a.bl_tree[2*h]++,a.bl_tree[32]++):10>=m?a.bl_tree[34]++:a.bl_tree[36]++,m=0,e=h,0===k?
(n=138,q=3):h===k?(n=6,q=3):(n=7,q=4))}function M(a,b,d){var f,e=-1,h,k=b[1],m=0,n=7,t=4;0===k&&(n=138,t=3);for(f=0;f<=d;f++)if(h=k,k=b[2*(f+1)+1],!(++m<n&&h===k)){if(m<t){do q(a,h,a.bl_tree);while(0!==--m)}else 0!==h?(h!==e&&(q(a,h,a.bl_tree),m--),q(a,16,a.bl_tree),r(a,m-3,2)):10>=m?(q(a,17,a.bl_tree),r(a,m-3,3)):(q(a,18,a.bl_tree),r(a,m-11,7));m=0;e=h;0===k?(n=138,t=3):h===k?(n=6,t=3):(n=7,t=4)}}function ka(a){var b=4093624447,d;for(d=0;31>=d;d++,b>>>=1)if(b&1&&0!==a.dyn_ltree[2*d])return 0;if(0!==
a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return 1;for(d=32;256>d;d++)if(0!==a.dyn_ltree[2*d])return 1;return 0}function m(a,b,d,f){r(a,0+(f?1:0),3);B(a);h(a,d);h(a,~d);fa.arraySet(a.pending_buf,a.window,b,d,a.pending);a.pending+=d}var fa=a("../utils/common"),ba=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Z=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],X=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],
x=Array(576);d(x);var n=Array(60);d(n);var z=Array(512);d(z);var Y=Array(256);d(Y);var D=Array(29);d(D);var A=Array(30);d(A);var L,la,ja,Ia=!1;e._tr_init=function(a){if(!Ia){var b,d,e,h=Array(16);for(e=d=0;28>e;e++)for(D[e]=d,b=0;b<1<<ba[e];b++)Y[d++]=e;Y[d-1]=e;for(e=d=0;16>e;e++)for(A[e]=d,b=0;b<1<<Z[e];b++)z[d++]=e;for(d>>=7;30>e;e++)for(A[e]=d<<7,b=0;b<1<<Z[e]-7;b++)z[256+d++]=e;for(b=0;15>=b;b++)h[b]=0;for(b=0;143>=b;)x[2*b+1]=8,b++,h[8]++;for(;255>=b;)x[2*b+1]=9,b++,h[9]++;for(;279>=b;)x[2*
b+1]=7,b++,h[7]++;for(;287>=b;)x[2*b+1]=8,b++,h[8]++;y(x,287,h);for(b=0;30>b;b++)n[2*b+1]=5,n[2*b]=t(b,5);L=new f(x,ba,257,286,15);la=new f(n,Z,0,30,15);ja=new f([],X,0,19,7);Ia=!0}a.l_desc=new k(a.dyn_ltree,L);a.d_desc=new k(a.dyn_dtree,la);a.bl_desc=new k(a.bl_tree,ja);a.bi_buf=0;a.bi_valid=0;G(a)};e._tr_stored_block=m;e._tr_flush_block=function(a,b,d,f){var e,h,k=0;if(0<a.level){2===a.strm.data_type&&(a.strm.data_type=ka(a));da(a,a.l_desc);da(a,a.d_desc);aa(a,a.dyn_ltree,a.l_desc.max_code);aa(a,
a.dyn_dtree,a.d_desc.max_code);da(a,a.bl_desc);for(k=18;3<=k&&0===a.bl_tree[2*U[k]+1];k--);a.opt_len+=3*(k+1)+14;e=a.opt_len+3+7>>>3;h=a.static_len+3+7>>>3;h<=e&&(e=h)}else e=h=d+5;if(d+4<=e&&-1!==b)m(a,b,d,f);else if(4===a.strategy||h===e)r(a,2+(f?1:0),3),P(a,x,n);else{r(a,4+(f?1:0),3);b=a.l_desc.max_code+1;d=a.d_desc.max_code+1;k+=1;r(a,b-257,5);r(a,d-1,5);r(a,k-4,4);for(e=0;e<k;e++)r(a,a.bl_tree[2*U[e]+1],3);M(a,a.dyn_ltree,b-1);M(a,a.dyn_dtree,d-1);P(a,a.dyn_ltree,a.dyn_dtree)}G(a);f&&B(a)};e._tr_tally=
function(a,b,d){a.pending_buf[a.d_buf+2*a.last_lit]=b>>>8&255;a.pending_buf[a.d_buf+2*a.last_lit+1]=b&255;a.pending_buf[a.l_buf+a.last_lit]=d&255;a.last_lit++;0===b?a.dyn_ltree[2*d]++:(a.matches++,b--,a.dyn_ltree[2*(Y[d]+256+1)]++,a.dyn_dtree[2*(256>b?z[b]:z[256+(b>>>7)])]++);return a.last_lit===a.lit_bufsize-1};e._tr_align=function(a){r(a,2,3);q(a,256,x);16===a.bi_valid?(h(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):8<=a.bi_valid&&(a.pending_buf[a.pending++]=a.bi_buf&255,a.bi_buf>>=8,a.bi_valid-=8)}},{"../utils/common":19}],
31:[function(a,b,e){b.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],32:[function(a,b,e){(function(a){function b(a,d){for(var f=0,e=a.length-1;0<=e;e--){var h=a[e];"."===h?a.splice(e,1):".."===h?(a.splice(e,1),f++):f&&(a.splice(e,1),f--)}if(d)for(;f--;f)a.unshift("..");return a}function k(a,b){if(a.filter)return a.filter(b);for(var d=[],f=0;f<
a.length;f++)b(a[f],f,a)&&d.push(a[f]);return d}var h=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;e.resolve=function(){for(var e="",h=!1,r=arguments.length-1;-1<=r&&!h;r--){var G=0<=r?arguments[r]:a.cwd();if("string"!==typeof G)throw new TypeError("Arguments to path.resolve must be strings");G&&(e=G+"/"+e,h="/"===G.charAt(0))}e=b(k(e.split("/"),function(a){return!!a}),!h).join("/");return(h?"/":"")+e||"."};e.normalize=function(a){var d=e.isAbsolute(a),h="/"===r(a,-1);(a=b(k(a.split("/"),
function(a){return!!a}),!d).join("/"))||d||(a=".");a&&h&&(a+="/");return(d?"/":"")+a};e.isAbsolute=function(a){return"/"===a.charAt(0)};e.join=function(){var a=Array.prototype.slice.call(arguments,0);return e.normalize(k(a,function(a,b){if("string"!==typeof a)throw new TypeError("Arguments to path.join must be strings");return a}).join("/"))};e.relative=function(a,b){function d(a){for(var b=0;b<a.length&&""===a[b];b++);for(var f=a.length-1;0<=f&&""===a[f];f--);return b>f?[]:a.slice(b,f-b+1)}a=e.resolve(a).substr(1);
b=e.resolve(b).substr(1);for(var f=d(a.split("/")),h=d(b.split("/")),k=Math.min(f.length,h.length),r=k,P=0;P<k;P++)if(f[P]!==h[P]){r=P;break}k=[];for(P=r;P<f.length;P++)k.push("..");k=k.concat(h.slice(r));return k.join("/")};e.sep="/";e.delimiter=":";e.dirname=function(a){var b=h.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b};e.basename=function(a,b){var d=h.exec(a).slice(1)[2];b&&d.substr(-1*b.length)===b&&(d=d.substr(0,d.length-b.length));return d};
e.extname=function(a){return h.exec(a).slice(1)[3]};var r="b"==="ab".substr(-1)?function(a,b,d){return a.substr(b,d)}:function(a,b,d){0>b&&(b=a.length+b);return a.substr(b,d)}}).call(this,a("_process"))},{_process:33}],33:[function(a,b,e){function d(){throw Error("setTimeout has not been defined");}function f(){throw Error("clearTimeout has not been defined");}function k(a){if(G===setTimeout)return setTimeout(a,0);if((G===d||!G)&&setTimeout)return G=setTimeout,setTimeout(a,0);try{return G(a,0)}catch(b){try{return G.call(null,
a,0)}catch(f){return G.call(this,a,0)}}}function h(a){if(B===clearTimeout)return clearTimeout(a);if((B===f||!B)&&clearTimeout)return B=clearTimeout,clearTimeout(a);try{return B(a)}catch(b){try{return B.call(null,a)}catch(d){return B.call(this,a)}}}function r(){da&&aa&&(da=!1,aa.length?P=aa.concat(P):M=-1,P.length&&q())}function q(){if(!da){var a=k(r);da=!0;for(var b=P.length;b;){aa=P;for(P=[];++M<b;)aa&&aa[M].run();M=-1;b=P.length}aa=null;da=!1;h(a)}}function t(a,b){this.fun=a;this.array=b}function y(){}
a=b.exports={};var G,B;try{G="function"===typeof setTimeout?setTimeout:d}catch(w){G=d}try{B="function"===typeof clearTimeout?clearTimeout:f}catch(E){B=f}var P=[],da=!1,aa,M=-1;a.nextTick=function(a){var b=Array(arguments.length-1);if(1<arguments.length)for(var d=1;d<arguments.length;d++)b[d-1]=arguments[d];P.push(new t(a,b));1!==P.length||da||k(q)};t.prototype.run=function(){this.fun.apply(null,this.array)};a.title="browser";a.browser=!0;a.env={};a.argv=[];a.version="";a.versions={};a.on=y;a.addListener=
y;a.once=y;a.off=y;a.removeListener=y;a.removeAllListeners=y;a.emit=y;a.prependListener=y;a.prependOnceListener=y;a.listeners=function(a){return[]};a.binding=function(a){throw Error("process.binding is not supported");};a.cwd=function(){return"/"};a.chdir=function(a){throw Error("process.chdir is not supported");};a.umask=function(){return 0}},{}],34:[function(a,b,e){var d=d||{};d.CompressionUtils=d.CompressionUtils||{};d.CompressionUtils.JPEG_MAGIC_NUMBER=[255,216];d.CompressionUtils.JPEG2000_MAGIC_NUMBER=
[255,79,255,81];d.CompressionUtils.isHeaderJPEG=function(a){return a?a.getUint8(0)!==d.CompressionUtils.JPEG_MAGIC_NUMBER[0]||a.getUint8(1)!==d.CompressionUtils.JPEG_MAGIC_NUMBER[1]?!1:!0:!1};d.CompressionUtils.isHeaderJPEG2000=function(a){var b;if(a){for(b=0;b<d.CompressionUtils.JPEG2000_MAGIC_NUMBER.length;b+=1)if(a.getUint8(b)!==d.CompressionUtils.JPEG2000_MAGIC_NUMBER[b])return!1;return!0}return!1};"undefined"!==typeof b&&b.exports&&(b.exports=d.CompressionUtils)},{}],35:[function(a,b,e){var d=
d||{};d.Dictionary=d.Dictionary||{};d.Utils=d.Utils||("undefined"!==typeof a?a("./utilities.js"):null);d.Dictionary.dictPrivate={"0207":{"101F":["FE","ElscintDataScale"]}};d.Dictionary.dict={"0002":{"0001":["OB","FileMetaInformationVersion"],"0002":["UI","MediaStoredSOPClassUID"],"0003":["UI","MediaStoredSOPInstanceUID"],"0010":["UI","TransferSyntaxUID"],"0012":["UI","ImplementationClassUID"],"0013":["SH","ImplementationVersionName"],"0016":["AE","SourceApplicationEntityTitle"],"0100":["UI","PrivateInformationCreatorUID"],
"0102":["OB","PrivateInformation"]},"0004":{1130:["CS","FilesetID"],1141:["CS","FilesetDescriptorFileFileID"],1142:["CS","FilesetDescriptorFileFormat"],1200:["UL","RootDirectoryEntitysFirstDirectoryRecordOffset"],1202:["UL","RootDirectoryEntitysLastDirectoryRecordOffset"],1212:["US","File-setConsistenceFlag"],1220:["SQ","DirectoryRecordSequence"],1400:["UL","NextDirectoryRecordOffset"],1410:["US","RecordInuseFlag"],1420:["UL","ReferencedLowerlevelDirectoryEntityOffset"],1430:["CS","DirectoryRecordType"],
1432:["UI","PrivateRecordUID"],1500:["CS","ReferencedFileID"],1510:["UI","ReferencedSOPClassUIDInFile"],1511:["UI","ReferencedSOPInstanceUIDInFile"],1600:["UL","NumberOfReferences"]},"0008":{"0001":["UL","LengthToEnd"],"0005":["CS","SpecificCharacterSet"],"0006":["SQ","LanguageCodeSequence"],"0008":["CS","ImageType"],"0010":["SH","RecognitionCode"],"0012":["DA","InstanceCreationDate"],"0013":["TM","InstanceCreationTime"],"0014":["UI","InstanceCreatorUID"],"0016":["UI","SOPClassUID"],"0018":["UI",
"SOPInstanceUID"],"001A":["UI","RelatedGeneralSOPClassUID"],"001B":["UI","OriginalSpecializedSOPClassUID"],"0020":["DA","StudyDate"],"0021":["DA","SeriesDate"],"0022":["DA","AcquisitionDate"],"0023":["DA","ContentDate"],"0024":["DA","OverlayDate"],"0025":["DA","CurveDate"],"002A":["DT","AcquisitionDateTime"],"0030":["TM","StudyTime"],"0031":["TM","SeriesTime"],"0032":["TM","AcquisitionTime"],"0033":["TM","ContentTime"],"0034":["TM","OverlayTime"],"0035":["TM","CurveTime"],"0040":["US","DataSetType"],
"0041":["LO","DataSetSubtype"],"0042":["CS","NuclearMedicineSeriesType"],"0050":["SH","AccessionNumber"],"0051":["SQ","IssuerOfAccessionNumberSequence"],"0052":["CS","QueryRetrieveLevel"],"0054":["AE","RetrieveAETitle"],"0056":["CS","InstanceAvailability"],"0058":["UI","FailedSOPInstanceUIDList"],"0060":["CS","Modality"],"0061":["CS","ModalitiesInStudy"],"0062":["UI","SOPClassesInStudy"],"0064":["CS","ConversionType"],"0068":["CS","PresentationIntentType"],"0070":["LO","Manufacturer"],"0080":["LO",
"InstitutionName"],"0081":["ST","InstitutionAddress"],"0082":["SQ","InstitutionCodeSequence"],"0090":["PN","ReferringPhysicianName"],"0092":["ST","ReferringPhysicianAddress"],"0094":["SH","ReferringPhysicianTelephoneNumbers"],"0096":["SQ","ReferringPhysicianIdentificationSequence"],"0100":["SH","CodeValue"],"0102":["SH","CodingSchemeDesignator"],"0103":["SH","CodingSchemeVersion"],"0104":["LO","CodeMeaning"],"0105":["CS","MappingResource"],"0106":["DT","ContextGroupVersion"],"0107":["DT","ContextGroupLocalVersion"],
"010B":["CS","ContextGroupExtensionFlag"],"010C":["UI","CodingSchemeUID"],"010D":["UI","ContextGroupExtensionCreatorUID"],"010F":["CS","ContextIdentifier"],"0110":["SQ","CodingSchemeIdentificationSequence"],"0112":["LO","CodingSchemeRegistry"],"0114":["ST","CodingSchemeExternalID"],"0115":["ST","CodingSchemeName"],"0116":["ST","CodingSchemeResponsibleOrganization"],"0117":["UI","ContextUID"],"0201":["SH","TimezoneOffsetFromUTC"],1E3:["AE","NetworkID"],1010:["SH","StationName"],1030:["LO","StudyDescription"],
1032:["SQ","ProcedureCodeSequence"],"103E":["LO","SeriesDescription"],"103F":["SQ","SeriesDescriptionCodeSequence"],1040:["LO","InstitutionalDepartmentName"],1048:["PN","PhysiciansOfRecord"],1049:["SQ","PhysiciansOfRecordIdentificationSequence"],1050:["PN","PerformingPhysicianName"],1052:["SQ","PerformingPhysicianIdentificationSequence"],1060:["PN","NameOfPhysiciansReadingStudy"],1062:["SQ","PhysiciansReadingStudyIdentificationSequence"],1070:["PN","OperatorsName"],1072:["SQ","OperatorIdentificationSequence"],
1080:["LO","AdmittingDiagnosesDescription"],1084:["SQ","AdmittingDiagnosesCodeSequence"],1090:["LO","ManufacturerModelName"],1100:["SQ","ReferencedResultsSequence"],1110:["SQ","ReferencedStudySequence"],1111:["SQ","ReferencedPerformedProcedureStepSequence"],1115:["SQ","ReferencedSeriesSequence"],1120:["SQ","ReferencedPatientSequence"],1125:["SQ","ReferencedVisitSequence"],1130:["SQ","ReferencedOverlaySequence"],1134:["SQ","ReferencedStereometricInstanceSequence"],"113A":["SQ","ReferencedWaveformSequence"],
1140:["SQ","ReferencedImageSequence"],1145:["SQ","ReferencedCurveSequence"],"114A":["SQ","ReferencedInstanceSequence"],"114B":["SQ","ReferencedRealWorldValueMappingInstanceSequence"],1150:["UI","ReferencedSOPClassUID"],1155:["UI","ReferencedSOPInstanceUID"],"115A":["UI","SOPClassesSupported"],1160:["IS","ReferencedFrameNumber"],1161:["UL","SimpleFrameList"],1162:["UL","CalculatedFrameList"],1163:["FD","TimeRange"],1164:["SQ","FrameExtractionSequence"],1167:["UI","MultiFrameSourceSOPInstanceUID"],
1195:["UI","TransactionUID"],1197:["US","FailureReason"],1198:["SQ","FailedSOPSequence"],1199:["SQ","ReferencedSOPSequence"],1200:["SQ","StudiesContainingOtherReferencedInstancesSequence"],1250:["SQ","RelatedSeriesSequence"],2110:["CS","LossyImageCompressionRetired"],2111:["ST","DerivationDescription"],2112:["SQ","SourceImageSequence"],2120:["SH","StageName"],2122:["IS","StageNumber"],2124:["IS","NumberOfStages"],2127:["SH","ViewName"],2128:["IS","ViewNumber"],2129:["IS","NumberOfEventTimers"],"212A":["IS",
"NumberOfViewsInStage"],2130:["DS","EventElapsedTimes"],2132:["LO","EventTimerNames"],2133:["SQ","EventTimerSequence"],2134:["FD","EventTimeOffset"],2135:["SQ","EventCodeSequence"],2142:["IS","StartTrim"],2143:["IS","StopTrim"],2144:["IS","RecommendedDisplayFrameRate"],2200:["CS","TransducerPosition"],2204:["CS","TransducerOrientation"],2208:["CS","AnatomicStructure"],2218:["SQ","AnatomicRegionSequence"],2220:["SQ","AnatomicRegionModifierSequence"],2228:["SQ","PrimaryAnatomicStructureSequence"],2229:["SQ",
"AnatomicStructureSpaceOrRegionSequence"],2230:["SQ","PrimaryAnatomicStructureModifierSequence"],2240:["SQ","TransducerPositionSequence"],2242:["SQ","TransducerPositionModifierSequence"],2244:["SQ","TransducerOrientationSequence"],2246:["SQ","TransducerOrientationModifierSequence"],2251:["SQ","AnatomicStructureSpaceOrRegionCodeSequenceTrial"],2253:["SQ","AnatomicPortalOfEntranceCodeSequenceTrial"],2255:["SQ","AnatomicApproachDirectionCodeSequenceTrial"],2256:["ST","AnatomicPerspectiveDescriptionTrial"],
2257:["SQ","AnatomicPerspectiveCodeSequenceTrial"],2258:["ST","AnatomicLocationOfExaminingInstrumentDescriptionTrial"],2259:["SQ","AnatomicLocationOfExaminingInstrumentCodeSequenceTrial"],"225A":["SQ","AnatomicStructureSpaceOrRegionModifierCodeSequenceTrial"],"225C":["SQ","OnAxisBackgroundAnatomicStructureCodeSequenceTrial"],3001:["SQ","AlternateRepresentationSequence"],3010:["UI","IrradiationEventUID"],4E3:["LT","IdentifyingComments"],9007:["CS","FrameType"],9092:["SQ","ReferencedImageEvidenceSequence"],
9121:["SQ","ReferencedRawDataSequence"],9123:["UI","CreatorVersionUID"],9124:["SQ","DerivationImageSequence"],9154:["SQ","SourceImageEvidenceSequence"],9205:["CS","PixelPresentation"],9206:["CS","VolumetricProperties"],9207:["CS","VolumeBasedCalculationTechnique"],9208:["CS","ComplexImageComponent"],9209:["CS","AcquisitionContrast"],9215:["SQ","DerivationCodeSequence"],9237:["SQ","ReferencedPresentationStateSequence"],9410:["SQ","ReferencedOtherPlaneSequence"],9458:["SQ","FrameDisplaySequence"],9459:["FL",
"RecommendedDisplayFrameRateInFloat"],9460:["CS","SkipFrameRangeFlag"]},"0010":{"0010":["PN","PatientName"],"0020":["LO","PatientID"],"0021":["LO","IssuerOfPatientID"],"0022":["CS","TypeOfPatientID"],"0024":["SQ","IssuerOfPatientIDQualifiersSequence"],"0030":["DA","PatientBirthDate"],"0032":["TM","PatientBirthTime"],"0040":["CS","PatientSex"],"0050":["SQ","PatientInsurancePlanCodeSequence"],"0101":["SQ","PatientPrimaryLanguageCodeSequence"],"0102":["SQ","PatientPrimaryLanguageModifierCodeSequence"],
1E3:["LO","OtherPatientIDs"],1001:["PN","OtherPatientNames"],1002:["SQ","OtherPatientIDsSequence"],1005:["PN","PatientBirthName"],1010:["AS","PatientAge"],1020:["DS","PatientSize"],1021:["SQ","PatientSizeCodeSequence"],1030:["DS","PatientWeight"],1040:["LO","PatientAddress"],1050:["LO","InsurancePlanIdentification"],1060:["PN","PatientMotherBirthName"],1080:["LO","MilitaryRank"],1081:["LO","BranchOfService"],1090:["LO","MedicalRecordLocator"],2E3:["LO","MedicalAlerts"],2110:["LO","Allergies"],2150:["LO",
"CountryOfResidence"],2152:["LO","RegionOfResidence"],2154:["SH","PatientTelephoneNumbers"],2160:["SH","EthnicGroup"],2180:["SH","Occupation"],"21A0":["CS","SmokingStatus"],"21B0":["LT","AdditionalPatientHistory"],"21C0":["US","PregnancyStatus"],"21D0":["DA","LastMenstrualDate"],"21F0":["LO","PatientReligiousPreference"],2201:["LO","PatientSpeciesDescription"],2202:["SQ","PatientSpeciesCodeSequence"],2203:["CS","PatientSexNeutered"],2210:["CS","AnatomicalOrientationType"],2292:["LO","PatientBreedDescription"],
2293:["SQ","PatientBreedCodeSequence"],2294:["SQ","BreedRegistrationSequence"],2295:["LO","BreedRegistrationNumber"],2296:["SQ","BreedRegistryCodeSequence"],2297:["PN","ResponsiblePerson"],2298:["CS","ResponsiblePersonRole"],2299:["LO","ResponsibleOrganization"],4E3:["LT","PatientComments"],9431:["FL","ExaminedBodyThickness"]},"0012":{"0010":["LO","ClinicalTrialSponsorName"],"0020":["LO","ClinicalTrialProtocolID"],"0021":["LO","ClinicalTrialProtocolName"],"0030":["LO","ClinicalTrialSiteID"],"0031":["LO",
"ClinicalTrialSiteName"],"0040":["LO","ClinicalTrialSubjectID"],"0042":["LO","ClinicalTrialSubjectReadingID"],"0050":["LO","ClinicalTrialTimePointID"],"0051":["ST","ClinicalTrialTimePointDescription"],"0060":["LO","ClinicalTrialCoordinatingCenterName"],"0062":["CS","PatientIdentityRemoved"],"0063":["LO","DeidentificationMethod"],"0064":["SQ","DeidentificationMethodCodeSequence"],"0071":["LO","ClinicalTrialSeriesID"],"0072":["LO","ClinicalTrialSeriesDescription"],"0081":["LO","ClinicalTrialProtocolEthicsCommitteeName"],
"0082":["LO","ClinicalTrialProtocolEthicsCommitteeApprovalNumber"],"0083":["SQ","ConsentForClinicalTrialUseSequence"],"0084":["CS","DistributionType"],"0085":["CS","ConsentForDistributionFlag"]},"0014":{"0023":["ST","CADFileFormat"],"0024":["ST","ComponentReferenceSystem"],"0025":["ST","ComponentManufacturingProcedure"],"0028":["ST","ComponentManufacturer"],"0030":["DS","MaterialThickness"],"0032":["DS","MaterialPipeDiameter"],"0034":["DS","MaterialIsolationDiameter"],"0042":["ST","MaterialGrade"],
"0044":["ST","MaterialPropertiesFileID"],"0045":["ST","MaterialPropertiesFileFormat"],"0046":["LT","MaterialNotes"],"0050":["CS","ComponentShape"],"0052":["CS","CurvatureType"],"0054":["DS","OuterDiameter"],"0056":["DS","InnerDiameter"],1010:["ST","ActualEnvironmentalConditions"],1020:["DA","ExpiryDate"],1040:["ST","EnvironmentalConditions"],2002:["SQ","EvaluatorSequence"],2004:["IS","EvaluatorNumber"],2006:["PN","EvaluatorName"],2008:["IS","EvaluationAttempt"],2012:["SQ","IndicationSequence"],2014:["IS",
"IndicationNumber "],2016:["SH","IndicationLabel"],2018:["ST","IndicationDescription"],"201A":["CS","IndicationType"],"201C":["CS","IndicationDisposition"],"201E":["SQ","IndicationROISequence"],2030:["SQ","IndicationPhysicalPropertySequence"],2032:["SH","PropertyLabel"],2202:["IS","CoordinateSystemNumberOfAxes "],2204:["SQ","CoordinateSystemAxesSequence"],2206:["ST","CoordinateSystemAxisDescription"],2208:["CS","CoordinateSystemDataSetMapping"],"220A":["IS","CoordinateSystemAxisNumber"],"220C":["CS",
"CoordinateSystemAxisType"],"220E":["CS","CoordinateSystemAxisUnits"],2210:["OB","CoordinateSystemAxisValues"],2220:["SQ","CoordinateSystemTransformSequence"],2222:["ST","TransformDescription"],2224:["IS","TransformNumberOfAxes"],2226:["IS","TransformOrderOfAxes"],2228:["CS","TransformedAxisUnits"],"222A":["DS","CoordinateSystemTransformRotationAndScaleMatrix"],"222C":["DS","CoordinateSystemTransformTranslationMatrix"],3011:["DS","InternalDetectorFrameTime"],3012:["DS","NumberOfFramesIntegrated"],
3020:["SQ","DetectorTemperatureSequence"],3022:["DS","SensorName"],3024:["DS","HorizontalOffsetOfSensor"],3026:["DS","VerticalOffsetOfSensor"],3028:["DS","SensorTemperature"],3040:["SQ","DarkCurrentSequence"],3050:["OB","DarkCurrentCounts"],3060:["SQ","GainCorrectionReferenceSequence"],3070:["OB","AirCounts"],3071:["DS","KVUsedInGainCalibration"],3072:["DS","MAUsedInGainCalibration"],3073:["DS","NumberOfFramesUsedForIntegration"],3074:["LO","FilterMaterialUsedInGainCalibration"],3075:["DS","FilterThicknessUsedInGainCalibration"],
3076:["DA","DateOfGainCalibration"],3077:["TM","TimeOfGainCalibration"],3080:["OB","BadPixelImage"],3099:["LT","CalibrationNotes"],4002:["SQ","PulserEquipmentSequence"],4004:["CS","PulserType"],4006:["LT","PulserNotes"],4008:["SQ","ReceiverEquipmentSequence"],"400A":["CS","AmplifierType"],"400C":["LT","ReceiverNotes"],"400E":["SQ","PreAmplifierEquipmentSequence"],"400F":["LT","PreAmplifierNotes"],4010:["SQ","TransmitTransducerSequence"],4011:["SQ","ReceiveTransducerSequence"],4012:["US","NumberOfElements"],
4013:["CS","ElementShape"],4014:["DS","ElementDimensionA"],4015:["DS","ElementDimensionB"],4016:["DS","ElementPitch"],4017:["DS","MeasuredBeamDimensionA"],4018:["DS","MeasuredBeamDimensionB"],4019:["DS","LocationOfMeasuredBeamDiameter"],"401A":["DS","NominalFrequency"],"401B":["DS","MeasuredCenterFrequency"],"401C":["DS","MeasuredBandwidth"],4020:["SQ","PulserSettingsSequence"],4022:["DS","PulseWidth"],4024:["DS","ExcitationFrequency"],4026:["CS","ModulationType"],4028:["DS","Damping"],4030:["SQ",
"ReceiverSettingsSequence"],4031:["DS","AcquiredSoundpathLength"],4032:["CS","AcquisitionCompressionType"],4033:["IS","AcquisitionSampleSize"],4034:["DS","RectifierSmoothing"],4035:["SQ","DACSequence"],4036:["CS","DACType"],4038:["DS","DACGainPoints"],"403A":["DS","DACTimePoints"],"403C":["DS","DACAmplitude"],4040:["SQ","PreAmplifierSettingsSequence"],4050:["SQ","TransmitTransducerSettingsSequence"],4051:["SQ","ReceiveTransducerSettingsSequence"],4052:["DS","IncidentAngle"],4054:["ST","CouplingTechnique"],
4056:["ST","CouplingMedium"],4057:["DS","CouplingVelocity"],4058:["DS","CrystalCenterLocationX"],4059:["DS","CrystalCenterLocationZ"],"405A":["DS","SoundPathLength"],"405C":["ST","DelayLawIdentifier"],4060:["SQ","GateSettingsSequence"],4062:["DS","GateThreshold"],4064:["DS","VelocityOfSound"],4070:["SQ","CalibrationSettingsSequence"],4072:["ST","CalibrationProcedure"],4074:["SH","ProcedureVersion"],4076:["DA","ProcedureCreationDate"],4078:["DA","ProcedureExpirationDate"],"407A":["DA","ProcedureLastModifiedDate"],
"407C":["TM","CalibrationTime"],"407E":["DA","CalibrationDate"],5002:["IS","LINACEnergy"],5004:["IS","LINACOutput"]},"0018":{"0010":["LO","ContrastBolusAgent"],"0012":["SQ","ContrastBolusAgentSequence"],"0014":["SQ","ContrastBolusAdministrationRouteSequence"],"0015":["CS","BodyPartExamined"],"0020":["CS","ScanningSequence"],"0021":["CS","SequenceVariant"],"0022":["CS","ScanOptions"],"0023":["CS","MRAcquisitionType"],"0024":["SH","SequenceName"],"0025":["CS","AngioFlag"],"0026":["SQ","InterventionDrugInformationSequence"],
"0027":["TM","InterventionDrugStopTime"],"0028":["DS","InterventionDrugDose"],"0029":["SQ","InterventionDrugCodeSequence"],"002A":["SQ","AdditionalDrugSequence"],"0030":["LO","Radionuclide"],"0031":["LO","Radiopharmaceutical"],"0032":["DS","EnergyWindowCenterline"],"0033":["DS","EnergyWindowTotalWidth"],"0034":["LO","InterventionDrugName"],"0035":["TM","InterventionDrugStartTime"],"0036":["SQ","InterventionSequence"],"0037":["CS","TherapyType"],"0038":["CS","InterventionStatus"],"0039":["CS","TherapyDescription"],
"003A":["ST","InterventionDescription"],"0040":["IS","CineRate"],"0042":["CS","InitialCineRunState"],"0050":["DS","SliceThickness"],"0060":["DS","KVP"],"0070":["IS","CountsAccumulated"],"0071":["CS","AcquisitionTerminationCondition"],"0072":["DS","EffectiveDuration"],"0073":["CS","AcquisitionStartCondition"],"0074":["IS","AcquisitionStartConditionData"],"0075":["IS","AcquisitionTerminationConditionData"],"0080":["DS","RepetitionTime"],"0081":["DS","EchoTime"],"0082":["DS","InversionTime"],"0083":["DS",
"NumberOfAverages"],"0084":["DS","ImagingFrequency"],"0085":["SH","ImagedNucleus"],"0086":["IS","EchoNumbers"],"0087":["DS","MagneticFieldStrength"],"0088":["DS","SpacingBetweenSlices"],"0089":["IS","NumberOfPhaseEncodingSteps"],"0090":["DS","DataCollectionDiameter"],"0091":["IS","EchoTrainLength"],"0093":["DS","PercentSampling"],"0094":["DS","PercentPhaseFieldOfView"],"0095":["DS","PixelBandwidth"],1E3:["LO","DeviceSerialNumber"],1002:["UI","DeviceUID"],1003:["LO","DeviceID"],1004:["LO","PlateID"],
1005:["LO","GeneratorID"],1006:["LO","GridID"],1007:["LO","CassetteID"],1008:["LO","GantryID"],1010:["LO","SecondaryCaptureDeviceID"],1011:["LO","HardcopyCreationDeviceID"],1012:["DA","DateOfSecondaryCapture"],1014:["TM","TimeOfSecondaryCapture"],1016:["LO","SecondaryCaptureDeviceManufacturer"],1017:["LO","HardcopyDeviceManufacturer"],1018:["LO","SecondaryCaptureDeviceManufacturerModelName"],1019:["LO","SecondaryCaptureDeviceSoftwareVersions"],"101A":["LO","HardcopyDeviceSoftwareVersion"],"101B":["LO",
"HardcopyDeviceManufacturerModelName"],1020:["LO","SoftwareVersions"],1022:["SH","VideoImageFormatAcquired"],1023:["LO","DigitalImageFormatAcquired"],1030:["LO","ProtocolName"],1040:["LO","ContrastBolusRoute"],1041:["DS","ContrastBolusVolume"],1042:["TM","ContrastBolusStartTime"],1043:["TM","ContrastBolusStopTime"],1044:["DS","ContrastBolusTotalDose"],1045:["IS","SyringeCounts"],1046:["DS","ContrastFlowRate"],1047:["DS","ContrastFlowDuration"],1048:["CS","ContrastBolusIngredient"],1049:["DS","ContrastBolusIngredientConcentration"],
1050:["DS","SpatialResolution"],1060:["DS","TriggerTime"],1061:["LO","TriggerSourceOrType"],1062:["IS","NominalInterval"],1063:["DS","FrameTime"],1064:["LO","CardiacFramingType"],1065:["DS","FrameTimeVector"],1066:["DS","FrameDelay"],1067:["DS","ImageTriggerDelay"],1068:["DS","MultiplexGroupTimeOffset"],1069:["DS","TriggerTimeOffset"],"106A":["CS","SynchronizationTrigger"],"106C":["US","SynchronizationChannel"],"106E":["UL","TriggerSamplePosition"],1070:["LO","RadiopharmaceuticalRoute"],1071:["DS",
"RadiopharmaceuticalVolume"],1072:["TM","RadiopharmaceuticalStartTime"],1073:["TM","RadiopharmaceuticalStopTime"],1074:["DS","RadionuclideTotalDose"],1075:["DS","RadionuclideHalfLife"],1076:["DS","RadionuclidePositronFraction"],1077:["DS","RadiopharmaceuticalSpecificActivity"],1078:["DT","RadiopharmaceuticalStartDateTime"],1079:["DT","RadiopharmaceuticalStopDateTime"],1080:["CS","BeatRejectionFlag"],1081:["IS","LowRRValue"],1082:["IS","HighRRValue"],1083:["IS","IntervalsAcquired"],1084:["IS","IntervalsRejected"],
1085:["LO","PVCRejection"],1086:["IS","SkipBeats"],1088:["IS","HeartRate"],1090:["IS","CardiacNumberOfImages"],1094:["IS","TriggerWindow"],1100:["DS","ReconstructionDiameter"],1110:["DS","DistanceSourceToDetector"],1111:["DS","DistanceSourceToPatient"],1114:["DS","EstimatedRadiographicMagnificationFactor"],1120:["DS","GantryDetectorTilt"],1121:["DS","GantryDetectorSlew"],1130:["DS","TableHeight"],1131:["DS","TableTraverse"],1134:["CS","TableMotion"],1135:["DS","TableVerticalIncrement"],1136:["DS",
"TableLateralIncrement"],1137:["DS","TableLongitudinalIncrement"],1138:["DS","TableAngle"],"113A":["CS","TableType"],1140:["CS","RotationDirection"],1141:["DS","AngularPosition"],1142:["DS","RadialPosition"],1143:["DS","ScanArc"],1144:["DS","AngularStep"],1145:["DS","CenterOfRotationOffset"],1146:["DS","RotationOffset"],1147:["CS","FieldOfViewShape"],1149:["IS","FieldOfViewDimensions"],1150:["IS","ExposureTime"],1151:["IS","XRayTubeCurrent"],1152:["IS","Exposure"],1153:["IS","ExposureInuAs"],1154:["DS",
"AveragePulseWidth"],1155:["CS","RadiationSetting"],1156:["CS","RectificationType"],"115A":["CS","RadiationMode"],"115E":["DS","ImageAndFluoroscopyAreaDoseProduct"],1160:["SH","FilterType"],1161:["LO","TypeOfFilters"],1162:["DS","IntensifierSize"],1164:["DS","ImagerPixelSpacing"],1166:["CS","Grid"],1170:["IS","GeneratorPower"],1180:["SH","CollimatorGridName"],1181:["CS","CollimatorType"],1182:["IS","FocalDistance"],1183:["DS","XFocusCenter"],1184:["DS","YFocusCenter"],1190:["DS","FocalSpots"],1191:["CS",
"AnodeTargetMaterial"],"11A0":["DS","BodyPartThickness"],"11A2":["DS","CompressionForce"],1200:["DA","DateOfLastCalibration"],1201:["TM","TimeOfLastCalibration"],1210:["SH","ConvolutionKernel"],1240:["IS","UpperLowerPixelValues"],1242:["IS","ActualFrameDuration"],1243:["IS","CountRate"],1244:["US","PreferredPlaybackSequencing"],1250:["SH","ReceiveCoilName"],1251:["SH","TransmitCoilName"],1260:["SH","PlateType"],1261:["LO","PhosphorType"],1300:["DS","ScanVelocity"],1301:["CS","WholeBodyTechnique"],
1302:["IS","ScanLength"],1310:["US","AcquisitionMatrix"],1312:["CS","InPlanePhaseEncodingDirection"],1314:["DS","FlipAngle"],1315:["CS","VariableFlipAngleFlag"],1316:["DS","SAR"],1318:["DS","dBdt"],1400:["LO","AcquisitionDeviceProcessingDescription"],1401:["LO","AcquisitionDeviceProcessingCode"],1402:["CS","CassetteOrientation"],1403:["CS","CassetteSize"],1404:["US","ExposuresOnPlate"],1405:["IS","RelativeXRayExposure"],1411:["DS","ExposureIndex"],1412:["DS","TargetExposureIndex"],1413:["DS","DeviationIndex"],
1450:["DS","ColumnAngulation"],1460:["DS","TomoLayerHeight"],1470:["DS","TomoAngle"],1480:["DS","TomoTime"],1490:["CS","TomoType"],1491:["CS","TomoClass"],1495:["IS","NumberOfTomosynthesisSourceImages"],1500:["CS","PositionerMotion"],1508:["CS","PositionerType"],1510:["DS","PositionerPrimaryAngle"],1511:["DS","PositionerSecondaryAngle"],1520:["DS","PositionerPrimaryAngleIncrement"],1521:["DS","PositionerSecondaryAngleIncrement"],1530:["DS","DetectorPrimaryAngle"],1531:["DS","DetectorSecondaryAngle"],
1600:["CS","ShutterShape"],1602:["IS","ShutterLeftVerticalEdge"],1604:["IS","ShutterRightVerticalEdge"],1606:["IS","ShutterUpperHorizontalEdge"],1608:["IS","ShutterLowerHorizontalEdge"],1610:["IS","CenterOfCircularShutter"],1612:["IS","RadiusOfCircularShutter"],1620:["IS","VerticesOfThePolygonalShutter"],1622:["US","ShutterPresentationValue"],1623:["US","ShutterOverlayGroup"],1624:["US","ShutterPresentationColorCIELabValue"],1700:["CS","CollimatorShape"],1702:["IS","CollimatorLeftVerticalEdge"],1704:["IS",
"CollimatorRightVerticalEdge"],1706:["IS","CollimatorUpperHorizontalEdge"],1708:["IS","CollimatorLowerHorizontalEdge"],1710:["IS","CenterOfCircularCollimator"],1712:["IS","RadiusOfCircularCollimator"],1720:["IS","VerticesOfThePolygonalCollimator"],1800:["CS","AcquisitionTimeSynchronized"],1801:["SH","TimeSource"],1802:["CS","TimeDistributionProtocol"],1803:["LO","NTPSourceAddress"],2001:["IS","PageNumberVector"],2002:["SH","FrameLabelVector"],2003:["DS","FramePrimaryAngleVector"],2004:["DS","FrameSecondaryAngleVector"],
2005:["DS","SliceLocationVector"],2006:["SH","DisplayWindowLabelVector"],2010:["DS","NominalScannedPixelSpacing"],2020:["CS","DigitizingDeviceTransportDirection"],2030:["DS","RotationOfScannedFilm"],3100:["CS","IVUSAcquisition"],3101:["DS","IVUSPullbackRate"],3102:["DS","IVUSGatedRate"],3103:["IS","IVUSPullbackStartFrameNumber"],3104:["IS","IVUSPullbackStopFrameNumber"],3105:["IS","LesionNumber"],4E3:["LT","AcquisitionComments"],5E3:["SH","OutputPower"],5010:["LO","TransducerData"],5012:["DS","FocusDepth"],
5020:["LO","ProcessingFunction"],5021:["LO","PostprocessingFunction"],5022:["DS","MechanicalIndex"],5024:["DS","BoneThermalIndex"],5026:["DS","CranialThermalIndex"],5027:["DS","SoftTissueThermalIndex"],5028:["DS","SoftTissueFocusThermalIndex"],5029:["DS","SoftTissueSurfaceThermalIndex"],5030:["DS","DynamicRange"],5040:["DS","TotalGain"],5050:["IS","DepthOfScanField"],5100:["CS","PatientPosition"],5101:["CS","ViewPosition"],5104:["SQ","ProjectionEponymousNameCodeSequence"],5210:["DS","ImageTransformationMatrix"],
5212:["DS","ImageTranslationVector"],6E3:["DS","Sensitivity"],6011:["SQ","SequenceOfUltrasoundRegions"],6012:["US","RegionSpatialFormat"],6014:["US","RegionDataType"],6016:["UL","RegionFlags"],6018:["UL","RegionLocationMinX0"],"601A":["UL","RegionLocationMinY0"],"601C":["UL","RegionLocationMaxX1"],"601E":["UL","RegionLocationMaxY1"],6020:["SL","ReferencePixelX0"],6022:["SL","ReferencePixelY0"],6024:["US","PhysicalUnitsXDirection"],6026:["US","PhysicalUnitsYDirection"],6028:["FD","ReferencePixelPhysicalValueX"],
"602A":["FD","ReferencePixelPhysicalValueY"],"602C":["FD","PhysicalDeltaX"],"602E":["FD","PhysicalDeltaY"],6030:["UL","TransducerFrequency"],6031:["CS","TransducerType"],6032:["UL","PulseRepetitionFrequency"],6034:["FD","DopplerCorrectionAngle"],6036:["FD","SteeringAngle"],6038:["UL","DopplerSampleVolumeXPositionRetired"],6039:["SL","DopplerSampleVolumeXPosition"],"603A":["UL","DopplerSampleVolumeYPositionRetired"],"603B":["SL","DopplerSampleVolumeYPosition"],"603C":["UL","TMLinePositionX0Retired"],
"603D":["SL","TMLinePositionX0"],"603E":["UL","TMLinePositionY0Retired"],"603F":["SL","TMLinePositionY0"],6040:["UL","TMLinePositionX1Retired"],6041:["SL","TMLinePositionX1"],6042:["UL","TMLinePositionY1Retired"],6043:["SL","TMLinePositionY1"],6044:["US","PixelComponentOrganization"],6046:["UL","PixelComponentMask"],6048:["UL","PixelComponentRangeStart"],"604A":["UL","PixelComponentRangeStop"],"604C":["US","PixelComponentPhysicalUnits"],"604E":["US","PixelComponentDataType"],6050:["UL","NumberOfTableBreakPoints"],
6052:["UL","TableOfXBreakPoints"],6054:["FD","TableOfYBreakPoints"],6056:["UL","NumberOfTableEntries"],6058:["UL","TableOfPixelValues"],"605A":["FL","TableOfParameterValues"],6060:["FL","RWaveTimeVector"],7E3:["CS","DetectorConditionsNominalFlag"],7001:["DS","DetectorTemperature"],7004:["CS","DetectorType"],7005:["CS","DetectorConfiguration"],7006:["LT","DetectorDescription"],7008:["LT","DetectorMode"],"700A":["SH","DetectorID"],"700C":["DA","DateOfLastDetectorCalibration"],"700E":["TM","TimeOfLastDetectorCalibration"],
7010:["IS","ExposuresOnDetectorSinceLastCalibration"],7011:["IS","ExposuresOnDetectorSinceManufactured"],7012:["DS","DetectorTimeSinceLastExposure"],7014:["DS","DetectorActiveTime"],7016:["DS","DetectorActivationOffsetFromExposure"],"701A":["DS","DetectorBinning"],7020:["DS","DetectorElementPhysicalSize"],7022:["DS","DetectorElementSpacing"],7024:["CS","DetectorActiveShape"],7026:["DS","DetectorActiveDimensions"],7028:["DS","DetectorActiveOrigin"],"702A":["LO","DetectorManufacturerName"],"702B":["LO",
"DetectorManufacturerModelName"],7030:["DS","FieldOfViewOrigin"],7032:["DS","FieldOfViewRotation"],7034:["CS","FieldOfViewHorizontalFlip"],7036:["FL","PixelDataAreaOriginRelativeToFOV"],7038:["FL","PixelDataAreaRotationAngleRelativeToFOV"],7040:["LT","GridAbsorbingMaterial"],7041:["LT","GridSpacingMaterial"],7042:["DS","GridThickness"],7044:["DS","GridPitch"],7046:["IS","GridAspectRatio"],7048:["DS","GridPeriod"],"704C":["DS","GridFocalDistance"],7050:["CS","FilterMaterial"],7052:["DS","FilterThicknessMinimum"],
7054:["DS","FilterThicknessMaximum"],7056:["FL","FilterBeamPathLengthMinimum"],7058:["FL","FilterBeamPathLengthMaximum"],7060:["CS","ExposureControlMode"],7062:["LT","ExposureControlModeDescription"],7064:["CS","ExposureStatus"],7065:["DS","PhototimerSetting"],8150:["DS","ExposureTimeInuS"],8151:["DS","XRayTubeCurrentInuA"],9004:["CS","ContentQualification"],9005:["SH","PulseSequenceName"],9006:["SQ","MRImagingModifierSequence"],9008:["CS","EchoPulseSequence"],9009:["CS","InversionRecovery"],9010:["CS",
"FlowCompensation"],9011:["CS","MultipleSpinEcho"],9012:["CS","MultiPlanarExcitation"],9014:["CS","PhaseContrast"],9015:["CS","TimeOfFlightContrast"],9016:["CS","Spoiling"],9017:["CS","SteadyStatePulseSequence"],9018:["CS","EchoPlanarPulseSequence"],9019:["FD","TagAngleFirstAxis"],9020:["CS","MagnetizationTransfer"],9021:["CS","T2Preparation"],9022:["CS","BloodSignalNulling"],9024:["CS","SaturationRecovery"],9025:["CS","SpectrallySelectedSuppression"],9026:["CS","SpectrallySelectedExcitation"],9027:["CS",
"SpatialPresaturation"],9028:["CS","Tagging"],9029:["CS","OversamplingPhase"],9030:["FD","TagSpacingFirstDimension"],9032:["CS","GeometryOfKSpaceTraversal"],9033:["CS","SegmentedKSpaceTraversal"],9034:["CS","RectilinearPhaseEncodeReordering"],9035:["FD","TagThickness"],9036:["CS","PartialFourierDirection"],9037:["CS","CardiacSynchronizationTechnique"],9041:["LO","ReceiveCoilManufacturerName"],9042:["SQ","MRReceiveCoilSequence"],9043:["CS","ReceiveCoilType"],9044:["CS","QuadratureReceiveCoil"],9045:["SQ",
"MultiCoilDefinitionSequence"],9046:["LO","MultiCoilConfiguration"],9047:["SH","MultiCoilElementName"],9048:["CS","MultiCoilElementUsed"],9049:["SQ","MRTransmitCoilSequence"],9050:["LO","TransmitCoilManufacturerName"],9051:["CS","TransmitCoilType"],9052:["FD","SpectralWidth"],9053:["FD","ChemicalShiftReference"],9054:["CS","VolumeLocalizationTechnique"],9058:["US","MRAcquisitionFrequencyEncodingSteps"],9059:["CS","Decoupling"],9060:["CS","DecoupledNucleus"],9061:["FD","DecouplingFrequency"],9062:["CS",
"DecouplingMethod"],9063:["FD","DecouplingChemicalShiftReference"],9064:["CS","KSpaceFiltering"],9065:["CS","TimeDomainFiltering"],9066:["US","NumberOfZeroFills"],9067:["CS","BaselineCorrection"],9069:["FD","ParallelReductionFactorInPlane"],9070:["FD","CardiacRRIntervalSpecified"],9073:["FD","AcquisitionDuration"],9074:["DT","FrameAcquisitionDateTime"],9075:["CS","DiffusionDirectionality"],9076:["SQ","DiffusionGradientDirectionSequence"],9077:["CS","ParallelAcquisition"],9078:["CS","ParallelAcquisitionTechnique"],
9079:["FD","InversionTimes"],9080:["ST","MetaboliteMapDescription"],9081:["CS","PartialFourier"],9082:["FD","EffectiveEchoTime"],9083:["SQ","MetaboliteMapCodeSequence"],9084:["SQ","ChemicalShiftSequence"],9085:["CS","CardiacSignalSource"],9087:["FD","DiffusionBValue"],9089:["FD","DiffusionGradientOrientation"],9090:["FD","VelocityEncodingDirection"],9091:["FD","VelocityEncodingMinimumValue"],9092:["SQ","VelocityEncodingAcquisitionSequence"],9093:["US","NumberOfKSpaceTrajectories"],9094:["CS","CoverageOfKSpace"],
9095:["UL","SpectroscopyAcquisitionPhaseRows"],9096:["FD","ParallelReductionFactorInPlaneRetired"],9098:["FD","TransmitterFrequency"],9100:["CS","ResonantNucleus"],9101:["CS","FrequencyCorrection"],9103:["SQ","MRSpectroscopyFOVGeometrySequence"],9104:["FD","SlabThickness"],9105:["FD","SlabOrientation"],9106:["FD","MidSlabPosition"],9107:["SQ","MRSpatialSaturationSequence"],9112:["SQ","MRTimingAndRelatedParametersSequence"],9114:["SQ","MREchoSequence"],9115:["SQ","MRModifierSequence"],9117:["SQ","MRDiffusionSequence"],
9118:["SQ","CardiacSynchronizationSequence"],9119:["SQ","MRAveragesSequence"],9125:["SQ","MRFOVGeometrySequence"],9126:["SQ","VolumeLocalizationSequence"],9127:["UL","SpectroscopyAcquisitionDataColumns"],9147:["CS","DiffusionAnisotropyType"],9151:["DT","FrameReferenceDateTime"],9152:["SQ","MRMetaboliteMapSequence"],9155:["FD","ParallelReductionFactorOutOfPlane"],9159:["UL","SpectroscopyAcquisitionOutOfPlanePhaseSteps"],9166:["CS","BulkMotionStatus"],9168:["FD","ParallelReductionFactorSecondInPlane"],
9169:["CS","CardiacBeatRejectionTechnique"],9170:["CS","RespiratoryMotionCompensationTechnique"],9171:["CS","RespiratorySignalSource"],9172:["CS","BulkMotionCompensationTechnique"],9173:["CS","BulkMotionSignalSource"],9174:["CS","ApplicableSafetyStandardAgency"],9175:["LO","ApplicableSafetyStandardDescription"],9176:["SQ","OperatingModeSequence"],9177:["CS","OperatingModeType"],9178:["CS","OperatingMode"],9179:["CS","SpecificAbsorptionRateDefinition"],9180:["CS","GradientOutputType"],9181:["FD","SpecificAbsorptionRateValue"],
9182:["FD","GradientOutput"],9183:["CS","FlowCompensationDirection"],9184:["FD","TaggingDelay"],9185:["ST","RespiratoryMotionCompensationTechniqueDescription"],9186:["SH","RespiratorySignalSourceID"],9195:["FD","ChemicalShiftMinimumIntegrationLimitInHz"],9196:["FD","ChemicalShiftMaximumIntegrationLimitInHz"],9197:["SQ","MRVelocityEncodingSequence"],9198:["CS","FirstOrderPhaseCorrection"],9199:["CS","WaterReferencedPhaseCorrection"],9200:["CS","MRSpectroscopyAcquisitionType"],9214:["CS","RespiratoryCyclePosition"],
9217:["FD","VelocityEncodingMaximumValue"],9218:["FD","TagSpacingSecondDimension"],9219:["SS","TagAngleSecondAxis"],9220:["FD","FrameAcquisitionDuration"],9226:["SQ","MRImageFrameTypeSequence"],9227:["SQ","MRSpectroscopyFrameTypeSequence"],9231:["US","MRAcquisitionPhaseEncodingStepsInPlane"],9232:["US","MRAcquisitionPhaseEncodingStepsOutOfPlane"],9234:["UL","SpectroscopyAcquisitionPhaseColumns"],9236:["CS","CardiacCyclePosition"],9239:["SQ","SpecificAbsorptionRateSequence"],9240:["US","RFEchoTrainLength"],
9241:["US","GradientEchoTrainLength"],9250:["CS","ArterialSpinLabelingContrast"],9251:["SQ","MRArterialSpinLabelingSequence"],9252:["LO","ASLTechniqueDescription"],9253:["US","ASLSlabNumber"],9254:["FD ","ASLSlabThickness"],9255:["FD ","ASLSlabOrientation"],9256:["FD ","ASLMidSlabPosition"],9257:["CS","ASLContext"],9258:["UL","ASLPulseTrainDuration"],9259:["CS","ASLCrusherFlag"],"925A":["FD","ASLCrusherFlow"],"925B":["LO","ASLCrusherDescription"],"925C":["CS","ASLBolusCutoffFlag"],"925D":["SQ","ASLBolusCutoffTimingSequence"],
"925E":["LO","ASLBolusCutoffTechnique"],"925F":["UL","ASLBolusCutoffDelayTime"],9260:["SQ","ASLSlabSequence"],9295:["FD","ChemicalShiftMinimumIntegrationLimitInppm"],9296:["FD","ChemicalShiftMaximumIntegrationLimitInppm"],9301:["SQ","CTAcquisitionTypeSequence"],9302:["CS","AcquisitionType"],9303:["FD","TubeAngle"],9304:["SQ","CTAcquisitionDetailsSequence"],9305:["FD","RevolutionTime"],9306:["FD","SingleCollimationWidth"],9307:["FD","TotalCollimationWidth"],9308:["SQ","CTTableDynamicsSequence"],9309:["FD",
"TableSpeed"],9310:["FD","TableFeedPerRotation"],9311:["FD","SpiralPitchFactor"],9312:["SQ","CTGeometrySequence"],9313:["FD","DataCollectionCenterPatient"],9314:["SQ","CTReconstructionSequence"],9315:["CS","ReconstructionAlgorithm"],9316:["CS","ConvolutionKernelGroup"],9317:["FD","ReconstructionFieldOfView"],9318:["FD","ReconstructionTargetCenterPatient"],9319:["FD","ReconstructionAngle"],9320:["SH","ImageFilter"],9321:["SQ","CTExposureSequence"],9322:["FD","ReconstructionPixelSpacing"],9323:["CS",
"ExposureModulationType"],9324:["FD","EstimatedDoseSaving"],9325:["SQ","CTXRayDetailsSequence"],9326:["SQ","CTPositionSequence"],9327:["FD","TablePosition"],9328:["FD","ExposureTimeInms"],9329:["SQ","CTImageFrameTypeSequence"],9330:["FD","XRayTubeCurrentInmA"],9332:["FD","ExposureInmAs"],9333:["CS","ConstantVolumeFlag"],9334:["CS","FluoroscopyFlag"],9335:["FD","DistanceSourceToDataCollectionCenter"],9337:["US","ContrastBolusAgentNumber"],9338:["SQ","ContrastBolusIngredientCodeSequence"],9340:["SQ",
"ContrastAdministrationProfileSequence"],9341:["SQ","ContrastBolusUsageSequence"],9342:["CS","ContrastBolusAgentAdministered"],9343:["CS","ContrastBolusAgentDetected"],9344:["CS","ContrastBolusAgentPhase"],9345:["FD","CTDIvol"],9346:["SQ","CTDIPhantomTypeCodeSequence"],9351:["FL","CalciumScoringMassFactorPatient"],9352:["FL","CalciumScoringMassFactorDevice"],9353:["FL","EnergyWeightingFactor"],9360:["SQ","CTAdditionalXRaySourceSequence"],9401:["SQ","ProjectionPixelCalibrationSequence"],9402:["FL",
"DistanceSourceToIsocenter"],9403:["FL","DistanceObjectToTableTop"],9404:["FL","ObjectPixelSpacingInCenterOfBeam"],9405:["SQ","PositionerPositionSequence"],9406:["SQ","TablePositionSequence"],9407:["SQ","CollimatorShapeSequence"],9410:["CS","PlanesInAcquisition"],9412:["SQ","XAXRFFrameCharacteristicsSequence"],9417:["SQ","FrameAcquisitionSequence"],9420:["CS","XRayReceptorType"],9423:["LO","AcquisitionProtocolName"],9424:["LT","AcquisitionProtocolDescription"],9425:["CS","ContrastBolusIngredientOpaque"],
9426:["FL","DistanceReceptorPlaneToDetectorHousing"],9427:["CS","IntensifierActiveShape"],9428:["FL","IntensifierActiveDimensions"],9429:["FL","PhysicalDetectorSize"],9430:["FL","PositionOfIsocenterProjection"],9432:["SQ","FieldOfViewSequence"],9433:["LO","FieldOfViewDescription"],9434:["SQ","ExposureControlSensingRegionsSequence"],9435:["CS","ExposureControlSensingRegionShape"],9436:["SS","ExposureControlSensingRegionLeftVerticalEdge"],9437:["SS","ExposureControlSensingRegionRightVerticalEdge"],
9438:["SS","ExposureControlSensingRegionUpperHorizontalEdge"],9439:["SS","ExposureControlSensingRegionLowerHorizontalEdge"],9440:["SS","CenterOfCircularExposureControlSensingRegion"],9441:["US","RadiusOfCircularExposureControlSensingRegion"],9442:["SS","VerticesOfThePolygonalExposureControlSensingRegion"],9447:["FL","ColumnAngulationPatient"],9449:["FL","BeamAngle"],9451:["SQ","FrameDetectorParametersSequence"],9452:["FL","CalculatedAnatomyThickness"],9455:["SQ","CalibrationSequence"],9456:["SQ",
"ObjectThicknessSequence"],9457:["CS","PlaneIdentification"],9461:["FL","FieldOfViewDimensionsInFloat"],9462:["SQ","IsocenterReferenceSystemSequence"],9463:["FL","PositionerIsocenterPrimaryAngle"],9464:["FL","PositionerIsocenterSecondaryAngle"],9465:["FL","PositionerIsocenterDetectorRotationAngle"],9466:["FL","TableXPositionToIsocenter"],9467:["FL","TableYPositionToIsocenter"],9468:["FL","TableZPositionToIsocenter"],9469:["FL","TableHorizontalRotationAngle"],9470:["FL","TableHeadTiltAngle"],9471:["FL",
"TableCradleTiltAngle"],9472:["SQ","FrameDisplayShutterSequence"],9473:["FL","AcquiredImageAreaDoseProduct"],9474:["CS","CArmPositionerTabletopRelationship"],9476:["SQ","XRayGeometrySequence"],9477:["SQ","IrradiationEventIdentificationSequence"],9504:["SQ","XRay3DFrameTypeSequence"],9506:["SQ","ContributingSourcesSequence"],9507:["SQ","XRay3DAcquisitionSequence"],9508:["FL","PrimaryPositionerScanArc"],9509:["FL","SecondaryPositionerScanArc"],9510:["FL ","PrimaryPositionerScanStartAngle"],9511:["FL",
"SecondaryPositionerScanStartAngle"],9514:["FL","PrimaryPositionerIncrement"],9515:["FL","SecondaryPositionerIncrement"],9516:["DT","StartAcquisitionDateTime"],9517:["DT","EndAcquisitionDateTime"],9524:["LO","ApplicationName"],9525:["LO","ApplicationVersion"],9526:["LO","ApplicationManufacturer"],9527:["CS","AlgorithmType"],9528:["LO","AlgorithmDescription"],9530:["SQ","XRay3DReconstructionSequence"],9531:["LO","ReconstructionDescription"],9538:["SQ","PerProjectionAcquisitionSequence"],9601:["SQ",
"DiffusionBMatrixSequence"],9602:["FD","DiffusionBValueXX"],9603:["FD","DiffusionBValueXY"],9604:["FD","DiffusionBValueXZ"],9605:["FD","DiffusionBValueYY"],9606:["FD","DiffusionBValueYZ"],9607:["FD","DiffusionBValueZZ"],9701:["DT","DecayCorrectionDateTime"],9715:["FD","StartDensityThreshold"],9716:["FD","StartRelativeDensityDifferenceThreshold"],9717:["FD","StartCardiacTriggerCountThreshold"],9718:["FD","StartRespiratoryTriggerCountThreshold"],9719:["FD","TerminationCountsThreshold"],9720:["FD","TerminationDensityThreshold"],
9721:["FD","TerminationRelativeDensityThreshold"],9722:["FD","TerminationTimeThreshold"],9723:["FD","TerminationCardiacTriggerCountThreshold"],9724:["FD","TerminationRespiratoryTriggerCountThreshold"],9725:["CS","DetectorGeometry"],9726:["FD","TransverseDetectorSeparation"],9727:["FD","AxialDetectorDimension"],9729:["US","RadiopharmaceuticalAgentNumber"],9732:["SQ","PETFrameAcquisitionSequence"],9733:["SQ","PETDetectorMotionDetailsSequence"],9734:["SQ","PETTableDynamicsSequence"],9735:["SQ","PETPositionSequence"],
9736:["SQ","PETFrameCorrectionFactorsSequence"],9737:["SQ","RadiopharmaceuticalUsageSequence"],9738:["CS","AttenuationCorrectionSource"],9739:["US","NumberOfIterations"],9740:["US","NumberOfSubsets"],9749:["SQ","PETReconstructionSequence"],9751:["SQ","PETFrameTypeSequence"],9755:["CS","TimeOfFlightInformationUsed"],9756:["CS","ReconstructionType"],9758:["CS","DecayCorrected"],9759:["CS","AttenuationCorrected"],9760:["CS","ScatterCorrected"],9761:["CS","DeadTimeCorrected"],9762:["CS","GantryMotionCorrected"],
9763:["CS","PatientMotionCorrected"],9764:["CS","CountLossNormalizationCorrected"],9765:["CS","RandomsCorrected"],9766:["CS","NonUniformRadialSamplingCorrected"],9767:["CS","SensitivityCalibrated"],9768:["CS","DetectorNormalizationCorrection"],9769:["CS","IterativeReconstructionMethod"],9770:["CS","AttenuationCorrectionTemporalRelationship"],9771:["SQ","PatientPhysiologicalStateSequence"],9772:["SQ","PatientPhysiologicalStateCodeSequence"],9801:["FD","DepthsOfFocus"],9803:["SQ","ExcludedIntervalsSequence"],
9804:["DT","ExclusionStartDatetime"],9805:["FD","ExclusionDuration"],9806:["SQ","USImageDescriptionSequence"],9807:["SQ","ImageDataTypeSequence"],9808:["CS","DataType"],9809:["SQ","TransducerScanPatternCodeSequence"],"980B":["CS","AliasedDataType"],"980C":["CS","PositionMeasuringDeviceUsed"],"980D":["SQ","TransducerGeometryCodeSequence"],"980E":["SQ","TransducerBeamSteeringCodeSequence"],"980F":["SQ","TransducerApplicationCodeSequence"],A001:["SQ","ContributingEquipmentSequence"],A002:["DT","ContributionDateTime"],
A003:["ST","ContributionDescription"]},"0020":{"000D":["UI","StudyInstanceUID"],"000E":["UI","SeriesInstanceUID"],"0010":["SH","StudyID"],"0011":["IS","SeriesNumber"],"0012":["IS","AcquisitionNumber"],"0013":["IS","InstanceNumber"],"0014":["IS","IsotopeNumber"],"0015":["IS","PhaseNumber"],"0016":["IS","IntervalNumber"],"0017":["IS","TimeSlotNumber"],"0018":["IS","AngleNumber"],"0019":["IS","ItemNumber"],"0020":["CS","PatientOrientation"],"0022":["IS","OverlayNumber"],"0024":["IS","CurveNumber"],"0026":["IS",
"LUTNumber"],"0030":["DS","ImagePosition"],"0032":["DS","ImagePositionPatient"],"0035":["DS","ImageOrientation"],"0037":["DS","ImageOrientationPatient"],"0050":["DS","Location"],"0052":["UI","FrameOfReferenceUID"],"0060":["CS","Laterality"],"0062":["CS","ImageLaterality"],"0070":["LO","ImageGeometryType"],"0080":["CS","MaskingImage"],"00AA":["IS","ReportNumber"],"0100":["IS","TemporalPositionIdentifier"],"0105":["IS","NumberOfTemporalPositions"],"0110":["DS","TemporalResolution"],"0200":["UI","SynchronizationFrameOfReferenceUID"],
"0242":["UI","SOPInstanceUIDOfConcatenationSource"],1E3:["IS","SeriesInStudy"],1001:["IS","AcquisitionsInSeries"],1002:["IS","ImagesInAcquisition"],1003:["IS","ImagesInSeries"],1004:["IS","AcquisitionsInStudy"],1005:["IS","ImagesInStudy"],1020:["LO","Reference"],1040:["LO","PositionReferenceIndicator"],1041:["DS","SliceLocation"],1070:["IS","OtherStudyNumbers"],1200:["IS","NumberOfPatientRelatedStudies"],1202:["IS","NumberOfPatientRelatedSeries"],1204:["IS","NumberOfPatientRelatedInstances"],1206:["IS",
"NumberOfStudyRelatedSeries"],1208:["IS","NumberOfStudyRelatedInstances"],1209:["IS","NumberOfSeriesRelatedInstances"],3401:["CS","ModifyingDeviceID"],3402:["CS","ModifiedImageID"],3403:["DA","ModifiedImageDate"],3404:["LO","ModifyingDeviceManufacturer"],3405:["TM","ModifiedImageTime"],3406:["LO","ModifiedImageDescription"],4E3:["LT","ImageComments"],5E3:["AT","OriginalImageIdentification"],5002:["LO","OriginalImageIdentificationNomenclature"],9056:["SH","StackID"],9057:["UL","InStackPositionNumber"],
9071:["SQ","FrameAnatomySequence"],9072:["CS","FrameLaterality"],9111:["SQ","FrameContentSequence"],9113:["SQ","PlanePositionSequence"],9116:["SQ","PlaneOrientationSequence"],9128:["UL","TemporalPositionIndex"],9153:["FD","NominalCardiacTriggerDelayTime"],9154:["FL","NominalCardiacTriggerTimePriorToRPeak"],9155:["FL","ActualCardiacTriggerTimePriorToRPeak"],9156:["US","FrameAcquisitionNumber"],9157:["UL","DimensionIndexValues"],9158:["LT","FrameComments"],9161:["UI","ConcatenationUID"],9162:["US",
"InConcatenationNumber"],9163:["US","InConcatenationTotalNumber"],9164:["UI","DimensionOrganizationUID"],9165:["AT","DimensionIndexPointer"],9167:["AT","FunctionalGroupPointer"],9213:["LO","DimensionIndexPrivateCreator"],9221:["SQ","DimensionOrganizationSequence"],9222:["SQ","DimensionIndexSequence"],9228:["UL","ConcatenationFrameOffsetNumber"],9238:["LO","FunctionalGroupPrivateCreator"],9241:["FL","NominalPercentageOfCardiacPhase"],9245:["FL","NominalPercentageOfRespiratoryPhase"],9246:["FL","StartingRespiratoryAmplitude"],
9247:["CS","StartingRespiratoryPhase"],9248:["FL","EndingRespiratoryAmplitude"],9249:["CS","EndingRespiratoryPhase"],9250:["CS","RespiratoryTriggerType"],9251:["FD","RRIntervalTimeNominal"],9252:["FD","ActualCardiacTriggerDelayTime"],9253:["SQ","RespiratorySynchronizationSequence"],9254:["FD","RespiratoryIntervalTime"],9255:["FD","NominalRespiratoryTriggerDelayTime"],9256:["FD","RespiratoryTriggerDelayThreshold"],9257:["FD","ActualRespiratoryTriggerDelayTime"],9301:["FD","ImagePositionVolume"],9302:["FD",
"ImageOrientationVolume"],9307:["CS","UltrasoundAcquisitionGeometry"],9308:["FD","ApexPosition"],9309:["FD","VolumeToTransducerMappingMatrix"],"930A":["FD","VolumeToTableMappingMatrix"],"930C":["CS","PatientFrameOfReferenceSource"],"930D":["FD","TemporalPositionTimeOffset"],"930E":["SQ","PlanePositionVolumeSequence"],"930F":["SQ","PlaneOrientationVolumeSequence"],9310:["SQ","TemporalPositionSequence"],9311:["CS","DimensionOrganizationType"],9312:["UI","VolumeFrameOfReferenceUID"],9313:["UI","TableFrameOfReferenceUID"],
9421:["LO","DimensionDescriptionLabel"],9450:["SQ","PatientOrientationInFrameSequence"],9453:["LO","FrameLabel"],9518:["US","AcquisitionIndex"],9529:["SQ","ContributingSOPInstancesReferenceSequence"],9536:["US","ReconstructionIndex"]},"0022":{"0001":["US","LightPathFilterPassThroughWavelength"],"0002":["US","LightPathFilterPassBand"],"0003":["US","ImagePathFilterPassThroughWavelength"],"0004":["US","ImagePathFilterPassBand"],"0005":["CS","PatientEyeMovementCommanded"],"0006":["SQ","PatientEyeMovementCommandCodeSequence"],
"0007":["FL","SphericalLensPower"],"0008":["FL","CylinderLensPower"],"0009":["FL","CylinderAxis"],"000A":["FL","EmmetropicMagnification"],"000B":["FL","IntraOcularPressure"],"000C":["FL","HorizontalFieldOfView"],"000D":["CS","PupilDilated"],"000E":["FL","DegreeOfDilation"],"0010":["FL","StereoBaselineAngle"],"0011":["FL","StereoBaselineDisplacement"],"0012":["FL","StereoHorizontalPixelOffset"],"0013":["FL","StereoVerticalPixelOffset"],"0014":["FL","StereoRotation"],"0015":["SQ","AcquisitionDeviceTypeCodeSequence"],
"0016":["SQ","IlluminationTypeCodeSequence"],"0017":["SQ","LightPathFilterTypeStackCodeSequence"],"0018":["SQ","ImagePathFilterTypeStackCodeSequence"],"0019":["SQ","LensesCodeSequence"],"001A":["SQ","ChannelDescriptionCodeSequence"],"001B":["SQ","RefractiveStateSequence"],"001C":["SQ","MydriaticAgentCodeSequence"],"001D":["SQ","RelativeImagePositionCodeSequence"],"001E":["FL","CameraAngleOfView"],"0020":["SQ","StereoPairsSequence"],"0021":["SQ","LeftImageSequence"],"0022":["SQ","RightImageSequence"],
"0030":["FL","AxialLengthOfTheEye"],"0031":["SQ","OphthalmicFrameLocationSequence"],"0032":["FL","ReferenceCoordinates"],"0035":["FL","DepthSpatialResolution"],"0036":["FL","MaximumDepthDistortion"],"0037":["FL","AlongScanSpatialResolution"],"0038":["FL","MaximumAlongScanDistortion"],"0039":["CS","OphthalmicImageOrientation"],"0041":["FL","DepthOfTransverseImage"],"0042":["SQ","MydriaticAgentConcentrationUnitsSequence"],"0048":["FL","AcrossScanSpatialResolution"],"0049":["FL","MaximumAcrossScanDistortion"],
"004E":["DS","MydriaticAgentConcentration"],"0055":["FL","IlluminationWaveLength"],"0056":["FL","IlluminationPower"],"0057":["FL","IlluminationBandwidth"],"0058":["SQ","MydriaticAgentSequence"],1007:["SQ","OphthalmicAxialMeasurementsRightEyeSequence"],1008:["SQ","OphthalmicAxialMeasurementsLeftEyeSequence"],1010:["CS","OphthalmicAxialLengthMeasurementsType"],1019:["FL","OphthalmicAxialLength"],1024:["SQ","LensStatusCodeSequence"],1025:["SQ","VitreousStatusCodeSequence"],1028:["SQ","IOLFormulaCodeSequence"],
1029:["LO","IOLFormulaDetail"],1033:["FL","KeratometerIndex"],1035:["SQ","SourceOfOphthalmicAxialLengthCodeSequence"],1037:["FL","TargetRefraction"],1039:["CS","RefractiveProcedureOccurred"],1040:["SQ","RefractiveSurgeryTypeCodeSequence"],1044:["SQ","OphthalmicUltrasoundAxialMeasurementsTypeCodeSequence"],1050:["SQ","OphthalmicAxialLengthMeasurementsSequence"],1053:["FL","IOLPower"],1054:["FL","PredictedRefractiveError"],1059:["FL","OphthalmicAxialLengthVelocity"],1065:["LO","LensStatusDescription"],
1066:["LO","VitreousStatusDescription"],1090:["SQ","IOLPowerSequence"],1092:["SQ","LensConstantSequence"],1093:["LO","IOLManufacturer"],1094:["LO","LensConstantDescription"],1096:["SQ","KeratometryMeasurementTypeCodeSequence"],1100:["SQ","ReferencedOphthalmicAxialMeasurementsSequence"],1101:["SQ","OphthalmicAxialLengthMeasurementsSegmentNameCodeSequence"],1103:["SQ","RefractiveErrorBeforeRefractiveSurgeryCodeSequence"],1121:["FL","IOLPowerForExactEmmetropia"],1122:["FL","IOLPowerForExactTargetRefraction"],
1125:["SQ","AnteriorChamberDepthDefinitionCodeSequence"],1130:["FL","LensThickness"],1131:["FL","AnteriorChamberDepth"],1132:["SQ","SourceOfLensThicknessDataCodeSequence"],1133:["SQ","SourceOfAnteriorChamberDepthDataCodeSequence"],1135:["SQ","SourceOfRefractiveErrorDataCodeSequence"],1140:["CS","OphthalmicAxialLengthMeasurementModified"],1150:["SQ","OphthalmicAxialLengthDataSourceCodeSequence"],1153:["SQ","OphthalmicAxialLengthAcquisitionMethodCodeSequence"],1155:["FL","SignalToNoiseRatio"],1159:["LO",
"OphthalmicAxialLengthDataSourceDescription"],1210:["SQ","OphthalmicAxialLengthMeasurementsTotalLengthSequence"],1211:["SQ","OphthalmicAxialLengthMeasurementsSegmentalLengthSequence"],1212:["SQ","OphthalmicAxialLengthMeasurementsLengthSummationSequence"],1220:["SQ","UltrasoundOphthalmicAxialLengthMeasurementsSequence"],1225:["SQ","OpticalOphthalmicAxialLengthMeasurementsSequence"],1230:["SQ","UltrasoundSelectedOphthalmicAxialLengthSequence"],1250:["SQ","OphthalmicAxialLengthSelectionMethodCodeSequence"],
1255:["SQ","OpticalSelectedOphthalmicAxialLengthSequence"],1257:["SQ","SelectedSegmentalOphthalmicAxialLengthSequence"],1260:["SQ","SelectedTotalOphthalmicAxialLengthSequence"],1262:["SQ","OphthalmicAxialLengthQualityMetricSequence"],1273:["LO","OphthalmicAxialLengthQualityMetricTypeDescription"],1300:["SQ","IntraocularLensCalculationsRightEyeSequence"],1310:["SQ","IntraocularLensCalculationsLeftEyeSequence"],1330:["SQ","ReferencedOphthalmicAxialLengthMeasurementQCImageSequence"]},"0024":{"0010":["FL",
"VisualFieldHorizontalExtent"],"0011":["FL","VisualFieldVerticalExtent"],"0012":["CS","VisualFieldShape"],"0016":["SQ","ScreeningTestModeCodeSequence"],"0018":["FL","MaximumStimulusLuminance"],"0020":["FL","BackgroundLuminance"],"0021":["SQ","StimulusColorCodeSequence"],"0024":["SQ","BackgroundIlluminationColorCodeSequence"],"0025":["FL","StimulusArea"],"0028":["FL","StimulusPresentationTime"],"0032":["SQ","FixationSequence"],"0033":["SQ","FixationMonitoringCodeSequence"],"0034":["SQ","VisualFieldCatchTrialSequence"],
"0035":["US","FixationCheckedQuantity"],"0036":["US","PatientNotProperlyFixatedQuantity"],"0037":["CS","PresentedVisualStimuliDataFlag"],"0038":["US","NumberOfVisualStimuli"],"0039":["CS","ExcessiveFixationLossesDataFlag"],"0040":["CS","ExcessiveFixationLosses"],"0042":["US","StimuliRetestingQuantity"],"0044":["LT","CommentsOnPatientPerformanceOfVisualField"],"0045":["CS","FalseNegativesEstimateFlag"],"0046":["FL","FalseNegativesEstimate"],"0048":["US","NegativeCatchTrialsQuantity"],"0050":["US",
"FalseNegativesQuantity"],"0051":["CS","ExcessiveFalseNegativesDataFlag"],"0052":["CS","ExcessiveFalseNegatives"],"0053":["CS","FalsePositivesEstimateFlag"],"0054":["FL","FalsePositivesEstimate"],"0055":["CS","CatchTrialsDataFlag"],"0056":["US","PositiveCatchTrialsQuantity"],"0057":["CS","TestPointNormalsDataFlag"],"0058":["SQ","TestPointNormalsSequence"],"0059":["CS","GlobalDeviationProbabilityNormalsFlag"],"0060":["US","FalsePositivesQuantity"],"0061":["CS","ExcessiveFalsePositivesDataFlag"],"0062":["CS",
"ExcessiveFalsePositives"],"0063":["CS","VisualFieldTestNormalsFlag"],"0064":["SQ","ResultsNormalsSequence"],"0065":["SQ","AgeCorrectedSensitivityDeviationAlgorithmSequence"],"0066":["FL","GlobalDeviationFromNormal"],"0067":["SQ","GeneralizedDefectSensitivityDeviationAlgorithmSequence"],"0068":["FL","LocalizedDeviationfromNormal"],"0069":["LO","PatientReliabilityIndicator"],"0070":["FL","VisualFieldMeanSensitivity"],"0071":["FL","GlobalDeviationProbability"],"0072":["CS","LocalDeviationProbabilityNormalsFlag"],
"0073":["FL","LocalizedDeviationProbability"],"0074":["CS","ShortTermFluctuationCalculated"],"0075":["FL","ShortTermFluctuation"],"0076":["CS","ShortTermFluctuationProbabilityCalculated"],"0077":["FL","ShortTermFluctuationProbability"],"0078":["CS","CorrectedLocalizedDeviationFromNormalCalculated"],"0079":["FL","CorrectedLocalizedDeviationFromNormal"],"0080":["CS","CorrectedLocalizedDeviationFromNormalProbabilityCalculated"],"0081":["FL","CorrectedLocalizedDeviationFromNormalProbability"],"0083":["SQ",
"GlobalDeviationProbabilitySequence"],"0085":["SQ","LocalizedDeviationProbabilitySequence"],"0086":["CS","FovealSensitivityMeasured"],"0087":["FL","FovealSensitivity"],"0088":["FL","VisualFieldTestDuration"],"0089":["SQ","VisualFieldTestPointSequence"],"0090":["FL","VisualFieldTestPointXCoordinate"],"0091":["FL","VisualFieldTestPointYCoordinate"],"0092":["FL","AgeCorrectedSensitivityDeviationValue"],"0093":["CS","StimulusResults"],"0094":["FL","SensitivityValue"],"0095":["CS","RetestStimulusSeen"],
"0096":["FL","RetestSensitivityValue"],"0097":["SQ","VisualFieldTestPointNormalsSequence"],"0098":["FL","QuantifiedDefect"],"0100":["FL","AgeCorrectedSensitivityDeviationProbabilityValue"],"0102":["CS","GeneralizedDefectCorrectedSensitivityDeviationFlag "],"0103":["FL","GeneralizedDefectCorrectedSensitivityDeviationValue "],"0104":["FL","GeneralizedDefectCorrectedSensitivityDeviationProbabilityValue"],"0105":["FL ","MinimumSensitivityValue"],"0106":["CS","BlindSpotLocalized"],"0107":["FL","BlindSpotXCoordinate"],
"0108":["FL","BlindSpotYCoordinate "],"0110":["SQ","VisualAcuityMeasurementSequence"],"0112":["SQ","RefractiveParametersUsedOnPatientSequence"],"0113":["CS","MeasurementLaterality"],"0114":["SQ","OphthalmicPatientClinicalInformationLeftEyeSequence"],"0115":["SQ","OphthalmicPatientClinicalInformationRightEyeSequence"],"0117":["CS","FovealPointNormativeDataFlag"],"0118":["FL","FovealPointProbabilityValue"],"0120":["CS","ScreeningBaselineMeasured"],"0122":["SQ","ScreeningBaselineMeasuredSequence"],"0124":["CS",
"ScreeningBaselineType"],"0126":["FL","ScreeningBaselineValue"],"0202":["LO","AlgorithmSource"],"0306":["LO","DataSetName"],"0307":["LO","DataSetVersion"],"0308":["LO","DataSetSource"],"0309":["LO","DataSetDescription"],"0317":["SQ","VisualFieldTestReliabilityGlobalIndexSequence"],"0320":["SQ","VisualFieldGlobalResultsIndexSequence"],"0325":["SQ","DataObservationSequence"],"0338":["CS","IndexNormalsFlag"],"0341":["FL","IndexProbability"],"0344":["SQ","IndexProbabilitySequence"]},"0028":{"0002":["US",
"SamplesPerPixel"],"0003":["US","SamplesPerPixelUsed"],"0004":["CS","PhotometricInterpretation"],"0005":["US","ImageDimensions"],"0006":["US","PlanarConfiguration"],"0008":["IS","NumberOfFrames"],"0009":["AT","FrameIncrementPointer"],"000A":["AT","FrameDimensionPointer"],"0010":["US","Rows"],"0011":["US","Columns"],"0012":["US","Planes"],"0014":["US","UltrasoundColorDataPresent"],"0030":["DS","PixelSpacing"],"0031":["DS","ZoomFactor"],"0032":["DS","ZoomCenter"],"0034":["IS","PixelAspectRatio"],"0040":["CS",
"ImageFormat"],"0050":["LO","ManipulatedImage"],"0051":["CS","CorrectedImage"],"005F":["LO","CompressionRecognitionCode"],"0060":["CS","CompressionCode"],"0061":["SH","CompressionOriginator"],"0062":["LO","CompressionLabel"],"0063":["SH","CompressionDescription"],"0065":["CS","CompressionSequence"],"0066":["AT","CompressionStepPointers"],"0068":["US","RepeatInterval"],"0069":["US","BitsGrouped"],"0070":["US","PerimeterTable"],"0071":["SS","PerimeterValue"],"0080":["US","PredictorRows"],"0081":["US",
"PredictorColumns"],"0082":["US","PredictorConstants"],"0090":["CS","BlockedPixels"],"0091":["US","BlockRows"],"0092":["US","BlockColumns"],"0093":["US","RowOverlap"],"0094":["US","ColumnOverlap"],"0100":["US","BitsAllocated"],"0101":["US","BitsStored"],"0102":["US","HighBit"],"0103":["US","PixelRepresentation"],"0104":["SS","SmallestValidPixelValue"],"0105":["SS","LargestValidPixelValue"],"0106":["SS","SmallestImagePixelValue"],"0107":["SS","LargestImagePixelValue"],"0108":["SS","SmallestPixelValueInSeries"],
"0109":["SS","LargestPixelValueInSeries"],"0110":["SS","SmallestImagePixelValueInPlane"],"0111":["SS","LargestImagePixelValueInPlane"],"0120":["SS","PixelPaddingValue"],"0121":["SS","PixelPaddingRangeLimit"],"0200":["US","ImageLocation"],"0300":["CS","QualityControlImage"],"0301":["CS","BurnedInAnnotation"],"0302":["CS","RecognizableVisualFeatures"],"0303":["CS","LongitudinalTemporalInformationModified"],"0400":["LO","TransformLabel"],"0401":["LO","TransformVersionNumber"],"0402":["US","NumberOfTransformSteps"],
"0403":["LO","SequenceOfCompressedData"],"0404":["AT","DetailsOfCoefficients"],"0700":["LO","DCTLabel"],"0701":["CS","DataBlockDescription"],"0702":["AT","DataBlock"],"0710":["US","NormalizationFactorFormat"],"0720":["US","ZonalMapNumberFormat"],"0721":["AT","ZonalMapLocation"],"0722":["US","ZonalMapFormat"],"0730":["US","AdaptiveMapFormat"],"0740":["US","CodeNumberFormat"],"0A02":["CS","PixelSpacingCalibrationType"],"0A04":["LO","PixelSpacingCalibrationDescription"],1040:["CS","PixelIntensityRelationship"],
1041:["SS","PixelIntensityRelationshipSign"],1050:["DS","WindowCenter"],1051:["DS","WindowWidth"],1052:["DS","RescaleIntercept"],1053:["DS","RescaleSlope"],1054:["LO","RescaleType"],1055:["LO","WindowCenterWidthExplanation"],1056:["CS","VOILUTFunction"],1080:["CS","GrayScale"],1090:["CS","RecommendedViewingMode"],1100:["SS","GrayLookupTableDescriptor"],1101:["SS","RedPaletteColorLookupTableDescriptor"],1102:["SS","GreenPaletteColorLookupTableDescriptor"],1103:["SS","BluePaletteColorLookupTableDescriptor"],
1104:["US","AlphaPaletteColorLookupTableDescriptor"],1111:["SS","LargeRedPaletteColorLookupTableDescriptor"],1112:["SS","LargeGreenPaletteColorLookupTableDescriptor"],1113:["SS","LargeBluePaletteColorLookupTableDescriptor"],1199:["UI","PaletteColorLookupTableUID"],1200:["OW","GrayLookupTableData"],1201:["OW","RedPaletteColorLookupTableData"],1202:["OW","GreenPaletteColorLookupTableData"],1203:["OW","BluePaletteColorLookupTableData"],1204:["OW","AlphaPaletteColorLookupTableData"],1211:["OW","LargeRedPaletteColorLookupTableData"],
1212:["OW","LargeGreenPaletteColorLookupTableData"],1213:["OW","LargeBluePaletteColorLookupTableData"],1214:["UI","LargePaletteColorLookupTableUID"],1221:["OW","SegmentedRedPaletteColorLookupTableData"],1222:["OW","SegmentedGreenPaletteColorLookupTableData"],1223:["OW","SegmentedBluePaletteColorLookupTableData"],1300:["CS","BreastImplantPresent"],1350:["CS","PartialView"],1351:["ST","PartialViewDescription"],1352:["SQ","PartialViewCodeSequence"],"135A":["CS","SpatialLocationsPreserved"],1401:["SQ",
"DataFrameAssignmentSequence"],1402:["CS","DataPathAssignment"],1403:["US","BitsMappedToColorLookupTable"],1404:["SQ","BlendingLUT1Sequence"],1405:["CS","BlendingLUT1TransferFunction"],1406:["FD","BlendingWeightConstant"],1407:["US","BlendingLookupTableDescriptor"],1408:["OW","BlendingLookupTableData"],"140B":["SQ","EnhancedPaletteColorLookupTableSequence"],"140C":["SQ","BlendingLUT2Sequence"],"140D":["CS","BlendingLUT2TransferFunction"],"140E":["CS","DataPathID"],"140F":["CS","RGBLUTTransferFunction"],
1410:["CS","AlphaLUTTransferFunction"],2E3:["OB","ICCProfile"],2110:["CS","LossyImageCompression"],2112:["DS","LossyImageCompressionRatio"],2114:["CS","LossyImageCompressionMethod"],3E3:["SQ","ModalityLUTSequence"],3002:["SS","LUTDescriptor"],3003:["LO","LUTExplanation"],3004:["LO","ModalityLUTType"],3006:["OW","LUTData"],3010:["SQ","VOILUTSequence"],3110:["SQ","SoftcopyVOILUTSequence"],4E3:["LT","ImagePresentationComments"],5E3:["SQ","BiPlaneAcquisitionSequence"],6010:["US","RepresentativeFrameNumber"],
6020:["US","FrameNumbersOfInterest"],6022:["LO","FrameOfInterestDescription"],6023:["CS","FrameOfInterestType"],6030:["US","MaskPointers"],6040:["US","RWavePointer"],6100:["SQ","MaskSubtractionSequence"],6101:["CS","MaskOperation"],6102:["US","ApplicableFrameRange"],6110:["US","MaskFrameNumbers"],6112:["US","ContrastFrameAveraging"],6114:["FL","MaskSubPixelShift"],6120:["SS","TIDOffset"],6190:["ST","MaskOperationExplanation"],"7FE0":["UT","PixelDataProviderURL"],9001:["UL","DataPointRows"],9002:["UL",
"DataPointColumns"],9003:["CS","SignalDomainColumns"],9099:["US","LargestMonochromePixelValue"],9108:["CS","DataRepresentation"],9110:["SQ","PixelMeasuresSequence"],9132:["SQ","FrameVOILUTSequence"],9145:["SQ","PixelValueTransformationSequence"],9235:["CS","SignalDomainRows"],9411:["FL","DisplayFilterPercentage"],9415:["SQ","FramePixelShiftSequence"],9416:["US","SubtractionItemID"],9422:["SQ","PixelIntensityRelationshipLUTSequence"],9443:["SQ","FramePixelDataPropertiesSequence"],9444:["CS","GeometricalProperties"],
9445:["FL","GeometricMaximumDistortion"],9446:["CS","ImageProcessingApplied"],9454:["CS","MaskSelectionMode"],9474:["CS","LUTFunction"],9478:["FL","MaskVisibilityPercentage"],9501:["SQ","PixelShiftSequence"],9502:["SQ","RegionPixelShiftSequence"],9503:["SS","VerticesOfTheRegion"],9505:["SQ","MultiFramePresentationSequence"],9506:["US","PixelShiftFrameRange"],9507:["US","LUTFrameRange"],9520:["DS","ImageToEquipmentMappingMatrix"],9537:["CS","EquipmentCoordinateSystemIdentification"]},"0032":{"000A":["CS",
"StudyStatusID"],"000C":["CS","StudyPriorityID"],"0012":["LO","StudyIDIssuer"],"0032":["DA","StudyVerifiedDate"],"0033":["TM","StudyVerifiedTime"],"0034":["DA","StudyReadDate"],"0035":["TM","StudyReadTime"],1E3:["DA","ScheduledStudyStartDate"],1001:["TM","ScheduledStudyStartTime"],1010:["DA","ScheduledStudyStopDate"],1011:["TM","ScheduledStudyStopTime"],1020:["LO","ScheduledStudyLocation"],1021:["AE","ScheduledStudyLocationAETitle"],1030:["LO","ReasonForStudy"],1031:["SQ","RequestingPhysicianIdentificationSequence"],
1032:["PN","RequestingPhysician"],1033:["LO","RequestingService"],1034:["SQ","RequestingServiceCodeSequence"],1040:["DA","StudyArrivalDate"],1041:["TM","StudyArrivalTime"],1050:["DA","StudyCompletionDate"],1051:["TM","StudyCompletionTime"],1055:["CS","StudyComponentStatusID"],1060:["LO","RequestedProcedureDescription"],1064:["SQ","RequestedProcedureCodeSequence"],1070:["LO","RequestedContrastAgent"],4E3:["LT","StudyComments"]},"0038":{"0004":["SQ","ReferencedPatientAliasSequence"],"0008":["CS","VisitStatusID"],
"0010":["LO","AdmissionID"],"0011":["LO","IssuerOfAdmissionID"],"0014":["SQ","IssuerOfAdmissionIDSequence"],"0016":["LO","RouteOfAdmissions"],"001A":["DA","ScheduledAdmissionDate"],"001B":["TM","ScheduledAdmissionTime"],"001C":["DA","ScheduledDischargeDate"],"001D":["TM","ScheduledDischargeTime"],"001E":["LO","ScheduledPatientInstitutionResidence"],"0020":["DA","AdmittingDate"],"0021":["TM","AdmittingTime"],"0030":["DA","DischargeDate"],"0032":["TM","DischargeTime"],"0040":["LO","DischargeDiagnosisDescription"],
"0044":["SQ","DischargeDiagnosisCodeSequence"],"0050":["LO","SpecialNeeds"],"0060":["LO","ServiceEpisodeID"],"0061":["LO","IssuerOfServiceEpisodeID"],"0062":["LO","ServiceEpisodeDescription"],"0064":["SQ","IssuerOfServiceEpisodeIDSequence"],"0100":["SQ","PertinentDocumentsSequence"],"0300":["LO","CurrentPatientLocation"],"0400":["LO","PatientInstitutionResidence"],"0500":["LO","PatientState"],"0502":["SQ","PatientClinicalTrialParticipationSequence"],4E3:["LT","VisitComments"]},"003A":{"0004":["CS",
"WaveformOriginality"],"0005":["US","NumberOfWaveformChannels"],"0010":["UL","NumberOfWaveformSamples"],"001A":["DS","SamplingFrequency"],"0020":["SH","MultiplexGroupLabel"],"0200":["SQ","ChannelDefinitionSequence"],"0202":["IS","WaveformChannelNumber"],"0203":["SH","ChannelLabel"],"0205":["CS","ChannelStatus"],"0208":["SQ","ChannelSourceSequence"],"0209":["SQ","ChannelSourceModifiersSequence"],"020A":["SQ","SourceWaveformSequence"],"020C":["LO","ChannelDerivationDescription"],"0210":["DS","ChannelSensitivity"],
"0211":["SQ","ChannelSensitivityUnitsSequence"],"0212":["DS","ChannelSensitivityCorrectionFactor"],"0213":["DS","ChannelBaseline"],"0214":["DS","ChannelTimeSkew"],"0215":["DS","ChannelSampleSkew"],"0218":["DS","ChannelOffset"],"021A":["US","WaveformBitsStored"],"0220":["DS","FilterLowFrequency"],"0221":["DS","FilterHighFrequency"],"0222":["DS","NotchFilterFrequency"],"0223":["DS","NotchFilterBandwidth"],"0230":["FL","WaveformDataDisplayScale"],"0231":["US","WaveformDisplayBackgroundCIELabValue"],
"0240":["SQ","WaveformPresentationGroupSequence"],"0241":["US","PresentationGroupNumber"],"0242":["SQ","ChannelDisplaySequence"],"0244":["US","ChannelRecommendedDisplayCIELabValue"],"0245":["FL","ChannelPosition"],"0246":["CS","DisplayShadingFlag"],"0247":["FL","FractionalChannelDisplayScale"],"0248":["FL","AbsoluteChannelDisplayScale"],"0300":["SQ","MultiplexedAudioChannelsDescriptionCodeSequence"],"0301":["IS","ChannelIdentificationCode"],"0302":["CS","ChannelMode"]},"0040":{"0001":["AE","ScheduledStationAETitle"],
"0002":["DA","ScheduledProcedureStepStartDate"],"0003":["TM","ScheduledProcedureStepStartTime"],"0004":["DA","ScheduledProcedureStepEndDate"],"0005":["TM","ScheduledProcedureStepEndTime"],"0006":["PN","ScheduledPerformingPhysicianName"],"0007":["LO","ScheduledProcedureStepDescription"],"0008":["SQ","ScheduledProtocolCodeSequence"],"0009":["SH","ScheduledProcedureStepID"],"000A":["SQ","StageCodeSequence"],"000B":["SQ","ScheduledPerformingPhysicianIdentificationSequence"],"0010":["SH","ScheduledStationName"],
"0011":["SH","ScheduledProcedureStepLocation"],"0012":["LO","PreMedication"],"0020":["CS","ScheduledProcedureStepStatus"],"0026":["SQ","OrderPlacerIdentifierSequence"],"0027":["SQ","OrderFillerIdentifierSequence"],"0031":["UT","LocalNamespaceEntityID"],"0032":["UT","UniversalEntityID"],"0033":["CS","UniversalEntityIDType"],"0035":["CS","IdentifierTypeCode"],"0036":["SQ","AssigningFacilitySequence"],"0039":["SQ","AssigningJurisdictionCodeSequence"],"003A":["SQ","AssigningAgencyOrDepartmentCodeSequence"],
"0100":["SQ","ScheduledProcedureStepSequence"],"0220":["SQ","ReferencedNonImageCompositeSOPInstanceSequence"],"0241":["AE","PerformedStationAETitle"],"0242":["SH","PerformedStationName"],"0243":["SH","PerformedLocation"],"0244":["DA","PerformedProcedureStepStartDate"],"0245":["TM","PerformedProcedureStepStartTime"],"0250":["DA","PerformedProcedureStepEndDate"],"0251":["TM","PerformedProcedureStepEndTime"],"0252":["CS","PerformedProcedureStepStatus"],"0253":["SH","PerformedProcedureStepID"],"0254":["LO",
"PerformedProcedureStepDescription"],"0255":["LO","PerformedProcedureTypeDescription"],"0260":["SQ","PerformedProtocolCodeSequence"],"0261":["CS","PerformedProtocolType"],"0270":["SQ","ScheduledStepAttributesSequence"],"0275":["SQ","RequestAttributesSequence"],"0280":["ST","CommentsOnThePerformedProcedureStep"],"0281":["SQ","PerformedProcedureStepDiscontinuationReasonCodeSequence"],"0293":["SQ","QuantitySequence"],"0294":["DS","Quantity"],"0295":["SQ","MeasuringUnitsSequence"],"0296":["SQ","BillingItemSequence"],
"0300":["US","TotalTimeOfFluoroscopy"],"0301":["US","TotalNumberOfExposures"],"0302":["US","EntranceDose"],"0303":["US","ExposedArea"],"0306":["DS","DistanceSourceToEntrance"],"0307":["DS","DistanceSourceToSupport"],"030E":["SQ","ExposureDoseSequence"],"0310":["ST","CommentsOnRadiationDose"],"0312":["DS","XRayOutput"],"0314":["DS","HalfValueLayer"],"0316":["DS","OrganDose"],"0318":["CS","OrganExposed"],"0320":["SQ","BillingProcedureStepSequence"],"0321":["SQ","FilmConsumptionSequence"],"0324":["SQ",
"BillingSuppliesAndDevicesSequence"],"0330":["SQ","ReferencedProcedureStepSequence"],"0340":["SQ","PerformedSeriesSequence"],"0400":["LT","CommentsOnTheScheduledProcedureStep"],"0440":["SQ","ProtocolContextSequence"],"0441":["SQ","ContentItemModifierSequence"],"0500":["SQ","ScheduledSpecimenSequence"],"050A":["LO","SpecimenAccessionNumber"],"0512":["LO","ContainerIdentifier"],"0513":["SQ","IssuerOfTheContainerIdentifierSequence"],"0515":["SQ","AlternateContainerIdentifierSequence"],"0518":["SQ","ContainerTypeCodeSequence"],
"051A":["LO","ContainerDescription"],"0520":["SQ","ContainerComponentSequence"],"0550":["SQ","SpecimenSequence"],"0551":["LO","SpecimenIdentifier"],"0552":["SQ","SpecimenDescriptionSequenceTrial"],"0553":["ST","SpecimenDescriptionTrial"],"0554":["UI","SpecimenUID"],"0555":["SQ","AcquisitionContextSequence"],"0556":["ST","AcquisitionContextDescription"],"059A":["SQ","SpecimenTypeCodeSequence"],"0560":["SQ","SpecimenDescriptionSequence"],"0562":["SQ","IssuerOfTheSpecimenIdentifierSequence"],"0600":["LO",
"SpecimenShortDescription"],"0602":["UT","SpecimenDetailedDescription"],"0610":["SQ","SpecimenPreparationSequence"],"0612":["SQ","SpecimenPreparationStepContentItemSequence"],"0620":["SQ","SpecimenLocalizationContentItemSequence"],"06FA":["LO","SlideIdentifier"],"071A":["SQ","ImageCenterPointCoordinatesSequence"],"072A":["DS","XOffsetInSlideCoordinateSystem"],"073A":["DS","YOffsetInSlideCoordinateSystem"],"074A":["DS","ZOffsetInSlideCoordinateSystem"],"08D8":["SQ","PixelSpacingSequence"],"08DA":["SQ",
"CoordinateSystemAxisCodeSequence"],"08EA":["SQ","MeasurementUnitsCodeSequence"],"09F8":["SQ","VitalStainCodeSequenceTrial"],1001:["SH","RequestedProcedureID"],1002:["LO","ReasonForTheRequestedProcedure"],1003:["SH","RequestedProcedurePriority"],1004:["LO","PatientTransportArrangements"],1005:["LO","RequestedProcedureLocation"],1006:["SH","PlacerOrderNumberProcedure"],1007:["SH","FillerOrderNumberProcedure"],1008:["LO","ConfidentialityCode"],1009:["SH","ReportingPriority"],"100A":["SQ","ReasonForRequestedProcedureCodeSequence"],
1010:["PN","NamesOfIntendedRecipientsOfResults"],1011:["SQ","IntendedRecipientsOfResultsIdentificationSequence"],1012:["SQ","ReasonForPerformedProcedureCodeSequence"],1060:["LO","RequestedProcedureDescriptionTrial"],1101:["SQ","PersonIdentificationCodeSequence"],1102:["ST","PersonAddress"],1103:["LO","PersonTelephoneNumbers"],1400:["LT","RequestedProcedureComments"],2001:["LO","ReasonForTheImagingServiceRequest"],2004:["DA","IssueDateOfImagingServiceRequest"],2005:["TM","IssueTimeOfImagingServiceRequest"],
2006:["SH","PlacerOrderNumberImagingServiceRequestRetired"],2007:["SH","FillerOrderNumberImagingServiceRequestRetired"],2008:["PN","OrderEnteredBy"],2009:["SH","OrderEntererLocation"],2010:["SH","OrderCallbackPhoneNumber"],2016:["LO","PlacerOrderNumberImagingServiceRequest"],2017:["LO","FillerOrderNumberImagingServiceRequest"],2400:["LT","ImagingServiceRequestComments"],3001:["LO","ConfidentialityConstraintOnPatientDataDescription"],4001:["CS","GeneralPurposeScheduledProcedureStepStatus"],4002:["CS",
"GeneralPurposePerformedProcedureStepStatus"],4003:["CS","GeneralPurposeScheduledProcedureStepPriority"],4004:["SQ","ScheduledProcessingApplicationsCodeSequence"],4005:["DT","ScheduledProcedureStepStartDateTime"],4006:["CS","MultipleCopiesFlag"],4007:["SQ","PerformedProcessingApplicationsCodeSequence"],4009:["SQ","HumanPerformerCodeSequence"],4010:["DT","ScheduledProcedureStepModificationDateTime"],4011:["DT","ExpectedCompletionDateTime"],4015:["SQ","ResultingGeneralPurposePerformedProcedureStepsSequence"],
4016:["SQ","ReferencedGeneralPurposeScheduledProcedureStepSequence"],4018:["SQ","ScheduledWorkitemCodeSequence"],4019:["SQ","PerformedWorkitemCodeSequence"],4020:["CS","InputAvailabilityFlag"],4021:["SQ","InputInformationSequence"],4022:["SQ","RelevantInformationSequence"],4023:["UI","ReferencedGeneralPurposeScheduledProcedureStepTransactionUID"],4025:["SQ","ScheduledStationNameCodeSequence"],4026:["SQ","ScheduledStationClassCodeSequence"],4027:["SQ","ScheduledStationGeographicLocationCodeSequence"],
4028:["SQ","PerformedStationNameCodeSequence"],4029:["SQ","PerformedStationClassCodeSequence"],4030:["SQ","PerformedStationGeographicLocationCodeSequence"],4031:["SQ","RequestedSubsequentWorkitemCodeSequence"],4032:["SQ","NonDICOMOutputCodeSequence"],4033:["SQ","OutputInformationSequence"],4034:["SQ","ScheduledHumanPerformersSequence"],4035:["SQ","ActualHumanPerformersSequence"],4036:["LO","HumanPerformerOrganization"],4037:["PN","HumanPerformerName"],4040:["CS","RawDataHandling"],4041:["CS","InputReadinessState"],
4050:["DT","PerformedProcedureStepStartDateTime"],4051:["DT","PerformedProcedureStepEndDateTime"],4052:["DT","ProcedureStepCancellationDateTime"],8302:["DS","EntranceDoseInmGy"],9094:["SQ","ReferencedImageRealWorldValueMappingSequence"],9096:["SQ","RealWorldValueMappingSequence"],9098:["SQ","PixelValueMappingCodeSequence"],9210:["SH","LUTLabel"],9211:["SS","RealWorldValueLastValueMapped"],9212:["FD","RealWorldValueLUTData"],9216:["SS","RealWorldValueFirstValueMapped"],9224:["FD","RealWorldValueIntercept"],
9225:["FD","RealWorldValueSlope"],A007:["CS","FindingsFlagTrial"],A010:["CS","RelationshipType"],A020:["SQ","FindingsSequenceTrial"],A021:["UI","FindingsGroupUIDTrial"],A022:["UI","ReferencedFindingsGroupUIDTrial"],A023:["DA","FindingsGroupRecordingDateTrial"],A024:["TM","FindingsGroupRecordingTimeTrial"],A026:["SQ","FindingsSourceCategoryCodeSequenceTrial"],A027:["LO","VerifyingOrganization"],A028:["SQ","DocumentingOrganizationIdentifierCodeSequenceTrial"],A030:["DT","VerificationDateTime"],A032:["DT",
"ObservationDateTime"],A040:["CS","ValueType"],A043:["SQ","ConceptNameCodeSequence"],A047:["LO","MeasurementPrecisionDescriptionTrial"],A050:["CS","ContinuityOfContent"],A057:["CS","UrgencyOrPriorityAlertsTrial"],A060:["LO","SequencingIndicatorTrial"],A066:["SQ","DocumentIdentifierCodeSequenceTrial"],A067:["PN","DocumentAuthorTrial"],A068:["SQ","DocumentAuthorIdentifierCodeSequenceTrial"],A070:["SQ","IdentifierCodeSequenceTrial"],A073:["SQ","VerifyingObserverSequence"],A074:["OB","ObjectBinaryIdentifierTrial"],
A075:["PN","VerifyingObserverName"],A076:["SQ","DocumentingObserverIdentifierCodeSequenceTrial"],A078:["SQ","AuthorObserverSequence"],A07A:["SQ","ParticipantSequence"],A07C:["SQ","CustodialOrganizationSequence"],A080:["CS","ParticipationType"],A082:["DT","ParticipationDateTime"],A084:["CS","ObserverType"],A085:["SQ","ProcedureIdentifierCodeSequenceTrial"],A088:["SQ","VerifyingObserverIdentificationCodeSequence"],A089:["OB","ObjectDirectoryBinaryIdentifierTrial"],A090:["SQ","EquivalentCDADocumentSequence"],
A0B0:["US","ReferencedWaveformChannels"],A110:["DA","DateOfDocumentOrVerbalTransactionTrial"],A112:["TM","TimeOfDocumentCreationOrVerbalTransactionTrial"],A120:["DT","DateTime"],A121:["DA","Date"],A122:["TM","Time"],A123:["PN","PersonName"],A124:["UI","UID"],A125:["CS","ReportStatusIDTrial"],A130:["CS","TemporalRangeType"],A132:["UL","ReferencedSamplePositions"],A136:["US","ReferencedFrameNumbers"],A138:["DS","ReferencedTimeOffsets"],A13A:["DT","ReferencedDateTime"],A160:["UT","TextValue"],A167:["SQ",
"ObservationCategoryCodeSequenceTrial"],A168:["SQ","ConceptCodeSequence"],A16A:["ST","BibliographicCitationTrial"],A170:["SQ","PurposeOfReferenceCodeSequence"],A171:["UI","ObservationUIDTrial"],A172:["UI","ReferencedObservationUIDTrial"],A173:["CS","ReferencedObservationClassTrial"],A174:["CS","ReferencedObjectObservationClassTrial"],A180:["US","AnnotationGroupNumber"],A192:["DA","ObservationDateTrial"],A193:["TM","ObservationTimeTrial"],A194:["CS","MeasurementAutomationTrial"],A195:["SQ","ModifierCodeSequence"],
A224:["ST","IdentificationDescriptionTrial"],A290:["CS","CoordinatesSetGeometricTypeTrial"],A296:["SQ","AlgorithmCodeSequenceTrial"],A297:["ST","AlgorithmDescriptionTrial"],A29A:["SL","PixelCoordinatesSetTrial"],A300:["SQ","MeasuredValueSequence"],A301:["SQ","NumericValueQualifierCodeSequence"],A307:["PN","CurrentObserverTrial"],A30A:["DS","NumericValue"],A313:["SQ","ReferencedAccessionSequenceTrial"],A33A:["ST","ReportStatusCommentTrial"],A340:["SQ","ProcedureContextSequenceTrial"],A352:["PN","VerbalSourceTrial"],
A353:["ST","AddressTrial"],A354:["LO","TelephoneNumberTrial"],A358:["SQ","VerbalSourceIdentifierCodeSequenceTrial"],A360:["SQ","PredecessorDocumentsSequence"],A370:["SQ","ReferencedRequestSequence"],A372:["SQ","PerformedProcedureCodeSequence"],A375:["SQ","CurrentRequestedProcedureEvidenceSequence"],A380:["SQ","ReportDetailSequenceTrial"],A385:["SQ","PertinentOtherEvidenceSequence"],A390:["SQ","HL7StructuredDocumentReferenceSequence"],A402:["UI","ObservationSubjectUIDTrial"],A403:["CS","ObservationSubjectClassTrial"],
A404:["SQ","ObservationSubjectTypeCodeSequenceTrial"],A491:["CS","CompletionFlag"],A492:["LO","CompletionFlagDescription"],A493:["CS","VerificationFlag"],A494:["CS","ArchiveRequested"],A496:["CS","PreliminaryFlag"],A504:["SQ","ContentTemplateSequence"],A525:["SQ","IdenticalDocumentsSequence"],A600:["CS","ObservationSubjectContextFlagTrial"],A601:["CS","ObserverContextFlagTrial"],A603:["CS","ProcedureContextFlagTrial"],A730:["SQ","ContentSequence"],A731:["SQ","RelationshipSequenceTrial"],A732:["SQ",
"RelationshipTypeCodeSequenceTrial"],A744:["SQ","LanguageCodeSequenceTrial"],A992:["ST","UniformResourceLocatorTrial"],B020:["SQ","WaveformAnnotationSequence"],DB00:["CS","TemplateIdentifier"],DB06:["DT","TemplateVersion"],DB07:["DT","TemplateLocalVersion"],DB0B:["CS","TemplateExtensionFlag"],DB0C:["UI","TemplateExtensionOrganizationUID"],DB0D:["UI","TemplateExtensionCreatorUID"],DB73:["UL","ReferencedContentItemIdentifier"],E001:["ST","HL7InstanceIdentifier"],E004:["DT","HL7DocumentEffectiveTime"],
E006:["SQ","HL7DocumentTypeCodeSequence"],E008:["SQ","DocumentClassCodeSequence"],E010:["UT","RetrieveURI"],E011:["UI","RetrieveLocationUID"],E020:["CS","TypeOfInstances"],E021:["SQ","DICOMRetrievalSequence"],E022:["SQ","DICOMMediaRetrievalSequence"],E023:["SQ","WADORetrievalSequence"],E024:["SQ","XDSRetrievalSequence"],E030:["UI","RepositoryUniqueID"],E031:["UI","HomeCommunityID"]},"0042":{"0010":["ST","DocumentTitle"],"0011":["OB","EncapsulatedDocument"],"0012":["LO","MIMETypeOfEncapsulatedDocument"],
"0013":["SQ","SourceInstanceSequence"],"0014":["LO","ListOfMIMETypes"]},"0044":{"0001":["ST","ProductPackageIdentifier"],"0002":["CS","SubstanceAdministrationApproval"],"0003":["LT","ApprovalStatusFurtherDescription"],"0004":["DT","ApprovalStatusDateTime"],"0007":["SQ","ProductTypeCodeSequence"],"0008":["LO","ProductName"],"0009":["LT","ProductDescription"],"000A":["LO","ProductLotIdentifier"],"000B":["DT","ProductExpirationDateTime"],"0010":["DT","SubstanceAdministrationDateTime"],"0011":["LO","SubstanceAdministrationNotes"],
"0012":["LO","SubstanceAdministrationDeviceID"],"0013":["SQ","ProductParameterSequence"],"0019":["SQ","SubstanceAdministrationParameterSequence"]},"0046":{"0012":["LO","LensDescription"],"0014":["SQ","RightLensSequence"],"0015":["SQ","LeftLensSequence"],"0016":["SQ","UnspecifiedLateralityLensSequence"],"0018":["SQ","CylinderSequence"],"0028":["SQ","PrismSequence"],"0030":["FD","HorizontalPrismPower"],"0032":["CS","HorizontalPrismBase"],"0034":["FD","VerticalPrismPower"],"0036":["CS","VerticalPrismBase"],
"0038":["CS","LensSegmentType"],"0040":["FD","OpticalTransmittance"],"0042":["FD","ChannelWidth"],"0044":["FD","PupilSize"],"0046":["FD","CornealSize"],"0050":["SQ","AutorefractionRightEyeSequence"],"0052":["SQ","AutorefractionLeftEyeSequence"],"0060":["FD","DistancePupillaryDistance"],"0062":["FD","NearPupillaryDistance"],"0063":["FD","IntermediatePupillaryDistance"],"0064":["FD","OtherPupillaryDistance"],"0070":["SQ","KeratometryRightEyeSequence"],"0071":["SQ","KeratometryLeftEyeSequence"],"0074":["SQ",
"SteepKeratometricAxisSequence"],"0075":["FD","RadiusOfCurvature"],"0076":["FD","KeratometricPower"],"0077":["FD","KeratometricAxis"],"0080":["SQ","FlatKeratometricAxisSequence"],"0092":["CS","BackgroundColor"],"0094":["CS","Optotype"],"0095":["CS","OptotypePresentation"],"0097":["SQ","SubjectiveRefractionRightEyeSequence"],"0098":["SQ","SubjectiveRefractionLeftEyeSequence"],"0100":["SQ","AddNearSequence"],"0101":["SQ","AddIntermediateSequence"],"0102":["SQ","AddOtherSequence"],"0104":["FD","AddPower"],
"0106":["FD","ViewingDistance"],"0121":["SQ","VisualAcuityTypeCodeSequence"],"0122":["SQ","VisualAcuityRightEyeSequence"],"0123":["SQ","VisualAcuityLeftEyeSequence"],"0124":["SQ","VisualAcuityBothEyesOpenSequence"],"0125":["CS","ViewingDistanceType"],"0135":["SS","VisualAcuityModifiers"],"0137":["FD","DecimalVisualAcuity"],"0139":["LO","OptotypeDetailedDefinition"],"0145":["SQ","ReferencedRefractiveMeasurementsSequence"],"0146":["FD","SpherePower"],"0147":["FD","CylinderPower"]},"0048":{"0001":["FL",
"ImagedVolumeWidth"],"0002":["FL","ImagedVolumeHeight"],"0003":["FL","ImagedVolumeDepth"],"0006":["UL","TotalPixelMatrixColumns"],"0007":["UL","TotalPixelMatrixRows"],"0008":["SQ","TotalPixelMatrixOriginSequence"],"0010":["CS","SpecimenLabelInImage"],"0011":["CS","FocusMethod"],"0012":["CS","ExtendedDepthOfField"],"0013":["US","NumberOfFocalPlanes"],"0014":["FL","DistanceBetweenFocalPlanes"],"0015":["US","RecommendedAbsentPixelCIELabValue"],"0100":["SQ","IlluminatorTypeCodeSequence"],"0102":["DS",
"ImageOrientationSlide"],"0105":["SQ","OpticalPathSequence"],"0106":["SH","OpticalPathIdentifier"],"0107":["ST","OpticalPathDescription"],"0108":["SQ","IlluminationColorCodeSequence"],"0110":["SQ","SpecimenReferenceSequence"],"0111":["DS","CondenserLensPower"],"0112":["DS","ObjectiveLensPower"],"0113":["DS","ObjectiveLensNumericalAperture"],"0120":["SQ","PaletteColorLookupTableSequence"],"0200":["SQ","ReferencedImageNavigationSequence"],"0201":["US","TopLeftHandCornerOfLocalizerArea"],"0202":["US",
"BottomRightHandCornerOfLocalizerArea"],"0207":["SQ","OpticalPathIdentificationSequence"],"021A":["SQ","PlanePositionSlideSequence"],"021E":["SL","RowPositionInTotalImagePixelMatrix"],"021F":["SL","ColumnPositionInTotalImagePixelMatrix"],"0301":["CS","PixelOriginInterpretation"]},"0050":{"0004":["CS","CalibrationImage"],"0010":["SQ","DeviceSequence"],"0012":["SQ","ContainerComponentTypeCodeSequence"],"0013":["FD","ContainerComponentThickness"],"0014":["DS","DeviceLength"],"0015":["FD","ContainerComponentWidth"],
"0016":["DS","DeviceDiameter"],"0017":["CS","DeviceDiameterUnits"],"0018":["DS","DeviceVolume"],"0019":["DS","InterMarkerDistance"],"001A":["CS","ContainerComponentMaterial"],"001B":["LO","ContainerComponentID"],"001C":["FD","ContainerComponentLength"],"001D":["FD","ContainerComponentDiameter"],"001E":["LO","ContainerComponentDescription"],"0020":["LO","DeviceDescription"]},"0052":{"0001":["FL","ContrastBolusIngredientPercentByVolume"],"0002":["FD","OCTFocalDistance"],"0003":["FD","BeamSpotSize"],
"0004":["FD","EffectiveRefractiveIndex"],"0006":["CS","OCTAcquisitionDomain"],"0007":["FD","OCTOpticalCenterWavelength"],"0008":["FD","AxialResolution"],"0009":["FD","RangingDepth"],"0011":["FD","ALineRate"],"0012":["US","ALinesPerFrame"],"0013":["FD","CatheterRotationalRate"],"0014":["FD","ALinePixelSpacing"],"0016":["SQ","ModeOfPercutaneousAccessSequence"],"0025":["SQ","IntravascularOCTFrameTypeSequence"],"0026":["CS","OCTZOffsetApplied"],"0027":["SQ","IntravascularFrameContentSequence"],"0028":["FD",
"IntravascularLongitudinalDistance"],"0029":["SQ","IntravascularOCTFrameContentSequence"],"0030":["SS","OCTZOffsetCorrection"],"0031":["CS","CatheterDirectionOfRotation"],"0033":["FD","SeamLineLocation"],"0034":["FD","FirstALineLocation"],"0036":["US","SeamLineIndex"],"0038":["US","NumberOfPaddedAlines"],"0039":["CS","InterpolationType"],"003A":["CS","RefractiveIndexApplied"]},"0054":{"0010":["US","EnergyWindowVector"],"0011":["US","NumberOfEnergyWindows"],"0012":["SQ","EnergyWindowInformationSequence"],
"0013":["SQ","EnergyWindowRangeSequence"],"0014":["DS","EnergyWindowLowerLimit"],"0015":["DS","EnergyWindowUpperLimit"],"0016":["SQ","RadiopharmaceuticalInformationSequence"],"0017":["IS","ResidualSyringeCounts"],"0018":["SH","EnergyWindowName"],"0020":["US","DetectorVector"],"0021":["US","NumberOfDetectors"],"0022":["SQ","DetectorInformationSequence"],"0030":["US","PhaseVector"],"0031":["US","NumberOfPhases"],"0032":["SQ","PhaseInformationSequence"],"0033":["US","NumberOfFramesInPhase"],"0036":["IS",
"PhaseDelay"],"0038":["IS","PauseBetweenFrames"],"0039":["CS","PhaseDescription"],"0050":["US","RotationVector"],"0051":["US","NumberOfRotations"],"0052":["SQ","RotationInformationSequence"],"0053":["US","NumberOfFramesInRotation"],"0060":["US","RRIntervalVector"],"0061":["US","NumberOfRRIntervals"],"0062":["SQ","GatedInformationSequence"],"0063":["SQ","DataInformationSequence"],"0070":["US","TimeSlotVector"],"0071":["US","NumberOfTimeSlots"],"0072":["SQ","TimeSlotInformationSequence"],"0073":["DS",
"TimeSlotTime"],"0080":["US","SliceVector"],"0081":["US","NumberOfSlices"],"0090":["US","AngularViewVector"],"0100":["US","TimeSliceVector"],"0101":["US","NumberOfTimeSlices"],"0200":["DS","StartAngle"],"0202":["CS","TypeOfDetectorMotion"],"0210":["IS","TriggerVector"],"0211":["US","NumberOfTriggersInPhase"],"0220":["SQ","ViewCodeSequence"],"0222":["SQ","ViewModifierCodeSequence"],"0300":["SQ","RadionuclideCodeSequence"],"0302":["SQ","AdministrationRouteCodeSequence"],"0304":["SQ","RadiopharmaceuticalCodeSequence"],
"0306":["SQ","CalibrationDataSequence"],"0308":["US","EnergyWindowNumber"],"0400":["SH","ImageID"],"0410":["SQ","PatientOrientationCodeSequence"],"0412":["SQ","PatientOrientationModifierCodeSequence"],"0414":["SQ","PatientGantryRelationshipCodeSequence"],"0500":["CS","SliceProgressionDirection"],1E3:["CS","SeriesType"],1001:["CS","Units"],1002:["CS","CountsSource"],1004:["CS","ReprojectionMethod"],1006:["CS","SUVType"],1100:["CS","RandomsCorrectionMethod"],1101:["LO","AttenuationCorrectionMethod"],
1102:["CS","DecayCorrection"],1103:["LO","ReconstructionMethod"],1104:["LO","DetectorLinesOfResponseUsed"],1105:["LO","ScatterCorrectionMethod"],1200:["DS","AxialAcceptance"],1201:["IS","AxialMash"],1202:["IS","TransverseMash"],1203:["DS","DetectorElementSize"],1210:["DS","CoincidenceWindowWidth"],1220:["CS","SecondaryCountsType"],1300:["DS","FrameReferenceTime"],1310:["IS","PrimaryPromptsCountsAccumulated"],1311:["IS","SecondaryCountsAccumulated"],1320:["DS","SliceSensitivityFactor"],1321:["DS",
"DecayFactor"],1322:["DS","DoseCalibrationFactor"],1323:["DS","ScatterFractionFactor"],1324:["DS","DeadTimeFactor"],1330:["US","ImageIndex"],1400:["CS","CountsIncluded"],1401:["CS","DeadTimeCorrectionFlag"]},"0060":{3E3:["SQ","HistogramSequence"],3002:["US","HistogramNumberOfBins"],3004:["SS","HistogramFirstBinValue"],3006:["SS","HistogramLastBinValue"],3008:["US","HistogramBinWidth"],3010:["LO","HistogramExplanation"],3020:["UL","HistogramData"]},"0062":{"0001":["CS","SegmentationType"],"0002":["SQ",
"SegmentSequence"],"0003":["SQ","SegmentedPropertyCategoryCodeSequence"],"0004":["US","SegmentNumber"],"0005":["LO","SegmentLabel"],"0006":["ST","SegmentDescription"],"0008":["CS","SegmentAlgorithmType"],"0009":["LO","SegmentAlgorithmName"],"000A":["SQ","SegmentIdentificationSequence"],"000B":["US","ReferencedSegmentNumber"],"000C":["US","RecommendedDisplayGrayscaleValue"],"000D":["US","RecommendedDisplayCIELabValue"],"000E":["US","MaximumFractionalValue"],"000F":["SQ","SegmentedPropertyTypeCodeSequence"],
"0010":["CS","SegmentationFractionalType"]},"0064":{"0002":["SQ","DeformableRegistrationSequence"],"0003":["UI","SourceFrameOfReferenceUID"],"0005":["SQ","DeformableRegistrationGridSequence"],"0007":["UL","GridDimensions"],"0008":["FD","GridResolution"],"0009":["OF","VectorGridData"],"000F":["SQ","PreDeformationMatrixRegistrationSequence"],"0010":["SQ","PostDeformationMatrixRegistrationSequence"]},"0066":{"0001":["UL","NumberOfSurfaces"],"0002":["SQ","SurfaceSequence"],"0003":["UL","SurfaceNumber"],
"0004":["LT","SurfaceComments"],"0009":["CS","SurfaceProcessing"],"000A":["FL","SurfaceProcessingRatio"],"000B":["LO","SurfaceProcessingDescription"],"000C":["FL","RecommendedPresentationOpacity"],"000D":["CS","RecommendedPresentationType"],"000E":["CS","FiniteVolume"],"0010":["CS","Manifold"],"0011":["SQ","SurfacePointsSequence"],"0012":["SQ","SurfacePointsNormalsSequence"],"0013":["SQ","SurfaceMeshPrimitivesSequence"],"0015":["UL","NumberOfSurfacePoints"],"0016":["OF","PointCoordinatesData"],"0017":["FL",
"PointPositionAccuracy"],"0018":["FL","MeanPointDistance"],"0019":["FL","MaximumPointDistance"],"001A":["FL","PointsBoundingBoxCoordinates"],"001B":["FL","AxisOfRotation"],"001C":["FL","CenterOfRotation"],"001E":["UL","NumberOfVectors"],"001F":["US","VectorDimensionality"],"0020":["FL","VectorAccuracy"],"0021":["OF","VectorCoordinateData"],"0023":["OW","TrianglePointIndexList"],"0024":["OW","EdgePointIndexList"],"0025":["OW","VertexPointIndexList"],"0026":["SQ","TriangleStripSequence"],"0027":["SQ",
"TriangleFanSequence"],"0028":["SQ","LineSequence"],"0029":["OW","PrimitivePointIndexList"],"002A":["UL","SurfaceCount"],"002B":["SQ","ReferencedSurfaceSequence"],"002C":["UL","ReferencedSurfaceNumber"],"002D":["SQ","SegmentSurfaceGenerationAlgorithmIdentificationSequence"],"002E":["SQ","SegmentSurfaceSourceInstanceSequence"],"002F":["SQ","AlgorithmFamilyCodeSequence"],"0030":["SQ","AlgorithmNameCodeSequence"],"0031":["LO","AlgorithmVersion"],"0032":["LT","AlgorithmParameters"],"0034":["SQ","FacetSequence"],
"0035":["SQ","SurfaceProcessingAlgorithmIdentificationSequence"],"0036":["LO","AlgorithmName"]},"0068":{6210:["LO","ImplantSize"],6221:["LO","ImplantTemplateVersion"],6222:["SQ","ReplacedImplantTemplateSequence"],6223:["CS","ImplantType"],6224:["SQ","DerivationImplantTemplateSequence"],6225:["SQ","OriginalImplantTemplateSequence"],6226:["DT","EffectiveDateTime"],6230:["SQ","ImplantTargetAnatomySequence"],6260:["SQ","InformationFromManufacturerSequence"],6265:["SQ","NotificationFromManufacturerSequence"],
6270:["DT","InformationIssueDateTime"],6280:["ST","InformationSummary"],"62A0":["SQ","ImplantRegulatoryDisapprovalCodeSequence"],"62A5":["FD","OverallTemplateSpatialTolerance"],"62C0":["SQ","HPGLDocumentSequence"],"62D0":["US","HPGLDocumentID"],"62D5":["LO","HPGLDocumentLabel"],"62E0":["SQ","ViewOrientationCodeSequence"],"62F0":["FD","ViewOrientationModifier"],"62F2":["FD","HPGLDocumentScaling"],6300:["OB","HPGLDocument"],6310:["US","HPGLContourPenNumber"],6320:["SQ","HPGLPenSequence"],6330:["US",
"HPGLPenNumber"],6340:["LO","HPGLPenLabel"],6345:["ST","HPGLPenDescription"],6346:["FD","RecommendedRotationPoint"],6347:["FD","BoundingRectangle"],6350:["US","ImplantTemplate3DModelSurfaceNumber"],6360:["SQ","SurfaceModelDescriptionSequence"],6380:["LO","SurfaceModelLabel"],6390:["FD","SurfaceModelScalingFactor"],"63A0":["SQ","MaterialsCodeSequence"],"63A4":["SQ","CoatingMaterialsCodeSequence"],"63A8":["SQ","ImplantTypeCodeSequence"],"63AC":["SQ","FixationMethodCodeSequence"],"63B0":["SQ","MatingFeatureSetsSequence"],
"63C0":["US","MatingFeatureSetID"],"63D0":["LO","MatingFeatureSetLabel"],"63E0":["SQ","MatingFeatureSequence"],"63F0":["US","MatingFeatureID"],6400:["SQ","MatingFeatureDegreeOfFreedomSequence"],6410:["US","DegreeOfFreedomID"],6420:["CS","DegreeOfFreedomType"],6430:["SQ","TwoDMatingFeatureCoordinatesSequence"],6440:["US","ReferencedHPGLDocumentID"],6450:["FD","TwoDMatingPoint"],6460:["FD","TwoDMatingAxes"],6470:["SQ","TwoDDegreeOfFreedomSequence"],6490:["FD","ThreeDDegreeOfFreedomAxis"],"64A0":["FD",
"RangeOfFreedom"],"64C0":["FD","ThreeDMatingPoint"],"64D0":["FD","ThreeDMatingAxes"],"64F0":["FD","TwoDDegreeOfFreedomAxis"],6500:["SQ","PlanningLandmarkPointSequence"],6510:["SQ","PlanningLandmarkLineSequence"],6520:["SQ","PlanningLandmarkPlaneSequence"],6530:["US","PlanningLandmarkID"],6540:["LO","PlanningLandmarkDescription"],6545:["SQ","PlanningLandmarkIdentificationCodeSequence"],6550:["SQ","TwoDPointCoordinatesSequence"],6560:["FD","TwoDPointCoordinates"],6590:["FD","ThreeDPointCoordinates"],
"65A0":["SQ","TwoDLineCoordinatesSequence"],"65B0":["FD","TwoDLineCoordinates"],"65D0":["FD","ThreeDLineCoordinates"],"65E0":["SQ","TwoDPlaneCoordinatesSequence"],"65F0":["FD","TwoDPlaneIntersection"],6610:["FD","ThreeDPlaneOrigin"],6620:["FD","ThreeDPlaneNormal"]},"0070":{"0001":["SQ","GraphicAnnotationSequence"],"0002":["CS","GraphicLayer"],"0003":["CS","BoundingBoxAnnotationUnits"],"0004":["CS","AnchorPointAnnotationUnits"],"0005":["CS","GraphicAnnotationUnits"],"0006":["ST","UnformattedTextValue"],
"0008":["SQ","TextObjectSequence"],"0009":["SQ","GraphicObjectSequence"],"0010":["FL","BoundingBoxTopLeftHandCorner"],"0011":["FL","BoundingBoxBottomRightHandCorner"],"0012":["CS","BoundingBoxTextHorizontalJustification"],"0014":["FL","AnchorPoint"],"0015":["CS","AnchorPointVisibility"],"0020":["US","GraphicDimensions"],"0021":["US","NumberOfGraphicPoints"],"0022":["FL","GraphicData"],"0023":["CS","GraphicType"],"0024":["CS","GraphicFilled"],"0040":["IS","ImageRotationRetired"],"0041":["CS","ImageHorizontalFlip"],
"0042":["US","ImageRotation"],"0050":["US","DisplayedAreaTopLeftHandCornerTrial"],"0051":["US","DisplayedAreaBottomRightHandCornerTrial"],"0052":["SL","DisplayedAreaTopLeftHandCorner"],"0053":["SL","DisplayedAreaBottomRightHandCorner"],"005A":["SQ","DisplayedAreaSelectionSequence"],"0060":["SQ","GraphicLayerSequence"],"0062":["IS","GraphicLayerOrder"],"0066":["US","GraphicLayerRecommendedDisplayGrayscaleValue"],"0067":["US","GraphicLayerRecommendedDisplayRGBValue"],"0068":["LO","GraphicLayerDescription"],
"0080":["CS","ContentLabel"],"0081":["LO","ContentDescription"],"0082":["DA","PresentationCreationDate"],"0083":["TM","PresentationCreationTime"],"0084":["PN","ContentCreatorName"],"0086":["SQ","ContentCreatorIdentificationCodeSequence"],"0087":["SQ","AlternateContentDescriptionSequence"],"0100":["CS","PresentationSizeMode"],"0101":["DS","PresentationPixelSpacing"],"0102":["IS","PresentationPixelAspectRatio"],"0103":["FL","PresentationPixelMagnificationRatio"],"0207":["LO","GraphicGroupLabel"],"0208":["ST",
"GraphicGroupDescription"],"0209":["SQ","CompoundGraphicSequence"],"0226":["UL","CompoundGraphicInstanceID"],"0227":["LO","FontName"],"0228":["CS","FontNameType"],"0229":["LO","CSSFontName"],"0230":["FD","RotationAngle"],"0231":["SQ","TextStyleSequence"],"0232":["SQ","LineStyleSequence"],"0233":["SQ","FillStyleSequence"],"0234":["SQ","GraphicGroupSequence"],"0241":["US","TextColorCIELabValue"],"0242":["CS","HorizontalAlignment"],"0243":["CS","VerticalAlignment"],"0244":["CS","ShadowStyle"],"0245":["FL",
"ShadowOffsetX"],"0246":["FL","ShadowOffsetY"],"0247":["US","ShadowColorCIELabValue"],"0248":["CS","Underlined"],"0249":["CS","Bold"],"0250":["CS","Italic"],"0251":["US","PatternOnColorCIELabValue"],"0252":["US","PatternOffColorCIELabValue"],"0253":["FL","LineThickness"],"0254":["CS","LineDashingStyle"],"0255":["UL","LinePattern"],"0256":["OB","FillPattern"],"0257":["CS","FillMode"],"0258":["FL","ShadowOpacity"],"0261":["FL","GapLength"],"0262":["FL","DiameterOfVisibility"],"0273":["FL","RotationPoint"],
"0274":["CS","TickAlignment"],"0278":["CS","ShowTickLabel"],"0279":["CS","TickLabelAlignment"],"0282":["CS","CompoundGraphicUnits"],"0284":["FL","PatternOnOpacity"],"0285":["FL","PatternOffOpacity"],"0287":["SQ","MajorTicksSequence"],"0288":["FL","TickPosition"],"0289":["SH","TickLabel"],"0294":["CS","CompoundGraphicType"],"0295":["UL","GraphicGroupID"],"0306":["CS","ShapeType"],"0308":["SQ","RegistrationSequence"],"0309":["SQ","MatrixRegistrationSequence"],"030A":["SQ","MatrixSequence"],"030C":["CS",
"FrameOfReferenceTransformationMatrixType"],"030D":["SQ","RegistrationTypeCodeSequence"],"030F":["ST","FiducialDescription"],"0310":["SH","FiducialIdentifier"],"0311":["SQ","FiducialIdentifierCodeSequence"],"0312":["FD","ContourUncertaintyRadius"],"0314":["SQ","UsedFiducialsSequence"],"0318":["SQ","GraphicCoordinatesDataSequence"],"031A":["UI","FiducialUID"],"031C":["SQ","FiducialSetSequence"],"031E":["SQ","FiducialSequence"],"0401":["US","GraphicLayerRecommendedDisplayCIELabValue"],"0402":["SQ",
"BlendingSequence"],"0403":["FL","RelativeOpacity"],"0404":["SQ","ReferencedSpatialRegistrationSequence"],"0405":["CS","BlendingPosition"]},"0072":{"0002":["SH","HangingProtocolName"],"0004":["LO","HangingProtocolDescription"],"0006":["CS","HangingProtocolLevel"],"0008":["LO","HangingProtocolCreator"],"000A":["DT","HangingProtocolCreationDateTime"],"000C":["SQ","HangingProtocolDefinitionSequence"],"000E":["SQ","HangingProtocolUserIdentificationCodeSequence"],"0010":["LO","HangingProtocolUserGroupName"],
"0012":["SQ","SourceHangingProtocolSequence"],"0014":["US","NumberOfPriorsReferenced"],"0020":["SQ","ImageSetsSequence"],"0022":["SQ","ImageSetSelectorSequence"],"0024":["CS","ImageSetSelectorUsageFlag"],"0026":["AT","SelectorAttribute"],"0028":["US","SelectorValueNumber"],"0030":["SQ","TimeBasedImageSetsSequence"],"0032":["US","ImageSetNumber"],"0034":["CS","ImageSetSelectorCategory"],"0038":["US","RelativeTime"],"003A":["CS","RelativeTimeUnits"],"003C":["SS","AbstractPriorValue"],"003E":["SQ","AbstractPriorCodeSequence"],
"0040":["LO","ImageSetLabel"],"0050":["CS","SelectorAttributeVR"],"0052":["AT","SelectorSequencePointer"],"0054":["LO","SelectorSequencePointerPrivateCreator"],"0056":["LO","SelectorAttributePrivateCreator"],"0060":["AT","SelectorATValue"],"0062":["CS","SelectorCSValue"],"0064":["IS","SelectorISValue"],"0066":["LO","SelectorLOValue"],"0068":["LT","SelectorLTValue"],"006A":["PN","SelectorPNValue"],"006C":["SH","SelectorSHValue"],"006E":["ST","SelectorSTValue"],"0070":["UT","SelectorUTValue"],"0072":["DS",
"SelectorDSValue"],"0074":["FD","SelectorFDValue"],"0076":["FL","SelectorFLValue"],"0078":["UL","SelectorULValue"],"007A":["US","SelectorUSValue"],"007C":["SL","SelectorSLValue"],"007E":["SS","SelectorSSValue"],"0080":["SQ","SelectorCodeSequenceValue"],"0100":["US","NumberOfScreens"],"0102":["SQ","NominalScreenDefinitionSequence"],"0104":["US","NumberOfVerticalPixels"],"0106":["US","NumberOfHorizontalPixels"],"0108":["FD","DisplayEnvironmentSpatialPosition"],"010A":["US","ScreenMinimumGrayscaleBitDepth"],
"010C":["US","ScreenMinimumColorBitDepth"],"010E":["US","ApplicationMaximumRepaintTime"],"0200":["SQ","DisplaySetsSequence"],"0202":["US","DisplaySetNumber"],"0203":["LO","DisplaySetLabel"],"0204":["US","DisplaySetPresentationGroup"],"0206":["LO","DisplaySetPresentationGroupDescription"],"0208":["CS","PartialDataDisplayHandling"],"0210":["SQ","SynchronizedScrollingSequence"],"0212":["US","DisplaySetScrollingGroup"],"0214":["SQ","NavigationIndicatorSequence"],"0216":["US","NavigationDisplaySet"],"0218":["US",
"ReferenceDisplaySets"],"0300":["SQ","ImageBoxesSequence"],"0302":["US","ImageBoxNumber"],"0304":["CS","ImageBoxLayoutType"],"0306":["US","ImageBoxTileHorizontalDimension"],"0308":["US","ImageBoxTileVerticalDimension"],"0310":["CS","ImageBoxScrollDirection"],"0312":["CS","ImageBoxSmallScrollType"],"0314":["US","ImageBoxSmallScrollAmount"],"0316":["CS","ImageBoxLargeScrollType"],"0318":["US","ImageBoxLargeScrollAmount"],"0320":["US","ImageBoxOverlapPriority"],"0330":["FD","CineRelativeToRealTime"],
"0400":["SQ","FilterOperationsSequence"],"0402":["CS","FilterByCategory"],"0404":["CS","FilterByAttributePresence"],"0406":["CS","FilterByOperator"],"0420":["US","StructuredDisplayBackgroundCIELabValue"],"0421":["US","EmptyImageBoxCIELabValue"],"0422":["SQ","StructuredDisplayImageBoxSequence"],"0424":["SQ","StructuredDisplayTextBoxSequence"],"0427":["SQ","ReferencedFirstFrameSequence"],"0430":["SQ","ImageBoxSynchronizationSequence"],"0432":["US","SynchronizedImageBoxList"],"0434":["CS","TypeOfSynchronization"],
"0500":["CS","BlendingOperationType"],"0510":["CS","ReformattingOperationType"],"0512":["FD","ReformattingThickness"],"0514":["FD","ReformattingInterval"],"0516":["CS","ReformattingOperationInitialViewDirection"],"0520":["CS","ThreeDRenderingType"],"0600":["SQ","SortingOperationsSequence"],"0602":["CS","SortByCategory"],"0604":["CS","SortingDirection"],"0700":["CS","DisplaySetPatientOrientation"],"0702":["CS","VOIType"],"0704":["CS","PseudoColorType"],"0705":["SQ","PseudoColorPaletteInstanceReferenceSequence"],
"0706":["CS","ShowGrayscaleInverted"],"0710":["CS","ShowImageTrueSizeFlag"],"0712":["CS","ShowGraphicAnnotationFlag"],"0714":["CS","ShowPatientDemographicsFlag"],"0716":["CS","ShowAcquisitionTechniquesFlag"],"0717":["CS","DisplaySetHorizontalJustification"],"0718":["CS","DisplaySetVerticalJustification"]},"0074":{"0120":["FD","ContinuationStartMeterset"],"0121":["FD","ContinuationEndMeterset"],1E3:["CS","ProcedureStepState"],1002:["SQ","ProcedureStepProgressInformationSequence"],1004:["DS","ProcedureStepProgress"],
1006:["ST","ProcedureStepProgressDescription"],1008:["SQ","ProcedureStepCommunicationsURISequence"],"100A":["ST","ContactURI"],"100C":["LO","ContactDisplayName"],"100E":["SQ","ProcedureStepDiscontinuationReasonCodeSequence"],1020:["SQ","BeamTaskSequence"],1022:["CS","BeamTaskType"],1024:["IS","BeamOrderIndexTrial"],1026:["FD","TableTopVerticalAdjustedPosition"],1027:["FD","TableTopLongitudinalAdjustedPosition"],1028:["FD","TableTopLateralAdjustedPosition"],"102A":["FD","PatientSupportAdjustedAngle"],
"102B":["FD","TableTopEccentricAdjustedAngle"],"102C":["FD","TableTopPitchAdjustedAngle"],"102D":["FD","TableTopRollAdjustedAngle"],1030:["SQ","DeliveryVerificationImageSequence"],1032:["CS","VerificationImageTiming"],1034:["CS","DoubleExposureFlag"],1036:["CS","DoubleExposureOrdering"],1038:["DS","DoubleExposureMetersetTrial"],"103A":["DS","DoubleExposureFieldDeltaTrial"],1040:["SQ","RelatedReferenceRTImageSequence"],1042:["SQ","GeneralMachineVerificationSequence"],1044:["SQ","ConventionalMachineVerificationSequence"],
1046:["SQ","IonMachineVerificationSequence"],1048:["SQ","FailedAttributesSequence"],"104A":["SQ","OverriddenAttributesSequence"],"104C":["SQ","ConventionalControlPointVerificationSequence"],"104E":["SQ","IonControlPointVerificationSequence"],1050:["SQ","AttributeOccurrenceSequence"],1052:["AT","AttributeOccurrencePointer"],1054:["UL","AttributeItemSelector"],1056:["LO","AttributeOccurrencePrivateCreator"],1057:["IS","SelectorSequencePointerItems"],1200:["CS","ScheduledProcedureStepPriority"],1202:["LO",
"WorklistLabel"],1204:["LO","ProcedureStepLabel"],1210:["SQ","ScheduledProcessingParametersSequence"],1212:["SQ","PerformedProcessingParametersSequence"],1216:["SQ","UnifiedProcedureStepPerformedProcedureSequence"],1220:["SQ","RelatedProcedureStepSequence"],1222:["LO","ProcedureStepRelationshipType"],1224:["SQ","ReplacedProcedureStepSequence"],1230:["LO","DeletionLock"],1234:["AE","ReceivingAE"],1236:["AE","RequestingAE"],1238:["LT","ReasonForCancellation"],1242:["CS","SCPStatus"],1244:["CS","SubscriptionListStatus"],
1246:["CS","UnifiedProcedureStepListStatus"],1324:["UL","BeamOrderIndex"],1338:["FD","DoubleExposureMeterset"],"133A":["FD","DoubleExposureFieldDelta"]},"0076":{"0001":["LO","ImplantAssemblyTemplateName"],"0003":["LO","ImplantAssemblyTemplateIssuer"],"0006":["LO","ImplantAssemblyTemplateVersion"],"0008":["SQ","ReplacedImplantAssemblyTemplateSequence"],"000A":["CS","ImplantAssemblyTemplateType"],"000C":["SQ","OriginalImplantAssemblyTemplateSequence"],"000E":["SQ","DerivationImplantAssemblyTemplateSequence"],
"0010":["SQ","ImplantAssemblyTemplateTargetAnatomySequence"],"0020":["SQ","ProcedureTypeCodeSequence"],"0030":["LO","SurgicalTechnique"],"0032":["SQ","ComponentTypesSequence"],"0034":["CS","ComponentTypeCodeSequence"],"0036":["CS","ExclusiveComponentType"],"0038":["CS","MandatoryComponentType"],"0040":["SQ","ComponentSequence"],"0055":["US","ComponentID"],"0060":["SQ","ComponentAssemblySequence"],"0070":["US","Component1ReferencedID"],"0080":["US","Component1ReferencedMatingFeatureSetID"],"0090":["US",
"Component1ReferencedMatingFeatureID"],"00A0":["US","Component2ReferencedID"],"00B0":["US","Component2ReferencedMatingFeatureSetID"],"00C0":["US","Component2ReferencedMatingFeatureID"]},"0078":{"0001":["LO","ImplantTemplateGroupName"],"0010":["ST","ImplantTemplateGroupDescription"],"0020":["LO","ImplantTemplateGroupIssuer"],"0024":["LO","ImplantTemplateGroupVersion"],"0026":["SQ","ReplacedImplantTemplateGroupSequence"],"0028":["SQ","ImplantTemplateGroupTargetAnatomySequence"],"002A":["SQ","ImplantTemplateGroupMembersSequence"],
"002E":["US","ImplantTemplateGroupMemberID"],"0050":["FD","ThreeDImplantTemplateGroupMemberMatchingPoint"],"0060":["FD","ThreeDImplantTemplateGroupMemberMatchingAxes"],"0070":["SQ","ImplantTemplateGroupMemberMatching2DCoordinatesSequence"],"0090":["FD","TwoDImplantTemplateGroupMemberMatchingPoint"],"00A0":["FD","TwoDImplantTemplateGroupMemberMatchingAxes"],"00B0":["SQ","ImplantTemplateGroupVariationDimensionSequence"],"00B2":["LO","ImplantTemplateGroupVariationDimensionName"],"00B4":["SQ","ImplantTemplateGroupVariationDimensionRankSequence"],
"00B6":["US","ReferencedImplantTemplateGroupMemberID"],"00B8":["US","ImplantTemplateGroupVariationDimensionRank"]},"0088":{"0130":["SH","StorageMediaFileSetID"],"0140":["UI","StorageMediaFileSetUID"],"0200":["SQ","IconImageSequence"],"0904":["LO","TopicTitle"],"0906":["ST","TopicSubject"],"0910":["LO","TopicAuthor"],"0912":["LO","TopicKeywords"]},"0100":{"0410":["CS","SOPInstanceStatus"],"0420":["DT","SOPAuthorizationDateTime"],"0424":["LT","SOPAuthorizationComment"],"0426":["LO","AuthorizationEquipmentCertificationNumber"]},
"0400":{"0005":["US","MACIDNumber"],"0010":["UI","MACCalculationTransferSyntaxUID"],"0015":["CS","MACAlgorithm"],"0020":["AT","DataElementsSigned"],"0100":["UI","DigitalSignatureUID"],"0105":["DT","DigitalSignatureDateTime"],"0110":["CS","CertificateType"],"0115":["OB","CertificateOfSigner"],"0120":["OB","Signature"],"0305":["CS","CertifiedTimestampType"],"0310":["OB","CertifiedTimestamp"],"0401":["SQ","DigitalSignaturePurposeCodeSequence"],"0402":["SQ","ReferencedDigitalSignatureSequence"],"0403":["SQ",
"ReferencedSOPInstanceMACSequence"],"0404":["OB","MAC"],"0500":["SQ","EncryptedAttributesSequence"],"0510":["UI","EncryptedContentTransferSyntaxUID"],"0520":["OB","EncryptedContent"],"0550":["SQ","ModifiedAttributesSequence"],"0561":["SQ","OriginalAttributesSequence"],"0562":["DT","AttributeModificationDateTime"],"0563":["LO","ModifyingSystem"],"0564":["LO","SourceOfPreviousValues"],"0565":["CS","ReasonForTheAttributeModification"]},2E3:{"0010":["IS","NumberOfCopies"],"001E":["SQ","PrinterConfigurationSequence"],
"0020":["CS","PrintPriority"],"0030":["CS","MediumType"],"0040":["CS","FilmDestination"],"0050":["LO","FilmSessionLabel"],"0060":["IS","MemoryAllocation"],"0061":["IS","MaximumMemoryAllocation"],"0062":["CS","ColorImagePrintingFlag"],"0063":["CS","CollationFlag"],"0065":["CS","AnnotationFlag"],"0067":["CS","ImageOverlayFlag"],"0069":["CS","PresentationLUTFlag"],"006A":["CS","ImageBoxPresentationLUTFlag"],"00A0":["US","MemoryBitDepth"],"00A1":["US","PrintingBitDepth"],"00A2":["SQ","MediaInstalledSequence"],
"00A4":["SQ","OtherMediaAvailableSequence"],"00A8":["SQ","SupportedImageDisplayFormatsSequence"],"0500":["SQ","ReferencedFilmBoxSequence"],"0510":["SQ","ReferencedStoredPrintSequence"]},2010:{"0010":["ST","ImageDisplayFormat"],"0030":["CS","AnnotationDisplayFormatID"],"0040":["CS","FilmOrientation"],"0050":["CS","FilmSizeID"],"0052":["CS","PrinterResolutionID"],"0054":["CS","DefaultPrinterResolutionID"],"0060":["CS","MagnificationType"],"0080":["CS","SmoothingType"],"00A6":["CS","DefaultMagnificationType"],
"00A7":["CS","OtherMagnificationTypesAvailable"],"00A8":["CS","DefaultSmoothingType"],"00A9":["CS","OtherSmoothingTypesAvailable"],"0100":["CS","BorderDensity"],"0110":["CS","EmptyImageDensity"],"0120":["US","MinDensity"],"0130":["US","MaxDensity"],"0140":["CS","Trim"],"0150":["ST","ConfigurationInformation"],"0152":["LT","ConfigurationInformationDescription"],"0154":["IS","MaximumCollatedFilms"],"015E":["US","Illumination"],"0160":["US","ReflectedAmbientLight"],"0376":["DS","PrinterPixelSpacing"],
"0500":["SQ","ReferencedFilmSessionSequence"],"0510":["SQ","ReferencedImageBoxSequence"],"0520":["SQ","ReferencedBasicAnnotationBoxSequence"]},2020:{"0010":["US","ImageBoxPosition"],"0020":["CS","Polarity"],"0030":["DS","RequestedImageSize"],"0040":["CS","RequestedDecimateCropBehavior"],"0050":["CS","RequestedResolutionID"],"00A0":["CS","RequestedImageSizeFlag"],"00A2":["CS","DecimateCropResult"],"0110":["SQ","BasicGrayscaleImageSequence"],"0111":["SQ","BasicColorImageSequence"],"0130":["SQ","ReferencedImageOverlayBoxSequence"],
"0140":["SQ","ReferencedVOILUTBoxSequence"]},2030:{"0010":["US","AnnotationPosition"],"0020":["LO","TextString"]},2040:{"0010":["SQ","ReferencedOverlayPlaneSequence"],"0011":["US","ReferencedOverlayPlaneGroups"],"0020":["SQ","OverlayPixelDataSequence"],"0060":["CS","OverlayMagnificationType"],"0070":["CS","OverlaySmoothingType"],"0072":["CS","OverlayOrImageMagnification"],"0074":["US","MagnifyToNumberOfColumns"],"0080":["CS","OverlayForegroundDensity"],"0082":["CS","OverlayBackgroundDensity"],"0090":["CS",
"OverlayMode"],"0100":["CS","ThresholdDensity"],"0500":["SQ","ReferencedImageBoxSequenceRetired"]},2050:{"0010":["SQ","PresentationLUTSequence"],"0020":["CS","PresentationLUTShape"],"0500":["SQ","ReferencedPresentationLUTSequence"]},2100:{"0010":["SH","PrintJobID"],"0020":["CS","ExecutionStatus"],"0030":["CS","ExecutionStatusInfo"],"0040":["DA","CreationDate"],"0050":["TM","CreationTime"],"0070":["AE","Originator"],"0140":["AE","DestinationAE"],"0160":["SH","OwnerID"],"0170":["IS","NumberOfFilms"],
"0500":["SQ","ReferencedPrintJobSequencePullStoredPrint"]},2110:{"0010":["CS","PrinterStatus"],"0020":["CS","PrinterStatusInfo"],"0030":["LO","PrinterName"],"0099":["SH","PrintQueueID"]},2120:{"0010":["CS","QueueStatus"],"0050":["SQ","PrintJobDescriptionSequence"],"0070":["SQ","ReferencedPrintJobSequence"]},2130:{"0010":["SQ","PrintManagementCapabilitiesSequence"],"0015":["SQ","PrinterCharacteristicsSequence"],"0030":["SQ","FilmBoxContentSequence"],"0040":["SQ","ImageBoxContentSequence"],"0050":["SQ",
"AnnotationContentSequence"],"0060":["SQ","ImageOverlayBoxContentSequence"],"0080":["SQ","PresentationLUTContentSequence"],"00A0":["SQ","ProposedStudySequence"],"00C0":["SQ","OriginalImageSequence"]},2200:{"0001":["CS","LabelUsingInformationExtractedFromInstances"],"0002":["UT","LabelText"],"0003":["CS","LabelStyleSelection"],"0004":["LT","MediaDisposition"],"0005":["LT","BarcodeValue"],"0006":["CS","BarcodeSymbology"],"0007":["CS","AllowMediaSplitting"],"0008":["CS","IncludeNonDICOMObjects"],"0009":["CS",
"IncludeDisplayApplication"],"000A":["CS","PreserveCompositeInstancesAfterMediaCreation"],"000B":["US","TotalNumberOfPiecesOfMediaCreated"],"000C":["LO","RequestedMediaApplicationProfile"],"000D":["SQ","ReferencedStorageMediaSequence"],"000E":["AT","FailureAttributes"],"000F":["CS","AllowLossyCompression"],"0020":["CS","RequestPriority"]},3002:{"0002":["SH","RTImageLabel"],"0003":["LO","RTImageName"],"0004":["ST","RTImageDescription"],"000A":["CS","ReportedValuesOrigin"],"000C":["CS","RTImagePlane"],
"000D":["DS","XRayImageReceptorTranslation"],"000E":["DS","XRayImageReceptorAngle"],"0010":["DS","RTImageOrientation"],"0011":["DS","ImagePlanePixelSpacing"],"0012":["DS","RTImagePosition"],"0020":["SH","RadiationMachineName"],"0022":["DS","RadiationMachineSAD"],"0024":["DS","RadiationMachineSSD"],"0026":["DS","RTImageSID"],"0028":["DS","SourceToReferenceObjectDistance"],"0029":["IS","FractionNumber"],"0030":["SQ","ExposureSequence"],"0032":["DS","MetersetExposure"],"0034":["DS","DiaphragmPosition"],
"0040":["SQ","FluenceMapSequence"],"0041":["CS","FluenceDataSource"],"0042":["DS","FluenceDataScale"],"0050":["SQ","PrimaryFluenceModeSequence"],"0051":["CS","FluenceMode"],"0052":["SH","FluenceModeID"]},3004:{"0001":["CS","DVHType"],"0002":["CS","DoseUnits"],"0004":["CS","DoseType"],"0006":["LO","DoseComment"],"0008":["DS","NormalizationPoint"],"000A":["CS","DoseSummationType"],"000C":["DS","GridFrameOffsetVector"],"000E":["DS","DoseGridScaling"],"0010":["SQ","RTDoseROISequence"],"0012":["DS","DoseValue"],
"0014":["CS","TissueHeterogeneityCorrection"],"0040":["DS","DVHNormalizationPoint"],"0042":["DS","DVHNormalizationDoseValue"],"0050":["SQ","DVHSequence"],"0052":["DS","DVHDoseScaling"],"0054":["CS","DVHVolumeUnits"],"0056":["IS","DVHNumberOfBins"],"0058":["DS","DVHData"],"0060":["SQ","DVHReferencedROISequence"],"0062":["CS","DVHROIContributionType"],"0070":["DS","DVHMinimumDose"],"0072":["DS","DVHMaximumDose"],"0074":["DS","DVHMeanDose"]},3006:{"0002":["SH","StructureSetLabel"],"0004":["LO","StructureSetName"],
"0006":["ST","StructureSetDescription"],"0008":["DA","StructureSetDate"],"0009":["TM","StructureSetTime"],"0010":["SQ","ReferencedFrameOfReferenceSequence"],"0012":["SQ","RTReferencedStudySequence"],"0014":["SQ","RTReferencedSeriesSequence"],"0016":["SQ","ContourImageSequence"],"0020":["SQ","StructureSetROISequence"],"0022":["IS","ROINumber"],"0024":["UI","ReferencedFrameOfReferenceUID"],"0026":["LO","ROIName"],"0028":["ST","ROIDescription"],"002A":["IS","ROIDisplayColor"],"002C":["DS","ROIVolume"],
"0030":["SQ","RTRelatedROISequence"],"0033":["CS","RTROIRelationship"],"0036":["CS","ROIGenerationAlgorithm"],"0038":["LO","ROIGenerationDescription"],"0039":["SQ","ROIContourSequence"],"0040":["SQ","ContourSequence"],"0042":["CS","ContourGeometricType"],"0044":["DS","ContourSlabThickness"],"0045":["DS","ContourOffsetVector"],"0046":["IS","NumberOfContourPoints"],"0048":["IS","ContourNumber"],"0049":["IS","AttachedContours"],"0050":["DS","ContourData"],"0080":["SQ","RTROIObservationsSequence"],"0082":["IS",
"ObservationNumber"],"0084":["IS","ReferencedROINumber"],"0085":["SH","ROIObservationLabel"],"0086":["SQ","RTROIIdentificationCodeSequence"],"0088":["ST","ROIObservationDescription"],"00A0":["SQ","RelatedRTROIObservationsSequence"],"00A4":["CS","RTROIInterpretedType"],"00A6":["PN","ROIInterpreter"],"00B0":["SQ","ROIPhysicalPropertiesSequence"],"00B2":["CS","ROIPhysicalProperty"],"00B4":["DS","ROIPhysicalPropertyValue"],"00B6":["SQ","ROIElementalCompositionSequence"],"00B7":["US","ROIElementalCompositionAtomicNumber"],
"00B8":["FL","ROIElementalCompositionAtomicMassFraction"],"00C0":["SQ","FrameOfReferenceRelationshipSequence"],"00C2":["UI","RelatedFrameOfReferenceUID"],"00C4":["CS","FrameOfReferenceTransformationType"],"00C6":["DS","FrameOfReferenceTransformationMatrix"],"00C8":["LO","FrameOfReferenceTransformationComment"]},3008:{"0010":["SQ","MeasuredDoseReferenceSequence"],"0012":["ST","MeasuredDoseDescription"],"0014":["CS","MeasuredDoseType"],"0016":["DS","MeasuredDoseValue"],"0020":["SQ","TreatmentSessionBeamSequence"],
"0021":["SQ","TreatmentSessionIonBeamSequence"],"0022":["IS","CurrentFractionNumber"],"0024":["DA","TreatmentControlPointDate"],"0025":["TM","TreatmentControlPointTime"],"002A":["CS","TreatmentTerminationStatus"],"002B":["SH","TreatmentTerminationCode"],"002C":["CS","TreatmentVerificationStatus"],"0030":["SQ","ReferencedTreatmentRecordSequence"],"0032":["DS","SpecifiedPrimaryMeterset"],"0033":["DS","SpecifiedSecondaryMeterset"],"0036":["DS","DeliveredPrimaryMeterset"],"0037":["DS","DeliveredSecondaryMeterset"],
"003A":["DS","SpecifiedTreatmentTime"],"003B":["DS","DeliveredTreatmentTime"],"0040":["SQ","ControlPointDeliverySequence"],"0041":["SQ","IonControlPointDeliverySequence"],"0042":["DS","SpecifiedMeterset"],"0044":["DS","DeliveredMeterset"],"0045":["FL","MetersetRateSet"],"0046":["FL","MetersetRateDelivered"],"0047":["FL","ScanSpotMetersetsDelivered"],"0048":["DS","DoseRateDelivered"],"0050":["SQ","TreatmentSummaryCalculatedDoseReferenceSequence"],"0052":["DS","CumulativeDoseToDoseReference"],"0054":["DA",
"FirstTreatmentDate"],"0056":["DA","MostRecentTreatmentDate"],"005A":["IS","NumberOfFractionsDelivered"],"0060":["SQ","OverrideSequence"],"0061":["AT","ParameterSequencePointer"],"0062":["AT","OverrideParameterPointer"],"0063":["IS","ParameterItemIndex"],"0064":["IS","MeasuredDoseReferenceNumber"],"0065":["AT","ParameterPointer"],"0066":["ST","OverrideReason"],"0068":["SQ","CorrectedParameterSequence"],"006A":["FL","CorrectionValue"],"0070":["SQ","CalculatedDoseReferenceSequence"],"0072":["IS","CalculatedDoseReferenceNumber"],
"0074":["ST","CalculatedDoseReferenceDescription"],"0076":["DS","CalculatedDoseReferenceDoseValue"],"0078":["DS","StartMeterset"],"007A":["DS","EndMeterset"],"0080":["SQ","ReferencedMeasuredDoseReferenceSequence"],"0082":["IS","ReferencedMeasuredDoseReferenceNumber"],"0090":["SQ","ReferencedCalculatedDoseReferenceSequence"],"0092":["IS","ReferencedCalculatedDoseReferenceNumber"],"00A0":["SQ","BeamLimitingDeviceLeafPairsSequence"],"00B0":["SQ","RecordedWedgeSequence"],"00C0":["SQ","RecordedCompensatorSequence"],
"00D0":["SQ","RecordedBlockSequence"],"00E0":["SQ","TreatmentSummaryMeasuredDoseReferenceSequence"],"00F0":["SQ","RecordedSnoutSequence"],"00F2":["SQ","RecordedRangeShifterSequence"],"00F4":["SQ","RecordedLateralSpreadingDeviceSequence"],"00F6":["SQ","RecordedRangeModulatorSequence"],"0100":["SQ","RecordedSourceSequence"],"0105":["LO","SourceSerialNumber"],"0110":["SQ","TreatmentSessionApplicationSetupSequence"],"0116":["CS","ApplicationSetupCheck"],"0120":["SQ","RecordedBrachyAccessoryDeviceSequence"],
"0122":["IS","ReferencedBrachyAccessoryDeviceNumber"],"0130":["SQ","RecordedChannelSequence"],"0132":["DS","SpecifiedChannelTotalTime"],"0134":["DS","DeliveredChannelTotalTime"],"0136":["IS","SpecifiedNumberOfPulses"],"0138":["IS","DeliveredNumberOfPulses"],"013A":["DS","SpecifiedPulseRepetitionInterval"],"013C":["DS","DeliveredPulseRepetitionInterval"],"0140":["SQ","RecordedSourceApplicatorSequence"],"0142":["IS","ReferencedSourceApplicatorNumber"],"0150":["SQ","RecordedChannelShieldSequence"],"0152":["IS",
"ReferencedChannelShieldNumber"],"0160":["SQ","BrachyControlPointDeliveredSequence"],"0162":["DA","SafePositionExitDate"],"0164":["TM","SafePositionExitTime"],"0166":["DA","SafePositionReturnDate"],"0168":["TM","SafePositionReturnTime"],"0200":["CS","CurrentTreatmentStatus"],"0202":["ST","TreatmentStatusComment"],"0220":["SQ","FractionGroupSummarySequence"],"0223":["IS","ReferencedFractionNumber"],"0224":["CS","FractionGroupType"],"0230":["CS","BeamStopperPosition"],"0240":["SQ","FractionStatusSummarySequence"],
"0250":["DA","TreatmentDate"],"0251":["TM","TreatmentTime"]},"300A":{"0002":["SH","RTPlanLabel"],"0003":["LO","RTPlanName"],"0004":["ST","RTPlanDescription"],"0006":["DA","RTPlanDate"],"0007":["TM","RTPlanTime"],"0009":["LO","TreatmentProtocols"],"000A":["CS","PlanIntent"],"000B":["LO","TreatmentSites"],"000C":["CS","RTPlanGeometry"],"000E":["ST","PrescriptionDescription"],"0010":["SQ","DoseReferenceSequence"],"0012":["IS","DoseReferenceNumber"],"0013":["UI","DoseReferenceUID"],"0014":["CS","DoseReferenceStructureType"],
"0015":["CS","NominalBeamEnergyUnit"],"0016":["LO","DoseReferenceDescription"],"0018":["DS","DoseReferencePointCoordinates"],"001A":["DS","NominalPriorDose"],"0020":["CS","DoseReferenceType"],"0021":["DS","ConstraintWeight"],"0022":["DS","DeliveryWarningDose"],"0023":["DS","DeliveryMaximumDose"],"0025":["DS","TargetMinimumDose"],"0026":["DS","TargetPrescriptionDose"],"0027":["DS","TargetMaximumDose"],"0028":["DS","TargetUnderdoseVolumeFraction"],"002A":["DS","OrganAtRiskFullVolumeDose"],"002B":["DS",
"OrganAtRiskLimitDose"],"002C":["DS","OrganAtRiskMaximumDose"],"002D":["DS","OrganAtRiskOverdoseVolumeFraction"],"0040":["SQ","ToleranceTableSequence"],"0042":["IS","ToleranceTableNumber"],"0043":["SH","ToleranceTableLabel"],"0044":["DS","GantryAngleTolerance"],"0046":["DS","BeamLimitingDeviceAngleTolerance"],"0048":["SQ","BeamLimitingDeviceToleranceSequence"],"004A":["DS","BeamLimitingDevicePositionTolerance"],"004B":["FL","SnoutPositionTolerance"],"004C":["DS","PatientSupportAngleTolerance"],"004E":["DS",
"TableTopEccentricAngleTolerance"],"004F":["FL","TableTopPitchAngleTolerance"],"0050":["FL","TableTopRollAngleTolerance"],"0051":["DS","TableTopVerticalPositionTolerance"],"0052":["DS","TableTopLongitudinalPositionTolerance"],"0053":["DS","TableTopLateralPositionTolerance"],"0055":["CS","RTPlanRelationship"],"0070":["SQ","FractionGroupSequence"],"0071":["IS","FractionGroupNumber"],"0072":["LO","FractionGroupDescription"],"0078":["IS","NumberOfFractionsPlanned"],"0079":["IS","NumberOfFractionPatternDigitsPerDay"],
"007A":["IS","RepeatFractionCycleLength"],"007B":["LT","FractionPattern"],"0080":["IS","NumberOfBeams"],"0082":["DS","BeamDoseSpecificationPoint"],"0084":["DS","BeamDose"],"0086":["DS","BeamMeterset"],"0088":["FL","BeamDosePointDepth"],"0089":["FL","BeamDosePointEquivalentDepth"],"008A":["FL","BeamDosePointSSD"],"00A0":["IS","NumberOfBrachyApplicationSetups"],"00A2":["DS","BrachyApplicationSetupDoseSpecificationPoint"],"00A4":["DS","BrachyApplicationSetupDose"],"00B0":["SQ","BeamSequence"],"00B2":["SH",
"TreatmentMachineName"],"00B3":["CS","PrimaryDosimeterUnit"],"00B4":["DS","SourceAxisDistance"],"00B6":["SQ","BeamLimitingDeviceSequence"],"00B8":["CS","RTBeamLimitingDeviceType"],"00BA":["DS","SourceToBeamLimitingDeviceDistance"],"00BB":["FL","IsocenterToBeamLimitingDeviceDistance"],"00BC":["IS","NumberOfLeafJawPairs"],"00BE":["DS","LeafPositionBoundaries"],"00C0":["IS","BeamNumber"],"00C2":["LO","BeamName"],"00C3":["ST","BeamDescription"],"00C4":["CS","BeamType"],"00C6":["CS","RadiationType"],"00C7":["CS",
"HighDoseTechniqueType"],"00C8":["IS","ReferenceImageNumber"],"00CA":["SQ","PlannedVerificationImageSequence"],"00CC":["LO","ImagingDeviceSpecificAcquisitionParameters"],"00CE":["CS","TreatmentDeliveryType"],"00D0":["IS","NumberOfWedges"],"00D1":["SQ","WedgeSequence"],"00D2":["IS","WedgeNumber"],"00D3":["CS","WedgeType"],"00D4":["SH","WedgeID"],"00D5":["IS","WedgeAngle"],"00D6":["DS","WedgeFactor"],"00D7":["FL","TotalWedgeTrayWaterEquivalentThickness"],"00D8":["DS","WedgeOrientation"],"00D9":["FL",
"IsocenterToWedgeTrayDistance"],"00DA":["DS","SourceToWedgeTrayDistance"],"00DB":["FL","WedgeThinEdgePosition"],"00DC":["SH","BolusID"],"00DD":["ST","BolusDescription"],"00E0":["IS","NumberOfCompensators"],"00E1":["SH","MaterialID"],"00E2":["DS","TotalCompensatorTrayFactor"],"00E3":["SQ","CompensatorSequence"],"00E4":["IS","CompensatorNumber"],"00E5":["SH","CompensatorID"],"00E6":["DS","SourceToCompensatorTrayDistance"],"00E7":["IS","CompensatorRows"],"00E8":["IS","CompensatorColumns"],"00E9":["DS",
"CompensatorPixelSpacing"],"00EA":["DS","CompensatorPosition"],"00EB":["DS","CompensatorTransmissionData"],"00EC":["DS","CompensatorThicknessData"],"00ED":["IS","NumberOfBoli"],"00EE":["CS","CompensatorType"],"00F0":["IS","NumberOfBlocks"],"00F2":["DS","TotalBlockTrayFactor"],"00F3":["FL","TotalBlockTrayWaterEquivalentThickness"],"00F4":["SQ","BlockSequence"],"00F5":["SH","BlockTrayID"],"00F6":["DS","SourceToBlockTrayDistance"],"00F7":["FL","IsocenterToBlockTrayDistance"],"00F8":["CS","BlockType"],
"00F9":["LO","AccessoryCode"],"00FA":["CS","BlockDivergence"],"00FB":["CS","BlockMountingPosition"],"00FC":["IS","BlockNumber"],"00FE":["LO","BlockName"],"0100":["DS","BlockThickness"],"0102":["DS","BlockTransmission"],"0104":["IS","BlockNumberOfPoints"],"0106":["DS","BlockData"],"0107":["SQ","ApplicatorSequence"],"0108":["SH","ApplicatorID"],"0109":["CS","ApplicatorType"],"010A":["LO","ApplicatorDescription"],"010C":["DS","CumulativeDoseReferenceCoefficient"],"010E":["DS","FinalCumulativeMetersetWeight"],
"0110":["IS","NumberOfControlPoints"],"0111":["SQ","ControlPointSequence"],"0112":["IS","ControlPointIndex"],"0114":["DS","NominalBeamEnergy"],"0115":["DS","DoseRateSet"],"0116":["SQ","WedgePositionSequence"],"0118":["CS","WedgePosition"],"011A":["SQ","BeamLimitingDevicePositionSequence"],"011C":["DS","LeafJawPositions"],"011E":["DS","GantryAngle"],"011F":["CS","GantryRotationDirection"],"0120":["DS","BeamLimitingDeviceAngle"],"0121":["CS","BeamLimitingDeviceRotationDirection"],"0122":["DS","PatientSupportAngle"],
"0123":["CS","PatientSupportRotationDirection"],"0124":["DS","TableTopEccentricAxisDistance"],"0125":["DS","TableTopEccentricAngle"],"0126":["CS","TableTopEccentricRotationDirection"],"0128":["DS","TableTopVerticalPosition"],"0129":["DS","TableTopLongitudinalPosition"],"012A":["DS","TableTopLateralPosition"],"012C":["DS","IsocenterPosition"],"012E":["DS","SurfaceEntryPoint"],"0130":["DS","SourceToSurfaceDistance"],"0134":["DS","CumulativeMetersetWeight"],"0140":["FL","TableTopPitchAngle"],"0142":["CS",
"TableTopPitchRotationDirection"],"0144":["FL","TableTopRollAngle"],"0146":["CS","TableTopRollRotationDirection"],"0148":["FL","HeadFixationAngle"],"014A":["FL","GantryPitchAngle"],"014C":["CS","GantryPitchRotationDirection"],"014E":["FL","GantryPitchAngleTolerance"],"0180":["SQ","PatientSetupSequence"],"0182":["IS","PatientSetupNumber"],"0183":["LO","PatientSetupLabel"],"0184":["LO","PatientAdditionalPosition"],"0190":["SQ","FixationDeviceSequence"],"0192":["CS","FixationDeviceType"],"0194":["SH",
"FixationDeviceLabel"],"0196":["ST","FixationDeviceDescription"],"0198":["SH","FixationDevicePosition"],"0199":["FL","FixationDevicePitchAngle"],"019A":["FL","FixationDeviceRollAngle"],"01A0":["SQ","ShieldingDeviceSequence"],"01A2":["CS","ShieldingDeviceType"],"01A4":["SH","ShieldingDeviceLabel"],"01A6":["ST","ShieldingDeviceDescription"],"01A8":["SH","ShieldingDevicePosition"],"01B0":["CS","SetupTechnique"],"01B2":["ST","SetupTechniqueDescription"],"01B4":["SQ","SetupDeviceSequence"],"01B6":["CS",
"SetupDeviceType"],"01B8":["SH","SetupDeviceLabel"],"01BA":["ST","SetupDeviceDescription"],"01BC":["DS","SetupDeviceParameter"],"01D0":["ST","SetupReferenceDescription"],"01D2":["DS","TableTopVerticalSetupDisplacement"],"01D4":["DS","TableTopLongitudinalSetupDisplacement"],"01D6":["DS","TableTopLateralSetupDisplacement"],"0200":["CS","BrachyTreatmentTechnique"],"0202":["CS","BrachyTreatmentType"],"0206":["SQ","TreatmentMachineSequence"],"0210":["SQ","SourceSequence"],"0212":["IS","SourceNumber"],
"0214":["CS","SourceType"],"0216":["LO","SourceManufacturer"],"0218":["DS","ActiveSourceDiameter"],"021A":["DS","ActiveSourceLength"],"0222":["DS","SourceEncapsulationNominalThickness"],"0224":["DS","SourceEncapsulationNominalTransmission"],"0226":["LO","SourceIsotopeName"],"0228":["DS","SourceIsotopeHalfLife"],"0229":["CS","SourceStrengthUnits"],"022A":["DS","ReferenceAirKermaRate"],"022B":["DS","SourceStrength"],"022C":["DA","SourceStrengthReferenceDate"],"022E":["TM","SourceStrengthReferenceTime"],
"0230":["SQ","ApplicationSetupSequence"],"0232":["CS","ApplicationSetupType"],"0234":["IS","ApplicationSetupNumber"],"0236":["LO","ApplicationSetupName"],"0238":["LO","ApplicationSetupManufacturer"],"0240":["IS","TemplateNumber"],"0242":["SH","TemplateType"],"0244":["LO","TemplateName"],"0250":["DS","TotalReferenceAirKerma"],"0260":["SQ","BrachyAccessoryDeviceSequence"],"0262":["IS","BrachyAccessoryDeviceNumber"],"0263":["SH","BrachyAccessoryDeviceID"],"0264":["CS","BrachyAccessoryDeviceType"],"0266":["LO",
"BrachyAccessoryDeviceName"],"026A":["DS","BrachyAccessoryDeviceNominalThickness"],"026C":["DS","BrachyAccessoryDeviceNominalTransmission"],"0280":["SQ","ChannelSequence"],"0282":["IS","ChannelNumber"],"0284":["DS","ChannelLength"],"0286":["DS","ChannelTotalTime"],"0288":["CS","SourceMovementType"],"028A":["IS","NumberOfPulses"],"028C":["DS","PulseRepetitionInterval"],"0290":["IS","SourceApplicatorNumber"],"0291":["SH","SourceApplicatorID"],"0292":["CS","SourceApplicatorType"],"0294":["LO","SourceApplicatorName"],
"0296":["DS","SourceApplicatorLength"],"0298":["LO","SourceApplicatorManufacturer"],"029C":["DS","SourceApplicatorWallNominalThickness"],"029E":["DS","SourceApplicatorWallNominalTransmission"],"02A0":["DS","SourceApplicatorStepSize"],"02A2":["IS","TransferTubeNumber"],"02A4":["DS","TransferTubeLength"],"02B0":["SQ","ChannelShieldSequence"],"02B2":["IS","ChannelShieldNumber"],"02B3":["SH","ChannelShieldID"],"02B4":["LO","ChannelShieldName"],"02B8":["DS","ChannelShieldNominalThickness"],"02BA":["DS",
"ChannelShieldNominalTransmission"],"02C8":["DS","FinalCumulativeTimeWeight"],"02D0":["SQ","BrachyControlPointSequence"],"02D2":["DS","ControlPointRelativePosition"],"02D4":["DS","ControlPoint3DPosition"],"02D6":["DS","CumulativeTimeWeight"],"02E0":["CS","CompensatorDivergence"],"02E1":["CS","CompensatorMountingPosition"],"02E2":["DS","SourceToCompensatorDistance"],"02E3":["FL","TotalCompensatorTrayWaterEquivalentThickness"],"02E4":["FL","IsocenterToCompensatorTrayDistance"],"02E5":["FL","CompensatorColumnOffset"],
"02E6":["FL","IsocenterToCompensatorDistances"],"02E7":["FL","CompensatorRelativeStoppingPowerRatio"],"02E8":["FL","CompensatorMillingToolDiameter"],"02EA":["SQ","IonRangeCompensatorSequence"],"02EB":["LT","CompensatorDescription"],"0302":["IS","RadiationMassNumber"],"0304":["IS","RadiationAtomicNumber"],"0306":["SS","RadiationChargeState"],"0308":["CS","ScanMode"],"030A":["FL","VirtualSourceAxisDistances"],"030C":["SQ","SnoutSequence"],"030D":["FL","SnoutPosition"],"030F":["SH","SnoutID"],"0312":["IS",
"NumberOfRangeShifters"],"0314":["SQ","RangeShifterSequence"],"0316":["IS","RangeShifterNumber"],"0318":["SH","RangeShifterID"],"0320":["CS","RangeShifterType"],"0322":["LO","RangeShifterDescription"],"0330":["IS","NumberOfLateralSpreadingDevices"],"0332":["SQ","LateralSpreadingDeviceSequence"],"0334":["IS","LateralSpreadingDeviceNumber"],"0336":["SH","LateralSpreadingDeviceID"],"0338":["CS","LateralSpreadingDeviceType"],"033A":["LO","LateralSpreadingDeviceDescription"],"033C":["FL","LateralSpreadingDeviceWaterEquivalentThickness"],
"0340":["IS","NumberOfRangeModulators"],"0342":["SQ","RangeModulatorSequence"],"0344":["IS","RangeModulatorNumber"],"0346":["SH","RangeModulatorID"],"0348":["CS","RangeModulatorType"],"034A":["LO","RangeModulatorDescription"],"034C":["SH","BeamCurrentModulationID"],"0350":["CS","PatientSupportType"],"0352":["SH","PatientSupportID"],"0354":["LO","PatientSupportAccessoryCode"],"0356":["FL","FixationLightAzimuthalAngle"],"0358":["FL","FixationLightPolarAngle"],"035A":["FL","MetersetRate"],"0360":["SQ",
"RangeShifterSettingsSequence"],"0362":["LO","RangeShifterSetting"],"0364":["FL","IsocenterToRangeShifterDistance"],"0366":["FL","RangeShifterWaterEquivalentThickness"],"0370":["SQ","LateralSpreadingDeviceSettingsSequence"],"0372":["LO","LateralSpreadingDeviceSetting"],"0374":["FL","IsocenterToLateralSpreadingDeviceDistance"],"0380":["SQ","RangeModulatorSettingsSequence"],"0382":["FL","RangeModulatorGatingStartValue"],"0384":["FL","RangeModulatorGatingStopValue"],"0386":["FL","RangeModulatorGatingStartWaterEquivalentThickness"],
"0388":["FL","RangeModulatorGatingStopWaterEquivalentThickness"],"038A":["FL","IsocenterToRangeModulatorDistance"],"0390":["SH","ScanSpotTuneID"],"0392":["IS","NumberOfScanSpotPositions"],"0394":["FL","ScanSpotPositionMap"],"0396":["FL","ScanSpotMetersetWeights"],"0398":["FL","ScanningSpotSize"],"039A":["IS","NumberOfPaintings"],"03A0":["SQ","IonToleranceTableSequence"],"03A2":["SQ","IonBeamSequence"],"03A4":["SQ","IonBeamLimitingDeviceSequence"],"03A6":["SQ","IonBlockSequence"],"03A8":["SQ","IonControlPointSequence"],
"03AA":["SQ","IonWedgeSequence"],"03AC":["SQ","IonWedgePositionSequence"],"0401":["SQ","ReferencedSetupImageSequence"],"0402":["ST","SetupImageComment"],"0410":["SQ","MotionSynchronizationSequence"],"0412":["FL","ControlPointOrientation"],"0420":["SQ","GeneralAccessorySequence"],"0421":["SH","GeneralAccessoryID"],"0422":["ST","GeneralAccessoryDescription"],"0423":["CS","GeneralAccessoryType"],"0424":["IS","GeneralAccessoryNumber"],"0431":["SQ","ApplicatorGeometrySequence"],"0432":["CS","ApplicatorApertureShape"],
"0433":["FL","ApplicatorOpening"],"0434":["FL","ApplicatorOpeningX"],"0435":["FL","ApplicatorOpeningY"],"0436":["FL","SourceToApplicatorMountingPositionDistance"]},"300C":{"0002":["SQ","ReferencedRTPlanSequence"],"0004":["SQ","ReferencedBeamSequence"],"0006":["IS","ReferencedBeamNumber"],"0007":["IS","ReferencedReferenceImageNumber"],"0008":["DS","StartCumulativeMetersetWeight"],"0009":["DS","EndCumulativeMetersetWeight"],"000A":["SQ","ReferencedBrachyApplicationSetupSequence"],"000C":["IS","ReferencedBrachyApplicationSetupNumber"],
"000E":["IS","ReferencedSourceNumber"],"0020":["SQ","ReferencedFractionGroupSequence"],"0022":["IS","ReferencedFractionGroupNumber"],"0040":["SQ","ReferencedVerificationImageSequence"],"0042":["SQ","ReferencedReferenceImageSequence"],"0050":["SQ","ReferencedDoseReferenceSequence"],"0051":["IS","ReferencedDoseReferenceNumber"],"0055":["SQ","BrachyReferencedDoseReferenceSequence"],"0060":["SQ","ReferencedStructureSetSequence"],"006A":["IS","ReferencedPatientSetupNumber"],"0080":["SQ","ReferencedDoseSequence"],
"00A0":["IS","ReferencedToleranceTableNumber"],"00B0":["SQ","ReferencedBolusSequence"],"00C0":["IS","ReferencedWedgeNumber"],"00D0":["IS","ReferencedCompensatorNumber"],"00E0":["IS","ReferencedBlockNumber"],"00F0":["IS","ReferencedControlPointIndex"],"00F2":["SQ","ReferencedControlPointSequence"],"00F4":["IS","ReferencedStartControlPointIndex"],"00F6":["IS","ReferencedStopControlPointIndex"],"0100":["IS","ReferencedRangeShifterNumber"],"0102":["IS","ReferencedLateralSpreadingDeviceNumber"],"0104":["IS",
"ReferencedRangeModulatorNumber"]},"300E":{"0002":["CS","ApprovalStatus"],"0004":["DA","ReviewDate"],"0005":["TM","ReviewTime"],"0008":["PN","ReviewerName"]},4E3:{"0010":["LT","Arbitrary"],4E3:["LT","TextComments"]},4008:{"0040":["SH","ResultsID"],"0042":["LO","ResultsIDIssuer"],"0050":["SQ","ReferencedInterpretationSequence"],"00FF":["CS","ReportProductionStatusTrial"],"0100":["DA","InterpretationRecordedDate"],"0101":["TM","InterpretationRecordedTime"],"0102":["PN","InterpretationRecorder"],"0103":["LO",
"ReferenceToRecordedSound"],"0108":["DA","InterpretationTranscriptionDate"],"0109":["TM","InterpretationTranscriptionTime"],"010A":["PN","InterpretationTranscriber"],"010B":["ST","InterpretationText"],"010C":["PN","InterpretationAuthor"],"0111":["SQ","InterpretationApproverSequence"],"0112":["DA","InterpretationApprovalDate"],"0113":["TM","InterpretationApprovalTime"],"0114":["PN","PhysicianApprovingInterpretation"],"0115":["LT","InterpretationDiagnosisDescription"],"0117":["SQ","InterpretationDiagnosisCodeSequence"],
"0118":["SQ","ResultsDistributionListSequence"],"0119":["PN","DistributionName"],"011A":["LO","DistributionAddress"],"0200":["SH","InterpretationID"],"0202":["LO","InterpretationIDIssuer"],"0210":["CS","InterpretationTypeID"],"0212":["CS","InterpretationStatusID"],"0300":["ST","Impressions"],4E3:["ST","ResultsComments"]},4010:{"0001":["CS","LowEnergyDetectors"],"0002":["CS","HighEnergyDetectors"],"0004":["SQ","DetectorGeometrySequence"],1001:["SQ","ThreatROIVoxelSequence"],1004:["FL","ThreatROIBase"],
1005:["FL","ThreatROIExtents"],1006:["OB","ThreatROIBitmap"],1007:["SH","RouteSegmentID"],1008:["CS","GantryType"],1009:["CS","OOIOwnerType"],"100A":["SQ","RouteSegmentSequence"],1010:["US","PotentialThreatObjectID"],1011:["SQ","ThreatSequence"],1012:["CS","ThreatCategory"],1013:["LT","ThreatCategoryDescription"],1014:["CS","ATDAbilityAssessment"],1015:["CS","ATDAssessmentFlag"],1016:["FL","ATDAssessmentProbability"],1017:["FL","Mass"],1018:["FL","Density"],1019:["FL","ZEffective"],"101A":["SH","BoardingPassID"],
"101B":["FL","CenterOfMass"],"101C":["FL","CenterOfPTO"],"101D":["FL","BoundingPolygon"],"101E":["SH","RouteSegmentStartLocationID"],"101F":["SH","RouteSegmentEndLocationID"],1020:["CS","RouteSegmentLocationIDType"],1021:["CS","AbortReason"],1023:["FL","VolumeOfPTO"],1024:["CS","AbortFlag"],1025:["DT","RouteSegmentStartTime"],1026:["DT","RouteSegmentEndTime"],1027:["CS","TDRType"],1028:["CS","InternationalRouteSegment"],1029:["LO","ThreatDetectionAlgorithmandVersion"],"102A":["SH","AssignedLocation"],
"102B":["DT","AlarmDecisionTime"],1031:["CS","AlarmDecision"],1033:["US","NumberOfTotalObjects"],1034:["US","NumberOfAlarmObjects"],1037:["SQ","PTORepresentationSequence"],1038:["SQ","ATDAssessmentSequence"],1039:["CS","TIPType"],"103A":["CS","DICOSVersion"],1041:["DT","OOIOwnerCreationTime"],1042:["CS","OOIType"],1043:["FL","OOISize"],1044:["CS","AcquisitionStatus"],1045:["SQ","BasisMaterialsCodeSequence"],1046:["CS","PhantomType"],1047:["SQ","OOIOwnerSequence"],1048:["CS","ScanType"],1051:["LO",
"ItineraryID"],1052:["SH","ItineraryIDType"],1053:["LO","ItineraryIDAssigningAuthority"],1054:["SH","RouteID"],1055:["SH","RouteIDAssigningAuthority"],1056:["CS","InboundArrivalType"],1058:["SH","CarrierID"],1059:["CS","CarrierIDAssigningAuthority"],1060:["FL","SourceOrientation"],1061:["FL","SourcePosition"],1062:["FL","BeltHeight"],1064:["SQ","AlgorithmRoutingCodeSequence"],1067:["CS","TransportClassification"],1068:["LT","OOITypeDescriptor"],1069:["FL","TotalProcessingTime"],"106C":["OB","DetectorCalibrationData"]}};
d.Dictionary.getVR=function(a,b){var e,r;if(r=d.Dictionary.dict[d.Utils.dec2hex(a)])(r=r[d.Utils.dec2hex(b)])?e=r[0]:0===b&&(e="UL");e||(r=d.Dictionary.dictPrivate[d.Utils.dec2hex(a)])&&(r=r[d.Utils.dec2hex(b)])&&(e=r[0]);e||(e="OB");return e};d.Dictionary.getDescription=function(a,b){var e,r;if(r=d.Dictionary.dict[d.Utils.dec2hex(a)])(r=r[d.Utils.dec2hex(b)])?e=r[1]:0===b&&(e="Group "+d.Utils.dec2hex(a)+" Length");e||(r=d.Dictionary.dictPrivate[d.Utils.dec2hex(a)])&&(r=r[d.Utils.dec2hex(b)])&&(e=
r[1]);e||(e="PrivateData");return e};"undefined"!==typeof b&&b.exports&&(b.exports=d.Dictionary)},{"./utilities.js":45}],36:[function(a,b,e){var d=d||{};d.Tag=d.Tag||("undefined"!==typeof a?a("./tag.js"):null);d.CompressionUtils=d.CompressionUtils||("undefined"!==typeof a?a("./compression-utils.js"):null);d.Utils=d.Utils||("undefined"!==typeof a?a("./utilities.js"):null);d.RLE=d.RLE||("undefined"!==typeof a?a("./rle.js"):null);var f="undefined"!==typeof a?a("jpeg-lossless-decoder-js"):null,k=k||("undefined"!==
typeof a?a("../lib/jpeg-baseline.js").JpegImage:null),h=h||("undefined"!==typeof a?a("../lib/jpx.js"):null),r=r||("undefined"!==typeof a?a("../lib/jpeg-ls.js"):null);d.Image=d.Image||function(){this.tags={};this.tagsFlat={};this.littleEndian=!1;this.index=-1;this.decompressed=!1;this.privateDataAll=null;this.convertedPalette=!1};d.Image.SLICE_DIRECTION_UNKNOWN=-1;d.Image.SLICE_DIRECTION_AXIAL=2;d.Image.SLICE_DIRECTION_CORONAL=1;d.Image.SLICE_DIRECTION_SAGITTAL=0;d.Image.SLICE_DIRECTION_OBLIQUE=3;
d.Image.OBLIQUITY_THRESHOLD_COSINE_VALUE=.8;d.Image.BYTE_TYPE_UNKNOWN=0;d.Image.BYTE_TYPE_BINARY=1;d.Image.BYTE_TYPE_INTEGER=2;d.Image.BYTE_TYPE_INTEGER_UNSIGNED=3;d.Image.BYTE_TYPE_FLOAT=4;d.Image.BYTE_TYPE_COMPLEX=5;d.Image.BYTE_TYPE_RGB=6;d.Image.skipPaletteConversion=!1;d.Image.getSingleValueSafely=function(a,b){return a&&a.value?a.value[b]:null};d.Image.getValueSafely=function(a){return a?a.value:null};d.Image.getMajorAxisFromPatientRelativeDirectionCosine=function(a,b,f){var e,h,k;e=0>a?"R":
"L";h=0>b?"A":"P";k=0>f?"F":"H";a=Math.abs(a);b=Math.abs(b);f=Math.abs(f);return a>d.Image.OBLIQUITY_THRESHOLD_COSINE_VALUE&&a>b&&a>f?e:b>d.Image.OBLIQUITY_THRESHOLD_COSINE_VALUE&&b>a&&b>f?h:f>d.Image.OBLIQUITY_THRESHOLD_COSINE_VALUE&&f>a&&f>b?k:null};d.Image.prototype.getCols=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_COLS[0],d.Tag.TAG_COLS[1]),0)};d.Image.prototype.getRows=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_ROWS[0],d.Tag.TAG_ROWS[1]),0)};
d.Image.prototype.getSeriesDescription=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_SERIES_DESCRIPTION[0],d.Tag.TAG_SERIES_DESCRIPTION[1]),0)};d.Image.prototype.getSeriesInstanceUID=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_SERIES_INSTANCE_UID[0],d.Tag.TAG_SERIES_INSTANCE_UID[1]),0)};d.Image.prototype.getSeriesNumber=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_SERIES_NUMBER[0],d.Tag.TAG_SERIES_NUMBER[1]),0)};d.Image.prototype.getEchoNumber=
function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_ECHO_NUMBER[0],d.Tag.TAG_ECHO_NUMBER[1]),0)};d.Image.prototype.getImagePosition=function(){return d.Image.getValueSafely(this.getTag(d.Tag.TAG_IMAGE_POSITION[0],d.Tag.TAG_IMAGE_POSITION[1]))};d.Image.prototype.getImageDirections=function(){return d.Image.getValueSafely(this.getTag(d.Tag.TAG_IMAGE_ORIENTATION[0],d.Tag.TAG_IMAGE_ORIENTATION[1]))};d.Image.prototype.getImagePositionSliceDir=function(a){var b=d.Image.getValueSafely(this.getTag(d.Tag.TAG_IMAGE_POSITION[0],
d.Tag.TAG_IMAGE_POSITION[1]));return b&&0<=a?b[a]:0};d.Image.prototype.getModality=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_MODALITY[0],d.Tag.TAG_MODALITY[1]),0)};d.Image.prototype.getSliceLocation=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_SLICE_LOCATION[0],d.Tag.TAG_SLICE_LOCATION[1]),0)};d.Image.prototype.getSliceLocationVector=function(){return d.Image.getValueSafely(this.getTag(d.Tag.TAG_SLICE_LOCATION_VECTOR[0],d.Tag.TAG_SLICE_LOCATION_VECTOR[1]))};
d.Image.prototype.getImageNumber=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_IMAGE_NUM[0],d.Tag.TAG_IMAGE_NUM[1]),0)};d.Image.prototype.getTemporalPosition=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_TEMPORAL_POSITION[0],d.Tag.TAG_TEMPORAL_POSITION[1]),0)};d.Image.prototype.getTemporalNumber=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_NUMBER_TEMPORAL_POSITIONS[0],d.Tag.TAG_NUMBER_TEMPORAL_POSITIONS[1]),0)};d.Image.prototype.getSliceGap=
function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_SLICE_GAP[0],d.Tag.TAG_SLICE_GAP[1]),0)};d.Image.prototype.getSliceThickness=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_SLICE_THICKNESS[0],d.Tag.TAG_SLICE_THICKNESS[1]),0)};d.Image.prototype.getImageMax=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_IMAGE_MAX[0],d.Tag.TAG_IMAGE_MAX[1]),0)};d.Image.prototype.getImageMin=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_IMAGE_MIN[0],
d.Tag.TAG_IMAGE_MIN[1]),0)};d.Image.prototype.getDataScaleSlope=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_DATA_SCALE_SLOPE[0],d.Tag.TAG_DATA_SCALE_SLOPE[1]),0)};d.Image.prototype.getDataScaleIntercept=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_DATA_SCALE_INTERCEPT[0],d.Tag.TAG_DATA_SCALE_INTERCEPT[1]),0)};d.Image.prototype.getDataScaleElscint=function(){var a=d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_DATA_SCALE_ELSCINT[0],d.Tag.TAG_DATA_SCALE_ELSCINT[1]),
0);a||(a=1);var b=this.getPixelBandwidth(),a=Math.sqrt(b)/(10*a);0>=a&&(a=1);return a};d.Image.prototype.getWindowWidth=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_WINDOW_WIDTH[0],d.Tag.TAG_WINDOW_WIDTH[1]),0)};d.Image.prototype.getWindowCenter=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_WINDOW_CENTER[0],d.Tag.TAG_WINDOW_CENTER[1]),0)};d.Image.prototype.getPixelBandwidth=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_PIXEL_BANDWIDTH[0],
d.Tag.TAG_PIXEL_BANDWIDTH[1]),0)};d.Image.prototype.getSeriesId=function(){var a=this.getSeriesDescription(),b=this.getSeriesInstanceUID(),d=this.getSeriesNumber(),f=this.getEchoNumber(),e=this.getOrientation(),h=this.getCols(),k=this.getRows(),r="";null!==a&&(r+=" "+a);null!==b&&(r+=" "+b);null!==d&&(r+=" "+d);null!==f&&(r+=" "+f);null!==e&&(r+=" "+e);return r+(" ("+h+" x "+k+")")};d.Image.prototype.getPixelSpacing=function(){return d.Image.getValueSafely(this.getTag(d.Tag.TAG_PIXEL_SPACING[0],d.Tag.TAG_PIXEL_SPACING[1]))};
d.Image.prototype.getImageType=function(){return d.Image.getValueSafely(this.getTag(d.Tag.TAG_IMAGE_TYPE[0],d.Tag.TAG_IMAGE_TYPE[1]))};d.Image.prototype.getBitsStored=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_BITS_STORED[0],d.Tag.TAG_BITS_STORED[1]),0)};d.Image.prototype.getBitsAllocated=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_BITS_ALLOCATED[0],d.Tag.TAG_BITS_ALLOCATED[1]),0)};d.Image.prototype.getFrameTime=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_FRAME_TIME[0],
d.Tag.TAG_FRAME_TIME[1]),0)};d.Image.prototype.getAcquisitionMatrix=function(){var a,b,f;a=[0,0];a[0]=d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_ACQUISITION_MATRIX[0],d.Tag.TAG_ACQUISITION_MATRIX[1]),0);null===this.privateDataAll&&(this.privateDataAll=this.getAllInterpretedPrivateData());null!==this.privateDataAll&&0<this.privateDataAll.length&&(b=this.privateDataAll.indexOf("AcquisitionMatrixText"),-1!==b&&(f=this.privateDataAll.indexOf("\n",b),-1!==f&&(b=this.privateDataAll.substring(b,
f),b=b.match(/\d+/g),null!==b&&2===b.length?(a[0]=b[0],a[1]=b[1]):null!==b&&1===b.length&&(a[0]=b[0]))));0===a[1]&&(a[1]=a[0]);return a};d.Image.prototype.getTR=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_TR,d.Tag.TAG_TR[1]),0)};d.Image.prototype.putTag=function(a){this.tags[a.id]=a;this.putFlattenedTag(this.tagsFlat,a)};d.Image.prototype.putFlattenedTag=function(a,b){var d;if(b.sublist)for(d=0;d<b.value.length;d+=1)this.putFlattenedTag(a,b.value[d]);else a[b.id]||(a[b.id]=
b)};d.Image.prototype.getTag=function(a,b){var f=d.Tag.createId(a,b);return this.tags[f]?this.tags[f]:this.tagsFlat[f]};d.Image.prototype.getPixelData=function(){return this.tags[d.Tag.createId(d.Tag.TAG_PIXEL_DATA[0],d.Tag.TAG_PIXEL_DATA[1])]};d.Image.prototype.getPixelDataBytes=function(){this.isCompressed()&&this.decompress();this.isPalette()&&!d.Image.skipPaletteConversion&&this.convertPalette();return this.tags[d.Tag.createId(d.Tag.TAG_PIXEL_DATA[0],d.Tag.TAG_PIXEL_DATA[1])].value.buffer};d.Image.prototype.getRawData=
function(){return this.getPixelDataBytes()};d.Image.prototype.getInterpretedData=function(a,b,f){var e,h,k,r,P,da,aa,M,ka,m,fa,ba,Z,X;P=3>arguments.length;da=d.Utils.createBitMask(this.getBitsAllocated()/8,this.getBitsStored(),this.getDataType()===d.Image.BYTE_TYPE_INTEGER_UNSIGNED);e=this.getPixelRepresentation()?d.Image.BYTE_TYPE_INTEGER:d.Image.BYTE_TYPE_INTEGER_UNSIGNED;h=this.getBitsAllocated()/8;k=this.getRawData();r=new DataView(k);k=k.byteLength/h;aa=k/this.getNumberOfFrames();k=P?k:aa;fa=
P?0:f*aa;aa=this.getDataScaleSlope()||1;M=this.getDataScaleIntercept()||0;ka=d.Utils.MAX_VALUE;m=d.Utils.MIN_VALUE;Z=ba=-1;X=this.littleEndian;P=a?Array(k):new Float32Array(k);var U;e===d.Image.BYTE_TYPE_INTEGER?1===h?U=r.getInt8.bind(r):2===h&&(U=r.getInt16.bind(r)):e===d.Image.BYTE_TYPE_INTEGER_UNSIGNED&&(1===h?U=r.getUint8.bind(r):2===h&&(U=r.getUint16.bind(r)));r="INVERSE"===d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_LUT_SHAPE[0],d.Tag.TAG_LUT_SHAPE[1]),0);if(r=!r&&"MONOCHROME1"===this.getPhotometricInterpretation()){var x=
Math.pow(2,this.getBitsStored())-1,n=0;e===d.Image.BYTE_TYPE_INTEGER&&(x/=2,n=-x);var z=U;U=function(a,b){var d=x-z(a,b);return Math.min(x,Math.max(n,d))}}e=fa;for(r=0;r<k;e++,r++)fa=U(e*h,X),fa=(fa&da)*aa+M,P[r]=fa,fa<ka&&(ka=fa,ba=r),fa>m&&(m=fa,Z=r);return b?{data:P,min:ka,minIndex:ba,max:m,maxIndex:Z,numCols:this.getCols(),numRows:this.getRows()}:P};d.Image.prototype.convertPalette=function(){var a,b,f,e,h,k,r,P,da,aa;a=this.tags[d.Tag.createId(d.Tag.TAG_PIXEL_DATA[0],d.Tag.TAG_PIXEL_DATA[1])].value;
b=this.getPalleteValues(d.Tag.TAG_PALETTE_RED);f=this.getPalleteValues(d.Tag.TAG_PALETTE_GREEN);e=this.getPalleteValues(d.Tag.TAG_PALETTE_BLUE);if(null!==b&&0<b.length&&null!==f&&0<f.length&&null!==e&&0<e.length&&!this.convertedPalette){h=new DataView(new ArrayBuffer(this.getRows()*this.getCols()*this.getNumberOfFrames()*3));k=parseInt(Math.ceil(this.getBitsAllocated()/8));r=a.byteLength/k;if(1===k)for(k=0;k<r;k+=1)P=a.getUint8(k),da=b[P],aa=f[P],P=e[P],h.setUint8(3*k,da),h.setUint8(3*k+1,aa),h.setUint8(3*
k+2,P);else if(2===k)for(k=0;k<r;k+=1)P=a.getUint16(2*k),da=b[P],aa=f[P],P=e[P],h.setUint8(3*k,da),h.setUint8(3*k+1,aa),h.setUint8(3*k+2,P);a=h;this.convertedPalette=!0}this.tags[d.Tag.createId(d.Tag.TAG_PIXEL_DATA[0],d.Tag.TAG_PIXEL_DATA[1])].value=a};d.Image.prototype.decompressJPEG=function(a){if(this.isCompressedJPEGLossless()){var b=new f.lossless.Decoder;return b.decode(a)}if(this.isCompressedJPEGBaseline()){b=new k;b.parse(new Uint8Array(a));a=b.width;var e=b.height,G;8===this.getBitsAllocated()?
G=b.getData(a,e):16===this.getBitsAllocated()&&(G=b.getData16(a,e));return G}if(this.isCompressedJPEG2000())return b=new h,b.parse(new Uint8Array(a)),b.tiles[0].items;if(this.isCompressedJPEGLS())return b=new r,b.decodeJPEGLS(new Uint8Array(a),this.getDataType()===d.Image.BYTE_TYPE_INTEGER)};d.Image.prototype.decompress=function(){var a,b,e,G,B,w,E,P,da,aa;e=null;if(!this.decompressed)if(this.decompressed=!0,B=this.getRows()*this.getCols()*parseInt(Math.ceil(this.getBitsAllocated()/8)),G=this.getNumberOfFrames(),
this.isCompressedJPEGLossless()){a=this.getJpegs();for(E=0;E<a.length;E+=1)b=new f.lossless.Decoder,w=b.decode(a[E]),da=b.numComp,null===e&&(e=new DataView(new ArrayBuffer(B*G*da))),(new Uint8Array(e.buffer)).set(new Uint8Array(w.buffer),E*B*da);this.tags[d.Tag.createId(d.Tag.TAG_PIXEL_DATA[0],d.Tag.TAG_PIXEL_DATA[1])].value=e}else if(this.isCompressedJPEGBaseline()){a=this.getJpegs();for(E=0;E<a.length;E+=1)b=new k,b.parse(new Uint8Array(a[E])),w=b.width,P=b.height,da=b.components.length,null===
e&&(e=new DataView(new ArrayBuffer(B*G*da))),8===this.getBitsAllocated()?aa=b.getData(w,P):16===this.getBitsAllocated()&&(aa=b.getData16(w,P)),d.Utils.fillBuffer(aa,e,E*B*da,parseInt(Math.ceil(this.getBitsAllocated()/8))),aa=null;this.tags[d.Tag.createId(d.Tag.TAG_PIXEL_DATA[0],d.Tag.TAG_PIXEL_DATA[1])].value=e}else if(this.isCompressedJPEG2000()){a=this.getJpegs();for(E=0;E<a.length;E+=1)b=new h,b.parse(new Uint8Array(a[E])),aa=b.tiles[0].items,da=b.componentsCount,null===e&&(e=new DataView(new ArrayBuffer(B*
G*da))),d.Utils.fillBuffer(aa,e,E*B*da,parseInt(Math.ceil(this.getBitsAllocated()/8)));this.tags[d.Tag.createId(d.Tag.TAG_PIXEL_DATA[0],d.Tag.TAG_PIXEL_DATA[1])].value=e}else if(this.isCompressedJPEGLS()){a=this.getJpegs();for(E=0;E<a.length;E+=1)b=new r,aa=b.decodeJPEGLS(new Uint8Array(a[E]),this.getDataType()===d.Image.BYTE_TYPE_INTEGER),aa=aa.pixelData,da=this.getNumberOfSamplesPerPixel(),null===e&&(e=new DataView(new ArrayBuffer(B*G*da))),d.Utils.fillBuffer(aa,e,E*B*da,parseInt(Math.ceil(this.getBitsAllocated()/
8)));this.tags[d.Tag.createId(d.Tag.TAG_PIXEL_DATA[0],d.Tag.TAG_PIXEL_DATA[1])].value=e}else if(this.isCompressedRLE()){a=this.getRLE();for(E=0;E<a.length;E+=1)b=new d.RLE,w=b.decode(a[E],this.littleEndian,this.getRows()*this.getCols()),da=3===b.numSegments?3:1,null===e&&(e=new DataView(new ArrayBuffer(B*G*da))),(new Uint8Array(e.buffer)).set(new Uint8Array(w.buffer),E*B*da);this.tags[d.Tag.createId(d.Tag.TAG_PIXEL_DATA[0],d.Tag.TAG_PIXEL_DATA[1])].value=e}};d.Image.prototype.hasPixelData=function(){return void 0!==
this.tags[d.Tag.createId(d.Tag.TAG_PIXEL_DATA[0],d.Tag.TAG_PIXEL_DATA[1])]};d.Image.prototype.clearPixelData=function(){this.tags[d.Tag.createId(d.Tag.TAG_PIXEL_DATA[0],d.Tag.TAG_PIXEL_DATA[1])].value=null};d.Image.prototype.getOrientation=function(){var a=d.Image.getValueSafely(this.getTag(d.Tag.TAG_IMAGE_ORIENTATION[0],d.Tag.TAG_IMAGE_ORIENTATION[1])),b,f,e=0,h=0,k=0,r="";if(!a||6!==a.length)return null;b=this.getPixelSpacing();if(!b)return null;f=b[0];for(b=0;3>b;b+=1)Math.abs(a[b])>k&&(k=Math.abs(a[b]),
e=b);for(k=0;6>b;b+=1)Math.abs(a[b])>k&&(k=Math.abs(a[b]),h=b);switch(e){case 0:r+="X";r=4===h?r+"YZ":r+"ZY";break;case 1:r+="Y";r=3===h?r+"XZ":r+"ZX";break;case 2:r+="Z",r=3===h?r+"XY":r+"YX"}switch(e){case 0:r=0<a[e]?r+"-":r+"+";r=4===h?0<a[h]?r+"-":r+"+":0<a[h]?r+"+":r+"-";break;case 1:r=0<a[e]?r+"-":r+"+";r=3===h?0<a[h]?r+"-":r+"+":0<a[h]?r+"+":r+"-";break;case 2:r=0<a[e]?r+"+":r+"-",r=0<a[h]?r+"-":r+"+"}if(0===f)r+="+";else switch(r.charAt(2)){case "X":r=0<f?r+"-":r+"+";break;case "Y":case "Z":r=
0<f?r+"+":r+"-"}return r};d.Image.prototype.isMosaic=function(){var a,b=!1,d;a=this.getImageType();if(null!==a)for(d=0;d<a.length;d+=1)if(-1!==a[d].toUpperCase().indexOf("MOSAIC")){b=!0;break}a=this.getAcquisitionMatrix();a=0<a[0]&&(a[0]<this.getRows()||a[1]<this.getCols());return b&&a};d.Image.prototype.isPalette=function(){var a=d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_PHOTOMETRIC_INTERPRETATION[0],d.Tag.TAG_PHOTOMETRIC_INTERPRETATION[1]),0);return null!==a&&-1!==a.toLowerCase().indexOf("palette")?
!0:!1};d.Image.prototype.getMosaicCols=function(){return this.getCols()/this.getAcquisitionMatrix()[1]};d.Image.prototype.getMosaicRows=function(){return this.getRows()/this.getAcquisitionMatrix()[0]};d.Image.prototype.isElscint=function(){return void 0!==this.getTag(d.Tag.TAG_DATA_SCALE_ELSCINT[0],d.Tag.TAG_DATA_SCALE_ELSCINT[1])};d.Image.prototype.isCompressed=function(){d.Parser=d.Parser||("undefined"!==typeof a?a("./parser.js"):null);var b=this.getTransferSyntax();return!b||-1===b.indexOf(d.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG)&&
-1===b.indexOf(d.Parser.TRANSFER_SYNTAX_COMPRESSION_RLE)?!1:!0};d.Image.prototype.isCompressedJPEG=function(){d.Parser=d.Parser||("undefined"!==typeof a?a("./parser.js"):null);var b=this.getTransferSyntax();return b&&-1!==b.indexOf(d.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG)?!0:!1};d.Image.prototype.isCompressedJPEGLossless=function(){d.Parser=d.Parser||("undefined"!==typeof a?a("./parser.js"):null);var b=this.getTransferSyntax();return!b||-1===b.indexOf(d.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_LOSSLESS)&&
-1===b.indexOf(d.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_LOSSLESS_SEL1)?!1:!0};d.Image.prototype.isCompressedJPEGBaseline=function(){d.Parser=d.Parser||("undefined"!==typeof a?a("./parser.js"):null);var b=this.getTransferSyntax();return!b||-1===b.indexOf(d.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_BASELINE_8BIT)&&-1===b.indexOf(d.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_BASELINE_12BIT)?!1:!0};d.Image.prototype.isCompressedJPEG2000=function(){d.Parser=d.Parser||("undefined"!==typeof a?a("./parser.js"):
null);var b=this.getTransferSyntax();return!b||-1===b.indexOf(d.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_2000)&&-1===b.indexOf(d.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_2000_LOSSLESS)?!1:!0};d.Image.prototype.isCompressedJPEGLS=function(){d.Parser=d.Parser||("undefined"!==typeof a?a("./parser.js"):null);var b=this.getTransferSyntax();return!b||-1===b.indexOf(d.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_LS)&&-1===b.indexOf(d.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_LS_LOSSLESS)?!1:!0};d.Image.prototype.isCompressedRLE=
function(){d.Parser=d.Parser||("undefined"!==typeof a?a("./parser.js"):null);var b=this.getTransferSyntax();return b&&-1!==b.indexOf(d.Parser.TRANSFER_SYNTAX_COMPRESSION_RLE)?!0:!1};d.Image.prototype.getNumberOfFrames=function(){var a=d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_NUMBER_OF_FRAMES[0],d.Tag.TAG_NUMBER_OF_FRAMES[1]),0);return null!==a?a:1};d.Image.prototype.getNumberOfSamplesPerPixel=function(){var a=d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_SAMPLES_PER_PIXEL[0],d.Tag.TAG_SAMPLES_PER_PIXEL[1]),
0);return null!==a?a:1};d.Image.prototype.getNumberOfImplicitFrames=function(){var a,b;if(this.isCompressed())return 1;a=this.getPixelData();a=a.offsetEnd-a.offsetValue;b=this.getCols()*this.getRows()*parseInt(this.getBitsAllocated()/8);return parseInt(a/b)};d.Image.prototype.getPixelRepresentation=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_PIXEL_REPRESENTATION[0],d.Tag.TAG_PIXEL_REPRESENTATION[1]),0)};d.Image.prototype.getPhotometricInterpretation=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_PHOTOMETRIC_INTERPRETATION[0],
d.Tag.TAG_PHOTOMETRIC_INTERPRETATION[1]),0)};d.Image.prototype.getPatientName=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_PATIENT_NAME[0],d.Tag.TAG_PATIENT_NAME[1]),0)};d.Image.prototype.getPatientID=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_PATIENT_ID[0],d.Tag.TAG_PATIENT_ID[1]),0)};d.Image.prototype.getStudyTime=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_STUDY_TIME[0],d.Tag.TAG_STUDY_TIME[1]),0)};d.Image.prototype.getTransferSyntax=
function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_TRANSFER_SYNTAX[0],d.Tag.TAG_TRANSFER_SYNTAX[1]),0)};d.Image.prototype.getStudyDate=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_STUDY_DATE[0],d.Tag.TAG_STUDY_DATE[1]),0)};d.Image.prototype.getPlanarConfig=function(){return d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_PLANAR_CONFIG[0],d.Tag.TAG_PLANAR_CONFIG[1]),0)};d.Image.prototype.getImageDescription=function(){var a,b="";a=d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_STUDY_DES[0],
d.Tag.TAG_STUDY_DES[1]),0);null!==a&&(b+=" "+a);a=d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_SERIES_DESCRIPTION[0],d.Tag.TAG_SERIES_DESCRIPTION[1]),0);null!==a&&(b+=" "+a);a=d.Image.getSingleValueSafely(this.getTag(d.Tag.TAG_IMAGE_COMMENTS[0],d.Tag.TAG_IMAGE_COMMENTS[1]),0);null!==a&&(b+=" "+a);return b.trim()};d.Image.prototype.getDataType=function(){var a,b;b=this.getPixelRepresentation();if(null===b)return d.Image.BYTE_TYPE_UNKNOWN;a=this.getPhotometricInterpretation();return null===a||
-1===a.trim().indexOf("RGB")&&-1===a.trim().indexOf("YBR")&&-1===a.trim().toLowerCase().indexOf("palette")?0===b?d.Image.BYTE_TYPE_INTEGER_UNSIGNED:1===b?d.Image.BYTE_TYPE_INTEGER:d.Image.BYTE_TYPE_UNKNOWN:d.Image.BYTE_TYPE_RGB};d.Image.prototype.getAcquiredSliceDirection=function(){var a,b,f;a=d.Image.getValueSafely(this.getTag(d.Tag.TAG_IMAGE_ORIENTATION[0],d.Tag.TAG_IMAGE_ORIENTATION[1]));if(!a||6!==a.length)return d.Image.SLICE_DIRECTION_UNKNOWN;b=d.Image.getMajorAxisFromPatientRelativeDirectionCosine(a[0],
a[1],a[2]);a=d.Image.getMajorAxisFromPatientRelativeDirectionCosine(a[3],a[4],a[5]);null!==b&&null!==a?"R"!==b&&"L"!==b||"A"!==a&&"P"!==a?"R"!==a&&"L"!==a||"A"!==b&&"P"!==b?"R"!==b&&"L"!==b||"H"!==a&&"F"!==a?"R"!==a&&"L"!==a||"H"!==b&&"F"!==b?"A"!==b&&"P"!==b||"H"!==a&&"F"!==a?"A"!==a&&"P"!==a||"H"!==b&&"F"!==b||(f=d.Image.SLICE_DIRECTION_SAGITTAL):f=d.Image.SLICE_DIRECTION_SAGITTAL:f=d.Image.SLICE_DIRECTION_CORONAL:f=d.Image.SLICE_DIRECTION_CORONAL:f=d.Image.SLICE_DIRECTION_AXIAL:f=d.Image.SLICE_DIRECTION_AXIAL:
f=d.Image.SLICE_DIRECTION_OBLIQUE;return f};d.Image.prototype.getEncapsulatedData=function(){var b;d.Parser=d.Parser||("undefined"!==typeof a?a("./parser.js"):null);b=this.getPixelData().value.buffer;return(new d.Parser).parseEncapsulated(new DataView(b))};d.Image.prototype.getJpegs=function(){var a,b,f,e,h=[],k=[];if(a=this.getEncapsulatedData())for(b=a.length,f=0;f<b;f+=1)d.CompressionUtils.isHeaderJPEG(a[f].value)||d.CompressionUtils.isHeaderJPEG2000(a[f].value)?(e=[],e.push(a[f].value.buffer),
h.push(e)):e&&a[f].value&&e.push(a[f].value.buffer);for(f=0;f<h.length;f+=1)k[f]=1<h[f].length?d.Utils.concatArrayBuffers2(h[f]):h[f][0],h[f]=null;return k};d.Image.prototype.getRLE=function(){var a,b,d,f=[];if(a=this.getEncapsulatedData())for(b=a.length,d=1;d<b;d+=1)a[d].value&&f.push(a[d].value.buffer);return f};d.Image.prototype.getAllInterpretedPrivateData=function(){var a,b,d="",f=Object.keys(this.tags).sort();for(a=0;a<f.length;a+=1)b=f[a],this.tags.hasOwnProperty(b)&&(b=this.tags[b],b.hasInterpretedPrivateData()&&
(d+=b.value));return d};d.Image.prototype.toString=function(){var a,b,d="",f=Object.keys(this.tags).sort();for(a=0;a<f.length;a+=1)b=f[a],this.tags.hasOwnProperty(b)&&(b=this.tags[b],d+=b.toHTMLString()+"<br />");d=d.replace(/\n\s*\n/g,"\n");return d=d.replace(/(?:\r\n|\r|\n)/g,"<br />")};d.Image.prototype.getPalleteValues=function(a){var b,f,e,h,k;f=d.Image.getValueSafely(this.getTag(a[0],a[1]));if(null!==f){e=f.buffer.byteLength/2;a=[];b=[];for(h=0;h<e;h+=1)a[h]=f.getUint16(2*h,!1)&65535,b[h]=f.getUint16(2*
h,!0)&65535;h=Math.max.apply(Math,a);k=Math.min.apply(Math,a);f=Math.max.apply(Math,b);e=Math.min.apply(Math,b);h=Math.abs(h-k);f=Math.abs(f-e);return h<f?this.scalePalette(a):this.scalePalette(b)}return null};d.Image.prototype.scalePalette=function(a){var b,d,f;d=Math.max.apply(Math,a);b=Math.min.apply(Math,a);if(255<d||0>b)for(f=255/(d-b),d=0;d<a.length;d+=1)a[d]=parseInt(Math.round((a[d]-b)*f));return a};"undefined"!==typeof b&&b.exports&&(b.exports=d.Image)},{"../lib/jpeg-baseline.js":2,"../lib/jpeg-ls.js":3,
"../lib/jpx.js":4,"./compression-utils.js":34,"./parser.js":40,"./rle.js":41,"./tag.js":44,"./utilities.js":45,"jpeg-lossless-decoder-js":11}],37:[function(a,b,e){var d=d||{};d.OrderedMapIterator=d.OrderedMapIterator||function(a){this.orderedMap=a;this.index=0};d.OrderedMapIterator.prototype.hasNext=function(){return this.index<this.orderedMap.orderedKeys.length};d.OrderedMapIterator.prototype.next=function(){var a=this.orderedMap.get(this.orderedMap.orderedKeys[this.index]);this.index+=1;return a};
"undefined"!==typeof b&&b.exports&&(b.exports=d.OrderedMapIterator)},{}],38:[function(a,b,e){var d=d||{};d.CompressionUtils=d.CompressionUtils||("undefined"!==typeof a?a("./compression-utils.js"):null);d.Dictionary=d.Dictionary||("undefined"!==typeof a?a("./dictionary.js"):null);d.Image=d.Image||("undefined"!==typeof a?a("./image.js"):null);d.OrderedMapIterator=d.OrderedMapIterator||("undefined"!==typeof a?a("./iterator.js"):null);d.OrderedMap=d.OrderedMap||("undefined"!==typeof a?a("./orderedmap.js"):
null);d.Parser=d.Parser||("undefined"!==typeof a?a("./parser.js"):null);d.RLE=d.RLE||("undefined"!==typeof a?a("./rle.js"):null);d.Series=d.Series||("undefined"!==typeof a?a("./series.js"):null);d.Tag=d.Tag||("undefined"!==typeof a?a("./tag.js"):null);d.Utils=d.Utils||("undefined"!==typeof a?a("./utilities.js"):null);d.Siemens=d.Siemens||("undefined"!==typeof a?a("./siemens.js"):null);var f=f||{};f.lossless=f.lossless||{};f.lossless.Decoder="undefined"!==typeof a?a("jpeg-lossless-decoder-js"):null;
var k=k||("undefined"!==typeof a?a("../lib/jpeg-baseline.js").JpegImage:null),h=h||("undefined"!==typeof a?a("../lib/jpx.js"):null),r=r||("undefined"!==typeof a?a("../lib/charLS-DynamicMemory-browser.js"):null),q=q||("undefined"!==typeof a?a("../lib/jpeg-ls.js"):null),t=t||("undefined"!==typeof a?a("pako"):null);"undefined"!==typeof b&&b.exports&&(b.exports=d)},{"../lib/charLS-DynamicMemory-browser.js":1,"../lib/jpeg-baseline.js":2,"../lib/jpeg-ls.js":3,"../lib/jpx.js":4,"./compression-utils.js":34,
"./dictionary.js":35,"./image.js":36,"./iterator.js":37,"./orderedmap.js":39,"./parser.js":40,"./rle.js":41,"./series.js":42,"./siemens.js":43,"./tag.js":44,"./utilities.js":45,"jpeg-lossless-decoder-js":11,pako:16}],39:[function(a,b,e){var d=d||{};d.OrderedMapIterator=d.OrderedMapIterator||("undefined"!==typeof a?a("./iterator.js"):null);d.OrderedMap=d.OrderedMap||function(){this.map={};this.orderedKeys=[]};d.OrderedMap.prototype.put=function(a,b){a in this.map||(this.orderedKeys.push(a),this.orderedKeys.sort(function(a,
b){return parseFloat(a)-parseFloat(b)}));this.map[a]=b};d.OrderedMap.prototype.remove=function(a){var b=this.orderedKeys.indexOf(a);if(-1===b)throw Error("key does not exist");this.orderedKeys.splice(b,1);delete this.map[a]};d.OrderedMap.prototype.get=function(a){return a in this.map?this.map[a]:null};d.OrderedMap.prototype.iterator=function(){return new d.OrderedMapIterator(this)};d.OrderedMap.prototype.getOrderedValues=function(){for(var a=[],b=this.iterator();b.hasNext();)a.push(b.next());return a};
"undefined"!==typeof b&&b.exports&&(b.exports=d.OrderedMap)},{"./iterator.js":37}],40:[function(a,b,e){var d=d||{};d.Tag=d.Tag||("undefined"!==typeof a?a("./tag.js"):null);d.Utils=d.Utils||("undefined"!==typeof a?a("./utilities.js"):null);d.Dictionary=d.Dictionary||("undefined"!==typeof a?a("./dictionary.js"):null);d.Image=d.Image||("undefined"!==typeof a?a("./image.js"):null);var f=f||("undefined"!==typeof a?a("pako"):null);d.Parser=d.Parser||function(){this.explicit=this.littleEndian=!0;this.metaFinished=
this.metaFound=!1;this.metaFinishedOffset=-1;this.needsDeflate=!1;this.inflated=null;this.encapsulation=!1;this.level=0;this.error=null};d.Parser.verbose=!1;d.Parser.MAGIC_COOKIE_OFFSET=128;d.Parser.MAGIC_COOKIE=[68,73,67,77];d.Parser.VRS="AE AS AT CS DA DS DT FL FD IS LO LT OB OD OF OW PN SH SL SS ST TM UI UL UN US UT".split(" ");d.Parser.DATA_VRS="OB OW OF SQ UT UN".split(" ");d.Parser.RAW_DATA_VRS=["OB","OD","OF","OW","UN"];d.Parser.TRANSFER_SYNTAX_IMPLICIT_LITTLE="1.2.840.10008.1.2";d.Parser.TRANSFER_SYNTAX_EXPLICIT_LITTLE=
"1.2.840.10008.1.2.1";d.Parser.TRANSFER_SYNTAX_EXPLICIT_BIG="1.2.840.10008.1.2.2";d.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG="1.2.840.10008.1.2.4";d.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_LOSSLESS="1.2.840.10008.1.2.4.57";d.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_LOSSLESS_SEL1="1.2.840.10008.1.2.4.70";d.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_BASELINE_8BIT="1.2.840.10008.1.2.4.50";d.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_BASELINE_12BIT="1.2.840.10008.1.2.4.51";d.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_LS_LOSSLESS=
"1.2.840.10008.1.2.4.80";d.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_LS="1.2.840.10008.1.2.4.81";d.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_2000_LOSSLESS="1.2.840.10008.1.2.4.90";d.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_2000="1.2.840.10008.1.2.4.91";d.Parser.TRANSFER_SYNTAX_COMPRESSION_RLE="1.2.840.10008.1.2.5";d.Parser.TRANSFER_SYNTAX_COMPRESSION_DEFLATE="1.2.840.10008.1.2.1.99";d.Parser.UNDEFINED_LENGTH=4294967295;d.Parser.isMagicCookieFound=function(a){var b=d.Parser.MAGIC_COOKIE_OFFSET,f=d.Parser.MAGIC_COOKIE.length,
e;for(e=0;e<f;e+=1)if(a.getUint8(b+e)!==d.Parser.MAGIC_COOKIE[e])return!1;return!0};d.Parser.prototype.parse=function(a){var b=null,e,q,t,y;try{for(b=new d.Image,e=this.findFirstTagOffset(a),q=this.getNextTag(a,e);null!==q;){d.Parser.verbose&&console.log(q.toString());b.putTag(q);if(q.isPixelData())break;this.needsDeflate&&q.offsetEnd>=this.metaFinishedOffset&&(this.needsDeflate=!1,t=a.buffer.slice(0,q.offsetEnd),y=a.buffer.slice(q.offsetEnd),this.inflated=d.Utils.concatArrayBuffers(t,f.inflateRaw(y)),
a=new DataView(this.inflated));q=this.getNextTag(a,q.offsetEnd)}}catch(G){this.error=G}null!==b&&(b.littleEndian=this.littleEndian);return b};d.Parser.prototype.parseEncapsulated=function(a){var b,f=[];this.encapsulation=!0;try{for(b=this.getNextTag(a,0);null!==b;)b.isSublistItem()&&f.push(b),d.Parser.verbose&&console.log(b.toString()),b=this.getNextTag(a,b.offsetEnd)}catch(e){this.error=e}return f};d.Parser.prototype.testForValidTag=function(a){var b,d=null;try{b=this.findFirstTagOffset(a),d=this.getNextTag(a,
b,!1)}catch(f){this.error=f}return d};d.Parser.prototype.getNextTag=function(a,b,f){var e=0,t,y=null,G=b,B,w=0;B=!0;var E=null;if(b>=a.byteLength)return null;this.metaFinished?(B=this.littleEndian,e=a.getUint16(b,B)):(e=a.getUint16(b,!0),-1!==this.metaFinishedOffset&&b>=this.metaFinishedOffset||2!==e?(this.metaFinished=!0,B=this.littleEndian,e=a.getUint16(b,B)):B=!0);this.metaFound||2!==e||(this.metaFound=!0);b+=2;t=a.getUint16(b,B);b+=2;this.explicit||!this.metaFinished?(E=d.Utils.getStringAt(a,
b,2),!this.metaFound&&this.metaFinished&&-1===d.Parser.VRS.indexOf(E)?(E=d.Dictionary.getVR(e,t),w=a.getUint32(b,B),b+=4,this.explicit=!1):(b+=2,-1!==d.Parser.DATA_VRS.indexOf(E)?(b+=2,w=a.getUint32(b,B),b+=4):(w=a.getUint16(b,B),b+=2))):(E=d.Dictionary.getVR(e,t),w=a.getUint32(b,B),w===d.Parser.UNDEFINED_LENGTH&&(E="SQ"),b+=4);B=b;var P=e===d.Tag.TAG_PIXEL_DATA[0]&&t===d.Tag.TAG_PIXEL_DATA[1];"SQ"===E||!P&&!this.encapsulation&&-1!==d.Parser.DATA_VRS.indexOf(E)?(y=this.parseSublist(a,b,w,"SQ"!==E),
w===d.Parser.UNDEFINED_LENGTH&&(w=y[y.length-1].offsetEnd-b)):0<w&&!f&&(w===d.Parser.UNDEFINED_LENGTH&&P&&(w=a.byteLength-b),y=a.buffer.slice(b,b+w));b+=w;a=new d.Tag(e,t,E,y,G,B,b,this.littleEndian);a.isTransformSyntax()?a.value[0]===d.Parser.TRANSFER_SYNTAX_IMPLICIT_LITTLE?(this.explicit=!1,this.littleEndian=!0):a.value[0]===d.Parser.TRANSFER_SYNTAX_EXPLICIT_BIG?(this.explicit=!0,this.littleEndian=!1):(a.value[0]===d.Parser.TRANSFER_SYNTAX_COMPRESSION_DEFLATE&&(this.needsDeflate=!0),this.littleEndian=
this.explicit=!0):a.isMetaLength()&&(this.metaFinishedOffset=a.value[0]+b);return a};d.Parser.prototype.parseSublist=function(a,b,f,e){var t=b+f,y=[];this.level++;if(f===d.Parser.UNDEFINED_LENGTH){for(b=this.parseSublistItem(a,b,e);!b.isSequenceDelim();)y.push(b),b=b.offsetEnd,b=this.parseSublistItem(a,b,e);y.push(b)}else for(;b<t;)b=this.parseSublistItem(a,b,e),y.push(b),b=b.offsetEnd;this.level--;return y};d.Parser.prototype.parseSublistItem=function(a,b,f){var e,t,y,G=b,B=null,w,E=[];e=a.getUint16(b,
this.littleEndian);b+=2;t=a.getUint16(b,this.littleEndian);b+=2;y=a.getUint32(b,this.littleEndian);w=b+=4;if(y===d.Parser.UNDEFINED_LENGTH){for(b=this.getNextTag(a,b);!b.isSublistItemDelim();)E.push(b),b=b.offsetEnd,b=this.getNextTag(a,b);E.push(b);b=b.offsetEnd}else if(f)B=a.buffer.slice(b,b+y),b+=y;else for(f=b+y;b<f;)b=this.getNextTag(a,b),E.push(b),b=b.offsetEnd;return new d.Tag(e,t,null,B||E,G,w,b,this.littleEndian)};d.Parser.prototype.findFirstTagOffset=function(a){var b=0,f=d.Parser.MAGIC_COOKIE.length,
e=5*d.Parser.MAGIC_COOKIE_OFFSET,t=!1,y=0,G=0,t=0;if(d.Parser.isMagicCookieFound(a))b=d.Parser.MAGIC_COOKIE_OFFSET+f;else for(y=0;y<e;y+=1)if(t=a.getUint8(y),t===d.Parser.MAGIC_COOKIE[0]){t=!0;for(G=1;G<f;G+=1)a.getUint8(y+G)!==d.Parser.MAGIC_COOKIE[G]&&(t=!1);if(t){b=y+f;break}}return b};d.Parser.prototype.hasError=function(){return null!==this.error};"undefined"!==typeof b&&b.exports&&(b.exports=d.Parser)},{"./dictionary.js":35,"./image.js":36,"./tag.js":44,"./utilities.js":45,pako:16}],41:[function(a,
b,e){var d=d||{};d.RLE=d.RLE||function(){this.rawData=null;this.numSegments=this.segElemPut=this.bytesPut=this.bytesRead=0;this.segmentOffsets=[];this.littleEndian=!0;this.size=this.numElements=this.segmentIndex=0;this.output=null};d.RLE.HEADER_SIZE=64;d.RLE.prototype.decode=function(a,b,d){this.rawData=new DataView(a);this.littleEndian=b;this.numElements=d;this.readHeader();this.output=new DataView(new ArrayBuffer(this.size));for(a=0;a<this.numSegments;a+=1)this.readNextSegment();return this.processData()};
d.RLE.prototype.processData=function(){var a,b,d,e;if(1===this.numSegments)return this.output;if(2===this.numSegments){e=new DataView(new ArrayBuffer(this.size));for(a=0;a<this.numElements;a+=1)b=this.output.getInt8(a),d=this.output.getInt8(a+this.numElements),b=(b&255)<<8|d&255,e.setInt16(2*a,b,this.littleEndian);return e}if(3===this.numSegments){e=new DataView(new ArrayBuffer(this.size));b=2*this.numElements;for(a=0;a<this.numElements;a+=1)e.setInt8(3*a,this.output.getInt8(a)),e.setInt8(3*a+1,this.output.getInt8(a+
this.numElements)),e.setInt8(3*a+2,this.output.getInt8(a+b));return e}throw Error("RLE data with "+this.numSegments+" segments is not supported!");};d.RLE.prototype.readHeader=function(){var a;this.numSegments=this.getInt32();this.size=this.numElements*this.numSegments;for(a=0;a<this.numSegments;a+=1)this.segmentOffsets[a]=this.getInt32();this.bytesRead=d.RLE.HEADER_SIZE};d.RLE.prototype.hasValidInput=function(){return this.bytesRead<this.rawData.buffer.byteLength&&this.bytesPut<this.size&&this.segElemPut<
this.numElements};d.RLE.prototype.readNextSegment=function(){var a;this.bytesRead=this.segmentOffsets[this.segmentIndex];for(this.segElemPut=0;this.hasValidInput();)a=this.get(),0<=a&&128>a?this.readLiteral(a):-1>=a&&-128<a?this.readEncoded(a):-128===a&&console.warn("RLE: unsupported code!");this.segmentIndex+=1};d.RLE.prototype.readLiteral=function(a){var b=a+1;if(this.hasValidInput())for(a=0;a<b;a+=1)this.put(this.get());else console.warn("RLE: insufficient data!")};d.RLE.prototype.readEncoded=
function(a){var b=1-a,d=this.get();for(a=0;a<b;a+=1)this.put(d)};d.RLE.prototype.getInt32=function(){var a=this.rawData.getInt32(this.bytesRead,this.littleEndian);this.bytesRead+=4;return a};d.RLE.prototype.getInt16=function(){var a=this.rawData.getInt16(this.bytesRead,this.littleEndian);this.bytesRead+=2;return a};d.RLE.prototype.get=function(){var a=this.rawData.getInt8(this.bytesRead);this.bytesRead+=1;return a};d.RLE.prototype.put=function(a){this.output.setInt8(this.bytesPut,a);this.bytesPut+=
1;this.segElemPut+=1};"undefined"!==typeof b&&b.exports&&(b.exports=d.RLE)},{}],42:[function(a,b,e){var d=d||{};d.Parser=d.Parser||("undefined"!==typeof a?a("./parser.js"):null);d.Image=d.Image||("undefined"!==typeof a?a("./image.js"):null);d.OrderedMap=d.OrderedMap||("undefined"!==typeof a?a("./orderedmap.js"):null);d.OrderedMapIterator=d.OrderedMapIterator||("undefined"!==typeof a?a("./iterator.js"):null);d.Utils=d.Utils||("undefined"!==typeof a?a("./utilities.js"):null);d.Series=d.Series||function(){this.images=
[];this.imagesOriginalOrder=null;this.isCompressed=this.isElscint=this.isMosaic=!1;this.numberOfFramesInFile=this.numberOfFrames=0;this.sliceSense=this.isImplicitTimeseries=this.isMultiFrameTimeseries=this.isMultiFrameVolume=this.isMultiFrame=!1;this.sliceDir=d.Image.SLICE_DIRECTION_UNKNOWN;this.error=null};d.Series.parserError=null;d.Series.useExplicitOrdering=!1;d.Series.useExplicitSpacing=0;d.Series.parseImage=function(a){var b;b=new d.Parser;a=b.parse(a);if(b.hasError())return d.Series.parserError=
b.error,null;b.inflated&&(a.inflated=b.inflated);return a};d.Series.getMosaicOffset=function(a,b,d,e,q,t,y){b=y%a*b+q;t=(parseInt(y/a)*d+t)*e;return b+t};d.Series.orderDicoms=function(a,b,e){var r,q,t,y,G,B,w;r=null!==a[0].getImagePosition();q=null!==a[0].getSliceLocation();t=null!==a[0].getImageNumber();a=d.Series.orderByTime(a,b,e,r,q);b=a.orderedKeys;w=[];for(y=0;y<b.length;y+=1)for(G=a.get(b[y]),B=r?d.Series.orderByImagePosition(G,e):q?d.Series.orderBySliceLocation(G):t?d.Series.orderByImageNumber(G):
G,G=0;G<B.length;G+=1)w.push(B[G]);for(G=0;G<w.length;G+=1)w[G].index=G;return w};d.Series.orderByImagePosition=function(a,b){var e,r;e=new d.OrderedMap;for(r=0;r<a.length;r+=1)e.put(a[r].getImagePositionSliceDir(b),a[r]);return e.getOrderedValues()};d.Series.orderBySliceLocation=function(a){var b,e;b=new d.OrderedMap;for(e=0;e<a.length;e+=1)b.put(a[e].getSliceLocation(),a[e]);return b.getOrderedValues()};d.Series.orderByImageNumber=function(a){var b,e;b=new d.OrderedMap;for(e=0;e<a.length;e+=1)b.put(a[e].getImageNumber(),
a[e]);return b.getOrderedValues()};d.Series.hasMatchingSlice=function(a,b,d,e,q){var t=0,y,t=e?b.getImagePositionSliceDir(d):q?b.getSliceLocation():b.getImageNumber();for(b=0;b<a.length;b+=1)if(y=a[b],y=e?y.getImagePositionSliceDir(d):q?y.getSliceLocation():y.getImageNumber(),y===t)return!0;return!1};d.Series.orderByTime=function(a,b,e,r,q){var t,y,G,B;t=new d.OrderedMap;y=1<b&&null!==a[0].getTemporalPosition();b=1<b&&null!==a[0].getTemporalNumber()&&a[0].getTemporalNumber()===b;if(y&&b)for(y=0;y<
a.length;y+=1)e=a[y],r=e.getTemporalPosition(),b=t.get(r),b||(b=[],t.put(r,b)),b.push(e);else{G=new d.OrderedMap;for(y=0;y<a.length;y+=1)null!==a[y]&&(a[y].getImageNumber(),B=y,r?B=a[y].getImagePositionSliceDir(e):q&&(B=a[y].getSliceLocation()),b=G.get(B),null===b&&(b=new d.OrderedMap,G.put(B,b)),b.put(y,a[y]));a=[];y=0;for(G=G.iterator();G.hasNext();)for(b=G.next(),b=b.iterator();b.hasNext();)a[y]=b.next(),y+=1;for(y=0;y<a.length;y+=1)if(null!==a[y]){G=null;for(B=t.iterator();B.hasNext();)if(b=B.next(),
!d.Series.hasMatchingSlice(b,a[y],e,r,q)){G=b;break}null===G&&(G=[],t.put(t.orderedKeys.length,G));G.push(a[y])}}return t};d.Series.prototype.getOrder=function(){var a,b=[];for(a=0;a<this.imagesOriginalOrder.length;a+=1)b[a]=this.imagesOriginalOrder[a].index;return b};d.Series.prototype.toString=function(){return this.images[0].getSeriesId()};d.Series.prototype.getName=function(){var a=this.images[0].getSeriesDescription(),b=this.images[0].getSeriesInstanceUID();return null!==a?a:null!==b?b:null};
d.Series.prototype.addImage=function(a){this.images.push(a)};d.Series.prototype.matchesSeries=function(a){return 0===this.images.length?!0:this.images[0].getSeriesId()===a.getSeriesId()};d.Series.prototype.buildSeries=function(){var a,b,e;this.isMosaic=this.images[0].isMosaic();this.isElscint=this.images[0].isElscint();this.isCompressed=this.images[0].isCompressed();this.numberOfFrames=this.images[0].getNumberOfFrames();this.numberOfFramesInFile=this.images[0].getNumberOfImplicitFrames();this.isMultiFrame=
1<this.numberOfFrames||this.isMosaic&&1<this.images[0].length;this.isImplicitTimeseries=this.isMultiFrameTimeseries=this.isMultiFrameVolume=!1;this.isMultiFrame&&(a=0<this.images[0].getFrameTime(),this.isMosaic?this.isMultiFrameTimeseries=!0:a?this.isMultiFrameTimeseries=!0:1<this.numberOfFramesInFile?(this.isMultiFrameTimeseries=!0,this.numberOfFrames=this.images.length):this.isMultiFrameVolume=!0);if(!this.isMosaic&&1>=this.numberOfFrames){e=this.images[0].getImagePosition()||[];b=e.toString();
for(a=this.numberOfFrames=0;a<this.images.length;a+=1)e=this.images[a].getImagePosition()||[],e.toString()===b&&(this.numberOfFrames+=1);1<this.numberOfFrames&&(this.isImplicitTimeseries=!0)}this.sliceDir=this.images[0].getAcquiredSliceDirection();a=d.Series.useExplicitOrdering?this.images.slice():d.Series.orderDicoms(this.images,this.numberOfFrames,this.sliceDir);b=a[0].getImagePositionSliceDir(this.sliceDir);e=a[a.length-1].getImagePositionSliceDir(this.sliceDir)-b;d.Series.useExplicitOrdering?
this.sliceSense=!1:this.isMosaic?this.sliceSense=!0:this.isMultiFrame?(e=a[0].getSliceLocationVector(),null!==e?(b=a[0].getOrientation(),"Z"===b.charAt(2)?this.sliceSense=0>e[0]-e[e.length-1]:this.sliceSense=0<e[0]-e[e.length-1]):this.sliceSense=0>b?!1:!0):this.sliceSense=this.sliceDir===d.Image.SLICE_DIRECTION_SAGITTAL||this.sliceDir===d.Image.SLICE_DIRECTION_CORONAL?0<e?!1:!0:0<e?!0:!1;this.imagesOriginalOrder=this.images;this.images=a};d.Series.prototype.concatenateImageData=function(a,b){var e,
r,q;r=this.isMosaic?this.getMosaicData(this.images[0],this.images[0].getPixelDataBytes()):this.images[0].getPixelDataBytes();q=this.validatePixelDataLength(this.images[0]);this.images[0].clearPixelData();e=new Uint8Array(new ArrayBuffer(q*this.images.length));e.set(new Uint8Array(r,0,q),0);setTimeout(d.Utils.bind(this,function(){this.concatenateNextImageData(e,q,a,1,b)}),0)};d.Series.prototype.concatenateNextImageData=function(a,b,e,r,q){var t,y;r>=this.images.length?(e&&e.drawProgress(1,"Reading DICOM Images"),
q(a.buffer)):(e&&e.drawProgress(r/this.images.length,"Reading DICOM Images"),t=this.isMosaic?this.getMosaicData(this.images[r],this.images[r].getPixelDataBytes()):this.images[r].getPixelDataBytes(),y=this.validatePixelDataLength(this.images[r]),this.images[r].clearPixelData(),a.set(new Uint8Array(t,0,y),b*r),setTimeout(d.Utils.bind(this,function(){this.concatenateNextImageData(a,b,e,r+1,q)}),0))};d.Series.prototype.validatePixelDataLength=function(a){var b=a.getPixelDataBytes().byteLength,d=a.getCols()*
a.getRows();return 0===b%d?b:d*a.getNumberOfFrames()*a.getNumberOfSamplesPerPixel()*(a.getBitsAllocated()/8)};d.Series.prototype.getMosaicData=function(a,b){var e,r,q,t,y,G,B,w,E,P,da,aa,M,ka,m,fa=0;y=parseInt(this.images[0].getBitsAllocated()/8);E=this.images[0].getMosaicCols()*this.images[0].getMosaicRows();P=parseInt(this.images[0].getRows()/this.images[0].getMosaicRows());da=parseInt(this.images[0].getCols()/this.images[0].getMosaicCols());e=this.images[0].getCols();r=this.images[0].getRows();
q=this.images[0].getMosaicRows();t=this.images[0].getMosaicCols();r=parseInt(r/q);q=parseInt(e/t);aa=new Uint8Array(new ArrayBuffer(E*P*da*y));M=new Uint8Array(b);for(G=0;G<E;G+=1)for(B=0;B<P;B+=1)for(w=0;w<da;w+=1)for(ka=d.Series.getMosaicOffset(t,q,r,e,w,B,G),m=0;m<y;m+=1)aa[fa]=M[ka*y+m],fa+=1;return aa.buffer};"undefined"!==typeof b&&b.exports&&(b.exports=d.Series)},{"./image.js":36,"./iterator.js":37,"./orderedmap.js":39,"./parser.js":40,"./utilities.js":45}],43:[function(a,b,e){var d=d||{};
d.Utils=d.Utils||("undefined"!==typeof a?a("./utilities.js"):null);d.Siemens=d.Siemens||function(a){this.output="";this.data=new DataView(a,0)};d.Siemens.CSA2_MAGIC_NUMBER=[83,86,49,48];d.Siemens.NAME_LENGTH=64;d.Siemens.ELEMENT_CSA1=4112;d.Siemens.ELEMENT_CSA2=4128;d.Siemens.GROUP_CSA=41;d.Siemens.prototype.readHeader=function(){var a,b;try{if(this.data.byteLength>d.Siemens.CSA2_MAGIC_NUMBER.length){b=!0;for(a=0;a<d.Siemens.CSA2_MAGIC_NUMBER.length;a+=1)b&=this.data.getUint8(a)===d.Siemens.CSA2_MAGIC_NUMBER[a];
b?this.readHeaderAtOffset(d.Siemens.CSA2_MAGIC_NUMBER.length+4):this.readHeaderAtOffset(0)}}catch(e){console.log(e)}return this.output};d.Siemens.prototype.readHeaderAtOffset=function(a){var b,e;this.output+="\n";b=d.Utils.swap32(this.data.getUint32(a));if(1>b||128<b)return this.output;a=a+4+4;for(e=0;e<b&&(a=this.readTag(a),-1!==a);e+=1);return this.output};d.Siemens.prototype.readTag=function(a){var b,e;b=this.readString(a,d.Siemens.NAME_LENGTH);a+=d.Siemens.NAME_LENGTH;a=a+4+4;a+=4;e=d.Utils.swap32(this.data.getUint32(a));
a+=4;a+=4;this.output+="    "+b+"=";for(b=0;b<e&&(a=this.readItem(a),-1!==a);b+=1)0!==a%4&&(a+=4-a%4);this.output+="\n";return a};d.Siemens.prototype.readString=function(a,b){var d,e,q="";for(e=0;e<b;e+=1){d=this.data.getUint8(a+e);if(0===d)break;q+=String.fromCharCode(d)}return q};d.Siemens.prototype.readItem=function(a){var b;b=d.Utils.swap32(this.data.getUint32(a));if(a+b>this.data.buffer.length)return-1;a+=16;0<b&&(this.output+=this.readString(a,b)+" ");return a+b};d.Siemens.prototype.canRead=
function(a,b){return a===d.Siemens.GROUP_CSA&&(b===d.Siemens.ELEMENT_CSA1||b===d.Siemens.ELEMENT_CSA2)};"undefined"!==typeof b&&b.exports&&(b.exports=d.Siemens)},{"./utilities.js":45}],44:[function(a,b,e){var d=d||{};d.Utils=d.Utils||("undefined"!==typeof a?a("./utilities.js"):null);d.Dictionary=d.Dictionary||("undefined"!==typeof a?a("./dictionary.js"):null);d.Siemens=d.Siemens||("undefined"!==typeof a?a("./siemens.js"):null);d.Tag=d.Tag||function(a,b,e,r,q,t,y,G){this.group=a;this.element=b;this.vr=
e;this.offsetStart=q;this.offsetValue=t;this.offsetEnd=y;this.preformatted=this.sublist=!1;this.id=d.Tag.createId(a,b);r instanceof Array?(this.value=r,this.sublist=!0):null!==r?(r=new DataView(r),this.value=d.Tag.convertValue(e,r,G),this.value===r&&this.isPrivateData()&&(this.value=d.Tag.convertPrivateValue(a,b,r),this.preformatted=this.value!==r)):this.value=null};d.Tag.PRIVATE_DATA_READERS=[d.Siemens];d.Tag.VR_AE_MAX_LENGTH=16;d.Tag.VR_AS_MAX_LENGTH=4;d.Tag.VR_AT_MAX_LENGTH=4;d.Tag.VR_CS_MAX_LENGTH=
16;d.Tag.VR_DA_MAX_LENGTH=8;d.Tag.VR_DS_MAX_LENGTH=16;d.Tag.VR_DT_MAX_LENGTH=26;d.Tag.VR_FL_MAX_LENGTH=4;d.Tag.VR_FD_MAX_LENGTH=8;d.Tag.VR_IS_MAX_LENGTH=12;d.Tag.VR_LO_MAX_LENGTH=64;d.Tag.VR_LT_MAX_LENGTH=10240;d.Tag.VR_OB_MAX_LENGTH=-1;d.Tag.VR_OD_MAX_LENGTH=-1;d.Tag.VR_OF_MAX_LENGTH=-1;d.Tag.VR_OW_MAX_LENGTH=-1;d.Tag.VR_PN_MAX_LENGTH=320;d.Tag.VR_SH_MAX_LENGTH=16;d.Tag.VR_SL_MAX_LENGTH=4;d.Tag.VR_SS_MAX_LENGTH=2;d.Tag.VR_ST_MAX_LENGTH=1024;d.Tag.VR_TM_MAX_LENGTH=16;d.Tag.VR_UI_MAX_LENGTH=64;d.Tag.VR_UL_MAX_LENGTH=
4;d.Tag.VR_UN_MAX_LENGTH=-1;d.Tag.VR_US_MAX_LENGTH=2;d.Tag.VR_UT_MAX_LENGTH=-1;d.Tag.TAG_TRANSFER_SYNTAX=[2,16];d.Tag.TAG_META_LENGTH=[2,0];d.Tag.TAG_SUBLIST_ITEM=[65534,57344];d.Tag.TAG_SUBLIST_ITEM_DELIM=[65534,57357];d.Tag.TAG_SUBLIST_SEQ_DELIM=[65534,57565];d.Tag.TAG_ROWS=[40,16];d.Tag.TAG_COLS=[40,17];d.Tag.TAG_ACQUISITION_MATRIX=[24,4880];d.Tag.TAG_NUMBER_OF_FRAMES=[40,8];d.Tag.TAG_NUMBER_TEMPORAL_POSITIONS=[32,261];d.Tag.TAG_PIXEL_SPACING=[40,48];d.Tag.TAG_SLICE_THICKNESS=[24,80];d.Tag.TAG_SLICE_GAP=
[24,136];d.Tag.TAG_TR=[24,128];d.Tag.TAG_FRAME_TIME=[24,4195];d.Tag.TAG_BITS_ALLOCATED=[40,256];d.Tag.TAG_BITS_STORED=[40,257];d.Tag.TAG_PIXEL_REPRESENTATION=[40,259];d.Tag.TAG_HIGH_BIT=[40,258];d.Tag.TAG_PHOTOMETRIC_INTERPRETATION=[40,4];d.Tag.TAG_SAMPLES_PER_PIXEL=[40,2];d.Tag.TAG_PLANAR_CONFIG=[40,6];d.Tag.TAG_PALETTE_RED=[40,4609];d.Tag.TAG_PALETTE_GREEN=[40,4610];d.Tag.TAG_PALETTE_BLUE=[40,4611];d.Tag.TAG_DATA_SCALE_SLOPE=[40,4179];d.Tag.TAG_DATA_SCALE_INTERCEPT=[40,4178];d.Tag.TAG_DATA_SCALE_ELSCINT=
[519,4127];d.Tag.TAG_PIXEL_BANDWIDTH=[24,149];d.Tag.TAG_IMAGE_MIN=[40,262];d.Tag.TAG_IMAGE_MAX=[40,263];d.Tag.TAG_WINDOW_CENTER=[40,4176];d.Tag.TAG_WINDOW_WIDTH=[40,4177];d.Tag.TAG_PATIENT_NAME=[16,16];d.Tag.TAG_PATIENT_ID=[16,32];d.Tag.TAG_STUDY_DATE=[8,32];d.Tag.TAG_STUDY_TIME=[8,48];d.Tag.TAG_STUDY_DES=[8,4144];d.Tag.TAG_IMAGE_TYPE=[8,8];d.Tag.TAG_IMAGE_COMMENTS=[32,16384];d.Tag.TAG_SEQUENCE_NAME=[24,36];d.Tag.TAG_MODALITY=[8,96];d.Tag.TAG_FRAME_OF_REF_UID=[32,82];d.Tag.TAG_STUDY_UID=[32,13];d.Tag.TAG_SERIES_DESCRIPTION=
[8,4158];d.Tag.TAG_SERIES_INSTANCE_UID=[32,14];d.Tag.TAG_SERIES_NUMBER=[32,17];d.Tag.TAG_ECHO_NUMBER=[24,134];d.Tag.TAG_TEMPORAL_POSITION=[32,256];d.Tag.TAG_IMAGE_NUM=[32,19];d.Tag.TAG_SLICE_LOCATION=[32,4161];d.Tag.TAG_IMAGE_ORIENTATION=[32,55];d.Tag.TAG_IMAGE_POSITION=[32,50];d.Tag.TAG_SLICE_LOCATION_VECTOR=[24,8197];d.Tag.TAG_LUT_SHAPE=[8272,32];d.Tag.TAG_PIXEL_DATA=[32736,16];d.Tag.createId=function(a,b){var e=d.Utils.dec2hex(a),r=d.Utils.dec2hex(b);return e+r};d.Tag.getUnsignedInteger16=function(a,
b){var d,e,q;e=a.byteLength/2;d=[];for(q=0;q<e;q+=1)d[q]=a.getUint16(2*q,b);return d};d.Tag.getSignedInteger16=function(a,b){var d,e,q;e=a.byteLength/2;d=[];for(q=0;q<e;q+=1)d[q]=a.getInt16(2*q,b);return d};d.Tag.getFloat32=function(a,b){var d,e,q;e=a.byteLength/4;d=[];for(q=0;q<e;q+=1)d[q]=a.getFloat32(4*q,b);return d};d.Tag.getSignedInteger32=function(a,b){var d,e,q;e=a.byteLength/4;d=[];for(q=0;q<e;q+=1)d[q]=a.getInt32(4*q,b);return d};d.Tag.getUnsignedInteger32=function(a,b){var d,e,q;e=a.byteLength/
4;d=[];for(q=0;q<e;q+=1)d[q]=a.getUint32(4*q,b);return d};d.Tag.getFloat64=function(a,b){var d,e,q;if(8>a.byteLength)return 0;e=a.byteLength/8;d=[];for(q=0;q<e;q+=1)d[q]=a.getFloat64(8*q,b);return d};d.Tag.getDoubleElscint=function(a){var b=[],e=[],r;for(r=0;8>r;r+=1)b[r]=a.getUint8(r);e[0]=b[3];e[1]=b[2];e[2]=b[1];e[3]=b[0];e[4]=b[7];e[5]=b[6];e[6]=b[5];e[7]=b[4];return b=[d.Utils.bytesToDouble(e)]};d.Tag.getFixedLengthStringValue=function(a,b){var e,r,q;r=Math.floor(a.byteLength/b);e=[];for(q=0;q<
r;q+=1)e[q]=d.Utils.getStringAt(a,q*b,b);return e};d.Tag.getStringValue=function(a){a=d.Utils.getStringAt(a,0,a.byteLength).split("\\");var b;for(b=0;b<a.length;b+=1)a[b]=d.Utils.trim(a[b]);return a};d.Tag.getDateStringValue=function(a){var b=-1!==d.Tag.getSingleStringValue(a)[0].indexOf(".");a=d.Tag.getFixedLengthStringValue(a,b?10:d.Tag.VR_DA_MAX_LENGTH);var e=null,r=[],q;for(q=0;q<a.length;q+=1)b?(e=a[q].split("."),r[q]=3===e.length?new Date(d.Utils.safeParseInt(e[0]),d.Utils.safeParseInt(e[1])-
1,d.Utils.safeParseInt(e[2])):new Date):r[q]=8===a[q].length?new Date(d.Utils.safeParseInt(a[q].substring(0,4)),d.Utils.safeParseInt(a[q].substring(4,6))-1,d.Utils.safeParseInt(a[q].substring(6,8))):Date.parse(a[q]),d.Utils.isValidDate(r[q])||(r[q]=a[q]);return r};d.Tag.getDateTimeStringValue=function(a){a=d.Tag.getStringValue(a);var b=[],e,r=null,q=null,t=null,y=null,G=null,B=null;for(e=0;e<a.length;e+=1)4<=a[e].length?(r=parseInt(a[e].substring(0,4),10),6<=a[e].length&&(q=d.Utils.safeParseInt(a[e].substring(4,
6))-1),8<=a[e].length&&(t=d.Utils.safeParseInt(a[e].substring(6,8))),10<=a[e].length&&(y=d.Utils.safeParseInt(a[e].substring(8,10))),12<=a[e].length&&(G=d.Utils.safeParseInt(a[e].substring(10,12))),14<=a[e].length&&(B=d.Utils.safeParseInt(a[e].substring(12,14))),b[e]=new Date(r,q,t,y,G,B)):b[e]=Date.parse(a[e]),d.Utils.isValidDate(b[e])||(b[e]=a[e]);return b};d.Tag.getTimeStringValue=function(a,b){var e=d.Tag.getStringValue(a),r=[];if(b){var q=null,t,y=0,G=0,B=0;for(t=0;t<e.length;t+=1)-1!==e[t].indexOf(":")?
(q=e[t].split(":"),y=d.Utils.safeParseInt(q[0]),1<q.length&&(G=d.Utils.safeParseInt(q[1])),2<q.length&&(B=d.Utils.safeParseFloat(q[2]))):(2<=e[t].length&&(y=d.Utils.safeParseInt(e[t].substring(0,2))),4<=e[t].length&&(G=d.Utils.safeParseInt(e[t].substring(2,4))),6<=e[t].length&&(B=d.Utils.safeParseFloat(e[t].substring(4)))),r[t]=Math.round(36E5*y+6E4*G+1E3*B);return r}return e};d.Tag.getDoubleStringValue=function(a){a=d.Tag.getStringValue(a);var b=[],e;for(e=0;e<a.length;e+=1)b[e]=parseFloat(a[e]);
return b};d.Tag.getIntegerStringValue=function(a){a=d.Tag.getStringValue(a);var b=[],e;for(e=0;e<a.length;e+=1)b[e]=parseInt(a[e],10);return b};d.Tag.getSingleStringValue=function(a){return[d.Utils.trim(d.Utils.getStringAt(a,0,a.byteLength))]};d.Tag.getPersonNameStringValue=function(a){a=d.Tag.getStringValue(a);var b=[],e;for(e=0;e<a.length;e+=1)b[e]=a[e].replace("^"," ");return b};d.Tag.convertPrivateValue=function(a,b,e){var r,q;for(r=0;r<d.Tag.PRIVATE_DATA_READERS.length;r+=1)if(q=new d.Tag.PRIVATE_DATA_READERS[r](e.buffer),
q.canRead(a,b))return q.readHeader();return e};d.Tag.convertValue=function(a,b,e){var r=null;"AE"===a?r=d.Tag.getSingleStringValue(b,d.Tag.VR_AE_MAX_LENGTH):"AS"===a?r=d.Tag.getFixedLengthStringValue(b,d.Tag.VR_AS_MAX_LENGTH):"AT"===a?r=d.Tag.getUnsignedInteger16(b,e):"CS"===a?r=d.Tag.getStringValue(b):"DA"===a?r=d.Tag.getDateStringValue(b):"DS"===a?r=d.Tag.getDoubleStringValue(b):"DT"===a?r=d.Tag.getDateTimeStringValue(b):"FL"===a?r=d.Tag.getFloat32(b,e):"FD"===a?r=d.Tag.getFloat64(b,e):"FE"===a?
r=d.Tag.getDoubleElscint(b,e):"IS"===a?r=d.Tag.getIntegerStringValue(b):"LO"===a?r=d.Tag.getStringValue(b):"LT"===a?r=d.Tag.getSingleStringValue(b):"OB"===a?r=b:"OD"===a?r=b:"OF"===a?r=b:"OW"===a?r=b:"PN"===a?r=d.Tag.getPersonNameStringValue(b):"SH"===a?r=d.Tag.getStringValue(b):"SL"===a?r=d.Tag.getSignedInteger32(b,e):"SQ"===a?r=null:"SS"===a?r=d.Tag.getSignedInteger16(b,e):"ST"===a?r=d.Tag.getSingleStringValue(b):"TM"===a?r=d.Tag.getTimeStringValue(b):"UI"===a?r=d.Tag.getStringValue(b):"UL"===a?
r=d.Tag.getUnsignedInteger32(b,e):"UN"===a?r=b:"US"===a?r=d.Tag.getUnsignedInteger16(b,e):"UT"===a&&(r=d.Tag.getSingleStringValue(b));return r};d.Tag.prototype.toString=function(a,b){var e="",r;r=d.Utils.dec2hex(this.group);var q=d.Utils.dec2hex(this.element),q="("+r+","+q+")",t="",y;void 0===a&&(a=0);y="";for(r=0;r<a;r+=1)y=b?y+"&nbsp;&nbsp;":y+"  ";if(this.sublist)for(r=0;r<this.value.length;r+=1)e+="\n"+this.value[r].toString(a+1,b);else e="SQ"===this.vr?"":this.isPixelData()?"":this.value?b&&
this.preformatted?"[<pre>"+this.value+"</pre>]":"["+this.value+"]":"";this.isSublistItem()?q="Sequence Item":this.isSublistItemDelim()?q="Sequence Item Delimiter":this.isSequenceDelim()?q="Sequence Delimiter":this.isPixelData()?q="Pixel Data":t=d.Utils.convertCamcelCaseToTitleCase(d.Dictionary.getDescription(this.group,this.element));return b?y+"<span style='color:#B5CBD3'>"+q+"</span>&nbsp;&nbsp;&nbsp;"+t+"&nbsp;&nbsp;&nbsp;"+e:y+" "+q+" "+t+" "+e};d.Tag.prototype.toHTMLString=function(a){return this.toString(a,
!0)};d.Tag.prototype.isTransformSyntax=function(){return this.group===d.Tag.TAG_TRANSFER_SYNTAX[0]&&this.element===d.Tag.TAG_TRANSFER_SYNTAX[1]};d.Tag.prototype.isPixelData=function(){return this.group===d.Tag.TAG_PIXEL_DATA[0]&&this.element===d.Tag.TAG_PIXEL_DATA[1]};d.Tag.prototype.isPrivateData=function(){return 1===(this.group&1)};d.Tag.prototype.hasInterpretedPrivateData=function(){return this.isPrivateData()&&d.Utils.isString(this.value)};d.Tag.prototype.isSublistItem=function(){return this.group===
d.Tag.TAG_SUBLIST_ITEM[0]&&this.element===d.Tag.TAG_SUBLIST_ITEM[1]};d.Tag.prototype.isSublistItemDelim=function(){return this.group===d.Tag.TAG_SUBLIST_ITEM_DELIM[0]&&this.element===d.Tag.TAG_SUBLIST_ITEM_DELIM[1]};d.Tag.prototype.isSequenceDelim=function(){return this.group===d.Tag.TAG_SUBLIST_SEQ_DELIM[0]&&this.element===d.Tag.TAG_SUBLIST_SEQ_DELIM[1]};d.Tag.prototype.isMetaLength=function(){return this.group===d.Tag.TAG_META_LENGTH[0]&&this.element===d.Tag.TAG_META_LENGTH[1]};"undefined"!==typeof b&&
b.exports&&(b.exports=d.Tag)},{"./dictionary.js":35,"./siemens.js":43,"./utilities.js":45}],45:[function(a,b,e){var d=d||{};d.Utils=d.Utils||{};d.Utils.crcTable=null;d.Utils.MAX_VALUE=9007199254740991;d.Utils.MIN_VALUE=-9007199254740991;d.Utils.dec2hex=function(a){return(a+65536).toString(16).substr(-4).toUpperCase()};d.Utils.createArray=function(a){var b=Array(a||0),e=a;if(1<arguments.length)for(var r=Array.prototype.slice.call(arguments,1);e--;)b[a-1-e]=d.Utils.createArray.apply(this,r);return b};
d.Utils.getStringAt=function(a,b,d){var e="",q,t;for(q=0;q<d;q+=1)t=a.getUint8(b+q),0!==t&&(e+=String.fromCharCode(t));return e};d.Utils.trim=function(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"")};d.Utils.stripLeadingZeros=function(a){return a.replace(/^[0]+/g,"")};d.Utils.safeParseInt=function(a){a=d.Utils.stripLeadingZeros(a);return 0<a.length?parseInt(a,10):0};d.Utils.convertCamcelCaseToTitleCase=function(a){a=a.replace(/([A-Z][a-z])/g," $1");return d.Utils.trim(a.charAt(0).toUpperCase()+
a.slice(1))};d.Utils.safeParseFloat=function(a){a=d.Utils.stripLeadingZeros(a);return 0<a.length?parseFloat(a):0};d.Utils.bytesToDouble=function(a){var b=(a[0]&128)>>7,d=(a[0]&127)<<4|(a[1]&240)>>4;if(0==d)return 0;if(2047==d)return b?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;d=Math.pow(2,d-1023-52);a=a[7]+a[6]*Math.pow(2,8)+a[5]*Math.pow(2,16)+a[4]*Math.pow(2,24)+a[3]*Math.pow(2,32)+a[2]*Math.pow(2,40)+(a[1]&15)*Math.pow(2,48)+Math.pow(2,52);return Math.pow(-1,b)*a*d};d.Utils.concatArrayBuffers=
function(a,b){var d=new Uint8Array(a.byteLength+b.byteLength);d.set(new Uint8Array(a),0);d.set(new Uint8Array(b),a.byteLength);return d.buffer};d.Utils.concatArrayBuffers2=function(a){var b=0,d=0,e;for(e=0;e<a.length;e+=1)b+=a[e].byteLength;b=new Uint8Array(b);for(e=0;e<a.length;e+=1)b.set(new Uint8Array(a[e]),d),d+=a[e].byteLength;return b.buffer};d.Utils.fillBuffer=function(a,b,d,e){if(1===e)for(e=0;e<a.length;e+=1)b.setUint8(d+e,a[e]);else if(2===e)for(e=0;e<a.length;e+=1)b.setUint16(d+2*e,a[e],
!0)};d.Utils.fillBufferRGB=function(a,b,d){var e,q,t,y,G=parseInt(a.length/3);for(y=0;y<G;y+=1)e=a[3*y],q=a[3*y+1],t=a[3*y+2],b.setUint8(d+y,parseInt((e+t+q)/3),!0)};d.Utils.bind=function(a,b,d,e){if(2===arguments.length)return function(){return b.apply(a,arguments)};var q=Array.prototype.slice;return function(){var t=d||arguments;!0===e?(t=q.call(arguments,0),t=t.concat(d)):"number"===typeof e&&(t=q.call(arguments,0),Ext.Array.insert(t,e,d));return b.apply(a||window,t)}};d.Utils.toArrayBuffer=function(a){var b,
d,e;b=new ArrayBuffer(a.length);d=new Uint8Array(b);for(e=0;e<a.length;e+=1)d[e]=a[e];return b};d.Utils.isString=function(a){return"string"===typeof a||a instanceof String};d.Utils.isValidDate=function(a){return"[object Date]"===Object.prototype.toString.call(a)?isNaN(a.getTime())?!1:!0:!1};d.Utils.swap32=function(a){return(a&255)<<24|(a&65280)<<8|a>>8&65280|a>>24&255};d.Utils.swap16=function(a){return((a&255)<<8|a>>8&255)<<16>>16};d.Utils.makeCRCTable=function(){for(var a,b=[],d=0;256>d;d++){a=d;
for(var e=0;8>e;e++)a=a&1?3988292384^a>>>1:a>>>1;b[d]=a}return b};d.Utils.crc32=function(a){for(var b=d.Utils.crcTable||(d.Utils.crcTable=d.Utils.makeCRCTable()),e=-1,r=0;r<a.byteLength;r++)e=e>>>8^b[(e^a.getUint8(r))&255];return(e^-1)>>>0};d.Utils.createBitMask=function(a,b,d){b=4294967295>>>8*(4-a)+(8*a-b);d?1==a?b&=255:2==a?b&=65535:4==a?b&=4294967295:8==a&&(b=4294967295):b=4294967295;return b};"undefined"!==typeof b&&b.exports&&(b.exports=d.Utils)},{}]},{},[38])(38)});
var Base64Binary={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",decodeArrayBuffer:function(a){var b=this._keyStr.indexOf(a.charAt(a.length-1)),e=this._keyStr.indexOf(a.charAt(a.length-2)),d=a.length/4*3;64==b&&d--;64==e&&d--;b=new ArrayBuffer(d);this.decode(a,b,d);return b},decode:function(a,b,e){var d,f,k,h,r,q=0,t=0;b=b?new Uint8Array(b):new Uint8Array(e);a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(q=0;q<e;q+=3)d=this._keyStr.indexOf(a.charAt(t++)),f=this._keyStr.indexOf(a.charAt(t++)),
h=this._keyStr.indexOf(a.charAt(t++)),r=this._keyStr.indexOf(a.charAt(t++)),d=d<<2|f>>4,f=(f&15)<<4|h>>2,k=(h&3)<<6|r,b[q]=d,64!=h&&(b[q+1]=f),64!=r&&(b[q+2]=k);return b}};
!function(a,b){"undefined"!=typeof module&&module.exports?module.exports.browser=b():"function"==typeof define?define(b):this[a]=b()}("bowser",function(){function a(a,b,d){return(a=a.match(b))&&a.length>d&&a[d]||0}function b(b){var d=/(msie|trident)/i.test(b),h=/chrome|crios/i.test(b),r=/phantom/i.test(b),q=/iphone/i.test(b),t=/ipad/i.test(b),y=/ipod/i.test(b),G=/touchpad/i.test(b),B=/silk/i.test(b),w=/safari/i.test(b)&&!h&&!r&&!B,E=/android/i.test(b),P=/opera/i.test(b)||/opr/i.test(b),da=/firefox/i.test(b),
aa=/gecko\//i.test(b),M=/seamonkey\//i.test(b),ka=/webos/i.test(b),m=/windows phone/i.test(b),fa=/blackberry/i.test(b),ba=/version\/(\d+(\.\d+)?)/i,Z=/firefox[ \/](\d+(\.\d+)?)/i,X={};y&&(q=!1);if(m)X={name:"Windows Phone",windowsphone:!0,msie:!0,mobile:!0,version:a(b,/iemobile\/(\d+(\.\d+)?)/i,1)};else if(P)e=a(b,ba,1)||a(b,/opr\/(\d+(\.\d+)?)/i,1)||a(b,/opera[ \/](\d+(\.\d+)?)/i,1),X={name:"Opera",opera:!0,version:e},E&&(X.android=!0,X.mobile=!0),h&&(X.webkit=!0);else if(d)X={name:"Internet Explorer",
msie:!0,version:a(b,/(msie |rv:)(\d+(\.\d+)?)/i,2)};else if(h){X={name:"Chrome",webkit:!0,chrome:!0,version:a(b,/(?:chrome|crios)\/(\d+(\.\d+)?)/i,1)};E&&(X.android=!0);if(t||y||q)X[q?"iphone":t?"ipad":"ipod"]=!0,X.ios=!0;if(X.android||X.ios)X.mobile=!0}else r?X={name:"PhantomJS",webkit:!0,phantom:!0,version:a(b,/phantomjs\/(\d+(\.\d+)?)/i,1)}:G?X={name:"TouchPad",webkit:!0,touchpad:!0,version:a(b,/touchpad\/(\d+(\.\d+)?)/i,1)}:B?X={name:"Amazon Silk",webkit:!0,android:!0,mobile:!0,version:a(b,/silk\/(\d+(\.\d+)?)/i,
1)}:q||t||y?(X={name:q?"iPhone":t?"iPad":"iPod",webkit:!0,mobile:!0,ios:!0},X[q?"iphone":t?"ipad":"ipod"]=!0,ba.test(b)&&(X.version=a(b,ba,1))):fa?(X={name:"BlackBerry",blackberry:!0,mobile:!0},(e=a(b,ba,1))?(X.version=e,X.webkit=!0):X.version=a(b,/blackberry[\d]+\/(\d+(\.\d+)?)/i,1)):ka?X={name:"WebOS",mobile:!0,webkit:!0,webos:!0,version:a(b,ba,1)||a(b,/wosbrowser\/(\d+(\.\d+)?)/i,1)}:aa?(X={name:"Gecko",gecko:!0,mozilla:!0,version:a(b,Z,1)},M?(X.name="SeaMonkey",X.seamonkey=!0,X.version=a(b,/seamonkey\/(\d+(\.\d+)?)/i,
1)):da&&(X.name="Firefox",X.firefox=!0),E?(X.android=!0,X.mobile=!0):!E&&da&&/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(b)&&(X.firefoxos=!0,X.mobile=!0)):E?X={name:"Android",webkit:!0,android:!0,mobile:!0,version:a(b,ba,1)}:w&&(X={name:"Safari",webkit:!0,safari:!0,version:a(b,ba,1)});if(E){if(b=a(b,/android[ \/](\d+(\.\d+)*)/i,1))X.osversion=b}else if(q||t||y){if(b=a(b,/os (\d+([_\s]\d+)*) like mac os x/i,1))X.osversion=b.replace(/[_\s]/g,".")}else m&&(b=a(b,/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,
1))&&(X.osversion=b);X.msie&&9<=X.version||X.chrome&&20<=X.version||X.firefox&&10<=X.version||X.safari&&5<=X.version||X.opera&&10<=X.version||X.ios&&X.osversion&&6<=X.osversion.split(".")[0]?X.a=!0:X.msie&&9>X.version||X.chrome&&20>X.version||X.firefox&&10>X.version||X.safari&&5>X.version||X.opera&&10>X.version||X.ios&&X.osversion&&6>X.osversion.split(".")[0]?X.c=!0:X.x=!0;return X}var e,d=b("undefined"!==typeof navigator?navigator.userAgent:"");d._detect=b;return d});"use strict";
var numeric={inv:function(a){var b=numeric.dim(a),e=Math.abs,d=b[0],b=b[1],f=a.clone(),k,h,r=numeric.identity(d),q,t,y,G,B;for(G=0;G<b;++G){h=a=-1;for(y=G;y!==d;++y)B=e(f[y][G]),B>h&&(a=y,h=B);h=f[a];f[a]=f[G];f[G]=h;t=r[a];r[a]=r[G];r[G]=t;a=h[G];for(B=G;B!==b;++B)h[B]/=a;for(B=b-1;-1!==B;--B)t[B]/=a;for(y=d-1;-1!==y;--y)if(y!==G){k=f[y];q=r[y];a=k[G];for(B=G+1;B!==b;++B)k[B]-=h[B]*a;for(B=b-1;0<B;--B)q[B]-=t[B]*a,--B,q[B]-=t[B]*a;0===B&&(q[0]-=t[0]*a)}}return r},dim:function(a){var b,e;return"object"===
typeof a?(b=a[0],"object"===typeof b?(e=b[0],"object"===typeof e?numeric._dim(a):[a.length,b.length]):[a.length]):[]},_dim:function(a){for(var b=[];"object"===typeof a;)b.push(a.length),a=a[0];return b},identity:function(a){return numeric.diag(numeric.rep([a],1))},rep:function(a,b,e){"undefined"===typeof e&&(e=0);var d=a[e],f=Array(d);if(e===a.length-1){for(d-=2;0<=d;d-=2)f[d+1]=b,f[d]=b;-1===d&&(f[0]=b);return f}for(--d;0<=d;d--)f[d]=numeric.rep(a,b,e+1);return f},diag:function(a){var b,e,d,f=a.length,
k=Array(f),h;for(b=f-1;0<=b;b--){h=Array(f);e=b+2;for(d=f-1;d>=e;d-=2)h[d]=0,h[d-1]=0;d>b&&(h[d]=0);h[b]=a[b];for(d=b-1;1<=d;d-=2)h[d]=0,h[d-1]=0;0===d&&(h[0]=0);k[b]=h}return k}};
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;"undefined"!=typeof window?b=window:"undefined"!=typeof global?b=global:"undefined"!=typeof self&&(b=self);b.pako=a()}}(function(){return function b(e,d,f){function k(q,r){if(!d[q]){if(!e[q]){var y="function"==typeof require&&require;if(!r&&y)return y(q,!0);if(h)return h(q,!0);throw Error("Cannot find module '"+q+"'");}y=d[q]={exports:{}};e[q][0].call(y.exports,
function(b){var d=e[q][1][b];return k(d?d:b)},y,y.exports,b,e,d,f)}return d[q].exports}for(var h="function"==typeof require&&require,r=0;r<f.length;r++)k(f[r]);return k}({1:[function(b,e,d){function f(b,d,f,e){d=new B(d);d.onFinish=e;d.push(b,!0,f)}var k=b("./zlib/inflate.js"),h=b("./utils/common"),r=b("./utils/strings"),q=b("./zlib/constants"),t=b("./zlib/messages"),y=b("./zlib/zstream"),G=b("./zlib/gzheader"),B=function(b){var d=this.options=h.assign({chunkSize:16384,windowBits:0,to:""},b||{});
d.raw&&0<=d.windowBits&&16>d.windowBits&&(d.windowBits=-d.windowBits,0===d.windowBits&&(d.windowBits=-15));!(0<=d.windowBits&&16>d.windowBits)||b&&b.windowBits||(d.windowBits+=32);15<d.windowBits&&48>d.windowBits&&0===(d.windowBits&15)&&(d.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new y;this.strm.avail_out=0;b=k.inflateInit2(this.strm,d.windowBits);if(b!==q.Z_OK)throw Error(t[b]);this.header=new G;k.inflateGetHeader(this.strm,this.header)};B.prototype.push=function(b,
d,f){var e=this.strm;d=this.options.chunkSize;if(this.ended)return!1;e.input="string"===typeof b?r.binstring2buf(b):b;e.next_in=0;e.avail_in=e.input.length;b=(new DataView(b.buffer)).getUint32(b.byteLength-4,!0);this.progressMeter=f;this.progressIterations=b/d;this.progressIndex=0;this.progressNextGoal=.25;this.progressMeter&&this.progressMeter.drawProgress(.1,"Unpacking");setTimeout(this.pushProcess.bind(this),0)};B.prototype.pushProcess=function(){var b=this.strm,d=this.options.chunkSize,f,e,r;
do{0===b.avail_out&&(b.output=new h.Buf8(d),b.next_out=0,b.avail_out=d);f=k.inflate(b,q.Z_NO_FLUSH);if(f!==q.Z_STREAM_END&&f!==q.Z_OK)return this.onEnd(f),this.ended=!0,!1;if(b.next_out&&(0===b.avail_out||f===q.Z_STREAM_END||0===b.avail_in&&e===q.Z_FINISH))this.onData(h.shrinkBuf(b.output,b.next_out));this.progressIndex+=1;r=this.progressIndex/this.progressIterations;this.progressMeter&&this.progressMeter.drawProgress(r,"Unpacking")}while(r<this.progressNextGoal&&(0<b.avail_in||0===b.avail_out)&&
f!==q.Z_STREAM_END);(0<b.avail_in||0===b.avail_out)&&f!==q.Z_STREAM_END?(this.progressNextGoal+=.1,setTimeout(this.pushProcess.bind(this),0)):(f===q.Z_STREAM_END&&(e=q.Z_FINISH),e===q.Z_FINISH&&(f=k.inflateEnd(this.strm),this.onEnd(f),this.ended=!0),this.onFinish(this.result))};B.prototype.onData=function(b){this.chunks.push(b)};B.prototype.onEnd=function(b){b===q.Z_OK&&(this.result="string"===this.options.to?this.chunks.join(""):h.flattenChunks(this.chunks));this.chunks=[];this.err=b;this.msg=this.strm.msg};
d.Inflate=B;d.inflate=f;d.inflateRaw=function(b,d){d=d||{};d.raw=!0;return f(b,d)};d.ungzip=f},{"./utils/common":2,"./utils/strings":3,"./zlib/constants":5,"./zlib/gzheader":7,"./zlib/inflate.js":9,"./zlib/messages":11,"./zlib/zstream":12}],2:[function(b,e,d){b="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Int32Array;d.assign=function(b){for(var d=Array.prototype.slice.call(arguments,1);d.length;){var f=d.shift();if(f){if("object"!==typeof f)throw new TypeError(f+
"must be non-object");for(var e in f)f.hasOwnProperty(e)&&(b[e]=f[e])}}return b};d.shrinkBuf=function(b,d){if(b.length===d)return b;if(b.subarray)return b.subarray(0,d);b.length=d;return b};var f={arraySet:function(b,d,f,e,k){if(d.subarray&&b.subarray)b.set(d.subarray(f,f+e),k);else for(var G=0;G<e;G++)b[k+G]=d[f+G]},flattenChunks:function(b){var d,f,e,k,G;d=e=0;for(f=b.length;d<f;d++)e+=b[d].length;G=new Uint8Array(e);d=e=0;for(f=b.length;d<f;d++)k=b[d],G.set(k,e),e+=k.length;return G}},k={arraySet:function(b,
d,f,e,k){for(var G=0;G<e;G++)b[k+G]=d[f+G]},flattenChunks:function(b){return[].concat.apply([],b)}};d.setTyped=function(b){b?(d.Buf8=Uint8Array,d.Buf16=Uint16Array,d.Buf32=Int32Array,d.assign(d,f)):(d.Buf8=Array,d.Buf16=Array,d.Buf32=Array,d.assign(d,k))};d.setTyped(b)},{}],3:[function(b,e,d){function f(b,d){if(65537>d&&(b.subarray&&r||!b.subarray&&h))return String.fromCharCode.apply(null,k.shrinkBuf(b,d));for(var f="",e=0;e<d;e++)f+=String.fromCharCode(b[e]);return f}var k=b("./common"),h=!0,r=!0;
try{String.fromCharCode.apply(null,[0])}catch(q){h=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){r=!1}var y=new k.Buf8(256);for(b=0;256>b;b++)y[b]=252<=b?6:248<=b?5:240<=b?4:224<=b?3:192<=b?2:1;y[254]=y[254]=1;d.string2buf=function(b){var d,f,e,h,q,r=b.length,t=0;for(h=0;h<r;h++)f=b.charCodeAt(h),55296===(f&64512)&&h+1<r&&(e=b.charCodeAt(h+1),56320===(e&64512)&&(f=65536+(f-55296<<10)+(e-56320),h++)),t+=128>f?1:2048>f?2:65536>f?3:4;d=new k.Buf8(t);for(h=q=0;q<t;h++)f=b.charCodeAt(h),
55296===(f&64512)&&h+1<r&&(e=b.charCodeAt(h+1),56320===(e&64512)&&(f=65536+(f-55296<<10)+(e-56320),h++)),128>f?d[q++]=f:(2048>f?d[q++]=192|f>>>6:(65536>f?d[q++]=224|f>>>12:(d[q++]=240|f>>>18,d[q++]=128|f>>>12&63),d[q++]=128|f>>>6&63),d[q++]=128|f&63);return d};d.buf2binstring=function(b){return f(b,b.length)};d.binstring2buf=function(b){for(var d=new k.Buf8(b.length),f=0,e=d.length;f<e;f++)d[f]=b.charCodeAt(f);return d};d.buf2string=function(b,d){var e,h,k,q,r=d||b.length,t=Array(2*r);for(e=h=0;e<
r;)if(k=b[e++],128>k)t[h++]=k;else if(q=y[k],4<q)t[h++]=65533,e+=q-1;else{for(k&=2===q?31:3===q?15:7;1<q&&e<r;)k=k<<6|b[e++]&63,q--;1<q?t[h++]=65533:65536>k?t[h++]=k:(k-=65536,t[h++]=55296|k>>10&1023,t[h++]=56320|k&1023)}return f(t,h)};d.utf8border=function(b,d){var f;d=d||b.length;d>b.length&&(d=b.length);for(f=d-1;0<=f&&128===(b[f]&192);)f--;return 0>f||0===f?d:f+y[b[f]]>d?f:d}},{"./common":2}],4:[function(b,e,d){e.exports=function(b,d,e,r){var q=b&65535|0;b=b>>>16&65535|0;for(var t=0;0!==e;){t=
2E3<e?2E3:e;e-=t;do q=q+d[r++]|0,b=b+q|0;while(--t);q%=65521;b%=65521}return q|b<<16|0}},{}],5:[function(b,e,d){e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},
{}],6:[function(b,e,d){var f=function(){for(var b,d=[],f=0;256>f;f++){b=f;for(var e=0;8>e;e++)b=b&1?3988292384^b>>>1:b>>>1;d[f]=b}return d}();e.exports=function(b,d,e,q){e=q+e;for(b^=-1;q<e;q++)b=b>>>8^f[(b^d[q])&255];return b^-1}},{}],7:[function(b,e,d){e.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],8:[function(b,e,d){e.exports=function(b,d){var e,r,q,t,y,G,B,w,E,P,da,aa,M,ka,m,fa,ba,Z,X,U,x,
n,z,Y;e=b.state;r=b.next_in;z=b.input;q=r+(b.avail_in-5);t=b.next_out;Y=b.output;y=t-(d-b.avail_out);G=t+(b.avail_out-257);B=e.dmax;w=e.wsize;E=e.whave;P=e.wnext;da=e.window;aa=e.hold;M=e.bits;ka=e.lencode;m=e.distcode;fa=(1<<e.lenbits)-1;ba=(1<<e.distbits)-1;a:do b:for(15>M&&(aa+=z[r++]<<M,M+=8,aa+=z[r++]<<M,M+=8),Z=ka[aa&fa];;){X=Z>>>24;aa>>>=X;M-=X;X=Z>>>16&255;if(0===X)Y[t++]=Z&65535;else if(X&16){U=Z&65535;if(X&=15)M<X&&(aa+=z[r++]<<M,M+=8),U+=aa&(1<<X)-1,aa>>>=X,M-=X;15>M&&(aa+=z[r++]<<M,M+=
8,aa+=z[r++]<<M,M+=8);Z=m[aa&ba];c:for(;;){X=Z>>>24;aa>>>=X;M-=X;X=Z>>>16&255;if(X&16){Z&=65535;X&=15;M<X&&(aa+=z[r++]<<M,M+=8,M<X&&(aa+=z[r++]<<M,M+=8));Z+=aa&(1<<X)-1;if(Z>B){b.msg="invalid distance too far back";e.mode=30;break a}aa>>>=X;M-=X;X=t-y;if(Z>X){X=Z-X;if(X>E&&e.sane){b.msg="invalid distance too far back";e.mode=30;break a}x=0;n=da;if(0===P){if(x+=w-X,X<U){U-=X;do Y[t++]=da[x++];while(--X);x=t-Z;n=Y}}else if(P<X){if(x+=w+P-X,X-=P,X<U){U-=X;do Y[t++]=da[x++];while(--X);x=0;if(P<U){X=P;
U-=X;do Y[t++]=da[x++];while(--X);x=t-Z;n=Y}}}else if(x+=P-X,X<U){U-=X;do Y[t++]=da[x++];while(--X);x=t-Z;n=Y}for(;2<U;)Y[t++]=n[x++],Y[t++]=n[x++],Y[t++]=n[x++],U-=3;U&&(Y[t++]=n[x++],1<U&&(Y[t++]=n[x++]))}else{x=t-Z;do Y[t++]=Y[x++],Y[t++]=Y[x++],Y[t++]=Y[x++],U-=3;while(2<U);U&&(Y[t++]=Y[x++],1<U&&(Y[t++]=Y[x++]))}}else if(0===(X&64)){Z=m[(Z&65535)+(aa&(1<<X)-1)];continue c}else{b.msg="invalid distance code";e.mode=30;break a}break}}else if(0===(X&64)){Z=ka[(Z&65535)+(aa&(1<<X)-1)];continue b}else{X&
32?e.mode=12:(b.msg="invalid literal/length code",e.mode=30);break a}break}while(r<q&&t<G);U=M>>3;r-=U;M-=U<<3;b.next_in=r;b.next_out=t;b.avail_in=r<q?5+(q-r):5-(r-q);b.avail_out=t<G?257+(G-t):257-(t-G);e.hold=aa&(1<<M)-1;e.bits=M}},{}],9:[function(b,e,d){function f(b){return(b>>>24&255)+(b>>>8&65280)+((b&65280)<<8)+((b&255)<<24)}function k(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=
0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new y.Buf16(320);this.work=new y.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function h(b){var d;if(!b||!b.state)return-2;d=b.state;b.total_in=b.total_out=d.total=0;b.msg="";d.wrap&&(b.adler=d.wrap&1);d.mode=1;d.last=0;d.havedict=0;d.dmax=32768;d.head=null;d.hold=0;d.bits=
0;d.lencode=d.lendyn=new y.Buf32(852);d.distcode=d.distdyn=new y.Buf32(592);d.sane=1;d.back=-1;return 0}function r(b){var d;if(!b||!b.state)return-2;d=b.state;d.wsize=0;d.whave=0;d.wnext=0;return h(b)}function q(b,d){var f,e;if(!b||!b.state)return-2;e=b.state;0>d?(f=0,d=-d):(f=(d>>4)+1,48>d&&(d&=15));if(d&&(8>d||15<d))return-2;null!==e.window&&e.wbits!==d&&(e.window=null);e.wrap=f;e.wbits=d;return r(b)}function t(b,d){var f;if(!b)return-2;f=new k;b.state=f;f.window=null;f=q(b,d);0!==f&&(b.state=null);
return f}var y=b("../utils/common"),G=b("./adler32"),B=b("./crc32"),w=b("./inffast"),E=b("./inftrees"),P=!0,da,aa;d.inflateReset=r;d.inflateReset2=q;d.inflateResetKeep=h;d.inflateInit=function(b){return t(b,15)};d.inflateInit2=t;d.inflate=function(b,d){var e,h,k,q,r,t,x,n,z,Y,D,A,L,la,ja=0,Ia,va,O,wa=new y.Buf8(4),Ua=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||!b.output||!b.input&&0!==b.avail_in)return-2;e=b.state;12===e.mode&&(e.mode=13);r=b.next_out;k=b.output;x=b.avail_out;
q=b.next_in;h=b.input;t=b.avail_in;n=e.hold;z=e.bits;Y=t;D=x;O=0;a:for(;;)switch(e.mode){case 1:if(0===e.wrap){e.mode=13;break}for(;16>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}if(e.wrap&2&&35615===n){e.check=0;wa[0]=n&255;wa[1]=n>>>8&255;e.check=B(e.check,wa,2,0);z=n=0;e.mode=2;break}e.flags=0;e.head&&(e.head.done=!1);if(!(e.wrap&1)||(((n&255)<<8)+(n>>8))%31){b.msg="incorrect header check";e.mode=30;break}if(8!==(n&15)){b.msg="unknown compression method";e.mode=30;break}n>>>=4;z-=4;L=(n&15)+8;if(0===
e.wbits)e.wbits=L;else if(L>e.wbits){b.msg="invalid window size";e.mode=30;break}e.dmax=1<<L;b.adler=e.check=1;e.mode=n&512?10:12;z=n=0;break;case 2:for(;16>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}e.flags=n;if(8!==(e.flags&255)){b.msg="unknown compression method";e.mode=30;break}if(e.flags&57344){b.msg="unknown header flags set";e.mode=30;break}e.head&&(e.head.text=n>>8&1);e.flags&512&&(wa[0]=n&255,wa[1]=n>>>8&255,e.check=B(e.check,wa,2,0));z=n=0;e.mode=3;case 3:for(;32>z;){if(0===t)break a;t--;
n+=h[q++]<<z;z+=8}e.head&&(e.head.time=n);e.flags&512&&(wa[0]=n&255,wa[1]=n>>>8&255,wa[2]=n>>>16&255,wa[3]=n>>>24&255,e.check=B(e.check,wa,4,0));z=n=0;e.mode=4;case 4:for(;16>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}e.head&&(e.head.xflags=n&255,e.head.os=n>>8);e.flags&512&&(wa[0]=n&255,wa[1]=n>>>8&255,e.check=B(e.check,wa,2,0));z=n=0;e.mode=5;case 5:if(e.flags&1024){for(;16>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}e.length=n;e.head&&(e.head.extra_len=n);e.flags&512&&(wa[0]=n&255,wa[1]=n>>>8&255,
e.check=B(e.check,wa,2,0));z=n=0}else e.head&&(e.head.extra=null);e.mode=6;case 6:if(e.flags&1024&&(A=e.length,A>t&&(A=t),A&&(e.head&&(L=e.head.extra_len-e.length,e.head.extra||(e.head.extra=Array(e.head.extra_len)),y.arraySet(e.head.extra,h,q,A,L)),e.flags&512&&(e.check=B(e.check,h,A,q)),t-=A,q+=A,e.length-=A),e.length))break a;e.length=0;e.mode=7;case 7:if(e.flags&2048){if(0===t)break a;A=0;do L=h[q+A++],e.head&&L&&65536>e.length&&(e.head.name+=String.fromCharCode(L));while(L&&A<t);e.flags&512&&
(e.check=B(e.check,h,A,q));t-=A;q+=A;if(L)break a}else e.head&&(e.head.name=null);e.length=0;e.mode=8;case 8:if(e.flags&4096){if(0===t)break a;A=0;do L=h[q+A++],e.head&&L&&65536>e.length&&(e.head.comment+=String.fromCharCode(L));while(L&&A<t);e.flags&512&&(e.check=B(e.check,h,A,q));t-=A;q+=A;if(L)break a}else e.head&&(e.head.comment=null);e.mode=9;case 9:if(e.flags&512){for(;16>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}if(n!==(e.check&65535)){b.msg="header crc mismatch";e.mode=30;break}z=n=0}e.head&&
(e.head.hcrc=e.flags>>9&1,e.head.done=!0);b.adler=e.check=0;e.mode=12;break;case 10:for(;32>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}b.adler=e.check=f(n);z=n=0;e.mode=11;case 11:if(0===e.havedict)return b.next_out=r,b.avail_out=x,b.next_in=q,b.avail_in=t,e.hold=n,e.bits=z,2;b.adler=e.check=1;e.mode=12;case 12:if(5===d||6===d)break a;case 13:if(e.last){n>>>=z&7;z-=z&7;e.mode=27;break}for(;3>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}e.last=n&1;n>>>=1;--z;switch(n&3){case 0:e.mode=14;break;case 1:A=
e;if(P){L=void 0;da=new y.Buf32(512);aa=new y.Buf32(32);for(L=0;144>L;)A.lens[L++]=8;for(;256>L;)A.lens[L++]=9;for(;280>L;)A.lens[L++]=7;for(;288>L;)A.lens[L++]=8;E(1,A.lens,0,288,da,0,A.work,{bits:9});for(L=0;32>L;)A.lens[L++]=5;E(2,A.lens,0,32,aa,0,A.work,{bits:5});P=!1}A.lencode=da;A.lenbits=9;A.distcode=aa;A.distbits=5;e.mode=20;if(6===d){n>>>=2;z-=2;break a}break;case 2:e.mode=17;break;case 3:b.msg="invalid block type",e.mode=30}n>>>=2;z-=2;break;case 14:n>>>=z&7;for(z-=z&7;32>z;){if(0===t)break a;
t--;n+=h[q++]<<z;z+=8}if((n&65535)!==(n>>>16^65535)){b.msg="invalid stored block lengths";e.mode=30;break}e.length=n&65535;z=n=0;e.mode=15;if(6===d)break a;case 15:e.mode=16;case 16:if(A=e.length){A>t&&(A=t);A>x&&(A=x);if(0===A)break a;y.arraySet(k,h,q,A,r);t-=A;q+=A;x-=A;r+=A;e.length-=A;break}e.mode=12;break;case 17:for(;14>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}e.nlen=(n&31)+257;n>>>=5;z-=5;e.ndist=(n&31)+1;n>>>=5;z-=5;e.ncode=(n&15)+4;n>>>=4;z-=4;if(286<e.nlen||30<e.ndist){b.msg="too many length or distance symbols";
e.mode=30;break}e.have=0;e.mode=18;case 18:for(;e.have<e.ncode;){for(;3>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}e.lens[Ua[e.have++]]=n&7;n>>>=3;z-=3}for(;19>e.have;)e.lens[Ua[e.have++]]=0;e.lencode=e.lendyn;e.lenbits=7;A={bits:e.lenbits};O=E(0,e.lens,0,19,e.lencode,0,e.work,A);e.lenbits=A.bits;if(O){b.msg="invalid code lengths set";e.mode=30;break}e.have=0;e.mode=19;case 19:for(;e.have<e.nlen+e.ndist;){for(;;){ja=e.lencode[n&(1<<e.lenbits)-1];A=ja>>>24;ja&=65535;if(A<=z)break;if(0===t)break a;
t--;n+=h[q++]<<z;z+=8}if(16>ja)n>>>=A,z-=A,e.lens[e.have++]=ja;else{if(16===ja){for(L=A+2;z<L;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}n>>>=A;z-=A;if(0===e.have){b.msg="invalid bit length repeat";e.mode=30;break}L=e.lens[e.have-1];A=3+(n&3);n>>>=2;z-=2}else if(17===ja){for(L=A+3;z<L;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}n>>>=A;z-=A;L=0;A=3+(n&7);n>>>=3;z-=3}else{for(L=A+7;z<L;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}n>>>=A;z-=A;L=0;A=11+(n&127);n>>>=7;z-=7}if(e.have+A>e.nlen+e.ndist){b.msg="invalid bit length repeat";
e.mode=30;break}for(;A--;)e.lens[e.have++]=L}}if(30===e.mode)break;if(0===e.lens[256]){b.msg="invalid code -- missing end-of-block";e.mode=30;break}e.lenbits=9;A={bits:e.lenbits};O=E(1,e.lens,0,e.nlen,e.lencode,0,e.work,A);e.lenbits=A.bits;if(O){b.msg="invalid literal/lengths set";e.mode=30;break}e.distbits=6;e.distcode=e.distdyn;A={bits:e.distbits};O=E(2,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,A);e.distbits=A.bits;if(O){b.msg="invalid distances set";e.mode=30;break}e.mode=20;if(6===d)break a;case 20:e.mode=
21;case 21:if(6<=t&&258<=x){b.next_out=r;b.avail_out=x;b.next_in=q;b.avail_in=t;e.hold=n;e.bits=z;w(b,D);r=b.next_out;k=b.output;x=b.avail_out;q=b.next_in;h=b.input;t=b.avail_in;n=e.hold;z=e.bits;12===e.mode&&(e.back=-1);break}for(e.back=0;;){ja=e.lencode[n&(1<<e.lenbits)-1];A=ja>>>24;L=ja>>>16&255;ja&=65535;if(A<=z)break;if(0===t)break a;t--;n+=h[q++]<<z;z+=8}if(L&&0===(L&240)){la=A;Ia=L;for(va=ja;;){ja=e.lencode[va+((n&(1<<la+Ia)-1)>>la)];A=ja>>>24;L=ja>>>16&255;ja&=65535;if(la+A<=z)break;if(0===
t)break a;t--;n+=h[q++]<<z;z+=8}n>>>=la;z-=la;e.back+=la}n>>>=A;z-=A;e.back+=A;e.length=ja;if(0===L){e.mode=26;break}if(L&32){e.back=-1;e.mode=12;break}if(L&64){b.msg="invalid literal/length code";e.mode=30;break}e.extra=L&15;e.mode=22;case 22:if(e.extra){for(L=e.extra;z<L;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}e.length+=n&(1<<e.extra)-1;n>>>=e.extra;z-=e.extra;e.back+=e.extra}e.was=e.length;e.mode=23;case 23:for(;;){ja=e.distcode[n&(1<<e.distbits)-1];A=ja>>>24;L=ja>>>16&255;ja&=65535;if(A<=z)break;
if(0===t)break a;t--;n+=h[q++]<<z;z+=8}if(0===(L&240)){la=A;Ia=L;for(va=ja;;){ja=e.distcode[va+((n&(1<<la+Ia)-1)>>la)];A=ja>>>24;L=ja>>>16&255;ja&=65535;if(la+A<=z)break;if(0===t)break a;t--;n+=h[q++]<<z;z+=8}n>>>=la;z-=la;e.back+=la}n>>>=A;z-=A;e.back+=A;if(L&64){b.msg="invalid distance code";e.mode=30;break}e.offset=ja;e.extra=L&15;e.mode=24;case 24:if(e.extra){for(L=e.extra;z<L;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}e.offset+=n&(1<<e.extra)-1;n>>>=e.extra;z-=e.extra;e.back+=e.extra}if(e.offset>
e.dmax){b.msg="invalid distance too far back";e.mode=30;break}e.mode=25;case 25:if(0===x)break a;A=D-x;if(e.offset>A){A=e.offset-A;if(A>e.whave&&e.sane){b.msg="invalid distance too far back";e.mode=30;break}A>e.wnext?(A-=e.wnext,L=e.wsize-A):L=e.wnext-A;A>e.length&&(A=e.length);la=e.window}else la=k,L=r-e.offset,A=e.length;A>x&&(A=x);x-=A;e.length-=A;do k[r++]=la[L++];while(--A);0===e.length&&(e.mode=21);break;case 26:if(0===x)break a;k[r++]=e.length;x--;e.mode=21;break;case 27:if(e.wrap){for(;32>
z;){if(0===t)break a;t--;n|=h[q++]<<z;z+=8}D-=x;b.total_out+=D;e.total+=D;D&&(b.adler=e.check=e.flags?B(e.check,k,D,r-D):G(e.check,k,D,r-D));D=x;if((e.flags?n:f(n))!==e.check){b.msg="incorrect data check";e.mode=30;break}z=n=0}e.mode=28;case 28:if(e.wrap&&e.flags){for(;32>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}if(n!==(e.total&4294967295)){b.msg="incorrect length check";e.mode=30;break}z=n=0}e.mode=29;case 29:O=1;break a;case 30:O=-3;break a;case 31:return-4;default:return-2}b.next_out=r;b.avail_out=
x;b.next_in=q;b.avail_in=t;e.hold=n;e.bits=z;if(e.wsize||D!==b.avail_out&&30>e.mode&&(27>e.mode||4!==d))h=b.output,q=b.next_out,r=D-b.avail_out,x=b.state,null===x.window&&(x.wsize=1<<x.wbits,x.wnext=0,x.whave=0,x.window=new y.Buf8(x.wsize)),r>=x.wsize?(y.arraySet(x.window,h,q-x.wsize,x.wsize,0),x.wnext=0,x.whave=x.wsize):(t=x.wsize-x.wnext,t>r&&(t=r),y.arraySet(x.window,h,q-r,t,x.wnext),(r-=t)?(y.arraySet(x.window,h,q-r,r,0),x.wnext=r,x.whave=x.wsize):(x.wnext+=t,x.wnext===x.wsize&&(x.wnext=0),x.whave<
x.wsize&&(x.whave+=t)));Y-=b.avail_in;D-=b.avail_out;b.total_in+=Y;b.total_out+=D;e.total+=D;e.wrap&&D&&(b.adler=e.check=e.flags?B(e.check,k,D,b.next_out-D):G(e.check,k,D,b.next_out-D));b.data_type=e.bits+(e.last?64:0)+(12===e.mode?128:0)+(20===e.mode||15===e.mode?256:0);(0===Y&&0===D||4===d)&&0===O&&(O=-5);return O};d.inflateEnd=function(b){if(!b||!b.state)return-2;var d=b.state;d.window&&(d.window=null);b.state=null;return 0};d.inflateGetHeader=function(b,d){var f;if(!b||!b.state)return-2;f=b.state;
if(0===(f.wrap&2))return-2;f.head=d;d.done=!1;return 0};d.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":2,"./adler32":4,"./crc32":6,"./inffast":8,"./inftrees":10}],10:[function(b,e,d){var f=b("../utils/common"),k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],r=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,
3073,4097,6145,8193,12289,16385,24577,0,0],q=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(b,d,e,B,w,E,P,da){for(var aa=da.bits,M=0,ka=0,m=0,fa=0,ba=0,Z=0,X=0,U=0,x=0,n=0,z,Y,D=null,A=0,L,la=new f.Buf16(16),Z=new f.Buf16(16),ja=null,Ia=0,va,O,wa,M=0;15>=M;M++)la[M]=0;for(ka=0;ka<B;ka++)la[d[e+ka]]++;ba=aa;for(fa=15;1<=fa&&0===la[fa];fa--);ba>fa&&(ba=fa);if(0===fa)return w[E++]=20971520,w[E++]=20971520,da.bits=1,0;for(m=1;m<fa&&
0===la[m];m++);ba<m&&(ba=m);for(M=U=1;15>=M;M++)if(U<<=1,U-=la[M],0>U)return-1;if(0<U&&(0===b||1!==fa))return-1;Z[1]=0;for(M=1;15>M;M++)Z[M+1]=Z[M]+la[M];for(ka=0;ka<B;ka++)0!==d[e+ka]&&(P[Z[d[e+ka]]++]=ka);switch(b){case 0:D=ja=P;L=19;break;case 1:D=k;A-=257;ja=h;Ia-=257;L=256;break;default:D=r,ja=q,L=-1}ka=n=0;M=m;aa=E;Z=ba;X=0;Y=-1;x=1<<ba;B=x-1;if(1===b&&852<x||2===b&&592<x)return 1;for(var Ua=0;;){Ua++;va=M-X;P[ka]<L?(O=0,wa=P[ka]):P[ka]>L?(O=ja[Ia+P[ka]],wa=D[A+P[ka]]):(O=96,wa=0);U=1<<M-X;
m=z=1<<Z;do z-=U,w[aa+(n>>X)+z]=va<<24|O<<16|wa|0;while(0!==z);for(U=1<<M-1;n&U;)U>>=1;0!==U?(n&=U-1,n+=U):n=0;ka++;if(0===--la[M]){if(M===fa)break;M=d[e+P[ka]]}if(M>ba&&(n&B)!==Y){0===X&&(X=ba);aa+=m;Z=M-X;for(U=1<<Z;Z+X<fa;){U-=la[Z+X];if(0>=U)break;Z++;U<<=1}x+=1<<Z;if(1===b&&852<x||2===b&&592<x)return 1;Y=n&B;w[Y]=ba<<24|Z<<16|aa-E|0}}0!==n&&(w[aa+n]=M-X<<24|4194304);da.bits=ba;return 0}},{"../utils/common":2}],11:[function(b,e,d){e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error",
"-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],12:[function(b,e,d){e.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}]},{},[1])(1)});
(function(a){"object"===typeof exports&&"undefined"!==typeof module?module.exports=a():"function"===typeof define&&define.amd?define([],a):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).nifti=a()})(function(){return function b(e,d,f){function k(q,r){if(!d[q]){if(!e[q]){var y="function"==typeof require&&require;if(!r&&y)return y(q,!0);if(h)return h(q,!0);y=Error("Cannot find module '"+q+"'");throw y.code="MODULE_NOT_FOUND",y;}y=d[q]={exports:{}};
e[q][0].call(y.exports,function(b){var d=e[q][1][b];return k(d?d:b)},y,y.exports,b,e,d,f)}return d[q].exports}for(var h="function"==typeof require&&require,r=0;r<f.length;r++)k(f[r]);return k}({1:[function(b,e,d){d=b("./lib/utils/common").assign;var f=b("./lib/deflate"),k=b("./lib/inflate");b=b("./lib/zlib/constants");var h={};d(h,f,k,b);e.exports=h},{"./lib/deflate":2,"./lib/inflate":3,"./lib/utils/common":4,"./lib/zlib/constants":7}],2:[function(b,e,d){function f(b,d){var f=new G(d);f.push(b,!0);
if(f.err)throw f.msg;return f.result}var k=b("./zlib/deflate.js"),h=b("./utils/common"),r=b("./utils/strings"),q=b("./zlib/messages"),t=b("./zlib/zstream"),y=Object.prototype.toString,G=function(b){b=this.options=h.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},b||{});b.raw&&0<b.windowBits?b.windowBits=-b.windowBits:b.gzip&&0<b.windowBits&&16>b.windowBits&&(b.windowBits+=16);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new t;this.strm.avail_out=
0;var d=k.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(0!==d)throw Error(q[d]);b.header&&k.deflateSetHeader(this.strm,b.header)};G.prototype.push=function(b,d){var f=this.strm,e=this.options.chunkSize,q,t;if(this.ended)return!1;t=d===~~d?d:!0===d?4:0;"string"===typeof b?f.input=r.string2buf(b):"[object ArrayBuffer]"===y.call(b)?f.input=new Uint8Array(b):f.input=b;f.next_in=0;f.avail_in=f.input.length;do{0===f.avail_out&&(f.output=new h.Buf8(e),f.next_out=0,f.avail_out=
e);q=k.deflate(f,t);if(1!==q&&0!==q)return this.onEnd(q),this.ended=!0,!1;if(0===f.avail_out||0===f.avail_in&&(4===t||2===t))if("string"===this.options.to)this.onData(r.buf2binstring(h.shrinkBuf(f.output,f.next_out)));else this.onData(h.shrinkBuf(f.output,f.next_out))}while((0<f.avail_in||0===f.avail_out)&&1!==q);if(4===t)return q=k.deflateEnd(this.strm),this.onEnd(q),this.ended=!0,0===q;2===t&&(this.onEnd(0),f.avail_out=0);return!0};G.prototype.onData=function(b){this.chunks.push(b)};G.prototype.onEnd=
function(b){0===b&&(this.result="string"===this.options.to?this.chunks.join(""):h.flattenChunks(this.chunks));this.chunks=[];this.err=b;this.msg=this.strm.msg};d.Deflate=G;d.deflate=f;d.deflateRaw=function(b,d){d=d||{};d.raw=!0;return f(b,d)};d.gzip=function(b,d){d=d||{};d.gzip=!0;return f(b,d)}},{"./utils/common":4,"./utils/strings":5,"./zlib/deflate.js":9,"./zlib/messages":14,"./zlib/zstream":16}],3:[function(b,e,d){function f(b,d){var f=new w(d);f.push(b,!0);if(f.err)throw f.msg;return f.result}
var k=b("./zlib/inflate.js"),h=b("./utils/common"),r=b("./utils/strings"),q=b("./zlib/constants"),t=b("./zlib/messages"),y=b("./zlib/zstream"),G=b("./zlib/gzheader"),B=Object.prototype.toString,w=function(b){var d=this.options=h.assign({chunkSize:16384,windowBits:0,to:""},b||{});d.raw&&0<=d.windowBits&&16>d.windowBits&&(d.windowBits=-d.windowBits,0===d.windowBits&&(d.windowBits=-15));!(0<=d.windowBits&&16>d.windowBits)||b&&b.windowBits||(d.windowBits+=32);15<d.windowBits&&48>d.windowBits&&0===(d.windowBits&
15)&&(d.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new y;this.strm.avail_out=0;b=k.inflateInit2(this.strm,d.windowBits);if(b!==q.Z_OK)throw Error(t[b]);this.header=new G;k.inflateGetHeader(this.strm,this.header)};w.prototype.push=function(b,d){var f=this.strm,e=this.options.chunkSize,t,w,m,y,G,Z=!1;if(this.ended)return!1;w=d===~~d?d:!0===d?q.Z_FINISH:q.Z_NO_FLUSH;"string"===typeof b?f.input=r.binstring2buf(b):"[object ArrayBuffer]"===B.call(b)?f.input=new Uint8Array(b):
f.input=b;f.next_in=0;f.avail_in=f.input.length;do{0===f.avail_out&&(f.output=new h.Buf8(e),f.next_out=0,f.avail_out=e);t=k.inflate(f,q.Z_NO_FLUSH);t===q.Z_BUF_ERROR&&!0===Z&&(t=q.Z_OK,Z=!1);if(t!==q.Z_STREAM_END&&t!==q.Z_OK)return this.onEnd(t),this.ended=!0,!1;if(f.next_out&&(0===f.avail_out||t===q.Z_STREAM_END||0===f.avail_in&&(w===q.Z_FINISH||w===q.Z_SYNC_FLUSH)))if("string"===this.options.to)m=r.utf8border(f.output,f.next_out),y=f.next_out-m,G=r.buf2string(f.output,m),f.next_out=y,f.avail_out=
e-y,y&&h.arraySet(f.output,f.output,m,y,0),this.onData(G);else this.onData(h.shrinkBuf(f.output,f.next_out));0===f.avail_in&&0===f.avail_out&&(Z=!0)}while((0<f.avail_in||0===f.avail_out)&&t!==q.Z_STREAM_END);t===q.Z_STREAM_END&&(w=q.Z_FINISH);if(w===q.Z_FINISH)return t=k.inflateEnd(this.strm),this.onEnd(t),this.ended=!0,t===q.Z_OK;w===q.Z_SYNC_FLUSH&&(this.onEnd(q.Z_OK),f.avail_out=0);return!0};w.prototype.onData=function(b){this.chunks.push(b)};w.prototype.onEnd=function(b){b===q.Z_OK&&(this.result=
"string"===this.options.to?this.chunks.join(""):h.flattenChunks(this.chunks));this.chunks=[];this.err=b;this.msg=this.strm.msg};d.Inflate=w;d.inflate=f;d.inflateRaw=function(b,d){d=d||{};d.raw=!0;return f(b,d)};d.ungzip=f},{"./utils/common":4,"./utils/strings":5,"./zlib/constants":7,"./zlib/gzheader":10,"./zlib/inflate.js":12,"./zlib/messages":14,"./zlib/zstream":16}],4:[function(b,e,d){b="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Int32Array;d.assign=function(b){for(var d=
Array.prototype.slice.call(arguments,1);d.length;){var f=d.shift();if(f){if("object"!==typeof f)throw new TypeError(f+"must be non-object");for(var e in f)f.hasOwnProperty(e)&&(b[e]=f[e])}}return b};d.shrinkBuf=function(b,d){if(b.length===d)return b;if(b.subarray)return b.subarray(0,d);b.length=d;return b};var f={arraySet:function(b,d,f,e,k){if(d.subarray&&b.subarray)b.set(d.subarray(f,f+e),k);else for(var G=0;G<e;G++)b[k+G]=d[f+G]},flattenChunks:function(b){var d,f,e,k,G;d=e=0;for(f=b.length;d<f;d++)e+=
b[d].length;G=new Uint8Array(e);d=e=0;for(f=b.length;d<f;d++)k=b[d],G.set(k,e),e+=k.length;return G}},k={arraySet:function(b,d,f,e,k){for(var G=0;G<e;G++)b[k+G]=d[f+G]},flattenChunks:function(b){return[].concat.apply([],b)}};d.setTyped=function(b){b?(d.Buf8=Uint8Array,d.Buf16=Uint16Array,d.Buf32=Int32Array,d.assign(d,f)):(d.Buf8=Array,d.Buf16=Array,d.Buf32=Array,d.assign(d,k))};d.setTyped(b)},{}],5:[function(b,e,d){function f(b,d){if(65537>d&&(b.subarray&&r||!b.subarray&&h))return String.fromCharCode.apply(null,
k.shrinkBuf(b,d));for(var f="",e=0;e<d;e++)f+=String.fromCharCode(b[e]);return f}var k=b("./common"),h=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch(q){h=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){r=!1}var y=new k.Buf8(256);for(b=0;256>b;b++)y[b]=252<=b?6:248<=b?5:240<=b?4:224<=b?3:192<=b?2:1;y[254]=y[254]=1;d.string2buf=function(b){var d,f,e,h,q,r=b.length,t=0;for(h=0;h<r;h++)f=b.charCodeAt(h),55296===(f&64512)&&h+1<r&&(e=b.charCodeAt(h+1),56320===(e&64512)&&(f=65536+
(f-55296<<10)+(e-56320),h++)),t+=128>f?1:2048>f?2:65536>f?3:4;d=new k.Buf8(t);for(h=q=0;q<t;h++)f=b.charCodeAt(h),55296===(f&64512)&&h+1<r&&(e=b.charCodeAt(h+1),56320===(e&64512)&&(f=65536+(f-55296<<10)+(e-56320),h++)),128>f?d[q++]=f:(2048>f?d[q++]=192|f>>>6:(65536>f?d[q++]=224|f>>>12:(d[q++]=240|f>>>18,d[q++]=128|f>>>12&63),d[q++]=128|f>>>6&63),d[q++]=128|f&63);return d};d.buf2binstring=function(b){return f(b,b.length)};d.binstring2buf=function(b){for(var d=new k.Buf8(b.length),f=0,e=d.length;f<
e;f++)d[f]=b.charCodeAt(f);return d};d.buf2string=function(b,d){var e,h,k,q,r=d||b.length,t=Array(2*r);for(e=h=0;e<r;)if(k=b[e++],128>k)t[h++]=k;else if(q=y[k],4<q)t[h++]=65533,e+=q-1;else{for(k&=2===q?31:3===q?15:7;1<q&&e<r;)k=k<<6|b[e++]&63,q--;1<q?t[h++]=65533:65536>k?t[h++]=k:(k-=65536,t[h++]=55296|k>>10&1023,t[h++]=56320|k&1023)}return f(t,h)};d.utf8border=function(b,d){var f;d=d||b.length;d>b.length&&(d=b.length);for(f=d-1;0<=f&&128===(b[f]&192);)f--;return 0>f||0===f?d:f+y[b[f]]>d?f:d}},{"./common":4}],
6:[function(b,e,d){e.exports=function(b,d,e,r){var q=b&65535|0;b=b>>>16&65535|0;for(var t=0;0!==e;){t=2E3<e?2E3:e;e-=t;do q=q+d[r++]|0,b=b+q|0;while(--t);q%=65521;b%=65521}return q|b<<16|0}},{}],7:[function(b,e,d){e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,
Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],8:[function(b,e,d){var f=function(){for(var b,d=[],f=0;256>f;f++){b=f;for(var e=0;8>e;e++)b=b&1?3988292384^b>>>1:b>>>1;d[f]=b}return d}();e.exports=function(b,d,e,q){e=q+e;for(b^=-1;q<e;q++)b=b>>>8^f[(b^d[q])&255];return b^-1}},{}],9:[function(b,e,d){function f(b,d){b.msg=X[d];return d}function k(b){for(var d=b.length;0<=--d;)b[d]=0}function h(b){var d=b.state,f=d.pending;f>b.avail_out&&(f=b.avail_out);
0!==f&&(m.arraySet(b.output,d.pending_buf,d.pending_out,f,b.next_out),b.next_out+=f,d.pending_out+=f,b.total_out+=f,b.avail_out-=f,d.pending-=f,0===d.pending&&(d.pending_out=0))}function r(b,d){fa._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,d);b.block_start=b.strstart;h(b.strm)}function q(b,d){b.pending_buf[b.pending++]=d}function t(b,d){b.pending_buf[b.pending++]=d>>>8&255;b.pending_buf[b.pending++]=d&255}function y(b,d){var f=b.max_chain_length,e=b.strstart,h,k=
b.prev_length,m=b.nice_match,q=b.strstart>b.w_size-262?b.strstart-(b.w_size-262):0,r=b.window,t=b.w_mask,w=b.prev,y=b.strstart+258,B=r[e+k-1],E=r[e+k];b.prev_length>=b.good_match&&(f>>=2);m>b.lookahead&&(m=b.lookahead);do if(h=d,r[h+k]===E&&r[h+k-1]===B&&r[h]===r[e]&&r[++h]===r[e+1]){e+=2;for(h++;r[++e]===r[++h]&&r[++e]===r[++h]&&r[++e]===r[++h]&&r[++e]===r[++h]&&r[++e]===r[++h]&&r[++e]===r[++h]&&r[++e]===r[++h]&&r[++e]===r[++h]&&e<y;);h=258-(y-e);e=y-258;if(h>k){b.match_start=d;k=h;if(h>=m)break;
B=r[e+k-1];E=r[e+k]}}while((d=w[d&t])>q&&0!==--f);return k<=b.lookahead?k:b.lookahead}function G(b){var d=b.w_size,f,e,h,k;do{k=b.window_size-b.lookahead-b.strstart;if(b.strstart>=d+(d-262)){m.arraySet(b.window,b.window,d,d,0);b.match_start-=d;b.strstart-=d;b.block_start-=d;f=e=b.hash_size;do h=b.head[--f],b.head[f]=h>=d?h-d:0;while(--e);f=e=d;do h=b.prev[--f],b.prev[f]=h>=d?h-d:0;while(--e);k+=d}if(0===b.strm.avail_in)break;f=b.strm;e=b.window;h=b.strstart+b.lookahead;var q=f.avail_in;q>k&&(q=k);
0===q?e=0:(f.avail_in-=q,m.arraySet(e,f.input,f.next_in,q,h),1===f.state.wrap?f.adler=ba(f.adler,e,q,h):2===f.state.wrap&&(f.adler=Z(f.adler,e,q,h)),f.next_in+=q,f.total_in+=q,e=q);b.lookahead+=e;if(3<=b.lookahead+b.insert)for(k=b.strstart-b.insert,b.ins_h=b.window[k],b.ins_h=(b.ins_h<<b.hash_shift^b.window[k+1])&b.hash_mask;b.insert&&!(b.ins_h=(b.ins_h<<b.hash_shift^b.window[k+3-1])&b.hash_mask,b.prev[k&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=k,k++,b.insert--,3>b.lookahead+b.insert););}while(262>
b.lookahead&&0!==b.strm.avail_in)}function B(b,d){for(var f;;){if(262>b.lookahead){G(b);if(262>b.lookahead&&0===d)return 1;if(0===b.lookahead)break}f=0;3<=b.lookahead&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+3-1])&b.hash_mask,f=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);0!==f&&b.strstart-f<=b.w_size-262&&(b.match_length=y(b,f));if(3<=b.match_length)if(f=fa._tr_tally(b,b.strstart-b.match_start,b.match_length-3),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&
3<=b.lookahead){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+3-1])&b.hash_mask,b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart;while(0!==--b.match_length);b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else f=fa._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(f&&(r(b,!1),0===b.strm.avail_out))return 1}b.insert=
2>b.strstart?b.strstart:2;return 4===d?(r(b,!0),0===b.strm.avail_out?3:4):b.last_lit&&(r(b,!1),0===b.strm.avail_out)?1:2}function w(b,d){for(var f,e;;){if(262>b.lookahead){G(b);if(262>b.lookahead&&0===d)return 1;if(0===b.lookahead)break}f=0;3<=b.lookahead&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+3-1])&b.hash_mask,f=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);b.prev_length=b.match_length;b.prev_match=b.match_start;b.match_length=2;0!==f&&b.prev_length<b.max_lazy_match&&
b.strstart-f<=b.w_size-262&&(b.match_length=y(b,f),5>=b.match_length&&(1===b.strategy||3===b.match_length&&4096<b.strstart-b.match_start)&&(b.match_length=2));if(3<=b.prev_length&&b.match_length<=b.prev_length){e=b.strstart+b.lookahead-3;f=fa._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-3);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=e&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+3-1])&b.hash_mask,b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);
while(0!==--b.prev_length);b.match_available=0;b.match_length=2;b.strstart++;if(f&&(r(b,!1),0===b.strm.avail_out))return 1}else if(b.match_available){if((f=fa._tr_tally(b,0,b.window[b.strstart-1]))&&r(b,!1),b.strstart++,b.lookahead--,0===b.strm.avail_out)return 1}else b.match_available=1,b.strstart++,b.lookahead--}b.match_available&&(fa._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0);b.insert=2>b.strstart?b.strstart:2;return 4===d?(r(b,!0),0===b.strm.avail_out?3:4):b.last_lit&&(r(b,!1),
0===b.strm.avail_out)?1:2}function E(b,d){for(var f,e,h,k=b.window;;){if(258>=b.lookahead){G(b);if(258>=b.lookahead&&0===d)return 1;if(0===b.lookahead)break}b.match_length=0;if(3<=b.lookahead&&0<b.strstart&&(e=b.strstart-1,f=k[e],f===k[++e]&&f===k[++e]&&f===k[++e])){for(h=b.strstart+258;f===k[++e]&&f===k[++e]&&f===k[++e]&&f===k[++e]&&f===k[++e]&&f===k[++e]&&f===k[++e]&&f===k[++e]&&e<h;);b.match_length=258-(h-e);b.match_length>b.lookahead&&(b.match_length=b.lookahead)}3<=b.match_length?(f=fa._tr_tally(b,
1,b.match_length-3),b.lookahead-=b.match_length,b.strstart+=b.match_length,b.match_length=0):(f=fa._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++);if(f&&(r(b,!1),0===b.strm.avail_out))return 1}b.insert=0;return 4===d?(r(b,!0),0===b.strm.avail_out?3:4):b.last_lit&&(r(b,!1),0===b.strm.avail_out)?1:2}function P(b,d){for(var f;;){if(0===b.lookahead&&(G(b),0===b.lookahead)){if(0===d)return 1;break}b.match_length=0;f=fa._tr_tally(b,0,b.window[b.strstart]);b.lookahead--;b.strstart++;if(f&&
(r(b,!1),0===b.strm.avail_out))return 1}b.insert=0;return 4===d?(r(b,!0),0===b.strm.avail_out?3:4):b.last_lit&&(r(b,!1),0===b.strm.avail_out)?1:2}function da(){this.strm=null;this.status=0;this.pending_buf=null;this.wrap=this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=8;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=
this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new m.Buf16(1146);this.dyn_dtree=new m.Buf16(122);this.bl_tree=new m.Buf16(78);k(this.dyn_ltree);k(this.dyn_dtree);k(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new m.Buf16(16);this.heap=new m.Buf16(573);k(this.heap);this.heap_max=
this.heap_len=0;this.depth=new m.Buf16(573);k(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=this.lit_bufsize=this.l_buf=0}function aa(b){var d;if(!b||!b.state)return f(b,-2);b.total_in=b.total_out=0;b.data_type=2;d=b.state;d.pending=0;d.pending_out=0;0>d.wrap&&(d.wrap=-d.wrap);d.status=d.wrap?42:113;b.adler=2===d.wrap?0:1;d.last_flush=0;fa._tr_init(d);return 0}function M(b){var d=aa(b);0===d&&(b=b.state,b.window_size=2*b.w_size,
k(b.head),b.max_lazy_match=U[b.level].max_lazy,b.good_match=U[b.level].good_length,b.nice_match=U[b.level].nice_length,b.max_chain_length=U[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=2,b.match_available=0,b.ins_h=0);return d}function ka(b,d,e,h,k,q){if(!b)return-2;var r=1;-1===d&&(d=6);0>h?(r=0,h=-h):15<h&&(r=2,h-=16);if(1>k||9<k||8!==e||8>h||15<h||0>d||9<d||0>q||4<q)return f(b,-2);8===h&&(h=9);var t=new da;b.state=t;t.strm=b;t.wrap=r;t.gzhead=
null;t.w_bits=h;t.w_size=1<<t.w_bits;t.w_mask=t.w_size-1;t.hash_bits=k+7;t.hash_size=1<<t.hash_bits;t.hash_mask=t.hash_size-1;t.hash_shift=~~((t.hash_bits+3-1)/3);t.window=new m.Buf8(2*t.w_size);t.head=new m.Buf16(t.hash_size);t.prev=new m.Buf16(t.w_size);t.lit_bufsize=1<<k+6;t.pending_buf_size=4*t.lit_bufsize;t.pending_buf=new m.Buf8(t.pending_buf_size);t.d_buf=t.lit_bufsize>>1;t.l_buf=3*t.lit_bufsize;t.level=d;t.strategy=q;t.method=e;return M(b)}var m=b("../utils/common"),fa=b("./trees"),ba=b("./adler32"),
Z=b("./crc32"),X=b("./messages");b=function(b,d,f,e,h){this.good_length=b;this.max_lazy=d;this.nice_length=f;this.max_chain=e;this.func=h};var U;U=[new b(0,0,0,0,function(b,d){var f=65535;for(f>b.pending_buf_size-5&&(f=b.pending_buf_size-5);;){if(1>=b.lookahead){G(b);if(0===b.lookahead&&0===d)return 1;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var e=b.block_start+f;if(0===b.strstart||b.strstart>=e)if(b.lookahead=b.strstart-e,b.strstart=e,r(b,!1),0===b.strm.avail_out)return 1;if(b.strstart-
b.block_start>=b.w_size-262&&(r(b,!1),0===b.strm.avail_out))return 1}b.insert=0;if(4===d)return r(b,!0),0===b.strm.avail_out?3:4;b.strstart>b.block_start&&r(b,!1);return 1}),new b(4,4,8,4,B),new b(4,5,16,8,B),new b(4,6,32,32,B),new b(4,4,16,16,w),new b(8,16,32,32,w),new b(8,16,128,128,w),new b(8,32,128,256,w),new b(32,128,258,1024,w),new b(32,258,258,4096,w)];d.deflateInit=function(b,d){return ka(b,d,8,15,8,0)};d.deflateInit2=ka;d.deflateReset=M;d.deflateResetKeep=aa;d.deflateSetHeader=function(b,
d){if(!b||!b.state||2!==b.state.wrap)return-2;b.state.gzhead=d;return 0};d.deflate=function(b,d){var e,m,r,w;if(!b||!b.state||5<d||0>d)return b?f(b,-2):-2;m=b.state;if(!b.output||!b.input&&0!==b.avail_in||666===m.status&&4!==d)return f(b,0===b.avail_out?-5:-2);m.strm=b;e=m.last_flush;m.last_flush=d;42===m.status&&(2===m.wrap?(b.adler=0,q(m,31),q(m,139),q(m,8),m.gzhead?(q(m,(m.gzhead.text?1:0)+(m.gzhead.hcrc?2:0)+(m.gzhead.extra?4:0)+(m.gzhead.name?8:0)+(m.gzhead.comment?16:0)),q(m,m.gzhead.time&255),
q(m,m.gzhead.time>>8&255),q(m,m.gzhead.time>>16&255),q(m,m.gzhead.time>>24&255),q(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),q(m,m.gzhead.os&255),m.gzhead.extra&&m.gzhead.extra.length&&(q(m,m.gzhead.extra.length&255),q(m,m.gzhead.extra.length>>8&255)),m.gzhead.hcrc&&(b.adler=Z(b.adler,m.pending_buf,m.pending,0)),m.gzindex=0,m.status=69):(q(m,0),q(m,0),q(m,0),q(m,0),q(m,0),q(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),q(m,3),m.status=113)):(r=8+(m.w_bits-8<<4)<<8,w=-1,w=2<=m.strategy||2>m.level?
0:6>m.level?1:6===m.level?2:3,r|=w<<6,0!==m.strstart&&(r|=32),m.status=113,t(m,r+(31-r%31)),0!==m.strstart&&(t(m,b.adler>>>16),t(m,b.adler&65535)),b.adler=1));if(69===m.status)if(m.gzhead.extra){for(r=m.pending;m.gzindex<(m.gzhead.extra.length&65535)&&(m.pending!==m.pending_buf_size||(m.gzhead.hcrc&&m.pending>r&&(b.adler=Z(b.adler,m.pending_buf,m.pending-r,r)),h(b),r=m.pending,m.pending!==m.pending_buf_size));)q(m,m.gzhead.extra[m.gzindex]&255),m.gzindex++;m.gzhead.hcrc&&m.pending>r&&(b.adler=Z(b.adler,
m.pending_buf,m.pending-r,r));m.gzindex===m.gzhead.extra.length&&(m.gzindex=0,m.status=73)}else m.status=73;if(73===m.status)if(m.gzhead.name){r=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>r&&(b.adler=Z(b.adler,m.pending_buf,m.pending-r,r)),h(b),r=m.pending,m.pending===m.pending_buf_size)){w=1;break}w=m.gzindex<m.gzhead.name.length?m.gzhead.name.charCodeAt(m.gzindex++)&255:0;q(m,w)}while(0!==w);m.gzhead.hcrc&&m.pending>r&&(b.adler=Z(b.adler,m.pending_buf,m.pending-r,
r));0===w&&(m.gzindex=0,m.status=91)}else m.status=91;if(91===m.status)if(m.gzhead.comment){r=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>r&&(b.adler=Z(b.adler,m.pending_buf,m.pending-r,r)),h(b),r=m.pending,m.pending===m.pending_buf_size)){w=1;break}w=m.gzindex<m.gzhead.comment.length?m.gzhead.comment.charCodeAt(m.gzindex++)&255:0;q(m,w)}while(0!==w);m.gzhead.hcrc&&m.pending>r&&(b.adler=Z(b.adler,m.pending_buf,m.pending-r,r));0===w&&(m.status=103)}else m.status=103;103===
m.status&&(m.gzhead.hcrc?(m.pending+2>m.pending_buf_size&&h(b),m.pending+2<=m.pending_buf_size&&(q(m,b.adler&255),q(m,b.adler>>8&255),b.adler=0,m.status=113)):m.status=113);if(0!==m.pending){if(h(b),0===b.avail_out)return m.last_flush=-1,0}else if(0===b.avail_in&&(d<<1)-(4<d?9:0)<=(e<<1)-(4<e?9:0)&&4!==d)return f(b,-5);if(666===m.status&&0!==b.avail_in)return f(b,-5);if(0!==b.avail_in||0!==m.lookahead||0!==d&&666!==m.status){e=2===m.strategy?P(m,d):3===m.strategy?E(m,d):U[m.level].func(m,d);if(3===
e||4===e)m.status=666;if(1===e||3===e)return 0===b.avail_out&&(m.last_flush=-1),0;if(2===e&&(1===d?fa._tr_align(m):5!==d&&(fa._tr_stored_block(m,0,0,!1),3===d&&(k(m.head),0===m.lookahead&&(m.strstart=0,m.block_start=0,m.insert=0))),h(b),0===b.avail_out))return m.last_flush=-1,0}if(4!==d)return 0;if(0>=m.wrap)return 1;2===m.wrap?(q(m,b.adler&255),q(m,b.adler>>8&255),q(m,b.adler>>16&255),q(m,b.adler>>24&255),q(m,b.total_in&255),q(m,b.total_in>>8&255),q(m,b.total_in>>16&255),q(m,b.total_in>>24&255)):
(t(m,b.adler>>>16),t(m,b.adler&65535));h(b);0<m.wrap&&(m.wrap=-m.wrap);return 0!==m.pending?0:1};d.deflateEnd=function(b){var d;if(!b||!b.state)return-2;d=b.state.status;if(42!==d&&69!==d&&73!==d&&91!==d&&103!==d&&113!==d&&666!==d)return f(b,-2);b.state=null;return 113===d?f(b,-3):0};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":4,"./adler32":6,"./crc32":8,"./messages":14,"./trees":15}],10:[function(b,e,d){e.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=
null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],11:[function(b,e,d){e.exports=function(b,d){var e,r,q,t,y,G,B,w,E,P,da,aa,M,ka,m,fa,ba,Z,X,U,x,n,z,Y;e=b.state;r=b.next_in;z=b.input;q=r+(b.avail_in-5);t=b.next_out;Y=b.output;y=t-(d-b.avail_out);G=t+(b.avail_out-257);B=e.dmax;w=e.wsize;E=e.whave;P=e.wnext;da=e.window;aa=e.hold;M=e.bits;ka=e.lencode;m=e.distcode;fa=(1<<e.lenbits)-1;ba=(1<<e.distbits)-1;a:do b:for(15>M&&(aa+=z[r++]<<M,M+=8,aa+=z[r++]<<M,M+=8),Z=ka[aa&fa];;){X=
Z>>>24;aa>>>=X;M-=X;X=Z>>>16&255;if(0===X)Y[t++]=Z&65535;else if(X&16){U=Z&65535;if(X&=15)M<X&&(aa+=z[r++]<<M,M+=8),U+=aa&(1<<X)-1,aa>>>=X,M-=X;15>M&&(aa+=z[r++]<<M,M+=8,aa+=z[r++]<<M,M+=8);Z=m[aa&ba];c:for(;;){X=Z>>>24;aa>>>=X;M-=X;X=Z>>>16&255;if(X&16){Z&=65535;X&=15;M<X&&(aa+=z[r++]<<M,M+=8,M<X&&(aa+=z[r++]<<M,M+=8));Z+=aa&(1<<X)-1;if(Z>B){b.msg="invalid distance too far back";e.mode=30;break a}aa>>>=X;M-=X;X=t-y;if(Z>X){X=Z-X;if(X>E&&e.sane){b.msg="invalid distance too far back";e.mode=30;break a}x=
0;n=da;if(0===P){if(x+=w-X,X<U){U-=X;do Y[t++]=da[x++];while(--X);x=t-Z;n=Y}}else if(P<X){if(x+=w+P-X,X-=P,X<U){U-=X;do Y[t++]=da[x++];while(--X);x=0;if(P<U){X=P;U-=X;do Y[t++]=da[x++];while(--X);x=t-Z;n=Y}}}else if(x+=P-X,X<U){U-=X;do Y[t++]=da[x++];while(--X);x=t-Z;n=Y}for(;2<U;)Y[t++]=n[x++],Y[t++]=n[x++],Y[t++]=n[x++],U-=3;U&&(Y[t++]=n[x++],1<U&&(Y[t++]=n[x++]))}else{x=t-Z;do Y[t++]=Y[x++],Y[t++]=Y[x++],Y[t++]=Y[x++],U-=3;while(2<U);U&&(Y[t++]=Y[x++],1<U&&(Y[t++]=Y[x++]))}}else if(0===(X&64)){Z=
m[(Z&65535)+(aa&(1<<X)-1)];continue c}else{b.msg="invalid distance code";e.mode=30;break a}break}}else if(0===(X&64)){Z=ka[(Z&65535)+(aa&(1<<X)-1)];continue b}else{X&32?e.mode=12:(b.msg="invalid literal/length code",e.mode=30);break a}break}while(r<q&&t<G);U=M>>3;r-=U;M-=U<<3;b.next_in=r;b.next_out=t;b.avail_in=r<q?5+(q-r):5-(r-q);b.avail_out=t<G?257+(G-t):257-(t-G);e.hold=aa&(1<<M)-1;e.bits=M}},{}],12:[function(b,e,d){function f(b){return(b>>>24&255)+(b>>>8&65280)+((b&65280)<<8)+((b&255)<<24)}function k(){this.mode=
0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new y.Buf16(320);this.work=new y.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function h(b){var d;if(!b||!b.state)return-2;
d=b.state;b.total_in=b.total_out=d.total=0;b.msg="";d.wrap&&(b.adler=d.wrap&1);d.mode=1;d.last=0;d.havedict=0;d.dmax=32768;d.head=null;d.hold=0;d.bits=0;d.lencode=d.lendyn=new y.Buf32(852);d.distcode=d.distdyn=new y.Buf32(592);d.sane=1;d.back=-1;return 0}function r(b){var d;if(!b||!b.state)return-2;d=b.state;d.wsize=0;d.whave=0;d.wnext=0;return h(b)}function q(b,d){var f,e;if(!b||!b.state)return-2;e=b.state;0>d?(f=0,d=-d):(f=(d>>4)+1,48>d&&(d&=15));if(d&&(8>d||15<d))return-2;null!==e.window&&e.wbits!==
d&&(e.window=null);e.wrap=f;e.wbits=d;return r(b)}function t(b,d){var f;if(!b)return-2;f=new k;b.state=f;f.window=null;f=q(b,d);0!==f&&(b.state=null);return f}var y=b("../utils/common"),G=b("./adler32"),B=b("./crc32"),w=b("./inffast"),E=b("./inftrees"),P=!0,da,aa;d.inflateReset=r;d.inflateReset2=q;d.inflateResetKeep=h;d.inflateInit=function(b){return t(b,15)};d.inflateInit2=t;d.inflate=function(b,d){var e,h,k,q,r,t,x,n,z,Y,D,A,L,la,ja=0,Ia,va,O,wa=new y.Buf8(4),Ua=[16,17,18,0,8,7,9,6,10,5,11,4,12,
3,13,2,14,1,15];if(!b||!b.state||!b.output||!b.input&&0!==b.avail_in)return-2;e=b.state;12===e.mode&&(e.mode=13);r=b.next_out;k=b.output;x=b.avail_out;q=b.next_in;h=b.input;t=b.avail_in;n=e.hold;z=e.bits;Y=t;D=x;O=0;a:for(;;)switch(e.mode){case 1:if(0===e.wrap){e.mode=13;break}for(;16>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}if(e.wrap&2&&35615===n){e.check=0;wa[0]=n&255;wa[1]=n>>>8&255;e.check=B(e.check,wa,2,0);z=n=0;e.mode=2;break}e.flags=0;e.head&&(e.head.done=!1);if(!(e.wrap&1)||(((n&255)<<8)+
(n>>8))%31){b.msg="incorrect header check";e.mode=30;break}if(8!==(n&15)){b.msg="unknown compression method";e.mode=30;break}n>>>=4;z-=4;L=(n&15)+8;if(0===e.wbits)e.wbits=L;else if(L>e.wbits){b.msg="invalid window size";e.mode=30;break}e.dmax=1<<L;b.adler=e.check=1;e.mode=n&512?10:12;z=n=0;break;case 2:for(;16>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}e.flags=n;if(8!==(e.flags&255)){b.msg="unknown compression method";e.mode=30;break}if(e.flags&57344){b.msg="unknown header flags set";e.mode=30;break}e.head&&
(e.head.text=n>>8&1);e.flags&512&&(wa[0]=n&255,wa[1]=n>>>8&255,e.check=B(e.check,wa,2,0));z=n=0;e.mode=3;case 3:for(;32>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}e.head&&(e.head.time=n);e.flags&512&&(wa[0]=n&255,wa[1]=n>>>8&255,wa[2]=n>>>16&255,wa[3]=n>>>24&255,e.check=B(e.check,wa,4,0));z=n=0;e.mode=4;case 4:for(;16>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}e.head&&(e.head.xflags=n&255,e.head.os=n>>8);e.flags&512&&(wa[0]=n&255,wa[1]=n>>>8&255,e.check=B(e.check,wa,2,0));z=n=0;e.mode=5;case 5:if(e.flags&
1024){for(;16>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}e.length=n;e.head&&(e.head.extra_len=n);e.flags&512&&(wa[0]=n&255,wa[1]=n>>>8&255,e.check=B(e.check,wa,2,0));z=n=0}else e.head&&(e.head.extra=null);e.mode=6;case 6:if(e.flags&1024&&(A=e.length,A>t&&(A=t),A&&(e.head&&(L=e.head.extra_len-e.length,e.head.extra||(e.head.extra=Array(e.head.extra_len)),y.arraySet(e.head.extra,h,q,A,L)),e.flags&512&&(e.check=B(e.check,h,A,q)),t-=A,q+=A,e.length-=A),e.length))break a;e.length=0;e.mode=7;case 7:if(e.flags&
2048){if(0===t)break a;A=0;do L=h[q+A++],e.head&&L&&65536>e.length&&(e.head.name+=String.fromCharCode(L));while(L&&A<t);e.flags&512&&(e.check=B(e.check,h,A,q));t-=A;q+=A;if(L)break a}else e.head&&(e.head.name=null);e.length=0;e.mode=8;case 8:if(e.flags&4096){if(0===t)break a;A=0;do L=h[q+A++],e.head&&L&&65536>e.length&&(e.head.comment+=String.fromCharCode(L));while(L&&A<t);e.flags&512&&(e.check=B(e.check,h,A,q));t-=A;q+=A;if(L)break a}else e.head&&(e.head.comment=null);e.mode=9;case 9:if(e.flags&
512){for(;16>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}if(n!==(e.check&65535)){b.msg="header crc mismatch";e.mode=30;break}z=n=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0);b.adler=e.check=0;e.mode=12;break;case 10:for(;32>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}b.adler=e.check=f(n);z=n=0;e.mode=11;case 11:if(0===e.havedict)return b.next_out=r,b.avail_out=x,b.next_in=q,b.avail_in=t,e.hold=n,e.bits=z,2;b.adler=e.check=1;e.mode=12;case 12:if(5===d||6===d)break a;case 13:if(e.last){n>>>=z&
7;z-=z&7;e.mode=27;break}for(;3>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}e.last=n&1;n>>>=1;--z;switch(n&3){case 0:e.mode=14;break;case 1:A=e;if(P){L=void 0;da=new y.Buf32(512);aa=new y.Buf32(32);for(L=0;144>L;)A.lens[L++]=8;for(;256>L;)A.lens[L++]=9;for(;280>L;)A.lens[L++]=7;for(;288>L;)A.lens[L++]=8;E(1,A.lens,0,288,da,0,A.work,{bits:9});for(L=0;32>L;)A.lens[L++]=5;E(2,A.lens,0,32,aa,0,A.work,{bits:5});P=!1}A.lencode=da;A.lenbits=9;A.distcode=aa;A.distbits=5;e.mode=20;if(6===d){n>>>=2;z-=2;break a}break;
case 2:e.mode=17;break;case 3:b.msg="invalid block type",e.mode=30}n>>>=2;z-=2;break;case 14:n>>>=z&7;for(z-=z&7;32>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}if((n&65535)!==(n>>>16^65535)){b.msg="invalid stored block lengths";e.mode=30;break}e.length=n&65535;z=n=0;e.mode=15;if(6===d)break a;case 15:e.mode=16;case 16:if(A=e.length){A>t&&(A=t);A>x&&(A=x);if(0===A)break a;y.arraySet(k,h,q,A,r);t-=A;q+=A;x-=A;r+=A;e.length-=A;break}e.mode=12;break;case 17:for(;14>z;){if(0===t)break a;t--;n+=h[q++]<<
z;z+=8}e.nlen=(n&31)+257;n>>>=5;z-=5;e.ndist=(n&31)+1;n>>>=5;z-=5;e.ncode=(n&15)+4;n>>>=4;z-=4;if(286<e.nlen||30<e.ndist){b.msg="too many length or distance symbols";e.mode=30;break}e.have=0;e.mode=18;case 18:for(;e.have<e.ncode;){for(;3>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}e.lens[Ua[e.have++]]=n&7;n>>>=3;z-=3}for(;19>e.have;)e.lens[Ua[e.have++]]=0;e.lencode=e.lendyn;e.lenbits=7;A={bits:e.lenbits};O=E(0,e.lens,0,19,e.lencode,0,e.work,A);e.lenbits=A.bits;if(O){b.msg="invalid code lengths set";
e.mode=30;break}e.have=0;e.mode=19;case 19:for(;e.have<e.nlen+e.ndist;){for(;;){ja=e.lencode[n&(1<<e.lenbits)-1];A=ja>>>24;ja&=65535;if(A<=z)break;if(0===t)break a;t--;n+=h[q++]<<z;z+=8}if(16>ja)n>>>=A,z-=A,e.lens[e.have++]=ja;else{if(16===ja){for(L=A+2;z<L;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}n>>>=A;z-=A;if(0===e.have){b.msg="invalid bit length repeat";e.mode=30;break}L=e.lens[e.have-1];A=3+(n&3);n>>>=2;z-=2}else if(17===ja){for(L=A+3;z<L;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}n>>>=A;z-=A;
L=0;A=3+(n&7);n>>>=3;z-=3}else{for(L=A+7;z<L;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}n>>>=A;z-=A;L=0;A=11+(n&127);n>>>=7;z-=7}if(e.have+A>e.nlen+e.ndist){b.msg="invalid bit length repeat";e.mode=30;break}for(;A--;)e.lens[e.have++]=L}}if(30===e.mode)break;if(0===e.lens[256]){b.msg="invalid code -- missing end-of-block";e.mode=30;break}e.lenbits=9;A={bits:e.lenbits};O=E(1,e.lens,0,e.nlen,e.lencode,0,e.work,A);e.lenbits=A.bits;if(O){b.msg="invalid literal/lengths set";e.mode=30;break}e.distbits=6;e.distcode=
e.distdyn;A={bits:e.distbits};O=E(2,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,A);e.distbits=A.bits;if(O){b.msg="invalid distances set";e.mode=30;break}e.mode=20;if(6===d)break a;case 20:e.mode=21;case 21:if(6<=t&&258<=x){b.next_out=r;b.avail_out=x;b.next_in=q;b.avail_in=t;e.hold=n;e.bits=z;w(b,D);r=b.next_out;k=b.output;x=b.avail_out;q=b.next_in;h=b.input;t=b.avail_in;n=e.hold;z=e.bits;12===e.mode&&(e.back=-1);break}for(e.back=0;;){ja=e.lencode[n&(1<<e.lenbits)-1];A=ja>>>24;L=ja>>>16&255;ja&=65535;
if(A<=z)break;if(0===t)break a;t--;n+=h[q++]<<z;z+=8}if(L&&0===(L&240)){la=A;Ia=L;for(va=ja;;){ja=e.lencode[va+((n&(1<<la+Ia)-1)>>la)];A=ja>>>24;L=ja>>>16&255;ja&=65535;if(la+A<=z)break;if(0===t)break a;t--;n+=h[q++]<<z;z+=8}n>>>=la;z-=la;e.back+=la}n>>>=A;z-=A;e.back+=A;e.length=ja;if(0===L){e.mode=26;break}if(L&32){e.back=-1;e.mode=12;break}if(L&64){b.msg="invalid literal/length code";e.mode=30;break}e.extra=L&15;e.mode=22;case 22:if(e.extra){for(L=e.extra;z<L;){if(0===t)break a;t--;n+=h[q++]<<
z;z+=8}e.length+=n&(1<<e.extra)-1;n>>>=e.extra;z-=e.extra;e.back+=e.extra}e.was=e.length;e.mode=23;case 23:for(;;){ja=e.distcode[n&(1<<e.distbits)-1];A=ja>>>24;L=ja>>>16&255;ja&=65535;if(A<=z)break;if(0===t)break a;t--;n+=h[q++]<<z;z+=8}if(0===(L&240)){la=A;Ia=L;for(va=ja;;){ja=e.distcode[va+((n&(1<<la+Ia)-1)>>la)];A=ja>>>24;L=ja>>>16&255;ja&=65535;if(la+A<=z)break;if(0===t)break a;t--;n+=h[q++]<<z;z+=8}n>>>=la;z-=la;e.back+=la}n>>>=A;z-=A;e.back+=A;if(L&64){b.msg="invalid distance code";e.mode=30;
break}e.offset=ja;e.extra=L&15;e.mode=24;case 24:if(e.extra){for(L=e.extra;z<L;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}e.offset+=n&(1<<e.extra)-1;n>>>=e.extra;z-=e.extra;e.back+=e.extra}if(e.offset>e.dmax){b.msg="invalid distance too far back";e.mode=30;break}e.mode=25;case 25:if(0===x)break a;A=D-x;if(e.offset>A){A=e.offset-A;if(A>e.whave&&e.sane){b.msg="invalid distance too far back";e.mode=30;break}A>e.wnext?(A-=e.wnext,L=e.wsize-A):L=e.wnext-A;A>e.length&&(A=e.length);la=e.window}else la=k,L=
r-e.offset,A=e.length;A>x&&(A=x);x-=A;e.length-=A;do k[r++]=la[L++];while(--A);0===e.length&&(e.mode=21);break;case 26:if(0===x)break a;k[r++]=e.length;x--;e.mode=21;break;case 27:if(e.wrap){for(;32>z;){if(0===t)break a;t--;n|=h[q++]<<z;z+=8}D-=x;b.total_out+=D;e.total+=D;D&&(b.adler=e.check=e.flags?B(e.check,k,D,r-D):G(e.check,k,D,r-D));D=x;if((e.flags?n:f(n))!==e.check){b.msg="incorrect data check";e.mode=30;break}z=n=0}e.mode=28;case 28:if(e.wrap&&e.flags){for(;32>z;){if(0===t)break a;t--;n+=h[q++]<<
z;z+=8}if(n!==(e.total&4294967295)){b.msg="incorrect length check";e.mode=30;break}z=n=0}e.mode=29;case 29:O=1;break a;case 30:O=-3;break a;case 31:return-4;default:return-2}b.next_out=r;b.avail_out=x;b.next_in=q;b.avail_in=t;e.hold=n;e.bits=z;if(e.wsize||D!==b.avail_out&&30>e.mode&&(27>e.mode||4!==d))h=b.output,q=b.next_out,r=D-b.avail_out,x=b.state,null===x.window&&(x.wsize=1<<x.wbits,x.wnext=0,x.whave=0,x.window=new y.Buf8(x.wsize)),r>=x.wsize?(y.arraySet(x.window,h,q-x.wsize,x.wsize,0),x.wnext=
0,x.whave=x.wsize):(t=x.wsize-x.wnext,t>r&&(t=r),y.arraySet(x.window,h,q-r,t,x.wnext),(r-=t)?(y.arraySet(x.window,h,q-r,r,0),x.wnext=r,x.whave=x.wsize):(x.wnext+=t,x.wnext===x.wsize&&(x.wnext=0),x.whave<x.wsize&&(x.whave+=t)));Y-=b.avail_in;D-=b.avail_out;b.total_in+=Y;b.total_out+=D;e.total+=D;e.wrap&&D&&(b.adler=e.check=e.flags?B(e.check,k,D,b.next_out-D):G(e.check,k,D,b.next_out-D));b.data_type=e.bits+(e.last?64:0)+(12===e.mode?128:0)+(20===e.mode||15===e.mode?256:0);(0===Y&&0===D||4===d)&&0===
O&&(O=-5);return O};d.inflateEnd=function(b){if(!b||!b.state)return-2;var d=b.state;d.window&&(d.window=null);b.state=null;return 0};d.inflateGetHeader=function(b,d){var f;if(!b||!b.state)return-2;f=b.state;if(0===(f.wrap&2))return-2;f.head=d;d.done=!1;return 0};d.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":4,"./adler32":6,"./crc32":8,"./inffast":11,"./inftrees":13}],13:[function(b,e,d){var f=b("../utils/common"),k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,
83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],r=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],q=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(b,d,e,B,w,E,P,da){for(var aa=da.bits,M=0,ka=0,m=0,fa=0,ba=0,Z=0,X=0,U=0,x=0,n=0,z,Y,D=null,A=0,L,la=new f.Buf16(16),Z=new f.Buf16(16),
ja=null,Ia=0,va,O,wa,M=0;15>=M;M++)la[M]=0;for(ka=0;ka<B;ka++)la[d[e+ka]]++;ba=aa;for(fa=15;1<=fa&&0===la[fa];fa--);ba>fa&&(ba=fa);if(0===fa)return w[E++]=20971520,w[E++]=20971520,da.bits=1,0;for(m=1;m<fa&&0===la[m];m++);ba<m&&(ba=m);for(M=U=1;15>=M;M++)if(U<<=1,U-=la[M],0>U)return-1;if(0<U&&(0===b||1!==fa))return-1;Z[1]=0;for(M=1;15>M;M++)Z[M+1]=Z[M]+la[M];for(ka=0;ka<B;ka++)0!==d[e+ka]&&(P[Z[d[e+ka]]++]=ka);0===b?(D=ja=P,L=19):1===b?(D=k,A-=257,ja=h,Ia-=257,L=256):(D=r,ja=q,L=-1);ka=n=0;M=m;aa=
E;Z=ba;X=0;Y=-1;x=1<<ba;B=x-1;if(1===b&&852<x||2===b&&592<x)return 1;for(var Ua=0;;){Ua++;va=M-X;P[ka]<L?(O=0,wa=P[ka]):P[ka]>L?(O=ja[Ia+P[ka]],wa=D[A+P[ka]]):(O=96,wa=0);U=1<<M-X;m=z=1<<Z;do z-=U,w[aa+(n>>X)+z]=va<<24|O<<16|wa|0;while(0!==z);for(U=1<<M-1;n&U;)U>>=1;0!==U?(n&=U-1,n+=U):n=0;ka++;if(0===--la[M]){if(M===fa)break;M=d[e+P[ka]]}if(M>ba&&(n&B)!==Y){0===X&&(X=ba);aa+=m;Z=M-X;for(U=1<<Z;Z+X<fa;){U-=la[Z+X];if(0>=U)break;Z++;U<<=1}x+=1<<Z;if(1===b&&852<x||2===b&&592<x)return 1;Y=n&B;w[Y]=ba<<
24|Z<<16|aa-E|0}}0!==n&&(w[aa+n]=M-X<<24|4194304);da.bits=ba;return 0}},{"../utils/common":4}],14:[function(b,e,d){e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],15:[function(b,e,d){function f(b){for(var d=b.length;0<=--d;)b[d]=0}function k(b,d){b.pending_buf[b.pending++]=d&255;b.pending_buf[b.pending++]=d>>>8&255}function h(b,d,f){b.bi_valid>16-f?(b.bi_buf|=
d<<b.bi_valid&65535,k(b,b.bi_buf),b.bi_buf=d>>16-b.bi_valid,b.bi_valid+=f-16):(b.bi_buf|=d<<b.bi_valid&65535,b.bi_valid+=f)}function r(b,d,f){h(b,f[2*d],f[2*d+1])}function q(b,d){var f=0;do f|=b&1,b>>>=1,f<<=1;while(0<--d);return f>>>1}function t(b,d,f){var e=Array(16),h=0,k;for(k=1;15>=k;k++)e[k]=h=h+f[k-1]<<1;for(f=0;f<=d;f++)h=b[2*f+1],0!==h&&(b[2*f]=q(e[h]++,h))}function y(b){var d;for(d=0;286>d;d++)b.dyn_ltree[2*d]=0;for(d=0;30>d;d++)b.dyn_dtree[2*d]=0;for(d=0;19>d;d++)b.bl_tree[2*d]=0;b.dyn_ltree[512]=
1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function G(b){8<b.bi_valid?k(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);b.bi_buf=0;b.bi_valid=0}function B(b,d,f,e){var h=2*d,k=2*f;return b[h]<b[k]||b[h]===b[k]&&e[d]<=e[f]}function w(b,d,f){for(var e=b.heap[f],h=f<<1;h<=b.heap_len;){h<b.heap_len&&B(d,b.heap[h+1],b.heap[h],b.depth)&&h++;if(B(d,e,b.heap[h],b.depth))break;b.heap[f]=b.heap[h];f=h;h<<=1}b.heap[f]=e}function E(b,d,f){var e,k,m=0,q,t;if(0!==b.last_lit){do e=b.pending_buf[b.d_buf+
2*m]<<8|b.pending_buf[b.d_buf+2*m+1],k=b.pending_buf[b.l_buf+m],m++,0===e?r(b,k,d):(q=z[k],r(b,q+256+1,d),t=fa[q],0!==t&&(k-=Y[q],h(b,k,t)),e--,q=256>e?n[e]:n[256+(e>>>7)],r(b,q,f),t=ba[q],0!==t&&(e-=D[q],h(b,e,t)));while(m<b.last_lit)}r(b,256,d)}function P(b,d){var f=d.dyn_tree,e=d.stat_desc.static_tree,h=d.stat_desc.has_stree,k=d.stat_desc.elems,n,m=-1,q;b.heap_len=0;b.heap_max=573;for(n=0;n<k;n++)0!==f[2*n]?(b.heap[++b.heap_len]=m=n,b.depth[n]=0):f[2*n+1]=0;for(;2>b.heap_len;)q=b.heap[++b.heap_len]=
2>m?++m:0,f[2*q]=1,b.depth[q]=0,b.opt_len--,h&&(b.static_len-=e[2*q+1]);d.max_code=m;for(n=b.heap_len>>1;1<=n;n--)w(b,f,n);q=k;do n=b.heap[1],b.heap[1]=b.heap[b.heap_len--],w(b,f,1),e=b.heap[1],b.heap[--b.heap_max]=n,b.heap[--b.heap_max]=e,f[2*q]=f[2*n]+f[2*e],b.depth[q]=(b.depth[n]>=b.depth[e]?b.depth[n]:b.depth[e])+1,f[2*n+1]=f[2*e+1]=q,b.heap[1]=q++,w(b,f,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];n=d.dyn_tree;q=d.max_code;for(var r=d.stat_desc.static_tree,x=d.stat_desc.has_stree,A=
d.stat_desc.extra_bits,D=d.stat_desc.extra_base,z=d.stat_desc.max_length,y,B,E=0,k=0;15>=k;k++)b.bl_count[k]=0;n[2*b.heap[b.heap_max]+1]=0;for(e=b.heap_max+1;573>e;e++)h=b.heap[e],k=n[2*n[2*h+1]+1]+1,k>z&&(k=z,E++),n[2*h+1]=k,h>q||(b.bl_count[k]++,y=0,h>=D&&(y=A[h-D]),B=n[2*h],b.opt_len+=B*(k+y),x&&(b.static_len+=B*(r[2*h+1]+y)));if(0!==E){do{for(k=z-1;0===b.bl_count[k];)k--;b.bl_count[k]--;b.bl_count[k+1]+=2;b.bl_count[z]--;E-=2}while(0<E);for(k=z;0!==k;k--)for(h=b.bl_count[k];0!==h;)r=b.heap[--e],
r>q||(n[2*r+1]!==k&&(b.opt_len+=(k-n[2*r+1])*n[2*r],n[2*r+1]=k),h--)}t(f,m,b.bl_count)}function da(b,d,f){var e,h=-1,k,n=d[1],m=0,q=7,r=4;0===n&&(q=138,r=3);d[2*(f+1)+1]=65535;for(e=0;e<=f;e++)k=n,n=d[2*(e+1)+1],++m<q&&k===n||(m<r?b.bl_tree[2*k]+=m:0!==k?(k!==h&&b.bl_tree[2*k]++,b.bl_tree[32]++):10>=m?b.bl_tree[34]++:b.bl_tree[36]++,m=0,h=k,0===n?(q=138,r=3):k===n?(q=6,r=3):(q=7,r=4))}function aa(b,d,f){var e,k=-1,n,m=d[1],q=0,t=7,w=4;0===m&&(t=138,w=3);for(e=0;e<=f;e++)if(n=m,m=d[2*(e+1)+1],!(++q<
t&&n===m)){if(q<w){do r(b,n,b.bl_tree);while(0!==--q)}else 0!==n?(n!==k&&(r(b,n,b.bl_tree),q--),r(b,16,b.bl_tree),h(b,q-3,2)):10>=q?(r(b,17,b.bl_tree),h(b,q-3,3)):(r(b,18,b.bl_tree),h(b,q-11,7));q=0;k=n;0===m?(t=138,w=3):n===m?(t=6,w=3):(t=7,w=4)}}function M(b){var d=4093624447,f;for(f=0;31>=f;f++,d>>>=1)if(d&1&&0!==b.dyn_ltree[2*f])return 0;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return 1;for(f=32;256>f;f++)if(0!==b.dyn_ltree[2*f])return 1;return 0}function ka(b,d,f,e){h(b,
0+(e?1:0),3);G(b);k(b,f);k(b,~f);m.arraySet(b.pending_buf,b.window,d,f,b.pending);b.pending+=f}var m=b("../utils/common"),fa=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ba=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Z=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],X=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],U=Array(576);f(U);var x=Array(60);f(x);var n=Array(512);f(n);var z=Array(256);f(z);var Y=Array(29);f(Y);var D=Array(30);f(D);var A=function(b,d,f,e,h){this.static_tree=
b;this.extra_bits=d;this.extra_base=f;this.elems=e;this.max_length=h;this.has_stree=b&&b.length},L,la,ja,Ia=function(b,d){this.dyn_tree=b;this.max_code=0;this.stat_desc=d},va=!1;d._tr_init=function(b){if(!va){var d,f,e,h=Array(16);for(e=f=0;28>e;e++)for(Y[e]=f,d=0;d<1<<fa[e];d++)z[f++]=e;z[f-1]=e;for(e=f=0;16>e;e++)for(D[e]=f,d=0;d<1<<ba[e];d++)n[f++]=e;for(f>>=7;30>e;e++)for(D[e]=f<<7,d=0;d<1<<ba[e]-7;d++)n[256+f++]=e;for(d=0;15>=d;d++)h[d]=0;for(d=0;143>=d;)U[2*d+1]=8,d++,h[8]++;for(;255>=d;)U[2*
d+1]=9,d++,h[9]++;for(;279>=d;)U[2*d+1]=7,d++,h[7]++;for(;287>=d;)U[2*d+1]=8,d++,h[8]++;t(U,287,h);for(d=0;30>d;d++)x[2*d+1]=5,x[2*d]=q(d,5);L=new A(U,fa,257,286,15);la=new A(x,ba,0,30,15);ja=new A([],Z,0,19,7);va=!0}b.l_desc=new Ia(b.dyn_ltree,L);b.d_desc=new Ia(b.dyn_dtree,la);b.bl_desc=new Ia(b.bl_tree,ja);b.bi_buf=0;b.bi_valid=0;y(b)};d._tr_stored_block=ka;d._tr_flush_block=function(b,d,f,e){var k,n,m=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=M(b));P(b,b.l_desc);P(b,b.d_desc);da(b,
b.dyn_ltree,b.l_desc.max_code);da(b,b.dyn_dtree,b.d_desc.max_code);P(b,b.bl_desc);for(m=18;3<=m&&0===b.bl_tree[2*X[m]+1];m--);b.opt_len+=3*(m+1)+14;k=b.opt_len+3+7>>>3;n=b.static_len+3+7>>>3;n<=k&&(k=n)}else k=n=f+5;if(f+4<=k&&-1!==d)ka(b,d,f,e);else if(4===b.strategy||n===k)h(b,2+(e?1:0),3),E(b,U,x);else{h(b,4+(e?1:0),3);d=b.l_desc.max_code+1;f=b.d_desc.max_code+1;m+=1;h(b,d-257,5);h(b,f-1,5);h(b,m-4,4);for(k=0;k<m;k++)h(b,b.bl_tree[2*X[k]+1],3);aa(b,b.dyn_ltree,d-1);aa(b,b.dyn_dtree,f-1);E(b,b.dyn_ltree,
b.dyn_dtree)}y(b);e&&G(b)};d._tr_tally=function(b,d,f){b.pending_buf[b.d_buf+2*b.last_lit]=d>>>8&255;b.pending_buf[b.d_buf+2*b.last_lit+1]=d&255;b.pending_buf[b.l_buf+b.last_lit]=f&255;b.last_lit++;0===d?b.dyn_ltree[2*f]++:(b.matches++,d--,b.dyn_ltree[2*(z[f]+256+1)]++,b.dyn_dtree[2*(256>d?n[d]:n[256+(d>>>7)])]++);return b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){h(b,2,3);r(b,256,U);16===b.bi_valid?(k(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf&
255,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":4}],16:[function(b,e,d){e.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],17:[function(b,e,d){var f=f||{};f.NIFTI1=f.NIFTI1||("undefined"!==typeof b?b("./nifti1.js"):null);f.NIFTI2=f.NIFTI2||("undefined"!==typeof b?b("./nifti2.js"):null);f.Utils=f.Utils||("undefined"!==typeof b?b("./utilities.js"):
null);var k=k||("undefined"!==typeof b?b("pako"):null);f.isNIFTI1=function(b){var d,e;if(b.byteLength<f.NIFTI1.STANDARD_HEADER_SIZE)return!1;(d=new DataView(b))&&(e=d.getUint8(f.NIFTI1.MAGIC_NUMBER_LOCATION));b=d.getUint8(f.NIFTI1.MAGIC_NUMBER_LOCATION+1);d=d.getUint8(f.NIFTI1.MAGIC_NUMBER_LOCATION+2);return!(e!==f.NIFTI1.MAGIC_NUMBER[0]||b!==f.NIFTI1.MAGIC_NUMBER[1]||d!==f.NIFTI1.MAGIC_NUMBER[2])};f.isNIFTI2=function(b){var d,e;if(b.byteLength<f.NIFTI1.STANDARD_HEADER_SIZE)return!1;d=new DataView(b);
b=d.getUint8(f.NIFTI2.MAGIC_NUMBER_LOCATION);e=d.getUint8(f.NIFTI2.MAGIC_NUMBER_LOCATION+1);d=d.getUint8(f.NIFTI2.MAGIC_NUMBER_LOCATION+2);return!(b!==f.NIFTI2.MAGIC_NUMBER[0]||e!==f.NIFTI2.MAGIC_NUMBER[1]||d!==f.NIFTI2.MAGIC_NUMBER[2])};f.isNIFTI=function(b){return f.isNIFTI1(b)||f.isNIFTI2(b)};f.isCompressed=function(b){var d;return b&&(d=new DataView(b),b=d.getUint8(0),d=d.getUint8(1),b===f.Utils.GUNZIP_MAGIC_COOKIE1||d===f.Utils.GUNZIP_MAGIC_COOKIE2)?!0:!1};f.decompress=function(b){return k.inflate(b).buffer};
f.readHeader=function(b){var d=null;f.isCompressed(b)&&(b=f.decompress(b));f.isNIFTI1(b)?d=new f.NIFTI1:f.isNIFTI2(b)&&(d=new f.NIFTI2);d?d.readHeader(b):console.error("That file does not appear to be NIFTI!");return d};f.hasExtension=function(b){return 0!=b.extensionFlag[0]};f.readImage=function(b,d){var f=b.vox_offset,e=1,k=1;b.dims[4]&&(e=b.dims[4]);b.dims[5]&&(k=b.dims[5]);return d.slice(f,f+b.numBitsPerVoxel/8*b.dims[2]*b.dims[3]*e*k*b.dims[1])};f.readExtension=function(b,d){var f=b.getExtensionLocation();
return d.slice(f,f+b.extensionSize)};f.readExtensionData=function(b,d){var f=b.getExtensionLocation();return d.slice(f+8,f+b.extensionSize-8)};"undefined"!==typeof e&&e.exports&&(e.exports=f)},{"./nifti1.js":18,"./nifti2.js":19,"./utilities.js":20,pako:1}],18:[function(b,e,d){var f=f||{};f.Utils=f.Utils||("undefined"!==typeof b?b("./utilities.js"):null);f.NIFTI1=f.NIFTI1||function(){this.littleEndian=!1;this.dim_info=0;this.dims=[];this.slice_code=this.slice_end=this.slice_start=this.numBitsPerVoxel=
this.datatypeCode=this.intent_code=this.intent_p3=this.intent_p2=this.intent_p1=0;this.pixDims=[];this.vox_offset=0;this.scl_slope=1;this.toffset=this.slice_duration=this.cal_min=this.cal_max=this.xyzt_units=this.scl_inter=0;this.intent_name=this.aux_file=this.description="";this.qoffset_z=this.qoffset_y=this.qoffset_x=this.quatern_d=this.quatern_c=this.quatern_b=this.sform_code=this.qform_code=0;this.affine=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];this.magic=0;this.isHDR=!1;this.extensionFlag=[0,
0,0,0];this.extensionCode=this.extensionSize=0};f.NIFTI1.TYPE_NONE=0;f.NIFTI1.TYPE_BINARY=1;f.NIFTI1.TYPE_UINT8=2;f.NIFTI1.TYPE_INT16=4;f.NIFTI1.TYPE_INT32=8;f.NIFTI1.TYPE_FLOAT32=16;f.NIFTI1.TYPE_COMPLEX64=32;f.NIFTI1.TYPE_FLOAT64=64;f.NIFTI1.TYPE_RGB24=128;f.NIFTI1.TYPE_INT8=256;f.NIFTI1.TYPE_UINT16=512;f.NIFTI1.TYPE_UINT32=768;f.NIFTI1.TYPE_INT64=1024;f.NIFTI1.TYPE_UINT64=1280;f.NIFTI1.TYPE_FLOAT128=1536;f.NIFTI1.TYPE_COMPLEX128=1792;f.NIFTI1.TYPE_COMPLEX256=2048;f.NIFTI1.XFORM_UNKNOWN=0;f.NIFTI1.XFORM_SCANNER_ANAT=
1;f.NIFTI1.XFORM_ALIGNED_ANAT=2;f.NIFTI1.XFORM_TALAIRACH=3;f.NIFTI1.XFORM_MNI_152=4;f.NIFTI1.SPATIAL_UNITS_MASK=7;f.NIFTI1.TEMPORAL_UNITS_MASK=56;f.NIFTI1.UNITS_UNKNOWN=0;f.NIFTI1.UNITS_METER=1;f.NIFTI1.UNITS_MM=2;f.NIFTI1.UNITS_MICRON=3;f.NIFTI1.UNITS_SEC=8;f.NIFTI1.UNITS_MSEC=16;f.NIFTI1.UNITS_USEC=24;f.NIFTI1.UNITS_HZ=32;f.NIFTI1.UNITS_PPM=40;f.NIFTI1.UNITS_RADS=48;f.NIFTI1.MAGIC_COOKIE=348;f.NIFTI1.STANDARD_HEADER_SIZE=348;f.NIFTI1.MAGIC_NUMBER_LOCATION=344;f.NIFTI1.MAGIC_NUMBER=[110,43,49];f.NIFTI1.MAGIC_NUMBER2=
[110,105,49];f.NIFTI1.EXTENSION_HEADER_SIZE=8;f.NIFTI1.prototype.readHeader=function(b){b=new DataView(b);var d=f.Utils.getIntAt(b,0,this.littleEndian),e,q;d!==f.NIFTI1.MAGIC_COOKIE&&(this.littleEndian=!0,d=f.Utils.getIntAt(b,0,this.littleEndian));if(d!==f.NIFTI1.MAGIC_COOKIE)throw Error("This does not appear to be a NIFTI file!");this.dim_info=f.Utils.getByteAt(b,39);for(e=0;8>e;e+=1)d=40+2*e,this.dims[e]=f.Utils.getShortAt(b,d,this.littleEndian);this.intent_p1=f.Utils.getFloatAt(b,56,this.littleEndian);
this.intent_p2=f.Utils.getFloatAt(b,60,this.littleEndian);this.intent_p3=f.Utils.getFloatAt(b,64,this.littleEndian);this.intent_code=f.Utils.getShortAt(b,68,this.littleEndian);this.datatypeCode=f.Utils.getShortAt(b,70,this.littleEndian);this.numBitsPerVoxel=f.Utils.getShortAt(b,72,this.littleEndian);this.slice_start=f.Utils.getShortAt(b,74,this.littleEndian);for(e=0;8>e;e+=1)d=76+4*e,this.pixDims[e]=f.Utils.getFloatAt(b,d,this.littleEndian);this.vox_offset=f.Utils.getFloatAt(b,108,this.littleEndian);
this.scl_slope=f.Utils.getFloatAt(b,112,this.littleEndian);this.scl_inter=f.Utils.getFloatAt(b,116,this.littleEndian);this.slice_end=f.Utils.getShortAt(b,120,this.littleEndian);this.slice_code=f.Utils.getByteAt(b,122);this.xyzt_units=f.Utils.getByteAt(b,123);this.cal_max=f.Utils.getFloatAt(b,124,this.littleEndian);this.cal_min=f.Utils.getFloatAt(b,128,this.littleEndian);this.slice_duration=f.Utils.getFloatAt(b,132,this.littleEndian);this.toffset=f.Utils.getFloatAt(b,136,this.littleEndian);this.description=
f.Utils.getStringAt(b,148,228);this.aux_file=f.Utils.getStringAt(b,228,252);this.qform_code=f.Utils.getShortAt(b,252,this.littleEndian);this.sform_code=f.Utils.getShortAt(b,254,this.littleEndian);this.quatern_b=f.Utils.getFloatAt(b,256,this.littleEndian);this.quatern_c=f.Utils.getFloatAt(b,260,this.littleEndian);this.quatern_d=f.Utils.getFloatAt(b,264,this.littleEndian);this.qoffset_x=f.Utils.getFloatAt(b,268,this.littleEndian);this.qoffset_y=f.Utils.getFloatAt(b,272,this.littleEndian);this.qoffset_z=
f.Utils.getFloatAt(b,276,this.littleEndian);for(e=0;3>e;e+=1)for(q=0;4>q;q+=1)d=280+4*(4*e+q),this.affine[e][q]=f.Utils.getFloatAt(b,d,this.littleEndian);this.affine[3][0]=0;this.affine[3][1]=0;this.affine[3][2]=0;this.affine[3][3]=1;this.intent_name=f.Utils.getStringAt(b,328,344);this.magic=f.Utils.getStringAt(b,344,348);this.isHDR=this.magic===f.NIFTI1.MAGIC_NUMBER2;b.byteLength>f.NIFTI1.MAGIC_COOKIE&&(this.extensionFlag[0]=f.Utils.getByteAt(b,348),this.extensionFlag[1]=f.Utils.getByteAt(b,349),
this.extensionFlag[2]=f.Utils.getByteAt(b,350),this.extensionFlag[3]=f.Utils.getByteAt(b,351),this.extensionFlag[0]&&(this.extensionSize=this.getExtensionSize(b),this.extensionCode=this.getExtensionCode(b)))};f.NIFTI1.prototype.toFormattedString=function(){var b=f.Utils.formatNumber,d;d=""+("Dim Info = "+this.dim_info+"\n");d+="Image Dimensions (1-8): "+this.dims[0]+", "+this.dims[1]+", "+this.dims[2]+", "+this.dims[3]+", "+this.dims[4]+", "+this.dims[5]+", "+this.dims[6]+", "+this.dims[7]+"\n";d+=
"Intent Parameters (1-3): "+this.intent_p1+", "+this.intent_p2+", "+this.intent_p3+"\n";d+="Intent Code = "+this.intent_code+"\n";d+="Datatype = "+this.datatypeCode+" ("+this.getDatatypeCodeString(this.datatypeCode)+")\n";d+="Bits Per Voxel = "+this.numBitsPerVoxel+"\n";d+="Slice Start = "+this.slice_start+"\n";d+="Voxel Dimensions (1-8): "+b(this.pixDims[0])+", "+b(this.pixDims[1])+", "+b(this.pixDims[2])+", "+b(this.pixDims[3])+", "+b(this.pixDims[4])+", "+b(this.pixDims[5])+", "+b(this.pixDims[6])+
", "+b(this.pixDims[7])+"\n";d+="Image Offset = "+this.vox_offset+"\n";d+="Data Scale:  Slope = "+b(this.scl_slope)+"  Intercept = "+b(this.scl_inter)+"\n";d+="Slice End = "+this.slice_end+"\n";d+="Slice Code = "+this.slice_code+"\n";d+="Units Code = "+this.xyzt_units+" ("+this.getUnitsCodeString(f.NIFTI1.SPATIAL_UNITS_MASK&this.xyzt_units)+", "+this.getUnitsCodeString(f.NIFTI1.TEMPORAL_UNITS_MASK&this.xyzt_units)+")\n";d+="Display Range:  Max = "+b(this.cal_max)+"  Min = "+b(this.cal_min)+"\n";d+=
"Slice Duration = "+this.slice_duration+"\n";d+="Time Axis Shift = "+this.toffset+"\n";d+='Description: "'+this.description+'"\n';d+='Auxiliary File: "'+this.aux_file+'"\n';d+="Q-Form Code = "+this.qform_code+" ("+this.getTransformCodeString(this.qform_code)+")\n";d+="S-Form Code = "+this.sform_code+" ("+this.getTransformCodeString(this.sform_code)+")\n";d+="Quaternion Parameters:  b = "+b(this.quatern_b)+"  c = "+b(this.quatern_c)+"  d = "+b(this.quatern_d)+"\n";d+="Quaternion Offsets:  x = "+this.qoffset_x+
"  y = "+this.qoffset_y+"  z = "+this.qoffset_z+"\n";d+="S-Form Parameters X: "+b(this.affine[0][0])+", "+b(this.affine[0][1])+", "+b(this.affine[0][2])+", "+b(this.affine[0][3])+"\n";d+="S-Form Parameters Y: "+b(this.affine[1][0])+", "+b(this.affine[1][1])+", "+b(this.affine[1][2])+", "+b(this.affine[1][3])+"\n";d+="S-Form Parameters Z: "+b(this.affine[2][0])+", "+b(this.affine[2][1])+", "+b(this.affine[2][2])+", "+b(this.affine[2][3])+"\n";d+='Intent Name: "'+this.intent_name+'"\n';this.extensionFlag[0]&&
(d+="Extension: Size = "+this.extensionSize+"  Code = "+this.extensionCode+"\n");return d};f.NIFTI1.prototype.getDatatypeCodeString=function(b){return b===f.NIFTI1.TYPE_UINT8?"1-Byte Unsigned Integer":b===f.NIFTI1.TYPE_INT16?"2-Byte Signed Integer":b===f.NIFTI1.TYPE_INT32?"4-Byte Signed Integer":b===f.NIFTI1.TYPE_FLOAT32?"4-Byte Float":b===f.NIFTI1.TYPE_FLOAT64?"8-Byte Float":b===f.NIFTI1.TYPE_RGB24?"RGB":b===f.NIFTI1.TYPE_INT8?"1-Byte Signed Integer":b===f.NIFTI1.TYPE_UINT16?"2-Byte Unsigned Integer":
b===f.NIFTI1.TYPE_UINT32?"4-Byte Unsigned Integer":b===f.NIFTI1.TYPE_INT64?"8-Byte Signed Integer":b===f.NIFTI1.TYPE_UINT64?"8-Byte Unsigned Integer":"Unknown"};f.NIFTI1.prototype.getTransformCodeString=function(b){return b===f.NIFTI1.XFORM_SCANNER_ANAT?"Scanner":b===f.NIFTI1.XFORM_ALIGNED_ANAT?"Aligned":b===f.NIFTI1.XFORM_TALAIRACH?"Talairach":b===f.NIFTI1.XFORM_MNI_152?"MNI":"Unknown"};f.NIFTI1.prototype.getUnitsCodeString=function(b){return b===f.NIFTI1.UNITS_METER?"Meters":b===f.NIFTI1.UNITS_MM?
"Millimeters":b===f.NIFTI1.UNITS_MICRON?"Microns":b===f.NIFTI1.UNITS_SEC?"Seconds":b===f.NIFTI1.UNITS_MSEC?"Milliseconds":b===f.NIFTI1.UNITS_USEC?"Microseconds":b===f.NIFTI1.UNITS_HZ?"Hz":b===f.NIFTI1.UNITS_PPM?"PPM":b===f.NIFTI1.UNITS_RADS?"Rads":"Unknown"};f.NIFTI1.prototype.getQformMat=function(){return this.convertNiftiQFormToNiftiSForm(this.quatern_b,this.quatern_c,this.quatern_d,this.qoffset_x,this.qoffset_y,this.qoffset_z,this.pixDims[1],this.pixDims[2],this.pixDims[3],this.pixDims[0])};f.NIFTI1.prototype.convertNiftiQFormToNiftiSForm=
function(b,d,f,e,t,y,G,B,w,E){var P=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],da=f;P[3][0]=P[3][1]=P[3][2]=0;P[3][3]=1;f=1-(b*b+d*d+da*da);1E-7>f?(f=1/Math.sqrt(b*b+d*d+da*da),b*=f,d*=f,da*=f,f=0):f=Math.sqrt(f);G=0<G?G:1;B=0<B?B:1;w=0<w?w:1;0>E&&(w=-w);P[0][0]=(f*f+b*b-d*d-da*da)*G;P[0][1]=2*(b*d-f*da)*B;P[0][2]=2*(b*da+f*d)*w;P[1][0]=2*(b*d+f*da)*G;P[1][1]=(f*f+d*d-b*b-da*da)*B;P[1][2]=2*(d*da-f*b)*w;P[2][0]=2*(b*da-f*d)*G;P[2][1]=2*(d*da+f*b)*B;P[2][2]=(f*f+da*da-d*d-b*b)*w;P[0][3]=e;P[1][3]=t;
P[2][3]=y;return P};f.NIFTI1.prototype.convertNiftiSFormToNEMA=function(b){var d,f,e,t,y,G,B,w,E,P,da,aa,M,ka,m,fa;m=[[0,0,0],[0,0,0],[0,0,0]];fa=[[0,0,0],[0,0,0],[0,0,0]];d=b[0][0];f=b[0][1];e=b[0][2];t=b[1][0];y=b[1][1];G=b[1][2];B=b[2][0];w=b[2][1];E=b[2][2];b=Math.sqrt(d*d+t*t+B*B);if(0===b)return null;d/=b;t/=b;B/=b;b=Math.sqrt(f*f+y*y+w*w);if(0===b)return null;f/=b;y/=b;w/=b;b=d*f+t*y+B*w;if(1E-4<Math.abs(b)){f-=b*d;y-=b*t;w-=b*B;b=Math.sqrt(f*f+y*y+w*w);if(0===b)return null;f/=b;y/=b;w/=b}b=
Math.sqrt(e*e+G*G+E*E);0===b?(e=t*w-B*y,G=B*f-w*d,E=d*y-t*f):(e/=b,G/=b,E/=b);b=d*e+t*G+B*E;if(1E-4<Math.abs(b)){e-=b*d;G-=b*t;E-=b*B;b=Math.sqrt(e*e+G*G+E*E);if(0===b)return null;e/=b;G/=b;E/=b}b=f*e+y*G+w*E;if(1E-4<Math.abs(b)){e-=b*f;G-=b*y;E-=b*w;b=Math.sqrt(e*e+G*G+E*E);if(0===b)return null;e/=b;G/=b;E/=b}m[0][0]=d;m[0][1]=f;m[0][2]=e;m[1][0]=t;m[1][1]=y;m[1][2]=G;m[2][0]=B;m[2][1]=w;m[2][2]=E;B=this.nifti_mat33_determ(m);if(0===B)return null;ka=-666;d=t=y=G=1;f=2;e=3;for(w=1;3>=w;w+=1)for(E=
1;3>=E;E+=1)if(w!==E)for(P=1;3>=P;P+=1)if(w!==P&&E!==P)for(fa[0][0]=fa[0][1]=fa[0][2]=fa[1][0]=fa[1][1]=fa[1][2]=fa[2][0]=fa[2][1]=fa[2][2]=0,da=-1;1>=da;da+=2)for(aa=-1;1>=aa;aa+=2)for(M=-1;1>=M;M+=2)fa[0][w-1]=da,fa[1][E-1]=aa,fa[2][P-1]=M,b=this.nifti_mat33_determ(fa),0<b*B&&(b=this.nifti_mat33_mul(fa,m),b=b[0][0]+b[1][1]+b[2][2],b>ka&&(ka=b,d=w,f=E,e=P,t=da,y=aa,G=M));m=fa=b=B=w=E=0;switch(d*t){case 1:m="X";B="+";break;case -1:m="X";B="-";break;case 2:m="Y";B="+";break;case -2:m="Y";B="-";break;
case 3:m="Z";B="+";break;case -3:m="Z",B="-"}switch(f*y){case 1:fa="X";w="+";break;case -1:fa="X";w="-";break;case 2:fa="Y";w="+";break;case -2:fa="Y";w="-";break;case 3:fa="Z";w="+";break;case -3:fa="Z",w="-"}switch(e*G){case 1:b="X";E="+";break;case -1:b="X";E="-";break;case 2:b="Y";E="+";break;case -2:b="Y";E="-";break;case 3:b="Z";E="+";break;case -3:b="Z",E="-"}return m+fa+b+B+w+E};f.NIFTI1.prototype.nifti_mat33_mul=function(b,d){var f=[[0,0,0],[0,0,0],[0,0,0]],e,t;for(e=0;3>e;e+=1)for(t=0;3>
t;t+=1)f[e][t]=b[e][0]*d[0][t]+b[e][1]*d[1][t]+b[e][2]*d[2][t];return f};f.NIFTI1.prototype.nifti_mat33_determ=function(b){var d,f,e,t,y,G,B,w;d=b[0][0];f=b[0][1];e=b[0][2];t=b[1][0];y=b[1][1];G=b[1][2];B=b[2][0];w=b[2][1];b=b[2][2];return d*y*b-d*w*G-t*f*b+t*w*e+B*f*G-B*y*e};f.NIFTI1.prototype.getExtensionLocation=function(){return f.NIFTI1.MAGIC_COOKIE+4};f.NIFTI1.prototype.getExtensionSize=function(b){return f.Utils.getIntAt(b,this.getExtensionLocation(),this.littleEndian)};f.NIFTI1.prototype.getExtensionCode=
function(b){return f.Utils.getIntAt(b,this.getExtensionLocation()+4,this.littleEndian)};"undefined"!==typeof e&&e.exports&&(e.exports=f.NIFTI1)},{"./utilities.js":20}],19:[function(b,e,d){var f=f||{};f.Utils=f.Utils||("undefined"!==typeof b?b("./utilities.js"):null);f.NIFTI1=f.NIFTI1||("undefined"!==typeof b?b("./nifti1.js"):null);f.NIFTI2=f.NIFTI2||function(){this.littleEndian=!1;this.dim_info=0;this.dims=[];this.slice_code=this.slice_end=this.slice_start=this.numBitsPerVoxel=this.datatypeCode=this.intent_code=
this.intent_p3=this.intent_p2=this.intent_p1=0;this.pixDims=[];this.vox_offset=0;this.scl_slope=1;this.toffset=this.slice_duration=this.cal_min=this.cal_max=this.xyzt_units=this.scl_inter=0;this.intent_name=this.aux_file=this.description="";this.qoffset_z=this.qoffset_y=this.qoffset_x=this.quatern_d=this.quatern_c=this.quatern_b=this.sform_code=this.qform_code=0;this.affine=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];this.magic=0;this.extensionFlag=[0,0,0,0]};f.NIFTI2.MAGIC_COOKIE=540;f.NIFTI2.MAGIC_NUMBER_LOCATION=
4;f.NIFTI2.MAGIC_NUMBER=[110,43,50,0,13,10,26,10];f.NIFTI2.prototype.readHeader=function(b){b=new DataView(b);var d=f.Utils.getIntAt(b,0,this.littleEndian),e,q;d!==f.NIFTI2.MAGIC_COOKIE&&(this.littleEndian=!0,d=f.Utils.getIntAt(b,0,this.littleEndian));if(d!==f.NIFTI2.MAGIC_COOKIE)throw Error("This does not appear to be a NIFTI file!");this.datatypeCode=f.Utils.getShortAt(b,12,this.littleEndian);this.numBitsPerVoxel=f.Utils.getShortAt(b,14,this.littleEndian);for(e=0;8>e;e+=1)d=16+8*e,this.dims[e]=
f.Utils.getLongAt(b,d,this.littleEndian);this.intent_p1=f.Utils.getDoubleAt(b,80,this.littleEndian);this.intent_p2=f.Utils.getDoubleAt(b,88,this.littleEndian);this.intent_p3=f.Utils.getDoubleAt(b,96,this.littleEndian);for(e=0;8>e;e+=1)d=104+8*e,this.pixDims[e]=f.Utils.getDoubleAt(b,d,this.littleEndian);this.vox_offset=f.Utils.getLongAt(b,168,this.littleEndian);this.scl_slope=f.Utils.getDoubleAt(b,176,this.littleEndian);this.scl_inter=f.Utils.getDoubleAt(b,184,this.littleEndian);this.cal_max=f.Utils.getDoubleAt(b,
192,this.littleEndian);this.cal_min=f.Utils.getDoubleAt(b,200,this.littleEndian);this.slice_duration=f.Utils.getDoubleAt(b,208,this.littleEndian);this.toffset=f.Utils.getDoubleAt(b,216,this.littleEndian);this.slice_start=f.Utils.getLongAt(b,224,this.littleEndian);this.slice_end=f.Utils.getLongAt(b,232,this.littleEndian);this.description=f.Utils.getStringAt(b,240,320);this.aux_file=f.Utils.getStringAt(b,320,344);this.qform_code=f.Utils.getIntAt(b,344,this.littleEndian);this.sform_code=f.Utils.getIntAt(b,
348,this.littleEndian);this.quatern_b=f.Utils.getDoubleAt(b,352,this.littleEndian);this.quatern_c=f.Utils.getDoubleAt(b,360,this.littleEndian);this.quatern_d=f.Utils.getDoubleAt(b,368,this.littleEndian);this.qoffset_x=f.Utils.getDoubleAt(b,376,this.littleEndian);this.qoffset_y=f.Utils.getDoubleAt(b,384,this.littleEndian);this.qoffset_z=f.Utils.getDoubleAt(b,392,this.littleEndian);for(e=0;3>e;e+=1)for(q=0;4>q;q+=1)d=400+8*(4*e+q),this.affine[e][q]=f.Utils.getDoubleAt(b,d,this.littleEndian);this.affine[3][0]=
0;this.affine[3][1]=0;this.affine[3][2]=0;this.affine[3][3]=1;this.slice_code=f.Utils.getIntAt(b,496,this.littleEndian);this.xyzt_units=f.Utils.getIntAt(b,500,this.littleEndian);this.intent_code=f.Utils.getIntAt(b,504,this.littleEndian);this.intent_name=f.Utils.getStringAt(b,508,524);this.dim_info=f.Utils.getByteAt(b,524);b.byteLength>f.NIFTI2.MAGIC_COOKIE&&(this.extensionFlag[0]=f.Utils.getByteAt(b,540),this.extensionFlag[1]=f.Utils.getByteAt(b,541),this.extensionFlag[2]=f.Utils.getByteAt(b,542),
this.extensionFlag[3]=f.Utils.getByteAt(b,543),this.extensionFlag[0]&&(this.extensionSize=this.getExtensionSize(b),this.extensionCode=this.getExtensionCode(b)))};f.NIFTI2.prototype.toFormattedString=function(){var b=f.Utils.formatNumber,d;d=""+("Datatype = "+ +this.datatypeCode+" ("+this.getDatatypeCodeString(this.datatypeCode)+")\n");d+="Bits Per Voxel =  = "+this.numBitsPerVoxel+"\n";d+="Image Dimensions (1-8): "+this.dims[0]+", "+this.dims[1]+", "+this.dims[2]+", "+this.dims[3]+", "+this.dims[4]+
", "+this.dims[5]+", "+this.dims[6]+", "+this.dims[7]+"\n";d+="Intent Parameters (1-3): "+this.intent_p1+", "+this.intent_p2+", "+this.intent_p3+"\n";d+="Voxel Dimensions (1-8): "+b(this.pixDims[0])+", "+b(this.pixDims[1])+", "+b(this.pixDims[2])+", "+b(this.pixDims[3])+", "+b(this.pixDims[4])+", "+b(this.pixDims[5])+", "+b(this.pixDims[6])+", "+b(this.pixDims[7])+"\n";d+="Image Offset = "+this.vox_offset+"\n";d+="Data Scale:  Slope = "+b(this.scl_slope)+"  Intercept = "+b(this.scl_inter)+"\n";d+=
"Display Range:  Max = "+b(this.cal_max)+"  Min = "+b(this.cal_min)+"\n";d+="Slice Duration = "+this.slice_duration+"\n";d+="Time Axis Shift = "+this.toffset+"\n";d+="Slice Start = "+this.slice_start+"\n";d+="Slice End = "+this.slice_end+"\n";d+='Description: "'+this.description+'"\n';d+='Auxiliary File: "'+this.aux_file+'"\n';d+="Q-Form Code = "+this.qform_code+" ("+this.getTransformCodeString(this.qform_code)+")\n";d+="S-Form Code = "+this.sform_code+" ("+this.getTransformCodeString(this.sform_code)+
")\n";d+="Quaternion Parameters:  b = "+b(this.quatern_b)+"  c = "+b(this.quatern_c)+"  d = "+b(this.quatern_d)+"\n";d+="Quaternion Offsets:  x = "+this.qoffset_x+"  y = "+this.qoffset_y+"  z = "+this.qoffset_z+"\n";d+="S-Form Parameters X: "+b(this.affine[0][0])+", "+b(this.affine[0][1])+", "+b(this.affine[0][2])+", "+b(this.affine[0][3])+"\n";d+="S-Form Parameters Y: "+b(this.affine[1][0])+", "+b(this.affine[1][1])+", "+b(this.affine[1][2])+", "+b(this.affine[1][3])+"\n";d+="S-Form Parameters Z: "+
b(this.affine[2][0])+", "+b(this.affine[2][1])+", "+b(this.affine[2][2])+", "+b(this.affine[2][3])+"\n";d+="Slice Code = "+this.slice_code+"\n";d+="Units Code = "+this.xyzt_units+" ("+this.getUnitsCodeString(f.NIFTI1.SPATIAL_UNITS_MASK&this.xyzt_units)+", "+this.getUnitsCodeString(f.NIFTI1.TEMPORAL_UNITS_MASK&this.xyzt_units)+")\n";d+="Intent Code = "+this.intent_code+"\n";d+='Intent Name: "'+this.intent_name+'"\n';return d+="Dim Info = "+this.dim_info+"\n"};f.NIFTI2.prototype.getExtensionLocation=
function(){return f.NIFTI2.MAGIC_COOKIE+4};f.NIFTI2.prototype.getExtensionSize=f.NIFTI1.prototype.getExtensionSize;f.NIFTI2.prototype.getExtensionCode=f.NIFTI1.prototype.getExtensionCode;f.NIFTI2.prototype.getDatatypeCodeString=f.NIFTI1.prototype.getDatatypeCodeString;f.NIFTI2.prototype.getTransformCodeString=f.NIFTI1.prototype.getTransformCodeString;f.NIFTI2.prototype.getUnitsCodeString=f.NIFTI1.prototype.getUnitsCodeString;f.NIFTI2.prototype.getQformMat=f.NIFTI1.prototype.getQformMat;f.NIFTI2.prototype.convertNiftiQFormToNiftiSForm=
f.NIFTI1.prototype.convertNiftiQFormToNiftiSForm;f.NIFTI2.prototype.convertNiftiSFormToNEMA=f.NIFTI1.prototype.convertNiftiSFormToNEMA;f.NIFTI2.prototype.nifti_mat33_mul=f.NIFTI1.prototype.nifti_mat33_mul;f.NIFTI2.prototype.nifti_mat33_determ=f.NIFTI1.prototype.nifti_mat33_determ;"undefined"!==typeof e&&e.exports&&(e.exports=f.NIFTI2)},{"./nifti1.js":18,"./utilities.js":20}],20:[function(b,e,d){var f=f||{};f.Utils=f.Utils||{};f.Utils.crcTable=null;f.Utils.GUNZIP_MAGIC_COOKIE1=31;f.Utils.GUNZIP_MAGIC_COOKIE2=
139;f.Utils.getStringAt=function(b,d,f){for(var e="",t;d<f;d+=1)t=b.getUint8(d),0!==t&&(e+=String.fromCharCode(t));return e};f.Utils.getByteAt=function(b,d){return b.getInt8(d)};f.Utils.getShortAt=function(b,d,f){return b.getInt16(d,f)};f.Utils.getIntAt=function(b,d,f){return b.getInt32(d,f)};f.Utils.getFloatAt=function(b,d,f){return b.getFloat32(d,f)};f.Utils.getDoubleAt=function(b,d,f){return b.getFloat64(d,f)};f.Utils.getLongAt=function(b,d,e){var q,t=[],y=0;for(q=0;8>q;q+=1)t[q]=f.Utils.getByteAt(b,
d+q,e);for(q=t.length-1;0<=q;q--)y=256*y+t[q];return y};f.Utils.toArrayBuffer=function(b){var d,f,e;d=new ArrayBuffer(b.length);f=new Uint8Array(d);for(e=0;e<b.length;e+=1)f[e]=b[e];return d};f.Utils.isString=function(b){return"string"===typeof b||b instanceof String};f.Utils.formatNumber=function(b,d){var e=0,e=f.Utils.isString(b)?Number(b):b,e=d?e.toPrecision(5):e.toPrecision(7);return parseFloat(e)};f.Utils.makeCRCTable=function(){for(var b,d=[],f=0;256>f;f++){b=f;for(var e=0;8>e;e++)b=b&1?3988292384^
b>>>1:b>>>1;d[f]=b}return d};f.Utils.crc32=function(b){for(var d=f.Utils.crcTable||(f.Utils.crcTable=f.Utils.makeCRCTable()),e=-1,q=0;q<b.byteLength;q++)e=e>>>8^d[(e^b.getUint8(q))&255];return(e^-1)>>>0};"undefined"!==typeof e&&e.exports&&(e.exports=f.Utils)},{}]},{},[17])(17)});
(function(a){"object"===typeof exports&&"undefined"!==typeof module?module.exports=a():"function"===typeof define&&define.amd?define([],a):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).gifti=a()})(function(){return function b(e,d,f){function k(q,r){if(!d[q]){if(!e[q]){var y="function"==typeof require&&require;if(!r&&y)return y(q,!0);if(h)return h(q,!0);y=Error("Cannot find module '"+q+"'");throw y.code="MODULE_NOT_FOUND",y;}y=d[q]={exports:{}};
e[q][0].call(y.exports,function(b){var d=e[q][1][b];return k(d?d:b)},y,y.exports,b,e,d,f)}return d[q].exports}for(var h="function"==typeof require&&require,r=0;r<f.length;r++)k(f[r]);return k}({1:[function(b,e,d){b={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",decodeArrayBuffer:function(b){var d=this._keyStr.indexOf(b.charAt(b.length-1)),e=this._keyStr.indexOf(b.charAt(b.length-2)),r=b.length/4*3;64==d&&r--;64==e&&r--;d=new ArrayBuffer(r);this.decode(b,d,r);return d},
decode:function(b,d,e){var r,q,t,y,G,B=0,w=0;d=d?new Uint8Array(d):new Uint8Array(e);b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(B=0;B<e;B+=3)r=this._keyStr.indexOf(b.charAt(w++)),q=this._keyStr.indexOf(b.charAt(w++)),y=this._keyStr.indexOf(b.charAt(w++)),G=this._keyStr.indexOf(b.charAt(w++)),r=r<<2|q>>4,q=(q&15)<<4|y>>2,t=(y&3)<<6|G,d[B]=r,64!=y&&(d[B+1]=q),64!=G&&(d[B+2]=t);return d}};"undefined"!==typeof e&&e.exports&&(e.exports=b)},{}],2:[function(b,e,d){},{}],3:[function(b,e,d){(function(f){function e(){try{var b=
new Uint8Array(1);b.foo=function(){return 42};return 42===b.foo()&&"function"===typeof b.subarray&&0===b.subarray(1,1).byteLength}catch(d){return!1}}function h(b){if(!(this instanceof h))return 1<arguments.length?new h(b,arguments[1]):new h(b);h.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0);if("number"===typeof b){var d;d=t(this,0>b?0:y(b)|0);if(!h.TYPED_ARRAY_SUPPORT)for(var f=0;f<b;f++)d[f]=0;return d}if("string"===typeof b){d=this;f=1<arguments.length?arguments[1]:"utf8";if("string"!==
typeof f||""===f)f="utf8";var e=B(b,f)|0;d=t(d,e);d.write(b,f);return d}return r(this,b)}function r(b,d){if(h.isBuffer(d)){var f=b,e=y(d.length)|0,f=t(f,e);d.copy(f,0,0,e);return f}if(z(d)){for(var f=b,e=y(d.length)|0,f=t(f,e),k=0;k<e;k+=1)f[k]=d[k]&255;return f}if(null==d)throw new TypeError("must start with number, buffer, array or string");if("undefined"!==typeof ArrayBuffer){if(d.buffer instanceof ArrayBuffer)return q(b,d);if(d instanceof ArrayBuffer)return f=b,d.byteLength,h.TYPED_ARRAY_SUPPORT?
(f=new Uint8Array(d),f.__proto__=h.prototype):f=q(f,new Uint8Array(d)),f}if(d.length){f=b;e=y(d.length)|0;f=t(f,e);for(k=0;k<e;k+=1)f[k]=d[k]&255;return f}f=b;k=0;"Buffer"===d.type&&z(d.data)&&(e=d.data,k=y(e.length)|0);for(var f=t(f,k),n=0;n<k;n+=1)f[n]=e[n]&255;return f}function q(b,d){var f=y(d.length)|0;b=t(b,f);for(var e=0;e<f;e+=1)b[e]=d[e]&255;return b}function t(b,d){h.TYPED_ARRAY_SUPPORT?(b=new Uint8Array(d),b.__proto__=h.prototype):b.length=d;0!==d&&d<=h.poolSize>>>1&&(b.parent=Y);return b}
function y(b){if(b>=(h.TYPED_ARRAY_SUPPORT?2147483647:1073741823))throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+(h.TYPED_ARRAY_SUPPORT?2147483647:1073741823).toString(16)+" bytes");return b|0}function G(b,d){if(!(this instanceof G))return new G(b,d);var f=new h(b,d);delete f.parent;return f}function B(b,d){"string"!==typeof b&&(b=""+b);var f=b.length;if(0===f)return 0;for(var e=!1;;)switch(d){case "ascii":case "binary":case "raw":case "raws":return f;case "utf8":case "utf-8":return Z(b).length;
case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return 2*f;case "hex":return f>>>1;case "base64":return x.toByteArray(ba(b)).length;default:if(e)return Z(b).length;d=(""+d).toLowerCase();e=!0}}function w(b,d,f){var e=!1;d|=0;f=void 0===f||Infinity===f?this.length:f|0;b||(b="utf8");0>d&&(d=0);f>this.length&&(f=this.length);if(f<=d)return"";for(;;)switch(b){case "hex":b=d;d=this.length;if(!b||0>b)b=0;if(!f||0>f||f>d)f=d;for(d="";b<f;b++)e=this[b],e=16>e?"0"+e.toString(16):e.toString(16),d+=
e;return d;case "utf8":case "utf-8":return E(this,d,f);case "ascii":b=d;d="";for(f=Math.min(this.length,f);b<f;b++)d+=String.fromCharCode(this[b]&127);return d;case "binary":b=d;d="";for(f=Math.min(this.length,f);b<f;b++)d+=String.fromCharCode(this[b]);return d;case "base64":return b=d,f=0===b&&f===this.length?x.fromByteArray(this):x.fromByteArray(this.slice(b,f)),f;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":f=this.slice(d,f);b="";for(d=0;d<f.length;d+=2)b+=String.fromCharCode(f[d]+256*
f[d+1]);return b;default:if(e)throw new TypeError("Unknown encoding: "+b);b=(b+"").toLowerCase();e=!0}}function E(b,d,f){f=Math.min(b.length,f);for(var e=[];d<f;){var h=b[d],k=null,n=239<h?4:223<h?3:191<h?2:1;if(d+n<=f){var m,q,r;switch(n){case 1:128>h&&(k=h);break;case 2:m=b[d+1];128===(m&192)&&(h=(h&31)<<6|m&63,127<h&&(k=h));break;case 3:m=b[d+1];q=b[d+2];128===(m&192)&&128===(q&192)&&(h=(h&15)<<12|(m&63)<<6|q&63,2047<h&&(55296>h||57343<h)&&(k=h));break;case 4:m=b[d+1],q=b[d+2],r=b[d+3],128===(m&
192)&&128===(q&192)&&128===(r&192)&&(h=(h&15)<<18|(m&63)<<12|(q&63)<<6|r&63,65535<h&&1114112>h&&(k=h))}}null===k?(k=65533,n=1):65535<k&&(k-=65536,e.push(k>>>10&1023|55296),k=56320|k&1023);e.push(k);d+=n}b=e.length;if(b<=D)e=String.fromCharCode.apply(String,e);else{f="";for(d=0;d<b;)f+=String.fromCharCode.apply(String,e.slice(d,d+=D));e=f}return e}function P(b,d,f){if(0!==b%1||0>b)throw new RangeError("offset is not uint");if(b+d>f)throw new RangeError("Trying to access beyond buffer length");}function da(b,
d,f,e,k,n){if(!h.isBuffer(b))throw new TypeError("buffer must be a Buffer instance");if(d>k||d<n)throw new RangeError("value is out of bounds");if(f+e>b.length)throw new RangeError("index out of range");}function aa(b,d,f,e){0>d&&(d=65535+d+1);for(var h=0,k=Math.min(b.length-f,2);h<k;h++)b[f+h]=(d&255<<8*(e?h:1-h))>>>8*(e?h:1-h)}function M(b,d,f,e){0>d&&(d=4294967295+d+1);for(var h=0,k=Math.min(b.length-f,4);h<k;h++)b[f+h]=d>>>8*(e?h:3-h)&255}function ka(b,d,f,e,h,k){if(f+e>b.length)throw new RangeError("index out of range");
if(0>f)throw new RangeError("index out of range");}function m(b,d,f,e,h){h||ka(b,d,f,4,3.4028234663852886E38,-3.4028234663852886E38);n.write(b,d,f,e,23,4);return f+4}function fa(b,d,f,e,h){h||ka(b,d,f,8,1.7976931348623157E308,-1.7976931348623157E308);n.write(b,d,f,e,52,8);return f+8}function ba(b){b=b.trim?b.trim():b.replace(/^\s+|\s+$/g,"");b=b.replace(A,"");if(2>b.length)return"";for(;0!==b.length%4;)b+="=";return b}function Z(b,d){d=d||Infinity;for(var f,e=b.length,h=null,k=[],n=0;n<e;n++){f=b.charCodeAt(n);
if(55295<f&&57344>f){if(!h){if(56319<f){-1<(d-=3)&&k.push(239,191,189);continue}else if(n+1===e){-1<(d-=3)&&k.push(239,191,189);continue}h=f;continue}if(56320>f){-1<(d-=3)&&k.push(239,191,189);h=f;continue}f=(h-55296<<10|f-56320)+65536}else h&&-1<(d-=3)&&k.push(239,191,189);h=null;if(128>f){if(0>--d)break;k.push(f)}else if(2048>f){if(0>(d-=2))break;k.push(f>>6|192,f&63|128)}else if(65536>f){if(0>(d-=3))break;k.push(f>>12|224,f>>6&63|128,f&63|128)}else if(1114112>f){if(0>(d-=4))break;k.push(f>>18|
240,f>>12&63|128,f>>6&63|128,f&63|128)}else throw Error("Invalid code point");}return k}function X(b){for(var d=[],f=0;f<b.length;f++)d.push(b.charCodeAt(f)&255);return d}function U(b,d,f,e){for(var h=0;h<e&&!(h+f>=d.length||h>=b.length);h++)d[h+f]=b[h];return h}var x=b("base64-js"),n=b("ieee754"),z=b("isarray");d.Buffer=h;d.SlowBuffer=G;d.INSPECT_MAX_BYTES=50;h.poolSize=8192;var Y={};h.TYPED_ARRAY_SUPPORT=void 0!==f.TYPED_ARRAY_SUPPORT?f.TYPED_ARRAY_SUPPORT:e();h._augment=function(b){b.__proto__=
h.prototype;return b};h.TYPED_ARRAY_SUPPORT?(h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&h[Symbol.species]===h&&Object.defineProperty(h,Symbol.species,{value:null,configurable:!0})):(h.prototype.length=void 0,h.prototype.parent=void 0);h.isBuffer=function(b){return!(null==b||!b._isBuffer)};h.compare=function(b,d){if(!h.isBuffer(b)||!h.isBuffer(d))throw new TypeError("Arguments must be Buffers");if(b===d)return 0;for(var f=b.length,
e=d.length,k=0,n=Math.min(f,e);k<n&&b[k]===d[k];)++k;k!==n&&(f=b[k],e=d[k]);return f<e?-1:e<f?1:0};h.isEncoding=function(b){switch(String(b).toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "binary":case "base64":case "raw":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return!0;default:return!1}};h.concat=function(b,d){if(!z(b))throw new TypeError("list argument must be an Array of Buffers.");if(0===b.length)return new h(0);var f;if(void 0===d)for(f=d=0;f<b.length;f++)d+=
b[f].length;var e=new h(d),k=0;for(f=0;f<b.length;f++){var n=b[f];n.copy(e,k);k+=n.length}return e};h.byteLength=B;h.prototype._isBuffer=!0;h.prototype.toString=function(){var b=this.length|0;return 0===b?"":0===arguments.length?E(this,0,b):w.apply(this,arguments)};h.prototype.equals=function(b){if(!h.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b?!0:0===h.compare(this,b)};h.prototype.inspect=function(){var b="",f=d.INSPECT_MAX_BYTES;0<this.length&&(b=this.toString("hex",
0,f).match(/.{2}/g).join(" "),this.length>f&&(b+=" ... "));return"<Buffer "+b+">"};h.prototype.compare=function(b){if(!h.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b?0:h.compare(this,b)};h.prototype.indexOf=function(b,d){function f(b,d,e){for(var h=-1,k=0;e+k<b.length;k++)if(b[e+k]===d[-1===h?0:k-h]){if(-1===h&&(h=k),k-h+1===d.length)return e+h}else h=-1;return-1}2147483647<d?d=2147483647:-2147483648>d&&(d=-2147483648);d>>=0;if(0===this.length||d>=this.length)return-1;
0>d&&(d=Math.max(this.length+d,0));if("string"===typeof b)return 0===b.length?-1:String.prototype.indexOf.call(this,b,d);if(h.isBuffer(b))return f(this,b,d);if("number"===typeof b)return h.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,b,d):f(this,[b],d);throw new TypeError("val must be string, number or Buffer");};h.prototype.write=function(b,d,f,e){if(void 0===d)e="utf8",f=this.length,d=0;else if(void 0===f&&"string"===typeof d)e=d,f=this.length,
d=0;else if(isFinite(d))d|=0,isFinite(f)?(f|=0,void 0===e&&(e="utf8")):(e=f,f=void 0);else{var h=e;e=d;d=f|0;f=h}h=this.length-d;if(void 0===f||f>h)f=h;if(0<b.length&&(0>f||0>d)||d>this.length)throw new RangeError("attempt to write outside buffer bounds");e||(e="utf8");for(h=!1;;)switch(e){case "hex":d=Number(d)||0;e=this.length-d;f?(f=Number(f),f>e&&(f=e)):f=e;e=b.length;if(0!==e%2)throw Error("Invalid hex string");f>e/2&&(f=e/2);for(e=0;e<f;e++){h=parseInt(b.substr(2*e,2),16);if(isNaN(h))throw Error("Invalid hex string");
this[d+e]=h}return e;case "utf8":case "utf-8":return U(Z(b,this.length-d),this,d,f);case "ascii":return U(X(b),this,d,f);case "binary":return U(X(b),this,d,f);case "base64":return U(x.toByteArray(ba(b)),this,d,f);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":e=this.length-d;for(var k=void 0,k=h=void 0,n=[],m=0;m<b.length&&!(0>(e-=2));m++)k=b.charCodeAt(m),h=k>>8,k%=256,n.push(k),n.push(h);return U(n,this,d,f);default:if(h)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase();
h=!0}};h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var D=4096;h.prototype.slice=function(b,d){var f=this.length;b=~~b;d=void 0===d?f:~~d;0>b?(b+=f,0>b&&(b=0)):b>f&&(b=f);0>d?(d+=f,0>d&&(d=0)):d>f&&(d=f);d<b&&(d=b);if(h.TYPED_ARRAY_SUPPORT)f=this.subarray(b,d),f.__proto__=h.prototype;else for(var e=d-b,f=new h(e,void 0),k=0;k<e;k++)f[k]=this[k+b];f.length&&(f.parent=this.parent||this);return f};h.prototype.readUIntLE=function(b,d,f){b|=0;
d|=0;f||P(b,d,this.length);f=this[b];for(var e=1,h=0;++h<d&&(e*=256);)f+=this[b+h]*e;return f};h.prototype.readUIntBE=function(b,d,f){b|=0;d|=0;f||P(b,d,this.length);f=this[b+--d];for(var e=1;0<d&&(e*=256);)f+=this[b+--d]*e;return f};h.prototype.readUInt8=function(b,d){d||P(b,1,this.length);return this[b]};h.prototype.readUInt16LE=function(b,d){d||P(b,2,this.length);return this[b]|this[b+1]<<8};h.prototype.readUInt16BE=function(b,d){d||P(b,2,this.length);return this[b]<<8|this[b+1]};h.prototype.readUInt32LE=
function(b,d){d||P(b,4,this.length);return(this[b]|this[b+1]<<8|this[b+2]<<16)+16777216*this[b+3]};h.prototype.readUInt32BE=function(b,d){d||P(b,4,this.length);return 16777216*this[b]+(this[b+1]<<16|this[b+2]<<8|this[b+3])};h.prototype.readIntLE=function(b,d,f){b|=0;d|=0;f||P(b,d,this.length);f=this[b];for(var e=1,h=0;++h<d&&(e*=256);)f+=this[b+h]*e;f>=128*e&&(f-=Math.pow(2,8*d));return f};h.prototype.readIntBE=function(b,d,f){b|=0;d|=0;f||P(b,d,this.length);f=d;for(var e=1,h=this[b+--f];0<f&&(e*=
256);)h+=this[b+--f]*e;h>=128*e&&(h-=Math.pow(2,8*d));return h};h.prototype.readInt8=function(b,d){d||P(b,1,this.length);return this[b]&128?-1*(255-this[b]+1):this[b]};h.prototype.readInt16LE=function(b,d){d||P(b,2,this.length);var f=this[b]|this[b+1]<<8;return f&32768?f|4294901760:f};h.prototype.readInt16BE=function(b,d){d||P(b,2,this.length);var f=this[b+1]|this[b]<<8;return f&32768?f|4294901760:f};h.prototype.readInt32LE=function(b,d){d||P(b,4,this.length);return this[b]|this[b+1]<<8|this[b+2]<<
16|this[b+3]<<24};h.prototype.readInt32BE=function(b,d){d||P(b,4,this.length);return this[b]<<24|this[b+1]<<16|this[b+2]<<8|this[b+3]};h.prototype.readFloatLE=function(b,d){d||P(b,4,this.length);return n.read(this,b,!0,23,4)};h.prototype.readFloatBE=function(b,d){d||P(b,4,this.length);return n.read(this,b,!1,23,4)};h.prototype.readDoubleLE=function(b,d){d||P(b,8,this.length);return n.read(this,b,!0,52,8)};h.prototype.readDoubleBE=function(b,d){d||P(b,8,this.length);return n.read(this,b,!1,52,8)};
h.prototype.writeUIntLE=function(b,d,f,e){b=+b;d|=0;f|=0;e||da(this,b,d,f,Math.pow(2,8*f),0);e=1;var h=0;for(this[d]=b&255;++h<f&&(e*=256);)this[d+h]=b/e&255;return d+f};h.prototype.writeUIntBE=function(b,d,f,e){b=+b;d|=0;f|=0;e||da(this,b,d,f,Math.pow(2,8*f),0);e=f-1;var h=1;for(this[d+e]=b&255;0<=--e&&(h*=256);)this[d+e]=b/h&255;return d+f};h.prototype.writeUInt8=function(b,d,f){b=+b;d|=0;f||da(this,b,d,1,255,0);h.TYPED_ARRAY_SUPPORT||(b=Math.floor(b));this[d]=b&255;return d+1};h.prototype.writeUInt16LE=
function(b,d,f){b=+b;d|=0;f||da(this,b,d,2,65535,0);h.TYPED_ARRAY_SUPPORT?(this[d]=b&255,this[d+1]=b>>>8):aa(this,b,d,!0);return d+2};h.prototype.writeUInt16BE=function(b,d,f){b=+b;d|=0;f||da(this,b,d,2,65535,0);h.TYPED_ARRAY_SUPPORT?(this[d]=b>>>8,this[d+1]=b&255):aa(this,b,d,!1);return d+2};h.prototype.writeUInt32LE=function(b,d,f){b=+b;d|=0;f||da(this,b,d,4,4294967295,0);h.TYPED_ARRAY_SUPPORT?(this[d+3]=b>>>24,this[d+2]=b>>>16,this[d+1]=b>>>8,this[d]=b&255):M(this,b,d,!0);return d+4};h.prototype.writeUInt32BE=
function(b,d,f){b=+b;d|=0;f||da(this,b,d,4,4294967295,0);h.TYPED_ARRAY_SUPPORT?(this[d]=b>>>24,this[d+1]=b>>>16,this[d+2]=b>>>8,this[d+3]=b&255):M(this,b,d,!1);return d+4};h.prototype.writeIntLE=function(b,d,f,e){b=+b;d|=0;e||(e=Math.pow(2,8*f-1),da(this,b,d,f,e-1,-e));e=0;var h=1,k=0>b?1:0;for(this[d]=b&255;++e<f&&(h*=256);)this[d+e]=(b/h>>0)-k&255;return d+f};h.prototype.writeIntBE=function(b,d,f,e){b=+b;d|=0;e||(e=Math.pow(2,8*f-1),da(this,b,d,f,e-1,-e));e=f-1;var h=1,k=0>b?1:0;for(this[d+e]=b&
255;0<=--e&&(h*=256);)this[d+e]=(b/h>>0)-k&255;return d+f};h.prototype.writeInt8=function(b,d,f){b=+b;d|=0;f||da(this,b,d,1,127,-128);h.TYPED_ARRAY_SUPPORT||(b=Math.floor(b));0>b&&(b=255+b+1);this[d]=b&255;return d+1};h.prototype.writeInt16LE=function(b,d,f){b=+b;d|=0;f||da(this,b,d,2,32767,-32768);h.TYPED_ARRAY_SUPPORT?(this[d]=b&255,this[d+1]=b>>>8):aa(this,b,d,!0);return d+2};h.prototype.writeInt16BE=function(b,d,f){b=+b;d|=0;f||da(this,b,d,2,32767,-32768);h.TYPED_ARRAY_SUPPORT?(this[d]=b>>>8,
this[d+1]=b&255):aa(this,b,d,!1);return d+2};h.prototype.writeInt32LE=function(b,d,f){b=+b;d|=0;f||da(this,b,d,4,2147483647,-2147483648);h.TYPED_ARRAY_SUPPORT?(this[d]=b&255,this[d+1]=b>>>8,this[d+2]=b>>>16,this[d+3]=b>>>24):M(this,b,d,!0);return d+4};h.prototype.writeInt32BE=function(b,d,f){b=+b;d|=0;f||da(this,b,d,4,2147483647,-2147483648);0>b&&(b=4294967295+b+1);h.TYPED_ARRAY_SUPPORT?(this[d]=b>>>24,this[d+1]=b>>>16,this[d+2]=b>>>8,this[d+3]=b&255):M(this,b,d,!1);return d+4};h.prototype.writeFloatLE=
function(b,d,f){return m(this,b,d,!0,f)};h.prototype.writeFloatBE=function(b,d,f){return m(this,b,d,!1,f)};h.prototype.writeDoubleLE=function(b,d,f){return fa(this,b,d,!0,f)};h.prototype.writeDoubleBE=function(b,d,f){return fa(this,b,d,!1,f)};h.prototype.copy=function(b,d,f,e){f||(f=0);e||0===e||(e=this.length);d>=b.length&&(d=b.length);d||(d=0);0<e&&e<f&&(e=f);if(e===f||0===b.length||0===this.length)return 0;if(0>d)throw new RangeError("targetStart out of bounds");if(0>f||f>=this.length)throw new RangeError("sourceStart out of bounds");
if(0>e)throw new RangeError("sourceEnd out of bounds");e>this.length&&(e=this.length);b.length-d<e-f&&(e=b.length-d+f);var k=e-f;if(this===b&&f<d&&d<e)for(e=k-1;0<=e;e--)b[e+d]=this[e+f];else if(1E3>k||!h.TYPED_ARRAY_SUPPORT)for(e=0;e<k;e++)b[e+d]=this[e+f];else Uint8Array.prototype.set.call(b,this.subarray(f,f+k),d);return k};h.prototype.fill=function(b,d,f){b||(b=0);d||(d=0);f||(f=this.length);if(f<d)throw new RangeError("end < start");if(f!==d&&0!==this.length){if(0>d||d>=this.length)throw new RangeError("start out of bounds");
if(0>f||f>this.length)throw new RangeError("end out of bounds");if("number"===typeof b)for(;d<f;d++)this[d]=b;else{b=Z(b.toString());for(var e=b.length;d<f;d++)this[d]=b[d%e]}return this}};var A=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"base64-js":4,ieee754:5,isarray:6}],4:[function(b,e,d){(function(b){function d(b){b=t[b.charCodeAt(0)];return void 0!==b?b:-1}function e(b,d,f){for(var h=[],k=d;k<f;k+=
3)d=(b[k]<<16)+(b[k+1]<<8)+b[k+2],h.push(q[d>>18&63]+q[d>>12&63]+q[d>>6&63]+q[d&63]);return h.join("")}var r,q=[];for(r=0;64>r;r++)q[r]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[r];var t=[];for(r=0;64>r;++r)t["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(r)]=r;t[45]=62;t[95]=63;var y="undefined"!==typeof Uint8Array?Uint8Array:Array;b.toByteArray=function(b){function f(b){t[M++]=b}var e,h,q,r,t;if(0<b.length%4)throw Error("Invalid string. Length must be a multiple of 4");
e=b.length;r="="===b.charAt(e-2)?2:"="===b.charAt(e-1)?1:0;t=new y(3*b.length/4-r);h=0<r?b.length-4:b.length;var M=0;for(e=0;e<h;e+=4)q=d(b.charAt(e))<<18|d(b.charAt(e+1))<<12|d(b.charAt(e+2))<<6|d(b.charAt(e+3)),f((q&16711680)>>16),f((q&65280)>>8),f(q&255);2===r?(q=d(b.charAt(e))<<2|d(b.charAt(e+1))>>4,f(q&255)):1===r&&(q=d(b.charAt(e))<<10|d(b.charAt(e+1))<<4|d(b.charAt(e+2))>>2,f(q>>8&255),f(q&255));return t};b.fromByteArray=function(b){var d,f=b.length%3,k="",r=[],t;d=0;for(t=b.length-f;d<t;d+=
16383)r.push(e(b,d,d+16383>t?t:d+16383));switch(f){case 1:b=b[b.length-1];k+=q[b>>2];k+=q[b<<4&63];k+="==";break;case 2:b=(b[b.length-2]<<8)+b[b.length-1],k+=q[b>>10],k+=q[b>>4&63],k+=q[b<<2&63],k+="="}r.push(k);return r.join("")}})("undefined"===typeof d?this.base64js={}:d)},{}],5:[function(b,e,d){d.read=function(b,d,e,r,q){var t;t=8*q-r-1;var y=(1<<t)-1,G=y>>1,B=-7;q=e?q-1:0;var w=e?-1:1,E=b[d+q];q+=w;e=E&(1<<-B)-1;E>>=-B;for(B+=t;0<B;e=256*e+b[d+q],q+=w,B-=8);t=e&(1<<-B)-1;e>>=-B;for(B+=r;0<B;t=
256*t+b[d+q],q+=w,B-=8);if(0===e)e=1-G;else{if(e===y)return t?NaN:Infinity*(E?-1:1);t+=Math.pow(2,r);e-=G}return(E?-1:1)*t*Math.pow(2,e-r)};d.write=function(b,d,e,r,q,t){var y,G=8*t-q-1,B=(1<<G)-1,w=B>>1,E=23===q?Math.pow(2,-24)-Math.pow(2,-77):0;t=r?0:t-1;var P=r?1:-1,da=0>d||0===d&&0>1/d?1:0;d=Math.abs(d);isNaN(d)||Infinity===d?(d=isNaN(d)?1:0,r=B):(r=Math.floor(Math.log(d)/Math.LN2),1>d*(y=Math.pow(2,-r))&&(r--,y*=2),d=1<=r+w?d+E/y:d+E*Math.pow(2,1-w),2<=d*y&&(r++,y/=2),r+w>=B?(d=0,r=B):1<=r+w?
(d=(d*y-1)*Math.pow(2,q),r+=w):(d=d*Math.pow(2,w-1)*Math.pow(2,q),r=0));for(;8<=q;b[e+t]=d&255,t+=P,d/=256,q-=8);r=r<<q|d;for(G+=q;0<G;b[e+t]=r&255,t+=P,r/=256,G-=8);b[e+t-P]|=128*da}},{}],6:[function(b,e,d){var f={}.toString;e.exports=Array.isArray||function(b){return"[object Array]"==f.call(b)}},{}],7:[function(b,e,d){function f(){this._events=this._events||{};this._maxListeners=this._maxListeners||void 0}function k(b){return"function"===typeof b}function h(b){return"object"===typeof b&&null!==
b}e.exports=f;f.EventEmitter=f;f.prototype._events=void 0;f.prototype._maxListeners=void 0;f.defaultMaxListeners=10;f.prototype.setMaxListeners=function(b){if("number"!==typeof b||0>b||isNaN(b))throw TypeError("n must be a positive number");this._maxListeners=b;return this};f.prototype.emit=function(b){var d,f,e,G;this._events||(this._events={});if("error"===b&&(!this._events.error||h(this._events.error)&&!this._events.error.length)){d=arguments[1];if(d instanceof Error)throw d;throw TypeError('Uncaught, unspecified "error" event.');
}f=this._events[b];if(void 0===f)return!1;if(k(f))switch(arguments.length){case 1:f.call(this);break;case 2:f.call(this,arguments[1]);break;case 3:f.call(this,arguments[1],arguments[2]);break;default:d=Array.prototype.slice.call(arguments,1),f.apply(this,d)}else if(h(f))for(d=Array.prototype.slice.call(arguments,1),G=f.slice(),f=G.length,e=0;e<f;e++)G[e].apply(this,d);return!0};f.prototype.addListener=function(b,d){var e;if(!k(d))throw TypeError("listener must be a function");this._events||(this._events=
{});this._events.newListener&&this.emit("newListener",b,k(d.listener)?d.listener:d);this._events[b]?h(this._events[b])?this._events[b].push(d):this._events[b]=[this._events[b],d]:this._events[b]=d;h(this._events[b])&&!this._events[b].warned&&(e=void 0!==this._maxListeners?this._maxListeners:f.defaultMaxListeners)&&0<e&&this._events[b].length>e&&(this._events[b].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",
this._events[b].length),"function"===typeof console.trace&&console.trace());return this};f.prototype.on=f.prototype.addListener;f.prototype.once=function(b,d){function f(){this.removeListener(b,f);e||(e=!0,d.apply(this,arguments))}if(!k(d))throw TypeError("listener must be a function");var e=!1;f.listener=d;this.on(b,f);return this};f.prototype.removeListener=function(b,d){var f,e,G;if(!k(d))throw TypeError("listener must be a function");if(!this._events||!this._events[b])return this;f=this._events[b];
G=f.length;e=-1;if(f===d||k(f.listener)&&f.listener===d)delete this._events[b],this._events.removeListener&&this.emit("removeListener",b,d);else if(h(f)){for(;0<G--;)if(f[G]===d||f[G].listener&&f[G].listener===d){e=G;break}if(0>e)return this;1===f.length?(f.length=0,delete this._events[b]):f.splice(e,1);this._events.removeListener&&this.emit("removeListener",b,d)}return this};f.prototype.removeAllListeners=function(b){var d;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?
this._events={}:this._events[b]&&delete this._events[b],this;if(0===arguments.length){for(d in this._events)"removeListener"!==d&&this.removeAllListeners(d);this.removeAllListeners("removeListener");this._events={};return this}d=this._events[b];if(k(d))this.removeListener(b,d);else if(d)for(;d.length;)this.removeListener(b,d[d.length-1]);delete this._events[b];return this};f.prototype.listeners=function(b){return this._events&&this._events[b]?k(this._events[b])?[this._events[b]]:this._events[b].slice():
[]};f.prototype.listenerCount=function(b){if(this._events){b=this._events[b];if(k(b))return 1;if(b)return b.length}return 0};f.listenerCount=function(b,d){return b.listenerCount(d)}},{}],8:[function(b,e,d){e.exports="function"===typeof Object.create?function(b,d){b.super_=d;b.prototype=Object.create(d.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}})}:function(b,d){b.super_=d;var e=function(){};e.prototype=d.prototype;b.prototype=new e;b.prototype.constructor=b}},{}],9:[function(b,
e,d){e.exports=function(b){return!(null==b||!(b._isBuffer||b.constructor&&"function"===typeof b.constructor.isBuffer&&b.constructor.isBuffer(b)))}},{}],10:[function(b,e,d){e.exports=Array.isArray||function(b){return"[object Array]"==Object.prototype.toString.call(b)}},{}],11:[function(b,e,d){function f(){t=!1;y.length?q=y.concat(q):G=-1;q.length&&k()}function k(){if(!t){var b=setTimeout(f);t=!0;for(var d=q.length;d;){y=q;for(q=[];++G<d;)y&&y[G].run();G=-1;d=q.length}y=null;t=!1;clearTimeout(b)}}function h(b,
d){this.fun=b;this.array=d}function r(){}b=e.exports={};var q=[],t=!1,y,G=-1;b.nextTick=function(b){var d=Array(arguments.length-1);if(1<arguments.length)for(var f=1;f<arguments.length;f++)d[f-1]=arguments[f];q.push(new h(b,d));1!==q.length||t||setTimeout(k,0)};h.prototype.run=function(){this.fun.apply(null,this.array)};b.title="browser";b.browser=!0;b.env={};b.argv=[];b.version="";b.versions={};b.on=r;b.addListener=r;b.once=r;b.off=r;b.removeListener=r;b.removeAllListeners=r;b.emit=r;b.binding=function(b){throw Error("process.binding is not supported");
};b.cwd=function(){return"/"};b.chdir=function(b){throw Error("process.chdir is not supported");};b.umask=function(){return 0}},{}],12:[function(b,e,d){e.exports=b("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":13}],13:[function(b,e,d){function f(b){if(!(this instanceof f))return new f(b);q.call(this,b);t.call(this,b);b&&!1===b.readable&&(this.readable=!1);b&&!1===b.writable&&(this.writable=!1);this.allowHalfOpen=!0;b&&!1===b.allowHalfOpen&&(this.allowHalfOpen=!1);this.once("end",k)}function k(){this.allowHalfOpen||
this._writableState.ended||r(h,this)}function h(b){b.end()}d=Object.keys||function(b){var d=[],f;for(f in b)d.push(f);return d};e.exports=f;var r=b("process-nextick-args");e=b("core-util-is");e.inherits=b("inherits");var q=b("./_stream_readable"),t=b("./_stream_writable");e.inherits(f,q);b=d(t.prototype);for(e=0;e<b.length;e++)d=b[e],f.prototype[d]||(f.prototype[d]=t.prototype[d])},{"./_stream_readable":15,"./_stream_writable":17,"core-util-is":18,inherits:8,"process-nextick-args":19}],14:[function(b,
e,d){function f(b){if(!(this instanceof f))return new f(b);k.call(this,b)}e.exports=f;var k=b("./_stream_transform");e=b("core-util-is");e.inherits=b("inherits");e.inherits(f,k);f.prototype._transform=function(b,d,f){f(null,b)}},{"./_stream_transform":16,"core-util-is":18,inherits:8}],15:[function(b,e,d){(function(d){function k(d,f){Y=Y||b("./_stream_duplex");d=d||{};this.objectMode=!!d.objectMode;f instanceof Y&&(this.objectMode=this.objectMode||!!d.readableObjectMode);var e=d.highWaterMark,h=this.objectMode?
16:16384;this.highWaterMark=e||0===e?e:h;this.highWaterMark=~~this.highWaterMark;this.buffer=[];this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.reading=this.endEmitted=this.ended=!1;this.sync=!0;this.readableListening=this.emittedReadable=this.needReadable=!1;this.defaultEncoding=d.defaultEncoding||"utf8";this.ranOut=!1;this.awaitDrain=0;this.readingMore=!1;this.encoding=this.decoder=null;d.encoding&&(z||(z=b("string_decoder/").StringDecoder),this.decoder=new z(d.encoding),
this.encoding=d.encoding)}function h(d){Y=Y||b("./_stream_duplex");if(!(this instanceof h))return new h(d);this._readableState=new k(d,this);this.readable=!0;d&&"function"===typeof d.read&&(this._read=d.read);Z.call(this)}function r(b,d,f,e,h){var k;k=f;var n=null;ba.isBuffer(k)||"string"===typeof k||null===k||void 0===k||d.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));(k=n)?b.emit("error",k):null===f?(d.reading=!1,d.ended||(d.decoder&&(f=d.decoder.end())&&f.length&&(d.buffer.push(f),
d.length+=d.objectMode?1:f.length),d.ended=!0,t(b))):d.objectMode||f&&0<f.length?d.ended&&!h?(f=Error("stream.push() after EOF"),b.emit("error",f)):d.endEmitted&&h?(f=Error("stream.unshift() after end event"),b.emit("error",f)):(!d.decoder||h||e||(f=d.decoder.write(f)),h||(d.reading=!1),d.flowing&&0===d.length&&!d.sync?(b.emit("data",f),b.read(0)):(d.length+=d.objectMode?1:f.length,h?d.buffer.unshift(f):d.buffer.push(f),d.needReadable&&t(b)),d.readingMore||(d.readingMore=!0,m(G,b,d))):h||(d.reading=
!1);return!d.ended&&(d.needReadable||d.length<d.highWaterMark||0===d.length)}function q(b,d){if(0===d.length&&d.ended)return 0;if(d.objectMode)return 0===b?0:1;if(null===b||isNaN(b))return d.flowing&&d.buffer.length?d.buffer[0].length:d.length;if(0>=b)return 0;if(b>d.highWaterMark){var f=b;8388608<=f?f=8388608:(f--,f|=f>>>1,f|=f>>>2,f|=f>>>4,f|=f>>>8,f|=f>>>16,f++);d.highWaterMark=f}if(b>d.length){if(d.ended)return d.length;d.needReadable=!0;return 0}return b}function t(b){var d=b._readableState;
d.needReadable=!1;d.emittedReadable||(n("emitReadable",d.flowing),d.emittedReadable=!0,d.sync?m(y,b):y(b))}function y(b){n("emit readable");b.emit("readable");P(b)}function G(b,d){for(var f=d.length;!d.reading&&!d.flowing&&!d.ended&&d.length<d.highWaterMark&&(n("maybeReadMore read 0"),b.read(0),f!==d.length);)f=d.length;d.readingMore=!1}function B(b){return function(){var d=b._readableState;n("pipeOnDrain",d.awaitDrain);d.awaitDrain&&d.awaitDrain--;0===d.awaitDrain&&b.listeners("data").length&&(d.flowing=
!0,P(b))}}function w(b){n("readable nexttick read 0");b.read(0)}function E(b,d){d.reading||(n("resume read 0"),b.read(0));d.resumeScheduled=!1;b.emit("resume");P(b);d.flowing&&!d.reading&&b.read(0)}function P(b){var d=b._readableState;n("flow",d.flowing);if(d.flowing){do var f=b.read();while(null!==f&&d.flowing)}}function da(b,d){var f=d.buffer,e=d.length,h=!!d.decoder,k=!!d.objectMode;if(0===f.length)return null;if(0===e)e=null;else if(k)e=f.shift();else if(!b||b>=e)e=h?f.join(""):1===f.length?f[0]:
ba.concat(f,e),f.length=0;else if(b<f[0].length)k=f[0],e=k.slice(0,b),f[0]=k.slice(b);else if(b===f[0].length)e=f.shift();else for(var e=h?"":new ba(b),n=0,m=0,q=f.length;m<q&&n<b;m++){var k=f[0],r=Math.min(b-n,k.length);h?e+=k.slice(0,r):k.copy(e,n,0,r);r<k.length?f[0]=k.slice(r):f.shift();n+=r}return e}function aa(b){var d=b._readableState;if(0<d.length)throw Error("endReadable called on non-empty stream");d.endEmitted||(d.ended=!0,m(M,d,b))}function M(b,d){b.endEmitted||0!==b.length||(b.endEmitted=
!0,d.readable=!1,d.emit("end"))}function ka(b,d){for(var f=0,e=b.length;f<e;f++)d(b[f],f)}e.exports=h;var m=b("process-nextick-args"),fa=b("isarray"),ba=b("buffer").Buffer;h.ReadableState=k;b("events");var Z;try{Z=b("stream")}catch(X){}finally{Z||(Z=b("events").EventEmitter)}var ba=b("buffer").Buffer,U=b("core-util-is");U.inherits=b("inherits");var x=b("util"),n;n=x&&x.debuglog?x.debuglog("stream"):function(){};var z;U.inherits(h,Z);var Y;h.prototype.push=function(b,d){var f=this._readableState;f.objectMode||
"string"!==typeof b||(d=d||f.defaultEncoding,d!==f.encoding&&(b=new ba(b,d),d=""));return r(this,f,b,d,!1)};h.prototype.unshift=function(b){return r(this,this._readableState,b,"",!0)};h.prototype.isPaused=function(){return!1===this._readableState.flowing};h.prototype.setEncoding=function(d){z||(z=b("string_decoder/").StringDecoder);this._readableState.decoder=new z(d);this._readableState.encoding=d;return this};h.prototype.read=function(b){n("read",b);var d=this._readableState,f=b;if("number"!==typeof b||
0<b)d.emittedReadable=!1;if(0===b&&d.needReadable&&(d.length>=d.highWaterMark||d.ended))return n("read: emitReadable",d.length,d.ended),0===d.length&&d.ended?aa(this):t(this),null;b=q(b,d);if(0===b&&d.ended)return 0===d.length&&aa(this),null;var e=d.needReadable;n("need readable",e);if(0===d.length||d.length-b<d.highWaterMark)e=!0,n("length less than watermark",e);if(d.ended||d.reading)e=!1,n("reading or ended",e);e&&(n("do read"),d.reading=!0,d.sync=!0,0===d.length&&(d.needReadable=!0),this._read(d.highWaterMark),
d.sync=!1);e&&!d.reading&&(b=q(f,d));e=0<b?da(b,d):null;null===e&&(d.needReadable=!0,b=0);d.length-=b;0!==d.length||d.ended||(d.needReadable=!0);f!==b&&d.ended&&0===d.length&&aa(this);null!==e&&this.emit("data",e);return e};h.prototype._read=function(b){this.emit("error",Error("not implemented"))};h.prototype.pipe=function(b,e){function h(b){n("onunpipe");b===y&&q()}function k(){n("onend");b.end()}function q(){n("cleanup");b.removeListener("close",w);b.removeListener("finish",x);b.removeListener("drain",
M);b.removeListener("error",t);b.removeListener("unpipe",h);y.removeListener("end",k);y.removeListener("end",q);y.removeListener("data",r);P=!0;!E.awaitDrain||b._writableState&&!b._writableState.needDrain||M()}function r(d){n("ondata");!1===b.write(d)&&(1!==E.pipesCount||E.pipes[0]!==b||1!==y.listenerCount("data")||P||(n("false write response, pause",y._readableState.awaitDrain),y._readableState.awaitDrain++),y.pause())}function t(d){n("onerror",d);z();b.removeListener("error",t);0===b.listeners("error").length&&
b.emit("error",d)}function w(){b.removeListener("finish",x);z()}function x(){n("onfinish");b.removeListener("close",w);z()}function z(){n("unpipe");y.unpipe(b)}var y=this,E=this._readableState;switch(E.pipesCount){case 0:E.pipes=b;break;case 1:E.pipes=[E.pipes,b];break;default:E.pipes.push(b)}E.pipesCount+=1;n("pipe count=%d opts=%j",E.pipesCount,e);var G=e&&!1===e.end||b===d.stdout||b===d.stderr?q:k;if(E.endEmitted)m(G);else y.once("end",G);b.on("unpipe",h);var M=B(y);b.on("drain",M);var P=!1;y.on("data",
r);if(b._events&&b._events.error)fa(b._events.error)?b._events.error.unshift(t):b._events.error=[t,b._events.error];else b.on("error",t);b.once("close",w);b.once("finish",x);b.emit("pipe",y);E.flowing||(n("pipe resume"),y.resume());return b};h.prototype.unpipe=function(b){var d=this._readableState;if(0===d.pipesCount)return this;if(1===d.pipesCount){if(b&&b!==d.pipes)return this;b||(b=d.pipes);d.pipes=null;d.pipesCount=0;d.flowing=!1;b&&b.emit("unpipe",this);return this}if(!b){b=d.pipes;var f=d.pipesCount;
d.pipes=null;d.pipesCount=0;d.flowing=!1;for(var e=0;e<f;e++)b[e].emit("unpipe",this);return this}a:{for(var e=d.pipes,f=0,h=e.length;f<h;f++)if(e[f]===b){e=f;break a}e=-1}if(-1===e)return this;d.pipes.splice(e,1);--d.pipesCount;1===d.pipesCount&&(d.pipes=d.pipes[0]);b.emit("unpipe",this);return this};h.prototype.on=function(b,d){var f=Z.prototype.on.call(this,b,d);"data"===b&&!1!==this._readableState.flowing&&this.resume();if("readable"===b&&this.readable){var e=this._readableState;e.readableListening||
(e.readableListening=!0,e.emittedReadable=!1,e.needReadable=!0,e.reading?e.length&&t(this,e):m(w,this))}return f};h.prototype.addListener=h.prototype.on;h.prototype.resume=function(){var b=this._readableState;b.flowing||(n("resume"),b.flowing=!0,b.resumeScheduled||(b.resumeScheduled=!0,m(E,this,b)));return this};h.prototype.pause=function(){n("call pause flowing=%j",this._readableState.flowing);!1!==this._readableState.flowing&&(n("pause"),this._readableState.flowing=!1,this.emit("pause"));return this};
h.prototype.wrap=function(b){var d=this._readableState,f=!1,e=this;b.on("end",function(){n("wrapped end");if(d.decoder&&!d.ended){var b=d.decoder.end();b&&b.length&&e.push(b)}e.push(null)});b.on("data",function(h){n("wrapped data");d.decoder&&(h=d.decoder.write(h));d.objectMode&&(null===h||void 0===h)||!(d.objectMode||h&&h.length)||e.push(h)||(f=!0,b.pause())});for(var h in b)void 0===this[h]&&"function"===typeof b[h]&&(this[h]=function(d){return function(){return b[d].apply(b,arguments)}}(h));ka(["error",
"close","destroy","pause","resume"],function(d){b.on(d,e.emit.bind(e,d))});e._read=function(d){n("wrapped _read",d);f&&(f=!1,b.resume())};return e};h._fromList=da}).call(this,b("_process"))},{"./_stream_duplex":13,_process:11,buffer:3,"core-util-is":18,events:7,inherits:8,isarray:10,"process-nextick-args":19,"string_decoder/":26,util:2}],16:[function(b,e,d){function f(b){this.afterTransform=function(d,f){var e;e=b._transformState;e.transforming=!1;var h=e.writecb;h?(e.writechunk=null,e.writecb=null,
null!==f&&void 0!==f&&b.push(f),h&&h(d),e=b._readableState,e.reading=!1,(e.needReadable||e.length<e.highWaterMark)&&b._read(e.highWaterMark),e=void 0):e=b.emit("error",Error("no writecb in Transform class"));return e};this.transforming=this.needTransform=!1;this.writechunk=this.writecb=null}function k(b){if(!(this instanceof k))return new k(b);r.call(this,b);this._transformState=new f(this);var d=this;this._readableState.needReadable=!0;this._readableState.sync=!1;b&&("function"===typeof b.transform&&
(this._transform=b.transform),"function"===typeof b.flush&&(this._flush=b.flush));this.once("prefinish",function(){"function"===typeof this._flush?this._flush(function(b){h(d,b)}):h(d)})}function h(b,d){if(d)return b.emit("error",d);var f=b._transformState;if(b._writableState.length)throw Error("calling transform done when ws.length != 0");if(f.transforming)throw Error("calling transform done when still transforming");return b.push(null)}e.exports=k;var r=b("./_stream_duplex");e=b("core-util-is");
e.inherits=b("inherits");e.inherits(k,r);k.prototype.push=function(b,d){this._transformState.needTransform=!1;return r.prototype.push.call(this,b,d)};k.prototype._transform=function(b,d,f){throw Error("not implemented");};k.prototype._write=function(b,d,f){var e=this._transformState;e.writecb=f;e.writechunk=b;e.writeencoding=d;e.transforming||(b=this._readableState,(e.needTransform||b.needReadable||b.length<b.highWaterMark)&&this._read(b.highWaterMark))};k.prototype._read=function(b){b=this._transformState;
null!==b.writechunk&&b.writecb&&!b.transforming?(b.transforming=!0,this._transform(b.writechunk,b.writeencoding,b.afterTransform)):b.needTransform=!0}},{"./_stream_duplex":13,"core-util-is":18,inherits:8}],17:[function(b,e,d){function f(){}function k(b,d,f){this.chunk=b;this.encoding=d;this.callback=f;this.next=null}function h(d,f){M=M||b("./_stream_duplex");d=d||{};this.objectMode=!!d.objectMode;f instanceof M&&(this.objectMode=this.objectMode||!!d.writableObjectMode);var e=d.highWaterMark,h=this.objectMode?
16:16384;this.highWaterMark=e||0===e?e:h;this.highWaterMark=~~this.highWaterMark;this.finished=this.ended=this.ending=this.needDrain=!1;this.decodeStrings=!1!==d.decodeStrings;this.defaultEncoding=d.defaultEncoding||"utf8";this.length=0;this.writing=!1;this.corked=0;this.sync=!0;this.bufferProcessing=!1;this.onwrite=function(b){var d=f._writableState,e=d.sync,h=d.writecb;d.writing=!1;d.writecb=null;d.length-=d.writelen;d.writelen=0;b?(--d.pendingcb,e?w(h,b):h(b),f._writableState.errorEmitted=!0,f.emit("error",
b)):((b=G(d))||d.corked||d.bufferProcessing||!d.bufferedRequest||y(f,d),e?w(t,f,d,b,h):t(f,d,b,h))};this.writecb=null;this.writelen=0;this.lastBufferedRequest=this.bufferedRequest=null;this.pendingcb=0;this.errorEmitted=this.prefinished=!1}function r(d){M=M||b("./_stream_duplex");if(!(this instanceof r||this instanceof M))return new r(d);this._writableState=new h(d,this);this.writable=!0;d&&("function"===typeof d.write&&(this._write=d.write),"function"===typeof d.writev&&(this._writev=d.writev));
da.call(this)}function q(b,d,f,e,h,k,q){d.writelen=e;d.writecb=q;d.writing=!0;d.sync=!0;f?b._writev(h,d.onwrite):b._write(h,k,d.onwrite);d.sync=!1}function t(b,d,f,e){!f&&0===d.length&&d.needDrain&&(d.needDrain=!1,b.emit("drain"));d.pendingcb--;e();B(b,d)}function y(b,d){d.bufferProcessing=!0;var f=d.bufferedRequest;if(b._writev&&f&&f.next){for(var e=[],h=[];f;)h.push(f.callback),e.push(f),f=f.next;d.pendingcb++;d.lastBufferedRequest=null;q(b,d,!0,d.length,e,"",function(b){for(var f=0;f<h.length;f++)d.pendingcb--,
h[f](b)})}else{for(;f&&(e=f.chunk,q(b,d,!1,d.objectMode?1:e.length,e,f.encoding,f.callback),f=f.next,!d.writing););null===f&&(d.lastBufferedRequest=null)}d.bufferedRequest=f;d.bufferProcessing=!1}function G(b){return b.ending&&0===b.length&&null===b.bufferedRequest&&!b.finished&&!b.writing}function B(b,d){var f=G(d);f&&(0===d.pendingcb?(d.prefinished||(d.prefinished=!0,b.emit("prefinish")),d.finished=!0,b.emit("finish")):d.prefinished||(d.prefinished=!0,b.emit("prefinish")));return f}e.exports=r;
var w=b("process-nextick-args"),E=b("buffer").Buffer;r.WritableState=h;e=b("core-util-is");e.inherits=b("inherits");var P={deprecate:b("util-deprecate")},da;try{da=b("stream")}catch(aa){}finally{da||(da=b("events").EventEmitter)}E=b("buffer").Buffer;e.inherits(r,da);var M;h.prototype.getBuffer=function(){for(var b=this.bufferedRequest,d=[];b;)d.push(b),b=b.next;return d};(function(){try{Object.defineProperty(h.prototype,"buffer",{get:P.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(b){}})();
r.prototype.pipe=function(){this.emit("error",Error("Cannot pipe. Not readable."))};r.prototype.write=function(b,d,e){var h=this._writableState,r=!1;"function"===typeof d&&(e=d,d=null);E.isBuffer(b)?d="buffer":d||(d=h.defaultEncoding);"function"!==typeof e&&(e=f);if(h.ended)h=e,b=Error("write after end"),this.emit("error",b),w(h,b);else{var t=e,y=!0;E.isBuffer(b)||"string"===typeof b||null===b||void 0===b||h.objectMode||(y=new TypeError("Invalid non-string/buffer chunk"),this.emit("error",y),w(t,
y),y=!1);y&&(h.pendingcb++,r=d,h.objectMode||!1===h.decodeStrings||"string"!==typeof b||(b=new E(b,r)),E.isBuffer(b)&&(r="buffer"),t=h.objectMode?1:b.length,h.length+=t,d=h.length<h.highWaterMark,d||(h.needDrain=!0),h.writing||h.corked?(t=h.lastBufferedRequest,h.lastBufferedRequest=new k(b,r,e),t?t.next=h.lastBufferedRequest:h.bufferedRequest=h.lastBufferedRequest):q(this,h,!1,t,b,r,e),r=d)}return r};r.prototype.cork=function(){this._writableState.corked++};r.prototype.uncork=function(){var b=this._writableState;
b.corked&&(b.corked--,b.writing||b.corked||b.finished||b.bufferProcessing||!b.bufferedRequest||y(this,b))};r.prototype.setDefaultEncoding=function(b){"string"===typeof b&&(b=b.toLowerCase());if(!(-1<"hex utf8 utf-8 ascii binary base64 ucs2 ucs-2 utf16le utf-16le raw".split(" ").indexOf((b+"").toLowerCase())))throw new TypeError("Unknown encoding: "+b);this._writableState.defaultEncoding=b};r.prototype._write=function(b,d,f){f(Error("not implemented"))};r.prototype._writev=null;r.prototype.end=function(b,
d,f){var e=this._writableState;"function"===typeof b?(f=b,d=b=null):"function"===typeof d&&(f=d,d=null);null!==b&&void 0!==b&&this.write(b,d);e.corked&&(e.corked=1,this.uncork());if(!e.ending&&!e.finished){b=f;e.ending=!0;B(this,e);if(b)if(e.finished)w(b);else this.once("finish",b);e.ended=!0}}},{"./_stream_duplex":13,buffer:3,"core-util-is":18,events:7,inherits:8,"process-nextick-args":19,"util-deprecate":20}],18:[function(b,e,d){(function(b){d.isArray=function(b){return Array.isArray?Array.isArray(b):
"[object Array]"===Object.prototype.toString.call(b)};d.isBoolean=function(b){return"boolean"===typeof b};d.isNull=function(b){return null===b};d.isNullOrUndefined=function(b){return null==b};d.isNumber=function(b){return"number"===typeof b};d.isString=function(b){return"string"===typeof b};d.isSymbol=function(b){return"symbol"===typeof b};d.isUndefined=function(b){return void 0===b};d.isRegExp=function(b){return"[object RegExp]"===Object.prototype.toString.call(b)};d.isObject=function(b){return"object"===
typeof b&&null!==b};d.isDate=function(b){return"[object Date]"===Object.prototype.toString.call(b)};d.isError=function(b){return"[object Error]"===Object.prototype.toString.call(b)||b instanceof Error};d.isFunction=function(b){return"function"===typeof b};d.isPrimitive=function(b){return null===b||"boolean"===typeof b||"number"===typeof b||"string"===typeof b||"symbol"===typeof b||"undefined"===typeof b};d.isBuffer=b.isBuffer}).call(this,{isBuffer:b("../../../../insert-module-globals/node_modules/is-buffer/index.js")})},
{"../../../../insert-module-globals/node_modules/is-buffer/index.js":9}],19:[function(b,e,d){(function(b){function d(e){for(var k=Array(arguments.length-1),q=0;q<k.length;)k[q++]=arguments[q];b.nextTick(function(){e.apply(null,k)})}!b.version||0===b.version.indexOf("v0.")||0===b.version.indexOf("v1.")&&0!==b.version.indexOf("v1.8.")?e.exports=d:e.exports=b.nextTick}).call(this,b("_process"))},{_process:11}],20:[function(b,e,d){(function(b){function d(e){try{if(!b.localStorage)return!1}catch(k){return!1}e=
b.localStorage[e];return null==e?!1:"true"===String(e).toLowerCase()}e.exports=function(b,f){if(d("noDeprecation"))return b;var e=!1;return function(){if(!e){if(d("throwDeprecation"))throw Error(f);d("traceDeprecation")?console.trace(f):console.warn(f);e=!0}return b.apply(this,arguments)}}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],21:[function(b,e,d){e.exports=b("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":14}],
22:[function(b,e,d){var f;a:{try{f=b("stream");break a}catch(k){}f=void 0}d=e.exports=b("./lib/_stream_readable.js");d.Stream=f||d;d.Readable=d;d.Writable=b("./lib/_stream_writable.js");d.Duplex=b("./lib/_stream_duplex.js");d.Transform=b("./lib/_stream_transform.js");d.PassThrough=b("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":13,"./lib/_stream_passthrough.js":14,"./lib/_stream_readable.js":15,"./lib/_stream_transform.js":16,"./lib/_stream_writable.js":17}],23:[function(b,e,d){e.exports=
b("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":16}],24:[function(b,e,d){e.exports=b("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":17}],25:[function(b,e,d){function f(){k.call(this)}e.exports=f;var k=b("events").EventEmitter;b("inherits")(f,k);f.Readable=b("readable-stream/readable.js");f.Writable=b("readable-stream/writable.js");f.Duplex=b("readable-stream/duplex.js");f.Transform=b("readable-stream/transform.js");f.PassThrough=b("readable-stream/passthrough.js");f.Stream=
f;f.prototype.pipe=function(b,d){function f(d){b.writable&&!1===b.write(d)&&E.pause&&E.pause()}function e(){E.readable&&E.resume&&E.resume()}function y(){P||(P=!0,b.end())}function G(){P||(P=!0,"function"===typeof b.destroy&&b.destroy())}function B(b){w();if(0===k.listenerCount(this,"error"))throw b;}function w(){E.removeListener("data",f);b.removeListener("drain",e);E.removeListener("end",y);E.removeListener("close",G);E.removeListener("error",B);b.removeListener("error",B);E.removeListener("end",
w);E.removeListener("close",w);b.removeListener("close",w)}var E=this;E.on("data",f);b.on("drain",e);b._isStdio||d&&!1===d.end||(E.on("end",y),E.on("close",G));var P=!1;E.on("error",B);b.on("error",B);E.on("end",w);E.on("close",w);b.on("close",w);b.emit("pipe",E);return b}},{events:7,inherits:8,"readable-stream/duplex.js":12,"readable-stream/passthrough.js":21,"readable-stream/readable.js":22,"readable-stream/transform.js":23,"readable-stream/writable.js":24}],26:[function(b,e,d){function f(b){return b.toString(this.encoding)}
function k(b){this.charLength=(this.charReceived=b.length%2)?2:0}function h(b){this.charLength=(this.charReceived=b.length%3)?3:0}var r=b("buffer").Buffer,q=r.isEncoding||function(b){switch(b&&b.toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "binary":case "base64":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":case "raw":return!0;default:return!1}};b=d.StringDecoder=function(b){this.encoding=(b||"utf8").toLowerCase().replace(/[-_]/,"");if(b&&!q(b))throw Error("Unknown encoding: "+
b);switch(this.encoding){case "utf8":this.surrogateSize=3;break;case "ucs2":case "utf16le":this.surrogateSize=2;this.detectIncompleteChar=k;break;case "base64":this.surrogateSize=3;this.detectIncompleteChar=h;break;default:this.write=f;return}this.charBuffer=new r(6);this.charLength=this.charReceived=0};b.prototype.write=function(b){for(var d="";this.charLength;){d=b.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:b.length;b.copy(this.charBuffer,this.charReceived,0,d);
this.charReceived+=d;if(this.charReceived<this.charLength)return"";b=b.slice(d,b.length);var d=this.charBuffer.slice(0,this.charLength).toString(this.encoding),f=d.charCodeAt(d.length-1);if(55296<=f&&56319>=f)this.charLength+=this.surrogateSize,d="";else{this.charReceived=this.charLength=0;if(0===b.length)return d;break}}this.detectIncompleteChar(b);var e=b.length;this.charLength&&(b.copy(this.charBuffer,0,b.length-this.charReceived,e),e-=this.charReceived);d+=b.toString(this.encoding,0,e);e=d.length-
1;f=d.charCodeAt(e);return 55296<=f&&56319>=f?(f=this.surrogateSize,this.charLength+=f,this.charReceived+=f,this.charBuffer.copy(this.charBuffer,f,0,f),b.copy(this.charBuffer,0,0,f),d.substring(0,e)):d};b.prototype.detectIncompleteChar=function(b){for(var d=3<=b.length?3:b.length;0<d;d--){var f=b[b.length-d];if(1==d&&6==f>>5){this.charLength=2;break}if(2>=d&&14==f>>4){this.charLength=3;break}if(3>=d&&30==f>>3){this.charLength=4;break}}this.charReceived=d};b.prototype.end=function(b){var d="";b&&b.length&&
(d=this.write(b));this.charReceived&&(b=this.encoding,d+=this.charBuffer.slice(0,this.charReceived).toString(b));return d}},{buffer:3}],27:[function(b,e,d){d=b("./lib/utils/common").assign;var f=b("./lib/deflate"),k=b("./lib/inflate");b=b("./lib/zlib/constants");var h={};d(h,f,k,b);e.exports=h},{"./lib/deflate":28,"./lib/inflate":29,"./lib/utils/common":30,"./lib/zlib/constants":33}],28:[function(b,e,d){function f(b){if(!(this instanceof f))return new f(b);b=this.options=r.assign({level:-1,method:8,
chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},b||{});b.raw&&0<b.windowBits?b.windowBits=-b.windowBits:b.gzip&&0<b.windowBits&&16>b.windowBits&&(b.windowBits+=16);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new y;this.strm.avail_out=0;var d=h.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(0!==d)throw Error(t[d]);b.header&&h.deflateSetHeader(this.strm,b.header)}function k(b,d){var e=new f(d);e.push(b,!0);if(e.err)throw e.msg;return e.result}
var h=b("./zlib/deflate"),r=b("./utils/common"),q=b("./utils/strings"),t=b("./zlib/messages"),y=b("./zlib/zstream"),G=Object.prototype.toString;f.prototype.push=function(b,d){var f=this.strm,e=this.options.chunkSize,k,t;if(this.ended)return!1;t=d===~~d?d:!0===d?4:0;"string"===typeof b?f.input=q.string2buf(b):"[object ArrayBuffer]"===G.call(b)?f.input=new Uint8Array(b):f.input=b;f.next_in=0;f.avail_in=f.input.length;do{0===f.avail_out&&(f.output=new r.Buf8(e),f.next_out=0,f.avail_out=e);k=h.deflate(f,
t);if(1!==k&&0!==k)return this.onEnd(k),this.ended=!0,!1;if(0===f.avail_out||0===f.avail_in&&(4===t||2===t))if("string"===this.options.to)this.onData(q.buf2binstring(r.shrinkBuf(f.output,f.next_out)));else this.onData(r.shrinkBuf(f.output,f.next_out))}while((0<f.avail_in||0===f.avail_out)&&1!==k);if(4===t)return k=h.deflateEnd(this.strm),this.onEnd(k),this.ended=!0,0===k;2===t&&(this.onEnd(0),f.avail_out=0);return!0};f.prototype.onData=function(b){this.chunks.push(b)};f.prototype.onEnd=function(b){0===
b&&(this.result="string"===this.options.to?this.chunks.join(""):r.flattenChunks(this.chunks));this.chunks=[];this.err=b;this.msg=this.strm.msg};d.Deflate=f;d.deflate=k;d.deflateRaw=function(b,d){d=d||{};d.raw=!0;return k(b,d)};d.gzip=function(b,d){d=d||{};d.gzip=!0;return k(b,d)}},{"./utils/common":30,"./utils/strings":31,"./zlib/deflate":35,"./zlib/messages":40,"./zlib/zstream":42}],29:[function(b,e,d){function f(b){if(!(this instanceof f))return new f(b);var d=this.options=r.assign({chunkSize:16384,
windowBits:0,to:""},b||{});d.raw&&0<=d.windowBits&&16>d.windowBits&&(d.windowBits=-d.windowBits,0===d.windowBits&&(d.windowBits=-15));!(0<=d.windowBits&&16>d.windowBits)||b&&b.windowBits||(d.windowBits+=32);15<d.windowBits&&48>d.windowBits&&0===(d.windowBits&15)&&(d.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new G;this.strm.avail_out=0;b=h.inflateInit2(this.strm,d.windowBits);if(b!==t.Z_OK)throw Error(y[b]);this.header=new B;h.inflateGetHeader(this.strm,this.header)}
function k(b,d){var e=new f(d);e.push(b,!0);if(e.err)throw e.msg;return e.result}var h=b("./zlib/inflate"),r=b("./utils/common"),q=b("./utils/strings"),t=b("./zlib/constants"),y=b("./zlib/messages"),G=b("./zlib/zstream"),B=b("./zlib/gzheader"),w=Object.prototype.toString;f.prototype.push=function(b,d){var f=this.strm,e=this.options.chunkSize,k,y,m,B,G,Z=!1;if(this.ended)return!1;y=d===~~d?d:!0===d?t.Z_FINISH:t.Z_NO_FLUSH;"string"===typeof b?f.input=q.binstring2buf(b):"[object ArrayBuffer]"===w.call(b)?
f.input=new Uint8Array(b):f.input=b;f.next_in=0;f.avail_in=f.input.length;do{0===f.avail_out&&(f.output=new r.Buf8(e),f.next_out=0,f.avail_out=e);k=h.inflate(f,t.Z_NO_FLUSH);k===t.Z_BUF_ERROR&&!0===Z&&(k=t.Z_OK,Z=!1);if(k!==t.Z_STREAM_END&&k!==t.Z_OK)return this.onEnd(k),this.ended=!0,!1;if(f.next_out&&(0===f.avail_out||k===t.Z_STREAM_END||0===f.avail_in&&(y===t.Z_FINISH||y===t.Z_SYNC_FLUSH)))if("string"===this.options.to)m=q.utf8border(f.output,f.next_out),B=f.next_out-m,G=q.buf2string(f.output,
m),f.next_out=B,f.avail_out=e-B,B&&r.arraySet(f.output,f.output,m,B,0),this.onData(G);else this.onData(r.shrinkBuf(f.output,f.next_out));0===f.avail_in&&0===f.avail_out&&(Z=!0)}while((0<f.avail_in||0===f.avail_out)&&k!==t.Z_STREAM_END);k===t.Z_STREAM_END&&(y=t.Z_FINISH);if(y===t.Z_FINISH)return k=h.inflateEnd(this.strm),this.onEnd(k),this.ended=!0,k===t.Z_OK;y===t.Z_SYNC_FLUSH&&(this.onEnd(t.Z_OK),f.avail_out=0);return!0};f.prototype.onData=function(b){this.chunks.push(b)};f.prototype.onEnd=function(b){b===
t.Z_OK&&(this.result="string"===this.options.to?this.chunks.join(""):r.flattenChunks(this.chunks));this.chunks=[];this.err=b;this.msg=this.strm.msg};d.Inflate=f;d.inflate=k;d.inflateRaw=function(b,d){d=d||{};d.raw=!0;return k(b,d)};d.ungzip=k},{"./utils/common":30,"./utils/strings":31,"./zlib/constants":33,"./zlib/gzheader":36,"./zlib/inflate":38,"./zlib/messages":40,"./zlib/zstream":42}],30:[function(b,e,d){b="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Int32Array;
d.assign=function(b){for(var d=Array.prototype.slice.call(arguments,1);d.length;){var f=d.shift();if(f){if("object"!==typeof f)throw new TypeError(f+"must be non-object");for(var e in f)f.hasOwnProperty(e)&&(b[e]=f[e])}}return b};d.shrinkBuf=function(b,d){if(b.length===d)return b;if(b.subarray)return b.subarray(0,d);b.length=d;return b};var f={arraySet:function(b,d,f,e,k){if(d.subarray&&b.subarray)b.set(d.subarray(f,f+e),k);else for(var G=0;G<e;G++)b[k+G]=d[f+G]},flattenChunks:function(b){var d,f,
e,k,G;d=e=0;for(f=b.length;d<f;d++)e+=b[d].length;G=new Uint8Array(e);d=e=0;for(f=b.length;d<f;d++)k=b[d],G.set(k,e),e+=k.length;return G}},k={arraySet:function(b,d,f,e,k){for(var G=0;G<e;G++)b[k+G]=d[f+G]},flattenChunks:function(b){return[].concat.apply([],b)}};d.setTyped=function(b){b?(d.Buf8=Uint8Array,d.Buf16=Uint16Array,d.Buf32=Int32Array,d.assign(d,f)):(d.Buf8=Array,d.Buf16=Array,d.Buf32=Array,d.assign(d,k))};d.setTyped(b)},{}],31:[function(b,e,d){function f(b,d){if(65537>d&&(b.subarray&&r||
!b.subarray&&h))return String.fromCharCode.apply(null,k.shrinkBuf(b,d));for(var f="",e=0;e<d;e++)f+=String.fromCharCode(b[e]);return f}var k=b("./common"),h=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch(q){h=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){r=!1}var y=new k.Buf8(256);for(b=0;256>b;b++)y[b]=252<=b?6:248<=b?5:240<=b?4:224<=b?3:192<=b?2:1;y[254]=y[254]=1;d.string2buf=function(b){var d,f,e,h,q,r=b.length,t=0;for(h=0;h<r;h++)f=b.charCodeAt(h),55296===(f&64512)&&
h+1<r&&(e=b.charCodeAt(h+1),56320===(e&64512)&&(f=65536+(f-55296<<10)+(e-56320),h++)),t+=128>f?1:2048>f?2:65536>f?3:4;d=new k.Buf8(t);for(h=q=0;q<t;h++)f=b.charCodeAt(h),55296===(f&64512)&&h+1<r&&(e=b.charCodeAt(h+1),56320===(e&64512)&&(f=65536+(f-55296<<10)+(e-56320),h++)),128>f?d[q++]=f:(2048>f?d[q++]=192|f>>>6:(65536>f?d[q++]=224|f>>>12:(d[q++]=240|f>>>18,d[q++]=128|f>>>12&63),d[q++]=128|f>>>6&63),d[q++]=128|f&63);return d};d.buf2binstring=function(b){return f(b,b.length)};d.binstring2buf=function(b){for(var d=
new k.Buf8(b.length),f=0,e=d.length;f<e;f++)d[f]=b.charCodeAt(f);return d};d.buf2string=function(b,d){var e,h,k,q,r=d||b.length,t=Array(2*r);for(e=h=0;e<r;)if(k=b[e++],128>k)t[h++]=k;else if(q=y[k],4<q)t[h++]=65533,e+=q-1;else{for(k&=2===q?31:3===q?15:7;1<q&&e<r;)k=k<<6|b[e++]&63,q--;1<q?t[h++]=65533:65536>k?t[h++]=k:(k-=65536,t[h++]=55296|k>>10&1023,t[h++]=56320|k&1023)}return f(t,h)};d.utf8border=function(b,d){var f;d=d||b.length;d>b.length&&(d=b.length);for(f=d-1;0<=f&&128===(b[f]&192);)f--;return 0>
f||0===f?d:f+y[b[f]]>d?f:d}},{"./common":30}],32:[function(b,e,d){e.exports=function(b,d,e,r){var q=b&65535|0;b=b>>>16&65535|0;for(var t=0;0!==e;){t=2E3<e?2E3:e;e-=t;do q=q+d[r++]|0,b=b+q|0;while(--t);q%=65521;b%=65521}return q|b<<16|0}},{}],33:[function(b,e,d){e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,
Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],34:[function(b,e,d){var f=function(){for(var b,d=[],f=0;256>f;f++){b=f;for(var e=0;8>e;e++)b=b&1?3988292384^b>>>1:b>>>1;d[f]=b}return d}();e.exports=function(b,d,e,q){e=q+e;for(b^=-1;q<e;q++)b=b>>>8^f[(b^d[q])&255];return b^-1}},{}],35:[function(b,e,d){function f(b,d){b.msg=U[d];return d}function k(b){for(var d=b.length;0<=--d;)b[d]=0}function h(b){var d=
b.state,f=d.pending;f>b.avail_out&&(f=b.avail_out);0!==f&&(fa.arraySet(b.output,d.pending_buf,d.pending_out,f,b.next_out),b.next_out+=f,d.pending_out+=f,b.total_out+=f,b.avail_out-=f,d.pending-=f,0===d.pending&&(d.pending_out=0))}function r(b,d){ba._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,d);b.block_start=b.strstart;h(b.strm)}function q(b,d){b.pending_buf[b.pending++]=d}function t(b,d){b.pending_buf[b.pending++]=d>>>8&255;b.pending_buf[b.pending++]=d&255}function y(b,
d){var f=b.max_chain_length,e=b.strstart,h,k=b.prev_length,m=b.nice_match,q=b.strstart>b.w_size-262?b.strstart-(b.w_size-262):0,r=b.window,t=b.w_mask,w=b.prev,x=b.strstart+258,y=r[e+k-1],B=r[e+k];b.prev_length>=b.good_match&&(f>>=2);m>b.lookahead&&(m=b.lookahead);do if(h=d,r[h+k]===B&&r[h+k-1]===y&&r[h]===r[e]&&r[++h]===r[e+1]){e+=2;for(h++;r[++e]===r[++h]&&r[++e]===r[++h]&&r[++e]===r[++h]&&r[++e]===r[++h]&&r[++e]===r[++h]&&r[++e]===r[++h]&&r[++e]===r[++h]&&r[++e]===r[++h]&&e<x;);h=258-(x-e);e=x-
258;if(h>k){b.match_start=d;k=h;if(h>=m)break;y=r[e+k-1];B=r[e+k]}}while((d=w[d&t])>q&&0!==--f);return k<=b.lookahead?k:b.lookahead}function G(b){var d=b.w_size,f,e,h,k;do{k=b.window_size-b.lookahead-b.strstart;if(b.strstart>=d+(d-262)){fa.arraySet(b.window,b.window,d,d,0);b.match_start-=d;b.strstart-=d;b.block_start-=d;f=e=b.hash_size;do h=b.head[--f],b.head[f]=h>=d?h-d:0;while(--e);f=e=d;do h=b.prev[--f],b.prev[f]=h>=d?h-d:0;while(--e);k+=d}if(0===b.strm.avail_in)break;f=b.strm;e=b.window;h=b.strstart+
b.lookahead;var m=f.avail_in;m>k&&(m=k);0===m?e=0:(f.avail_in-=m,fa.arraySet(e,f.input,f.next_in,m,h),1===f.state.wrap?f.adler=Z(f.adler,e,m,h):2===f.state.wrap&&(f.adler=X(f.adler,e,m,h)),f.next_in+=m,f.total_in+=m,e=m);b.lookahead+=e;if(3<=b.lookahead+b.insert)for(k=b.strstart-b.insert,b.ins_h=b.window[k],b.ins_h=(b.ins_h<<b.hash_shift^b.window[k+1])&b.hash_mask;b.insert&&!(b.ins_h=(b.ins_h<<b.hash_shift^b.window[k+3-1])&b.hash_mask,b.prev[k&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=k,k++,b.insert--,
3>b.lookahead+b.insert););}while(262>b.lookahead&&0!==b.strm.avail_in)}function B(b,d){for(var f;;){if(262>b.lookahead){G(b);if(262>b.lookahead&&0===d)return 1;if(0===b.lookahead)break}f=0;3<=b.lookahead&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+3-1])&b.hash_mask,f=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);0!==f&&b.strstart-f<=b.w_size-262&&(b.match_length=y(b,f));if(3<=b.match_length)if(f=ba._tr_tally(b,b.strstart-b.match_start,b.match_length-3),b.lookahead-=
b.match_length,b.match_length<=b.max_lazy_match&&3<=b.lookahead){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+3-1])&b.hash_mask,b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart;while(0!==--b.match_length);b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else f=ba._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(f&&
(r(b,!1),0===b.strm.avail_out))return 1}b.insert=2>b.strstart?b.strstart:2;return 4===d?(r(b,!0),0===b.strm.avail_out?3:4):b.last_lit&&(r(b,!1),0===b.strm.avail_out)?1:2}function w(b,d){for(var f,e;;){if(262>b.lookahead){G(b);if(262>b.lookahead&&0===d)return 1;if(0===b.lookahead)break}f=0;3<=b.lookahead&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+3-1])&b.hash_mask,f=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);b.prev_length=b.match_length;b.prev_match=b.match_start;
b.match_length=2;0!==f&&b.prev_length<b.max_lazy_match&&b.strstart-f<=b.w_size-262&&(b.match_length=y(b,f),5>=b.match_length&&(1===b.strategy||3===b.match_length&&4096<b.strstart-b.match_start)&&(b.match_length=2));if(3<=b.prev_length&&b.match_length<=b.prev_length){e=b.strstart+b.lookahead-3;f=ba._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-3);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=e&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+3-1])&b.hash_mask,b.prev[b.strstart&
b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);while(0!==--b.prev_length);b.match_available=0;b.match_length=2;b.strstart++;if(f&&(r(b,!1),0===b.strm.avail_out))return 1}else if(b.match_available){if((f=ba._tr_tally(b,0,b.window[b.strstart-1]))&&r(b,!1),b.strstart++,b.lookahead--,0===b.strm.avail_out)return 1}else b.match_available=1,b.strstart++,b.lookahead--}b.match_available&&(ba._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0);b.insert=2>b.strstart?b.strstart:2;return 4===d?(r(b,
!0),0===b.strm.avail_out?3:4):b.last_lit&&(r(b,!1),0===b.strm.avail_out)?1:2}function E(b,d){for(var f,e,h,k=b.window;;){if(258>=b.lookahead){G(b);if(258>=b.lookahead&&0===d)return 1;if(0===b.lookahead)break}b.match_length=0;if(3<=b.lookahead&&0<b.strstart&&(e=b.strstart-1,f=k[e],f===k[++e]&&f===k[++e]&&f===k[++e])){for(h=b.strstart+258;f===k[++e]&&f===k[++e]&&f===k[++e]&&f===k[++e]&&f===k[++e]&&f===k[++e]&&f===k[++e]&&f===k[++e]&&e<h;);b.match_length=258-(h-e);b.match_length>b.lookahead&&(b.match_length=
b.lookahead)}3<=b.match_length?(f=ba._tr_tally(b,1,b.match_length-3),b.lookahead-=b.match_length,b.strstart+=b.match_length,b.match_length=0):(f=ba._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++);if(f&&(r(b,!1),0===b.strm.avail_out))return 1}b.insert=0;return 4===d?(r(b,!0),0===b.strm.avail_out?3:4):b.last_lit&&(r(b,!1),0===b.strm.avail_out)?1:2}function P(b,d){for(var f;;){if(0===b.lookahead&&(G(b),0===b.lookahead)){if(0===d)return 1;break}b.match_length=0;f=ba._tr_tally(b,0,b.window[b.strstart]);
b.lookahead--;b.strstart++;if(f&&(r(b,!1),0===b.strm.avail_out))return 1}b.insert=0;return 4===d?(r(b,!0),0===b.strm.avail_out?3:4):b.last_lit&&(r(b,!1),0===b.strm.avail_out)?1:2}function da(b,d,f,e,h){this.good_length=b;this.max_lazy=d;this.nice_length=f;this.max_chain=e;this.func=h}function aa(){this.strm=null;this.status=0;this.pending_buf=null;this.wrap=this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=8;this.last_flush=-1;this.w_mask=this.w_bits=
this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new fa.Buf16(1146);this.dyn_dtree=new fa.Buf16(122);this.bl_tree=new fa.Buf16(78);k(this.dyn_ltree);k(this.dyn_dtree);
k(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new fa.Buf16(16);this.heap=new fa.Buf16(573);k(this.heap);this.heap_max=this.heap_len=0;this.depth=new fa.Buf16(573);k(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=this.lit_bufsize=this.l_buf=0}function M(b){var d;if(!b||!b.state)return f(b,-2);b.total_in=b.total_out=0;b.data_type=2;d=b.state;d.pending=0;d.pending_out=0;0>d.wrap&&(d.wrap=-d.wrap);d.status=
d.wrap?42:113;b.adler=2===d.wrap?0:1;d.last_flush=0;ba._tr_init(d);return 0}function ka(b){var d=M(b);0===d&&(b=b.state,b.window_size=2*b.w_size,k(b.head),b.max_lazy_match=x[b.level].max_lazy,b.good_match=x[b.level].good_length,b.nice_match=x[b.level].nice_length,b.max_chain_length=x[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=2,b.match_available=0,b.ins_h=0);return d}function m(b,d,e,h,k,m){if(!b)return-2;var q=1;-1===d&&(d=6);0>h?(q=0,h=
-h):15<h&&(q=2,h-=16);if(1>k||9<k||8!==e||8>h||15<h||0>d||9<d||0>m||4<m)return f(b,-2);8===h&&(h=9);var r=new aa;b.state=r;r.strm=b;r.wrap=q;r.gzhead=null;r.w_bits=h;r.w_size=1<<r.w_bits;r.w_mask=r.w_size-1;r.hash_bits=k+7;r.hash_size=1<<r.hash_bits;r.hash_mask=r.hash_size-1;r.hash_shift=~~((r.hash_bits+3-1)/3);r.window=new fa.Buf8(2*r.w_size);r.head=new fa.Buf16(r.hash_size);r.prev=new fa.Buf16(r.w_size);r.lit_bufsize=1<<k+6;r.pending_buf_size=4*r.lit_bufsize;r.pending_buf=new fa.Buf8(r.pending_buf_size);
r.d_buf=r.lit_bufsize>>1;r.l_buf=3*r.lit_bufsize;r.level=d;r.strategy=m;r.method=e;return ka(b)}var fa=b("../utils/common"),ba=b("./trees"),Z=b("./adler32"),X=b("./crc32"),U=b("./messages"),x;x=[new da(0,0,0,0,function(b,d){var f=65535;for(f>b.pending_buf_size-5&&(f=b.pending_buf_size-5);;){if(1>=b.lookahead){G(b);if(0===b.lookahead&&0===d)return 1;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var e=b.block_start+f;if(0===b.strstart||b.strstart>=e)if(b.lookahead=b.strstart-e,b.strstart=
e,r(b,!1),0===b.strm.avail_out)return 1;if(b.strstart-b.block_start>=b.w_size-262&&(r(b,!1),0===b.strm.avail_out))return 1}b.insert=0;if(4===d)return r(b,!0),0===b.strm.avail_out?3:4;b.strstart>b.block_start&&r(b,!1);return 1}),new da(4,4,8,4,B),new da(4,5,16,8,B),new da(4,6,32,32,B),new da(4,4,16,16,w),new da(8,16,32,32,w),new da(8,16,128,128,w),new da(8,32,128,256,w),new da(32,128,258,1024,w),new da(32,258,258,4096,w)];d.deflateInit=function(b,d){return m(b,d,8,15,8,0)};d.deflateInit2=m;d.deflateReset=
ka;d.deflateResetKeep=M;d.deflateSetHeader=function(b,d){if(!b||!b.state||2!==b.state.wrap)return-2;b.state.gzhead=d;return 0};d.deflate=function(b,d){var e,m,r,w;if(!b||!b.state||5<d||0>d)return b?f(b,-2):-2;m=b.state;if(!b.output||!b.input&&0!==b.avail_in||666===m.status&&4!==d)return f(b,0===b.avail_out?-5:-2);m.strm=b;e=m.last_flush;m.last_flush=d;42===m.status&&(2===m.wrap?(b.adler=0,q(m,31),q(m,139),q(m,8),m.gzhead?(q(m,(m.gzhead.text?1:0)+(m.gzhead.hcrc?2:0)+(m.gzhead.extra?4:0)+(m.gzhead.name?
8:0)+(m.gzhead.comment?16:0)),q(m,m.gzhead.time&255),q(m,m.gzhead.time>>8&255),q(m,m.gzhead.time>>16&255),q(m,m.gzhead.time>>24&255),q(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),q(m,m.gzhead.os&255),m.gzhead.extra&&m.gzhead.extra.length&&(q(m,m.gzhead.extra.length&255),q(m,m.gzhead.extra.length>>8&255)),m.gzhead.hcrc&&(b.adler=X(b.adler,m.pending_buf,m.pending,0)),m.gzindex=0,m.status=69):(q(m,0),q(m,0),q(m,0),q(m,0),q(m,0),q(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),q(m,3),m.status=113)):
(r=8+(m.w_bits-8<<4)<<8,w=-1,w=2<=m.strategy||2>m.level?0:6>m.level?1:6===m.level?2:3,r|=w<<6,0!==m.strstart&&(r|=32),m.status=113,t(m,r+(31-r%31)),0!==m.strstart&&(t(m,b.adler>>>16),t(m,b.adler&65535)),b.adler=1));if(69===m.status)if(m.gzhead.extra){for(r=m.pending;m.gzindex<(m.gzhead.extra.length&65535)&&(m.pending!==m.pending_buf_size||(m.gzhead.hcrc&&m.pending>r&&(b.adler=X(b.adler,m.pending_buf,m.pending-r,r)),h(b),r=m.pending,m.pending!==m.pending_buf_size));)q(m,m.gzhead.extra[m.gzindex]&255),
m.gzindex++;m.gzhead.hcrc&&m.pending>r&&(b.adler=X(b.adler,m.pending_buf,m.pending-r,r));m.gzindex===m.gzhead.extra.length&&(m.gzindex=0,m.status=73)}else m.status=73;if(73===m.status)if(m.gzhead.name){r=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>r&&(b.adler=X(b.adler,m.pending_buf,m.pending-r,r)),h(b),r=m.pending,m.pending===m.pending_buf_size)){w=1;break}w=m.gzindex<m.gzhead.name.length?m.gzhead.name.charCodeAt(m.gzindex++)&255:0;q(m,w)}while(0!==w);m.gzhead.hcrc&&
m.pending>r&&(b.adler=X(b.adler,m.pending_buf,m.pending-r,r));0===w&&(m.gzindex=0,m.status=91)}else m.status=91;if(91===m.status)if(m.gzhead.comment){r=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>r&&(b.adler=X(b.adler,m.pending_buf,m.pending-r,r)),h(b),r=m.pending,m.pending===m.pending_buf_size)){w=1;break}w=m.gzindex<m.gzhead.comment.length?m.gzhead.comment.charCodeAt(m.gzindex++)&255:0;q(m,w)}while(0!==w);m.gzhead.hcrc&&m.pending>r&&(b.adler=X(b.adler,m.pending_buf,
m.pending-r,r));0===w&&(m.status=103)}else m.status=103;103===m.status&&(m.gzhead.hcrc?(m.pending+2>m.pending_buf_size&&h(b),m.pending+2<=m.pending_buf_size&&(q(m,b.adler&255),q(m,b.adler>>8&255),b.adler=0,m.status=113)):m.status=113);if(0!==m.pending){if(h(b),0===b.avail_out)return m.last_flush=-1,0}else if(0===b.avail_in&&(d<<1)-(4<d?9:0)<=(e<<1)-(4<e?9:0)&&4!==d)return f(b,-5);if(666===m.status&&0!==b.avail_in)return f(b,-5);if(0!==b.avail_in||0!==m.lookahead||0!==d&&666!==m.status){e=2===m.strategy?
P(m,d):3===m.strategy?E(m,d):x[m.level].func(m,d);if(3===e||4===e)m.status=666;if(1===e||3===e)return 0===b.avail_out&&(m.last_flush=-1),0;if(2===e&&(1===d?ba._tr_align(m):5!==d&&(ba._tr_stored_block(m,0,0,!1),3===d&&(k(m.head),0===m.lookahead&&(m.strstart=0,m.block_start=0,m.insert=0))),h(b),0===b.avail_out))return m.last_flush=-1,0}if(4!==d)return 0;if(0>=m.wrap)return 1;2===m.wrap?(q(m,b.adler&255),q(m,b.adler>>8&255),q(m,b.adler>>16&255),q(m,b.adler>>24&255),q(m,b.total_in&255),q(m,b.total_in>>
8&255),q(m,b.total_in>>16&255),q(m,b.total_in>>24&255)):(t(m,b.adler>>>16),t(m,b.adler&65535));h(b);0<m.wrap&&(m.wrap=-m.wrap);return 0!==m.pending?0:1};d.deflateEnd=function(b){var d;if(!b||!b.state)return-2;d=b.state.status;if(42!==d&&69!==d&&73!==d&&91!==d&&103!==d&&113!==d&&666!==d)return f(b,-2);b.state=null;return 113===d?f(b,-3):0};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":30,"./adler32":32,"./crc32":34,"./messages":40,"./trees":41}],36:[function(b,e,d){e.exports=
function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],37:[function(b,e,d){e.exports=function(b,d){var e,r,q,t,y,G,B,w,E,P,da,aa,M,ka,m,fa,ba,Z,X,U,x,n,z,Y;e=b.state;r=b.next_in;z=b.input;q=r+(b.avail_in-5);t=b.next_out;Y=b.output;y=t-(d-b.avail_out);G=t+(b.avail_out-257);B=e.dmax;w=e.wsize;E=e.whave;P=e.wnext;da=e.window;aa=e.hold;M=e.bits;ka=e.lencode;m=e.distcode;fa=(1<<e.lenbits)-1;ba=(1<<e.distbits)-1;a:do b:for(15>
M&&(aa+=z[r++]<<M,M+=8,aa+=z[r++]<<M,M+=8),Z=ka[aa&fa];;){X=Z>>>24;aa>>>=X;M-=X;X=Z>>>16&255;if(0===X)Y[t++]=Z&65535;else if(X&16){U=Z&65535;if(X&=15)M<X&&(aa+=z[r++]<<M,M+=8),U+=aa&(1<<X)-1,aa>>>=X,M-=X;15>M&&(aa+=z[r++]<<M,M+=8,aa+=z[r++]<<M,M+=8);Z=m[aa&ba];c:for(;;){X=Z>>>24;aa>>>=X;M-=X;X=Z>>>16&255;if(X&16){Z&=65535;X&=15;M<X&&(aa+=z[r++]<<M,M+=8,M<X&&(aa+=z[r++]<<M,M+=8));Z+=aa&(1<<X)-1;if(Z>B){b.msg="invalid distance too far back";e.mode=30;break a}aa>>>=X;M-=X;X=t-y;if(Z>X){X=Z-X;if(X>E&&
e.sane){b.msg="invalid distance too far back";e.mode=30;break a}x=0;n=da;if(0===P){if(x+=w-X,X<U){U-=X;do Y[t++]=da[x++];while(--X);x=t-Z;n=Y}}else if(P<X){if(x+=w+P-X,X-=P,X<U){U-=X;do Y[t++]=da[x++];while(--X);x=0;if(P<U){X=P;U-=X;do Y[t++]=da[x++];while(--X);x=t-Z;n=Y}}}else if(x+=P-X,X<U){U-=X;do Y[t++]=da[x++];while(--X);x=t-Z;n=Y}for(;2<U;)Y[t++]=n[x++],Y[t++]=n[x++],Y[t++]=n[x++],U-=3;U&&(Y[t++]=n[x++],1<U&&(Y[t++]=n[x++]))}else{x=t-Z;do Y[t++]=Y[x++],Y[t++]=Y[x++],Y[t++]=Y[x++],U-=3;while(2<
U);U&&(Y[t++]=Y[x++],1<U&&(Y[t++]=Y[x++]))}}else if(0===(X&64)){Z=m[(Z&65535)+(aa&(1<<X)-1)];continue c}else{b.msg="invalid distance code";e.mode=30;break a}break}}else if(0===(X&64)){Z=ka[(Z&65535)+(aa&(1<<X)-1)];continue b}else{X&32?e.mode=12:(b.msg="invalid literal/length code",e.mode=30);break a}break}while(r<q&&t<G);U=M>>3;r-=U;M-=U<<3;b.next_in=r;b.next_out=t;b.avail_in=r<q?5+(q-r):5-(r-q);b.avail_out=t<G?257+(G-t):257-(t-G);e.hold=aa&(1<<M)-1;e.bits=M}},{}],38:[function(b,e,d){function f(b){return(b>>>
24&255)+(b>>>8&65280)+((b&65280)<<8)+((b&255)<<24)}function k(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new y.Buf16(320);this.work=new y.Buf16(288);this.distdyn=this.lendyn=null;this.was=
this.back=this.sane=0}function h(b){var d;if(!b||!b.state)return-2;d=b.state;b.total_in=b.total_out=d.total=0;b.msg="";d.wrap&&(b.adler=d.wrap&1);d.mode=1;d.last=0;d.havedict=0;d.dmax=32768;d.head=null;d.hold=0;d.bits=0;d.lencode=d.lendyn=new y.Buf32(852);d.distcode=d.distdyn=new y.Buf32(592);d.sane=1;d.back=-1;return 0}function r(b){var d;if(!b||!b.state)return-2;d=b.state;d.wsize=0;d.whave=0;d.wnext=0;return h(b)}function q(b,d){var f,e;if(!b||!b.state)return-2;e=b.state;0>d?(f=0,d=-d):(f=(d>>4)+
1,48>d&&(d&=15));if(d&&(8>d||15<d))return-2;null!==e.window&&e.wbits!==d&&(e.window=null);e.wrap=f;e.wbits=d;return r(b)}function t(b,d){var f;if(!b)return-2;f=new k;b.state=f;f.window=null;f=q(b,d);0!==f&&(b.state=null);return f}var y=b("../utils/common"),G=b("./adler32"),B=b("./crc32"),w=b("./inffast"),E=b("./inftrees"),P=!0,da,aa;d.inflateReset=r;d.inflateReset2=q;d.inflateResetKeep=h;d.inflateInit=function(b){return t(b,15)};d.inflateInit2=t;d.inflate=function(b,d){var e,h,k,q,r,t,x,n,z,Y,D,A,
L,la,ja=0,Ia,va,O,wa=new y.Buf8(4),Ua=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||!b.output||!b.input&&0!==b.avail_in)return-2;e=b.state;12===e.mode&&(e.mode=13);r=b.next_out;k=b.output;x=b.avail_out;q=b.next_in;h=b.input;t=b.avail_in;n=e.hold;z=e.bits;Y=t;D=x;O=0;a:for(;;)switch(e.mode){case 1:if(0===e.wrap){e.mode=13;break}for(;16>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}if(e.wrap&2&&35615===n){e.check=0;wa[0]=n&255;wa[1]=n>>>8&255;e.check=B(e.check,wa,2,0);z=n=0;e.mode=
2;break}e.flags=0;e.head&&(e.head.done=!1);if(!(e.wrap&1)||(((n&255)<<8)+(n>>8))%31){b.msg="incorrect header check";e.mode=30;break}if(8!==(n&15)){b.msg="unknown compression method";e.mode=30;break}n>>>=4;z-=4;L=(n&15)+8;if(0===e.wbits)e.wbits=L;else if(L>e.wbits){b.msg="invalid window size";e.mode=30;break}e.dmax=1<<L;b.adler=e.check=1;e.mode=n&512?10:12;z=n=0;break;case 2:for(;16>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}e.flags=n;if(8!==(e.flags&255)){b.msg="unknown compression method";e.mode=
30;break}if(e.flags&57344){b.msg="unknown header flags set";e.mode=30;break}e.head&&(e.head.text=n>>8&1);e.flags&512&&(wa[0]=n&255,wa[1]=n>>>8&255,e.check=B(e.check,wa,2,0));z=n=0;e.mode=3;case 3:for(;32>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}e.head&&(e.head.time=n);e.flags&512&&(wa[0]=n&255,wa[1]=n>>>8&255,wa[2]=n>>>16&255,wa[3]=n>>>24&255,e.check=B(e.check,wa,4,0));z=n=0;e.mode=4;case 4:for(;16>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}e.head&&(e.head.xflags=n&255,e.head.os=n>>8);e.flags&512&&
(wa[0]=n&255,wa[1]=n>>>8&255,e.check=B(e.check,wa,2,0));z=n=0;e.mode=5;case 5:if(e.flags&1024){for(;16>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}e.length=n;e.head&&(e.head.extra_len=n);e.flags&512&&(wa[0]=n&255,wa[1]=n>>>8&255,e.check=B(e.check,wa,2,0));z=n=0}else e.head&&(e.head.extra=null);e.mode=6;case 6:if(e.flags&1024&&(A=e.length,A>t&&(A=t),A&&(e.head&&(L=e.head.extra_len-e.length,e.head.extra||(e.head.extra=Array(e.head.extra_len)),y.arraySet(e.head.extra,h,q,A,L)),e.flags&512&&(e.check=B(e.check,
h,A,q)),t-=A,q+=A,e.length-=A),e.length))break a;e.length=0;e.mode=7;case 7:if(e.flags&2048){if(0===t)break a;A=0;do L=h[q+A++],e.head&&L&&65536>e.length&&(e.head.name+=String.fromCharCode(L));while(L&&A<t);e.flags&512&&(e.check=B(e.check,h,A,q));t-=A;q+=A;if(L)break a}else e.head&&(e.head.name=null);e.length=0;e.mode=8;case 8:if(e.flags&4096){if(0===t)break a;A=0;do L=h[q+A++],e.head&&L&&65536>e.length&&(e.head.comment+=String.fromCharCode(L));while(L&&A<t);e.flags&512&&(e.check=B(e.check,h,A,q));
t-=A;q+=A;if(L)break a}else e.head&&(e.head.comment=null);e.mode=9;case 9:if(e.flags&512){for(;16>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}if(n!==(e.check&65535)){b.msg="header crc mismatch";e.mode=30;break}z=n=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0);b.adler=e.check=0;e.mode=12;break;case 10:for(;32>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}b.adler=e.check=f(n);z=n=0;e.mode=11;case 11:if(0===e.havedict)return b.next_out=r,b.avail_out=x,b.next_in=q,b.avail_in=t,e.hold=n,e.bits=z,2;b.adler=
e.check=1;e.mode=12;case 12:if(5===d||6===d)break a;case 13:if(e.last){n>>>=z&7;z-=z&7;e.mode=27;break}for(;3>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}e.last=n&1;n>>>=1;--z;switch(n&3){case 0:e.mode=14;break;case 1:A=e;if(P){L=void 0;da=new y.Buf32(512);aa=new y.Buf32(32);for(L=0;144>L;)A.lens[L++]=8;for(;256>L;)A.lens[L++]=9;for(;280>L;)A.lens[L++]=7;for(;288>L;)A.lens[L++]=8;E(1,A.lens,0,288,da,0,A.work,{bits:9});for(L=0;32>L;)A.lens[L++]=5;E(2,A.lens,0,32,aa,0,A.work,{bits:5});P=!1}A.lencode=
da;A.lenbits=9;A.distcode=aa;A.distbits=5;e.mode=20;if(6===d){n>>>=2;z-=2;break a}break;case 2:e.mode=17;break;case 3:b.msg="invalid block type",e.mode=30}n>>>=2;z-=2;break;case 14:n>>>=z&7;for(z-=z&7;32>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}if((n&65535)!==(n>>>16^65535)){b.msg="invalid stored block lengths";e.mode=30;break}e.length=n&65535;z=n=0;e.mode=15;if(6===d)break a;case 15:e.mode=16;case 16:if(A=e.length){A>t&&(A=t);A>x&&(A=x);if(0===A)break a;y.arraySet(k,h,q,A,r);t-=A;q+=A;x-=A;r+=
A;e.length-=A;break}e.mode=12;break;case 17:for(;14>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}e.nlen=(n&31)+257;n>>>=5;z-=5;e.ndist=(n&31)+1;n>>>=5;z-=5;e.ncode=(n&15)+4;n>>>=4;z-=4;if(286<e.nlen||30<e.ndist){b.msg="too many length or distance symbols";e.mode=30;break}e.have=0;e.mode=18;case 18:for(;e.have<e.ncode;){for(;3>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}e.lens[Ua[e.have++]]=n&7;n>>>=3;z-=3}for(;19>e.have;)e.lens[Ua[e.have++]]=0;e.lencode=e.lendyn;e.lenbits=7;A={bits:e.lenbits};O=E(0,
e.lens,0,19,e.lencode,0,e.work,A);e.lenbits=A.bits;if(O){b.msg="invalid code lengths set";e.mode=30;break}e.have=0;e.mode=19;case 19:for(;e.have<e.nlen+e.ndist;){for(;;){ja=e.lencode[n&(1<<e.lenbits)-1];A=ja>>>24;ja&=65535;if(A<=z)break;if(0===t)break a;t--;n+=h[q++]<<z;z+=8}if(16>ja)n>>>=A,z-=A,e.lens[e.have++]=ja;else{if(16===ja){for(L=A+2;z<L;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}n>>>=A;z-=A;if(0===e.have){b.msg="invalid bit length repeat";e.mode=30;break}L=e.lens[e.have-1];A=3+(n&3);n>>>=2;
z-=2}else if(17===ja){for(L=A+3;z<L;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}n>>>=A;z-=A;L=0;A=3+(n&7);n>>>=3;z-=3}else{for(L=A+7;z<L;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}n>>>=A;z-=A;L=0;A=11+(n&127);n>>>=7;z-=7}if(e.have+A>e.nlen+e.ndist){b.msg="invalid bit length repeat";e.mode=30;break}for(;A--;)e.lens[e.have++]=L}}if(30===e.mode)break;if(0===e.lens[256]){b.msg="invalid code -- missing end-of-block";e.mode=30;break}e.lenbits=9;A={bits:e.lenbits};O=E(1,e.lens,0,e.nlen,e.lencode,0,e.work,A);
e.lenbits=A.bits;if(O){b.msg="invalid literal/lengths set";e.mode=30;break}e.distbits=6;e.distcode=e.distdyn;A={bits:e.distbits};O=E(2,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,A);e.distbits=A.bits;if(O){b.msg="invalid distances set";e.mode=30;break}e.mode=20;if(6===d)break a;case 20:e.mode=21;case 21:if(6<=t&&258<=x){b.next_out=r;b.avail_out=x;b.next_in=q;b.avail_in=t;e.hold=n;e.bits=z;w(b,D);r=b.next_out;k=b.output;x=b.avail_out;q=b.next_in;h=b.input;t=b.avail_in;n=e.hold;z=e.bits;12===e.mode&&
(e.back=-1);break}for(e.back=0;;){ja=e.lencode[n&(1<<e.lenbits)-1];A=ja>>>24;L=ja>>>16&255;ja&=65535;if(A<=z)break;if(0===t)break a;t--;n+=h[q++]<<z;z+=8}if(L&&0===(L&240)){la=A;Ia=L;for(va=ja;;){ja=e.lencode[va+((n&(1<<la+Ia)-1)>>la)];A=ja>>>24;L=ja>>>16&255;ja&=65535;if(la+A<=z)break;if(0===t)break a;t--;n+=h[q++]<<z;z+=8}n>>>=la;z-=la;e.back+=la}n>>>=A;z-=A;e.back+=A;e.length=ja;if(0===L){e.mode=26;break}if(L&32){e.back=-1;e.mode=12;break}if(L&64){b.msg="invalid literal/length code";e.mode=30;
break}e.extra=L&15;e.mode=22;case 22:if(e.extra){for(L=e.extra;z<L;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}e.length+=n&(1<<e.extra)-1;n>>>=e.extra;z-=e.extra;e.back+=e.extra}e.was=e.length;e.mode=23;case 23:for(;;){ja=e.distcode[n&(1<<e.distbits)-1];A=ja>>>24;L=ja>>>16&255;ja&=65535;if(A<=z)break;if(0===t)break a;t--;n+=h[q++]<<z;z+=8}if(0===(L&240)){la=A;Ia=L;for(va=ja;;){ja=e.distcode[va+((n&(1<<la+Ia)-1)>>la)];A=ja>>>24;L=ja>>>16&255;ja&=65535;if(la+A<=z)break;if(0===t)break a;t--;n+=h[q++]<<
z;z+=8}n>>>=la;z-=la;e.back+=la}n>>>=A;z-=A;e.back+=A;if(L&64){b.msg="invalid distance code";e.mode=30;break}e.offset=ja;e.extra=L&15;e.mode=24;case 24:if(e.extra){for(L=e.extra;z<L;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}e.offset+=n&(1<<e.extra)-1;n>>>=e.extra;z-=e.extra;e.back+=e.extra}if(e.offset>e.dmax){b.msg="invalid distance too far back";e.mode=30;break}e.mode=25;case 25:if(0===x)break a;A=D-x;if(e.offset>A){A=e.offset-A;if(A>e.whave&&e.sane){b.msg="invalid distance too far back";e.mode=30;
break}A>e.wnext?(A-=e.wnext,L=e.wsize-A):L=e.wnext-A;A>e.length&&(A=e.length);la=e.window}else la=k,L=r-e.offset,A=e.length;A>x&&(A=x);x-=A;e.length-=A;do k[r++]=la[L++];while(--A);0===e.length&&(e.mode=21);break;case 26:if(0===x)break a;k[r++]=e.length;x--;e.mode=21;break;case 27:if(e.wrap){for(;32>z;){if(0===t)break a;t--;n|=h[q++]<<z;z+=8}D-=x;b.total_out+=D;e.total+=D;D&&(b.adler=e.check=e.flags?B(e.check,k,D,r-D):G(e.check,k,D,r-D));D=x;if((e.flags?n:f(n))!==e.check){b.msg="incorrect data check";
e.mode=30;break}z=n=0}e.mode=28;case 28:if(e.wrap&&e.flags){for(;32>z;){if(0===t)break a;t--;n+=h[q++]<<z;z+=8}if(n!==(e.total&4294967295)){b.msg="incorrect length check";e.mode=30;break}z=n=0}e.mode=29;case 29:O=1;break a;case 30:O=-3;break a;case 31:return-4;default:return-2}b.next_out=r;b.avail_out=x;b.next_in=q;b.avail_in=t;e.hold=n;e.bits=z;if(e.wsize||D!==b.avail_out&&30>e.mode&&(27>e.mode||4!==d))h=b.output,q=b.next_out,r=D-b.avail_out,x=b.state,null===x.window&&(x.wsize=1<<x.wbits,x.wnext=
0,x.whave=0,x.window=new y.Buf8(x.wsize)),r>=x.wsize?(y.arraySet(x.window,h,q-x.wsize,x.wsize,0),x.wnext=0,x.whave=x.wsize):(t=x.wsize-x.wnext,t>r&&(t=r),y.arraySet(x.window,h,q-r,t,x.wnext),(r-=t)?(y.arraySet(x.window,h,q-r,r,0),x.wnext=r,x.whave=x.wsize):(x.wnext+=t,x.wnext===x.wsize&&(x.wnext=0),x.whave<x.wsize&&(x.whave+=t)));Y-=b.avail_in;D-=b.avail_out;b.total_in+=Y;b.total_out+=D;e.total+=D;e.wrap&&D&&(b.adler=e.check=e.flags?B(e.check,k,D,b.next_out-D):G(e.check,k,D,b.next_out-D));b.data_type=
e.bits+(e.last?64:0)+(12===e.mode?128:0)+(20===e.mode||15===e.mode?256:0);(0===Y&&0===D||4===d)&&0===O&&(O=-5);return O};d.inflateEnd=function(b){if(!b||!b.state)return-2;var d=b.state;d.window&&(d.window=null);b.state=null;return 0};d.inflateGetHeader=function(b,d){var e;if(!b||!b.state)return-2;e=b.state;if(0===(e.wrap&2))return-2;e.head=d;d.done=!1;return 0};d.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":30,"./adler32":32,"./crc32":34,"./inffast":37,"./inftrees":39}],39:[function(b,
e,d){var f=b("../utils/common"),k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],r=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],q=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(b,d,e,B,w,E,P,da){for(var aa=da.bits,M=
0,ka=0,m=0,fa=0,ba=0,Z=0,X=0,U=0,x=0,n=0,z,Y,D=null,A=0,L,la=new f.Buf16(16),Z=new f.Buf16(16),ja=null,Ia=0,va,O,wa,M=0;15>=M;M++)la[M]=0;for(ka=0;ka<B;ka++)la[d[e+ka]]++;ba=aa;for(fa=15;1<=fa&&0===la[fa];fa--);ba>fa&&(ba=fa);if(0===fa)return w[E++]=20971520,w[E++]=20971520,da.bits=1,0;for(m=1;m<fa&&0===la[m];m++);ba<m&&(ba=m);for(M=U=1;15>=M;M++)if(U<<=1,U-=la[M],0>U)return-1;if(0<U&&(0===b||1!==fa))return-1;Z[1]=0;for(M=1;15>M;M++)Z[M+1]=Z[M]+la[M];for(ka=0;ka<B;ka++)0!==d[e+ka]&&(P[Z[d[e+ka]]++]=
ka);0===b?(D=ja=P,L=19):1===b?(D=k,A-=257,ja=h,Ia-=257,L=256):(D=r,ja=q,L=-1);ka=n=0;M=m;aa=E;Z=ba;X=0;Y=-1;x=1<<ba;B=x-1;if(1===b&&852<x||2===b&&592<x)return 1;for(var Ua=0;;){Ua++;va=M-X;P[ka]<L?(O=0,wa=P[ka]):P[ka]>L?(O=ja[Ia+P[ka]],wa=D[A+P[ka]]):(O=96,wa=0);U=1<<M-X;m=z=1<<Z;do z-=U,w[aa+(n>>X)+z]=va<<24|O<<16|wa|0;while(0!==z);for(U=1<<M-1;n&U;)U>>=1;0!==U?(n&=U-1,n+=U):n=0;ka++;if(0===--la[M]){if(M===fa)break;M=d[e+P[ka]]}if(M>ba&&(n&B)!==Y){0===X&&(X=ba);aa+=m;Z=M-X;for(U=1<<Z;Z+X<fa;){U-=
la[Z+X];if(0>=U)break;Z++;U<<=1}x+=1<<Z;if(1===b&&852<x||2===b&&592<x)return 1;Y=n&B;w[Y]=ba<<24|Z<<16|aa-E|0}}0!==n&&(w[aa+n]=M-X<<24|4194304);da.bits=ba;return 0}},{"../utils/common":30}],40:[function(b,e,d){e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],41:[function(b,e,d){function f(b){for(var d=b.length;0<=--d;)b[d]=0}function k(b,d,e,f,h){this.static_tree=
b;this.extra_bits=d;this.extra_base=e;this.elems=f;this.max_length=h;this.has_stree=b&&b.length}function h(b,d){this.dyn_tree=b;this.max_code=0;this.stat_desc=d}function r(b,d){b.pending_buf[b.pending++]=d&255;b.pending_buf[b.pending++]=d>>>8&255}function q(b,d,e){b.bi_valid>16-e?(b.bi_buf|=d<<b.bi_valid&65535,r(b,b.bi_buf),b.bi_buf=d>>16-b.bi_valid,b.bi_valid+=e-16):(b.bi_buf|=d<<b.bi_valid&65535,b.bi_valid+=e)}function t(b,d,e){q(b,e[2*d],e[2*d+1])}function y(b,d){var e=0;do e|=b&1,b>>>=1,e<<=1;
while(0<--d);return e>>>1}function G(b,d,e){var f=Array(16),h=0,k;for(k=1;15>=k;k++)f[k]=h=h+e[k-1]<<1;for(e=0;e<=d;e++)h=b[2*e+1],0!==h&&(b[2*e]=y(f[h]++,h))}function B(b){var d;for(d=0;286>d;d++)b.dyn_ltree[2*d]=0;for(d=0;30>d;d++)b.dyn_dtree[2*d]=0;for(d=0;19>d;d++)b.bl_tree[2*d]=0;b.dyn_ltree[512]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function w(b){8<b.bi_valid?r(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);b.bi_buf=0;b.bi_valid=0}function E(b,d,e,f){var h=2*d,k=
2*e;return b[h]<b[k]||b[h]===b[k]&&f[d]<=f[e]}function P(b,d,e){for(var f=b.heap[e],h=e<<1;h<=b.heap_len;){h<b.heap_len&&E(d,b.heap[h+1],b.heap[h],b.depth)&&h++;if(E(d,f,b.heap[h],b.depth))break;b.heap[e]=b.heap[h];e=h;h<<=1}b.heap[e]=f}function da(b,d,e){var f,h,k=0,m,n;if(0!==b.last_lit){do f=b.pending_buf[b.d_buf+2*k]<<8|b.pending_buf[b.d_buf+2*k+1],h=b.pending_buf[b.l_buf+k],k++,0===f?t(b,h,d):(m=D[h],t(b,m+256+1,d),n=Z[m],0!==n&&(h-=A[m],q(b,h,n)),f--,m=256>f?Y[f]:Y[256+(f>>>7)],t(b,m,e),n=X[m],
0!==n&&(f-=L[m],q(b,f,n)));while(k<b.last_lit)}t(b,256,d)}function aa(b,d){var e=d.dyn_tree,f=d.stat_desc.static_tree,h=d.stat_desc.has_stree,k=d.stat_desc.elems,m,n=-1,q;b.heap_len=0;b.heap_max=573;for(m=0;m<k;m++)0!==e[2*m]?(b.heap[++b.heap_len]=n=m,b.depth[m]=0):e[2*m+1]=0;for(;2>b.heap_len;)q=b.heap[++b.heap_len]=2>n?++n:0,e[2*q]=1,b.depth[q]=0,b.opt_len--,h&&(b.static_len-=f[2*q+1]);d.max_code=n;for(m=b.heap_len>>1;1<=m;m--)P(b,e,m);q=k;do m=b.heap[1],b.heap[1]=b.heap[b.heap_len--],P(b,e,1),
f=b.heap[1],b.heap[--b.heap_max]=m,b.heap[--b.heap_max]=f,e[2*q]=e[2*m]+e[2*f],b.depth[q]=(b.depth[m]>=b.depth[f]?b.depth[m]:b.depth[f])+1,e[2*m+1]=e[2*f+1]=q,b.heap[1]=q++,P(b,e,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];m=d.dyn_tree;q=d.max_code;for(var r=d.stat_desc.static_tree,t=d.stat_desc.has_stree,w=d.stat_desc.extra_bits,x=d.stat_desc.extra_base,y=d.stat_desc.max_length,z,A,B=0,k=0;15>=k;k++)b.bl_count[k]=0;m[2*b.heap[b.heap_max]+1]=0;for(f=b.heap_max+1;573>f;f++)h=b.heap[f],k=
m[2*m[2*h+1]+1]+1,k>y&&(k=y,B++),m[2*h+1]=k,h>q||(b.bl_count[k]++,z=0,h>=x&&(z=w[h-x]),A=m[2*h],b.opt_len+=A*(k+z),t&&(b.static_len+=A*(r[2*h+1]+z)));if(0!==B){do{for(k=y-1;0===b.bl_count[k];)k--;b.bl_count[k]--;b.bl_count[k+1]+=2;b.bl_count[y]--;B-=2}while(0<B);for(k=y;0!==k;k--)for(h=b.bl_count[k];0!==h;)r=b.heap[--f],r>q||(m[2*r+1]!==k&&(b.opt_len+=(k-m[2*r+1])*m[2*r],m[2*r+1]=k),h--)}G(e,n,b.bl_count)}function M(b,d,e){var f,h=-1,k,m=d[1],n=0,q=7,r=4;0===m&&(q=138,r=3);d[2*(e+1)+1]=65535;for(f=
0;f<=e;f++)k=m,m=d[2*(f+1)+1],++n<q&&k===m||(n<r?b.bl_tree[2*k]+=n:0!==k?(k!==h&&b.bl_tree[2*k]++,b.bl_tree[32]++):10>=n?b.bl_tree[34]++:b.bl_tree[36]++,n=0,h=k,0===m?(q=138,r=3):k===m?(q=6,r=3):(q=7,r=4))}function ka(b,d,e){var f,h=-1,k,m=d[1],n=0,r=7,w=4;0===m&&(r=138,w=3);for(f=0;f<=e;f++)if(k=m,m=d[2*(f+1)+1],!(++n<r&&k===m)){if(n<w){do t(b,k,b.bl_tree);while(0!==--n)}else 0!==k?(k!==h&&(t(b,k,b.bl_tree),n--),t(b,16,b.bl_tree),q(b,n-3,2)):10>=n?(t(b,17,b.bl_tree),q(b,n-3,3)):(t(b,18,b.bl_tree),
q(b,n-11,7));n=0;h=k;0===m?(r=138,w=3):k===m?(r=6,w=3):(r=7,w=4)}}function m(b){var d=4093624447,e;for(e=0;31>=e;e++,d>>>=1)if(d&1&&0!==b.dyn_ltree[2*e])return 0;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return 1;for(e=32;256>e;e++)if(0!==b.dyn_ltree[2*e])return 1;return 0}function fa(b,d,e,f){q(b,0+(f?1:0),3);w(b);r(b,e);r(b,~e);ba.arraySet(b.pending_buf,b.window,d,e,b.pending);b.pending+=e}var ba=b("../utils/common"),Z=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,
5,5,0],X=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],U=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],x=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],n=Array(576);f(n);var z=Array(60);f(z);var Y=Array(512);f(Y);var D=Array(256);f(D);var A=Array(29);f(A);var L=Array(30);f(L);var la,ja,Ia,va=!1;d._tr_init=function(b){if(!va){var d,e,f,m=Array(16);for(f=e=0;28>f;f++)for(A[f]=e,d=0;d<1<<Z[f];d++)D[e++]=f;D[e-1]=f;for(f=e=0;16>f;f++)for(L[f]=e,d=0;d<1<<X[f];d++)Y[e++]=f;for(e>>=7;30>
f;f++)for(L[f]=e<<7,d=0;d<1<<X[f]-7;d++)Y[256+e++]=f;for(d=0;15>=d;d++)m[d]=0;for(d=0;143>=d;)n[2*d+1]=8,d++,m[8]++;for(;255>=d;)n[2*d+1]=9,d++,m[9]++;for(;279>=d;)n[2*d+1]=7,d++,m[7]++;for(;287>=d;)n[2*d+1]=8,d++,m[8]++;G(n,287,m);for(d=0;30>d;d++)z[2*d+1]=5,z[2*d]=y(d,5);la=new k(n,Z,257,286,15);ja=new k(z,X,0,30,15);Ia=new k([],U,0,19,7);va=!0}b.l_desc=new h(b.dyn_ltree,la);b.d_desc=new h(b.dyn_dtree,ja);b.bl_desc=new h(b.bl_tree,Ia);b.bi_buf=0;b.bi_valid=0;B(b)};d._tr_stored_block=fa;d._tr_flush_block=
function(b,d,e,f){var h,k,r=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=m(b));aa(b,b.l_desc);aa(b,b.d_desc);M(b,b.dyn_ltree,b.l_desc.max_code);M(b,b.dyn_dtree,b.d_desc.max_code);aa(b,b.bl_desc);for(r=18;3<=r&&0===b.bl_tree[2*x[r]+1];r--);b.opt_len+=3*(r+1)+14;h=b.opt_len+3+7>>>3;k=b.static_len+3+7>>>3;k<=h&&(h=k)}else h=k=e+5;if(e+4<=h&&-1!==d)fa(b,d,e,f);else if(4===b.strategy||k===h)q(b,2+(f?1:0),3),da(b,n,z);else{q(b,4+(f?1:0),3);d=b.l_desc.max_code+1;e=b.d_desc.max_code+1;r+=1;q(b,
d-257,5);q(b,e-1,5);q(b,r-4,4);for(h=0;h<r;h++)q(b,b.bl_tree[2*x[h]+1],3);ka(b,b.dyn_ltree,d-1);ka(b,b.dyn_dtree,e-1);da(b,b.dyn_ltree,b.dyn_dtree)}B(b);f&&w(b)};d._tr_tally=function(b,d,e){b.pending_buf[b.d_buf+2*b.last_lit]=d>>>8&255;b.pending_buf[b.d_buf+2*b.last_lit+1]=d&255;b.pending_buf[b.l_buf+b.last_lit]=e&255;b.last_lit++;0===d?b.dyn_ltree[2*e]++:(b.matches++,d--,b.dyn_ltree[2*(D[e]+256+1)]++,b.dyn_dtree[2*(256>d?Y[d]:Y[256+(d>>>7)])]++);return b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){q(b,
2,3);t(b,256,n);16===b.bi_valid?(r(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf&255,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":30}],42:[function(b,e,d){e.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],43:[function(b,e,d){(function(e){(function(d){function h(b,e){if(!(this instanceof h))return new h(b,
e);for(var f=0,m=Z.length;f<m;f++)this[Z[f]]="";this.q=this.c="";this.bufferCheckPosition=d.MAX_BUFFER_LENGTH;this.opt=e||{};this.opt.lowercase=this.opt.lowercase||this.opt.lowercasetags;this.looseCase=this.opt.lowercase?"toLowerCase":"toUpperCase";this.tags=[];this.closed=this.closedRoot=this.sawRoot=!1;this.tag=this.error=null;this.strict=!!b;this.noscript=!(!b&&!this.opt.noscript);this.state=ha.BEGIN;this.ENTITIES=(this.strictEntities=this.opt.strictEntities)?Object.create(d.XML_ENTITIES):Object.create(d.ENTITIES);
this.attribList=[];this.opt.xmlns&&(this.ns=Object.create(va));if(this.trackPosition=!1!==this.opt.position)this.position=this.line=this.column=0;this.onready&&this.onready(void 0)}function r(b,d){if(!(this instanceof r))return new r(b,d);X.apply(this);this._parser=new h(b,d);this.readable=this.writable=!0;var e=this;this._parser.onend=function(){e.emit("end")};this._parser.onerror=function(b){e.emit("error",b);e._parser.error=null};this._decoder=null;x.forEach(function(b){Object.defineProperty(e,
"on"+b,{get:function(){return e._parser["on"+b]},set:function(d){if(!d)return e.removeAllListeners(b),e._parser["on"+b]=d;e.on(b,d)},enumerable:!0,configurable:!1})})}function q(b){return b.split("").reduce(function(b,d){b[d]=!0;return b},{})}function t(b,d){return"[object RegExp]"===Object.prototype.toString.call(b)?!!d.match(b):b[d]}function y(b,d,e){b.textNode&&G(b);b[d]&&b[d](e)}function G(b){b.textNode=B(b.opt,b.textNode);b.textNode&&b.ontext&&b.ontext(b.textNode);b.textNode=""}function B(b,
d){b.trim&&(d=d.trim());b.normalize&&(d=d.replace(/\s+/g," "));return d}function w(b,d){G(b);b.trackPosition&&(d+="\nLine: "+b.line+"\nColumn: "+b.column+"\nChar: "+b.c);d=Error(d);b.error=d;b.onerror&&b.onerror(d);return b}function E(b){b.sawRoot&&!b.closedRoot&&P(b,"Unclosed root tag");b.state!==ha.BEGIN&&b.state!==ha.BEGIN_WHITESPACE&&b.state!==ha.TEXT&&w(b,"Unexpected end");G(b);b.c="";b.closed=!0;b.onend&&b.onend(void 0);h.call(b,b.strict,b.opt);return b}function P(b,d){if("object"!==typeof b||
!(b instanceof h))throw Error("bad call to strictFail");b.strict&&w(b,d)}function da(b,d){var e=0>b.indexOf(":")?["",b]:b.split(":"),f=e[0],e=e[1];d&&"xmlns"===b&&(f="xmlns",e="");return{prefix:f,local:e}}function aa(b){b.strict||(b.attribName=b.attribName[b.looseCase]());if(-1===b.attribList.indexOf(b.attribName)&&!b.tag.attributes.hasOwnProperty(b.attribName))if(b.opt.xmlns){var d=da(b.attribName,!0),e=d.local;if("xmlns"===d.prefix)if("xml"===e&&b.attribValue!==ja)P(b,"xml: prefix must be bound to "+
ja+"\nActual: "+b.attribValue);else if("xmlns"===e&&b.attribValue!==Ia)P(b,"xmlns: prefix must be bound to "+Ia+"\nActual: "+b.attribValue);else{var d=b.tag,f=b.tags[b.tags.length-1]||b;d.ns===f.ns&&(d.ns=Object.create(f.ns));d.ns[e]=b.attribValue}b.attribList.push([b.attribName,b.attribValue])}else b.tag.attributes[b.attribName]=b.attribValue,y(b,"onattribute",{name:b.attribName,value:b.attribValue});b.attribName=b.attribValue=""}function M(b,d){if(b.opt.xmlns){var e=b.tag,f=da(b.tagName);e.prefix=
f.prefix;e.local=f.local;e.uri=e.ns[f.prefix]||"";e.prefix&&!e.uri&&(P(b,"Unbound namespace prefix: "+JSON.stringify(b.tagName)),e.uri=f.prefix);f=b.tags[b.tags.length-1]||b;e.ns&&f.ns!==e.ns&&Object.keys(e.ns).forEach(function(d){y(b,"onopennamespace",{prefix:d,uri:e.ns[d]})});for(var f=0,h=b.attribList.length;f<h;f++){var k=b.attribList[f],m=k[0],n=k[1],q=da(m,!0),k=q.prefix,r=""===k?"":e.ns[k]||"",n={name:m,value:n,prefix:k,local:q.local,uri:r};k&&"xmlns"!==k&&!r&&(P(b,"Unbound namespace prefix: "+
JSON.stringify(k)),n.uri=k);b.tag.attributes[m]=n;y(b,"onattribute",n)}b.attribList.length=0}b.tag.isSelfClosing=!!d;b.sawRoot=!0;b.tags.push(b.tag);y(b,"onopentag",b.tag);d||(b.noscript||"script"!==b.tagName.toLowerCase()?b.state=ha.TEXT:b.state=ha.SCRIPT,b.tag=null,b.tagName="");b.attribName=b.attribValue="";b.attribList.length=0}function ka(b){if(b.tagName){if(b.script){if("script"!==b.tagName){b.script+="</"+b.tagName+">";b.tagName="";b.state=ha.SCRIPT;return}y(b,"onscript",b.script);b.script=
""}var d=b.tags.length,e=b.tagName;b.strict||(e=e[b.looseCase]());for(var f=e;d--;)if(b.tags[d].name!==f)P(b,"Unexpected close tag");else break;if(0>d)P(b,"Unmatched closing tag: "+b.tagName),b.textNode+="</"+b.tagName+">";else{b.tagName=e;for(e=b.tags.length;e-- >d;){var h=b.tag=b.tags.pop();b.tagName=b.tag.name;y(b,"onclosetag",b.tagName);for(var k in h.ns);f=b.tags[b.tags.length-1]||b;b.opt.xmlns&&h.ns!==f.ns&&Object.keys(h.ns).forEach(function(d){y(b,"onclosenamespace",{prefix:d,uri:h.ns[d]})})}0===
d&&(b.closedRoot=!0);b.tagName=b.attribValue=b.attribName="";b.attribList.length=0}}else P(b,"Weird empty close tag."),b.textNode+="</>";b.state=ha.TEXT}function m(b){var d=b.entity,e=d.toLowerCase(),f,h="";if(b.ENTITIES[d])return b.ENTITIES[d];if(b.ENTITIES[e])return b.ENTITIES[e];d=e;"#"===d.charAt(0)&&("x"===d.charAt(1)?(d=d.slice(2),f=parseInt(d,16),h=f.toString(16)):(d=d.slice(1),f=parseInt(d,10),h=f.toString(10)));d=d.replace(/^0+/,"");return h.toLowerCase()!==d?(P(b,"Invalid character entity"),
"&"+b.entity+";"):String.fromCodePoint(f)}function fa(b,d){"<"===d?(b.state=ha.OPEN_WAKA,b.startTagPosition=b.position):t(n,d)||(P(b,"Non-whitespace before first tag."),b.textNode=d,b.state=ha.TEXT)}function ba(b,d){var e="";d<b.length&&(e=b.charAt(d));return e}d.parser=function(b,d){return new h(b,d)};d.SAXParser=h;d.SAXStream=r;d.createStream=function(b,d){return new r(b,d)};d.MAX_BUFFER_LENGTH=65536;var Z="comment sgmlDecl textNode tagName doctype procInstName procInstBody entity attribName attribValue cdata script".split(" ");
d.EVENTS="text processinginstruction sgmldeclaration doctype comment attribute opentag closetag opencdata cdata closecdata error end ready script opennamespace closenamespace".split(" ");Object.create||(Object.create=function(b){function d(){}d.prototype=b;return new d});Object.keys||(Object.keys=function(b){var d=[],e;for(e in b)b.hasOwnProperty(e)&&d.push(e);return d});h.prototype={end:function(){E(this)},write:function(b){if(this.error)throw this.error;if(this.closed)return w(this,"Cannot write after close. Assign an onready handler.");
if(null===b)return E(this);for(var e=0,f="";;){this.c=f=ba(b,e++);if(!f)break;this.trackPosition&&(this.position++,"\n"===f?(this.line++,this.column=0):this.column++);switch(this.state){case ha.BEGIN:this.state=ha.BEGIN_WHITESPACE;if("\ufeff"===f)continue;fa(this,f);continue;case ha.BEGIN_WHITESPACE:fa(this,f);continue;case ha.TEXT:if(this.sawRoot&&!this.closedRoot){for(var h=e-1;f&&"<"!==f&&"&"!==f;)(f=ba(b,e++))&&this.trackPosition&&(this.position++,"\n"===f?(this.line++,this.column=0):this.column++);
this.textNode+=b.substring(h,e-1)}"<"!==f||this.sawRoot&&this.closedRoot&&!this.strict?(t(n,f)||this.sawRoot&&!this.closedRoot||P(this,"Text data outside of root node."),"&"===f?this.state=ha.TEXT_ENTITY:this.textNode+=f):(this.state=ha.OPEN_WAKA,this.startTagPosition=this.position);continue;case ha.SCRIPT:"<"===f?this.state=ha.SCRIPT_ENDING:this.script+=f;continue;case ha.SCRIPT_ENDING:"/"===f?this.state=ha.CLOSE_TAG:(this.script+="<"+f,this.state=ha.SCRIPT);continue;case ha.OPEN_WAKA:"!"===f?(this.state=
ha.SGML_DECL,this.sgmlDecl=""):t(n,f)||(t(O,f)?(this.state=ha.OPEN_TAG,this.tagName=f):"/"===f?(this.state=ha.CLOSE_TAG,this.tagName=""):"?"===f?(this.state=ha.PROC_INST,this.procInstName=this.procInstBody=""):(P(this,"Unencoded <"),this.startTagPosition+1<this.position&&(f=Array(this.position-this.startTagPosition).join(" ")+f),this.textNode+="<"+f,this.state=ha.TEXT));continue;case ha.SGML_DECL:(this.sgmlDecl+f).toUpperCase()===L?(y(this,"onopencdata"),this.state=ha.CDATA,this.cdata=this.sgmlDecl=
""):"--"===this.sgmlDecl+f?(this.state=ha.COMMENT,this.sgmlDecl=this.comment=""):(this.sgmlDecl+f).toUpperCase()===la?(this.state=ha.DOCTYPE,(this.doctype||this.sawRoot)&&P(this,"Inappropriately located doctype declaration"),this.sgmlDecl=this.doctype=""):">"===f?(y(this,"onsgmldeclaration",this.sgmlDecl),this.sgmlDecl="",this.state=ha.TEXT):(t(D,f)&&(this.state=ha.SGML_DECL_QUOTED),this.sgmlDecl+=f);continue;case ha.SGML_DECL_QUOTED:f===this.q&&(this.state=ha.SGML_DECL,this.q="");this.sgmlDecl+=
f;continue;case ha.DOCTYPE:">"===f?(this.state=ha.TEXT,y(this,"ondoctype",this.doctype),this.doctype=!0):(this.doctype+=f,"["===f?this.state=ha.DOCTYPE_DTD:t(D,f)&&(this.state=ha.DOCTYPE_QUOTED,this.q=f));continue;case ha.DOCTYPE_QUOTED:this.doctype+=f;f===this.q&&(this.q="",this.state=ha.DOCTYPE);continue;case ha.DOCTYPE_DTD:this.doctype+=f;"]"===f?this.state=ha.DOCTYPE:t(D,f)&&(this.state=ha.DOCTYPE_DTD_QUOTED,this.q=f);continue;case ha.DOCTYPE_DTD_QUOTED:this.doctype+=f;f===this.q&&(this.state=
ha.DOCTYPE_DTD,this.q="");continue;case ha.COMMENT:"-"===f?this.state=ha.COMMENT_ENDING:this.comment+=f;continue;case ha.COMMENT_ENDING:"-"===f?(this.state=ha.COMMENT_ENDED,(this.comment=B(this.opt,this.comment))&&y(this,"oncomment",this.comment),this.comment=""):(this.comment+="-"+f,this.state=ha.COMMENT);continue;case ha.COMMENT_ENDED:">"!==f?(P(this,"Malformed comment"),this.comment+="--"+f,this.state=ha.COMMENT):this.state=ha.TEXT;continue;case ha.CDATA:"]"===f?this.state=ha.CDATA_ENDING:this.cdata+=
f;continue;case ha.CDATA_ENDING:"]"===f?this.state=ha.CDATA_ENDING_2:(this.cdata+="]"+f,this.state=ha.CDATA);continue;case ha.CDATA_ENDING_2:">"===f?(this.cdata&&y(this,"oncdata",this.cdata),y(this,"onclosecdata"),this.cdata="",this.state=ha.TEXT):"]"===f?this.cdata+="]":(this.cdata+="]]"+f,this.state=ha.CDATA);continue;case ha.PROC_INST:"?"===f?this.state=ha.PROC_INST_ENDING:t(n,f)?this.state=ha.PROC_INST_BODY:this.procInstName+=f;continue;case ha.PROC_INST_BODY:if(!this.procInstBody&&t(n,f))continue;
else"?"===f?this.state=ha.PROC_INST_ENDING:this.procInstBody+=f;continue;case ha.PROC_INST_ENDING:">"===f?(y(this,"onprocessinginstruction",{name:this.procInstName,body:this.procInstBody}),this.procInstName=this.procInstBody="",this.state=ha.TEXT):(this.procInstBody+="?"+f,this.state=ha.PROC_INST_BODY);continue;case ha.OPEN_TAG:if(t(wa,f))this.tagName+=f;else{this.strict||(this.tagName=this.tagName[this.looseCase]());var h=this.tags[this.tags.length-1]||this,q=this.tag={name:this.tagName,attributes:{}};
this.opt.xmlns&&(q.ns=h.ns);this.attribList.length=0;">"===f?M(this):"/"===f?this.state=ha.OPEN_TAG_SLASH:(t(n,f)||P(this,"Invalid character in tag name"),this.state=ha.ATTRIB)}continue;case ha.OPEN_TAG_SLASH:">"===f?(M(this,!0),ka(this)):(P(this,"Forward-slash in opening tag not followed by >"),this.state=ha.ATTRIB);continue;case ha.ATTRIB:if(t(n,f))continue;else">"===f?M(this):"/"===f?this.state=ha.OPEN_TAG_SLASH:t(O,f)?(this.attribName=f,this.attribValue="",this.state=ha.ATTRIB_NAME):P(this,"Invalid attribute name");
continue;case ha.ATTRIB_NAME:"="===f?this.state=ha.ATTRIB_VALUE:">"===f?(P(this,"Attribute without value"),this.attribValue=this.attribName,aa(this),M(this)):t(n,f)?this.state=ha.ATTRIB_NAME_SAW_WHITE:t(wa,f)?this.attribName+=f:P(this,"Invalid attribute name");continue;case ha.ATTRIB_NAME_SAW_WHITE:if("="===f)this.state=ha.ATTRIB_VALUE;else if(t(n,f))continue;else P(this,"Attribute without value"),this.attribValue=this.tag.attributes[this.attribName]="",y(this,"onattribute",{name:this.attribName,
value:""}),this.attribName="",">"===f?M(this):t(O,f)?(this.attribName=f,this.state=ha.ATTRIB_NAME):(P(this,"Invalid attribute name"),this.state=ha.ATTRIB);continue;case ha.ATTRIB_VALUE:if(t(n,f))continue;else t(D,f)?(this.q=f,this.state=ha.ATTRIB_VALUE_QUOTED):(P(this,"Unquoted attribute value"),this.state=ha.ATTRIB_VALUE_UNQUOTED,this.attribValue=f);continue;case ha.ATTRIB_VALUE_QUOTED:if(f!==this.q){"&"===f?this.state=ha.ATTRIB_VALUE_ENTITY_Q:this.attribValue+=f;continue}aa(this);this.q="";this.state=
ha.ATTRIB_VALUE_CLOSED;continue;case ha.ATTRIB_VALUE_CLOSED:t(n,f)?this.state=ha.ATTRIB:">"===f?M(this):"/"===f?this.state=ha.OPEN_TAG_SLASH:t(O,f)?(P(this,"No whitespace between attributes"),this.attribName=f,this.attribValue="",this.state=ha.ATTRIB_NAME):P(this,"Invalid attribute name");continue;case ha.ATTRIB_VALUE_UNQUOTED:if(!t(A,f)){"&"===f?this.state=ha.ATTRIB_VALUE_ENTITY_U:this.attribValue+=f;continue}aa(this);">"===f?M(this):this.state=ha.ATTRIB;continue;case ha.CLOSE_TAG:if(this.tagName)">"===
f?ka(this):t(wa,f)?this.tagName+=f:this.script?(this.script+="</"+this.tagName,this.tagName="",this.state=ha.SCRIPT):(t(n,f)||P(this,"Invalid tagname in closing tag"),this.state=ha.CLOSE_TAG_SAW_WHITE);else if(t(n,f))continue;else t(O,f)?this.tagName=f:this.script?(this.script+="</"+f,this.state=ha.SCRIPT):P(this,"Invalid tagname in closing tag.");continue;case ha.CLOSE_TAG_SAW_WHITE:if(t(n,f))continue;">"===f?ka(this):P(this,"Invalid characters in closing tag");continue;case ha.TEXT_ENTITY:case ha.ATTRIB_VALUE_ENTITY_Q:case ha.ATTRIB_VALUE_ENTITY_U:var r,
x;switch(this.state){case ha.TEXT_ENTITY:r=ha.TEXT;x="textNode";break;case ha.ATTRIB_VALUE_ENTITY_Q:r=ha.ATTRIB_VALUE_QUOTED;x="attribValue";break;case ha.ATTRIB_VALUE_ENTITY_U:r=ha.ATTRIB_VALUE_UNQUOTED,x="attribValue"}";"===f?(this[x]+=m(this),this.entity="",this.state=r):t(this.entity.length?lb:Ua,f)?this.entity+=f:(P(this,"Invalid character in entity name"),this[x]+="&"+this.entity+f,this.entity="",this.state=r);continue;default:throw Error(this,"Unknown state: "+this.state);}}if(this.position>=
this.bufferCheckPosition){b=Math.max(d.MAX_BUFFER_LENGTH,10);f=e=0;for(r=Z.length;f<r;f++){x=this[Z[f]].length;if(x>b)switch(Z[f]){case "textNode":G(this);break;case "cdata":y(this,"oncdata",this.cdata);this.cdata="";break;case "script":y(this,"onscript",this.script);this.script="";break;default:w(this,"Max buffer length exceeded: "+Z[f])}e=Math.max(e,x)}this.bufferCheckPosition=d.MAX_BUFFER_LENGTH-e+this.position}return this},resume:function(){this.error=null;return this},close:function(){return this.write(null)},
flush:function(){G(this);""!==this.cdata&&(y(this,"oncdata",this.cdata),this.cdata="");""!==this.script&&(y(this,"onscript",this.script),this.script="")}};var X;try{X=b("stream").Stream}catch(U){X=function(){}}var x=d.EVENTS.filter(function(b){return"error"!==b&&"end"!==b});r.prototype=Object.create(X.prototype,{constructor:{value:r}});r.prototype.write=function(d){"function"===typeof e&&"function"===typeof e.isBuffer&&e.isBuffer(d)&&(this._decoder||(this._decoder=new (b("string_decoder").StringDecoder)("utf8")),
d=this._decoder.write(d));this._parser.write(d.toString());this.emit("data",d);return!0};r.prototype.end=function(b){b&&b.length&&this.write(b);this._parser.end();return!0};r.prototype.on=function(b,d){var e=this;e._parser["on"+b]||-1===x.indexOf(b)||(e._parser["on"+b]=function(){var d=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);d.splice(0,0,b);e.emit.apply(e,d)});return X.prototype.on.call(e,b,d)};var n="\r\n\t ",z="0124356789",Y="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
D="'\"",A=n+">",L="[CDATA[",la="DOCTYPE",ja="http://www.w3.org/XML/1998/namespace",Ia="http://www.w3.org/2000/xmlns/",va={xml:ja,xmlns:Ia},n=q(n),z=q(z),Y=q(Y),O=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,wa=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/,
Ua=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,lb=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/,D=q(D),A=q(A),ha=0;d.STATE={BEGIN:ha++,BEGIN_WHITESPACE:ha++,TEXT:ha++,TEXT_ENTITY:ha++,OPEN_WAKA:ha++,SGML_DECL:ha++,SGML_DECL_QUOTED:ha++,DOCTYPE:ha++,
DOCTYPE_QUOTED:ha++,DOCTYPE_DTD:ha++,DOCTYPE_DTD_QUOTED:ha++,COMMENT_STARTING:ha++,COMMENT:ha++,COMMENT_ENDING:ha++,COMMENT_ENDED:ha++,CDATA:ha++,CDATA_ENDING:ha++,CDATA_ENDING_2:ha++,PROC_INST:ha++,PROC_INST_BODY:ha++,PROC_INST_ENDING:ha++,OPEN_TAG:ha++,OPEN_TAG_SLASH:ha++,ATTRIB:ha++,ATTRIB_NAME:ha++,ATTRIB_NAME_SAW_WHITE:ha++,ATTRIB_VALUE:ha++,ATTRIB_VALUE_QUOTED:ha++,ATTRIB_VALUE_CLOSED:ha++,ATTRIB_VALUE_UNQUOTED:ha++,ATTRIB_VALUE_ENTITY_Q:ha++,ATTRIB_VALUE_ENTITY_U:ha++,CLOSE_TAG:ha++,CLOSE_TAG_SAW_WHITE:ha++,
SCRIPT:ha++,SCRIPT_ENDING:ha++};d.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"};d.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,
atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,
cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,
mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,
larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,"int":8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,
rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830};Object.keys(d.ENTITIES).forEach(function(b){var e=d.ENTITIES[b],e="number"===typeof e?String.fromCharCode(e):e;d.ENTITIES[b]=e});for(var ab in d.STATE)d.STATE[d.STATE[ab]]=ab;ha=d.STATE;String.fromCodePoint||function(){var b=String.fromCharCode,d=Math.floor,e=function(){var e=[],f,h,k=-1,m=arguments.length;if(!m)return"";for(var n="";++k<m;){h=Number(arguments[k]);if(!isFinite(h)||0>h||1114111<
h||d(h)!==h)throw RangeError("Invalid code point: "+h);65535>=h?e.push(h):(h-=65536,f=(h>>10)+55296,h=h%1024+56320,e.push(f,h));if(k+1===m||16384<e.length)n+=b.apply(null,e),e.length=0}return n};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:e,configurable:!0,writable:!0}):String.fromCodePoint=e}()})("undefined"===typeof d?this.sax={}:d)}).call(this,b("buffer").Buffer)},{buffer:3,stream:25,string_decoder:26}],44:[function(b,e,d){var f=f||{};f.Transform=f.Transform||("undefined"!==
typeof b?b("./transform.js"):null);var k=k||("undefined"!==typeof b?b("../lib/base64-binary.js"):null),h=h||("undefined"!==typeof b?b("pako"):null);f.NIFTI_INTENT_GENMATRIX="NIFTI_INTENT_GENMATRIX";f.NIFTI_INTENT_LABEL="NIFTI_INTENT_LABEL";f.NIFTI_INTENT_NODE_INDEX="NIFTI_INTENT_NODE_INDEX";f.NIFTI_INTENT_POINTSET="NIFTI_INTENT_POINTSET";f.NIFTI_INTENT_RGB_VECTOR="NIFTI_INTENT_RGB_VECTOR";f.NIFTI_INTENT_RGBA_VECTOR="NIFTI_INTENT_RGBA_VECTOR";f.NIFTI_INTENT_SHAPE="NIFTI_INTENT_SHAPE";f.NIFTI_INTENT_TIME_SERIES=
"NIFTI_INTENT_TIME_SERIES";f.NIFTI_INTENT_TRIANGLE="NIFTI_INTENT_TRIANGLE";f.NIFTI_INTENT_NONE="NIFTI_INTENT_NONE";f.NIFTI_INTENT_VECTOR="NIFTI_INTENT_VECTOR";f.ATT_ARRAYINDEXINGORDER="ArrayIndexingOrder";f.ATT_DATATYPE="DataType";f.ATT_DIMENSIONALITY="Dimensionality";f.ATT_DIMN="Dim";f.ATT_ENCODING="Encoding";f.ATT_ENDIAN="Endian";f.ATT_EXTERNALFILENAME="ExternalFileName";f.ATT_EXTERNALFILEOFFSET="ExternalFileOffset";f.ATT_INTENT="Intent";f.ENCODING_ASCII="ASCII";f.ENCODING_BASE64BINARY="Base64Binary";
f.ENCODING_GZIPBASE64BINARY="GZipBase64Binary";f.ENCODING_EXTERNALFILEBINARY="ExternalFileBinary";f.TYPE_NIFTI_TYPE_UINT8="NIFTI_TYPE_UINT8";f.TYPE_NIFTI_TYPE_INT32="NIFTI_TYPE_INT32";f.TYPE_NIFTI_TYPE_FLOAT32="NIFTI_TYPE_FLOAT32";f.DataArray=f.DataArray||function(){this.attributes=null;this.metadata={};this.transforms=[];this.data=null;this.dataConverted=!1};f.DataArray.prototype.isPointSet=function(){return this.attributes[f.ATT_INTENT]===f.NIFTI_INTENT_POINTSET};f.DataArray.prototype.isTriangles=
function(){return this.attributes[f.ATT_INTENT]===f.NIFTI_INTENT_TRIANGLE};f.DataArray.prototype.isNormals=function(){return this.attributes[f.ATT_INTENT]===f.NIFTI_INTENT_VECTOR};f.DataArray.prototype.isColors=function(){return this.attributes[f.ATT_INTENT]===f.NIFTI_INTENT_RGB_VECTOR||this.attributes[f.ATT_INTENT]===f.NIFTI_INTENT_RGBA_VECTOR};f.DataArray.prototype.getDimensions=function(){return parseInt(this.attributes[f.ATT_DIMENSIONALITY])};f.DataArray.prototype.getNumElements=function(b){void 0===
b&&(b=0);return parseInt(this.attributes[f.ATT_DIMN+b])};f.DataArray.prototype.isScalar=function(){return 1==this.getDimensions()};f.DataArray.prototype.isTriple=function(){return 2==this.getDimensions()&&3==this.getNumElements(1)};f.DataArray.prototype.isQuad=function(){return 2==this.getDimensions()&&4==this.getNumElements(1)};f.DataArray.prototype.isAscii=function(){return f.ENCODING_ASCII===this.attributes[f.ATT_ENCODING]};f.DataArray.prototype.isBase64Binary=function(){return f.ENCODING_BASE64BINARY===
this.attributes[f.ATT_ENCODING]};f.DataArray.prototype.isGzipBase64Binary=function(){return f.ENCODING_GZIPBASE64BINARY===this.attributes[f.ATT_ENCODING]};f.DataArray.prototype.isBase64Encoded=function(){return this.isBase64Binary()||this.isGzipBase64Binary()};f.DataArray.prototype.isFloat32=function(){return f.TYPE_NIFTI_TYPE_FLOAT32===this.attributes[f.ATT_DATATYPE]};f.DataArray.prototype.isInt32=function(){return f.TYPE_NIFTI_TYPE_INT32===this.attributes[f.ATT_DATATYPE]};f.DataArray.prototype.isUnsignedInt8=
function(){return f.TYPE_NIFTI_TYPE_UINT8===this.attributes[f.ATT_DATATYPE]};f.DataArray.prototype.getData=function(){this.dataConverted||(this.dataConverted=!0,this.isAscii()?this.isUnsignedInt8()?f.DataArray.readUnsignedInt8ASCII(this):this.isInt32()?f.DataArray.readSignedInt32ASCII(this):f.DataArray.readFloat32ASCII(this):this.isBase64Binary()?this.isUnsignedInt8()?f.DataArray.readUnsignedInt8Base64(this):this.isInt32()?f.DataArray.readSignedInt32Base64(this):f.DataArray.readFloat32Base64(this):
this.isGzipBase64Binary()&&(this.isUnsignedInt8()?f.DataArray.readUnsignedInt8GZIPBase64(this):this.isInt32()?f.DataArray.readSignedInt32GZIPBase64(this):f.DataArray.readFloat32GZIPBase64(this)));return this.data};f.DataArray.prototype.getDataAsync=function(b,d){this.dataConverted||(this.dataConverted=!0,this.isAscii()?(this.isUnsignedInt8()?f.DataArray.readUnsignedInt8ASCII(this):this.isInt32()?f.DataArray.readSignedInt32ASCII(this):f.DataArray.readFloat32ASCII(this),d()):this.isBase64Binary()?(this.isUnsignedInt8()?
f.DataArray.readUnsignedInt8Base64(this):this.isInt32()?f.DataArray.readSignedInt32Base64(this):f.DataArray.readFloat32Base64(this),d()):this.isGzipBase64Binary()&&(this.isUnsignedInt8()?f.DataArray.readUnsignedInt8GZIPBase64Async(this,b,d):this.isInt32()?f.DataArray.readSignedInt32GZIPBase64Async(this,b,d):f.DataArray.readFloat32GZIPBase64Async(this,b,d)))};f.DataArray.readFloat32ASCII=function(b){b.data=new Float32Array(b.data.match(/[+-]?\d+(\.\d+)?/g).map(function(b){return parseFloat(b)}))};
f.DataArray.readSignedInt32ASCII=function(b){b.data=new Int32Array(b.data.match(/[+-]?\d+(\.\d+)?/g).map(function(b){return parseInt(b)}))};f.DataArray.readUnsignedInt8ASCII=function(b){b.data=new Uint8Array(b.data.match(/[+-]?\d+(\.\d+)?/g).map(function(b){return parseInt(b)}))};f.DataArray.readUnsignedInt8Base64=function(b){var d=k.decodeArrayBuffer(b.data);b.data=new Uint8Array(d,0,d.byteLength)};f.DataArray.readSignedInt32Base64=function(b){var d=k.decodeArrayBuffer(b.data);b.data=new Int32Array(d,
0,d.byteLength/4)};f.DataArray.readFloat32Base64=function(b){var d=k.decodeArrayBuffer(b.data);b.data=new Float32Array(d,0,d.byteLength/4)};f.DataArray.readUnsignedInt8GZIPBase64=function(b){var d=k.decodeArrayBuffer(b.data),d=h.inflate(d).buffer;b.data=new Uint8Array(d,0,d.byteLength)};f.DataArray.readUnsignedInt8GZIPBase64Async=function(b,d,e){var y=k.decodeArrayBuffer(b.data),G=new h.Inflate,B=function(){b.data=new Uint8Array(G.result.buffer,0,G.result.buffer.byteLength);e(b.data)};setTimeout(function(){f.DataArray.readNext(G,
y,0,d,B)},0)};f.DataArray.readSignedInt32GZIPBase64=function(b){var d=k.decodeArrayBuffer(b.data),d=h.inflate(d).buffer;b.data=new Int32Array(d,0,d.byteLength/4)};f.DataArray.readSignedInt32GZIPBase64Async=function(b,d,e){var y=k.decodeArrayBuffer(b.data),G=new h.Inflate,B=function(){b.data=new Int32Array(G.result.buffer,0,G.result.buffer.byteLength/4);e(b.data)};setTimeout(function(){f.DataArray.readNext(G,y,0,d,B)},0)};f.DataArray.readFloat32GZIPBase64=function(b){var d=k.decodeArrayBuffer(b.data),
d=h.inflate(d).buffer;b.data=new Float32Array(d,0,d.byteLength/4)};f.DataArray.readFloat32GZIPBase64Async=function(b,d,e){var y=k.decodeArrayBuffer(b.data),G=new h.Inflate,B=function(){b.data=new Float32Array(G.result.buffer,0,G.result.buffer.byteLength/4);e(b.data)};setTimeout(function(){f.DataArray.readNext(G,y,0,d,B)},0)};f.DataArray.readNext=function(b,d,e,h,k){var B=e+32768,w=B>=d.byteLength;b.push(d.slice(e,e+32768),w);w?k():(h(B/d.byteLength),setTimeout(function(){f.DataArray.readNext(b,d,
B,h,k)},0))};"undefined"!==typeof e&&e.exports&&(e.exports=f.DataArray)},{"../lib/base64-binary.js":1,"./transform.js":46,pako:27}],45:[function(b,e,d){var f=f||{};f.Utils=f.Utils||("undefined"!==typeof b?b("./utilities.js"):null);f.DataArray=f.DataArray||("undefined"!==typeof b?b("./dataArray.js"):null);f.Transform=f.Transform||("undefined"!==typeof b?b("./transform.js"):null);var k=k||("undefined"!==typeof b?b("sax"):null);f.TAG_TRANSFORM="CoordinateSystemTransformMatrix";f.TAG_DATA="Data";f.TAG_DATAARRAY=
"DataArray";f.TAG_DATASPACE="DataSpace";f.TAG_GIFTI="GIFTI";f.TAG_LABEL="Label";f.TAG_LABELTABLE="LabelTable";f.TAG_MATRIXDATA="MatrixData";f.TAG_METADATA="MetaData";f.TAG_MD="MD";f.TAG_NAME="Name";f.TAG_TRANSFORMEDSPACE="TransformedSpace";f.TAG_VALUE="Value";f.GIFTI=f.GIFTI||function(){this.attributes=null;this.metadata={};this.dataArrays=[]};f.GIFTI.prototype.getPointsDataArray=function(){var b;for(b=0;b<this.dataArrays.length;b+=1)if(this.dataArrays[b].isPointSet())return this.dataArrays[b];return null};
f.GIFTI.prototype.getTrianglesDataArray=function(){var b;for(b=0;b<this.dataArrays.length;b+=1)if(this.dataArrays[b].isTriangles())return this.dataArrays[b];return null};f.GIFTI.prototype.getNormalsDataArray=function(){var b;for(b=0;b<this.dataArrays.length;b+=1)if(this.dataArrays[b].isNormals())return this.dataArrays[b];return null};f.GIFTI.prototype.getColorsDataArray=function(){var b;for(b=0;b<this.dataArrays.length;b+=1)if(this.dataArrays[b].isColors())return this.dataArrays[b];return null};f.GIFTI.prototype.getNumPoints=
function(){var b;for(b=0;b<this.dataArrays.length;b+=1)if(this.dataArrays[b].isPointSet())return this.dataArrays[b].getNumElements();return 0};f.GIFTI.prototype.getNumTriangles=function(){var b;for(b=0;b<this.dataArrays.length;b+=1)if(this.dataArrays[b].isTriangles())return this.dataArrays[b].getNumElements();return 0};f.isThisFormat=function(b){return-1!==b.indexOf(".gii")};f.parse=function(b){var d=k.parser(!0),e=null,t=null,y=null,G=null,B=null,w=null,E="",P=!1,da=!1,aa=!1,M=!1,ka=!1,m=!1;d.onopentag=
function(b){b.name===f.TAG_GIFTI?(y=e=new f.GIFTI,e.attributes=b.attributes):b.name!==f.TAG_METADATA&&b.name!==f.TAG_MD&&(b.name===f.TAG_NAME?P=!0:b.name===f.TAG_VALUE?da=!0:b.name===f.TAG_DATAARRAY?(y=t=new f.DataArray,e.dataArrays.push(t),t.attributes=b.attributes):b.name===f.TAG_TRANSFORM?(w=new f.Transform,t.transforms.push(w)):b.name===f.TAG_DATASPACE?aa=!0:b.name===f.TAG_TRANSFORMEDSPACE?M=!0:b.name===f.TAG_MATRIXDATA?ka=!0:b.name===f.TAG_DATA&&(m=!0))};d.ontext=d.oncdata=function(b){P?E+=b:
da?E+=b:aa?E+=b:M?E+=b:ka?E+=b:m&&(E+=b)};d.onclosetag=function(b){b!==f.TAG_GIFTI&&b!==f.TAG_METADATA&&(b===f.TAG_MD?y&&(y.metadata[G]=B):b===f.TAG_NAME?(P=!1,G=E,E=""):b===f.TAG_VALUE?(da=!1,B=E,E=""):b!==f.TAG_DATAARRAY&&b!==f.TAG_TRANSFORM&&(b===f.TAG_DATASPACE?(aa=!1,w.dataSpace=E,E=""):b===f.TAG_TRANSFORMEDSPACE?(M=!1,w.transformedSpace=E,E=""):b===f.TAG_MATRIXDATA?(ka=!1,w.matrixData=E,E=""):b===f.TAG_DATA&&(m=!1,t.data=E,E="")))};d.onerror=function(b){console.log(b)};d.write(b).close();return e};
"undefined"!==typeof e&&e.exports&&(e.exports=f)},{"./dataArray.js":44,"./transform.js":46,"./utilities.js":47,sax:43}],46:[function(b,e,d){var f=f||{};f.Transform=f.Transform||function(){this.matrixData=this.transformedSpace=this.dataSpace=null};"undefined"!==typeof e&&e.exports&&(e.exports=f.Transform)},{}],47:[function(b,e,d){var f=f||{};f.Utils=f.Utils||{};f.Utils.crcTable=null;f.Utils.makeCRCTable=function(){for(var b,d=[],e=0;256>e;e++){b=e;for(var f=0;8>f;f++)b=b&1?3988292384^b>>>1:b>>>1;d[e]=
b}return d};f.Utils.crc32=function(b){for(var d=f.Utils.crcTable||(f.Utils.crcTable=f.Utils.makeCRCTable()),e=-1,q=0;q<b.byteLength;q++)e=e>>>8^d[(e^b.getUint8(q))&255];return(e^-1)>>>0};"undefined"!==typeof e&&e.exports&&(e.exports=f.Utils)},{}]},{},[45])(45)});glMatrixArrayType="undefined"!=typeof Float32Array?Float32Array:"undefined"!=typeof WebGLFloatArray?WebGLFloatArray:Array;
var vec3={create:function(a){var b=new glMatrixArrayType(3);a&&(b[0]=a[0],b[1]=a[1],b[2]=a[2]);return b},set:function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];return b},add:function(a,b,e){if(!e||a==e)return a[0]+=b[0],a[1]+=b[1],a[2]+=b[2],a;e[0]=a[0]+b[0];e[1]=a[1]+b[1];e[2]=a[2]+b[2];return e},subtract:function(a,b,e){if(!e||a==e)return a[0]-=b[0],a[1]-=b[1],a[2]-=b[2],a;e[0]=a[0]-b[0];e[1]=a[1]-b[1];e[2]=a[2]-b[2];return e},negate:function(a,b){b||(b=a);b[0]=-a[0];b[1]=-a[1];b[2]=-a[2];return b},scale:function(a,
b,e){if(!e||a==e)return a[0]*=b,a[1]*=b,a[2]*=b,a;e[0]=a[0]*b;e[1]=a[1]*b;e[2]=a[2]*b;return e},normalize:function(a,b){b||(b=a);var e=a[0],d=a[1],f=a[2],k=Math.sqrt(e*e+d*d+f*f);if(k){if(1==k)return b[0]=e,b[1]=d,b[2]=f,b}else return b[0]=0,b[1]=0,b[2]=0,b;k=1/k;b[0]=e*k;b[1]=d*k;b[2]=f*k;return b},cross:function(a,b,e){e||(e=a);var d=a[0],f=a[1];a=a[2];var k=b[0],h=b[1];b=b[2];e[0]=f*b-a*h;e[1]=a*k-d*b;e[2]=d*h-f*k;return e},length:function(a){var b=a[0],e=a[1];a=a[2];return Math.sqrt(b*b+e*e+a*
a)},dot:function(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]},direction:function(a,b,e){e||(e=a);var d=a[0]-b[0],f=a[1]-b[1];a=a[2]-b[2];b=Math.sqrt(d*d+f*f+a*a);if(!b)return e[0]=0,e[1]=0,e[2]=0,e;b=1/b;e[0]=d*b;e[1]=f*b;e[2]=a*b;return e},lerp:function(a,b,e,d){d||(d=a);d[0]=a[0]+e*(b[0]-a[0]);d[1]=a[1]+e*(b[1]-a[1]);d[2]=a[2]+e*(b[2]-a[2]);return d},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+"]"}},mat3={create:function(a){var b=new glMatrixArrayType(9);a&&(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=
a[3],b[4]=a[4],b[5]=a[5],b[6]=a[6],b[7]=a[7],b[8]=a[8],b[9]=a[9]);return b},set:function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];return b},identity:function(a){a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=1;a[5]=0;a[6]=0;a[7]=0;a[8]=1;return a},transpose:function(a,b){if(!b||a==b){var e=a[1],d=a[2],f=a[5];a[1]=a[3];a[2]=a[6];a[3]=e;a[5]=a[7];a[6]=d;a[7]=f;return a}b[0]=a[0];b[1]=a[3];b[2]=a[6];b[3]=a[1];b[4]=a[4];b[5]=a[7];b[6]=a[2];b[7]=a[5];b[8]=a[8];return b},
toMat4:function(a,b){b||(b=mat4.create());b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=0;b[4]=a[3];b[5]=a[4];b[6]=a[5];b[7]=0;b[8]=a[6];b[9]=a[7];b[10]=a[8];b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return b},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+", "+a[6]+", "+a[7]+", "+a[8]+"]"}},mat4={create:function(a){var b=new glMatrixArrayType(16);a&&(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3],b[4]=a[4],b[5]=a[5],b[6]=a[6],b[7]=a[7],b[8]=a[8],b[9]=a[9],b[10]=a[10],b[11]=a[11],b[12]=
a[12],b[13]=a[13],b[14]=a[14],b[15]=a[15]);return b},set:function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15];return b},identity:function(a){a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=1;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1;return a},transpose:function(a,b){if(!b||a==b){var e=a[1],d=a[2],f=a[3],k=a[6],h=a[7],r=a[11];a[1]=a[4];a[2]=
a[8];a[3]=a[12];a[4]=e;a[6]=a[9];a[7]=a[13];a[8]=d;a[9]=k;a[11]=a[14];a[12]=f;a[13]=h;a[14]=r;return a}b[0]=a[0];b[1]=a[4];b[2]=a[8];b[3]=a[12];b[4]=a[1];b[5]=a[5];b[6]=a[9];b[7]=a[13];b[8]=a[2];b[9]=a[6];b[10]=a[10];b[11]=a[14];b[12]=a[3];b[13]=a[7];b[14]=a[11];b[15]=a[15];return b},determinant:function(a){var b=a[0],e=a[1],d=a[2],f=a[3],k=a[4],h=a[5],r=a[6],q=a[7],t=a[8],y=a[9],G=a[10],B=a[11],w=a[12],E=a[13],P=a[14];a=a[15];return w*y*r*f-t*E*r*f-w*h*G*f+k*E*G*f+t*h*P*f-k*y*P*f-w*y*d*q+t*E*d*q+
w*e*G*q-b*E*G*q-t*e*P*q+b*y*P*q+w*h*d*B-k*E*d*B-w*e*r*B+b*E*r*B+k*e*P*B-b*h*P*B-t*h*d*a+k*y*d*a+t*e*r*a-b*y*r*a-k*e*G*a+b*h*G*a},inverse:function(a,b){b||(b=a);var e=a[0],d=a[1],f=a[2],k=a[3],h=a[4],r=a[5],q=a[6],t=a[7],y=a[8],G=a[9],B=a[10],w=a[11],E=a[12],P=a[13],da=a[14],aa=a[15],M=e*r-d*h,ka=e*q-f*h,m=e*t-k*h,fa=d*q-f*r,ba=d*t-k*r,Z=f*t-k*q,X=y*P-G*E,U=y*da-B*E,x=y*aa-w*E,n=G*da-B*P,z=G*aa-w*P,Y=B*aa-w*da,D=1/(M*Y-ka*z+m*n+fa*x-ba*U+Z*X);b[0]=(r*Y-q*z+t*n)*D;b[1]=(-d*Y+f*z-k*n)*D;b[2]=(P*Z-da*
ba+aa*fa)*D;b[3]=(-G*Z+B*ba-w*fa)*D;b[4]=(-h*Y+q*x-t*U)*D;b[5]=(e*Y-f*x+k*U)*D;b[6]=(-E*Z+da*m-aa*ka)*D;b[7]=(y*Z-B*m+w*ka)*D;b[8]=(h*z-r*x+t*X)*D;b[9]=(-e*z+d*x-k*X)*D;b[10]=(E*ba-P*m+aa*M)*D;b[11]=(-y*ba+G*m-w*M)*D;b[12]=(-h*n+r*U-q*X)*D;b[13]=(e*n-d*U+f*X)*D;b[14]=(-E*fa+P*ka-da*M)*D;b[15]=(y*fa-G*ka+B*M)*D;return b},toRotationMat:function(a,b){b||(b=mat4.create());b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=
0;b[13]=0;b[14]=0;b[15]=1;return b},toMat3:function(a,b){b||(b=mat3.create());b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[4];b[4]=a[5];b[5]=a[6];b[6]=a[8];b[7]=a[9];b[8]=a[10];return b},toInverseMat3:function(a,b){var e=a[0],d=a[1],f=a[2],k=a[4],h=a[5],r=a[6],q=a[8],t=a[9],y=a[10],G=y*h-r*t,B=-y*k+r*q,w=t*k-h*q,E=e*G+d*B+f*w;if(!E)return null;E=1/E;b||(b=mat3.create());b[0]=G*E;b[1]=(-y*d+f*t)*E;b[2]=(r*d-f*h)*E;b[3]=B*E;b[4]=(y*e-f*q)*E;b[5]=(-r*e+f*k)*E;b[6]=w*E;b[7]=(-t*e+d*q)*E;b[8]=(h*e-d*k)*E;return b},
multiply:function(a,b,e){e||(e=a);var d=a[0],f=a[1],k=a[2],h=a[3],r=a[4],q=a[5],t=a[6],y=a[7],G=a[8],B=a[9],w=a[10],E=a[11],P=a[12],da=a[13],aa=a[14];a=a[15];var M=b[0],ka=b[1],m=b[2],fa=b[3],ba=b[4],Z=b[5],X=b[6],U=b[7],x=b[8],n=b[9],z=b[10],Y=b[11],D=b[12],A=b[13],L=b[14];b=b[15];e[0]=M*d+ka*r+m*G+fa*P;e[1]=M*f+ka*q+m*B+fa*da;e[2]=M*k+ka*t+m*w+fa*aa;e[3]=M*h+ka*y+m*E+fa*a;e[4]=ba*d+Z*r+X*G+U*P;e[5]=ba*f+Z*q+X*B+U*da;e[6]=ba*k+Z*t+X*w+U*aa;e[7]=ba*h+Z*y+X*E+U*a;e[8]=x*d+n*r+z*G+Y*P;e[9]=x*f+n*q+
z*B+Y*da;e[10]=x*k+n*t+z*w+Y*aa;e[11]=x*h+n*y+z*E+Y*a;e[12]=D*d+A*r+L*G+b*P;e[13]=D*f+A*q+L*B+b*da;e[14]=D*k+A*t+L*w+b*aa;e[15]=D*h+A*y+L*E+b*a;return e},multiplyVec3:function(a,b,e){e||(e=b);var d=b[0],f=b[1];b=b[2];e[0]=a[0]*d+a[4]*f+a[8]*b+a[12];e[1]=a[1]*d+a[5]*f+a[9]*b+a[13];e[2]=a[2]*d+a[6]*f+a[10]*b+a[14];return e},multiplyVec4:function(a,b,e){e||(e=b);var d=b[0],f=b[1],k=b[2];b=b[3];e[0]=a[0]*d+a[4]*f+a[8]*k+a[12]*b;e[1]=a[1]*d+a[5]*f+a[9]*k+a[13]*b;e[2]=a[2]*d+a[6]*f+a[10]*k+a[14]*b;e[3]=
a[3]*d+a[7]*f+a[11]*k+a[15]*b;return e},translate:function(a,b,e){var d=b[0],f=b[1];b=b[2];if(!e||a==e)return a[12]=a[0]*d+a[4]*f+a[8]*b+a[12],a[13]=a[1]*d+a[5]*f+a[9]*b+a[13],a[14]=a[2]*d+a[6]*f+a[10]*b+a[14],a[15]=a[3]*d+a[7]*f+a[11]*b+a[15],a;var k=a[0],h=a[1],r=a[2],q=a[3],t=a[4],y=a[5],G=a[6],B=a[7],w=a[8],E=a[9],P=a[10],da=a[11];e[0]=k;e[1]=h;e[2]=r;e[3]=q;e[4]=t;e[5]=y;e[6]=G;e[7]=B;e[8]=w;e[9]=E;e[10]=P;e[11]=da;e[12]=k*d+t*f+w*b+a[12];e[13]=h*d+y*f+E*b+a[13];e[14]=r*d+G*f+P*b+a[14];e[15]=
q*d+B*f+da*b+a[15];return e},scale:function(a,b,e){var d=b[0],f=b[1];b=b[2];if(!e||a==e)return a[0]*=d,a[1]*=d,a[2]*=d,a[3]*=d,a[4]*=f,a[5]*=f,a[6]*=f,a[7]*=f,a[8]*=b,a[9]*=b,a[10]*=b,a[11]*=b,a;e[0]=a[0]*d;e[1]=a[1]*d;e[2]=a[2]*d;e[3]=a[3]*d;e[4]=a[4]*f;e[5]=a[5]*f;e[6]=a[6]*f;e[7]=a[7]*f;e[8]=a[8]*b;e[9]=a[9]*b;e[10]=a[10]*b;e[11]=a[11]*b;e[12]=a[12];e[13]=a[13];e[14]=a[14];e[15]=a[15];return e},rotate:function(a,b,e,d){var f=e[0],k=e[1];e=e[2];var h=Math.sqrt(f*f+k*k+e*e);if(!h)return null;1!=
h&&(h=1/h,f*=h,k*=h,e*=h);var r=Math.sin(b),q=Math.cos(b),t=1-q;b=a[0];var h=a[1],y=a[2],G=a[3],B=a[4],w=a[5],E=a[6],P=a[7],da=a[8],aa=a[9],M=a[10],ka=a[11],m=f*f*t+q,fa=k*f*t+e*r,ba=e*f*t-k*r,Z=f*k*t-e*r,X=k*k*t+q,U=e*k*t+f*r,x=f*e*t+k*r,f=k*e*t-f*r,k=e*e*t+q;d?a!=d&&(d[12]=a[12],d[13]=a[13],d[14]=a[14],d[15]=a[15]):d=a;d[0]=b*m+B*fa+da*ba;d[1]=h*m+w*fa+aa*ba;d[2]=y*m+E*fa+M*ba;d[3]=G*m+P*fa+ka*ba;d[4]=b*Z+B*X+da*U;d[5]=h*Z+w*X+aa*U;d[6]=y*Z+E*X+M*U;d[7]=G*Z+P*X+ka*U;d[8]=b*x+B*f+da*k;d[9]=h*x+w*
f+aa*k;d[10]=y*x+E*f+M*k;d[11]=G*x+P*f+ka*k;return d},rotateX:function(a,b,e){var d=Math.sin(b);b=Math.cos(b);var f=a[4],k=a[5],h=a[6],r=a[7],q=a[8],t=a[9],y=a[10],G=a[11];e?a!=e&&(e[0]=a[0],e[1]=a[1],e[2]=a[2],e[3]=a[3],e[12]=a[12],e[13]=a[13],e[14]=a[14],e[15]=a[15]):e=a;e[4]=f*b+q*d;e[5]=k*b+t*d;e[6]=h*b+y*d;e[7]=r*b+G*d;e[8]=f*-d+q*b;e[9]=k*-d+t*b;e[10]=h*-d+y*b;e[11]=r*-d+G*b;return e},rotateY:function(a,b,e){var d=Math.sin(b);b=Math.cos(b);var f=a[0],k=a[1],h=a[2],r=a[3],q=a[8],t=a[9],y=a[10],
G=a[11];e?a!=e&&(e[4]=a[4],e[5]=a[5],e[6]=a[6],e[7]=a[7],e[12]=a[12],e[13]=a[13],e[14]=a[14],e[15]=a[15]):e=a;e[0]=f*b+q*-d;e[1]=k*b+t*-d;e[2]=h*b+y*-d;e[3]=r*b+G*-d;e[8]=f*d+q*b;e[9]=k*d+t*b;e[10]=h*d+y*b;e[11]=r*d+G*b;return e},rotateZ:function(a,b,e){var d=Math.sin(b);b=Math.cos(b);var f=a[0],k=a[1],h=a[2],r=a[3],q=a[4],t=a[5],y=a[6],G=a[7];e?a!=e&&(e[8]=a[8],e[9]=a[9],e[10]=a[10],e[11]=a[11],e[12]=a[12],e[13]=a[13],e[14]=a[14],e[15]=a[15]):e=a;e[0]=f*b+q*d;e[1]=k*b+t*d;e[2]=h*b+y*d;e[3]=r*b+G*
d;e[4]=f*-d+q*b;e[5]=k*-d+t*b;e[6]=h*-d+y*b;e[7]=r*-d+G*b;return e},frustum:function(a,b,e,d,f,k,h){h||(h=mat4.create());var r=b-a,q=d-e,t=k-f;h[0]=2*f/r;h[1]=0;h[2]=0;h[3]=0;h[4]=0;h[5]=2*f/q;h[6]=0;h[7]=0;h[8]=(b+a)/r;h[9]=(d+e)/q;h[10]=-(k+f)/t;h[11]=-1;h[12]=0;h[13]=0;h[14]=-(k*f*2)/t;h[15]=0;return h},perspective:function(a,b,e,d,f){a=e*Math.tan(a*Math.PI/360);b*=a;return mat4.frustum(-b,b,-a,a,e,d,f)},ortho:function(a,b,e,d,f,k,h){h||(h=mat4.create());var r=b-a,q=d-e,t=k-f;h[0]=2/r;h[1]=0;h[2]=
0;h[3]=0;h[4]=0;h[5]=2/q;h[6]=0;h[7]=0;h[8]=0;h[9]=0;h[10]=-2/t;h[11]=0;h[12]=-(a+b)/r;h[13]=-(d+e)/q;h[14]=-(k+f)/t;h[15]=1;return h},lookAt:function(a,b,e,d){d||(d=mat4.create());var f=a[0],k=a[1];a=a[2];var h=e[0],r=e[1],q=e[2];e=b[1];var t=b[2];if(f==b[0]&&k==e&&a==t)return mat4.identity(d);var y,G,B,w;e=f-b[0];t=k-b[1];b=a-b[2];w=1/Math.sqrt(e*e+t*t+b*b);e*=w;t*=w;b*=w;y=r*b-q*t;q=q*e-h*b;h=h*t-r*e;(w=Math.sqrt(y*y+q*q+h*h))?(w=1/w,y*=w,q*=w,h*=w):h=q=y=0;r=t*h-b*q;G=b*y-e*h;B=e*q-t*y;(w=Math.sqrt(r*
r+G*G+B*B))?(w=1/w,r*=w,G*=w,B*=w):B=G=r=0;d[0]=y;d[1]=r;d[2]=e;d[3]=0;d[4]=q;d[5]=G;d[6]=t;d[7]=0;d[8]=h;d[9]=B;d[10]=b;d[11]=0;d[12]=-(y*f+q*k+h*a);d[13]=-(r*f+G*k+B*a);d[14]=-(e*f+t*k+b*a);d[15]=1;return d},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+", "+a[6]+", "+a[7]+", "+a[8]+", "+a[9]+", "+a[10]+", "+a[11]+", "+a[12]+", "+a[13]+", "+a[14]+", "+a[15]+"]"}};
quat4={create:function(a){var b=new glMatrixArrayType(4);a&&(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3]);return b},set:function(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];return b},calculateW:function(a,b){var e=a[0],d=a[1],f=a[2];if(!b||a==b)return a[3]=-Math.sqrt(Math.abs(1-e*e-d*d-f*f)),a;b[0]=e;b[1]=d;b[2]=f;b[3]=-Math.sqrt(Math.abs(1-e*e-d*d-f*f));return b},inverse:function(a,b){if(!b||a==b)return a[0]*=1,a[1]*=1,a[2]*=1,a;b[0]=-a[0];b[1]=-a[1];b[2]=-a[2];b[3]=a[3];return b},length:function(a){var b=
a[0],e=a[1],d=a[2];a=a[3];return Math.sqrt(b*b+e*e+d*d+a*a)},normalize:function(a,b){b||(b=a);var e=a[0],d=a[1],f=a[2],k=a[3],h=Math.sqrt(e*e+d*d+f*f+k*k);if(0==h)return b[0]=0,b[1]=0,b[2]=0,b[3]=0,b;h=1/h;b[0]=e*h;b[1]=d*h;b[2]=f*h;b[3]=k*h;return b},multiply:function(a,b,e){e||(e=a);var d=a[0],f=a[1],k=a[2];a=a[3];var h=b[0],r=b[1],q=b[2];b=b[3];e[0]=d*b+a*h+f*q-k*r;e[1]=f*b+a*r+k*h-d*q;e[2]=k*b+a*q+d*r-f*h;e[3]=a*b-d*h-f*r-k*q;return e},multiplyVec3:function(a,b,e){e||(e=b);var d=b[0],f=b[1],k=
b[2];b=a[0];var h=a[1],r=a[2];a=a[3];var q=a*d+h*k-r*f,t=a*f+r*d-b*k,y=a*k+b*f-h*d,d=-b*d-h*f-r*k;e[0]=q*a+d*-b+t*-r-y*-h;e[1]=t*a+d*-h+y*-b-q*-r;e[2]=y*a+d*-r+q*-h-t*-b;return e},toMat3:function(a,b){b||(b=mat3.create());var e=a[0],d=a[1],f=a[2],k=a[3],h=e+e,r=d+d,q=f+f,t=e*h,y=e*r,e=e*q,G=d*r,d=d*q,f=f*q,h=k*h,r=k*r,k=k*q;b[0]=1-(G+f);b[1]=y-k;b[2]=e+r;b[3]=y+k;b[4]=1-(t+f);b[5]=d-h;b[6]=e-r;b[7]=d+h;b[8]=1-(t+G);return b},toMat4:function(a,b){b||(b=mat4.create());var e=a[0],d=a[1],f=a[2],k=a[3],
h=e+e,r=d+d,q=f+f,t=e*h,y=e*r,e=e*q,G=d*r,d=d*q,f=f*q,h=k*h,r=k*r,k=k*q;b[0]=1-(G+f);b[1]=y-k;b[2]=e+r;b[3]=0;b[4]=y+k;b[5]=1-(t+f);b[6]=d-h;b[7]=0;b[8]=e-r;b[9]=d+h;b[10]=1-(t+G);b[11]=0;b[12]=0;b[13]=0;b[14]=0;b[15]=1;return b},slerp:function(a,b,e,d){d||(d=a);var f=e;0>a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]&&(f=-1*e);d[0]=1-e*a[0]+f*b[0];d[1]=1-e*a[1]+f*b[1];d[2]=1-e*a[2]+f*b[2];d[3]=1-e*a[3]+f*b[3];return d},str:function(a){return"["+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+"]"}};var GLU={};
(function(a){a.unProject=function(b,e,d,f,k,h,r){b=[b,e,d,1];e=[];a.multMatrices(f,k,e);if(!a.invertMatrix(e,e))return!1;b[0]=(b[0]-h[0])/h[2];b[1]=(b[1]-h[1])/h[3];b[0]=2*b[0]-1;b[1]=2*b[1]-1;b[2]=2*b[2]-1;f=[];a.multMatrixVec(e,b,f);if(0===f[3])return!1;f[0]/=f[3];f[1]/=f[3];f[2]/=f[3];r[0]=f[0];r[1]=f[1];r[2]=f[2];return!0};a.multMatrixVec=function(a,e,d){for(var f=0;4>f;f+=1)d[f]=e[0]*a[0+f]+e[1]*a[4+f]+e[2]*a[8+f]+e[3]*a[12+f]};a.multMatrices=function(a,e,d){for(var f=0;4>f;f+=1)for(var k=0;4>
k;k+=1)d[4*f+k]=a[4*f+0]*e[0+k]+a[4*f+1]*e[4+k]+a[4*f+2]*e[8+k]+a[4*f+3]*e[12+k]};a.invertMatrix=function(a,e){var d=[];d[0]=a[5]*a[10]*a[15]-a[5]*a[11]*a[14]-a[9]*a[6]*a[15]+a[9]*a[7]*a[14]+a[13]*a[6]*a[11]-a[13]*a[7]*a[10];d[4]=-a[4]*a[10]*a[15]+a[4]*a[11]*a[14]+a[8]*a[6]*a[15]-a[8]*a[7]*a[14]-a[12]*a[6]*a[11]+a[12]*a[7]*a[10];d[8]=a[4]*a[9]*a[15]-a[4]*a[11]*a[13]-a[8]*a[5]*a[15]+a[8]*a[7]*a[13]+a[12]*a[5]*a[11]-a[12]*a[7]*a[9];d[12]=-a[4]*a[9]*a[14]+a[4]*a[10]*a[13]+a[8]*a[5]*a[14]-a[8]*a[6]*a[13]-
a[12]*a[5]*a[10]+a[12]*a[6]*a[9];d[1]=-a[1]*a[10]*a[15]+a[1]*a[11]*a[14]+a[9]*a[2]*a[15]-a[9]*a[3]*a[14]-a[13]*a[2]*a[11]+a[13]*a[3]*a[10];d[5]=a[0]*a[10]*a[15]-a[0]*a[11]*a[14]-a[8]*a[2]*a[15]+a[8]*a[3]*a[14]+a[12]*a[2]*a[11]-a[12]*a[3]*a[10];d[9]=-a[0]*a[9]*a[15]+a[0]*a[11]*a[13]+a[8]*a[1]*a[15]-a[8]*a[3]*a[13]-a[12]*a[1]*a[11]+a[12]*a[3]*a[9];d[13]=a[0]*a[9]*a[14]-a[0]*a[10]*a[13]-a[8]*a[1]*a[14]+a[8]*a[2]*a[13]+a[12]*a[1]*a[10]-a[12]*a[2]*a[9];d[2]=a[1]*a[6]*a[15]-a[1]*a[7]*a[14]-a[5]*a[2]*a[15]+
a[5]*a[3]*a[14]+a[13]*a[2]*a[7]-a[13]*a[3]*a[6];d[6]=-a[0]*a[6]*a[15]+a[0]*a[7]*a[14]+a[4]*a[2]*a[15]-a[4]*a[3]*a[14]-a[12]*a[2]*a[7]+a[12]*a[3]*a[6];d[10]=a[0]*a[5]*a[15]-a[0]*a[7]*a[13]-a[4]*a[1]*a[15]+a[4]*a[3]*a[13]+a[12]*a[1]*a[7]-a[12]*a[3]*a[5];d[14]=-a[0]*a[5]*a[14]+a[0]*a[6]*a[13]+a[4]*a[1]*a[14]-a[4]*a[2]*a[13]-a[12]*a[1]*a[6]+a[12]*a[2]*a[5];d[3]=-a[1]*a[6]*a[11]+a[1]*a[7]*a[10]+a[5]*a[2]*a[11]-a[5]*a[3]*a[10]-a[9]*a[2]*a[7]+a[9]*a[3]*a[6];d[7]=a[0]*a[6]*a[11]-a[0]*a[7]*a[10]-a[4]*a[2]*
a[11]+a[4]*a[3]*a[10]+a[8]*a[2]*a[7]-a[8]*a[3]*a[6];d[11]=-a[0]*a[5]*a[11]+a[0]*a[7]*a[9]+a[4]*a[1]*a[11]-a[4]*a[3]*a[9]-a[8]*a[1]*a[7]+a[8]*a[3]*a[5];d[15]=a[0]*a[5]*a[10]-a[0]*a[6]*a[9]-a[4]*a[1]*a[10]+a[4]*a[2]*a[9]+a[8]*a[1]*a[6]-a[8]*a[2]*a[5];var f=a[0]*d[0]+a[1]*d[4]+a[2]*d[8]+a[3]*d[12];if(0===f)return!1;for(var f=1/f,k=0;16>k;k+=1)e[k]=d[k]*f;return!0}})(GLU);
var PAPAYA_BROWSER_MIN_FIREFOX=7,PAPAYA_BROWSER_MIN_CHROME=7,PAPAYA_BROWSER_MIN_SAFARI=6,PAPAYA_BROWSER_MIN_IE=10,PAPAYA_BROWSER_MIN_OPERA=12,PAPAYA_SURFACE_BROWSER_MIN_FIREFOX=7,PAPAYA_SURFACE_BROWSER_MIN_CHROME=8,PAPAYA_SURFACE_BROWSER_MIN_SAFARI=6,PAPAYA_SURFACE_BROWSER_MIN_IE=11,PAPAYA_SURFACE_BROWSER_MIN_OPERA=12,PAPAYA_CONTAINER_CLASS_NAME="papaya",PAPAYA_CONTAINER_COLLAPSABLE="papaya-collapsable",PAPAYA_CONTAINER_COLLAPSABLE_EXEMPT="papaya-collapsable-exempt",PAPAYA_CONTAINER_FULLSCREEN="papaya-fullscreen",
PAPAYA_VIEWER_CSS="papaya-viewer",PAPAYA_TOOLBAR_CSS="papaya-toolbar",PAPAYA_TITLEBAR_CSS="papaya-titlebar",PAPAYA_SLIDER_CSS="papaya-slider-slice",PAPAYA_KIOSK_CONTROLS_CSS="papaya-kiosk-controls",PAPAYA_DISPLAY_CSS="papaya-display",PAPAYA_DIALOG_CSS="papaya-dialog",PAPAYA_DIALOG_CONTENT_CSS="papaya-dialog-content",PAPAYA_DIALOG_CONTENT_NOWRAP_CSS="papaya-dialog-content-nowrap",PAPAYA_DIALOG_CONTENT_LABEL_CSS="papaya-dialog-content-label",PAPAYA_DIALOG_CONTENT_CONTROL_CSS="papaya-dialog-content-control",
PAPAYA_DIALOG_TITLE_CSS="papaya-dialog-title",PAPAYA_DIALOG_BUTTON_CSS="papaya-dialog-button",PAPAYA_DIALOG_BACKGROUND="papaya-dialog-background",PAPAYA_DIALOG_STOPSCROLL="papaya-dialog-stopscroll",PAPAYA_DIALOG_CONTENT_HELP="papaya-dialog-content-help",PAPAYA_MENU_CSS="papaya-menu",PAPAYA_MENU_LABEL_CSS="papaya-menu-label",PAPAYA_MENU_TITLEBAR_CSS="papaya-menu-titlebar",PAPAYA_MENU_ICON_CSS="papaya-menu-icon",PAPAYA_MENU_HOVERING_CSS="papaya-menu-hovering",PAPAYA_MENU_SPACER_CSS="papaya-menu-spacer",
PAPAYA_MENU_UNSELECTABLE="papaya-menu-unselectable",PAPAYA_MENU_FILECHOOSER="papaya-menu-filechooser",PAPAYA_MENU_BUTTON_CSS="papaya-menu-button",PAPAYA_MENU_BUTTON_HOVERING_CSS="papaya-menu-button-hovering",PAPAYA_MENU_COLORTABLE_CSS="papaya-menu-colortable",PAPAYA_MENU_INPUT_FIELD="papaya-menu-input",PAPAYA_MENU_SLIDER="papaya-menu-slider",PAPAYA_CONTROL_INCREMENT_BUTTON_CSS="papaya-control-increment",PAPAYA_CONTROL_GOTO_CENTER_BUTTON_CSS="papaya-control-goto-center",PAPAYA_CONTROL_GOTO_ORIGIN_BUTTON_CSS=
"papaya-control-goto-origin",PAPAYA_CONTROL_SWAP_BUTTON_CSS="papaya-control-swap",PAPAYA_CONTROL_DIRECTION_SLIDER="papaya-direction-slider",PAPAYA_CONTROL_MAIN_SLIDER="papaya-main-slider",PAPAYA_CONTROL_MAIN_INCREMENT_BUTTON_CSS="papaya-main-increment",PAPAYA_CONTROL_MAIN_DECREMENT_BUTTON_CSS="papaya-main-decrement",PAPAYA_CONTROL_MAIN_SWAP_BUTTON_CSS="papaya-main-swap",PAPAYA_CONTROL_MAIN_GOTO_CENTER_BUTTON_CSS="papaya-main-goto-center",PAPAYA_CONTROL_MAIN_GOTO_ORIGIN_BUTTON_CSS="papaya-main-goto-origin",
PAPAYA_CONTROL_BAR_LABELS_CSS="papaya-controlbar-label",PAPAYA_UTILS_CHECKFORJS_CSS="checkForJS",PAPAYA_UTILS_UNSUPPORTED_CSS="papaya-utils-unsupported",PAPAYA_UTILS_UNSUPPORTED_MESSAGE_CSS="papaya-utils-unsupported-message",PAPAYA_DEFAULT_VIEWER_ID="papayaViewer",PAPAYA_DEFAULT_DISPLAY_ID="papayaDisplay",PAPAYA_DEFAULT_TOOLBAR_ID="papayaToolbar",PAPAYA_DEFAULT_CONTAINER_ID="papayaContainer",PAPAYA_DEFAULT_SLIDER_ID="papayaSliceSlider",PAPAYA_SPACING=3,PAPAYA_PADDING=8,PAPAYA_CONTAINER_PADDING=20,
PAPAYA_CONTAINER_PADDING_TOP=PAPAYA_CONTAINER_PADDING,PAPAYA_MANGO_INSTALLED="mangoinstalled",PAPAYA_CUSTOM_PROTOCOL="mango",GUNZIP_MAGIC_COOKIE1=31,GUNZIP_MAGIC_COOKIE2=139;"use strict";var papaya=papaya||{};papaya.utilities=papaya.utilities||{};papaya.utilities.ArrayUtils=papaya.utilities.ArrayUtils||{};
papaya.utilities.ArrayUtils.createArray=function(a){var b=Array(a||0),e;if(1<arguments.length){var d=Array.prototype.slice.call(arguments,1);for(e=0;e<a;e+=1)b[e]=papaya.utilities.ArrayUtils.createArray.apply(this,d)}return b};papaya.utilities.ArrayUtils.contains=function(a,b){for(var e=a.length;e--;)if(a[e]===b)return!0;return!1};papaya.utilities.ArrayUtils.cleanArray=function(a){for(var b=[],e=0;e<a.length;e++)a[e]&&b.push(a[e]);return b};
Array.prototype.clone=function(){var a,b;a=this.slice(0);for(b=0;b<this.length;b+=1)this[b].clone&&(a[b]=this[b].clone());return a};"use strict";papaya=papaya||{};papaya.utilities=papaya.utilities||{};papaya.utilities.MathUtils=papaya.utilities.MathUtils||{};papaya.utilities.MathUtils.EPSILON=1E-8;papaya.utilities.MathUtils.signum=function(a){return a?0>a?-1:1:0};papaya.utilities.MathUtils.lineDistance=function(a,b,e,d){a=e-a;b=d-b;return Math.sqrt(a*a+b*b)};
papaya.utilities.MathUtils.lineDistance3d=function(a,b,e,d,f,k){a=d-a;b=f-b;e=k-e;return Math.sqrt(a*a+b*b+e*e)};papaya.utilities.MathUtils.essentiallyEqual=function(a,b){return a===b||Math.abs(a-b)<=(Math.abs(a)>Math.abs(b)?Math.abs(b):Math.abs(a))*papaya.utilities.MathUtils.EPSILON};papaya.utilities.MathUtils.getPowerOfTwo=function(a,b){for(b=b||1;b<a;)b*=2;return b};function papayaRoundFast(a){return 0<a?a+.5|0:a-.5|0}function papayaFloorFast(a){return a|0}"use strict";papaya=papaya||{};
papaya.utilities=papaya.utilities||{};papaya.utilities.ObjectUtils=papaya.utilities.ObjectUtils||{};papaya.utilities.ObjectUtils.bind=function(a,b,e,d){if(2===arguments.length)return function(){return b.apply(a,arguments)};var f=Array.prototype.slice;return function(){var k=e||arguments;!0===d?(k=f.call(arguments,0),k=k.concat(e)):"number"===typeof d&&(k=f.call(arguments,0),Ext.Array.insert(k,d,e));return b.apply(a||window,k)}};
papaya.utilities.ObjectUtils.isString=function(a){return"string"===typeof a||a instanceof String};papaya.utilities.ObjectUtils.dereference=function(a){return papaya.utilities.ObjectUtils.dereferenceIn(window,a)};papaya.utilities.ObjectUtils.dereferenceIn=function(a,b){var e,d;if(!papaya.utilities.ObjectUtils.isString(b))return null;if(d=b.replace(/(^[' "]+|[" ']+$)/g,"").match(/(^[\w\$]+(\.[\w\$]+)*)/))for(d=d[1].split("."),e=a[d.shift()];e&&d.length;)e=e[d.shift()];return e||null};"use strict";
papaya=papaya||{};papaya.utilities=papaya.utilities||{};papaya.utilities.PlatformUtils=papaya.utilities.PlatformUtils||{};var console=console||{};console.log=console.log||function(){};console.warn=console.warn||function(){};console.error=console.error||function(){};console.info=console.info||function(){};papaya.utilities.PlatformUtils.os=null;papaya.utilities.PlatformUtils.browser=bowser.name;papaya.utilities.PlatformUtils.browserVersion=bowser.version;papaya.utilities.PlatformUtils.ios=bowser.ios;
papaya.utilities.PlatformUtils.mobile=bowser.mobile;papaya.utilities.PlatformUtils.lastScrollEventTimestamp=0;papaya.utilities.PlatformUtils.smallScreen=window.matchMedia&&window.matchMedia("only screen and (max-width: 760px)").matches;papaya.utilities.PlatformUtils.detectOs=function(){return-1!==navigator.appVersion.indexOf("Win")?"Windows":-1!==navigator.appVersion.indexOf("Mac")?"MacOS":-1!==navigator.appVersion.indexOf("X11")||-1!==navigator.appVersion.indexOf("Linux")?"Linux":"Unknown"};
papaya.utilities.PlatformUtils.os=papaya.utilities.PlatformUtils.detectOs();
papaya.utilities.PlatformUtils.checkForBrowserCompatibility=function(){if("Firefox"===papaya.utilities.PlatformUtils.browser){if(papaya.utilities.PlatformUtils.browserVersion<PAPAYA_BROWSER_MIN_FIREFOX)return"Papaya requires Firefox version "+PAPAYA_BROWSER_MIN_FIREFOX+" or higher."}else if("Chrome"===papaya.utilities.PlatformUtils.browser){if(papaya.utilities.PlatformUtils.browserVersion<PAPAYA_BROWSER_MIN_CHROME)return"Papaya requires Chrome version "+PAPAYA_BROWSER_MIN_CHROME+" or higher."}else if("Internet Explorer"===
papaya.utilities.PlatformUtils.browser){if(papaya.utilities.PlatformUtils.browserVersion<PAPAYA_BROWSER_MIN_IE)return"Papaya requires Internet Explorer version "+PAPAYA_BROWSER_MIN_IE+" or higher."}else if("Safari"===papaya.utilities.PlatformUtils.browser){if(papaya.utilities.PlatformUtils.browserVersion<PAPAYA_BROWSER_MIN_SAFARI)return"Papaya requires Safari version "+PAPAYA_BROWSER_MIN_SAFARI+" or higher."}else if("Opera"===papaya.utilities.PlatformUtils.browser&&papaya.utilities.PlatformUtils.browserVersion<
PAPAYA_BROWSER_MIN_OPERA)return"Papaya requires Opera version "+PAPAYA_BROWSER_MIN_OPERA+" or higher.";return null};papaya.utilities.PlatformUtils.isWebGLSupported=function(){var a,b,e;try{if(a=document.createElement("canvas"),b=a.getContext("webgl")||a.getContext("experimental-webgl"),e=b.getExtension("OES_element_index_uint"),!e)return!1}catch(d){return console.log("There was a problem detecting WebGL! "+d),!1}return!0};
papaya.utilities.PlatformUtils.getMousePositionX=function(a){var b;a.originalEvent&&(a=a.originalEvent);if(a.targetTouches){if(1===a.targetTouches.length&&(b=a.targetTouches[0]))return b.pageX}else if(a.changedTouches&&1===a.changedTouches.length&&(b=a.changedTouches[0]))return b.pageX;return a.pageX};
papaya.utilities.PlatformUtils.getMousePositionY=function(a){var b;if(a.targetTouches){if(1===a.targetTouches.length&&(b=a.targetTouches[0]))return b.pageY}else if(a.changedTouches&&1===a.changedTouches.length&&(b=a.changedTouches[0]))return b.pageY;return a.pageY};
papaya.utilities.PlatformUtils.getScrollSign=function(a,b){var e,d;e=b?75:"Firefox"===papaya.utilities.PlatformUtils.browser?10:"Chrome"===papaya.utilities.PlatformUtils.browser?50:"Internet Explorer"===papaya.utilities.PlatformUtils.browser?0:"Safari"===papaya.utilities.PlatformUtils.browser?50:10;d=Date.now();return d-papaya.utilities.PlatformUtils.lastScrollEventTimestamp>e?(papaya.utilities.PlatformUtils.lastScrollEventTimestamp=d,d=papaya.utilities.PlatformUtils.normalizeWheel(a).spinY,e=0<-1*
papaya.utilities.PlatformUtils.normalizeWheel(a).spinY?1:-1,e*=Math.ceil(Math.abs(d/10))):0};papaya.utilities.PlatformUtils.makeSlice=function(a,b,e){return"undefined"===typeof File?function(){}:File.prototype.slice?a.slice(b,b+e):File.prototype.mozSlice?a.mozSlice(b,e):File.prototype.webkitSlice?a.webkitSlice(b,e):null};papaya.utilities.PlatformUtils.isPlatformLittleEndian=function(){var a=new ArrayBuffer(2);(new DataView(a)).setInt16(0,256,!0);return 256===(new Int16Array(a))[0]};
papaya.utilities.PlatformUtils.isInputRangeSupported=function(){var a=document.createElement("input");a.setAttribute("type","range");return"range"===a.type};
papaya.utilities.PlatformUtils.launchCustomProtocol=function(a,b,e){var d,f,k=!1;if("Internet Explorer"===papaya.utilities.PlatformUtils.browser)f=window.open("","","width=0,height=0"),f.document.write("<iframe src='"+b+"'></iframe>"),setTimeout(function(){try{f.location.href,k=!0}catch(a){console.log(a)}k?f.setTimeout("window.close()",100):f.close();e(k)},100);else if("Firefox"===papaya.utilities.PlatformUtils.browser){try{d=$("<iframe />"),d.css({display:"none"}),d.appendTo("body"),d[0].contentWindow.location.href=
b,k=!0}catch(h){k=!1}d.remove();e(k)}else"Chrome"===papaya.utilities.PlatformUtils.browser?(a.viewerHtml.css({outline:0}),a.viewerHtml.attr("tabindex","1"),a.viewerHtml.focus(),a.viewerHtml.blur(function(){k=!0;e(!0)}),location.href=b,setTimeout(function(){a.viewerHtml.off("blur");a.viewerHtml.removeAttr("tabindex");k||e(!1)},2E3)):((d=papaya.utilities.UrlUtils.readCookie(papaya.viewer.Preferences.COOKIE_PREFIX+PAPAYA_MANGO_INSTALLED))||papaya.mangoinstalled?k=!0:confirm("This feature requires that "+
(papaya.utilities.PlatformUtils.ios?"iMango":"Mango")+" is installed.  Continue?")&&(papaya.utilities.UrlUtils.createCookie(papaya.viewer.Preferences.COOKIE_PREFIX+PAPAYA_MANGO_INSTALLED,!0,papaya.viewer.Preferences.COOKIE_EXPIRY_DAYS),k=!0),k&&(location.href=b),e(k))};
papaya.utilities.PlatformUtils.getSupportedScrollEvent=function(){return"Firefox"===papaya.utilities.PlatformUtils.browser?"DOMMouseScroll":"onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll"};var PIXEL_STEP=10,LINE_HEIGHT=40,PAGE_HEIGHT=800;
papaya.utilities.PlatformUtils.normalizeWheel=function(a){var b=0,e=0,d=0,f=0;"detail"in a&&(e=a.detail);"wheelDelta"in a&&(e=-a.wheelDelta/120);"wheelDeltaY"in a&&(e=-a.wheelDeltaY/120);"wheelDeltaX"in a&&(b=-a.wheelDeltaX/120);"axis"in a&&a.axis===a.HORIZONTAL_AXIS&&(b=e,e=0);d=b*PIXEL_STEP;f=e*PIXEL_STEP;"deltaY"in a&&(f=a.deltaY);"deltaX"in a&&(d=a.deltaX);(d||f)&&a.deltaMode&&(1==a.deltaMode?(d*=LINE_HEIGHT,f*=LINE_HEIGHT):(d*=PAGE_HEIGHT,f*=PAGE_HEIGHT));d&&!b&&(b=1>d?-1:1);f&&!e&&(e=1>f?-1:
1);return{spinX:b,spinY:e,pixelX:d,pixelY:f}};"use strict";papaya=papaya||{};papaya.utilities=papaya.utilities||{};papaya.utilities.StringUtils=papaya.utilities.StringUtils||{};papaya.utilities.StringUtils.isStringBlank=function(a){return a&&"string"==(typeof a).toLowerCase()?0===a.trim().length:!0};papaya.utilities.StringUtils.formatNumber=function(a,b){var e=0,e=papaya.utilities.ObjectUtils.isString(a)?Number(a):a,e=b?e.toPrecision(5):e.toPrecision(7);return parseFloat(e)};
papaya.utilities.StringUtils.getSizeString=function(a){var b=null;return b=1048576<a?papaya.utilities.StringUtils.formatNumber(a/1048576,!0)+" Mb":1024<a?papaya.utilities.StringUtils.formatNumber(a/1024,!0)+" Kb":a+" Bytes"};papaya.utilities.StringUtils.wordwrap=function(a,b,e,d){e=e||"\n";b=b||75;return a?a.match(new RegExp(".{1,"+b+"}(\\s|$)"+(d?"|.{"+b+"}|.+$":"|\\S+?(\\s|$)"),"g")).join(e):a};
papaya.utilities.StringUtils.truncateMiddleString=function(a,b){if(a.length<=b)return a;var e=b-3,d=Math.ceil(e/2),e=Math.floor(e/2);return a.substr(0,d)+"..."+a.substr(a.length-e)};papaya.utilities.StringUtils.pad=function(a,b){return("000000000"+a).substr(-b)};papaya.utilities.StringUtils.arrayBufferToString=function(a){a=new Uint8Array(a);a=String.fromCharCode.apply(String,a);if(/[\u0080-\uffff]/.test(a))throw Error("this string seems to contain (still encoded) multibytes");return a};
"function"!==typeof String.prototype.startsWith&&(String.prototype.startsWith=function(a){return 0===this.indexOf(a)});"function"!==typeof String.prototype.endsWith&&(String.prototype.endsWith=function(a){return-1!==this.indexOf(a,this.length-a.length)});"function"!==typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});"use strict";papaya=papaya||{};papaya.utilities=papaya.utilities||{};papaya.utilities.UrlUtils=papaya.utilities.UrlUtils||{};
papaya.utilities.UrlUtils.createCookie=function(a,b,e){var d;e?(d=new Date,d.setTime(d.getTime()+864E5*e),e="; expires="+d.toGMTString()):e="";document.cookie=a+"="+b+e+"; path=/"};papaya.utilities.UrlUtils.readCookie=function(a){var b,e,d;a+="=";b=document.cookie.split(";");for(e=0;e<b.length;e+=1){for(d=b[e];" "===d.charAt(0);)d=d.substring(1,d.length);if(0===d.indexOf(a))return d.substring(a.length,d.length)}return null};
papaya.utilities.UrlUtils.eraseCookie=function(a){papaya.utilities.UrlUtils.createCookie(a,"",-1)};papaya.utilities.UrlUtils.getQueryParams=function(a){var b,e,d=/[?&]?([^=]+)=([^&]*)/g;if(-1!==document.location.href.indexOf("?"))for(e=document.location.href.substring(document.location.href.indexOf("?")+1),e=e.split("+").join(" "),b=d.exec(e);b;)a[decodeURIComponent(b[1])]=decodeURIComponent(b[2]),b=d.exec(e)};
papaya.utilities.UrlUtils.getAbsoluteUrl=function(a,b){var e,d;e=window.location.href;e=e.substring(0,e.lastIndexOf("/"));d=document.createElement("a");d.href=e+"/"+b;e=d.host;d=d.pathname;"/"!==d.charAt(0)&&(d="/"+d);return a+"://"+e+d};"use strict";papaya=papaya||{};papaya.core=papaya.core||{};papaya.core.Coordinate=papaya.core.Coordinate||function(a,b,e){this.x=a;this.y=b;this.z=e};
papaya.core.Coordinate.prototype.setCoordinate=function(a,b,e,d){d?(this.x=Math.round(a),this.y=Math.round(b),this.z=Math.round(e)):(this.x=a,this.y=b,this.z=e)};papaya.core.Coordinate.prototype.toString=function(){return"("+this.x+","+this.y+","+this.z+")"};papaya.core.Coordinate.prototype.isAllZeros=function(){return 0===this.x&&0===this.y&&0===this.z};"use strict";papaya=papaya||{};papaya.core=papaya.core||{};papaya.core.Point=papaya.core.Point||function(a,b){this.x=a;this.y=b};"use strict";
papaya=papaya||{};papaya.volume=papaya.volume||{};papaya.volume.Header=papaya.volume.Header||function(a){this.origin=this.error=this.imageRange=this.orientation=this.imageType=this.imageDescription=this.voxelDimensions=this.imageDimensions=this.fileFormat=null;this.pad=a;this.orientationCertainty=papaya.volume.Header.ORIENTATION_CERTAINTY_UNKNOWN;this.onFinishedFileFormatRead=null};papaya.volume.Header.HEADER_TYPE_UNKNOWN=0;papaya.volume.Header.HEADER_TYPE_NIFTI=1;
papaya.volume.Header.HEADER_TYPE_DICOM=2;papaya.volume.Header.ERROR_UNRECOGNIZED_FORMAT="This format is not recognized!";papaya.volume.Header.INVALID_IMAGE_DIMENSIONS="Image dimensions are not valid!";papaya.volume.Header.INVALID_VOXEL_DIMENSIONS="Voxel dimensions are not valid!";papaya.volume.Header.INVALID_DATATYPE="Datatype is not valid or not supported!";papaya.volume.Header.INVALID_IMAGE_RANGE="Image range is not valid!";papaya.volume.Header.ORIENTATION_CERTAINTY_UNKNOWN=0;
papaya.volume.Header.ORIENTATION_CERTAINTY_LOW=1;papaya.volume.Header.ORIENTATION_CERTAINTY_HIGH=2;papaya.volume.Header.prototype.findHeaderType=function(a,b){return papaya.volume.nifti.HeaderNIFTI.isThisFormat(a,b)?papaya.volume.Header.HEADER_TYPE_NIFTI:papaya.Container.DICOM_SUPPORT&&papaya.volume.dicom.HeaderDICOM.isThisFormat(a,b)?papaya.volume.Header.HEADER_TYPE_DICOM:papaya.volume.Header.HEADER_TYPE_UNKNOWN};
papaya.volume.Header.prototype.readHeaderData=function(a,b,e,d,f){a=this.findHeaderType(a,b);this.onFinishedFileFormatRead=f;a===papaya.volume.Header.HEADER_TYPE_NIFTI?(this.fileFormat=new papaya.volume.nifti.HeaderNIFTI,this.fileFormat.readHeaderData(b,e,d,papaya.utilities.ObjectUtils.bind(this,this.onFinishedHeaderRead))):a===papaya.volume.Header.HEADER_TYPE_DICOM?(this.fileFormat=new papaya.volume.dicom.HeaderDICOM,this.fileFormat.readHeaderData(b,e,d,papaya.utilities.ObjectUtils.bind(this,this.onFinishedHeaderRead))):
(this.error=Error(papaya.volume.Header.ERROR_UNRECOGNIZED_FORMAT),this.onFinishedFileFormatRead())};
papaya.volume.Header.prototype.onFinishedHeaderRead=function(){this.fileFormat.hasError()?this.error=this.fileFormat.error:(this.imageType=this.fileFormat.getImageType(),this.imageType.isValid()||(this.error=Error(papaya.volume.Header.INVALID_DATATYPE)),this.imageDimensions=this.fileFormat.getImageDimensions(),this.imageDimensions.isValid()||(this.error=Error(papaya.volume.Header.INVALID_IMAGE_DIMENSIONS)),this.voxelDimensions=this.fileFormat.getVoxelDimensions(),this.voxelDimensions.isValid()||(this.error=
Error(papaya.volume.Header.INVALID_VOXEL_DIMENSIONS)),this.pad&&this.imageDimensions.padIsometric(this.voxelDimensions),this.orientation=this.fileFormat.getOrientation(),this.orientation.isValid()?this.orientationCertainty=this.fileFormat.getOrientationCertainty():(this.orientation=new papaya.volume.Orientation(papaya.volume.Orientation.DEFAULT),this.orientationCertainty=papaya.volume.Header.ORIENTATION_CERTAINTY_UNKNOWN),this.orientation.createInfo(this.imageDimensions,this.voxelDimensions),this.origin=
this.orientation.convertCoordinate(this.fileFormat.getOrigin(),new papaya.core.Coordinate(0,0,0)),this.imageRange=this.fileFormat.getImageRange(),this.imageRange.isValid()||(this.error=Error(papaya.volume.Header.INVALID_IMAGE_RANGE)),this.imageDescription=this.fileFormat.getImageDescription());this.onFinishedFileFormatRead()};papaya.volume.Header.prototype.getName=function(){return this.fileFormat.getName()};papaya.volume.Header.prototype.getSeriesLabels=function(){return this.fileFormat.getSeriesLabels()};
papaya.volume.Header.prototype.readImageData=function(a,b){this.fileFormat.readImageData(a,b)};papaya.volume.Header.prototype.hasError=function(){return null!==this.error};papaya.volume.Header.prototype.getBestTransform=function(){return this.fileFormat.getBestTransform()};papaya.volume.Header.prototype.getBestTransformOrigin=function(){return this.fileFormat.getBestTransformOrigin()};papaya.volume.Header.prototype.toString=function(){return this.fileFormat.toString()};"use strict";
papaya=papaya||{};papaya.volume=papaya.volume||{};papaya.volume.ImageData=papaya.volume.ImageData||function(a){this.data=null;this.pad=a};
papaya.volume.ImageData.prototype.readFileData=function(a,b,e){var d,f;this.pad&&(b=this.padIsometric(a,b));if(a.imageType.datatype===papaya.volume.ImageType.DATATYPE_RGB)if(d=b.byteLength/3,f=2*d,a=a.imageType.rgbBySample,b=new DataView(b,0),this.data=new Uint32Array(d),a){for(a=0;a<d;a+=1)this.data[a]|=b.getUint8(a)<<16;for(a=0;a<d;a+=1)this.data[a]|=b.getUint8(a+d)<<8;for(a=0;a<d;a+=1)this.data[a]|=b.getUint8(a+f)}else for(a=0;a<d;a+=1)this.data[a]=b.getUint8(3*a)<<16|b.getUint8(3*a+1)<<8|b.getUint8(3*
a+2);else if(a.imageType.datatype===papaya.volume.ImageType.DATATYPE_INTEGER_SIGNED&&1===a.imageType.numBytes)this.data=new Int8Array(b,0,b.byteLength);else if(a.imageType.datatype===papaya.volume.ImageType.DATATYPE_INTEGER_UNSIGNED&&1===a.imageType.numBytes)this.data=new Uint8Array(b,0,b.byteLength);else if(a.imageType.datatype===papaya.volume.ImageType.DATATYPE_INTEGER_SIGNED&&2===a.imageType.numBytes)this.data=new Int16Array(b,0,b.byteLength/2);else if(a.imageType.datatype===papaya.volume.ImageType.DATATYPE_INTEGER_UNSIGNED&&
2===a.imageType.numBytes)this.data=new Uint16Array(b,0,b.byteLength/2);else if(a.imageType.datatype===papaya.volume.ImageType.DATATYPE_INTEGER_SIGNED&&4===a.imageType.numBytes)this.data=new Int32Array(b,0,b.byteLength/4);else if(a.imageType.datatype===papaya.volume.ImageType.DATATYPE_INTEGER_UNSIGNED&&4===a.imageType.numBytes)this.data=new Uint32Array(b,0,b.byteLength/4);else if(a.imageType.datatype===papaya.volume.ImageType.DATATYPE_FLOAT&&4===a.imageType.numBytes)if(a.imageType.swapped)for(d=b.byteLength/
Float32Array.BYTES_PER_ELEMENT,b=new DataView(b,0),this.data=new Float32Array(d),a=0;a<d;a+=1)this.data[a]=b.getFloat32(a*Float32Array.BYTES_PER_ELEMENT);else this.data=new Float32Array(b,0,b.byteLength/4);else if(a.imageType.datatype===papaya.volume.ImageType.DATATYPE_FLOAT&&8===a.imageType.numBytes)if(a.imageType.swapped)for(d=b.byteLength/Float64Array.BYTES_PER_ELEMENT,b=new DataView(b,0),this.data=new Float64Array(d),a=0;a<d;a+=1)this.data[a]=b.getFloat64(a*Float64Array.BYTES_PER_ELEMENT);else this.data=
new Float64Array(b,0,b.byteLength/8);e()};
papaya.volume.ImageData.prototype.padIsometric=function(a,b){for(var e=a.imageDimensions,d=a.voxelDimensions,f=a.imageType.numBytes,k=new Uint8Array(b,0,b.byteLength),h=e.colsOrig,r=e.rowsOrig,e=e.slicesOrig,q=h*d.colSize,t=r*d.rowSize,y=e*d.sliceSize,G=Math.max(Math.max(q,t),y),q=parseInt((G-q)/d.colSize/2,10),t=parseInt((G-t)/d.rowSize/2,10),G=parseInt((G-y)/d.sliceSize/2,10),B=h+2*q,w=r+2*t,h=h*f,q=q*f,t=t*B*f,E=G*B*w*f,y=d=0,f=new ArrayBuffer(B*w*(e+2*G)*f),G=new Uint8Array(f,0,f.byteLength),
d=d+E,B=0;B<e;B+=1){d+=t;for(w=0;w<r;w+=1){d+=q;for(E=0;E<h;E+=1,y++,d++)G[d]=k[y];d+=q}d+=t}return f};"use strict";papaya=papaya||{};papaya.volume=papaya.volume||{};papaya.volume.ImageDescription=papaya.volume.ImageDescription||function(a){this.notes="(none)";papaya.utilities.StringUtils.isStringBlank(a)||(this.notes=a)};"use strict";papaya=papaya||{};papaya.volume=papaya.volume||{};
papaya.volume.ImageDimensions=papaya.volume.ImageDimensions||function(a,b,e,d){this.cols=a;this.rows=b;this.slices=e;this.colsOrig=a;this.rowsOrig=b;this.slicesOrig=e;this.zDim=this.yDim=this.xDim=-1;this.timepoints=d||1;this.dataOffsets=[];this.dataLengths=[]};
papaya.volume.ImageDimensions.prototype.padIsometric=function(a){var b=this.cols,e=this.rows,d=this.slices,f=b*a.colSize,k=e*a.rowSize,h=d*a.sliceSize,r=Math.max(Math.max(f,k),h),f=parseInt((r-f)/a.colSize/2,10),k=parseInt((r-k)/a.rowSize/2,10);a=parseInt((r-h)/a.sliceSize/2,10);this.cols=b+2*f;this.rows=e+2*k;this.slices=d+2*a};papaya.volume.ImageDimensions.prototype.getNumVoxelsSeries=function(){return this.cols*this.rows*this.slices*this.timepoints};
papaya.volume.ImageDimensions.prototype.getNumVoxelsSlice=function(){return this.rows*this.cols};papaya.volume.ImageDimensions.prototype.getNumVoxelsVolume=function(){return this.rows*this.cols*this.slices};papaya.volume.ImageDimensions.prototype.isValid=function(){return 0<this.cols&&0<this.rows&&0<this.slices&&0<this.timepoints&&0<=this.dataOffsets[0]&&0<=this.dataLengths[0]};var moduleType=typeof module;"undefined"!==moduleType&&module.exports&&(module.exports.ImageDimensions=papaya.volume.ImageDimensions);
"use strict";papaya=papaya||{};papaya.volume=papaya.volume||{};papaya.volume.ImageRange=papaya.volume.ImageRange||function(a,b){this.displayMin=a;this.displayMax=b;this.imageMax=this.imageMin=0;this.dataScaleSlopes=[];this.dataScaleIntercepts=[];this.globalDataScaleSlope=1;this.globalDataScaleIntercept=0;this.usesGlobalDataScale=!1};papaya.volume.ImageRange.DEFAULT_SCALE=1;papaya.volume.ImageRange.DEFAULT_INTERCEPT=0;papaya.volume.ImageRange.prototype.isValid=function(){return!0};
papaya.volume.ImageRange.prototype.setGlobalDataScale=function(a,b){this.globalDataScaleSlope=a;this.globalDataScaleIntercept=b;this.usesGlobalDataScale=!0;this.dataScaleSlopes=[];this.dataScaleIntercepts=[]};
papaya.volume.ImageRange.prototype.validateDataScale=function(){var a,b,e=!1;if(1!==this.globalDataScaleSlope||0!==this.globalDataScaleIntercept)this.dataScaleSlopes=[],this.dataScaleIntercepts=[],this.usesGlobalDataScale=!0;else if(0<this.dataScaleSlopes.length&&0<this.dataScaleIntercepts.length){b=this.dataScaleSlopes[0];for(a=1;a<this.dataScaleSlopes.length;a+=1)if(b!==this.dataScaleSlopes[a]){e=!0;break}b=this.dataScaleIntercepts[0];for(a=1;a<this.dataScaleIntercepts.length;a+=1)if(b!==this.dataScaleIntercepts[a]){e=
!0;break}e?this.usesGlobalDataScale=!1:this.setGlobalDataScale(this.dataScaleSlopes[0],this.dataScaleIntercepts[0])}else this.setGlobalDataScale(1,0)};"use strict";papaya=papaya||{};papaya.volume=papaya.volume||{};papaya.volume.ImageType=papaya.volume.ImageType||function(a,b,e,d){this.datatype=a;this.numBytes=b;this.littleEndian=e;this.swapped=!1;this.compressed=d;this.rgbBySample=!1};papaya.volume.ImageType.DATATYPE_UNKNOWN=0;papaya.volume.ImageType.DATATYPE_INTEGER_SIGNED=1;
papaya.volume.ImageType.DATATYPE_INTEGER_UNSIGNED=2;papaya.volume.ImageType.DATATYPE_FLOAT=3;papaya.volume.ImageType.DATATYPE_RGB=4;papaya.volume.ImageType.MAX_SUPPORTED_BYTES_FLOAT=8;papaya.volume.ImageType.MAX_SUPPORTED_BYTES_INTEGER=4;
papaya.volume.ImageType.prototype.isValid=function(){return this.datatype<=papaya.volume.ImageType.DATATYPE_RGB&&this.datatype>papaya.volume.ImageType.DATATYPE_UNKNOWN&&0<this.numBytes&&(this.datatype===papaya.volume.ImageType.DATATYPE_FLOAT&&this.numBytes<=papaya.volume.ImageType.MAX_SUPPORTED_BYTES_FLOAT||this.datatype!==papaya.volume.ImageType.DATATYPE_FLOAT&&this.numBytes<=papaya.volume.ImageType.MAX_SUPPORTED_BYTES_INTEGER)};
papaya.volume.ImageType.prototype.getTypeDescription=function(){return this.datatype===papaya.volume.ImageType.DATATYPE_INTEGER_SIGNED?"Signed Integer":this.datatype===papaya.volume.ImageType.DATATYPE_INTEGER_UNSIGNED?"Unsigned Integer":this.datatype===papaya.volume.ImageType.DATATYPE_FLOAT?"Float":this.datatype===papaya.volume.ImageType.DATATYPE_RGB?"RGB":"Unknown"};
papaya.volume.ImageType.prototype.getOrderDescription=function(){return 1<this.numBytes?this.littleEndian?"Little Endian":"Big Endian":null};"use strict";papaya=papaya||{};papaya.volume=papaya.volume||{};papaya.volume.nifti=papaya.volume.nifti||{};papaya.volume.nifti.HeaderNIFTI=papaya.volume.nifti.HeaderNIFTI||function(){this.nifti=null;this.compressed=this.isNIFTI2=!1;this.imageData=this.ext=null};papaya.volume.nifti.HeaderNIFTI.ORIENTATION_DEFAULT="XYZ-++";
papaya.volume.nifti.HeaderNIFTI.SPATIAL_UNITS_MASK=7;papaya.volume.nifti.HeaderNIFTI.TEMPORAL_UNITS_MASK=56;papaya.volume.nifti.HeaderNIFTI.isThisFormat=function(a,b){return-1!==a.indexOf(".nii")?!0:nifti.isNIFTI(b[0])};
papaya.volume.nifti.HeaderNIFTI.prototype.readHeaderData=function(a,b,e,d){this.nifti=nifti.readHeader(a[0]);this.isNIFTI2=nifti.isNIFTI2(a[0]);try{nifti.hasExtension(this.nifti)&&(this.ext=nifti.readExtensionData(this.nifti,a[0]))}catch(f){console.log("Problem reading NIFTI extension.")}this.imageData=nifti.readImage(this.nifti,a[0]);d()};papaya.volume.nifti.HeaderNIFTI.prototype.readImageData=function(a,b){b(this.imageData);this.imageData=null};
papaya.volume.nifti.HeaderNIFTI.prototype.getImageDimensions=function(){var a=new papaya.volume.ImageDimensions(this.nifti.dims[1],this.nifti.dims[2],this.nifti.dims[3],this.nifti.dims[4]);a.dataOffsets[0]=this.nifti.vox_offset;a.dataLengths[0]=a.getNumVoxelsSeries()*(this.nifti.numBitsPerVoxel/8);return a};papaya.volume.nifti.HeaderNIFTI.prototype.getName=function(){return null};
papaya.volume.nifti.HeaderNIFTI.prototype.getSeriesLabels=function(){var a=null;if(this.ext)try{var b=papaya.utilities.StringUtils.arrayBufferToString(this.ext).replace(/[^\x20-\x7F]/g,"").trim(),e=$.parseXML(b),d=$(e).find("MangoVolume");if(d.length){var f=d.find("Series");if(f.length){var k=f.find("Point"),h=f.attr("length"),a=Array(h);k.each(function(){var b=$(this).attr("index"),d=$(this).attr("name");a[parseInt(b)]=d})}}}catch(r){console.log("Unrecognized NIFTI extension found.")}return a};
papaya.volume.nifti.HeaderNIFTI.prototype.getVoxelDimensions=function(){var a;a=new papaya.volume.VoxelDimensions(this.nifti.pixDims[1],this.nifti.pixDims[2],this.nifti.pixDims[3],this.nifti.pixDims[4]);a.spatialUnit=this.nifti.xyzt_units&papaya.volume.nifti.HeaderNIFTI.SPATIAL_UNITS_MASK;a.temporalUnit=this.nifti.xyzt_units&papaya.volume.nifti.HeaderNIFTI.TEMPORAL_UNITS_MASK;a.flip=-1===this.nifti.pixDims[0];return a};
papaya.volume.nifti.HeaderNIFTI.prototype.getImageType=function(){var a=papaya.volume.ImageType.DATATYPE_UNKNOWN;this.nifti.datatypeCode===nifti.NIFTI1.TYPE_UINT8||this.nifti.datatypeCode===nifti.NIFTI1.TYPE_UINT16||this.nifti.datatypeCode===nifti.NIFTI1.TYPE_UINT32||this.nifti.datatypeCode===nifti.NIFTI1.TYPE_UINT64?a=papaya.volume.ImageType.DATATYPE_INTEGER_UNSIGNED:this.nifti.datatypeCode===nifti.NIFTI1.TYPE_INT8||this.nifti.datatypeCode===nifti.NIFTI1.TYPE_INT16||this.nifti.datatypeCode===nifti.NIFTI1.TYPE_INT32||
this.nifti.datatypeCode===nifti.NIFTI1.TYPE_INT64?a=papaya.volume.ImageType.DATATYPE_INTEGER_SIGNED:this.nifti.datatypeCode===nifti.NIFTI1.TYPE_FLOAT32||this.nifti.datatypeCode===nifti.NIFTI1.TYPE_FLOAT64?a=papaya.volume.ImageType.DATATYPE_FLOAT:this.nifti.datatypeCode===nifti.NIFTI1.TYPE_RGB24&&(a=papaya.volume.ImageType.DATATYPE_RGB);return new papaya.volume.ImageType(a,this.nifti.numBitsPerVoxel/8,this.nifti.littleEndian,this.compressed)};
papaya.volume.nifti.HeaderNIFTI.prototype.getOrientation=function(){var a=null;0<this.nifti.qform_code&&!this.qFormHasRotations()&&(a=this.getOrientationQform());this.nifti.sform_code>this.nifti.qform_code&&!this.sFormHasRotations()&&(a=this.getOrientationSform());null===a&&(a=papaya.volume.nifti.HeaderNIFTI.ORIENTATION_DEFAULT);return new papaya.volume.Orientation(a)};
papaya.volume.nifti.HeaderNIFTI.prototype.getOrientationQform=function(){var a=papaya.volume.nifti.HeaderNIFTI.ORIENTATION_DEFAULT,a=this.nifti.convertNiftiQFormToNiftiSForm(this.nifti.quatern_b,this.nifti.quatern_c,this.nifti.quatern_d,this.nifti.qoffset_x,this.nifti.qoffset_y,this.nifti.qoffset_z,this.nifti.pixDims[1],this.nifti.pixDims[2],this.nifti.pixDims[3],this.nifti.pixDims[0]);0<this.nifti.qform_code?(a=this.nifti.convertNiftiSFormToNEMA(a),papaya.volume.Orientation.isValidOrientationString(a)||
(a=papaya.volume.nifti.HeaderNIFTI.ORIENTATION_DEFAULT)):a=papaya.volume.nifti.HeaderNIFTI.ORIENTATION_DEFAULT;return a};papaya.volume.nifti.HeaderNIFTI.prototype.getOrientationSform=function(){var a=this.nifti.convertNiftiSFormToNEMA(this.nifti.affine);papaya.volume.Orientation.isValidOrientationString(a)||(a=papaya.volume.nifti.HeaderNIFTI.ORIENTATION_DEFAULT);return a};papaya.volume.nifti.HeaderNIFTI.prototype.getQformMatCopy=function(){return this.nifti.getQformMat().clone()};
papaya.volume.nifti.HeaderNIFTI.prototype.getSformMatCopy=function(){return this.nifti.affine.clone()};
papaya.volume.nifti.HeaderNIFTI.prototype.getOrigin=function(a,b){var e=new papaya.core.Coordinate(0,0,0),d,f,k,h,r,q,t;0<this.nifti.qform_code&&!b?this.qFormHasRotations()?(d=this.nifti.getQformMat(),d=numeric.inv(d),e.setCoordinate(d[0][3],d[1][3],d[2][3])):(d=this.nifti.convertNiftiQFormToNiftiSForm(this.nifti.quatern_b,this.nifti.quatern_c,this.nifti.quatern_d,this.nifti.qoffset_x,this.nifti.qoffset_y,this.nifti.qoffset_z,this.nifti.pixDims[1],this.nifti.pixDims[2],this.nifti.pixDims[3],this.nifti.pixDims[0]),
d=this.nifti.convertNiftiSFormToNEMA(d),papaya.volume.Orientation.isValidOrientationString(d)||(d=papaya.volume.nifti.HeaderNIFTI.ORIENTATION_DEFAULT),k=d.substring(0,3).toUpperCase(),f=d.substring(3),d=k.indexOf("X"),h=k.indexOf("Y"),k=k.indexOf("Z"),r="+"===f.charAt(d),q="+"===f.charAt(h),t="+"===f.charAt(k),f=Array(3),f[0]=this.nifti.qoffset_x/this.nifti.pixDims[d+1]*(r?-1:1),f[1]=this.nifti.qoffset_y/this.nifti.pixDims[h+1]*(q?-1:1),f[2]=this.nifti.qoffset_z/this.nifti.pixDims[k+1]*(t?-1:1),e.setCoordinate(f[0],
f[1],f[2],!0)):0<this.nifti.sform_code&&!a&&(this.sFormHasRotations()?(d=numeric.inv(this.nifti.affine),e.setCoordinate(d[0][3],d[1][3],d[2][3])):(d=this.nifti.convertNiftiSFormToNEMA(this.nifti.affine),papaya.volume.Orientation.isValidOrientationString(d)||(d=papaya.volume.nifti.HeaderNIFTI.ORIENTATION_DEFAULT),k=d.substring(0,3).toUpperCase(),f=d.substring(3),d=k.indexOf("X"),h=k.indexOf("Y"),k=k.indexOf("Z"),r="+"===f.charAt(d),q="+"===f.charAt(h),t="+"===f.charAt(k),f=Array(3),f[0]=this.nifti.affine[0][3]/
this.nifti.pixDims[d+1]*(r?-1:1),f[1]=this.nifti.affine[1][3]/this.nifti.pixDims[h+1]*(q?-1:1),f[2]=this.nifti.affine[2][3]/this.nifti.pixDims[k+1]*(t?-1:1),e.setCoordinate(f[0],f[1],f[2],!0)));e.isAllZeros()&&e.setCoordinate(this.nifti.dims[1]/2,this.nifti.dims[2]/2,this.nifti.dims[3]/2);return e};papaya.volume.nifti.HeaderNIFTI.prototype.qFormHasRotations=function(){return papaya.volume.Transform.hasRotations(this.getQformMatCopy())};papaya.volume.nifti.HeaderNIFTI.prototype.sFormHasRotations=function(){return papaya.volume.Transform.hasRotations(this.getSformMatCopy())};
papaya.volume.nifti.HeaderNIFTI.prototype.getImageRange=function(){var a=new papaya.volume.ImageRange(this.nifti.cal_min,this.nifti.cal_max),b=this.nifti.scl_slope,e=this.getImageDimensions();0===b&&(b=1);a.setGlobalDataScale(b,this.nifti.scl_inter,e.slices*e.timepoints);a.validateDataScale();return a};papaya.volume.nifti.HeaderNIFTI.prototype.hasError=function(){return!1};papaya.volume.nifti.HeaderNIFTI.prototype.getImageDescription=function(){return new papaya.volume.ImageDescription(this.nifti.description)};
papaya.volume.nifti.HeaderNIFTI.prototype.getOrientationCertainty=function(){var a,b;a=papaya.volume.Header.ORIENTATION_CERTAINTY_UNKNOWN;if(0<this.nifti.qform_code||0<this.nifti.sform_code)a=papaya.volume.Header.ORIENTATION_CERTAINTY_LOW,b=this.getOrigin(),null===b||b.isAllZeros()||(a=papaya.volume.Header.ORIENTATION_CERTAINTY_HIGH);return a};
papaya.volume.nifti.HeaderNIFTI.prototype.getBestTransform=function(){return 0<this.nifti.qform_code&&this.nifti.qform_code>this.nifti.sform_code&&this.qFormHasRotations()?this.getQformMatCopy():0<this.nifti.sform_code&&this.nifti.sform_code>=this.nifti.qform_code&&this.sFormHasRotations()?this.getSformMatCopy():null};
papaya.volume.nifti.HeaderNIFTI.prototype.getBestTransformOrigin=function(){return 0<this.nifti.qform_code&&this.nifti.qform_code>this.nifti.sform_code&&this.qFormHasRotations()?this.getOrigin(!0,!1):0<this.nifti.sform_code&&this.nifti.sform_code>=this.nifti.qform_code&&this.sFormHasRotations()?this.getOrigin(!1,!0):null};
papaya.volume.nifti.HeaderNIFTI.prototype.toString=function(){var a=papaya.utilities.StringUtils.formatNumber,b="";this.isNIFTI2?(b+="<span style='color:#B5CBD3'>Datatype</span><span style='color:gray'> = </span>"+this.nifti.datatypeCode+" ("+this.nifti.getDatatypeCodeString(this.nifti.datatypeCode)+")<br />",b+="<span style='color:#B5CBD3'>Bits Per Voxel</span><span style='color:gray'> = </span>"+this.nifti.numBitsPerVoxel+"<br />",b+="<span style='color:#B5CBD3'>Image Dimensions</span> (1-8): "+
this.nifti.dims[0]+", "+this.nifti.dims[1]+", "+this.nifti.dims[2]+", "+this.nifti.dims[3]+", "+this.nifti.dims[4]+", "+this.nifti.dims[5]+", "+this.nifti.dims[6]+", "+this.nifti.dims[7]+"<br />",b+="<span style='color:#B5CBD3'>Intent Parameters</span> (1-3): "+this.nifti.intent_p1+", "+this.nifti.intent_p2+", "+this.nifti.intent_p3+"<br />",b+="<span style='color:#B5CBD3'>Voxel Dimensions</span> (1-8): "+a(this.nifti.pixDims[0])+", "+a(this.nifti.pixDims[1])+", "+a(this.nifti.pixDims[2])+", "+a(this.nifti.pixDims[3])+
", "+a(this.nifti.pixDims[4])+", "+a(this.nifti.pixDims[5])+", "+a(this.nifti.pixDims[6])+", "+a(this.nifti.pixDims[7])+"<br />",b+="<span style='color:#B5CBD3'>Image Offset</span><span style='color:gray'> = </span>"+this.nifti.vox_offset+"<br />",b+="<span style='color:#B5CBD3'>Data Scale:  Slope</span><span style='color:gray'> = </span>"+this.nifti.scl_slope+"  <span style='color:#B5CBD3'>Intercept</span><span style='color:gray'> = </span>"+this.nifti.scl_inter+"<br />",b+="<span style='color:#B5CBD3'>Display Range:  Max</span><span style='color:gray'> = </span>"+
this.nifti.cal_max+"  <span style='color:#B5CBD3'>Min</span><span style='color:gray'> = </span>"+this.nifti.cal_min+"<br />",b+="<span style='color:#B5CBD3'>Slice Duration</span><span style='color:gray'> = </span>"+this.nifti.slice_duration+"<br />",b+="<span style='color:#B5CBD3'>Time Axis Shift</span><span style='color:gray'> = </span>"+this.nifti.toffset+"<br />",b+="<span style='color:#B5CBD3'>Slice Start</span><span style='color:gray'> = </span>"+this.nifti.slice_start+"<br />",b+="<span style='color:#B5CBD3'>Slice End</span><span style='color:gray'> = </span>"+
this.nifti.slice_end+"<br />",b+="<span style='color:#B5CBD3'>Description</span>: \""+this.nifti.description+'"<br />',b+="<span style='color:#B5CBD3'>Auxiliary File</span>: \""+this.nifti.aux_file+'"<br />',b+="<span style='color:#B5CBD3'>Q-Form Code</span><span style='color:gray'> = </span>"+this.nifti.qform_code+" ("+this.nifti.getTransformCodeString(this.nifti.qform_code)+")<br />",b+="<span style='color:#B5CBD3'>S-Form Code</span><span style='color:gray'> = </span>"+this.nifti.sform_code+" ("+
this.nifti.getTransformCodeString(this.nifti.sform_code)+")<br />",b+="<span style='color:#B5CBD3'>Quaternion Parameters</span>:  <span style='color:#B5CBD3'>b</span> <span style='color:gray'>=</span> "+a(this.nifti.quatern_b)+"  <span style='color:#B5CBD3'>c</span> <span style='color:gray'>=</span> "+a(this.nifti.quatern_c)+"  <span style='color:#B5CBD3'>d</span> <span style='color:gray'>=</span> "+a(this.nifti.quatern_d)+"<br />",b+="<span style='color:#B5CBD3'>Quaternion Offsets</span>:  <span style='color:#B5CBD3'>x</span> <span style='color:gray'>=</span> "+
this.nifti.qoffset_x+"  <span style='color:#B5CBD3'>y</span> <span style='color:gray'>=</span> "+this.nifti.qoffset_y+"  <span style='color:#B5CBD3'>z</span> <span style='color:gray'>=</span> "+this.nifti.qoffset_z+"<br />",b+="<span style='color:#B5CBD3'>S-Form Parameters X</span>: "+a(this.nifti.affine[0][0])+", "+a(this.nifti.affine[0][1])+", "+a(this.nifti.affine[0][2])+", "+a(this.nifti.affine[0][3])+"<br />",b+="<span style='color:#B5CBD3'>S-Form Parameters Y</span>: "+a(this.nifti.affine[1][0])+
", "+a(this.nifti.affine[1][1])+", "+a(this.nifti.affine[1][2])+", "+a(this.nifti.affine[1][3])+"<br />",b+="<span style='color:#B5CBD3'>S-Form Parameters Z</span>: "+a(this.nifti.affine[2][0])+", "+a(this.nifti.affine[2][1])+", "+a(this.nifti.affine[2][2])+", "+a(this.nifti.affine[2][3])+"<br />",b+="<span style='color:#B5CBD3'>Slice Code</span><span style='color:gray'> = </span>"+this.nifti.slice_code+"<br />",b+="<span style='color:#B5CBD3'>Units Code</span><span style='color:gray'> = </span>"+
this.nifti.xyzt_units+" ("+this.nifti.getUnitsCodeString(nifti.NIFTI1.SPATIAL_UNITS_MASK&this.nifti.xyzt_units)+", "+this.nifti.getUnitsCodeString(nifti.NIFTI1.TEMPORAL_UNITS_MASK&this.nifti.xyzt_units)+")<br />",b+="<span style='color:#B5CBD3'>Intent Code </span><span style='color:gray'> = </span>"+this.nifti.intent_code+"<br />",b+="<span style='color:#B5CBD3'>Intent Name</span>: \""+this.nifti.intent_name+'"<br />',b+="<span style='color:#B5CBD3'>Dim Info </span><span style='color:gray'> = </span>"+
this.nifti.dim_info+"<br />"):(b+="<span style='color:#B5CBD3'>Dim Info</span><span style='color:gray'> = </span>"+this.nifti.dim_info+"<br />",b+="<span style='color:#B5CBD3'>Image Dimensions</span> (1-8): "+this.nifti.dims[0]+", "+this.nifti.dims[1]+", "+this.nifti.dims[2]+", "+this.nifti.dims[3]+", "+this.nifti.dims[4]+", "+this.nifti.dims[5]+", "+this.nifti.dims[6]+", "+this.nifti.dims[7]+"<br />",b+="<span style='color:#B5CBD3'>Intent Parameters</span> (1-3): "+this.nifti.intent_p1+", "+this.nifti.intent_p2+
", "+this.nifti.intent_p3+"<br />",b+="<span style='color:#B5CBD3'>Intent Code</span><span style='color:gray'> = </span>"+this.nifti.intent_code+"<br />",b+="<span style='color:#B5CBD3'>Datatype</span><span style='color:gray'> = </span>"+this.nifti.datatypeCode+" ("+this.nifti.getDatatypeCodeString(this.nifti.datatypeCode)+")<br />",b+="<span style='color:#B5CBD3'>Bits Per Voxel</span><span style='color:gray'> = </span>"+this.nifti.numBitsPerVoxel+"<br />",b+="<span style='color:#B5CBD3'>Slice Start</span><span style='color:gray'> = </span>"+
this.nifti.slice_start+"<br />",b+="<span style='color:#B5CBD3'>Voxel Dimensions</span> (1-8): "+a(this.nifti.pixDims[0])+", "+a(this.nifti.pixDims[1])+", "+a(this.nifti.pixDims[2])+", "+a(this.nifti.pixDims[3])+", "+a(this.nifti.pixDims[4])+", "+a(this.nifti.pixDims[5])+", "+a(this.nifti.pixDims[6])+", "+a(this.nifti.pixDims[7])+"<br />",b+="<span style='color:#B5CBD3'>Image Offset</span><span style='color:gray'> = </span>"+this.nifti.vox_offset+"<br />",b+="<span style='color:#B5CBD3'>Data Scale</span>:  <span style='color:#B5CBD3'>Slope</span> = "+
this.nifti.scl_slope+"  <span style='color:#B5CBD3'>Intercept</span> = "+this.nifti.scl_inter+"<br />",b+="<span style='color:#B5CBD3'>Slice End</span><span style='color:gray'> = </span>"+this.nifti.slice_end+"<br />",b+="<span style='color:#B5CBD3'>Slice Code</span><span style='color:gray'> = </span>"+this.nifti.slice_code+"<br />",b+="<span style='color:#B5CBD3'>Units Code</span><span style='color:gray'> = </span>"+this.nifti.xyzt_units+" ("+this.nifti.getUnitsCodeString(nifti.NIFTI1.SPATIAL_UNITS_MASK&
this.nifti.xyzt_units)+", "+this.nifti.getUnitsCodeString(nifti.NIFTI1.TEMPORAL_UNITS_MASK&this.nifti.xyzt_units)+")<br />",b+="<span style='color:#B5CBD3'>Display Range</span>:  <span style='color:#B5CBD3'>Max</span><span style='color:gray'> = </span>"+this.nifti.cal_max+"  <span style='color:#B5CBD3'>Min</span><span style='color:gray'> = </span>"+this.nifti.cal_min+"<br />",b+="<span style='color:#B5CBD3'>Slice Duration</span><span style='color:gray'> = </span>"+this.nifti.slice_duration+"<br />",
b+="<span style='color:#B5CBD3'>Time Axis Shift</span><span style='color:gray'> = </span>"+this.nifti.toffset+"<br />",b+="<span style='color:#B5CBD3'>Description</span>: \""+this.nifti.description+'"<br />',b+="<span style='color:#B5CBD3'>Auxiliary File</span>: \""+this.nifti.aux_file+'"<br />',b+="<span style='color:#B5CBD3'>Q-Form Code</span><span style='color:gray'> = </span>"+this.nifti.qform_code+" ("+this.nifti.getTransformCodeString(this.nifti.qform_code)+")<br />",b+="<span style='color:#B5CBD3'>S-Form Code</span><span style='color:gray'> = </span>"+
this.nifti.sform_code+" ("+this.nifti.getTransformCodeString(this.nifti.sform_code)+")<br />",b+="<span style='color:#B5CBD3'>Quaternion Parameters</span>:  <span style='color:#B5CBD3'>b</span><span style='color:gray'> = </span>"+a(this.nifti.quatern_b)+"  <span style='color:#B5CBD3'>c</span><span style='color:gray'> = </span>"+a(this.nifti.quatern_c)+"  <span style='color:#B5CBD3'>d</span><span style='color:gray'> = </span>"+a(this.nifti.quatern_d)+"<br />",b+="<span style='color:#B5CBD3'>Quaternion Offsets</span>:  <span style='color:#B5CBD3'>x</span><span style='color:gray'> = </span>"+
this.nifti.qoffset_x+"  <span style='color:#B5CBD3'>y</span><span style='color:gray'> = </span>"+this.nifti.qoffset_y+"  <span style='color:#B5CBD3'>z</span><span style='color:gray'> = </span>"+this.nifti.qoffset_z+"<br />",b+="<span style='color:#B5CBD3'>S-Form Parameters X</span>: "+a(this.nifti.affine[0][0])+", "+a(this.nifti.affine[0][1])+", "+a(this.nifti.affine[0][2])+", "+a(this.nifti.affine[0][3])+"<br />",b+="<span style='color:#B5CBD3'>S-Form Parameters Y</span>: "+a(this.nifti.affine[1][0])+
", "+a(this.nifti.affine[1][1])+", "+a(this.nifti.affine[1][2])+", "+a(this.nifti.affine[1][3])+"<br />",b+="<span style='color:#B5CBD3'>S-Form Parameters Z</span>: "+a(this.nifti.affine[2][0])+", "+a(this.nifti.affine[2][1])+", "+a(this.nifti.affine[2][2])+", "+a(this.nifti.affine[2][3])+"<br />",b+="<span style='color:#B5CBD3'>Intent Name</span>: \""+this.nifti.intent_name+'"<br />');return b};"use strict";papaya=papaya||{};papaya.volume=papaya.volume||{};
papaya.volume.dicom=papaya.volume.dicom||{};papaya.volume.dicom.HeaderDICOM=papaya.volume.dicom.HeaderDICOM||function(){this.series=null;this.seriesMap=[];this.dialogHandler=this.onFinishedHeaderRead=this.error=null};papaya.volume.dicom.HeaderDICOM.ORIENTATION_DEFAULT="XYZ+--";papaya.volume.dicom.HeaderDICOM.SUPPORTED_TRANSFER_SYNTAXES="1.2.840.10008.1.2 1.2.840.10008.1.2.1 1.2.840.10008.1.2.2 1.2.840.10008.1.2.1.99 1.2.840.10008.1.2.4.50 1.2.840.10008.1.2.4.51 1.2.840.10008.1.2.4.57 1.2.840.10008.1.2.4.70 1.2.840.10008.1.2.4.80 1.2.840.10008.1.2.4.81 1.2.840.10008.1.2.4.90 1.2.840.10008.1.2.4.91 1.2.840.10008.1.2.5".split(" ");
papaya.volume.dicom.HeaderDICOM.isThisFormat=function(a,b){var e,d,f,k,h=0;if(-1!==a.indexOf(".dcm"))return!0;e=new DataView(b[0]);d=daikon.Parser.MAGIC_COOKIE_OFFSET;f=daikon.Parser.MAGIC_COOKIE.length;for(k=0;k<f;k+=1)e.getUint8(d+k)===daikon.Parser.MAGIC_COOKIE[k]&&(h+=1);if(4===h)return!0;d=new daikon.Parser;e=d.testForValidTag(e);return null!==e&&8>=e.group&&!d.hasError()};
papaya.volume.dicom.HeaderDICOM.prototype.setSeries=function(a,b){var e;for(e=0;e<Object.keys(this.seriesMap).length;e+=1)if(-1!==Object.keys(this.seriesMap)[e].indexOf(b)){this.series=this.seriesMap[Object.keys(this.seriesMap)[e]];break}};papaya.volume.dicom.HeaderDICOM.prototype.getDataScaleSlope=function(a,b){return a?b.getDataScaleElscint()||1:b.getDataScaleSlope()||1};papaya.volume.dicom.HeaderDICOM.prototype.getDataScaleIntercept=function(a,b){return a?0:b.getDataScaleIntercept()||0};
papaya.volume.dicom.HeaderDICOM.prototype.finishedHeaderRead=function(){var a,b;if(this.error)this.onFinishedHeaderRead();else if(1<Object.keys(this.seriesMap).length){this.series=this.seriesMap[Object.keys(this.seriesMap)[0]];a=[];for(b=0;b<Object.keys(this.seriesMap).length;b+=1)a.push(this.seriesMap[Object.keys(this.seriesMap)[b]]);a={items:[{label:"Select:",field:"series",options:a}]};this.dialogHandler.showDialog("Select DICOM Series",a,this,papaya.utilities.ObjectUtils.bind(this,this.setSeries),
papaya.utilities.ObjectUtils.bind(this,this.finishedSeriesSelection))}else this.series=this.seriesMap[Object.keys(this.seriesMap)[0]],0<this.series.images.length?(this.series.buildSeries(),this.isTransferSyntaxSupported()||(this.error=Error("This transfer syntax is currently not supported!"))):this.error=Error("No images found!"),this.onFinishedHeaderRead()};
papaya.volume.dicom.HeaderDICOM.prototype.isTransferSyntaxSupported=function(){var a=this.series.images[0].getTransferSyntax();return papaya.utilities.StringUtils.isStringBlank(a)||papaya.utilities.ArrayUtils.contains(papaya.volume.dicom.HeaderDICOM.SUPPORTED_TRANSFER_SYNTAXES,a)};
papaya.volume.dicom.HeaderDICOM.prototype.finishedSeriesSelection=function(){0<this.series.images.length?(this.series.buildSeries(),this.isTransferSyntaxSupported()||(this.error=Error("This transfer syntax is currently not supported!"))):this.error=Error("No images found!");this.seriesMap=null;this.onFinishedHeaderRead()};
papaya.volume.dicom.HeaderDICOM.prototype.readHeaderData=function(a,b,e,d){this.onFinishedHeaderRead=d;this.dialogHandler=e;this.readNextHeaderData(a,0,b,papaya.utilities.ObjectUtils.bind(this,this.finishedHeaderRead))};
papaya.volume.dicom.HeaderDICOM.prototype.readNextHeaderData=function(a,b,e,d){var f,k;b>=a.length?(e.drawProgress(1,"Reading DICOM Headers"),d()):(f=daikon.Series.parseImage(new DataView(a[b])),null===f?this.error=daikon.Series.parserError:f.hasPixelData()?(k=this.findSeries(f.getSeriesId()),k||(k=new daikon.Series,this.seriesMap[f.getSeriesId()]=k),k.addImage(f)):this.error=Error("No pixel data found!"),this.error?d():(e.drawProgress(b/a.length,"Reading DICOM Headers"),setTimeout(function(){this.readNextHeaderData(a,
b+1,e,d)}.bind(this),0)))};papaya.volume.dicom.HeaderDICOM.prototype.getName=function(){var a=this.series.getName();return a?a:null};papaya.volume.dicom.HeaderDICOM.prototype.getSeriesLabels=function(){return null};papaya.volume.dicom.HeaderDICOM.prototype.findSeries=function(a){return 0===Object.keys(this.seriesMap).length?null:this.seriesMap[a]};papaya.volume.dicom.HeaderDICOM.prototype.readImageData=function(a,b){this.series.concatenateImageData(a,b)};
papaya.volume.dicom.HeaderDICOM.prototype.getImageDimensions=function(){var a,b,e;this.series.isMosaic?(a=this.series.images[0].getMosaicCols()*this.series.images[0].getMosaicRows(),a=new papaya.volume.ImageDimensions(parseInt(this.series.images[0].getCols()/this.series.images[0].getMosaicCols()),parseInt(this.series.images[0].getRows()/this.series.images[0].getMosaicRows()),a,this.series.images.length)):a=this.series.isMultiFrameVolume?new papaya.volume.ImageDimensions(this.series.images[0].getCols(),
this.series.images[0].getRows(),this.series.numberOfFrames,1):this.series.isMultiFrameTimeseries?new papaya.volume.ImageDimensions(this.series.images[0].getCols(),this.series.images[0].getRows(),this.series.numberOfFramesInFile,this.series.numberOfFrames):this.series.isImplicitTimeseries?new papaya.volume.ImageDimensions(this.series.images[0].getCols(),this.series.images[0].getRows(),parseInt(this.series.images.length/this.series.numberOfFrames),this.series.numberOfFrames):new papaya.volume.ImageDimensions(this.series.images[0].getCols(),
this.series.images[0].getRows(),this.series.images.length,1);e=parseInt(a.getNumVoxelsSeries()*parseInt(this.series.images[0].getBitsAllocated()/8)/this.series.images.length);for(b=0;b<this.series.images.length;b+=1)a.dataOffsets[b]=this.series.images[b].getPixelData().offsetValue,a.dataLengths[b]=e;return a};
papaya.volume.dicom.HeaderDICOM.prototype.getVoxelDimensions=function(){var a,b;a=this.series.images[0].getPixelSpacing()||[0,0];b=Math.max(this.series.images[0].getSliceGap(),this.series.images[0].getSliceThickness());daikon.Series.useExplicitSpacing&&(b=daikon.Series.useExplicitSpacing);this.series.isMosaic||this.series.isMultiFrame||1===this.series.images.length||daikon.Series.useExplicitOrdering||(b=Math.abs(this.series.images[0].getSliceLocation()-this.series.images[1].getSliceLocation()),0===
b&&(b=Math.max(this.series.images[0].getSliceGap(),this.series.images[0].getSliceThickness())));a=new papaya.volume.VoxelDimensions(a[1],a[0],b,this.series.images[0].getTR()/1E3);a.isValid()||(0===a.rowSize&&(a.rowSize=1),0===a.colSize&&(a.colSize=1),0===a.sliceSize&&(a.sliceSize=1));a.spatialUnit=papaya.volume.VoxelDimensions.UNITS_MM;a.temporalUnit=papaya.volume.VoxelDimensions.UNITS_SEC;return a};
papaya.volume.dicom.HeaderDICOM.prototype.getImageType=function(){var a;a=this.series.images[0].getDataType();a=new papaya.volume.ImageType(a===daikon.Image.BYTE_TYPE_INTEGER?papaya.volume.ImageType.DATATYPE_INTEGER_SIGNED:a===daikon.Image.BYTE_TYPE_INTEGER_UNSIGNED?papaya.volume.ImageType.DATATYPE_INTEGER_UNSIGNED:a===daikon.Image.BYTE_TYPE_FLOAT?papaya.volume.ImageType.DATATYPE_FLOAT:a===daikon.Image.BYTE_TYPE_RGB?papaya.volume.ImageType.DATATYPE_RGB:papaya.volume.ImageType.DATATYPE_UNKNOWN,parseInt(this.series.images[0].getBitsAllocated()/
8),this.series.images[0].littleEndian,!1);a.rgbBySample=1===this.series.images[0].getPlanarConfig();return a};
papaya.volume.dicom.HeaderDICOM.prototype.getImageRange=function(){var a,b,e,d,f,k,h,r,q,t=[],y=[];r=[];q=[];for(f=b=a=0;f<this.series.images.length;f+=1)e=this.series.images[f],d=e.getImageMax()*this.getDataScaleSlope(this.series.isElscint,e)+(e.getDataScaleIntercept()||0),e=e.getImageMin()*this.getDataScaleSlope(this.series.isElscint,e)+(e.getDataScaleIntercept()||0),0===f?(a=d,b=e):(d>a&&(a=d),e<b&&(b=e));k=d=0;if(this.series.isElscint)for(f=0;f<this.series.images.length;f+=1)e=this.series.images[f],
h=e.getWindowWidth()*e.getDataScaleElscint(),e=e.getWindowCenter()*e.getDataScaleElscint(),0===f?(d=h,k=e):k<e&&(d=h,k=e);else for(f=0;f<this.series.images.length;f+=1)e=this.series.images[f],h=e.getWindowWidth(),e=e.getWindowCenter(),0===f?(d=h,k=e):k<e&&(d=h,k=e);a=new papaya.volume.ImageRange(b,a);a.displayMin=k-d/2;a.displayMax=k+d/2;f=this.getImageDimensions();if(this.series.isMosaic){r=f.slices;q=r*this.series.images.length;for(f=0;f<q;f+=1)e=this.series.images[parseInt(f/r)],t[f]=this.getDataScaleSlope(this.series.isElscint,
e),y[f]=this.getDataScaleIntercept(this.series.isElscint,e);a.dataScaleSlopes=t;a.dataScaleIntercepts=y}else if(this.series.isMultiFrame){f=f.slices*f.timepoints;t=[];y=[];q=parseInt(f/this.series.images.length);for(f=0;f<this.series.images.length;f+=1)for(r=0;r<q;r+=1)e=this.series.images[f],t[f*q+r]=this.getDataScaleSlope(this.series.isElscint,e),y[f*q+r]=this.getDataScaleIntercept(this.series.isElscint,e);a.dataScaleSlopes=t;a.dataScaleIntercepts=y}else if(this.series.isImplicitTimeseries)if(f=
f.slices*f.timepoints,this.series.images.length!==f)a.setGlobalDataScale(this.getDataScaleSlope(this.series.isElscint,this.series.images[0]),this.getDataScaleIntercept(this.series.isElscint,this.series.images[0]),this.series.numberOfFrames);else{for(f=0;f<this.series.images.length;f+=1)e=this.series.images[f],r[f]=this.getDataScaleSlope(this.series.isElscint,e),q[f]=this.getDataScaleIntercept(this.series.isElscint,e);a.dataScaleSlopes=r;a.dataScaleIntercepts=q}else{for(f=0;f<this.series.images.length;f+=
1)e=this.series.images[f],r[f]=this.getDataScaleSlope(this.series.isElscint,e),q[f]=this.getDataScaleIntercept(this.series.isElscint,e);a.dataScaleSlopes=r;a.dataScaleIntercepts=q}a.validateDataScale();return a};papaya.volume.dicom.HeaderDICOM.prototype.getOrientation=function(){var a=this.series.images[0].getOrientation();null===a&&(a=papaya.volume.dicom.HeaderDICOM.ORIENTATION_DEFAULT);a=a.substring(0,5)+(this.series.sliceSense?"+":"-");return new papaya.volume.Orientation(a)};
papaya.volume.dicom.HeaderDICOM.prototype.getOrientationCertainty=function(){return null===this.series.images[0].getOrientation()?papaya.volume.Header.ORIENTATION_CERTAINTY_UNKNOWN:this.series.isMosaic||this.series.isMultiFrameVolume?papaya.volume.Header.ORIENTATION_CERTAINTY_LOW:papaya.volume.Header.ORIENTATION_CERTAINTY_HIGH};
papaya.volume.dicom.HeaderDICOM.prototype.getOrigin=function(){var a=this.getBestTransform();return a?(a=numeric.inv(a),new papaya.core.Coordinate(a[0][3],a[1][3],a[2][3])):new papaya.core.Coordinate(0,0,0)};papaya.volume.dicom.HeaderDICOM.prototype.hasError=function(){return null!==this.error};
papaya.volume.dicom.HeaderDICOM.prototype.getImageDescription=function(){var a,b,e,d,f,k="";a=this.series.images[0].getPatientName();b=this.series.images[0].getPatientID();e=this.series.images[0].getStudyTime();d=this.series.images[0].getStudyDate();f=this.series.images[0].getImageDescription();a&&(k+=" "+a);b&&(k+=" "+b);e&&(k+=" "+e);d&&(k+=" "+d);f&&(k+=" "+f);return new papaya.volume.ImageDescription(k.trim())};
papaya.volume.dicom.HeaderDICOM.prototype.getBestTransform=function(){var a=this.series.images[0].getImageDirections(),b=null;if(a)var b=this.getVoxelDimensions(),e=this.series.images[0].getImagePosition(),d=[a[0],a[1],a[2]],a=[a[3],a[4],a[5]],f=[d[1]*a[2]-d[2]*a[1],d[2]*a[0]-d[0]*a[2],d[0]*a[1]-d[1]*a[0]],b=[[d[0]*b.colSize*-1,a[0]*b.rowSize,f[0]*b.sliceSize,-1*e[0]],[d[1]*b.colSize,a[1]*b.rowSize*-1,f[1]*b.sliceSize,-1*e[1]],[d[2]*b.colSize,a[2]*b.rowSize,f[2]*b.sliceSize,e[2]],[0,0,0,1]];return b};
papaya.volume.dicom.HeaderDICOM.prototype.getBestTransformOrigin=function(){return this.getOrigin()};papaya.volume.dicom.HeaderDICOM.prototype.toString=function(){return this.series.images[0].toString()};"use strict";papaya=papaya||{};papaya.volume=papaya.volume||{};papaya.volume.Orientation=papaya.volume.Orientation||function(a){this.orientation=a;this.orientMat=null;this.zIncrement=this.yIncrement=this.xIncrement=-1};papaya.volume.Orientation.DEFAULT="XYZ+--";
papaya.volume.Orientation.isValidOrientationString=function(a){var b,e=!0;if(null===a||6!==a.length)e=!1;b=a.toUpperCase().indexOf("X");if(-1===b||2<b||a.toUpperCase().lastIndexOf("X")!==b)e=!1;b=a.toUpperCase().indexOf("Y");if(-1===b||2<b||a.toUpperCase().lastIndexOf("Y")!==b)e=!1;b=a.toUpperCase().indexOf("Z");if(-1===b||2<b||a.toUpperCase().lastIndexOf("Z")!==b)e=!1;"+"!==a.charAt(3)&&"-"!==a.charAt(3)&&(e=!1);"+"!==a.charAt(4)&&"-"!==a.charAt(4)&&(e=!1);"+"!==a.charAt(5)&&"-"!==a.charAt(5)&&(e=
!1);return e};papaya.volume.Orientation.prototype.convertIndexToOffsetNative=function(a,b,e){return a*this.xIncrement+b*this.yIncrement+e*this.zIncrement};
papaya.volume.Orientation.prototype.convertIndexToOffset=function(a,b,e){var d,f;d=papayaFloorFast(a*this.orientMat[0][0]+b*this.orientMat[0][1]+e*this.orientMat[0][2]+this.orientMat[0][3]);f=papayaFloorFast(a*this.orientMat[1][0]+b*this.orientMat[1][1]+e*this.orientMat[1][2]+this.orientMat[1][3]);a=papayaFloorFast(a*this.orientMat[2][0]+b*this.orientMat[2][1]+e*this.orientMat[2][2]+this.orientMat[2][3]);return d*this.xIncrement+f*this.yIncrement+a*this.zIncrement};
papaya.volume.Orientation.prototype.convertCoordinate=function(a,b){b.x=papayaRoundFast(a.x*this.orientMat[0][0]+a.y*this.orientMat[0][1]+a.z*this.orientMat[0][2]+this.orientMat[0][3]);b.y=papayaRoundFast(a.x*this.orientMat[1][0]+a.y*this.orientMat[1][1]+a.z*this.orientMat[1][2]+this.orientMat[1][3]);b.z=papayaRoundFast(a.x*this.orientMat[2][0]+a.y*this.orientMat[2][1]+a.z*this.orientMat[2][2]+this.orientMat[2][3]);return b};
papaya.volume.Orientation.prototype.createInfo=function(a,b){var e,d,f,k,h,r,q,t,y,G,B,w,E,P,da,aa;G=a.cols;B=a.rows;w=a.slices;E=a.getNumVoxelsSlice();P=b.colSize;da=b.rowSize;aa=b.sliceSize;q="+"===this.orientation.charAt(3);t="+"===this.orientation.charAt(4);y="+"===this.orientation.charAt(5);-1!==this.orientation.toUpperCase().indexOf("XYZ")?(a.xDim=G,a.yDim=B,a.zDim=w,b.xSize=P,b.ySize=da,b.zSize=aa,this.xIncrement=1,this.yIncrement=G,this.zIncrement=E,q?(e=1,k=0):(e=-1,k=G-1),t?(d=-1,h=B-1):
(d=1,h=0),y?(f=-1,r=w-1):(f=1,r=0)):-1!==this.orientation.toUpperCase().indexOf("XZY")?(a.xDim=G,a.yDim=w,a.zDim=B,b.xSize=P,b.ySize=aa,b.zSize=da,this.xIncrement=1,this.yIncrement=E,this.zIncrement=G,q?(e=1,k=0):(e=-1,k=G-1),t?(f=-1,r=B-1):(f=1,r=0),y?(d=-1,h=w-1):(d=1,h=0)):-1!==this.orientation.toUpperCase().indexOf("YXZ")?(a.xDim=B,a.yDim=G,a.zDim=w,b.xSize=da,b.ySize=P,b.zSize=aa,this.xIncrement=G,this.yIncrement=1,this.zIncrement=E,q?(d=-1,h=G-1):(d=1,h=0),t?(e=1,k=0):(e=-1,k=B-1),y?(f=-1,r=
w-1):(f=1,r=0)):-1!==this.orientation.toUpperCase().indexOf("YZX")?(a.xDim=w,a.yDim=G,a.zDim=B,b.xSize=aa,b.ySize=P,b.zSize=da,this.xIncrement=E,this.yIncrement=1,this.zIncrement=G,q?(d=-1,h=G-1):(d=1,h=0),t?(f=-1,r=B-1):(f=1,r=0),y?(e=1,k=0):(e=-1,k=w-1)):-1!==this.orientation.toUpperCase().indexOf("ZXY")?(a.xDim=B,a.yDim=w,a.zDim=G,b.xSize=da,b.ySize=aa,b.zSize=P,this.xIncrement=G,this.yIncrement=E,this.zIncrement=1,q?(f=-1,r=G-1):(f=1,r=0),t?(e=1,k=0):(e=-1,k=B-1),y?(d=-1,h=w-1):(d=1,h=0)):-1!==
this.orientation.toUpperCase().indexOf("ZYX")&&(a.xDim=w,a.yDim=B,a.zDim=G,b.xSize=aa,b.ySize=da,b.zSize=P,this.xIncrement=E,this.yIncrement=G,this.zIncrement=1,q?(f=-1,r=G-1):(f=1,r=0),t?(d=-1,h=B-1):(d=1,h=0),y?(e=1,k=0):(e=-1,k=w-1));this.orientMat=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];this.orientMat[0][0]=e;this.orientMat[0][1]=0;this.orientMat[0][2]=0;this.orientMat[0][3]=k;this.orientMat[1][0]=0;this.orientMat[1][1]=d;this.orientMat[1][2]=0;this.orientMat[1][3]=h;this.orientMat[2][0]=0;
this.orientMat[2][1]=0;this.orientMat[2][2]=f;this.orientMat[2][3]=r;this.orientMat[3][0]=0;this.orientMat[3][1]=0;this.orientMat[3][2]=0;this.orientMat[3][3]=1};papaya.volume.Orientation.prototype.isValid=function(){return papaya.volume.Orientation.isValidOrientationString(this.orientation)};
papaya.volume.Orientation.prototype.getOrientationDescription=function(){var a=this.orientation;return"Cols ("+a.charAt(0)+a.charAt(3)+"), Rows ("+a.charAt(1)+a.charAt(4)+"), Slices ("+a.charAt(2)+a.charAt(5)+")"};"use strict";papaya=papaya||{};papaya.volume=papaya.volume||{};
papaya.volume.Transform=papaya.volume.Transform||function(a,b){this.voxelValue=new papaya.volume.VoxelValue(b.imageData,b.header.imageType,b.header.imageDimensions,b.header.imageRange,b.header.orientation);this.voxelDimensions=b.header.voxelDimensions;this.imageDimensions=b.header.imageDimensions;this.volume=b;this.mat=papaya.volume.Transform.IDENTITY.clone();this.indexMat=papaya.volume.Transform.IDENTITY.clone();this.sizeMat=papaya.volume.Transform.IDENTITY.clone();this.sizeMatInverse=papaya.volume.Transform.IDENTITY.clone();
this.mmMat=papaya.volume.Transform.IDENTITY.clone();this.worldMat=papaya.volume.Transform.IDENTITY.clone();this.worldMatNifti=null;this.originMat=papaya.volume.Transform.IDENTITY.clone();this.tempMat=papaya.volume.Transform.IDENTITY.clone();this.tempMat2=papaya.volume.Transform.IDENTITY.clone();this.orientMat=papaya.volume.Transform.IDENTITY.clone();this.centerMat=papaya.volume.Transform.IDENTITY.clone();this.centerMatInverse=papaya.volume.Transform.IDENTITY.clone();this.rotMatX=papaya.volume.Transform.IDENTITY.clone();
this.rotMatY=papaya.volume.Transform.IDENTITY.clone();this.rotMatZ=papaya.volume.Transform.IDENTITY.clone();this.rotMat=papaya.volume.Transform.IDENTITY.clone();this.updateTransforms(a)};papaya.volume.Transform.IDENTITY=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];papaya.volume.Transform.EPSILON=1E-5;
papaya.volume.Transform.printTransform=function(a){console.log(a[0][0]+" "+a[0][1]+" "+a[0][2]+" "+a[0][3]);console.log(a[1][0]+" "+a[1][1]+" "+a[1][2]+" "+a[1][3]);console.log(a[2][0]+" "+a[2][1]+" "+a[2][2]+" "+a[2][3]);console.log(a[3][0]+" "+a[3][1]+" "+a[3][2]+" "+a[3][3])};
papaya.volume.Transform.decompose=function(a){var b,e,d,f,k,h,r,q,t,y,G,B,w,E,P,da,aa,M,ka,m;m=[];b=papaya.volume.Transform.validateNum(a[0][3]);e=papaya.volume.Transform.validateNum(a[1][3]);d=papaya.volume.Transform.validateNum(a[2][3]);f=papaya.volume.Transform.validateNum(Math.atan(a[2][1]/a[2][2]));k=0===f?papaya.volume.Transform.validateNum(Math.atan(-1*Math.cos(f)*(a[2][0]/a[2][2]))):papaya.volume.Transform.validateNum(Math.atan(-1*Math.sin(f)*(a[2][0]/a[2][1])));0===k&&(k=papaya.volume.Transform.EPSILON);
q=papaya.volume.Transform.validateScale(a[2][2]/(Math.cos(k)*Math.cos(f)));r=Math.cos(f);t=Math.sin(f)*Math.sin(k)+Math.sin(f)*(Math.cos(k)/Math.tan(k));y=a[1][0]*(Math.sin(f)/Math.tan(k))+a[1][1];h=-1*Math.sin(f);G=Math.cos(f)*Math.sin(k)+Math.cos(f)*(Math.cos(k)/Math.tan(k));B=a[1][0]*(Math.cos(f)/Math.tan(k))+a[1][2];h=papaya.volume.Transform.validateNum(Math.atan((r*B-y*h)/(y*G-t*B)));r=papaya.volume.Transform.validateScale(y/(Math.cos(h)*r+Math.sin(h)*t));t=papaya.volume.Transform.validateNum((r*
Math.sin(h)*Math.cos(k)-a[1][0])/(q*Math.sin(k)));y=Math.cos(k)*Math.cos(h);G=r*Math.cos(k)*Math.sin(h);B=-1*q*Math.sin(k);w=Math.sin(f)*Math.sin(k)*Math.cos(h)-Math.cos(f)*Math.sin(h);E=Math.sin(f)*Math.sin(k)*Math.sin(h)+Math.cos(f)*Math.cos(h);P=q*Math.sin(f)*Math.cos(k);da=Math.cos(f)*Math.sin(k)*Math.cos(h)+Math.sin(f)*Math.sin(h);aa=Math.cos(f)*Math.sin(k)*Math.sin(h)-Math.sin(f)*Math.cos(h);M=q*Math.cos(f)*Math.cos(k);E=G*w-y*E;P=B*w-y*P;w=w*a[0][0]-y*a[0][1];aa=G*da-y*aa;M=B*da-y*M;ka=da*
a[0][0]-y*a[0][2];da=papaya.volume.Transform.validateNum((aa*w-ka*E)/(P*aa-E*M));E=papaya.volume.Transform.validateNum((w*M-P*ka)/(E*M-P*aa));a=papaya.volume.Transform.validateScale((a[0][0]-E*G-da*B)/y);k===papaya.volume.Transform.EPSILON&&(k=0);f*=180/Math.PI;k*=180/Math.PI;h*=180/Math.PI;m[0]=papaya.volume.Transform.validateZero(b);m[1]=papaya.volume.Transform.validateZero(e);m[2]=papaya.volume.Transform.validateZero(d);m[3]=papaya.volume.Transform.validateZero(f);m[4]=papaya.volume.Transform.validateZero(k);
m[5]=papaya.volume.Transform.validateZero(h);m[6]=a;m[7]=r;m[8]=q;m[9]=papaya.volume.Transform.validateZero(t);m[10]=papaya.volume.Transform.validateZero(da);m[11]=papaya.volume.Transform.validateZero(E);return m};papaya.volume.Transform.hasRotations=function(a){var b,e;return null!==a?(b=papaya.volume.Transform.decompose(a),a=Math.abs(1-Math.abs(b[3])/90)%1,e=Math.abs(1-Math.abs(b[4])/90)%1,b=Math.abs(1-Math.abs(b[5])/90)%1,.01<a||.01<e||.01<b):!1};
papaya.volume.Transform.validateNum=function(a){return a===Number.POSITIVE_INFINITY||a===Number.NEGATIVE_INFINITY||isNaN(a)||0===a?0:a};papaya.volume.Transform.validateScale=function(a){return a===Number.POSITIVE_INFINITY||a===Number.NEGATIVE_INFINITY||isNaN(a)?1:a};papaya.volume.Transform.validateZero=function(a){return Math.abs(a)<papaya.volume.Transform.EPSILON?0:a};
papaya.volume.Transform.prototype.updateSizeMat=function(){this.sizeMat[0][0]=this.voxelDimensions.xSize;this.sizeMat[1][1]=this.voxelDimensions.ySize;this.sizeMat[2][2]=this.voxelDimensions.zSize;this.sizeMat[3][3]=1;this.sizeMatInverse[0][0]=1/this.voxelDimensions.xSize;this.sizeMatInverse[1][1]=1/this.voxelDimensions.ySize;this.sizeMatInverse[2][2]=1/this.voxelDimensions.zSize;this.sizeMatInverse[3][3]=1};papaya.volume.Transform.prototype.updateOrientMat=function(){this.orientMat=this.volume.header.orientation.orientMat};
papaya.volume.Transform.prototype.updateIndexTransform=function(){var a,b;for(a=0;4>a;a+=1)for(b=0;4>b;b+=1)this.indexMat[a][b]=this.orientMat[a][0]*this.mat[0][b]+this.orientMat[a][1]*this.mat[1][b]+this.orientMat[a][2]*this.mat[2][b]+this.orientMat[a][3]*this.mat[3][b]};
papaya.volume.Transform.prototype.updateMmTransform=function(){var a,b;for(a=0;4>a;a+=1)for(b=0;4>b;b+=1)this.mmMat[a][b]=this.indexMat[a][0]*this.sizeMatInverse[0][b]+this.indexMat[a][1]*this.sizeMatInverse[1][b]+this.indexMat[a][2]*this.sizeMatInverse[2][b]+this.indexMat[a][3]*this.sizeMatInverse[3][b]};
papaya.volume.Transform.prototype.updateOriginMat=function(){this.originMat[0][0]=1;this.originMat[1][1]=-1;this.originMat[2][2]=-1;this.originMat[3][3]=1;this.originMat[0][3]=this.volume.header.origin.x;this.originMat[1][3]=this.volume.header.origin.y;this.originMat[2][3]=this.volume.header.origin.z};
papaya.volume.Transform.prototype.updateImageMat=function(a,b,e,d,f,k){this.updateCenterMat(a,b,e);b=d*Math.PI/180;a=Math.cos(b);b=Math.sin(b);this.rotMatX[1][1]=a;this.rotMatX[1][2]=b;this.rotMatX[2][1]=-1*b;this.rotMatX[2][2]=a;b=f*Math.PI/180;a=Math.cos(b);b=Math.sin(b);this.rotMatY[0][0]=a;this.rotMatY[0][2]=-1*b;this.rotMatY[2][0]=b;this.rotMatY[2][2]=a;b=k*Math.PI/180;a=Math.cos(b);b=Math.sin(b);this.rotMatZ[0][0]=a;this.rotMatZ[0][1]=b;this.rotMatZ[1][0]=-1*b;this.rotMatZ[1][1]=a;for(f=0;4>
f;f+=1)for(k=0;4>k;k+=1)this.tempMat[f][k]=this.rotMatX[f][0]*this.rotMatY[0][k]+this.rotMatX[f][1]*this.rotMatY[1][k]+this.rotMatX[f][2]*this.rotMatY[2][k]+this.rotMatX[f][3]*this.rotMatY[3][k];for(f=0;4>f;f+=1)for(k=0;4>k;k+=1)this.rotMat[f][k]=this.tempMat[f][0]*this.rotMatZ[0][k]+this.tempMat[f][1]*this.rotMatZ[1][k]+this.tempMat[f][2]*this.rotMatZ[2][k]+this.tempMat[f][3]*this.rotMatZ[3][k];for(f=0;4>f;f+=1)for(k=0;4>k;k+=1)this.tempMat[f][k]=this.sizeMatInverse[f][0]*this.centerMatInverse[0][k]+
this.sizeMatInverse[f][1]*this.centerMatInverse[1][k]+this.sizeMatInverse[f][2]*this.centerMatInverse[2][k]+this.sizeMatInverse[f][3]*this.centerMatInverse[3][k];for(f=0;4>f;f+=1)for(k=0;4>k;k+=1)this.tempMat2[f][k]=this.tempMat[f][0]*this.rotMat[0][k]+this.tempMat[f][1]*this.rotMat[1][k]+this.tempMat[f][2]*this.rotMat[2][k]+this.tempMat[f][3]*this.rotMat[3][k];for(f=0;4>f;f+=1)for(k=0;4>k;k+=1)this.tempMat[f][k]=this.tempMat2[f][0]*this.centerMat[0][k]+this.tempMat2[f][1]*this.centerMat[1][k]+this.tempMat2[f][2]*
this.centerMat[2][k]+this.tempMat2[f][3]*this.centerMat[3][k];for(f=0;4>f;f+=1)for(k=0;4>k;k+=1)this.tempMat2[f][k]=this.tempMat[f][0]*this.sizeMat[0][k]+this.tempMat[f][1]*this.sizeMat[1][k]+this.tempMat[f][2]*this.sizeMat[2][k]+this.tempMat[f][3]*this.sizeMat[3][k];this.volume.transform.updateTransforms(this.tempMat2)};
papaya.volume.Transform.prototype.updateCenterMat=function(a,b,e){this.centerMat[0][0]=1;this.centerMat[1][1]=1;this.centerMat[2][2]=1;this.centerMat[3][3]=1;this.centerMat[0][3]=-1*a;this.centerMat[1][3]=-1*b;this.centerMat[2][3]=-1*e;this.centerMatInverse[0][0]=1;this.centerMatInverse[1][1]=1;this.centerMatInverse[2][2]=1;this.centerMatInverse[3][3]=1;this.centerMatInverse[0][3]=a;this.centerMatInverse[1][3]=b;this.centerMatInverse[2][3]=e};
papaya.volume.Transform.prototype.updateWorldMat=function(){var a,b,e,d;if(this.worldMatNifti){e=[[-1,0,0,this.imageDimensions.xDim-1],[0,1,0,0],[0,0,1,0],[0,0,0,1]];d=papaya.volume.Transform.IDENTITY.clone();d[0][0]=-1;d[1][1]=-1;d[2][2]=-1;d[3][3]=1;d[0][3]=this.volume.header.origin.x;d[1][3]=this.volume.header.origin.y;d[2][3]=this.volume.header.origin.z;for(a=0;4>a;a+=1)for(b=0;4>b;b+=1)this.tempMat[a][b]=this.sizeMat[a][0]*d[0][b]+this.sizeMat[a][1]*d[1][b]+this.sizeMat[a][2]*d[2][b]+this.sizeMat[a][3]*
d[3][b];for(a=0;4>a;a+=1)for(b=0;4>b;b+=1)this.tempMat2[a][b]=this.tempMat[a][0]*e[0][b]+this.tempMat[a][1]*e[1][b]+this.tempMat[a][2]*e[2][b]+this.tempMat[a][3]*e[3][b];for(a=0;4>a;a+=1)for(b=0;4>b;b+=1)this.tempMat[a][b]=this.tempMat2[a][0]*this.mat[0][b]+this.tempMat2[a][1]*this.mat[1][b]+this.tempMat2[a][2]*this.mat[2][b]+this.tempMat2[a][3]*this.mat[3][b];for(a=0;4>a;a+=1)for(b=0;4>b;b+=1)this.tempMat2[a][b]=this.tempMat[a][0]*e[0][b]+this.tempMat[a][1]*e[1][b]+this.tempMat[a][2]*e[2][b]+this.tempMat[a][3]*
e[3][b];for(a=0;4>a;a+=1)for(b=0;4>b;b+=1)this.tempMat[a][b]=this.tempMat2[a][0]*d[0][b]+this.tempMat2[a][1]*d[1][b]+this.tempMat2[a][2]*d[2][b]+this.tempMat2[a][3]*d[3][b];for(a=0;4>a;a+=1)for(b=0;4>b;b+=1)this.tempMat2[a][b]=this.tempMat[a][0]*this.sizeMatInverse[0][b]+this.tempMat[a][1]*this.sizeMatInverse[1][b]+this.tempMat[a][2]*this.sizeMatInverse[2][b]+this.tempMat[a][3]*this.sizeMatInverse[3][b];for(a=0;4>a;a+=1)for(b=0;4>b;b+=1)this.worldMat[a][b]=this.worldMatNifti[a][0]*this.tempMat2[0][b]+
this.worldMatNifti[a][1]*this.tempMat2[1][b]+this.worldMatNifti[a][2]*this.tempMat2[2][b]+this.worldMatNifti[a][3]*this.tempMat2[3][b]}else{for(a=0;4>a;a+=1)for(b=0;4>b;b+=1)this.tempMat[a][b]=this.indexMat[a][0]*this.originMat[0][b]+this.indexMat[a][1]*this.originMat[1][b]+this.indexMat[a][2]*this.originMat[2][b]+this.indexMat[a][3]*this.originMat[3][b];for(a=0;4>a;a+=1)for(b=0;4>b;b+=1)this.worldMat[a][b]=this.tempMat[a][0]*this.sizeMatInverse[0][b]+this.tempMat[a][1]*this.sizeMatInverse[1][b]+
this.tempMat[a][2]*this.sizeMatInverse[2][b]+this.tempMat[a][3]*this.sizeMatInverse[3][b]}};papaya.volume.Transform.prototype.updateMat=function(a){var b,e;for(e=0;4>e;e+=1)for(b=0;4>b;b+=1)this.mat[e][b]=a[e][b]};papaya.volume.Transform.prototype.updateTransforms=function(a){this.updateMat(a);this.updateSizeMat();this.updateOrientMat();this.updateOriginMat();this.updateIndexTransform();this.updateMmTransform();this.updateWorldMat()};
papaya.volume.Transform.prototype.getVoxelAtIndexNative=function(a,b,e,d,f){return this.voxelValue.getVoxelAtIndexNative(a,b,e,d,f)};papaya.volume.Transform.prototype.getVoxelAtIndex=function(a,b,e,d,f){return this.voxelValue.getVoxelAtIndex(a,b,e,d,f)};
papaya.volume.Transform.prototype.getVoxelAtCoordinate=function(a,b,e,d,f){return this.voxelValue.getVoxelAtIndexNative(a*this.worldMat[0][0]+b*this.worldMat[0][1]+e*this.worldMat[0][2]+this.worldMat[0][3],a*this.worldMat[1][0]+b*this.worldMat[1][1]+e*this.worldMat[1][2]+this.worldMat[1][3],a*this.worldMat[2][0]+b*this.worldMat[2][1]+e*this.worldMat[2][2]+this.worldMat[2][3],d,f)};
papaya.volume.Transform.prototype.getVoxelAtMM=function(a,b,e,d,f){return this.voxelValue.getVoxelAtIndexNative(a*this.mmMat[0][0]+b*this.mmMat[0][1]+e*this.mmMat[0][2]+this.mmMat[0][3],a*this.mmMat[1][0]+b*this.mmMat[1][1]+e*this.mmMat[1][2]+this.mmMat[1][3],a*this.mmMat[2][0]+b*this.mmMat[2][1]+e*this.mmMat[2][2]+this.mmMat[2][3],d,f)};"use strict";papaya=papaya||{};papaya.volume=papaya.volume||{};
papaya.volume.Volume=papaya.volume.Volume||function(a,b,e){this.progressMeter=a;this.dialogHandler=b;this.files=[];this.rawData=[];this.fileLength=0;this.fileName=this.urls=null;this.compressed=!1;this.transform=null;this.numTimepoints=0;this.transform=this.error=this.onFinishedRead=null;this.isLoaded=!1;this.numTimepoints=1;this.loaded=!1;this.params=e;this.header=new papaya.volume.Header(void 0!==this.params&&this.params.padAllImages);this.imageData=new papaya.volume.ImageData(void 0!==this.params&&
this.params.padAllImages)};papaya.volume.Volume.PROGRESS_LABEL_LOADING="Loading";papaya.volume.Volume.prototype.fileIsCompressed=function(a,b){var e,d;return a&&-1!==a.indexOf(".gz")||b&&(e=new DataView(b),d=e.getUint8(0),e=e.getUint8(1),d===GUNZIP_MAGIC_COOKIE1||e===GUNZIP_MAGIC_COOKIE2)?!0:!1};
papaya.volume.Volume.prototype.readFiles=function(a,b){this.files=a;this.fileName=a[0].name;this.onFinishedRead=b;this.compressed=this.fileIsCompressed(this.fileName);this.fileLength=this.files[0].size;this.readNextFile(this,0)};
papaya.volume.Volume.prototype.readNextFile=function(a,b){var e;if(b<this.files.length){e=papaya.utilities.PlatformUtils.makeSlice(this.files[b],0,this.files[b].size);try{var d=new FileReader;d.onloadend=papaya.utilities.ObjectUtils.bind(a,function(d){d.target.readyState===FileReader.DONE&&(a.rawData[b]=d.target.result,setTimeout(function(){a.readNextFile(a,b+1)},0))});d.onerror=papaya.utilities.ObjectUtils.bind(a,function(b){a.error=Error("There was a problem reading that file:\n\n"+b.getMessage());
a.finishedLoad()});d.readAsArrayBuffer(e)}catch(f){a.error=Error("There was a problem reading that file:\n\n"+f.message),a.finishedLoad()}}else setTimeout(function(){a.decompress(a)},0)};
papaya.volume.Volume.prototype.readURLs=function(a,b){var e=this;this.urls=a;this.fileName=a[0].substr(a[0].lastIndexOf("/")+1,a[0].length);this.onFinishedRead=b;this.compressed=this.fileIsCompressed(this.fileName);-1!==this.fileName.indexOf("?")&&(this.fileName=this.fileName.substr(0,this.fileName.indexOf("?")));this.rawData=[];this.loadedFileCount=0;this.readEachURL(this).done(function(){setTimeout(function(){e.decompress(e)},0)}).fail(function(a,b,e){b=b.message||"";"undefined"!==typeof e&&(b=
"Response status = "+e.status);a.error=Error("There was a problem reading that file ("+a.fileName+"):\n\n"+b);a.finishedLoad()})};
papaya.volume.Volume.prototype.loadURL=function(a,b,e){var d,f,k,h;d=jQuery.Deferred();"string"===typeof(new XMLHttpRequest).responseType?(f=new XMLHttpRequest,f.open("GET",a,!0),f.responseType="arraybuffer",f.onreadystatechange=function(){4===f.readyState&&(200===f.status?(b.fileLength=b.rawData.byteLength,d.resolve(f.response)):d.reject(b,!1,f))},f.onprogress=function(a){a.lengthComputable&&d.notify(a.loaded,a.total)},f.send(null)):(b.error=Error("There was a problem reading that file ("+b.fileName+
"):\n\nResponse type is not supported."),b.finishedLoad());return d.promise().done(function(a){b.loadedFileCount++;b.rawData[e]=a}).fail(function(a,b,d){console.error(a,b,d)}).progress(function(a,d){k=parseInt(100*b.loadedFileCount/b.urls.length,10);h=papaya.volume.Volume.PROGRESS_LABEL_LOADING+" image "+(b.loadedFileCount+1)+" of "+b.urls.length+" ("+k+"%)";b.progressMeter.drawProgress(a/d,h)})};
papaya.volume.Volume.prototype.readEachURL=function(a){for(var b=[],e=0;e<a.urls.length;e++){var d=a.loadURL(a.urls[e],a,e);b.push(d)}return $.when.apply($,b)};papaya.volume.Volume.prototype.readBinaryData=function(a,b){var e=null;try{this.fileName=a[0]instanceof ArrayBuffer?"unknown":a[0],this.onFinishedRead=b,e=this,this.fileLength=0,e.readNextBinaryData(e,0,a)}catch(d){e&&(e.error=Error("There was a problem reading that file:\n\n"+d.message),e.finishedLoad())}};
papaya.volume.Volume.prototype.readNextBinaryData=function(a,b,e){if(b<e.length)try{a.rawData[b]=e[b]instanceof ArrayBuffer?e[b]:papaya.utilities.ObjectUtils.dereference(e[b]),a.compressed=this.fileIsCompressed(this.fileName,a.rawData[b]),setTimeout(function(){a.readNextBinaryData(a,b+1,e)},0)}catch(d){a&&(a.error=Error("There was a problem reading that file:\n\n"+d.message),a.finishedLoad())}else a.decompress(a)};
papaya.volume.Volume.prototype.readEncodedData=function(a,b){var e=null;try{this.fileName=a[0],this.onFinishedRead=b,e=this,this.fileLength=0,e.readNextEncodedData(e,0,a)}catch(d){e&&(e.error=Error("There was a problem reading that file:\n\n"+d.message),e.finishedLoad())}};
papaya.volume.Volume.prototype.readNextEncodedData=function(a,b,e){if(b<e.length)try{var d=papaya.utilities.ObjectUtils.dereference(e[b]);d?a.rawData[b]=Base64Binary.decodeArrayBuffer(d):(this.fileName="unknown",a.rawData[b]=Base64Binary.decodeArrayBuffer(e[b]));a.compressed=this.fileIsCompressed(this.fileName,a.rawData[b]);setTimeout(function(){a.readNextEncodedData(a,b+1,e)},0)}catch(f){a&&(a.error=Error("There was a problem reading that file:\n\n"+f.message),a.finishedLoad())}else a.decompress(a)};
papaya.volume.Volume.prototype.getVoxelAtIndexNative=function(a,b,e,d,f){return this.transform.getVoxelAtIndexNative(a,b,e,0,f)};papaya.volume.Volume.prototype.getVoxelAtIndex=function(a,b,e,d,f){return this.transform.getVoxelAtIndex(a,b,e,d,f)};papaya.volume.Volume.prototype.getVoxelAtCoordinate=function(a,b,e,d,f){return this.transform.getVoxelAtCoordinate(a,b,e,d,f)};papaya.volume.Volume.prototype.getVoxelAtMM=function(a,b,e,d,f){return this.transform.getVoxelAtMM(a,b,e,d,f)};
papaya.volume.Volume.prototype.hasError=function(){return null!==this.error};papaya.volume.Volume.prototype.getXDim=function(){return this.header.imageDimensions.xDim};papaya.volume.Volume.prototype.getYDim=function(){return this.header.imageDimensions.yDim};papaya.volume.Volume.prototype.getZDim=function(){return this.header.imageDimensions.zDim};papaya.volume.Volume.prototype.getXSize=function(){return this.header.voxelDimensions.xSize};papaya.volume.Volume.prototype.getYSize=function(){return this.header.voxelDimensions.ySize};
papaya.volume.Volume.prototype.getZSize=function(){return this.header.voxelDimensions.zSize};papaya.volume.Volume.prototype.decompress=function(a){a.compressed=a.compressed||a.fileIsCompressed(a.fileName,a.rawData[0]);if(a.compressed)try{pako.inflate(new Uint8Array(a.rawData[0]),null,this.progressMeter,function(b){a.finishedDecompress(a,b.buffer)})}catch(b){console.log(b)}else setTimeout(function(){a.finishedReadData(a)},0)};
papaya.volume.Volume.prototype.finishedDecompress=function(a,b){a.rawData[0]=b;setTimeout(function(){a.finishedReadData(a)},0)};papaya.volume.Volume.prototype.finishedReadData=function(a){a.rawData=papaya.utilities.ArrayUtils.cleanArray(a.rawData);a.header.readHeaderData(a.fileName,a.rawData,this.progressMeter,this.dialogHandler,papaya.utilities.ObjectUtils.bind(this,this.finishedReadHeaderData))};
papaya.volume.Volume.prototype.finishedReadHeaderData=function(){this.rawData=null;this.header.hasError()?(this.error=this.header.error,console.error(this.error.stack),this.onFinishedRead(this)):(this.header.imageType.swapped=this.header.imageType.littleEndian!==papaya.utilities.PlatformUtils.isPlatformLittleEndian(),this.header.getName()&&(this.fileName=this.header.getName()),this.header.readImageData(this.progressMeter,papaya.utilities.ObjectUtils.bind(this,this.finishedReadImageData)))};
papaya.volume.Volume.prototype.finishedReadImageData=function(a){this.imageData.readFileData(this.header,a,papaya.utilities.ObjectUtils.bind(this,this.finishedLoad))};
papaya.volume.Volume.prototype.finishedLoad=function(){this.loaded||(this.loaded=!0,this.onFinishedRead&&(this.hasError()?console.log(this.error):(this.transform=new papaya.volume.Transform(papaya.volume.Transform.IDENTITY.clone(),this),this.numTimepoints=this.header.imageDimensions.timepoints||1,this.applyBestTransform()),this.isLoaded=!0,this.rawData=null,this.onFinishedRead(this)))};
papaya.volume.Volume.prototype.setOrigin=function(a){a=this.header.orientation.convertCoordinate(a,new papaya.core.Coordinate(0,0,0));this.header.origin.setCoordinate(a.x,a.y,a.z)};papaya.volume.Volume.prototype.getOrigin=function(){return this.header.orientation.convertCoordinate(this.header.origin,new papaya.core.Coordinate(0,0,0))};
papaya.volume.Volume.prototype.applyBestTransform=function(){var a=this.header.getBestTransform();null!==a&&(this.transform.worldMatNifti=numeric.inv(a),this.setOrigin(this.header.getBestTransformOrigin()),this.transform.updateWorldMat())};
papaya.volume.Volume.prototype.isWorldSpaceOnly=function(){var a,b=!1;return this.header.fileFormat instanceof papaya.volume.nifti.HeaderNIFTI?(a=this.header.fileFormat,0<a.nifti.qform_code&&(b|=!a.qFormHasRotations()),0<a.nifti.sform_code&&(b|=!a.sFormHasRotations()),!b):!1};papaya.volume.Volume.prototype.getSeriesLabels=function(){return this.header.getSeriesLabels()};"use strict";papaya=papaya||{};papaya.volume=papaya.volume||{};
papaya.volume.VoxelDimensions=papaya.volume.VoxelDimensions||function(a,b,e,d){this.colSize=Math.abs(a);this.rowSize=Math.abs(b);this.sliceSize=Math.abs(e);this.zSize=this.ySize=this.xSize=0;this.flip=!1;this.timeSize=d;this.temporalUnit=this.spatialUnit=papaya.volume.VoxelDimensions.UNITS_UNKNOWN};papaya.volume.VoxelDimensions.UNITS_UNKNOWN=0;papaya.volume.VoxelDimensions.UNITS_METER=1;papaya.volume.VoxelDimensions.UNITS_MM=2;papaya.volume.VoxelDimensions.UNITS_MICRON=3;
papaya.volume.VoxelDimensions.UNITS_SEC=8;papaya.volume.VoxelDimensions.UNITS_MSEC=16;papaya.volume.VoxelDimensions.UNITS_USEC=24;papaya.volume.VoxelDimensions.UNITS_HZ=32;papaya.volume.VoxelDimensions.UNITS_PPM=40;papaya.volume.VoxelDimensions.UNITS_RADS=48;papaya.volume.VoxelDimensions.UNIT_STRINGS=[];papaya.volume.VoxelDimensions.UNIT_STRINGS[papaya.volume.VoxelDimensions.UNITS_UNKNOWN]="Unknown Unit";papaya.volume.VoxelDimensions.UNIT_STRINGS[papaya.volume.VoxelDimensions.UNITS_METER]="Meters";
papaya.volume.VoxelDimensions.UNIT_STRINGS[papaya.volume.VoxelDimensions.UNITS_MM]="Millimeters";papaya.volume.VoxelDimensions.UNIT_STRINGS[papaya.volume.VoxelDimensions.UNITS_MICRON]="Microns";papaya.volume.VoxelDimensions.UNIT_STRINGS[papaya.volume.VoxelDimensions.UNITS_SEC]="Seconds";papaya.volume.VoxelDimensions.UNIT_STRINGS[papaya.volume.VoxelDimensions.UNITS_MSEC]="Milliseconds";papaya.volume.VoxelDimensions.UNIT_STRINGS[papaya.volume.VoxelDimensions.UNITS_USEC]="Microseconds";
papaya.volume.VoxelDimensions.UNIT_STRINGS[papaya.volume.VoxelDimensions.UNITS_HZ]="Hertz";papaya.volume.VoxelDimensions.UNIT_STRINGS[papaya.volume.VoxelDimensions.UNITS_PPM]="Parts-per-million";papaya.volume.VoxelDimensions.UNIT_STRINGS[papaya.volume.VoxelDimensions.UNITS_RADS]="Radians-per-second";papaya.volume.VoxelDimensions.prototype.isValid=function(){return 0<this.colSize&&0<this.rowSize&&0<this.sliceSize&&0<=this.timeSize};papaya.volume.VoxelDimensions.prototype.getSpatialUnitString=function(){return papaya.volume.VoxelDimensions.UNIT_STRINGS[this.spatialUnit]};
papaya.volume.VoxelDimensions.prototype.getTemporalUnitString=function(){return papaya.volume.VoxelDimensions.UNIT_STRINGS[this.temporalUnit]};papaya.volume.VoxelDimensions.prototype.getTemporalUnitMultiplier=function(){return this.temporalUnit===papaya.volume.VoxelDimensions.UNITS_MSEC?.001:this.temporalUnit===papaya.volume.VoxelDimensions.UNITS_USEC?1E-6:1};"use strict";papaya=papaya||{};papaya.volume=papaya.volume||{};
papaya.volume.VoxelValue=papaya.volume.VoxelValue||function(a,b,e,d,f){this.imageData=a;this.imageType=b;this.imageRange=d;this.orientation=f;this.swap16=2===this.imageType.numBytes&&this.imageType.swapped&&this.imageType.datatype!==papaya.volume.ImageType.DATATYPE_FLOAT;this.swap32=4===this.imageType.numBytes&&this.imageType.swapped&&this.imageType.datatype!==papaya.volume.ImageType.DATATYPE_FLOAT;this.xIncrement=f.xIncrement;this.yIncrement=f.yIncrement;this.zIncrement=f.zIncrement;this.xDim=e.xDim;
this.yDim=e.yDim;this.zDim=e.zDim;this.sliceSize=e.getNumVoxelsSlice();this.volSize=e.getNumVoxelsVolume();this.dataScaleSlopes=d.dataScaleSlopes;this.dataScaleIntercepts=d.dataScaleIntercepts;this.globalDataScaleSlope=d.globalDataScaleSlope;this.globalDataScaleIntercept=d.globalDataScaleIntercept;this.usesGlobalDataScale=d.usesGlobalDataScale;this.interpFirstPass=[[0,0],[0,0]];this.interpSecondPass=[0,0];this.forceABS=!1};
papaya.volume.VoxelValue.prototype.getVoxelAtIndexNative=function(a,b,e,d,f){return f?(a=papayaRoundFast(a),b=papayaRoundFast(b),e=papayaRoundFast(e),this.getVoxelAtOffset(this.orientation.convertIndexToOffsetNative(a,b,e),d,a,b,e)):this.getVoxelAtIndexLinear(a,b,e,d)};
papaya.volume.VoxelValue.prototype.getVoxelAtIndex=function(a,b,e,d,f){return f?(a=papayaRoundFast(a),b=papayaRoundFast(b),e=papayaRoundFast(e),this.getVoxelAtOffset(this.orientation.convertIndexToOffset(a,b,e),d,a,b,e)):this.getVoxelAtIndexLinear(a,b,e,d)};
papaya.volume.VoxelValue.prototype.getVoxelAtOffset=function(a,b,e,d,f){a+=this.volSize*b;if(0>e||e>=this.xDim||0>d||d>=this.yDim||0>f||f>=this.zDim)return 0;this.usesGlobalDataScale?e=this.checkSwap(this.imageData.data[a])*this.globalDataScaleSlope+this.globalDataScaleIntercept:(e=parseInt(a/this.sliceSize),e=this.checkSwap(this.imageData.data[a])*this.dataScaleSlopes[e]+this.dataScaleIntercepts[e]);return this.forceABS?Math.abs(e):e};
papaya.volume.VoxelValue.prototype.getVoxelAtIndexLinear=function(a,b,e,d){var f,k,h,r,q,t,y,G,B;q=Math.floor(a);t=Math.floor(b);y=Math.floor(e);f=a-q;k=b-t;h=e-y;r=0!==f;G=0!==k;B=0!==h;if(r&&G&&B){for(b=0;2>b;b+=1)for(e=0;2>e;e+=1)r=this.orientation.convertIndexToOffsetNative(q+b,t+e,y),a=this.getVoxelAtOffset(r,d,q+b,t+e,y)*(1-h),r=this.orientation.convertIndexToOffsetNative(q+b,t+e,y+1),r=this.getVoxelAtOffset(r,d,q+b,t+e,y+1)*h,this.interpFirstPass[b][e]=a+r;this.interpSecondPass[0]=this.interpFirstPass[0][0]*
(1-k)+this.interpFirstPass[0][1]*k;this.interpSecondPass[1]=this.interpFirstPass[1][0]*(1-k)+this.interpFirstPass[1][1]*k;d=this.interpSecondPass[0]*(1-f)+this.interpSecondPass[1]*f}else if(r&&G&&!B){for(b=0;2>b;b+=1)r=this.orientation.convertIndexToOffsetNative(q+b,t,y),a=this.getVoxelAtOffset(r,d,q+b,t,y)*(1-k),r=this.orientation.convertIndexToOffsetNative(q+b,t+1,y),r=this.getVoxelAtOffset(r,d,q+b,t+1,y)*k,this.interpSecondPass[b]=a+r;d=this.interpSecondPass[0]*(1-f)+this.interpSecondPass[1]*f}else if(r&&
!G&&B){for(b=0;2>b;b+=1)r=this.orientation.convertIndexToOffsetNative(q+b,t,y),a=this.getVoxelAtOffset(r,d,q+b,t,y)*(1-h),r=this.orientation.convertIndexToOffsetNative(q+b,t,y+1),r=this.getVoxelAtOffset(r,d,q+b,t,y+1)*h,this.interpSecondPass[b]=a+r;d=this.interpSecondPass[0]*(1-f)+this.interpSecondPass[1]*f}else if(!r&&G&&B){for(e=0;2>e;e+=1)r=this.orientation.convertIndexToOffsetNative(q,t+e,y),a=this.getVoxelAtOffset(r,d,q,t+e,y)*(1-h),r=this.orientation.convertIndexToOffsetNative(q,t+e,y+1),r=
this.getVoxelAtOffset(r,d,q,t+e,y+1)*h,this.interpSecondPass[e]=a+r;d=this.interpSecondPass[0]*(1-k)+this.interpSecondPass[1]*k}else r||G||!B?r||!G||B?!r||G||B?d=this.getVoxelAtOffset(this.orientation.convertIndexToOffsetNative(a,b,e),d,a,b,e):(r=this.orientation.convertIndexToOffsetNative(q,t,y),a=this.getVoxelAtOffset(r,d,q,t,y)*(1-f),r=this.orientation.convertIndexToOffsetNative(q+1,t,y),r=this.getVoxelAtOffset(r,d,q+1,t,y)*f,d=a+r):(r=this.orientation.convertIndexToOffsetNative(q,t,y),a=this.getVoxelAtOffset(r,
d,q,t,y)*(1-k),r=this.orientation.convertIndexToOffsetNative(q,t+1,y),r=this.getVoxelAtOffset(r,d,q,t+1,y)*k,d=a+r):(r=this.orientation.convertIndexToOffsetNative(q,t,y),a=this.getVoxelAtOffset(r,d,q,t,y)*(1-h),r=this.orientation.convertIndexToOffsetNative(q,t,y+1),r=this.getVoxelAtOffset(r,d,q,t,y+1)*h,d=a+r);return d};papaya.volume.VoxelValue.prototype.checkSwap=function(a){return this.swap16?((a&255)<<8|a>>8&255)<<16>>16:this.swap32?(a&255)<<24|(a&65280)<<8|a>>8&65280|a>>24&255:a};"use strict";
papaya=papaya||{};papaya.surface=papaya.surface||{};
papaya.surface.Surface=papaya.surface.Surface||function(a,b){this.progressMeter=a;this.colorsData=this.normalsData=this.triangleData=this.pointData=this.onFinishedRead=this.rawData=this.filename=this.error=null;this.numTriangles=this.numPoints=0;this.solidColor=this.colorsBuffer=this.normalsBuffer=this.trianglesBuffer=this.pointsBuffer=null;this.surfaceType=papaya.surface.Surface.SURFACE_TYPE_UNKNOWN;this.fileFormat=null;this.params=b;this.volume=this.nextSurface=null;this.alpha=1};
papaya.surface.Surface.SURFACE_TYPE_UNKNOWN=0;papaya.surface.Surface.SURFACE_TYPE_GIFTI=1;papaya.surface.Surface.SURFACE_TYPE_MANGO=2;papaya.surface.Surface.SURFACE_TYPE_VTK=3;papaya.surface.Surface.findSurfaceType=function(a){return gifti.isThisFormat(a)?papaya.surface.Surface.SURFACE_TYPE_GIFTI:papaya.surface.SurfaceMango.isThisFormat(a)?papaya.surface.Surface.SURFACE_TYPE_MANGO:papaya.surface.SurfaceVTK.isThisFormat(a)?papaya.surface.Surface.SURFACE_TYPE_VTK:papaya.surface.Surface.SURFACE_TYPE_UNKNOWN};
papaya.surface.Surface.prototype.makeFileFormat=function(a){this.surfaceType=papaya.surface.Surface.findSurfaceType(a);this.surfaceType===papaya.surface.Surface.SURFACE_TYPE_GIFTI?this.fileFormat=new papaya.surface.SurfaceGIFTI:this.surfaceType===papaya.surface.Surface.SURFACE_TYPE_MANGO?this.fileFormat=new papaya.surface.SurfaceMango:this.surfaceType===papaya.surface.Surface.SURFACE_TYPE_VTK&&(this.fileFormat=new papaya.surface.SurfaceVTK)};
papaya.surface.Surface.prototype.readURL=function(a,b,e){var d,f=this;this.filename=a.substr(a.lastIndexOf("/")+1,a.length);this.onFinishedRead=e;this.volume=b;this.processParams(this.filename);this.makeFileFormat(this.filename);if(this.surfaceType===papaya.surface.Surface.SURFACE_TYPE_UNKNOWN)this.error=Error("This surface format is not supported!"),this.finishedLoading();else try{"string"===typeof(new XMLHttpRequest).responseType?(d=new XMLHttpRequest,d.open("GET",a,!0),this.fileFormat.isSurfaceDataBinary()&&
(d.responseType="arraybuffer"),d.onreadystatechange=function(){4===d.readyState&&(200===d.status?f.rawData=d.response:f.error=Error("There was a problem reading that file ("+f.filename+"):\n\nResponse status = "+d.status),f.finishedLoading())},d.onprogress=function(a){a.lengthComputable&&f.progressMeter.drawProgress(a.loaded/a.total,papaya.volume.Volume.PROGRESS_LABEL_LOADING)},d.send(null)):(f.error=Error("There was a problem reading that file ("+f.filename+"):\n\nResponse type is not supported."),
f.finishedLoading())}catch(k){null!==f&&(f.error=Error("There was a problem reading that file ("+f.filename+"):\n\n"+k.message),f.finishedLoading())}};
papaya.surface.Surface.prototype.readFile=function(a,b,e){var d=papaya.utilities.PlatformUtils.makeSlice(a,0,a.size),f=this;this.filename=a.name;this.onFinishedRead=e;this.volume=b;this.processParams(this.filename);this.makeFileFormat(this.filename);if(this.surfaceType===papaya.surface.Surface.SURFACE_TYPE_UNKNOWN)this.error=Error("This surface format is not supported!"),this.finishedLoading();else try{var k=new FileReader;k.onloadend=function(a){a.target.readyState===FileReader.DONE&&(f.rawData=
a.target.result,f.finishedLoading())};k.onerror=function(a){f.error=Error("There was a problem reading that file:\n\n"+a.getMessage());f.finishedLoading()};this.fileFormat.isSurfaceDataBinary()?k.readAsArrayBuffer(d):k.readAsText(d)}catch(h){f.error=Error("There was a problem reading that file:\n\n"+h.message),f.finishedLoading()}};
papaya.surface.Surface.prototype.readEncodedData=function(a,b,e){this.filename=a+".surf.gii";this.onFinishedRead=e;this.volume=b;this.processParams(a);this.makeFileFormat(this.filename);if(this.surfaceType===papaya.surface.Surface.SURFACE_TYPE_UNKNOWN)this.error=Error("This surface format is not supported!");else try{this.fileFormat.isSurfaceDataBinary()?this.rawData=Base64Binary.decodeArrayBuffer(papaya.utilities.ObjectUtils.dereference(a)):this.rawData=atob(papaya.utilities.ObjectUtils.dereference(a))}catch(d){this.error=
Error("There was a problem reading that file:\n\n"+d.message)}this.finishedLoading()};papaya.surface.Surface.prototype.processParams=function(a){if(a=this.params[a])void 0!==a.color&&(this.solidColor=a.color),void 0!==a.alpha&&(this.alpha=a.alpha),void 0!==a.icon&&(this.staticIcon=a.icon)};papaya.surface.Surface.prototype.finishedLoading=function(){this.readData()};
papaya.surface.Surface.prototype.readData=function(){if(this.error)console.log(this.error),this.onFinishedRead(this);else{var a=this.progressMeter,b=function(b){a.drawProgress(b,"Loading surface...")};try{this.fileFormat.readData(this.rawData,b,papaya.utilities.ObjectUtils.bind(this,this.finishedReading),this.volume)}catch(e){this.error=e,this.onFinishedRead(this)}}};
papaya.surface.Surface.prototype.finishedReading=function(){var a=this.fileFormat.getNumSurfaces(),b=this,e;if(this.fileFormat.error)this.error=this.fileFormat.error;else for(e=0;e<a;e+=1)0<e&&(b.nextSurface=new papaya.surface.Surface,b=b.nextSurface),b.numPoints=this.fileFormat.getNumPoints(e),b.numTriangles=this.fileFormat.getNumTriangles(e),b.pointData=this.fileFormat.getPointData(e),b.normalsData=this.fileFormat.getNormalsData(e),b.triangleData=this.fileFormat.getTriangleData(e),b.colorsData=
this.fileFormat.getColorsData(e),null===b.normalsData&&this.generateNormals(),this.fileFormat.getSolidColor(e)&&(b.solidColor=this.fileFormat.getSolidColor(e));this.progressMeter.drawProgress(1,"Loading surface...");this.onFinishedRead(this)};
papaya.surface.Surface.prototype.generateNormals=function(){var a=[],b=[],e=[],d=[],f=[],k,h=this.pointData.length,r,q,t,y,G,B,w,E,P,da;this.normalsData=new Float32Array(h);r=3*this.numTriangles;for(k=0;k<r;k+=3)E=3*this.triangleData[k],P=3*this.triangleData[k+1],da=3*this.triangleData[k+2],a.x=this.pointData[E],a.y=this.pointData[E+1],a.z=this.pointData[E+2],b.x=this.pointData[P],b.y=this.pointData[P+1],b.z=this.pointData[P+2],e.x=this.pointData[da],e.y=this.pointData[da+1],e.z=this.pointData[da+
2],q=b.x-a.x,t=b.y-a.y,y=b.z-a.z,G=e.x-a.x,B=e.y-a.y,w=e.z-a.z,d[0]=B*y-w*t,d[1]=w*q-G*y,d[2]=G*t-B*q,this.normalsData[E]+=d[0],this.normalsData[E+1]+=d[1],this.normalsData[E+2]+=d[2],this.normalsData[P]+=d[0],this.normalsData[P+1]+=d[1],this.normalsData[P+2]+=d[2],this.normalsData[da]+=d[0],this.normalsData[da+1]+=d[1],this.normalsData[da+2]+=d[2];for(k=0;k<h;k+=3)d[0]=-1*this.normalsData[k],d[1]=-1*this.normalsData[k+1],d[2]=-1*this.normalsData[k+2],vec3.normalize(d,f),this.normalsData[k]=f[0],
this.normalsData[k+1]=f[1],this.normalsData[k+2]=f[2]};"use strict";papaya=papaya||{};papaya.surface=papaya.surface||{};papaya.surface.SurfaceGIFTI=papaya.surface.SurfaceGIFTI||function(){this.onFinishedRead=this.colorsData=this.normalsData=this.triangleData=this.pointData=this.error=this.gii=null};papaya.surface.SurfaceGIFTI.prototype.isSurfaceDataBinary=function(){return!1};
papaya.surface.SurfaceGIFTI.prototype.readData=function(a,b,e){var d=this;b(0);this.onFinishedRead=e;this.gii=gifti.parse(a);setTimeout(function(){d.readDataPoints(d,b)},0)};papaya.surface.SurfaceGIFTI.prototype.readDataPoints=function(a,b){b(.2);null!=a.gii.getPointsDataArray()?a.pointData=a.gii.getPointsDataArray().getData():a.error=Error("Surface is missing point information!");setTimeout(function(){a.readDataNormals(a,b)},0)};
papaya.surface.SurfaceGIFTI.prototype.readDataNormals=function(a,b){b(.4);null!=a.gii.getNormalsDataArray()&&(a.normalsData=a.gii.getNormalsDataArray().getData());setTimeout(function(){a.readDataTriangles(a,b)},0)};papaya.surface.SurfaceGIFTI.prototype.readDataTriangles=function(a,b){b(.6);null!=a.gii.getTrianglesDataArray()?a.triangleData=a.gii.getTrianglesDataArray().getData():a.error=Error("Surface is missing triangle information!");setTimeout(function(){a.readDataColors(a,b)},0)};
papaya.surface.SurfaceGIFTI.prototype.readDataColors=function(a,b){b(.8);null!=a.gii.getColorsDataArray()&&(a.colorsData=a.gii.getColorsDataArray().getData());setTimeout(function(){a.onFinishedRead()},0)};papaya.surface.SurfaceGIFTI.prototype.getNumSurfaces=function(){return 1};papaya.surface.SurfaceGIFTI.prototype.getNumPoints=function(){return this.gii.getNumPoints()};papaya.surface.SurfaceGIFTI.prototype.getNumTriangles=function(){return this.gii.getNumTriangles()};
papaya.surface.SurfaceGIFTI.prototype.getPointData=function(){return this.pointData};papaya.surface.SurfaceGIFTI.prototype.getNormalsData=function(){return this.normalsData};papaya.surface.SurfaceGIFTI.prototype.getTriangleData=function(){return this.triangleData};papaya.surface.SurfaceGIFTI.prototype.getColorsData=function(){return this.colorsData};papaya.surface.SurfaceGIFTI.prototype.getSolidColor=function(){return this.solidColor};"use strict";papaya=papaya||{};
papaya.surface=papaya.surface||{};papaya.surface.SurfaceMango=papaya.surface.SurfaceMango||function(){this.onFinishedRead=this.error=null;this.origin=[];this.imageDims=[];this.voxelDims=[];this.center=[];this.diffs=[];this.dv=null;this.numSurfaces=this.dataLength=this.surfaceIndex=this.index=0;this.littleEndian=!1;this.surfaces=[];this.v15=this.v14=!1};
papaya.surface.SurfaceMangoData=papaya.surface.SurfaceMangoData||function(){this.colorsData=this.normalsData=this.triangleData=this.pointData=null;this.solidColor=[]};papaya.surface.SurfaceMango.MAGIC_NUMBER_LITTLE_1_5="mangol15".split("");papaya.surface.SurfaceMango.MAGIC_NUMBER_BIG_1_5="mangob15".split("");papaya.surface.SurfaceMango.MAGIC_NUMBER_LITTLE_1_4="mangol14".split("");papaya.surface.SurfaceMango.MAGIC_NUMBER_BIG_1_4="mangob14".split("");
papaya.surface.SurfaceMango.SURFACE_OVERLAY_MAGIC_NUMBER=[0,0,0,0,"s","c","a","l"];papaya.surface.SurfaceMango.NAME_SIZE=64;papaya.surface.SurfaceMango.isThisFormat=function(a){return a.endsWith(".surf")};papaya.surface.SurfaceMango.prototype.isSurfaceDataBinary=function(){return!0};
papaya.surface.SurfaceMango.prototype.isLittleEndian15=function(a){a=new Uint8Array(a);var b;for(b=0;b<papaya.surface.SurfaceMango.MAGIC_NUMBER_LITTLE_1_5.length;b+=1)if(a[b]!==papaya.surface.SurfaceMango.MAGIC_NUMBER_LITTLE_1_5[b].charCodeAt(0))return!1;return!0};
papaya.surface.SurfaceMango.prototype.isLittleEndian14=function(a){a=new Uint8Array(a);var b;for(b=0;b<papaya.surface.SurfaceMango.MAGIC_NUMBER_LITTLE_1_4.length;b+=1)if(a[b]!==papaya.surface.SurfaceMango.MAGIC_NUMBER_LITTLE_1_4[b].charCodeAt(0))return!1;return!0};
papaya.surface.SurfaceMango.prototype.isVersion15=function(a){a=new Uint8Array(a);var b,e=!0;for(b=0;b<papaya.surface.SurfaceMango.MAGIC_NUMBER_LITTLE_1_5.length;b+=1)if(a[b]!==papaya.surface.SurfaceMango.MAGIC_NUMBER_LITTLE_1_5[b].charCodeAt(0)){e=!1;break}if(!e)for(e=!0,b=0;b<papaya.surface.SurfaceMango.MAGIC_NUMBER_BIG_1_5.length;b+=1)if(a[b]!==papaya.surface.SurfaceMango.MAGIC_NUMBER_BIG_1_5[b].charCodeAt(0)){e=!1;break}return e};
papaya.surface.SurfaceMango.prototype.isVersion14=function(a){a=new Uint8Array(a);var b,e=!0;for(b=0;b<papaya.surface.SurfaceMango.MAGIC_NUMBER_LITTLE_1_4.length;b+=1)if(a[b]!==papaya.surface.SurfaceMango.MAGIC_NUMBER_LITTLE_1_4[b].charCodeAt(0)){e=!1;break}if(!e)for(e=!0,b=0;b<papaya.surface.SurfaceMango.MAGIC_NUMBER_BIG_1_4.length;b+=1)if(a[b]!==papaya.surface.SurfaceMango.MAGIC_NUMBER_BIG_1_4[b].charCodeAt(0)){e=!1;break}return e};
papaya.surface.SurfaceMango.prototype.isLittleEndian=function(a){return this.isLittleEndian15(a)||this.isLittleEndian14(a)};papaya.surface.SurfaceMango.prototype.hasOverlay=function(){var a,b;for(a=0;a<papaya.surface.SurfaceMango.SURFACE_OVERLAY_MAGIC_NUMBER.length;a+=1)if((b=papaya.surface.SurfaceMango.SURFACE_OVERLAY_MAGIC_NUMBER[a])&&(b=papaya.surface.SurfaceMango.SURFACE_OVERLAY_MAGIC_NUMBER[a].charCodeAt(0)),this.dv.getUint8(this.index+a)!==b)return!1;return!0};
papaya.surface.SurfaceMango.prototype.getString=function(a){var b,e=[];for(b=0;b<a;b+=1)e[b]=this.dv.getUint8(this.index+b);return String.fromCharCode.apply(null,e)};
papaya.surface.SurfaceMango.prototype.readData=function(a,b,e){b(.2);this.littleEndian=this.isLittleEndian(a);this.dataLength=a.byteLength;this.v14=this.isVersion14(a);this.v15=this.isVersion15(a);this.index=papaya.surface.SurfaceMango.MAGIC_NUMBER_LITTLE_1_5.length;this.dv=new DataView(a);if(!this.v14&&!this.v15)throw Error("Only Mango surface format version 1.4 and 1.5 are supported!");this.onFinishedRead=e;a=this.dv.getUint32(this.index,this.littleEndian);this.index+=4;this.numSurfaces=this.dv.getUint32(this.index,
this.littleEndian);this.index+=4;this.index+=128;this.imageDims[0]=this.dv.getUint32(this.index,this.littleEndian);this.index+=4;this.imageDims[1]=this.dv.getUint32(this.index,this.littleEndian);this.index+=4;this.imageDims[2]=this.dv.getUint32(this.index,this.littleEndian);this.index+=4;this.voxelDims[0]=this.dv.getFloat32(this.index,this.littleEndian);this.index+=4;this.voxelDims[1]=this.dv.getFloat32(this.index,this.littleEndian);this.index+=4;this.voxelDims[2]=this.dv.getFloat32(this.index,this.littleEndian);
this.index+=4;this.origin[0]=this.dv.getFloat32(this.index,this.littleEndian)*this.voxelDims[0];this.index+=4;this.origin[1]=this.dv.getFloat32(this.index,this.littleEndian)*this.voxelDims[1];this.index+=4;this.origin[2]=this.dv.getFloat32(this.index,this.littleEndian)*this.voxelDims[2];this.index+=4;this.center[0]=this.imageDims[0]*this.voxelDims[0]/2;this.center[1]=this.imageDims[1]*this.voxelDims[1]/2;this.center[2]=this.imageDims[2]*this.voxelDims[2]/2;this.v14?(this.diffs[0]=this.center[0]-this.origin[0],
this.diffs[1]=this.center[1]-this.origin[1],this.diffs[2]=this.origin[2]-this.center[2]):(this.diffs[0]=this.center[0]-this.origin[0],this.diffs[1]=this.center[1]-this.origin[1],this.diffs[2]=this.center[2]-this.origin[2]);this.index+=4;this.index+=a;this.readNextSurface(this,b)};
papaya.surface.SurfaceMango.prototype.readNextSurface=function(a,b){var e=new papaya.surface.SurfaceMangoData;a.index+=papaya.surface.SurfaceMango.NAME_SIZE;a.surfaces[a.surfaceIndex]=e;a.surfaces[a.surfaceIndex].solidColor[0]=a.dv.getFloat32(a.index,a.littleEndian);a.index+=4;a.surfaces[a.surfaceIndex].solidColor[1]=a.dv.getFloat32(a.index,a.littleEndian);a.index+=4;a.surfaces[a.surfaceIndex].solidColor[2]=a.dv.getFloat32(a.index,a.littleEndian);a.index+=4;setTimeout(function(){a.readDataPoints(a,
b)},0)};
papaya.surface.SurfaceMango.prototype.readDataPoints=function(a,b){var e,d;b(.4);a.index+=4;e=a.dv.getInt32(a.index,a.littleEndian);a.index+=4;a.surfaces[a.surfaceIndex].pointData=new Float32Array(e);if(a.v14)for(d=0;d<e;d+=1,a.index+=4)a.surfaces[a.surfaceIndex].pointData[d]=(2!==d%3?-1:1)*(a.dv.getFloat32(a.index,a.littleEndian)+a.diffs[d%3]);else for(d=0;d<e;d+=1,a.index+=4)a.surfaces[a.surfaceIndex].pointData[d]=(0!==d%3?-1:1)*(a.dv.getFloat32(a.index,a.littleEndian)+a.diffs[d%3]);setTimeout(function(){a.readDataNormals(a,b)},
0)};
papaya.surface.SurfaceMango.prototype.readDataNormals=function(a,b){var e,d;b(.6);a.index+=4;e=a.dv.getInt32(a.index,a.littleEndian);a.index+=4;a.surfaces[a.surfaceIndex].normalsData=new Float32Array(e);if(a.v14)for(d=0;d<e;d+=1,a.index+=4)a.surfaces[a.surfaceIndex].normalsData[d]=(2!==d%3?-1:1)*a.dv.getFloat32(a.index,a.littleEndian);else for(d=0;d<e;d+=1,a.index+=4)a.surfaces[a.surfaceIndex].normalsData[d]=(0!==d%3?-1:1)*a.dv.getFloat32(a.index,a.littleEndian);setTimeout(function(){a.readDataTriangles(a,b)},
0)};papaya.surface.SurfaceMango.prototype.readDataTriangles=function(a,b){var e,d;b(.8);a.index+=4;e=a.dv.getInt32(a.index,a.littleEndian);a.index+=4;a.surfaces[a.surfaceIndex].triangleData=new Uint32Array(e);for(d=0;d<e;d+=1,a.index+=4)a.surfaces[a.surfaceIndex].triangleData[d]=a.dv.getUint32(a.index,a.littleEndian);setTimeout(function(){a.readDataColors(a,b)},0)};
papaya.surface.SurfaceMango.prototype.readDataColors=function(a,b){for(var e,d,f,k,h,r,q,t;a.index<a.dataLength;)if(a.hasOverlay()){a.index+=papaya.surface.SurfaceMango.SURFACE_OVERLAY_MAGIC_NUMBER.length;a.index+=papaya.surface.SurfaceMango.NAME_SIZE;q=a.getString(papaya.surface.SurfaceMango.NAME_SIZE);a.index+=papaya.surface.SurfaceMango.NAME_SIZE;q=q.replace(/\0/g,"");a.index+=4;e=a.dv.getFloat32(this.index,this.littleEndian);a.index+=4;d=a.dv.getFloat32(this.index,this.littleEndian);a.index+=
4;f=255/(d-e);a.index+=4;a.index+=4;k=a.dv.getUint32(this.index,this.littleEndian);a.index+=4;h=new Float32Array(k);for(t=0;t<k;t+=1,a.index+=4)h[t]=a.dv.getFloat32(a.index,a.littleEndian);q=papaya.viewer.ColorTable.findLUT(q)!==papaya.viewer.ColorTable.TABLE_GRAYSCALE?new papaya.viewer.ColorTable(q,!1):new papaya.viewer.ColorTable("Spectrum",!1);q.updateLUT(0,255);k=a.surfaces[a.surfaceIndex].pointData.length/3;null===a.surfaces[a.surfaceIndex].colorsData&&(a.surfaces[a.surfaceIndex].colorsData=
new Float32Array(4*k));for(t=0;t<k;t+=1)r=h[t],r<=e?0===a.surfaces[a.surfaceIndex].colorsData[4*t+3]&&(a.surfaces[a.surfaceIndex].colorsData[4*t]=a.surfaces[a.surfaceIndex].solidColor[0],a.surfaces[a.surfaceIndex].colorsData[4*t+1]=a.surfaces[a.surfaceIndex].solidColor[1],a.surfaces[a.surfaceIndex].colorsData[4*t+2]=a.surfaces[a.surfaceIndex].solidColor[2],a.surfaces[a.surfaceIndex].colorsData[4*t+3]=1):(r>d?(a.surfaces[a.surfaceIndex].colorsData[4*t]=q.lookupRed(255)/255,a.surfaces[a.surfaceIndex].colorsData[4*
t+1]=q.lookupGreen(255)/255,a.surfaces[a.surfaceIndex].colorsData[4*t+2]=q.lookupBlue(255)/255):(r=Math.floor((r-e)*f+.5),a.surfaces[a.surfaceIndex].colorsData[4*t]=q.lookupRed(r)/255,a.surfaces[a.surfaceIndex].colorsData[4*t+1]=q.lookupGreen(r)/255,a.surfaces[a.surfaceIndex].colorsData[4*t+2]=q.lookupBlue(r)/255),a.surfaces[a.surfaceIndex].colorsData[4*t+3]=1)}else break;a.surfaceIndex++;a.surfaceIndex===a.numSurfaces?setTimeout(function(){a.onFinishedRead()},0):setTimeout(function(){a.readNextSurface(a,
b)},0)};papaya.surface.SurfaceMango.prototype.getNumSurfaces=function(){return this.numSurfaces};papaya.surface.SurfaceMango.prototype.getNumPoints=function(a){return this.surfaces[a].pointData.length/3};papaya.surface.SurfaceMango.prototype.getNumTriangles=function(a){return this.surfaces[a].triangleData.length/3};papaya.surface.SurfaceMango.prototype.getSolidColor=function(a){return this.surfaces[a].solidColor};papaya.surface.SurfaceMango.prototype.getPointData=function(a){return this.surfaces[a].pointData};
papaya.surface.SurfaceMango.prototype.getNormalsData=function(a){return this.surfaces[a].normalsData};papaya.surface.SurfaceMango.prototype.getTriangleData=function(a){return this.surfaces[a].triangleData};papaya.surface.SurfaceMango.prototype.getColorsData=function(a){return this.surfaces[a].colorsData};"use strict";papaya=papaya||{};papaya.surface=papaya.surface||{};
papaya.surface.SurfaceVTK=papaya.surface.SurfaceVTK||function(){this.dv=this.onFinishedRead=this.error=null;this.index=0;this.littleEndian=!0;this.numPoints=0;this.description=this.vtkVersion=this.colorsData=this.normalsData=this.triangleData=this.pointData=null;this.ascii=!1;this.volume=null;this.headerRead=this.done=!1};papaya.surface.SurfaceVTK.MAGIC_NUMBER="# vtk DataFile Version";papaya.surface.SurfaceVTK.MAGIC_NUMBER_ASCII="ASCII";papaya.surface.SurfaceVTK.MAGIC_NUMBER_DATASET="DATASET";
papaya.surface.SurfaceVTK.MAGIC_NUMBER_POLYDATA="POLYDATA";papaya.surface.SurfaceVTK.MAGIC_NUMBER_POINTS="POINTS";papaya.surface.SurfaceVTK.MAGIC_NUMBER_POLYGONS="POLYGONS";papaya.surface.SurfaceVTK.MAGIC_NUMBER_NORMALS="NORMALS";papaya.surface.SurfaceVTK.isThisFormat=function(a){return a.endsWith(".vtk")};papaya.surface.SurfaceVTK.prototype.isSurfaceDataBinary=function(){return!0};papaya.surface.SurfaceVTK.prototype.hasOverlay=function(){return!1};
papaya.surface.SurfaceVTK.prototype.getNextLine=function(a){var b,e,d=[];a||(a=256);for(b=0;b<a;b+=1){if(this.index>=this.dv.byteLength){this.done=!0;break}e=this.dv.getUint8(this.index++);if(32>e){(!this.headerRead||this.ascii)&&this.index<this.dv.byteLength&&32>this.dv.getUint8(this.index)&&this.index++;break}d[b]=e}return String.fromCharCode.apply(null,d)};
papaya.surface.SurfaceVTK.prototype.readData=function(a,b,e,d){var f=this,k;b(.2);this.onFinishedRead=e;this.dv=new DataView(a);this.volume=d;this.vtkVersion=this.getNextLine().substring(papaya.surface.SurfaceVTK.MAGIC_NUMBER.length).trim();this.description=this.getNextLine().trim();this.ascii=this.getNextLine()==papaya.surface.SurfaceVTK.MAGIC_NUMBER_ASCII;this.datasetType=this.getNextLine().substring(papaya.surface.SurfaceVTK.MAGIC_NUMBER_DATASET.length).trim();this.headerRead=!0;this.datasetType!=
papaya.surface.SurfaceVTK.MAGIC_NUMBER_POLYDATA&&(this.error=Error("VTK: Only POLYDATA format is currently supported!"),this.onFinishedRead());k=this.getNextLine().split(" ");k[0]==papaya.surface.SurfaceVTK.MAGIC_NUMBER_POINTS&&setTimeout(function(){f.readDataPoints(f,k[1],b)},0)};
papaya.surface.SurfaceVTK.prototype.readNextData=function(a,b){var e,d=.2;a.pointData&&(d+=.2);a.normalsData&&(d+=.2);a.triangleData&&(d+=.2);b(d);if(a.done||a.pointData&&a.normalsData&&a.triangleData)a.onFinishedRead();else(e=this.getNextLine().split(" "))&&e[0]==papaya.surface.SurfaceVTK.MAGIC_NUMBER_POINTS?setTimeout(function(){a.readDataPoints(a,e[1],b)},0):e&&e[0]==papaya.surface.SurfaceVTK.MAGIC_NUMBER_POLYGONS?setTimeout(function(){a.readDataTriangles(a,e[1],b)},0):e&&e[0]==papaya.surface.SurfaceVTK.MAGIC_NUMBER_NORMALS?
setTimeout(function(){a.readDataNormals(a,b)},0):setTimeout(function(){a.readNextData(a,b)},0)};
papaya.surface.SurfaceVTK.prototype.readDataPoints=function(a,b,e){var d,f=0,k=[],h,r=0,q=3*b;a.numPoints=b;a.pointData=new Float32Array(q);var t=a.volume.header.orientation.orientation;d=a.volume.header.voxelDimensions;h=a.volume.header.origin;b=("-"===t.charAt(3)?1:-1)*(d.flip?-1:1);var y="-"!==t.charAt(4)?1:-1,G="-"!==t.charAt(5)?1:-1,B=t.indexOf("X"),w=t.indexOf("Y"),t=t.indexOf("Z"),E=b*h.x*d.xSize,P=y*h.y*d.ySize,da=G*h.z*d.zSize;if(a.ascii)for(;r<q;)for(h=a.getNextLine().trim().split(" "),
d=0;d<h.length;d+=1)k[f]=parseFloat(h[d]),2===f&&(a.pointData[r++]=k[B]*b-E,a.pointData[r++]=k[w]*y-P,a.pointData[r++]=k[t]*G-da),f++,f%=3;else for(d=0;d<q;d+=1,a.index+=4)k[f]=a.dv.getFloat32(a.index,!1),2===f&&(a.pointData[r++]=k[B]*b-E,a.pointData[r++]=k[w]*y-P,a.pointData[r++]=k[t]*G-da),f++,f%=3;a.readNextData(a,e)};
papaya.surface.SurfaceVTK.prototype.readDataNormals=function(a,b){var e,d,f=0,k=3*a.numPoints;a.normalsData=new Float32Array(k);if(a.ascii)for(;f<k;)for(d=a.getNextLine().trim().split(" "),e=0;e<d.length;e+=1)a.normalsData[f++]=parseFloat(d[e]);else for(e=0;e<k;e+=1,a.index+=4)a.normalsData[e]=a.dv.getFloat32(a.index,!1);a.readNextData(a,b)};
papaya.surface.SurfaceVTK.prototype.readDataTriangles=function(a,b,e){var d,f=0,k=3*b;a.triangleData=new Uint32Array(k);if(a.ascii)for(;f<k;)for(b=a.getNextLine().trim().split(" "),d=1;d<b.length;d+=1)a.triangleData[f++]=parseInt(b[d],10);else for(d=0;d<b;d+=1,a.index+=16)a.triangleData[3*d]=a.dv.getUint32(a.index+4,!1),a.triangleData[3*d+1]=a.dv.getUint32(a.index+8,!1),a.triangleData[3*d+2]=a.dv.getUint32(a.index+12,!1);a.readNextData(a,e)};papaya.surface.SurfaceVTK.prototype.getColorsData=function(){return null};
papaya.surface.SurfaceVTK.prototype.getNumSurfaces=function(){return 1};papaya.surface.SurfaceVTK.prototype.getNumPoints=function(){return this.pointData.length/3};papaya.surface.SurfaceVTK.prototype.getNumTriangles=function(){return this.triangleData.length/3};papaya.surface.SurfaceVTK.prototype.getSolidColor=function(){return this.solidColor};papaya.surface.SurfaceVTK.prototype.getPointData=function(){return this.pointData};papaya.surface.SurfaceVTK.prototype.getNormalsData=function(){return this.normalsData};
papaya.surface.SurfaceVTK.prototype.getTriangleData=function(){return this.triangleData};"use strict";papaya=papaya||{};papaya.ui=papaya.ui||{};papaya.ui.Dialog=papaya.ui.Dialog||function(a,b,e,d,f,k,h,r){this.container=a;this.viewer=a.viewer;this.title=b;this.modifier="";papaya.utilities.StringUtils.isStringBlank(h)||(this.modifier=h);this.id=this.title.replace(/ /g,"_");this.content=e;this.dataSource=d;this.callback=f;this.callbackOk=k;this.doWrap=r;this.scrollBehavior2=this.scrollBehavior1=null};
papaya.ui.Dialog.showModalDialog=function(a,b,e){var d,f,k;a=document.documentElement;var h=window.pageYOffset||a.scrollTop;d=$(window).outerWidth();a=$(window).outerHeight();f=$(e).outerWidth();k=$(e).outerHeight();d=d/2-f/2+"px";a=h+a/2-k/2+"px";$(e).css({position:"absolute",zIndex:100,left:d,top:a});b.removeScroll();$(e).hide().fadeIn(200)};
papaya.ui.Dialog.prototype.showDialog=function(){var a,b,e,d,f;d="#"+this.id;a=$(d);a.remove();f=$("body");e="<div id='"+this.id+"' class='"+PAPAYA_DIALOG_CSS+"'><span class='"+PAPAYA_DIALOG_TITLE_CSS+"'>"+this.title+"</span>";if(this.content){e+="<div class='"+PAPAYA_DIALOG_CONTENT_CSS+"'><table>";for(a=0;a<this.content.items.length;a+=1)if(this.content.items[a].spacer)e+="<tr><td class='"+PAPAYA_DIALOG_CONTENT_LABEL_CSS+"'>&nbsp;</td><td class='"+PAPAYA_DIALOG_CONTENT_CONTROL_CSS+"'>&nbsp;</td></tr>";
else if(this.content.items[a].readonly)e+="<tr><td class='"+PAPAYA_DIALOG_CONTENT_LABEL_CSS+"'>"+this.content.items[a].label+"</td><td class='"+PAPAYA_DIALOG_CONTENT_CONTROL_CSS+"' id='"+this.content.items[a].field+"'></td></tr>";else{b=this.content.items[a].disabled&&!0===papaya.utilities.ObjectUtils.bind(this.container,papaya.utilities.ObjectUtils.dereferenceIn(this,this.content.items[a].disabled))()?"disabled='disabled'":"";e+="<tr><td class='"+PAPAYA_DIALOG_CONTENT_LABEL_CSS+"'>"+this.content.items[a].label+
"</td><td class='"+PAPAYA_DIALOG_CONTENT_CONTROL_CSS+"'><select "+b+" id='"+this.content.items[a].field+"'>";for(b=0;b<this.content.items[a].options.length;b+=1)e+="<option value='"+this.content.items[a].options[b]+"'>"+papaya.utilities.StringUtils.truncateMiddleString(this.content.items[a].options[b].toString(),40)+"</option>";e+="</select></td></tr>";this.content.items[a].help&&(e+="<tr><td colspan='2' class='"+PAPAYA_DIALOG_CONTENT_HELP+"'>"+this.content.items[a].help+"</td></tr>")}e+="</table></div>"}e+=
"<div class='"+PAPAYA_DIALOG_BUTTON_CSS+"'><button type='button' id='"+this.id+"-Ok'>Ok</button></div></div>";f.append('<div class="'+PAPAYA_DIALOG_BACKGROUND+'"></div>');f.append(e);for(a=0;a<this.content.items.length;a+=1)this.content.items[a].readonly?(e=this.dataSource[this.content.items[a].field](this.modifier),null!==e?$("#"+this.content.items[a].field).html(e):$("#"+this.content.items[a].field).parent().remove()):this.content.items[a].spacer||(e=$("#"+this.content.items[a].field),e.val(this.dataSource[this.content.items[a].field]),
e.change(papaya.utilities.ObjectUtils.bind(this,this.doAction,[this.content.items[a].field])));this.doWrap||$("."+PAPAYA_DIALOG_CONTENT_CSS).addClass(PAPAYA_DIALOG_CONTENT_NOWRAP_CSS);$("#"+this.id+"-Ok").click(papaya.utilities.ObjectUtils.bind(this,this.doOk));a=$(d);f.addClass(PAPAYA_DIALOG_STOPSCROLL);papaya.ui.Dialog.showModalDialog(this,this.viewer,a[0])};
papaya.ui.Dialog.prototype.doOk=function(){var a,b;a=$("."+PAPAYA_DIALOG_CSS);b=$("."+PAPAYA_DIALOG_BACKGROUND);a.hide(100);b.hide(100);a.remove();b.remove();window.onmousewheel=this.scrollBehavior1;document.onmousewheel=this.scrollBehavior2;this.callbackOk&&this.callbackOk();$("body").removeClass(PAPAYA_DIALOG_STOPSCROLL);this.container.viewer.addScroll()};papaya.ui.Dialog.prototype.doAction=function(a){this.callback(a,$("#"+a).val())};"use strict";papaya=papaya||{};papaya.ui=papaya.ui||{};
papaya.ui.Menu=papaya.ui.Menu||function(a,b,e,d,f){this.viewer=a;this.method=b.method;this.isTitleBar=b.titleBar;this.label=b.label;this.icons=b.icons;this.callback=e;this.dataSource=d;this.items=[];this.rangeItem=null;this.menuOnHover=b.menuOnHover;this.contextMenu=!1;void 0===f||null===f?(this.imageIndex=-1,this.modifier=this.viewer.container.containerIndex):(this.imageIndex=f,this.modifier=f+this.viewer.container.containerIndex);this.buttonId=this.label.replace(/ /g,"_").replace("...","_")+(this.modifier||
"");this.menuId=(this.label+"Menu").replace(/ /g,"_").replace("...","_")+(this.modifier||"");this.isRight=null!==b.icons;this.isImageButton=b.imageButton;this.isSurfaceButton=b.surfaceButton;this.htmlParent=this.viewer.container.showControlBar&&this.viewer.container.kioskMode&&this.viewer.container.showImageButtons?this.viewer.container.sliderControlHtml:this.viewer.container.toolbarHtml};
papaya.ui.Menu.doShowMenu=function(a,b,e,d){var f,k,h,r,q=$(b).parent().offset();$(a.canvas).offset();$(a.container.display.canvas).outerHeight();f=$(b).offset();k=$(b).outerWidth();h=$(e).outerWidth();r=$(e).outerHeight();f=f.left-q.left+(d?-1*h+k:0)+"px";a=a.container.showControlBar&&a.container.kioskMode&&a.container.showImageButtons?-1*PAPAYA_SPACING-r+"px":$(b).outerHeight()+(d?0:PAPAYA_SPACING)+"px";$(e).css({position:"absolute",zIndex:100,left:f,top:a});$(e).hide().fadeIn(200)};
papaya.ui.Menu.getColorComponents=function(a){return a?a.match(/\d+/g):[0,0,0,255]};papaya.ui.Menu.getNiceForegroundColor=function(a){a=papaya.ui.Menu.getColorComponents(a);127<(parseInt(a[0])+parseInt(a[1])+parseInt(a[2]))/3?a[0]=a[1]=a[2]=0:a[0]=a[1]=a[2]=255;return"rgb("+a[0]+", "+a[1]+", "+a[2]+")"};
papaya.ui.Menu.prototype.buildMenuButton=function(){var a,b,e;e="#"+this.buttonId;a=$(e);a.remove();a=null;this.icons?(a="<span id='"+this.buttonId+"' class='"+PAPAYA_MENU_UNSELECTABLE+" "+PAPAYA_MENU_ICON_CSS+" "+(this.isImageButton?PAPAYA_MENU_BUTTON_CSS:"")+"'"+(this.isRight?" style='float:right'":"")+"><img class='"+PAPAYA_MENU_UNSELECTABLE+"' style='width:"+papaya.viewer.ColorTable.ICON_SIZE+"px; height:"+papaya.viewer.ColorTable.ICON_SIZE+"px; vertical-align:bottom; ",a=!this.isSurfaceButton&&
this.dataSource.isSelected(parseInt(this.imageIndex,10))?a+"border:2px solid #FF5A3D;background-color:#eeeeee;padding:1px;":a+"border:2px outset lightgray;background-color:#eeeeee;padding:1px;",a=this.method?a+("' src='"+this.icons[papaya.utilities.ObjectUtils.bind(this.viewer,papaya.utilities.ObjectUtils.dereferenceIn(this.viewer,this.method))()?1:0]+"' /></span>"):a+("' src='"+this.icons[0]+"' /></span>")):a=this.isTitleBar?"<div class='"+PAPAYA_MENU_UNSELECTABLE+" "+PAPAYA_MENU_TITLEBAR_CSS+" "+
PAPAYA_TITLEBAR_CSS+"' style='z-index:-1;position:absolute;top:0px;width:"+this.htmlParent.width()+"px;text-align:center;color:"+papaya.ui.Menu.getNiceForegroundColor(this.viewer.bgColor)+"'>"+this.label+"</div>":"<span id='"+this.buttonId+"' class='"+PAPAYA_MENU_UNSELECTABLE+" "+PAPAYA_MENU_LABEL_CSS+"'>"+this.label+"</span>";this.htmlParent.append(a);this.isTitleBar||(a=$(e),e="#"+this.buttonId+" > img",e=$(e),b=this,this.menuOnHover&&(e.mouseenter(function(){b.showHoverMenuTimeout=setTimeout(papaya.utilities.ObjectUtils.bind(b,
b.showMenu),500)}),e.mouseleave(function(){clearTimeout(b.showHoverMenuTimeout);b.showHoverMenuTimeout=null})),a.click(papaya.utilities.ObjectUtils.bind(this,this.doClick)),this.icons?(e.hover(function(){1<b.icons.length?$(this).css({"border-color":"gray"}):$(this).css({"border-color":"#FF5A3D"})},papaya.utilities.ObjectUtils.bind(b,function(){b.dataSource.isSelected(parseInt(b.imageIndex,10))&&b.dataSource.isSelectable()?$("#"+b.buttonId+" > img").css({border:"2px solid #FF5A3D"}):$("#"+b.buttonId+
" > img").css({border:"2px outset lightgray"})})),e.mousedown(function(){$(this).css({border:"2px inset lightgray"})}),e.mouseup(function(){$(this).css({border:"2px outset lightgray"})})):this.isTitleBar||a.hover(function(){$(this).toggleClass(PAPAYA_MENU_BUTTON_HOVERING_CSS)}));return this.buttonId};papaya.ui.Menu.prototype.setMenuButton=function(a){this.buttonId=a};
papaya.ui.Menu.prototype.buildMenu=function(){var a;this.htmlParent.append("<ul id='"+this.menuId+"' class='"+PAPAYA_MENU_CSS+"'></ul>");this.viewer.container.contextManager&&papaya.utilities.PlatformUtils.smallScreen&&($("#"+this.menuId)[0].style.width=this.viewer.viewerDim-10+"px");for(a=0;a<this.items.length;a+=1)this.items[a].hide||this.items[a].buildHTML(this.menuId)};papaya.ui.Menu.prototype.addMenuItem=function(a){a instanceof papaya.ui.MenuItemRange&&(this.rangeItem=a);this.items.push(a)};
papaya.ui.Menu.prototype.showContextMenu=function(){var a,b,e,d=0,f;0<this.items.length&&(e="#"+this.menuId,b=$(e),a=b.is(":visible"),b.remove(),a||(this.htmlParent=this.viewer.container.viewerHtml,this.buildMenu(),b=$(e),b.hide(),a=b.outerHeight(),e=$(this.viewer.canvas).offset(),f=$(this.viewer.container.display.canvas).outerHeight(),this.viewer.contextMenuMousePositionY+a>e.top+f+$(this.viewer.canvas).outerHeight()+PAPAYA_SPACING&&(d=this.viewer.contextMenuMousePositionY+a-(e.top+f+$(this.viewer.canvas).outerHeight()+
PAPAYA_SPACING)-1),this.viewer.container.contextManager&&papaya.utilities.PlatformUtils.smallScreen?b.css({position:"absolute",zIndex:100,left:this.viewer.canvasRect.left,top:this.viewer.canvasRect.top-d}):b.css({position:"absolute",zIndex:100,left:this.viewer.contextMenuMousePositionX+this.viewer.canvasRect.left,top:this.viewer.contextMenuMousePositionY+this.viewer.canvasRect.top-d}),b.hide().fadeIn(200)))};
papaya.ui.Menu.prototype.showMenu=function(){var a,b,e;this.viewer.container.toolbar.closeAllMenus();this.contextMenu?this.showContextMenu():0<this.items.length&&(e="#"+this.menuId,b=$(e),a=b.is(":visible"),b.remove(),a||(a=$("#"+this.buttonId),this.buildMenu(),b=$(e),b.hide(),papaya.ui.Menu.doShowMenu(this.viewer,a[0],b[0],this.isRight)))};
papaya.ui.Menu.prototype.doClick=function(){var a;a=$("#"+this.menuId).is(":visible");this.callback(this.buttonId);this.icons&&(this.method?$("#"+this.buttonId+" > img").attr("src",this.icons[papaya.utilities.ObjectUtils.bind(this.viewer,papaya.utilities.ObjectUtils.dereferenceIn(this.viewer,this.method))()?1:0]):$("#"+this.buttonId+" > img").attr("src",this.icons[0]));this.menuOnHover||a||this.showMenu()};
papaya.ui.Menu.prototype.updateRangeItem=function(a,b){this.rangeItem&&($("#"+this.rangeItem.minId).val(a),$("#"+this.rangeItem.maxId).val(b))};"use strict";papaya=papaya||{};papaya.ui=papaya.ui||{};
papaya.ui.MenuItem=papaya.ui.MenuItem||function(a,b,e,d,f,k,h){this.viewer=a;this.modifier="";papaya.utilities.StringUtils.isStringBlank(h)||(this.modifier="-"+h);this.dataSource=f;this.method=k;this.label=this.dataSource&&this.method?this.dataSource[this.method]():b;this.action=e+this.modifier;this.id=this.action.replace(/ /g,"_")+this.viewer.container.containerIndex;this.callback=d;this.menu=null;this.isContext=!1};
papaya.ui.MenuItem.prototype.buildHTML=function(a){var b;b=this.dataSource&&this.method?this.dataSource[this.method]():this.label;b="<li id='"+this.id+"'><span class='"+PAPAYA_MENU_UNSELECTABLE+"'>"+b+"</span>"+(this.menu?"<span style='float:right'>&nbsp;&#x25B6;</span>":"")+"</li>";$("#"+a).append(b);a=$("#"+this.id);this.viewer.container.contextManager&&papaya.utilities.PlatformUtils.smallScreen&&(a[0].style.width=this.viewer.viewerDim-10+"px",a[0].style.fontSize="18px");a.click(papaya.utilities.ObjectUtils.bind(this,
function(a){this.doAction(this.isContext&&a.shiftKey)}));a.hover(function(){$(this).toggleClass(PAPAYA_MENU_HOVERING_CSS)})};papaya.ui.MenuItem.prototype.doAction=function(a){a||this.menu||(this.viewer.showingContextMenu=!1);this.callback(this.action,null,a)};"use strict";papaya=papaya||{};papaya.ui=papaya.ui||{};
papaya.ui.MenuItemCheckBox=papaya.ui.MenuItemCheckBox||function(a,b,e,d,f,k,h){this.viewer=a;this.label=b;this.modifier="";void 0!==h&&null!==h&&(this.modifier="-"+h);this.action=e+this.modifier;this.method=k;this.id=this.action.replace(/ /g,"_").replace(/\(/g,"").replace(/\)/g,"")+this.viewer.container.containerIndex;this.callback=d;this.dataSource=f};
papaya.ui.MenuItemCheckBox.prototype.buildHTML=function(a){var b,e;b=this.dataSource[this.method](this.label);e="";b&&(e="checked='checked'");b="<li id='"+this.id+"'><input type='checkbox' class='"+PAPAYA_MENU_COLORTABLE_CSS+"' name='"+PAPAYA_MENU_COLORTABLE_CSS+"' id='"+this.id+"' value='"+this.id+"' "+e+"><span class='"+PAPAYA_MENU_UNSELECTABLE+"'>&nbsp;"+this.label+"</span></li>";$("#"+a).append(b);a=$("#"+this.id);a.click(papaya.utilities.ObjectUtils.bind(this,this.doAction));a.hover(function(){$(this).toggleClass(PAPAYA_MENU_HOVERING_CSS)})};
papaya.ui.MenuItemCheckBox.prototype.doAction=function(){$("."+PAPAYA_MENU_COLORTABLE_CSS).removeAttr("checked");$("#"+this.id+" > input")[0].checked=!0;this.callback(this.action,null,!0)};"use strict";papaya=papaya||{};papaya.ui=papaya.ui||{};
papaya.ui.MenuItemRadioButton=papaya.ui.MenuItemRadioButton||function(a,b,e,d,f,k,h){this.viewer=a;this.label=b;this.modifier="";void 0!==h&&null!==h&&(this.modifier="-"+h);this.methodParam=this.action=e+this.modifier;this.method=k;this.id=this.action.replace(/ /g,"_").replace(/\(/g,"").replace(/\)/g,"")+this.viewer.container.containerIndex;this.callback=d;this.dataSource=f};
papaya.ui.MenuItemRadioButton.prototype.buildHTML=function(a){var b,e;b=this.dataSource[this.method](this.label);e="";b&&(e="checked='checked'");b="<li id='"+this.id+"'><input type='radio' class='"+PAPAYA_MENU_COLORTABLE_CSS+"' name='"+PAPAYA_MENU_COLORTABLE_CSS+"' id='"+this.id+"' value='"+this.id+"' "+e+"><span class='"+PAPAYA_MENU_UNSELECTABLE+"'>&nbsp;"+this.label+"</span></li>";$("#"+a).append(b);a=$("#"+this.id);a.click(papaya.utilities.ObjectUtils.bind(this,this.doAction));a.hover(function(){$(this).toggleClass(PAPAYA_MENU_HOVERING_CSS)})};
papaya.ui.MenuItemRadioButton.prototype.doAction=function(){$("."+PAPAYA_MENU_COLORTABLE_CSS).removeAttr("checked");$("#"+this.id+" > input")[0].checked=!0;this.callback(this.action,null,!0)};"use strict";papaya=papaya||{};papaya.ui=papaya.ui||{};
papaya.ui.MenuItemFileChooser=papaya.ui.MenuItemFileChooser||function(a,b,e,d,f,k){this.viewer=a;this.label=b;this.modifier="";void 0!==k&&null!==k&&(this.modifier="-"+k);this.action=e+this.modifier;this.id=this.action.replace(/ /g,"_")+this.viewer.container.containerIndex;this.fileChooserId="fileChooser"+this.label.replace(/ /g,"_").replace(/\./g,"")+this.viewer.container.containerIndex+(f?"folder":"");this.callback=d;this.folder=f};
papaya.ui.MenuItemFileChooser.prototype.buildHTML=function(a){var b,e;b=this;e="<li id='"+this.id+"'><span class='"+PAPAYA_MENU_UNSELECTABLE+"'><label class='"+PAPAYA_MENU_FILECHOOSER+"' for='"+this.fileChooserId+"'>"+this.label;e=this.folder?e+("</label><input type='file' id='"+this.fileChooserId+"' multiple='multiple' webkitdirectory directory name='files' /></span></li>"):e+("</label><input type='file' id='"+this.fileChooserId+"' multiple='multiple' name='files' /></span></li>");$("#"+a).append(e);
$("#"+this.fileChooserId)[0].onchange=papaya.utilities.ObjectUtils.bind(b,function(){b.callback(b.action,document.getElementById(b.fileChooserId).files)});$("#"+this.id).hover(function(){$(this).toggleClass(PAPAYA_MENU_HOVERING_CSS)})};"use strict";papaya=papaya||{};papaya.ui=papaya.ui||{};
papaya.ui.MenuItemRange=papaya.ui.MenuItemRange||function(a,b,e,d,f,k,h){"ChangeRangeNeg"===e&&(this.negatives=!0,h=a.getScreenVolumeIndex(a.screenVolumes[parseInt(h)].negativeScreenVol).toString());this.viewer=a;this.label=b;this.index=h;this.modifier="";void 0!==h&&(this.modifier="-"+h);this.action=e+this.modifier;this.minId=this.action.replace(/ /g,"_")+"Min"+this.viewer.container.containerIndex;this.maxId=this.action.replace(/ /g,"_")+"Max"+this.viewer.container.containerIndex;this.callback=d;
this.dataSource=f;this.method=k;this.id=b+this.modifier+this.viewer.container.containerIndex;this.grabOffset=0;this.screenVol=this.viewer.screenVolumes[this.index]};papaya.ui.MenuItemRange.getRelativeMousePositionFromParentX=function(a,b){var e=a.parent().offset();return papaya.utilities.PlatformUtils.getMousePositionX(b)-e.left};papaya.ui.MenuItemRange.getRelativeMousePositionX=function(a,b){var e=a.offset();return papaya.utilities.PlatformUtils.getMousePositionX(b)-e.left};
papaya.ui.MenuItemRange.prototype.buildHTML=function(a){var b,e,d,f,k,h,r,q,t,y;k=this.id+"SliderMin";r=this.id+"SliderMax";t=this.id+"Slider";b=this.dataSource[this.method]();e=this;b="<li id='"+this.id+"'><span class='"+PAPAYA_MENU_UNSELECTABLE+"' style=''><input class='"+PAPAYA_MENU_INPUT_FIELD+"' type='text' size='4' id='"+this.minId+"' value='"+b[0]+"' /><div style='display:inline-block;position:relative;width:"+(papaya.viewer.ColorTable.COLOR_BAR_WIDTH+papaya.viewer.ColorTable.ARROW_ICON_WIDTH)+
"px;top:-12px;'><img id='"+k+"' class='"+PAPAYA_MENU_UNSELECTABLE+"' style='position:absolute;top:5px;left:"+e.screenVol.colorTable.minLUT/papaya.viewer.ColorTable.LUT_MAX*(papaya.viewer.ColorTable.COLOR_BAR_WIDTH-1)+"px;z-index:99' src='"+papaya.viewer.ColorTable.ARROW_ICON+"' /><img id='"+r+"' class='"+PAPAYA_MENU_UNSELECTABLE+"' style='position:absolute;top:5px;left:"+e.screenVol.colorTable.maxLUT/papaya.viewer.ColorTable.LUT_MAX*(papaya.viewer.ColorTable.COLOR_BAR_WIDTH-1)+"px;z-index:99' src='"+
papaya.viewer.ColorTable.ARROW_ICON+"' /><img id='"+t+"' class='"+PAPAYA_MENU_UNSELECTABLE+"' style='position:absolute;top:0;left:"+parseInt(papaya.viewer.ColorTable.ARROW_ICON_WIDTH/2,10)+"px;' src='"+this.viewer.screenVolumes[parseInt(this.index,10)].colorBar+"' /></div><input class='"+PAPAYA_MENU_INPUT_FIELD+"' type='text' size='4' id='"+this.maxId+"' value='"+b[1]+"' /></span></li>";$("#"+a).append(b);d=$("#"+this.minId);f=$("#"+this.maxId);h=$("#"+k);q=$("#"+r);y=$("#"+t);papaya.utilities.PlatformUtils.ios&&
(d[0].style.width="35px",d[0].style.marginRight="4px",f[0].style.width="35px",f[0].style.marginRight="4px");h.bind(papaya.utilities.PlatformUtils.ios?"touchstart":"mousedown",function(a){e.grabOffset=papaya.ui.MenuItemRange.getRelativeMousePositionX(h,a);$(window).bind(papaya.utilities.PlatformUtils.ios?"touchmove":"mousemove",function(a){var b;b=e.screenVol.colorTable.maxLUT/papaya.viewer.ColorTable.LUT_MAX*(papaya.viewer.ColorTable.COLOR_BAR_WIDTH-1);a=papaya.ui.MenuItemRange.getRelativeMousePositionFromParentX(h,
a)-e.grabOffset;0>a?a=0:a>=papaya.viewer.ColorTable.COLOR_BAR_WIDTH?a=papaya.viewer.ColorTable.COLOR_BAR_WIDTH-1:a>b&&(a=b);e.screenVol.updateMinLUT(Math.round(a/(papaya.viewer.ColorTable.COLOR_BAR_WIDTH-1)*papaya.viewer.ColorTable.LUT_MAX));h.css({left:a+"px"});e.viewer.drawViewer(!1,!0);d.val(e.dataSource[e.method]()[0]);e.screenVol.updateColorBar();y.attr("src",e.screenVol.colorBar)});return!1});q.bind(papaya.utilities.PlatformUtils.ios?"touchstart":"mousedown",function(a){e.grabOffset=papaya.ui.MenuItemRange.getRelativeMousePositionX(q,
a);$(window).bind(papaya.utilities.PlatformUtils.ios?"touchmove":"mousemove",function(a){var b;b=e.screenVol.colorTable.minLUT/papaya.viewer.ColorTable.LUT_MAX*(papaya.viewer.ColorTable.COLOR_BAR_WIDTH-1);a=papaya.ui.MenuItemRange.getRelativeMousePositionFromParentX(q,a)-e.grabOffset;0>a?a=0:a>=papaya.viewer.ColorTable.COLOR_BAR_WIDTH?a=papaya.viewer.ColorTable.COLOR_BAR_WIDTH-1:a<b&&(a=b);e.screenVol.updateMaxLUT(Math.round(a/(papaya.viewer.ColorTable.COLOR_BAR_WIDTH-1)*papaya.viewer.ColorTable.LUT_MAX));
q.css({left:a+"px"});e.viewer.drawViewer(!1,!0);f.val(e.dataSource[e.method]()[1]);e.screenVol.updateColorBar();y.attr("src",e.screenVol.colorBar)});return!1});$(window).bind(papaya.utilities.PlatformUtils.ios?"touchend":"mouseup",function(){$(window).unbind(papaya.utilities.PlatformUtils.ios?"touchmove":"mousemove")});$("#"+this.id).hover(function(){$(this).toggleClass(PAPAYA_MENU_HOVERING_CSS)});d.change(papaya.utilities.ObjectUtils.bind(this,function(){e.rangeChanged(!0)}));f.change(papaya.utilities.ObjectUtils.bind(this,
function(){e.rangeChanged(!1)}));d.keyup(papaya.utilities.ObjectUtils.bind(this,function(a){13===a.keyCode&&(e.rangeChanged(!1),e.viewer.container.toolbar.closeAllMenus())}));f.keyup(papaya.utilities.ObjectUtils.bind(this,function(a){13===a.keyCode&&(e.rangeChanged(!1),e.viewer.container.toolbar.closeAllMenus())}));papaya.utilities.PlatformUtils.ios||setTimeout(function(){d.focus();d.select()},10)};
papaya.ui.MenuItemRange.prototype.rangeChanged=function(a){this.updateDataSource(a);this.viewer.drawViewer(!0);this.resetSlider()};papaya.ui.MenuItemRange.prototype.updateDataSource=function(a){var b,e,d,f;f=$("#"+this.minId);d=$("#"+this.maxId);e=parseFloat(f.val());isNaN(e)&&(e=this.dataSource.screenMin);b=parseFloat(d.val());isNaN(b)&&(b=this.dataSource.screenMax);f.val(e);d.val(b);this.negatives?this.dataSource.setScreenRangeNegatives(e,b):this.dataSource.setScreenRange(e,b);a&&(d.focus(),d.select())};
papaya.ui.MenuItemRange.prototype.resetSlider=function(){var a,b,e;a=this.id+"SliderMin";b=this.id+"SliderMax";e=this.id+"Slider";a=$("#"+a);b=$("#"+b);e=$("#"+e);a.css({left:0});b.css({left:papaya.viewer.ColorTable.COLOR_BAR_WIDTH-1+"px"});this.screenVol.resetDynamicRange();e.attr("src",this.screenVol.colorBar)};"use strict";papaya=papaya||{};papaya.ui=papaya.ui||{};
papaya.ui.MenuItemSlider=papaya.ui.MenuItemSlider||function(a,b,e,d,f,k,h){"alphaneg"===e&&(e="alpha",h=a.getScreenVolumeIndex(a.screenVolumes[parseInt(h)].negativeScreenVol).toString());this.viewer=a;this.label=b;this.index=h;this.modifier="";papaya.utilities.StringUtils.isStringBlank(h)||(this.modifier="-"+h);this.dataSource=f;this.method=k;this.action=e;this.event=-1!=this.action.toLowerCase().indexOf("alpha")||this.viewer.screenVolumes[0].isHighResSlice?"change":"input change";this.id=this.action.replace(/ /g,
"_")+this.viewer.container.containerIndex+"_"+this.index;this.callback=d;this.screenVol=f};
papaya.ui.MenuItemSlider.prototype.buildHTML=function(a){var b,e,d,f,k;k=this.event;e=this.id+"Slider";b="<li id='"+this.id+"'><span style='padding-right:5px;' class='"+PAPAYA_MENU_UNSELECTABLE+"'>"+this.label+":</span><input min='0' max='100' value='"+parseInt(100*(1-this.screenVol[this.action]),10)+"' id='"+e+"' class='"+PAPAYA_MENU_SLIDER+"' type='range' /></li>";$("#"+a).append(b);$("#"+this.id).hover(function(){$(this).toggleClass(PAPAYA_MENU_HOVERING_CSS)});d=$("#"+e);f=this;$("#"+this.id+"Slider").on(k,
function(){f.screenVol[f.action]=1-d.val()/100;f.doAction();f.viewer.drawViewer(!0,!1)})};papaya.ui.MenuItemSlider.prototype.doAction=function(){this.callback(this.action,null,!0)};"use strict";papaya=papaya||{};papaya.ui=papaya.ui||{};papaya.ui.MenuItemSpacer=papaya.ui.MenuItemSpacer||function(){};papaya.ui.MenuItemSpacer.prototype.buildHTML=function(a){var b;b="<div class='"+PAPAYA_MENU_SPACER_CSS+" "+PAPAYA_MENU_UNSELECTABLE+"'></div>";$("#"+a).append(b)};"use strict";papaya=papaya||{};
papaya.ui=papaya.ui||{};papayaLoadableImages=papayaLoadableImages||[];papaya.ui.Toolbar=papaya.ui.Toolbar||function(a){this.container=a;this.viewer=a.viewer;this.spaceMenu=this.surfaceMenus=this.imageMenus=null};papaya.ui.Toolbar.SIZE=22;papaya.ui.Toolbar.ICON_IMAGESPACE="data:image/gif;base64,R0lGODlhFAAUAPcAMf//////GP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////2f/ZNbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1tbW1qWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpVpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACoALAAAAAAUABQAAAipAFUIHEiwoMB/A1coXLiwisOHVf4hVLFCosWLGC9SzMgR48Z/VEJSUVjFj0mTESdWBCmS5EmU/6oIXCly5IqSLx/OlFjT5Us/DneybIkzp8yPDElChCjwj8Q/UKOqmkqVatOnUaGqmsaVq1UVTv+lGjv2z9SuXlVdFUs2ldmtaKeubev2bFy1YCXSfYt2mty8/6CS5XtXRcasVRMftJj1beK/hicanKwiIAA7";
papaya.ui.Toolbar.ICON_WORLDSPACE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAplJREFUeNqM1H1ozVEcx/Hr3p+7O08jQzbzMErznEItK0+Fv0Ye/tki20ia//wn+YMSaXkoEiKkkCVKZhOipsnDstnFagzlrmGMNfeO6/Nd71unu2s59bq7O517ft/z/X7Pz+dLPUbLJrkqX+SbdEubfJZK2cC6PiOQYm61HJcpkintEpcmCcpryZV5spaHhvvbdJ9slsPyU67wgPlEli0X5aiMkMeyXSbKnVRRVxDRRtkm5czbZrv5vkgu8z1P9stWfleRHGkhT3xCLu1YzZIjpfKWnA6VEn43mwcWEaWlo1Ve2YZj5Jms53iP5BjFsFz9lg/yDj0U7JbslFpZQyBP2a83khoiLiWPA/h/OVGOk+GwnJ5y1iyRS5Im1VLm18cKOc+CYrlGjnxUuZPIOlAn0yWdNXdlrMyRE7LM00eBjBT7niFVTvHsKJ8k6sw1yC4ZIl0EUMOcRT/X44v14xEZSBWfk+d8NpzKujgPGiYrOXI+XTGeGtjpewtjm16Qh3JT3sgvickfNo4yF6V4PVyE2wQUZvP7FmmIa/iDIpwkHRPkrC2iEIlhEZ2mtarIsz3sOoX0PPrP7nAWPRYjj51E85JiJEYO0VsfR5hL5wZal3T7aZl10kLiEyNEHtOSbt4g/gaduRjzC+S9RwtZ332XBxQpzGZ+p72SR5BumUYHLaaDSiySUXKPig6Wj+SmjX5s4BQB0pFBQVo4dhenspfKC1kaYLKVa9pOAW5Q2Ww2qeU92kHbzZRDvK2sBSfLDLtNUp/82rOj7nDm9tJi7lhoeWNzG7Pkqxz8R5p8ByhcGVd0CzkOOWv28KBJvNGa+V2/Y5U08vQm8mgvmTNyjpxHSFUj6/9rZPKerGSTuCPCi7qIdX3GXwEGAPFYt+/OgAXDAAAAAElFTkSuQmCC";
papaya.ui.Toolbar.ICON_EXPAND="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAE00lEQVR42u2djW3UQBCFJx3QAemAdJBQAVABTgekAqCC0EGOCoAKWDqADkIHKQGPfKdEh3Nr7493Z977pJWQwtk7+77ETs6zdyYEmrPWEyBtoQDgUABwKAA4FAAcCgAOBQCHAoBDAcChAOBQAHAoADgUABwKAE6uALfjuGg094dx7Mbxo9H5D7wZxzCOF43O/3scN6kvzhXg5ziuGhV+4K20k0DD/964/jCO16kv9iCABvCu0bm/ySRgS4KAC7Abx3Wjc9/J9OO/JUGABXjYn/9Po/O/kimAVtd/EQMC6E1Krevkbhx/Kx17KSpBrcuAHjd2kx2kcwGUYRxfy60LBO9lEjxGEAMCKINQgqUsDV8JYkQAZRBKEGNN+EqQzgTQa/6p69YglOA5YuHPrW2QzgT4NI77SCGDUIJjYuEP4ziXaX2fEqRDAT4vLIgSTCxdq49iSIA1hSGzZo3MCbC2QDTWro1JAVIKRSBlTcwKkFqwV1LXwrQAOYV7ImcNzAuQuwDWya3dhQAlFsIiJWp2I0CpBbFCqVpdCVByYXqmZI3uBCi9QL1RujaXAigeJahRk1sBFE8S1KrFtQCKBwlq1uBeAMWyBLXnDiGAYlGCLeYMI4BiSYKt5golgGJBgi3nCCeA0rMEW88NUgClRwlazKk7AeaaI3WCpQVQepKg1VzmBMhqjs0V4Lg9unavXg8StJzDS5keDX/ai5jVHl9ih5DDBgka/hep36jZMoAeBNRexA8ySaBzydobweoWMS2C6CH84lgVQNkyEJfhK5YFULYIxm34inUBlFhA55K+h8DcTddTBjEcvuJBAOWUBIOkh3Qp0+/ZpY/bDV4EUJ6T4GocvxKP+ZwAgzgIX/EkgKIS6K+ihx/ZQTL+Srbn+K+dgzgJX/EmgKLX7fP9v1O/84+53B8zSPs9iYriUQCyAgoADgUAhwKAQwHAoQDgUABwKAA4FAAcCgAOBQCHAoBDAcChAOB4FEDfDr6Sacfykm8Hy/6YfDu4Y46fCgpS9oEQ7X3QZ/L5QEiH8JGwBLwIcOqh0CtJF6DWw6bd4EGAUyHpj2z9iJWcx8LvT3x9EOMSWBeAjSGZWBaArWEFsCoAm0MLwfZwO+c+0FV7+NwGETk3XTF6CKDlHOY+rLrpBhHcImbbuXS3RQw3idp2Tt1tEsVt4rhNHDeK3HCOUAJYCH/rucIIYCn8LecMIYDF8Leau3sBLIe/RQ2uBfAQfu1a3ArgKfyaNbkUwGP4tWpzJ4Dn8GvU6EoAhPBL1+pGAKTwS9bsQgDE8EvVbl4A5PBLrIFpARj+I6lrYVYAhv8/KWtiUgCG/zxr18acAAw/zpo1MiUAw1/O0rUyI8D9woLII0skOBcDAuhHrFxECmH488QkmFvbIJ0JcIpBGH6MmATHBDEiwCAMfylrJAhiQIBBGP5alkoQpHMB9Lr1PX6oJPS4tXsRY+geAkOlY2vX1UXk/wTpXICa1P6w6hhzvXpbo+eHFUDZjeO60bnvpN53/1KCgAuQ1RyZyVxz7NYEARcgqz06k+P2+BYEaSjArcRvUmqh1/+dtAv/wGGDjFb3AXqTfZP6YqtbxJBCUABwKAA4FAAcCgAOBQCHAoBDAcChAOBQAHAoADgUABwKAA4FAIcCgPMPvdAfn3qMP2kAAAAASUVORK5CYII=";
papaya.ui.Toolbar.ICON_COLLAPSE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAEJGlDQ1BJQ0MgUHJvZmlsZQAAOBGFVd9v21QUPolvUqQWPyBYR4eKxa9VU1u5GxqtxgZJk6XtShal6dgqJOQ6N4mpGwfb6baqT3uBNwb8AUDZAw9IPCENBmJ72fbAtElThyqqSUh76MQPISbtBVXhu3ZiJ1PEXPX6yznfOec7517bRD1fabWaGVWIlquunc8klZOnFpSeTYrSs9RLA9Sr6U4tkcvNEi7BFffO6+EdigjL7ZHu/k72I796i9zRiSJPwG4VHX0Z+AxRzNRrtksUvwf7+Gm3BtzzHPDTNgQCqwKXfZwSeNHHJz1OIT8JjtAq6xWtCLwGPLzYZi+3YV8DGMiT4VVuG7oiZpGzrZJhcs/hL49xtzH/Dy6bdfTsXYNY+5yluWO4D4neK/ZUvok/17X0HPBLsF+vuUlhfwX4j/rSfAJ4H1H0qZJ9dN7nR19frRTeBt4Fe9FwpwtN+2p1MXscGLHR9SXrmMgjONd1ZxKzpBeA71b4tNhj6JGoyFNp4GHgwUp9qplfmnFW5oTdy7NamcwCI49kv6fN5IAHgD+0rbyoBc3SOjczohbyS1drbq6pQdqumllRC/0ymTtej8gpbbuVwpQfyw66dqEZyxZKxtHpJn+tZnpnEdrYBbueF9qQn93S7HQGGHnYP7w6L+YGHNtd1FJitqPAR+hERCNOFi1i1alKO6RQnjKUxL1GNjwlMsiEhcPLYTEiT9ISbN15OY/jx4SMshe9LaJRpTvHr3C/ybFYP1PZAfwfYrPsMBtnE6SwN9ib7AhLwTrBDgUKcm06FSrTfSj187xPdVQWOk5Q8vxAfSiIUc7Z7xr6zY/+hpqwSyv0I0/QMTRb7RMgBxNodTfSPqdraz/sDjzKBrv4zu2+a2t0/HHzjd2Lbcc2sG7GtsL42K+xLfxtUgI7YHqKlqHK8HbCCXgjHT1cAdMlDetv4FnQ2lLasaOl6vmB0CMmwT/IPszSueHQqv6i/qluqF+oF9TfO2qEGTumJH0qfSv9KH0nfS/9TIp0Wboi/SRdlb6RLgU5u++9nyXYe69fYRPdil1o1WufNSdTTsp75BfllPy8/LI8G7AUuV8ek6fkvfDsCfbNDP0dvRh0CrNqTbV7LfEEGDQPJQadBtfGVMWEq3QWWdufk6ZSNsjG2PQjp3ZcnOWWing6noonSInvi0/Ex+IzAreevPhe+CawpgP1/pMTMDo64G0sTCXIM+KdOnFWRfQKdJvQzV1+Bt8OokmrdtY2yhVX2a+qrykJfMq4Ml3VR4cVzTQVz+UoNne4vcKLoyS+gyKO6EHe+75Fdt0Mbe5bRIf/wjvrVmhbqBN97RD1vxrahvBOfOYzoosH9bq94uejSOQGkVM6sN/7HelL4t10t9F4gPdVzydEOx83Gv+uNxo7XyL/FtFl8z9ZAHF4bBsrEwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAeJJREFUOBG1lU1KA0EQhTP5c5MggkvFvQfQjS4iIcled3qBrDyCHsFsvEBcegBBkEBA0VuIW0UFBX8w4/c6VUMbAhoYG16qquvVm05Nd0+SpmlBI0mSogzxV5iY8Yf6EiWUp6NQasJFWfPL7lucQIzzvoDAn6xxrsRDEXYVrE0S44dM86kJC1GtNKxeDy+ULFDiAbQsrpqtMFeXb3GNuDLBaVmtL6zkZH+qCPegGQm1iftR3CduR3HTanxBY62I4OIiPoGOcoxdMIh4A81ZroMvblgINmiEnBcY0f++Cl6B2rMBzp0n3+aUE8cXEGqdVyaRDSY/FGDP2D4N3B64Bs/Ah/wdsA4acG+U8Fr5GuHtIaItpb1cAW2gv18FEt0HC8CHfM0pVxXXavSSpRG0fMUK1NA5sAeWwSfQ6i7AEPhwf4mJAyDBO3AJVBO0dNLw8x+hFfnLsj0kSlt0+kbYOuExiFuhng7JH2LFld0Ej2AeeCu6cF5cy3vs/XiDeAIWwS3Q298G8ZDoFuiBI7ACdKjegcZYSz2eBgjap1dAxafOkW9zyoUj7LnY/hCFmNsByYQRzf9IR6L5XUKI/uXarHn/4Gvn/H5tQvqfi14rcXHzs6vPYh3RmT9N2ZHWxkYgt4/pN/LAOfka/AG9AAAAAElFTkSuQmCC";
papaya.ui.Toolbar.FILE_MENU_DATA={label:"File",icons:null,items:[{label:"Add Image...",action:"OpenImage",type:"file",hide:papaya.utilities.PlatformUtils.ios},{label:"Add Surface...",action:"OpenSurface",type:"file",hide:papaya.utilities.PlatformUtils.ios},{label:"Add DICOM Folder...",action:"OpenFolder",type:"folder",hide:"Chrome"!==papaya.utilities.PlatformUtils.browser||"undefined"===typeof daikon},{label:"Add DTI Vector Series...",action:"OpenDTI",type:"file"},{type:"spacer"},{label:"Close All",
action:"CloseAllImages"}]};papaya.ui.Toolbar.RGB_FILE_MENU_DATA={label:"File",icons:null,items:[{label:"Close All",action:"CloseAllImages"}]};
papaya.ui.Toolbar.MENU_DATA={menus:[papaya.ui.Toolbar.FILE_MENU_DATA,{label:"View",icons:null,items:[{label:"Orientation",action:"ShowOrientation",type:"checkbox",method:"isShowingOrientation"},{label:"Crosshairs",action:"ShowCrosshairs",type:"checkbox",method:"isShowingCrosshairs"},{label:"Ruler",action:"ShowRuler",type:"checkbox",method:"isShowingRuler"},{type:"spacer",required:"hasSurface"},{label:"Surface Planes",action:"ShowSurfacePlanes",type:"checkbox",method:"isShowingSurfacePlanes",required:"hasSurface"}]},
{label:"Settings",icons:null,items:[{label:"Viewer Preferences",action:"Preferences"},{label:"Surface Preferences",action:"SurfacePreferences",required:"hasSurface"}]},{label:"Help",icons:null,items:[{label:"Show Keyboard Reference",action:"KeyboardRef"},{label:"Show Mouse Reference",action:"MouseRef"},{label:"Show License",action:"License"}]},{label:"TITLE",icons:null,titleBar:"true"},{label:"EXPAND",icons:[papaya.ui.Toolbar.ICON_EXPAND,papaya.ui.Toolbar.ICON_COLLAPSE],items:[],method:"isCollapsable",
required:"isExpandable"},{label:"SPACE",icons:[papaya.ui.Toolbar.ICON_IMAGESPACE,papaya.ui.Toolbar.ICON_WORLDSPACE],items:[],method:"isWorldMode",menuOnHover:!0}]};papaya.ui.Toolbar.MENU_DATA_KIOSK={menus:[{label:"EXPAND",icons:[papaya.ui.Toolbar.ICON_EXPAND,papaya.ui.Toolbar.ICON_COLLAPSE],items:[],method:"isCollapsable",required:"isExpandable"}]};
papaya.ui.Toolbar.OVERLAY_IMAGE_MENU_DATA={items:[{label:"Show Header",action:"ShowHeader"},{label:"Show Image Info",action:"ImageInfo"},{type:"spacer",required:"isParametricCombined"},{label:"DisplayRange",action:"ChangeRange",type:"displayrange",method:"getRange"},{label:"Load Negatives",action:"LoadNegatives",required:"canCurrentOverlayLoadNegatives"},{label:"Transparency",action:"alpha",type:"range",method:"getAlpha"},{label:"Color Table",action:"ColorTable",items:[],required:"isNonParametricCombined"},
{type:"spacer",required:"isParametricCombined"},{label:"DisplayRange",action:"ChangeRangeNeg",type:"displayrange",method:"getRangeNegative",required:"isParametricCombined"},{label:"Transparency",action:"alphaneg",type:"range",method:"getAlpha",required:"isParametricCombined"},{type:"spacer",required:"isParametricCombined"},{label:"Hide Overlay",action:"ToggleOverlay",method:"getHiddenLabel"},{label:"Close Overlay",action:"CloseOverlay",required:"isDesktopMode"},{label:"Open in Mango",action:"OpenInMango",
required:"canOpenInMango"}]};
papaya.ui.Toolbar.BASE_IMAGE_MENU_DATA={items:[{label:"Show Header",action:"ShowHeader"},{label:"Show Image Info",action:"ImageInfo"},{label:"DisplayRange",action:"ChangeRange",type:"displayrange",method:"getRange"},papaya.ui.Toolbar.OVERLAY_IMAGE_MENU_DATA.items[6],{label:"Rotation",action:"Rotation",items:[{label:"About X Axis",action:"rotationX",type:"range",method:"getRotationX"},{label:"About Y Axis",action:"rotationY",type:"range",method:"getRotationY"},{label:"About Z Axis",action:"rotationZ",
type:"range",method:"getRotationZ"},{label:"Reset Transform",action:"ResetTransform"},{label:"Rotate About Center",action:"Rotate About Center",type:"radiobutton",method:"isRotatingAbout"},{label:"Rotate About Origin",action:"Rotate About Origin",type:"radiobutton",method:"isRotatingAbout"},{label:"Rotate About Crosshairs",action:"Rotate About Crosshairs",type:"radiobutton",method:"isRotatingAbout"}]},{label:"Open in Mango",action:"OpenInMango",required:"canOpenInMango"}]};
papaya.ui.Toolbar.RGB_IMAGE_MENU_DATA={items:[{label:"Show Header",action:"ShowHeader"},{label:"Show Image Info",action:"ImageInfo"},{label:"Open in Mango",action:"OpenInMango",required:"canOpenInMango"}]};papaya.ui.Toolbar.SURFACE_MENU_DATA={items:[{label:"Show Surface Info",action:"SurfaceInfo"},{label:"Transparency",action:"alpha",type:"range",method:"getAlpha"}]};
papaya.ui.Toolbar.DTI_IMAGE_MENU_DATA={items:[{label:"Show Header",action:"ShowHeader"},{label:"Show Image Info",action:"ImageInfo"},{label:"Display Colors",action:"DTI-RGB",type:"checkbox",method:"isDTIRGB"},{label:"Display Lines",action:"DTI-Lines",type:"checkbox",method:"isDTILines"},{label:"Display Lines &amp; Colors",action:"DTI-LinesColors",type:"checkbox",method:"isDTILinesAndRGB"},{label:"Transparency",action:"alpha",type:"range",method:"getAlpha",required:"canCurrentOverlayLoadMod"},{label:"Modulate with...",
action:"DTI-Mod",type:"file",hide:papaya.utilities.PlatformUtils.ios,required:"canCurrentOverlayLoadMod"},{label:"Modulation",action:"dtiAlphaFactor",type:"range",method:"getDtiAlphaFactor",required:"canCurrentOverlayModulate"},{label:"Open in Mango",action:"OpenInMango",required:"canOpenInMango"}]};
papaya.ui.Toolbar.PREFERENCES_DATA={items:[{label:"Coordinate display of:",field:"atlasLocks",options:["Mouse","Crosshairs"]},{label:"Scroll wheel behavior:",field:"scrollBehavior",options:["Zoom","Increment Slice"],disabled:"container.disableScrollWheel"},{spacer:"true"},{label:"Smooth display:",field:"smoothDisplay",options:["Yes","No"]},{label:"Radiological display:",field:"radiological",options:["Yes","No"]}]};
papaya.ui.Toolbar.PREFERENCES_SURFACE_DATA={items:[{label:"Background color:",field:"surfaceBackgroundColor",options:["Black","Dark Gray","Gray","Light Gray","White"]}]};
papaya.ui.Toolbar.IMAGE_INFO_DATA={items:[{label:"Filename:",field:"getFilename",readonly:"true"},{spacer:"true"},{label:"Image Dims:",field:"getImageDimensionsDescription",readonly:"true"},{label:"Voxel Dims:",field:"getVoxelDimensionsDescription",readonly:"true"},{spacer:"true"},{label:"Byte Type:",field:"getByteTypeDescription",readonly:"true"},{label:"Byte Order:",field:"getByteOrderDescription",readonly:"true"},{spacer:"true"},{label:"Orientation:",field:"getOrientationDescription",readonly:"true"},
{spacer:"true"},{label:"Notes:",field:"getImageDescription",readonly:"true"}]};
papaya.ui.Toolbar.SERIES_INFO_DATA={items:[{label:"Filename:",field:"getFilename",readonly:"true"},{label:"File Length:",field:"getFileLength",readonly:"true"},{spacer:"true"},{label:"Image Dims:",field:"getImageDimensionsDescription",readonly:"true"},{label:"Voxel Dims:",field:"getVoxelDimensionsDescription",readonly:"true"},{label:"Series Points:",field:"getSeriesDimensionsDescription",readonly:"true"},{label:"Series Point Size:",field:"getSeriesSizeDescription",readonly:"true"},{spacer:"true"},
{label:"Byte Type:",field:"getByteTypeDescription",readonly:"true"},{label:"Byte Order:",field:"getByteOrderDescription",readonly:"true"},{label:"Compressed:",field:"getCompressedDescription",readonly:"true"},{spacer:"true"},{label:"Orientation:",field:"getOrientationDescription",readonly:"true"},{label:"Notes:",field:"getImageDescription",readonly:"true"}]};
papaya.ui.Toolbar.SURFACE_INFO_DATA={items:[{label:"Filename:",field:"getSurfaceFilename",readonly:"true"},{spacer:"true"},{label:"Points:",field:"getSurfaceNumPoints",readonly:"true"},{label:"Triangles:",field:"getSurfaceNumTriangles",readonly:"true"}]};papaya.ui.Toolbar.HEADER_DATA={items:[{label:"",field:"getHeaderDescription",readonly:"true"}]};papaya.ui.Toolbar.LICENSE_DATA={items:[{label:"",field:"getLicense",readonly:"true"}]};
papaya.ui.Toolbar.KEYBOARD_REF_DATA={items:[{label:"",field:"getKeyboardReference",readonly:"true"}]};papaya.ui.Toolbar.MOUSE_REF_DATA={items:[{label:"",field:"getMouseReference",readonly:"true"}]};papaya.ui.Toolbar.applyContextState=function(a){var b;a.contextMenu=!0;if(a.items)for(b=0;b<a.items.length;b+=1)a.items[b].menu?papaya.ui.Toolbar.applyContextState(a.items[b].menu):a.items[b].isContext=!0};
papaya.ui.Toolbar.prototype.buildToolbar=function(){var a;this.spaceMenu=this.surfaceMenus=this.imageMenus=null;this.container.toolbarHtml.find("."+PAPAYA_MENU_ICON_CSS).remove();this.container.toolbarHtml.find("."+PAPAYA_MENU_LABEL_CSS).remove();this.container.toolbarHtml.find("."+PAPAYA_TITLEBAR_CSS).remove();if(this.container.kioskMode)for(a=0;a<papaya.ui.Toolbar.MENU_DATA_KIOSK.menus.length;a+=1)this.buildMenu(papaya.ui.Toolbar.MENU_DATA_KIOSK.menus[a],null,this.viewer,null);else{0<this.container.viewer.screenVolumes.length&&
this.container.viewer.screenVolumes[0].rgb?papaya.ui.Toolbar.MENU_DATA.menus[0]=papaya.ui.Toolbar.RGB_FILE_MENU_DATA:(papaya.ui.Toolbar.MENU_DATA.menus[0]=this.container.noNewFiles?papaya.ui.Toolbar.RGB_FILE_MENU_DATA:papaya.ui.Toolbar.FILE_MENU_DATA,this.buildOpenMenuItems(papaya.ui.Toolbar.MENU_DATA));for(a=0;a<papaya.ui.Toolbar.MENU_DATA.menus.length;a+=1)this.buildMenu(papaya.ui.Toolbar.MENU_DATA.menus[a],null,this.viewer,null);this.buildAtlasMenu()}this.buildColorMenuItems();this.container.titlebarHtml=
this.container.containerHtml.find("."+PAPAYA_TITLEBAR_CSS);600>this.container.getViewerDimensions()[0]?this.container.titlebarHtml.css({visibility:"hidden"}):this.container.titlebarHtml.css({visibility:"visible"})};
papaya.ui.Toolbar.prototype.buildAtlasMenu=function(){if(papaya.data&&papaya.data.Atlas){var a=this.spaceMenu.items;a[0]={label:papaya.data.Atlas.labels.atlas.header.name,action:"AtlasChanged-"+papaya.data.Atlas.labels.atlas.header.name,type:"radiobutton",method:"isUsingAtlas"};papaya.data.Atlas.labels.atlas.header.transformedname&&(a[1]={label:papaya.data.Atlas.labels.atlas.header.transformedname,action:"AtlasChanged-"+papaya.data.Atlas.labels.atlas.header.transformedname,type:"radiobutton",method:"isUsingAtlas"})}};
papaya.ui.Toolbar.prototype.buildColorMenuItems=function(){var a,b,e,d;if(a=this.container.params.luts)for(b=0;b<a.length;b+=1)papaya.viewer.ColorTable.addCustomLUT(a[b]);e=papaya.viewer.ColorTable.TABLE_ALL;a=papaya.ui.Toolbar.OVERLAY_IMAGE_MENU_DATA.items;for(b=0;b<a.length;b+=1)if("Color Table"===a[b].label){a=a[b].items;break}for(b=0;b<e.length;b+=1)d={label:e[b].name,action:"ColorTable-"+e[b].name,type:"radiobutton",method:"isUsingColorTable"},a[b]=d};
papaya.ui.Toolbar.prototype.buildOpenMenuItems=function(a){var b,e;for(b=0;b<a.menus.length;b+=1)if("File"===a.menus[b].label){e=a.menus[b].items;break}if(e)for(b=0;b<papayaLoadableImages.length;b+=1)papayaLoadableImages[b].hide||(papayaLoadableImages[b].surface?(a="Add Surface "+papayaLoadableImages[b].nicename,this.menuContains(e,a)||e.splice(2,0,{label:a,action:"OpenSurface-"+papayaLoadableImages[b].name})):(a="Add "+papayaLoadableImages[b].nicename,this.menuContains(e,a)||e.splice(2,0,{label:a,
action:"Open-"+papayaLoadableImages[b].name})))};papaya.ui.Toolbar.prototype.menuContains=function(a,b){var e;if(a)for(e=0;e<a.length;e+=1)if(a[e].label===b)return!0;return!1};
papaya.ui.Toolbar.prototype.buildMenu=function(a,b,e,d,f){var k=null;void 0===f&&(f=!1);a.required&&!0!==papaya.utilities.ObjectUtils.bind(this.container,papaya.utilities.ObjectUtils.dereferenceIn(this.container,a.required))()||(k=new papaya.ui.Menu(this.viewer,a,papaya.utilities.ObjectUtils.bind(this,this.doAction),this.viewer,d),"SPACE"===a.label&&(this.spaceMenu=a),f||(b?k.setMenuButton(b):b=k.buildMenuButton()),(a=a.items)&&this.buildMenuItems(k,a,b,e,d));return k};
papaya.ui.Toolbar.prototype.buildMenuItems=function(a,b,e,d,f){var k,h,r;void 0===f&&(f="");for(k=0;k<b.length;k+=1)b[k].required&&!0!==papaya.utilities.ObjectUtils.bind(this.container,papaya.utilities.ObjectUtils.dereferenceIn(this.container,b[k].required))(parseInt(f))?h=null:"spacer"===b[k].type?h=new papaya.ui.MenuItemSpacer:"radiobutton"===b[k].type?h=new papaya.ui.MenuItemRadioButton(this.viewer,b[k].label,b[k].action,papaya.utilities.ObjectUtils.bind(this,this.doAction),d,b[k].method,f):"checkbox"===
b[k].type?h=new papaya.ui.MenuItemCheckBox(this.viewer,b[k].label,b[k].action,papaya.utilities.ObjectUtils.bind(this,this.doAction),d,b[k].method,f):"file"===b[k].type?b[k].hide||b[k].required&&!0!==papaya.utilities.ObjectUtils.bind(this.container,papaya.utilities.ObjectUtils.dereferenceIn(this.container,b[k].required))(parseInt(f))||(h=new papaya.ui.MenuItemFileChooser(this.viewer,b[k].label,b[k].action,papaya.utilities.ObjectUtils.bind(this,this.doAction),!1,f)):"folder"===b[k].type?h=b[k].hide||
b[k].required&&!0!==papaya.utilities.ObjectUtils.bind(this.container,papaya.utilities.ObjectUtils.dereferenceIn(this.container,b[k].required))(parseInt(f))?null:new papaya.ui.MenuItemFileChooser(this.viewer,b[k].label,b[k].action,papaya.utilities.ObjectUtils.bind(this,this.doAction),!0,f):"displayrange"===b[k].type?h=this.viewer.screenVolumes[f].supportsDynamicColorTable()?new papaya.ui.MenuItemRange(this.viewer,b[k].label,b[k].action,papaya.utilities.ObjectUtils.bind(this,this.doAction),d,b[k].method,
f):null:"range"===b[k].type?papaya.utilities.PlatformUtils.isInputRangeSupported()&&(h=new papaya.ui.MenuItemSlider(this.viewer,b[k].label,b[k].action,papaya.utilities.ObjectUtils.bind(this,this.doAction),d,b[k].method,f)):h=new papaya.ui.MenuItem(this.viewer,b[k].label,b[k].action,papaya.utilities.ObjectUtils.bind(this,this.doAction),d,b[k].method,f),h&&(a.addMenuItem(h),b[k].items&&(r=this.buildMenu(b[k],e,d,f),h.menu=r,h.callback=papaya.utilities.ObjectUtils.bind(r,r.showMenu)))};
papaya.ui.Toolbar.prototype.updateImageButtons=function(){this.container.toolbarHtml.find("."+PAPAYA_MENU_BUTTON_CSS).remove();this.doUpdateImageButtons();this.updateSurfaceButtons()};
papaya.ui.Toolbar.prototype.doUpdateImageButtons=function(){var a,b,e;this.imageMenus=[];if(this.container.showImageButtons)for(b=this.viewer.screenVolumes.length-1;0<=b;--b)e=this.viewer.screenVolumes[b],a=e.icon,a=[{label:"ImageButton",icons:[a],items:null,imageButton:!0}],a[0].items=0===b?e.rgb?papaya.ui.Toolbar.RGB_IMAGE_MENU_DATA.items:e.dti?papaya.ui.Toolbar.DTI_IMAGE_MENU_DATA.items:papaya.ui.Toolbar.BASE_IMAGE_MENU_DATA.items:e.dti?papaya.ui.Toolbar.DTI_IMAGE_MENU_DATA.items:papaya.ui.Toolbar.OVERLAY_IMAGE_MENU_DATA.items,
this.container.combineParametric&&e.parametric||this.imageMenus.push(this.buildMenu(a[0],null,e,b.toString()))};
papaya.ui.Toolbar.prototype.updateSurfaceButtons=function(){var a,b,e=this;this.surfaceMenus=[];if(this.container.showImageButtons)for(a=this.viewer.surfaces.length-1;0<=a;--a){var d=this.viewer.surfaces[a];d.staticIcon?papaya.viewer.ScreenVolume.makeStaticIcon(d.staticIcon,function(a,b){e.surfaceMenus.push(e.buildMenu({label:"SurfaceButton",icons:[a],items:papaya.ui.Toolbar.SURFACE_MENU_DATA.items,imageButton:!0,surfaceButton:!0},null,e.viewer.surfaces[b],b.toString()))},a):(b=d.solidColor,null===
b&&(b=[.5,.5,.5]),b=papaya.viewer.ScreenVolume.makeSolidIcon(b[0],b[1],b[2]),this.surfaceMenus.push(this.buildMenu({label:"SurfaceButton",icons:[b],items:papaya.ui.Toolbar.SURFACE_MENU_DATA.items,imageButton:!0,surfaceButton:!0},null,d,a.toString())))}};
papaya.ui.Toolbar.prototype.closeAllMenus=function(a){var b;b=this.container.toolbarHtml.find("."+PAPAYA_MENU_CSS);b.hide(100);b.remove();this.container.showControlBar&&(b=this.container.sliderControlHtml.find("."+PAPAYA_MENU_CSS),b.hide(100),b.remove());b=this.container.toolbarHtml.find("."+PAPAYA_DIALOG_CSS);b.hide(100);b.remove();b=this.container.toolbarHtml.find("."+PAPAYA_DIALOG_BACKGROUND);b.hide(100);b.remove();!a&&(a=this.container.viewerHtml.find("."+PAPAYA_MENU_CSS))&&(a.hide(100),a.remove())};
papaya.ui.Toolbar.prototype.isShowingMenus=function(){var a,b;a=this.container.toolbarHtml.find("."+PAPAYA_MENU_CSS).is(":visible");b=this.container.toolbarHtml.find("."+PAPAYA_DIALOG_CSS).is(":visible");return a||b};
papaya.ui.Toolbar.prototype.doAction=function(a,b,e){var d,f;e||this.closeAllMenus();if(a)if(a.startsWith("ImageButton"))a=parseInt(a.substr(a.length-2,1),10),this.viewer.setCurrentScreenVol(a),this.updateImageButtons();else if(a.startsWith("OpenSurface-"))b=a.substring(a.indexOf("-")+1),this.viewer.loadSurface(b);else if(a.startsWith("Open-"))b=a.substring(a.indexOf("-")+1),this.viewer.loadImage(b);else if("OpenImage"===a)this.container.display.drawProgress(.1,"Loading"),this.viewer.loadImage(b);
else if("OpenDTI"===a)this.container.display.drawProgress(.1,"Loading"),this.viewer.loadingDTI=!0,this.viewer.loadImage(b);else if("OpenSurface"===a)this.container.display.drawProgress(.1,"Loading"),this.viewer.loadSurface(b);else if("OpenFolder"===a){a=[];for(e=0;e<b.length;e+=1){f=!1;for(d=0;d<papaya.Container.ignorePatterns.length;d+=1)papaya.Container.ignorePatterns[d].test(b[e].name)&&(f=!0);f?console.log("Ignoring file "+b[e].name):a.push(b[e])}this.container.display.drawProgress(.1,"Loading");
this.viewer.loadImage(a)}else a.startsWith("ColorTable")?(b=a.substring(a.indexOf("-")+1,a.lastIndexOf("-")),a=a.substring(a.lastIndexOf("-")+1),this.viewer.screenVolumes[a].changeColorTable(this.viewer,b),this.updateImageButtons()):a.startsWith("CloseAllImages")?papaya.Container.resetViewer(this.container.containerIndex,{}):"Preferences"===a?(b=new papaya.ui.Dialog(this.container,"Viewer Preferences",papaya.ui.Toolbar.PREFERENCES_DATA,this.container.preferences,papaya.utilities.ObjectUtils.bind(this.container.preferences,
this.container.preferences.updatePreference),papaya.utilities.ObjectUtils.bind(this,function(){this.viewer.updateScreenSliceTransforms();this.viewer.drawViewer(!1,!0)})),b.showDialog()):"SurfacePreferences"===a?(b=new papaya.ui.Dialog(this.container,"Surface Preferences",papaya.ui.Toolbar.PREFERENCES_SURFACE_DATA,this.container.preferences,papaya.utilities.ObjectUtils.bind(this.container.preferences,this.container.preferences.updatePreference),papaya.utilities.ObjectUtils.bind(this,function(){this.viewer.updateScreenSliceTransforms();
this.viewer.surfaceView.updatePreferences();this.viewer.drawViewer(!1,!0)})),b.showDialog()):"License"===a?(b=new papaya.ui.Dialog(this.container,"License",papaya.ui.Toolbar.LICENSE_DATA,papaya.Container,null,null,null,!0),b.showDialog()):"KeyboardRef"===a?(b=new papaya.ui.Dialog(this.container,"Keyboard Reference",papaya.ui.Toolbar.KEYBOARD_REF_DATA,papaya.Container,null,null,null,!0),b.showDialog()):"MouseRef"===a?(b=new papaya.ui.Dialog(this.container,"Mouse Reference",papaya.ui.Toolbar.MOUSE_REF_DATA,
papaya.Container,null,null,null,!0),b.showDialog()):a.startsWith("ImageInfo")?(a=a.substring(a.lastIndexOf("-")+1),b=1<this.viewer.screenVolumes[a].volume.numTimepoints?new papaya.ui.Dialog(this.container,"Image Info",papaya.ui.Toolbar.SERIES_INFO_DATA,this.viewer,null,null,a.toString()):new papaya.ui.Dialog(this.container,"Image Info",papaya.ui.Toolbar.IMAGE_INFO_DATA,this.viewer,null,null,a.toString()),b.showDialog()):a.startsWith("SurfaceInfo")?(a=a.substring(a.lastIndexOf("-")+1),b=new papaya.ui.Dialog(this.container,
"Surface Info",papaya.ui.Toolbar.SURFACE_INFO_DATA,this.viewer,null,null,a.toString()),b.showDialog()):a.startsWith("ShowHeader")?(a=a.substring(a.lastIndexOf("-")+1),b=new papaya.ui.Dialog(this.container,"Header",papaya.ui.Toolbar.HEADER_DATA,this.viewer,null,null,a.toString()),b.showDialog()):a.startsWith("SPACE")?(this.viewer.toggleWorldSpace(),this.viewer.drawViewer(!0)):a.startsWith("AtlasChanged")?(b=a.substring(a.lastIndexOf("-")+1),this.viewer.atlas.currentAtlas=b,this.viewer.drawViewer(!0)):
a.startsWith("ShowRuler")?("Yes"===this.container.preferences.showRuler?this.container.preferences.updatePreference("showRuler","No"):this.container.preferences.updatePreference("showRuler","Yes"),this.viewer.drawViewer(),this.closeAllMenus()):a.startsWith("ShowOrientation")?("Yes"===this.container.preferences.showOrientation?this.container.preferences.updatePreference("showOrientation","No"):this.container.preferences.updatePreference("showOrientation","Yes"),this.viewer.drawViewer(),this.closeAllMenus()):
a.startsWith("ShowCrosshairs")?("Yes"===this.container.preferences.showCrosshairs?this.container.preferences.updatePreference("showCrosshairs","No"):this.container.preferences.updatePreference("showCrosshairs","Yes"),this.viewer.drawViewer(),this.closeAllMenus()):a.startsWith("EXPAND")?this.container.collapsable?this.container.collapseViewer():this.container.expandViewer():a.startsWith("OpenInMango")?(a=parseInt(a.substring(a.lastIndexOf("-")+1),10),0===a?this.container.viewer.volume.urls[0]&&papaya.utilities.PlatformUtils.launchCustomProtocol(this.container,
papaya.utilities.UrlUtils.getAbsoluteUrl(PAPAYA_CUSTOM_PROTOCOL,this.container.viewer.volume.urls[0]),this.customProtocolResult):this.container.viewer.screenVolumes[a].volume.urls[0]&&papaya.utilities.PlatformUtils.launchCustomProtocol(this.container,papaya.utilities.UrlUtils.getAbsoluteUrl(PAPAYA_CUSTOM_PROTOCOL,this.container.viewer.screenVolumes[a].volume.urls[0])+"?"+encodeURIComponent("baseimage="+this.container.viewer.volume.fileName+"&params=o"),this.customProtocolResult)):a.startsWith("CloseOverlay")?
(a=parseInt(a.substring(a.lastIndexOf("-")+1),10),this.container.viewer.removeOverlay(a)):a.startsWith("ToggleOverlay")?(a=parseInt(a.substring(a.lastIndexOf("-")+1),10),this.container.viewer.toggleOverlay(a)):a.startsWith("Context-")?this.container.contextManager.actionPerformed(a.substring(8)):a.startsWith("DTI-RGB")?(a=a.substring(a.lastIndexOf("-")+1),this.viewer.screenVolumes[a].dtiLines=!1,this.viewer.screenVolumes[a].dtiColors=!0,this.viewer.screenVolumes[a].initDTI(),this.viewer.drawViewer(!0,
!1)):a.startsWith("DTI-LinesColors")?(a=a.substring(a.lastIndexOf("-")+1),this.viewer.screenVolumes[a].dtiLines=!0,this.viewer.screenVolumes[a].dtiColors=!0,this.viewer.screenVolumes[a].initDTI(),this.viewer.drawViewer(!0,!1)):a.startsWith("DTI-Lines")?(a=a.substring(a.lastIndexOf("-")+1),this.viewer.screenVolumes[a].dtiLines=!0,this.viewer.screenVolumes[a].dtiColors=!1,this.viewer.screenVolumes[a].initDTI(),this.viewer.drawViewer(!0,!1)):a.startsWith("DTI-Mod")?(a=a.substring(a.lastIndexOf("-")+
1),this.container.display.drawProgress(.1,"Loading"),this.viewer.loadingDTIModRef=this.viewer.screenVolumes[a],this.viewer.loadImage(b)):a.startsWith("LoadNegatives")?(a=a.substring(a.lastIndexOf("-")+1),this.viewer.addParametric(a)):a.startsWith("ShowSurfacePlanes")?(this.viewer.surfaceView.showSurfacePlanes=!this.viewer.surfaceView.showSurfacePlanes,this.viewer.surfaceView.updateActivePlanes(),"Yes"===this.container.preferences.showSurfacePlanes?this.container.preferences.updatePreference("showSurfacePlanes",
"No"):this.container.preferences.updatePreference("showSurfacePlanes","Yes"),this.viewer.drawViewer(!1,!0),this.closeAllMenus()):a.startsWith("ShowSurfaceCrosshairs")?(this.viewer.surfaceView.showSurfaceCrosshairs=!this.viewer.surfaceView.showSurfaceCrosshairs,this.viewer.surfaceView.updateActivePlanes(),"Yes"===this.container.preferences.showSurfaceCrosshairs?this.container.preferences.updatePreference("showSurfaceCrosshairs","No"):this.container.preferences.updatePreference("showSurfaceCrosshairs",
"Yes"),this.viewer.drawViewer(!1,!0),this.closeAllMenus()):a.startsWith("rotation")?this.viewer.screenVolumes[0].updateTransform():a.startsWith("Rotate About")?(this.viewer.screenVolumes[0].rotationAbout=a.substring(0,a.indexOf("-")),this.viewer.screenVolumes[0].updateTransform(),this.viewer.drawViewer(!0,!1)):a.startsWith("ResetTransform")&&(this.viewer.screenVolumes[0].resetTransform(),this.viewer.screenVolumes[0].updateTransform(),this.viewer.drawViewer(!0,!1))};
papaya.ui.Toolbar.prototype.customProtocolResult=function(a){!1===a&&("Chrome"===papaya.utilities.PlatformUtils.browser||"Internet Explorer"===papaya.utilities.PlatformUtils.browser?alert("Mango does not appear to be installed.  You can download Mango at:\n\nhttp://ric.uthscsa.edu/mango"):papaya.utilities.PlatformUtils.ios?confirm("iMango does not appear to be installed.  Would you like to download it now?")&&window.open("http://itunes.apple.com/us/app/imango/id423626092"):confirm("Mango does not appear to be installed.  Would you like to download it now?")&&
window.open("http://ric.uthscsa.edu/mango/mango.html"))};papaya.ui.Toolbar.prototype.updateTitleBar=function(a){var b=this.container.titlebarHtml[0];b&&(b.innerHTML=a);this.container.titlebarHtml.css({top:0})};papaya.ui.Toolbar.prototype.showImageMenu=function(a){this.viewer.screenVolumes[a].resetDynamicRange();this.imageMenus[a].showMenu()};papaya.ui.Toolbar.prototype.updateImageMenuRange=function(a,b,e){this.imageMenus[a].updateRangeItem(b,e)};"use strict";papaya=papaya||{};
papaya.viewer=papaya.viewer||{};
papaya.viewer.Atlas=papaya.viewer.Atlas||function(a,b,e){this.container=b;this.callback=e;this.transformedname=this.name=null;this.labels=[];this.atlasLabelData=a.labels;this.volume=new papaya.volume.Volume(b.display,b.viewer);this.currentAtlas=this.transform=this.returnLabels=this.displayColumns=null;this.maxLabels=0;this.probabilistic=!1;a=b.findLoadableImage(a.labels.atlas.header.images.summaryimagefile);b.params.atlasURL?this.volume.readURLs([b.params.atlasURL],papaya.utilities.ObjectUtils.bind(this,
this.readFinished)):null!==a&&void 0!==a.encode?this.volume.readEncodedData([a.encode],papaya.utilities.ObjectUtils.bind(this,this.readFinished)):null!==a&&void 0!==a.url&&this.volume.readURLs([a.url],papaya.utilities.ObjectUtils.bind(this,this.readFinished))};papaya.viewer.Atlas.MAX_LABELS=4;papaya.viewer.Atlas.PROBABILISTIC=["probabalistic","probabilistic","statistic"];papaya.viewer.Atlas.LABEL_SPLIT_REGEX=/\.|:|,|\//;
papaya.viewer.Atlas.prototype.getLabelAtCoordinate=function(a,b,e){var d,f,k;this.transform&&this.currentAtlas===this.transformedname?(d=a*this.transform[0][0]+b*this.transform[0][1]+e*this.transform[0][2]+this.transform[0][3],f=a*this.transform[1][0]+b*this.transform[1][1]+e*this.transform[1][2]+this.transform[1][3],k=a*this.transform[2][0]+b*this.transform[2][1]+e*this.transform[2][2]+this.transform[2][3]):(d=a,f=b,k=e);a=papaya.Container.atlasWorldSpace?this.volume.getVoxelAtCoordinate(d,f,k,0,
!0):this.volume.getVoxelAtIndex(a,b,e,0,!0);this.probabilistic&&--a;return this.formatLabels(this.labels[a],this.returnLabels)};
papaya.viewer.Atlas.prototype.readFinished=function(){this.parseTransform();this.parseLabels();this.parseDisplayColumns();this.maxLabels=this.findMaxLabelParts();this.probabilistic=this.atlasLabelData.atlas.header.type&&(this.atlasLabelData.atlas.header.type.toLowerCase()===papaya.viewer.Atlas.PROBABILISTIC[0]||this.atlasLabelData.atlas.header.type.toLowerCase()===papaya.viewer.Atlas.PROBABILISTIC[1]||this.atlasLabelData.atlas.header.type.toLowerCase()===papaya.viewer.Atlas.PROBABILISTIC[2]);this.returnLabels=
[];this.returnLabels.length=this.maxLabels;this.atlasLabelData.atlas.header.transformedname&&(this.transformedname=this.atlasLabelData.atlas.header.transformedname);this.currentAtlas=this.name=this.atlasLabelData.atlas.header.name;var a=this.container.params.atlas;a&&a===this.transformedname&&(this.currentAtlas=this.transformedname);this.callback()};
papaya.viewer.Atlas.prototype.parseDisplayColumns=function(){var a,b,e;if(this.atlasLabelData.atlas.header.display)for(this.displayColumns=[],a=0,b=this.atlasLabelData.atlas.header.display.split(papaya.viewer.Atlas.LABEL_SPLIT_REGEX),e=0;e<b.length;e+=1)"*"===b[e]&&(this.displayColumns[a]=e,a+=1)};
papaya.viewer.Atlas.prototype.parseTransform=function(){var a,b,e;if(this.atlasLabelData.atlas.header.transform&&(a=this.atlasLabelData.atlas.header.transform.split(" "),this.transform=papaya.volume.Transform.IDENTITY.clone(),16===a.length))for(b=0;4>b;b+=1)for(e=0;4>e;e+=1)this.transform[b][e]=parseFloat(a[4*b+e])};
papaya.viewer.Atlas.prototype.parseLabels=function(){var a,b,e;for(a=0;a<this.atlasLabelData.atlas.data.label.length;a+=1)e=this.atlasLabelData.atlas.data.label[a],b=e.index?parseInt(e.index,10):a,this.labels[b]=e.content?e.content:e};
papaya.viewer.Atlas.prototype.formatLabels=function(a,b){var e,d,f;if(a)if(d=a.split(papaya.viewer.Atlas.LABEL_SPLIT_REGEX),this.displayColumns)for(e=0;e<d.length;e+=1)e<this.displayColumns.length&&(b[e]=d[this.displayColumns[e]]);else for(f=d.length,e=0,f>papaya.viewer.Atlas.MAX_LABELS&&(e=f-papaya.viewer.Atlas.MAX_LABELS);e<d.length;e+=1)b[e]=d[e].trim();else for(e=0;e<b.length;e+=1)b[e]="";return b};
papaya.viewer.Atlas.prototype.findMaxLabelParts=function(){var a,b;if(this.displayColumns)return this.displayColumns.length;b=[];for(a=0;a<this.labels.length;a+=1)this.formatLabels(this.labels[a],b);return b.length};"use strict";papaya=papaya||{};papaya.viewer=papaya.viewer||{};
papaya.viewer.ColorTable=papaya.viewer.ColorTable||function(a,b,e){var d=null,d=void 0!==e?e:papaya.viewer.ColorTable.findLUT(a);this.lutData=d.data;this.minLUT=this.maxLUT=0;this.knotThresholds=[];this.knotRangeRatios=[];this.LUTarrayG=Array(256);this.LUTarrayR=Array(256);this.LUTarrayB=Array(256);this.isBaseImage=b;this.knotMin=this.lutData[0];this.knotMax=this.lutData[this.lutData.length-1];this.useGradation="undefined"===typeof d.gradation||d.gradation;this.updateLUT(papaya.viewer.ColorTable.LUT_MIN,
papaya.viewer.ColorTable.LUT_MAX)};papaya.viewer.ColorTable.TABLE_GRAYSCALE={name:"Grayscale",data:[[0,0,0,0],[1,1,1,1]],gradation:!0};papaya.viewer.ColorTable.TABLE_SPECTRUM={name:"Spectrum",data:[[0,0,0,0],[.1,0,0,1],[.33,0,1,1],[.5,0,1,0],[.66,1,1,0],[.9,1,0,0],[1,1,1,1]],gradation:!0};papaya.viewer.ColorTable.TABLE_RED2YELLOW={name:"Overlay (Positives)",data:[[0,1,0,0],[1,1,1,0]],gradation:!0};papaya.viewer.ColorTable.TABLE_BLUE2GREEN={name:"Overlay (Negatives)",data:[[0,0,0,1],[1,0,1,0]],gradation:!0};
papaya.viewer.ColorTable.TABLE_HOTANDCOLD={name:"Hot-and-Cold",data:[[0,0,0,1],[.15,0,1,1],[.3,0,1,0],[.45,0,0,0],[.5,0,0,0],[.55,0,0,0],[.7,1,1,0],[.85,1,0,0],[1,1,1,1]],gradation:!0};papaya.viewer.ColorTable.TABLE_GOLD={name:"Gold",data:[[0,0,0,0],[.13,.19,.03,0],[.25,.39,.12,0],[.38,.59,.26,0],[.5,.8,.46,.08],[.63,.99,.71,.21],[.75,.99,.88,.34],[.88,.99,.99,.48],[1,.9,.95,.61]],gradation:!0};
papaya.viewer.ColorTable.TABLE_RED2WHITE={name:"Red Overlay",data:[[0,.75,0,0],[.5,1,.5,0],[.95,1,1,0],[1,1,1,1]],gradation:!0};papaya.viewer.ColorTable.TABLE_GREEN2WHITE={name:"Green Overlay",data:[[0,0,.75,0],[.5,.5,1,0],[.95,1,1,0],[1,1,1,1]],gradation:!0};papaya.viewer.ColorTable.TABLE_BLUE2WHITE={name:"Blue Overlay",data:[[0,0,0,1],[.5,0,.5,1],[.95,0,1,1],[1,1,1,1]],gradation:!0};papaya.viewer.ColorTable.TABLE_DTI_SPECTRUM={name:"Spectrum",data:[[0,1,0,0],[.5,0,1,0],[1,0,0,1]],gradation:!0};
papaya.viewer.ColorTable.TABLE_FIRE={name:"Fire",data:[[0,0,0,0],[.06,0,0,.36],[.16,.29,0,.75],[.22,.48,0,.89],[.31,.68,0,.6],[.37,.76,0,.36],[.5,.94,.31,0],[.56,1,.45,0],[.81,1,.91,0],[.88,1,1,.38],[1,1,1,1]],gradation:!0};papaya.viewer.ColorTable.ARROW_ICON="data:image/gif;base64,R0lGODlhCwARAPfGMf//////zP//mf//Zv//M///AP/M///MzP/Mmf/MZv/MM//MAP+Z//+ZzP+Zmf+ZZv+ZM/+ZAP9m//9mzP9mmf9mZv9mM/9mAP8z//8zzP8zmf8zZv8zM/8zAP8A//8AzP8Amf8AZv8AM/8AAMz//8z/zMz/mcz/Zsz/M8z/AMzM/8zMzMzMmczMZszMM8zMAMyZ/8yZzMyZmcyZZsyZM8yZAMxm/8xmzMxmmcxmZsxmM8xmAMwz/8wzzMwzmcwzZswzM8wzAMwA/8wAzMwAmcwAZswAM8wAAJn//5n/zJn/mZn/Zpn/M5n/AJnM/5nMzJnMmZnMZpnMM5nMAJmZ/5mZzJmZmZmZZpmZM5mZAJlm/5lmzJlmmZlmZplmM5lmAJkz/5kzzJkzmZkzZpkzM5kzAJkA/5kAzJkAmZkAZpkAM5kAAGb//2b/zGb/mWb/Zmb/M2b/AGbM/2bMzGbMmWbMZmbMM2bMAGaZ/2aZzGaZmWaZZmaZM2aZAGZm/2ZmzGZmmWZmZmZmM2ZmAGYz/2YzzGYzmWYzZmYzM2YzAGYA/2YAzGYAmWYAZmYAM2YAADP//zP/zDP/mTP/ZjP/MzP/ADPM/zPMzDPMmTPMZjPMMzPMADOZ/zOZzDOZmTOZZjOZMzOZADNm/zNmzDNmmTNmZjNmMzNmADMz/zMzzDMzmTMzZjMzMzMzADMA/zMAzDMAmTMAZjMAMzMAAAD//wD/zAD/mQD/ZgD/MwD/AADM/wDMzADMmQDMZgDMMwDMAACZ/wCZzACZmQCZZgCZMwCZAABm/wBmzABmmQBmZgBmMwBmAAAz/wAzzAAzmQAzZgAzMwAzAAAA/wAAzAAAmQAAZgAAM+4AAN0AALsAAKoAAIgAAHcAAFUAAEQAACIAABEAAADuAADdAAC7AACqAACIAAB3AABVAABEAAAiAAARAAAA7gAA3QAAuwAAqgAAiAAAdwAAVQAARAAAIgAAEe7u7t3d3bu7u6qqqoiIiHd3d1VVVURERCIiIhEREQAAACH5BAEAAMYALAAAAAALABEAAAg/AI0JFGhvoEGC+vodRKgv4UF7DSMqZBixoUKIFSv2w5jRIseOGztK/JgxpMiEJDWmHHkSZUuTIvvt60ezps2AADs=";
papaya.viewer.ColorTable.ARROW_ICON_WIDTH=11;papaya.viewer.ColorTable.DEFAULT_COLOR_TABLE=papaya.viewer.ColorTable.TABLE_GRAYSCALE;papaya.viewer.ColorTable.PARAMETRIC_COLOR_TABLES=[papaya.viewer.ColorTable.TABLE_RED2YELLOW,papaya.viewer.ColorTable.TABLE_BLUE2GREEN];papaya.viewer.ColorTable.OVERLAY_COLOR_TABLES=[papaya.viewer.ColorTable.TABLE_RED2WHITE,papaya.viewer.ColorTable.TABLE_GREEN2WHITE,papaya.viewer.ColorTable.TABLE_BLUE2WHITE];
papaya.viewer.ColorTable.TABLE_ALL=[papaya.viewer.ColorTable.TABLE_GRAYSCALE,papaya.viewer.ColorTable.TABLE_SPECTRUM,papaya.viewer.ColorTable.TABLE_FIRE,papaya.viewer.ColorTable.TABLE_HOTANDCOLD,papaya.viewer.ColorTable.TABLE_GOLD,papaya.viewer.ColorTable.TABLE_RED2YELLOW,papaya.viewer.ColorTable.TABLE_BLUE2GREEN,papaya.viewer.ColorTable.TABLE_RED2WHITE,papaya.viewer.ColorTable.TABLE_GREEN2WHITE,papaya.viewer.ColorTable.TABLE_BLUE2WHITE];papaya.viewer.ColorTable.LUT_MIN=0;
papaya.viewer.ColorTable.LUT_MAX=255;papaya.viewer.ColorTable.ICON_SIZE=18;papaya.viewer.ColorTable.COLOR_BAR_WIDTH=100;papaya.viewer.ColorTable.COLOR_BAR_HEIGHT=15;papaya.viewer.ColorTable.findLUT=function(a){var b;for(b=0;b<papaya.viewer.ColorTable.TABLE_ALL.length;b+=1)if(papaya.viewer.ColorTable.TABLE_ALL[b].name==a)return papaya.viewer.ColorTable.TABLE_ALL[b];return papaya.viewer.ColorTable.TABLE_GRAYSCALE};
papaya.viewer.ColorTable.addCustomLUT=function(a){papaya.viewer.ColorTable.findLUT(a.name).data===papaya.viewer.ColorTable.TABLE_GRAYSCALE.data&&papaya.viewer.ColorTable.TABLE_ALL.push(a)};papaya.viewer.ColorTable.prototype.updateMinLUT=function(a){this.updateLUT(a,this.maxLUT)};papaya.viewer.ColorTable.prototype.updateMaxLUT=function(a){this.updateLUT(this.minLUT,a)};
papaya.viewer.ColorTable.prototype.updateLUT=function(a,b){var e,d,f;this.maxLUT=b;this.minLUT=a;e=this.maxLUT-this.minLUT;for(d=0;d<this.lutData.length;d+=1)this.knotThresholds[d]=this.lutData[d][0]*e+this.minLUT;for(d=0;d<this.lutData.length-1;d+=1)this.knotRangeRatios[d]=papaya.viewer.ColorTable.LUT_MAX/(this.knotThresholds[d+1]-this.knotThresholds[d]);for(d=0;256>d;d+=1)if(d<=this.minLUT)this.LUTarrayR[d]=this.knotMin[1]*papaya.viewer.ColorTable.LUT_MAX,this.LUTarrayG[d]=this.knotMin[2]*papaya.viewer.ColorTable.LUT_MAX,
this.LUTarrayB[d]=this.knotMin[3]*papaya.viewer.ColorTable.LUT_MAX;else if(d>this.maxLUT)this.LUTarrayR[d]=this.knotMax[1]*papaya.viewer.ColorTable.LUT_MAX,this.LUTarrayG[d]=this.knotMax[2]*papaya.viewer.ColorTable.LUT_MAX,this.LUTarrayB[d]=this.knotMax[3]*papaya.viewer.ColorTable.LUT_MAX;else for(e=0;e<this.lutData.length-1;e+=1)d>this.knotThresholds[e]&&d<=this.knotThresholds[e+1]&&(this.useGradation?(f=((d-this.knotThresholds[e])*this.knotRangeRatios[e]+.5)/papaya.viewer.ColorTable.LUT_MAX,this.LUTarrayR[d]=
((1-f)*this.lutData[e][1]+f*this.lutData[e+1][1])*papaya.viewer.ColorTable.LUT_MAX,this.LUTarrayG[d]=((1-f)*this.lutData[e][2]+f*this.lutData[e+1][2])*papaya.viewer.ColorTable.LUT_MAX,this.LUTarrayB[d]=((1-f)*this.lutData[e][3]+f*this.lutData[e+1][3])*papaya.viewer.ColorTable.LUT_MAX):(this.LUTarrayR[d]=this.lutData[e][1]*papaya.viewer.ColorTable.LUT_MAX,this.LUTarrayG[d]=this.lutData[e][2]*papaya.viewer.ColorTable.LUT_MAX,this.LUTarrayB[d]=this.lutData[e][3]*papaya.viewer.ColorTable.LUT_MAX))};
papaya.viewer.ColorTable.prototype.lookupRed=function(a){return 0<=a&&256>a?this.LUTarrayR[a]&255:0};papaya.viewer.ColorTable.prototype.lookupGreen=function(a){return 0<=a&&256>a?this.LUTarrayG[a]&255:0};papaya.viewer.ColorTable.prototype.lookupBlue=function(a){return 0<=a&&256>a?this.LUTarrayB[a]&255:0};"use strict";papaya=papaya||{};papaya.viewer=papaya.viewer||{};
papaya.viewer.Display=papaya.viewer.Display||function(a,b){this.container=a;this.viewer=a.viewer;this.canvas=document.createElement("canvas");this.canvas.width=b;this.canvas.height=papaya.viewer.Display.SIZE;this.context=this.canvas.getContext("2d");this.canvas.style.padding=0;this.canvas.style.margin=0;this.canvas.style.border="none";this.canvas.style.cursor="default";this.tempCoord=new papaya.core.Coordinate(0,0,0);this.drawingError=!1;this.progressStartTime=this.progress=0;this.progressTimeout=
null;this.drawingProgress=!1;this.errorMessage="";this.drawUninitializedDisplay()};papaya.viewer.Display.SIZE=50;papaya.viewer.Display.MINI_LABELS_THRESH=700;papaya.viewer.Display.PADDING=8;papaya.viewer.Display.FONT_COLOR_WHITE="white";papaya.viewer.Display.FONT_COLOR_ORANGE="rgb(182, 59, 0)";papaya.viewer.Display.FONT_SIZE_COORDINATE_LABEL=12;papaya.viewer.Display.FONT_COLOR_COORDINATE_LABEL=papaya.viewer.Display.FONT_COLOR_WHITE;papaya.viewer.Display.FONT_TYPE_COORDINATE_LABEL="sans-serif";
papaya.viewer.Display.FONT_SIZE_COORDINATE_VALUE=18;papaya.viewer.Display.FONT_COLOR_COORDINATE_VALUE=papaya.viewer.Display.FONT_COLOR_ORANGE;papaya.viewer.Display.FONT_TYPE_COORDINATE_VALUE="sans-serif";papaya.viewer.Display.PRECISION_COORDINATE_VALUE=5;papaya.viewer.Display.PRECISION_COORDINATE_MAX=12;papaya.viewer.Display.FONT_SIZE_IMAGE_VALUE=20;papaya.viewer.Display.FONT_COLOR_IMAGE_VALUE=papaya.viewer.Display.FONT_COLOR_WHITE;papaya.viewer.Display.FONT_TYPE_IMAGE_VALUE="sans-serif";
papaya.viewer.Display.PRECISION_IMAGE_VALUE=9;papaya.viewer.Display.PRECISION_IMAGE_MAX=14;papaya.viewer.Display.FONT_SIZE_ATLAS_MINI=14;papaya.viewer.Display.FONT_SIZE_ATLAS=20;papaya.viewer.Display.FONT_TYPE_ATLAS="sans-serif";papaya.viewer.Display.FONT_SIZE_MESSAGE_VALUE=20;papaya.viewer.Display.FONT_TYPE_MESSAGE_VALUE="sans-serif";papaya.viewer.Display.FONT_COLOR_MESSAGE="rgb(200, 75, 25)";papaya.viewer.Display.PROGRESS_LABEL_SUFFIX=["...","",".",".."];
papaya.viewer.Display.PROGRESS_LABEL_DEFAULT="Loading";papaya.viewer.Display.prototype.drawUninitializedDisplay=function(){this.context.fillStyle="#000000";this.context.fillRect(0,0,this.canvas.width,this.canvas.height)};papaya.viewer.Display.prototype.canDraw=function(){return!(this.drawingError||this.drawingProgress)};
papaya.viewer.Display.prototype.drawEmptyDisplay=function(){this.canDraw()?(this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this.context.fillStyle="#000000",this.context.fillRect(0,0,this.canvas.width,this.canvas.height)):this.drawError&&this.drawError(this.errorMessage)};
papaya.viewer.Display.prototype.drawDisplay=function(a,b,e){var d,f,k,h,r,q,t,y,G;if(this.canDraw()){if(h=this.viewer.canvas.width/600,y=this.viewer.canvas.width/2,r=y/5,k=this.canvas.height,G=300>y,"Mouse"!==this.container.preferences.atlasLocks&&(a=this.viewer.currentCoord.x,b=this.viewer.currentCoord.y,e=this.viewer.currentCoord.z),this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this.context.fillStyle="#000000",this.context.fillRect(0,0,this.canvas.width,this.canvas.height),this.context.fillStyle=
papaya.viewer.Display.FONT_COLOR_COORDINATE_LABEL,this.context.font=papaya.viewer.Display.FONT_SIZE_COORDINATE_LABEL+"px "+papaya.viewer.Display.FONT_TYPE_COORDINATE_LABEL,d=papaya.viewer.Display.FONT_SIZE_COORDINATE_LABEL+.75*papaya.viewer.Display.PADDING,this.context.fillText("x",1.5*papaya.viewer.Display.PADDING,d),this.context.fillText("y",1.5*papaya.viewer.Display.PADDING+r,d),this.context.fillText("z",1.5*papaya.viewer.Display.PADDING+2*r,d),d+=papaya.viewer.Display.FONT_SIZE_COORDINATE_VALUE+
papaya.viewer.Display.PADDING/2,this.context.fillStyle=papaya.viewer.Display.FONT_COLOR_COORDINATE_VALUE,this.context.font=papaya.viewer.Display.FONT_SIZE_COORDINATE_VALUE-(G?2:0)+"px "+papaya.viewer.Display.FONT_TYPE_COORDINATE_VALUE,this.viewer.worldSpace?(f=this.viewer.screenVolumes[0].volume.header.origin,q=this.viewer.screenVolumes[0].volume.header.voxelDimensions,t=Math.min(papaya.viewer.Display.PRECISION_COORDINATE_MAX,Math.round(papaya.viewer.Display.PRECISION_COORDINATE_VALUE*h)),this.context.fillText(parseFloat(((a-
f.x)*q.xSize).toString().substr(0,t)),1.5*papaya.viewer.Display.PADDING,d),this.context.fillText(parseFloat(((f.y-b)*q.ySize).toString().substr(0,t)),1.5*papaya.viewer.Display.PADDING+r,d),this.context.fillText(parseFloat(((f.z-e)*q.zSize).toString().substr(0,t)),1.5*papaya.viewer.Display.PADDING+2*r,d)):(this.context.fillText(Math.round(a).toString(),1.5*papaya.viewer.Display.PADDING,d),this.context.fillText(Math.round(b).toString(),1.5*papaya.viewer.Display.PADDING+r,d),this.context.fillText(Math.round(e).toString(),
1.5*papaya.viewer.Display.PADDING+2*r,d)),this.viewer.currentScreenVolume.rgb||this.viewer.currentScreenVolume.dti||(f=this.viewer.getCurrentValueAt(a,b,e),this.canvas.currentval=f.toString(),d=k/2+papaya.viewer.Display.FONT_SIZE_IMAGE_VALUE/2-papaya.viewer.Display.PADDING/2,this.context.fillStyle=papaya.viewer.Display.FONT_COLOR_IMAGE_VALUE,this.context.font=papaya.viewer.Display.FONT_SIZE_IMAGE_VALUE-(G?2:0)+"px "+papaya.viewer.Display.FONT_TYPE_IMAGE_VALUE,t=Math.min(papaya.viewer.Display.PRECISION_IMAGE_MAX,
Math.round(papaya.viewer.Display.PRECISION_IMAGE_VALUE*h)),this.context.fillText(parseFloat(f.toString().substr(0,t)),2*papaya.viewer.Display.PADDING+3*r,d)),this.viewer.atlas&&(!this.viewer.atlas.volume||this.viewer.atlas.volume.isLoaded))if(papaya.Container.atlasWorldSpace?(this.viewer.getWorldCoordinateAtIndex(a,b,e,this.tempCoord),e=this.viewer.atlas.getLabelAtCoordinate(this.tempCoord.x,this.tempCoord.y,this.tempCoord.z,a,b,e)):e=this.viewer.atlas.getLabelAtCoordinate(a,b,e,a,b,e),a=e.length,
t=Math.ceil(this.viewer.atlas.maxLabels/2),300>y&&2<=a)for(b=.75*y,h=a-1;0<=h;--h)this.context.fillStyle=h===a-2?papaya.viewer.Display.FONT_COLOR_ORANGE:papaya.viewer.Display.FONT_COLOR_WHITE,this.context.font=papaya.viewer.Display.FONT_SIZE_ATLAS_MINI+"px "+papaya.viewer.Display.FONT_TYPE_ATLAS,r=this.context.measureText(e[h]),r.width>b-2*papaya.viewer.Display.PADDING&&(e[h]=e[h].substr(0,Math.round(e[h].length/3))+" ... "+e[h].substr(e[h].length-3,3)),h===a-2?this.context.fillText(e[h],y+.25*y,
1.5*papaya.viewer.Display.PADDING+papaya.viewer.Display.FONT_SIZE_ATLAS_MINI/2):h===a-1&&this.context.fillText(e[h],y+.25*y,papaya.viewer.Display.PADDING+k/2+papaya.viewer.Display.FONT_SIZE_ATLAS_MINI/2);else if(600>y&&2<a)for(b=y/2,h=a-1;0<=h;--h)this.context.fillStyle=h<t?papaya.viewer.Display.FONT_COLOR_ORANGE:papaya.viewer.Display.FONT_COLOR_WHITE,this.context.font=papaya.viewer.Display.FONT_SIZE_ATLAS_MINI+"px "+papaya.viewer.Display.FONT_TYPE_ATLAS,r=this.context.measureText(e[h]),r.width>b-
6*papaya.viewer.Display.PADDING&&(e[h]=e[h].substr(0,Math.round(e[h].length/3))+" ... "+e[h].substr(e[h].length-3,3)),0===h?this.context.fillText(e[h],y+5*papaya.viewer.Display.PADDING,1.5*papaya.viewer.Display.PADDING+papaya.viewer.Display.FONT_SIZE_ATLAS_MINI/2):1===h?this.context.fillText(e[h],y+5*papaya.viewer.Display.PADDING,papaya.viewer.Display.PADDING+k/2+papaya.viewer.Display.FONT_SIZE_ATLAS_MINI/2):2===h?this.context.fillText(e[h],1.5*y+5*papaya.viewer.Display.PADDING,1.5*papaya.viewer.Display.PADDING+
papaya.viewer.Display.FONT_SIZE_ATLAS_MINI/2):3===h&&this.context.fillText(e[h],1.5*y+5*papaya.viewer.Display.PADDING,papaya.viewer.Display.PADDING+k/2+papaya.viewer.Display.FONT_SIZE_ATLAS_MINI/2);else if(800>y&&3<a)for(b=y/3,h=0;4>h;h+=1)2>h?(this.context.fillStyle=h<t?papaya.viewer.Display.FONT_COLOR_ORANGE:papaya.viewer.Display.FONT_COLOR_WHITE,this.context.font=papaya.viewer.Display.FONT_SIZE_ATLAS_MINI+"px "+papaya.viewer.Display.FONT_TYPE_ATLAS,r=this.context.measureText(e[h]),r.width>b-6*
papaya.viewer.Display.PADDING&&(e[h]=e[h].substr(0,Math.round(e[h].length/3))+" ... "+e[h].substr(e[h].length-3,3)),0===h?this.context.fillText(e[h],y+5*papaya.viewer.Display.PADDING,1.5*papaya.viewer.Display.PADDING+papaya.viewer.Display.FONT_SIZE_ATLAS_MINI/2):1===h?this.context.fillText(e[h],y+5*papaya.viewer.Display.PADDING,papaya.viewer.Display.PADDING+k/2+papaya.viewer.Display.FONT_SIZE_ATLAS_MINI/2):2===h?this.context.fillText(e[h],1.5*y+5*papaya.viewer.Display.PADDING,1.5*papaya.viewer.Display.PADDING+
papaya.viewer.Display.FONT_SIZE_ATLAS_MINI/2):3===h&&this.context.fillText(e[h],1.5*y+5*papaya.viewer.Display.PADDING,papaya.viewer.Display.PADDING+k/2+papaya.viewer.Display.FONT_SIZE_ATLAS_MINI/2)):(d=k/2+papaya.viewer.Display.FONT_SIZE_ATLAS/2-papaya.viewer.Display.PADDING/2,this.context.fillStyle=h<t?papaya.viewer.Display.FONT_COLOR_ORANGE:papaya.viewer.Display.FONT_COLOR_WHITE,this.context.font=papaya.viewer.Display.FONT_SIZE_ATLAS+"px "+papaya.viewer.Display.FONT_TYPE_ATLAS,r=this.context.measureText(e[h]),
r.width>b-2*papaya.viewer.Display.PADDING&&(e[h]=e[h].substr(0,Math.round(e[h].length/3))+" ... "+e[h].substr(e[h].length-3,3)),2===h?this.context.fillText(e[h],y+papaya.viewer.Display.PADDING+b,d):3===h&&this.context.fillText(e[h],y+papaya.viewer.Display.PADDING+2*b,d));else for(b=y/a,d=k/2+papaya.viewer.Display.FONT_SIZE_ATLAS/2-papaya.viewer.Display.PADDING/2,h=0;h<a;h+=1)this.context.fillStyle=h<t?papaya.viewer.Display.FONT_COLOR_ORANGE:papaya.viewer.Display.FONT_COLOR_WHITE,this.context.font=
papaya.viewer.Display.FONT_SIZE_ATLAS-(G?4:0)+"px "+papaya.viewer.Display.FONT_TYPE_ATLAS,r=this.context.measureText(e[h]),r.width>b-2*papaya.viewer.Display.PADDING-.05*y*Math.max(0,3-a)&&(e[h]=e[h].substr(0,Math.round(e[h].length/3))+" ... "+e[h].substr(e[h].length-3,3)),this.context.fillText(e[h],y+papaya.viewer.Display.PADDING+.05*y*Math.max(0,3-a)+h*b,d)}else this.drawError&&this.drawError(this.errorMessage)};
papaya.viewer.Display.prototype.drawError=function(a){var b;this.errorMessage=a;this.drawingError=!0;b=this;window.setTimeout(papaya.utilities.ObjectUtils.bind(b,function(){b.drawingError=!1}),3E3);this.context.clearRect(0,0,this.canvas.width,this.canvas.height);this.context.fillStyle="#000000";this.context.fillRect(0,0,this.canvas.width,this.canvas.height);this.context.fillStyle="red";this.context.font=papaya.viewer.Display.FONT_SIZE_MESSAGE_VALUE+"px "+papaya.viewer.Display.FONT_TYPE_MESSAGE_VALUE;
this.context.fillText(a,papaya.viewer.Display.PADDING,papaya.viewer.Display.FONT_SIZE_COORDINATE_LABEL+papaya.viewer.Display.PADDING+1.5*papaya.viewer.Display.PADDING)};
papaya.viewer.Display.prototype.drawProgress=function(a,b){var e,d,f,k;e=Math.round(1E3*a);e>this.progress&&(this.progress=e,e=void 0!==b?b:papaya.viewer.Display.PROGRESS_LABEL_DEFAULT,f=0===this.progressStartTime?this.progressStartTime=(new Date).getTime():(new Date).getTime(),f=parseInt((f-this.progressStartTime)/500,10)%4,990<=this.progress?(this.progressTimeout&&(window.clearTimeout(this.progressTimeout),this.progressTimeout=null),this.drawingProgress=!1,this.progressStartTime=this.progress=0,
this.drawEmptyDisplay()):(this.progressTimeout&&window.clearTimeout(this.progressTimeout),d=this,this.progressTimeout=window.setTimeout(papaya.utilities.ObjectUtils.bind(d,function(){d.drawingProgress=!1}),3E3),this.context.clearRect(0,0,this.canvas.width,this.canvas.height),this.context.fillStyle="#fff",this.context.fillRect(0,0,this.canvas.width,this.canvas.height),this.context.fillStyle="#000",this.context.fillRect(0,0,this.canvas.width*a,this.canvas.height),this.context.font=papaya.viewer.Display.FONT_SIZE_MESSAGE_VALUE+
"px "+papaya.viewer.Display.FONT_TYPE_MESSAGE_VALUE,this.context.fillStyle=papaya.viewer.Display.FONT_COLOR_MESSAGE,k=papaya.viewer.Display.FONT_SIZE_COORDINATE_LABEL+papaya.viewer.Display.PADDING+1.5*papaya.viewer.Display.PADDING,this.context.fillText(e+papaya.viewer.Display.PROGRESS_LABEL_SUFFIX[f],2*papaya.viewer.Display.PADDING,k)))};"use strict";papaya=papaya||{};papaya.volume=papaya.volume||{};
papaya.viewer.Preferences=papaya.viewer.Preferences||function(){this.viewer=null;this.showCrosshairs=papaya.viewer.Preferences.DEFAULT_SHOW_CROSSHAIRS;this.atlasLocks=papaya.viewer.Preferences.DEFAULT_ATLAS_LOCKS;this.showOrientation=papaya.viewer.Preferences.DEFAULT_SHOW_ORIENTATION;this.scrollBehavior=papaya.viewer.Preferences.DEFAULT_SCROLL;this.smoothDisplay=papaya.viewer.Preferences.DEFAULT_SMOOTH_DISPLAY;this.radiological=papaya.viewer.Preferences.DEFAULT_RADIOLOGICAL;this.showRuler=papaya.viewer.Preferences.DEFAULT_SHOW_RULER;
this.surfaceBackgroundColor=papaya.viewer.Preferences.DEFAULT_SURFACE_BACKGROUND_COLOR;this.showSurfacePlanes=papaya.viewer.Preferences.DEFAULT_SHOW_SURFACE_PLANES;this.showSurfaceCrosshairs=papaya.viewer.Preferences.DEFAULT_SHOW_SURFACE_CROSSHAIRS};papaya.viewer.Preferences.ALL_PREFS="showCrosshairs atlasLocks showOrientation scrollBehavior smoothDisplay radiological showRuler surfaceBackgroundColor showSurfacePlanes".split(" ");papaya.viewer.Preferences.COOKIE_PREFIX="papaya-";
papaya.viewer.Preferences.COOKIE_EXPIRY_DAYS=365;papaya.viewer.Preferences.DEFAULT_SHOW_CROSSHAIRS="Yes";papaya.viewer.Preferences.DEFAULT_ATLAS_LOCKS="Mouse";papaya.viewer.Preferences.DEFAULT_SHOW_ORIENTATION="No";papaya.viewer.Preferences.DEFAULT_SCROLL="Increment Slice";papaya.viewer.Preferences.DEFAULT_SMOOTH_DISPLAY="Yes";papaya.viewer.Preferences.DEFAULT_RADIOLOGICAL="No";papaya.viewer.Preferences.DEFAULT_SHOW_RULER="No";papaya.viewer.Preferences.DEFAULT_SURFACE_BACKGROUND_COLOR="Gray";
papaya.viewer.Preferences.DEFAULT_SHOW_SURFACE_PLANES="Yes";papaya.viewer.Preferences.prototype.updatePreference=function(a,b){this[a]=b;this.viewer.drawViewer(!0);papaya.utilities.UrlUtils.createCookie(papaya.viewer.Preferences.COOKIE_PREFIX+a,b,papaya.viewer.Preferences.COOKIE_EXPIRY_DAYS)};
papaya.viewer.Preferences.prototype.readPreferences=function(){var a,b;for(a=0;a<papaya.viewer.Preferences.ALL_PREFS.length;a+=1)(b=papaya.utilities.UrlUtils.readCookie(papaya.viewer.Preferences.COOKIE_PREFIX+papaya.viewer.Preferences.ALL_PREFS[a]))&&(this[papaya.viewer.Preferences.ALL_PREFS[a]]=b)};"use strict";papaya=papaya||{};papaya.viewer=papaya.viewer||{};
papaya.viewer.ScreenSlice=papaya.viewer.ScreenSlice||function(a,b,e,d,f,k,h,r){this.screenVolumes=h;this.sliceDirection=b;this.currentSlice=-1;this.xDim=e;this.yDim=d;this.xSize=f;this.ySize=k;this.canvasMain=document.createElement("canvas");this.canvasMain.width=this.xDim;this.canvasMain.height=this.yDim;this.contextMain=this.canvasMain.getContext("2d");this.imageDataDraw=this.contextMain.createImageData(this.xDim,this.yDim);this.screenDim=this.screenOffsetY=this.screenOffsetX=0;this.screenTransform=
[[1,0,0],[0,1,0],[0,0,1]];this.zoomTransform=[[1,0,0],[0,1,0],[0,0,1]];this.finalTransform=[[1,0,0],[0,1,0],[0,0,1]];this.radiologicalTransform=[[-1,0,this.xDim],[0,1,0],[0,0,1]];this.tempTransform=[[1,0,0],[0,1,0],[0,0,1]];this.tempTransform2=[[1,0,0],[0,1,0],[0,0,1]];this.screenTransform2=[[1,0,0],[0,1,0],[0,0,1]];this.finalTransform2=[[1,0,0],[0,1,0],[0,0,1]];this.imageData=[];this.imageData2=[];this.manager=r;this.rulerPoints=[new papaya.core.Point(parseInt(.25*e),parseInt(.25*d)),new papaya.core.Point(parseInt(.75*
e),parseInt(.75*d))];this.tempPoint=new papaya.core.Point;this.contextDTILines=this.canvasDTILines=null};papaya.viewer.ScreenSlice.DIRECTION_UNKNOWN=0;papaya.viewer.ScreenSlice.DIRECTION_AXIAL=1;papaya.viewer.ScreenSlice.DIRECTION_CORONAL=2;papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL=3;papaya.viewer.ScreenSlice.DIRECTION_TEMPORAL=4;papaya.viewer.ScreenSlice.DIRECTION_SURFACE=5;papaya.viewer.ScreenSlice.SCREEN_PIXEL_MAX=255;papaya.viewer.ScreenSlice.SCREEN_PIXEL_MIN=0;
papaya.viewer.ScreenSlice.GRAB_RADIUS=5;papaya.viewer.ScreenSlice.DTI_COLORS=["#ff0000","#00ff00","#0000ff"];
papaya.viewer.ScreenSlice.prototype.updateSlice=function(a,b){var e,d,f,k,h,r,q,t,y,G,B,w,E,P,da,aa,M,ka,m,fa,ba,Z,X,U=!1,x,n=0,z,Y=!1,D=this.manager.isWorldMode();a=Math.round(a);x=this.manager.isRadiologicalMode()&&this.isRadiologicalSensitive()?-1:1;if(b||this.currentSlice!==a){this.currentSlice=a;e=this.screenVolumes[0].volume.header.origin;d=this.screenVolumes[0].volume.header.voxelDimensions;this.contextMain.clearRect(0,0,this.canvasMain.width,this.canvasMain.height);this.contextDTILines&&this.contextDTILines.clearRect(0,
0,this.screenDim,this.screenDim);this.imageData.length<this.screenVolumes.length&&(this.imageData=papaya.utilities.ArrayUtils.createArray(this.screenVolumes.length,this.xDim*this.yDim),this.imageData2=papaya.utilities.ArrayUtils.createArray(this.screenVolumes.length,1));for(f=0;f<this.screenVolumes.length;f+=1)if(!this.screenVolumes[f].hidden){G=this.screenVolumes[f].currentTimepoint;B=this.screenVolumes[f].rgb;w=this.screenVolumes[f].dti;E=this.screenVolumes[f].dtiLines;Y|=!E;ka=this.screenVolumes[f].dtiColors;
X=this.screenVolumes[f].dtiAlphaFactor;z=0===f||this.screenVolumes[f].interpolation;z&="Yes"===this.manager.container.preferences.smoothDisplay;E&&(this.updateDTILinesImage(),this.contextDTILines.lineWidth=1,ka||(this.contextDTILines.strokeStyle=papaya.viewer.ScreenSlice.DTI_COLORS[n],n+=1,n%=3,this.contextDTILines.beginPath()));for(k=0;k<this.yDim;k+=1)for(h=0;h<this.xDim;h+=1)(r=0,q=255,y=this.screenVolumes[f].alpha,B)?(this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL?r=this.screenVolumes[f].volume.getVoxelAtIndex(h,
k,a,G,!0):this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL?r=this.screenVolumes[f].volume.getVoxelAtIndex(h,a,k,G,!0):this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL&&(r=this.screenVolumes[f].volume.getVoxelAtIndex(a,h,k,G,!0)),t=4*(k*this.xDim+h),this.imageData[f][t]=r,this.imageDataDraw.data[t]=r>>16&255,this.imageDataDraw.data[t+1]=r>>8&255,this.imageDataDraw.data[t+2]=r&255,this.imageDataDraw.data[t+3]=q):w?(D?(this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL?
(m=(h-e.x)*d.xSize,fa=(e.y-k)*d.ySize,ba=(e.z-a)*d.zSize):this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL?(m=(h-e.x)*d.xSize,fa=(e.y-a)*d.ySize,ba=(e.z-k)*d.zSize):this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL&&(m=(a-e.x)*d.xSize,fa=(e.y-h)*d.ySize,ba=(e.z-k)*d.zSize),aa=this.screenVolumes[f].volume.getVoxelAtCoordinate(m,fa,ba,0,!z),P=this.screenVolumes[f].volume.getVoxelAtCoordinate(m,fa,ba,1,!z),da=this.screenVolumes[f].volume.getVoxelAtCoordinate(m,fa,ba,
2,!z),this.screenVolumes[f].dtiVolumeMod&&(y=Math.min(1,this.screenVolumes[f].dtiVolumeMod.getVoxelAtCoordinate(m,fa,ba,0,!z)))):(this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL?(m=h*d.xSize,fa=k*d.ySize,ba=a*d.zSize):this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL?(m=h*d.xSize,fa=a*d.ySize,ba=k*d.zSize):this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL&&(m=a*d.xSize,fa=h*d.ySize,ba=k*d.zSize),aa=this.screenVolumes[f].volume.getVoxelAtMM(m,fa,ba,
0,!z),P=this.screenVolumes[f].volume.getVoxelAtMM(m,fa,ba,1,!z),da=this.screenVolumes[f].volume.getVoxelAtMM(m,fa,ba,2,!z),this.screenVolumes[f].dtiVolumeMod&&(y=Math.min(1,this.screenVolumes[f].dtiVolumeMod.getVoxelAtMM(m,fa,ba,0,!z)))),t=4*(k*this.xDim+h),E?0!==aa||0!==P||0!==da?(this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL?(M=Math.atan2(x*P,aa),Z=Math.acos(Math.abs(da)/Math.sqrt(aa*aa+P*P+da*da))):this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL?(M=Math.atan2(x*
da,aa),Z=Math.acos(Math.abs(P)/Math.sqrt(aa*aa+P*P+da*da))):this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL&&(M=Math.atan2(da,P),Z=Math.acos(Math.abs(aa)/Math.sqrt(aa*aa+P*P+da*da))),Z=1-Z/1.5708,aa=papayaRoundFast(Math.abs(255*aa)),P=papayaRoundFast(Math.abs(255*P)),da=papayaRoundFast(Math.abs(255*da)),r=papayaRoundFast(255*y),r=(r&255)<<24|(aa&255)<<16|(P&255)<<8|da&255,ka&&(this.contextDTILines.beginPath(),q=r&16777215,this.contextDTILines.strokeStyle="#"+papaya.utilities.StringUtils.pad(q.toString(16),
6)),this.imageData[f][t]=M,this.imageData2[f][t]=r,y=Math.sin(M),r=Math.cos(M),t=this.finalTransform2[0][2]+(h+.5)*this.finalTransform2[0][0],q=this.finalTransform2[1][2]+(k+.5)*this.finalTransform2[1][1],P=this.finalTransform2[0][2]+(h+.5*Z)*this.finalTransform2[0][0],da=this.finalTransform2[1][2]+(k+.5)*this.finalTransform2[1][1],aa=r*(P-t)-y*(da-q)+t,P=y*(P-t)+r*(da-q)+q,this.contextDTILines.moveTo(aa,P),P=this.finalTransform2[0][2]+(h+1-.5*Z)*this.finalTransform2[0][0],da=this.finalTransform2[1][2]+
(k+.5)*this.finalTransform2[1][1],aa=r*(P-t)-y*(da-q)+t,t=y*(P-t)+r*(da-q)+q,this.contextDTILines.lineTo(aa,t),ka&&this.contextDTILines.stroke()):this.imageData[f][t]=Number.NaN:(y=0!==aa||0!==P||0!==da?1-(1-y)*X:0,aa=papayaRoundFast(Math.abs(255*aa)),P=papayaRoundFast(Math.abs(255*P)),da=papayaRoundFast(Math.abs(255*da)),r=papayaRoundFast(255*y),this.imageData[f][t]=(r&255)<<24|(aa&255)<<16|(P&255)<<8|da&255,U?(this.imageDataDraw.data[t]=this.imageDataDraw.data[t]*(1-y)+(aa&255)*y,this.imageDataDraw.data[t+
1]=this.imageDataDraw.data[t+1]*(1-y)+(P&255)*y,this.imageDataDraw.data[t+2]=this.imageDataDraw.data[t+2]*(1-y)+(da&255)*y,this.imageDataDraw.data[t+3]=q):(this.imageDataDraw.data[t]=aa&255,this.imageDataDraw.data[t+1]=P&255,this.imageDataDraw.data[t+2]=da&255,this.imageDataDraw.data[t+3]=r&255))):(D?this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL?r=this.screenVolumes[f].volume.getVoxelAtCoordinate((h-e.x)*d.xSize,(e.y-k)*d.ySize,(e.z-a)*d.zSize,G,!z):this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL?
r=this.screenVolumes[f].volume.getVoxelAtCoordinate((h-e.x)*d.xSize,(e.y-a)*d.ySize,(e.z-k)*d.zSize,G,!z):this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL&&(r=this.screenVolumes[f].volume.getVoxelAtCoordinate((a-e.x)*d.xSize,(e.y-h)*d.ySize,(e.z-k)*d.zSize,G,!z)):this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL?r=this.screenVolumes[f].volume.getVoxelAtMM(h*d.xSize,k*d.ySize,a*d.zSize,G,!z):this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL?r=this.screenVolumes[f].volume.getVoxelAtMM(h*
d.xSize,a*d.ySize,k*d.zSize,G,!z):this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL&&(r=this.screenVolumes[f].volume.getVoxelAtMM(a*d.xSize,h*d.ySize,k*d.zSize,G,!z)),t=4*(k*this.xDim+h),aa=r,this.imageData[f][t]=r,!this.screenVolumes[f].negative&&r<=this.screenVolumes[f].screenMin||this.screenVolumes[f].negative&&r>=this.screenVolumes[f].screenMin||isNaN(r)?(r=papaya.viewer.ScreenSlice.SCREEN_PIXEL_MIN,q=this.screenVolumes[f].isOverlay()?0:255):r=!this.screenVolumes[f].negative&&
r>=this.screenVolumes[f].screenMax||this.screenVolumes[f].negative&&r<=this.screenVolumes[f].screenMax?papaya.viewer.ScreenSlice.SCREEN_PIXEL_MAX:papayaRoundFast((r-this.screenVolumes[f].screenMin)*this.screenVolumes[f].screenRatio),U)?0<q&&(this.imageDataDraw.data[t]=this.imageDataDraw.data[t]*(1-y)+this.screenVolumes[f].colorTable.lookupRed(r,aa)*y,this.imageDataDraw.data[t+1]=this.imageDataDraw.data[t+1]*(1-y)+this.screenVolumes[f].colorTable.lookupGreen(r,aa)*y,this.imageDataDraw.data[t+2]=this.imageDataDraw.data[t+
2]*(1-y)+this.screenVolumes[f].colorTable.lookupBlue(r,aa)*y,this.imageDataDraw.data[t+3]=q):(this.imageDataDraw.data[t]=this.screenVolumes[f].colorTable.lookupRed(r,aa)*y,this.imageDataDraw.data[t+1]=this.screenVolumes[f].colorTable.lookupGreen(r,aa)*y,this.imageDataDraw.data[t+2]=this.screenVolumes[f].colorTable.lookupBlue(r,aa)*y,this.imageDataDraw.data[t+3]=q);ka||this.contextDTILines.stroke();E||(U=!0)}Y&&this.contextMain.putImageData(this.imageDataDraw,0,0)}};
papaya.viewer.ScreenSlice.prototype.repaint=function(a,b,e){var d,f,k,h;b=0;var r,q,t,y,G,B,w,E,P,da;e=0;var aa=!1;this.currentSlice=a=Math.round(a);this.contextMain.clearRect(0,0,this.canvasMain.width,this.canvasMain.height);this.contextDTILines&&this.contextDTILines.clearRect(0,0,this.screenDim,this.screenDim);if(this.imageData.length===this.screenVolumes.length){for(a=0;a<this.screenVolumes.length;a+=1)if(!this.screenVolumes[a].hidden){q=this.screenVolumes[a].rgb;t=this.screenVolumes[a].dti;y=
this.screenVolumes[a].dtiLines;da=this.screenVolumes[a].dtiColors;y&&(this.contextDTILines.lineWidth=1,da||(this.contextDTILines.strokeStyle=papaya.viewer.ScreenSlice.DTI_COLORS[e],e+=1,e%=3,this.contextDTILines.beginPath()));for(d=0;d<this.yDim;d+=1)for(f=0;f<this.xDim;f+=1)(k=this.imageData[a][b],h=255,r=this.screenVolumes[a].alpha,b=4*(d*this.xDim+f),q)?(this.imageDataDraw.data[b]=k>>16&255,this.imageDataDraw.data[b+1]=k>>8&255,this.imageDataDraw.data[b+2]=k&255,this.imageDataDraw.data[b+3]=h):
t?y?(h=this.imageData[a][b],isNaN(h)||(k=this.imageData2[a][b],P=k>>16&255,E=k>>8&255,B=k&255,r=k&16777215,this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL?G=Math.acos(Math.abs(B)/Math.sqrt(P*P+E*E+B*B)):this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL?G=Math.acos(Math.abs(E)/Math.sqrt(P*P+E*E+B*B)):this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL&&(G=Math.acos(Math.abs(P)/Math.sqrt(P*P+E*E+B*B))),G=1-G/1.5708,da&&(this.contextDTILines.beginPath(),
this.contextDTILines.strokeStyle="#"+papaya.utilities.StringUtils.pad(r.toString(16),6)),k=Math.sin(h),P=Math.cos(h),r=this.finalTransform2[0][2]+(f+.5)*this.finalTransform2[0][0],h=this.finalTransform2[1][2]+(d+.5)*this.finalTransform2[1][1],B=this.finalTransform2[0][2]+(f+.5*G)*this.finalTransform2[0][0],w=this.finalTransform2[1][2]+(d+.5)*this.finalTransform2[1][1],E=P*(B-r)-k*(w-h)+r,B=k*(B-r)+P*(w-h)+h,this.contextDTILines.moveTo(E,B),B=this.finalTransform2[0][2]+(f+1-.5*G)*this.finalTransform2[0][0],
w=this.finalTransform2[1][2]+(d+.5)*this.finalTransform2[1][1],E=P*(B-r)-k*(w-h)+r,k=k*(B-r)+P*(w-h)+h,this.contextDTILines.lineTo(E,k),da&&this.contextDTILines.stroke())):(k=this.imageData[a][b],r=k&16777215,r=0!==r?(k>>24&255)/255:0,aa?(this.imageDataDraw.data[b]=this.imageDataDraw.data[b]*(1-r)+(k>>16&255)*r,this.imageDataDraw.data[b+1]=this.imageDataDraw.data[b+1]*(1-r)+(k>>8&255)*r,this.imageDataDraw.data[b+2]=this.imageDataDraw.data[b+2]*(1-r)+(k&255)*r,this.imageDataDraw.data[b+3]=h):(this.imageDataDraw.data[b]=
k>>16&255,this.imageDataDraw.data[b+1]=k>>8&255,this.imageDataDraw.data[b+2]=k&255,this.imageDataDraw.data[b+3]=k>>24&255)):(P=k=this.imageData[a][b],!this.screenVolumes[a].negative&&k<=this.screenVolumes[a].screenMin||this.screenVolumes[a].negative&&k>=this.screenVolumes[a].screenMin||isNaN(k)?(k=papaya.viewer.ScreenSlice.SCREEN_PIXEL_MIN,h=this.screenVolumes[a].isOverlay()?0:255):k=!this.screenVolumes[a].negative&&k>=this.screenVolumes[a].screenMax||this.screenVolumes[a].negative&&k<=this.screenVolumes[a].screenMax?
papaya.viewer.ScreenSlice.SCREEN_PIXEL_MAX:papayaRoundFast((k-this.screenVolumes[a].screenMin)*this.screenVolumes[a].screenRatio),aa)?0<h&&(this.imageDataDraw.data[b]=this.imageDataDraw.data[b]*(1-r)+this.screenVolumes[a].colorTable.lookupRed(k,P)*r,this.imageDataDraw.data[b+1]=this.imageDataDraw.data[b+1]*(1-r)+this.screenVolumes[a].colorTable.lookupGreen(k,P)*r,this.imageDataDraw.data[b+2]=this.imageDataDraw.data[b+2]*(1-r)+this.screenVolumes[a].colorTable.lookupBlue(k,P)*r,this.imageDataDraw.data[b+
3]=h):(this.imageDataDraw.data[b]=this.screenVolumes[a].colorTable.lookupRed(k,P)*r,this.imageDataDraw.data[b+1]=this.screenVolumes[a].colorTable.lookupGreen(k,P)*r,this.imageDataDraw.data[b+2]=this.screenVolumes[a].colorTable.lookupBlue(k,P)*r,this.imageDataDraw.data[b+3]=h);da||this.contextDTILines.stroke();y||(aa=!0)}this.contextMain.putImageData(this.imageDataDraw,0,0)}else this.updateSlice(a,!0)};papaya.viewer.ScreenSlice.prototype.getRealWidth=function(){return this.xDim*this.xSize};
papaya.viewer.ScreenSlice.prototype.getRealHeight=function(){return this.yDim*this.ySize};papaya.viewer.ScreenSlice.prototype.getXYratio=function(){return this.xSize/this.ySize};papaya.viewer.ScreenSlice.prototype.getYXratio=function(){return this.ySize/this.xSize};papaya.viewer.ScreenSlice.prototype.getXSize=function(){return this.xSize};papaya.viewer.ScreenSlice.prototype.getYSize=function(){return this.ySize};papaya.viewer.ScreenSlice.prototype.getXDim=function(){return this.xDim};
papaya.viewer.ScreenSlice.prototype.getYDim=function(){return this.yDim};
papaya.viewer.ScreenSlice.prototype.updateZoomTransform=function(a,b,e,d,f,k){var h;b=(b+.5)*(a-1)*-1;e=(e+.5)*(a-1)*-1;d=b+d*(a-1);h=-1*(a-1)*this.xDim;0<d?d=0:d<h&&(d=h);f=e+f*(a-1);h=-1*(a-1)*this.yDim;0<f?f=0:f<h&&(f=h);1<a&&(this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL?(k.panAmountX=Math.round((d-b)/(a-1)),k.panAmountY=Math.round((f-e)/(a-1))):this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL?(k.panAmountX=Math.round((d-b)/(a-1)),k.panAmountZ=Math.round((f-
e)/(a-1))):this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL&&(k.panAmountY=Math.round((d-b)/(a-1)),k.panAmountZ=Math.round((f-e)/(a-1))));this.zoomTransform[0][0]=a;this.zoomTransform[0][1]=0;this.zoomTransform[0][2]=d;this.zoomTransform[1][0]=0;this.zoomTransform[1][1]=a;this.zoomTransform[1][2]=f;this.updateFinalTransform()};
papaya.viewer.ScreenSlice.prototype.updateFinalTransform=function(){var a,b;if(this.manager.isRadiologicalMode()&&this.isRadiologicalSensitive()){for(a=0;3>a;a+=1)for(b=0;3>b;b+=1)this.tempTransform[a][b]=this.screenTransform[a][b];for(a=0;3>a;a+=1)for(b=0;3>b;b+=1)this.tempTransform2[a][b]=this.tempTransform[a][0]*this.radiologicalTransform[0][b]+this.tempTransform[a][1]*this.radiologicalTransform[1][b]+this.tempTransform[a][2]*this.radiologicalTransform[2][b];for(a=0;3>a;a+=1)for(b=0;3>b;b+=1)this.finalTransform[a][b]=
this.tempTransform2[a][0]*this.zoomTransform[0][b]+this.tempTransform2[a][1]*this.zoomTransform[1][b]+this.tempTransform2[a][2]*this.zoomTransform[2][b];for(a=0;3>a;a+=1)for(b=0;3>b;b+=1)this.tempTransform[a][b]=this.screenTransform2[a][b];for(a=0;3>a;a+=1)for(b=0;3>b;b+=1)this.tempTransform2[a][b]=this.tempTransform[a][0]*this.radiologicalTransform[0][b]+this.tempTransform[a][1]*this.radiologicalTransform[1][b]+this.tempTransform[a][2]*this.radiologicalTransform[2][b];for(a=0;3>a;a+=1)for(b=0;3>
b;b+=1)this.finalTransform2[a][b]=this.tempTransform2[a][0]*this.zoomTransform[0][b]+this.tempTransform2[a][1]*this.zoomTransform[1][b]+this.tempTransform2[a][2]*this.zoomTransform[2][b]}else{for(a=0;3>a;a+=1)for(b=0;3>b;b+=1)this.finalTransform[a][b]=this.screenTransform[a][0]*this.zoomTransform[0][b]+this.screenTransform[a][1]*this.zoomTransform[1][b]+this.screenTransform[a][2]*this.zoomTransform[2][b];for(a=0;3>a;a+=1)for(b=0;3>b;b+=1)this.finalTransform2[a][b]=this.screenTransform2[a][0]*this.zoomTransform[0][b]+
this.screenTransform2[a][1]*this.zoomTransform[1][b]+this.screenTransform2[a][2]*this.zoomTransform[2][b]}};papaya.viewer.ScreenSlice.prototype.isRadiologicalSensitive=function(){return this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL||this.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL};
papaya.viewer.ScreenSlice.prototype.findProximalRulerHandle=function(a,b){this.tempPoint.x=a;this.tempPoint.y=b;return papaya.utilities.MathUtils.lineDistance(this.tempPoint.x,this.tempPoint.y,this.rulerPoints[0].x,this.rulerPoints[0].y)<papaya.viewer.ScreenSlice.GRAB_RADIUS?this.rulerPoints[0]:papaya.utilities.MathUtils.lineDistance(this.tempPoint.x,this.tempPoint.y,this.rulerPoints[1].x,this.rulerPoints[1].y)<papaya.viewer.ScreenSlice.GRAB_RADIUS?this.rulerPoints[1]:null};
papaya.viewer.ScreenSlice.prototype.updateDTILinesImage=function(){if(null===this.canvasDTILines||this.canvasDTILines.width!==this.screenDim)this.canvasDTILines=document.createElement("canvas"),this.canvasDTILines.width=this.screenDim,this.canvasDTILines.height=this.screenDim,this.contextDTILines=this.canvasDTILines.getContext("2d")};papaya.viewer.ScreenSlice.prototype.clearDTILinesImage=function(){this.contextDTILines=this.canvasDTILines=null};"use strict";papaya=papaya||{};
papaya.viewer=papaya.viewer||{};
papaya.viewer.ScreenVolume=papaya.viewer.ScreenVolume||function(a,b,e,d,f,k){this.volume=a;this.lutName=e;this.colorTable=new papaya.viewer.ColorTable(this.lutName,d);this.screenMin=this.volume.header.imageRange.displayMin;this.screenMax=this.volume.header.imageRange.displayMax;this.imageMin=this.volume.header.imageRange.imageMin;this.imageMax=this.volume.header.imageRange.imageMax;this.alpha=1;this.currentTimepoint=0;this.parametric=void 0!==f&&f;this.negativeScreenVol=null;this.dtiLines=this.dti=
!1;this.dtiColors=!0;this.dtiVolumeMod=null;this.dtiAlphaFactor=1;this.rgb=this.volume.header.imageType.datatype===papaya.volume.ImageType.DATATYPE_RGB;this.hasCheckedImageRange=!1;this.interpolation=!0;this.error=null;this.hidden=!1;this.rotationZ=this.rotationY=this.rotationX=.5;this.rotationAbout="Rotate About Center";this.isHighResSlice=262144<this.volume.header.imageDimensions.getNumVoxelsSlice();this.currentCoord=k;this.seriesLabels=this.volume.getSeriesLabels();this.staticIcon=null;(a=b[this.volume.fileName])?
(a.icon&&(this.staticIcon=a.icon),void 0!==a.interpolation&&(this.interpolation=a.interpolation),void 0!==a.dti&&((this.dti=a.dti)&&3!==this.volume.numTimepoints&&(this.error=Error("DTI vector series must have 3 series points!")),this.dti&&(this.dtiLines=a.dtiLines,this.dtiColors=a.dtiColors,this.dtiLines||this.dtiColors||(this.dtiColors=!0),this.initDTI())),void 0!==a.min&&void 0!==a.max?f?(this.screenMin=-1*Math.abs(a.min),this.screenMax=-1*Math.abs(a.max)):(this.screenMin=a.min,this.screenMax=
a.max):this.findDisplayRange(f,a),f?void 0!==a.negative_lut&&(this.lutName=a.negative_lut,this.colorTable=new papaya.viewer.ColorTable(this.lutName,d)):void 0!==a.lut&&("string"===typeof a.lut||a.lut instanceof String?(this.lutName=a.lut,this.colorTable=new papaya.viewer.ColorTable(this.lutName,d)):(this.lutName="Object",this.colorTable=a.lut)),void 0===a.alpha||d||(this.alpha=a.alpha),a.labels&&!this.seriesLabels&&(this.seriesLabels=a.labels),d&&(void 0!==a.rotation&&a.rotation.length&&3===a.rotation.length&&
(this.rotationX=(Math.min(Math.max(a.rotation[0],-90),90)+90)/180,this.rotationY=(Math.min(Math.max(a.rotation[1],-90),90)+90)/180,this.rotationZ=(Math.min(Math.max(a.rotation[2],-90),90)+90)/180),a.rotationPoint&&("origin"===a.rotationPoint.toLowerCase()?this.rotationAbout="Rotate About Origin":"crosshairs"===a.rotationPoint.toLowerCase()?this.rotationAbout="Rotate About Crosshairs":this.rotationAbout="Rotate About Center"),this.updateTransform())):this.findDisplayRange(f,{});this.negative=!1;this.updateScreenRange();
this.canvasIcon=document.createElement("canvas");this.canvasIcon.width=papaya.viewer.ColorTable.ICON_SIZE;this.canvasIcon.height=papaya.viewer.ColorTable.ICON_SIZE;this.contextIcon=this.canvasIcon.getContext("2d");this.imageDataIcon=this.contextIcon.createImageData(papaya.viewer.ColorTable.ICON_SIZE,papaya.viewer.ColorTable.ICON_SIZE);this.icon=null;this.canvasBar=document.createElement("canvas");this.canvasBar.width=papaya.viewer.ColorTable.COLOR_BAR_WIDTH;this.canvasBar.height=papaya.viewer.ColorTable.COLOR_BAR_HEIGHT;
this.contextBar=this.canvasBar.getContext("2d");this.imageDataBar=this.contextBar.createImageData(papaya.viewer.ColorTable.COLOR_BAR_WIDTH,papaya.viewer.ColorTable.COLOR_BAR_HEIGHT);this.colorBar=null;this.originalScreenMin=this.screenMin;this.originalScreenMax=this.screenMax;this.updateIcon();this.updateColorBar()};
papaya.viewer.ScreenVolume.makeSolidIcon=function(a,b,e){var d=document.createElement("canvas");d.width=papaya.viewer.ColorTable.ICON_SIZE;d.height=papaya.viewer.ColorTable.ICON_SIZE;var f=d.getContext("2d");f.fillStyle="rgb("+parseInt(255*a,10)+","+parseInt(255*b,10)+","+parseInt(255*e,10)+")";f.fillRect(0,0,papaya.viewer.ColorTable.ICON_SIZE,papaya.viewer.ColorTable.ICON_SIZE);return d.toDataURL()};
papaya.viewer.ScreenVolume.makeStaticIcon=function(a,b,e){var d=new Image(papaya.viewer.ColorTable.ICON_SIZE,papaya.viewer.ColorTable.ICON_SIZE),f=document.createElement("canvas");f.width=papaya.viewer.ColorTable.ICON_SIZE;f.height=papaya.viewer.ColorTable.ICON_SIZE;var k=f.getContext("2d");d.onload=function(){k.drawImage(d,0,0,d.naturalWidth,d.naturalHeight,0,0,papaya.viewer.ColorTable.ICON_SIZE,papaya.viewer.ColorTable.ICON_SIZE);b(f.toDataURL(),e)};d.src=a};
papaya.viewer.ScreenVolume.prototype.setScreenRange=function(a,b){this.screenMin=a;this.screenMax=b;this.updateScreenRange()};papaya.viewer.ScreenVolume.prototype.resetScreenRange=function(){this.screenMin=this.originalScreenMin;this.screenMax=this.originalScreenMax;this.updateScreenRange()};papaya.viewer.ScreenVolume.prototype.setScreenRangeNegatives=function(a,b){this.negativeScreenVol.setScreenRange(a,b)};
papaya.viewer.ScreenVolume.prototype.updateScreenRange=function(){this.screenRatio=papaya.viewer.ScreenSlice.SCREEN_PIXEL_MAX/(this.screenMax-this.screenMin);this.negative=this.screenMax<this.screenMin};papaya.viewer.ScreenVolume.prototype.isOverlay=function(){return!this.colorTable.isBaseImage};
papaya.viewer.ScreenVolume.prototype.findImageRange=function(){var a,b,e,d,f,k,h,r,q;if(this.volume.header.imageRange.imageMin===this.volume.header.imageRange.imageMax&&!this.hasCheckedImageRange){this.hasCheckedImageRange=!0;a=Number.MAX_VALUE;b=Number.MIN_VALUE;e=this.volume.header.imageDimensions.xDim;d=this.volume.header.imageDimensions.yDim;f=this.volume.header.imageDimensions.zDim;for(k=0;k<f;k+=1)for(h=0;h<d;h+=1)for(r=0;r<e;r+=1)q=this.volume.getVoxelAtIndexNative(r,h,k,0,!0),q>b&&(b=q),q<
a&&(a=q);this.volume.header.imageRange.imageMin=this.imageMin=a;this.volume.header.imageRange.imageMax=this.imageMax=b}};
papaya.viewer.ScreenVolume.prototype.findDisplayRange=function(a,b){var e,d,f,k;e=this.volume.header.imageRange.imageMin!==this.volume.header.imageRange.imageMax;d=this.screenMin;f=this.screenMax;a&&Math.abs(d)>Math.abs(f)&&(k=f,f=d,d=k);if(a||void 0===b.minPercent&&void 0===b.maxPercent)if(this.isOverlay()){if(d===f||0>d&&0<f||0<d&&0>f||a&&(0<d||0<f)||b.symmetric)this.findImageRange(),a?b.symmetric||0===this.imageMin?(d=-1*(this.imageMax-.75*this.imageMax),f=-1*(this.imageMax-.25*this.imageMax)):
(d=this.imageMin-.75*this.imageMin,f=this.imageMin-.25*this.imageMin):(d=this.imageMax-.75*this.imageMax,f=this.imageMax-.25*this.imageMax);1>d&&-1<d&&1>f&&-1<f||(d=Math.round(d),f=Math.round(f))}else 1>d&&-1<d&&1>f&&-1<f||(d=Math.round(d),f=Math.round(f)),0===d&&0===f&&(this.findImageRange(),d=this.imageMin,f=this.imageMax),f<=d&&(this.findImageRange(),d=this.imageMin,f=this.imageMax),e&&d<this.imageMin&&(this.findImageRange(),d=this.imageMin),e&&f>this.imageMax&&(this.findImageRange(),f=this.imageMax);
else this.findImageRange(),d=void 0!==b.minPercent?this.imageMax*b.minPercent:this.imageMin,f=void 0!==b.maxPercent?this.imageMax*b.maxPercent:this.imageMax;this.screenMin=d;this.screenMax=f};papaya.viewer.ScreenVolume.prototype.isUsingColorTable=function(a){return this.lutName===a};papaya.viewer.ScreenVolume.prototype.isRotatingAbout=function(a){return this.rotationAbout===a};
papaya.viewer.ScreenVolume.prototype.changeColorTable=function(a,b){this.colorTable=new papaya.viewer.ColorTable(b,!this.isOverlay());this.lutName=b;this.updateIcon();this.updateColorBar();a.drawViewer(!0)};papaya.viewer.ScreenVolume.prototype.getRange=function(){var a=Array(2);a[0]=this.colorTable.minLUT/(255/(this.screenMax-this.screenMin))+this.screenMin;a[1]=this.colorTable.maxLUT/(255/(this.screenMax-this.screenMin))+this.screenMin;return a};
papaya.viewer.ScreenVolume.prototype.getRangeNegative=function(){return this.negativeScreenVol.getRange()};papaya.viewer.ScreenVolume.prototype.getAlphaNegative=function(){return this.negativeScreenVol.alpha};papaya.viewer.ScreenVolume.prototype.incrementTimepoint=function(){var a=this.volume.numTimepoints;this.currentTimepoint+=1;this.currentTimepoint>=a&&(this.currentTimepoint=a-1)};
papaya.viewer.ScreenVolume.prototype.decrementTimepoint=function(){--this.currentTimepoint;0>this.currentTimepoint&&(this.currentTimepoint=0)};papaya.viewer.ScreenVolume.prototype.setTimepoint=function(a){this.currentTimepoint=0>a?0:a>=this.volume.numTimepoints?this.volume.numTimepoints-1:a};papaya.viewer.ScreenVolume.prototype.updateMinLUT=function(a){this.colorTable.updateMinLUT(a)};papaya.viewer.ScreenVolume.prototype.updateMaxLUT=function(a){this.colorTable.updateMaxLUT(a)};
papaya.viewer.ScreenVolume.prototype.updateLUT=function(a,b){this.colorTable.updateLUT(a,b)};papaya.viewer.ScreenVolume.prototype.supportsDynamicColorTable=function(){return void 0!==this.colorTable.updateMinLUT&&void 0!==this.colorTable.updateMaxLUT&&void 0!==this.colorTable.updateLUT};papaya.viewer.ScreenVolume.prototype.resetDynamicRange=function(){this.colorTable.minLUT=0;this.colorTable.maxLUT=papaya.viewer.ColorTable.LUT_MAX;this.updateLUT(this.colorTable.minLUT,this.colorTable.maxLUT);this.updateColorBar()};
papaya.viewer.ScreenVolume.prototype.getCurrentTime=function(){return this.currentTimepoint*this.volume.header.voxelDimensions.timeSize*this.volume.header.voxelDimensions.getTemporalUnitMultiplier()};papaya.viewer.ScreenVolume.prototype.setCurrentTime=function(a){var b=this.volume.header.voxelDimensions.timeSize*this.volume.header.voxelDimensions.getTemporalUnitMultiplier();0===b?this.setTimepoint(0):this.setTimepoint(parseInt(Math.round(a/b),10))};
papaya.viewer.ScreenVolume.prototype.hasError=function(){return null!==this.error};papaya.viewer.ScreenVolume.prototype.initDTI=function(){this.volume.numTimepoints=1;this.volume.header.imageDimensions.timepoints=1;this.colorTable=new papaya.viewer.ColorTable(this.lutName,!1,papaya.viewer.ColorTable.TABLE_DTI_SPECTRUM);this.volume.transform.voxelValue.forceABS=!this.dtiLines;this.updateIcon()};papaya.viewer.ScreenVolume.prototype.isDTILines=function(){return this.dtiLines&&!this.dtiColors};
papaya.viewer.ScreenVolume.prototype.isDTIRGB=function(){return!this.dtiLines&&this.dtiColors};papaya.viewer.ScreenVolume.prototype.isDTILinesAndRGB=function(){return this.dtiLines&&this.dtiColors};papaya.viewer.ScreenVolume.prototype.getHiddenLabel=function(){return this.hidden?"Show Overlay":"Hide Overlay"};
papaya.viewer.ScreenVolume.prototype.updateIcon=function(){var a,b,e,d,f;if(this.staticIcon){var k=this;papaya.viewer.ScreenVolume.makeStaticIcon(this.staticIcon,function(a){k.icon=a})}else if(this.imageDataIcon){a=papaya.viewer.ColorTable.LUT_MAX/papaya.viewer.ColorTable.ICON_SIZE;for(b=0;b<papaya.viewer.ColorTable.ICON_SIZE;b+=1)for(e=0;e<papaya.viewer.ColorTable.ICON_SIZE;e+=1)d=4*(b*papaya.viewer.ColorTable.ICON_SIZE+e),f=Math.round(e*a),this.imageDataIcon.data[d]=this.colorTable.lookupRed(f),
this.imageDataIcon.data[d+1]=this.colorTable.lookupGreen(f),this.imageDataIcon.data[d+2]=this.colorTable.lookupBlue(f),this.imageDataIcon.data[d+3]=255;this.contextIcon.putImageData(this.imageDataIcon,0,0);this.icon=this.canvasIcon.toDataURL()}};
papaya.viewer.ScreenVolume.prototype.updateColorBar=function(){var a,b,e,d,f;if(this.imageDataBar){a=papaya.viewer.ColorTable.LUT_MAX/papaya.viewer.ColorTable.COLOR_BAR_WIDTH;for(b=0;b<papaya.viewer.ColorTable.COLOR_BAR_HEIGHT;b+=1)for(e=0;e<papaya.viewer.ColorTable.COLOR_BAR_WIDTH;e+=1)d=4*(b*papaya.viewer.ColorTable.COLOR_BAR_WIDTH+e),f=Math.round(e*a),this.imageDataBar.data[d]=this.colorTable.lookupRed(f),this.imageDataBar.data[d+1]=this.colorTable.lookupGreen(f),this.imageDataBar.data[d+2]=this.colorTable.lookupBlue(f),
this.imageDataBar.data[d+3]=255;this.contextBar.putImageData(this.imageDataBar,0,0);this.colorBar=this.canvasBar.toDataURL()}};
papaya.viewer.ScreenVolume.prototype.updateTransform=function(){var a=180*(this.rotationX-.5),b=180*(this.rotationY-.5),e=180*(this.rotationZ-.5),d,f,k;"Rotate About Origin"===this.rotationAbout?(d=this.volume.header.origin.x*this.volume.header.voxelDimensions.xSize,f=this.volume.header.origin.y*this.volume.header.voxelDimensions.ySize,k=this.volume.header.origin.z*this.volume.header.voxelDimensions.zSize):"Rotate About Crosshairs"===this.rotationAbout?(d=this.currentCoord.x*this.volume.header.voxelDimensions.xSize,
f=this.currentCoord.y*this.volume.header.voxelDimensions.ySize,k=this.currentCoord.z*this.volume.header.voxelDimensions.zSize):(d=this.volume.header.imageDimensions.xDim/2*this.volume.header.voxelDimensions.xSize,f=this.volume.header.imageDimensions.yDim/2*this.volume.header.voxelDimensions.ySize,k=this.volume.header.imageDimensions.zDim/2*this.volume.header.voxelDimensions.zSize);this.volume.transform.updateImageMat(d,f,k,a,b,e)};
papaya.viewer.ScreenVolume.prototype.resetTransform=function(){this.rotationZ=this.rotationY=this.rotationX=.5};"use strict";papaya=papaya||{};papaya.viewer=papaya.viewer||{};var PAPAYA_BUILD_NUM=PAPAYA_BUILD_NUM||"0";
papaya.viewer.Viewer=papaya.viewer.Viewer||function(a,b,e,d){this.container=a;this.canvas=document.createElement("canvas");this.canvas.width=b;this.canvas.height=e;this.context=this.canvas.getContext("2d");this.canvas.style.padding=0;this.canvas.style.margin=0;this.canvas.style.border="none";this.atlas=null;this.pageLoaded=this.initialized=!1;this.loadingVolume=null;this.volume=new papaya.volume.Volume(this.container.display,this);this.screenVolumes=[];this.surfaces=[];this.lowerImageTop=this.lowerImageBot=
this.lowerImageBot2=this.mainImage=this.selectedSlice=this.surfaceView=this.sagittalSlice=this.coronalSlice=this.axialSlice=this.currentScreenVolume=null;this.viewerDim=0;this.ignoreSync=this.worldSpace=!1;this.currentCoord=new papaya.core.Coordinate(0,0,0);this.cursorPosition=new papaya.core.Coordinate(0,0,0);this.draggingSliceDir=this.longestDimSize=this.longestDim=0;this.isLongTouch=this.didLongTouch=this.isPanning=this.isContextMode=this.isZoomMode=this.isWindowControl=this.isDragging=!1;this.zoomFactorPrevious=
this.zoomFactor=papaya.viewer.Viewer.ZOOM_FACTOR_MIN;this.panAmountZ=this.panAmountY=this.panAmountX=this.panLocZ=this.panLocY=this.panLocX=this.zoomLocZ=this.zoomLocY=this.zoomLocX=0;this.keyPressIgnored=!1;this.previousMousePosition=new papaya.core.Point;this.isShiftKeyDown=this.isAltKeyDown=this.isControlKeyDown=!1;this.toggleMainCrosshairs=!0;this.bgColor=null;this.loadingDTI=this.controlsHidden=this.hasSeries=!1;this.loadingDTIModRef=null;this.tempCoor=new papaya.core.Coordinate;this.listenerContextMenu=
function(a){a.preventDefault();return!1};this.listenerMouseMove=papaya.utilities.ObjectUtils.bind(this,this.mouseMoveEvent);this.listenerMouseDown=papaya.utilities.ObjectUtils.bind(this,this.mouseDownEvent);this.listenerMouseOut=papaya.utilities.ObjectUtils.bind(this,this.mouseOutEvent);this.listenerMouseLeave=papaya.utilities.ObjectUtils.bind(this,this.mouseLeaveEvent);this.listenerMouseUp=papaya.utilities.ObjectUtils.bind(this,this.mouseUpEvent);this.listenerMouseDoubleClick=papaya.utilities.ObjectUtils.bind(this,
this.mouseDoubleClickEvent);this.listenerKeyDown=papaya.utilities.ObjectUtils.bind(this,this.keyDownEvent);this.listenerKeyUp=papaya.utilities.ObjectUtils.bind(this,this.keyUpEvent);this.listenerTouchMove=papaya.utilities.ObjectUtils.bind(this,this.touchMoveEvent);this.listenerTouchStart=papaya.utilities.ObjectUtils.bind(this,this.touchStartEvent);this.listenerTouchEnd=papaya.utilities.ObjectUtils.bind(this,this.touchEndEvent);this.initialCoordinate=null;this.listenerScroll=papaya.utilities.ObjectUtils.bind(this,
this.scrolled);this.updateTimerEvent=this.updateTimer=this.longTouchTimer=null;this.drawEmptyViewer();this.processParams(d)};papaya.viewer.Viewer.GAP=PAPAYA_SPACING;papaya.viewer.Viewer.BACKGROUND_COLOR="rgba(0, 0, 0, 255)";papaya.viewer.Viewer.CROSSHAIRS_COLOR="rgba(28, 134, 238, 255)";papaya.viewer.Viewer.KEYCODE_ROTATE_VIEWS=32;papaya.viewer.Viewer.KEYCODE_CENTER=67;papaya.viewer.Viewer.KEYCODE_ORIGIN=79;papaya.viewer.Viewer.KEYCODE_ARROW_UP=38;papaya.viewer.Viewer.KEYCODE_ARROW_DOWN=40;
papaya.viewer.Viewer.KEYCODE_ARROW_RIGHT=39;papaya.viewer.Viewer.KEYCODE_ARROW_LEFT=37;papaya.viewer.Viewer.KEYCODE_PAGE_UP=33;papaya.viewer.Viewer.KEYCODE_PAGE_DOWN=34;papaya.viewer.Viewer.KEYCODE_SINGLE_QUOTE=222;papaya.viewer.Viewer.KEYCODE_FORWARD_SLASH=191;papaya.viewer.Viewer.KEYCODE_INCREMENT_MAIN=71;papaya.viewer.Viewer.KEYCODE_DECREMENT_MAIN=86;papaya.viewer.Viewer.KEYCODE_TOGGLE_CROSSHAIRS=65;papaya.viewer.Viewer.KEYCODE_SERIES_BACK=188;papaya.viewer.Viewer.KEYCODE_SERIES_FORWARD=190;
papaya.viewer.Viewer.KEYCODE_RULER=82;papaya.viewer.Viewer.MAX_OVERLAYS=8;papaya.viewer.Viewer.ORIENTATION_MARKER_SUPERIOR="S";papaya.viewer.Viewer.ORIENTATION_MARKER_INFERIOR="I";papaya.viewer.Viewer.ORIENTATION_MARKER_ANTERIOR="A";papaya.viewer.Viewer.ORIENTATION_MARKER_POSTERIOR="P";papaya.viewer.Viewer.ORIENTATION_MARKER_LEFT="L";papaya.viewer.Viewer.ORIENTATION_MARKER_RIGHT="R";papaya.viewer.Viewer.ORIENTATION_MARKER_SIZE=16;papaya.viewer.Viewer.ORIENTATION_CERTAINTY_UNKNOWN_COLOR="red";
papaya.viewer.Viewer.ORIENTATION_CERTAINTY_LOW_COLOR="yellow";papaya.viewer.Viewer.ORIENTATION_CERTAINTY_HIGH_COLOR="white";papaya.viewer.Viewer.UPDATE_TIMER_INTERVAL=250;papaya.viewer.Viewer.ZOOM_FACTOR_MAX=10;papaya.viewer.Viewer.ZOOM_FACTOR_MIN=1;papaya.viewer.Viewer.MOUSE_SCROLL_THRESHLD=.25;papaya.viewer.Viewer.TITLE_MAX_LENGTH=30;papaya.viewer.Viewer.validDimBounds=function(a,b){return a<b?a:b-1};papaya.viewer.Viewer.getKeyCode=function(a){return a.keyCode||a.charCode};
papaya.viewer.Viewer.isControlKey=function(a){a=papaya.viewer.Viewer.getKeyCode(a);return"MacOS"!==papaya.utilities.PlatformUtils.os||91!==a&&93!==a&&224!==a?"MacOS"!==papaya.utilities.PlatformUtils.os&&17===a:!0};papaya.viewer.Viewer.isAltKey=function(a){return 18===papaya.viewer.Viewer.getKeyCode(a)};papaya.viewer.Viewer.isShiftKey=function(a){a=!!a.shiftKey;!a&&window.event&&(a=!!window.event.shiftKey);return a};
papaya.viewer.Viewer.getOffsetRect=function(a){a=a.getBoundingClientRect();var b=document.body,e=document.documentElement,d=a.left+(window.pageXOffset||e.scrollLeft)-(e.clientLeft||b.clientLeft||0);return{top:Math.round(a.top+(window.pageYOffset||e.scrollTop)-(e.clientTop||b.clientTop||0)),left:Math.round(d)}};
papaya.viewer.Viewer.drawRoundRect=function(a,b,e,d,f,k,h,r){"undefined"===typeof r&&(r=!0);"undefined"===typeof k&&(k=5);a.beginPath();a.moveTo(b+k,e);a.lineTo(b+d-k,e);a.quadraticCurveTo(b+d,e,b+d,e+k);a.lineTo(b+d,e+f-k);a.quadraticCurveTo(b+d,e+f,b+d-k,e+f);a.lineTo(b+k,e+f);a.quadraticCurveTo(b,e+f,b,e+f-k);a.lineTo(b,e+k);a.quadraticCurveTo(b,e,b+k,e);a.closePath();r&&a.stroke();h&&a.fill()};
papaya.viewer.Viewer.prototype.loadImage=function(a,b,e,d){0===this.screenVolumes.length?this.loadBaseImage(a,b,e,d):this.loadOverlay(a,b,e,d)};papaya.viewer.Viewer.prototype.showDialog=function(a,b,e,d,f){var k,h=-1;for(k=0;k<papayaContainers.length;k+=1)if(papayaContainers[k]===this.container){h=k;break}(new papaya.ui.Dialog(this.container,a,b,e,d,f,h)).showDialog()};
papaya.viewer.Viewer.prototype.loadBaseImage=function(a,b,e,d){var f=[],k=this.container.findLoadableImages(a);this.volume=new papaya.volume.Volume(this.container.display,this,this.container.params);if(d){if(k&&k.length)for(a=0;a<k.length;a+=1)f.push(k[a].encode);else Array.isArray(a)||(a=[a]),f=a;this.volume.readBinaryData(f,papaya.utilities.ObjectUtils.bind(this,this.initializeViewer))}else if(e){if(k)for(a=0;a<k.length;a+=1)f.push(k[a].encode);else f=a;this.volume.readEncodedData(f,papaya.utilities.ObjectUtils.bind(this,
this.initializeViewer))}else if(null!==k&&void 0!==k[0].encode){for(a=0;a<k.length;a+=1)f.push(k[a].encode);this.volume.readEncodedData(f,papaya.utilities.ObjectUtils.bind(this,this.initializeViewer))}else if(b)this.volume.readURLs(a,papaya.utilities.ObjectUtils.bind(this,this.initializeViewer));else if(null!==k&&void 0!==k[0].url){if(k)for(a=0;a<k.length;a+=1)f.push(k[a].url);this.volume.readURLs(f,papaya.utilities.ObjectUtils.bind(this,this.initializeViewer))}else this.volume.readFiles(a,papaya.utilities.ObjectUtils.bind(this,
this.initializeViewer))};
papaya.viewer.Viewer.prototype.loadOverlay=function(a,b,e,d){var f=this.container.findLoadableImage(a);this.loadingVolume=new papaya.volume.Volume(this.container.display,this,this.container.params);this.screenVolumes.length>papaya.viewer.Viewer.MAX_OVERLAYS?(this.loadingVolume.error=Error("Maximum number of overlays ("+papaya.viewer.Viewer.MAX_OVERLAYS+") has been reached!"),this.initializeOverlay()):d?(Array.isArray(a)||(a=[a]),this.loadingVolume.readBinaryData(a,papaya.utilities.ObjectUtils.bind(this,this.initializeOverlay))):
e?(a=f.encode,a instanceof Array||(a=[],a[0]=f.encode),this.loadingVolume.readEncodedData(a,papaya.utilities.ObjectUtils.bind(this,this.initializeOverlay))):null!==f&&void 0!==f.encode?(a=f.encode,a instanceof Array||(a=[],a[0]=f.encode),this.loadingVolume.readEncodedData(a,papaya.utilities.ObjectUtils.bind(this,this.initializeOverlay))):b?this.loadingVolume.readURLs(a,papaya.utilities.ObjectUtils.bind(this,this.initializeOverlay)):null!==f&&void 0!==f.url?this.loadingVolume.readURLs([f.url],papaya.utilities.ObjectUtils.bind(this,
this.initializeOverlay)):this.loadingVolume.readFiles(a,papaya.utilities.ObjectUtils.bind(this,this.initializeOverlay))};
papaya.viewer.Viewer.prototype.loadSurface=function(a,b,e){var d=this.container.findLoadableImage(a,!0);if(0==this.screenVolumes.length)this.container.display.drawError("Load an image before loading a surface!");else{var f=new papaya.surface.Surface(this.container.display,this.container.params);e?f.readEncodedData(a[0],this.volume,papaya.utilities.ObjectUtils.bind(this,this.initializeSurface)):null!==d&&void 0!==d.encode?f.readEncodedData(d.encode,this.volume,papaya.utilities.ObjectUtils.bind(this,
this.initializeSurface)):b?f.readURL(a,this.volume,papaya.utilities.ObjectUtils.bind(this,this.initializeSurface)):null!==d&&void 0!==d.url?f.readURL(d.url,this.volume,papaya.utilities.ObjectUtils.bind(this,this.initializeSurface)):f.readFile(a[0],this.volume,papaya.utilities.ObjectUtils.bind(this,this.initializeSurface))}};
papaya.viewer.Viewer.prototype.initializeSurface=function(a){var b=a;if(a.error)a.error&&this.container.display.drawError(a.error);else{for(;null!==b;)this.surfaces.push(b),b=b.nextSurface;if(null===this.surfaceView)this.lowerImageBot2=this.surfaceView=new papaya.viewer.ScreenSurface(this.volume,this.surfaces,this,this.container.params),this.container.resizeViewerComponents(!0);else for(b=a;null!==b;)this.surfaceView.initBuffers(this.surfaceView.context,b),b=b.nextSurface;this.container.params.mainView&&
"surface"===this.container.params.mainView.toLowerCase()&&(this.mainImage=this.surfaceView,this.lowerImageTop=this.axialSlice,this.lowerImageBot=this.sagittalSlice,this.lowerImageBot2=this.coronalSlice,this.viewsChanged());this.container.toolbar.buildToolbar();this.container.toolbar.updateImageButtons();this.container.hasMoreToLoad()?this.container.loadNext():this.finishedLoading()}};papaya.viewer.Viewer.prototype.atlasLoaded=function(){this.finishedLoading()};
papaya.viewer.Viewer.prototype.initializeViewer=function(){var a,b;b=this;if(this.volume.hasError())a=this.volume.error.message,this.resetViewer(),this.container.clearParams(),this.container.display.drawError(a);else if(this.screenVolumes[0]=new papaya.viewer.ScreenVolume(this.volume,this.container.params,papaya.viewer.ColorTable.DEFAULT_COLOR_TABLE.name,!0,!1,this.currentCoord),this.loadingDTI&&(this.loadingDTI=!1,this.screenVolumes[0].dti=!0,this.screenVolumes[0].dti&&3!==this.screenVolumes[0].volume.numTimepoints&&
(this.screenVolumes[0].error=Error("DTI vector series must have 3 series points!")),this.screenVolumes[0].dti&&this.screenVolumes[0].initDTI()),this.screenVolumes[0].hasError())a=this.screenVolumes[0].error.message,this.resetViewer(),this.container.clearParams(),this.container.display.drawError(a);else{this.setCurrentScreenVol(0);this.axialSlice=new papaya.viewer.ScreenSlice(this.volume,papaya.viewer.ScreenSlice.DIRECTION_AXIAL,this.volume.getXDim(),this.volume.getYDim(),this.volume.getXSize(),this.volume.getYSize(),
this.screenVolumes,this);this.coronalSlice=new papaya.viewer.ScreenSlice(this.volume,papaya.viewer.ScreenSlice.DIRECTION_CORONAL,this.volume.getXDim(),this.volume.getZDim(),this.volume.getXSize(),this.volume.getZSize(),this.screenVolumes,this);this.sagittalSlice=new papaya.viewer.ScreenSlice(this.volume,papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL,this.volume.getYDim(),this.volume.getZDim(),this.volume.getYSize(),this.volume.getZSize(),this.screenVolumes,this);void 0===this.container.params.mainView||
"axial"===this.container.params.mainView.toLowerCase()?(this.mainImage=this.axialSlice,this.lowerImageTop=this.sagittalSlice,this.lowerImageBot=this.coronalSlice):"coronal"===this.container.params.mainView.toLowerCase()?(this.mainImage=this.coronalSlice,this.lowerImageTop=this.axialSlice,this.lowerImageBot=this.sagittalSlice):"sagittal"===this.container.params.mainView.toLowerCase()?(this.mainImage=this.sagittalSlice,this.lowerImageTop=this.coronalSlice,this.lowerImageBot=this.axialSlice):(this.mainImage=
this.axialSlice,this.lowerImageTop=this.sagittalSlice,this.lowerImageBot=this.coronalSlice);this.canvas.addEventListener("mousemove",this.listenerMouseMove,!1);this.canvas.addEventListener("mousedown",this.listenerMouseDown,!1);this.canvas.addEventListener("mouseout",this.listenerMouseOut,!1);this.canvas.addEventListener("mouseleave",this.listenerMouseLeave,!1);this.canvas.addEventListener("mouseup",this.listenerMouseUp,!1);document.addEventListener("keydown",this.listenerKeyDown,!0);document.addEventListener("keyup",
this.listenerKeyUp,!0);this.canvas.addEventListener("touchmove",this.listenerTouchMove,!1);this.canvas.addEventListener("touchstart",this.listenerTouchStart,!1);this.canvas.addEventListener("touchend",this.listenerTouchEnd,!1);this.canvas.addEventListener("dblclick",this.listenerMouseDoubleClick,!1);document.addEventListener("contextmenu",this.listenerContextMenu,!1);this.container.showControlBar?($(this.container.sliderControlHtml.find("."+PAPAYA_CONTROL_MAIN_SLIDER).find("button")).eq(0).click(function(){b.mainImage.sliceDirection===
papaya.viewer.ScreenSlice.DIRECTION_AXIAL?b.incrementAxial(!1):b.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL?b.incrementCoronal(!1):b.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL&&b.incrementSagittal(!0)}),$(this.container.sliderControlHtml.find("."+PAPAYA_CONTROL_MAIN_SLIDER).find("button")).eq(1).click(function(){b.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL?b.incrementAxial(!0):b.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL?
b.incrementCoronal(!0):b.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL&&b.incrementSagittal(!1)}),$(this.container.sliderControlHtml.find("."+PAPAYA_CONTROL_DIRECTION_SLIDER).eq(0).find("button").eq(0)).click(function(){b.incrementAxial(!1)}),$(this.container.sliderControlHtml.find("."+PAPAYA_CONTROL_DIRECTION_SLIDER).eq(0).find("button").eq(1)).click(function(){b.incrementAxial(!0)}),$(this.container.sliderControlHtml.find("."+PAPAYA_CONTROL_DIRECTION_SLIDER).eq(1).find("button").eq(0)).click(function(){b.incrementCoronal(!1)}),
$(this.container.sliderControlHtml.find("."+PAPAYA_CONTROL_DIRECTION_SLIDER).eq(1).find("button").eq(1)).click(function(){b.incrementCoronal(!0)}),$(this.container.sliderControlHtml.find("."+PAPAYA_CONTROL_DIRECTION_SLIDER).eq(2).find("button").eq(0)).click(function(){b.incrementSagittal(!0)}),$(this.container.sliderControlHtml.find("."+PAPAYA_CONTROL_DIRECTION_SLIDER).eq(2).find("button").eq(1)).click(function(){b.incrementSagittal(!1)}),$(this.container.sliderControlHtml.find("."+PAPAYA_CONTROL_DIRECTION_SLIDER).eq(3).find("button").eq(0)).click(function(){b.decrementSeriesPoint()}),
$(this.container.sliderControlHtml.find("."+PAPAYA_CONTROL_DIRECTION_SLIDER).eq(3).find("button").eq(1)).click(function(){b.incrementSeriesPoint()}),$(this.container.sliderControlHtml.find("."+PAPAYA_CONTROL_SWAP_BUTTON_CSS)).click(function(){b.rotateViews()}),$(this.container.sliderControlHtml.find("."+PAPAYA_CONTROL_GOTO_CENTER_BUTTON_CSS)).click(function(){var a=new papaya.core.Coordinate(Math.floor(b.volume.header.imageDimensions.xDim/2),Math.floor(b.volume.header.imageDimensions.yDim/2),Math.floor(b.volume.header.imageDimensions.zDim/
2));b.gotoCoordinate(a)}),$(this.container.sliderControlHtml.find("."+PAPAYA_CONTROL_GOTO_ORIGIN_BUTTON_CSS)).click(function(){b.gotoCoordinate(b.volume.header.origin)}),$("."+PAPAYA_CONTROL_INCREMENT_BUTTON_CSS).prop("disabled",!1),$("."+PAPAYA_CONTROL_SWAP_BUTTON_CSS).prop("disabled",!1),$("."+PAPAYA_CONTROL_GOTO_CENTER_BUTTON_CSS).prop("disabled",!1),$("."+PAPAYA_CONTROL_GOTO_ORIGIN_BUTTON_CSS).prop("disabled",!1)):this.container.showControls&&($("#"+PAPAYA_CONTROL_MAIN_INCREMENT_BUTTON_CSS+this.container.containerIndex).css({display:"inline"}),
$("#"+PAPAYA_CONTROL_MAIN_DECREMENT_BUTTON_CSS+this.container.containerIndex).css({display:"inline"}),$("#"+PAPAYA_CONTROL_MAIN_SWAP_BUTTON_CSS+this.container.containerIndex).css({display:"inline"}),$(this.container.containerHtml.find("#"+PAPAYA_CONTROL_MAIN_SWAP_BUTTON_CSS+this.container.containerIndex)).click(function(){b.rotateViews()}),$(this.container.containerHtml.find("#"+PAPAYA_CONTROL_MAIN_INCREMENT_BUTTON_CSS+this.container.containerIndex)).click(function(){b.mainImage.sliceDirection===
papaya.viewer.ScreenSlice.DIRECTION_AXIAL?b.incrementAxial(!1):b.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL?b.incrementCoronal(!1):b.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL&&b.incrementSagittal(!0)}),$(this.container.containerHtml.find("#"+PAPAYA_CONTROL_MAIN_DECREMENT_BUTTON_CSS+this.container.containerIndex)).click(function(){b.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL?b.incrementAxial(!0):b.mainImage.sliceDirection===
papaya.viewer.ScreenSlice.DIRECTION_CORONAL?b.incrementCoronal(!0):b.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL&&b.incrementSagittal(!1)}),$(this.container.containerHtml.find("#"+PAPAYA_CONTROL_MAIN_GOTO_CENTER_BUTTON_CSS+this.container.containerIndex)).click(function(){var a=new papaya.core.Coordinate(Math.floor(b.volume.header.imageDimensions.xDim/2),Math.floor(b.volume.header.imageDimensions.yDim/2),Math.floor(b.volume.header.imageDimensions.zDim/2));b.gotoCoordinate(a)}),
$(this.container.containerHtml.find("#"+PAPAYA_CONTROL_MAIN_GOTO_ORIGIN_BUTTON_CSS+this.container.containerIndex)).click(function(){b.gotoCoordinate(b.volume.header.origin)}));this.hasSeries=1<this.volume.header.imageDimensions.timepoints;this.container.allowScroll&&this.addScroll();this.setLongestDim(this.volume);this.calculateScreenSliceTransforms(this);this.currentCoord.setCoordinate(papayaFloorFast(this.volume.getXDim()/2),papayaFloorFast(this.volume.getYDim()/2),papayaFloorFast(this.volume.getZDim()/
2));this.updateOffsetRect();this.bgColor=$("body").css("background-color");if("rgba(0, 0, 0, 0)"===this.bgColor||"transparent"===this.bgColor)this.bgColor="rgba(255, 255, 255, 255)";this.context.fillStyle=this.bgColor;this.context.fillRect(0,0,this.canvas.offsetWidth,this.canvas.offsetHeight);this.volume.isWorldSpaceOnly()&&(this.ignoreNiftiTransforms?this.volume.header.orientationCertainty=papaya.volume.Header.ORIENTATION_CERTAINTY_UNKNOWN:this.worldSpace=!0);papaya.Container.atlas&&(this.atlas=
papaya.Container.atlas);this.initialized=!0;this.container.resizeViewerComponents(!0);this.drawViewer();this.container.toolbar.buildToolbar();this.container.toolbar.updateImageButtons();this.updateWindowTitle();this.container.loadingImageIndex=1;this.container.hasMoreToLoad()?this.container.loadNext():this.finishedLoading()}};
papaya.viewer.Viewer.prototype.finishedLoading=function(){this.pageLoaded||(this.goToInitialCoordinate(),this.updateSliceSliderControl(),this.pageLoaded=!0);this.container.loadingComplete&&(this.container.loadingComplete(),this.container.loadingComplete=null);this.container.toolbar.buildToolbar();this.container.toolbar.updateImageButtons();this.updateWindowTitle()};
papaya.viewer.Viewer.prototype.addScroll=function(){window.addEventListener(papaya.utilities.PlatformUtils.getSupportedScrollEvent(),this.listenerScroll,!1)};papaya.viewer.Viewer.prototype.removeScroll=function(){window.removeEventListener(papaya.utilities.PlatformUtils.getSupportedScrollEvent(),this.listenerScroll,!1)};papaya.viewer.Viewer.prototype.updateOffsetRect=function(){this.canvasRect=papaya.viewer.Viewer.getOffsetRect(this.canvas)};
papaya.viewer.Viewer.prototype.initializeOverlay=function(){var a,b,e;if(this.loadingVolume.hasError())this.container.display.drawError(this.loadingVolume.error.message),this.container.clearParams(),this.loadingVolume=null;else{b=(a=this.container.params[this.loadingVolume.fileName])&&a.parametric;e=a&&a.dtiMod;if(this.loadingDTIModRef)this.loadingDTIModRef.dtiVolumeMod=this.loadingVolume,this.loadingDTIModRef=null;else if(e){if(b=this.getScreenVolumeByName(a.dtiRef))b.dtiVolumeMod=this.loadingVolume,
b.dtiAlphaFactor=void 0!==a.dtiModAlphaFactor?a.dtiModAlphaFactor:1}else{e=new papaya.viewer.ScreenVolume(this.loadingVolume,this.container.params,b?papaya.viewer.ColorTable.PARAMETRIC_COLOR_TABLES[0].name:this.getNextColorTable(),!1,!1,this.currentCoord);this.loadingDTI&&(this.loadingDTI=!1,e.dti=!0,e.dti&&3!==e.volume.numTimepoints&&(e.error=Error("DTI vector series must have 3 series points!")),e.dti&&e.initDTI());if(e.hasError()){this.container.display.drawError(e.error.message);this.container.clearParams();
this.loadingVolume=null;return}this.screenVolumes[this.screenVolumes.length]=e;this.setCurrentScreenVol(this.screenVolumes.length-1);b&&(this.screenVolumes[this.screenVolumes.length-1].findImageRange(),0>this.screenVolumes[this.screenVolumes.length-1].volume.header.imageRange.imageMin&&(this.screenVolumes[this.screenVolumes.length]=b=new papaya.viewer.ScreenVolume(this.loadingVolume,this.container.params,papaya.viewer.ColorTable.PARAMETRIC_COLOR_TABLES[1].name,!1,!0,this.currentCoord),e.negativeScreenVol=
b,this.setCurrentScreenVol(this.screenVolumes.length-1)))}this.container.toolbar.buildToolbar();this.container.toolbar.updateImageButtons();this.drawViewer(!0);this.hasSeries=!1;for(b=0;b<this.screenVolumes.length;b+=1)if(1<this.screenVolumes[b].volume.header.imageDimensions.timepoints){this.hasSeries=!0;break}this.container.resizeViewerComponents();this.updateWindowTitle();this.loadingVolume=null;a&&a.loadingComplete&&a.loadingComplete();this.container.hasMoreToLoad()?this.container.loadNext():this.finishedLoading()}};
papaya.viewer.Viewer.prototype.closeOverlayByRef=function(a){this.closeOverlay(this.getScreenVolumeIndex(a))};
papaya.viewer.Viewer.prototype.closeOverlay=function(a){var b;for(b=0;b<this.screenVolumes.length;b+=1)this.screenVolumes[b].negativeScreenVol===this.screenVolumes[a]&&(this.screenVolumes[b].negativeScreenVol=null);this.screenVolumes.splice(a,1);this.setCurrentScreenVol(this.screenVolumes.length-1);this.drawViewer(!0);this.container.toolbar.buildToolbar();this.container.toolbar.updateImageButtons();this.updateWindowTitle();this.hasSeries=!1;for(b=0;b<this.screenVolumes.length;b+=1)if(1<this.screenVolumes[b].volume.header.imageDimensions.timepoints){this.hasSeries=
!0;break}this.container.resizeViewerComponents()};papaya.viewer.Viewer.prototype.hasDefinedAtlas=function(){var a;return"undefined"!==typeof papaya.data&&(a=typeof papaya.data.Atlas,"undefined"!==a)?!0:!1};papaya.viewer.Viewer.prototype.loadAtlas=function(){null===this.atlas&&(this.atlas=new papaya.viewer.Atlas(papaya.data.Atlas,this.container,papaya.utilities.ObjectUtils.bind(this,this.atlasLoaded)))};
papaya.viewer.Viewer.prototype.isInsideMainSlice=function(a,b){this.updateOffsetRect();a-=this.canvasRect.left;b-=this.canvasRect.top;return this.mainImage===this.axialSlice?this.insideScreenSlice(this.axialSlice,a,b,this.volume.getXDim(),this.volume.getYDim()):this.mainImage===this.coronalSlice?this.insideScreenSlice(this.coronalSlice,a,b,this.volume.getXDim(),this.volume.getZDim()):this.mainImage===this.sagittalSlice?this.insideScreenSlice(this.sagittalSlice,a,b,this.volume.getYDim(),this.volume.getZDim()):
!1};
papaya.viewer.Viewer.prototype.updatePosition=function(a,b,e,d){var f,k;a.updateOffsetRect();f=b;k=e;b-=this.canvasRect.left;e-=this.canvasRect.top;if(this.insideScreenSlice(a.axialSlice,b,e,a.volume.getXDim(),a.volume.getYDim())){if(!this.isDragging||this.draggingSliceDir===papaya.viewer.ScreenSlice.DIRECTION_AXIAL)if(b=this.convertScreenToImageCoordinateX(b,a.axialSlice),e=this.convertScreenToImageCoordinateY(e,a.axialSlice),b!==a.currentCoord.x||e!==a.currentCoord.y)a.currentCoord.x=b,a.currentCoord.y=e,
this.draggingSliceDir=papaya.viewer.ScreenSlice.DIRECTION_AXIAL}else if(this.insideScreenSlice(a.coronalSlice,b,e,a.volume.getXDim(),a.volume.getZDim())){if(!this.isDragging||this.draggingSliceDir===papaya.viewer.ScreenSlice.DIRECTION_CORONAL)if(b=this.convertScreenToImageCoordinateX(b,a.coronalSlice),e=this.convertScreenToImageCoordinateY(e,a.coronalSlice),b!==a.currentCoord.x||e!==a.currentCoord.y)a.currentCoord.x=b,a.currentCoord.z=e,this.draggingSliceDir=papaya.viewer.ScreenSlice.DIRECTION_CORONAL}else if(this.insideScreenSlice(a.sagittalSlice,
b,e,a.volume.getYDim(),a.volume.getZDim())){if(!this.isDragging||this.draggingSliceDir===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL)if(b=this.convertScreenToImageCoordinateX(b,a.sagittalSlice),e=this.convertScreenToImageCoordinateY(e,a.sagittalSlice),b!==a.currentCoord.x||e!==a.currentCoord.y)a.currentCoord.y=b,a.currentCoord.z=e,this.draggingSliceDir=papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL}else a.surfaceView&&this.insideScreenSlice(a.surfaceView,b,e,a.surfaceView.screenDim,a.surfaceView.screenDim)&&
a.surfaceView.updateDynamic(f,k,this.selectedSlice===this.mainImage?1:3);this.container.coordinateChanged(this);a.drawViewer(!1,d)};papaya.viewer.Viewer.prototype.convertScreenToImageCoordinateX=function(a,b){return papaya.viewer.Viewer.validDimBounds(papayaFloorFast((a-b.finalTransform[0][2])/b.finalTransform[0][0]),b.xDim)};
papaya.viewer.Viewer.prototype.convertScreenToImageCoordinateY=function(a,b){return papaya.viewer.Viewer.validDimBounds(papayaFloorFast((a-b.finalTransform[1][2])/b.finalTransform[1][1]),b.yDim)};
papaya.viewer.Viewer.prototype.convertScreenToImageCoordinate=function(a,b,e){var d,f,k;void 0===e&&(e=this.mainImage);e.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL?(d=this.convertScreenToImageCoordinateX(a,e),f=this.convertScreenToImageCoordinateY(b,e),k=this.axialSlice.currentSlice):e.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL?(d=this.convertScreenToImageCoordinateX(a,e),k=this.convertScreenToImageCoordinateY(b,e),f=this.coronalSlice.currentSlice):e.sliceDirection===
papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL&&(f=this.convertScreenToImageCoordinateX(a,e),k=this.convertScreenToImageCoordinateY(b,e),d=this.sagittalSlice.currentSlice);return new papaya.core.Coordinate(d,f,k)};papaya.viewer.Viewer.prototype.convertCurrentCoordinateToScreen=function(a){return this.convertCoordinateToScreen(this.currentCoord,a)};
papaya.viewer.Viewer.prototype.intersectsMainSlice=function(a){var b=this.mainImage.sliceDirection;return b===papaya.viewer.ScreenSlice.DIRECTION_AXIAL?a.z===this.mainImage.currentSlice:b===papaya.viewer.ScreenSlice.DIRECTION_CORONAL?a.y===this.mainImage.currentSlice:b===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL?a.x===this.mainImage.currentSlice:!1};
papaya.viewer.Viewer.prototype.convertCoordinateToScreen=function(a,b){var e,d,f;void 0===b&&(b=this.mainImage);f=b.sliceDirection;f===papaya.viewer.ScreenSlice.DIRECTION_AXIAL?(e=papayaFloorFast(b.finalTransform[0][2]+(a.x+.5)*b.finalTransform[0][0]),d=papayaFloorFast(b.finalTransform[1][2]+(a.y+.5)*b.finalTransform[1][1])):f===papaya.viewer.ScreenSlice.DIRECTION_CORONAL?(e=papayaFloorFast(b.finalTransform[0][2]+(a.x+.5)*b.finalTransform[0][0]),d=papayaFloorFast(b.finalTransform[1][2]+(a.z+.5)*b.finalTransform[1][1])):
f===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL&&(e=papayaFloorFast(b.finalTransform[0][2]+(a.y+.5)*b.finalTransform[0][0]),d=papayaFloorFast(b.finalTransform[1][2]+(a.z+.5)*b.finalTransform[1][1]));return new papaya.core.Point(e,d)};
papaya.viewer.Viewer.prototype.updateCursorPosition=function(a,b,e){var d,f,k,h=null,r;this.container.display&&(b-=this.canvasRect.left,e-=this.canvasRect.top,this.insideScreenSlice(a.axialSlice,b,e,a.volume.getXDim(),a.volume.getYDim())?(d=this.convertScreenToImageCoordinateX(b,a.axialSlice),f=this.convertScreenToImageCoordinateY(e,a.axialSlice),k=a.axialSlice.currentSlice,r=!0):this.insideScreenSlice(a.coronalSlice,b,e,a.volume.getXDim(),a.volume.getZDim())?(d=this.convertScreenToImageCoordinateX(b,
a.coronalSlice),k=this.convertScreenToImageCoordinateY(e,a.coronalSlice),f=a.coronalSlice.currentSlice,r=!0):this.insideScreenSlice(a.sagittalSlice,b,e,a.volume.getYDim(),a.volume.getZDim())?(f=this.convertScreenToImageCoordinateX(b,a.sagittalSlice),k=this.convertScreenToImageCoordinateY(e,a.sagittalSlice),d=a.sagittalSlice.currentSlice,r=!0):this.insideScreenSlice(a.surfaceView,b,e)&&(b-=a.surfaceView.screenOffsetX,e-=a.surfaceView.screenOffsetY,h=this.surfaceView.pick(b,e))&&(this.getIndexCoordinateAtWorld(h.coordinate[0],
h.coordinate[1],h.coordinate[2],this.tempCoor),d=this.tempCoor.x,f=this.tempCoor.y,k=this.tempCoor.z,r=!0),r?(this.cursorPosition.x=d,this.cursorPosition.y=f,this.cursorPosition.z=k,this.container.display.drawDisplay(d,f,k)):this.container.display.drawEmptyDisplay())};
papaya.viewer.Viewer.prototype.insideScreenSlice=function(a,b,e,d,f){var k,h;if(!a)return!1;a===this.surfaceView?(k=a.screenOffsetX,d=a.screenOffsetX+a.screenDim,h=a.screenOffsetY,a=a.screenOffsetY+a.screenDim):(k=papayaRoundFast(a.screenTransform[0][2]),d=papayaRoundFast(a.screenTransform[0][2]+d*a.screenTransform[0][0]),h=papayaRoundFast(a.screenTransform[1][2]),a=papayaRoundFast(a.screenTransform[1][2]+f*a.screenTransform[1][1]));return b>=k&&b<d&&e>=h&&e<a};
papaya.viewer.Viewer.prototype.drawEmptyViewer=function(){var a,b,e;this.context.fillStyle="#000000";this.context.fillRect(0,0,this.canvas.width,this.canvas.height);this.context.fillStyle="#AAAAAA";this.container.readyForDnD()&&(this.context.font="18px sans-serif",a=this.canvas.height-22,b="Drop here or click the File menu",e=this.context.measureText(b),e=e.width,this.context.fillText(b,this.canvas.width/2-e/2,a));900<this.canvas.width&&(this.context.font="14px sans-serif",a=this.canvas.height-20,
b="Supported formats: NIFTI"+(papaya.Container.DICOM_SUPPORT?", DICOM":""),this.context.fillText(b,20,a),this.context.font="14px sans-serif",a=this.canvas.height-20,b="Papaya (Build "+PAPAYA_BUILD_NUM+")",e=this.context.measureText(b),e=e.width,this.context.fillText(b,this.canvas.width-e-20,a))};
papaya.viewer.Viewer.prototype.drawViewer=function(a,b){var e="Yes"===this.container.preferences.radiological,d="Yes"===this.container.preferences.showOrientation;this.initialized?(this.context.save(),b?(this.axialSlice.repaint(this.currentCoord.z,a,this.worldSpace),this.coronalSlice.repaint(this.currentCoord.y,a,this.worldSpace),this.sagittalSlice.repaint(this.currentCoord.x,a,this.worldSpace)):((a||this.draggingSliceDir!==papaya.viewer.ScreenSlice.DIRECTION_AXIAL)&&this.axialSlice.updateSlice(this.currentCoord.z,
a,this.worldSpace),(a||this.draggingSliceDir!==papaya.viewer.ScreenSlice.DIRECTION_CORONAL)&&this.coronalSlice.updateSlice(this.currentCoord.y,a,this.worldSpace),(a||this.draggingSliceDir!==papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL)&&this.sagittalSlice.updateSlice(this.currentCoord.x,a,this.worldSpace)),!this.hasSurface()||papaya.utilities.PlatformUtils.smallScreen&&!a&&this.selectedSlice!==this.surfaceView||this.surfaceView.draw(),"No"===this.container.preferences.smoothDisplay?(this.context.imageSmoothingEnabled=
!1,this.context.mozImageSmoothingEnabled=!1,this.context.msImageSmoothingEnabled=!1):(this.context.imageSmoothingEnabled=!0,this.context.mozImageSmoothingEnabled=!0,this.context.msImageSmoothingEnabled=!0),this.drawScreenSlice(this.mainImage),this.container.orthogonal&&(this.drawScreenSlice(this.lowerImageTop),this.drawScreenSlice(this.lowerImageBot),this.hasSurface()&&this.drawScreenSlice(this.lowerImageBot2)),(d||e)&&this.drawOrientation(),"Yes"===this.container.preferences.showCrosshairs&&this.drawCrosshairs(),
"Yes"===this.container.preferences.showRuler&&this.drawRuler(),this.container.display&&this.container.display.drawDisplay(this.currentCoord.x,this.currentCoord.y,this.currentCoord.z),this.container.contextManager&&this.container.contextManager.drawToViewer&&this.container.contextManager.drawToViewer(this.context)):this.drawEmptyViewer()};papaya.viewer.Viewer.prototype.hasSurface=function(){return this.container.hasSurface()&&this.surfaceView&&this.surfaceView.initialized};
papaya.viewer.Viewer.prototype.drawScreenSlice=function(a){var b,e;a===this.surfaceView?(this.context.fillStyle=this.surfaceView.getBackgroundColor(),this.context.fillRect(a.screenOffsetX,a.screenOffsetY,a.screenDim,a.screenDim),this.context.drawImage(a.canvas,a.screenOffsetX,a.screenOffsetY),"Yes"===this.container.preferences.showRuler&&this.surfaceView===this.mainImage&&(this.context.font=papaya.viewer.Viewer.ORIENTATION_MARKER_SIZE+"px sans-serif",b=this.context.measureText("Ruler Length: ").width,
e=this.context.measureText("Ruler Length: 000.00").width,e/=2,this.context.fillStyle="#ffb3db",this.context.fillText("Ruler Length:  ",a.screenDim/2-e/2,papaya.viewer.Viewer.ORIENTATION_MARKER_SIZE+5),this.context.fillStyle="#FFFFFF",this.context.fillText(this.surfaceView.getRulerLength().toFixed(2),a.screenDim/2+b-e/2,papaya.viewer.Viewer.ORIENTATION_MARKER_SIZE+5))):(this.context.fillStyle=papaya.viewer.Viewer.BACKGROUND_COLOR,this.context.setTransform(1,0,0,1,0,0),this.context.fillRect(a.screenOffsetX,
a.screenOffsetY,a.screenDim,a.screenDim),this.context.save(),this.context.beginPath(),this.context.rect(a.screenOffsetX,a.screenOffsetY,a.screenDim,a.screenDim),this.context.clip(),this.context.setTransform(a.finalTransform[0][0],0,0,a.finalTransform[1][1],a.finalTransform[0][2],a.finalTransform[1][2]),this.context.drawImage(a.canvasMain,0,0),this.context.restore(),a.canvasDTILines&&this.context.drawImage(a.canvasDTILines,a.screenOffsetX,a.screenOffsetY))};
papaya.viewer.Viewer.prototype.drawOrientation=function(){var a,b,e,d,f,k,h,r,q,t,y,G="Yes"===this.container.preferences.showOrientation;if(this.mainImage!==this.surfaceView){this.context.setTransform(1,0,0,1,0,0);this.context.fillStyle=this.getOrientationCertaintyColor();this.context.font=papaya.viewer.Viewer.ORIENTATION_MARKER_SIZE+"px sans-serif";a=this.context.measureText("X");a=a.width;b="Yes"===this.container.preferences.radiological;this.mainImage===this.axialSlice?(e=papaya.viewer.Viewer.ORIENTATION_MARKER_ANTERIOR,
d=papaya.viewer.Viewer.ORIENTATION_MARKER_POSTERIOR,b?(f=papaya.viewer.Viewer.ORIENTATION_MARKER_RIGHT,k=papaya.viewer.Viewer.ORIENTATION_MARKER_LEFT):(f=papaya.viewer.Viewer.ORIENTATION_MARKER_LEFT,k=papaya.viewer.Viewer.ORIENTATION_MARKER_RIGHT)):this.mainImage===this.coronalSlice?(e=papaya.viewer.Viewer.ORIENTATION_MARKER_SUPERIOR,d=papaya.viewer.Viewer.ORIENTATION_MARKER_INFERIOR,b?(f=papaya.viewer.Viewer.ORIENTATION_MARKER_RIGHT,k=papaya.viewer.Viewer.ORIENTATION_MARKER_LEFT):(f=papaya.viewer.Viewer.ORIENTATION_MARKER_LEFT,
k=papaya.viewer.Viewer.ORIENTATION_MARKER_RIGHT)):this.mainImage===this.sagittalSlice&&(e=papaya.viewer.Viewer.ORIENTATION_MARKER_SUPERIOR,d=papaya.viewer.Viewer.ORIENTATION_MARKER_INFERIOR,f=papaya.viewer.Viewer.ORIENTATION_MARKER_ANTERIOR,k=papaya.viewer.Viewer.ORIENTATION_MARKER_POSTERIOR);b=this.mainImage.screenOffsetX;h=this.mainImage.screenOffsetX+this.mainImage.screenDim;r=Math.round(h/2);q=this.mainImage.screenOffsetY;t=this.mainImage.screenOffsetY+this.mainImage.screenDim;y=Math.round(t/
2);if(G||this.mainImage.isRadiologicalSensitive())this.context.fillText(f,b+papaya.viewer.Viewer.ORIENTATION_MARKER_SIZE,y+.5*papaya.viewer.Viewer.ORIENTATION_MARKER_SIZE),this.context.fillText(k,h-1.5*papaya.viewer.Viewer.ORIENTATION_MARKER_SIZE,y+.5*papaya.viewer.Viewer.ORIENTATION_MARKER_SIZE);G&&(this.context.fillText(e,r-a/2,q+1.5*papaya.viewer.Viewer.ORIENTATION_MARKER_SIZE),this.context.fillText(d,r-a/2,t-papaya.viewer.Viewer.ORIENTATION_MARKER_SIZE))}};
papaya.viewer.Viewer.prototype.drawRuler=function(){var a,b,e,d,f,k;this.mainImage!==this.surfaceView&&(this.mainImage===this.axialSlice?(a=this.axialSlice.finalTransform[0][2]+(this.axialSlice.rulerPoints[0].x+.5)*this.axialSlice.finalTransform[0][0],b=this.axialSlice.finalTransform[1][2]+(this.axialSlice.rulerPoints[0].y+.5)*this.axialSlice.finalTransform[1][1],e=this.axialSlice.finalTransform[0][2]+(this.axialSlice.rulerPoints[1].x+.5)*this.axialSlice.finalTransform[0][0],d=this.axialSlice.finalTransform[1][2]+
(this.axialSlice.rulerPoints[1].y+.5)*this.axialSlice.finalTransform[1][1]):this.mainImage===this.coronalSlice?(a=this.coronalSlice.finalTransform[0][2]+(this.coronalSlice.rulerPoints[0].x+.5)*this.coronalSlice.finalTransform[0][0],b=this.coronalSlice.finalTransform[1][2]+(this.coronalSlice.rulerPoints[0].y+.5)*this.coronalSlice.finalTransform[1][1],e=this.coronalSlice.finalTransform[0][2]+(this.coronalSlice.rulerPoints[1].x+.5)*this.coronalSlice.finalTransform[0][0],d=this.coronalSlice.finalTransform[1][2]+
(this.coronalSlice.rulerPoints[1].y+.5)*this.coronalSlice.finalTransform[1][1]):this.mainImage===this.sagittalSlice&&(a=this.sagittalSlice.finalTransform[0][2]+(this.sagittalSlice.rulerPoints[0].x+.5)*this.sagittalSlice.finalTransform[0][0],b=this.sagittalSlice.finalTransform[1][2]+(this.sagittalSlice.rulerPoints[0].y+.5)*this.sagittalSlice.finalTransform[1][1],e=this.sagittalSlice.finalTransform[0][2]+(this.sagittalSlice.rulerPoints[1].x+.5)*this.sagittalSlice.finalTransform[0][0],d=this.sagittalSlice.finalTransform[1][2]+
(this.sagittalSlice.rulerPoints[1].y+.5)*this.sagittalSlice.finalTransform[1][1]),this.context.setTransform(1,0,0,1,0,0),this.context.strokeStyle="#FF1493",this.context.fillStyle="#FF1493",this.context.lineWidth=2,this.context.save(),this.context.beginPath(),this.context.moveTo(a,b),this.context.lineTo(e,d),this.context.stroke(),this.context.closePath(),this.context.beginPath(),this.context.arc(a,b,3,0,2*Math.PI,!1),this.context.arc(e,d,3,0,2*Math.PI,!1),this.context.fill(),this.context.closePath(),
f=papaya.utilities.StringUtils.formatNumber(papaya.utilities.MathUtils.lineDistance(this.mainImage.rulerPoints[0].x*this.mainImage.xSize,this.mainImage.rulerPoints[0].y*this.mainImage.ySize,this.mainImage.rulerPoints[1].x*this.mainImage.xSize,this.mainImage.rulerPoints[1].y*this.mainImage.ySize),!1),k=this.context.measureText(f),k=k.width,a=parseInt((a+e)/2)-k/2,b=parseInt((b+d)/2)+7,this.context.fillStyle="#FFFFFF",papaya.viewer.Viewer.drawRoundRect(this.context,a-2,b-14-2+1,k+4,18,5,!0,!1),this.context.font=
papaya.viewer.Viewer.ORIENTATION_MARKER_SIZE+"px sans-serif",this.context.strokeStyle="#FF1493",this.context.fillStyle="#FF1493",this.context.fillText(f,a,b))};
papaya.viewer.Viewer.prototype.drawCrosshairs=function(){var a,b,e;this.context.setTransform(1,0,0,1,0,0);this.context.strokeStyle=papaya.viewer.Viewer.CROSSHAIRS_COLOR;this.context.lineWidth=1;if(this.mainImage!==this.axialSlice||this.toggleMainCrosshairs)this.context.save(),this.context.beginPath(),this.context.rect(this.axialSlice.screenOffsetX,this.axialSlice.screenOffsetY,this.axialSlice.screenDim,this.axialSlice.screenDim),this.context.closePath(),this.context.clip(),this.context.beginPath(),
a=this.axialSlice.finalTransform[0][2]+(this.currentCoord.x+.5)*this.axialSlice.finalTransform[0][0],b=this.axialSlice.finalTransform[1][2],e=this.axialSlice.finalTransform[1][2]+this.axialSlice.yDim*this.axialSlice.finalTransform[1][1],this.context.moveTo(a,b),this.context.lineTo(a,e),a=this.axialSlice.finalTransform[1][2]+(this.currentCoord.y+.5)*this.axialSlice.finalTransform[1][1],b=this.axialSlice.finalTransform[0][2],e=this.axialSlice.finalTransform[0][2]+this.axialSlice.xDim*this.axialSlice.finalTransform[0][0],
this.context.moveTo(b,a),this.context.lineTo(e,a),this.context.closePath(),this.context.stroke(),this.context.restore();if(this.mainImage!==this.coronalSlice||this.toggleMainCrosshairs)this.context.save(),this.context.beginPath(),this.context.rect(this.coronalSlice.screenOffsetX,this.coronalSlice.screenOffsetY,this.coronalSlice.screenDim,this.coronalSlice.screenDim),this.context.closePath(),this.context.clip(),this.context.beginPath(),a=this.coronalSlice.finalTransform[0][2]+(this.currentCoord.x+
.5)*this.coronalSlice.finalTransform[0][0],b=this.coronalSlice.finalTransform[1][2],e=this.coronalSlice.finalTransform[1][2]+this.coronalSlice.yDim*this.coronalSlice.finalTransform[1][1],this.context.moveTo(a,b),this.context.lineTo(a,e),a=this.coronalSlice.finalTransform[1][2]+(this.currentCoord.z+.5)*this.coronalSlice.finalTransform[1][1],b=this.coronalSlice.finalTransform[0][2],e=this.coronalSlice.finalTransform[0][2]+this.coronalSlice.xDim*this.coronalSlice.finalTransform[0][0],this.context.moveTo(b,
a),this.context.lineTo(e,a),this.context.closePath(),this.context.stroke(),this.context.restore();if(this.mainImage!==this.sagittalSlice||this.toggleMainCrosshairs)this.context.save(),this.context.beginPath(),this.context.rect(this.sagittalSlice.screenOffsetX,this.sagittalSlice.screenOffsetY,this.sagittalSlice.screenDim,this.sagittalSlice.screenDim),this.context.closePath(),this.context.clip(),this.context.beginPath(),a=this.sagittalSlice.finalTransform[0][2]+(this.currentCoord.y+.5)*this.sagittalSlice.finalTransform[0][0],
b=this.sagittalSlice.finalTransform[1][2],e=this.sagittalSlice.finalTransform[1][2]+this.sagittalSlice.yDim*this.sagittalSlice.finalTransform[1][1],this.context.moveTo(a,b),this.context.lineTo(a,e),a=this.sagittalSlice.finalTransform[1][2]+(this.currentCoord.z+.5)*this.sagittalSlice.finalTransform[1][1],b=this.sagittalSlice.finalTransform[0][2],e=this.sagittalSlice.finalTransform[0][2]+this.sagittalSlice.xDim*this.sagittalSlice.finalTransform[0][0],this.context.moveTo(b,a),this.context.lineTo(e,a),
this.context.closePath(),this.context.stroke(),this.context.restore()};
papaya.viewer.Viewer.prototype.calculateScreenSliceTransforms=function(){this.container.orthogonalTall?this.container.hasSurface()?(this.viewerDim=this.canvas.height/1.333,this.getTransformParameters(this.mainImage,this.viewerDim,!1,3),this.mainImage.screenTransform[0][2]+=this.mainImage.screenOffsetX=0,this.mainImage.screenTransform[1][2]+=this.mainImage.screenOffsetY=0,this.getTransformParameters(this.lowerImageTop,this.viewerDim,!0,3),this.lowerImageTop.screenTransform[0][2]+=this.lowerImageTop.screenOffsetX=
0,this.lowerImageTop.screenTransform[1][2]+=this.lowerImageTop.screenOffsetY=this.viewerDim+papaya.viewer.Viewer.GAP,this.getTransformParameters(this.lowerImageBot,this.viewerDim,!0,3),this.lowerImageBot.screenTransform[0][2]+=this.lowerImageBot.screenOffsetX=(this.viewerDim-papaya.viewer.Viewer.GAP)/3+papaya.viewer.Viewer.GAP,this.lowerImageBot.screenTransform[1][2]+=this.lowerImageBot.screenOffsetY=this.viewerDim+papaya.viewer.Viewer.GAP,this.getTransformParameters(this.lowerImageBot2,this.viewerDim,
!0,3),this.lowerImageBot2.screenTransform[0][2]+=this.lowerImageBot2.screenOffsetX=2*((this.viewerDim-papaya.viewer.Viewer.GAP)/3+papaya.viewer.Viewer.GAP),this.lowerImageBot2.screenTransform[1][2]+=this.lowerImageBot2.screenOffsetY=this.viewerDim+papaya.viewer.Viewer.GAP):(this.viewerDim=this.canvas.height/1.5,this.getTransformParameters(this.mainImage,this.viewerDim,!1,2),this.mainImage.screenTransform[0][2]+=this.mainImage.screenOffsetX=0,this.mainImage.screenTransform[1][2]+=this.mainImage.screenOffsetY=
0,this.getTransformParameters(this.lowerImageBot,this.viewerDim,!0,2),this.lowerImageBot.screenTransform[0][2]+=this.lowerImageBot.screenOffsetX=0,this.lowerImageBot.screenTransform[1][2]+=this.lowerImageBot.screenOffsetY=this.viewerDim+papaya.viewer.Viewer.GAP,this.getTransformParameters(this.lowerImageTop,this.viewerDim,!0,2),this.lowerImageTop.screenTransform[0][2]+=this.lowerImageTop.screenOffsetX=(this.viewerDim-papaya.viewer.Viewer.GAP)/2+papaya.viewer.Viewer.GAP,this.lowerImageTop.screenTransform[1][2]+=
this.lowerImageTop.screenOffsetY=this.viewerDim+papaya.viewer.Viewer.GAP):(this.viewerDim=this.canvas.height,this.container.hasSurface()?(this.getTransformParameters(this.mainImage,this.viewerDim,!1,3),this.mainImage.screenTransform[0][2]+=this.mainImage.screenOffsetX=0,this.mainImage.screenTransform[1][2]+=this.mainImage.screenOffsetY=0,this.getTransformParameters(this.lowerImageTop,this.viewerDim,!0,3),this.lowerImageTop.screenTransform[0][2]+=this.lowerImageTop.screenOffsetX=this.viewerDim+papaya.viewer.Viewer.GAP,
this.lowerImageTop.screenTransform[1][2]+=this.lowerImageTop.screenOffsetY=0,this.getTransformParameters(this.lowerImageBot,this.viewerDim,!0,3),this.lowerImageBot.screenTransform[0][2]+=this.lowerImageBot.screenOffsetX=this.viewerDim+papaya.viewer.Viewer.GAP,this.lowerImageBot.screenTransform[1][2]+=this.lowerImageBot.screenOffsetY=(this.viewerDim-papaya.viewer.Viewer.GAP)/3+papaya.viewer.Viewer.GAP,this.getTransformParameters(this.lowerImageBot2,this.viewerDim,!0,3),this.lowerImageBot2.screenTransform[0][2]+=
this.lowerImageBot2.screenOffsetX=this.viewerDim+papaya.viewer.Viewer.GAP,this.lowerImageBot2.screenTransform[1][2]+=this.lowerImageBot2.screenOffsetY=(this.viewerDim-papaya.viewer.Viewer.GAP)/3*2+2*papaya.viewer.Viewer.GAP):(this.getTransformParameters(this.mainImage,this.viewerDim,!1,2),this.mainImage.screenTransform[0][2]+=this.mainImage.screenOffsetX=0,this.mainImage.screenTransform[1][2]+=this.mainImage.screenOffsetY=0,this.getTransformParameters(this.lowerImageBot,this.viewerDim,!0,2),this.lowerImageBot.screenTransform[0][2]+=
this.lowerImageBot.screenOffsetX=this.viewerDim+papaya.viewer.Viewer.GAP,this.lowerImageBot.screenTransform[1][2]+=this.lowerImageBot.screenOffsetY=(this.viewerDim-papaya.viewer.Viewer.GAP)/2+papaya.viewer.Viewer.GAP,this.getTransformParameters(this.lowerImageTop,this.viewerDim,!0,2),this.lowerImageTop.screenTransform[0][2]+=this.lowerImageTop.screenOffsetX=this.viewerDim+papaya.viewer.Viewer.GAP,this.lowerImageTop.screenTransform[1][2]+=this.lowerImageTop.screenOffsetY=0));this.updateScreenSliceTransforms()};
papaya.viewer.Viewer.prototype.updateScreenSliceTransforms=function(){this.axialSlice.updateFinalTransform();this.coronalSlice.updateFinalTransform();this.sagittalSlice.updateFinalTransform()};
papaya.viewer.Viewer.prototype.getTransformParameters=function(a,b,e,d){var f,k,h,r;f=e?d:1;a===this.surfaceView?this.surfaceView.resize(this.viewerDim/f):(a.getRealWidth()>a.getRealHeight()?(k=(e?b-papaya.viewer.Viewer.GAP:b)/this.longestDim/f*(a.getXSize()/this.longestDimSize),h=(e?b-papaya.viewer.Viewer.GAP:b)/this.longestDim*a.getYXratio()/f*(a.getXSize()/this.longestDimSize)):(k=(e?b-papaya.viewer.Viewer.GAP:b)/this.longestDim*a.getXYratio()/f*(a.getYSize()/this.longestDimSize),h=(e?b-papaya.viewer.Viewer.GAP:
b)/this.longestDim/f*(a.getYSize()/this.longestDimSize)),r=((e?b-papaya.viewer.Viewer.GAP:b)/f-a.getXDim()*k)/2,f=((e?b-papaya.viewer.Viewer.GAP:b)/f-a.getYDim()*h)/2,a.screenDim=e?(b-papaya.viewer.Viewer.GAP)/d:b,a.screenTransform[0][0]=k,a.screenTransform[1][1]=h,a.screenTransform[0][2]=r,a.screenTransform[1][2]=f,a.screenTransform2[0][0]=k,a.screenTransform2[1][1]=h,a.screenTransform2[0][2]=r,a.screenTransform2[1][2]=f)};
papaya.viewer.Viewer.prototype.setLongestDim=function(a){this.longestDim=a.getXDim();this.longestDimSize=a.getXSize();a.getYDim()*a.getYSize()>this.longestDim*this.longestDimSize&&(this.longestDim=a.getYDim(),this.longestDimSize=a.getYSize());a.getZDim()*a.getZSize()>this.longestDim*this.longestDimSize&&(this.longestDim=a.getZDim(),this.longestDimSize=a.getZSize())};
papaya.viewer.Viewer.prototype.keyDownEvent=function(a){var b;this.keyPressIgnored=!1;this.container.toolbar.isShowingMenus()||(1<papayaContainers.length||papayaContainers[0].nestedViewer)&&papaya.Container.papayaLastHoveredViewer!==this||(b=papaya.viewer.Viewer.getKeyCode(a),papaya.viewer.Viewer.isControlKey(a)?this.isControlKeyDown=!0:papaya.viewer.Viewer.isAltKey(a)?this.isAltKeyDown=!0:papaya.viewer.Viewer.isShiftKey(a)?this.isShiftKeyDown=!0:b===papaya.viewer.Viewer.KEYCODE_ROTATE_VIEWS?this.rotateViews():
b===papaya.viewer.Viewer.KEYCODE_CENTER?(b=new papaya.core.Coordinate(Math.floor(this.volume.header.imageDimensions.xDim/2),Math.floor(this.volume.header.imageDimensions.yDim/2),Math.floor(this.volume.header.imageDimensions.zDim/2)),this.gotoCoordinate(b)):b===papaya.viewer.Viewer.KEYCODE_ORIGIN?this.gotoCoordinate(this.volume.header.origin):b===papaya.viewer.Viewer.KEYCODE_ARROW_UP?this.incrementCoronal(!1):b===papaya.viewer.Viewer.KEYCODE_ARROW_DOWN?this.incrementCoronal(!0):b===papaya.viewer.Viewer.KEYCODE_ARROW_LEFT?
this.incrementSagittal(!0):b===papaya.viewer.Viewer.KEYCODE_ARROW_RIGHT?this.incrementSagittal(!1):b===papaya.viewer.Viewer.KEYCODE_PAGE_DOWN||b===papaya.viewer.Viewer.KEYCODE_FORWARD_SLASH?this.incrementAxial(!0):b===papaya.viewer.Viewer.KEYCODE_PAGE_UP||b===papaya.viewer.Viewer.KEYCODE_SINGLE_QUOTE?this.incrementAxial(!1):b===papaya.viewer.Viewer.KEYCODE_INCREMENT_MAIN?this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL?this.incrementAxial(!1):this.mainImage.sliceDirection===
papaya.viewer.ScreenSlice.DIRECTION_CORONAL?this.incrementCoronal(!1):this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL&&this.incrementSagittal(!0):b===papaya.viewer.Viewer.KEYCODE_DECREMENT_MAIN?this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL?this.incrementAxial(!0):this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL?this.incrementCoronal(!0):this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL&&
this.incrementSagittal(!1):b===papaya.viewer.Viewer.KEYCODE_TOGGLE_CROSSHAIRS?"Yes"===this.container.preferences.showCrosshairs&&(this.toggleMainCrosshairs=!this.toggleMainCrosshairs,this.drawViewer(!0)):b===papaya.viewer.Viewer.KEYCODE_SERIES_FORWARD?this.incrementSeriesPoint():b===papaya.viewer.Viewer.KEYCODE_SERIES_BACK?this.decrementSeriesPoint():b===papaya.viewer.Viewer.KEYCODE_RULER?(this.container.preferences.showRuler="Yes"===this.container.preferences.showRuler?"No":"Yes",this.drawViewer(!0,
!0)):this.keyPressIgnored=!0,this.keyPressIgnored||(a.handled=!0,a.preventDefault()))};papaya.viewer.Viewer.prototype.keyUpEvent=function(a){1<papayaContainers.length&&papaya.Container.papayaLastHoveredViewer!==this||(this.isShiftKeyDown=this.isAltKeyDown=this.isControlKeyDown=!1,this.keyPressIgnored||(a.handled=!0,a.preventDefault()),this.hasSurface()&&papaya.utilities.PlatformUtils.smallScreen&&this.drawViewer(!0,!1))};
papaya.viewer.Viewer.prototype.rotateViews=function(){var a;this.container.contextManager&&this.container.contextManager.clearContext&&this.container.contextManager.clearContext();this.hasSurface()?(a=this.lowerImageBot2,this.lowerImageBot2=this.lowerImageBot):a=this.lowerImageBot;this.lowerImageBot=this.lowerImageTop;this.lowerImageTop=this.mainImage;this.mainImage=a;this.viewsChanged()};
papaya.viewer.Viewer.prototype.viewsChanged=function(){this.calculateScreenSliceTransforms();this.hasSurface()&&this.lowerImageBot2.clearDTILinesImage();this.lowerImageBot.clearDTILinesImage();this.lowerImageTop.clearDTILinesImage();this.mainImage.clearDTILinesImage();this.controlsHidden||(this.mainImage!==this.surfaceView?this.fadeInControls():($("#"+PAPAYA_CONTROL_MAIN_INCREMENT_BUTTON_CSS+this.container.containerIndex).fadeOut(),$("#"+PAPAYA_CONTROL_MAIN_DECREMENT_BUTTON_CSS+this.container.containerIndex).fadeOut()),
$("#"+PAPAYA_DEFAULT_SLIDER_ID+this.container.containerIndex+"main").find("button").prop("disabled",this.mainImage===this.surfaceView));this.drawViewer(!0);this.updateSliceSliderControl()};papaya.viewer.Viewer.prototype.timepointChanged=function(){this.drawViewer(!0);this.updateSliceSliderControl();this.updateWindowTitle()};
papaya.viewer.Viewer.prototype.resetUpdateTimer=function(a){var b=this;null!==this.updateTimer&&(window.clearTimeout(this.updateTimer),this.updateTimerEvent=this.updateTimer=null);null!==a&&(this.updateTimerEvent=a,this.updateTimer=window.setTimeout(papaya.utilities.ObjectUtils.bind(b,function(){b.updatePosition(this,papaya.utilities.PlatformUtils.getMousePositionX(b.updateTimerEvent),papaya.utilities.PlatformUtils.getMousePositionY(b.updateTimerEvent))}),papaya.viewer.Viewer.UPDATE_TIMER_INTERVAL))};
papaya.viewer.Viewer.prototype.mouseDownEvent=function(a){var b=!0,e;papaya.Container.allowPropagation||a.stopPropagation();a.preventDefault();if(this.showingContextMenu)this.container.toolbar.closeAllMenus(),a.handled=!0;else if("IMG"===a.target.nodeName||"CANVAS"===a.target.nodeName)!0!==a.handled&&(this.container.toolbar.closeAllMenus(),this.previousMousePosition.x=papaya.utilities.PlatformUtils.getMousePositionX(a),this.previousMousePosition.y=papaya.utilities.PlatformUtils.getMousePositionY(a),
this.findClickedSlice(this,this.previousMousePosition.x,this.previousMousePosition.y),(2===a.button||this.isControlKeyDown||this.isLongTouch)&&this.container.contextManager&&this.selectedSlice===this.mainImage&&this.mainImage===this.surfaceView?(this.contextMenuMousePositionX=this.previousMousePosition.x-this.canvasRect.left,this.contextMenuMousePositionY=this.previousMousePosition.y-this.canvasRect.top,this.container.contextManager.prefersColorPicking&&this.container.contextManager.prefersColorPicking()&&
(e=this.surfaceView.pickColor(this.contextMenuMousePositionX,this.contextMenuMousePositionY),e=this.container.contextManager.getContextAtColor(e[0],e[1],e[2])),e&&(this.isContextMode=!0,e=this.container.toolbar.buildMenu(e,null,null,null,!0),papaya.ui.Toolbar.applyContextState(e),b=!1,e.showMenu(),this.showingContextMenu=!0),this.isContextMode=!0):(2===a.button||this.isControlKeyDown||this.isLongTouch)&&this.container.contextManager&&this.selectedSlice===this.mainImage?(this.isLongTouch?(e=this.convertCurrentCoordinateToScreen(this.mainImage),
this.contextMenuMousePositionX=e.x,this.contextMenuMousePositionY=e.y,e=this.container.contextManager.getContextAtImagePosition(this.currentCoord.x,this.currentCoord.y,this.currentCoord.z)):(this.contextMenuMousePositionX=this.previousMousePosition.x-this.canvasRect.left,this.contextMenuMousePositionY=this.previousMousePosition.y-this.canvasRect.top,e=this.container.contextManager.getContextAtImagePosition(this.cursorPosition.x,this.cursorPosition.y,this.cursorPosition.z)),e&&(this.isContextMode=
!0,e=this.container.toolbar.buildMenu(e,null,null,null,!0),papaya.ui.Toolbar.applyContextState(e),b=!1,e.showMenu(),this.showingContextMenu=!0)):2!==a.button&&!this.isControlKeyDown||this.currentScreenVolume.rgb?this.isAltKeyDown&&this.selectedSlice?(this.isZoomMode=!0,this.selectedSlice===this.surfaceView?(this.isPanning=this.isShiftKeyDown,this.surfaceView.setStartDynamic(this.previousMousePosition.x,this.previousMousePosition.y)):this.isZooming()&&this.isShiftKeyDown?(this.isPanning=!0,this.setStartPanLocation(this.convertScreenToImageCoordinateX(this.previousMousePosition.x,
this.selectedSlice),this.convertScreenToImageCoordinateY(this.previousMousePosition.y,this.selectedSlice),this.selectedSlice.sliceDirection)):this.setZoomLocation()):this.selectedSlice&&this.selectedSlice!==this.surfaceView?(this.grabbedHandle=this.selectedSlice.findProximalRulerHandle(this.convertScreenToImageCoordinateX(this.previousMousePosition.x-this.canvasRect.left,this.selectedSlice),this.convertScreenToImageCoordinateY(this.previousMousePosition.y-this.canvasRect.top,this.selectedSlice)),
null===this.grabbedHandle&&(this.updatePosition(this,papaya.utilities.PlatformUtils.getMousePositionX(a),papaya.utilities.PlatformUtils.getMousePositionY(a),!1),this.resetUpdateTimer(a))):this.selectedSlice&&this.selectedSlice===this.surfaceView&&(this.surfaceView.findProximalRulerHandle(this.previousMousePosition.x-this.canvasRect.left,this.previousMousePosition.y-this.canvasRect.top)||(this.isPanning=this.isShiftKeyDown,this.surfaceView.setStartDynamic(this.previousMousePosition.x,this.previousMousePosition.y)),
this.container.display.drawEmptyDisplay()):(this.isWindowControl=!0,this.container.showImageButtons&&(this.container.showControlBar||!this.container.kioskMode)&&this.screenVolumes[this.getCurrentScreenVolIndex()].supportsDynamicColorTable()&&this.container.toolbar.showImageMenu(this.getCurrentScreenVolIndex())),this.isDragging=b,a.handled=!0),this.controlsHidden||(this.controlsHiddenPrimed=!0)};
papaya.viewer.Viewer.prototype.mouseUpEvent=function(a){papaya.Container.allowPropagation||a.stopPropagation();a.preventDefault();this.showingContextMenu?(this.showingContextMenu=!1,a.handled=!0):("IMG"!==a.target.nodeName&&"CANVAS"!==a.target.nodeName||!0===a.handled||(this.isWindowControl||this.isZoomMode||this.isContextMode||null!==this.grabbedHandle||this.surfaceView&&-1!==this.surfaceView.grabbedRulerPoint||this.updatePosition(this,papaya.utilities.PlatformUtils.getMousePositionX(a),papaya.utilities.PlatformUtils.getMousePositionY(a)),
this.selectedSlice===this.surfaceView&&this.updateCursorPosition(this,papaya.utilities.PlatformUtils.getMousePositionX(a),papaya.utilities.PlatformUtils.getMousePositionY(a)),this.zoomFactorPrevious=this.zoomFactor,this.isPanning=this.isZoomMode=this.isWindowControl=this.isDragging=!1,this.selectedSlice=null,this.controlsHiddenPrimed=!1,a.handled=!0),this.grabbedHandle=null,this.isContextMode=!1,this.updateWindowTitle(),this.updateSliceSliderControl(),this.container.toolbar.closeAllMenus(!0),this.hasSurface()&&
(-1===this.surfaceView.grabbedRulerPoint?this.surfaceView.updateCurrent():this.surfaceView.grabbedRulerPoint=-1,papaya.utilities.PlatformUtils.smallScreen&&this.drawViewer(!0,!1)),this.controlsHidden&&(this.controlsHidden=!1,this.fadeInControls()))};
papaya.viewer.Viewer.prototype.fadeOutControls=function(){$("#"+PAPAYA_CONTROL_MAIN_INCREMENT_BUTTON_CSS+this.container.containerIndex).fadeOut();$("#"+PAPAYA_CONTROL_MAIN_DECREMENT_BUTTON_CSS+this.container.containerIndex).fadeOut();$("#"+PAPAYA_CONTROL_MAIN_SWAP_BUTTON_CSS+this.container.containerIndex).fadeOut();$("#"+PAPAYA_CONTROL_MAIN_GOTO_CENTER_BUTTON_CSS+this.container.containerIndex).fadeOut();$("#"+PAPAYA_CONTROL_MAIN_GOTO_ORIGIN_BUTTON_CSS+this.container.containerIndex).fadeOut()};
papaya.viewer.Viewer.prototype.fadeInControls=function(){600>this.container.getViewerDimensions()[0]?(this.mainImage!==this.surfaceView&&($("#"+PAPAYA_CONTROL_MAIN_INCREMENT_BUTTON_CSS+this.container.containerIndex).fadeIn(),$("#"+PAPAYA_CONTROL_MAIN_DECREMENT_BUTTON_CSS+this.container.containerIndex).fadeIn()),$("#"+PAPAYA_CONTROL_MAIN_SWAP_BUTTON_CSS+this.container.containerIndex).fadeIn()):(this.mainImage!==this.surfaceView&&($("#"+PAPAYA_CONTROL_MAIN_INCREMENT_BUTTON_CSS+this.container.containerIndex).fadeIn(),
$("#"+PAPAYA_CONTROL_MAIN_DECREMENT_BUTTON_CSS+this.container.containerIndex).fadeIn()),$("#"+PAPAYA_CONTROL_MAIN_SWAP_BUTTON_CSS+this.container.containerIndex).fadeIn(),$("#"+PAPAYA_CONTROL_MAIN_GOTO_CENTER_BUTTON_CSS+this.container.containerIndex).fadeIn(),$("#"+PAPAYA_CONTROL_MAIN_GOTO_ORIGIN_BUTTON_CSS+this.container.containerIndex).fadeIn())};
papaya.viewer.Viewer.prototype.findClickedSlice=function(a,b,e){b-=this.canvasRect.left;e-=this.canvasRect.top;this.insideScreenSlice(a.axialSlice,b,e,a.volume.getXDim(),a.volume.getYDim())?this.selectedSlice=this.axialSlice:this.insideScreenSlice(a.coronalSlice,b,e,a.volume.getXDim(),a.volume.getZDim())?this.selectedSlice=this.coronalSlice:this.insideScreenSlice(a.sagittalSlice,b,e,a.volume.getYDim(),a.volume.getZDim())?this.selectedSlice=this.sagittalSlice:this.insideScreenSlice(a.surfaceView,b,
e,a.volume.getYDim(),a.volume.getZDim())?this.selectedSlice=this.surfaceView:this.selectedSlice=null};
papaya.viewer.Viewer.prototype.mouseMoveEvent=function(a){a.preventDefault();if(this.showingContextMenu)a.handled=!0;else{var b,e;papaya.Container.papayaLastHoveredViewer=this;b=papaya.utilities.PlatformUtils.getMousePositionX(a);e=papaya.utilities.PlatformUtils.getMousePositionY(a);this.isDragging?this.grabbedHandle?this.isInsideMainSlice(b,e)&&(this.grabbedHandle.x=this.convertScreenToImageCoordinateX(b-this.canvasRect.left,this.selectedSlice),this.grabbedHandle.y=this.convertScreenToImageCoordinateY(e-
this.canvasRect.top,this.selectedSlice),this.drawViewer(!0,!0)):this.isWindowControl?(this.windowLevelChanged(this.previousMousePosition.x-b,this.previousMousePosition.y-e),this.previousMousePosition.x=b,this.previousMousePosition.y=e):this.isPanning?this.selectedSlice===this.surfaceView?(this.surfaceView.updateTranslateDynamic(papaya.utilities.PlatformUtils.getMousePositionX(a),papaya.utilities.PlatformUtils.getMousePositionY(a),this.selectedSlice===this.mainImage?1:3),this.drawViewer(!1,!0)):this.setCurrentPanLocation(this.convertScreenToImageCoordinateX(b,
this.selectedSlice),this.convertScreenToImageCoordinateY(e,this.selectedSlice),this.selectedSlice.sliceDirection):this.isZoomMode?(this.selectedSlice===this.surfaceView?(a=.5*(this.previousMousePosition.y-e)*this.surfaceView.scaleFactor,this.surfaceView.zoom+=a,this.previousMousePosition.x=b,this.previousMousePosition.y=e):(a=.05*(this.previousMousePosition.y-e),this.setZoomFactor(this.zoomFactorPrevious-a),this.axialSlice.updateZoomTransform(this.zoomFactor,this.zoomLocX,this.zoomLocY,this.panAmountX,
this.panAmountY,this),this.coronalSlice.updateZoomTransform(this.zoomFactor,this.zoomLocX,this.zoomLocZ,this.panAmountX,this.panAmountZ,this),this.sagittalSlice.updateZoomTransform(this.zoomFactor,this.zoomLocY,this.zoomLocZ,this.panAmountY,this.panAmountZ,this)),this.drawViewer(!0)):(this.resetUpdateTimer(null),null!==this.selectedSlice&&(this.selectedSlice===this.surfaceView?-1!==this.surfaceView.grabbedRulerPoint?(this.surfaceView.pickRuler(b-this.canvasRect.left,e-this.canvasRect.top),this.drawViewer(!1,
!0)):(this.surfaceView.updateDynamic(papaya.utilities.PlatformUtils.getMousePositionX(a),papaya.utilities.PlatformUtils.getMousePositionY(a),this.selectedSlice===this.mainImage?1:3),this.drawViewer(!1,!0),this.container.display.drawEmptyDisplay()):this.updatePosition(this,papaya.utilities.PlatformUtils.getMousePositionX(a),papaya.utilities.PlatformUtils.getMousePositionY(a)))):(this.updateCursorPosition(this,papaya.utilities.PlatformUtils.getMousePositionX(a),papaya.utilities.PlatformUtils.getMousePositionY(a)),
this.isZoomMode=!1);this.controlsHidden&&!this.isDragging&&(this.controlsHidden=!1,this.fadeInControls());this.controlsTimer&&(clearTimeout(this.controlsTimer),this.controlsTimer=null);this.controlsTimer=setTimeout(papaya.utilities.ObjectUtils.bind(this,function(){this.controlsHidden=!0;this.fadeOutControls()}),8E3);this.controlsHiddenPrimed&&(this.controlsHiddenPrimed=!1,this.controlsHidden=!0,this.fadeOutControls())}};
papaya.viewer.Viewer.prototype.mouseDoubleClickEvent=function(){this.isAltKeyDown&&(this.zoomFactorPrevious=1,this.setZoomFactor(1))};papaya.viewer.Viewer.prototype.mouseOutEvent=function(a){papaya.Container.papayaLastHoveredViewer=null;this.isDragging?this.mouseUpEvent(a):(this.container.display&&this.container.display.drawEmptyDisplay(),this.grabbedHandle=null)};papaya.viewer.Viewer.prototype.mouseLeaveEvent=function(){};
papaya.viewer.Viewer.prototype.touchMoveEvent=function(a){this.didLongTouch||(this.longTouchTimer&&(clearTimeout(this.longTouchTimer),this.longTouchTimer=null),this.isDragging||(this.mouseDownEvent(a),this.isDragging=!0),this.mouseMoveEvent(a))};papaya.viewer.Viewer.prototype.touchStartEvent=function(a){papaya.Container.allowPropagation||a.stopPropagation();a.preventDefault();this.longTouchTimer=setTimeout(papaya.utilities.ObjectUtils.bind(this,function(){this.doLongTouch(a)}),500)};
papaya.viewer.Viewer.prototype.touchEndEvent=function(a){this.didLongTouch||(this.longTouchTimer&&(clearTimeout(this.longTouchTimer),this.longTouchTimer=null),this.isDragging||this.mouseDownEvent(a),this.mouseUpEvent(a));this.isLongTouch=this.didLongTouch=!1};
papaya.viewer.Viewer.prototype.doLongTouch=function(a){this.longTouchTimer=null;this.isLongTouch=this.didLongTouch=!0;this.updateCursorPosition(this,papaya.utilities.PlatformUtils.getMousePositionX(a),papaya.utilities.PlatformUtils.getMousePositionY(a));this.mouseDownEvent(a);this.mouseUpEvent(a)};
papaya.viewer.Viewer.prototype.windowLevelChanged=function(a,b){var e,d;e=.025*(this.currentScreenVolume.screenMax-this.currentScreenVolume.screenMin);Math.abs(a)>Math.abs(b)?(d=this.currentScreenVolume.screenMin+e*papaya.utilities.MathUtils.signum(a),e=this.currentScreenVolume.screenMax+-1*e*papaya.utilities.MathUtils.signum(a),e<=d&&(e=d=this.currentScreenVolume.screenMin)):(d=this.currentScreenVolume.screenMin+e*papaya.utilities.MathUtils.signum(b),e=this.currentScreenVolume.screenMax+e*papaya.utilities.MathUtils.signum(b));
this.currentScreenVolume.setScreenRange(d,e);this.container.showImageButtons&&this.container.toolbar.updateImageMenuRange(this.getCurrentScreenVolIndex(),parseFloat(d.toPrecision(7)),parseFloat(e.toPrecision(7)));this.drawViewer(!0)};
papaya.viewer.Viewer.prototype.gotoCoordinate=function(a,b){if(this.initialized){var e=this.volume.header.imageDimensions.xDim,d=this.volume.header.imageDimensions.yDim,f=this.volume.header.imageDimensions.zDim;this.currentCoord.x=0>a.x?0:a.x>=e?e-1:a.x;this.currentCoord.y=0>a.y?0:a.y>=d?d-1:a.y;this.currentCoord.z=0>a.z?0:a.z>=f?f-1:a.z;this.drawViewer(!0);this.updateSliceSliderControl();b||(this.container.coordinateChanged(this),this.drawViewer(!1))}};
papaya.viewer.Viewer.prototype.gotoWorldCoordinate=function(a,b){var e=new papaya.core.Coordinate;this.gotoCoordinate(this.getIndexCoordinateAtWorld(a.x,a.y,a.z,e),b)};
papaya.viewer.Viewer.prototype.resizeViewer=function(a){var b=PAPAYA_PADDING/2,e;this.canvas.width=a[0];this.canvas.height=a[1];this.initialized&&(this.calculateScreenSliceTransforms(),this.canvasRect=this.canvas.getBoundingClientRect(),this.drawViewer(!0),this.container.showControls&&(a=$(this.canvas).offset(),e=$("#"+PAPAYA_CONTROL_MAIN_INCREMENT_BUTTON_CSS+this.container.containerIndex),e.css({top:a.top+b,left:a.left+this.mainImage.screenDim-e.outerWidth()-b,position:"absolute"}),e=$("#"+PAPAYA_CONTROL_MAIN_DECREMENT_BUTTON_CSS+
this.container.containerIndex),e.css({top:a.top+e.outerHeight()+PAPAYA_PADDING,left:a.left+this.mainImage.screenDim-e.outerWidth()-b,position:"absolute"}),e=$("#"+PAPAYA_CONTROL_MAIN_SWAP_BUTTON_CSS+this.container.containerIndex),e.css({top:a.top+this.mainImage.screenDim-e.outerHeight()-b,left:a.left+this.mainImage.screenDim-e.outerWidth()-b,position:"absolute"}),e=$("#"+PAPAYA_CONTROL_MAIN_GOTO_CENTER_BUTTON_CSS+this.container.containerIndex),e.css({top:a.top+this.mainImage.screenDim-e.outerHeight()-
b,left:a.left+b,position:"absolute"}),e=$("#"+PAPAYA_CONTROL_MAIN_GOTO_ORIGIN_BUTTON_CSS+this.container.containerIndex),e.css({top:a.top+this.mainImage.screenDim-e.outerHeight()-b,left:a.left+b+e.outerWidth()+PAPAYA_PADDING,position:"absolute"})))};
papaya.viewer.Viewer.prototype.getWorldCoordinateAtIndex=function(a,b,e,d){d.setCoordinate((a-this.volume.header.origin.x)*this.volume.header.voxelDimensions.xSize,(this.volume.header.origin.y-b)*this.volume.header.voxelDimensions.ySize,(this.volume.header.origin.z-e)*this.volume.header.voxelDimensions.zSize);return d};
papaya.viewer.Viewer.prototype.getIndexCoordinateAtWorld=function(a,b,e,d){d.setCoordinate(a/this.volume.header.voxelDimensions.xSize+this.volume.header.origin.x,-1*(b/this.volume.header.voxelDimensions.ySize-this.volume.header.origin.y),-1*(e/this.volume.header.voxelDimensions.zSize-this.volume.header.origin.z),!0);return d};
papaya.viewer.Viewer.prototype.getNextColorTable=function(){var a,b=0;for(a=1;a<this.screenVolumes.length;a+=1)this.screenVolumes[a].dti||(b+=1);return papaya.viewer.ColorTable.OVERLAY_COLOR_TABLES[b%papaya.viewer.ColorTable.OVERLAY_COLOR_TABLES.length].name};
papaya.viewer.Viewer.prototype.getCurrentValueAt=function(a,b,e){var d=!this.currentScreenVolume.interpolation,d=d&"Yes"===this.container.preferences.smoothDisplay;return this.worldSpace?(d|=this.currentScreenVolume.volume===this.volume&&this.volume.isWorldSpaceOnly(),this.currentScreenVolume.volume.getVoxelAtCoordinate((a-this.volume.header.origin.x)*this.volume.header.voxelDimensions.xSize,(this.volume.header.origin.y-b)*this.volume.header.voxelDimensions.ySize,(this.volume.header.origin.z-e)*this.volume.header.voxelDimensions.zSize,
this.currentScreenVolume.currentTimepoint,!d)):this.currentScreenVolume.volume.getVoxelAtMM(a*this.volume.header.voxelDimensions.xSize,b*this.volume.header.voxelDimensions.ySize,e*this.volume.header.voxelDimensions.zSize,this.currentScreenVolume.currentTimepoint,!d)};
papaya.viewer.Viewer.prototype.resetViewer=function(){this.container.showControlBar?($("."+PAPAYA_CONTROL_INCREMENT_BUTTON_CSS).prop("disabled",!0),$("."+PAPAYA_CONTROL_SWAP_BUTTON_CSS).prop("disabled",!0),$("."+PAPAYA_CONTROL_GOTO_CENTER_BUTTON_CSS).prop("disabled",!0),$("."+PAPAYA_CONTROL_GOTO_ORIGIN_BUTTON_CSS).prop("disabled",!0)):this.container.showControls&&($("#"+PAPAYA_CONTROL_MAIN_INCREMENT_BUTTON_CSS+this.container.containerIndex).css({display:"none"}),$("#"+PAPAYA_CONTROL_MAIN_DECREMENT_BUTTON_CSS+
this.container.containerIndex).css({display:"none"}),$("#"+PAPAYA_CONTROL_MAIN_SWAP_BUTTON_CSS+this.container.containerIndex).css({display:"none"}),$("#"+PAPAYA_CONTROL_MAIN_GOTO_CENTER_BUTTON_CSS+this.container.containerIndex).css({display:"none"}),$("#"+PAPAYA_CONTROL_MAIN_GOTO_ORIGIN_BUTTON_CSS+this.container.containerIndex).css({display:"none"}));this.initialized=!1;this.loadingVolume=null;this.volume=new papaya.volume.Volume(this.container.display,this);this.screenVolumes=[];this.surfaces=[];
this.lowerImageTop=this.lowerImageBot=this.lowerImageBot2=this.mainImage=this.sagittalSlice=this.coronalSlice=this.axialSlice=this.currentScreenVolume=this.surfaceView=null;this.viewerDim=0;this.currentCoord=new papaya.core.Coordinate(0,0,0);this.draggingSliceDir=this.longestDimSize=this.longestDim=0;this.hasSeries=this.isWindowControl=this.isDragging=!1;this.previousMousePosition=new papaya.core.Point;this.canvas.removeEventListener("mousemove",this.listenerMouseMove,!1);this.canvas.removeEventListener("mousedown",
this.listenerMouseDown,!1);this.canvas.removeEventListener("mouseout",this.listenerMouseOut,!1);this.canvas.removeEventListener("mouseleave",this.listenerMouseLeave,!1);this.canvas.removeEventListener("mouseup",this.listenerMouseUp,!1);document.removeEventListener("keydown",this.listenerKeyDown,!0);document.removeEventListener("keyup",this.listenerKeyUp,!0);document.removeEventListener("contextmenu",this.listenerContextMenu,!1);this.canvas.removeEventListener("touchmove",this.listenerTouchMove,!1);
this.canvas.removeEventListener("touchstart",this.listenerTouchStart,!1);this.canvas.removeEventListener("touchend",this.listenerTouchEnd,!1);this.canvas.removeEventListener("dblclick",this.listenerMouseDoubleClick,!1);this.removeScroll();this.updateTimerEvent=this.updateTimer=null;this.drawEmptyViewer();this.container.display&&this.container.display.drawEmptyDisplay();this.updateSliceSliderControl();this.container.toolbar.buildToolbar()};
papaya.viewer.Viewer.prototype.getHeaderDescription=function(a){return this.screenVolumes[a||0].volume.header.toString()};papaya.viewer.Viewer.prototype.getImageDimensionsDescription=function(a){var b;b=this.screenVolumes[a].volume.header.orientation.orientation;a=this.screenVolumes[a].volume.header.imageDimensions;return"("+b.charAt(0)+", "+b.charAt(1)+", "+b.charAt(2)+") "+a.cols+" x "+a.rows+" x "+a.slices};
papaya.viewer.Viewer.prototype.getVoxelDimensionsDescription=function(a){var b;b=this.screenVolumes[a].volume.header.orientation.orientation;a=this.screenVolumes[a].volume.header.voxelDimensions;return"("+b.charAt(0)+", "+b.charAt(1)+", "+b.charAt(2)+") "+papaya.utilities.StringUtils.formatNumber(a.colSize,!0)+" x "+papaya.utilities.StringUtils.formatNumber(a.rowSize,!0)+" x "+papaya.utilities.StringUtils.formatNumber(a.sliceSize,!0)+" "+a.getSpatialUnitString()};
papaya.viewer.Viewer.prototype.getSeriesDimensionsDescription=function(a){return this.screenVolumes[a].volume.header.imageDimensions.timepoints.toString()};papaya.viewer.Viewer.prototype.getSeriesSizeDescription=function(a){a=this.screenVolumes[a].volume.header.voxelDimensions;return a.timeSize.toString()+" "+a.getTemporalUnitString()};papaya.viewer.Viewer.prototype.getFilename=function(a){return papaya.utilities.StringUtils.wordwrap(this.screenVolumes[a].volume.fileName,25,"<br />",!0)};
papaya.viewer.Viewer.prototype.getSurfaceFilename=function(a){return papaya.utilities.StringUtils.wordwrap(this.surfaces[a].filename,25,"<br />",!0)};papaya.viewer.Viewer.prototype.getSurfaceNumPoints=function(a){return this.surfaces[a].numPoints};papaya.viewer.Viewer.prototype.getSurfaceNumTriangles=function(a){return this.surfaces[a].numTriangles};
papaya.viewer.Viewer.prototype.getNiceFilename=function(a){a=this.screenVolumes[a].volume.fileName.replace(".nii","").replace(".gz","");a.length>papaya.viewer.Viewer.TITLE_MAX_LENGTH&&(a=a.substr(0,papaya.viewer.Viewer.TITLE_MAX_LENGTH-3)+"...");return a};papaya.viewer.Viewer.prototype.getFileLength=function(a){return papaya.utilities.StringUtils.getSizeString(this.screenVolumes[a].volume.fileLength)};
papaya.viewer.Viewer.prototype.getByteTypeDescription=function(a){return this.screenVolumes[a].volume.header.imageType.numBytes+"-Byte "+this.screenVolumes[a].volume.header.imageType.getTypeDescription()};papaya.viewer.Viewer.prototype.getByteOrderDescription=function(a){return this.screenVolumes[a].volume.header.imageType.getOrderDescription()};papaya.viewer.Viewer.prototype.getCompressedDescription=function(a){return this.screenVolumes[a].volume.header.imageType.compressed?"Yes":"No"};
papaya.viewer.Viewer.prototype.getOrientationDescription=function(a){return this.screenVolumes[a].volume.header.orientation.getOrientationDescription()};papaya.viewer.Viewer.prototype.getImageDescription=function(a){return papaya.utilities.StringUtils.wordwrap(this.screenVolumes[a].volume.header.imageDescription.notes,35,"<br />",!0)};papaya.viewer.Viewer.prototype.setCurrentScreenVol=function(a){this.currentScreenVolume=this.screenVolumes[a];this.updateWindowTitle()};
papaya.viewer.Viewer.prototype.updateWindowTitle=function(){var a;this.initialized&&(a=this.getNiceFilename(this.getCurrentScreenVolIndex()),1<this.currentScreenVolume.volume.numTimepoints&&(a=this.currentScreenVolume.seriesLabels&&this.currentScreenVolume.seriesLabels.length>this.currentScreenVolume.currentTimepoint?this.currentScreenVolume.seriesLabels[this.currentScreenVolume.currentTimepoint]:a+" ("+(this.currentScreenVolume.currentTimepoint+1)+" of "+this.currentScreenVolume.volume.numTimepoints+
")"),this.isZooming()&&(a=a+" "+this.getZoomString()),this.container.toolbar.updateTitleBar(a))};papaya.viewer.Viewer.prototype.getCurrentScreenVolIndex=function(){var a;for(a=0;a<this.screenVolumes.length;a+=1)if(this.screenVolumes[a]===this.currentScreenVolume)return a;return-1};papaya.viewer.Viewer.prototype.toggleWorldSpace=function(){this.worldSpace=!this.worldSpace;this.container.syncOverlaySeries&&this.reconcileOverlaySeriesPoint(this.currentScreenVolume)};
papaya.viewer.Viewer.prototype.isSelected=function(a){return this.isSelectable()&&a===this.getCurrentScreenVolIndex()};papaya.viewer.Viewer.prototype.isSelectable=function(){return 1<this.screenVolumes.length};
papaya.viewer.Viewer.prototype.processParams=function(a){a.worldSpace&&(this.worldSpace=!0);a.ignoreNiftiTransforms&&(this.ignoreNiftiTransforms=!0);a.coordinate&&(this.initialCoordinate=a.coordinate);a.ignoreSync&&(this.ignoreSync=a.ignoreSync);this.container.isDesktopMode()||(void 0!==a.showOrientation&&(this.container.preferences.showOrientation=a.showOrientation?"Yes":"No"),void 0!==a.smoothDisplay&&(this.container.preferences.smoothDisplay=a.smoothDisplay?"Yes":"No"),void 0!==a.radiological&&
(this.container.preferences.radiological=a.radiological?"Yes":"No"),void 0!==a.showRuler&&(this.container.preferences.showRuler=a.showRuler?"Yes":"No"),void 0!==a.showSurfacePlanes&&(this.container.preferences.showSurfacePlanes=a.showSurfacePlanes?"Yes":"No"),void 0!==a.showSurfaceCrosshairs&&(this.container.preferences.showSurfaceCrosshairs=a.showSurfaceCrosshairs?"Yes":"No"))};
papaya.viewer.Viewer.prototype.hasLoadedDTI=function(){return 1===this.screenVolumes.length&&this.screenVolumes[0].dti&&null===this.screenVolumes[0].dtiVolumeMod};
papaya.viewer.Viewer.prototype.goToInitialCoordinate=function(){var a=new papaya.core.Coordinate;0<this.screenVolumes.length&&(null===this.initialCoordinate?a.setCoordinate(papayaFloorFast(this.volume.header.imageDimensions.xDim/2),papayaFloorFast(this.volume.header.imageDimensions.yDim/2),papayaFloorFast(this.volume.header.imageDimensions.zDim/2),!0):(this.worldSpace?this.getIndexCoordinateAtWorld(this.initialCoordinate[0],this.initialCoordinate[1],this.initialCoordinate[2],a):a.setCoordinate(this.initialCoordinate[0],
this.initialCoordinate[1],this.initialCoordinate[2],!0),this.initialCoordinate=null),this.gotoCoordinate(a),this.container.display&&this.container.display.drawDisplay(this.currentCoord.x,this.currentCoord.y,this.currentCoord.z))};
papaya.viewer.Viewer.prototype.getOrientationCertaintyColor=function(){var a=this.screenVolumes[0].volume.header.orientationCertainty;return a===papaya.volume.Header.ORIENTATION_CERTAINTY_LOW?papaya.viewer.Viewer.ORIENTATION_CERTAINTY_LOW_COLOR:a===papaya.volume.Header.ORIENTATION_CERTAINTY_HIGH?papaya.viewer.Viewer.ORIENTATION_CERTAINTY_HIGH_COLOR:papaya.viewer.Viewer.ORIENTATION_CERTAINTY_UNKNOWN_COLOR};papaya.viewer.Viewer.prototype.isUsingAtlas=function(a){return a===this.atlas.currentAtlas};
papaya.viewer.Viewer.prototype.scrolled=function(a){var b;a=a||window.event;a.target==this.canvas&&(a.preventDefault&&a.preventDefault(),a.returnValue=!1,b="Increment Slice"===this.container.preferences.scrollBehavior,a=papaya.utilities.PlatformUtils.getScrollSign(a,!b),b?0>a?(this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL?this.incrementAxial(!1,Math.abs(a)):this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL?this.incrementCoronal(!1,Math.abs(a)):
this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL&&this.incrementSagittal(!1,Math.abs(a)),this.gotoCoordinate(this.currentCoord)):0<a&&(this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL?this.incrementAxial(!0,Math.abs(a)):this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL?this.incrementCoronal(!0,Math.abs(a)):this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL&&this.incrementSagittal(!0,Math.abs(a)),
this.gotoCoordinate(this.currentCoord)):0!==a&&(this.isZoomMode=!0,this.mainImage===this.surfaceView?(this.surfaceView.zoom+=-5*a*this.surfaceView.scaleFactor,this.drawViewer(!1,!0)):(this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL?this.setZoomLocation(this.currentCoord.x,this.currentCoord.y,this.mainImage.sliceDirection):this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL?this.setZoomLocation(this.currentCoord.x,this.currentCoord.z,this.mainImage.sliceDirection):
this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL&&this.setZoomLocation(this.currentCoord.y,this.currentCoord.z,this.mainImage.sliceDirection),this.setZoomFactor(this.zoomFactorPrevious+.1*a*this.zoomFactorPrevious)),this.zoomFactorPrevious=this.zoomFactor))};
papaya.viewer.Viewer.prototype.incrementAxial=function(a,b){var e=this.volume.header.imageDimensions.zDim;void 0===b&&(b=1);a?(this.currentCoord.z+=b,this.currentCoord.z>=e&&(this.currentCoord.z=e-1)):(this.currentCoord.z-=b,0>this.currentCoord.z&&(this.currentCoord.z=0));this.gotoCoordinate(this.currentCoord)};
papaya.viewer.Viewer.prototype.incrementCoronal=function(a,b){var e=this.volume.header.imageDimensions.yDim;void 0===b&&(b=1);a?(this.currentCoord.y+=b,this.currentCoord.y>=e&&(this.currentCoord.y=e-1)):(this.currentCoord.y-=b,0>this.currentCoord.y&&(this.currentCoord.y=0));this.gotoCoordinate(this.currentCoord)};
papaya.viewer.Viewer.prototype.incrementSagittal=function(a,b){var e=this.volume.header.imageDimensions.xDim;void 0===b&&(b=1);a?(this.currentCoord.x-=b,0>this.currentCoord.x&&(this.currentCoord.x=0)):(this.currentCoord.x+=b,this.currentCoord.x>=e&&(this.currentCoord.x=e-1));this.gotoCoordinate(this.currentCoord)};
papaya.viewer.Viewer.prototype.setZoomFactor=function(a){a>papaya.viewer.Viewer.ZOOM_FACTOR_MAX?a=papaya.viewer.Viewer.ZOOM_FACTOR_MAX:a<papaya.viewer.Viewer.ZOOM_FACTOR_MIN&&(a=papaya.viewer.Viewer.ZOOM_FACTOR_MIN);this.zoomFactor=a;1===this.zoomFactor&&(this.panAmountX=this.panAmountY=this.panAmountZ=0);this.axialSlice.updateZoomTransform(this.zoomFactor,this.zoomLocX,this.zoomLocY,this.panAmountX,this.panAmountY,this);this.coronalSlice.updateZoomTransform(this.zoomFactor,this.zoomLocX,this.zoomLocZ,
this.panAmountX,this.panAmountZ,this);this.sagittalSlice.updateZoomTransform(this.zoomFactor,this.zoomLocY,this.zoomLocZ,this.panAmountY,this.panAmountZ,this);this.drawViewer(!1,!0);this.updateWindowTitle()};papaya.viewer.Viewer.prototype.getZoomString=function(){return parseInt(100*this.zoomFactor,10)+"%"};papaya.viewer.Viewer.prototype.isZooming=function(){return 1<this.zoomFactor};
papaya.viewer.Viewer.prototype.setZoomLocation=function(){1===this.zoomFactor&&(this.zoomLocX=this.currentCoord.x,this.zoomLocY=this.currentCoord.y,this.zoomLocZ=this.currentCoord.z,this.axialSlice.updateZoomTransform(this.zoomFactor,this.zoomLocX,this.zoomLocY,this.panAmountX,this.panAmountY,this),this.coronalSlice.updateZoomTransform(this.zoomFactor,this.zoomLocX,this.zoomLocZ,this.panAmountX,this.panAmountZ,this),this.sagittalSlice.updateZoomTransform(this.zoomFactor,this.zoomLocY,this.zoomLocZ,
this.panAmountY,this.panAmountZ,this),this.drawViewer(!1,!0))};
papaya.viewer.Viewer.prototype.setStartPanLocation=function(a,b,e){1<this.zoomFactor&&(e===papaya.viewer.ScreenSlice.DIRECTION_AXIAL?(this.panLocX=a,this.panLocY=b,this.panLocZ=this.axialSlice.currentSlice):e===papaya.viewer.ScreenSlice.DIRECTION_CORONAL?(this.panLocX=a,this.panLocY=this.coronalSlice.currentSlice,this.panLocZ=b):e===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL&&(this.panLocX=this.sagittalSlice.currentSlice,this.panLocY=a,this.panLocZ=b))};
papaya.viewer.Viewer.prototype.setCurrentPanLocation=function(a,b,e){1<this.zoomFactor&&(e===papaya.viewer.ScreenSlice.DIRECTION_AXIAL?(this.panAmountX+=a-this.panLocX,this.panAmountY+=b-this.panLocY,this.panAmountZ=0):e===papaya.viewer.ScreenSlice.DIRECTION_CORONAL?(this.panAmountX+=a-this.panLocX,this.panAmountY=0,this.panAmountZ+=b-this.panLocZ):e===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL&&(this.panAmountX=0,this.panAmountY+=a-this.panLocY,this.panAmountZ+=b-this.panLocZ),this.axialSlice.updateZoomTransform(this.zoomFactor,
this.zoomLocX,this.zoomLocY,this.panAmountX,this.panAmountY,this),this.coronalSlice.updateZoomTransform(this.zoomFactor,this.zoomLocX,this.zoomLocZ,this.panAmountX,this.panAmountZ,this),this.sagittalSlice.updateZoomTransform(this.zoomFactor,this.zoomLocY,this.zoomLocZ,this.panAmountY,this.panAmountZ,this),this.drawViewer(!1,!0))};papaya.viewer.Viewer.prototype.isWorldMode=function(){return this.worldSpace};papaya.viewer.Viewer.prototype.isRadiologicalMode=function(){return"Yes"===this.container.preferences.radiological};
papaya.viewer.Viewer.prototype.isCollapsable=function(){return this.container.collapsable};
papaya.viewer.Viewer.prototype.mainSliderControlChanged=function(){this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_AXIAL?this.currentCoord.z=parseInt(this.mainSliderControl.val(),10):this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_CORONAL?this.currentCoord.y=parseInt(this.mainSliderControl.val(),10):this.mainImage.sliceDirection===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL&&(this.currentCoord.x=parseInt(this.mainSliderControl.val(),10));this.gotoCoordinate(this.currentCoord)};
papaya.viewer.Viewer.prototype.axialSliderControlChanged=function(){this.currentCoord.z=parseInt(this.axialSliderControl.val(),10);this.gotoCoordinate(this.currentCoord)};papaya.viewer.Viewer.prototype.coronalSliderControlChanged=function(){this.currentCoord.y=parseInt(this.coronalSliderControl.val(),10);this.gotoCoordinate(this.currentCoord)};papaya.viewer.Viewer.prototype.sagittalSliderControlChanged=function(){this.currentCoord.x=parseInt(this.sagittalSliderControl.val(),10);this.gotoCoordinate(this.currentCoord)};
papaya.viewer.Viewer.prototype.seriesSliderControlChanged=function(){this.currentScreenVolume.setTimepoint(parseInt(this.seriesSliderControl.val(),10));this.currentScreenVolume.isOverlay()&&this.container.syncOverlaySeries&&this.reconcileOverlaySeriesPoint(this.currentScreenVolume);this.timepointChanged()};
papaya.viewer.Viewer.prototype.updateSliceSliderControl=function(){this.mainSliderControl&&this.doUpdateSliceSliderControl(this.mainSliderControl,this.mainImage.sliceDirection);this.axialSliderControl&&this.doUpdateSliceSliderControl(this.axialSliderControl,papaya.viewer.ScreenSlice.DIRECTION_AXIAL);this.coronalSliderControl&&this.doUpdateSliceSliderControl(this.coronalSliderControl,papaya.viewer.ScreenSlice.DIRECTION_CORONAL);this.sagittalSliderControl&&this.doUpdateSliceSliderControl(this.sagittalSliderControl,
papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL);this.seriesSliderControl&&this.doUpdateSliceSliderControl(this.seriesSliderControl,papaya.viewer.ScreenSlice.DIRECTION_TEMPORAL)};
papaya.viewer.Viewer.prototype.doUpdateSliceSliderControl=function(a,b){this.initialized?(a.prop("disabled",!1),a.prop("min","0"),a.prop("step","1"),b===papaya.viewer.ScreenSlice.DIRECTION_AXIAL?(a.prop("max",(this.volume.header.imageDimensions.zDim-1).toString()),a.val(this.currentCoord.z)):b===papaya.viewer.ScreenSlice.DIRECTION_CORONAL?(a.prop("max",(this.volume.header.imageDimensions.yDim-1).toString()),a.val(this.currentCoord.y)):b===papaya.viewer.ScreenSlice.DIRECTION_SAGITTAL?(a.prop("max",
(this.volume.header.imageDimensions.xDim-1).toString()),a.val(this.currentCoord.x)):b===papaya.viewer.ScreenSlice.DIRECTION_TEMPORAL&&(a.prop("max",(this.currentScreenVolume.volume.header.imageDimensions.timepoints-1).toString()),a.val(this.currentScreenVolume.currentTimepoint))):(a.prop("disabled",!0),a.prop("min","0"),a.prop("step","1"),a.prop("max","1"),a.val(0))};
papaya.viewer.Viewer.prototype.incrementSeriesPoint=function(){this.currentScreenVolume.incrementTimepoint();this.currentScreenVolume.isOverlay()&&this.container.syncOverlaySeries&&this.reconcileOverlaySeriesPoint(this.currentScreenVolume);this.timepointChanged()};
papaya.viewer.Viewer.prototype.decrementSeriesPoint=function(){this.currentScreenVolume.decrementTimepoint();this.currentScreenVolume.isOverlay()&&this.container.syncOverlaySeries&&this.reconcileOverlaySeriesPoint(this.currentScreenVolume);this.timepointChanged()};
papaya.viewer.Viewer.prototype.reconcileOverlaySeriesPoint=function(a){var b,e;if(this.worldSpace)for(e=a.getCurrentTime(),b=1;b<this.screenVolumes.length;b+=1)this.screenVolumes[b]!==a&&this.screenVolumes[b].setCurrentTime(e);else for(e=a.currentTimepoint,b=1;b<this.screenVolumes.length;b+=1)this.screenVolumes[b]!==a&&this.screenVolumes[b].setTimepoint(e)};papaya.viewer.Viewer.prototype.hasParametricPair=function(a){return a?null!==this.screenVolumes[a].negativeScreenVol:!1};
papaya.viewer.Viewer.prototype.getScreenVolumeIndex=function(a){var b;if(a)for(b=0;b<this.screenVolumes.length;b+=1)if(a===this.screenVolumes[b])return b;return-1};papaya.viewer.Viewer.prototype.getScreenVolumeByName=function(a){var b;for(b=0;b<this.screenVolumes.length;b+=1)if(a==this.screenVolumes[b].volume.fileName)return this.screenVolumes[b];return null};papaya.viewer.Viewer.prototype.isShowingRuler=function(){return"Yes"===this.container.preferences.showRuler};
papaya.viewer.Viewer.prototype.isShowingOrientation=function(){return"Yes"===this.container.preferences.showOrientation};papaya.viewer.Viewer.prototype.isShowingCrosshairs=function(){return"Yes"===this.container.preferences.showCrosshairs};papaya.viewer.Viewer.prototype.isShowingSurfacePlanes=function(){return this.surfaceView&&this.surfaceView.showSurfacePlanes};papaya.viewer.Viewer.prototype.isShowingSurfaceCrosshairs=function(){return this.surfaceView&&this.surfaceView.showSurfaceCrosshairs};
papaya.viewer.Viewer.prototype.restart=function(a,b,e,d){this.resetViewer();this.container.toolbar.updateImageButtons();this.loadImage(a,b,e,d)};papaya.viewer.Viewer.prototype.removeOverlay=function(a){var b;a=this.container.viewer.screenVolumes[a];b=a.negativeScreenVol;this.closeOverlayByRef(a);this.container.combineParametric&&this.closeOverlayByRef(b);this.drawViewer(!0,!1)};
papaya.viewer.Viewer.prototype.toggleOverlay=function(a){var b;a=this.container.viewer.screenVolumes[a];a.hidden=!a.hidden;b=a.negativeScreenVol;this.container.combineParametric&&b&&(b.hidden=!b.hidden);this.drawViewer(!0,!1);return a.hidden};
papaya.viewer.Viewer.prototype.addParametric=function(a){a=this.container.viewer.screenVolumes[a];var b;null===a.negativeScreenVol&&(this.screenVolumes[this.screenVolumes.length]=b=new papaya.viewer.ScreenVolume(a.volume,{},papaya.viewer.ColorTable.PARAMETRIC_COLOR_TABLES[1].name,!1,!0,this.currentCoord),a.negativeScreenVol=b,this.setCurrentScreenVol(this.screenVolumes.length-1),this.drawViewer(!0,!1),this.container.toolbar.buildToolbar(),this.container.toolbar.updateImageButtons())};"use strict";
papaya=papaya||{};papaya.viewer=papaya.viewer||{};
var shaderVert="precision mediump float;\nattribute vec3 aVertexPosition;\nattribute vec3 aVertexNormal;\nattribute vec4 aVertexColor;\nattribute vec2 aTextureCoord;\nuniform mat4 uMVMatrix;\nuniform mat4 uPMatrix;\nuniform mat3 uNMatrix;\nuniform vec3 uAmbientColor;\nuniform vec3 uPointLightingLocation;\nuniform vec3 uPointLightingColor;\nuniform bool uActivePlane;\nuniform bool uActivePlaneEdge;\nuniform bool uCrosshairs;\nuniform bool uColors;\nuniform bool uColorPicking;\nuniform bool uTrianglePicking;\nuniform bool uColorSolid;\nuniform vec4 uSolidColor;\nuniform bool uOrientationText;\nuniform bool uRuler;\nuniform float uAlpha;\nvarying vec3 vLightWeighting;\nvarying lowp vec4 vColor;\nvarying vec2 vTextureCoord;\nvoid main(void) {\n    vec4 mvPosition = uMVMatrix * vec4(aVertexPosition, 1.0);\n    gl_Position = uPMatrix * mvPosition;\n    if (!uActivePlane && !uActivePlaneEdge && !uCrosshairs && !uOrientationText && !uRuler) {\n       vec3 lightDirection = normalize(uPointLightingLocation - mvPosition.xyz);\n       vec3 transformedNormal = uNMatrix * aVertexNormal;\n       float directionalLightWeighting = max(dot(transformedNormal, lightDirection), 0.0);\n       vLightWeighting = uAmbientColor + uPointLightingColor * directionalLightWeighting;\n       if (uColors) {\n           vColor = aVertexColor;\n       }\n   }\n   if (uColorSolid) {\n       vColor = uSolidColor;\n   }\n   if (uOrientationText) {\n       vTextureCoord = aTextureCoord;\n   }\n}",shaderFrag=
"precision mediump float;\nuniform bool uActivePlane;\nuniform bool uActivePlaneEdge;\nuniform bool uCrosshairs;\nuniform bool uColors;\nuniform bool uColorPicking;\nuniform bool uTrianglePicking;\nuniform bool uColorSolid;\nuniform vec4 uSolidColor;\nuniform bool uOrientationText;\nuniform bool uRuler;\nuniform sampler2D uSampler;\nuniform float uAlpha;\nvarying vec3 vLightWeighting;\nvarying lowp vec4 vColor;\nvarying vec2 vTextureCoord;\nvec4 packFloatToVec4i(const float value) {\n   const vec4 bitSh = vec4(256.0*256.0*256.0, 256.0*256.0, 256.0, 1.0);\n   const vec4 bitMsk = vec4(0.0, 1.0/256.0, 1.0/256.0, 1.0/256.0);\n   vec4 res = fract(value * bitSh);\n   res -= res.xxyz * bitMsk;\n   return res;\n}\nvoid main(void) {\n    vec4 fragmentColor = vec4(1.0, 1.0, 1.0, 1.0);\n    if (uColors) {\n       fragmentColor = vColor;\n    } else if (uColorSolid) {\n       fragmentColor = vColor;\n    }\n    if (uActivePlane) {\n       gl_FragColor = vec4(0.10980392156863, 0.52549019607843, 0.93333333333333, 0.5);\n    } else if (uActivePlaneEdge) {\n       gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n    } else if (uRuler) {\n       gl_FragColor = vec4(1.0, 0.078, 0.576, 1.0);\n    } else if (uOrientationText) {\n        vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n        if (textureColor.a > 0.0) {\n           gl_FragColor = vec4(textureColor.rgb, textureColor.a);\n        } else {\n           gl_FragColor = vec4(textureColor.rgb, 0);\n        }\n    } else if (uCrosshairs) {\n       gl_FragColor = vec4(0.10980392156863, 0.52549019607843, 0.93333333333333, 1.0);\n    } else if (uColorPicking) {\n       gl_FragColor = vec4(fragmentColor.r, fragmentColor.g, fragmentColor.b, 1);\n    } else if (uTrianglePicking) {\n       gl_FragColor = packFloatToVec4i(gl_FragCoord.z);\n    } else {\n       gl_FragColor = vec4(fragmentColor.rgb * vLightWeighting, uAlpha);\n    }\n}";
papaya.viewer.ScreenSurface=papaya.viewer.ScreenSurface||function(a,b,e,d){this.shaderProgram=null;this.mvMatrix=mat4.create();this.pMatrix=mat4.create();this.pMatrix1=mat4.create();this.centerMat=mat4.create();this.centerMatInv=mat4.create();this.tempMat=mat4.create();this.tempMat2=mat4.create();this.pickingBuffer=null;this.initialized=!1;this.screenDim=this.screenOffsetY=this.screenOffsetX=0;this.screenTransform=[[1,0,0],[0,1,0],[0,0,1]];this.volume=a;this.surfaces=b;this.viewer=e;this.currentCoord=
e.currentCoord;this.zoom=0;this.sliceDirection=papaya.viewer.ScreenSlice.DIRECTION_SURFACE;this.dynamicStartY=this.dynamicStartX=-1;this.activePlaneVertsAxial=new Float32Array(12);this.activePlaneVertsCoronal=new Float32Array(12);this.activePlaneVertsSagittal=new Float32Array(12);this.activePlaneVertsAxialEdges=new Float32Array(24);this.activePlaneVertsCoronalEdges=new Float32Array(24);this.activePlaneVertsSagittalEdges=new Float32Array(24);this.orientationVerts=new Float32Array(24);this.crosshairLineVertsX=
new Float32Array(6);this.crosshairLineVertsY=new Float32Array(6);this.crosshairLineVertsZ=new Float32Array(6);this.mouseRotDragX=this.clearTransform([]);this.mouseRotDragY=this.clearTransform([]);this.mouseRotDrag=this.clearTransform([]);this.mouseTransDrag=this.clearTransform([]);this.mouseRotCurrent=this.clearTransform([]);this.mouseTransCurrent=this.clearTransform([]);this.mouseRotTemp=this.clearTransform([]);this.mouseTransTemp=this.clearTransform([]);this.crosshairLineZBuffer=this.crosshairLineZBuffer=
this.crosshairLineYBuffer=this.crosshairLineXBuffer=this.orientationBuffer=this.activePlaneSagittalEdgesBuffer=this.activePlaneCoronalEdgesBuffer=this.activePlaneAxialEdgesBuffer=this.activePlaneSagittalBuffer=this.activePlaneCoronalBuffer=this.activePlaneAxialBuffer=null;this.xSize=this.volume.header.voxelDimensions.xSize;this.xDim=this.volume.header.imageDimensions.xDim;this.xHalf=this.xDim*this.xSize/2;this.ySize=this.volume.header.voxelDimensions.ySize;this.yDim=this.volume.header.imageDimensions.yDim;
this.yHalf=this.yDim*this.ySize/2;this.zSize=this.volume.header.voxelDimensions.zSize;this.zDim=this.volume.header.imageDimensions.zDim;this.zHalf=this.zDim*this.zSize/2;this.showSurfacePlanes="Yes"===e.container.preferences.showSurfacePlanes;this.backgroundColor=papaya.viewer.ScreenSurface.DEFAULT_BACKGROUND;this.pickLocY=this.pickLocX=0;this.needsPickColor=!1;this.pickedColor=null;this.needsPick=!1;this.pickedCoordinate=null;this.scaleFactor=1;this.rulerPoints=this.orientationContext=this.orientationCanvas=
this.orientationTextureCoordBuffer=this.orientationTextureCoords=this.orientationTexture=null;this.grabbedRulerPoint=-1;this.processParams(d)};papaya.viewer.ScreenSurface.DEFAULT_ORIENTATION=[-.015552218963737041,.09408106275544359,-.9954430697501158,0,-.9696501263313991,.24152923619118966,.03797658948646743,0,.24400145970103732,.965822108594413,.0874693978960848,0,0,0,0,1];papaya.viewer.ScreenSurface.MOUSE_SENSITIVITY=.3;papaya.viewer.ScreenSurface.DEFAULT_BACKGROUND=[.5,.5,.5];
papaya.viewer.ScreenSurface.TEXT_SIZE=50;papaya.viewer.ScreenSurface.ORIENTATION_SIZE=10;papaya.viewer.ScreenSurface.RULER_COLOR=[1,.078,.576];papaya.viewer.ScreenSurface.RULER_NUM_LINES=25;papaya.viewer.ScreenSurface.RULER_RADIUS=1;papaya.viewer.ScreenSurface.EXT_INT=null;papaya.viewer.ScreenSurface.makeShader=function(a,b,e){e=a.createShader(e);a.shaderSource(e,b);a.compileShader(e);return a.getShaderParameter(e,a.COMPILE_STATUS)?e:(console.log(a.getShaderInfoLog(e)),null)};
papaya.viewer.ScreenSurface.initShaders=function(a){var b=papaya.viewer.ScreenSurface.makeShader(a,shaderVert,a.VERTEX_SHADER),e=papaya.viewer.ScreenSurface.makeShader(a,shaderFrag,a.FRAGMENT_SHADER),d=a.createProgram();a.attachShader(d,e);a.attachShader(d,b);a.linkProgram(d);a.getProgramParameter(d,a.LINK_STATUS)||console.log("Could not initialise shaders");a.useProgram(d);d.vertexPositionAttribute=a.getAttribLocation(d,"aVertexPosition");a.enableVertexAttribArray(d.vertexPositionAttribute);d.vertexNormalAttribute=
a.getAttribLocation(d,"aVertexNormal");a.enableVertexAttribArray(d.vertexNormalAttribute);d.vertexColorAttribute=a.getAttribLocation(d,"aVertexColor");d.textureCoordAttribute=a.getAttribLocation(d,"aTextureCoord");d.pMatrixUniform=a.getUniformLocation(d,"uPMatrix");d.mvMatrixUniform=a.getUniformLocation(d,"uMVMatrix");d.nMatrixUniform=a.getUniformLocation(d,"uNMatrix");d.ambientColorUniform=a.getUniformLocation(d,"uAmbientColor");d.pointLightingLocationUniform=a.getUniformLocation(d,"uPointLightingLocation");
d.pointLightingColorUniform=a.getUniformLocation(d,"uPointLightingColor");d.activePlane=a.getUniformLocation(d,"uActivePlane");d.activePlaneEdge=a.getUniformLocation(d,"uActivePlaneEdge");d.colorPicking=a.getUniformLocation(d,"uColorPicking");d.trianglePicking=a.getUniformLocation(d,"uTrianglePicking");d.crosshairs=a.getUniformLocation(d,"uCrosshairs");d.hasColors=a.getUniformLocation(d,"uColors");d.hasSolidColor=a.getUniformLocation(d,"uColorSolid");d.solidColor=a.getUniformLocation(d,"uSolidColor");
d.orientationText=a.getUniformLocation(d,"uOrientationText");d.samplerUniform=a.getUniformLocation(d,"uSampler");d.ruler=a.getUniformLocation(d,"uRuler");d.alphaVal=a.getUniformLocation(d,"uAlpha");return d};
papaya.viewer.ScreenSurface.prototype.initialize=function(){var a;this.initialized=!0;this.canvas=document.createElement("canvas");this.canvas.width=this.screenDim;this.canvas.height=this.screenDim;this.context=this.canvas.getContext("webgl")||this.canvas.getContext("experimental-webgl");this.context.viewportWidth=this.canvas.width;this.context.viewportHeight=this.canvas.height;this.zoom=this.volume.header.imageDimensions.yDim*this.volume.header.voxelDimensions.ySize*1.5;this.initPerspective();this.shaderProgram=
papaya.viewer.ScreenSurface.initShaders(this.context);for(a=0;a<this.surfaces.length;a+=1)this.initBuffers(this.context,this.surfaces[a]);this.calculateScaleFactor();this.initActivePlaneBuffers(this.context);this.initRulerBuffers(this.context);mat4.multiply(this.centerMat,papaya.viewer.ScreenSurface.DEFAULT_ORIENTATION,this.tempMat);mat4.multiply(this.tempMat,this.centerMatInv,this.mouseRotCurrent);papaya.viewer.ScreenSurface.EXT_INT=this.context.getExtension("OES_element_index_uint");papaya.viewer.ScreenSurface.EXT_INT||
console.log("This browser does not support OES_element_index_uint extension!");this.updateBackgroundColor()};papaya.viewer.ScreenSurface.prototype.calculateScaleFactor=function(){var a=this.ySize*this.yDim,b=this.zSize*this.zDim,e=this.xSize*this.xDim;a>e&&(e=a);b>e&&(e=b);this.scaleFactor=e/256};
papaya.viewer.ScreenSurface.prototype.resize=function(a){this.initialized||this.initialize();this.screenDim=a;this.canvas.width=this.screenDim;this.canvas.height=this.screenDim;this.context.viewportWidth=this.canvas.width;this.context.viewportHeight=this.canvas.height};
papaya.viewer.ScreenSurface.prototype.applyMatrixUniforms=function(a){a.uniformMatrix4fv(this.shaderProgram.pMatrixUniform,!1,this.pMatrix);a.uniformMatrix4fv(this.shaderProgram.mvMatrixUniform,!1,this.mvMatrix);var b=mat3.create();mat4.toInverseMat3(this.mvMatrix,b);mat3.transpose(b);a.uniformMatrix3fv(this.shaderProgram.nMatrixUniform,!1,b)};papaya.viewer.ScreenSurface.prototype.draw=function(){0<this.surfaces.length&&(this.initialized||this.initialize(),this.drawScene(this.context))};
papaya.viewer.ScreenSurface.prototype.initBuffers=function(a,b){b.pointsBuffer=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,b.pointsBuffer);a.bufferData(a.ARRAY_BUFFER,b.pointData,a.STATIC_DRAW);b.pointsBuffer.itemSize=3;b.pointsBuffer.numItems=b.numPoints;b.normalsBuffer=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,b.normalsBuffer);a.bufferData(a.ARRAY_BUFFER,b.normalsData,a.STATIC_DRAW);b.normalsBuffer.itemSize=3;b.normalsBuffer.numItems=b.numPoints;b.colorsData&&(b.colorsBuffer=a.createBuffer(),
a.bindBuffer(a.ARRAY_BUFFER,b.colorsBuffer),a.bufferData(a.ARRAY_BUFFER,b.colorsData,a.STATIC_DRAW),b.colorsBuffer.itemSize=4,b.colorsBuffer.numItems=b.numPoints);b.trianglesBuffer=a.createBuffer();a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,b.trianglesBuffer);a.bufferData(a.ELEMENT_ARRAY_BUFFER,b.triangleData,a.STATIC_DRAW);b.trianglesBuffer.itemSize=1;b.trianglesBuffer.numItems=3*b.numTriangles};
papaya.viewer.ScreenSurface.prototype.initOrientationBuffers=function(a){this.makeOrientedTextSquare();this.orientationBuffer=a.createBuffer();this.orientationBuffer.itemSize=3;this.orientationBuffer.numItems=4;this.orientationTextureCoordBuffer=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,this.orientationTextureCoordBuffer);this.orientationTextureCoords=[0,1,0,0,1,1,1,0];a.bufferData(a.ARRAY_BUFFER,new Float32Array(this.orientationTextureCoords),a.STATIC_DRAW);this.orientationTextureCoordBuffer.itemSize=
2;this.orientationTextureCoordBuffer.numItems=4};
papaya.viewer.ScreenSurface.prototype.initActivePlaneBuffers=function(a){this.updateActivePlanes();this.activePlaneAxialBuffer=a.createBuffer();this.activePlaneAxialBuffer.itemSize=3;this.activePlaneAxialBuffer.numItems=4;this.activePlaneCoronalBuffer=a.createBuffer();this.activePlaneCoronalBuffer.itemSize=3;this.activePlaneCoronalBuffer.numItems=4;this.activePlaneSagittalBuffer=a.createBuffer();this.activePlaneSagittalBuffer.itemSize=3;this.activePlaneSagittalBuffer.numItems=4;this.activePlaneAxialEdgesBuffer=
a.createBuffer();this.activePlaneAxialEdgesBuffer.itemSize=3;this.activePlaneAxialEdgesBuffer.numItems=8;this.activePlaneCoronalEdgesBuffer=a.createBuffer();this.activePlaneCoronalEdgesBuffer.itemSize=3;this.activePlaneCoronalEdgesBuffer.numItems=8;this.activePlaneSagittalEdgesBuffer=a.createBuffer();this.activePlaneSagittalEdgesBuffer.itemSize=3;this.activePlaneSagittalEdgesBuffer.numItems=8;this.crosshairLineXBuffer=a.createBuffer();this.crosshairLineXBuffer.itemSize=3;this.crosshairLineXBuffer.numItems=
2;this.crosshairLineYBuffer=a.createBuffer();this.crosshairLineYBuffer.itemSize=3;this.crosshairLineYBuffer.numItems=2;this.crosshairLineZBuffer=a.createBuffer();this.crosshairLineZBuffer.itemSize=3;this.crosshairLineZBuffer.numItems=2};
papaya.viewer.ScreenSurface.prototype.initRulerBuffers=function(a){this.rulerPointData=this.makeSphere(papaya.viewer.ScreenSurface.RULER_NUM_LINES,papaya.viewer.ScreenSurface.RULER_NUM_LINES,papaya.viewer.ScreenSurface.RULER_RADIUS*this.scaleFactor);this.sphereVertexPositionBuffer=a.createBuffer();this.sphereVertexPositionBuffer.itemSize=3;this.sphereVertexPositionBuffer.numItems=this.rulerPointData.vertices.length/3;this.sphereNormalsPositionBuffer=a.createBuffer();this.sphereNormalsPositionBuffer.itemSize=
3;this.sphereNormalsPositionBuffer.numItems=this.rulerPointData.normals.length/3;this.sphereVertexIndexBuffer=a.createBuffer();this.sphereVertexIndexBuffer.itemSize=1;this.sphereVertexIndexBuffer.numItems=this.rulerPointData.indices.length;this.rulerLineBuffer=a.createBuffer();this.rulerLineBuffer.itemSize=3;this.rulerLineBuffer.numItems=2};
papaya.viewer.ScreenSurface.prototype.initPerspective=function(){mat4.perspective(45,1,10,1E5,this.pMatrix1);this.eye=new vec3.create;this.eye[0]=0;this.eye[1]=0;this.center=new vec3.create;this.centerWorld=new papaya.core.Coordinate;this.viewer.getWorldCoordinateAtIndex(parseInt(this.xDim/2,10),parseInt(this.yDim/2,10),parseInt(this.zDim/2,10),this.centerWorld);this.center[0]=this.centerWorld.x;this.center[1]=this.centerWorld.y;this.center[2]=this.centerWorld.z;mat4.identity(this.centerMat);mat4.translate(this.centerMat,
[this.center[0],this.center[1],this.center[2]]);mat4.identity(this.centerMatInv);mat4.translate(this.centerMatInv,[-this.center[0],-this.center[1],-this.center[2]]);this.up=new vec3.create;this.up[0]=0;this.up[1]=1;this.up[2]=0};papaya.viewer.ScreenSurface.prototype.updatePerspective=function(){var a;this.eye[2]=this.zoom;a=mat4.lookAt(this.eye,this.center,this.up);mat4.multiply(this.pMatrix1,a,this.pMatrix)};
papaya.viewer.ScreenSurface.prototype.unpackFloatFromVec4i=function(a){var b=[1/16777216,1/65536,1/256,1];return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]};papaya.viewer.ScreenSurface.prototype.hasTranslucentSurfaces=function(){var a;for(a=0;a<this.surfaces.length;a+=1)if(1>this.surfaces[a].alpha)return!0;return!1};
papaya.viewer.ScreenSurface.prototype.drawScene=function(a){var b,e,d;e=this.hasTranslucentSurfaces();a.clearColor(this.backgroundColor[0],this.backgroundColor[1],this.backgroundColor[2],1);a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT);a.viewport(0,0,a.viewportWidth,a.viewportHeight);mat4.identity(this.mvMatrix);mat4.multiply(this.mouseRotDrag,this.mouseRotCurrent,this.mouseRotTemp);mat4.multiply(this.mouseTransDrag,this.mouseTransCurrent,this.mouseTransTemp);mat4.multiply(this.mouseTransTemp,this.mouseRotTemp,
this.tempMat);mat4.set(this.tempMat,this.mvMatrix);this.updatePerspective();this.applyMatrixUniforms(a);a.uniform3f(this.shaderProgram.ambientColorUniform,.2,.2,.2);a.uniform3f(this.shaderProgram.pointLightingLocationUniform,0,0,300*this.scaleFactor);a.uniform3f(this.shaderProgram.pointLightingColorUniform,.8,.8,.8);a.uniform1i(this.shaderProgram.orientationText,0);a.uniform1i(this.shaderProgram.activePlane,0);a.uniform1i(this.shaderProgram.activePlaneEdge,0);a.uniform1i(this.shaderProgram.crosshairs,
0);a.uniform1i(this.shaderProgram.hasColors,0);a.uniform1i(this.shaderProgram.colorPicking,0);a.uniform1i(this.shaderProgram.trianglePicking,0);if(this.needsPick){if(a.uniform1i(this.shaderProgram.trianglePicking,1),null===this.pickingBuffer||this.pickingBuffer.length!==a.viewportWidth*a.viewportHeight*4)this.pickingBuffer=new Uint8Array(a.viewportWidth*a.viewportHeight*4)}else this.needsPickColor&&(a.uniform1i(this.shaderProgram.colorPicking,1),null===this.pickingBuffer||this.pickingBuffer.length!==
a.viewportWidth*a.viewportHeight*4)&&(this.pickingBuffer=new Uint8Array(a.viewportWidth*a.viewportHeight*4));a.enable(a.DEPTH_TEST);for(b=0;b<this.surfaces.length;b+=1)this.renderSurface(a,b,1>this.surfaces[b].alpha,!0,!1);a.uniform1i(this.shaderProgram.hasSolidColor,0);a.uniform1i(this.shaderProgram.hasColors,0);if(this.needsPick)this.needsPick=!1,this.pickedCoordinate=this.findPickedCoordinate(a,this.pickLocX,this.pickLocY),a.uniform1i(this.shaderProgram.trianglePicking,0);else if(this.needsPickColor)this.needsPickColor=
!1,this.pickedColor=this.findPickedColor(a),a.uniform1i(this.shaderProgram.colorPicking,0);else{this.showSurfacePlanes&&(this.needsUpdateActivePlanes&&(this.needsUpdateActivePlanes=!1,this.bindActivePlanes(a)),a.depthMask(!1),a.uniform1i(this.shaderProgram.activePlane,1),a.enable(a.BLEND),a.blendFunc(a.SRC_ALPHA,a.ONE_MINUS_SRC_ALPHA),a.bindBuffer(a.ARRAY_BUFFER,this.activePlaneAxialBuffer),a.vertexAttribPointer(this.shaderProgram.vertexPositionAttribute,this.activePlaneAxialBuffer.itemSize,a.FLOAT,
!1,0,0),a.drawArrays(a.TRIANGLE_STRIP,0,4),a.bindBuffer(a.ARRAY_BUFFER,this.activePlaneCoronalBuffer),a.vertexAttribPointer(this.shaderProgram.vertexPositionAttribute,this.activePlaneCoronalBuffer.itemSize,a.FLOAT,!1,0,0),a.drawArrays(a.TRIANGLE_STRIP,0,4),a.bindBuffer(a.ARRAY_BUFFER,this.activePlaneSagittalBuffer),a.vertexAttribPointer(this.shaderProgram.vertexPositionAttribute,this.activePlaneSagittalBuffer.itemSize,a.FLOAT,!1,0,0),a.drawArrays(a.TRIANGLE_STRIP,0,4),a.depthMask(!0),a.disable(a.BLEND),
a.uniform1i(this.shaderProgram.activePlane,0),a.uniform1i(this.shaderProgram.activePlaneEdge,1),a.lineWidth(this.isMainView()?3:2),a.bindBuffer(a.ARRAY_BUFFER,this.activePlaneAxialEdgesBuffer),a.vertexAttribPointer(this.shaderProgram.vertexPositionAttribute,this.activePlaneAxialEdgesBuffer.itemSize,a.FLOAT,!1,0,0),a.drawArrays(a.LINES,0,8),a.bindBuffer(a.ARRAY_BUFFER,this.activePlaneCoronalEdgesBuffer),a.vertexAttribPointer(this.shaderProgram.vertexPositionAttribute,this.activePlaneCoronalEdgesBuffer.itemSize,
a.FLOAT,!1,0,0),a.drawArrays(a.LINES,0,8),a.bindBuffer(a.ARRAY_BUFFER,this.activePlaneSagittalEdgesBuffer),a.vertexAttribPointer(this.shaderProgram.vertexPositionAttribute,this.activePlaneSagittalEdgesBuffer.itemSize,a.FLOAT,!1,0,0),a.drawArrays(a.LINES,0,8),a.uniform1i(this.shaderProgram.activePlaneEdge,0));this.viewer.isShowingCrosshairs()&&(this.viewer.mainImage!==this||this.viewer.toggleMainCrosshairs)&&(this.needsUpdateActivePlanes&&(this.needsUpdateActivePlanes=!1,this.bindActivePlanes(a)),
a.uniform1i(this.shaderProgram.crosshairs,1),a.lineWidth(this.isMainView()?3:2),a.bindBuffer(a.ARRAY_BUFFER,this.crosshairLineXBuffer),a.vertexAttribPointer(this.shaderProgram.vertexPositionAttribute,this.crosshairLineXBuffer.itemSize,a.FLOAT,!1,0,0),a.drawArrays(a.LINES,0,2),a.bindBuffer(a.ARRAY_BUFFER,this.crosshairLineYBuffer),a.vertexAttribPointer(this.shaderProgram.vertexPositionAttribute,this.crosshairLineYBuffer.itemSize,a.FLOAT,!1,0,0),a.drawArrays(a.LINES,0,2),a.bindBuffer(a.ARRAY_BUFFER,
this.crosshairLineZBuffer),a.vertexAttribPointer(this.shaderProgram.vertexPositionAttribute,this.crosshairLineZBuffer.itemSize,a.FLOAT,!1,0,0),a.drawArrays(a.LINES,0,2),a.uniform1i(this.shaderProgram.crosshairs,0));a.enable(a.DEPTH_TEST);for(b=0;b<this.surfaces.length;b+=1)e&&this.renderSurface(a,b,1>this.surfaces[b].alpha,!1,!0);this.viewer.mainImage===this.viewer.surfaceView&&"Yes"===this.viewer.container.preferences.showOrientation&&(b=this.currentCoord.x+(this.xDim/2-this.volume.header.origin.x),
e=this.yDim-this.currentCoord.y-(this.yDim/2-this.volume.header.origin.y),d=this.zDim-this.currentCoord.z-(this.zDim/2-this.volume.header.origin.z),this.drawOrientedText(a,"S",papaya.viewer.ScreenSurface.TEXT_SIZE,[b*this.xSize-this.xHalf,e*this.ySize-this.yHalf,this.zHalf+papaya.viewer.ScreenSurface.ORIENTATION_SIZE*this.scaleFactor-(this.zDim/2-this.volume.header.origin.z)*this.zSize]),this.drawOrientedText(a,"I",papaya.viewer.ScreenSurface.TEXT_SIZE,[b*this.xSize-this.xHalf,e*this.ySize-this.yHalf,
-this.zHalf-papaya.viewer.ScreenSurface.ORIENTATION_SIZE*this.scaleFactor-(this.zDim/2-this.volume.header.origin.z)*this.zSize]),this.drawOrientedText(a,"P",papaya.viewer.ScreenSurface.TEXT_SIZE,[b*this.xSize-this.xHalf,-this.yHalf-papaya.viewer.ScreenSurface.ORIENTATION_SIZE*this.scaleFactor-(this.yDim/2-this.volume.header.origin.y)*this.ySize,d*this.zSize-this.zHalf]),this.drawOrientedText(a,"A",papaya.viewer.ScreenSurface.TEXT_SIZE,[b*this.xSize-this.xHalf,this.yHalf+papaya.viewer.ScreenSurface.ORIENTATION_SIZE*
this.scaleFactor-(this.yDim/2-this.volume.header.origin.y)*this.ySize,d*this.zSize-this.zHalf]),this.drawOrientedText(a,"L",papaya.viewer.ScreenSurface.TEXT_SIZE,[-this.xHalf-papaya.viewer.ScreenSurface.ORIENTATION_SIZE*this.scaleFactor+(this.xDim/2-this.volume.header.origin.x)*this.xSize,e*this.ySize-this.yHalf,d*this.zSize-this.zHalf]),this.drawOrientedText(a,"R",papaya.viewer.ScreenSurface.TEXT_SIZE,[this.xHalf+papaya.viewer.ScreenSurface.ORIENTATION_SIZE*this.scaleFactor+(this.xDim/2-this.volume.header.origin.x)*
this.xSize,e*this.ySize-this.yHalf,d*this.zSize-this.zHalf]));"Yes"===this.viewer.container.preferences.showRuler?this.isMainView()&&this.drawRuler(a):this.rulerPoints=null}a.disable(a.DEPTH_TEST)};
papaya.viewer.ScreenSurface.prototype.renderSurface=function(a,b,e,d,f){a.uniform1f(this.shaderProgram.alphaVal,this.surfaces[b].alpha);e?d?(a.enable(a.BLEND),a.enable(a.CULL_FACE),a.blendFunc(a.SRC_ALPHA,a.ONE_MINUS_SRC_ALPHA),a.frontFace(a.CCW),a.cullFace(a.FRONT),a.uniform3f(this.shaderProgram.ambientColorUniform,0,0,0),a.uniform3f(this.shaderProgram.pointLightingLocationUniform,0,0,-300*this.scaleFactor)):f&&(a.enable(a.BLEND),a.enable(a.CULL_FACE),a.blendFunc(a.SRC_ALPHA,a.ONE_MINUS_SRC_ALPHA),
a.frontFace(a.CCW),a.cullFace(a.BACK),a.uniform3f(this.shaderProgram.ambientColorUniform,.2,.2,.2),a.uniform3f(this.shaderProgram.pointLightingLocationUniform,0,0,300*this.scaleFactor)):(a.uniform3f(this.shaderProgram.ambientColorUniform,.2,.2,.2),a.uniform3f(this.shaderProgram.pointLightingLocationUniform,0,0,300*this.scaleFactor));a.uniform1i(this.shaderProgram.hasSolidColor,0);a.uniform1i(this.shaderProgram.hasColors,0);this.surfaces[b].solidColor&&(a.uniform1i(this.shaderProgram.hasSolidColor,
1),a.uniform4f(this.shaderProgram.solidColor,this.surfaces[b].solidColor[0],this.surfaces[b].solidColor[1],this.surfaces[b].solidColor[2],1));a.bindBuffer(a.ARRAY_BUFFER,this.surfaces[b].pointsBuffer);a.vertexAttribPointer(this.shaderProgram.vertexPositionAttribute,this.surfaces[b].pointsBuffer.itemSize,a.FLOAT,!1,0,0);a.bindBuffer(a.ARRAY_BUFFER,this.surfaces[b].normalsBuffer);a.vertexAttribPointer(this.shaderProgram.vertexNormalAttribute,this.surfaces[b].normalsBuffer.itemSize,a.FLOAT,!1,0,0);this.surfaces[b].colorsData?
(a.uniform1i(this.shaderProgram.hasColors,1),a.bindBuffer(a.ARRAY_BUFFER,this.surfaces[b].colorsBuffer),a.enableVertexAttribArray(this.shaderProgram.vertexColorAttribute),a.vertexAttribPointer(this.shaderProgram.vertexColorAttribute,this.surfaces[b].colorsBuffer.itemSize,a.FLOAT,!1,0,0)):a.disableVertexAttribArray(this.shaderProgram.vertexColorAttribute);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.surfaces[b].trianglesBuffer);a.drawElements(a.TRIANGLES,this.surfaces[b].trianglesBuffer.numItems,a.UNSIGNED_INT,
0);e&&(d||f)&&(a.disable(a.BLEND),a.disable(a.CULL_FACE))};
papaya.viewer.ScreenSurface.prototype.drawRuler=function(a){var b=!0;null===this.rulerPoints&&(this.rulerPoints=new Float32Array(6),b=this.findInitialRulerPoints(a),this.drawScene(a));b&&(a.uniform1i(this.shaderProgram.ruler,1),this.drawRulerPoint(a,this.rulerPoints[0],this.rulerPoints[1],this.rulerPoints[2]),this.drawRulerPoint(a,this.rulerPoints[3],this.rulerPoints[4],this.rulerPoints[5]),a.bindBuffer(a.ARRAY_BUFFER,this.rulerLineBuffer),a.bufferData(a.ARRAY_BUFFER,this.rulerPoints,a.DYNAMIC_DRAW),
a.bindBuffer(a.ARRAY_BUFFER,this.rulerLineBuffer),a.vertexAttribPointer(this.shaderProgram.vertexPositionAttribute,this.rulerLineBuffer.itemSize,a.FLOAT,!1,0,0),a.drawArrays(a.LINES,0,2),a.uniform1i(this.shaderProgram.ruler,0))};
papaya.viewer.ScreenSurface.prototype.drawRulerPoint=function(a,b,e,d){this.sphereVertexPositionBuffer.numItems=this.rulerPointData.vertices.length/3;a.bindBuffer(a.ARRAY_BUFFER,this.sphereVertexPositionBuffer);a.bufferData(a.ARRAY_BUFFER,new Float32Array(this.rulerPointData.vertices),a.STATIC_DRAW);this.sphereNormalsPositionBuffer.numItems=this.rulerPointData.normals.length/3;a.bindBuffer(a.ARRAY_BUFFER,this.sphereNormalsPositionBuffer);a.bufferData(a.ARRAY_BUFFER,new Float32Array(this.rulerPointData.normals),
a.STATIC_DRAW);this.sphereVertexIndexBuffer.numItems=this.rulerPointData.indices.length;a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.sphereVertexIndexBuffer);a.bufferData(a.ELEMENT_ARRAY_BUFFER,new Uint16Array(this.rulerPointData.indices),a.STATIC_DRAW);a.uniform1i(this.shaderProgram.hasSolidColor,1);a.uniform4f(this.shaderProgram.solidColor,papaya.viewer.ScreenSurface.RULER_COLOR[0],papaya.viewer.ScreenSurface.RULER_COLOR[1],papaya.viewer.ScreenSurface.RULER_COLOR[2],1);a.bindBuffer(a.ARRAY_BUFFER,this.sphereVertexPositionBuffer);
a.vertexAttribPointer(this.shaderProgram.vertexPositionAttribute,this.sphereVertexPositionBuffer.itemSize,a.FLOAT,!1,0,0);a.bindBuffer(a.ARRAY_BUFFER,this.sphereNormalsPositionBuffer);a.vertexAttribPointer(this.shaderProgram.vertexNormalAttribute,this.sphereNormalsPositionBuffer.itemSize,a.FLOAT,!1,0,0);mat4.set(this.mvMatrix,this.tempMat);mat4.translate(this.mvMatrix,[b,e,d]);this.applyMatrixUniforms(a);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.sphereVertexIndexBuffer);a.drawElements(a.TRIANGLES,
this.sphereVertexIndexBuffer.numItems,a.UNSIGNED_SHORT,0);mat4.set(this.tempMat,this.mvMatrix);this.applyMatrixUniforms(a)};
papaya.viewer.ScreenSurface.prototype.drawOrientedText=function(a,b,e,d){null===this.orientationCanvas&&this.initOrientationBuffers(this.context);this.updateOrientedTextSquare(e,b);null===this.orientationTexture&&(this.orientationTexture=a.createTexture());this.bindOrientation(a);a.enableVertexAttribArray(this.shaderProgram.textureCoordAttribute);a.uniform1i(this.shaderProgram.orientationText,1);a.enable(a.BLEND);a.blendFunc(a.SRC_ALPHA,a.ONE_MINUS_SRC_ALPHA);this.orientationContext.imageSmoothingEnabled=
!0;this.orientationContext.mozImageSmoothingEnabled=!0;this.orientationContext.msImageSmoothingEnabled=!0;this.orientationContext.textAlign="center";this.orientationContext.textBaseline="middle";this.orientationContext.font=e+"px sans-serif";this.orientationContext.clearRect(0,0,this.orientationCanvas.width,this.orientationCanvas.height);this.orientationContext.fillStyle="#FFFFFF";this.orientationContext.fillText(b,this.orientationCanvas.width/2,this.orientationCanvas.height/2);mat4.set(this.mvMatrix,
this.tempMat);mat4.multiplyVec3(this.mvMatrix,d);mat4.identity(this.mvMatrix);a.bindBuffer(a.ARRAY_BUFFER,this.orientationBuffer);a.vertexAttribPointer(this.shaderProgram.vertexPositionAttribute,this.orientationBuffer.itemSize,a.FLOAT,!1,0,0);a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,1);a.bindTexture(a.TEXTURE_2D,this.orientationTexture);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,
a.UNSIGNED_BYTE,this.orientationCanvas);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR_MIPMAP_NEAREST);a.generateMipmap(a.TEXTURE_2D);a.bindTexture(a.TEXTURE_2D,null);a.bindBuffer(a.ARRAY_BUFFER,this.orientationTextureCoordBuffer);a.vertexAttribPointer(this.shaderProgram.textureCoordAttribute,this.orientationTextureCoordBuffer.itemSize,a.FLOAT,!1,0,0);a.activeTexture(a.TEXTURE0);a.bindTexture(a.TEXTURE_2D,this.orientationTexture);
a.uniform1i(this.shaderProgram.samplerUniform,0);mat4.translate(this.mvMatrix,d);this.applyMatrixUniforms(a);a.drawArrays(a.TRIANGLE_STRIP,0,4);mat4.set(this.tempMat,this.mvMatrix);this.applyMatrixUniforms(a);a.disable(a.BLEND);a.uniform1i(this.shaderProgram.orientationText,0);a.disableVertexAttribArray(this.shaderProgram.textureCoordAttribute)};
papaya.viewer.ScreenSurface.prototype.bindOrientation=function(a){a.bindBuffer(a.ARRAY_BUFFER,this.orientationBuffer);a.bufferData(a.ARRAY_BUFFER,this.orientationVerts,a.DYNAMIC_DRAW)};
papaya.viewer.ScreenSurface.prototype.bindActivePlanes=function(a){a.bindBuffer(a.ARRAY_BUFFER,this.activePlaneAxialBuffer);a.bufferData(a.ARRAY_BUFFER,this.activePlaneVertsAxial,a.DYNAMIC_DRAW);a.bindBuffer(a.ARRAY_BUFFER,this.activePlaneCoronalBuffer);a.bufferData(a.ARRAY_BUFFER,this.activePlaneVertsCoronal,a.DYNAMIC_DRAW);a.bindBuffer(a.ARRAY_BUFFER,this.activePlaneSagittalBuffer);a.bufferData(a.ARRAY_BUFFER,this.activePlaneVertsSagittal,a.DYNAMIC_DRAW);a.bindBuffer(a.ARRAY_BUFFER,this.activePlaneAxialEdgesBuffer);
a.bufferData(a.ARRAY_BUFFER,this.activePlaneVertsAxialEdges,a.DYNAMIC_DRAW);a.bindBuffer(a.ARRAY_BUFFER,this.activePlaneCoronalEdgesBuffer);a.bufferData(a.ARRAY_BUFFER,this.activePlaneVertsCoronalEdges,a.DYNAMIC_DRAW);a.bindBuffer(a.ARRAY_BUFFER,this.activePlaneSagittalEdgesBuffer);a.bufferData(a.ARRAY_BUFFER,this.activePlaneVertsSagittalEdges,a.DYNAMIC_DRAW);a.bindBuffer(a.ARRAY_BUFFER,this.crosshairLineXBuffer);a.bufferData(a.ARRAY_BUFFER,this.crosshairLineVertsX,a.DYNAMIC_DRAW);a.bindBuffer(a.ARRAY_BUFFER,
this.crosshairLineYBuffer);a.bufferData(a.ARRAY_BUFFER,this.crosshairLineVertsY,a.DYNAMIC_DRAW);a.bindBuffer(a.ARRAY_BUFFER,this.crosshairLineZBuffer);a.bufferData(a.ARRAY_BUFFER,this.crosshairLineVertsZ,a.DYNAMIC_DRAW)};papaya.viewer.ScreenSurface.prototype.clearDTILinesImage=function(){};
papaya.viewer.ScreenSurface.prototype.findProximalRulerHandle=function(a,b){this.pick(a,b,!0);this.grabbedRulerPoint=-1;this.pickedCoordinate&&this.rulerPoints&&(papaya.utilities.MathUtils.lineDistance3d(this.rulerPoints[0],this.rulerPoints[1],this.rulerPoints[2],this.pickedCoordinate.coordinate[0],this.pickedCoordinate.coordinate[1],this.pickedCoordinate.coordinate[2])<papaya.viewer.ScreenSlice.GRAB_RADIUS*this.scaleFactor?this.grabbedRulerPoint=0:papaya.utilities.MathUtils.lineDistance3d(this.rulerPoints[3],
this.rulerPoints[4],this.rulerPoints[5],this.pickedCoordinate.coordinate[0],this.pickedCoordinate.coordinate[1],this.pickedCoordinate.coordinate[2])<papaya.viewer.ScreenSlice.GRAB_RADIUS*this.scaleFactor&&(this.grabbedRulerPoint=1));return-1!==this.grabbedRulerPoint};papaya.viewer.ScreenSurface.prototype.setStartDynamic=function(a,b){this.dynamicStartX=a;this.dynamicStartY=b};
papaya.viewer.ScreenSurface.prototype.updateDynamic=function(a,b,e){b=(b-this.dynamicStartY)*papaya.viewer.ScreenSurface.MOUSE_SENSITIVITY*e;a=(a-this.dynamicStartX)*papaya.viewer.ScreenSurface.MOUSE_SENSITIVITY*e*Math.PI/180;mat4.identity(this.mouseRotDragX);mat4.rotateY(this.mouseRotDragX,a);a=b*Math.PI/180;mat4.identity(this.mouseRotDragY);mat4.rotateX(this.mouseRotDragY,a);mat4.multiply(this.centerMat,this.mouseRotDragY,this.tempMat);mat4.multiply(this.tempMat,this.mouseRotDragX,this.tempMat2);
mat4.multiply(this.tempMat2,this.centerMatInv,this.mouseRotDrag)};papaya.viewer.ScreenSurface.prototype.updateTranslateDynamic=function(a,b,e){a=(a-this.dynamicStartX)*papaya.viewer.ScreenSurface.MOUSE_SENSITIVITY*e;b=(b-this.dynamicStartY)*papaya.viewer.ScreenSurface.MOUSE_SENSITIVITY*e*-1;mat4.identity(this.mouseTransDrag);mat4.translate(this.mouseTransDrag,[a,b,0])};
papaya.viewer.ScreenSurface.prototype.updateCurrent=function(){var a=mat4.multiply(this.mouseRotDrag,this.mouseRotCurrent);mat4.set(a,this.mouseRotCurrent);a=mat4.multiply(this.mouseTransDrag,this.mouseTransCurrent);mat4.set(a,this.mouseTransCurrent);mat4.identity(this.mouseTransDrag);mat4.identity(this.mouseRotDragX);mat4.identity(this.mouseRotDragY);mat4.identity(this.mouseRotDrag)};papaya.viewer.ScreenSurface.prototype.clearTransform=function(a){mat4.identity(a);return a};
papaya.viewer.ScreenSurface.prototype.makeOrientedTextSquare=function(){var a=papaya.viewer.ScreenSurface.ORIENTATION_SIZE*this.scaleFactor;this.orientationVerts[0]=-a;this.orientationVerts[1]=a;this.orientationVerts[2]=0;this.orientationVerts[3]=-a;this.orientationVerts[4]=-a;this.orientationVerts[5]=0;this.orientationVerts[6]=a;this.orientationVerts[7]=a;this.orientationVerts[8]=0;this.orientationVerts[9]=a;this.orientationVerts[10]=-a;this.orientationVerts[11]=0;this.orientationCanvas=document.createElement("canvas");
this.orientationContext=this.orientationCanvas.getContext("2d");this.orientationContext.imageSmoothingEnabled=!0;this.orientationContext.mozImageSmoothingEnabled=!0;this.orientationContext.msImageSmoothingEnabled=!0;this.orientationContext.fillStyle="#FFFFFF";this.orientationContext.textAlign="center";this.orientationContext.textBaseline="middle"};
papaya.viewer.ScreenSurface.prototype.updateOrientedTextSquare=function(a,b){var e;this.orientationContext.imageSmoothingEnabled=!0;this.orientationContext.mozImageSmoothingEnabled=!0;this.orientationContext.msImageSmoothingEnabled=!0;this.orientationContext.fillStyle="#FFFFFF";this.orientationContext.textAlign="center";this.orientationContext.textBaseline="middle";this.orientationContext.font=a+"px sans-serif";e=this.orientationContext.measureText(b).width;e=Math.max(e,a);this.orientationCanvas.width=
papaya.utilities.MathUtils.getPowerOfTwo(e);this.orientationCanvas.height=papaya.utilities.MathUtils.getPowerOfTwo(e)};
papaya.viewer.ScreenSurface.prototype.updateActivePlanes=function(){var a,b,e;if(this.showSurfacePlanes||this.viewer.isShowingCrosshairs())a=this.currentCoord.x+(this.xDim/2-this.volume.header.origin.x),b=this.yDim-this.currentCoord.y-(this.yDim/2-this.volume.header.origin.y),e=this.zDim-this.currentCoord.z-(this.zDim/2-this.volume.header.origin.z),this.activePlaneVertsAxial[0]=-this.xHalf+this.centerWorld.x,this.activePlaneVertsAxial[1]=this.yHalf+this.centerWorld.y,this.activePlaneVertsAxial[2]=
e*this.zSize-this.zHalf,this.activePlaneVertsAxial[3]=-this.xHalf+this.centerWorld.x,this.activePlaneVertsAxial[4]=-this.yHalf+this.centerWorld.y,this.activePlaneVertsAxial[5]=e*this.zSize-this.zHalf,this.activePlaneVertsAxial[6]=this.xHalf+this.centerWorld.x,this.activePlaneVertsAxial[7]=this.yHalf+this.centerWorld.y,this.activePlaneVertsAxial[8]=e*this.zSize-this.zHalf,this.activePlaneVertsAxial[9]=this.xHalf+this.centerWorld.x,this.activePlaneVertsAxial[10]=-this.yHalf+this.centerWorld.y,this.activePlaneVertsAxial[11]=
e*this.zSize-this.zHalf,this.activePlaneVertsAxialEdges[0]=-this.xHalf+this.centerWorld.x,this.activePlaneVertsAxialEdges[1]=this.yHalf+this.centerWorld.y,this.activePlaneVertsAxialEdges[2]=e*this.zSize-this.zHalf,this.activePlaneVertsAxialEdges[3]=-this.xHalf+this.centerWorld.x,this.activePlaneVertsAxialEdges[4]=-this.yHalf+this.centerWorld.y,this.activePlaneVertsAxialEdges[5]=e*this.zSize-this.zHalf,this.activePlaneVertsAxialEdges[6]=-this.xHalf+this.centerWorld.x,this.activePlaneVertsAxialEdges[7]=
-this.yHalf+this.centerWorld.y,this.activePlaneVertsAxialEdges[8]=e*this.zSize-this.zHalf,this.activePlaneVertsAxialEdges[9]=this.xHalf+this.centerWorld.x,this.activePlaneVertsAxialEdges[10]=-this.yHalf+this.centerWorld.y,this.activePlaneVertsAxialEdges[11]=e*this.zSize-this.zHalf,this.activePlaneVertsAxialEdges[12]=this.xHalf+this.centerWorld.x,this.activePlaneVertsAxialEdges[13]=-this.yHalf+this.centerWorld.y,this.activePlaneVertsAxialEdges[14]=e*this.zSize-this.zHalf,this.activePlaneVertsAxialEdges[15]=
this.xHalf+this.centerWorld.x,this.activePlaneVertsAxialEdges[16]=this.yHalf+this.centerWorld.y,this.activePlaneVertsAxialEdges[17]=e*this.zSize-this.zHalf,this.activePlaneVertsAxialEdges[18]=this.xHalf+this.centerWorld.x,this.activePlaneVertsAxialEdges[19]=this.yHalf+this.centerWorld.y,this.activePlaneVertsAxialEdges[20]=e*this.zSize-this.zHalf,this.activePlaneVertsAxialEdges[21]=-this.xHalf+this.centerWorld.x,this.activePlaneVertsAxialEdges[22]=this.yHalf+this.centerWorld.y,this.activePlaneVertsAxialEdges[23]=
e*this.zSize-this.zHalf,this.activePlaneVertsCoronal[0]=-this.xHalf+this.centerWorld.x,this.activePlaneVertsCoronal[1]=b*this.ySize-this.yHalf,this.activePlaneVertsCoronal[2]=this.zHalf+this.centerWorld.z,this.activePlaneVertsCoronal[3]=-this.xHalf+this.centerWorld.x,this.activePlaneVertsCoronal[4]=b*this.ySize-this.yHalf,this.activePlaneVertsCoronal[5]=-this.zHalf+this.centerWorld.z,this.activePlaneVertsCoronal[6]=this.xHalf+this.centerWorld.x,this.activePlaneVertsCoronal[7]=b*this.ySize-this.yHalf,
this.activePlaneVertsCoronal[8]=this.zHalf+this.centerWorld.z,this.activePlaneVertsCoronal[9]=this.xHalf+this.centerWorld.x,this.activePlaneVertsCoronal[10]=b*this.ySize-this.yHalf,this.activePlaneVertsCoronal[11]=-this.zHalf+this.centerWorld.z,this.activePlaneVertsCoronalEdges[0]=-this.xHalf+this.centerWorld.x,this.activePlaneVertsCoronalEdges[1]=b*this.ySize-this.yHalf,this.activePlaneVertsCoronalEdges[2]=this.zHalf+this.centerWorld.z,this.activePlaneVertsCoronalEdges[3]=-this.xHalf+this.centerWorld.x,
this.activePlaneVertsCoronalEdges[4]=b*this.ySize-this.yHalf,this.activePlaneVertsCoronalEdges[5]=-this.zHalf+this.centerWorld.z,this.activePlaneVertsCoronalEdges[6]=-this.xHalf+this.centerWorld.x,this.activePlaneVertsCoronalEdges[7]=b*this.ySize-this.yHalf,this.activePlaneVertsCoronalEdges[8]=-this.zHalf+this.centerWorld.z,this.activePlaneVertsCoronalEdges[9]=this.xHalf+this.centerWorld.x,this.activePlaneVertsCoronalEdges[10]=b*this.ySize-this.yHalf,this.activePlaneVertsCoronalEdges[11]=-this.zHalf+
this.centerWorld.z,this.activePlaneVertsCoronalEdges[12]=this.xHalf+this.centerWorld.x,this.activePlaneVertsCoronalEdges[13]=b*this.ySize-this.yHalf,this.activePlaneVertsCoronalEdges[14]=-this.zHalf+this.centerWorld.z,this.activePlaneVertsCoronalEdges[15]=this.xHalf+this.centerWorld.x,this.activePlaneVertsCoronalEdges[16]=b*this.ySize-this.yHalf,this.activePlaneVertsCoronalEdges[17]=this.zHalf+this.centerWorld.z,this.activePlaneVertsCoronalEdges[18]=this.xHalf+this.centerWorld.x,this.activePlaneVertsCoronalEdges[19]=
b*this.ySize-this.yHalf,this.activePlaneVertsCoronalEdges[20]=this.zHalf+this.centerWorld.z,this.activePlaneVertsCoronalEdges[21]=-this.xHalf+this.centerWorld.x,this.activePlaneVertsCoronalEdges[22]=b*this.ySize-this.yHalf,this.activePlaneVertsCoronalEdges[23]=this.zHalf+this.centerWorld.z,this.activePlaneVertsSagittal[0]=a*this.xSize-this.xHalf,this.activePlaneVertsSagittal[1]=-this.yHalf+this.centerWorld.y,this.activePlaneVertsSagittal[2]=this.zHalf+this.centerWorld.z,this.activePlaneVertsSagittal[3]=
a*this.xSize-this.xHalf,this.activePlaneVertsSagittal[4]=-this.yHalf+this.centerWorld.y,this.activePlaneVertsSagittal[5]=-this.zHalf+this.centerWorld.z,this.activePlaneVertsSagittal[6]=a*this.xSize-this.xHalf,this.activePlaneVertsSagittal[7]=this.yHalf+this.centerWorld.y,this.activePlaneVertsSagittal[8]=this.zHalf+this.centerWorld.z,this.activePlaneVertsSagittal[9]=a*this.xSize-this.xHalf,this.activePlaneVertsSagittal[10]=this.yHalf+this.centerWorld.y,this.activePlaneVertsSagittal[11]=-this.zHalf+
this.centerWorld.z,this.activePlaneVertsSagittalEdges[0]=a*this.xSize-this.xHalf,this.activePlaneVertsSagittalEdges[1]=-this.yHalf+this.centerWorld.y,this.activePlaneVertsSagittalEdges[2]=this.zHalf+this.centerWorld.z,this.activePlaneVertsSagittalEdges[3]=a*this.xSize-this.xHalf,this.activePlaneVertsSagittalEdges[4]=-this.yHalf+this.centerWorld.y,this.activePlaneVertsSagittalEdges[5]=-this.zHalf+this.centerWorld.z,this.activePlaneVertsSagittalEdges[6]=a*this.xSize-this.xHalf,this.activePlaneVertsSagittalEdges[7]=
-this.yHalf+this.centerWorld.y,this.activePlaneVertsSagittalEdges[8]=-this.zHalf+this.centerWorld.z,this.activePlaneVertsSagittalEdges[9]=a*this.xSize-this.xHalf,this.activePlaneVertsSagittalEdges[10]=this.yHalf+this.centerWorld.y,this.activePlaneVertsSagittalEdges[11]=-this.zHalf+this.centerWorld.z,this.activePlaneVertsSagittalEdges[12]=a*this.xSize-this.xHalf,this.activePlaneVertsSagittalEdges[13]=this.yHalf+this.centerWorld.y,this.activePlaneVertsSagittalEdges[14]=-this.zHalf+this.centerWorld.z,
this.activePlaneVertsSagittalEdges[15]=a*this.xSize-this.xHalf,this.activePlaneVertsSagittalEdges[16]=this.yHalf+this.centerWorld.y,this.activePlaneVertsSagittalEdges[17]=this.zHalf+this.centerWorld.z,this.activePlaneVertsSagittalEdges[18]=a*this.xSize-this.xHalf,this.activePlaneVertsSagittalEdges[19]=this.yHalf+this.centerWorld.y,this.activePlaneVertsSagittalEdges[20]=this.zHalf+this.centerWorld.z,this.activePlaneVertsSagittalEdges[21]=a*this.xSize-this.xHalf,this.activePlaneVertsSagittalEdges[22]=
-this.yHalf+this.centerWorld.y,this.activePlaneVertsSagittalEdges[23]=this.zHalf+this.centerWorld.z,this.crosshairLineVertsZ[0]=a*this.xSize-this.xHalf,this.crosshairLineVertsZ[1]=b*this.ySize-this.yHalf,this.crosshairLineVertsZ[2]=-this.zHalf+this.centerWorld.z,this.crosshairLineVertsZ[3]=a*this.xSize-this.xHalf,this.crosshairLineVertsZ[4]=b*this.ySize-this.yHalf,this.crosshairLineVertsZ[5]=this.zHalf+this.centerWorld.z,this.crosshairLineVertsY[0]=a*this.xSize-this.xHalf,this.crosshairLineVertsY[1]=
-this.yHalf+this.centerWorld.y,this.crosshairLineVertsY[2]=e*this.zSize-this.zHalf,this.crosshairLineVertsY[3]=a*this.xSize-this.xHalf,this.crosshairLineVertsY[4]=this.yHalf+this.centerWorld.y,this.crosshairLineVertsY[5]=e*this.zSize-this.zHalf,this.crosshairLineVertsX[0]=-this.xHalf+this.centerWorld.x,this.crosshairLineVertsX[1]=b*this.ySize-this.yHalf,this.crosshairLineVertsX[2]=e*this.zSize-this.zHalf,this.crosshairLineVertsX[3]=this.xHalf+this.centerWorld.x,this.crosshairLineVertsX[4]=b*this.ySize-
this.yHalf,this.crosshairLineVertsX[5]=e*this.zSize-this.zHalf,this.needsUpdateActivePlanes=!0};papaya.viewer.ScreenSurface.prototype.pick=function(a,b,e){this.needsPick=!0;this.pickLocX=a;this.pickLocY=b;this.draw();if(e)return this.pickedCoordinate;this.draw();return this.pickedCoordinate};
papaya.viewer.ScreenSurface.prototype.pickRuler=function(a,b){this.needsPick=!0;this.pickLocX=a;this.pickLocY=b;this.draw();this.pickedCoordinate&&(this.rulerPoints[3*this.grabbedRulerPoint]=this.pickedCoordinate.coordinate[0],this.rulerPoints[3*this.grabbedRulerPoint+1]=this.pickedCoordinate.coordinate[1],this.rulerPoints[3*this.grabbedRulerPoint+2]=this.pickedCoordinate.coordinate[2],this.draw());return this.pickedCoordinate};
papaya.viewer.ScreenSurface.prototype.pickColor=function(a,b){this.needsPickColor=!0;this.pickLocX=a;this.pickLocY=b;this.draw();this.draw();return this.pickedColor};
papaya.viewer.ScreenSurface.prototype.findPickedCoordinate=function(a,b,e){e=a.viewportHeight-1-e;var d,f=[];a.readPixels(b,e,1,1,a.RGBA,a.UNSIGNED_BYTE,this.pickingBuffer);d=this.unpackFloatFromVec4i(this.pickingBuffer)/255;return 1<=d?null:GLU.unProject(b,e,d,this.mvMatrix,this.pMatrix,[0,0,a.viewportWidth,a.viewportHeight],f)?{coordinate:f,depth:d}:null};
papaya.viewer.ScreenSurface.prototype.findInitialRulerPoints=function(a){var b=a.viewportWidth,e=a.viewportHeight,d;a=[];var f=[],k,h;for(h=1;5>h;h+=1)d=parseInt(.1*b*h,10),k=parseInt(.1*e*h,10),(d=this.pick(d,k,!0))&&a.push(d),d=parseInt(b-.1*b*h,10),k=parseInt(.1*e*h,10),(d=this.pick(d,k,!0))&&a.push(d),d=parseInt(b-.1*b*h,10),k=parseInt(e-.1*e*h,10),(d=this.pick(d,k,!0))&&a.push(d),d=parseInt(.1*b*h,10),k=parseInt(e-.1*e*h,10),(d=this.pick(d,k,!0))&&a.push(d);if(2>a)return!1;for(h=b=0;h<a.length;h+=
1)a[h].depth<a[b].depth&&(b=h);f.push(a[b].coordinate);a.splice(b,1);for(h=b=0;h<a.length;h+=1)a[h].depth<a[b].depth&&(b=h);f.push(a[b].coordinate);this.rulerPoints[0]=f[0][0];this.rulerPoints[1]=f[0][1];this.rulerPoints[2]=f[0][2];this.rulerPoints[3]=f[1][0];this.rulerPoints[4]=f[1][1];this.rulerPoints[5]=f[1][2];return!0};
papaya.viewer.ScreenSurface.prototype.findPickedColor=function(a){a.readPixels(0,0,a.viewportWidth,a.viewportHeight,a.RGBA,a.UNSIGNED_BYTE,this.pickingBuffer);a=(a.viewportHeight-1-this.pickLocY)*a.viewportWidth*4+4*this.pickLocX;return[this.pickingBuffer[a],this.pickingBuffer[a+1],this.pickingBuffer[a+2]]};
papaya.viewer.ScreenSurface.prototype.getBackgroundColor=function(){return"rgba("+parseInt(255*this.backgroundColor[0]+.5)+","+parseInt(255*this.backgroundColor[1]+.5)+","+parseInt(255*this.backgroundColor[2]+.5)+",255)"};papaya.viewer.ScreenSurface.prototype.updatePreferences=function(){this.updateBackgroundColor()};
papaya.viewer.ScreenSurface.prototype.updateBackgroundColor=function(){var a=this.viewer.container.preferences.surfaceBackgroundColor;this.backgroundColor="Black"===a?[0,0,0]:"Dark Gray"===a?[.25,.25,.25]:"Gray"===a?[.5,.5,.5]:"Light Gray"===a?[.75,.75,.75]:"White"===a?[1,1,1]:papaya.viewer.ScreenSurface.DEFAULT_BACKGROUND};papaya.viewer.ScreenSurface.prototype.isMainView=function(){return this.viewer.mainImage===this.viewer.surfaceView};
papaya.viewer.ScreenSurface.prototype.processParams=function(a){this.viewer.container.isDesktopMode()||void 0===a.surfaceBackground||(this.viewer.container.preferences.surfaceBackgroundColor=a.surfaceBackground)};
papaya.viewer.ScreenSurface.prototype.makeSphere=function(a,b,e){var d,f,k=[],h=[];for(d=0;d<=a;d++){f=d*Math.PI/a;var r=Math.sin(f),q=Math.cos(f);for(f=0;f<=b;f++){var t=2*f*Math.PI/b,y=Math.sin(t),t=Math.cos(t)*r,G=q,y=y*r;h.push(t);h.push(G);h.push(y);k.push(e*t);k.push(e*G);k.push(e*y)}}e=[];for(d=0;d<a;d++)for(f=0;f<b;f++)r=d*(b+1)+f,q=r+b+1,e.push(r),e.push(q),e.push(r+1),e.push(q),e.push(q+1),e.push(r+1);return{vertices:k,normals:h,indices:e}};
papaya.viewer.ScreenSurface.prototype.getRulerLength=function(){return papaya.utilities.MathUtils.lineDistance3d(this.rulerPoints[0],this.rulerPoints[1],this.rulerPoints[2],this.rulerPoints[3],this.rulerPoints[4],this.rulerPoints[5])};"use strict";var papaya=papaya||{},papayaContainers=[],papayaLoadableImages=papayaLoadableImages||[],papayaDroppedFiles=[];
papaya.Container=papaya.Container||function(a){this.containerHtml=a;this.preferences=this.toolbar=this.display=this.viewer=this.sliderControlHtml=this.titlebarHtml=this.displayHtml=this.viewerHtml=this.toolbarHtml=this.containerIndex=null;this.params=[];this.loadingSurfaceIndex=this.loadingImageIndex=0;this.collapsable=this.nestedViewer=!1;this.orthogonal=!0;this.noNewFiles=this.kioskMode=this.orthogonalDynamic=this.orthogonalTall=!1;this.showControls=!0;this.showControlBar=!1;this.fullScreenPadding=
this.showImageButtons=!0;this.combineParametric=!1;this.dropTimeout=null;this.showRuler=!1;this.syncOverlaySeries=!0;this.surfaceParams={};this.contextManager=null;this.allowScroll=!0;this.loadingComplete=null;this.resetComponents()};papaya.Container.LICENSE_TEXT="<p>THIS PRODUCT IS NOT FOR CLINICAL USE.<br /><br />This software is available for use, as is, free of charge.  The software and data derived from this software may not be used for clinical purposes.<br /><br />The authors of this software make no representations or warranties about the suitability of the software, either express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, non-infringement, or conformance to a specification or standard. The authors of this software shall not be liable for any damages suffered by licensee as a result of using or modifying this software or its derivatives.<br /><br />By using this software, you agree to be bounded by the terms of this license.  If you do not agree to the terms of this license, do not use this software.</p>";
papaya.Container.KEYBOARD_REF_TEXT="<span style='color:#B5CBD3'>[Spacebar]</span> Cycle the main slice view in a clockwise rotation.<br /><br /><span style='color:#B5CBD3'>[Page Up]</span> or <span style='color:#B5CBD3'>[']</span> Increment the axial slice.<br /><br /><span style='color:#B5CBD3'>[Page Down]</span> or <span style='color:#B5CBD3'>[/]</span> Decrement the axial slice.<br /><br /><span style='color:#B5CBD3'>[Arrow Up]</span> and <span style='color:#B5CBD3'>[Arrow Down]</span> Increment/decrement the coronal slice.<br /><br /><span style='color:#B5CBD3'>[Arrow Right]</span> and <span style='color:#B5CBD3'>[Arrow Left]</span> Increment/decrement the sagittal slice.<br /><br /><span style='color:#B5CBD3'>[g]</span> and <span style='color:#B5CBD3'>[v]</span> Increment/decrement main slice.<br /><br /><span style='color:#B5CBD3'>[<]</span> or <span style='color:#B5CBD3'>[,]</span> Decrement the series point.<br /><br /><span style='color:#B5CBD3'>[>]</span> or <span style='color:#B5CBD3'>[.]</span> Increment the series point.<br /><br /><span style='color:#B5CBD3'>[o]</span> Navigate viewer to the image origin.<br /><br /><span style='color:#B5CBD3'>[c]</span> Navigate viewer to the center of the image.<br /><br /><span style='color:#B5CBD3'>[a]</span> Toggle main crosshairs on/off.";
papaya.Container.MOUSE_REF_TEXT="<span style='color:#B5CBD3'>(Left-click and drag)</span> Change current coordinate.<br /><br /><span style='color:#B5CBD3'>[Alt](Left-click and drag)</span> Zoom in and out.<br /><br /><span style='color:#B5CBD3'>[Alt](Double left-click)</span> Reset zoom.<br /><br /><span style='color:#B5CBD3'>[Alt][Shift](Left-click and drag)</span> Pan zoomed image.<br /><br /><span style='color:#B5CBD3'>(Right-click and drag)</span> Window level controls.<br /><br /><span style='color:#B5CBD3'>(Scroll wheel)</span> See Preferences.<br /><br />";
papaya.Container.DICOM_SUPPORT=!0;papaya.Container.syncViewers=!1;papaya.Container.syncViewersWorld=!1;papaya.Container.allowPropagation=!1;papaya.Container.papayaLastHoveredViewer=null;papaya.Container.ignorePatterns=[/^[.]/];papaya.Container.atlas=null;papaya.Container.atlasWorldSpace=!0;papaya.Container.restartViewer=function(a,b,e,d,f){papayaContainers[a].viewer.restart(b,e,d,f)};
papaya.Container.resetViewer=function(a,b){b||(b=papayaContainers[a].params,b.loadedImages&&(b.images=b.loadedImages),b.loadedEncodedImages&&(b.encodedImages=b.loadedEncodedImages),b.loadedBinaryImages&&(b.binaryImages=b.loadedBinaryImages),b.loadedSurfaces&&(b.surfaces=b.loadedSurfaces),b.loadedEncodedSurfaces&&(b.encodedSurfaces=b.loadedEncodedSurfaces),b.loadedFiles&&(b.files=b.loadedFiles));papayaContainers[a].viewer.resetViewer();papayaContainers[a].toolbar.updateImageButtons();papayaContainers[a].reset();
papayaContainers[a].params=b;papayaContainers[a].readGlobalParams();papayaContainers[a].rebuildContainer(b,a);papayaContainers[a].viewer.processParams(b)};papaya.Container.removeImage=function(a,b){1>b&&console.log("Cannot remove the base image.  Try papaya.Container.resetViewer() instead.");papayaContainers[a].viewer.removeOverlay(b)};papaya.Container.hideImage=function(a,b){papayaContainers[a].viewer.screenVolumes[b].hidden=!0;papayaContainers[a].viewer.drawViewer(!0,!1)};
papaya.Container.showImage=function(a,b){papayaContainers[a].viewer.screenVolumes[b].hidden=!1;papayaContainers[a].viewer.drawViewer(!0,!1)};
papaya.Container.addImage=function(a,b,e){e&&(papayaContainers[a].params=$.extend({},papayaContainers[a].params,e));b instanceof Array?e=b:(e=[],e[0]=b);papayaContainers[a].params.images?papayaContainers[a].viewer.loadImage(e,!0,!1,!1):papayaContainers[a].params.binaryImages?papayaContainers[a].viewer.loadImage(e,!1,!1,!0):papayaContainers[a].params.encodedImages&&papayaContainers[a].viewer.loadImage(e,!1,!0,!1)};
papaya.Container.findParameters=function(a){var b,e=null;b=a.data("params");b||(a=a.find("."+PAPAYA_VIEWER_CSS))&&(b=a.data("params"));b&&("object"===typeof b?e=b:window[b]&&(e=window[b]));e&&papaya.utilities.UrlUtils.getQueryParams(e);return e};
papaya.Container.fillContainerHTML=function(a,b,e,d){var f;b?(e=a.find("#"+PAPAYA_DEFAULT_TOOLBAR_ID),f=a.find("#"+PAPAYA_DEFAULT_VIEWER_ID),b=a.find("#"+PAPAYA_DEFAULT_DISPLAY_ID),e?e.addClass(PAPAYA_TOOLBAR_CSS):a.prepend("<div class='"+PAPAYA_TOOLBAR_CSS+"' id='"+PAPAYA_DEFAULT_TOOLBAR_ID+"'></div>"),f?f.addClass(PAPAYA_VIEWER_CSS):$("<div class='"+PAPAYA_VIEWER_CSS+"' id='"+PAPAYA_DEFAULT_VIEWER_ID+"'></div>").insertAfter($("#"+PAPAYA_DEFAULT_TOOLBAR_ID)),b?b.addClass(PAPAYA_DISPLAY_CSS):$("<div class='"+
PAPAYA_DISPLAY_CSS+"' id='"+PAPAYA_DEFAULT_DISPLAY_ID+"'></div>").insertAfter($("#"+PAPAYA_DEFAULT_VIEWER_ID)),console.log("This method of adding a Papaya container is deprecated.  Try simply <div class='papaya' data-params='params'></div> instead...")):(b=void 0!==d?d:papayaContainers.length,a.attr("id",PAPAYA_DEFAULT_CONTAINER_ID+b),e&&void 0!==e.kioskMode&&e.kioskMode||a.append("<div id='"+(PAPAYA_DEFAULT_TOOLBAR_ID+b)+"' class='"+PAPAYA_TOOLBAR_CSS+"'></div>"),a.append("<div id='"+(PAPAYA_DEFAULT_VIEWER_ID+
b)+"' class='"+PAPAYA_VIEWER_CSS+"'></div>"),a.append("<div id='"+(PAPAYA_DEFAULT_DISPLAY_ID+b)+"' class='"+PAPAYA_DISPLAY_CSS+"'></div>"),e&&e.showControlBar&&(void 0===e.showControls||e.showControls)?(a.append("<div id='"+PAPAYA_KIOSK_CONTROLS_CSS+b+"' class='"+PAPAYA_KIOSK_CONTROLS_CSS+"'><div id='"+(PAPAYA_DEFAULT_SLIDER_ID+b)+"main' class='"+PAPAYA_SLIDER_CSS+" "+PAPAYA_CONTROL_MAIN_SLIDER+"'><span class='"+PAPAYA_CONTROL_BAR_LABELS_CSS+"'>Slice: </span> <button type='button' class='"+PAPAYA_CONTROL_INCREMENT_BUTTON_CSS+
"'>+</button> <button type='button' class='"+PAPAYA_CONTROL_INCREMENT_BUTTON_CSS+"'>-</button> </div><div id='"+(PAPAYA_DEFAULT_SLIDER_ID+b)+"axial' class='"+PAPAYA_SLIDER_CSS+" "+PAPAYA_CONTROL_DIRECTION_SLIDER+"'><span class='"+PAPAYA_CONTROL_BAR_LABELS_CSS+"'>Axial: </span> <button type='button' class='"+PAPAYA_CONTROL_INCREMENT_BUTTON_CSS+"'>+</button> <button type='button' class='"+PAPAYA_CONTROL_INCREMENT_BUTTON_CSS+"'>-</button> </div><div id='"+(PAPAYA_DEFAULT_SLIDER_ID+b)+"coronal' class='"+
PAPAYA_SLIDER_CSS+" "+PAPAYA_CONTROL_DIRECTION_SLIDER+"'><span class='"+PAPAYA_CONTROL_BAR_LABELS_CSS+"'>Coronal: </span> <button type='button' class='"+PAPAYA_CONTROL_INCREMENT_BUTTON_CSS+"'>+</button> <button type='button' class='"+PAPAYA_CONTROL_INCREMENT_BUTTON_CSS+"'>-</button> </div><div id='"+(PAPAYA_DEFAULT_SLIDER_ID+b)+"sagittal' class='"+PAPAYA_SLIDER_CSS+" "+PAPAYA_CONTROL_DIRECTION_SLIDER+"'><span class='"+PAPAYA_CONTROL_BAR_LABELS_CSS+"'>Sagittal: </span> <button type='button' class='"+
PAPAYA_CONTROL_INCREMENT_BUTTON_CSS+"'>+</button> <button type='button' class='"+PAPAYA_CONTROL_INCREMENT_BUTTON_CSS+"'>-</button> </div><div id='"+(PAPAYA_DEFAULT_SLIDER_ID+b)+"series' class='"+PAPAYA_SLIDER_CSS+" "+PAPAYA_CONTROL_DIRECTION_SLIDER+"'><span class='"+PAPAYA_CONTROL_BAR_LABELS_CSS+"'>Series: </span> <button type='button' class='"+PAPAYA_CONTROL_INCREMENT_BUTTON_CSS+"'>&lt;</button> <button type='button' class='"+PAPAYA_CONTROL_INCREMENT_BUTTON_CSS+"'>&gt;</button> </div>&nbsp;&nbsp;&nbsp;<button type='button' "+
(e.kioskMode&&(void 0===e.showImageButtons||e.showImageButtons)?"":"style='float:right;margin-left:5px;' ")+"class='"+PAPAYA_CONTROL_SWAP_BUTTON_CSS+"'>Swap View</button> <button type='button' "+(e.kioskMode&&(void 0===e.showImageButtons||e.showImageButtons)?"":"style='float:right;margin-left:5px;' ")+"class='"+PAPAYA_CONTROL_GOTO_CENTER_BUTTON_CSS+"'>Go To Center</button> <button type='button' "+(e.kioskMode&&(void 0===e.showImageButtons||e.showImageButtons)?"":"style='float:right;margin-left:5px;' ")+
"class='"+PAPAYA_CONTROL_GOTO_ORIGIN_BUTTON_CSS+"'>Go To Origin</button> </div>"),$("."+PAPAYA_CONTROL_INCREMENT_BUTTON_CSS).prop("disabled",!0),$("."+PAPAYA_CONTROL_SWAP_BUTTON_CSS).prop("disabled",!0),$("."+PAPAYA_CONTROL_GOTO_CENTER_BUTTON_CSS).prop("disabled",!0),$("."+PAPAYA_CONTROL_GOTO_ORIGIN_BUTTON_CSS).prop("disabled",!0)):e&&(void 0===e.showControls||e.showControls)&&(a.append("<button type='button' id='"+(PAPAYA_CONTROL_MAIN_INCREMENT_BUTTON_CSS+b)+"' class='"+PAPAYA_CONTROL_MAIN_INCREMENT_BUTTON_CSS+
"'>+</button> "),a.append("<button type='button' id='"+(PAPAYA_CONTROL_MAIN_DECREMENT_BUTTON_CSS+b)+"' class='"+PAPAYA_CONTROL_MAIN_DECREMENT_BUTTON_CSS+"'>-</button> "),a.append("<button type='button' id='"+(PAPAYA_CONTROL_MAIN_SWAP_BUTTON_CSS+b)+"' class='"+PAPAYA_CONTROL_MAIN_SWAP_BUTTON_CSS+"'>Swap View</button> "),a.append("<button type='button' id='"+(PAPAYA_CONTROL_MAIN_GOTO_CENTER_BUTTON_CSS+b)+"' class='"+PAPAYA_CONTROL_MAIN_GOTO_CENTER_BUTTON_CSS+"'>Go To Center</button> "),a.append("<button type='button' id='"+
(PAPAYA_CONTROL_MAIN_GOTO_ORIGIN_BUTTON_CSS+b)+"' class='"+PAPAYA_CONTROL_MAIN_GOTO_ORIGIN_BUTTON_CSS+"'>Go To Origin</button> "),$("#"+PAPAYA_CONTROL_MAIN_INCREMENT_BUTTON_CSS+b).css({display:"none"}),$("#"+PAPAYA_CONTROL_MAIN_DECREMENT_BUTTON_CSS+b).css({display:"none"}),$("#"+PAPAYA_CONTROL_MAIN_SWAP_BUTTON_CSS+b).css({display:"none"}),$("#"+PAPAYA_CONTROL_MAIN_GOTO_CENTER_BUTTON_CSS+b).css({display:"none"}),$("#"+PAPAYA_CONTROL_MAIN_GOTO_ORIGIN_BUTTON_CSS+b).css({display:"none"})));return f};
papaya.Container.buildContainer=function(a,b,e){var d,f,k;f=null;d=papaya.utilities.PlatformUtils.checkForBrowserCompatibility();f=a.find("."+PAPAYA_VIEWER_CSS);null!==d?(papaya.Container.removeCheckForJSClasses(a,f),a.addClass(PAPAYA_UTILS_UNSUPPORTED_CSS),f.addClass(PAPAYA_UTILS_UNSUPPORTED_MESSAGE_CSS),f.html(d)):(d=void 0!==e?e:papayaContainers.length,e=new papaya.Container(a),e.containerIndex=d,e.preferences=new papaya.viewer.Preferences,papaya.Container.removeCheckForJSClasses(a,f),b&&(e.params=
$.extend(e.params,b)),e.nestedViewer="BODY"!==a.parent()[0].tagName.toUpperCase(),e.readGlobalParams(),e.isDesktopMode()&&e.preferences.readPreferences(),e.buildViewer(e.params),e.buildDisplay(),e.showControlBar&&e.buildSliderControl(),e.buildToolbar(),e.setUpDnD(),(k=f.data("load-url"))?(f=k,f instanceof Array||(f=[],f[0]=k),e.viewer.loadImage(f,!0,!1,!1)):e.params.images?(f=e.params.images[0],f instanceof Array||(f=[],f[0]=e.params.images[0]),e.viewer.loadImage(f,!0,!1,!1)):e.params.encodedImages?
(f=e.params.encodedImages[0],f instanceof Array||(f=[],f[0]=e.params.encodedImages[0]),e.viewer.loadImage(f,!1,!0,!1)):e.params.binaryImages?(f=e.params.binaryImages[0],e.viewer.loadImage(f,!1,!1,!0)):e.params.files?(f=e.params.files[0],f instanceof Array||(f=[],f[0]=e.params.files[0]),e.viewer.loadImage(f,!1,!1,!1)):e.viewer.finishedLoading(),e.resizeViewerComponents(!1),e.nestedViewer||(a.parent().height("100%"),a.parent().width("100%")),papayaContainers[d]=e,papaya.Container.showLicense(e,b))};
papaya.Container.prototype.rebuildContainer=function(a,b){this.containerHtml.empty();papaya.Container.fillContainerHTML(this.containerHtml,!1,a,b);papaya.Container.buildContainer(this.containerHtml,a,b);1!==papayaContainers.length||papayaContainers[0].nestedViewer||($("html").addClass(PAPAYA_CONTAINER_FULLSCREEN),$("body").addClass(PAPAYA_CONTAINER_FULLSCREEN),papaya.Container.setToFullPage())};
papaya.Container.buildAllContainers=function(){var a,b;a=$("#"+PAPAYA_DEFAULT_CONTAINER_ID);0<a.length?(papaya.Container.fillContainerHTML(a,!0),b=papaya.Container.findParameters(a),papaya.Container.buildContainer(a,b)):$("."+PAPAYA_CONTAINER_CLASS_NAME).each(function(){b=papaya.Container.findParameters($(this));null===b&&(b=[]);!0===b.fullScreen&&(b.fullScreenPadding=!1,b.kioskMode=!0,b.showControlBar=!1,$("body").css({"background-color":"black"}));papaya.Container.fillContainerHTML($(this),!1,b);
papaya.Container.buildContainer($(this),b)});1!==papayaContainers.length||papayaContainers[0].nestedViewer||($("html").addClass(PAPAYA_CONTAINER_FULLSCREEN),$("body").addClass(PAPAYA_CONTAINER_FULLSCREEN),papaya.Container.setToFullPage(),papayaContainers[0].resizeViewerComponents(!0))};papaya.Container.startPapaya=function(){setTimeout(function(){window.scrollTo(0,0)},0);papaya.Container.DICOM_SUPPORT="undefined"!==typeof daikon;papaya.Container.buildAllContainers()};
papaya.Container.resizePapaya=function(a,b){var e;papaya.Container.updateOrthogonalState();if(1!==papayaContainers.length||papayaContainers[0].nestedViewer)for(e=0;e<papayaContainers.length;e+=1)papayaContainers[e].resizeViewerComponents(!0);else papaya.utilities.PlatformUtils.smallScreen&&!b||papayaContainers[0].resizeViewerComponents(!0);setTimeout(function(){window.scrollTo(0,0)},0)};
papaya.Container.addViewer=function(a,b,e){var d;d=$("#"+a);a=$('<div class="papaya"></div>');d.html(a);d[0].onclick="";d.off("click");papaya.Container.fillContainerHTML(a,!1,b);papaya.Container.buildContainer(a,b);e&&e()};papaya.Container.removeCheckForJSClasses=function(a,b){b.removeClass(PAPAYA_CONTAINER_CLASS_NAME);b.removeClass(PAPAYA_UTILS_CHECKFORJS_CSS);a.removeClass(PAPAYA_CONTAINER_CLASS_NAME);a.removeClass(PAPAYA_UTILS_CHECKFORJS_CSS)};
papaya.Container.setToFullPage=function(){document.body.style.marginTop=0;document.body.style.marginBottom=0;document.body.style.marginLeft="auto";document.body.style.marginRight="auto";document.body.style.padding=0;document.body.style.overflow="hidden";document.body.style.width="100%";document.body.style.height="100%"};papaya.Container.getLicense=function(){return papaya.Container.LICENSE_TEXT};papaya.Container.getKeyboardReference=function(){return papaya.Container.KEYBOARD_REF_TEXT};
papaya.Container.getMouseReference=function(){return papaya.Container.MOUSE_REF_TEXT};papaya.Container.setLicenseRead=function(){papaya.utilities.UrlUtils.createCookie(papaya.viewer.Preferences.COOKIE_PREFIX+"eula","Yes",papaya.viewer.Preferences.COOKIE_EXPIRY_DAYS)};papaya.Container.isLicenseRead=function(){var a=papaya.utilities.UrlUtils.readCookie(papaya.viewer.Preferences.COOKIE_PREFIX+"eula");return a&&"Yes"===a};
papaya.Container.showLicense=function(a,b){b&&void 0!==b.showEULA&&b.showEULA&&!papaya.Container.isLicenseRead()&&(new papaya.ui.Dialog(a,"License",papaya.ui.Toolbar.LICENSE_DATA,papaya.Container,null,papaya.Container.setLicenseRead,null,!0)).showDialog()};
papaya.Container.updateOrthogonalState=function(){var a;for(a=0;a<papayaContainers.length;a+=1)papayaContainers[a].orthogonal&&(papaya.utilities.PlatformUtils.mobile||papayaContainers[a].orthogonalDynamic)&&($(window).height()>$(window).width()?papayaContainers[a].orthogonalTall=!0:papayaContainers[a].orthogonalTall=!1)};
papaya.Container.reorientPapaya=function(){var a;for(a=0;a<papayaContainers.length;a+=1)papayaContainers[a].toolbar.closeAllMenus();papaya.Container.updateOrthogonalState();papaya.Container.resizePapaya(null,!0)};papaya.Container.prototype.resetComponents=function(){this.containerHtml.css({height:"auto"});this.containerHtml.css({width:"auto"});this.containerHtml.css({margin:"auto"});$("head").append("<style>div#papayaViewer:before{ content:'' }</style>")};
papaya.Container.prototype.hasSurface=function(){return this.viewer&&0<this.viewer.surfaces.length};
papaya.Container.prototype.getViewerDimensions=function(){var a,b,e,d;a=this.containerHtml.parent().width()-(this.fullScreenPadding?2*PAPAYA_PADDING:0);e=this.orthogonal?this.hasSurface()?1.333:1.5:1;this.orthogonalTall||!this.orthogonal?(a=(this.collapsable?window.innerHeight:this.containerHtml.parent().height())-(papaya.viewer.Display.SIZE+(this.kioskMode?0:papaya.ui.Toolbar.SIZE+PAPAYA_SPACING)+PAPAYA_SPACING+(this.fullScreenPadding&&!this.nestedViewer?2*PAPAYA_CONTAINER_PADDING_TOP:0))-(this.showControlBar?
2*papaya.ui.Toolbar.SIZE:0),b=papayaRoundFast(a/e)):(b=a,a=papayaRoundFast(b/e));if(!this.nestedViewer||this.collapsable)this.orthogonalTall?(d=window.innerWidth-(this.fullScreenPadding?2*PAPAYA_PADDING:0),b>d&&(b=d,a=papayaRoundFast(b*e))):(d=window.innerHeight-(papaya.viewer.Display.SIZE+(this.kioskMode?0:papaya.ui.Toolbar.SIZE+PAPAYA_SPACING)+PAPAYA_SPACING+(this.fullScreenPadding?2*PAPAYA_CONTAINER_PADDING_TOP:0))-(this.showControlBar?2*papaya.ui.Toolbar.SIZE:0),a>d&&(a=d,b=papayaRoundFast(a*
e)));return[b,a]};papaya.Container.prototype.getViewerPadding=function(){var a,b;a=this.containerHtml.parent().width()-(this.fullScreenPadding?2*PAPAYA_PADDING:0);b=this.getViewerDimensions();return(a-b[0])/2};
papaya.Container.prototype.readGlobalParams=function(){this.kioskMode=!0===this.params.kioskMode||papaya.utilities.PlatformUtils.smallScreen;this.combineParametric=!0===this.params.combineParametric;this.params.loadingComplete&&(this.loadingComplete=this.params.loadingComplete);void 0!==this.params.showControls&&(this.showControls=this.params.showControls);void 0!==this.params.noNewFiles&&(this.noNewFiles=this.params.noNewFiles);void 0!==this.params.showImageButtons&&(this.showImageButtons=this.params.showImageButtons);
papaya.utilities.PlatformUtils.smallScreen&&(this.showImageButtons=!1);void 0!==this.params.fullScreenPadding&&(this.fullScreenPadding=this.params.fullScreenPadding);void 0!==this.params.orthogonal&&(this.orthogonal=this.params.orthogonal);this.surfaceParams.showSurfacePlanes=!0===this.params.showSurfacePlanes;this.surfaceParams.showSurfaceCrosshairs=!0===this.params.showSurfaceCrosshairs;this.surfaceParams.surfaceBackground=this.params.surfaceBackground;this.orthogonalTall=this.orthogonal&&!0===
this.params.orthogonalTall;this.orthogonalDynamic=this.orthogonal&&!0===this.params.orthogonalDynamic;void 0!==this.params.allowScroll&&(this.allowScroll=this.params.allowScroll);(papaya.utilities.PlatformUtils.mobile||this.orthogonalDynamic)&&this.orthogonal&&($(window).height()>$(window).width()?this.orthogonalTall=!0:this.orthogonalTall=!1);void 0!==this.params.syncOverlaySeries&&(this.syncOverlaySeries=this.params.syncOverlaySeries);void 0!==this.params.showControlBar&&(this.showControlBar=this.showControls&&
this.params.showControlBar);void 0!==this.params.contextManager&&(this.contextManager=this.params.contextManager);!0===this.params.fullScreen&&(this.fullScreenPadding=this.params.fullScreenPadding=!1,this.kioskMode=this.params.kioskMode=!0,this.showControlBar=this.params.showControlBar=!1,$("body").css("background-color:'black'"))};
papaya.Container.prototype.reset=function(){this.loadingSurfaceIndex=this.loadingImageIndex=0;this.collapsable=this.nestedViewer=!1;this.orthogonal=!0;this.noNewFiles=this.kioskMode=this.orthogonalDynamic=this.orthogonalTall=!1;this.showControls=!0;this.showControlBar=!1;this.fullScreenPadding=!0;this.showRuler=this.combineParametric=!1};
papaya.Container.prototype.resizeViewerComponents=function(a){var b,e,d=0;this.toolbar.closeAllMenus();b=this.getViewerDimensions();e=this.getViewerPadding();this.toolbarHtml.css({width:b[0]+"px"});this.toolbarHtml.css({height:papaya.ui.Toolbar.SIZE+"px"});this.toolbarHtml.css({paddingLeft:e+"px"});this.toolbarHtml.css({paddingBottom:PAPAYA_SPACING+"px"});this.viewerHtml.css({width:b[0]+"px"});this.viewerHtml.css({height:b[1]+"px"});this.viewerHtml.css({paddingLeft:e+"px"});a&&this.viewer.resizeViewer(b);
this.displayHtml.css({height:papaya.viewer.Display.SIZE+"px"});this.displayHtml.css({paddingLeft:e+"px"});this.displayHtml.css({paddingTop:PAPAYA_SPACING+"px"});this.display.canvas.width=b[0];this.showControls&&this.showControlBar?(this.sliderControlHtml.css({width:b[0]+"px"}),this.sliderControlHtml.css({height:papaya.viewer.Display.SIZE+"px"}),d=this.kioskMode?d+0:d+-50,d=this.viewer.hasSeries?d+200:d+0,b[0]<775+d?($("."+PAPAYA_CONTROL_GOTO_CENTER_BUTTON_CSS).css({display:"none"}),$("."+PAPAYA_CONTROL_GOTO_ORIGIN_BUTTON_CSS).css({display:"none"})):
($("."+PAPAYA_CONTROL_GOTO_CENTER_BUTTON_CSS).css({display:"inline"}),$("."+PAPAYA_CONTROL_GOTO_ORIGIN_BUTTON_CSS).css({display:"inline"})),b[0]<600+d?($("."+PAPAYA_CONTROL_DIRECTION_SLIDER).css({display:"none"}),$("."+PAPAYA_CONTROL_MAIN_SLIDER).css({display:"inline"})):($("."+PAPAYA_CONTROL_DIRECTION_SLIDER).css({display:"inline"}),$("."+PAPAYA_CONTROL_MAIN_SLIDER).css({display:"none"})),this.viewer.hasSeries&&b[0]<450+d&&$("."+PAPAYA_CONTROL_MAIN_SLIDER).css({display:"none"}),200>b[0]?$("."+PAPAYA_CONTROL_SWAP_BUTTON_CSS).css({display:"none"}):
$("."+PAPAYA_CONTROL_SWAP_BUTTON_CSS).css({display:"inline"}),this.viewer.hasSeries?$("."+PAPAYA_CONTROL_DIRECTION_SLIDER).eq(3).css({display:"inline"}):$("."+PAPAYA_CONTROL_DIRECTION_SLIDER).eq(3).css({display:"none"})):this.showControls&&this.viewer.initialized&&(600>b[0]?($("#"+PAPAYA_CONTROL_MAIN_GOTO_CENTER_BUTTON_CSS+this.containerIndex).css({display:"none"}),$("#"+PAPAYA_CONTROL_MAIN_GOTO_ORIGIN_BUTTON_CSS+this.containerIndex).css({display:"none"})):this.viewer.controlsHidden||($("#"+PAPAYA_CONTROL_MAIN_GOTO_CENTER_BUTTON_CSS+
this.containerIndex).css({display:"inline"}),$("#"+PAPAYA_CONTROL_MAIN_GOTO_ORIGIN_BUTTON_CSS+this.containerIndex).css({display:"inline"})));this.isDesktopMode()&&(600>b[0]?this.titlebarHtml.css({visibility:"hidden"}):this.titlebarHtml.css({visibility:"visible"}));this.nestedViewer&&!this.collapsable||!this.fullScreenPadding?this.containerHtml.css({paddingTop:"0"}):this.containerHtml.css({paddingTop:PAPAYA_CONTAINER_PADDING_TOP+"px"});this.fullScreenPadding&&(this.containerHtml.css({paddingLeft:PAPAYA_PADDING+
"px"}),this.containerHtml.css({paddingRight:PAPAYA_PADDING+"px"}));this.viewer.initialized?this.viewer.drawViewer(!1,!0):(this.viewer.drawEmptyViewer(),this.display.drawEmptyDisplay());this.titlebarHtml.css({width:b[0]+"px",top:0})};papaya.Container.prototype.updateViewerSize=function(){this.toolbar.closeAllMenus();this.viewer.resizeViewer(this.getViewerDimensions());this.viewer.updateOffsetRect()};
papaya.Container.prototype.buildViewer=function(a){var b;this.viewerHtml=this.containerHtml.find("."+PAPAYA_VIEWER_CSS);papaya.Container.removeCheckForJSClasses(this.containerHtml,this.viewerHtml);this.viewerHtml.html("");b=this.getViewerDimensions();this.viewer=new papaya.viewer.Viewer(this,b[0],b[1],a);this.viewerHtml.append($(this.viewer.canvas));this.preferences.viewer=this.viewer};
papaya.Container.prototype.buildDisplay=function(){var a;this.displayHtml=this.containerHtml.find("."+PAPAYA_DISPLAY_CSS);a=this.getViewerDimensions();this.display=new papaya.viewer.Display(this,a[0]);this.displayHtml.append($(this.display.canvas))};papaya.Container.prototype.buildSliderControl=function(){this.sliderControlHtml=this.containerHtml.find("."+PAPAYA_KIOSK_CONTROLS_CSS)};
papaya.Container.prototype.buildToolbar=function(){this.toolbarHtml=this.containerHtml.find("."+PAPAYA_TOOLBAR_CSS);this.toolbar=new papaya.ui.Toolbar(this);this.toolbar.buildToolbar();this.toolbar.updateImageButtons()};papaya.Container.prototype.readFile=function(a,b){a.file(function(a,b){a&&"."!==b.name.charAt(0)&&a(b)}.bind(this,b))};papaya.Container.prototype.readDir=function(a){this.readDirNextEntries(a.createReader())};
papaya.Container.prototype.readDirNextEntries=function(a){var b=this;a.readEntries(function(e){var d=e.length,f,k;if(0<d){for(f=0;f<d;f+=1)k=e[f],k.isFile&&b.readFile(k,papaya.utilities.ObjectUtils.bind(b,b.addDroppedFile));b.readDirNextEntries(a)}})};
papaya.Container.prototype.setUpDnD=function(){var a=this;this.containerHtml[0].ondragover=function(){a.viewer.draggingOver=!0;a.viewer.initialized||a.viewer.drawEmptyViewer();return!1};this.containerHtml[0].ondragleave=function(){a.viewer.draggingOver=!1;a.viewer.initialized||a.viewer.drawEmptyViewer();return!1};this.containerHtml[0].ondragend=function(){a.viewer.draggingOver=!1;a.viewer.initialized||a.viewer.drawEmptyViewer();return!1};this.containerHtml[0].ondrop=function(b){b.preventDefault();
var e=b.dataTransfer;a.display.drawProgress(.1,"Loading");if(e)if(e.items&&0<e.items.length){b=e.items;var e=b.length,d,f;for(d=0;d<e;d+=1)f=b[d],f.getAsEntry?f=f.getAsEntry():f.webkitGetAsEntry&&(f=f.webkitGetAsEntry()),f.isFile?a.readFile(f,papaya.utilities.ObjectUtils.bind(a,a.addDroppedFile)):f.isDirectory&&a.readDir(f)}else e.files&&0<e.files.length&&a.viewer.loadImage(b.dataTransfer.files);return!1}};
papaya.Container.prototype.addDroppedFile=function(a){clearTimeout(this.dropTimeout);papayaDroppedFiles.push(a);this.dropTimeout=setTimeout(papaya.utilities.ObjectUtils.bind(this,this.droppedFilesFinishedLoading),100)};
papaya.Container.prototype.droppedFilesFinishedLoading=function(){papaya.surface.Surface.findSurfaceType(papayaDroppedFiles[0].name)!==papaya.surface.Surface.SURFACE_TYPE_UNKNOWN?this.viewer.loadSurface(papayaDroppedFiles):this.viewer.loadImage(papayaDroppedFiles);papayaDroppedFiles=[]};papaya.Container.prototype.clearParams=function(){this.params=[]};
papaya.Container.prototype.loadNext=function(){this.hasImageToLoad()?this.loadNextImage():this.hasSurfaceToLoad()?this.loadNextSurface():this.hasAtlasToLoad()&&this.viewer.loadAtlas()};papaya.Container.prototype.hasMoreToLoad=function(){return this.hasImageToLoad()||this.hasSurfaceToLoad()||this.hasAtlasToLoad()};
papaya.Container.prototype.hasImageToLoad=function(){return this.params.images?this.loadingImageIndex<this.params.images.length:this.params.binaryImages?this.loadingImageIndex<this.params.binaryImages.length:this.params.encodedImages?this.loadingImageIndex<this.params.encodedImages.length:this.params.files?this.loadingImageIndex<this.params.files.length:!1};papaya.Container.prototype.hasAtlasToLoad=function(){return null==papaya.Container.atlas&&this.viewer.hasDefinedAtlas()};
papaya.Container.prototype.hasSurfaceToLoad=function(){return papaya.utilities.PlatformUtils.isWebGLSupported()?this.params.surfaces?this.loadingSurfaceIndex<this.params.surfaces.length:this.params.encodedSurfaces?this.loadingSurfaceIndex<this.params.encodedSurfaces.length:!1:(console.log("Warning: This browser version is not able to load surfaces."),!1)};
papaya.Container.prototype.loadNextSurface=function(){var a=!1,b;this.params.surfaces?this.loadingSurfaceIndex<this.params.surfaces.length?(a=!0,b=this.params.surfaces[this.loadingSurfaceIndex],this.loadingSurfaceIndex+=1,this.viewer.loadSurface(b,!0,!1)):(this.params.loadedSurfaces=this.params.surfaces,this.params.surfaces=[]):this.params.encodedSurfaces&&(this.loadingSurfaceIndex<this.params.encodedSurfaces.length?(a=!0,b=this.params.encodedSurfaces[this.loadingSurfaceIndex],b instanceof Array||
(b=[],b[0]=this.params.encodedSurfaces[this.loadingSurfaceIndex]),this.viewer.loadSurface(b,!1,!0),this.loadingSurfaceIndex+=1):(this.params.loadedEncodedSurfaces=this.params.encodedSurfaces,this.params.encodedSurfaces=[]));return a};
papaya.Container.prototype.loadNextImage=function(){var a=!1,b;this.params.images?this.loadingImageIndex<this.params.images.length?(a=!0,b=this.params.images[this.loadingImageIndex],b instanceof Array||(b=[],b[0]=this.params.images[this.loadingImageIndex]),this.viewer.loadImage(b,!0,!1,!1),this.loadingImageIndex+=1):(this.params.loadedImages=this.params.images,this.params.images=[]):this.params.binaryImages?this.loadingImageIndex<this.params.binaryImages.length?(a=!0,b=this.params.binaryImages[this.loadingImageIndex],
b instanceof Array||(b=[],b[0]=this.params.binaryImages[this.loadingImageIndex]),this.viewer.loadImage(b,!1,!1,!0),this.loadingImageIndex+=1):(this.params.loadedEncodedImages=this.params.binaryImages,this.params.binaryImages=[]):this.params.encodedImages?this.loadingImageIndex<this.params.encodedImages.length?(a=!0,b=this.params.encodedImages[this.loadingImageIndex],b instanceof Array||(b=[],b[0]=this.params.encodedImages[this.loadingImageIndex]),this.viewer.loadImage(b,!1,!0,!1),this.loadingImageIndex+=
1):(this.params.loadedEncodedImages=this.params.encodedImages,this.params.encodedImages=[]):this.params.files&&(this.loadingImageIndex<this.params.files.length?(a=!0,b=this.params.files[this.loadingImageIndex],b instanceof Array||(b=[],b[0]=this.params.files[this.loadingImageIndex]),this.viewer.loadImage(b,!1,!1,!1),this.loadingImageIndex+=1):(this.params.loadedFiles=this.params.files,this.params.files=[]));return a};
papaya.Container.prototype.readyForDnD=function(){return!this.kioskMode&&(void 0===this.params.images||this.loadingImageIndex>=this.params.images.length)&&(void 0===this.params.binaryImages||this.loadingImageIndex>=this.params.binaryImages.length)&&(void 0===this.params.encodedImages||this.loadingImageIndex>=this.params.encodedImages.length)&&(void 0===this.params.encodedSurfaces||this.loadingSurfaceIndex>=this.params.encodedSurfaces.length)};
papaya.Container.prototype.findLoadableImage=function(a,b){var e;for(e=0;e<papayaLoadableImages.length;e+=1)if(b){if(papayaLoadableImages[e].surface&&papayaLoadableImages[e].name==a)return papayaLoadableImages[e]}else if(papayaLoadableImages[e].name==a)return papayaLoadableImages[e];return void 0!==window[a]?{encode:a}:null};
papaya.Container.prototype.findLoadableImages=function(a,b){var e,d,f=[];Array.isArray(a)||(a=[a]);if(a)for(e=0;e<a.length;e++)(d=this.findLoadableImage(a[e],b))&&f.push(d);return 0<f.length?f:null};
papaya.Container.prototype.expandViewer=function(){var a=this;this.nestedViewer&&(this.nestedViewer=!1,this.collapsable=!0,this.tempScrollTop=$(window).scrollTop(),$(":hidden").addClass(PAPAYA_CONTAINER_COLLAPSABLE_EXEMPT),$(document.body).children().hide(),this.containerHtml.show(),this.originalStyle={},this.originalStyle.width=document.body.style.width,this.originalStyle.height=document.body.style.height,this.originalStyle.marginTop=document.body.style.marginTop,this.originalStyle.marginRight=document.body.style.marginRight,
this.originalStyle.marginBottom=document.body.style.marginBottom,this.originalStyle.marginLeft=document.body.style.marginLeft,this.originalStyle.paddingTop=document.body.style.paddingTop,this.originalStyle.paddingRight=document.body.style.paddingRight,this.originalStyle.paddingBottom=document.body.style.paddingBottom,this.originalStyle.paddingLeft=document.body.style.paddingLeft,this.originalStyle.overflow=document.body.style.overflow,papaya.Container.setToFullPage(),this.containerHtml.after('<div style="display:none" class="'+
PAPAYA_CONTAINER_COLLAPSABLE+'"></div>'),$(document.body).prepend(this.containerHtml),this.resizeViewerComponents(!0),this.viewer.updateOffsetRect(),this.updateViewerSize(),setTimeout(function(){window.scrollTo(0,0);a.viewer.addScroll()},0))};
papaya.Container.prototype.collapseViewer=function(){var a,b;b=this;if(this.collapsable){this.nestedViewer=!0;this.collapsable=!1;document.body.style.width=this.originalStyle.width;document.body.style.height=this.originalStyle.height;document.body.style.marginTop=this.originalStyle.marginTop;document.body.style.marginRight=this.originalStyle.marginRight;document.body.style.marginBottom=this.originalStyle.marginBottom;document.body.style.marginLeft=this.originalStyle.marginLeft;document.body.style.paddingTop=
this.originalStyle.paddingTop;document.body.style.paddingRight=this.originalStyle.paddingRight;document.body.style.paddingBottom=this.originalStyle.paddingBottom;document.body.style.paddingLeft=this.originalStyle.paddingLeft;document.body.style.overflow=this.originalStyle.overflow;$("."+PAPAYA_CONTAINER_COLLAPSABLE).replaceWith(this.containerHtml);$(document.body).children(":not(."+PAPAYA_CONTAINER_COLLAPSABLE_EXEMPT+")").show();$("."+PAPAYA_CONTAINER_COLLAPSABLE_EXEMPT).removeClass(PAPAYA_CONTAINER_COLLAPSABLE_EXEMPT);
this.resizeViewerComponents(!0);for(a=0;a<papayaContainers.length;a+=1)papayaContainers[a].updateViewerSize(),papayaContainers[a].viewer.drawViewer(!0);setTimeout(function(){$(window).scrollTop(b.tempScrollTop);b.viewer.removeScroll()},0)}};papaya.Container.prototype.isNestedViewer=function(){return this.nestedViewer||this.collapsable};papaya.Container.prototype.isDesktopMode=function(){return!this.kioskMode};papaya.Container.prototype.hasLoadedDTI=function(){return this.viewer.hasLoadedDTI()};
papaya.Container.prototype.disableScrollWheel=function(){return this.isNestedViewer()||papaya.utilities.PlatformUtils.ios};papaya.Container.prototype.canOpenInMango=function(){return this.params.canOpenInMango};papaya.Container.prototype.isExpandable=function(){return this.params.expandable&&this.isNestedViewer()};papaya.Container.prototype.isParametricCombined=function(a){return this.combineParametric&&this.viewer.hasParametricPair(a)};papaya.Container.prototype.isNonParametricCombined=function(a){return!this.isParametricCombined(a)};
papaya.Container.prototype.coordinateChanged=function(a){var b,e,d=a.currentCoord;if(!a.ignoreSync)if(papaya.Container.syncViewersWorld)for(b=0;b<papayaContainers.length;b+=1)papayaContainers[b].viewer===a||papayaContainers[b].viewer.ignoreSync||(e=new papaya.core.Coordinate,papayaContainers[b].viewer.gotoWorldCoordinate(a.getWorldCoordinateAtIndex(d.x,d.y,d.z,e),!0));else if(papaya.Container.syncViewers)for(b=0;b<papayaContainers.length;b+=1)papayaContainers[b].viewer===a||papayaContainers[b].viewer.ignoreSync||
papayaContainers[b].viewer.gotoCoordinate(d,!0);a.surfaceView&&a.surfaceView.updateActivePlanes();this.contextManager&&this.contextManager.clearContext&&this.contextManager.clearContext()};papaya.Container.prototype.canCurrentOverlayLoadNegatives=function(){var a=this.viewer.currentScreenVolume;return!a.negative&&null===a.negativeScreenVol};papaya.Container.prototype.canCurrentOverlayLoadMod=function(){var a=this.viewer.currentScreenVolume;return a.dti&&null===a.dtiVolumeMod};
papaya.Container.prototype.canCurrentOverlayModulate=function(){var a=this.viewer.currentScreenVolume;return a.dti&&null!==a.dtiVolumeMod};window.addEventListener("resize",papaya.Container.resizePapaya,!1);window.addEventListener("orientationchange",papaya.Container.reorientPapaya,!1);window.addEventListener("load",papaya.Container.startPapaya,!1);window.addEventListener("message",function(a){a.data===PAPAYA_MANGO_INSTALLED&&(papaya.mangoinstalled=!0)},!1);

