!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.OptimalSelect=t():e.OptimalSelect=t()}(this,function(){return r=[function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertNodeList=function(e){for(var t=e.length,r=new Array(t),i=0;i@~]/g,"\\$&").replace(/\n/g,"A")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCommonAncestor=function(e){for(var t=(1 /g,">").split(/\s+(?=(?:(?:[^"]*"){2})*[^"]*$)/);if(i.length<2)return c("",e,"",t);var n=[i.pop()];for(;1/g,"> ").trim()};var i=r(3),u=(i=i)&&i.__esModule?i:{default:i},h=r(0);function c(r,i,n,o){if(r.length&&(r+=" "),n.length&&(n=" "+n),/\[*\]/.test(i)){var e=i.replace(/=.*$/,"]"),a=""+r+e+n;if(f(document.querySelectorAll(a),o))i=e;else for(var s=document.querySelectorAll(""+r+e),l=0,t=s.length;l/.test(i)&&(e=i.replace(/>/,""),a=""+r+e+n,f(document.querySelectorAll(a),o)&&(i=e)),/:nth-child/.test(i)&&(e=i.replace(/nth-child/g,"nth-of-type"),a=""+r+e+n,f(document.querySelectorAll(a),o)&&(i=e)),/\.\S+\.\S+/.test(i)){for(var u=i.trim().split(".").slice(1).map(function(e){return"."+e}).sort(function(e,t){return e.length-t.length});u.length;){var h=i.replace(u.shift(),"").trim();if(!(a=(""+r+h+n).trim()).length||">"===a.charAt(0)||">"===a.charAt(a.length-1))break;f(document.querySelectorAll(a),o)&&(i=h)}if((u=i&&i.match(/\./g))&&2)(\S)/g,"$1 $2").trim()).split(" ").reverse().map(function(e,t){var r,i,n,o=0===t,t=e.split(":"),e=m(t,2),a=e[0],t=e[1],s=null,l=null;switch(!0){case/>/.test(a):l=function(t){return function(e){return e(t.parent)&&t.parent}};break;case/^\./.test(a):var u=a.substr(1).split(".");s=function(e){var t=e.attribs.class;return t&&u.every(function(e){return-1 "+l+":nth-child("+(a+1)+")",i.unshift(u)):console.warn("\n Element couldn't be matched through strict ignore pattern!\n ",h,r,l)}}(o,l,a,s)}l=l.parentNode,u=s.length}l===i&&(t=m(o,l,a),s.unshift(t));return s.join(" ")};var f=r(0),c={attribute:function(e){return-1<["style","data-reactid","data-react-checksum"].indexOf(e)}};function p(e,t,r,i,n){n=4\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",t=n.console&&(n.console.warn||n.console.log);return t&&t.call(n.console,i,e),r.apply(this,arguments)}}var s="function"!=typeof Object.assign?function(e){if(e===h||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1;rt[r]}):i.sort():i}function d(e,t){for(var r,i=t[0].toUpperCase()+t.slice(1),n=0;nc(a.y)?a.x:a.y,i.scale=s?function(e,t){return O(t[0],t[1],A)/O(e[0],e[1],A)}(s.pointers,t):1,i.rotation=s?function(e,t){return he(t[1],t[0],A)+he(e[1],e[0],A)}(s.pointers,t):0,i.maxPointers=!o.prevInput||i.pointers.length>o.prevInput.maxPointers?i.pointers.length:o.prevInput.maxPointers,function(e,t){var r,i,n,o=e.lastInterval||t,a=t.timeStamp-o.timeStamp;{var s,l;t.eventType!=v&&(rec(a.y)?a.x:a.y,s=ue(s,l),e.lastInterval=t):(r=o.velocity,i=o.velocityX,n=o.velocityY,s=o.direction)}t.velocity=r,t.velocityX=i,t.velocityY=n,t.direction=s}(o,i),n.element);V(i.srcEvent.target,l)&&(l=i.srcEvent.target),i.target=l,e.emit("hammer.input",r),e.recognize(r),e.session.prevInput=r}function ae(e){for(var t=[],r=0;r=c(t)?e<0?b:x:t<0?T:w}function O(e,t,r){var i=t[(r=r||ne)[0]]-e[r[0]],t=t[r[1]]-e[r[1]];return Math.sqrt(i*i+t*t)}function he(e,t,r){var i=t[(r=r||ne)[0]]-e[r[0]],t=t[r[1]]-e[r[1]];return 180*Math.atan2(t,i)/Math.PI}k.prototype={handler:function(){},init:function(){this.evEl&&t(this.element,this.evEl,this.domHandler),this.evTarget&&t(this.target,this.evTarget,this.domHandler),this.evWin&&t(Z(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&i(this.element,this.evEl,this.domHandler),this.evTarget&&i(this.target,this.evTarget,this.domHandler),this.evWin&&i(Z(this.element),this.evWin,this.domHandler)}};var ce={mousedown:_,mousemove:2,mouseup:g};function P(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,k.apply(this,arguments)}e(P,k,{handler:function(e){var t=ce[e.type];t&_&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=g),this.pressed&&(t&g&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:te,srcEvent:e}))}});var fe={pointerdown:_,pointermove:2,pointerup:g,pointercancel:v,pointerout:v},pe={2:m,3:"pen",4:te,5:"kinect"},de="pointerdown",me="pointermove pointerup pointercancel";function _e(){this.evEl=de,this.evWin=me,k.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}n.MSPointerEvent&&!n.PointerEvent&&(de="MSPointerDown",me="MSPointerMove MSPointerUp MSPointerCancel"),e(_e,k,{handler:function(e){var t=this.store,r=!1,i=e.type.toLowerCase().replace("ms",""),i=fe[i],n=pe[e.pointerType]||e.pointerType,o=n==m,a=f(t,e.pointerId,"pointerId");i&_&&(0===e.button||o)?a<0&&(t.push(e),a=t.length-1):i&(g|v)&&(r=!0),a<0||(t[a]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:n,srcEvent:e}),r&&t.splice(a,1))}});var ge={touchstart:_,touchmove:2,touchend:g,touchcancel:v};function ve(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,k.apply(this,arguments)}e(ve,k,{handler:function(e){var t,r=ge[e.type];r===_&&(this.started=!0),this.started&&(t=function(e,t){var r=p(e.touches),e=p(e.changedTouches);t&(g|v)&&(r=K(r.concat(e),"identifier",!0));return[r,e]}.call(this,e,r),r&(g|v)&&t[0].length-t[1].length==0&&(this.started=!1),this.callback(this.manager,r,{pointers:t[0],changedPointers:t[1],pointerType:m,srcEvent:e}))}});var ye={touchstart:_,touchmove:2,touchend:g,touchcancel:v};function be(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},k.apply(this,arguments)}e(be,k,{handler:function(e){var t=ye[e.type],r=function(e,t){var r=p(e.touches),i=this.targetIds;if(t&(2|_)&&1===r.length)return i[r[0].identifier]=!0,[r,r];var n,o,a=p(e.changedTouches),s=[],l=this.target;if(o=r.filter(function(e){return V(e.target,l)}),t===_)for(n=0;nt.threshold&&n&t.direction},attrTest:function(e){return D.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=Ie(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),e(Fe,D,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[R]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){var t;1!==e.scale&&(t=e.scale<1?"in":"out",e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),e(Ne,I,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(e){var t=this.options,r=e.pointers.length===t.pointers,i=e.distancet.time;if(this._input=e,!i||!r||e.eventType&(g|v)&&!n)this.reset();else if(e.eventType&_)this.reset(),this._timer=U(function(){this.state=8,this.tryEmit()},t.time,this);else if(e.eventType&g)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&e.eventType&g?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=j(),this.manager.emit(this.options.event,this._input)))}}),e(ze,D,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[R]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),e(Be,D,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:E|S,pointers:1},getTouchAction:function(){return Le.prototype.getTouchAction.call(this)},attrTest:function(e){var t,r=this.options.direction;return r&(E|S)?t=e.overallVelocity:r&E?t=e.overallVelocityX:r&S&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&r&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&c(t)>this.options.velocity&&e.eventType&g},emit:function(e){var t=Ie(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),e(je,I,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Pe]},process:function(e){var t=this.options,r=e.pointers.length===t.pointers,i=e.distance=i.next.y&&i.next.y!==i.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=n&&a=i.x&&i.x>=h&&n!==i.x&&be(or.x||i.x===r.x&&function(e,t){return xe(e.prev,e,t.prev)<0&&xe(t.next,e,e.next)<0}(r,i)))&&(r=i,f=l)),i=i.next,i!==u;);return r}(e,t);return r?(_e(e=ke(r,e),e.next),_e(r,r.next)):t}(l[n],r);return r}(e,t,h,r)),e.length>80*r){for(var f=i=e[0],p=n=e[1],d=r;d=g&&b&&b.z<=v;){if(y.x>=p&&y.x<=m&&y.y>=d&&y.y<=_&&y!==n&&y!==a&&be(s,h,l,c,u,f,y.x,y.y)&&0<=xe(y.prev,y,y.next))return;if(y=y.prevZ,b.x>=p&&b.x<=m&&b.y>=d&&b.y<=_&&b!==n&&b!==a&&be(s,h,l,c,u,f,b.x,b.y)&&0<=xe(b.prev,b,b.next))return;b=b.nextZ}for(;y&&y.z>=g;){if(y.x>=p&&y.x<=m&&y.y>=d&&y.y<=_&&y!==n&&y!==a&&be(s,h,l,c,u,f,y.x,y.y)&&0<=xe(y.prev,y,y.next))return;y=y.prevZ}for(;b&&b.z<=v;){if(b.x>=p&&b.x<=m&&b.y>=d&&b.y<=_&&b!==n&&b!==a&&be(s,h,l,c,u,f,b.x,b.y)&&0<=xe(b.prev,b,b.next))return;b=b.nextZ}return 1}(e,i,n,o):function(e){var t=e.prev,r=e,e=e.next;if(0<=xe(t,r,e))return;var i=t.x,n=r.x,o=e.x,a=t.y,s=r.y,l=e.y,u=i=u&&p.x<=c&&p.y>=h&&p.y<=f&&be(i,a,n,s,o,l,p.x,p.y)&&0<=xe(p.prev,p,p.next))return;p=p.next}return 1}(e))t.push(T.i/r|0),t.push(e.i/r|0),t.push(w.i/r|0),Pe(e),e=w.next,E=w.next;else if((e=w)===E){a?1===a?ge(e=function(e,t,r){var i=e;do{var n=i.prev,o=i.next.next}while(!Te(n,o)&&we(n,i,i.next,o)&&Ae(n,o)&&Ae(o,n)&&(t.push(n.i/r|0),t.push(i.i/r|0),t.push(o.i/r|0),Pe(i),Pe(i.next),i=e=o),i=i.next,i!==e);return _e(i)}(_e(e),t,r),t,r,i,n,o,2):2===a&&function(e,t,r,i,n,o){var a=e;do{for(var s,l=a.next.next;l!==a.prev;){if(a.i!==l.i&&function(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&we(r,r.next,e,t))return 1}while(r=r.next,r!==e);return}(e,t)&&(Ae(e,t)&&Ae(t,e)&&function(e,t){var r=e,i=!1,n=(e.x+t.x)/2,o=(e.y+t.y)/2;for(;r.y>o!=r.next.y>o&&r.next.y!==r.y&&n<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next,r!==e;);return i}(e,t)&&(xe(e.prev,e,t.prev)||xe(e,t.prev,t))||Te(e,t)&&0=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function Se(e){return 0= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=g-1,y=Math.floor,b=String.fromCharCode;function x(e){throw RangeError(f[e])}function d(e,t){for(var r=e.length,i=[];r--;)i[r]=t(e[r]);return i}function m(e,t){var r=e.split("@"),i="",r=(1>>10&1023|55296),e=56320|1023&e),t+=b(e)}).join("")}function E(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function S(e,t,r){var i=0;for(e=r?y(e/l):e>>1,e+=y(e/t);p*v>>1y((_-h)/o))&&x("overflow"),h+=s*o,!(s<(s=a<=f?1:f+v<=a?v:a-f));a+=g)o>y(_/(s=g-s))&&x("overflow"),o*=s;f=S(h-n,t=l.length+1,0==n),y(h/t)>_-c&&x("overflow"),c+=y(h/t),h%=t,l.splice(h++,0,c)}return w(l)}function k(e){for(var t,r,i,n,o,a,s,l,u,h,c=[],f=(e=T(e)).length,p=128,d=72,m=t=0;my((_-t)/(l=r+1))&&x("overflow"),t+=(n-p)*l,p=n,m=0;m_&&x("overflow"),s==p){for(o=t,a=g;!(o<(u=a<=d?1:d+v<=a?v:a-d));a+=g)c.push(b(E(u+(h=o-u)%(u=g-u),0))),o=y(h/u);c.push(b(E(o,0))),d=S(t,l,r==i),t=0,++r}++t,++p}return c.join("")}if(o={version:"1.3.2",ucs2:{decode:T,encode:w},decode:A,encode:k,toASCII:function(e){return m(e,function(e){return h.test(e)?"xn--"+k(e):e})},toUnicode:function(e){return m(e,function(e){return u.test(e)?A(e.slice(4).toLowerCase()):e})}},i&&t)if(e.exports==i)t.exports=o;else for(a in o)o.hasOwnProperty(a)&&(i[a]=o[a]);else r.punycode=o}),Ie=function(e){return"string"==typeof e},De=function(e){return"object"==typeof e&&null!==e},Le=function(e){return null===e},Fe=function(e){return null==e};function Ne(e,t,r,i){t=t||"&",r=r||"=";var n={};if("string"==typeof e&&0!==e.length){var o=/\+/g,t=(e=e.split(t),1e3),a=(i&&"number"==typeof i.maxKeys&&(t=i.maxKeys),e.length);0",'"',"`"," ","\r","\n","\t"]),Ve=["'"].concat(r),Ke=["%","/","?",";","#"].concat(Ve),Je=["/","?","#"],Ze=/^[+a-z0-9A-Z_-]{0,63}$/,Qe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,$e={javascript:!0,"javascript:":!0},et={javascript:!0,"javascript:":!0},tt={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function rt(e,t,r){var i;return e&&De(e)&&e instanceof He?e:((i=new He).parse(e,t,r),i)}He.prototype.parse=function(e,t,r){if(!Ie(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),i=-1!==i&&i]*?)$/i.test(e)},hasProtocol:function(e){return/^[^/:]+:\//.test(this.toPosix(e))},getProtocol:function(e){ot(e),e=this.toPosix(e);var t="",r=/^file:\/\/\//.exec(e),i=/^[^/:]+:\/\//.exec(e),n=/^[^/:]+:\//.exec(e);return(r||i||n)&&(r=(null==r?void 0:r[0])||(null==i?void 0:i[0])||(null==n?void 0:n[0]),e=e.slice((t=r).length)),t},toAbsolute:function(e,t,r){return this.isDataUrl(e)?e:(t=at(this.toPosix(null!=t?t:R.ADAPTER.getBaseUrl())),r=at(this.toPosix(null!=r?r:this.rootname(t))),ot(e),(e=this.toPosix(e)).startsWith("/")?lt.join(r,e.slice(1)):this.isAbsolute(e)?e:this.join(t,e))},normalize:function(e){var t,r,i;return ot(e=this.toPosix(e)),0===e.length?".":(t="",r=e.startsWith("/"),this.hasProtocol(e)&&(t=this.rootname(e),e=e.slice(t.length)),i=e.endsWith("/"),0<(e=function(e,t){for(var r,i="",n=0,o=-1,a=0,s=0;s<=e.length;++s){if(s>16&255)/255,t[1]=(e>>8&255)/255,t[2]=(255&e)/255,t}function dt(e){e=e.toString(16);return"#"+("000000".substring(0,6-e.length)+e)}function mt(e){return"string"==typeof e&&"#"===(e=ft[e.toLowerCase()]||e)[0]&&(e=e.slice(1)),parseInt(e,16)}var _t=function(){for(var e=[],t=[],r=0;r<32;r++)t[e[r]=r]=r;e[$.BLEND_MODES.NORMAL_NPM]=$.BLEND_MODES.NORMAL,e[$.BLEND_MODES.ADD_NPM]=$.BLEND_MODES.ADD,e[$.BLEND_MODES.SCREEN_NPM]=$.BLEND_MODES.SCREEN,t[$.BLEND_MODES.NORMAL]=$.BLEND_MODES.NORMAL_NPM,t[$.BLEND_MODES.ADD]=$.BLEND_MODES.ADD_NPM,t[$.BLEND_MODES.SCREEN]=$.BLEND_MODES.SCREEN_NPM;var i=[];return i.push(t),i.push(e),i}();function gt(e,t){return _t[t?1:0][e]}function vt(e,t,r,i){return r=r||new Float32Array(4),i||void 0===i?(r[0]=e[0]*t,r[1]=e[1]*t,r[2]=e[2]*t):(r[0]=e[0],r[1]=e[1],r[2]=e[2]),r[3]=t,r}function yt(e,t){return 1===t?(255*t<<24)+e:0===t?0:(255*t<<24)+(((e>>16&255)*t+.5|0)<<16)+(((e>>8&255)*t+.5|0)<<8)+((255&e)*t+.5|0)}function bt(e,t,r,i){return(r=r||new Float32Array(4))[0]=(e>>16&255)/255,r[1]=(e>>8&255)/255,r[2]=(255&e)/255,!i&&void 0!==i||(r[0]*=t,r[1]*=t,r[2]*=t),r[3]=t,r}function xt(e,t){var r=6*e;if((t=(t=void 0===t?null:t)||new Uint16Array(r)).length!==r)throw new Error("Out buffer length is incorrect, got "+t.length+" and expected "+r);for(var i=0,n=0;i>>1)|e>>>2)|e>>>4)|e>>>8)|e>>>16)+1}function St(e){return!(e&e-1||!e)}function At(e){var t=(65535>>=t)?1:0)<<3;return(t|=r)|(r=(15<(e>>>=r)?1:0)<<2)|(r=(3<(e>>>=r)?1:0)<<1)|(e>>>=r)>>1}function kt(e,t,r){var i=e.length;if(!(i<=t||0===r)){for(var n=i-(r=i=this.x&&e=this.y&&t=i||Math.max(a.y,d.y,s.y,l.y)<=n||Math.min(a.y,d.y,s.y,l.y)>=o)&&(h=(t=u*(d.y-a.y))*r+(d=u*(a.x-d.x))*n,c=t*i+d*n,f=t*r+d*o,p=t*i+d*o,!(Math.max(h,c,f,p)<=t*a.x+d*a.y||Math.min(h,c,f,p)>=t*l.x+d*l.y)&&(f=(h=u*(a.y-s.y))*r+(c=u*(s.x-a.x))*n,p=h*i+c*n,t=h*r+c*o,d=h*i+c*o,!(Math.max(f,p,t,d)<=h*a.x+c*a.y||Math.min(f,p,t,d)>=h*l.x+c*l.y))))))):(u=(this.xe.right?e:this).right<=u)&&(this.ye.bottom?e:this).bottom)},Kt.prototype.pad=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=e),this.x-=e,this.y-=t,this.width+=2*e,this.height+=2*t,this},Kt.prototype.fit=function(e){var t=Math.max(this.x,e.x),r=Math.min(this.x+this.width,e.x+e.width),i=Math.max(this.y,e.y),e=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.width=Math.max(r-t,0),this.y=i,this.height=Math.max(e-i,0),this},Kt.prototype.ceil=function(e,t){void 0===e&&(e=1),void 0===t&&(t=.001);var r=Math.ceil((this.x+this.width-t)*e)/e,i=Math.ceil((this.y+this.height-t)*e)/e;return this.x=Math.floor((this.x+t)*e)/e,this.y=Math.floor((this.y+t)*e)/e,this.width=r-this.x,this.height=i-this.y,this},Kt.prototype.enlarge=function(e){var t=Math.min(this.x,e.x),r=Math.max(this.x+this.width,e.x+e.width),i=Math.min(this.y,e.y),e=Math.max(this.y+this.height,e.y+e.height);return this.x=t,this.width=r-t,this.y=i,this.height=e-i,this},Kt.prototype.toString=function(){return"[@pixi/math:Rectangle x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+"]"},Kt);function Kt(e,t,r,i){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0),void 0===i&&(i=0),this.x=Number(e),this.y=Number(t),this.width=Number(r),this.height=Number(i),this.type=$.SHAPES.RECT}Zt.prototype.clone=function(){return new Zt(this.x,this.y,this.radius)},Zt.prototype.contains=function(e,t){var r;return!(this.radius<=0)&&(r=this.radius*this.radius,e=this.x-e,t=this.y-t,(e*=e)+(t*=t)<=r)},Zt.prototype.getBounds=function(){return new w(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)},Zt.prototype.toString=function(){return"[@pixi/math:Circle x="+this.x+" y="+this.y+" radius="+this.radius+"]"};var Jt=Zt;function Zt(e,t,r){void 0===t&&(t=0),void 0===r&&(r=0),this.x=e=void 0===e?0:e,this.y=t,this.radius=r,this.type=$.SHAPES.CIRC}$t.prototype.clone=function(){return new $t(this.x,this.y,this.width,this.height)},$t.prototype.contains=function(e,t){return!(this.width<=0||this.height<=0)&&(e=(e-this.x)/this.width,t=(t-this.y)/this.height,(e*=e)+(t*=t)<=1)},$t.prototype.getBounds=function(){return new w(this.x-this.width,this.y-this.height,this.width,this.height)},$t.prototype.toString=function(){return"[@pixi/math:Ellipse x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+"]"};var Qt=$t;function $t(e,t,r,i){void 0===t&&(t=0),void 0===r&&(r=0),void 0===i&&(i=0),this.x=e=void 0===e?0:e,this.y=t,this.width=r,this.height=i,this.type=$.SHAPES.ELIP}tr.prototype.clone=function(){var e=new tr(this.points.slice());return e.closeStroke=this.closeStroke,e},tr.prototype.contains=function(e,t){for(var r=!1,i=this.points.length/2,n=0,o=i-1;n=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height){var r=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(t>=this.y+r&&t<=this.y+this.height-r||e>=this.x+r&&e<=this.x+this.width-r)return!0;var i=e-(this.x+r),n=t-(this.y+r),o=r*r;if(i*i+n*n<=o)return!0;if((i=e-(this.x+this.width-r))*i+n*n<=o)return!0;if(i*i+(n=t-(this.y+this.height-r))*n<=o)return!0;if((i=e-(this.x+r))*i+n*n<=o)return!0}return!1},ir.prototype.toString=function(){return"[@pixi/math:RoundedRectangle x="+this.x+" y="+this.y+"width="+this.width+" height="+this.height+" radius="+this.radius+"]"};var rr=ir;function ir(e,t,r,i,n){void 0===t&&(t=0),void 0===r&&(r=0),void 0===i&&(i=0),void 0===n&&(n=20),this.x=e=void 0===e?0:e,this.y=t,this.width=r,this.height=i,this.radius=n,this.type=$.SHAPES.RREC}or.prototype.clone=function(e,t){return new or(e=void 0===e?this.cb:e,t=void 0===t?this.scope:t,this._x,this._y)},or.prototype.set=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=e),this._x===e&&this._y===t||(this._x=e,this._y=t,this.cb.call(this.scope)),this},or.prototype.copyFrom=function(e){return this._x===e.x&&this._y===e.y||(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this},or.prototype.copyTo=function(e){return e.set(this._x,this._y),e},or.prototype.equals=function(e){return e.x===this._x&&e.y===this._y},or.prototype.toString=function(){return"[@pixi/math:ObservablePoint x=0 y=0 scope="+this.scope+"]"},Object.defineProperty(or.prototype,"x",{get:function(){return this._x},set:function(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(or.prototype,"y",{get:function(){return this._y},set:function(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))},enumerable:!1,configurable:!0});var nr=or;function or(e,t,r,i){void 0===i&&(i=0),this._x=r=void 0===r?0:r,this._y=i,this.cb=e,this.scope=t}sr.prototype.fromArray=function(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]},sr.prototype.set=function(e,t,r,i,n,o){return this.a=e,this.b=t,this.c=r,this.d=i,this.tx=n,this.ty=o,this},sr.prototype.toArray=function(e,t){this.array||(this.array=new Float32Array(9));t=t||this.array;return e?(t[0]=this.a,t[1]=this.b,t[2]=0,t[3]=this.c,t[4]=this.d,t[5]=0,t[6]=this.tx,t[7]=this.ty):(t[0]=this.a,t[1]=this.c,t[2]=this.tx,t[3]=this.b,t[4]=this.d,t[5]=this.ty,t[6]=0,t[7]=0),t[8]=1,t},sr.prototype.apply=function(e,t){t=t||new ee;var r=e.x,e=e.y;return t.x=this.a*r+this.c*e+this.tx,t.y=this.b*r+this.d*e+this.ty,t},sr.prototype.applyInverse=function(e,t){t=t||new ee;var r=1/(this.a*this.d+this.c*-this.b),i=e.x,e=e.y;return t.x=this.d*r*i+-this.c*r*e+(this.ty*this.c-this.tx*this.d)*r,t.y=this.a*r*e+-this.b*r*i+(-this.ty*this.a+this.tx*this.b)*r,t},sr.prototype.translate=function(e,t){return this.tx+=e,this.ty+=t,this},sr.prototype.scale=function(e,t){return this.a*=e,this.d*=t,this.c*=e,this.b*=t,this.tx*=e,this.ty*=t,this},sr.prototype.rotate=function(e){var t=Math.cos(e),e=Math.sin(e),r=this.a,i=this.c,n=this.tx;return this.a=r*t-this.b*e,this.b=r*e+this.b*t,this.c=i*t-this.d*e,this.d=i*e+this.d*t,this.tx=n*t-this.ty*e,this.ty=n*e+this.ty*t,this},sr.prototype.append=function(e){var t=this.a,r=this.b,i=this.c,n=this.d;return this.a=e.a*t+e.b*i,this.b=e.a*r+e.b*n,this.c=e.c*t+e.d*i,this.d=e.c*r+e.d*n,this.tx=e.tx*t+e.ty*i+this.tx,this.ty=e.tx*r+e.ty*n+this.ty,this},sr.prototype.setTransform=function(e,t,r,i,n,o,a,s,l){return this.a=Math.cos(a+l)*n,this.b=Math.sin(a+l)*n,this.c=-Math.sin(a-s)*o,this.d=Math.cos(a-s)*o,this.tx=e-(r*this.a+i*this.c),this.ty=t-(r*this.b+i*this.d),this},sr.prototype.prepend=function(e){var t,r,i=this.tx;return 1===e.a&&0===e.b&&0===e.c&&1===e.d||(t=this.a,r=this.c,this.a=t*e.a+this.b*e.c,this.b=t*e.b+this.b*e.d,this.c=r*e.a+this.d*e.c,this.d=r*e.b+this.d*e.d),this.tx=i*e.a+this.ty*e.c+e.tx,this.ty=i*e.b+this.ty*e.d+e.ty,this},sr.prototype.decompose=function(e){var t=this.a,r=this.b,i=this.c,n=this.d,o=e.pivot,a=-Math.atan2(-i,n),s=Math.atan2(r,t),l=Math.abs(a+s);return l<1e-5||Math.abs(Ht-l)<1e-5?(e.rotation=s,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=a,e.skew.y=s),e.scale.x=Math.sqrt(t*t+r*r),e.scale.y=Math.sqrt(i*i+n*n),e.position.x=this.tx+(o.x*t+o.y*i),e.position.y=this.ty+(o.x*r+o.y*n),e},sr.prototype.invert=function(){var e=this.a,t=this.b,r=this.c,i=this.d,n=this.tx,o=e*i-t*r;return this.a=i/o,this.b=-t/o,this.c=-r/o,this.d=e/o,this.tx=(r*this.ty-i*n)/o,this.ty=-(e*this.ty-t*n)/o,this},sr.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},sr.prototype.clone=function(){var e=new sr;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},sr.prototype.copyTo=function(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},sr.prototype.copyFrom=function(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this},sr.prototype.toString=function(){return"[@pixi/math:Matrix a="+this.a+" b="+this.b+" c="+this.c+" d="+this.d+" tx="+this.tx+" ty="+this.ty+"]"},Object.defineProperty(sr,"IDENTITY",{get:function(){return new sr},enumerable:!1,configurable:!0}),Object.defineProperty(sr,"TEMP_MATRIX",{get:function(){return new sr},enumerable:!1,configurable:!0});var ar=sr;function sr(e,t,r,i,n,o){void 0===e&&(e=1),void 0===t&&(t=0),void 0===r&&(r=0),void 0===i&&(i=1),void 0===n&&(n=0),void 0===o&&(o=0),this.array=null,this.a=e,this.b=t,this.c=r,this.d=i,this.tx=n,this.ty=o}var lr=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],ur=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],hr=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],cr=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],fr=[],pr=[],dr=Math.sign;for(var mr=0;mr<16;mr++){var _r=[];fr.push(_r);for(var gr=0;gr<16;gr++)for(var vr=dr(lr[mr]*lr[gr]+hr[mr]*ur[gr]),yr=dr(ur[mr]*lr[gr]+cr[mr]*ur[gr]),br=dr(lr[mr]*hr[gr]+hr[mr]*cr[gr]),xr=dr(ur[mr]*hr[gr]+cr[mr]*cr[gr]),Tr=0;Tr<16;Tr++)if(lr[Tr]===vr&&ur[Tr]===yr&&hr[Tr]===br&&cr[Tr]===xr){_r.push(Tr);break}}for(mr=0;mr<16;mr++){var wr=new ar;wr.set(lr[mr],ur[mr],hr[mr],cr[mr],0,0),pr.push(wr)}var Er={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(e){return lr[e]},uY:function(e){return ur[e]},vX:function(e){return hr[e]},vY:function(e){return cr[e]},inv:function(e){return 8&e?15&e:7&-e},add:function(e,t){return fr[e][t]},sub:function(e,t){return fr[e][Er.inv(t)]},rotate180:function(e){return 4^e},isVertical:function(e){return 2==(3&e)},byDirection:function(e,t){return 2*Math.abs(e)<=Math.abs(t)?0<=t?Er.S:Er.N:2*Math.abs(t)<=Math.abs(e)?0this.maxX||this.minY>this.maxY},Or.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},Or.prototype.getRectangle=function(e){return this.minX>this.maxX||this.minY>this.maxY?w.EMPTY:((e=e||new w(0,0,1,1)).x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)},Or.prototype.addPoint=function(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)},Or.prototype.addPointMatrix=function(e,t){var r=e.a,i=e.b,n=e.c,o=e.d,a=e.tx,e=e.ty,r=r*t.x+n*t.y+a,n=i*t.x+o*t.y+e;this.minX=Math.min(this.minX,r),this.maxX=Math.max(this.maxX,r),this.minY=Math.min(this.minY,n),this.maxY=Math.max(this.maxY,n)},Or.prototype.addQuad=function(e){var t=this.minX,r=this.minY,i=this.maxX,n=this.maxY,o=e[0],a=e[1],t=oi?e.maxX:i,this.maxY=e.maxY>n?e.maxY:n},Or.prototype.addBoundsMask=function(e,t){var r,i,n,o=(e.minX>t.minX?e:t).minX,a=(e.minY>t.minY?e:t).minY,s=(e.maxXt.x?e.minX:t.x,a=e.minY>t.y?e.minY:t.y,s=e.maxXr?this.maxX:r,this.minY=this.minYi?this.maxY:i};var kr=Or;function Or(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}var Pr=function(e,t){return(Pr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function Rr(e,t){function r(){this.constructor=e}Pr(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}Rr(l,Cr=re),l.mixin=function(e){for(var t=Object.keys(e),r=0;rthis.children.length)throw new Error(e+"addChildAt: The index "+t+" supplied is out of bounds "+this.children.length);return e.parent&&e.parent.removeChild(e),(e.parent=this).sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),this.emit("childAdded",e,this,t),e},u.prototype.swapChildren=function(e,t){var r,i;e!==t&&(r=this.getChildIndex(e),i=this.getChildIndex(t),this.children[r]=t,this.children[i]=e,this.onChildrenChange(r=this.children.length)throw new Error("The index "+t+" supplied is out of bounds "+this.children.length);var r=this.getChildIndex(e);kt(this.children,r,1),this.children.splice(t,0,e),this.onChildrenChange(t)},u.prototype.getChildAt=function(e){if(e<0||e>=this.children.length)throw new Error("getChildAt: Index ("+e+") does not exist.");return this.children[e]},u.prototype.removeChild=function(){for(var e=arguments,t=[],r=0;rt.priority){e.connect(r);break}t=(r=t).next}e.previous||e.connect(r)}else e.connect(r);return this._startIfPossible(),this},h.prototype.remove=function(e,t){for(var r=this._head.next;r;)r=r.match(e,t)?r.destroy():r.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(h.prototype,"count",{get:function(){if(!this._head)return 0;for(var e=0,t=this._head;t=t.next;)e++;return e},enumerable:!1,configurable:!0}),h.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},h.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},h.prototype.destroy=function(){if(!this._protected){this.stop();for(var e=this._head.next;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}},h.prototype.update=function(e){var t;if((e=void 0===e?performance.now():e)>this.lastTime){if((t=this.elapsedMS=e-this.lastTime)>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){var r=e-this._lastFrame|0;if(r)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;var yi,d=bi;function bi(e,t){var r=this;return t=t||{},(r=yi.call(this,R.ADAPTER.createCanvas())||this)._width=0,r._height=0,r.svg=e,r.scale=t.scale||1,r._overrideWidth=t.width,r._overrideHeight=t.height,r._resolve=null,r._crossorigin=t.crossorigin,r._load=null,!1!==t.autoLoad&&r.load(),r}c(wi,xi=hi),wi.prototype.update=function(e){var t;this.destroyed||(t=Wr.shared.elapsedMS*this.source.playbackRate,this._msToNextUpdate=Math.floor(this._msToNextUpdate-t),(!this._updateFPS||this._msToNextUpdate<=0)&&(xi.prototype.update.call(this),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0))},wi.prototype.load=function(){var t,r=this;return this._load||(((t=this.source).readyState===t.HAVE_ENOUGH_DATA||t.readyState===t.HAVE_FUTURE_DATA)&&t.width&&t.height&&(t.complete=!0),t.addEventListener("play",this._onPlayStart.bind(this)),t.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(t.addEventListener("canplay",this._onCanPlay),t.addEventListener("canplaythrough",this._onCanPlay),t.addEventListener("error",this._onError,!0)),this._load=new Promise(function(e){r.valid?e(r):(r._resolve=e,t.load())})),this._load},wi.prototype._onError=function(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e)},wi.prototype._isSourcePlaying=function(){var e=this.source;return 0this.baseTexture.width,a=r+n>this.baseTexture.height;if(o||a)throw t="X: "+t+" + "+i+" = "+(t+i)+" > "+this.baseTexture.width,r="Y: "+r+" + "+n+" = "+(r+n)+" > "+this.baseTexture.height,new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+t+" "+(o&&a?"and":"or")+" "+r);this.valid=i&&n&&this.baseTexture.valid,this.trim||this.rotate||(this.orig=e),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"rotate",{get:function(){return this._rotate},set:function(e){this._rotate=e,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"width",{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"height",{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),m.prototype.castToBaseTexture=function(){return this.baseTexture},Object.defineProperty(m,"EMPTY",{get:function(){return m._EMPTY||(Bi(m._EMPTY=new m(new C)),Bi(m._EMPTY.baseTexture)),m._EMPTY},enumerable:!1,configurable:!0}),Object.defineProperty(m,"WHITE",{get:function(){var e,t;return m._WHITE||(t=(e=R.ADAPTER.createCanvas(16,16)).getContext("2d"),e.width=16,e.height=16,t.fillStyle="white",t.fillRect(0,0,16,16),Bi(m._WHITE=new m(C.from(e))),Bi(m._WHITE.baseTexture)),m._WHITE},enumerable:!1,configurable:!0});var ji,te=m;function m(e,t,r,i,n,o){var a=ji.call(this)||this;if(a.noFrame=!1,t||(a.noFrame=!0,t=new w(0,0,1,1)),e instanceof m&&(e=e.baseTexture),a.baseTexture=e,a._frame=t,a.trim=i,a.valid=!1,a._uvs=zi,a.uvMatrix=null,a.orig=r||t,a._rotate=Number(n||0),!0===n)a._rotate=2;else if(a._rotate%2!=0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");return a.defaultAnchor=o?new ee(o.x,o.y):new ee(0,0),a._updateID=0,a.textureCacheIds=[],e.valid?a.noFrame?e.valid&&a.onBaseTextureUpdated(e):a.frame=t:e.once("loaded",a.onBaseTextureUpdated,a),a.noFrame&&e.on("update",a.onBaseTextureUpdated,a),a}c(Xi,Ui=te),Object.defineProperty(Xi.prototype,"framebuffer",{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),Object.defineProperty(Xi.prototype,"multisample",{get:function(){return this.framebuffer.multisample},set:function(e){this.framebuffer.multisample=e},enumerable:!1,configurable:!0}),Xi.prototype.resize=function(e,t,r){void 0===r&&(r=!0);var i=this.baseTexture.resolution,e=Math.round(e*i)/i,t=Math.round(t*i)/i;this.valid=0>>0,1=$.ENV.WEBGL2?e.getContext("webgl2",t):r)this.webGLVersion=2;else if(this.webGLVersion=1,!(r=e.getContext("webgl",t)||e.getContext("experimental-webgl",t)))throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=r,this.getExtensions(),this.gl},Sn.prototype.getExtensions=function(){var e=this.gl,t={anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc")};1===this.webGLVersion?Object.assign(this.extensions,t,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),loseContext:e.getExtension("WEBGL_lose_context"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_half_float_linear")}):2===this.webGLVersion&&Object.assign(this.extensions,t,{colorBufferFloat:e.getExtension("EXT_color_buffer_float")})},Sn.prototype.handleContextLost=function(e){e.preventDefault()},Sn.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},Sn.prototype.destroy=function(){var e=this.renderer.view;this.renderer=null,e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},Sn.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},Sn.prototype.validateContext=function(e){var t=e.getContextAttributes(),r="WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext,t=(r&&(this.webGLVersion=2),t&&!t.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly"),r||!!e.getExtension("OES_element_index_uint"));(this.supports.uint32Indices=t)||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")},Sn);function Sn(e){this.renderer=e,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this),e.view.addEventListener("webglcontextlost",this.handleContextLost,!1),e.view.addEventListener("webglcontextrestored",this.handleContextRestored,!1)}var An=function(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=$.MSAA_QUALITY.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0},kn=new w,On=(Pn.prototype.contextChange=function(){var t,e,r=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new w,this.hasMRT=!0,this.writeDepthTexture=!0,this.disposeAll(!0),1===this.renderer.context.webGLVersion?(t=this.renderer.context.extensions.drawBuffers,e=this.renderer.context.extensions.depthTexture,R.PREFER_ENV===$.ENV.WEBGL_LEGACY&&(e=t=null),t?r.drawBuffers=function(e){return t.drawBuffersWEBGL(e)}:(this.hasMRT=!1,r.drawBuffers=function(){}),e||(this.writeDepthTexture=!1)):this.msaaSamples=r.getInternalformatParameter(r.RENDERBUFFER,r.RGBA8,r.SAMPLES)},Pn.prototype.bind=function(e,t,r){void 0===r&&(r=0);var i=this.gl;if(e){var n=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,i.bindFramebuffer(i.FRAMEBUFFER,n.framebuffer)),n.mipLevel!==r&&(e.dirtyId++,e.dirtyFormat++,n.mipLevel=r),n.dirtyId!==e.dirtyId&&(n.dirtyId=e.dirtyId,n.dirtyFormat!==e.dirtyFormat?(n.dirtyFormat=e.dirtyFormat,n.dirtySize=e.dirtySize,this.updateFramebuffer(e,r)):n.dirtySize!==e.dirtySize&&(n.dirtySize=e.dirtySize,this.resizeFramebuffer(e)));for(var o,a,s=0;s>r,a=t.height>>r,n=o/t.width,this.setViewport(t.x*n,t.y*n,o,a)):(o=e.width>>r,a=e.height>>r,this.setViewport(0,0,o,a))}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),t?this.setViewport(t.x,t.y,t.width,t.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)},Pn.prototype.setViewport=function(e,t,r,i){var n=this.viewport;e=Math.round(e),t=Math.round(t),r=Math.round(r),i=Math.round(i),n.width===r&&n.height===i&&n.x===e&&n.y===t||(n.x=e,n.y=t,n.width=r,n.height=i,this.gl.viewport(e,t,r,i))},Object.defineProperty(Pn.prototype,"size",{get:function(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}},enumerable:!1,configurable:!0}),Pn.prototype.clear=function(e,t,r,i,n){void 0===n&&(n=$.BUFFER_BITS.COLOR|$.BUFFER_BITS.DEPTH);var o=this.gl;o.clearColor(e,t,r,i),o.clear(n)},Pn.prototype.initFramebuffer=function(e){var t=this.gl,t=new An(t.createFramebuffer());return t.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=t,this.managedFramebuffers.push(e),e.disposeRunner.add(this),t},Pn.prototype.resizeFramebuffer=function(e){var t=this.gl,r=e.glFramebuffers[this.CONTEXT_UID],i=(r.msaaBuffer&&(t.bindRenderbuffer(t.RENDERBUFFER,r.msaaBuffer),t.renderbufferStorageMultisample(t.RENDERBUFFER,r.multisample,t.RGBA8,e.width,e.height)),r.stencil&&(t.bindRenderbuffer(t.RENDERBUFFER,r.stencil),r.msaaBuffer?t.renderbufferStorageMultisample(t.RENDERBUFFER,r.multisample,t.DEPTH24_STENCIL8,e.width,e.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,e.width,e.height)),e.colorTextures),n=i.length;t.drawBuffers||(n=Math.min(n,1));for(var o=0;o=$.ENV.WEBGL2?e.getContext("webgl2",{}):t)||((t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}))?t.getExtension("WEBGL_draw_buffers"):t=null),Un=t),Un}function Xn(e,t,r){return"precision"!==e.substring(0,9)?"precision "+(t===$.PRECISION.HIGH&&r!==$.PRECISION.HIGH?$.PRECISION.MEDIUM:t)+" float;\n"+e:r!==$.PRECISION.HIGH&&"precision highp"===e.substring(0,15)?e.replace("precision highp","precision mediump"):e}var Hn={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function Yn(e){return Hn[e]}var Wn=null,qn={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function Vn(e,t){if(!Wn){var r=Object.keys(qn);Wn={};for(var i=0;i>=1,r++;this.stateId=e.data}for(r=0;rthis.checkCountMax&&(this.checkCount=0,this.run())))},Qo.prototype.run=function(){for(var e=this.renderer.texture,t=e.managedTextures,r=!1,i=0;ithis.maxIdle&&(e.destroyTexture(n,!0),r=!(t[i]=null))}if(r){for(var o=0,i=0;i=e.data.byteLength?r.bufferSubData(e.type,0,e.data):(t=e.static?r.STATIC_DRAW:r.DYNAMIC_DRAW,i.byteLength=e.data.byteLength,r.bufferData(e.type,e.data,t)))},ua.prototype.dispose=function(e,t){var r,i;this.managedBuffers[e.id]&&(delete this.managedBuffers[e.id],r=e._glBuffers[this.CONTEXT_UID],i=this.gl,e.disposeRunner.remove(this),r&&(t||i.deleteBuffer(r.buffer),delete e._glBuffers[this.CONTEXT_UID]))},ua.prototype.disposeAll=function(e){for(var t=Object.keys(this.managedBuffers),r=0;r=$.MSAA_QUALITY.HIGH?this.multisample=$.MSAA_QUALITY.HIGH:e>=$.MSAA_QUALITY.MEDIUM?this.multisample=$.MSAA_QUALITY.MEDIUM:e>=$.MSAA_QUALITY.LOW?this.multisample=$.MSAA_QUALITY.LOW:this.multisample=$.MSAA_QUALITY.NONE},fa.prototype.addSystem=function(e,t){var r,i=new e(this);if(this[t])throw new Error('Whoops! The name "'+t+'" is already in use');for(r in this[t]=i,this.runners)this.runners[r].add(i);return this},fa.prototype.render=function(e,t){var r,i,n,o;t&&(o=t instanceof Gi?(Mt("6.0.0","Renderer#render arguments changed, use options instead."),r=t,i=arguments[2],n=arguments[3],arguments[4]):(r=t.renderTexture,i=t.clear,n=t.transform,t.skipUpdateTransform)),this.renderingToScreen=!r,this.runners.prerender.emit(),this.emit("prerender"),this.projection.transform=n,this.context.isLost||(r||(this._lastObjectRendered=e),o||(t=e.enableTempParent(),e.updateTransform(),e.disableTempParent(t)),this.renderTexture.bind(r),this.batch.currentRenderer.start(),(void 0!==i?i:this.clearBeforeRender)&&this.renderTexture.clear(),e.render(this),this.batch.currentRenderer.flush(),r&&r.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit("postrender"))},fa.prototype.generateTexture=function(e,t,r,i){e=ha.prototype.generateTexture.call(this,e,t=void 0===t?{}:t,r,i);return this.framebuffer.blit(),e},fa.prototype.resize=function(e,t){ha.prototype.resize.call(this,e,t),this.runners.resize.emit(this.screen.height,this.screen.width)},fa.prototype.reset=function(){return this.runners.reset.emit(),this},fa.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},fa.prototype.destroy=function(e){for(var t in this.runners.destroy.emit(),this.runners)this.runners[t].destroy();ha.prototype.destroy.call(this,e),this.gl=null},Object.defineProperty(fa.prototype,"extract",{get:function(){return Mt("6.0.0","Renderer#extract has been deprecated, please use Renderer#plugins.extract instead."),this.plugins.extract},enumerable:!1,configurable:!0}),fa.registerPlugin=function(e,t){Mt("6.5.0","Renderer.registerPlugin() has been deprecated, please use extensions.add() instead."),Ur.add({name:e,type:$.ExtensionType.RendererPlugin,ref:t})},fa.__plugins={};var ha,ca=fa;function fa(e){var t=ha.call(this,$.RENDERER_TYPE.WEBGL,e)||this;return e=t.options,t.gl=null,t.CONTEXT_UID=0,t.runners={destroy:new Gr("destroy"),contextChange:new Gr("contextChange"),reset:new Gr("reset"),update:new Gr("update"),postrender:new Gr("postrender"),prerender:new Gr("prerender"),resize:new Gr("resize")},t.runners.contextChange.add(t),t.globalUniforms=new cn({projectionMatrix:new ar},!0),t.addSystem(vo,"mask").addSystem(En,"context").addSystem(Ko,"state").addSystem(qo,"shader").addSystem(ea,"texture").addSystem(la,"buffer").addSystem(Cn,"geometry").addSystem(On,"framebuffer").addSystem(Eo,"scissor").addSystem(ko,"stencil").addSystem(Po,"projection").addSystem(Zo,"textureGC").addSystem(gn,"filter").addSystem(Io,"renderTexture").addSystem(xn,"batch"),t.initPlugins(fa.__plugins),t.multisample=void 0,e.context?t.context.initFromContext(e.context):t.context.initFromOptions({alpha:!!t.useContextAlpha,antialias:e.antialias,premultipliedAlpha:t.useContextAlpha&&"notMultiplied"!==t.useContextAlpha,stencil:!0,preserveDrawingBuffer:e.preserveDrawingBuffer,powerPreference:t.options.powerPreference}),t.renderingToScreen=!0,ht(2===t.context.webGLVersion?"WebGL 2":"WebGL 1"),t.resize(t.options.width,t.options.height),t}function pa(e){return ca.create(e)}Ur.handleByMap($.ExtensionType.RendererPlugin,ca.__plugins);var da="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",ma="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n",_a=(ga.prototype.destroy=function(){this.renderer=null},ga);function ga(e){Mt("6.1.0","System class is deprecated, implemement ISystem interface instead."),this.renderer=e}var va=function(){this.texArray=null,this.blend=0,this.type=$.DRAW_MODES.TRIANGLES,this.start=0,this.size=0,this.data=null},ya=(ba.prototype.clear=function(){for(var e=0;ethis.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)},Sa.prototype.buildTexturesAndDrawCalls=function(){var e=this._bufferedTextures,t=this.MAX_TEXTURES,r=Sa._textureArrayPool,i=this.renderer.batch,n=this._tempBoundTextures,o=this.renderer.textureGC.count,a=++C._globalBatch,s=0,l=r[0],u=0;i.copyBoundTextures(n,t);for(var h=0;h=t&&(i.boundArray(l,n,a,t),this.buildDrawCalls(l,u,h),u=h,l=r[++s],++a),c._batchEnabled=a,c.touched=o,l.elements[l.count++]=c)}0 title : "+e.title+"
tabIndex: "+e.tabIndex},za.prototype.capHitArea=function(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0);var t=this.renderer,r=t.width,t=t.height;e.x+e.width>r&&(e.width=r-e.x),e.y+e.height>t&&(e.height=t-e.y)},za.prototype.addChild=function(e){var t=this.pool.pop();t||((t=document.createElement("button")).style.width="100px",t.style.height="100px",t.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",t.style.position="absolute",t.style.zIndex=2..toString(),t.style.borderStyle="none",-1>2,n[1]=(3&i[0])<<4|i[1]>>4,n[2]=(15&i[1])<<2|i[2]>>6,n[3]=63&i[2],r-(e.length-1)){case 2:n[3]=64,n[2]=64;break;case 1:n[3]=64}for(o=0;os[0]&&t[1]>1||1)+i-1&~(i-1))*(f=(h=h>>1||1)+n-1&~(n-1))*ws[t];return s};var Rs,Cs=Ms;function Ms(e,t){var r=Rs.call(this,e,t)||this;return r.format=t.format,r.levels=t.levels||1,r._width=t.width,r._height=t.height,r._extension=Ms._formatToExtension(r.format),(t.levelBuffers||r.buffer)&&(r._levelBuffers=t.levelBuffers||Ms._createLevelBuffers(e instanceof Uint8Array?e:r.buffer.uint8View,r.format,r.levels,4,4,r.width,r.height)),r}Is.use=function(r,i){var e=r.data;if(r.type===$.LoaderResource.TYPE.JSON&&e&&e.cacheID&&e.textures){for(var t,n,o=e.textures,a=void 0,s=void 0,l=0,u=o.length;l>>=1,m>>>=1;for(var g=148,_=0;_>1||1)+4-1&-4)*(x=(y=y>>1||1)+4-1&-4)*_}return 0!==o?{uncompressed:d.map(function(e){var t=e[0].levelBuffer,r=!1;return o===$.TYPES.FLOAT?t=new Float32Array(e[0].levelBuffer.buffer,e[0].levelBuffer.byteOffset,e[0].levelBuffer.byteLength/4):o===$.TYPES.UNSIGNED_INT?(r=!0,t=new Uint32Array(e[0].levelBuffer.buffer,e[0].levelBuffer.byteOffset,e[0].levelBuffer.byteLength/4)):o===$.TYPES.INT&&(r=!0,t=new Int32Array(e[0].levelBuffer.buffer,e[0].levelBuffer.byteOffset,e[0].levelBuffer.byteLength/4)),{resource:new ti(t,{width:e[0].levelWidth,height:e[0].levelHeight}),type:o,format:r?function(e){switch(e){case $.FORMATS.RGBA:return $.FORMATS.RGBA_INTEGER;case $.FORMATS.RGB:return $.FORMATS.RGB_INTEGER;case $.FORMATS.RG:return $.FORMATS.RG_INTEGER;case $.FORMATS.RED:return $.FORMATS.RED_INTEGER;default:return e}}(a):a}}),kvData:r}:{compressed:d.map(function(e){return new Cs(null,{format:s,width:l,height:u,levels:f,levelBuffers:e})}),kvData:r}}$.LoaderResource.setExtensionXhrType("dds",$.LoaderResource.XHR_RESPONSE_TYPE.BUFFER);cl.use=function(e,t){if("dds"===e.extension&&e.data)try{Object.assign(e,Ds(e.name||e.url,qs(e.data),e.metadata))}catch(e){return void t(e)}t()},cl.extension=$.ExtensionType.Loader;var v=cl;function cl(){}$.LoaderResource.setExtensionXhrType("ktx",$.LoaderResource.XHR_RESPONSE_TYPE.BUFFER);pl.use=function(e,t){if("ktx"===e.extension&&e.data)try{var i,n=e.name||e.url,r=hl(n,e.data,this.loadKeyValueData),o=r.compressed,a=r.uncompressed,s=r.kvData;if(o){var l=Ds(n,o,e.metadata);if(s&&l.textures)for(var u in l.textures)l.textures[u].baseTexture.ktxKeyValueData=s;Object.assign(e,l)}else a&&(i={},a.forEach(function(e,t){var e=new te(new C(e.resource,{mipmap:$.MIPMAP_MODES.OFF,alphaMode:$.ALPHA_MODES.NO_PREMULTIPLIED_ALPHA,type:e.type,format:e.format})),r=n+"-"+(t+1);s&&(e.baseTexture.ktxKeyValueData=s),C.addToCache(e.baseTexture,r),te.addToCache(e,r),0===t&&(i[n]=e,C.addToCache(e.baseTexture,n),te.addToCache(e,n)),i[r]=e}),Object.assign(e,{textures:i}))}catch(e){return void t(e)}t()},pl.extension=$.ExtensionType.Loader,pl.loadKeyValueData=!1;var fl=pl;function pl(){}var dl=function(e,t){return(dl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function ml(e,t){function r(){this.constructor=e}dl(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}ml(vl,_l=zr),vl.prototype.setProperties=function(e){e&&(this._properties[0]="vertices"in e||"scale"in e?!!e.vertices||!!e.scale:this._properties[0],this._properties[1]="position"in e?!!e.position:this._properties[1],this._properties[2]="rotation"in e?!!e.rotation:this._properties[2],this._properties[3]="uvs"in e?!!e.uvs:this._properties[3],this._properties[4]="tint"in e||"alpha"in e?!!e.tint||!!e.alpha:this._properties[4])},vl.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},Object.defineProperty(vl.prototype,"tint",{get:function(){return this._tint},set:function(e){pt(this._tint=e,this.tintRgb)},enumerable:!1,configurable:!0}),vl.prototype.render=function(e){var t=this;this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.valid||this.baseTexture.once("update",function(){return t.onChildrenChange(0)})),e.batch.setObjectRenderer(e.plugins.particle),e.plugins.particle.render(this))},vl.prototype.onChildrenChange=function(e){for(var t=Math.floor(e/this._batchSize);this._bufferUpdateIDs.length=a.length&&a.push(this._generateOneMoreBuffer(e)),a[f]),m=(d.uploadDynamic(t,c,p),e._bufferUpdateIDs[f]||0);(h=h||d._updateIDthis.maxSegments&&(e=this.maxSegments),e):t}},Sl=(Al.prototype.clone=function(){var e=new Al;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e},Al.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=te.WHITE,this.matrix=null,this.visible=!1},Al.prototype.destroy=function(){this.texture=null,this.matrix=null},Al);function Al(){this.color=16777215,this.alpha=1,this.texture=te.WHITE,this.matrix=null,this.visible=!1,this.reset()}var kl=function(e,t){return(kl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function Ol(e,t){function r(){this.constructor=e}kl(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function Pl(e,t){void 0===t&&(t=!1);var r=e.length;if(!(r<6)){for(var i=0,n=0,o=e[r-2],a=e[r-1];n>0),m=c/d;if(f+=m,s){a.push(e,t),a.push(r,i);for(var _=1,g=f;_>16)+(65280&t)+((255&t)<<16),r);e.length=Math.max(e.length,n+i);for(var a=0;a>16&255)/255*n,o.tint[1]=(i>>8&255)/255*n,o.tint[2]=(255&i)/255*n,o.tint[3]=n,e.shader.bind(t),e.geometry.bind(r,t),e.state.set(this.state);for(var s=0,l=a.length;s>16)+(65280&i)+((255&i)<<16)}}},b.prototype.calculateVertices=function(){var e=this.transform._worldID;if(this._transformID!==e){this._transformID=e;for(var e=this.transform.worldTransform,t=e.a,r=e.b,i=e.c,n=e.d,o=e.tx,a=e.ty,s=this._geometry.points,l=this.vertexData,u=0,h=0;h=r&&fu.x=r&&fu.y>16)+(65280&e)+((255&e)<<16)},enumerable:!1,configurable:!0}),Object.defineProperty(_u.prototype,"texture",{get:function(){return this._texture},set:function(e){this._texture!==e&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=e||te.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,e&&(e.baseTexture.valid?this._onTextureUpdate():e.once("update",this._onTextureUpdate,this)))},enumerable:!1,configurable:!0}),_u);function mu(){this.constructor=cu}function _u(e){var t=hu.call(this)||this;return t._anchor=new nr(t._onAnchorUpdate,t,e?e.defaultAnchor.x:0,e?e.defaultAnchor.y:0),t._texture=null,t._width=0,t._height=0,t._tint=null,t._tintRGB=null,t.tint=16777215,t.blendMode=$.BLEND_MODES.NORMAL,t._cachedTint=16777215,t.uvs=null,t.texture=e||te.EMPTY,t.vertexData=new Float32Array(8),t.vertexTrimmedData=null,t._transformID=-1,t._textureID=-1,t._transformTrimmedID=-1,t._textureTrimmedID=-1,t.indices=pu,t.pluginName="batch",t.isSprite=!0,t._roundPixels=R.ROUND_PIXELS,t}var gu=function(e,t){return(gu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};$.TEXT_GRADIENT=void 0,(Ll=$.TEXT_GRADIENT||($.TEXT_GRADIENT={}))[Ll.LINEAR_VERTICAL=0]="LINEAR_VERTICAL";var vu={align:"left",breakWords:!(Ll[Ll.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL"),dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:$.TEXT_GRADIENT.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},yu=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],bu=(x.prototype.clone=function(){var e={};return wu(e,this,vu),new x(e)},x.prototype.reset=function(){wu(this,vu,vu)},Object.defineProperty(x.prototype,"align",{get:function(){return this._align},set:function(e){this._align!==e&&(this._align=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"breakWords",{get:function(){return this._breakWords},set:function(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"dropShadow",{get:function(){return this._dropShadow},set:function(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"dropShadowAlpha",{get:function(){return this._dropShadowAlpha},set:function(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"dropShadowAngle",{get:function(){return this._dropShadowAngle},set:function(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"dropShadowBlur",{get:function(){return this._dropShadowBlur},set:function(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"dropShadowColor",{get:function(){return this._dropShadowColor},set:function(e){e=Tu(e);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"dropShadowDistance",{get:function(){return this._dropShadowDistance},set:function(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"fill",{get:function(){return this._fill},set:function(e){e=Tu(e);this._fill!==e&&(this._fill=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"fillGradientType",{get:function(){return this._fillGradientType},set:function(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"fillGradientStops",{get:function(){return this._fillGradientStops},set:function(e){!function(e,t){if(!Array.isArray(e)||!Array.isArray(t))return;if(e.length!==t.length)return;for(var r=0;r=r&&nh.x=r&&nh.y>16)+(65280&e)+((255&e)<<16),this._colorDirty=!0)},enumerable:!1,configurable:!0}),wh.prototype.update=function(){var e;this._colorDirty&&(this._colorDirty=!1,e=this.texture.baseTexture,bt(this._tint,this._alpha,this.uniforms.uColor,e.alphaMode)),this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)};var xh,Th=wh;function wh(e,t){var r=this,i={uSampler:e,alpha:1,uTextureMatrix:ar.IDENTITY,uColor:new Float32Array([1,1,1,1])};return(t=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},t)).uniforms&&Object.assign(i,t.uniforms),(r=xh.call(this,t.program||io.from("attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTextureMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\nuniform vec4 uColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;\n}\n"),i)||this)._colorDirty=!1,r.uvMatrix=new fo(e),r.batchable=void 0===t.program,r.pluginName=t.pluginName,r.tint=t.tint,r.alpha=t.alpha,r}ph(Ah,Eh=tn),Object.defineProperty(Ah.prototype,"vertexDirtyId",{get:function(){return this.buffers[0]._updateID},enumerable:!1,configurable:!0});var Eh,Sh=Ah;function Ah(e,t,r){var i=Eh.call(this)||this,e=new Ki(e),t=new Ki(t,!0),r=new Ki(r,!0,!0);return i.addAttribute("aVertexPosition",e,2,!1,$.TYPES.FLOAT).addAttribute("aTextureCoord",t,2,!1,$.TYPES.FLOAT).addIndex(r),i._updateId=-1,i}var kh=function(e,t){return(kh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};var Oh=function(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]},Ph=(Rh.test=function(e){return"string"==typeof e&&0===e.indexOf("info face=")},Rh.parse=function(e){var t,r=e.match(/^[a-z]+\s+.+$/gm),i={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(t in r){var n,o=r[t].match(/^[a-z]+/gm)[0],a=r[t].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),s={};for(n in a){var l=a[n].split("="),u=l[0],l=l[1].replace(/"/gm,""),h=parseFloat(l),l=isNaN(h)?l:h;s[u]=l}i[o].push(s)}var c=new Oh;return i.info.forEach(function(e){return c.info.push({face:e.face,size:parseInt(e.size,10)})}),i.common.forEach(function(e){return c.common.push({lineHeight:parseInt(e.lineHeight,10)})}),i.page.forEach(function(e){return c.page.push({id:parseInt(e.id,10),file:e.file})}),i.char.forEach(function(e){return c.char.push({id:parseInt(e.id,10),page:parseInt(e.page,10),x:parseInt(e.x,10),y:parseInt(e.y,10),width:parseInt(e.width,10),height:parseInt(e.height,10),xoffset:parseInt(e.xoffset,10),yoffset:parseInt(e.yoffset,10),xadvance:parseInt(e.xadvance,10)})}),i.kerning.forEach(function(e){return c.kerning.push({first:parseInt(e.first,10),second:parseInt(e.second,10),amount:parseInt(e.amount,10)})}),i.distanceField.forEach(function(e){return c.distanceField.push({distanceRange:parseInt(e.distanceRange,10),fieldType:e.fieldType})}),c},Rh);function Rh(){}Mh.test=function(e){return e instanceof XMLDocument&&e.getElementsByTagName("page").length&&null!==e.getElementsByTagName("info")[0].getAttribute("face")},Mh.parse=function(e){for(var t=new Oh,r=e.getElementsByTagName("info"),i=e.getElementsByTagName("common"),n=e.getElementsByTagName("page"),o=e.getElementsByTagName("char"),a=e.getElementsByTagName("kerning"),s=e.getElementsByTagName("distanceField"),l=0;l")&&(e=(new globalThis.DOMParser).parseFromString(e,"text/xml"),Ch.test(e))},Dh.parse=function(e){e=(new globalThis.DOMParser).parseFromString(e,"text/xml");return Ch.parse(e)};var Ih=Dh;function Dh(){}var Lh=[Ph,Ch,Ih];function Fh(e){for(var t=0;tF&&(kt(i,1+c-++z,1+d-c),d=c,c=-1,n.push(f),o.push(06*E)||I.vertices.length<2*yh.BATCHABLE_SIZE)I.vertices=new Float32Array(8*E),I.uvs=new Float32Array(8*E),I.indices=new Uint16Array(6*E);else for(var Y=I.total,W=I.vertices,q=4*Y*2;q>16&255)/255,0,0,0,0,0,(e>>8&255)/255,0,0,0,0,0,(255&e)/255,0,0,0,0,0,1,0],t)},E.prototype.greyscale=function(e,t){this._loadMatrix([e,e,e,0,0,e,e,e,0,0,e,e,e,0,0,0,0,0,1,0],t)},E.prototype.blackAndWhite=function(e){this._loadMatrix([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],e)},E.prototype.hue=function(e,t){e=(e||0)/180*Math.PI;var r=Math.cos(e),e=Math.sin(e),i=(0,Math.sqrt)(1/3);this._loadMatrix([r+1/3*(1-r),1/3*(1-r)-i*e,1/3*(1-r)+i*e,0,0,1/3*(1-r)+i*e,r+1/3*(1-r),1/3*(1-r)-i*e,0,0,1/3*(1-r)-i*e,1/3*(1-r)+i*e,r+1/3*(1-r),0,0,0,0,0,1,0],t)},E.prototype.contrast=function(e,t){var e=(e||0)+1,r=-.5*(e-1);this._loadMatrix([e,0,0,0,r,0,e,0,0,r,0,0,e,0,r,0,0,0,1,0],t)},E.prototype.saturate=function(e,t){var e=2*(e=void 0===e?0:e)/3+1,r=-.5*(e-1);this._loadMatrix([e,r,r,0,0,r,e,r,0,0,r,r,e,0,0,0,0,0,1,0],t)},E.prototype.desaturate=function(){this.saturate(-1)},E.prototype.negative=function(e){this._loadMatrix([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],e)},E.prototype.sepia=function(e){this._loadMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],e)},E.prototype.technicolor=function(e){this._loadMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],e)},E.prototype.polaroid=function(e){this._loadMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],e)},E.prototype.toBGR=function(e){this._loadMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],e)},E.prototype.kodachrome=function(e){this._loadMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],e)},E.prototype.browni=function(e){this._loadMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],e)},E.prototype.vintage=function(e){this._loadMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],e)},E.prototype.colorTone=function(e,t,r,i,n){var o=((r=r||16770432)>>16&255)/255,a=(r>>8&255)/255,r=(255&r)/255,s=((i=i||3375104)>>16&255)/255,l=(i>>8&255)/255,i=(255&i)/255;this._loadMatrix([.3,.59,.11,0,0,o,a,r,e=e||.2,0,s,l,i,t=t||.15,0,o-s,a-l,r-i,0,0],n)},E.prototype.night=function(e,t){this._loadMatrix([-2*(e=e||.1),-e,0,0,0,-e,0,e,0,0,0,e,2*e,0,0,0,0,0,1,0],t)},E.prototype.predator=function(e,t){this._loadMatrix([11.224130630493164*e,-4.794486999511719*e,-2.8746118545532227*e,0*e,.40342438220977783*e,-3.6330697536468506*e,9.193157196044922*e,-2.951810836791992*e,0*e,-1.316135048866272*e,-3.2184197902679443*e,-4.2375030517578125*e,7.476448059082031*e,0*e,.8044459223747253*e,0,0,0,1,0],t)},E.prototype.lsd=function(e){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],e)},E.prototype.reset=function(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)},Object.defineProperty(E.prototype,"matrix",{get:function(){return this.uniforms.m},set:function(e){this.uniforms.m=e},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"alpha",{get:function(){return this.uniforms.uAlpha},set:function(e){this.uniforms.uAlpha=e},enumerable:!1,configurable:!0});var _c,gc,vc=E;function yc(){this.constructor=gc}function E(){var e=this,t={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};return(e=_c.call(this,ma,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\nuniform float uAlpha;\n\nvoid main(void)\n{\n vec4 c = texture2D(uSampler, vTextureCoord);\n\n if (uAlpha == 0.0) {\n gl_FragColor = c;\n return;\n }\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (c.a > 0.0) {\n c.rgb /= c.a;\n }\n\n vec4 result;\n\n result.r = (m[0] * c.r);\n result.r += (m[1] * c.g);\n result.r += (m[2] * c.b);\n result.r += (m[3] * c.a);\n result.r += m[4];\n\n result.g = (m[5] * c.r);\n result.g += (m[6] * c.g);\n result.g += (m[7] * c.b);\n result.g += (m[8] * c.a);\n result.g += m[9];\n\n result.b = (m[10] * c.r);\n result.b += (m[11] * c.g);\n result.b += (m[12] * c.b);\n result.b += (m[13] * c.a);\n result.b += m[14];\n\n result.a = (m[15] * c.r);\n result.a += (m[16] * c.g);\n result.a += (m[17] * c.b);\n result.a += (m[18] * c.a);\n result.a += m[19];\n\n vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n // Premultiply alpha again.\n rgb *= result.a;\n\n gl_FragColor = vec4(rgb, result.a);\n}\n",t)||this).alpha=1,e}vc.prototype.grayscale=vc.prototype.greyscale;var bc=function(e,t){return(bc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};bc(Tc=Sc,wc=xc=Q),Tc.prototype=null===wc?Object.create(wc):(Ec.prototype=wc.prototype,new Ec),Sc.prototype.apply=function(e,t,r,i){this.uniforms.filterMatrix=e.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;var n=this.maskSprite.worldTransform,o=Math.sqrt(n.a*n.a+n.b*n.b),a=Math.sqrt(n.c*n.c+n.d*n.d);0!==o&&0!==a&&(this.uniforms.rotation[0]=n.a/o,this.uniforms.rotation[1]=n.b/o,this.uniforms.rotation[2]=n.c/a,this.uniforms.rotation[3]=n.d/a),e.applyFilter(this,t,r,i)},Object.defineProperty(Sc.prototype,"map",{get:function(){return this.uniforms.mapSampler},set:function(e){this.uniforms.mapSampler=e},enumerable:!1,configurable:!0});var xc,Tc,wc=Sc;function Ec(){this.constructor=Tc}function Sc(e,t){var r=this,i=new ar;return e.renderable=!1,(r=xc.call(this,"attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n\tgl_Position = filterVertexPosition();\n\tvTextureCoord = filterTextureCoord();\n\tvFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy;\n}\n","varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\nuniform mat2 rotation;\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform highp vec4 inputSize;\nuniform vec4 inputClamp;\n\nvoid main(void)\n{\n vec4 map = texture2D(mapSampler, vFilterCoord);\n\n map -= 0.5;\n map.xy = scale * inputSize.zw * (rotation * map.xy);\n\n gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));\n}\n",{mapSampler:e._texture,filterMatrix:i,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])})||this).maskSprite=e,r.maskMatrix=i,r.scale=new ee(t=null==t?20:t,t),r}var Ac=function(e,t){return(Ac=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};Ac(Oc=Cc,Pc=kc=Q),Oc.prototype=null===Pc?Object.create(Pc):(Rc.prototype=Pc.prototype,new Rc);var kc,Oc,Pc=Cc;function Rc(){this.constructor=Oc}function Cc(){return kc.call(this,"\nattribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvoid texcoords(vec2 fragCoord, vec2 inverseVP,\n out vec2 v_rgbNW, out vec2 v_rgbNE,\n out vec2 v_rgbSW, out vec2 v_rgbSE,\n out vec2 v_rgbM) {\n v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n gl_Position = filterVertexPosition();\n\n vFragCoord = aVertexPosition * outputFrame.zw;\n\n texcoords(vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}\n",'varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\nuniform sampler2D uSampler;\nuniform highp vec4 inputSize;\n\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it\'s\n unsupported by WebGL.\n\n --\n\n From:\n https://github.com/mitsuhiko/webgl-meincraft\n\n Copyright (c) 2011 by Armin Ronacher.\n\n Some rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n\n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX 8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP,\n vec2 v_rgbNW, vec2 v_rgbNE,\n vec2 v_rgbSW, vec2 v_rgbSE,\n vec2 v_rgbM) {\n vec4 color;\n vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n vec4 texColor = texture2D(tex, v_rgbM);\n vec3 rgbM = texColor.xyz;\n vec3 luma = vec3(0.299, 0.587, 0.114);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n mediump vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * inverseVP;\n\n vec3 rgbA = 0.5 * (\n texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n vec3 rgbB = rgbA * 0.5 + 0.25 * (\n texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\n\n float lumaB = dot(rgbB, luma);\n if ((lumaB < lumaMin) || (lumaB > lumaMax))\n color = vec4(rgbA, texColor.a);\n else\n color = vec4(rgbB, texColor.a);\n return color;\n}\n\nvoid main() {\n\n vec4 color;\n\n color = fxaa(uSampler, vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n gl_FragColor = color;\n}\n')||this}var Mc=function(e,t){return(Mc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};Mc(Dc=Nc,Lc=Ic=Q),Dc.prototype=null===Lc?Object.create(Lc):(Fc.prototype=Lc.prototype,new Fc),Object.defineProperty(Nc.prototype,"noise",{get:function(){return this.uniforms.uNoise},set:function(e){this.uniforms.uNoise=e},enumerable:!1,configurable:!0}),Object.defineProperty(Nc.prototype,"seed",{get:function(){return this.uniforms.uSeed},set:function(e){this.uniforms.uSeed=e},enumerable:!1,configurable:!0});var Ic,Dc,Lc=Nc;function Fc(){this.constructor=Dc}function Nc(e,t){void 0===e&&(e=.5),void 0===t&&(t=Math.random());var r=Ic.call(this,ma,"precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float randomValue = rand(gl_FragCoord.xy * uSeed);\n float diff = (randomValue - 0.5) * uNoise;\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (color.a > 0.0) {\n color.rgb /= color.a;\n }\n\n color.r += diff;\n color.g += diff;\n color.b += diff;\n\n // Premultiply alpha again.\n color.rgb *= color.a;\n\n gl_FragColor = color;\n}\n",{uNoise:0,uSeed:0})||this;return r.noise=e,r.seed=t,r}(A={NORMAL:0,0:"NORMAL",ADD:1,1:"ADD",MULTIPLY:2,2:"MULTIPLY",SCREEN:3,3:"SCREEN",OVERLAY:4,4:"OVERLAY",DARKEN:5,5:"DARKEN",LIGHTEN:6,6:"LIGHTEN",COLOR_DODGE:7,7:"COLOR_DODGE",COLOR_BURN:8,8:"COLOR_BURN",HARD_LIGHT:9,9:"HARD_LIGHT",SOFT_LIGHT:10,10:"SOFT_LIGHT",DIFFERENCE:11,11:"DIFFERENCE",EXCLUSION:12,12:"EXCLUSION",HUE:13,13:"HUE",SATURATION:14,14:"SATURATION",COLOR:15,15:"COLOR",LUMINOSITY:16,16:"LUMINOSITY",NORMAL_NPM:17,17:"NORMAL_NPM",ADD_NPM:18,18:"ADD_NPM",SCREEN_NPM:19,19:"SCREEN_NPM",NONE:20,20:"NONE",SRC_OVER:0})[0]="SRC_OVER",A[A.SRC_IN=21]="SRC_IN",A[A.SRC_OUT=22]="SRC_OUT",A[A.SRC_ATOP=23]="SRC_ATOP",A[A.DST_OVER=24]="DST_OVER",A[A.DST_IN=25]="DST_IN",A[A.DST_OUT=26]="DST_OUT",A[A.DST_ATOP=27]="DST_ATOP",A[A.ERASE=26]="ERASE",A[A.SUBTRACT=28]="SUBTRACT",A[A.XOR=29]="XOR",(A={NPM:0,0:"NPM",UNPACK:1,1:"UNPACK",PMA:2,2:"PMA",NO_PREMULTIPLIED_ALPHA:0})[0]="NO_PREMULTIPLIED_ALPHA",A[A.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",A[A.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",A[A.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",(A={NO:0,0:"NO",YES:1,1:"YES",AUTO:2,2:"AUTO",BLEND:0})[0]="BLEND",A[A.CLEAR=1]="CLEAR",A[A.BLIT=2]="BLIT",(A=k=k||{})[A.NONE=0]="NONE",A[A.LOW=2]="LOW",A[A.MEDIUM=4]="MEDIUM",A[A.HIGH=8]="HIGH";var zc,Bc,jc,Uc,Gc,Xc,Hc=new ar,Yc=(r.prototype._cacheAsBitmap=!1,r.prototype._cacheData=null,r.prototype._cacheAsBitmapResolution=null,r.prototype._cacheAsBitmapMultisample=k.NONE,function(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null}),A=(Object.defineProperties(r.prototype,{cacheAsBitmapResolution:{get:function(){return this._cacheAsBitmapResolution},set:function(e){e!==this._cacheAsBitmapResolution&&(this._cacheAsBitmapResolution=e,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmapMultisample:{get:function(){return this._cacheAsBitmapMultisample},set:function(e){e!==this._cacheAsBitmapMultisample&&(this._cacheAsBitmapMultisample=e,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(e){var t;this._cacheAsBitmap!==e&&((this._cacheAsBitmap=e)?(this._cacheData||(this._cacheData=new Yc),(t=this._cacheData).originalRender=this.render,t.originalRenderCanvas=this.renderCanvas,t.originalUpdateTransform=this.updateTransform,t.originalCalculateBounds=this.calculateBounds,t.originalGetLocalBounds=this.getLocalBounds,t.originalDestroy=this.destroy,t.originalContainsPoint=this.containsPoint,t.originalMask=this._mask,t.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):((t=this._cacheData).sprite&&this._destroyCachedDisplayObject(),this.render=t.originalRender,this.renderCanvas=t.originalRenderCanvas,this.calculateBounds=t.originalCalculateBounds,this.getLocalBounds=t.originalGetLocalBounds,this.destroy=t.originalDestroy,this.updateTransform=t.originalUpdateTransform,this.containsPoint=t.originalContainsPoint,this._mask=t.originalMask,this.filterArea=t.originalFilterArea))}}}),r.prototype._renderCached=function(e){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(e),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(e))},r.prototype._initCachedDisplayObject=function(e){var t,r,i,n,o,a,s,l;this._cacheData&&this._cacheData.sprite||(t=this.alpha,this.alpha=1,e.batch.flush(),r=this.getLocalBounds(null,!0).clone(),this.filters&&this.filters.length&&(i=this.filters[0].padding,r.pad(i)),r.ceil(R.RESOLUTION),i=e.renderTexture.current,n=e.renderTexture.sourceFrame.clone(),o=e.renderTexture.destinationFrame.clone(),a=e.projection.transform,s=Gi.create({width:r.width,height:r.height,resolution:this.cacheAsBitmapResolution||e.resolution,multisample:null!=(s=this.cacheAsBitmapMultisample)?s:e.multisample}),l="cacheAsBitmap_"+ ++Pt,this._cacheData.textureCacheId=l,C.addToCache(s.baseTexture,l),te.addToCache(s,l),l=this.transform.localTransform.copyTo(Hc).invert().translate(-r.x,-r.y),this.render=this._cacheData.originalRender,e.render(this,{renderTexture:s,clear:!0,transform:l,skipUpdateTransform:!1}),e.framebuffer.blit(),e.projection.transform=a,e.renderTexture.bind(i,n,o),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=t,(l=new du(s)).transform.worldTransform=this.transform.worldTransform,l.anchor.x=-(r.x/r.width),l.anchor.y=-(r.y/r.height),l.alpha=t,l._bounds=this._bounds,this._cacheData.sprite=l,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=l.containsPoint.bind(l))},r.prototype._renderCachedCanvas=function(e){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(e),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(e))},r.prototype._initCachedDisplayObjectCanvas=function(e){var t,r,i,n,o,a;this._cacheData&&this._cacheData.sprite||(t=this.getLocalBounds(null,!0),r=this.alpha,this.alpha=1,i=e.context,n=e._projTransform,t.ceil(R.RESOLUTION),o=Gi.create({width:t.width,height:t.height}),a="cacheAsBitmap_"+ ++Pt,this._cacheData.textureCacheId=a,C.addToCache(o.baseTexture,a),te.addToCache(o,a),this.transform.localTransform.copyTo(a=Hc),a.invert(),a.tx-=t.x,a.ty-=t.y,this.renderCanvas=this._cacheData.originalRenderCanvas,e.render(this,{renderTexture:o,clear:!0,transform:a,skipUpdateTransform:!1}),e.context=i,e._projTransform=n,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=r,(a=new du(o)).transform.worldTransform=this.transform.worldTransform,a.anchor.x=-(t.x/t.width),a.anchor.y=-(t.y/t.height),a.alpha=r,a._bounds=this._bounds,this._cacheData.sprite=a,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=e._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=a.containsPoint.bind(a))},r.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID},r.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)},r.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,C.removeFromCache(this._cacheData.textureCacheId),te.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},r.prototype._cacheAsBitmapDestroy=function(e){this.cacheAsBitmap=!1,this.destroy(e)},r.prototype.name=null,zr.prototype.getChildByName=function(e,t){for(var r=0,i=this.children.length;r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=g-1,y=Math.floor,b=String.fromCharCode;function x(e){throw RangeError(f[e])}function d(e,t){for(var r=e.length,i=[];r--;)i[r]=t(e[r]);return i}function m(e,t){var r=e.split("@"),i="",r=(1>>10&1023|55296),e=56320|1023&e),t+=b(e)}).join("")}function E(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function S(e,t,r){var i=0;for(e=r?y(e/l):e>>1,e+=y(e/t);p*v>>1y((_-h)/o))&&x("overflow"),h+=s*o,!(s<(s=a<=f?1:f+v<=a?v:a-f));a+=g)o>y(_/(s=g-s))&&x("overflow"),o*=s;f=S(h-n,t=l.length+1,0==n),y(h/t)>_-c&&x("overflow"),c+=y(h/t),h%=t,l.splice(h++,0,c)}return w(l)}function k(e){for(var t,r,i,n,o,a,s,l,u,h,c=[],f=(e=T(e)).length,p=128,d=72,m=t=0;my((_-t)/(l=r+1))&&x("overflow"),t+=(n-p)*l,p=n,m=0;m_&&x("overflow"),s==p){for(o=t,a=g;!(o<(u=a<=d?1:d+v<=a?v:a-d));a+=g)c.push(b(E(u+(h=o-u)%(u=g-u),0))),o=y(h/u);c.push(b(E(o,0))),d=S(t,l,r==i),t=0,++r}++t,++p}return c.join("")}if(o={version:"1.3.2",ucs2:{decode:T,encode:w},decode:A,encode:k,toASCII:function(e){return m(e,function(e){return h.test(e)?"xn--"+k(e):e})},toUnicode:function(e){return m(e,function(e){return u.test(e)?A(e.slice(4).toLowerCase()):e})}},i&&t)if(e.exports==i)t.exports=o;else for(a in o)o.hasOwnProperty(a)&&(i[a]=o[a]);else r.punycode=o});function p0(e,t,r,i){t=t||"&",r=r||"=";var n={};if("string"==typeof e&&0!==e.length){var o=/\+/g,t=(e=e.split(t),1e3),a=(i&&"number"==typeof i.maxKeys&&(t=i.maxKeys),e.length);0e?1:this._width/e,t=this._topHeight+this._bottomHeight,t=this._height>t?1:this._height/t;return Math.min(e,t)},Object.defineProperty(B0.prototype,"width",{get:function(){return this._width},set:function(e){this._width=e,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(B0.prototype,"height",{get:function(){return this._height},set:function(e){this._height=e,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(B0.prototype,"leftWidth",{get:function(){return this._leftWidth},set:function(e){this._leftWidth=e,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(B0.prototype,"rightWidth",{get:function(){return this._rightWidth},set:function(e){this._rightWidth=e,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(B0.prototype,"topHeight",{get:function(){return this._topHeight},set:function(e){this._topHeight=e,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(B0.prototype,"bottomHeight",{get:function(){return this._bottomHeight},set:function(e){this._bottomHeight=e,this._refresh()},enumerable:!1,configurable:!0}),B0.prototype._refresh=function(){var e=this.texture,t=this.geometry.buffers[1].data,e=(this._origWidth=e.orig.width,this._origHeight=e.orig.height,1/this._origWidth),r=1/this._origHeight;t[0]=t[8]=t[16]=t[24]=0,t[1]=t[3]=t[5]=t[7]=0,t[6]=t[14]=t[22]=t[30]=1,t[25]=t[27]=t[29]=t[31]=1,t[2]=t[10]=t[18]=t[26]=e*this._leftWidth,t[4]=t[12]=t[20]=t[28]=1-e*this._rightWidth,t[9]=t[11]=t[13]=t[15]=r*this._topHeight,t[17]=t[19]=t[21]=t[23]=1-r*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()};var z0,i0=B0;function B0(e,t,r,i,n){void 0===t&&(t=10),void 0===r&&(r=10),void 0===i&&(i=10),void 0===n&&(n=10);var o=z0.call(this,te.WHITE,4,4)||this;return o._origWidth=e.orig.width,o._origHeight=e.orig.height,o._width=o._origWidth,o._height=o._origHeight,o._leftWidth=t,o._rightWidth=i,o._topHeight=r,o._bottomHeight=n,o.texture=e,o}var j0=function(e,t){return(j0=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};j0(G0=H0,n0=U0=du),G0.prototype=null===n0?Object.create(n0):(X0.prototype=n0.prototype,new X0),H0.prototype.stop=function(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(Wr.shared.remove(this.update,this),this._isConnectedToTicker=!1))},H0.prototype.play=function(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(Wr.shared.add(this.update,this,$.UPDATE_PRIORITY.HIGH),this._isConnectedToTicker=!0))},H0.prototype.gotoAndStop=function(e){this.stop();var t=this.currentFrame;this._currentTime=e,t!==this.currentFrame&&this.updateTexture()},H0.prototype.gotoAndPlay=function(e){var t=this.currentFrame;this._currentTime=e,t!==this.currentFrame&&this.updateTexture(),this.play()},H0.prototype.update=function(e){if(this._playing){var t=this.animationSpeed*e,r=this.currentFrame;if(null!==this._durations){var i=this._currentTime%1*this._durations[this.currentFrame];for(i+=t/60*1e3;i<0;)this._currentTime--,i+=this._durations[this.currentFrame];var n=Math.sign(this.animationSpeed*e);for(this._currentTime=Math.floor(this._currentTime);i>=this._durations[this.currentFrame];)i-=this._durations[this.currentFrame]*n,this._currentTime+=n;this._currentTime+=i/this._durations[this.currentFrame]}else this._currentTime+=t;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):r!==this.currentFrame&&(this.loop&&this.onLoop&&(0r)&&this.onLoop(),this.updateTexture())}},H0.prototype.updateTexture=function(){var e=this.currentFrame;this._previousFrame!==e&&(this._previousFrame=e,this._texture=this._textures[e],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame))},H0.prototype.destroy=function(e){this.stop(),U0.prototype.destroy.call(this,e),this.onComplete=null,this.onFrameChange=null,this.onLoop=null},H0.fromFrames=function(e){for(var t=[],r=0;r 0) var gc = undefined");else{if(!ba&&!ca)throw"Unknown runtime environment. Where are we?";e.read=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},"undefined"!=typeof arguments&&(e.arguments=arguments),"undefined"!=typeof console?(e.print||(e.print=function(e){console.log(e)}),e.printErr||(e.printErr=function(e){console.log(e)})):e.print||(e.print=function(){}),ca&&(e.load=importScripts),void 0===e.setWindowTitle&&(e.setWindowTitle=function(e){document.title=e})}function ha(e){eval.call(null,e)}for(k in!e.load&&e.read&&(e.load=function(t){ha(e.read(t))}),e.print||(e.print=function(){}),e.printErr||(e.printErr=e.print),e.arguments||(e.arguments=[]),e.thisProgram||(e.thisProgram="./this.program"),e.print=e.print,e.W=e.printErr,e.preRun=[],e.postRun=[],aa)aa.hasOwnProperty(k)&&(e[k]=aa[k]);var n={rb:function(e){ka=e},fb:function(){return ka},ua:function(){return m},ba:function(e){m=e},Ka:function(e){switch(e){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"*"===e[e.length-1]?n.J:"i"===e[0]?(assert(0==(e=parseInt(e.substr(1)))%8),e/8):0}},eb:function(e){return Math.max(n.Ka(e),n.J)},ud:16,Qd:function(e,t){return"double"===t||"i64"===t?7&e&&(assert(4==(7&e)),e+=4):assert(0==(3&e)),e},Ed:function(e,t,r){return r||"i64"!=e&&"double"!=e?e?Math.min(t||(e?n.eb(e):0),n.J):Math.min(t,8):8},L:function(t,r,i){return i&&i.length?((i=i.splice?i:Array.prototype.slice.call(i)).splice(0,0,r),e["dynCall_"+t].apply(null,i)):e["dynCall_"+t].call(null,r)},Z:[],Xa:function(e){for(var t=0;t>>0)+4294967296*(t>>>0):(e>>>0)+4294967296*(0|t)},Ua:8,J:4,vd:0},na=(e.Runtime=n,n.addFunction=n.Xa,n.removeFunction=n.nb,!1),oa,pa,ka,ra,sa;function assert(e,t){e||x("Assertion failed: "+t)}function qa(a){var b=e["_"+a];if(!b)try{b=eval("_"+a)}catch(c){}return assert(b,"Cannot call unknown function "+a+" (perhaps LLVM optimizations or closure removed it?)"),b}function wa(e,t,r){switch(r="*"===(r=r||"i8").charAt(r.length-1)?"i32":r){case"i1":case"i8":y[e>>0]=t;break;case"i16":z[e>>1]=t;break;case"i32":C[e>>2]=t;break;case"i64":pa=[t>>>0,1<=+xa(oa=t)?0>>0:~~+Aa((oa-(~~oa>>>0))/4294967296)>>>0:0],C[e>>2]=pa[0],C[e+4>>2]=pa[1];break;case"float":Ba[e>>2]=t;break;case"double":Ca[e>>3]=t;break;default:x("invalid type for setValue: "+r)}}function Da(e,t){switch(t="*"===(t=t||"i8").charAt(t.length-1)?"i32":t){case"i1":case"i8":return y[e>>0];case"i16":return z[e>>1];case"i32":case"i64":return C[e>>2];case"float":return Ba[e>>2];case"double":return Ca[e>>3];default:x("invalid type for setValue: "+t)}return null}function D(e,t,r,i){var o,a,s,l="number"==typeof e?(o=!0,e):(o=!1,e.length),u="string"==typeof t?t:null;if(r=4==r?i:[Ea,n.aa,n.Ra,n.R][void 0===r?2:r](Math.max(l,u?1:t.length)),o){for(assert(0==(3&(i=r))),e=r+(-4&l);i>2]=0;for(e=r+l;i>0]=0}else if("i8"===u)e.subarray||e.slice?E.set(e,r):E.set(new Uint8Array(e),r);else{i=0;for(;i>0],0!=i||r)&&(o++,!r||o!=r););if(r=r||o,i="",n<128){for(;0>10,56320|1023&r)))):s+=String.fromCharCode(r)}}function Ka(e,t,r,i){if(!(0>6}else{if(a<=65535){if(i<=r+2)break;t[r++]=224|a>>12}else{if(a<=2097151){if(i<=r+3)break;t[r++]=240|a>>18}else{if(a<=67108863){if(i<=r+4)break;t[r++]=248|a>>24}else{if(i<=r+5)break;t[r++]=252|a>>30,t[r++]=128|a>>24&63}t[r++]=128|a>>18&63}t[r++]=128|a>>12&63}t[r++]=128|a>>6&63}t[r++]=128|63&a}}return t[r]=0,r-n}function La(e){for(var t=0,r=0;r"):o=n;e:for(;c>0];if(!r)return t;t+=String.fromCharCode(r)}},e.stringToAscii=function(e,t){return Ia(e,t,!1)},e.UTF8ArrayToString=Ja,e.UTF8ToString=function(e){return Ja(E,e)},e.stringToUTF8Array=Ka,e.stringToUTF8=function(e,t,r){return Ka(e,E,t,r)},e.lengthBytesUTF8=La,e.UTF16ToString=function(e){for(var t=0,r="";;){var i=z[e+2*t>>1];if(0==i)return r;++t,r+=String.fromCharCode(i)}},e.stringToUTF16=function(e,t,r){if((r=void 0===r?2147483647:r)<2)return 0;var i=t;r=(r-=2)<2*e.length?r/2:e.length;for(var n=0;n>1]=e.charCodeAt(n),t+=2;return z[t>>1]=0,t-i},e.lengthBytesUTF16=function(e){return 2*e.length},e.UTF32ToString=function(e){for(var t=0,r="";;){var i=C[e+4*t>>2];if(0==i)return r;++t,65536<=i?(i-=65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i)):r+=String.fromCharCode(i)}},e.stringToUTF32=function(e,t,r){if((r=void 0===r?2147483647:r)<4)return 0;var i=t;r=i+r-4;for(var n=0;n>2]=o,r<(t+=4)+4)break}return C[t>>2]=0,t-i},e.lengthBytesUTF32=function(e){for(var t=0,r=0;r>0]=e[r],r+=1}function ta(e,t){for(var r=0;r>0]=e[r]}function Ia(e,t,r){for(var i=0;i>0]=e.charCodeAt(i);r||(y[t>>0]=0)}e.addOnPreRun=fb,e.addOnInit=function(e){cb.unshift(e)},e.addOnPreMain=function(e){db.unshift(e)},e.addOnExit=function(e){H.unshift(e)},e.addOnPostRun=gb,e.intArrayFromString=hb,e.intArrayToString=function(e){for(var t=[],r=0;r>>16)*i+r*(t>>>16)<<16)|0}),Math.Jd=Math.imul,Math.clz32||(Math.clz32=function(e){e>>>=0;for(var t=0;t<32;t++)if(e&1<<31-t)return t;return 32}),Math.Ad=Math.clz32;var xa=Math.abs,Aa=Math.ceil,za=Math.floor,ya=Math.min,I=0,ib=null,jb=null;function kb(){I++,e.monitorRunDependencies&&e.monitorRunDependencies(I)}function lb(){var t;I--,e.monitorRunDependencies&&e.monitorRunDependencies(I),0==I&&(null!==ib&&(clearInterval(ib),ib=null),jb)&&(t=jb,jb=null,t())}e.addRunDependency=kb,e.removeRunDependency=lb,e.preloadedImages={},e.preloadedAudios={},Ta=8,la=Ta+5888,cb.push(),D([124,0,0,0,98,7,0,0,124,0,0,0,111,7,0,0,164,0,0,0,124,7,0,0,16,0,0,0,0,0,0,0,164,0,0,0,157,7,0,0,24,0,0,0,0,0,0,0,164,0,0,0,227,7,0,0,24,0,0,0,0,0,0,0,164,0,0,0,191,7,0,0,56,0,0,0,0,0,0,0,164,0,0,0,5,8,0,0,40,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,40,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,88,0,0,0,1,0,0,0,5,0,0,0,3,0,0,0,4,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,114,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,0,0,0,0,0,0,0,0,0,0,0,124,1,0,0,236,1,0,0,236,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,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,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,4,0,0,0,239,20,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,5,0,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,0,0,0,0,0,0,0,0,0,5,0,0,0,4,0,0,0,231,16,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,37,115,40,37,117,41,58,32,65,115,115,101,114,116,105,111,110,32,102,97,105,108,117,114,101,58,32,34,37,115,34,10,0,109,95,115,105,122,101,32,60,61,32,109,95,99,97,112,97,99,105,116,121,0,46,47,99,114,110,95,100,101,99,111,109,112,46,104,0,109,105,110,95,110,101,119,95,99,97,112,97,99,105,116,121,32,60,32,40,48,120,55,70,70,70,48,48,48,48,85,32,47,32,101,108,101,109,101,110,116,95,115,105,122,101,41,0,110,101,119,95,99,97,112,97,99,105,116,121,32,38,38,32,40,110,101,119,95,99,97,112,97,99,105,116,121,32,62,32,109,95,99,97,112,97,99,105,116,121,41,0,110,117,109,95,99,111,100,101,115,91,99,93,0,115,111,114,116,101,100,95,112,111,115,32,60,32,116,111,116,97,108,95,117,115,101,100,95,115,121,109,115,0,112,67,111,100,101,115,105,122,101,115,91,115,121,109,95,105,110,100,101,120,93,32,61,61,32,99,111,100,101,115,105,122,101,0,116,32,60,32,40,49,85,32,60,60,32,116,97,98,108,101,95,98,105,116,115,41,0,109,95,108,111,111,107,117,112,91,116,93,32,61,61,32,99,85,73,78,84,51,50,95,77,65,88,0,99,114,110,100,95,109,97,108,108,111,99,58,32,115,105,122,101,32,116,111,111,32,98,105,103,0,99,114,110,100,95,109,97,108,108,111,99,58,32,111,117,116,32,111,102,32,109,101,109,111,114,121,0,40,40,117,105,110,116,51,50,41,112,95,110,101,119,32,38,32,40,67,82,78,68,95,77,73,78,95,65,76,76,79,67,95,65,76,73,71,78,77,69,78,84,32,45,32,49,41,41,32,61,61,32,48,0,99,114,110,100,95,114,101,97,108,108,111,99,58,32,98,97,100,32,112,116,114,0,99,114,110,100,95,102,114,101,101,58,32,98,97,100,32,112,116,114,0,102,97,108,115,101,0,40,116,111,116,97,108,95,115,121,109,115,32,62,61,32,49,41,32,38,38,32,40,116,111,116,97,108,95,115,121,109,115,32,60,61,32,112,114,101,102,105,120,95,99,111,100,105,110,103,58,58,99,77,97,120,83,117,112,112,111,114,116,101,100,83,121,109,115,41,0,17,18,19,20,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15,16,48,0,110,117,109,95,98,105,116,115,32,60,61,32,51,50,85,0,109,95,98,105,116,95,99,111,117,110,116,32,60,61,32,99,66,105,116,66,117,102,83,105,122,101,0,116,32,33,61,32,99,85,73,78,84,51,50,95,77,65,88,0,109,111,100,101,108,46,109,95,99,111,100,101,95,115,105,122,101,115,91,115,121,109,93,32,61,61,32,108,101,110,0,0,2,3,1,0,2,3,4,5,6,7,1,40,108,101,110,32,62,61,32,49,41,32,38,38,32,40,108,101,110,32,60,61,32,99,77,97,120,69,120,112,101,99,116,101,100,67,111,100,101,83,105,122,101,41,0,105,32,60,32,109,95,115,105,122,101,0,110,101,120,116,95,108,101,118,101,108,95,111,102,115,32,62,32,99,117,114,95,108,101,118,101,108,95,111,102,115,0,1,2,2,3,3,3,3,4,0,0,0,0,0,0,1,1,0,1,0,1,0,0,1,2,1,2,0,0,0,1,0,2,1,0,2,0,0,1,2,3,110,117,109,32,38,38,32,40,110,117,109,32,61,61,32,126,110,117,109,95,99,104,101,99,107,41,0,83,116,57,101,120,99,101,112,116,105,111,110,0,83,116,57,116,121,112,101,95,105,110,102,111,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,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,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,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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],"i8",4,n.Ua);var mb=n.ja(D(12,"i8",2),8);function ob(t){return e.___errno_location&&(C[e.___errno_location()>>2]=t),t}assert(0==mb%8),e._i64Subtract=nb;var J={I:1,F:2,ed:3,bc:4,H:5,Aa:6,vb:7,zc:8,ea:9,Jb:10,va:11,qd:11,Ta:12,da:13,Vb:14,Lc:15,fa:16,wa:17,rd:18,ha:19,ya:20,P:21,q:22,uc:23,Sa:24,Q:25,nd:26,Wb:27,Hc:28,ia:29,bd:30,nc:31,Vc:32,Sb:33,Zc:34,Dc:42,Zb:43,Kb:44,ec:45,fc:46,gc:47,mc:48,od:49,xc:50,dc:51,Pb:35,Ac:37,Bb:52,Eb:53,sd:54,vc:55,Fb:56,Gb:57,Qb:35,Hb:59,Jc:60,yc:61,kd:62,Ic:63,Ec:64,Fc:65,ad:66,Bc:67,yb:68,gd:69,Lb:70,Wc:71,pc:72,Tb:73,Db:74,Qc:76,Cb:77,$c:78,hc:79,ic:80,lc:81,kc:82,jc:83,Kc:38,za:39,qc:36,ga:40,Rc:95,Uc:96,Ob:104,wc:105,zb:97,Yc:91,Oc:88,Gc:92,cd:108,Nb:111,wb:98,Mb:103,tc:101,rc:100,ld:110,Xb:112,Yb:113,ac:115,Ab:114,Rb:89,oc:90,Xc:93,dd:94,xb:99,sc:102,cc:106,Mc:107,md:109,pd:87,Ub:122,hd:116,Pc:95,Cc:123,$b:84,Sc:75,Ib:125,Nc:131,Tc:130,jd:86};function pb(e,t){H.push(function(){n.L("vi",e,[t])}),pb.level=H.length}function tb(){return!!tb.p}e._memset=qb,e._bitshift64Lshr=rb,e._bitshift64Shl=sb;var ub=[],vb={};function wb(e,t){wb.p||(wb.p={}),e in wb.p||(n.L("v",t),wb.p[e]=1)}var xb={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"};function yb(e,t){for(var r=0,i=e.length-1;0<=i;i--){var n=e[i];"."===n?e.splice(i,1):".."===n?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r--;)e.unshift("..");return e}function zb(e){var t="/"===e.charAt(0),r="/"===e.substr(-1);return(e=(e=yb(e.split("/").filter(function(e){return!!e}),!t).join("/"))||t?e:".")&&r&&(e+="/"),(t?"/":"")+e}function Ab(e){var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],e||t?e+(t=t&&t.substr(0,t.length-1)):"."}function Bb(e){var t;return"/"===e?"/":-1===(t=e.lastIndexOf("/"))?e:e.substr(t+1)}function Cb(){return zb(Array.prototype.slice.call(arguments,0).join("/"))}function K(e,t){return zb(e+"/"+t)}function Db(){for(var e="",t=!1,r=arguments.length-1;-1<=r&&!t;r--){if("string"!=typeof(t=0<=r?arguments[r]:"/"))throw new TypeError("Arguments to path.resolve must be strings");if(!t)return"";e=t+"/"+e,t="/"===t.charAt(0)}return(t?"/":"")+(e=yb(e.split("/").filter(function(e){return!!e}),!t).join("/"))||"."}var Eb=[];function Fb(e,t){Eb[e]={input:[],output:[],N:t},Gb(e,Hb)}var Hb={open:function(e){var t=Eb[e.g.rdev];if(!t)throw new L(J.ha);e.tty=t,e.seekable=!1},close:function(e){e.tty.N.flush(e.tty)},flush:function(e){e.tty.N.flush(e.tty)},read:function(e,t,r,i){if(!e.tty||!e.tty.N.La)throw new L(J.Aa);for(var n,o=0,a=0;ae.e.length&&(e.e=M.cb(e),e.o=e.e.length),!e.e||e.e.subarray){var r=e.e?e.e.buffer.byteLength:0;t<=r||(t=Math.max(t,r*(r<1048576?2:1.125)|0),0!=r&&(t=Math.max(t,256)),r=e.e,e.e=new Uint8Array(t),0t)e.e.length=t;else for(;e.e.length=e.g.o)return 0;if(assert(0<=(e=Math.min(e.g.o-n,i))),8>1)}catch(e){if(e.code)throw new L(J[e.code]);throw e}return t.mode},B:function(e){for(var t=[];e.parent!==e;)t.push(e.name),e=e.parent;return t.push(e.A.pa.root),t.reverse(),Cb.apply(null,t)},Ha:{0:"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},$a:function(e){if((e&=-32769)in P.Ha)return P.Ha[e];throw new L(J.q)},k:{D:function(e){var t;e=P.B(e);try{t=fs.lstatSync(e)}catch(e){if(e.code)throw new L(J[e.code]);throw e}return P.$&&!t.K&&(t.K=4096),P.$&&!t.blocks&&(t.blocks=(t.size+t.K-1)/t.K|0),{dev:t.dev,ino:t.ino,mode:t.mode,nlink:t.nlink,uid:t.uid,gid:t.gid,rdev:t.rdev,size:t.size,atime:t.atime,mtime:t.mtime,ctime:t.ctime,K:t.K,blocks:t.blocks}},u:function(e,t){var r=P.B(e);try{void 0!==t.mode&&(fs.chmodSync(r,t.mode),e.mode=t.mode),void 0!==t.size&&fs.truncateSync(r,t.size)}catch(e){if(e.code)throw new L(J[e.code]);throw e}},lookup:function(e,t){var r=K(P.B(e),t),r=P.Ja(r);return P.createNode(e,t,r)},T:function(e,t,r,i){e=P.createNode(e,t,r,i),t=P.B(e);try{N(e.mode)?fs.mkdirSync(t,e.mode):fs.writeFileSync(t,"",{mode:e.mode})}catch(e){if(e.code)throw new L(J[e.code]);throw e}return e},rename:function(e,t,r){e=P.B(e),t=K(P.B(t),r);try{fs.renameSync(e,t)}catch(e){if(e.code)throw new L(J[e.code]);throw e}},unlink:function(e,t){e=K(P.B(e),t);try{fs.unlinkSync(e)}catch(e){if(e.code)throw new L(J[e.code]);throw e}},rmdir:function(e,t){e=K(P.B(e),t);try{fs.rmdirSync(e)}catch(e){if(e.code)throw new L(J[e.code]);throw e}},readdir:function(e){e=P.B(e);try{return fs.readdirSync(e)}catch(e){if(e.code)throw new L(J[e.code]);throw e}},symlink:function(e,t,r){e=K(P.B(e),t);try{fs.symlinkSync(r,e)}catch(e){if(e.code)throw new L(J[e.code]);throw e}},readlink:function(e){var t=P.B(e);try{return t=fs.readlinkSync(t),Ob.relative(Ob.resolve(e.A.pa.root),t)}catch(e){if(e.code)throw new L(J[e.code]);throw e}}},n:{open:function(e){var t=P.B(e.g);try{32768==(61440&e.g.mode)&&(e.V=fs.openSync(t,P.$a(e.flags)))}catch(e){if(e.code)throw new L(J[e.code]);throw e}},close:function(e){try{32768==(61440&e.g.mode)&&e.V&&fs.closeSync(e.V)}catch(e){if(e.code)throw new L(J[e.code]);throw e}},read:function(e,t,r,i,n){if(0===i)return 0;var o,a=new Buffer(i);try{o=fs.readSync(e.V,a,0,i,n)}catch(e){throw new L(J[e.code])}if(0>>0)%Q.length}function Xb(e){var t=Wb(e.parent.id,e.name);e.M=Q[t],Q[t]=e}function Nb(e,t){var r;if(r=(r=Yb(e,"x"))?r:e.k.lookup?0:J.da)throw new L(r,e);for(r=Q[Wb(e.id,t)];r;r=r.M){var i=r.name;if(r.parent.id===e.id&&i===t)return r}return e.k.lookup(e,t)}function Lb(e,t,r,i){return Zb||((Zb=function(e,t,r,i){this.parent=e=e||this,this.A=e.A,this.U=null,this.id=Sb++,this.name=t,this.mode=r,this.k={},this.n={},this.rdev=i}).prototype={},Object.defineProperties(Zb.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},kb:{get:function(){return N(this.mode)}},jb:{get:function(){return 8192==(61440&this.mode)}}})),Xb(e=new Zb(e,t,r,i)),e}function N(e){return 16384==(61440&e)}var $b={r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218};function Yb(e,t){return Tb||(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:J.da}function ac(e,t){try{return Nb(e,t),J.wa}catch(e){}return Yb(e,"wx")}function bc(){for(var e=0;e<=4096;e++)if(!Rb[e])return e;throw new L(J.Sa)}function cc(e){dc||((dc=function(){}).prototype={},Object.defineProperties(dc.prototype,{object:{get:function(){return this.g},set:function(e){this.g=e}},Ld:{get:function(){return 1!=(2097155&this.flags)}},Md:{get:function(){return 0!=(2097155&this.flags)}},Kd:{get:function(){return 1024&this.flags}}}));var t,r=new dc;for(t in e)r[t]=e[t];return e=r,r=bc(),e.fd=r,Rb[r]=e}var Kb={open:function(e){e.n=Qb[e.g.rdev].n,e.n.open&&e.n.open(e)},G:function(){throw new L(J.ia)}},qc;function Gb(e,t){Qb[e]={n:t}}function ec(e,t){var r,i="/"===t,n=!t;if(i&&Pb)throw new L(J.fa);if(!i&&!n){if(t=(r=S(t,{Ia:!1})).path,(r=r.g).U)throw new L(J.fa);if(!N(r.mode))throw new L(J.ya)}n={type:e,pa:{},Oa:t,lb:[]},t=e.A(n);(t.A=n).root=t,i?Pb=t:r&&(r.U=n,r.A&&r.A.lb.push(n))}function fc(e,t,r){var i=S(e,{parent:!0}).g;if(!(e=Bb(e))||"."===e||".."===e)throw new L(J.q);var n=ac(i,e);if(n)throw new L(n);if(i.k.T)return i.k.T(i,e,t,r);throw new L(J.I)}function gc(e,t){return t=4095&(void 0!==t?t:438),fc(e,t|=32768,0)}function V(e,t){return t=1023&(void 0!==t?t:511),fc(e,t|=16384,0)}function hc(e,t,r){return void 0===r&&(r=t,t=438),fc(e,8192|t,r)}function ic(e,t){if(!Db(e))throw new L(J.F);var r=S(t,{parent:!0}).g;if(!r)throw new L(J.F);var t=Bb(t),i=ac(r,t);if(i)throw new L(i);if(r.k.symlink)return r.k.symlink(r,t,e);throw new L(J.I)}function Vb(e){if(!(e=S(e).g))throw new L(J.F);if(e.k.readlink)return Db(T(e.parent),e.k.readlink(e));throw new L(J.q)}function jc(e,t){e="string"==typeof e?S(e,{la:!0}).g:e;if(!e.k.u)throw new L(J.I);e.k.u(e,{mode:4095&t|-4096&e.mode,timestamp:Date.now()})}function kc(t,r){var i,n;if(""===t)throw new L(J.F);if("string"==typeof r){if(void 0===(i=$b[r]))throw Error("Unknown file open mode: "+r)}else i=r;if(o=64&(r=i)?4095&(void 0===o?438:o)|32768:0,"object"==typeof t)n=t;else{t=zb(t);try{n=S(t,{la:!(131072&r)}).g}catch(e){}}if(i=!1,64&r)if(n){if(128&r)throw new L(J.wa)}else n=fc(t,o,0),i=!0;if(!n)throw new L(J.F);if(8192==(61440&n.mode)&&(r&=-513),65536&r&&!N(n.mode))throw new L(J.ya);if(!i&&(o=n?40960==(61440&n.mode)?J.ga:N(n.mode)&&(0!=(2097155&r)||512&r)?J.P:(o=["r","w","rw"][3&r],512&r&&(o+="w"),Yb(n,o)):J.F))throw new L(o);if(512&r){var o,a="string"==typeof(o=n)?S(o,{la:!0}).g:o;if(!a.k.u)throw new L(J.I);if(N(a.mode))throw new L(J.P);if(32768!=(61440&a.mode))throw new L(J.q);if(o=Yb(a,"w"))throw new L(o);a.k.u(a,{size:0,timestamp:Date.now()})}r&=-641,(n=cc({g:n,path:T(n),flags:r,seekable:!0,position:0,n:n.n,tb:[],error:!1})).n.open&&n.n.open(n),!e.logReadFiles||1&r||(t in(lc=lc||{})||(lc[t]=1,e.printErr("read file: "+t)));try{R.onOpenFile&&(a=0,1!=(2097155&r)&&(a|=1),0!=(2097155&r)&&(a|=2),R.onOpenFile(t,a))}catch(e){console.log("FS.trackingDelegate['onOpenFile']('"+t+"', flags) threw an exception: "+e.message)}return n}function mc(e){e.na&&(e.na=null);try{e.n.close&&e.n.close(e)}catch(e){throw e}finally{Rb[e.fd]=null}}function nc(e,t,r){if(!e.seekable||!e.n.G)throw new L(J.ia);e.position=e.n.G(e,t,r),e.tb=[]}function oc(e,t,r,i,n,o){if(i<0||n<0)throw new L(J.q);if(0==(2097155&e.flags))throw new L(J.ea);if(N(e.g.mode))throw new L(J.P);if(!e.n.write)throw new L(J.q);1024&e.flags&&nc(e,0,2);var a=!0;if(void 0===n)n=e.position,a=!1;else if(!e.seekable)throw new L(J.ia);t=e.n.write(e,t,r,i,n,o),a||(e.position+=t);try{e.path&&R.onWriteToFile&&R.onWriteToFile(e.path)}catch(e){console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: "+e.message)}return t}function pc(){L||((L=function(e,t){this.g=t,this.qb=function(e){for(var t in this.S=e,J)if(J[t]===e){this.code=t;break}},this.qb(e),this.message=xb[e]}).prototype=Error(),L.prototype.constructor=L,[J.F].forEach(function(e){Mb[e]=new L(e),Mb[e].stack=""}))}function rc(e,t){var r=0;return e&&(r|=365),t&&(r|=146),r}function sc(e,t,r,i){return gc(e=K("string"==typeof e?e:T(e),t),rc(r,i))}function tc(e,t,r,i,n,o){if(n=gc(e=t?K("string"==typeof e?e:T(e),t):e,i=rc(i,n)),r){if("string"==typeof r){e=Array(r.length),t=0;for(var a=r.length;t>2]}function xc(){var e=X();if(e=Rb[e])return e;throw new L(J.ea)}var yc={};function Ga(e){Ga.p||(r=Qa(r),Ga.p=!0,assert(n.R),Ga.bb=n.R,n.R=function(){x("cannot dynamically allocate, sbrk now has control")});var t=r;return 0==e||Ga.bb(e)?t:4294967295}e._i64Add=zc;var Ac=1;function Cc(e,t){var r;return Dc=e,Ec=t,Fc?(0==e?(Y=function(){setTimeout(Gc,t)},Hc="timeout"):1==e?(Y=function(){Ic(Gc)},Hc="rAF"):2==e&&(window.setImmediate||(r=[],window.addEventListener("message",function(e){e.source===window&&"__emcc"===e.data&&(e.stopPropagation(),r.shift()())},!0),window.setImmediate=function(e){r.push(e),window.postMessage("__emcc","*")}),Y=function(){window.setImmediate(Gc)},Hc="immediate"),0):1}function Jc(a,t,r,s,i){e.noExitRuntime=!0,assert(!Fc,"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."),Fc=a,Kc=s;var l=Lc;if(Gc=function(){var t,r,i,o;na||(0>r-6&63,r=r-6,e=e+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[n];2==r?e=e+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(3&t)<<4]+"==":4==r&&(e=e+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(15&t)<<2]+"="),u.src="data:audio/x-"+a.substr(-3)+";base64,"+e,s(u)}},u.src=n,ad(function(){s(u)})}});var r=e.canvas;r&&(r.sa=r.requestPointerLock||r.mozRequestPointerLock||r.webkitRequestPointerLock||r.msRequestPointerLock||function(){},r.Fa=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},r.Fa=r.Fa.bind(document),document.addEventListener("pointerlockchange",t,!1),document.addEventListener("mozpointerlockchange",t,!1),document.addEventListener("webkitpointerlockchange",t,!1),document.addEventListener("mspointerlockchange",t,!1),e.elementPointerLock&&r.addEventListener("click",function(e){!Tc&&r.sa&&(r.sa(),e.preventDefault())},!1))}}function bd(t,r,i,n){if(r&&e.ka&&t==e.canvas)return e.ka;var o,a;if(r){if(a={antialias:!1,alpha:!1},n)for(var s in n)a[s]=n[s];(a=GL.createContext(t,a))&&(o=GL.getContext(a).td),t.style.backgroundColor="black"}else o=t.getContext("2d");return o?(i&&(r||assert("undefined"==typeof GLctx,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),e.ka=o,r&&GL.Od(a),e.Td=r,Uc.forEach(function(e){e()}),Vc()),o):null}var cd=!1,dd=void 0,ed=void 0;function fd(t,r,i){function n(){Sc=!1;var t=o.parentNode;(document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement||document.msFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement)===t?(o.Da=document.cancelFullScreen||document.mozCancelFullScreen||document.webkitCancelFullScreen||document.msExitFullscreen||document.exitFullscreen||function(){},o.Da=o.Da.bind(document),dd&&o.sa(),Sc=!0,ed&&gd()):(t.parentNode.insertBefore(o,t),t.parentNode.removeChild(t),ed&&hd()),e.onFullScreen&&e.onFullScreen(Sc),id(o)}void 0===(dd=t)&&(dd=!0),void 0===(ed=r)&&(ed=!1),void 0===(jd=i)&&(jd=null);var o=e.canvas,a=(cd||(cd=!0,document.addEventListener("fullscreenchange",n,!1),document.addEventListener("mozfullscreenchange",n,!1),document.addEventListener("webkitfullscreenchange",n,!1),document.addEventListener("MSFullscreenChange",n,!1)),document.createElement("div"));o.parentNode.insertBefore(a,o),a.appendChild(o),a.p=a.requestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen||(a.webkitRequestFullScreen?function(){a.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),i?a.p({Ud:i}):a.p()}var kd=0;function ld(e){var t=Date.now();if(0===kd)kd=t+1e3/60;else for(;kd<=t+2;)kd+=1e3/60;t=Math.max(kd-t,0),setTimeout(e,t)}function Ic(e){"undefined"==typeof window?ld(e):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||ld),window.requestAnimationFrame(e))}function ad(t){e.noExitRuntime=!0,setTimeout(function(){na||t()},1e4)}function $c(e){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[e.substr(e.lastIndexOf(".")+1)]}function md(e,t,r){var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=function(){200==i.status||0==i.status&&i.response?t(i.response):r()},i.onerror=r,i.send(null)}function nd(t,r,e){md(t,function(e){assert(e,'Loading data file "'+t+'" failed (no arrayBuffer).'),r(new Uint8Array(e)),lb()},function(){if(!e)throw'Loading data file "'+t+'" failed.';e()}),kb()}var od=[],Wc,Xc,Yc,Zc,jd,fs,Ob;function pd(){var t=e.canvas;od.forEach(function(e){e(t.width,t.height)})}function gd(){var e;"undefined"!=typeof SDL&&(e=Sa[SDL.screen+0*n.J>>2],C[SDL.screen+0*n.J>>2]=8388608|e),pd()}function hd(){var e;"undefined"!=typeof SDL&&(e=Sa[SDL.screen+0*n.J>>2],C[SDL.screen+0*n.J>>2]=-8388609&e),pd()}function id(t,r,i){r&&i?(t.ub=r,t.hb=i):(r=t.ub,i=t.hb);var n,o=r,a=i;e.forcedAspectRatio&&0this.length-1||e<0))return t=e%this.chunkSize,this.gb(e/this.chunkSize|0)[t]},a.prototype.pb=function(e){this.gb=e},a.prototype.Ca=function(){var e=new XMLHttpRequest;if(e.open("HEAD",l,!1),e.send(null),!(200<=e.status&&e.status<300||304===e.status))throw Error("Couldn't load "+l+". Status: "+e.status);var o=Number(e.getResponseHeader("Content-length")),a=1048576,s=((e=e.getResponseHeader("Accept-Ranges"))&&"bytes"===e||(a=o),this);s.pb(function(e){var t=e*a,r=(e+1)*a-1,r=Math.min(r,o-1);if(void 0===s.Y[e]){var i=s.Y;if(r=(e=e.g.e).length)return 0;if(assert(0<=(i=Math.min(e.length-n,i))),e.slice)for(var o=0;o>2]=0):-J.Q;case 21520:return i.tty?-J.q:-J.Q;case 21531:if(r=X(),i.n.ib)return i.n.ib(i,n,r);throw new L(J.Q);default:x("bad ioctl syscall "+n)}}catch(e){return void 0!==vc&&e instanceof L||x(e),-e.S}},___syscall6:function(e,t){wc=t;try{return mc(xc()),0}catch(e){return void 0!==vc&&e instanceof L||x(e),-e.S}},_emscripten_set_main_loop_timing:Cc,__ZSt18uncaught_exceptionv:tb,___setErrNo:ob,_sbrk:Ga,___cxa_begin_catch:function(e){tb.p--,ub.push(e);e:{if(e&&!vb[e])for(var t in vb)if(vb[t].wd===e)break e;t=e}return t&&vb[t].Sd++,e},_emscripten_memcpy_big:function(e,t,r){return E.set(E.subarray(t,t+r),e),e},_sysconf:function(e){switch(e){case 30:return 4096;case 85:return F/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}return ob(J.q),-1},_pthread_getspecific:function(e){return yc[e]||0},_pthread_self:function(){return 0},_pthread_once:wb,_pthread_key_create:function(e){return 0==e?J.q:(C[e>>2]=Ac,yc[Ac]=0,Ac++,0)},___unlock:function(){},_emscripten_set_main_loop:Jc,_pthread_setspecific:function(e,t){return e in yc?(yc[e]=t,0):J.q},___lock:function(){},_abort:function(){e.abort()},_pthread_cleanup_push:pb,_time:function(e){var t=Date.now()/1e3|0;return e&&(C[e>>2]=t),t},___syscall140:function(e,t){wc=t;try{var r=xc(),i=X(),n=X(),o=X(),a=X();return assert(0===i),nc(r,n,a),C[o>>2]=r.position,r.na&&0===n&&0===a&&(r.na=null),0}catch(e){return void 0!==vc&&e instanceof L||x(e),-e.S}},___syscall146:function(e,t){wc=t;try{var r,i=xc(),n=X();e:{for(var o=X(),a=0,s=0;s>2],C[n+(8*s+4)>>2],void 0);if(l<0){r=-1;break e}a+=l}r=a}return r}catch(e){return void 0!==vc&&e instanceof L||x(e),-e.S}},STACKTOP:m,STACK_MAX:Va,tempDoublePtr:mb,ABORT:na,cttz_i8:qd},function(e,t,r){"use asm";var i=e.Int8Array;var n=e.Int16Array;var o=e.Int32Array;var s=e.Uint8Array;var u=e.Uint16Array;var h=e.Uint32Array;var c=e.Float32Array;var f=e.Float64Array;var pe=new i(r);var $=new n(r);var de=new o(r);var me=new s(r);var _e=new u(r);var p=new h(r);var d=new c(r);var ee=new f(r);var y=e.byteLength;var ge=t.STACKTOP|0;var x=t.STACK_MAX|0;var te=t.tempDoublePtr|0;var T=t.ABORT|0;var w=t.cttz_i8|0;var E=0;var S=0;var A=0;var k=0;var O=e.NaN,P=e.Infinity;var R=0,C=0,M=0,I=0,D=0.0,L=0,H=0,Y=0,W=0.0;var re=0;var q=0;var V=0;var K=0;var J=0;var Z=0;var Q=0;var le=0;var ue=0;var he=0;var ce=e.Math.floor;var fe=e.Math.abs;var Te=e.Math.sqrt;var we=e.Math.pow;var Ee=e.Math.cos;var Se=e.Math.sin;var Ae=e.Math.tan;var ke=e.Math.acos;var Oe=e.Math.asin;var Pe=e.Math.atan;var Re=e.Math.atan2;var Ce=e.Math.exp;var Me=e.Math.log;var Ie=e.Math.ceil;var ve=e.Math.imul;var De=e.Math.min;var m=e.Math.clz32;var a=t.abort;var Le=t.assert;var Fe=t.invoke_iiii;var Ne=t.invoke_viiiii;var ze=t.invoke_vi;var Be=t.invoke_ii;var je=t.invoke_viii;var Ue=t.invoke_v;var Ge=t.invoke_viiiiii;var Xe=t.invoke_iiiiii;var He=t.invoke_viiii;var Ye=t._pthread_cleanup_pop;var We=t.___syscall54;var qe=t.___syscall6;var Ve=t._emscripten_set_main_loop_timing;var Ke=t.__ZSt18uncaught_exceptionv;var Je=t.___setErrNo;var z=t._sbrk;var Ze=t.___cxa_begin_catch;var Qe=t._emscripten_memcpy_big;var $e=t._sysconf;var et=t._pthread_getspecific;var tt=t._pthread_self;var rt=t._pthread_once;var it=t._pthread_key_create;var nt=t.___unlock;var ot=t._emscripten_set_main_loop;var at=t._pthread_setspecific;var st=t.___lock;var B=t._abort;var lt=t._pthread_cleanup_push;var ut=t._time;var ht=t.___syscall140;var ct=t.___syscall146;var ft=0.0;function pt(e){if(y(e)&16777215||y(e)<=16777215||y(e)>2147483648)return false;pe=new i(e);$=new n(e);de=new o(e);me=new s(e);_e=new u(e);p=new h(e);d=new c(e);ee=new f(e);r=e;return true}function dt(e){e=e|0;var t=0;t=ge;ge=ge+e|0;ge=ge+15&-16;return t|0}function mt(){return ge|0}function _t(e){e=e|0;ge=e}function gt(e,t){e=e|0;t=t|0;ge=e;x=t}function vt(e,t){e=e|0;t=t|0;if(!E){E=e;S=t}}function yt(e){e=e|0;pe[te>>0]=pe[e>>0];pe[te+1>>0]=pe[e+1>>0];pe[te+2>>0]=pe[e+2>>0];pe[te+3>>0]=pe[e+3>>0]}function bt(e){e=e|0;pe[te>>0]=pe[e>>0];pe[te+1>>0]=pe[e+1>>0];pe[te+2>>0]=pe[e+2>>0];pe[te+3>>0]=pe[e+3>>0];pe[te+4>>0]=pe[e+4>>0];pe[te+5>>0]=pe[e+5>>0];pe[te+6>>0]=pe[e+6>>0];pe[te+7>>0]=pe[e+7>>0]}function xt(e){e=e|0;re=e}function Tt(){return re|0}function F(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0,a=0,s=0,l=0,u=0,h=0,c=0,f=0,p=0,d=0,m=0;m=ge;ge=ge+608|0;f=m+88|0;c=m+72|0;l=m+64|0;s=m+48|0;a=m+24|0;o=m;h=m+96|0;p=m+92|0;u=e+4|0;d=e+8|0;if((de[u>>2]|0)>>>0>(de[d>>2]|0)>>>0){de[o>>2]=1154;de[o+4>>2]=2120;de[o+8>>2]=1133;xe(h,1100,o)|0;be(h,m+16|0)|0}if((2147418112/(i>>>0)|0)>>>0<=t>>>0){de[a>>2]=1154;de[a+4>>2]=2121;de[a+8>>2]=1169;xe(h,1100,a)|0;be(h,m+40|0)|0}a=de[d>>2]|0;if(a>>>0>=t>>>0){d=1;ge=m;return d|0}do{if(r){if(t){o=t+-1|0;if(!(o&t)){o=11;break}else t=o}else t=-1;t=t>>>16|t;t=t>>>8|t;t=t>>>4|t;t=t>>>2|t;t=(t>>>1|t)+1|0;o=10}else o=10}while(0);if((o|0)==10)if(!t){t=0;o=12}else o=11;if((o|0)==11)if(t>>>0<=a>>>0)o=12;if((o|0)==12){de[s>>2]=1154;de[s+4>>2]=2130;de[s+8>>2]=1217;xe(h,1100,s)|0;be(h,l)|0}r=ve(t,i)|0;do{if(!n){o=wt(de[e>>2]|0,r,p,1)|0;if(!o){d=0;ge=m;return d|0}else{de[e>>2]=o;break}}else{a=j(r,p)|0;if(!a){d=0;ge=m;return d|0}Ci[n&0](a,de[e>>2]|0,de[u>>2]|0);o=de[e>>2]|0;do{if(o)if(!(o&7)){X[de[104>>2]&1](o,0,0,1,de[27]|0)|0;break}else{de[c>>2]=1154;de[c+4>>2]=2499;de[c+8>>2]=1516;xe(h,1100,c)|0;be(h,f)|0;break}}while(0);de[e>>2]=a}}while(0);o=de[p>>2]|0;if(o>>>0>r>>>0)t=(o>>>0)/(i>>>0)|0;de[d>>2]=t;d=1;ge=m;return d|0}function wt(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,o=0,a=0,s=0,l=0,u=0;u=ge;ge=ge+592|0;l=u+48|0;o=u+24|0;n=u;s=u+72|0;a=u+68|0;if(e&7){de[n>>2]=1154;de[n+4>>2]=2499;de[n+8>>2]=1494;xe(s,1100,n)|0;be(s,u+16|0)|0;l=0;ge=u;return l|0}if(t>>>0>2147418112){de[o>>2]=1154;de[o+4>>2]=2499;de[o+8>>2]=1387;xe(s,1100,o)|0;be(s,u+40|0)|0;l=0;ge=u;return l|0}de[a>>2]=t;i=X[de[104>>2]&1](e,t,a,i,de[27]|0)|0;if(r)de[r>>2]=de[a>>2];if(!(i&7)){l=i;ge=u;return l|0}de[l>>2]=1154;de[l+4>>2]=2551;de[l+8>>2]=1440;xe(s,1100,l)|0;be(s,u+64|0)|0;l=i;ge=u;return l|0}function j(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,l=0;l=ge;ge=ge+592|0;a=l+48|0;s=l+24|0;r=l;o=l+72|0;n=l+68|0;i=e+3&-4;i=(i|0)!=0?i:4;if(i>>>0>2147418112){de[r>>2]=1154;de[r+4>>2]=2499;de[r+8>>2]=1387;xe(o,1100,r)|0;be(o,l+16|0)|0;s=0;ge=l;return s|0}de[n>>2]=i;r=X[de[104>>2]&1](0,i,n,1,de[27]|0)|0;e=de[n>>2]|0;if(t)de[t>>2]=e;if((r|0)==0|e>>>0
>>0){de[s>>2]=1154;de[s+4>>2]=2499;de[s+8>>2]=1413;xe(o,1100,s)|0;be(o,l+40|0)|0;s=0;ge=l;return s|0}if(!(r&7)){s=r;ge=l;return s|0}de[a>>2]=1154;de[a+4>>2]=2526;de[a+8>>2]=1440;xe(o,1100,a)|0;be(o,l+64|0)|0;s=r;ge=l;return s|0}function Et(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,o=0,a=0,s=0,l=0,u=0,h=0,c=0,f=0,p=0,d=0,m=0,_=0,g=0,v=0,y=0,b=0,x=0,T=0,w=0,E=0,S=0,A=0,k=0,O=0,P=0,R=0,F=0,C=0,N=0,M=0,z=0,I=0,D=0,L=0;L=ge;ge=ge+960|0;z=L+232|0;M=L+216|0;N=L+208|0;C=L+192|0;F=L+184|0;R=L+168|0;P=L+160|0;O=L+144|0;S=L+136|0;E=L+120|0;w=L+112|0;T=L+96|0;y=L+88|0;v=L+72|0;g=L+64|0;_=L+48|0;c=L+40|0;p=L+24|0;f=L+16|0;h=L;k=L+440|0;I=L+376|0;D=L+304|0;m=L+236|0;if((t|0)==0|i>>>0>11){e=0;ge=L;return e|0}de[e>>2]=t;n=D;o=n+68|0;do{de[n>>2]=0;n=n+4|0}while((n|0)<(o|0));o=0;do{n=pe[r+o>>0]|0;if(n<<24>>24){A=D+((n&255)<<2)|0;de[A>>2]=(de[A>>2]|0)+1}o=o+1|0}while((o|0)!=(t|0));o=0;u=1;a=0;s=-1;l=0;while(1){n=de[D+(u<<2)>>2]|0;if(!n)de[e+28+(u+-1<<2)>>2]=0;else{A=u+-1|0;de[I+(A<<2)>>2]=o;o=n+o|0;x=16-u|0;de[e+28+(A<<2)>>2]=(o+-1<>2]=l;de[m+(u<<2)>>2]=l;a=a>>>0>u>>>0?a:u;s=s>>>0>>0?s:u;l=n+l|0}u=u+1|0;if((u|0)==17){A=a;break}else o=o<<1}de[e+4>>2]=l;o=e+172|0;do{if(l>>>0>(de[o>>2]|0)>>>0){de[o>>2]=l;if(l){n=l+-1|0;if(n&l)d=14}else{n=-1;d=14}if((d|0)==14){x=n>>>16|n;x=x>>>8|x;x=x>>>4|x;x=x>>>2|x;x=(x>>>1|x)+1|0;de[o>>2]=x>>>0>t>>>0?t:x}a=e+176|0;n=de[a>>2]|0;do{if(n){x=de[n+-4>>2]|0;n=n+-8|0;if(!((x|0)!=0?(x|0)==(~de[n>>2]|0):0)){de[h>>2]=1154;de[h+4>>2]=644;de[h+8>>2]=1863;xe(k,1100,h)|0;be(k,f)|0}if(!(n&7)){X[de[104>>2]&1](n,0,0,1,de[27]|0)|0;break}else{de[p>>2]=1154;de[p+4>>2]=2499;de[p+8>>2]=1516;xe(k,1100,p)|0;be(k,c)|0;break}}}while(0);o=de[o>>2]|0;o=(o|0)!=0?o:1;n=j((o<<1)+8|0,0)|0;if(!n){de[a>>2]=0;n=0;break}else{de[n+4>>2]=o;de[n>>2]=~o;de[a>>2]=n+8;d=25;break}}else d=25}while(0);e:do{if((d|0)==25){x=e+24|0;pe[x>>0]=s;pe[e+25>>0]=A;o=e+176|0;a=0;do{b=pe[r+a>>0]|0;n=b&255;if(b<<24>>24){if(!(de[D+(n<<2)>>2]|0)){de[_>>2]=1154;de[_+4>>2]=2273;de[_+8>>2]=1261;xe(k,1100,_)|0;be(k,g)|0}b=m+(n<<2)|0;n=de[b>>2]|0;de[b>>2]=n+1;if(n>>>0>=l>>>0){de[v>>2]=1154;de[v+4>>2]=2277;de[v+8>>2]=1274;xe(k,1100,v)|0;be(k,y)|0}$[(de[o>>2]|0)+(n<<1)>>1]=a}a=a+1|0}while((a|0)!=(t|0));n=pe[x>>0]|0;y=(n&255)>>>0>>0?i:0;b=e+8|0;de[b>>2]=y;v=(y|0)!=0;if(v){g=1<>>0>(de[n>>2]|0)>>>0){de[n>>2]=g;a=e+168|0;n=de[a>>2]|0;do{if(n){_=de[n+-4>>2]|0;n=n+-8|0;if(!((_|0)!=0?(_|0)==(~de[n>>2]|0):0)){de[T>>2]=1154;de[T+4>>2]=644;de[T+8>>2]=1863;xe(k,1100,T)|0;be(k,w)|0}if(!(n&7)){X[de[104>>2]&1](n,0,0,1,de[27]|0)|0;break}else{de[E>>2]=1154;de[E+4>>2]=2499;de[E+8>>2]=1516;xe(k,1100,E)|0;be(k,S)|0;break}}}while(0);n=g<<2;o=j(n+8|0,0)|0;if(!o){de[a>>2]=0;n=0;break e}else{S=o+8|0;de[o+4>>2]=g;de[o>>2]=~g;de[a>>2]=S;o=S;break}}else{o=e+168|0;n=g<<2;a=o;o=de[o>>2]|0}}while(0);G(o|0,-1,n|0)|0;d=e+176|0;_=1;do{if(de[D+(_<<2)>>2]|0){t=y-_|0;m=1<>2]|0;if(o>>>0>=16){de[O>>2]=1154;de[O+4>>2]=1953;de[O+8>>2]=1737;xe(k,1100,O)|0;be(k,P)|0}n=de[e+28+(o<<2)>>2]|0;if(!n)p=-1;else p=(n+-1|0)>>>(16-_|0);if(s>>>0<=p>>>0){c=(de[e+96+(o<<2)>>2]|0)-s|0;f=_<<16;do{n=_e[(de[d>>2]|0)+(c+s<<1)>>1]|0;if((me[r+n>>0]|0|0)!=(_|0)){de[R>>2]=1154;de[R+4>>2]=2319;de[R+8>>2]=1303;xe(k,1100,R)|0;be(k,F)|0}h=s<>>0>=g>>>0){de[C>>2]=1154;de[C+4>>2]=2325;de[C+8>>2]=1337;xe(k,1100,C)|0;be(k,N)|0}n=de[a>>2]|0;if((de[n+(l<<2)>>2]|0)!=-1){de[M>>2]=1154;de[M+4>>2]=2327;de[M+8>>2]=1360;xe(k,1100,M)|0;be(k,z)|0;n=de[a>>2]|0}de[n+(l<<2)>>2]=o;u=u+1|0}while(u>>>0>>0);s=s+1|0}while(s>>>0<=p>>>0)}}_=_+1|0}while(y>>>0>=_>>>0);n=pe[x>>0]|0}o=e+96|0;de[o>>2]=(de[o>>2]|0)-(de[I>>2]|0);o=e+100|0;de[o>>2]=(de[o>>2]|0)-(de[I+4>>2]|0);o=e+104|0;de[o>>2]=(de[o>>2]|0)-(de[I+8>>2]|0);o=e+108|0;de[o>>2]=(de[o>>2]|0)-(de[I+12>>2]|0);o=e+112|0;de[o>>2]=(de[o>>2]|0)-(de[I+16>>2]|0);o=e+116|0;de[o>>2]=(de[o>>2]|0)-(de[I+20>>2]|0);o=e+120|0;de[o>>2]=(de[o>>2]|0)-(de[I+24>>2]|0);o=e+124|0;de[o>>2]=(de[o>>2]|0)-(de[I+28>>2]|0);o=e+128|0;de[o>>2]=(de[o>>2]|0)-(de[I+32>>2]|0);o=e+132|0;de[o>>2]=(de[o>>2]|0)-(de[I+36>>2]|0);o=e+136|0;de[o>>2]=(de[o>>2]|0)-(de[I+40>>2]|0);o=e+140|0;de[o>>2]=(de[o>>2]|0)-(de[I+44>>2]|0);o=e+144|0;de[o>>2]=(de[o>>2]|0)-(de[I+48>>2]|0);o=e+148|0;de[o>>2]=(de[o>>2]|0)-(de[I+52>>2]|0);o=e+152|0;de[o>>2]=(de[o>>2]|0)-(de[I+56>>2]|0);o=e+156|0;de[o>>2]=(de[o>>2]|0)-(de[I+60>>2]|0);o=e+16|0;de[o>>2]=0;a=e+20|0;de[a>>2]=n&255;t:do{if(v){while(1){if(!i)break t;n=i+-1|0;if(!(de[D+(i<<2)>>2]|0))i=n;else break}de[o>>2]=de[e+28+(n<<2)>>2];n=y+1|0;de[a>>2]=n;if(n>>>0<=A>>>0){while(1){if(de[D+(n<<2)>>2]|0)break;n=n+1|0;if(n>>>0>A>>>0)break t}de[a>>2]=n}}}while(0);de[e+92>>2]=-1;de[e+160>>2]=1048575;de[e+12>>2]=32-(de[b>>2]|0);n=1}}while(0);e=n;ge=L;return e|0}function St(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0;if(!e){n=Yr(t)|0;if(!r){r=n;return r|0}if(!n)o=0;else o=qr(n)|0;de[r>>2]=o;r=n;return r|0}if(!t){b(e);if(!r){r=0;return r|0}de[r>>2]=0;r=0;return r|0}n=Wr(e,t)|0;o=(n|0)!=0;if(o|i^1)o=o?n:e;else{n=Wr(e,t)|0;o=(n|0)==0?e:n}if(!r){r=n;return r|0}t=qr(o)|0;de[r>>2]=t;r=n;return r|0}function _(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;if(!((e|0)!=0&t>>>0>73&(r|0)!=0)){r=0;return r|0}if((de[r>>2]|0)!=40|t>>>0<74){r=0;return r|0}if(((me[e>>0]|0)<<8|(me[e+1>>0]|0)|0)!=18552){r=0;return r|0}if(((me[e+2>>0]|0)<<8|(me[e+3>>0]|0))>>>0<74){r=0;return r|0}if(((me[e+7>>0]|0)<<16|(me[e+6>>0]|0)<<24|(me[e+8>>0]|0)<<8|(me[e+9>>0]|0))>>>0>t>>>0){r=0;return r|0}de[r+4>>2]=(me[e+12>>0]|0)<<8|(me[e+13>>0]|0);de[r+8>>2]=(me[e+14>>0]|0)<<8|(me[e+15>>0]|0);de[r+12>>2]=me[e+16>>0];de[r+16>>2]=me[e+17>>0];t=e+18|0;i=r+32|0;de[i>>2]=me[t>>0];de[i+4>>2]=0;t=pe[t>>0]|0;de[r+20>>2]=t<<24>>24==0|t<<24>>24==9?8:16;de[r+24>>2]=(me[e+26>>0]|0)<<16|(me[e+25>>0]|0)<<24|(me[e+27>>0]|0)<<8|(me[e+28>>0]|0);de[r+28>>2]=(me[e+30>>0]|0)<<16|(me[e+29>>0]|0)<<24|(me[e+31>>0]|0)<<8|(me[e+32>>0]|0);r=1;return r|0}function At(e){e=e|0;Ze(e|0)|0;$t()}function N(e){e=e|0;var t=0,r=0,i=0,n=0,o=0;o=ge;ge=ge+544|0;n=o;i=o+24|0;t=de[e+20>>2]|0;if(t)kt(t);t=e+4|0;r=de[t>>2]|0;if(!r){n=e+16|0;pe[n>>0]=0;ge=o;return}if(!(r&7))X[de[104>>2]&1](r,0,0,1,de[27]|0)|0;else{de[n>>2]=1154;de[n+4>>2]=2499;de[n+8>>2]=1516;xe(i,1100,n)|0;be(i,o+16|0)|0}de[t>>2]=0;de[e+8>>2]=0;de[e+12>>2]=0;n=e+16|0;pe[n>>0]=0;ge=o}function kt(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,l=0,u=0,h=0,c=0,f=0,p=0,d=0;p=ge;ge=ge+640|0;f=p+112|0;c=p+96|0;h=p+88|0;u=p+72|0;l=p+64|0;s=p+48|0;i=p+40|0;o=p+24|0;n=p+16|0;r=p;a=p+120|0;if(!e){ge=p;return}t=de[e+168>>2]|0;do{if(t){d=de[t+-4>>2]|0;t=t+-8|0;if(!((d|0)!=0?(d|0)==(~de[t>>2]|0):0)){de[r>>2]=1154;de[r+4>>2]=644;de[r+8>>2]=1863;xe(a,1100,r)|0;be(a,n)|0}if(!(t&7)){X[de[104>>2]&1](t,0,0,1,de[27]|0)|0;break}else{de[o>>2]=1154;de[o+4>>2]=2499;de[o+8>>2]=1516;xe(a,1100,o)|0;be(a,i)|0;break}}}while(0);t=de[e+176>>2]|0;do{if(t){d=de[t+-4>>2]|0;t=t+-8|0;if(!((d|0)!=0?(d|0)==(~de[t>>2]|0):0)){de[s>>2]=1154;de[s+4>>2]=644;de[s+8>>2]=1863;xe(a,1100,s)|0;be(a,l)|0}if(!(t&7)){X[de[104>>2]&1](t,0,0,1,de[27]|0)|0;break}else{de[u>>2]=1154;de[u+4>>2]=2499;de[u+8>>2]=1516;xe(a,1100,u)|0;be(a,h)|0;break}}}while(0);if(!(e&7)){X[de[104>>2]&1](e,0,0,1,de[27]|0)|0;ge=p}else{de[c>>2]=1154;de[c+4>>2]=2499;de[c+8>>2]=1516;xe(a,1100,c)|0;be(a,f)|0;ge=p}}function Ot(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,l=0,u=0,h=0;h=ge;ge=ge+560|0;a=h+40|0;s=h+24|0;t=h;o=h+48|0;n=e+8|0;r=de[n>>2]|0;if((r+-1|0)>>>0>=8192){de[t>>2]=1154;de[t+4>>2]=2997;de[t+8>>2]=1541;xe(o,1100,t)|0;be(o,h+16|0)|0}de[e>>2]=r;i=e+20|0;t=de[i>>2]|0;if(!t){t=j(180,0)|0;if(!t)t=0;else{u=t+164|0;de[u>>2]=0;de[u+4>>2]=0;de[u+8>>2]=0;de[u+12>>2]=0}de[i>>2]=t;u=t;l=de[e>>2]|0}else{u=t;l=r}if(!(de[n>>2]|0)){de[s>>2]=1154;de[s+4>>2]=903;de[s+8>>2]=1781;xe(o,1100,s)|0;be(o,a)|0;o=de[e>>2]|0}else o=l;n=de[e+4>>2]|0;if(o>>>0>16){r=o;t=0}else{e=0;u=Et(u,l,n,e)|0;ge=h;return u|0}while(1){i=t+1|0;if(r>>>0>3){r=r>>>1;t=i}else{r=i;break}}e=t+2+((r|0)!=32&1<>>0>>0&1)|0;e=e>>>0<11?e&255:11;u=Et(u,l,n,e)|0;ge=h;return u|0}function U(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,l=0,u=0,h=0,c=0,f=0,p=0,d=0,m=0,_=0,g=0,v=0,y=0,b=0,x=0,T=0,w=0,E=0,S=0,A=0,k=0,O=0,P=0,R=0,C=0,M=0,I=0,D=0,L=0;L=ge;ge=ge+800|0;R=L+256|0;P=L+240|0;O=L+232|0;k=L+216|0;A=L+208|0;S=L+192|0;E=L+184|0;w=L+168|0;T=L+160|0;x=L+144|0;b=L+136|0;y=L+120|0;v=L+112|0;g=L+96|0;_=L+88|0;m=L+72|0;c=L+64|0;h=L+48|0;s=L+40|0;l=L+24|0;o=L+16|0;n=L;I=L+288|0;D=L+264|0;C=Pt(e,14)|0;if(!C){de[t>>2]=0;r=t+4|0;i=de[r>>2]|0;if(i){if(!(i&7))X[de[104>>2]&1](i,0,0,1,de[27]|0)|0;else{de[n>>2]=1154;de[n+4>>2]=2499;de[n+8>>2]=1516;xe(I,1100,n)|0;be(I,o)|0}de[r>>2]=0;de[t+8>>2]=0;de[t+12>>2]=0}pe[t+16>>0]=0;r=t+20|0;i=de[r>>2]|0;if(!i){t=1;ge=L;return t|0}kt(i);de[r>>2]=0;t=1;ge=L;return t|0}p=t+4|0;d=t+8|0;r=de[d>>2]|0;if((r|0)!=(C|0)){if(r>>>0<=C>>>0){do{if((de[t+12>>2]|0)>>>0>>0){if(F(p,C,(r+1|0)==(C|0),1,0)|0){r=de[d>>2]|0;break}pe[t+16>>0]=1;t=0;ge=L;return t|0}}while(0);G((de[p>>2]|0)+r|0,0,C-r|0)|0}de[d>>2]=C}G(de[p>>2]|0,0,C|0)|0;f=e+20|0;r=de[f>>2]|0;if((r|0)<5){o=e+4|0;a=e+8|0;n=e+16|0;do{i=de[o>>2]|0;if((i|0)==(de[a>>2]|0))i=0;else{de[o>>2]=i+1;i=me[i>>0]|0}r=r+8|0;de[f>>2]=r;if((r|0)>=33){de[l>>2]=1154;de[l+4>>2]=3199;de[l+8>>2]=1650;xe(I,1100,l)|0;be(I,s)|0;r=de[f>>2]|0}i=i<<32-r|de[n>>2];de[n>>2]=i}while((r|0)<5)}else{i=e+16|0;n=i;i=de[i>>2]|0}u=i>>>27;de[n>>2]=i<<5;de[f>>2]=r+-5;if((u+-1|0)>>>0>20){t=0;ge=L;return t|0}de[D+20>>2]=0;de[D>>2]=0;de[D+4>>2]=0;de[D+8>>2]=0;de[D+12>>2]=0;pe[D+16>>0]=0;r=D+4|0;i=D+8|0;e:do{if(F(r,21,0,1,0)|0){s=de[i>>2]|0;l=de[r>>2]|0;G(l+s|0,0,21-s|0)|0;de[i>>2]=21;if(u){n=e+4|0;o=e+8|0;a=e+16|0;s=0;do{r=de[f>>2]|0;if((r|0)<3)do{i=de[n>>2]|0;if((i|0)==(de[o>>2]|0))i=0;else{de[n>>2]=i+1;i=me[i>>0]|0}r=r+8|0;de[f>>2]=r;if((r|0)>=33){de[h>>2]=1154;de[h+4>>2]=3199;de[h+8>>2]=1650;xe(I,1100,h)|0;be(I,c)|0;r=de[f>>2]|0}i=i<<32-r|de[a>>2];de[a>>2]=i}while((r|0)<3);else i=de[a>>2]|0;de[a>>2]=i<<3;de[f>>2]=r+-3;pe[l+(me[1611+s>>0]|0)>>0]=i>>>29;s=s+1|0}while((s|0)!=(u|0))}if(Ot(D)|0){s=e+4|0;l=e+8|0;u=e+16|0;i=0;t:while(1){a=C-i|0;r=ye(e,D)|0;r:do{if(r>>>0<17){if((de[d>>2]|0)>>>0<=i>>>0){de[m>>2]=1154;de[m+4>>2]=903;de[m+8>>2]=1781;xe(I,1100,m)|0;be(I,_)|0}pe[(de[p>>2]|0)+i>>0]=r;r=i+1|0}else switch(r|0){case 17:{r=de[f>>2]|0;if((r|0)<3)do{n=de[s>>2]|0;if((n|0)==(de[l>>2]|0))n=0;else{de[s>>2]=n+1;n=me[n>>0]|0}r=r+8|0;de[f>>2]=r;if((r|0)>=33){de[g>>2]=1154;de[g+4>>2]=3199;de[g+8>>2]=1650;xe(I,1100,g)|0;be(I,v)|0;r=de[f>>2]|0}n=n<<32-r|de[u>>2];de[u>>2]=n}while((r|0)<3);else n=de[u>>2]|0;de[u>>2]=n<<3;de[f>>2]=r+-3;r=(n>>>29)+3|0;if(r>>>0>a>>>0){r=0;break e}r=r+i|0;break r}case 18:{r=de[f>>2]|0;if((r|0)<7)do{n=de[s>>2]|0;if((n|0)==(de[l>>2]|0))n=0;else{de[s>>2]=n+1;n=me[n>>0]|0}r=r+8|0;de[f>>2]=r;if((r|0)>=33){de[y>>2]=1154;de[y+4>>2]=3199;de[y+8>>2]=1650;xe(I,1100,y)|0;be(I,b)|0;r=de[f>>2]|0}n=n<<32-r|de[u>>2];de[u>>2]=n}while((r|0)<7);else n=de[u>>2]|0;de[u>>2]=n<<7;de[f>>2]=r+-7;r=(n>>>25)+11|0;if(r>>>0>a>>>0){r=0;break e}r=r+i|0;break r}default:{if((r+-19|0)>>>0>=2){M=90;break t}o=de[f>>2]|0;if((r|0)==19){if((o|0)<2){n=o;while(1){r=de[s>>2]|0;if((r|0)==(de[l>>2]|0))o=0;else{de[s>>2]=r+1;o=me[r>>0]|0}r=n+8|0;de[f>>2]=r;if((r|0)>=33){de[x>>2]=1154;de[x+4>>2]=3199;de[x+8>>2]=1650;xe(I,1100,x)|0;be(I,T)|0;r=de[f>>2]|0}n=o<<32-r|de[u>>2];de[u>>2]=n;if((r|0)<2)n=r;else break}}else{n=de[u>>2]|0;r=o}de[u>>2]=n<<2;de[f>>2]=r+-2;o=(n>>>30)+3|0}else{if((o|0)<6){n=o;while(1){r=de[s>>2]|0;if((r|0)==(de[l>>2]|0))o=0;else{de[s>>2]=r+1;o=me[r>>0]|0}r=n+8|0;de[f>>2]=r;if((r|0)>=33){de[w>>2]=1154;de[w+4>>2]=3199;de[w+8>>2]=1650;xe(I,1100,w)|0;be(I,E)|0;r=de[f>>2]|0}n=o<<32-r|de[u>>2];de[u>>2]=n;if((r|0)<6)n=r;else break}}else{n=de[u>>2]|0;r=o}de[u>>2]=n<<6;de[f>>2]=r+-6;o=(n>>>26)+7|0}if((i|0)==0|o>>>0>a>>>0){r=0;break e}r=i+-1|0;if((de[d>>2]|0)>>>0<=r>>>0){de[S>>2]=1154;de[S+4>>2]=903;de[S+8>>2]=1781;xe(I,1100,S)|0;be(I,A)|0}n=pe[(de[p>>2]|0)+r>>0]|0;if(!(n<<24>>24)){r=0;break e}r=o+i|0;if(i>>>0>=r>>>0){r=i;break r}do{if((de[d>>2]|0)>>>0<=i>>>0){de[k>>2]=1154;de[k+4>>2]=903;de[k+8>>2]=1781;xe(I,1100,k)|0;be(I,O)|0}pe[(de[p>>2]|0)+i>>0]=n;i=i+1|0}while((i|0)!=(r|0))}}}while(0);if(C>>>0>r>>>0)i=r;else break}if((M|0)==90){de[P>>2]=1154;de[P+4>>2]=3140;de[P+8>>2]=1632;xe(I,1100,P)|0;be(I,R)|0;r=0;break}if((C|0)==(r|0))r=Ot(t)|0;else r=0}else r=0}else{pe[D+16>>0]=1;r=0}}while(0);N(D);t=r;ge=L;return t|0}function Pt(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,l=0,u=0,h=0;h=ge;ge=ge+544|0;s=h+16|0;a=h;o=h+24|0;if(!t){u=0;ge=h;return u|0}if(t>>>0<=16){u=Rt(e,t)|0;ge=h;return u|0}l=Rt(e,t+-16|0)|0;u=e+20|0;t=de[u>>2]|0;if((t|0)<16){i=e+4|0;n=e+8|0;r=e+16|0;do{e=de[i>>2]|0;if((e|0)==(de[n>>2]|0))e=0;else{de[i>>2]=e+1;e=me[e>>0]|0}t=t+8|0;de[u>>2]=t;if((t|0)>=33){de[a>>2]=1154;de[a+4>>2]=3199;de[a+8>>2]=1650;xe(o,1100,a)|0;be(o,s)|0;t=de[u>>2]|0}e=e<<32-t|de[r>>2];de[r>>2]=e}while((t|0)<16)}else{e=e+16|0;r=e;e=de[e>>2]|0}de[r>>2]=e<<16;de[u>>2]=t+-16;u=e>>>16|l<<16;ge=h;return u|0}function ye(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,l=0,u=0,h=0,c=0,f=0,p=0,d=0,m=0,_=0,g=0,v=0,y=0;y=ge;ge=ge+608|0;m=y+88|0;d=y+72|0;f=y+64|0;c=y+48|0;h=y+40|0;p=y+24|0;u=y+16|0;l=y;g=y+96|0;_=de[t+20>>2]|0;v=e+20|0;s=de[v>>2]|0;do{if((s|0)<24){a=e+4|0;i=de[a>>2]|0;n=de[e+8>>2]|0;r=i>>>0>>0;if((s|0)>=16){if(r){de[a>>2]=i+1;r=me[i>>0]|0}else r=0;de[v>>2]=s+8;a=e+16|0;o=r<<24-s|de[a>>2];de[a>>2]=o;break}if(r){o=(me[i>>0]|0)<<8;r=i+1|0}else{o=0;r=i}if(r>>>0>>0){i=me[r>>0]|0;r=r+1|0}else i=0;de[a>>2]=r;de[v>>2]=s+16;a=e+16|0;o=(i|o)<<16-s|de[a>>2];de[a>>2]=o}else{o=e+16|0;a=o;o=de[o>>2]|0}}while(0);n=(o>>>16)+1|0;do{if(n>>>0<=(de[_+16>>2]|0)>>>0){i=de[(de[_+168>>2]|0)+(o>>>(32-(de[_+8>>2]|0)|0)<<2)>>2]|0;if((i|0)==-1){de[l>>2]=1154;de[l+4>>2]=3244;de[l+8>>2]=1677;xe(g,1100,l)|0;be(g,u)|0}r=i&65535;i=i>>>16;if((de[t+8>>2]|0)>>>0<=r>>>0){de[p>>2]=1154;de[p+4>>2]=902;de[p+8>>2]=1781;xe(g,1100,p)|0;be(g,h)|0}if((me[(de[t+4>>2]|0)+r>>0]|0|0)!=(i|0)){de[c>>2]=1154;de[c+4>>2]=3248;de[c+8>>2]=1694;xe(g,1100,c)|0;be(g,f)|0}}else{i=de[_+20>>2]|0;while(1){r=i+-1|0;if(n>>>0>(de[_+28+(r<<2)>>2]|0)>>>0)i=i+1|0;else break}r=(o>>>(32-i|0))+(de[_+96+(r<<2)>>2]|0)|0;if(r>>>0<(de[t>>2]|0)>>>0){r=_e[(de[_+176>>2]|0)+(r<<1)>>1]|0;break}de[d>>2]=1154;de[d+4>>2]=3266;de[d+8>>2]=1632;xe(g,1100,d)|0;be(g,m)|0;v=0;ge=y;return v|0}}while(0);de[a>>2]=de[a>>2]<>2]=(de[v>>2]|0)-i;v=r;ge=y;return v|0}function Rt(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,l=0,u=0,h=0;h=ge;ge=ge+560|0;s=h+40|0;l=h+24|0;r=h;a=h+48|0;if(t>>>0>=33){de[r>>2]=1154;de[r+4>>2]=3190;de[r+8>>2]=1634;xe(a,1100,r)|0;be(a,h+16|0)|0}u=e+20|0;r=de[u>>2]|0;if((r|0)>=(t|0)){o=e+16|0;a=o;o=de[o>>2]|0;s=r;l=32-t|0;l=o>>>l;o=o<>2]=o;t=s-t|0;de[u>>2]=t;ge=h;return l|0}n=e+4|0;o=e+8|0;i=e+16|0;do{e=de[n>>2]|0;if((e|0)==(de[o>>2]|0))e=0;else{de[n>>2]=e+1;e=me[e>>0]|0}r=r+8|0;de[u>>2]=r;if((r|0)>=33){de[l>>2]=1154;de[l+4>>2]=3199;de[l+8>>2]=1650;xe(a,1100,l)|0;be(a,s)|0;r=de[u>>2]|0}e=e<<32-r|de[i>>2];de[i>>2]=e}while((r|0)<(t|0));l=32-t|0;l=e>>>l;s=e<>2]=s;t=r-t|0;de[u>>2]=t;ge=h;return l|0}function Ct(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,l=0,u=0,h=0,c=0,f=0,p=0,d=0,m=0,_=0;d=ge;ge=ge+544|0;f=d+16|0;c=d;h=d+24|0;if((e|0)==0|t>>>0<62){p=0;ge=d;return p|0}u=j(300,0)|0;if(!u){p=0;ge=d;return p|0}de[u>>2]=519686845;r=u+4|0;de[r>>2]=0;i=u+8|0;de[i>>2]=0;l=u+88|0;n=u+136|0;o=u+160|0;a=l;s=a+44|0;do{de[a>>2]=0;a=a+4|0}while((a|0)<(s|0));pe[l+44>>0]=0;m=u+184|0;a=u+208|0;s=u+232|0;_=u+252|0;de[_>>2]=0;de[_+4>>2]=0;de[_+8>>2]=0;pe[_+12>>0]=0;_=u+268|0;de[_>>2]=0;de[_+4>>2]=0;de[_+8>>2]=0;pe[_+12>>0]=0;_=u+284|0;de[_>>2]=0;de[_+4>>2]=0;de[_+8>>2]=0;pe[_+12>>0]=0;de[n>>2]=0;de[n+4>>2]=0;de[n+8>>2]=0;de[n+12>>2]=0;de[n+16>>2]=0;pe[n+20>>0]=0;de[o>>2]=0;de[o+4>>2]=0;de[o+8>>2]=0;de[o+12>>2]=0;de[o+16>>2]=0;pe[o+20>>0]=0;de[m>>2]=0;de[m+4>>2]=0;de[m+8>>2]=0;de[m+12>>2]=0;de[m+16>>2]=0;pe[m+20>>0]=0;de[a>>2]=0;de[a+4>>2]=0;de[a+8>>2]=0;de[a+12>>2]=0;de[a+16>>2]=0;pe[a+20>>0]=0;de[s>>2]=0;de[s+4>>2]=0;de[s+8>>2]=0;de[s+12>>2]=0;pe[s+16>>0]=0;do{if(((t>>>0>=74?((me[e>>0]|0)<<8|(me[e+1>>0]|0)|0)==18552:0)?((me[e+2>>0]|0)<<8|(me[e+3>>0]|0))>>>0>=74:0)?((me[e+7>>0]|0)<<16|(me[e+6>>0]|0)<<24|(me[e+8>>0]|0)<<8|(me[e+9>>0]|0))>>>0<=t>>>0:0){de[l>>2]=e;de[r>>2]=e;de[i>>2]=t;if(jt(u)|0){r=de[l>>2]|0;if((me[r+39>>0]|0)<<8|(me[r+40>>0]|0)){if(!(Ut(u)|0))break;if(!(Gt(u)|0))break;r=de[l>>2]|0}if(!((me[r+55>>0]|0)<<8|(me[r+56>>0]|0))){_=u;ge=d;return _|0}if(Xt(u)|0?Ht(u)|0:0){_=u;ge=d;return _|0}}}else p=7}while(0);if((p|0)==7)de[l>>2]=0;Kt(u);if(!(u&7)){X[de[104>>2]&1](u,0,0,1,de[27]|0)|0;_=0;ge=d;return _|0}else{de[c>>2]=1154;de[c+4>>2]=2499;de[c+8>>2]=1516;xe(h,1100,c)|0;be(h,f)|0;_=0;ge=d;return _|0}return 0}function Mt(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0,a=0,s=0,l=0,u=0,h=0;h=ge;ge=ge+544|0;u=h;l=h+24|0;o=de[e+88>>2]|0;s=(me[o+70+(n<<2)+1>>0]|0)<<16|(me[o+70+(n<<2)>>0]|0)<<24|(me[o+70+(n<<2)+2>>0]|0)<<8|(me[o+70+(n<<2)+3>>0]|0);a=n+1|0;if(a>>>0<(me[o+16>>0]|0)>>>0)o=(me[o+70+(a<<2)+1>>0]|0)<<16|(me[o+70+(a<<2)>>0]|0)<<24|(me[o+70+(a<<2)+2>>0]|0)<<8|(me[o+70+(a<<2)+3>>0]|0);else o=de[e+8>>2]|0;if(o>>>0>s>>>0){l=e+4|0;l=de[l>>2]|0;l=l+s|0;u=o-s|0;u=It(e,l,u,t,r,i,n)|0;ge=h;return u|0}de[u>>2]=1154;de[u+4>>2]=3704;de[u+8>>2]=1792;xe(l,1100,u)|0;be(l,h+16|0)|0;l=e+4|0;l=de[l>>2]|0;l=l+s|0;u=o-s|0;u=It(e,l,u,t,r,i,n)|0;ge=h;return u|0}function It(e,t,r,i,n,o,a){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;a=a|0;var s=0,l=0,u=0,h=0;h=de[e+88>>2]|0;l=((me[h+12>>0]|0)<<8|(me[h+13>>0]|0))>>>a;u=((me[h+14>>0]|0)<<8|(me[h+15>>0]|0))>>>a;l=l>>>0>1?(l+3|0)>>>2:1;u=u>>>0>1?(u+3|0)>>>2:1;h=h+18|0;a=pe[h>>0]|0;a=ve(a<<24>>24==0|a<<24>>24==9?8:16,l)|0;if(o)if((o&3|0)==0&a>>>0<=o>>>0)a=o;else{e=0;return e|0}if((ve(a,u)|0)>>>0>n>>>0){e=0;return e|0}o=(l+1|0)>>>1;s=(u+1|0)>>>1;if(!r){e=0;return e|0}de[e+92>>2]=t;de[e+96>>2]=t;de[e+104>>2]=r;de[e+100>>2]=t+r;de[e+108>>2]=0;de[e+112>>2]=0;switch(me[h>>0]|0|0){case 0:{Yt(e,i,n,a,l,u,o,s)|0;e=1;return e|0}case 4:case 6:case 5:case 3:case 2:{Wt(e,i,n,a,l,u,o,s)|0;e=1;return e|0}case 9:{qt(e,i,n,a,l,u,o,s)|0;e=1;return e|0}case 8:case 7:{Vt(e,i,n,a,l,u,o,s)|0;e=1;return e|0}default:{e=0;return e|0}}return 0}function Dt(e,t){e=e|0;t=t|0;var r=0,i=0;i=ge;ge=ge+48|0;r=i;de[r>>2]=40;_(e,t,r)|0;ge=i;return de[r+4>>2]|0}function Lt(e,t){e=e|0;t=t|0;var r=0,i=0;i=ge;ge=ge+48|0;r=i;de[r>>2]=40;_(e,t,r)|0;ge=i;return de[r+8>>2]|0}function Ft(e,t){e=e|0;t=t|0;var r=0,i=0;i=ge;ge=ge+48|0;r=i;de[r>>2]=40;_(e,t,r)|0;ge=i;return de[r+12>>2]|0}function Nt(e,t){e=e|0;t=t|0;var r=0,i=0;i=ge;ge=ge+48|0;r=i;de[r>>2]=40;_(e,t,r)|0;ge=i;return de[r+32>>2]|0}function zt(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0,a=0,s=0,l=0,u=0;l=ge;ge=ge+576|0;a=l+56|0;o=l+40|0;n=l+64|0;u=l;de[u>>2]=40;_(e,t,u)|0;i=(((de[u+4>>2]|0)>>>r)+3|0)>>>2;t=(((de[u+8>>2]|0)>>>r)+3|0)>>>2;r=u+32|0;e=de[r+4>>2]|0;do{switch(de[r>>2]|0){case 0:{if(!e)e=8;else s=13;break}case 1:{if(!e)s=12;else s=13;break}case 2:{if(!e)s=12;else s=13;break}case 3:{if(!e)s=12;else s=13;break}case 4:{if(!e)s=12;else s=13;break}case 5:{if(!e)s=12;else s=13;break}case 6:{if(!e)s=12;else s=13;break}case 7:{if(!e)s=12;else s=13;break}case 8:{if(!e)s=12;else s=13;break}case 9:{if(!e)e=8;else s=13;break}default:s=13}}while(0);if((s|0)==12)e=16;else if((s|0)==13){de[o>>2]=1154;de[o+4>>2]=2663;de[o+8>>2]=1535;xe(n,1100,o)|0;be(n,a)|0;e=0}u=ve(ve(t,i)|0,e)|0;ge=l;return u|0}function Bt(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0,a=0,s=0,l=0,u=0,h=0,c=0,f=0,p=0,d=0,m=0;d=ge;ge=ge+608|0;f=d+80|0;p=d+64|0;s=d+56|0;a=d+40|0;h=d+88|0;m=d;c=d+84|0;de[m>>2]=40;_(e,t,m)|0;l=(((de[m+4>>2]|0)>>>n)+3|0)>>>2;m=m+32|0;o=de[m+4>>2]|0;do{switch(de[m>>2]|0){case 0:{if(!o)o=8;else u=13;break}case 1:{if(!o)u=12;else u=13;break}case 2:{if(!o)u=12;else u=13;break}case 3:{if(!o)u=12;else u=13;break}case 4:{if(!o)u=12;else u=13;break}case 5:{if(!o)u=12;else u=13;break}case 6:{if(!o)u=12;else u=13;break}case 7:{if(!o)u=12;else u=13;break}case 8:{if(!o)u=12;else u=13;break}case 9:{if(!o)o=8;else u=13;break}default:u=13}}while(0);if((u|0)==12)o=16;else if((u|0)==13){de[a>>2]=1154;de[a+4>>2]=2663;de[a+8>>2]=1535;xe(h,1100,a)|0;be(h,s)|0;o=0}s=ve(o,l)|0;a=Ct(e,t)|0;de[c>>2]=r;o=(a|0)==0;if(!(n>>>0>15|(i>>>0<8|o))?(de[a>>2]|0)==519686845:0)Mt(a,c,i,s,n)|0;if(o){ge=d;return}if((de[a>>2]|0)!=519686845){ge=d;return}Kt(a);if(!(a&7)){X[de[104>>2]&1](a,0,0,1,de[27]|0)|0;ge=d;return}else{de[p>>2]=1154;de[p+4>>2]=2499;de[p+8>>2]=1516;xe(h,1100,p)|0;be(h,f)|0;ge=d;return}}function jt(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0;a=e+92|0;i=de[e+4>>2]|0;o=e+88|0;n=de[o>>2]|0;t=(me[n+68>>0]|0)<<8|(me[n+67>>0]|0)<<16|(me[n+69>>0]|0);r=i+t|0;n=(me[n+65>>0]|0)<<8|(me[n+66>>0]|0);if(!n){e=0;return e|0}de[a>>2]=r;de[e+96>>2]=r;de[e+104>>2]=n;de[e+100>>2]=i+(n+t);de[e+108>>2]=0;de[e+112>>2]=0;if(!(U(a,e+116|0)|0)){e=0;return e|0}t=de[o>>2]|0;do{if(!((me[t+39>>0]|0)<<8|(me[t+40>>0]|0))){if(!((me[t+55>>0]|0)<<8|(me[t+56>>0]|0))){e=0;return e|0}}else{if(!(U(a,e+140|0)|0)){e=0;return e|0}if(U(a,e+188|0)|0){t=de[o>>2]|0;break}else{e=0;return e|0}}}while(0);if((me[t+55>>0]|0)<<8|(me[t+56>>0]|0)){if(!(U(a,e+164|0)|0)){e=0;return e|0}if(!(U(a,e+212|0)|0)){e=0;return e|0}}e=1;return e|0}function Ut(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,l=0,u=0,h=0,c=0,f=0,p=0,d=0;d=ge;ge=ge+592|0;l=d+16|0;s=d;a=d+72|0;p=d+24|0;i=e+88|0;t=de[i>>2]|0;f=(me[t+39>>0]|0)<<8|(me[t+40>>0]|0);h=e+236|0;o=e+240|0;r=de[o>>2]|0;if((r|0)!=(f|0)){if(r>>>0<=f>>>0){do{if((de[e+244>>2]|0)>>>0>>0){if(F(h,f,(r+1|0)==(f|0),4,0)|0){t=de[o>>2]|0;break}pe[e+248>>0]=1;p=0;ge=d;return p|0}else t=r}while(0);G((de[h>>2]|0)+(t<<2)|0,0,f-t<<2|0)|0;t=de[i>>2]|0}de[o>>2]=f}u=e+92|0;r=de[e+4>>2]|0;i=(me[t+34>>0]|0)<<8|(me[t+33>>0]|0)<<16|(me[t+35>>0]|0);n=r+i|0;t=(me[t+37>>0]|0)<<8|(me[t+36>>0]|0)<<16|(me[t+38>>0]|0);if(!t){p=0;ge=d;return p|0}de[u>>2]=n;de[e+96>>2]=n;de[e+104>>2]=t;de[e+100>>2]=r+(t+i);de[e+108>>2]=0;de[e+112>>2]=0;de[p+20>>2]=0;de[p>>2]=0;de[p+4>>2]=0;de[p+8>>2]=0;de[p+12>>2]=0;pe[p+16>>0]=0;e=p+24|0;de[p+44>>2]=0;de[e>>2]=0;de[e+4>>2]=0;de[e+8>>2]=0;de[e+12>>2]=0;pe[e+16>>0]=0;if(U(u,p)|0?(c=p+24|0,U(u,c)|0):0){if(!(de[o>>2]|0)){de[s>>2]=1154;de[s+4>>2]=903;de[s+8>>2]=1781;xe(a,1100,s)|0;be(a,l)|0}if(!f)t=1;else{i=0;n=0;o=0;t=0;a=0;e=0;s=0;r=de[h>>2]|0;while(1){i=(ye(u,p)|0)+i&31;n=(ye(u,c)|0)+n&63;o=(ye(u,p)|0)+o&31;t=(ye(u,p)|0)+t|0;a=(ye(u,c)|0)+a&63;e=(ye(u,p)|0)+e&31;de[r>>2]=n<<5|i<<11|o|t<<27|a<<21|e<<16;s=s+1|0;if((s|0)==(f|0)){t=1;break}else{t=t&31;r=r+4|0}}}}else t=0;N(p+24|0);N(p);p=t;ge=d;return p|0}function Gt(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,l=0,u=0,h=0,c=0,f=0,p=0,d=0,m=0,_=0,g=0,v=0,y=0,b=0,x=0,T=0,w=0,E=0,S=0,A=0,k=0;S=ge;ge=ge+1024|0;s=S+16|0;a=S;o=S+504|0;E=S+480|0;T=S+284|0;w=S+88|0;x=S+24|0;n=de[e+88>>2]|0;b=(me[n+47>>0]|0)<<8|(me[n+48>>0]|0);y=e+92|0;t=de[e+4>>2]|0;r=(me[n+42>>0]|0)<<8|(me[n+41>>0]|0)<<16|(me[n+43>>0]|0);i=t+r|0;n=(me[n+45>>0]|0)<<8|(me[n+44>>0]|0)<<16|(me[n+46>>0]|0);if(!n){E=0;ge=S;return E|0}de[y>>2]=i;de[e+96>>2]=i;de[e+104>>2]=n;de[e+100>>2]=t+(n+r);de[e+108>>2]=0;de[e+112>>2]=0;de[E+20>>2]=0;de[E>>2]=0;de[E+4>>2]=0;de[E+8>>2]=0;de[E+12>>2]=0;pe[E+16>>0]=0;if(U(y,E)|0){r=0;i=-3;n=-3;while(1){de[T+(r<<2)>>2]=i;de[w+(r<<2)>>2]=n;t=(i|0)>2;r=r+1|0;if((r|0)==49)break;else{i=t?-3:i+1|0;n=(t&1)+n|0}}t=x;r=t+64|0;do{de[t>>2]=0;t=t+4|0}while((t|0)<(r|0));v=e+252|0;r=e+256|0;t=de[r>>2]|0;e:do{if((t|0)==(b|0))l=13;else{if(t>>>0<=b>>>0){do{if((de[e+260>>2]|0)>>>0>>0)if(F(v,b,(t+1|0)==(b|0),4,0)|0){t=de[r>>2]|0;break}else{pe[e+264>>0]=1;t=0;break e}}while(0);G((de[v>>2]|0)+(t<<2)|0,0,b-t<<2|0)|0}de[r>>2]=b;l=13}}while(0);do{if((l|0)==13){if(!b){de[a>>2]=1154;de[a+4>>2]=903;de[a+8>>2]=1781;xe(o,1100,a)|0;be(o,s)|0;t=1;break}i=x+4|0;n=x+8|0;e=x+12|0;o=x+16|0;a=x+20|0;s=x+24|0;l=x+28|0;u=x+32|0;h=x+36|0;c=x+40|0;f=x+44|0;p=x+48|0;d=x+52|0;m=x+56|0;_=x+60|0;g=0;r=de[v>>2]|0;while(1){t=0;do{A=ye(y,E)|0;v=t<<1;k=x+(v<<2)|0;de[k>>2]=(de[k>>2]|0)+(de[T+(A<<2)>>2]|0)&3;v=x+((v|1)<<2)|0;de[v>>2]=(de[v>>2]|0)+(de[w+(A<<2)>>2]|0)&3;t=t+1|0}while((t|0)!=8);de[r>>2]=(me[1725+(de[i>>2]|0)>>0]|0)<<2|(me[1725+(de[x>>2]|0)>>0]|0)|(me[1725+(de[n>>2]|0)>>0]|0)<<4|(me[1725+(de[e>>2]|0)>>0]|0)<<6|(me[1725+(de[o>>2]|0)>>0]|0)<<8|(me[1725+(de[a>>2]|0)>>0]|0)<<10|(me[1725+(de[s>>2]|0)>>0]|0)<<12|(me[1725+(de[l>>2]|0)>>0]|0)<<14|(me[1725+(de[u>>2]|0)>>0]|0)<<16|(me[1725+(de[h>>2]|0)>>0]|0)<<18|(me[1725+(de[c>>2]|0)>>0]|0)<<20|(me[1725+(de[f>>2]|0)>>0]|0)<<22|(me[1725+(de[p>>2]|0)>>0]|0)<<24|(me[1725+(de[d>>2]|0)>>0]|0)<<26|(me[1725+(de[m>>2]|0)>>0]|0)<<28|(me[1725+(de[_>>2]|0)>>0]|0)<<30;g=g+1|0;if((g|0)==(b|0)){t=1;break}else r=r+4|0}}}while(0)}else t=0;N(E);k=t;ge=S;return k|0}function Xt(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,l=0,u=0,h=0,c=0,f=0;f=ge;ge=ge+560|0;l=f+16|0;s=f;a=f+48|0;c=f+24|0;n=de[e+88>>2]|0;h=(me[n+55>>0]|0)<<8|(me[n+56>>0]|0);u=e+92|0;t=de[e+4>>2]|0;r=(me[n+50>>0]|0)<<8|(me[n+49>>0]|0)<<16|(me[n+51>>0]|0);i=t+r|0;n=(me[n+53>>0]|0)<<8|(me[n+52>>0]|0)<<16|(me[n+54>>0]|0);if(!n){c=0;ge=f;return c|0}de[u>>2]=i;de[e+96>>2]=i;de[e+104>>2]=n;de[e+100>>2]=t+(n+r);de[e+108>>2]=0;de[e+112>>2]=0;de[c+20>>2]=0;de[c>>2]=0;de[c+4>>2]=0;de[c+8>>2]=0;de[c+12>>2]=0;pe[c+16>>0]=0;e:do{if(U(u,c)|0){o=e+268|0;r=e+272|0;t=de[r>>2]|0;if((t|0)!=(h|0)){if(t>>>0<=h>>>0){do{if((de[e+276>>2]|0)>>>0>>0)if(F(o,h,(t+1|0)==(h|0),2,0)|0){t=de[r>>2]|0;break}else{pe[e+280>>0]=1;t=0;break e}}while(0);G((de[o>>2]|0)+(t<<1)|0,0,h-t<<1|0)|0}de[r>>2]=h}if(!h){de[s>>2]=1154;de[s+4>>2]=903;de[s+8>>2]=1781;xe(a,1100,s)|0;be(a,l)|0;t=1;break}r=0;i=0;n=0;t=de[o>>2]|0;while(1){l=ye(u,c)|0;r=l+r&255;i=(ye(u,c)|0)+i&255;$[t>>1]=i<<8|r;n=n+1|0;if((n|0)==(h|0)){t=1;break}else t=t+2|0}}else t=0}while(0);N(c);c=t;ge=f;return c|0}function Ht(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,l=0,u=0,h=0,c=0,f=0,p=0,d=0,m=0,_=0,g=0,v=0,y=0,b=0,x=0,T=0,w=0,E=0,S=0,A=0,k=0;S=ge;ge=ge+2432|0;s=S+16|0;a=S;o=S+1912|0;E=S+1888|0;T=S+988|0;w=S+88|0;x=S+24|0;n=de[e+88>>2]|0;b=(me[n+63>>0]|0)<<8|(me[n+64>>0]|0);y=e+92|0;t=de[e+4>>2]|0;r=(me[n+58>>0]|0)<<8|(me[n+57>>0]|0)<<16|(me[n+59>>0]|0);i=t+r|0;n=(me[n+61>>0]|0)<<8|(me[n+60>>0]|0)<<16|(me[n+62>>0]|0);if(!n){E=0;ge=S;return E|0}de[y>>2]=i;de[e+96>>2]=i;de[e+104>>2]=n;de[e+100>>2]=t+(n+r);de[e+108>>2]=0;de[e+112>>2]=0;de[E+20>>2]=0;de[E>>2]=0;de[E+4>>2]=0;de[E+8>>2]=0;de[E+12>>2]=0;pe[E+16>>0]=0;if(U(y,E)|0){r=0;i=-7;n=-7;while(1){de[T+(r<<2)>>2]=i;de[w+(r<<2)>>2]=n;t=(i|0)>6;r=r+1|0;if((r|0)==225)break;else{i=t?-7:i+1|0;n=(t&1)+n|0}}t=x;r=t+64|0;do{de[t>>2]=0;t=t+4|0}while((t|0)<(r|0));v=e+284|0;r=b*3|0;i=e+288|0;t=de[i>>2]|0;e:do{if((t|0)==(r|0))l=13;else{if(t>>>0<=r>>>0){do{if((de[e+292>>2]|0)>>>0>>0)if(F(v,r,(t+1|0)==(r|0),2,0)|0){t=de[i>>2]|0;break}else{pe[e+296>>0]=1;t=0;break e}}while(0);G((de[v>>2]|0)+(t<<1)|0,0,r-t<<1|0)|0}de[i>>2]=r;l=13}}while(0);do{if((l|0)==13){if(!b){de[a>>2]=1154;de[a+4>>2]=903;de[a+8>>2]=1781;xe(o,1100,a)|0;be(o,s)|0;t=1;break}i=x+4|0;n=x+8|0;e=x+12|0;o=x+16|0;a=x+20|0;s=x+24|0;l=x+28|0;u=x+32|0;h=x+36|0;c=x+40|0;f=x+44|0;p=x+48|0;d=x+52|0;m=x+56|0;_=x+60|0;g=0;r=de[v>>2]|0;while(1){t=0;do{A=ye(y,E)|0;v=t<<1;k=x+(v<<2)|0;de[k>>2]=(de[k>>2]|0)+(de[T+(A<<2)>>2]|0)&7;v=x+((v|1)<<2)|0;de[v>>2]=(de[v>>2]|0)+(de[w+(A<<2)>>2]|0)&7;t=t+1|0}while((t|0)!=8);A=me[1729+(de[a>>2]|0)>>0]|0;$[r>>1]=(me[1729+(de[i>>2]|0)>>0]|0)<<3|(me[1729+(de[x>>2]|0)>>0]|0)|(me[1729+(de[n>>2]|0)>>0]|0)<<6|(me[1729+(de[e>>2]|0)>>0]|0)<<9|(me[1729+(de[o>>2]|0)>>0]|0)<<12|A<<15;k=me[1729+(de[c>>2]|0)>>0]|0;$[r+2>>1]=(me[1729+(de[s>>2]|0)>>0]|0)<<2|A>>>1|(me[1729+(de[l>>2]|0)>>0]|0)<<5|(me[1729+(de[u>>2]|0)>>0]|0)<<8|(me[1729+(de[h>>2]|0)>>0]|0)<<11|k<<14;$[r+4>>1]=(me[1729+(de[f>>2]|0)>>0]|0)<<1|k>>>2|(me[1729+(de[p>>2]|0)>>0]|0)<<4|(me[1729+(de[d>>2]|0)>>0]|0)<<7|(me[1729+(de[m>>2]|0)>>0]|0)<<10|(me[1729+(de[_>>2]|0)>>0]|0)<<13;g=g+1|0;if((g|0)==(b|0)){t=1;break}else r=r+6|0}}}while(0)}else t=0;N(E);k=t;ge=S;return k|0}function Yt(e,F,t,r,i,n,N,o){e=e|0;F=F|0;t=t|0;r=r|0;i=i|0;n=n|0;N=N|0;o=o|0;var a=0,s=0,l=0,z=0,u=0,h=0,c=0,f=0,B=0,j=0,p=0,U=0,G=0,d=0,m=0,X=0,_=0,g=0,H=0,Y=0,W=0,q=0,v=0,V=0,K=0,J=0,y=0,Z=0,Q=0,$=0,ee=0,te=0,re=0,ie=0,ne=0,b=0,x=0,T=0,w=0,E=0,S=0,oe=0,A=0,ae=0,k=0,se=0,O=0,le=0,ue=0,P=0,he=0,R=0,ce=0,C=0,M=0,fe=0,I=0,D=0,L=0;I=ge;ge=ge+720|0;fe=I+184|0;C=I+168|0;ce=I+160|0;R=I+144|0;he=I+136|0;P=I+120|0;ue=I+112|0;O=I+96|0;se=I+88|0;k=I+72|0;ae=I+64|0;A=I+48|0;oe=I+40|0;M=I+24|0;le=I+16|0;S=I;w=I+208|0;E=I+192|0;te=e+240|0;re=de[te>>2]|0;b=e+256|0;x=de[b>>2]|0;t=pe[(de[e+88>>2]|0)+17>>0]|0;T=r>>>2;if(!(t<<24>>24)){ge=I;return 1}ie=(o|0)==0;ne=o+-1|0;K=(n&1|0)!=0;J=r<<1;y=e+92|0;Z=e+116|0;Q=e+140|0;$=e+236|0;ee=N+-1|0;V=(i&1|0)!=0;v=e+188|0;g=e+252|0;H=T+1|0;Y=T+2|0;W=T+3|0;q=ee<<4;X=t&255;t=0;n=0;i=1;_=0;do{if(!ie){d=de[F+(_<<2)>>2]|0;m=0;while(1){p=m&1;a=(p|0)==0;j=(p<<5^32)+-16|0;p=(p<<1^2)+-1|0;G=a?N:-1;s=a?0:ee;e=(m|0)==(ne|0);U=K&e;if((s|0)!=(G|0)){B=K&e^1;f=a?d:d+q|0;while(1){if((i|0)==1)i=ye(y,Z)|0|512;c=i&7;i=i>>>3;a=me[1823+c>>0]|0;e=0;do{u=(ye(y,Q)|0)+n|0;h=u-re|0;n=h>>31;n=n&u|h&~n;if((de[te>>2]|0)>>>0<=n>>>0){de[S>>2]=1154;de[S+4>>2]=903;de[S+8>>2]=1781;xe(w,1100,S)|0;be(w,le)|0}de[E+(e<<2)>>2]=de[(de[$>>2]|0)+(n<<2)>>2];e=e+1|0}while(e>>>0>>0);h=V&(s|0)==(ee|0);if(U|h){u=0;do{l=ve(u,r)|0;e=f+l|0;a=(u|0)==0|B;z=u<<1;L=(ye(y,v)|0)+t|0;D=L-x|0;t=D>>31;t=t&L|D&~t;do{if(h){if(!a){D=(ye(y,v)|0)+t|0;L=D-x|0;t=L>>31;t=t&D|L&~t;break}de[e>>2]=de[E+((me[1831+(c<<2)+z>>0]|0)<<2)>>2];if((de[b>>2]|0)>>>0<=t>>>0){de[R>>2]=1154;de[R+4>>2]=903;de[R+8>>2]=1781;xe(w,1100,R)|0;be(w,ce)|0}de[f+(l+4)>>2]=de[(de[g>>2]|0)+(t<<2)>>2];D=(ye(y,v)|0)+t|0;L=D-x|0;t=L>>31;t=t&D|L&~t}else{if(!a){D=(ye(y,v)|0)+t|0;L=D-x|0;t=L>>31;t=t&D|L&~t;break}de[e>>2]=de[E+((me[1831+(c<<2)+z>>0]|0)<<2)>>2];if((de[b>>2]|0)>>>0<=t>>>0){de[P>>2]=1154;de[P+4>>2]=903;de[P+8>>2]=1781;xe(w,1100,P)|0;be(w,he)|0}de[f+(l+4)>>2]=de[(de[g>>2]|0)+(t<<2)>>2];D=(ye(y,v)|0)+t|0;L=D-x|0;t=L>>31;t=t&D|L&~t;de[f+(l+8)>>2]=de[E+((me[(z|1)+(1831+(c<<2))>>0]|0)<<2)>>2];if((de[b>>2]|0)>>>0<=t>>>0){de[C>>2]=1154;de[C+4>>2]=903;de[C+8>>2]=1781;xe(w,1100,C)|0;be(w,fe)|0}de[f+(l+12)>>2]=de[(de[g>>2]|0)+(t<<2)>>2]}}while(0);u=u+1|0}while((u|0)!=2)}else{de[f>>2]=de[E+((me[1831+(c<<2)>>0]|0)<<2)>>2];D=(ye(y,v)|0)+t|0;L=D-x|0;t=L>>31;t=t&D|L&~t;if((de[b>>2]|0)>>>0<=t>>>0){de[M>>2]=1154;de[M+4>>2]=903;de[M+8>>2]=1781;xe(w,1100,M)|0;be(w,oe)|0}de[f+4>>2]=de[(de[g>>2]|0)+(t<<2)>>2];de[f+8>>2]=de[E+((me[1831+(c<<2)+1>>0]|0)<<2)>>2];D=(ye(y,v)|0)+t|0;L=D-x|0;t=L>>31;t=t&D|L&~t;if((de[b>>2]|0)>>>0<=t>>>0){de[A>>2]=1154;de[A+4>>2]=903;de[A+8>>2]=1781;xe(w,1100,A)|0;be(w,ae)|0}de[f+12>>2]=de[(de[g>>2]|0)+(t<<2)>>2];de[f+(T<<2)>>2]=de[E+((me[1831+(c<<2)+2>>0]|0)<<2)>>2];D=(ye(y,v)|0)+t|0;L=D-x|0;t=L>>31;t=t&D|L&~t;if((de[b>>2]|0)>>>0<=t>>>0){de[k>>2]=1154;de[k+4>>2]=903;de[k+8>>2]=1781;xe(w,1100,k)|0;be(w,se)|0}de[f+(H<<2)>>2]=de[(de[g>>2]|0)+(t<<2)>>2];de[f+(Y<<2)>>2]=de[E+((me[1831+(c<<2)+3>>0]|0)<<2)>>2];D=(ye(y,v)|0)+t|0;L=D-x|0;t=L>>31;t=t&D|L&~t;if((de[b>>2]|0)>>>0<=t>>>0){de[O>>2]=1154;de[O+4>>2]=903;de[O+8>>2]=1781;xe(w,1100,O)|0;be(w,ue)|0}de[f+(W<<2)>>2]=de[(de[g>>2]|0)+(t<<2)>>2]}s=s+p|0;if((s|0)==(G|0))break;else f=f+j|0}}m=m+1|0;if((m|0)==(o|0))break;else d=d+J|0}}_=_+1|0}while((_|0)!=(X|0));ge=I;return 1}function Wt(e,t,r,i,n,o,a,s){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;a=a|0;s=s|0;var l=0,u=0,h=0,c=0,f=0,p=0,F=0,N=0,d=0,m=0,_=0,g=0,v=0,z=0,B=0,y=0,b=0,x=0,T=0,j=0,w=0,U=0,G=0,X=0,H=0,Y=0,W=0,q=0,V=0,K=0,J=0,E=0,Z=0,Q=0,$=0,S=0,ee=0,te=0,A=0,re=0,k=0,ie=0,ne=0,oe=0,O=0,ae=0,se=0,P=0,le=0,R=0,ue=0,C=0,he=0,M=0,ce=0,fe=0,I=0,D=0,L=0;D=ge;ge=ge+640|0;ce=D+88|0;M=D+72|0;he=D+64|0;C=D+48|0;ue=D+40|0;I=D+24|0;fe=D+16|0;R=D;P=D+128|0;le=D+112|0;se=D+96|0;E=e+240|0;Z=de[E>>2]|0;S=e+256|0;oe=de[S>>2]|0;O=e+272|0;ae=de[O>>2]|0;r=de[e+88>>2]|0;Q=(me[r+63>>0]|0)<<8|(me[r+64>>0]|0);r=pe[r+17>>0]|0;if(!(r<<24>>24)){ge=D;return 1}$=(s|0)==0;ee=s+-1|0;te=i<<1;A=e+92|0;re=e+116|0;k=a+-1|0;ie=e+212|0;ne=e+188|0;J=(n&1|0)==0;K=(o&1|0)==0;X=e+288|0;H=e+284|0;Y=e+252|0;W=e+140|0;q=e+236|0;V=e+164|0;U=e+268|0;G=k<<5;j=r&255;r=0;n=0;o=0;e=0;l=1;w=0;do{if(!$){x=de[t+(w<<2)>>2]|0;T=0;while(1){y=T&1;u=(y|0)==0;B=(y<<6^64)+-32|0;y=(y<<1^2)+-1|0;b=u?a:-1;h=u?0:k;if((h|0)!=(b|0)){z=K|(T|0)!=(ee|0);v=u?x:x+G|0;while(1){if((l|0)==1)l=ye(A,re)|0|512;g=l&7;l=l>>>3;c=me[1823+g>>0]|0;u=0;do{m=(ye(A,V)|0)+n|0;_=m-ae|0;n=_>>31;n=n&m|_&~n;if((de[O>>2]|0)>>>0<=n>>>0){de[R>>2]=1154;de[R+4>>2]=903;de[R+8>>2]=1781;xe(P,1100,R)|0;be(P,fe)|0}de[se+(u<<2)>>2]=_e[(de[U>>2]|0)+(n<<1)>>1];u=u+1|0}while(u>>>0>>0);u=0;do{m=(ye(A,W)|0)+e|0;_=m-Z|0;e=_>>31;e=e&m|_&~e;if((de[E>>2]|0)>>>0<=e>>>0){de[I>>2]=1154;de[I+4>>2]=903;de[I+8>>2]=1781;xe(P,1100,I)|0;be(P,ue)|0}de[le+(u<<2)>>2]=de[(de[q>>2]|0)+(e<<2)>>2];u=u+1|0}while(u>>>0>>0);_=J|(h|0)!=(k|0);d=0;m=v;while(1){N=z|(d|0)==0;F=d<<1;f=0;p=m;while(1){c=(ye(A,ie)|0)+r|0;u=c-Q|0;r=u>>31;r=r&c|u&~r;u=(ye(A,ne)|0)+o|0;c=u-oe|0;o=c>>31;o=o&u|c&~o;if((_|(f|0)==0)&N){u=me[f+F+(1831+(g<<2))>>0]|0;c=r*3|0;if((de[X>>2]|0)>>>0<=c>>>0){de[C>>2]=1154;de[C+4>>2]=903;de[C+8>>2]=1781;xe(P,1100,C)|0;be(P,he)|0}L=de[H>>2]|0;de[p>>2]=(_e[L+(c<<1)>>1]|0)<<16|de[se+(u<<2)>>2];de[p+4>>2]=(_e[L+(c+2<<1)>>1]|0)<<16|(_e[L+(c+1<<1)>>1]|0);de[p+8>>2]=de[le+(u<<2)>>2];if((de[S>>2]|0)>>>0<=o>>>0){de[M>>2]=1154;de[M+4>>2]=903;de[M+8>>2]=1781;xe(P,1100,M)|0;be(P,ce)|0}de[p+12>>2]=de[(de[Y>>2]|0)+(o<<2)>>2]}f=f+1|0;if((f|0)==2)break;else p=p+16|0}d=d+1|0;if((d|0)==2)break;else m=m+i|0}h=h+y|0;if((h|0)==(b|0))break;else v=v+B|0}}T=T+1|0;if((T|0)==(s|0))break;else x=x+te|0}}w=w+1|0}while((w|0)!=(j|0));ge=D;return 1}function qt(e,t,r,i,n,o,a,s){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;a=a|0;s=s|0;var l=0,u=0,h=0,c=0,f=0,p=0,d=0,m=0,_=0,g=0,F=0,N=0,v=0,y=0,b=0,x=0,T=0,z=0,B=0,j=0,U=0,w=0,E=0,G=0,X=0,S=0,H=0,A=0,Y=0,W=0,q=0,k=0,V=0,O=0,P=0,R=0,C=0,M=0,K=0,I=0,J=0,Z=0,D=0,L=0;L=ge;ge=ge+608|0;J=L+64|0;I=L+48|0;K=L+40|0;D=L+24|0;Z=L+16|0;M=L;C=L+88|0;R=L+72|0;S=e+272|0;H=de[S>>2]|0;r=de[e+88>>2]|0;A=(me[r+63>>0]|0)<<8|(me[r+64>>0]|0);r=pe[r+17>>0]|0;if(!(r<<24>>24)){ge=L;return 1}Y=(s|0)==0;W=s+-1|0;q=i<<1;k=e+92|0;V=e+116|0;O=a+-1|0;P=e+212|0;X=(o&1|0)==0;w=e+288|0;E=e+284|0;G=e+164|0;j=e+268|0;U=O<<4;B=r&255;z=(n&1|0)!=0;r=0;o=0;e=1;T=0;do{if(!Y){b=de[t+(T<<2)>>2]|0;x=0;while(1){v=x&1;n=(v|0)==0;N=(v<<5^32)+-16|0;v=(v<<1^2)+-1|0;y=n?a:-1;l=n?0:O;if((l|0)!=(y|0)){F=X|(x|0)!=(W|0);g=n?b:b+U|0;while(1){if((e|0)==1)e=ye(k,V)|0|512;_=e&7;e=e>>>3;u=me[1823+_>>0]|0;n=0;do{d=(ye(k,G)|0)+o|0;m=d-H|0;o=m>>31;o=o&d|m&~o;if((de[S>>2]|0)>>>0<=o>>>0){de[M>>2]=1154;de[M+4>>2]=903;de[M+8>>2]=1781;xe(C,1100,M)|0;be(C,Z)|0}de[R+(n<<2)>>2]=_e[(de[j>>2]|0)+(o<<1)>>1];n=n+1|0}while(n>>>0>>0);m=(l|0)==(O|0)&z;p=0;d=g;while(1){f=F|(p|0)==0;c=p<<1;n=(ye(k,P)|0)+r|0;h=n-A|0;u=h>>31;u=u&n|h&~u;if(f){r=me[1831+(_<<2)+c>>0]|0;n=u*3|0;if((de[w>>2]|0)>>>0<=n>>>0){de[D>>2]=1154;de[D+4>>2]=903;de[D+8>>2]=1781;xe(C,1100,D)|0;be(C,K)|0}h=de[E>>2]|0;de[d>>2]=(_e[h+(n<<1)>>1]|0)<<16|de[R+(r<<2)>>2];de[d+4>>2]=(_e[h+(n+2<<1)>>1]|0)<<16|(_e[h+(n+1<<1)>>1]|0)}h=d+8|0;n=(ye(k,P)|0)+u|0;u=n-A|0;r=u>>31;r=r&n|u&~r;if(!(m|f^1)){n=me[(c|1)+(1831+(_<<2))>>0]|0;u=r*3|0;if((de[w>>2]|0)>>>0<=u>>>0){de[I>>2]=1154;de[I+4>>2]=903;de[I+8>>2]=1781;xe(C,1100,I)|0;be(C,J)|0}f=de[E>>2]|0;de[h>>2]=(_e[f+(u<<1)>>1]|0)<<16|de[R+(n<<2)>>2];de[d+12>>2]=(_e[f+(u+2<<1)>>1]|0)<<16|(_e[f+(u+1<<1)>>1]|0)}p=p+1|0;if((p|0)==2)break;else d=d+i|0}l=l+v|0;if((l|0)==(y|0))break;else g=g+N|0}}x=x+1|0;if((x|0)==(s|0))break;else b=b+q|0}}T=T+1|0}while((T|0)!=(B|0));ge=L;return 1}function Vt(e,t,r,i,n,o,a,s){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;a=a|0;s=s|0;var l=0,u=0,h=0,c=0,f=0,p=0,d=0,m=0,_=0,F=0,N=0,g=0,v=0,y=0,b=0,x=0,z=0,B=0,T=0,w=0,E=0,S=0,j=0,A=0,U=0,G=0,X=0,H=0,Y=0,W=0,q=0,k=0,V=0,K=0,J=0,Z=0,Q=0,O=0,$=0,P=0,ee=0,te=0,re=0,R=0,C=0,ie=0,M=0,ne=0,I=0,oe=0,ae=0,D=0,L=0;L=ge;ge=ge+640|0;oe=L+88|0;I=L+72|0;ne=L+64|0;M=L+48|0;ie=L+40|0;D=L+24|0;ae=L+16|0;C=L;R=L+128|0;te=L+112|0;re=L+96|0;k=e+272|0;V=de[k>>2]|0;r=de[e+88>>2]|0;K=(me[r+63>>0]|0)<<8|(me[r+64>>0]|0);r=pe[r+17>>0]|0;if(!(r<<24>>24)){ge=L;return 1}J=(s|0)==0;Z=s+-1|0;Q=i<<1;O=e+92|0;$=e+116|0;P=a+-1|0;ee=e+212|0;q=(n&1|0)==0;W=(o&1|0)==0;X=e+288|0;H=e+284|0;Y=e+164|0;U=e+268|0;G=P<<5;j=r&255;r=0;n=0;o=0;e=0;l=1;A=0;do{if(!J){E=de[t+(A<<2)>>2]|0;S=0;while(1){T=S&1;u=(T|0)==0;B=(T<<6^64)+-32|0;T=(T<<1^2)+-1|0;w=u?a:-1;h=u?0:P;if((h|0)!=(w|0)){z=W|(S|0)!=(Z|0);x=u?E:E+G|0;while(1){if((l|0)==1)l=ye(O,$)|0|512;b=l&7;l=l>>>3;c=me[1823+b>>0]|0;u=0;do{v=(ye(O,Y)|0)+e|0;y=v-V|0;e=y>>31;e=e&v|y&~e;if((de[k>>2]|0)>>>0<=e>>>0){de[C>>2]=1154;de[C+4>>2]=903;de[C+8>>2]=1781;xe(R,1100,C)|0;be(R,ae)|0}de[te+(u<<2)>>2]=_e[(de[U>>2]|0)+(e<<1)>>1];u=u+1|0}while(u>>>0>>0);u=0;do{v=(ye(O,Y)|0)+n|0;y=v-V|0;n=y>>31;n=n&v|y&~n;if((de[k>>2]|0)>>>0<=n>>>0){de[D>>2]=1154;de[D+4>>2]=903;de[D+8>>2]=1781;xe(R,1100,D)|0;be(R,ie)|0}de[re+(u<<2)>>2]=_e[(de[U>>2]|0)+(n<<1)>>1];u=u+1|0}while(u>>>0>>0);y=q|(h|0)!=(P|0);g=0;v=x;while(1){N=z|(g|0)==0;F=g<<1;m=0;_=v;while(1){d=(ye(O,ee)|0)+o|0;p=d-K|0;o=p>>31;o=o&d|p&~o;p=(ye(O,ee)|0)+r|0;d=p-K|0;r=d>>31;r=r&p|d&~r;if((y|(m|0)==0)&N){p=me[m+F+(1831+(b<<2))>>0]|0;d=o*3|0;u=de[X>>2]|0;if(u>>>0<=d>>>0){de[M>>2]=1154;de[M+4>>2]=903;de[M+8>>2]=1781;xe(R,1100,M)|0;be(R,ne)|0;u=de[X>>2]|0}c=de[H>>2]|0;f=r*3|0;if(u>>>0>f>>>0)u=c;else{de[I>>2]=1154;de[I+4>>2]=903;de[I+8>>2]=1781;xe(R,1100,I)|0;be(R,oe)|0;u=de[H>>2]|0}de[_>>2]=(_e[c+(d<<1)>>1]|0)<<16|de[te+(p<<2)>>2];de[_+4>>2]=(_e[c+(d+2<<1)>>1]|0)<<16|(_e[c+(d+1<<1)>>1]|0);de[_+8>>2]=(_e[u+(f<<1)>>1]|0)<<16|de[re+(p<<2)>>2];de[_+12>>2]=(_e[u+(f+2<<1)>>1]|0)<<16|(_e[u+(f+1<<1)>>1]|0)}m=m+1|0;if((m|0)==2)break;else _=_+16|0}g=g+1|0;if((g|0)==2)break;else v=v+i|0}h=h+T|0;if((h|0)==(w|0))break;else x=x+B|0}}S=S+1|0;if((S|0)==(s|0))break;else E=E+Q|0}}A=A+1|0}while((A|0)!=(j|0));ge=L;return 1}function Kt(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,l=0,u=0,h=0,c=0,f=0;f=ge;ge=ge+608|0;c=f+88|0;h=f+72|0;l=f+64|0;s=f+48|0;o=f+40|0;a=f+24|0;n=f+16|0;i=f;u=f+96|0;de[e>>2]=0;t=e+284|0;r=de[t>>2]|0;if(r){if(!(r&7))X[de[104>>2]&1](r,0,0,1,de[27]|0)|0;else{de[i>>2]=1154;de[i+4>>2]=2499;de[i+8>>2]=1516;xe(u,1100,i)|0;be(u,n)|0}de[t>>2]=0;de[e+288>>2]=0;de[e+292>>2]=0}pe[e+296>>0]=0;t=e+268|0;r=de[t>>2]|0;if(r){if(!(r&7))X[de[104>>2]&1](r,0,0,1,de[27]|0)|0;else{de[a>>2]=1154;de[a+4>>2]=2499;de[a+8>>2]=1516;xe(u,1100,a)|0;be(u,o)|0}de[t>>2]=0;de[e+272>>2]=0;de[e+276>>2]=0}pe[e+280>>0]=0;t=e+252|0;r=de[t>>2]|0;if(r){if(!(r&7))X[de[104>>2]&1](r,0,0,1,de[27]|0)|0;else{de[s>>2]=1154;de[s+4>>2]=2499;de[s+8>>2]=1516;xe(u,1100,s)|0;be(u,l)|0}de[t>>2]=0;de[e+256>>2]=0;de[e+260>>2]=0}pe[e+264>>0]=0;t=e+236|0;r=de[t>>2]|0;if(!r){c=e+248|0;pe[c>>0]=0;c=e+212|0;N(c);c=e+188|0;N(c);c=e+164|0;N(c);c=e+140|0;N(c);c=e+116|0;N(c);ge=f;return}if(!(r&7))X[de[104>>2]&1](r,0,0,1,de[27]|0)|0;else{de[h>>2]=1154;de[h+4>>2]=2499;de[h+8>>2]=1516;xe(u,1100,h)|0;be(u,c)|0}de[t>>2]=0;de[e+240>>2]=0;de[e+244>>2]=0;c=e+248|0;pe[c>>0]=0;c=e+212|0;N(c);c=e+188|0;N(c);c=e+164|0;N(c);c=e+140|0;N(c);c=e+116|0;N(c);ge=f}function l(e,t){e=e|0;t=t|0;var r=0;r=ge;ge=ge+16|0;de[r>>2]=t;t=de[63]|0;Pr(t,e,r)|0;Or(10,t)|0;B()}function Jt(){var e=0,t=0;e=ge;ge=ge+16|0;if(!(rt(200,2)|0)){t=et(de[49]|0)|0;ge=e;return t|0}else l(2090,e);return 0}function Zt(e){e=e|0;b(e)}function Qt(e){e=e|0;var t=0;t=ge;ge=ge+16|0;Mi[e&3]();l(2139,t)}function $t(){var e=0,t=0;e=Jt()|0;if(((e|0)!=0?(t=de[e>>2]|0,(t|0)!=0):0)?(e=t+48|0,(de[e>>2]&-256|0)==1126902528?(de[e+4>>2]|0)==1129074247:0):0)Qt(de[t+12>>2]|0);t=de[28]|0;de[28]=t+0;Qt(t)}function er(e){e=e|0}function tr(e){e=e|0;return}function rr(e){e=e|0;return}function ir(e){e=e|0;return}function nr(e){e=e|0;Zt(e);return}function or(e){e=e|0;Zt(e);return}function ar(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0,a=0;a=ge;ge=ge+64|0;o=a;if((e|0)!=(t|0))if((t|0)!=0?(n=hr(t,24,40,0)|0,(n|0)!=0):0){t=o;i=t+56|0;do{de[t>>2]=0;t=t+4|0}while((t|0)<(i|0));de[o>>2]=n;de[o+8>>2]=e;de[o+12>>2]=-1;de[o+48>>2]=1;Di[de[(de[n>>2]|0)+28>>2]&3](n,o,de[r>>2]|0,1);if((de[o+24>>2]|0)==1){de[r>>2]=de[o+16>>2];t=1}else t=0}else t=0;else t=1;ge=a;return t|0}function sr(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0;e=t+16|0;n=de[e>>2]|0;do{if(n){if((n|0)!=(r|0)){i=t+36|0;de[i>>2]=(de[i>>2]|0)+1;de[t+24>>2]=2;pe[t+54>>0]=1;break}e=t+24|0;if((de[e>>2]|0)==2)de[e>>2]=i}else{de[e>>2]=r;de[t+24>>2]=i;de[t+36>>2]=1}}while(0)}function lr(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;if((e|0)==(de[t+8>>2]|0))sr(0,t,r,i);return}function ur(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;if((e|0)==(de[t+8>>2]|0))sr(0,t,r,i);else{e=de[e+8>>2]|0;Di[de[(de[e>>2]|0)+28>>2]&3](e,t,r,i)}return}function hr(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,o=0,a=0,s=0,l=0,u=0,h=0,c=0,f=0,p=0;p=ge;ge=ge+64|0;f=p;c=de[e>>2]|0;h=e+(de[c+-8>>2]|0)|0;c=de[c+-4>>2]|0;de[f>>2]=r;de[f+4>>2]=e;de[f+8>>2]=t;de[f+12>>2]=i;i=f+16|0;e=f+20|0;t=f+24|0;n=f+28|0;o=f+32|0;a=f+40|0;s=(c|0)==(r|0);l=i;u=l+36|0;do{de[l>>2]=0;l=l+4|0}while((l|0)<(u|0));$[i+36>>1]=0;pe[i+38>>0]=0;e:do{if(s){de[f+48>>2]=1;Ii[de[(de[r>>2]|0)+20>>2]&3](r,f,h,h,1,0);i=(de[t>>2]|0)==1?h:0}else{Oi[de[(de[c>>2]|0)+24>>2]&3](c,f,h,1,0);switch(de[f+36>>2]|0){case 0:{i=(de[a>>2]|0)==1&(de[n>>2]|0)==1&(de[o>>2]|0)==1?de[e>>2]|0:0;break e}case 1:break;default:{i=0;break e}}if((de[t>>2]|0)!=1?!((de[a>>2]|0)==0&(de[n>>2]|0)==1&(de[o>>2]|0)==1):0){i=0;break}i=de[i>>2]|0}}while(0);ge=p;return i|0}function cr(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;pe[t+53>>0]=1;do{if((de[t+4>>2]|0)==(i|0)){pe[t+52>>0]=1;i=t+16|0;e=de[i>>2]|0;if(!e){de[i>>2]=r;de[t+24>>2]=n;de[t+36>>2]=1;if(!((n|0)==1?(de[t+48>>2]|0)==1:0))break;pe[t+54>>0]=1;break}if((e|0)!=(r|0)){n=t+36|0;de[n>>2]=(de[n>>2]|0)+1;pe[t+54>>0]=1;break}e=t+24|0;i=de[e>>2]|0;if((i|0)==2){de[e>>2]=n;i=n}if((i|0)==1?(de[t+48>>2]|0)==1:0)pe[t+54>>0]=1}}while(0)}function fr(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0,a=0,s=0,l=0;e:do{if((e|0)==(de[t+8>>2]|0)){if((de[t+4>>2]|0)==(r|0)?(o=t+28|0,(de[o>>2]|0)!=1):0)de[o>>2]=i}else{if((e|0)!=(de[t>>2]|0)){s=de[e+8>>2]|0;Oi[de[(de[s>>2]|0)+24>>2]&3](s,t,r,i,n);break}if((de[t+16>>2]|0)!=(r|0)?(a=t+20|0,(de[a>>2]|0)!=(r|0)):0){de[t+32>>2]=i;i=t+44|0;if((de[i>>2]|0)==4)break;o=t+52|0;pe[o>>0]=0;l=t+53|0;pe[l>>0]=0;e=de[e+8>>2]|0;Ii[de[(de[e>>2]|0)+20>>2]&3](e,t,r,r,1,n);if(pe[l>>0]|0){if(!(pe[o>>0]|0)){o=1;s=13}}else{o=0;s=13}do{if((s|0)==13){de[a>>2]=r;l=t+40|0;de[l>>2]=(de[l>>2]|0)+1;if((de[t+36>>2]|0)==1?(de[t+24>>2]|0)==2:0){pe[t+54>>0]=1;if(o)break}else s=16;if((s|0)==16?o:0)break;de[i>>2]=4;break e}}while(0);de[i>>2]=3;break}if((i|0)==1)de[t+32>>2]=1}}while(0);return}function pr(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0,a=0;do{if((e|0)==(de[t+8>>2]|0)){if((de[t+4>>2]|0)==(r|0)?(a=t+28|0,(de[a>>2]|0)!=1):0)de[a>>2]=i}else if((e|0)==(de[t>>2]|0)){if((de[t+16>>2]|0)!=(r|0)?(o=t+20|0,(de[o>>2]|0)!=(r|0)):0){de[t+32>>2]=i;de[o>>2]=r;n=t+40|0;de[n>>2]=(de[n>>2]|0)+1;if((de[t+36>>2]|0)==1?(de[t+24>>2]|0)==2:0)pe[t+54>>0]=1;de[t+44>>2]=4;break}if((i|0)==1)de[t+32>>2]=1}}while(0);return}function dr(e,t,r,i,n,o){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;if((e|0)==(de[t+8>>2]|0))cr(0,t,r,i,n);else{e=de[e+8>>2]|0;Ii[de[(de[e>>2]|0)+20>>2]&3](e,t,r,i,n,o)}return}function mr(e,t,r,i,n,o){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;if((e|0)==(de[t+8>>2]|0))cr(0,t,r,i,n);return}function _r(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0;n=ge;ge=ge+16|0;i=n;de[i>>2]=de[r>>2];e=v[de[(de[e>>2]|0)+16>>2]&7](e,t,i)|0;if(e)de[r>>2]=de[i>>2];ge=n;return e&1|0}function gr(e){e=e|0;if(!e)e=0;else e=(hr(e,24,72,0)|0)!=0;return e&1|0}function vr(){var e=0,t=0,r=0,i=0,n=0,o=0,a=0,s=0;n=ge;ge=ge+48|0;a=n+32|0;r=n+24|0;s=n+16|0;o=n;n=n+36|0;e=Jt()|0;if((e|0)!=0?(i=de[e>>2]|0,(i|0)!=0):0){e=i+48|0;t=de[e>>2]|0;e=de[e+4>>2]|0;if(!((t&-256|0)==1126902528&(e|0)==1129074247)){de[r>>2]=de[51];l(2368,r)}if((t|0)==1126902529&(e|0)==1129074247)e=de[i+44>>2]|0;else e=i+80|0;de[n>>2]=e;i=de[i>>2]|0;e=de[i+4>>2]|0;if(v[de[(de[8>>2]|0)+16>>2]&7](8,i,n)|0){s=de[n>>2]|0;n=de[51]|0;s=Ri[de[(de[s>>2]|0)+8>>2]&1](s)|0;de[o>>2]=n;de[o+4>>2]=e;de[o+8>>2]=s;l(2282,o)}else{de[s>>2]=de[51];de[s+4>>2]=e;l(2327,s)}}l(2406,a)}function yr(){var e=0;e=ge;ge=ge+16|0;if(!(it(196,6)|0)){ge=e;return}else l(2179,e)}function br(e){e=e|0;var t=0;t=ge;ge=ge+16|0;b(e);if(!(at(de[49]|0,0)|0)){ge=t;return}else l(2229,t)}function xr(e){e=e|0;var t=0,r=0;t=0;while(1){if((me[2427+t>>0]|0)==(e|0)){r=2;break}t=t+1|0;if((t|0)==87){t=87;e=2515;r=5;break}}if((r|0)==2)if(!t)e=2515;else{e=2515;r=5}if((r|0)==5)while(1){r=e;while(1){e=r+1|0;if(!(pe[r>>0]|0))break;else r=e}t=t+-1|0;if(!t)break;else r=5}return e|0}function ie(){var e=0;if(!(de[52]|0))e=264;else{e=(tt()|0)+60|0;e=de[e>>2]|0}return e|0}function Tr(e){e=e|0;var t=0;if(e>>>0>4294963200){t=ie()|0;de[t>>2]=0-e;e=-1}return e|0}function wr(e,t){e=+e;t=t|0;var r=0,i=0,n=0;ee[te>>3]=e;r=de[te>>2]|0;i=de[te+4>>2]|0;n=Zr(r|0,i|0,52)|0;n=n&2047;switch(n|0){case 0:{if(e!=0.0){e=+wr(e*18446744073709552.0e3,t);r=(de[t>>2]|0)+-64|0}else r=0;de[t>>2]=r;break}case 2047:break;default:{de[t>>2]=n+-1022;de[te>>2]=r;de[te+4>>2]=i&-2146435073|1071644672;e=+ee[te>>3]}}return+e}function Er(e,t){e=+e;t=t|0;return+ +wr(e,t)}function Sr(e,t,r){e=e|0;t=t|0;r=r|0;do{if(e){if(t>>>0<128){pe[e>>0]=t;e=1;break}if(t>>>0<2048){pe[e>>0]=t>>>6|192;pe[e+1>>0]=t&63|128;e=2;break}if(t>>>0<55296|(t&-8192|0)==57344){pe[e>>0]=t>>>12|224;pe[e+1>>0]=t>>>6&63|128;pe[e+2>>0]=t&63|128;e=3;break}if((t+-65536|0)>>>0<1048576){pe[e>>0]=t>>>18|240;pe[e+1>>0]=t>>>12&63|128;pe[e+2>>0]=t>>>6&63|128;pe[e+3>>0]=t&63|128;e=4;break}else{e=ie()|0;de[e>>2]=84;e=-1;break}}else e=1}while(0);return e|0}function Ar(e,t){e=e|0;t=t|0;if(!e)e=0;else e=Sr(e,t,0)|0;return e|0}function kr(e){e=e|0;var t=0,r=0;do{if(e){if((de[e+76>>2]|0)<=-1){t=jr(e)|0;break}r=(Mr(e)|0)==0;t=jr(e)|0;if(!r)g(e)}else{if(!(de[65]|0))t=0;else t=kr(de[65]|0)|0;st(236);e=de[58]|0;if(e)do{if((de[e+76>>2]|0)>-1)r=Mr(e)|0;else r=0;if((de[e+20>>2]|0)>>>0>(de[e+28>>2]|0)>>>0)t=jr(e)|0|t;if(r)g(e);e=de[e+56>>2]|0}while((e|0)!=0);nt(236)}}while(0);return t|0}function Or(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0;if((de[t+76>>2]|0)>=0?(Mr(t)|0)!=0:0){if((pe[t+75>>0]|0)!=(e|0)?(i=t+20|0,n=de[i>>2]|0,n>>>0<(de[t+16>>2]|0)>>>0):0){de[i>>2]=n+1;pe[n>>0]=e;r=e&255}else r=Ir(t,e)|0;g(t)}else a=3;do{if((a|0)==3){if((pe[t+75>>0]|0)!=(e|0)?(o=t+20|0,r=de[o>>2]|0,r>>>0<(de[t+16>>2]|0)>>>0):0){de[o>>2]=r+1;pe[r>>0]=e;r=e&255;break}r=Ir(t,e)|0}}while(0);return r|0}function ne(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0,a=0;i=r+16|0;n=de[i>>2]|0;if(!n)if(!(zr(r)|0)){n=de[i>>2]|0;o=4}else i=0;else o=4;e:do{if((o|0)==4){a=r+20|0;o=de[a>>2]|0;if((n-o|0)>>>0>>0){i=v[de[r+36>>2]&7](r,e,t)|0;break}t:do{if((pe[r+75>>0]|0)>-1){i=t;while(1){if(!i){n=o;i=0;break t}n=i+-1|0;if((pe[e+n>>0]|0)==10)break;else i=n}if((v[de[r+36>>2]&7](r,e,i)|0)>>>0>>0)break e;t=t-i|0;e=e+i|0;n=de[a>>2]|0}else{n=o;i=0}}while(0);ei(n|0,e|0,t|0)|0;de[a>>2]=(de[a>>2]|0)+t;i=i+t|0}}while(0);return i|0}function be(e,t){e=e|0;t=t|0;var r=0,i=0;r=ge;ge=ge+16|0;i=r;de[i>>2]=t;t=Pr(de[64]|0,e,i)|0;ge=r;return t|0}function xe(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0;i=ge;ge=ge+16|0;n=i;de[n>>2]=r;r=Cr(e,t,n)|0;ge=i;return r|0}function Pr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0,a=0,s=0,l=0,u=0,h=0,c=0,f=0,p=0,d=0,m=0;m=ge;ge=ge+224|0;c=m+120|0;d=m+80|0;p=m;f=m+136|0;i=d;n=i+40|0;do{de[i>>2]=0;i=i+4|0}while((i|0)<(n|0));de[c>>2]=de[r>>2];if((Ur(0,t,c,p,d)|0)<0)r=-1;else{if((de[e+76>>2]|0)>-1)u=Mr(e)|0;else u=0;r=de[e>>2]|0;h=r&32;if((pe[e+74>>0]|0)<1)de[e>>2]=r&-33;r=e+48|0;if(!(de[r>>2]|0)){n=e+44|0;o=de[n>>2]|0;de[n>>2]=f;a=e+28|0;de[a>>2]=f;s=e+20|0;de[s>>2]=f;de[r>>2]=80;l=e+16|0;de[l>>2]=f+80;i=Ur(e,t,c,p,d)|0;if(o){v[de[e+36>>2]&7](e,0,0)|0;i=(de[s>>2]|0)==0?-1:i;de[n>>2]=o;de[r>>2]=0;de[l>>2]=0;de[a>>2]=0;de[s>>2]=0}}else i=Ur(e,t,c,p,d)|0;r=de[e>>2]|0;de[e>>2]=r|h;if(u)g(e);r=(r&32|0)==0?i:-1}ge=m;return r|0}function Rr(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,o=0,a=0,s=0,l=0,u=0,h=0;h=ge;ge=ge+128|0;n=h+112|0;u=h;o=u;a=268;s=o+112|0;do{de[o>>2]=de[a>>2];o=o+4|0;a=a+4|0}while((o|0)<(s|0));if((t+-1|0)>>>0>2147483646)if(!t){t=1;l=4}else{t=ie()|0;de[t>>2]=75;t=-1}else{n=e;l=4}if((l|0)==4){l=-2-n|0;l=t>>>0>l>>>0?l:t;de[u+48>>2]=l;e=u+20|0;de[e>>2]=n;de[u+44>>2]=n;t=n+l|0;n=u+16|0;de[n>>2]=t;de[u+28>>2]=t;t=Pr(u,r,i)|0;if(l){r=de[e>>2]|0;pe[r+(((r|0)==(de[n>>2]|0))<<31>>31)>>0]=0}}ge=h;return t|0}function Cr(e,t,r){e=e|0;t=t|0;r=r|0;return Rr(e,2147483647,t,r)|0}function Mr(e){e=e|0;return 0}function g(e){e=e|0}function Ir(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,l=0;l=ge;ge=ge+16|0;s=l;a=t&255;pe[s>>0]=a;i=e+16|0;n=de[i>>2]|0;if(!n)if(!(zr(e)|0)){n=de[i>>2]|0;o=4}else r=-1;else o=4;do{if((o|0)==4){i=e+20|0;o=de[i>>2]|0;if(o>>>0>>0?(r=t&255,(r|0)!=(pe[e+75>>0]|0)):0){de[i>>2]=o+1;pe[o>>0]=a;break}if((v[de[e+36>>2]&7](e,s,1)|0)==1)r=me[s>>0]|0;else r=-1}}while(0);ge=l;return r|0}function Dr(e){e=e|0;var t=0,r=0;t=ge;ge=ge+16|0;r=t;de[r>>2]=de[e+60>>2];e=Tr(qe(6,r|0)|0)|0;ge=t;return e|0}function Lr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0;n=ge;ge=ge+32|0;o=n;i=n+20|0;de[o>>2]=de[e+60>>2];de[o+4>>2]=0;de[o+8>>2]=t;de[o+12>>2]=i;de[o+16>>2]=r;if((Tr(ht(140,o|0)|0)|0)<0){de[i>>2]=-1;e=-1}else e=de[i>>2]|0;ge=n;return e|0}function Fr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0,a=0,s=0,l=0,u=0,h=0,c=0,f=0,p=0,d=0;d=ge;ge=ge+48|0;c=d+16|0;h=d;i=d+32|0;f=e+28|0;n=de[f>>2]|0;de[i>>2]=n;p=e+20|0;n=(de[p>>2]|0)-n|0;de[i+4>>2]=n;de[i+8>>2]=t;de[i+12>>2]=r;l=e+60|0;u=e+44|0;t=2;n=n+r|0;while(1){if(!(de[52]|0)){de[c>>2]=de[l>>2];de[c+4>>2]=i;de[c+8>>2]=t;a=Tr(ct(146,c|0)|0)|0}else{lt(7,e|0);de[h>>2]=de[l>>2];de[h+4>>2]=i;de[h+8>>2]=t;a=Tr(ct(146,h|0)|0)|0;Ye(0)}if((n|0)==(a|0)){n=6;break}if((a|0)<0){n=8;break}n=n-a|0;o=de[i+4>>2]|0;if(a>>>0<=o>>>0)if((t|0)==2){de[f>>2]=(de[f>>2]|0)+a;s=o;t=2}else s=o;else{s=de[u>>2]|0;de[f>>2]=s;de[p>>2]=s;s=de[i+12>>2]|0;a=a-o|0;i=i+8|0;t=t+-1|0}de[i>>2]=(de[i>>2]|0)+a;de[i+4>>2]=s-a}if((n|0)==6){c=de[u>>2]|0;de[e+16>>2]=c+(de[e+48>>2]|0);e=c;de[f>>2]=e;de[p>>2]=e}else if((n|0)==8){de[e+16>>2]=0;de[f>>2]=0;de[p>>2]=0;de[e>>2]=de[e>>2]|32;if((t|0)==2)r=0;else r=r-(de[i+4>>2]|0)|0}ge=d;return r|0}function Nr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0;n=ge;ge=ge+80|0;i=n;de[e+36>>2]=3;if((de[e>>2]&64|0)==0?(de[i>>2]=de[e+60>>2],de[i+4>>2]=21505,de[i+8>>2]=n+12,(We(54,i|0)|0)!=0):0)pe[e+75>>0]=-1;i=Fr(e,t,r)|0;ge=n;return i|0}function zr(e){e=e|0;var t=0,r=0;t=e+74|0;r=pe[t>>0]|0;pe[t>>0]=r+255|r;t=de[e>>2]|0;if(!(t&8)){de[e+8>>2]=0;de[e+4>>2]=0;t=de[e+44>>2]|0;de[e+28>>2]=t;de[e+20>>2]=t;de[e+16>>2]=t+(de[e+48>>2]|0);t=0}else{de[e>>2]=t|32;t=-1}return t|0}function Br(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0,a=0;o=t&255;i=(r|0)!=0;e:do{if(i&(e&3|0)!=0){n=t&255;while(1){if((pe[e>>0]|0)==n<<24>>24){a=6;break e}e=e+1|0;r=r+-1|0;i=(r|0)!=0;if(!(i&(e&3|0)!=0)){a=5;break}}}else a=5}while(0);if((a|0)==5)if(i)a=6;else r=0;e:do{if((a|0)==6){n=t&255;if((pe[e>>0]|0)!=n<<24>>24){i=ve(o,16843009)|0;t:do{if(r>>>0>3)while(1){o=de[e>>2]^i;if((o&-2139062144^-2139062144)&o+-16843009)break;e=e+4|0;r=r+-4|0;if(r>>>0<=3){a=11;break t}}else a=11}while(0);if((a|0)==11)if(!r){r=0;break}while(1){if((pe[e>>0]|0)==n<<24>>24)break e;e=e+1|0;r=r+-1|0;if(!r){r=0;break}}}}}while(0);return((r|0)!=0?e:0)|0}function jr(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0;t=e+20|0;o=e+28|0;if((de[t>>2]|0)>>>0>(de[o>>2]|0)>>>0?(v[de[e+36>>2]&7](e,0,0)|0,(de[t>>2]|0)==0):0)t=-1;else{a=e+4|0;r=de[a>>2]|0;i=e+8|0;n=de[i>>2]|0;if(r>>>0>>0)v[de[e+40>>2]&7](e,r-n|0,1)|0;de[e+16>>2]=0;de[o>>2]=0;de[t>>2]=0;de[i>>2]=0;de[a>>2]=0;t=0}return t|0}function Ur(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0,a=0,s=0,l=0,u=0.0,h=0,c=0,f=0,p=0,d=0.0,m=0,_=0,g=0,v=0,F=0,y=0,b=0,x=0,T=0,w=0,E=0,S=0,A=0,k=0,O=0,N=0,P=0,z=0,B=0,j=0,R=0,U=0,G=0,X=0,H=0,Y=0,W=0,q=0,V=0,C=0,K=0,M=0,J=0,I=0,D=0,Z=0,Q=0,L=0;L=ge;ge=ge+624|0;J=L+24|0;D=L+16|0;I=L+588|0;q=L+576|0;M=L;H=L+536|0;Q=L+8|0;Z=L+528|0;N=(e|0)!=0;P=H+40|0;X=P;H=H+39|0;Y=Q+4|0;W=q+12|0;q=q+11|0;V=I;C=W;K=C-V|0;z=-2-V|0;B=C+2|0;j=J+288|0;R=I+9|0;U=R;G=I+8|0;o=0;m=t;a=0;t=0;e:while(1){do{if((o|0)>-1)if((a|0)>(2147483647-o|0)){o=ie()|0;de[o>>2]=75;o=-1;break}else{o=a+o|0;break}}while(0);a=pe[m>>0]|0;if(!(a<<24>>24)){O=245;break}else s=m;t:while(1){switch(a<<24>>24){case 37:{a=s;O=9;break t}case 0:{a=s;break t}default:{}}k=s+1|0;a=pe[k>>0]|0;s=k}t:do{if((O|0)==9)while(1){O=0;if((pe[a+1>>0]|0)!=37)break t;s=s+1|0;a=a+2|0;if((pe[a>>0]|0)==37)O=9;else break}}while(0);g=s-m|0;if(N?(de[e>>2]&32|0)==0:0)ne(m,g,e)|0;if((s|0)!=(m|0)){m=a;a=g;continue}h=a+1|0;s=pe[h>>0]|0;l=(s<<24>>24)+-48|0;if(l>>>0<10){k=(pe[a+2>>0]|0)==36;h=k?a+3|0:h;s=pe[h>>0]|0;p=k?l:-1;t=k?1:t}else p=-1;a=s<<24>>24;t:do{if((a&-32|0)==32){l=0;while(1){if(!(1<>24)+-32|l;h=h+1|0;s=pe[h>>0]|0;a=s<<24>>24;if((a&-32|0)!=32){c=l;a=h;break}}}else{c=0;a=h}}while(0);do{if(s<<24>>24==42){l=a+1|0;s=(pe[l>>0]|0)+-48|0;if(s>>>0<10?(pe[a+2>>0]|0)==36:0){de[n+(s<<2)>>2]=10;t=1;a=a+3|0;s=de[i+((pe[l>>0]|0)+-48<<3)>>2]|0}else{if(t){o=-1;break e}if(!N){_=c;a=l;t=0;k=0;break}t=(de[r>>2]|0)+(4-1)&~(4-1);s=de[t>>2]|0;de[r>>2]=t+4;t=0;a=l}if((s|0)<0){_=c|8192;k=0-s|0}else{_=c;k=s}}else{l=(s<<24>>24)+-48|0;if(l>>>0<10){s=0;do{s=(s*10|0)+l|0;a=a+1|0;l=(pe[a>>0]|0)+-48|0}while(l>>>0<10);if((s|0)<0){o=-1;break e}else{_=c;k=s}}else{_=c;k=0}}}while(0);t:do{if((pe[a>>0]|0)==46){l=a+1|0;s=pe[l>>0]|0;if(s<<24>>24!=42){h=(s<<24>>24)+-48|0;if(h>>>0<10){a=l;s=0}else{a=l;h=0;break}while(1){s=(s*10|0)+h|0;a=a+1|0;h=(pe[a>>0]|0)+-48|0;if(h>>>0>=10){h=s;break t}}}l=a+2|0;s=(pe[l>>0]|0)+-48|0;if(s>>>0<10?(pe[a+3>>0]|0)==36:0){de[n+(s<<2)>>2]=10;a=a+4|0;h=de[i+((pe[l>>0]|0)+-48<<3)>>2]|0;break}if(t){o=-1;break e}if(N){a=(de[r>>2]|0)+(4-1)&~(4-1);h=de[a>>2]|0;de[r>>2]=a+4;a=l}else{a=l;h=0}}else h=-1}while(0);f=0;while(1){s=(pe[a>>0]|0)+-65|0;if(s>>>0>57){o=-1;break e}l=a+1|0;s=pe[5359+(f*58|0)+s>>0]|0;c=s&255;if((c+-1|0)>>>0<8){a=l;f=c}else{A=l;break}}if(!(s<<24>>24)){o=-1;break}l=(p|0)>-1;do{if(s<<24>>24==19)if(l){o=-1;break e}else O=52;else{if(l){de[n+(p<<2)>>2]=c;E=i+(p<<3)|0;S=de[E+4>>2]|0;O=M;de[O>>2]=de[E>>2];de[O+4>>2]=S;O=52;break}if(!N){o=0;break e}Hr(M,c,r)}}while(0);if((O|0)==52?(O=0,!N):0){m=A;a=g;continue}p=pe[a>>0]|0;p=(f|0)!=0&(p&15|0)==3?p&-33:p;l=_&-65537;S=(_&8192|0)==0?_:l;t:do{switch(p|0){case 110:switch(f|0){case 0:{de[de[M>>2]>>2]=o;m=A;a=g;continue e}case 1:{de[de[M>>2]>>2]=o;m=A;a=g;continue e}case 2:{m=de[M>>2]|0;de[m>>2]=o;de[m+4>>2]=((o|0)<0)<<31>>31;m=A;a=g;continue e}case 3:{$[de[M>>2]>>1]=o;m=A;a=g;continue e}case 4:{pe[de[M>>2]>>0]=o;m=A;a=g;continue e}case 6:{de[de[M>>2]>>2]=o;m=A;a=g;continue e}case 7:{m=de[M>>2]|0;de[m>>2]=o;de[m+4>>2]=((o|0)<0)<<31>>31;m=A;a=g;continue e}default:{m=A;a=g;continue e}}case 112:{f=S|8;h=h>>>0>8?h:8;p=120;O=64;break}case 88:case 120:{f=S;O=64;break}case 111:{l=M;s=de[l>>2]|0;l=de[l+4>>2]|0;if((s|0)==0&(l|0)==0)a=P;else{a=P;do{a=a+-1|0;pe[a>>0]=s&7|48;s=Zr(s|0,l|0,3)|0;l=re}while(!((s|0)==0&(l|0)==0))}if(!(S&8)){s=S;f=0;c=5839;O=77}else{f=X-a+1|0;s=S;h=(h|0)<(f|0)?f:h;f=0;c=5839;O=77}break}case 105:case 100:{s=M;a=de[s>>2]|0;s=de[s+4>>2]|0;if((s|0)<0){a=se(0,0,a|0,s|0)|0;s=re;l=M;de[l>>2]=a;de[l+4>>2]=s;l=1;c=5839;O=76;break t}if(!(S&2048)){c=S&1;l=c;c=(c|0)==0?5839:5841;O=76}else{l=1;c=5840;O=76}break}case 117:{s=M;a=de[s>>2]|0;s=de[s+4>>2]|0;l=0;c=5839;O=76;break}case 99:{pe[H>>0]=de[M>>2];m=H;s=1;f=0;p=5839;a=P;break}case 109:{a=ie()|0;a=xr(de[a>>2]|0)|0;O=82;break}case 115:{a=de[M>>2]|0;a=(a|0)!=0?a:5849;O=82;break}case 67:{de[Q>>2]=de[M>>2];de[Y>>2]=0;de[M>>2]=Q;h=-1;O=86;break}case 83:{if(!h){ae(e,32,k,0,S);a=0;O=98}else O=86;break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{u=+ee[M>>3];de[D>>2]=0;ee[te>>3]=u;if((de[te+4>>2]|0)>=0)if(!(S&2048)){E=S&1;w=E;E=(E|0)==0?5857:5862}else{w=1;E=5859}else{u=-u;w=1;E=5856}ee[te>>3]=u;T=de[te+4>>2]&2146435072;do{if(T>>>0<2146435072|(T|0)==2146435072&0<0){d=+Er(u,D)*2.0;s=d!=0.0;if(s)de[D>>2]=(de[D>>2]|0)+-1;b=p|32;if((b|0)==97){m=p&32;g=(m|0)==0?E:E+9|0;_=w|2;a=12-h|0;do{if(!(h>>>0>11|(a|0)==0)){u=8.0;do{a=a+-1|0;u=u*16.0}while((a|0)!=0);if((pe[g>>0]|0)==45){u=-(u+(-d-u));break}else{u=d+u-u;break}}else u=d}while(0);s=de[D>>2]|0;a=(s|0)<0?0-s|0:s;a=oe(a,((a|0)<0)<<31>>31,W)|0;if((a|0)==(W|0)){pe[q>>0]=48;a=q}pe[a+-1>>0]=(s>>31&2)+43;f=a+-2|0;pe[f>>0]=p+15;c=(h|0)<1;l=(S&8|0)==0;s=I;while(1){E=~~u;a=s+1|0;pe[s>>0]=me[5823+E>>0]|m;u=(u-+(E|0))*16.0;do{if((a-V|0)==1){if(l&(c&u==0.0))break;pe[a>>0]=46;a=s+2|0}}while(0);if(!(u!=0.0))break;else s=a}h=(h|0)!=0&(z+a|0)<(h|0)?B+h-f|0:K-f+a|0;l=h+_|0;ae(e,32,k,l,S);if(!(de[e>>2]&32))ne(g,_,e)|0;ae(e,48,k,l,S^65536);a=a-V|0;if(!(de[e>>2]&32))ne(I,a,e)|0;s=C-f|0;ae(e,48,h-(a+s)|0,0,0);if(!(de[e>>2]&32))ne(f,s,e)|0;ae(e,32,k,l,S^8192);a=(l|0)<(k|0)?k:l;break}a=(h|0)<0?6:h;if(s){s=(de[D>>2]|0)+-28|0;de[D>>2]=s;u=d*268435456.0}else{u=d;s=de[D>>2]|0}T=(s|0)<0?J:j;x=T;s=T;do{y=~~u>>>0;de[s>>2]=y;s=s+4|0;u=(u-+(y>>>0))*1.0e9}while(u!=0.0);l=s;s=de[D>>2]|0;if((s|0)>0){c=T;while(1){f=(s|0)>29?29:s;h=l+-4|0;do{if(h>>>0>>0)h=c;else{s=0;do{y=Qr(de[h>>2]|0,0,f|0)|0;y=$r(y|0,re|0,s|0,0)|0;s=re;F=li(y|0,s|0,1e9,0)|0;de[h>>2]=F;s=si(y|0,s|0,1e9,0)|0;h=h+-4|0}while(h>>>0>=c>>>0);if(!s){h=c;break}h=c+-4|0;de[h>>2]=s}}while(0);while(1){if(l>>>0<=h>>>0)break;s=l+-4|0;if(!(de[s>>2]|0))l=s;else break}s=(de[D>>2]|0)-f|0;de[D>>2]=s;if((s|0)>0)c=h;else break}}else h=T;if((s|0)<0){g=((a+25|0)/9|0)+1|0;v=(b|0)==102;m=h;while(1){_=0-s|0;_=(_|0)>9?9:_;do{if(m>>>0>>0){s=(1<<_)+-1|0;c=1e9>>>_;h=0;f=m;do{y=de[f>>2]|0;de[f>>2]=(y>>>_)+h;h=ve(y&s,c)|0;f=f+4|0}while(f>>>0>>0);s=(de[m>>2]|0)==0?m+4|0:m;if(!h){h=s;break}de[l>>2]=h;h=s;l=l+4|0}else h=(de[m>>2]|0)==0?m+4|0:m}while(0);s=v?T:h;l=(l-s>>2|0)>(g|0)?s+(g<<2)|0:l;s=(de[D>>2]|0)+_|0;de[D>>2]=s;if((s|0)>=0){m=h;break}else m=h}}else m=h;do{if(m>>>0>>0){s=(x-m>>2)*9|0;c=de[m>>2]|0;if(c>>>0<10)break;else h=10;do{h=h*10|0;s=s+1|0}while(c>>>0>=h>>>0)}else s=0}while(0);F=(b|0)==103;y=(a|0)!=0;h=a-((b|0)!=102?s:0)+((y&F)<<31>>31)|0;if((h|0)<(((l-x>>2)*9|0)+-9|0)){f=h+9216|0;v=(f|0)/9|0;h=T+(v+-1023<<2)|0;f=((f|0)%9|0)+1|0;if((f|0)<9){c=10;do{c=c*10|0;f=f+1|0}while((f|0)!=9)}else c=10;_=de[h>>2]|0;g=(_>>>0)%(c>>>0)|0;if((g|0)==0?(T+(v+-1022<<2)|0)==(l|0):0)c=m;else O=163;do{if((O|0)==163){O=0;d=(((_>>>0)/(c>>>0)|0)&1|0)==0?9007199254740992.0:9007199254740994.0;f=(c|0)/2|0;do{if(g>>>0>>0)u=.5;else{if((g|0)==(f|0)?(T+(v+-1022<<2)|0)==(l|0):0){u=1.0;break}u=1.5}}while(0);do{if(w){if((pe[E>>0]|0)!=45)break;d=-d;u=-u}}while(0);f=_-g|0;de[h>>2]=f;if(!(d+u!=d)){c=m;break}b=f+c|0;de[h>>2]=b;if(b>>>0>999999999){s=m;while(1){c=h+-4|0;de[h>>2]=0;if(c>>>0>>0){s=s+-4|0;de[s>>2]=0}b=(de[c>>2]|0)+1|0;de[c>>2]=b;if(b>>>0>999999999)h=c;else{m=s;h=c;break}}}s=(x-m>>2)*9|0;f=de[m>>2]|0;if(f>>>0<10){c=m;break}else c=10;do{c=c*10|0;s=s+1|0}while(f>>>0>=c>>>0);c=m}}while(0);b=h+4|0;m=c;l=l>>>0>b>>>0?b:l}g=0-s|0;while(1){if(l>>>0<=m>>>0){v=0;b=l;break}h=l+-4|0;if(!(de[h>>2]|0))l=h;else{v=1;b=l;break}}do{if(F){a=(y&1^1)+a|0;if((a|0)>(s|0)&(s|0)>-5){p=p+-1|0;a=a+-1-s|0}else{p=p+-2|0;a=a+-1|0}l=S&8;if(l)break;do{if(v){l=de[b+-4>>2]|0;if(!l){h=9;break}if(!((l>>>0)%10|0)){c=10;h=0}else{h=0;break}do{c=c*10|0;h=h+1|0}while(((l>>>0)%(c>>>0)|0|0)==0)}else h=9}while(0);l=((b-x>>2)*9|0)+-9|0;if((p|32|0)==102){l=l-h|0;l=(l|0)<0?0:l;a=(a|0)<(l|0)?a:l;l=0;break}else{l=l+s-h|0;l=(l|0)<0?0:l;a=(a|0)<(l|0)?a:l;l=0;break}}else l=S&8}while(0);_=a|l;c=(_|0)!=0&1;f=(p|32|0)==102;if(f){s=(s|0)>0?s:0;p=0}else{h=(s|0)<0?g:s;h=oe(h,((h|0)<0)<<31>>31,W)|0;if((C-h|0)<2)do{h=h+-1|0;pe[h>>0]=48}while((C-h|0)<2);pe[h+-1>>0]=(s>>31&2)+43;x=h+-2|0;pe[x>>0]=p;s=C-x|0;p=x}g=w+1+a+c+s|0;ae(e,32,k,g,S);if(!(de[e>>2]&32))ne(E,w,e)|0;ae(e,48,k,g,S^65536);do{if(f){h=m>>>0>T>>>0?T:m;s=h;do{l=oe(de[s>>2]|0,0,R)|0;do{if((s|0)==(h|0)){if((l|0)!=(R|0))break;pe[G>>0]=48;l=G}else{if(l>>>0<=I>>>0)break;do{l=l+-1|0;pe[l>>0]=48}while(l>>>0>I>>>0)}}while(0);if(!(de[e>>2]&32))ne(l,U-l|0,e)|0;s=s+4|0}while(s>>>0<=T>>>0);do{if(_){if(de[e>>2]&32)break;ne(5891,1,e)|0}}while(0);if((a|0)>0&s>>>0>>0){l=s;while(1){s=oe(de[l>>2]|0,0,R)|0;if(s>>>0>I>>>0)do{s=s+-1|0;pe[s>>0]=48}while(s>>>0>I>>>0);if(!(de[e>>2]&32))ne(s,(a|0)>9?9:a,e)|0;l=l+4|0;s=a+-9|0;if(!((a|0)>9&l>>>0>>0)){a=s;break}else a=s}}ae(e,48,a+9|0,9,0)}else{f=v?b:m+4|0;if((a|0)>-1){c=(l|0)==0;h=m;do{s=oe(de[h>>2]|0,0,R)|0;if((s|0)==(R|0)){pe[G>>0]=48;s=G}do{if((h|0)==(m|0)){l=s+1|0;if(!(de[e>>2]&32))ne(s,1,e)|0;if(c&(a|0)<1){s=l;break}if(de[e>>2]&32){s=l;break}ne(5891,1,e)|0;s=l}else{if(s>>>0<=I>>>0)break;do{s=s+-1|0;pe[s>>0]=48}while(s>>>0>I>>>0)}}while(0);l=U-s|0;if(!(de[e>>2]&32))ne(s,(a|0)>(l|0)?l:a,e)|0;a=a-l|0;h=h+4|0}while(h>>>0>>0&(a|0)>-1)}ae(e,48,a+18|0,18,0);if(de[e>>2]&32)break;ne(p,C-p|0,e)|0}}while(0);ae(e,32,k,g,S^8192);a=(g|0)<(k|0)?k:g}else{f=(p&32|0)!=0;c=u!=u|0.0!=0.0;s=c?0:w;h=s+3|0;ae(e,32,k,h,l);a=de[e>>2]|0;if(!(a&32)){ne(E,s,e)|0;a=de[e>>2]|0}if(!(a&32))ne(c?f?5883:5887:f?5875:5879,3,e)|0;ae(e,32,k,h,S^8192);a=(h|0)<(k|0)?k:h}}while(0);m=A;continue e}default:{l=S;s=h;f=0;p=5839;a=P}}}while(0);t:do{if((O|0)==64){l=M;s=de[l>>2]|0;l=de[l+4>>2]|0;c=p&32;if(!((s|0)==0&(l|0)==0)){a=P;do{a=a+-1|0;pe[a>>0]=me[5823+(s&15)>>0]|c;s=Zr(s|0,l|0,4)|0;l=re}while(!((s|0)==0&(l|0)==0));O=M;if((f&8|0)==0|(de[O>>2]|0)==0&(de[O+4>>2]|0)==0){s=f;f=0;c=5839;O=77}else{s=f;f=2;c=5839+(p>>4)|0;O=77}}else{a=P;s=f;f=0;c=5839;O=77}}else if((O|0)==76){a=oe(a,s,P)|0;s=S;f=l;O=77}else if((O|0)==82){O=0;S=Br(a,0,h)|0;E=(S|0)==0;m=a;s=E?h:S-a|0;f=0;p=5839;a=E?a+h|0:S}else if((O|0)==86){O=0;s=0;a=0;c=de[M>>2]|0;while(1){l=de[c>>2]|0;if(!l)break;a=Ar(Z,l)|0;if((a|0)<0|a>>>0>(h-s|0)>>>0)break;s=a+s|0;if(h>>>0>s>>>0)c=c+4|0;else break}if((a|0)<0){o=-1;break e}ae(e,32,k,s,S);if(!s){a=0;O=98}else{l=0;h=de[M>>2]|0;while(1){a=de[h>>2]|0;if(!a){a=s;O=98;break t}a=Ar(Z,a)|0;l=a+l|0;if((l|0)>(s|0)){a=s;O=98;break t}if(!(de[e>>2]&32))ne(Z,a,e)|0;if(l>>>0>=s>>>0){a=s;O=98;break}else h=h+4|0}}}}while(0);if((O|0)==98){O=0;ae(e,32,k,a,S^8192);m=A;a=(k|0)>(a|0)?k:a;continue}if((O|0)==77){O=0;l=(h|0)>-1?s&-65537:s;s=M;s=(de[s>>2]|0)!=0|(de[s+4>>2]|0)!=0;if((h|0)!=0|s){s=(s&1^1)+(X-a)|0;m=a;s=(h|0)>(s|0)?h:s;p=c;a=P}else{m=P;s=0;p=c;a=P}}c=a-m|0;s=(s|0)<(c|0)?c:s;h=f+s|0;a=(k|0)<(h|0)?h:k;ae(e,32,a,h,l);if(!(de[e>>2]&32))ne(p,f,e)|0;ae(e,48,a,h,l^65536);ae(e,48,s,c,0);if(!(de[e>>2]&32))ne(m,c,e)|0;ae(e,32,a,h,l^8192);m=A}e:do{if((O|0)==245)if(!e)if(t){o=1;while(1){t=de[n+(o<<2)>>2]|0;if(!t)break;Hr(i+(o<<3)|0,t,r);o=o+1|0;if((o|0)>=10){o=1;break e}}if((o|0)<10)while(1){if(de[n+(o<<2)>>2]|0){o=-1;break e}o=o+1|0;if((o|0)>=10){o=1;break}}else o=1}else o=0}while(0);ge=L;return o|0}function Gr(e){e=e|0;if(!(de[e+68>>2]|0))g(e);return}function Xr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0;i=e+20|0;n=de[i>>2]|0;e=(de[e+16>>2]|0)-n|0;e=e>>>0>r>>>0?r:e;ei(n|0,t|0,e|0)|0;de[i>>2]=(de[i>>2]|0)+e;return r|0}function Hr(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0.0;e:do{if(t>>>0<=20)do{switch(t|0){case 9:{i=(de[r>>2]|0)+(4-1)&~(4-1);t=de[i>>2]|0;de[r>>2]=i+4;de[e>>2]=t;break e}case 10:{i=(de[r>>2]|0)+(4-1)&~(4-1);t=de[i>>2]|0;de[r>>2]=i+4;i=e;de[i>>2]=t;de[i+4>>2]=((t|0)<0)<<31>>31;break e}case 11:{i=(de[r>>2]|0)+(4-1)&~(4-1);t=de[i>>2]|0;de[r>>2]=i+4;i=e;de[i>>2]=t;de[i+4>>2]=0;break e}case 12:{i=(de[r>>2]|0)+(8-1)&~(8-1);t=i;n=de[t>>2]|0;t=de[t+4>>2]|0;de[r>>2]=i+8;i=e;de[i>>2]=n;de[i+4>>2]=t;break e}case 13:{n=(de[r>>2]|0)+(4-1)&~(4-1);i=de[n>>2]|0;de[r>>2]=n+4;i=(i&65535)<<16>>16;n=e;de[n>>2]=i;de[n+4>>2]=((i|0)<0)<<31>>31;break e}case 14:{n=(de[r>>2]|0)+(4-1)&~(4-1);i=de[n>>2]|0;de[r>>2]=n+4;n=e;de[n>>2]=i&65535;de[n+4>>2]=0;break e}case 15:{n=(de[r>>2]|0)+(4-1)&~(4-1);i=de[n>>2]|0;de[r>>2]=n+4;i=(i&255)<<24>>24;n=e;de[n>>2]=i;de[n+4>>2]=((i|0)<0)<<31>>31;break e}case 16:{n=(de[r>>2]|0)+(4-1)&~(4-1);i=de[n>>2]|0;de[r>>2]=n+4;n=e;de[n>>2]=i&255;de[n+4>>2]=0;break e}case 17:{n=(de[r>>2]|0)+(8-1)&~(8-1);o=+ee[n>>3];de[r>>2]=n+8;ee[e>>3]=o;break e}case 18:{n=(de[r>>2]|0)+(8-1)&~(8-1);o=+ee[n>>3];de[r>>2]=n+8;ee[e>>3]=o;break e}default:break e}}while(0)}while(0)}function oe(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;if(t>>>0>0|(t|0)==0&e>>>0>4294967295)while(1){i=li(e|0,t|0,10,0)|0;r=r+-1|0;pe[r>>0]=i|48;i=si(e|0,t|0,10,0)|0;if(t>>>0>9|(t|0)==9&e>>>0>4294967295){e=i;t=re}else{e=i;break}}if(e)while(1){r=r+-1|0;pe[r>>0]=(e>>>0)%10|0|48;if(e>>>0<10)break;else e=(e>>>0)/10|0}return r|0}function ae(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0,a=0,s=0;s=ge;ge=ge+256|0;a=s;do{if((r|0)>(i|0)&(n&73728|0)==0){n=r-i|0;G(a|0,t|0,(n>>>0>256?256:n)|0)|0;t=de[e>>2]|0;o=(t&32|0)==0;if(n>>>0>255){i=r-i|0;do{if(o){ne(a,256,e)|0;t=de[e>>2]|0}n=n+-256|0;o=(t&32|0)==0}while(n>>>0>255);if(o)n=i&255;else break}else if(!o)break;ne(a,n,e)|0}}while(0);ge=s}function Yr(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,l=0,u=0,h=0,c=0,f=0,p=0,d=0,m=0,_=0,g=0,v=0,y=0,b=0,x=0,T=0,w=0,E=0,S=0,A=0,k=0,F=0,N=0,O=0,P=0,R=0,C=0,M=0,I=0,D=0,L=0;do{if(e>>>0<245){p=e>>>0<11?16:e+11&-8;e=p>>>3;s=de[151]|0;r=s>>>e;if(r&3){e=(r&1^1)+e|0;i=e<<1;r=644+(i<<2)|0;i=644+(i+2<<2)|0;n=de[i>>2]|0;o=n+8|0;a=de[o>>2]|0;do{if((r|0)!=(a|0)){if(a>>>0<(de[155]|0)>>>0)B();t=a+12|0;if((de[t>>2]|0)==(n|0)){de[t>>2]=r;de[i>>2]=a;break}else B()}else de[151]=s&~(1<>2]=L|3;L=n+(L|4)|0;de[L>>2]=de[L>>2]|1;L=o;return L|0}a=de[153]|0;if(p>>>0>a>>>0){if(r){i=2<>>12&16;i=i>>>l;n=i>>>5&8;i=i>>>n;o=i>>>2&4;i=i>>>o;r=i>>>1&2;i=i>>>r;e=i>>>1&1;e=(n|l|o|r|e)+(i>>>e)|0;i=e<<1;r=644+(i<<2)|0;i=644+(i+2<<2)|0;o=de[i>>2]|0;l=o+8|0;n=de[l>>2]|0;do{if((r|0)!=(n|0)){if(n>>>0<(de[155]|0)>>>0)B();t=n+12|0;if((de[t>>2]|0)==(o|0)){de[t>>2]=r;de[i>>2]=n;u=de[153]|0;break}else B()}else{de[151]=s&~(1<>2]=p|3;s=o+p|0;de[o+(p|4)>>2]=a|1;de[o+L>>2]=a;if(u){n=de[156]|0;r=u>>>3;t=r<<1;i=644+(t<<2)|0;e=de[151]|0;r=1<>2]|0;if(t>>>0<(de[155]|0)>>>0)B();else{h=e;c=t}}else{de[151]=e|r;h=644+(t+2<<2)|0;c=i}de[h>>2]=n;de[c+12>>2]=n;de[n+8>>2]=c;de[n+12>>2]=i}de[153]=a;de[156]=s;L=l;return L|0}e=de[152]|0;if(e){r=(e&0-e)+-1|0;D=r>>>12&16;r=r>>>D;I=r>>>5&8;r=r>>>I;L=r>>>2&4;r=r>>>L;e=r>>>1&2;r=r>>>e;i=r>>>1&1;i=de[908+((I|D|L|e|i)+(r>>>i)<<2)>>2]|0;r=(de[i+4>>2]&-8)-p|0;e=i;while(1){t=de[e+16>>2]|0;if(!t){t=de[e+20>>2]|0;if(!t){l=r;break}}e=(de[t+4>>2]&-8)-p|0;L=e>>>0>>0;r=L?e:r;e=t;i=L?t:i}o=de[155]|0;if(i>>>0>>0)B();s=i+p|0;if(i>>>0>=s>>>0)B();a=de[i+24>>2]|0;r=de[i+12>>2]|0;do{if((r|0)==(i|0)){e=i+20|0;t=de[e>>2]|0;if(!t){e=i+16|0;t=de[e>>2]|0;if(!t){f=0;break}}while(1){r=t+20|0;n=de[r>>2]|0;if(n){t=n;e=r;continue}r=t+16|0;n=de[r>>2]|0;if(!n)break;else{t=n;e=r}}if(e>>>0>>0)B();else{de[e>>2]=0;f=t;break}}else{n=de[i+8>>2]|0;if(n>>>0>>0)B();t=n+12|0;if((de[t>>2]|0)!=(i|0))B();e=r+8|0;if((de[e>>2]|0)==(i|0)){de[t>>2]=r;de[e>>2]=n;f=r;break}else B()}}while(0);do{if(a){t=de[i+28>>2]|0;e=908+(t<<2)|0;if((i|0)==(de[e>>2]|0)){de[e>>2]=f;if(!f){de[152]=de[152]&~(1<>>0<(de[155]|0)>>>0)B();t=a+16|0;if((de[t>>2]|0)==(i|0))de[t>>2]=f;else de[a+20>>2]=f;if(!f)break}e=de[155]|0;if(f>>>0>>0)B();de[f+24>>2]=a;t=de[i+16>>2]|0;do{if(t)if(t>>>0>>0)B();else{de[f+16>>2]=t;de[t+24>>2]=f;break}}while(0);t=de[i+20>>2]|0;if(t)if(t>>>0<(de[155]|0)>>>0)B();else{de[f+20>>2]=t;de[t+24>>2]=f;break}}}while(0);if(l>>>0<16){L=l+p|0;de[i+4>>2]=L|3;L=i+(L+4)|0;de[L>>2]=de[L>>2]|1}else{de[i+4>>2]=p|3;de[i+(p|4)>>2]=l|1;de[i+(l+p)>>2]=l;t=de[153]|0;if(t){o=de[156]|0;r=t>>>3;t=r<<1;n=644+(t<<2)|0;e=de[151]|0;r=1<>2]|0;if(e>>>0<(de[155]|0)>>>0)B();else{d=t;m=e}}else{de[151]=e|r;d=644+(t+2<<2)|0;m=n}de[d>>2]=o;de[m+12>>2]=o;de[o+8>>2]=m;de[o+12>>2]=n}de[153]=l;de[156]=s}L=i+8|0;return L|0}else m=p}else m=p}else if(e>>>0<=4294967231){e=e+11|0;c=e&-8;h=de[152]|0;if(h){r=0-c|0;e=e>>>8;if(e)if(c>>>0>16777215)u=31;else{m=(e+1048320|0)>>>16&8;b=e<>>16&4;b=b<>>16&2;u=14-(d|m|u)+(b<>>15)|0;u=c>>>(u+7|0)&1|u<<1}else u=0;e=de[908+(u<<2)>>2]|0;e:do{if(!e){n=0;e=0;b=86}else{a=r;n=0;s=c<<((u|0)==31?0:25-(u>>>1)|0);l=e;e=0;while(1){o=de[l+4>>2]&-8;r=o-c|0;if(r>>>0>>0)if((o|0)==(c|0)){o=l;e=l;b=90;break e}else e=l;else r=a;b=de[l+20>>2]|0;l=de[l+16+(s>>>31<<2)>>2]|0;n=(b|0)==0|(b|0)==(l|0)?n:b;if(!l){b=86;break}else{a=r;s=s<<1}}}}while(0);if((b|0)==86){if((n|0)==0&(e|0)==0){e=2<>>12&16;e=e>>>f;h=e>>>5&8;e=e>>>h;d=e>>>2&4;e=e>>>d;m=e>>>1&2;e=e>>>m;n=e>>>1&1;n=de[908+((h|f|d|m|n)+(e>>>n)<<2)>>2]|0;e=0}if(!n){s=r;l=e}else{o=n;b=90}}if((b|0)==90)while(1){b=0;m=(de[o+4>>2]&-8)-c|0;n=m>>>0>>0;r=n?m:r;e=n?o:e;n=de[o+16>>2]|0;if(n){o=n;b=90;continue}o=de[o+20>>2]|0;if(!o){s=r;l=e;break}else b=90}if((l|0)!=0?s>>>0<((de[153]|0)-c|0)>>>0:0){n=de[155]|0;if(l>>>0>>0)B();a=l+c|0;if(l>>>0>=a>>>0)B();o=de[l+24>>2]|0;r=de[l+12>>2]|0;do{if((r|0)==(l|0)){e=l+20|0;t=de[e>>2]|0;if(!t){e=l+16|0;t=de[e>>2]|0;if(!t){p=0;break}}while(1){r=t+20|0;i=de[r>>2]|0;if(i){t=i;e=r;continue}r=t+16|0;i=de[r>>2]|0;if(!i)break;else{t=i;e=r}}if(e>>>0>>0)B();else{de[e>>2]=0;p=t;break}}else{i=de[l+8>>2]|0;if(i>>>0>>0)B();t=i+12|0;if((de[t>>2]|0)!=(l|0))B();e=r+8|0;if((de[e>>2]|0)==(l|0)){de[t>>2]=r;de[e>>2]=i;p=r;break}else B()}}while(0);do{if(o){t=de[l+28>>2]|0;e=908+(t<<2)|0;if((l|0)==(de[e>>2]|0)){de[e>>2]=p;if(!p){de[152]=de[152]&~(1<>>0<(de[155]|0)>>>0)B();t=o+16|0;if((de[t>>2]|0)==(l|0))de[t>>2]=p;else de[o+20>>2]=p;if(!p)break}e=de[155]|0;if(p>>>0>>0)B();de[p+24>>2]=o;t=de[l+16>>2]|0;do{if(t)if(t>>>0>>0)B();else{de[p+16>>2]=t;de[t+24>>2]=p;break}}while(0);t=de[l+20>>2]|0;if(t)if(t>>>0<(de[155]|0)>>>0)B();else{de[p+20>>2]=t;de[t+24>>2]=p;break}}}while(0);e:do{if(s>>>0>=16){de[l+4>>2]=c|3;de[l+(c|4)>>2]=s|1;de[l+(s+c)>>2]=s;t=s>>>3;if(s>>>0<256){e=t<<1;i=644+(e<<2)|0;r=de[151]|0;t=1<>2]|0;if(e>>>0<(de[155]|0)>>>0)B();else{g=t;v=e}}else{de[151]=r|t;g=644+(e+2<<2)|0;v=i}de[g>>2]=a;de[v+12>>2]=a;de[l+(c+8)>>2]=v;de[l+(c+12)>>2]=i;break}t=s>>>8;if(t)if(s>>>0>16777215)i=31;else{D=(t+1048320|0)>>>16&8;L=t<>>16&4;L=L<>>16&2;i=14-(I|D|i)+(L<>>15)|0;i=s>>>(i+7|0)&1|i<<1}else i=0;t=908+(i<<2)|0;de[l+(c+28)>>2]=i;de[l+(c+20)>>2]=0;de[l+(c+16)>>2]=0;e=de[152]|0;r=1<>2]=a;de[l+(c+24)>>2]=t;de[l+(c+12)>>2]=a;de[l+(c+8)>>2]=a;break}t=de[t>>2]|0;t:do{if((de[t+4>>2]&-8|0)!=(s|0)){i=s<<((i|0)==31?0:25-(i>>>1)|0);while(1){e=t+16+(i>>>31<<2)|0;r=de[e>>2]|0;if(!r)break;if((de[r+4>>2]&-8|0)==(s|0)){w=r;break t}else{i=i<<1;t=r}}if(e>>>0<(de[155]|0)>>>0)B();else{de[e>>2]=a;de[l+(c+24)>>2]=t;de[l+(c+12)>>2]=a;de[l+(c+8)>>2]=a;break e}}else w=t}while(0);t=w+8|0;e=de[t>>2]|0;L=de[155]|0;if(e>>>0>=L>>>0&w>>>0>=L>>>0){de[e+12>>2]=a;de[t>>2]=a;de[l+(c+8)>>2]=e;de[l+(c+12)>>2]=w;de[l+(c+24)>>2]=0;break}else B()}else{L=s+c|0;de[l+4>>2]=L|3;L=l+(L+4)|0;de[L>>2]=de[L>>2]|1}}while(0);L=l+8|0;return L|0}else m=c}else m=c}else m=-1}while(0);r=de[153]|0;if(r>>>0>=m>>>0){t=r-m|0;e=de[156]|0;if(t>>>0>15){de[156]=e+m;de[153]=t;de[e+(m+4)>>2]=t|1;de[e+r>>2]=t;de[e+4>>2]=m|3}else{de[153]=0;de[156]=0;de[e+4>>2]=r|3;L=e+(r+4)|0;de[L>>2]=de[L>>2]|1}L=e+8|0;return L|0}e=de[154]|0;if(e>>>0>m>>>0){D=e-m|0;de[154]=D;L=de[157]|0;de[157]=L+m;de[L+(m+4)>>2]=D|1;de[L+4>>2]=m|3;L=L+8|0;return L|0}do{if(!(de[269]|0)){e=$e(30)|0;if(!(e+-1&e)){de[271]=e;de[270]=e;de[272]=-1;de[273]=-1;de[274]=0;de[262]=0;w=(ut(0)|0)&-16^1431655768;de[269]=w;break}else B()}}while(0);l=m+48|0;s=de[271]|0;u=m+47|0;a=s+u|0;s=0-s|0;h=a&s;if(h>>>0<=m>>>0){L=0;return L|0}e=de[261]|0;if((e|0)!=0?(v=de[259]|0,w=v+h|0,w>>>0<=v>>>0|w>>>0>e>>>0):0){L=0;return L|0}e:do{if(!(de[262]&4)){e=de[157]|0;t:do{if(e){n=1052;while(1){r=de[n>>2]|0;if(r>>>0<=e>>>0?(_=n+4|0,(r+(de[_>>2]|0)|0)>>>0>e>>>0):0){o=n;e=_;break}n=de[n+8>>2]|0;if(!n){b=174;break t}}r=a-(de[154]|0)&s;if(r>>>0<2147483647){n=z(r|0)|0;w=(n|0)==((de[o>>2]|0)+(de[e>>2]|0)|0);e=w?r:0;if(w){if((n|0)!=(-1|0)){x=n;d=e;b=194;break e}}else b=184}else e=0}else b=174}while(0);do{if((b|0)==174){o=z(0)|0;if((o|0)!=(-1|0)){e=o;r=de[270]|0;n=r+-1|0;if(!(n&e))r=h;else r=h-e+(n+e&0-r)|0;e=de[259]|0;n=e+r|0;if(r>>>0>m>>>0&r>>>0<2147483647){w=de[261]|0;if((w|0)!=0?n>>>0<=e>>>0|n>>>0>w>>>0:0){e=0;break}n=z(r|0)|0;w=(n|0)==(o|0);e=w?r:0;if(w){x=o;d=e;b=194;break e}else b=184}else e=0}else e=0}}while(0);t:do{if((b|0)==184){o=0-r|0;do{if(l>>>0>r>>>0&(r>>>0<2147483647&(n|0)!=(-1|0))?(y=de[271]|0,y=u-r+y&0-y,y>>>0<2147483647):0)if((z(y|0)|0)==(-1|0)){z(o|0)|0;break t}else{r=y+r|0;break}}while(0);if((n|0)!=(-1|0)){x=n;d=r;b=194;break e}}}while(0);de[262]=de[262]|4;b=191}else{e=0;b=191}}while(0);if((((b|0)==191?h>>>0<2147483647:0)?(x=z(h|0)|0,T=z(0)|0,x>>>0>>0&((x|0)!=(-1|0)&(T|0)!=(-1|0))):0)?(E=T-x|0,S=E>>>0>(m+40|0)>>>0,S):0){d=S?E:e;b=194}if((b|0)==194){e=(de[259]|0)+d|0;de[259]=e;if(e>>>0>(de[260]|0)>>>0)de[260]=e;a=de[157]|0;e:do{if(a){o=1052;do{e=de[o>>2]|0;r=o+4|0;n=de[r>>2]|0;if((x|0)==(e+n|0)){A=e;k=r;F=n;N=o;b=204;break}o=de[o+8>>2]|0}while((o|0)!=0);if(((b|0)==204?(de[N+12>>2]&8|0)==0:0)?a>>>0>>0&a>>>0>=A>>>0:0){de[k>>2]=F+d;L=(de[154]|0)+d|0;D=a+8|0;D=(D&7|0)==0?0:0-D&7;I=L-D|0;de[157]=a+D;de[154]=I;de[a+(D+4)>>2]=I|1;de[a+(L+4)>>2]=40;de[158]=de[273];break}e=de[155]|0;if(x>>>0>>0){de[155]=x;e=x}r=x+d|0;o=1052;while(1){if((de[o>>2]|0)==(r|0)){n=o;r=o;b=212;break}o=de[o+8>>2]|0;if(!o){r=1052;break}}if((b|0)==212)if(!(de[r+12>>2]&8)){de[n>>2]=x;f=r+4|0;de[f>>2]=(de[f>>2]|0)+d;f=x+8|0;f=(f&7|0)==0?0:0-f&7;u=x+(d+8)|0;u=(u&7|0)==0?0:0-u&7;t=x+(u+d)|0;c=f+m|0;p=x+c|0;h=t-(x+f)-m|0;de[x+(f+4)>>2]=m|3;t:do{if((t|0)!=(a|0)){if((t|0)==(de[156]|0)){L=(de[153]|0)+h|0;de[153]=L;de[156]=p;de[x+(c+4)>>2]=L|1;de[x+(L+c)>>2]=L;break}s=d+4|0;r=de[x+(s+u)>>2]|0;if((r&3|0)==1){l=r&-8;o=r>>>3;r:do{if(r>>>0>=256){a=de[x+((u|24)+d)>>2]|0;i=de[x+(d+12+u)>>2]|0;do{if((i|0)==(t|0)){n=u|16;i=x+(s+n)|0;r=de[i>>2]|0;if(!r){i=x+(n+d)|0;r=de[i>>2]|0;if(!r){M=0;break}}while(1){n=r+20|0;o=de[n>>2]|0;if(o){r=o;i=n;continue}n=r+16|0;o=de[n>>2]|0;if(!o)break;else{r=o;i=n}}if(i>>>0>>0)B();else{de[i>>2]=0;M=r;break}}else{n=de[x+((u|8)+d)>>2]|0;if(n>>>0>>0)B();e=n+12|0;if((de[e>>2]|0)!=(t|0))B();r=i+8|0;if((de[r>>2]|0)==(t|0)){de[e>>2]=i;de[r>>2]=n;M=i;break}else B()}}while(0);if(!a)break;e=de[x+(d+28+u)>>2]|0;r=908+(e<<2)|0;do{if((t|0)!=(de[r>>2]|0)){if(a>>>0<(de[155]|0)>>>0)B();e=a+16|0;if((de[e>>2]|0)==(t|0))de[e>>2]=M;else de[a+20>>2]=M;if(!M)break r}else{de[r>>2]=M;if(M)break;de[152]=de[152]&~(1<>>0>>0)B();de[M+24>>2]=a;t=u|16;e=de[x+(t+d)>>2]|0;do{if(e)if(e>>>0>>0)B();else{de[M+16>>2]=e;de[e+24>>2]=M;break}}while(0);t=de[x+(s+t)>>2]|0;if(!t)break;if(t>>>0<(de[155]|0)>>>0)B();else{de[M+20>>2]=t;de[t+24>>2]=M;break}}else{i=de[x+((u|8)+d)>>2]|0;n=de[x+(d+12+u)>>2]|0;r=644+(o<<1<<2)|0;do{if((i|0)!=(r|0)){if(i>>>0>>0)B();if((de[i+12>>2]|0)==(t|0))break;B()}}while(0);if((n|0)==(i|0)){de[151]=de[151]&~(1<>>0>>0)B();e=n+8|0;if((de[e>>2]|0)==(t|0)){O=e;break}B()}}while(0);de[i+12>>2]=n;de[O>>2]=i}}while(0);t=x+((l|u)+d)|0;n=l+h|0}else n=h;t=t+4|0;de[t>>2]=de[t>>2]&-2;de[x+(c+4)>>2]=n|1;de[x+(n+c)>>2]=n;t=n>>>3;if(n>>>0<256){e=t<<1;i=644+(e<<2)|0;r=de[151]|0;t=1<>2]|0;if(e>>>0>=(de[155]|0)>>>0){I=t;D=e;break}B()}}while(0);de[I>>2]=p;de[D+12>>2]=p;de[x+(c+8)>>2]=D;de[x+(c+12)>>2]=i;break}t=n>>>8;do{if(!t)i=0;else{if(n>>>0>16777215){i=31;break}I=(t+1048320|0)>>>16&8;D=t<>>16&4;D=D<>>16&2;i=14-(M|I|i)+(D<>>15)|0;i=n>>>(i+7|0)&1|i<<1}}while(0);t=908+(i<<2)|0;de[x+(c+28)>>2]=i;de[x+(c+20)>>2]=0;de[x+(c+16)>>2]=0;e=de[152]|0;r=1<>2]=p;de[x+(c+24)>>2]=t;de[x+(c+12)>>2]=p;de[x+(c+8)>>2]=p;break}t=de[t>>2]|0;r:do{if((de[t+4>>2]&-8|0)!=(n|0)){i=n<<((i|0)==31?0:25-(i>>>1)|0);while(1){e=t+16+(i>>>31<<2)|0;r=de[e>>2]|0;if(!r)break;if((de[r+4>>2]&-8|0)==(n|0)){L=r;break r}else{i=i<<1;t=r}}if(e>>>0<(de[155]|0)>>>0)B();else{de[e>>2]=p;de[x+(c+24)>>2]=t;de[x+(c+12)>>2]=p;de[x+(c+8)>>2]=p;break t}}else L=t}while(0);t=L+8|0;e=de[t>>2]|0;D=de[155]|0;if(e>>>0>=D>>>0&L>>>0>=D>>>0){de[e+12>>2]=p;de[t>>2]=p;de[x+(c+8)>>2]=e;de[x+(c+12)>>2]=L;de[x+(c+24)>>2]=0;break}else B()}else{L=(de[154]|0)+h|0;de[154]=L;de[157]=p;de[x+(c+4)>>2]=L|1}}while(0);L=x+(f|8)|0;return L|0}else r=1052;while(1){e=de[r>>2]|0;if(e>>>0<=a>>>0?(t=de[r+4>>2]|0,i=e+t|0,i>>>0>a>>>0):0)break;r=de[r+8>>2]|0}n=e+(t+-39)|0;e=e+(t+-47+((n&7|0)==0?0:0-n&7))|0;n=a+16|0;e=e>>>0>>0?a:e;t=e+8|0;r=x+8|0;r=(r&7|0)==0?0:0-r&7;L=d+-40-r|0;de[157]=x+r;de[154]=L;de[x+(r+4)>>2]=L|1;de[x+(d+-36)>>2]=40;de[158]=de[273];r=e+4|0;de[r>>2]=27;de[t>>2]=de[263];de[t+4>>2]=de[264];de[t+8>>2]=de[265];de[t+12>>2]=de[266];de[263]=x;de[264]=d;de[266]=0;de[265]=t;t=e+28|0;de[t>>2]=7;if((e+32|0)>>>0>>0)do{L=t;t=t+4|0;de[t>>2]=7}while((L+8|0)>>>0>>0);if((e|0)!=(a|0)){o=e-a|0;de[r>>2]=de[r>>2]&-2;de[a+4>>2]=o|1;de[e>>2]=o;t=o>>>3;if(o>>>0<256){e=t<<1;i=644+(e<<2)|0;r=de[151]|0;t=1<>2]|0;if(e>>>0<(de[155]|0)>>>0)B();else{P=t;R=e}}else{de[151]=r|t;P=644+(e+2<<2)|0;R=i}de[P>>2]=a;de[R+12>>2]=a;de[a+8>>2]=R;de[a+12>>2]=i;break}t=o>>>8;if(t)if(o>>>0>16777215)i=31;else{D=(t+1048320|0)>>>16&8;L=t<>>16&4;L=L<>>16&2;i=14-(I|D|i)+(L<>>15)|0;i=o>>>(i+7|0)&1|i<<1}else i=0;r=908+(i<<2)|0;de[a+28>>2]=i;de[a+20>>2]=0;de[n>>2]=0;t=de[152]|0;e=1<>2]=a;de[a+24>>2]=r;de[a+12>>2]=a;de[a+8>>2]=a;break}t=de[r>>2]|0;t:do{if((de[t+4>>2]&-8|0)!=(o|0)){i=o<<((i|0)==31?0:25-(i>>>1)|0);while(1){e=t+16+(i>>>31<<2)|0;r=de[e>>2]|0;if(!r)break;if((de[r+4>>2]&-8|0)==(o|0)){C=r;break t}else{i=i<<1;t=r}}if(e>>>0<(de[155]|0)>>>0)B();else{de[e>>2]=a;de[a+24>>2]=t;de[a+12>>2]=a;de[a+8>>2]=a;break e}}else C=t}while(0);t=C+8|0;e=de[t>>2]|0;L=de[155]|0;if(e>>>0>=L>>>0&C>>>0>=L>>>0){de[e+12>>2]=a;de[t>>2]=a;de[a+8>>2]=e;de[a+12>>2]=C;de[a+24>>2]=0;break}else B()}}else{L=de[155]|0;if((L|0)==0|x>>>0>>0)de[155]=x;de[263]=x;de[264]=d;de[266]=0;de[160]=de[269];de[159]=-1;t=0;do{L=t<<1;D=644+(L<<2)|0;de[644+(L+3<<2)>>2]=D;de[644+(L+2<<2)>>2]=D;t=t+1|0}while((t|0)!=32);L=x+8|0;L=(L&7|0)==0?0:0-L&7;D=d+-40-L|0;de[157]=x+L;de[154]=D;de[x+(L+4)>>2]=D|1;de[x+(d+-36)>>2]=40;de[158]=de[273]}}while(0);t=de[154]|0;if(t>>>0>m>>>0){D=t-m|0;de[154]=D;L=de[157]|0;de[157]=L+m;de[L+(m+4)>>2]=D|1;de[L+4>>2]=m|3;L=L+8|0;return L|0}}L=ie()|0;de[L>>2]=12;L=0;return L|0}function b(e){e=e|0;var t=0,r=0,i=0,n=0,o=0,a=0,s=0,l=0,u=0,h=0,c=0,f=0,p=0,d=0,m=0,_=0,g=0,v=0,y=0;if(!e)return;t=e+-8|0;s=de[155]|0;if(t>>>0>>0)B();r=de[e+-4>>2]|0;i=r&3;if((i|0)==1)B();p=r&-8;m=e+(p+-8)|0;do{if(!(r&1)){t=de[t>>2]|0;if(!i)return;l=-8-t|0;h=e+l|0;c=t+p|0;if(h>>>0>>0)B();if((h|0)==(de[156]|0)){t=e+(p+-4)|0;r=de[t>>2]|0;if((r&3|0)!=3){y=h;o=c;break}de[153]=c;de[t>>2]=r&-2;de[e+(l+4)>>2]=c|1;de[m>>2]=c;return}n=t>>>3;if(t>>>0<256){i=de[e+(l+8)>>2]|0;r=de[e+(l+12)>>2]|0;t=644+(n<<1<<2)|0;if((i|0)!=(t|0)){if(i>>>0>>0)B();if((de[i+12>>2]|0)!=(h|0))B()}if((r|0)==(i|0)){de[151]=de[151]&~(1<>>0>>0)B();t=r+8|0;if((de[t>>2]|0)==(h|0))a=t;else B()}else a=r+8|0;de[i+12>>2]=r;de[a>>2]=i;y=h;o=c;break}a=de[e+(l+24)>>2]|0;i=de[e+(l+12)>>2]|0;do{if((i|0)==(h|0)){r=e+(l+20)|0;t=de[r>>2]|0;if(!t){r=e+(l+16)|0;t=de[r>>2]|0;if(!t){u=0;break}}while(1){i=t+20|0;n=de[i>>2]|0;if(n){t=n;r=i;continue}i=t+16|0;n=de[i>>2]|0;if(!n)break;else{t=n;r=i}}if(r>>>0>>0)B();else{de[r>>2]=0;u=t;break}}else{n=de[e+(l+8)>>2]|0;if(n>>>0>>0)B();t=n+12|0;if((de[t>>2]|0)!=(h|0))B();r=i+8|0;if((de[r>>2]|0)==(h|0)){de[t>>2]=i;de[r>>2]=n;u=i;break}else B()}}while(0);if(a){t=de[e+(l+28)>>2]|0;r=908+(t<<2)|0;if((h|0)==(de[r>>2]|0)){de[r>>2]=u;if(!u){de[152]=de[152]&~(1<>>0<(de[155]|0)>>>0)B();t=a+16|0;if((de[t>>2]|0)==(h|0))de[t>>2]=u;else de[a+20>>2]=u;if(!u){y=h;o=c;break}}r=de[155]|0;if(u>>>0>>0)B();de[u+24>>2]=a;t=de[e+(l+16)>>2]|0;do{if(t)if(t>>>0>>0)B();else{de[u+16>>2]=t;de[t+24>>2]=u;break}}while(0);t=de[e+(l+20)>>2]|0;if(t)if(t>>>0<(de[155]|0)>>>0)B();else{de[u+20>>2]=t;de[t+24>>2]=u;y=h;o=c;break}else{y=h;o=c}}else{y=h;o=c}}else{y=t;o=p}}while(0);if(y>>>0>=m>>>0)B();t=e+(p+-4)|0;r=de[t>>2]|0;if(!(r&1))B();if(!(r&2)){if((m|0)==(de[157]|0)){v=(de[154]|0)+o|0;de[154]=v;de[157]=y;de[y+4>>2]=v|1;if((y|0)!=(de[156]|0))return;de[156]=0;de[153]=0;return}if((m|0)==(de[156]|0)){v=(de[153]|0)+o|0;de[153]=v;de[156]=y;de[y+4>>2]=v|1;de[y+v>>2]=v;return}o=(r&-8)+o|0;n=r>>>3;do{if(r>>>0>=256){a=de[e+(p+16)>>2]|0;t=de[e+(p|4)>>2]|0;do{if((t|0)==(m|0)){r=e+(p+12)|0;t=de[r>>2]|0;if(!t){r=e+(p+8)|0;t=de[r>>2]|0;if(!t){d=0;break}}while(1){i=t+20|0;n=de[i>>2]|0;if(n){t=n;r=i;continue}i=t+16|0;n=de[i>>2]|0;if(!n)break;else{t=n;r=i}}if(r>>>0<(de[155]|0)>>>0)B();else{de[r>>2]=0;d=t;break}}else{r=de[e+p>>2]|0;if(r>>>0<(de[155]|0)>>>0)B();i=r+12|0;if((de[i>>2]|0)!=(m|0))B();n=t+8|0;if((de[n>>2]|0)==(m|0)){de[i>>2]=t;de[n>>2]=r;d=t;break}else B()}}while(0);if(a){t=de[e+(p+20)>>2]|0;r=908+(t<<2)|0;if((m|0)==(de[r>>2]|0)){de[r>>2]=d;if(!d){de[152]=de[152]&~(1<>>0<(de[155]|0)>>>0)B();t=a+16|0;if((de[t>>2]|0)==(m|0))de[t>>2]=d;else de[a+20>>2]=d;if(!d)break}r=de[155]|0;if(d>>>0>>0)B();de[d+24>>2]=a;t=de[e+(p+8)>>2]|0;do{if(t)if(t>>>0>>0)B();else{de[d+16>>2]=t;de[t+24>>2]=d;break}}while(0);t=de[e+(p+12)>>2]|0;if(t)if(t>>>0<(de[155]|0)>>>0)B();else{de[d+20>>2]=t;de[t+24>>2]=d;break}}}else{i=de[e+p>>2]|0;r=de[e+(p|4)>>2]|0;t=644+(n<<1<<2)|0;if((i|0)!=(t|0)){if(i>>>0<(de[155]|0)>>>0)B();if((de[i+12>>2]|0)!=(m|0))B()}if((r|0)==(i|0)){de[151]=de[151]&~(1<>>0<(de[155]|0)>>>0)B();t=r+8|0;if((de[t>>2]|0)==(m|0))f=t;else B()}else f=r+8|0;de[i+12>>2]=r;de[f>>2]=i}}while(0);de[y+4>>2]=o|1;de[y+o>>2]=o;if((y|0)==(de[156]|0)){de[153]=o;return}}else{de[t>>2]=r&-2;de[y+4>>2]=o|1;de[y+o>>2]=o}t=o>>>3;if(o>>>0<256){r=t<<1;n=644+(r<<2)|0;i=de[151]|0;t=1<>2]|0;if(r>>>0<(de[155]|0)>>>0)B();else{_=t;g=r}}else{de[151]=i|t;_=644+(r+2<<2)|0;g=n}de[_>>2]=y;de[g+12>>2]=y;de[y+8>>2]=g;de[y+12>>2]=n;return}t=o>>>8;if(t)if(o>>>0>16777215)n=31;else{_=(t+1048320|0)>>>16&8;g=t<<_;m=(g+520192|0)>>>16&4;g=g<>>16&2;n=14-(m|_|n)+(g<>>15)|0;n=o>>>(n+7|0)&1|n<<1}else n=0;t=908+(n<<2)|0;de[y+28>>2]=n;de[y+20>>2]=0;de[y+16>>2]=0;r=de[152]|0;i=1<>2]|0;t:do{if((de[t+4>>2]&-8|0)!=(o|0)){n=o<<((n|0)==31?0:25-(n>>>1)|0);while(1){r=t+16+(n>>>31<<2)|0;i=de[r>>2]|0;if(!i)break;if((de[i+4>>2]&-8|0)==(o|0)){v=i;break t}else{n=n<<1;t=i}}if(r>>>0<(de[155]|0)>>>0)B();else{de[r>>2]=y;de[y+24>>2]=t;de[y+12>>2]=y;de[y+8>>2]=y;break e}}else v=t}while(0);t=v+8|0;r=de[t>>2]|0;g=de[155]|0;if(r>>>0>=g>>>0&v>>>0>=g>>>0){de[r+12>>2]=y;de[t>>2]=y;de[y+8>>2]=r;de[y+12>>2]=v;de[y+24>>2]=0;break}else B()}else{de[152]=r|i;de[t>>2]=y;de[y+24>>2]=t;de[y+12>>2]=y;de[y+8>>2]=y}}while(0);y=(de[159]|0)+-1|0;de[159]=y;if(!y)t=1060;else return;while(1){t=de[t>>2]|0;if(!t)break;else t=t+8|0}de[159]=-1;return}function Wr(e,t){e=e|0;t=t|0;var r=0,i=0;if(!e){e=Yr(t)|0;return e|0}if(t>>>0>4294967231){e=ie()|0;de[e>>2]=12;e=0;return e|0}r=Vr(e+-8|0,t>>>0<11?16:t+11&-8)|0;if(r){e=r+8|0;return e|0}r=Yr(t)|0;if(!r){e=0;return e|0}i=de[e+-4>>2]|0;i=(i&-8)-((i&3|0)==0?8:4)|0;ei(r|0,e|0,(i>>>0>>0?i:t)|0)|0;b(e);e=r;return e|0}function qr(e){e=e|0;var t=0;if(!e){t=0;return t|0}e=de[e+-4>>2]|0;t=e&3;if((t|0)==1){t=0;return t|0}t=(e&-8)-((t|0)==0?8:4)|0;return t|0}function Vr(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,l=0,u=0,h=0,c=0,f=0,p=0,d=0;p=e+4|0;d=de[p>>2]|0;l=d&-8;h=e+l|0;s=de[155]|0;r=d&3;if(!((r|0)!=1&e>>>0>=s>>>0&e>>>0>>0))B();i=e+(l|4)|0;n=de[i>>2]|0;if(!(n&1))B();if(!r){if(t>>>0<256){e=0;return e|0}if(l>>>0>=(t+4|0)>>>0?(l-t|0)>>>0<=de[271]<<1>>>0:0)return e|0;e=0;return e|0}if(l>>>0>=t>>>0){r=l-t|0;if(r>>>0<=15)return e|0;de[p>>2]=d&1|t|2;de[e+(t+4)>>2]=r|3;de[i>>2]=de[i>>2]|1;Kr(e+t|0,r);return e|0}if((h|0)==(de[157]|0)){r=(de[154]|0)+l|0;if(r>>>0<=t>>>0){e=0;return e|0}f=r-t|0;de[p>>2]=d&1|t|2;de[e+(t+4)>>2]=f|1;de[157]=e+t;de[154]=f;return e|0}if((h|0)==(de[156]|0)){i=(de[153]|0)+l|0;if(i>>>0>>0){e=0;return e|0}r=i-t|0;if(r>>>0>15){de[p>>2]=d&1|t|2;de[e+(t+4)>>2]=r|1;de[e+i>>2]=r;i=e+(i+4)|0;de[i>>2]=de[i>>2]&-2;i=e+t|0}else{de[p>>2]=d&1|i|2;i=e+(i+4)|0;de[i>>2]=de[i>>2]|1;i=0;r=0}de[153]=r;de[156]=i;return e|0}if(n&2){e=0;return e|0}c=(n&-8)+l|0;if(c>>>0>>0){e=0;return e|0}f=c-t|0;o=n>>>3;do{if(n>>>0>=256){a=de[e+(l+24)>>2]|0;o=de[e+(l+12)>>2]|0;do{if((o|0)==(h|0)){i=e+(l+20)|0;r=de[i>>2]|0;if(!r){i=e+(l+16)|0;r=de[i>>2]|0;if(!r){u=0;break}}while(1){n=r+20|0;o=de[n>>2]|0;if(o){r=o;i=n;continue}n=r+16|0;o=de[n>>2]|0;if(!o)break;else{r=o;i=n}}if(i>>>0>>0)B();else{de[i>>2]=0;u=r;break}}else{n=de[e+(l+8)>>2]|0;if(n>>>0>>0)B();r=n+12|0;if((de[r>>2]|0)!=(h|0))B();i=o+8|0;if((de[i>>2]|0)==(h|0)){de[r>>2]=o;de[i>>2]=n;u=o;break}else B()}}while(0);if(a){r=de[e+(l+28)>>2]|0;i=908+(r<<2)|0;if((h|0)==(de[i>>2]|0)){de[i>>2]=u;if(!u){de[152]=de[152]&~(1<>>0<(de[155]|0)>>>0)B();r=a+16|0;if((de[r>>2]|0)==(h|0))de[r>>2]=u;else de[a+20>>2]=u;if(!u)break}i=de[155]|0;if(u>>>0>>0)B();de[u+24>>2]=a;r=de[e+(l+16)>>2]|0;do{if(r)if(r>>>0>>0)B();else{de[u+16>>2]=r;de[r+24>>2]=u;break}}while(0);r=de[e+(l+20)>>2]|0;if(r)if(r>>>0<(de[155]|0)>>>0)B();else{de[u+20>>2]=r;de[r+24>>2]=u;break}}}else{n=de[e+(l+8)>>2]|0;i=de[e+(l+12)>>2]|0;r=644+(o<<1<<2)|0;if((n|0)!=(r|0)){if(n>>>0>>0)B();if((de[n+12>>2]|0)!=(h|0))B()}if((i|0)==(n|0)){de[151]=de[151]&~(1<>>0>>0)B();r=i+8|0;if((de[r>>2]|0)==(h|0))a=r;else B()}else a=i+8|0;de[n+12>>2]=i;de[a>>2]=n}}while(0);if(f>>>0<16){de[p>>2]=c|d&1|2;t=e+(c|4)|0;de[t>>2]=de[t>>2]|1;return e|0}else{de[p>>2]=d&1|t|2;de[e+(t+4)>>2]=f|3;d=e+(c|4)|0;de[d>>2]=de[d>>2]|1;Kr(e+t|0,f);return e|0}return 0}function Kr(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0,a=0,s=0,l=0,u=0,h=0,c=0,f=0,p=0,d=0,m=0,_=0,g=0,v=0;m=e+t|0;r=de[e+4>>2]|0;do{if(!(r&1)){u=de[e>>2]|0;if(!(r&3))return;f=e+(0-u)|0;c=u+t|0;l=de[155]|0;if(f>>>0>>0)B();if((f|0)==(de[156]|0)){i=e+(t+4)|0;r=de[i>>2]|0;if((r&3|0)!=3){v=f;a=c;break}de[153]=c;de[i>>2]=r&-2;de[e+(4-u)>>2]=c|1;de[m>>2]=c;return}o=u>>>3;if(u>>>0<256){n=de[e+(8-u)>>2]|0;i=de[e+(12-u)>>2]|0;r=644+(o<<1<<2)|0;if((n|0)!=(r|0)){if(n>>>0>>0)B();if((de[n+12>>2]|0)!=(f|0))B()}if((i|0)==(n|0)){de[151]=de[151]&~(1<>>0>>0)B();r=i+8|0;if((de[r>>2]|0)==(f|0))s=r;else B()}else s=i+8|0;de[n+12>>2]=i;de[s>>2]=n;v=f;a=c;break}s=de[e+(24-u)>>2]|0;n=de[e+(12-u)>>2]|0;do{if((n|0)==(f|0)){n=16-u|0;i=e+(n+4)|0;r=de[i>>2]|0;if(!r){i=e+n|0;r=de[i>>2]|0;if(!r){h=0;break}}while(1){n=r+20|0;o=de[n>>2]|0;if(o){r=o;i=n;continue}n=r+16|0;o=de[n>>2]|0;if(!o)break;else{r=o;i=n}}if(i>>>0>>0)B();else{de[i>>2]=0;h=r;break}}else{o=de[e+(8-u)>>2]|0;if(o>>>0>>0)B();r=o+12|0;if((de[r>>2]|0)!=(f|0))B();i=n+8|0;if((de[i>>2]|0)==(f|0)){de[r>>2]=n;de[i>>2]=o;h=n;break}else B()}}while(0);if(s){r=de[e+(28-u)>>2]|0;i=908+(r<<2)|0;if((f|0)==(de[i>>2]|0)){de[i>>2]=h;if(!h){de[152]=de[152]&~(1<>>0<(de[155]|0)>>>0)B();r=s+16|0;if((de[r>>2]|0)==(f|0))de[r>>2]=h;else de[s+20>>2]=h;if(!h){v=f;a=c;break}}n=de[155]|0;if(h>>>0>>0)B();de[h+24>>2]=s;r=16-u|0;i=de[e+r>>2]|0;do{if(i)if(i>>>0>>0)B();else{de[h+16>>2]=i;de[i+24>>2]=h;break}}while(0);r=de[e+(r+4)>>2]|0;if(r)if(r>>>0<(de[155]|0)>>>0)B();else{de[h+20>>2]=r;de[r+24>>2]=h;v=f;a=c;break}else{v=f;a=c}}else{v=f;a=c}}else{v=e;a=t}}while(0);l=de[155]|0;if(m>>>0>>0)B();r=e+(t+4)|0;i=de[r>>2]|0;if(!(i&2)){if((m|0)==(de[157]|0)){g=(de[154]|0)+a|0;de[154]=g;de[157]=v;de[v+4>>2]=g|1;if((v|0)!=(de[156]|0))return;de[156]=0;de[153]=0;return}if((m|0)==(de[156]|0)){g=(de[153]|0)+a|0;de[153]=g;de[156]=v;de[v+4>>2]=g|1;de[v+g>>2]=g;return}a=(i&-8)+a|0;o=i>>>3;do{if(i>>>0>=256){s=de[e+(t+24)>>2]|0;n=de[e+(t+12)>>2]|0;do{if((n|0)==(m|0)){i=e+(t+20)|0;r=de[i>>2]|0;if(!r){i=e+(t+16)|0;r=de[i>>2]|0;if(!r){d=0;break}}while(1){n=r+20|0;o=de[n>>2]|0;if(o){r=o;i=n;continue}n=r+16|0;o=de[n>>2]|0;if(!o)break;else{r=o;i=n}}if(i>>>0>>0)B();else{de[i>>2]=0;d=r;break}}else{o=de[e+(t+8)>>2]|0;if(o>>>0>>0)B();r=o+12|0;if((de[r>>2]|0)!=(m|0))B();i=n+8|0;if((de[i>>2]|0)==(m|0)){de[r>>2]=n;de[i>>2]=o;d=n;break}else B()}}while(0);if(s){r=de[e+(t+28)>>2]|0;i=908+(r<<2)|0;if((m|0)==(de[i>>2]|0)){de[i>>2]=d;if(!d){de[152]=de[152]&~(1<>>0<(de[155]|0)>>>0)B();r=s+16|0;if((de[r>>2]|0)==(m|0))de[r>>2]=d;else de[s+20>>2]=d;if(!d)break}i=de[155]|0;if(d>>>0>>0)B();de[d+24>>2]=s;r=de[e+(t+16)>>2]|0;do{if(r)if(r>>>0>>0)B();else{de[d+16>>2]=r;de[r+24>>2]=d;break}}while(0);r=de[e+(t+20)>>2]|0;if(r)if(r>>>0<(de[155]|0)>>>0)B();else{de[d+20>>2]=r;de[r+24>>2]=d;break}}}else{n=de[e+(t+8)>>2]|0;i=de[e+(t+12)>>2]|0;r=644+(o<<1<<2)|0;if((n|0)!=(r|0)){if(n>>>0>>0)B();if((de[n+12>>2]|0)!=(m|0))B()}if((i|0)==(n|0)){de[151]=de[151]&~(1<>>0>>0)B();r=i+8|0;if((de[r>>2]|0)==(m|0))p=r;else B()}else p=i+8|0;de[n+12>>2]=i;de[p>>2]=n}}while(0);de[v+4>>2]=a|1;de[v+a>>2]=a;if((v|0)==(de[156]|0)){de[153]=a;return}}else{de[r>>2]=i&-2;de[v+4>>2]=a|1;de[v+a>>2]=a}r=a>>>3;if(a>>>0<256){i=r<<1;o=644+(i<<2)|0;n=de[151]|0;r=1<>2]|0;if(i>>>0<(de[155]|0)>>>0)B();else{_=r;g=i}}else{de[151]=n|r;_=644+(i+2<<2)|0;g=o}de[_>>2]=v;de[g+12>>2]=v;de[v+8>>2]=g;de[v+12>>2]=o;return}r=a>>>8;if(r)if(a>>>0>16777215)o=31;else{_=(r+1048320|0)>>>16&8;g=r<<_;m=(g+520192|0)>>>16&4;g=g<>>16&2;o=14-(m|_|o)+(g<>>15)|0;o=a>>>(o+7|0)&1|o<<1}else o=0;r=908+(o<<2)|0;de[v+28>>2]=o;de[v+20>>2]=0;de[v+16>>2]=0;i=de[152]|0;n=1<>2]=v;de[v+24>>2]=r;de[v+12>>2]=v;de[v+8>>2]=v;return}r=de[r>>2]|0;e:do{if((de[r+4>>2]&-8|0)!=(a|0)){o=a<<((o|0)==31?0:25-(o>>>1)|0);while(1){i=r+16+(o>>>31<<2)|0;n=de[i>>2]|0;if(!n)break;if((de[n+4>>2]&-8|0)==(a|0)){r=n;break e}else{o=o<<1;r=n}}if(i>>>0<(de[155]|0)>>>0)B();de[i>>2]=v;de[v+24>>2]=r;de[v+12>>2]=v;de[v+8>>2]=v;return}}while(0);i=r+8|0;n=de[i>>2]|0;g=de[155]|0;if(!(n>>>0>=g>>>0&r>>>0>=g>>>0))B();de[n+12>>2]=v;de[i>>2]=v;de[v+8>>2]=n;de[v+12>>2]=r;de[v+24>>2]=0}function Jr(){}function se(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;i=t-i-(r>>>0>e>>>0|0)>>>0;return(re=i,e-r>>>0|0)|0}function G(e,t,r){e=e|0;t=t|0;r=r|0;var i=0,n=0,o=0,a=0;i=e+r|0;if((r|0)>=20){t=t&255;o=e&3;a=t|t<<8|t<<16|t<<24;n=i&~3;if(o){o=e+4-o|0;while((e|0)<(o|0)){pe[e>>0]=t;e=e+1|0}}while((e|0)<(n|0)){de[e>>2]=a;e=e+4|0}}while((e|0)<(i|0)){pe[e>>0]=t;e=e+1|0}return e-r|0}function Zr(e,t,r){e=e|0;t=t|0;r=r|0;if((r|0)<32){re=t>>>r;return e>>>r|(t&(1<>>r-32|0}function Qr(e,t,r){e=e|0;t=t|0;r=r|0;if((r|0)<32){re=t<>>32-r;return e<>>0;return(re=t+i+(r>>>0>>0|0)>>>0,r|0)|0}function ei(e,t,r){e=e|0;t=t|0;r=r|0;var i=0;if((r|0)>=4096)return Qe(e|0,t|0,r|0)|0;i=e|0;if((e&3)==(t&3)){while(e&3){if(!r)return i|0;pe[e>>0]=pe[t>>0]|0;e=e+1|0;t=t+1|0;r=r-1|0}while((r|0)>=4){de[e>>2]=de[t>>2];e=e+4|0;t=t+4|0;r=r-4|0}}while((r|0)>0){pe[e>>0]=pe[t>>0]|0;e=e+1|0;t=t+1|0;r=r-1|0}return i|0}function ti(e,t,r){e=e|0;t=t|0;r=r|0;if((r|0)<32){re=t>>r;return}re=(t|0)<0?-1:0}function ri(e){e=e|0;var t=0;t=pe[w+(e&255)>>0]|0;if((t|0)<8)return t|0;t=pe[w+(e>>8&255)>>0]|0;if((t|0)<8)return t+8|0;t=pe[w+(e>>16&255)>>0]|0;if((t|0)<8)return t+16|0;return(pe[w+(e>>>24)>>0]|0)+24|0}function ii(e,t){e=e|0;t=t|0;var r=0,i=0,n=0,o=0;o=e&65535;n=t&65535;r=ve(n,o)|0;i=e>>>16;e=(r>>>16)+(ve(n,i)|0)|0;n=t>>>16;t=ve(n,o)|0;return(re=(e>>>16)+(ve(n,i)|0)+(((e&65535)+t|0)>>>16)|0,e+t<<16|r&65535|0)|0}function ni(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,o=0,a=0,s=0,l=0,u=0;u=t>>31|((t|0)<0?-1:0)<<1;l=((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1;o=i>>31|((i|0)<0?-1:0)<<1;n=((i|0)<0?-1:0)>>31|((i|0)<0?-1:0)<<1;s=se(u^e,l^t,u,l)|0;a=re;e=o^u;t=n^l;se((ui(s,a,se(o^r,n^i,o,n)|0,re,0)|0)^e,re^t,e,t)}function oi(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,o=0,a=0,s=0,l=0,u=0;n=ge;ge=ge+16|0;s=n|0;a=t>>31|((t|0)<0?-1:0)<<1;o=((t|0)<0?-1:0)>>31|((t|0)<0?-1:0)<<1;u=i>>31|((i|0)<0?-1:0)<<1;l=((i|0)<0?-1:0)>>31|((i|0)<0?-1:0)<<1;e=se(a^e,o^t,a,o)|0;t=re;ui(e,t,se(u^r,l^i,u,l)|0,re,s)|0;i=se(de[s>>2]^a,de[s+4>>2]^o,a,o)|0;r=re;ge=n;re=r}function ai(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,o=0;n=e;o=r;r=ii(n,o)|0;e=re;re=(ve(t,o)|0)+(ve(i,n)|0)+e|e&0}function si(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;return ui(e,t,r,i,0)|0}function li(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;var n=0,o=0;o=ge;ge=ge+16|0;n=o|0;ui(e,t,r,i,n)|0;ge=o;return(re=de[n+4>>2]|0,de[n>>2]|0)|0}function ui(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;var o=0,a=0,s=0,l=0,u=0,h=0,c=0,f=0,p=0,d=0;h=e;l=t;u=l;a=r;f=i;s=f;if(!u){o=(n|0)!=0;if(!s){if(o){de[n>>2]=(h>>>0)%(a>>>0);de[n+4>>2]=0}f=0;n=(h>>>0)/(a>>>0)>>>0;return(re=f,n)|0}else{if(!o){f=0;n=0;return(re=f,n)|0}de[n>>2]=e|0;de[n+4>>2]=t&0;f=0;n=0;return(re=f,n)|0}}o=(s|0)==0;do{if(a){if(!o){o=(m(s|0)|0)-(m(u|0)|0)|0;if(o>>>0<=31){c=o+1|0;s=31-o|0;t=o-31>>31;a=c;e=h>>>(c>>>0)&t|u<>>(c>>>0)&t;o=0;s=h<>2]=e|0;de[n+4>>2]=l|t&0;f=0;n=0;return(re=f,n)|0}o=a-1|0;if(o&a){s=(m(a|0)|0)+33-(m(u|0)|0)|0;d=64-s|0;c=32-s|0;l=c>>31;p=s-32|0;t=p>>31;a=s;e=c-1>>31&u>>>(p>>>0)|(u<>>(s>>>0))&t;t=t&u>>>(s>>>0);o=h<>>(p>>>0))&l|h<>31;break}if(n){de[n>>2]=o&h;de[n+4>>2]=0}if((a|0)==1){p=l|t&0;d=e|0|0;return(re=p,d)|0}else{d=ri(a|0)|0;p=u>>>(d>>>0)|0;d=u<<32-d|h>>>(d>>>0)|0;return(re=p,d)|0}}else{if(o){if(n){de[n>>2]=(u>>>0)%(a>>>0);de[n+4>>2]=0}p=0;d=(u>>>0)/(a>>>0)>>>0;return(re=p,d)|0}if(!h){if(n){de[n>>2]=0;de[n+4>>2]=(u>>>0)%(s>>>0)}p=0;d=(u>>>0)/(s>>>0)>>>0;return(re=p,d)|0}o=s-1|0;if(!(o&s)){if(n){de[n>>2]=e|0;de[n+4>>2]=o&u|t&0}p=0;d=u>>>((ri(s|0)|0)>>>0);return(re=p,d)|0}o=(m(s|0)|0)-(m(u|0)|0)|0;if(o>>>0<=30){t=o+1|0;s=31-o|0;a=t;e=u<>>(t>>>0);t=u>>>(t>>>0);o=0;s=h<>2]=e|0;de[n+4>>2]=l|t&0;p=0;d=0;return(re=p,d)|0}}while(0);if(!a){u=s;l=0;s=0}else{c=r|0|0;h=f|i&0;u=$r(c|0,h|0,-1,-1)|0;r=re;l=s;s=0;do{i=l;l=o>>>31|l<<1;o=s|o<<1;i=e<<1|i>>>31|0;f=e>>>31|t<<1|0;se(u,r,i,f)|0;d=re;p=d>>31|((d|0)<0?-1:0)<<1;s=p&1;e=se(i,f,p&c,(((d|0)<0?-1:0)>>31|((d|0)<0?-1:0)<<1)&h)|0;t=re;a=a-1|0}while((a|0)!=0);u=l;l=0}a=0;if(n){de[n>>2]=e;de[n+4>>2]=t}p=(o|0)>>>31|(u|a)<<1|(a<<1|o>>>31)&0|l;d=(o<<1|0>>>31)&-2|s;return(re=p,d)|0}function hi(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;return v[e&7](t|0,r|0,i|0)|0}function ci(e,t,r,i,n,o){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;Oi[e&3](t|0,r|0,i|0,n|0,o|0)}function fi(e,t){e=e|0;t=t|0;Pi[e&7](t|0)}function pi(e,t){e=e|0;t=t|0;return Ri[e&1](t|0)|0}function di(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;Ci[e&0](t|0,r|0,i|0)}function mi(e){e=e|0;Mi[e&3]()}function _i(e,t,r,i,n,o,a){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;a=a|0;Ii[e&3](t|0,r|0,i|0,n|0,o|0,a|0)}function gi(e,t,r,i,n,o){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;return X[e&1](t|0,r|0,i|0,n|0,o|0)|0}function vi(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;Di[e&3](t|0,r|0,i|0,n|0)}function yi(e,t,r){e=e|0;t=t|0;r=r|0;a(0);return 0}function bi(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;a(1)}function xi(e){e=e|0;a(2)}function Ti(e){e=e|0;a(3);return 0}function wi(e,t,r){e=e|0;t=t|0;r=r|0;a(4)}function Ei(){a(5)}function Si(e,t,r,i,n,o){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;o=o|0;a(6)}function Ai(e,t,r,i,n){e=e|0;t=t|0;r=r|0;i=i|0;n=n|0;a(7);return 0}function ki(e,t,r,i){e=e|0;t=t|0;r=r|0;i=i|0;a(8)}var v=[yi,ar,Xr,Fr,Lr,Nr,yi,yi];var Oi=[bi,pr,fr,bi];var Pi=[xi,tr,nr,rr,ir,or,br,Gr];var Ri=[Ti,Dr];var Ci=[wi];var Mi=[Ei,vr,yr,Ei];var Ii=[Si,mr,dr,Si];var X=[Ai,St];var Di=[ki,lr,ur,ki];return{___cxa_can_catch:_r,_crn_get_levels:Ft,_crn_get_uncompressed_size:zt,_crn_decompress:Bt,_i64Add:$r,_crn_get_width:Dt,___cxa_is_pointer_type:gr,_i64Subtract:se,_memset:G,_malloc:Yr,_free:b,_memcpy:ei,_bitshift64Lshr:Zr,_fflush:kr,_bitshift64Shl:Qr,_crn_get_height:Lt,___errno_location:ie,_crn_get_dxt_format:Nt,runPostSets:Jr,_emscripten_replace_memory:pt,stackAlloc:dt,stackSave:mt,stackRestore:_t,establishStackSpace:gt,setThrew:vt,setTempRet0:xt,getTempRet0:Tt,dynCall_iiii:hi,dynCall_viiiii:ci,dynCall_vi:fi,dynCall_ii:pi,dynCall_viii:di,dynCall_v:mi,dynCall_viiiiii:_i,dynCall_iiiiii:gi,dynCall_viiii:vi}}(e.Ya,e.Za,buffer)),zc=(e.___cxa_can_catch=Z.___cxa_can_catch,e._crn_get_levels=Z._crn_get_levels,e.runPostSets=Z.runPostSets,e._crn_get_uncompressed_size=Z._crn_get_uncompressed_size,e._crn_decompress=Z._crn_decompress,e._i64Add=Z._i64Add),nb=(e._crn_get_height=Z._crn_get_height,e.___cxa_is_pointer_type=Z.___cxa_is_pointer_type,e._i64Subtract=Z._i64Subtract),qb=e._memset=Z._memset,Ea=e._malloc=Z._malloc,Bc=e._memcpy=Z._memcpy,Xa=e._emscripten_replace_memory=Z._emscripten_replace_memory,rb=(e._crn_get_dxt_format=Z._crn_get_dxt_format,e._bitshift64Lshr=Z._bitshift64Lshr),Na=e._free=Z._free,sb=(e._fflush=Z._fflush,e._crn_get_width=Z._crn_get_width,e.___errno_location=Z.___errno_location,e._bitshift64Shl=Z._bitshift64Shl);function ia(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}e.dynCall_iiii=Z.dynCall_iiii,e.dynCall_viiiii=Z.dynCall_viiiii,e.dynCall_vi=Z.dynCall_vi,e.dynCall_ii=Z.dynCall_ii,e.dynCall_viii=Z.dynCall_viii,e.dynCall_v=Z.dynCall_v,e.dynCall_viiiiii=Z.dynCall_viiiiii,e.dynCall_iiiiii=Z.dynCall_iiiiii,e.dynCall_viiii=Z.dynCall_viiii,n.aa=Z.stackAlloc,n.ua=Z.stackSave,n.ba=Z.stackRestore,n.Cd=Z.establishStackSpace,n.rb=Z.setTempRet0,n.fb=Z.getTempRet0,ia.prototype=Error(),ia.prototype.constructor=ia;var rd=null,jb=function t(){e.calledRun||td(),e.calledRun||(jb=t)};function td(t){function r(){if(!e.calledRun&&(e.calledRun=!0,!na)){if(Ha||(Ha=!0,ab(cb)),ab(db),e.onRuntimeInitialized&&e.onRuntimeInitialized(),e._main&&vd&&e.callMain(t),e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;)gb(e.postRun.shift());ab(eb)}}if(t=t||e.arguments,null===rd&&(rd=Date.now()),!(0>8&255,e>>16&255,e>>24&255)}!function(s){s.loadFromArrayBuffer=function(e,t,r){return new i(t).loadFromArrayBuffer(e,r)};l=PIXI.resources.Resource,__extends(e,l),e.prototype.init=function(e,t,r,i,n,o,a){void 0===i&&(i=-1),void 0===n&&(n=-1),this.src=e,this.resize(i,n),this._width=i,this._height=n,this.data=t,this.type=r,this.levels=o,this.internalFormat=a;e=this.complete;return this.complete=!!t,!e&&this.complete&&this.onload&&this.onload({target:this}),this.update(),this},e.prototype.dispose=function(){this.data=null},e.prototype.bind=function(e){void 0!==e.alphaMode?e.alphaMode=PIXI.ALPHA_MODES.NO_PREMULTIPLIED_ALPHA:e.premultiplyAlpha=!1,l.prototype.bind.call(this,e)},e.prototype.upload=function(e,t,r){var i=e.state.gl;if(r.compressed=!1,e.texture.initCompressed(),null===this.data)throw"Trying to create a second (or more) webgl texture from the same CompressedImage : "+this.src;for(var n=this.levels,o=this.width,a=this.height,s=0,l=0;l>=1)<1&&(o=1),(a>>=1)<1&&(a=1),s+=u}return this._internalLoader.free(),this.preserveSource||(this.data=null),!0},e.prototype.style=function(e,t,r){var e=e.state.gl,i=this.levels;return t.scaleMode===PIXI.SCALE_MODES.LINEAR?1>2)*(t+3>>2)*8;case 33778:case 33779:case 35987:case 34798:return(e+3>>2)*(t+3>>2)*16;default:return 0}},h.type="DDS",h);function h(e){return r.call(this,e)||this}e.DDSLoader=i}(pixi_compressed_textures=pixi_compressed_textures||{}),!function(e){(r={})[0]=35841,r[1]=35843,r[2]=35840,r[3]=35842,r[6]=36196,r[7]=33776,r[9]=33778,r[5]=33779;var t,a=r,r=(t=e.AbstractInternalLoader,__extends(s,t),s.prototype.load=function(e){var t,r,i,n,o;if(s.test(e))return t=(o=new Int32Array(e,0,13))[2],t=a[t]||-1,r=o[7],i=o[6],n=o[11],o=o[12]+52,e=new Uint8Array(e,o),o=this._image,this._format=t,o.init(o.src,e,"PVR",r,i,n,t),o;throw"Invalid magic number in PVR header"},s.test=function(e){return 55727696===new Int32Array(e,0,1)[0]},s.prototype.levelBufferSize=function(e,t,r){switch(void 0===r&&(r=0),this._format){case 33776:case 36196:return(e+3>>2)*(t+3>>2)*8;case 33778:case 33779:return(e+3>>2)*(t+3>>2)*16;case 35840:case 35842:return Math.floor((Math.max(e,8)*Math.max(t,8)*4+7)/8);case 35841:case 35843:return Math.floor((Math.max(e,16)*Math.max(t,8)*2+7)/8);default:return 0}},s.type="PVR",s);function s(e){return t.call(this,e)||this}e.PVRTCLoader=r}(pixi_compressed_textures=pixi_compressed_textures||{}),!function(l){var e,t,r=0,i=2,n=3,o=8,a=9,s=10,u=11,h=((e={})[3]=!0,e[9]=!0,e[10]=!0,e[11]=!0,e),c=((e={})[u]=-1,e[r]=36196,e[i]=33776,e[n]=33779,e[o]=35840,e[a]=35842,e[s]=37808,e),f=Object.keys(c).reduce(function(e,t){return e[c[+t]]=+t,e},{}),u=(t=l.AbstractInternalLoader,__extends(p,t),p.test=function(e){var e=1262195===new Uint32Array(e,0,1)[0]&&!!p.BASIS_BINDING,t=p.RGB_FORMAT&&p.RGBA_FORMAT;return!e&&t&&console.warn("[BASIS LOADER] Is Supported, but transcoder not binded or file is not BASIS file!"),t&&e},p.bindTranscoder=function(e,r){if(!e||!r)throw"Invalid state! undef fileCtr or ext invalid!";var t,i=Object.keys(r).reduce(function(e,t){t=r[t];return t?Object.assign(e,t.__proto__):e},{}),n=void 0,o=void 0;for(t in i){var a,s=i[t];void 0!==f[s]&&(a=f[s],h[a]?o={native:s,name:t,basis:a}:n={native:s,name:t,basis:a})}p.RGB_FORMAT=n||o,p.RGBA_FORMAT=o||n,p.BASIS_BINDING=e,console.log("[BASISLoader] Supported formats:","\nRGB:"+p.RGB_FORMAT.name+"\nRGBA:"+p.RGBA_FORMAT.name),l.RegisterCompressedLoader(p),l.RegisterCompressedExtensions("basis")},p.prototype.load=function(e){if(p.test(e))return this._loadAsync(e),this._image;throw"BASIS Transcoder not binded or transcoding not supported =(!"},p.prototype._loadAsync=function(e){var t=performance.now(),e=new p.BASIS_BINDING(new Uint8Array(e)),r=e.getImageWidth(0,0),i=e.getImageHeight(0,0),n=e.getHasAlpha(),o=this._image;if(!e.startTranscoding())throw"Transcoding error!";var n=n?p.RGBA_FORMAT:p.RGB_FORMAT,a=(console.log("Grats! BASIS will be transcoded to:",n),new Uint8Array(e.getImageTranscodedSizeInBytes(0,0,n.basis)));if(!e.transcodeImage(a,0,0,n.basis,!1,!1))throw"Transcoding error!";console.log("[BASISLoader] Totla transcoding time:",performance.now()-t),this._format=n.native,this._file=e;t=n.name.replace("COMPRESSED_","");return Promise.resolve(o.init(o.src,a,"BASIS|"+t,r,i,1,n.native))},p.prototype.levelBufferSize=function(e,t,r){return this._file?this._file.getImageTranscodedSizeInBytes(0,r,f[this._format]):void 0},p.BASIS_BINDING=void 0,p);function p(e){e=t.call(this,e)||this;return e.type="BASIS",e._file=void 0,e}l.BASISLoader=u}(pixi_compressed_textures=pixi_compressed_textures||{}),!function(i){var g=window.CRN_Module;var t,v=[33776,33778,33779],e=(t=i.AbstractInternalLoader,__extends(r,t),r.prototype.load=function(e){for(var t=e.byteLength,e=new Uint8Array(e),r=g._malloc(t),i=e,n=g.HEAPU8,o=r,a=t,s=o/4,e=a%4,l=new Uint32Array(i.buffer,0,(a-e)/4),u=new Uint32Array(n.buffer),h=0;hn.count))return e=new a,n.workers.push(e),e.init(t,r).then(function(){r=e.binary,i()})}var n=this,o=0;return i().then(function(){return n})},r.prototype.transcode=function(t,r){var n,o,a,s;if(this.workers&&this.workers.length)return n=this.workers,o=void 0,a=0,s=function(e){for(var t=0,r=n;t>0,i=e[t];e[t]=e[r],e[r]=i}},E.prototype._randomizeOffsets=function(){for(var e=0;e>0,e,1+a>>0),i+=a}t.baseTexture.update(),this.uniforms.displacementMap=t},Object.defineProperty(E.prototype,"sizes",{get:function(){return this._sizes},set:function(e){for(var t=Math.min(this._slices,e.length),r=0;r>0)},Object.defineProperty(x.prototype,"offset",{get:function(){return this.uniforms.uOffset},set:function(e){this.uniforms.uOffset=e},enumerable:!1,configurable:!0}),x),Ge=(t(b,$=s.Filter),Object.defineProperty(b.prototype,"replacements",{get:function(){return this._replacements},set:function(e){var t=this.uniforms.originalColors,r=this.uniforms.targetColors,i=e.length;if(i>this._maxColors)throw new Error("Length of replacements ("+i+") exceeds the maximum colors length ("+this._maxColors+")");t[3*i]=-1;for(var n=0;n= 0.0 && dist > radius) { // radius < 0 means it's infinity\n delta = dist - radius;\n gap = gradient;\n }\n\n if (delta > 0.0) {\n float normalCount = gap / filterArea.x;\n delta = (normalCount - delta) / normalCount;\n countLimit *= delta;\n strength *= delta;\n if (countLimit < 1.0)\n {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n }\n\n // randomize the lookup values to hide the fixed number of samples\n float offset = rand(vTextureCoord, 0.0);\n\n float total = 0.0;\n vec4 color = vec4(0.0);\n\n dir *= strength;\n\n for (float t = 0.0; t < MAX_KERNEL_SIZE; t++) {\n float percent = (t + offset) / MAX_KERNEL_SIZE;\n float weight = 4.0 * (percent - percent * percent);\n vec2 p = vTextureCoord + dir * percent;\n vec4 sample = texture2D(uSampler, p);\n\n // switch to pre-multiplied alpha to correctly blur transparent images\n // sample.rgb *= sample.a;\n\n color += sample * weight;\n total += weight;\n\n if (t > countLimit){\n break;\n }\n }\n\n color /= total;\n // switch back from pre-multiplied alpha\n // color.rgb /= color.a + 0.00001;\n\n gl_FragColor = color;\n}\n".replace("${maxKernelSize}",t.toFixed(1)))||this;return Object.assign(t,e),t}function i(e){var t=j.call(this,f,"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float radius;\nuniform float angle;\nuniform vec2 offset;\nuniform vec4 filterArea;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvec2 twist(vec2 coord)\n{\n coord -= offset;\n\n float dist = length(coord);\n\n if (dist < radius)\n {\n float ratioDist = (radius - dist) / radius;\n float angleMod = ratioDist * ratioDist * angle;\n float s = sin(angleMod);\n float c = cos(angleMod);\n coord = vec2(coord.x * c - coord.y * s, coord.x * s + coord.y * c);\n }\n\n coord += offset;\n\n return coord;\n}\n\nvoid main(void)\n{\n\n vec2 coord = mapCoord(vTextureCoord);\n\n coord = twist(coord);\n\n coord = unmapCoord(coord);\n\n gl_FragColor = texture2D(uSampler, coord );\n\n}\n")||this;return Object.assign(t,i.defaults,e),t}function n(e,t,r,i){void 0===e&&(e=100),void 0===t&&(t=600);var n=U.call(this)||this;return n.tiltShiftXFilter=new Qe(e,t,r,i),n.tiltShiftYFilter=new $e(e,t,r,i),n}function it(){return null!==G&&G.apply(this,arguments)||this}function nt(){return null!==X&&X.apply(this,arguments)||this}function o(e,t,r,i){void 0===e&&(e=100),void 0===t&&(t=600);var n=H.call(this,f,"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float blur;\nuniform float gradientBlur;\nuniform vec2 start;\nuniform vec2 end;\nuniform vec2 delta;\nuniform vec2 texSize;\n\nfloat random(vec3 scale, float seed)\n{\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n}\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n float total = 0.0;\n\n float offset = random(vec3(12.9898, 78.233, 151.7182), 0.0);\n vec2 normal = normalize(vec2(start.y - end.y, end.x - start.x));\n float radius = smoothstep(0.0, 1.0, abs(dot(vTextureCoord * texSize - start, normal)) / gradientBlur) * blur;\n\n for (float t = -30.0; t <= 30.0; t++)\n {\n float percent = (t + offset - 0.5) / 30.0;\n float weight = 1.0 - abs(percent);\n vec4 sample = texture2D(uSampler, vTextureCoord + delta / texSize * percent * radius);\n sample.rgb *= sample.a;\n color += sample * weight;\n total += weight;\n }\n\n color /= total;\n color.rgb /= color.a + 0.00001;\n\n gl_FragColor = color;\n}\n")||this;return n.uniforms.blur=e,n.uniforms.gradientBlur=t,n.uniforms.start=r||new l.Point(0,window.innerHeight/2),n.uniforms.end=i||new l.Point(600,window.innerHeight/2),n.uniforms.delta=new l.Point(30,30),n.uniforms.texSize=new l.Point(window.innerWidth,window.innerHeight),n.updateDelta(),n}function a(e,t,r){void 0===t&&(t=0),void 0===r&&(r=1);var i=Y.call(this,f,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform sampler2D uLightmap;\nuniform vec4 filterArea;\nuniform vec2 dimensions;\nuniform vec4 ambientColor;\nvoid main() {\n vec4 diffuseColor = texture2D(uSampler, vTextureCoord);\n vec2 lightCoord = (vTextureCoord * filterArea.xy) / dimensions;\n vec4 light = texture2D(uLightmap, lightCoord);\n vec3 ambient = ambientColor.rgb * ambientColor.a;\n vec3 intensity = ambient + light.rgb;\n vec3 finalColor = diffuseColor.rgb * intensity;\n gl_FragColor = vec4(finalColor, diffuseColor.a);\n}\n")||this;return i._color=0,i.uniforms.dimensions=new Float32Array(2),i.uniforms.ambientColor=new Float32Array([0,0,0,r]),i.texture=e,i.color=t,i}function d(e,t,r){void 0===e&&(e=[0,0]),void 0===r&&(r=0);var i=W.call(this,f,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\n\nuniform vec2 center;\n\nuniform float amplitude;\nuniform float wavelength;\n// uniform float power;\nuniform float brightness;\nuniform float speed;\nuniform float radius;\n\nuniform float time;\n\nconst float PI = 3.14159;\n\nvoid main()\n{\n float halfWavelength = wavelength * 0.5 / filterArea.x;\n float maxRadius = radius / filterArea.x;\n float currentRadius = time * speed / filterArea.x;\n\n float fade = 1.0;\n\n if (maxRadius > 0.0) {\n if (currentRadius > maxRadius) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n fade = 1.0 - pow(currentRadius / maxRadius, 2.0);\n }\n\n vec2 dir = vec2(vTextureCoord - center / filterArea.xy);\n dir.y *= filterArea.y / filterArea.x;\n float dist = length(dir);\n\n if (dist <= 0.0 || dist < currentRadius - halfWavelength || dist > currentRadius + halfWavelength) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n\n vec2 diffUV = normalize(dir);\n\n float diff = (dist - currentRadius) / halfWavelength;\n\n float p = 1.0 - pow(abs(diff), 2.0);\n\n // float powDiff = diff * pow(p, 2.0) * ( amplitude * fade );\n float powDiff = 1.25 * sin(diff * PI) * p * ( amplitude * fade );\n\n vec2 offset = diffUV * powDiff / filterArea.xy;\n\n // Do clamp :\n vec2 coord = vTextureCoord + offset;\n vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw);\n vec4 color = texture2D(uSampler, clampedCoord);\n if (coord != clampedCoord) {\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\n }\n\n // No clamp :\n // gl_FragColor = texture2D(uSampler, vTextureCoord + offset);\n\n color.rgb *= 1.0 + (brightness - 1.0) * p * fade;\n\n gl_FragColor = color;\n}\n")||this;return i.center=e,Object.assign(i,d.defaults,t),i.time=r,i}function m(e,t,r){void 0===e&&(e=[-10,0]),void 0===t&&(t=[0,10]),void 0===r&&(r=[0,0]);var i=q.call(this,f,"precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec2 red;\nuniform vec2 green;\nuniform vec2 blue;\n\nvoid main(void)\n{\n gl_FragColor.r = texture2D(uSampler, vTextureCoord + red/filterArea.xy).r;\n gl_FragColor.g = texture2D(uSampler, vTextureCoord + green/filterArea.xy).g;\n gl_FragColor.b = texture2D(uSampler, vTextureCoord + blue/filterArea.xy).b;\n gl_FragColor.a = texture2D(uSampler, vTextureCoord).a;\n}\n")||this;return i.red=e,i.green=t,i.blue=r,i}function _(e){var t=V.call(this,f,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\n\nuniform bool mirror;\nuniform float boundary;\nuniform vec2 amplitude;\nuniform vec2 waveLength;\nuniform vec2 alpha;\nuniform float time;\n\nfloat rand(vec2 co) {\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main(void)\n{\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\n vec2 coord = pixelCoord / dimensions;\n\n if (coord.y < boundary) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n return;\n }\n\n float k = (coord.y - boundary) / (1. - boundary + 0.0001);\n float areaY = boundary * dimensions.y / filterArea.y;\n float v = areaY + areaY - vTextureCoord.y;\n float y = mirror ? v : vTextureCoord.y;\n\n float _amplitude = ((amplitude.y - amplitude.x) * k + amplitude.x ) / filterArea.x;\n float _waveLength = ((waveLength.y - waveLength.x) * k + waveLength.x) / filterArea.y;\n float _alpha = (alpha.y - alpha.x) * k + alpha.x;\n\n float x = vTextureCoord.x + cos(v * 6.28 / _waveLength - time) * _amplitude;\n x = clamp(x, filterClamp.x, filterClamp.z);\n\n vec4 color = texture2D(uSampler, vec2(x, y));\n\n gl_FragColor = color * _alpha;\n}\n")||this;return t.time=0,t.uniforms.amplitude=new Float32Array(2),t.uniforms.waveLength=new Float32Array(2),t.uniforms.alpha=new Float32Array(2),t.uniforms.dimensions=new Float32Array(2),Object.assign(t,_.defaults,e),t}function g(e,t,r,i){void 0===e&&(e=0),void 0===t&&(t=[0,0]),void 0===r&&(r=5),void 0===i&&(i=-1);var n=K.call(this,f,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\nuniform float uRadian;\nuniform vec2 uCenter;\nuniform float uRadius;\nuniform int uKernelSize;\n\nconst int MAX_KERNEL_SIZE = 2048;\n\nvoid main(void)\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n\n if (uKernelSize == 0)\n {\n gl_FragColor = color;\n return;\n }\n\n float aspect = filterArea.y / filterArea.x;\n vec2 center = uCenter.xy / filterArea.xy;\n float gradient = uRadius / filterArea.x * 0.3;\n float radius = uRadius / filterArea.x - gradient * 0.5;\n int k = uKernelSize - 1;\n\n vec2 coord = vTextureCoord;\n vec2 dir = vec2(center - coord);\n float dist = length(vec2(dir.x, dir.y * aspect));\n\n float radianStep = uRadian;\n if (radius >= 0.0 && dist > radius) {\n float delta = dist - radius;\n float gap = gradient;\n float scale = 1.0 - abs(delta / gap);\n if (scale <= 0.0) {\n gl_FragColor = color;\n return;\n }\n radianStep *= scale;\n }\n radianStep /= float(k);\n\n float s = sin(radianStep);\n float c = cos(radianStep);\n mat2 rotationMatrix = mat2(vec2(c, -s), vec2(s, c));\n\n for(int i = 0; i < MAX_KERNEL_SIZE - 1; i++) {\n if (i == k) {\n break;\n }\n\n coord -= center;\n coord.y *= aspect;\n coord = rotationMatrix * coord;\n coord.y /= aspect;\n coord += center;\n\n vec4 sample = texture2D(uSampler, coord);\n\n // switch to pre-multiplied alpha to correctly blur transparent images\n // sample.rgb *= sample.a;\n\n color += sample;\n }\n\n gl_FragColor = color / float(uKernelSize);\n}\n")||this;return n._angle=0,n.angle=e,n.center=t,n.kernelSize=r,n.radius=i,n}function ot(e){void 0===e&&(e=10);var t=J.call(this,f,"precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform vec2 size;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvec2 pixelate(vec2 coord, vec2 size)\n{\n\treturn floor( coord / size ) * size;\n}\n\nvoid main(void)\n{\n vec2 coord = mapCoord(vTextureCoord);\n\n coord = pixelate(coord, size);\n\n coord = unmapCoord(coord);\n\n gl_FragColor = texture2D(uSampler, coord);\n}\n")||this;return t.size=e,t}function v(e,t,r){void 0===e&&(e=1),void 0===t&&(t=0);var i=Z.call(this,f,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec2 thickness;\nuniform vec4 outlineColor;\nuniform vec4 filterClamp;\n\nconst float DOUBLE_PI = 3.14159265358979323846264 * 2.;\n\nvoid main(void) {\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\n vec4 curColor;\n float maxAlpha = 0.;\n vec2 displaced;\n for (float angle = 0.; angle <= DOUBLE_PI; angle += ${angleStep}) {\n displaced.x = vTextureCoord.x + thickness.x * cos(angle);\n displaced.y = vTextureCoord.y + thickness.y * sin(angle);\n curColor = texture2D(uSampler, clamp(displaced, filterClamp.xy, filterClamp.zw));\n maxAlpha = max(maxAlpha, curColor.a);\n }\n float resultAlpha = max(maxAlpha, ownColor.a);\n gl_FragColor = vec4((ownColor.rgb + outlineColor.rgb * (1. - ownColor.a)) * resultAlpha, resultAlpha);\n}\n".replace(/\$\{angleStep\}/,v.getAngleStep(r=void 0===r?.1:r)))||this;return i._thickness=1,i.uniforms.thickness=new Float32Array([0,0]),i.uniforms.outlineColor=new Float32Array([0,0,0,1]),Object.assign(i,{thickness:e,color:t,quality:r}),i}function y(e,t){void 0===t&&(t=0);var r=Q.call(this,f,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec2 dimensions;\n\nuniform float sepia;\nuniform float noise;\nuniform float noiseSize;\nuniform float scratch;\nuniform float scratchDensity;\nuniform float scratchWidth;\nuniform float vignetting;\nuniform float vignettingAlpha;\nuniform float vignettingBlur;\nuniform float seed;\n\nconst float SQRT_2 = 1.414213;\nconst vec3 SEPIA_RGB = vec3(112.0 / 255.0, 66.0 / 255.0, 20.0 / 255.0);\n\nfloat rand(vec2 co) {\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvec3 Overlay(vec3 src, vec3 dst)\n{\n // if (dst <= 0.5) then: 2 * src * dst\n // if (dst > 0.5) then: 1 - 2 * (1 - dst) * (1 - src)\n return vec3((dst.x <= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - dst.x) * (1.0 - src.x)),\n (dst.y <= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - dst.y) * (1.0 - src.y)),\n (dst.z <= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - dst.z) * (1.0 - src.z)));\n}\n\n\nvoid main()\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n vec3 color = gl_FragColor.rgb;\n\n if (sepia > 0.0)\n {\n float gray = (color.x + color.y + color.z) / 3.0;\n vec3 grayscale = vec3(gray);\n\n color = Overlay(SEPIA_RGB, grayscale);\n\n color = grayscale + sepia * (color - grayscale);\n }\n\n vec2 coord = vTextureCoord * filterArea.xy / dimensions.xy;\n\n if (vignetting > 0.0)\n {\n float outter = SQRT_2 - vignetting * SQRT_2;\n vec2 dir = vec2(vec2(0.5, 0.5) - coord);\n dir.y *= dimensions.y / dimensions.x;\n float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0);\n color.rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha);\n }\n\n if (scratchDensity > seed && scratch != 0.0)\n {\n float phase = seed * 256.0;\n float s = mod(floor(phase), 2.0);\n float dist = 1.0 / scratchDensity;\n float d = distance(coord, vec2(seed * dist, abs(s - seed * dist)));\n if (d < seed * 0.6 + 0.4)\n {\n highp float period = scratchDensity * 10.0;\n\n float xx = coord.x * period + phase;\n float aa = abs(mod(xx, 0.5) * 4.0);\n float bb = mod(floor(xx / 0.5), 2.0);\n float yy = (1.0 - bb) * aa + bb * (2.0 - aa);\n\n float kk = 2.0 * period;\n float dw = scratchWidth / dimensions.x * (0.75 + seed);\n float dh = dw * kk;\n\n float tine = (yy - (2.0 - dh));\n\n if (tine > 0.0) {\n float _sign = sign(scratch);\n\n tine = s * tine / period + scratch + 0.1;\n tine = clamp(tine + 1.0, 0.5 + _sign * 0.5, 1.5 + _sign * 0.5);\n\n color.rgb *= tine;\n }\n }\n }\n\n if (noise > 0.0 && noiseSize > 0.0)\n {\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\n pixelCoord.x = floor(pixelCoord.x / noiseSize);\n pixelCoord.y = floor(pixelCoord.y / noiseSize);\n // vec2 d = pixelCoord * noiseSize * vec2(1024.0 + seed * 512.0, 1024.0 - seed * 512.0);\n // float _noise = snoise(d) * 0.5;\n float _noise = rand(pixelCoord * noiseSize * seed) - 0.5;\n color += _noise * noise;\n }\n\n gl_FragColor.rgb = color;\n}\n")||this;return r.seed=0,r.uniforms.dimensions=new Float32Array(2),"number"==typeof e?(r.seed=e,e=void 0):r.seed=t,Object.assign(r,y.defaults,e),r}function b(e,t,r){void 0===t&&(t=.05),void 0===r&&(r=e.length);var i=$.call(this,f,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float epsilon;\n\nconst int MAX_COLORS = %maxColors%;\n\nuniform vec3 originalColors[MAX_COLORS];\nuniform vec3 targetColors[MAX_COLORS];\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n\n float alpha = gl_FragColor.a;\n if (alpha < 0.0001)\n {\n return;\n }\n\n vec3 color = gl_FragColor.rgb / alpha;\n\n for(int i = 0; i < MAX_COLORS; i++)\n {\n vec3 origColor = originalColors[i];\n if (origColor.r < 0.0)\n {\n break;\n }\n vec3 colorDiff = origColor - color;\n if (length(colorDiff) < epsilon)\n {\n vec3 targetColor = targetColors[i];\n gl_FragColor = vec4((targetColor + colorDiff) * alpha, alpha);\n return;\n }\n }\n}\n".replace(/%maxColors%/g,r.toFixed(0)))||this;return i._replacements=[],i._maxColors=0,i.epsilon=t,i._maxColors=r,i.uniforms.originalColors=new Float32Array(3*r),i.uniforms.targetColors=new Float32Array(3*r),i.replacements=e,i}function x(e,t,r){void 0===e&&(e=[0,0]),void 0===t&&(t=5),void 0===r&&(r=0);var i=ee.call(this,f,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\nuniform vec2 uVelocity;\nuniform int uKernelSize;\nuniform float uOffset;\n\nconst int MAX_KERNEL_SIZE = 2048;\n\n// Notice:\n// the perfect way:\n// int kernelSize = min(uKernelSize, MAX_KERNELSIZE);\n// BUT in real use-case , uKernelSize < MAX_KERNELSIZE almost always.\n// So use uKernelSize directly.\n\nvoid main(void)\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n\n if (uKernelSize == 0)\n {\n gl_FragColor = color;\n return;\n }\n\n vec2 velocity = uVelocity / filterArea.xy;\n float offset = -uOffset / length(uVelocity) - 0.5;\n int k = uKernelSize - 1;\n\n for(int i = 0; i < MAX_KERNEL_SIZE - 1; i++) {\n if (i == k) {\n break;\n }\n vec2 bias = velocity * (float(i) / float(k) + offset);\n color += texture2D(uSampler, vTextureCoord + bias);\n }\n gl_FragColor = color / float(uKernelSize);\n}\n")||this;return i.kernelSize=5,i.uniforms.uVelocity=new Float32Array(2),i._velocity=new l.ObservablePoint(i.velocityChanged,i),i.setVelocity(e),i.kernelSize=t,i.offset=r,i}function T(e){var t=te.call(this,f,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\nuniform vec2 dimensions;\n\nuniform vec2 light;\nuniform bool parallel;\nuniform float aspect;\n\nuniform float gain;\nuniform float lacunarity;\nuniform float time;\nuniform float alpha;\n\n${perlin}\n\nvoid main(void) {\n vec2 coord = vTextureCoord * filterArea.xy / dimensions.xy;\n\n float d;\n\n if (parallel) {\n float _cos = light.x;\n float _sin = light.y;\n d = (_cos * coord.x) + (_sin * coord.y * aspect);\n } else {\n float dx = coord.x - light.x / dimensions.x;\n float dy = (coord.y - light.y / dimensions.y) * aspect;\n float dis = sqrt(dx * dx + dy * dy) + 0.00001;\n d = dy / dis;\n }\n\n vec3 dir = vec3(d, d, 0.0);\n\n float noise = turb(dir + vec3(time, 0.0, 62.1 + time) * 0.05, vec3(480.0, 320.0, 480.0), lacunarity, gain);\n noise = mix(noise, 0.0, 0.3);\n //fade vertically.\n vec4 mist = vec4(noise, noise, noise, 1.0) * (1.0 - coord.y);\n mist.a = 1.0;\n // apply user alpha\n mist *= alpha;\n\n gl_FragColor = texture2D(uSampler, vTextureCoord) + mist;\n\n}\n".replace("${perlin}","vec3 mod289(vec3 x)\n{\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x)\n{\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 permute(vec4 x)\n{\n return mod289(((x * 34.0) + 1.0) * x);\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec3 fade(vec3 t)\n{\n return t * t * t * (t * (t * 6.0 - 15.0) + 10.0);\n}\n// Classic Perlin noise, periodic variant\nfloat pnoise(vec3 P, vec3 rep)\n{\n vec3 Pi0 = mod(floor(P), rep); // Integer part, modulo period\n vec3 Pi1 = mod(Pi0 + vec3(1.0), rep); // Integer part + 1, mod period\n Pi0 = mod289(Pi0);\n Pi1 = mod289(Pi1);\n vec3 Pf0 = fract(P); // Fractional part for interpolation\n vec3 Pf1 = Pf0 - vec3(1.0); // Fractional part - 1.0\n vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n vec4 iy = vec4(Pi0.yy, Pi1.yy);\n vec4 iz0 = Pi0.zzzz;\n vec4 iz1 = Pi1.zzzz;\n vec4 ixy = permute(permute(ix) + iy);\n vec4 ixy0 = permute(ixy + iz0);\n vec4 ixy1 = permute(ixy + iz1);\n vec4 gx0 = ixy0 * (1.0 / 7.0);\n vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n gx0 = fract(gx0);\n vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n vec4 sz0 = step(gz0, vec4(0.0));\n gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n vec4 gx1 = ixy1 * (1.0 / 7.0);\n vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n gx1 = fract(gx1);\n vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n vec4 sz1 = step(gz1, vec4(0.0));\n gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n vec3 g000 = vec3(gx0.x, gy0.x, gz0.x);\n vec3 g100 = vec3(gx0.y, gy0.y, gz0.y);\n vec3 g010 = vec3(gx0.z, gy0.z, gz0.z);\n vec3 g110 = vec3(gx0.w, gy0.w, gz0.w);\n vec3 g001 = vec3(gx1.x, gy1.x, gz1.x);\n vec3 g101 = vec3(gx1.y, gy1.y, gz1.y);\n vec3 g011 = vec3(gx1.z, gy1.z, gz1.z);\n vec3 g111 = vec3(gx1.w, gy1.w, gz1.w);\n vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n g000 *= norm0.x;\n g010 *= norm0.y;\n g100 *= norm0.z;\n g110 *= norm0.w;\n vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n g001 *= norm1.x;\n g011 *= norm1.y;\n g101 *= norm1.z;\n g111 *= norm1.w;\n float n000 = dot(g000, Pf0);\n float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n float n111 = dot(g111, Pf1);\n vec3 fade_xyz = fade(Pf0);\n vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\n return 2.2 * n_xyz;\n}\nfloat turb(vec3 P, vec3 rep, float lacunarity, float gain)\n{\n float sum = 0.0;\n float sc = 1.0;\n float totalgain = 1.0;\n for (float i = 0.0; i < 6.0; i++)\n {\n sum += totalgain * pnoise(P * sc, rep);\n sc *= lacunarity;\n totalgain *= gain;\n }\n return abs(sum);\n}\n"))||this,e=(t.parallel=!0,t.time=0,t._angle=0,t.uniforms.dimensions=new Float32Array(2),Object.assign(T.defaults,e));return t._angleLight=new l.Point,t.angle=e.angle,t.gain=e.gain,t.lacunarity=e.lacunarity,t.alpha=e.alpha,t.parallel=e.parallel,t.center=e.center,t.time=e.time,t}function w(e){var t=this,e=Object.assign({},w.defaults,e),r=e.outerStrength,i=e.innerStrength,n=e.color,o=e.knockout,a=e.quality,e=Math.round(e.distance);return(t=re.call(this,f,"varying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler;\n\nuniform float outerStrength;\nuniform float innerStrength;\n\nuniform vec4 glowColor;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform bool knockout;\n\nconst float PI = 3.14159265358979323846264;\n\nconst float DIST = __DIST__;\nconst float ANGLE_STEP_SIZE = min(__ANGLE_STEP_SIZE__, PI * 2.0);\nconst float ANGLE_STEP_NUM = ceil(PI * 2.0 / ANGLE_STEP_SIZE);\n\nconst float MAX_TOTAL_ALPHA = ANGLE_STEP_NUM * DIST * (DIST + 1.0) / 2.0;\n\nvoid main(void) {\n vec2 px = vec2(1.0 / filterArea.x, 1.0 / filterArea.y);\n\n float totalAlpha = 0.0;\n\n vec2 direction;\n vec2 displaced;\n vec4 curColor;\n\n for (float angle = 0.0; angle < PI * 2.0; angle += ANGLE_STEP_SIZE) {\n direction = vec2(cos(angle), sin(angle)) * px;\n\n for (float curDistance = 0.0; curDistance < DIST; curDistance++) {\n displaced = clamp(vTextureCoord + direction * \n (curDistance + 1.0), filterClamp.xy, filterClamp.zw);\n\n curColor = texture2D(uSampler, displaced);\n\n totalAlpha += (DIST - curDistance) * curColor.a;\n }\n }\n \n curColor = texture2D(uSampler, vTextureCoord);\n\n float alphaRatio = (totalAlpha / MAX_TOTAL_ALPHA);\n\n float innerGlowAlpha = (1.0 - alphaRatio) * innerStrength * curColor.a;\n float innerGlowStrength = min(1.0, innerGlowAlpha);\n \n vec4 innerColor = mix(curColor, glowColor, innerGlowStrength);\n\n float outerGlowAlpha = alphaRatio * outerStrength * (1. - curColor.a);\n float outerGlowStrength = min(1.0 - innerColor.a, outerGlowAlpha);\n\n vec4 outerGlowColor = outerGlowStrength * glowColor.rgba;\n \n if (knockout) {\n float resultAlpha = outerGlowAlpha + innerGlowAlpha;\n gl_FragColor = vec4(glowColor.rgb * resultAlpha, resultAlpha);\n }\n else {\n gl_FragColor = innerColor + outerGlowColor;\n }\n}\n".replace(/__ANGLE_STEP_SIZE__/gi,""+(1/a/e).toFixed(7)).replace(/__DIST__/gi,e.toFixed(0)+".0"))||this).uniforms.glowColor=new Float32Array([0,0,0,1]),Object.assign(t,{color:n,outerStrength:r,innerStrength:i,padding:e,knockout:o}),t}function E(e){var t=ie.call(this,f,"// precision highp float;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\nuniform float aspect;\n\nuniform sampler2D displacementMap;\nuniform float offset;\nuniform float sinDir;\nuniform float cosDir;\nuniform int fillMode;\n\nuniform float seed;\nuniform vec2 red;\nuniform vec2 green;\nuniform vec2 blue;\n\nconst int TRANSPARENT = 0;\nconst int ORIGINAL = 1;\nconst int LOOP = 2;\nconst int CLAMP = 3;\nconst int MIRROR = 4;\n\nvoid main(void)\n{\n vec2 coord = (vTextureCoord * filterArea.xy) / dimensions;\n\n if (coord.x > 1.0 || coord.y > 1.0) {\n return;\n }\n\n float cx = coord.x - 0.5;\n float cy = (coord.y - 0.5) * aspect;\n float ny = (-sinDir * cx + cosDir * cy) / aspect + 0.5;\n\n // displacementMap: repeat\n // ny = ny > 1.0 ? ny - 1.0 : (ny < 0.0 ? 1.0 + ny : ny);\n\n // displacementMap: mirror\n ny = ny > 1.0 ? 2.0 - ny : (ny < 0.0 ? -ny : ny);\n\n vec4 dc = texture2D(displacementMap, vec2(0.5, ny));\n\n float displacement = (dc.r - dc.g) * (offset / filterArea.x);\n\n coord = vTextureCoord + vec2(cosDir * displacement, sinDir * displacement * aspect);\n\n if (fillMode == CLAMP) {\n coord = clamp(coord, filterClamp.xy, filterClamp.zw);\n } else {\n if( coord.x > filterClamp.z ) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.x -= filterClamp.z;\n } else if (fillMode == MIRROR) {\n coord.x = filterClamp.z * 2.0 - coord.x;\n }\n } else if( coord.x < filterClamp.x ) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.x += filterClamp.z;\n } else if (fillMode == MIRROR) {\n coord.x *= -filterClamp.z;\n }\n }\n\n if( coord.y > filterClamp.w ) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.y -= filterClamp.w;\n } else if (fillMode == MIRROR) {\n coord.y = filterClamp.w * 2.0 - coord.y;\n }\n } else if( coord.y < filterClamp.y ) {\n if (fillMode == TRANSPARENT) {\n discard;\n } else if (fillMode == LOOP) {\n coord.y += filterClamp.w;\n } else if (fillMode == MIRROR) {\n coord.y *= -filterClamp.w;\n }\n }\n }\n\n gl_FragColor.r = texture2D(uSampler, coord + red * (1.0 - seed * 0.4) / filterArea.xy).r;\n gl_FragColor.g = texture2D(uSampler, coord + green * (1.0 - seed * 0.3) / filterArea.xy).g;\n gl_FragColor.b = texture2D(uSampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b;\n gl_FragColor.a = texture2D(uSampler, coord).a;\n}\n")||this;return t.offset=100,t.fillMode=E.TRANSPARENT,t.average=!1,t.seed=0,t.minSize=8,t.sampleSize=512,t._slices=0,t._offsets=new Float32Array(1),t._sizes=new Float32Array(1),t._direction=-1,t.uniforms.dimensions=new Float32Array(2),t._canvas=document.createElement("canvas"),t._canvas.width=4,t._canvas.height=t.sampleSize,t.texture=s.Texture.from(t._canvas,{scaleMode:c.SCALE_MODES.NEAREST}),Object.assign(t,E.defaults,e),t}function at(e){void 0===e&&(e=5);var t=ne.call(this,f,"precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float strength;\nuniform vec4 filterArea;\n\n\nvoid main(void)\n{\n\tvec2 onePixel = vec2(1.0 / filterArea);\n\n\tvec4 color;\n\n\tcolor.rgb = vec3(0.5);\n\n\tcolor -= texture2D(uSampler, vTextureCoord - onePixel) * strength;\n\tcolor += texture2D(uSampler, vTextureCoord + onePixel) * strength;\n\n\tcolor.rgb = vec3((color.r + color.g + color.b) / 3.0);\n\n\tfloat alpha = texture2D(uSampler, vTextureCoord).a;\n\n\tgl_FragColor = vec4(color.rgb * alpha, alpha);\n}\n")||this;return t.strength=e,t}function S(e){var t=oe.call(this)||this,e=(t.angle=45,t._distance=5,t._resolution=u.settings.FILTER_RESOLUTION,e?xe(xe({},S.defaults),e):S.defaults),r=e.kernels,i=e.blur,n=e.quality,o=e.pixelSize,a=e.resolution,r=(t._tintFilter=new s.Filter(f,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float alpha;\nuniform vec3 color;\n\nuniform vec2 shift;\nuniform vec4 inputSize;\n\nvoid main(void){\n vec4 sample = texture2D(uSampler, vTextureCoord - shift * inputSize.zw);\n\n // Premultiply alpha\n sample.rgb = color.rgb * sample.a;\n\n // alpha user alpha\n sample *= alpha;\n\n gl_FragColor = sample;\n}"),t._tintFilter.uniforms.color=new Float32Array(4),t._tintFilter.uniforms.shift=new l.Point,t._tintFilter.resolution=a,t._blurFilter=r?new p(r):new p(i,n),t.pixelSize=o,t.resolution=a,e.shadowOnly),i=e.rotation,n=e.distance,o=e.alpha,a=e.color;return t.shadowOnly=r,t.rotation=i,t.distance=n,t.alpha=o,t.color=a,t._updatePadding(),t}function A(e,t){void 0===e&&(e=1),void 0===t&&(t=5);var r=ae.call(this,f,"precision mediump float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform vec4 filterArea;\nuniform sampler2D uSampler;\n\nuniform float angle;\nuniform float scale;\n\nfloat pattern()\n{\n float s = sin(angle), c = cos(angle);\n vec2 tex = vTextureCoord * filterArea.xy;\n vec2 point = vec2(\n c * tex.x - s * tex.y,\n s * tex.x + c * tex.y\n ) * scale;\n return (sin(point.x) * sin(point.y)) * 4.0;\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float average = (color.r + color.g + color.b) / 3.0;\n gl_FragColor = vec4(vec3(average * 10.0 - 5.0 + pattern()), color.a);\n}\n")||this;return r.scale=e,r.angle=t,r}function k(e){var t=se.call(this,f,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec4 filterArea;\nuniform vec2 dimensions;\n\nconst float SQRT_2 = 1.414213;\n\nconst float light = 1.0;\n\nuniform float curvature;\nuniform float lineWidth;\nuniform float lineContrast;\nuniform bool verticalLine;\nuniform float noise;\nuniform float noiseSize;\n\nuniform float vignetting;\nuniform float vignettingAlpha;\nuniform float vignettingBlur;\n\nuniform float seed;\nuniform float time;\n\nfloat rand(vec2 co) {\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main(void)\n{\n vec2 pixelCoord = vTextureCoord.xy * filterArea.xy;\n vec2 dir = vec2(vTextureCoord.xy * filterArea.xy / dimensions - vec2(0.5, 0.5));\n \n gl_FragColor = texture2D(uSampler, vTextureCoord);\n vec3 rgb = gl_FragColor.rgb;\n\n if (noise > 0.0 && noiseSize > 0.0)\n {\n pixelCoord.x = floor(pixelCoord.x / noiseSize);\n pixelCoord.y = floor(pixelCoord.y / noiseSize);\n float _noise = rand(pixelCoord * noiseSize * seed) - 0.5;\n rgb += _noise * noise;\n }\n\n if (lineWidth > 0.0)\n {\n float _c = curvature > 0. ? curvature : 1.;\n float k = curvature > 0. ?(length(dir * dir) * 0.25 * _c * _c + 0.935 * _c) : 1.;\n vec2 uv = dir * k;\n\n float v = (verticalLine ? uv.x * dimensions.x : uv.y * dimensions.y) * min(1.0, 2.0 / lineWidth ) / _c;\n float j = 1. + cos(v * 1.2 - time) * 0.5 * lineContrast;\n rgb *= j;\n float segment = verticalLine ? mod((dir.x + .5) * dimensions.x, 4.) : mod((dir.y + .5) * dimensions.y, 4.);\n rgb *= 0.99 + ceil(segment) * 0.015;\n }\n\n if (vignetting > 0.0)\n {\n float outter = SQRT_2 - vignetting * SQRT_2;\n float darker = clamp((outter - length(dir) * SQRT_2) / ( 0.00001 + vignettingBlur * SQRT_2), 0.0, 1.0);\n rgb *= darker + (1.0 - darker) * (1.0 - vignettingAlpha);\n }\n\n gl_FragColor.rgb = rgb;\n}\n")||this;return t.time=0,t.seed=0,t.uniforms.dimensions=new Float32Array(2),Object.assign(t,k.defaults,e),t}function st(){return le.call(this,f,"precision mediump float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n float lum = length(texture2D(uSampler, vTextureCoord.xy).rgb);\n\n gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);\n\n if (lum < 1.00)\n {\n if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.75)\n {\n if (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.50)\n {\n if (mod(gl_FragCoord.x + gl_FragCoord.y - 5.0, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n\n if (lum < 0.3)\n {\n if (mod(gl_FragCoord.x - gl_FragCoord.y - 5.0, 10.0) == 0.0)\n {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n}\n")||this}function O(e,t,r){void 0===t&&(t=200),void 0===r&&(r=200);var i=ue.call(this,f,"precision mediump float;\n\nvarying mediump vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec2 texelSize;\nuniform float matrix[9];\n\nvoid main(void)\n{\n vec4 c11 = texture2D(uSampler, vTextureCoord - texelSize); // top left\n vec4 c12 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y - texelSize.y)); // top center\n vec4 c13 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y - texelSize.y)); // top right\n\n vec4 c21 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y)); // mid left\n vec4 c22 = texture2D(uSampler, vTextureCoord); // mid center\n vec4 c23 = texture2D(uSampler, vec2(vTextureCoord.x + texelSize.x, vTextureCoord.y)); // mid right\n\n vec4 c31 = texture2D(uSampler, vec2(vTextureCoord.x - texelSize.x, vTextureCoord.y + texelSize.y)); // bottom left\n vec4 c32 = texture2D(uSampler, vec2(vTextureCoord.x, vTextureCoord.y + texelSize.y)); // bottom center\n vec4 c33 = texture2D(uSampler, vTextureCoord + texelSize); // bottom right\n\n gl_FragColor =\n c11 * matrix[0] + c12 * matrix[1] + c13 * matrix[2] +\n c21 * matrix[3] + c22 * matrix[4] + c23 * matrix[5] +\n c31 * matrix[6] + c32 * matrix[7] + c33 * matrix[8];\n\n gl_FragColor.a = c22.a;\n}\n")||this;return i.uniforms.texelSize=new Float32Array(2),i.uniforms.matrix=new Float32Array(9),void 0!==e&&(i.matrix=e),i.width=t,i.height=r,i}function P(e,t,r){void 0===e&&(e=16711680),void 0===t&&(t=0),void 0===r&&(r=.4);var i=he.call(this,f,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec3 originalColor;\nuniform vec3 newColor;\nuniform float epsilon;\nvoid main(void) {\n vec4 currentColor = texture2D(uSampler, vTextureCoord);\n vec3 colorDiff = originalColor - (currentColor.rgb / max(currentColor.a, 0.0000000001));\n float colorDistance = length(colorDiff);\n float doReplace = step(colorDistance, epsilon);\n gl_FragColor = vec4(mix(currentColor.rgb, (newColor + colorDiff) * currentColor.a, doReplace), currentColor.a);\n}\n")||this;return i._originalColor=16711680,i._newColor=0,i.uniforms.originalColor=new Float32Array(3),i.uniforms.newColor=new Float32Array(3),i.originalColor=e,i.newColor=t,i.epsilon=r,i}function lt(e,t){void 0===e&&(e=0),void 0===t&&(t=1);var r=ce.call(this,f,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec3 color;\nuniform float alpha;\n\nvoid main(void) {\n vec4 currentColor = texture2D(uSampler, vTextureCoord);\n gl_FragColor = vec4(mix(currentColor.rgb, color.rgb, currentColor.a * alpha), currentColor.a);\n}\n")||this;return r._color=0,r._alpha=1,r.uniforms.color=new Float32Array(3),r.color=e,r.alpha=t,r}function R(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=1);var i=fe.call(this,f,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform sampler2D colorMap;\nuniform float _mix;\nuniform float _size;\nuniform float _sliceSize;\nuniform float _slicePixelSize;\nuniform float _sliceInnerSize;\nvoid main() {\n vec4 color = texture2D(uSampler, vTextureCoord.xy);\n\n vec4 adjusted;\n if (color.a > 0.0) {\n color.rgb /= color.a;\n float innerWidth = _size - 1.0;\n float zSlice0 = min(floor(color.b * innerWidth), innerWidth);\n float zSlice1 = min(zSlice0 + 1.0, innerWidth);\n float xOffset = _slicePixelSize * 0.5 + color.r * _sliceInnerSize;\n float s0 = xOffset + (zSlice0 * _sliceSize);\n float s1 = xOffset + (zSlice1 * _sliceSize);\n float yOffset = _sliceSize * 0.5 + color.g * (1.0 - _sliceSize);\n vec4 slice0Color = texture2D(colorMap, vec2(s0,yOffset));\n vec4 slice1Color = texture2D(colorMap, vec2(s1,yOffset));\n float zOffset = fract(color.b * innerWidth);\n adjusted = mix(slice0Color, slice1Color, zOffset);\n\n color.rgb *= color.a;\n }\n gl_FragColor = vec4(mix(color, adjusted, _mix).rgb, color.a);\n\n}")||this;return i.mix=1,i._size=0,i._sliceSize=0,i._slicePixelSize=0,i._sliceInnerSize=0,i._nearest=!1,i._scaleMode=null,i._colorMap=null,i._scaleMode=null,i.nearest=t,i.mix=r,i.colorMap=e,i}function C(e){var t=pe.call(this,f,"uniform float radius;\nuniform float strength;\nuniform vec2 center;\nuniform sampler2D uSampler;\nvarying vec2 vTextureCoord;\n\nuniform vec4 filterArea;\nuniform vec4 filterClamp;\nuniform vec2 dimensions;\n\nvoid main()\n{\n vec2 coord = vTextureCoord * filterArea.xy;\n coord -= center * dimensions.xy;\n float distance = length(coord);\n if (distance < radius) {\n float percent = distance / radius;\n if (strength > 0.0) {\n coord *= mix(1.0, smoothstep(0.0, radius / distance, percent), strength * 0.75);\n } else {\n coord *= mix(1.0, pow(percent, 1.0 + strength * 0.75) * radius / distance, 1.0 - percent);\n }\n }\n coord += center * dimensions.xy;\n coord /= filterArea.xy;\n vec2 clampedCoord = clamp(coord, filterClamp.xy, filterClamp.zw);\n vec4 color = texture2D(uSampler, clampedCoord);\n if (coord != clampedCoord) {\n color *= max(0.0, 1.0 - length(coord - clampedCoord));\n }\n\n gl_FragColor = color;\n}\n")||this;return t.uniforms.dimensions=new Float32Array(2),Object.assign(t,C.defaults,e),t}function M(e,t,r,i){void 0===e&&(e=2),void 0===t&&(t=4),void 0===r&&(r=u.settings.FILTER_RESOLUTION),void 0===i&&(i=5);var n,o,a=de.call(this)||this;return"number"==typeof e?o=n=e:e instanceof l.Point?(n=e.x,o=e.y):Array.isArray(e)&&(n=e[0],o=e[1]),a.blurXFilter=new N.BlurFilterPass(!0,n,t,r,i),a.blurYFilter=new N.BlurFilterPass(!1,o,t,r,i),a.blurYFilter.blendMode=c.BLEND_MODES.SCREEN,a.defaultFilter=new F.AlphaFilter,a}function I(e){var t=me.call(this,f,"precision mediump float;\n\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform vec4 filterArea;\n\nuniform float transformX;\nuniform float transformY;\nuniform vec3 lightColor;\nuniform float lightAlpha;\nuniform vec3 shadowColor;\nuniform float shadowAlpha;\n\nvoid main(void) {\n vec2 transform = vec2(1.0 / filterArea) * vec2(transformX, transformY);\n vec4 color = texture2D(uSampler, vTextureCoord);\n float light = texture2D(uSampler, vTextureCoord - transform).a;\n float shadow = texture2D(uSampler, vTextureCoord + transform).a;\n\n color.rgb = mix(color.rgb, lightColor, clamp((color.a - light) * lightAlpha, 0.0, 1.0));\n color.rgb = mix(color.rgb, shadowColor, clamp((color.a - shadow) * shadowAlpha, 0.0, 1.0));\n gl_FragColor = vec4(color.rgb * color.a, color.a);\n}\n")||this;return t._thickness=2,t._angle=0,t.uniforms.lightColor=new Float32Array(3),t.uniforms.shadowColor=new Float32Array(3),Object.assign(t,{rotation:45,thickness:2,lightColor:16777215,lightAlpha:.7,shadowColor:0,shadowAlpha:.7},e),t.padding=1,t}function ut(e){void 0===e&&(e=8);var t=_e.call(this,f,"varying vec2 vTextureCoord;\n\nuniform vec4 filterArea;\nuniform float pixelSize;\nuniform sampler2D uSampler;\n\nvec2 mapCoord( vec2 coord )\n{\n coord *= filterArea.xy;\n coord += filterArea.zw;\n\n return coord;\n}\n\nvec2 unmapCoord( vec2 coord )\n{\n coord -= filterArea.zw;\n coord /= filterArea.xy;\n\n return coord;\n}\n\nvec2 pixelate(vec2 coord, vec2 size)\n{\n return floor( coord / size ) * size;\n}\n\nvec2 getMod(vec2 coord, vec2 size)\n{\n return mod( coord , size) / size;\n}\n\nfloat character(float n, vec2 p)\n{\n p = floor(p*vec2(4.0, -4.0) + 2.5);\n\n if (clamp(p.x, 0.0, 4.0) == p.x)\n {\n if (clamp(p.y, 0.0, 4.0) == p.y)\n {\n if (int(mod(n/exp2(p.x + 5.0*p.y), 2.0)) == 1) return 1.0;\n }\n }\n return 0.0;\n}\n\nvoid main()\n{\n vec2 coord = mapCoord(vTextureCoord);\n\n // get the rounded color..\n vec2 pixCoord = pixelate(coord, vec2(pixelSize));\n pixCoord = unmapCoord(pixCoord);\n\n vec4 color = texture2D(uSampler, pixCoord);\n\n // determine the character to use\n float gray = (color.r + color.g + color.b) / 3.0;\n\n float n = 65536.0; // .\n if (gray > 0.2) n = 65600.0; // :\n if (gray > 0.3) n = 332772.0; // *\n if (gray > 0.4) n = 15255086.0; // o\n if (gray > 0.5) n = 23385164.0; // &\n if (gray > 0.6) n = 15252014.0; // 8\n if (gray > 0.7) n = 13199452.0; // @\n if (gray > 0.8) n = 11512810.0; // #\n\n // get the mod..\n vec2 modd = getMod(coord, vec2(pixelSize));\n\n gl_FragColor = color * character( n, vec2(-1.0) + modd * 2.0);\n\n}\n")||this;return t.size=e,t}function D(e){var t=ge.call(this,f,"uniform sampler2D uSampler;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D bloomTexture;\nuniform float bloomScale;\nuniform float brightness;\n\nvoid main() {\n vec4 color = texture2D(uSampler, vTextureCoord);\n color.rgb *= brightness;\n vec4 bloomColor = vec4(texture2D(bloomTexture, vTextureCoord).rgb, 0.0);\n bloomColor.rgb *= bloomScale;\n gl_FragColor = color + bloomColor;\n}\n")||this,e=(t.bloomScale=1,t.brightness=1,t._resolution=u.settings.FILTER_RESOLUTION,"number"==typeof e&&(e={threshold:e}),Object.assign(D.defaults,e)),r=(t.bloomScale=e.bloomScale,t.brightness=e.brightness,e.kernels),i=e.blur,n=e.quality,o=e.pixelSize,a=e.resolution;return t._extractFilter=new we(e.threshold),t._extractFilter.resolution=a,t._blurFilter=r?new p(r):new p(i,n),t.pixelSize=o,t.resolution=a,t}function L(e,t,r){void 0===e&&(e=4),void 0===t&&(t=3);var i=ve.call(this,f,(r=void 0===r?!1:r)?"\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec2 uOffset;\nuniform vec4 filterClamp;\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n\n // Sample top left pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Sample top right pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Sample bottom right pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Sample bottom left pixel\n color += texture2D(uSampler, clamp(vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y), filterClamp.xy, filterClamp.zw));\n\n // Average\n color *= 0.25;\n\n gl_FragColor = color;\n}\n":"\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform vec2 uOffset;\n\nvoid main(void)\n{\n vec4 color = vec4(0.0);\n\n // Sample top left pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y + uOffset.y));\n\n // Sample top right pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y + uOffset.y));\n\n // Sample bottom right pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x + uOffset.x, vTextureCoord.y - uOffset.y));\n\n // Sample bottom left pixel\n color += texture2D(uSampler, vec2(vTextureCoord.x - uOffset.x, vTextureCoord.y - uOffset.y));\n\n // Average\n color *= 0.25;\n\n gl_FragColor = color;\n}")||this;return i._kernels=[],i._blur=4,i._quality=3,i.uniforms.uOffset=new Float32Array(2),i._pixelSize=new l.Point,i.pixelSize=1,i._clamp=r,Array.isArray(e)?i.kernels=e:(i._blur=e,i.quality=t),i}function ht(e){void 0===e&&(e=.5);var t=ye.call(this,f,"\nuniform sampler2D uSampler;\nvarying vec2 vTextureCoord;\n\nuniform float threshold;\n\nvoid main() {\n vec4 color = texture2D(uSampler, vTextureCoord);\n\n // A simple & fast algorithm for getting brightness.\n // It's inaccuracy , but good enought for this feature.\n float _max = max(max(color.r, color.g), color.b);\n float _min = min(min(color.r, color.g), color.b);\n float brightness = (_max + _min) * 0.5;\n\n if(brightness > threshold) {\n gl_FragColor = color;\n } else {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n}\n")||this;return t.threshold=e,t}function ct(e){var t=be.call(this,f,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float gamma;\nuniform float contrast;\nuniform float saturation;\nuniform float brightness;\nuniform float red;\nuniform float green;\nuniform float blue;\nuniform float alpha;\n\nvoid main(void)\n{\n vec4 c = texture2D(uSampler, vTextureCoord);\n\n if (c.a > 0.0) {\n c.rgb /= c.a;\n\n vec3 rgb = pow(c.rgb, vec3(1. / gamma));\n rgb = mix(vec3(.5), mix(vec3(dot(vec3(.2125, .7154, .0721), rgb)), rgb, saturation), contrast);\n rgb.r *= red;\n rgb.g *= green;\n rgb.b *= blue;\n c.rgb = rgb * brightness;\n\n c.rgb *= c.a;\n }\n\n gl_FragColor = c * alpha;\n}\n")||this;return t.gamma=1,t.saturation=1,t.contrast=1,t.brightness=1,t.red=1,t.green=1,t.blue=1,t.alpha=1,Object.assign(t,e),t}return e.AdjustmentFilter=Te,e.AdvancedBloomFilter=Ee,e.AsciiFilter=Se,e.BevelFilter=Ae,e.BloomFilter=ke,e.BulgePinchFilter=Oe,e.CRTFilter=De,e.ColorMapFilter=Pe,e.ColorOverlayFilter=Re,e.ColorReplaceFilter=Ce,e.ConvolutionFilter=Me,e.CrossHatchFilter=Ie,e.DotFilter=Le,e.DropShadowFilter=Fe,e.EmbossFilter=Ne,e.GlitchFilter=ze,e.GlowFilter=Be,e.GodrayFilter=je,e.KawaseBlurFilter=p,e.MotionBlurFilter=Ue,e.MultiColorReplaceFilter=Ge,e.OldFilmFilter=Xe,e.OutlineFilter=He,e.PixelateFilter=Ye,e.RGBSplitFilter=Ve,e.RadialBlurFilter=We,e.ReflectionFilter=qe,e.ShockwaveFilter=Ke,e.SimpleLightmapFilter=Je,e.TiltShiftAxisFilter=Ze,e.TiltShiftFilter=et,e.TiltShiftXFilter=Qe,e.TiltShiftYFilter=$e,e.TwistFilter=tt,e.ZoomBlurFilter=rt,Object.defineProperty(e,"__esModule",{value:!0}),e}({},PIXI,PIXI,PIXI,PIXI.utils,PIXI,PIXI.filters,PIXI.filters),_gsScope=(Object.assign(PIXI.filters,__filters),this.PIXI=this.PIXI||{},!function(l,m){"use strict";u.createList=function(e){if("list"in e){var t=e.list,r=void 0,i=t[0],n=i.value,i=i.time,i=r=new u("string"==typeof n?l.ParticleUtils.hexToRGB(n):n,i,e.ease);if(2a.time;)n=a,a=e[++o];var l=(l-n.time)/(a.time-n.time),u=f.hexToRGB(n.value),h=f.hexToRGB(a.value),h={r:(h.r-u.r)*l+u.r,g:(h.g-u.g)*l+u.g,b:(h.b-u.b)*l+u.b};i.next=new c(h,s/t),i=i.next}return r};var i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function r(e,t){function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function n(e){return this.ease&&(e=this.ease(e)),(this.next.value-this.current.value)*e+this.current.value}function o(e){this.ease&&(e=this.ease(e));var t=this.current.value,r=this.next.value,i=(r.r-t.r)*e+t.r,n=(r.g-t.g)*e+t.g,r=(r.b-t.b)*e+t.b;return l.ParticleUtils.combineRGBComponents(i,n,r)}function a(e){for(this.ease&&(e=this.ease(e));e>this.next.time;)this.current=this.next,this.next=this.next.next;return e=(e-this.current.time)/(this.next.time-this.current.time),(this.next.value-this.current.value)*e+this.current.value}function s(e){for(this.ease&&(e=this.ease(e));e>this.next.time;)this.current=this.next,this.next=this.next.next;e=(e-this.current.time)/(this.next.time-this.current.time);var t=this.current.value,r=this.next.value,i=(r.r-t.r)*e+t.r,n=(r.g-t.g)*e+t.g,r=(r.b-t.b)*e+t.b;return l.ParticleUtils.combineRGBComponents(i,n,r)}function p(e){for(this.ease&&(e=this.ease(e));this.next&&e>this.next.time;)this.current=this.next,this.next=this.next.next;return this.current.value}function d(e){for(this.ease&&(e=this.ease(e));this.next&&e>this.next.time;)this.current=this.next,this.next=this.next.next;var t=this.current.value;return l.ParticleUtils.combineRGBComponents(t.r,t.g,t.b)}g.prototype.reset=function(e){this.current=e,this.next=e.next,this.next&&1<=this.next.time?this.interpolate=this.isColor?o:n:e.isStepped?this.interpolate=this.isColor?d:p:this.interpolate=this.isColor?s:a,this.ease=this.current.ease};var _=g;function g(e){void 0===e&&(e=!1),this.current=null,this.next=null,this.isColor=!!e,this.interpolate=null,this.ease=null}r(b,v=m.Sprite),b.prototype.init=function(){this.age=0,this.velocity.x=this.speedList.current.value*this.speedMultiplier,this.velocity.y=0,l.ParticleUtils.rotatePoint(this.rotation,this.velocity),this.noRotation?this.rotation=0:this.rotation*=l.ParticleUtils.DEG_TO_RADS,this.rotationSpeed*=l.ParticleUtils.DEG_TO_RADS,this.rotationAcceleration*=l.ParticleUtils.DEG_TO_RADS,this.alpha=this.alphaList.current.value,this.scale.x=this.scale.y=this.scaleList.current.value,this._doAlpha=!!this.alphaList.current.next,this._doSpeed=!!this.speedList.current.next,this._doScale=!!this.scaleList.current.next,this._doColor=!!this.colorList.current.next,this._doAcceleration=0!==this.acceleration.x||0!==this.acceleration.y,this._doNormalMovement=this._doSpeed||0!==this.speedList.current.value||this._doAcceleration,this._oneOverLife=1/this.maxLife;var e=this.colorList.current.value;this.tint=l.ParticleUtils.combineRGBComponents(e.r,e.g,e.b),this.visible=!0},b.prototype.applyArt=function(e){this.texture=e||m.Texture.EMPTY},b.prototype.update=function(e){var t,r,i,n,o,a;return this.age+=e,this.age>=this.maxLife||this.age<0?(this.kill(),-1):(t=this.age*this._oneOverLife,this.ease&&(t=4===this.ease.length?this.ease(t,0,1,1):this.ease(t)),this._doAlpha&&(this.alpha=this.alphaList.interpolate(t)),this._doScale&&(r=this.scaleList.interpolate(t)*this.scaleMultiplier,this.scale.x=this.scale.y=r),this._doNormalMovement&&(o=r=void 0,o=this._doSpeed?(i=this.speedList.interpolate(t)*this.speedMultiplier,l.ParticleUtils.normalize(this.velocity),l.ParticleUtils.scaleBy(this.velocity,i),r=this.velocity.x*e,this.velocity.y*e):this._doAcceleration?(i=this.velocity.x,n=this.velocity.y,this.velocity.x+=this.acceleration.x*e,this.velocity.y+=this.acceleration.y*e,this.maxSpeed&&(a=l.ParticleUtils.length(this.velocity))>this.maxSpeed&&l.ParticleUtils.scaleBy(this.velocity,this.maxSpeed/a),r=(i+this.velocity.x)/2*e,(n+this.velocity.y)/2*e):(r=this.velocity.x*e,this.velocity.y*e),this.position.x+=r,this.position.y+=o),this._doColor&&(this.tint=this.colorList.interpolate(t)),0!==this.rotationAcceleration?(a=this.rotationSpeed+this.rotationAcceleration*e,this.rotation+=(this.rotationSpeed+a)/2*e,this.rotationSpeed=a):0!==this.rotationSpeed?this.rotation+=this.rotationSpeed*e:this.acceleration&&!this.noRotation&&(this.rotation=Math.atan2(this.velocity.y,this.velocity.x)),t)},b.prototype.kill=function(){this.emitter.recycle(this)},b.prototype.destroy=function(){this.parent&&this.parent.removeChild(this),this.Sprite_destroy(),this.emitter=this.velocity=this.colorList=this.scaleList=this.alphaList=this.speedList=this.ease=this.next=this.prev=null},b.parseArt=function(e){for(var t=e.length;0<=t;--t)"string"==typeof e[t]&&(e[t]=h(e[t]));if(l.ParticleUtils.verbose)for(t=e.length-1;0=this.maxParticles);else{var l=void 0,l=this.minLifetime===this.maxLifetime?this.minLifetime:Math.random()*(this.maxLifetime-this.minLifetime)+this.minLifetime;if(-this._spawnTimer=this.spawnChance||(f=void 0,this._poolFirst?(f=this._poolFirst,this._poolFirst=this._poolFirst.next,f.next=null):f=new this.particleConstructor(this),1=this.particleImages.length)&&(this._currentImageIndex=0)):f.applyArt(this.particleImages[Math.floor(Math.random()*this.particleImages.length)]):f.applyArt(this.particleImages[0]),f.alphaList.reset(this.startAlpha),1!==this.minimumSpeedMultiplier&&(f.speedMultiplier=Math.random()*(1-this.minimumSpeedMultiplier)+this.minimumSpeedMultiplier),f.speedList.reset(this.startSpeed),f.acceleration.x=this.acceleration.x,f.acceleration.y=this.acceleration.y,f.maxSpeed=this.maxSpeed,1!==this.minimumScaleMultiplier&&(f.scaleMultiplier=Math.random()*(1-this.minimumScaleMultiplier)+this.minimumScaleMultiplier),f.scaleList.reset(this.startScale),f.colorList.reset(this.startColor),this.minRotationSpeed===this.maxRotationSpeed?f.rotationSpeed=this.minRotationSpeed:f.rotationSpeed=Math.random()*(this.maxRotationSpeed-this.minRotationSpeed)+this.minRotationSpeed,f.rotationAcceleration=this.rotationAcceleration,f.noRotation=this.noRotation,f.maxLife=l,f.blendMode=this.particleBlendMode,f.ease=this.customEase,f.extraData=this.extraData,this.applyAdditionalProperties(f),this._spawnFunc(f,h,c,p),f.init(),this.addAtBack?this._parent.addChildAt(f,0):this._parent.addChild(f),this._activeParticlesLast?((this._activeParticlesLast.next=f).prev=this._activeParticlesLast,this._activeParticlesLast=f):this._activeParticlesLast=this._activeParticlesFirst=f,++this.particleCount,f.update(-this._spawnTimer))}}this._spawnTimer+=this._frequency}this._posChanged&&(this._prevEmitterPos.x=a,this._prevEmitterPos.y=s,this._prevPosIsValid=!0,this._posChanged=!1),this._emit||this._activeParticlesFirst||(this._completeCallback&&(o=this._completeCallback,this._completeCallback=null,o()),this._destroyWhenComplete&&this.destroy())}},S.prototype.applyAdditionalProperties=function(e){},S.prototype._spawnPoint=function(e,t,r){this.minStartRotation===this.maxStartRotation?e.rotation=this.minStartRotation+this.rotation:e.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,e.position.x=t,e.position.y=r},S.prototype._spawnRect=function(e,t,r){this.minStartRotation===this.maxStartRotation?e.rotation=this.minStartRotation+this.rotation:e.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,E.x=Math.random()*this.spawnRect.width+this.spawnRect.x,E.y=Math.random()*this.spawnRect.height+this.spawnRect.y,0!==this.rotation&&l.ParticleUtils.rotatePoint(this.rotation,E),e.position.x=t+E.x,e.position.y=r+E.y},S.prototype._spawnCircle=function(e,t,r){this.minStartRotation===this.maxStartRotation?e.rotation=this.minStartRotation+this.rotation:e.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,E.x=Math.random()*this.spawnCircle.radius,E.y=0,l.ParticleUtils.rotatePoint(360*Math.random(),E),E.x+=this.spawnCircle.x,E.y+=this.spawnCircle.y,0!==this.rotation&&l.ParticleUtils.rotatePoint(this.rotation,E),e.position.x=t+E.x,e.position.y=r+E.y},S.prototype._spawnRing=function(e,t,r){var i=this.spawnCircle,i=(this.minStartRotation===this.maxStartRotation?e.rotation=this.minStartRotation+this.rotation:e.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,i.minRadius!==i.radius?E.x=Math.random()*(i.radius-i.minRadius)+i.minRadius:E.x=i.radius,E.y=0,360*Math.random());e.rotation+=i,l.ParticleUtils.rotatePoint(i,E),E.x+=this.spawnCircle.x,E.y+=this.spawnCircle.y,0!==this.rotation&&l.ParticleUtils.rotatePoint(this.rotation,E),e.position.x=t+E.x,e.position.y=r+E.y},S.prototype._spawnPolygonalChain=function(e,t,r){this.minStartRotation===this.maxStartRotation?e.rotation=this.minStartRotation+this.rotation:e.rotation=Math.random()*(this.maxStartRotation-this.minStartRotation)+this.minStartRotation+this.rotation,this.spawnPolygonalChain.getRandomPoint(E),0!==this.rotation&&l.ParticleUtils.rotatePoint(this.rotation,E),e.position.x=t+E.x,e.position.y=r+E.y},S.prototype._spawnBurst=function(e,t,r,i){0===this.particleSpacing?e.rotation=360*Math.random():e.rotation=this.angleStart+this.particleSpacing*i+this.rotation,e.position.x=t,e.position.y=r},S.prototype.cleanup=function(){for(var e,t=this._activeParticlesFirst;t;t=e)e=t.next,this.recycle(t),t.parent&&t.parent.removeChild(t);this._activeParticlesFirst=this._activeParticlesLast=null,this.particleCount=0},S.prototype.destroy=function(){var e;this.autoUpdate=!1,this.cleanup();for(var t=this._poolFirst;t;t=e)e=t.next,t.destroy();this._poolFirst=this._parent=this.particleImages=this.spawnPos=this.ownerPos=this.startColor=this.startScale=this.startAlpha=this.startSpeed=this.customEase=this._completeCallback=null},S);function S(e,t,r){this._currentImageIndex=-1,this._particleConstructor=y,this.particleImages=null,this.startAlpha=null,this.startSpeed=null,this.minimumSpeedMultiplier=1,this.acceleration=null,this.maxSpeed=NaN,this.startScale=null,this.minimumScaleMultiplier=1,this.startColor=null,this.minLifetime=0,this.maxLifetime=0,this.minStartRotation=0,this.maxStartRotation=0,this.noRotation=!1,this.minRotationSpeed=0,this.maxRotationSpeed=0,this.particleBlendMode=0,this.customEase=null,this.extraData=null,this._frequency=1,this.spawnChance=1,this.maxParticles=1e3,this.emitterLifetime=-1,this.spawnPos=null,this.spawnType=null,this._spawnFunc=null,this.spawnRect=null,this.spawnCircle=null,this.spawnPolygonalChain=null,this.particlesPerWave=1,this.particleSpacing=0,this.angleStart=0,this.rotation=0,this.ownerPos=null,this._prevEmitterPos=null,this._prevPosIsValid=!1,this._posChanged=!1,this._parent=null,this.addAtBack=!1,this.particleCount=0,this._emit=!1,this._spawnTimer=0,this._emitterLife=-1,this._activeParticlesFirst=null,this._activeParticlesLast=null,this._poolFirst=null,this._origConfig=null,this._origArt=null,this._autoUpdate=!1,this._currentImageIndex=-1,this._destroyWhenComplete=!1,this._completeCallback=null,this.parent=e,t&&r&&this.init(t,r),this.recycle=this.recycle,this.update=this.update,this.rotate=this.rotate,this.updateSpawnPos=this.updateSpawnPos,this.updateOwnerPos=this.updateOwnerPos}var A=new m.Point,k=["pow","sqrt","abs","floor","round","ceil","E","PI","sin","cos","tan","asin","acos","atan","atan2","log"],O=new RegExp(["[01234567890\\.\\*\\-\\+\\/\\(\\)x ,]"].concat(k).join("|"),"g");r(C,P=y),C.prototype.init=function(){this.initialRotation=this.rotation,this.Particle_init(),this.path=this.extraData.path,this._doNormalMovement=!this.path,this.movement=0,this.initialPosition.x=this.position.x,this.initialPosition.y=this.position.y},C.prototype.update=function(e){var t,r=this.Particle_update(e);return 0<=r&&this.path&&(t=this._doSpeed?this.speedList.interpolate(r)*this.speedMultiplier:this.speedList.current.value*this.speedMultiplier,this.movement+=t*e,A.x=this.movement,A.y=this.path(this.movement),l.ParticleUtils.rotatePoint(this.initialRotation,A),this.position.x=this.initialPosition.x+A.x,this.position.y=this.initialPosition.y+A.y),r},C.prototype.destroy=function(){this.Particle_destroy(),this.path=this.initialPosition=null},C.parseArt=function(e){return y.parseArt(e)},C.parseData=function(e){var t={};if(e&&e.path)try{t.path=function(e){for(var t=e.match(O),r=t.length-1;0<=r;--r)0<=k.indexOf(t[r])&&(t[r]="Math."+t[r]);return e=t.join(""),new Function("x","return "+e+";")}(e.path)}catch(e){l.ParticleUtils.verbose&&console.error("PathParticle: error in parsing path expression"),t.path=null}else l.ParticleUtils.verbose&&console.error("PathParticle requires a path string in extraData!"),t.path=null;return t};var P,R=C;function C(e){e=P.call(this,e)||this;return e.path=null,e.initialRotation=0,e.initialPosition=new m.Point,e.movement=0,e}r(I,M=y),I.prototype.init=function(){this.Particle_init(),this.elapsed=0,this.framerate<0&&(this.duration=this.maxLife,this.framerate=this.textures.length/this.duration)},I.prototype.applyArt=function(e){this.textures=e.textures,this.framerate=e.framerate,this.duration=e.duration,this.loop=e.loop},I.prototype.update=function(e){var t=this.Particle_update(e);return 0<=t&&(this.elapsed+=e,this.elapsed>=this.duration&&(this.loop?this.elapsed=this.elapsed%this.duration:this.elapsed=this.duration-1e-6),e=this.elapsed*this.framerate+1e-7|0,this.texture=this.textures[e]||this.textures[this.textures.length-1]||m.Texture.EMPTY),t},I.prototype.destroy=function(){this.Particle_destroy(),this.textures=null},I.parseArt=function(e){for(var t=[],r=0;rthis._childCount)throw new Error("addChildAt: The index "+t+" supplied is out of bounds "+this._childCount);e.parent&&e.parent.removeChild(e),(e.parent=this).sortDirty=!0,e.transform._parentID=-1;var r=e;if(this._firstChild)if(0===t)(this._firstChild.prevChild=r).nextChild=this._firstChild,this._firstChild=r;else if(t===this._childCount)(this._lastChild.nextChild=r).prevChild=this._lastChild,this._lastChild=r;else{for(var i=0,n=this._firstChild;i=this._childCount)throw new Error("The index "+t+" supplied is out of bounds "+this._childCount);if(e.parent!==this)throw new Error("The supplied DisplayObject must be a child of the caller");if(e.nextChild&&(e.nextChild.prevChild=e.prevChild),e.prevChild&&(e.prevChild.nextChild=e.nextChild),this._firstChild===e&&(this._firstChild=e.nextChild),this._lastChild===e&&(this._lastChild=e.prevChild),e.nextChild=null,e.prevChild=null,this._firstChild)if(0===t)(this._firstChild.prevChild=e).nextChild=this._firstChild,this._firstChild=e;else if(t===this._childCount)(this._lastChild.nextChild=e).prevChild=this._lastChild,this._lastChild=e;else{for(var r=0,i=this._firstChild;r=this._childCount)throw new Error("getChildAt: Index ("+e+") does not exist.");if(0===e)return this._firstChild;if(e===this._childCount)return this._lastChild;for(var t=0,r=this._firstChild;t=s.TRANSFORM_STEP.PROJ?(i||this.displayObjectUpdateTransform(),(this.proj.affine?this.transform.worldTransform:this.proj.world).applyInverse(e,r)):(this.parent?r=this.parent.worldTransform.applyInverse(e,r):(r.x=e.x,r.y=e.y),n===s.TRANSFORM_STEP.NONE?r:this.transform.localTransform.applyInverse(r,r))}get worldTransform(){return this.proj.affine?this.transform.worldTransform:this.proj.world}}const $=Q.prototype.toLocal;class d extends o.Mesh{static __initStatic(){this.defaultVertexShader=`precision highp float; attribute vec2 aVertexPosition; attribute vec2 aTextureCoord; uniform mat3 projectionMatrix; uniform mat3 translationMatrix; uniform mat3 uTextureMatrix; varying vec2 vTextureCoord; void main(void) { gl_Position.xyw = projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0); gl_Position.z = 0.0; vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy; } `}static __initStatic2(){this.defaultFragmentShader=` varying vec2 vTextureCoord; uniform vec4 uColor; uniform sampler2D uSampler; void main(void) { gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor; }`}constructor(e,t,r,i){super(e,t,r,i),d.prototype.__init.call(this),this.proj=new l(this.transform)}__init(){this.vertexData2d=null}calculateVertices(){if(this.proj._affine)this.vertexData2d=null,super.calculateVertices();else{var e=this.geometry,t=e.buffers[0].data;if(e.vertexDirtyId!==this.vertexDirty||this._transformID!==this.transform._worldID){this._transformID=this.transform._worldID,this.vertexData.length!==t.length&&(this.vertexData=new Float32Array(t.length)),this.vertexData2d&&this.vertexData2d.length===3*t.length/2||(this.vertexData2d=new Float32Array(3*t.length));var r=this.proj.world.mat3,i=this.vertexData2d,n=this.vertexData;for(let e=0;er.call(t,...e)),t=void 0)}return r}([t,"access",e=>e.program,"access",e=>e.uniformData,"optionalAccess",e=>e.translationMatrix])&&(t.uniforms.translationMatrix=this.worldTransform.toArray(!0)),e.shader.bind(t,!1),e.state.set(this.state),e.geometry.bind(this.geometry,t),e.geometry.draw(this.drawMode,this.size,this.start,this.geometry.instanceCount)}toLocal(e,t,r,i,n=s.TRANSFORM_STEP.ALL){return $.call(this,e,t,r,i,n)}get worldTransform(){return this.proj.affine?this.transform.worldTransform:this.proj.world}}d.__initStatic(),d.__initStatic2();class ee extends d{constructor(e,t,r,i,n){super(new o.MeshGeometry(t,r,i),new o.MeshMaterial(e,{program:_.Program.from(d.defaultVertexShader,d.defaultFragmentShader),pluginName:"batch2d"}),null,n),ee.prototype.__init2.call(this),this.geometry.getBuffer("aVertexPosition").static=!1}__init2(){this.autoUpdate=!0}get vertices(){return this.geometry.getBuffer("aVertexPosition").data}set vertices(e){this.geometry.getBuffer("aVertexPosition").data=e}_render(e){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),super._render(e)}}class m extends t.Sprite{constructor(e){super(e),m.prototype.__init.call(this),this.proj=new l(this.transform),this.pluginName="batch2d"}__init(){this.vertexData2d=null}_calculateBounds(){this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData)}calculateVertices(){var n=this._texture;if(this.proj._affine)this.vertexData2d=null,super.calculateVertices();else{this.vertexData2d||(this.vertexData2d=new Float32Array(12));var o=this.transform._worldID,a=n._updateID;if(this._transformID!==o||this._textureID!==a){this._textureID!==a&&(this.uvs=n._uvs.uvsFloat32),this._transformID=o,this._textureID=a;var o=this.proj.world.mat3,a=this.vertexData2d,s=this.vertexData,l=n.trim,n=n.orig,u=this._anchor;let e,t,r,i;r=l?(t=l.x-u._x*n.width,e=t+l.width,(i=l.y-u._y*n.height)+l.height):(t=-u._x*n.width,e=t+n.width,(i=-u._y*n.height)+n.height),a[0]=o[0]*t+o[3]*i+o[6],a[1]=o[1]*t+o[4]*i+o[7],a[2]=o[2]*t+o[5]*i+o[8],a[3]=o[0]*e+o[3]*i+o[6],a[4]=o[1]*e+o[4]*i+o[7],a[5]=o[2]*e+o[5]*i+o[8],a[6]=o[0]*e+o[3]*r+o[6],a[7]=o[1]*e+o[4]*r+o[7],a[8]=o[2]*e+o[5]*r+o[8],a[9]=o[0]*t+o[3]*r+o[6],a[10]=o[1]*t+o[4]*r+o[7],a[11]=o[2]*t+o[5]*r+o[8],s[0]=a[0]/a[2],s[1]=a[1]/a[2],s[2]=a[3]/a[5],s[3]=a[4]/a[5],s[4]=a[6]/a[8],s[5]=a[7]/a[8],s[6]=a[9]/a[11],s[7]=a[10]/a[11]}}}calculateTrimmedVertices(){if(this.proj._affine)super.calculateTrimmedVertices();else{var e=this.transform._worldID,t=this._texture._updateID;if(this.vertexTrimmedData){if(this._transformTrimmedID===e&&this._textureTrimmedID===t)return}else this.vertexTrimmedData=new Float32Array(8);this._transformTrimmedID=e,this._textureTrimmedID=t;var e=this._texture,t=this.vertexTrimmedData,e=e.orig,r=this.tileProj?this._width:e.width,e=this.tileProj?this._height:e.height,i=this._anchor,n=this.proj.world.mat3,o=-i._x*r,r=o+r,i=-i._y*e,e=i+e,a=1/(n[2]*o+n[5]*i+n[8]);t[0]=a*(n[0]*o+n[3]*i+n[6]),t[1]=a*(n[1]*o+n[4]*i+n[7]),a=1/(n[2]*r+n[5]*i+n[8]),t[2]=a*(n[0]*r+n[3]*i+n[6]),t[3]=a*(n[1]*r+n[4]*i+n[7]),a=1/(n[2]*r+n[5]*e+n[8]),t[4]=a*(n[0]*r+n[3]*e+n[6]),t[5]=a*(n[1]*r+n[4]*e+n[7]),a=1/(n[2]*o+n[5]*e+n[8]),t[6]=a*(n[0]*o+n[3]*e+n[6]),t[7]=a*(n[1]*o+n[4]*e+n[7])}}toLocal(e,t,r,i,n=s.TRANSFORM_STEP.ALL){return $.call(this,e,t,r,i,n)}get worldTransform(){return this.proj.affine?this.transform.worldTransform:this.proj.world}}const te=new p.Transform;class re extends F.TilingSprite{constructor(e,t,r){super(e,t,r),this.tileProj=new l(this.tileTransform),this.tileProj.reverseLocalOrder=!0,this.proj=new l(this.transform),this.pluginName="tilingSprite2d",this.uvRespectAnchor=!0}get worldTransform(){return this.proj.affine?this.transform.worldTransform:this.proj.world}toLocal(e,t,r,i,n=s.TRANSFORM_STEP.ALL){return $.call(this,e,t,r,i,n)}_render(e){var t=this._texture;t&&t.valid&&(this.tileTransform.updateTransform(te),this.uvMatrix.update(),e.batch.setObjectRenderer(e.plugins[this.pluginName]),e.plugins[this.pluginName].render(this))}}function ie(){this.proj||(this.proj=new l(this.transform),this.toLocal=Q.prototype.toLocal,Object.defineProperty(this,"worldTransform",{get:Z,enumerable:!0,configurable:!0}))}e.Container.prototype.convertTo2d=ie,t.Sprite.prototype.convertTo2d=function(){this.proj||(this.calculateVertices=m.prototype.calculateVertices,this.calculateTrimmedVertices=m.prototype.calculateTrimmedVertices,this._calculateBounds=m.prototype._calculateBounds,this.pluginName="batch2d",ie.call(this))},e.Container.prototype.convertSubtreeTo2d=function(){this.convertTo2d();for(let e=0;e vFrame.z || pixels.y < vFrame.y || pixels.y > vFrame.w) { uv.x = vTrans1.x * surface2.x + vTrans1.y * surface2.y + vTrans1.z; uv.y = vTrans2.x * surface2.x + vTrans2.y * surface2.y + vTrans2.z; pixels = uv * vSamplerSize; if (pixels.x < vFrame.x || pixels.x > vFrame.z || pixels.y < vFrame.y || pixels.y > vFrame.w) { discard; } } vec4 edge; edge.xy = clamp(pixels - vFrame.xy + 0.5, vec2(0.0, 0.0), vec2(1.0, 1.0)); edge.zw = clamp(vFrame.zw - pixels + 0.5, vec2(0.0, 0.0), vec2(1.0, 1.0)); float alpha = 1.0; //edge.x * edge.y * edge.z * edge.w; vec4 rColor = vColor * alpha; float textureId = floor(vTextureId+0.5); vec2 vTextureCoord = uv; vec4 color; %forloop% gl_FragColor = color * rColor; }`,geometryClass:_e,vertexSize:16},e);return X=class extends Y{constructor(e){super(e),X.prototype.__init.call(this),X.prototype.__init2.call(this),X.prototype.__init3.call(this),this.shaderGenerator=new _.BatchShaderGenerator(t,r),this.geometryClass=n,this.vertexSize=i}__init(){this.defUniforms={translationMatrix:new p.Matrix,distortion:new Float32Array([0,0,1/0,1/0])}}__init2(){this.size=1e3}__init3(){this.forceMaxTextures=1}getUniforms(e){e=e.proj;return null!==e.surface?e.uniforms:null!==e._activeProjection?e._activeProjection.uniforms:this.defUniforms}packInterleavedGeometry(e,t,r,i,n){var{uint32View:o,float32View:a}=t,s=i/this.vertexSize,l=e.indices,u=e.vertexData,h=e._texture._frame,c=e.aTrans,{_batchLocation:f,realWidth:p,realHeight:d,resolution:m}=e._texture.baseTexture,t=Math.min(e.worldAlpha,1),_=t<1&&e._texture.baseTexture.alphaMode?g.premultiplyTint(e._tintRGB,t):e._tintRGB+(255*t<<24);for(let e=0;et[e]&&(i=t[e]),ot[e+1]&&(n=t[e+1]),aR[e]&&(l=P[t],P[t]=P[e],P[e]=l,l=R[t],R[t]=R[e],R[e]=l)}t[0]=P[0].x,t[1]=P[0].y,t[2]=P[1].x,t[3]=P[1].y,t[4]=P[2].x,t[5]=P[2].y,t[6]=P[3].x,t[7]=P[3].y,(P[3].x-P[2].x)*(P[1].y-P[2].y)-(P[1].x-P[2].x)*(P[3].y-P[2].y)<0&&(t[4]=P[3].x,t[5]=P[3].y)}}}const ve=new p.Matrix,M=new p.Rectangle,I=new p.Point;class ye extends C{constructor(...e){super(...e),ye.prototype.__init.call(this)}__init(){this.distortion=new p.Point}clear(){this.distortion.set(0,0)}apply(e,t){t=t||new p.Point;var r=this.distortion,i=e.x*e.y;return t.x=e.x+r.x*i,t.y=e.y+r.y*i,t}applyInverse(e,t){t=t||new p.Point;var r=e.x,e=e.y,i=this.distortion.x,n=this.distortion.y;if(0===i)t.x=r,t.y=e/(1+n*r);else if(0===n)t.y=e,t.x=r/(1+i*e);else{var e=.5*(e*i-r*n+1)/n,o=e*e+r/n;if(o<=1e-5)return t.set(NaN,NaN),t;t.x=0>0,0!==h._cycle&&h._cycle===h._totalTime/c&&p<=e&&h._cycle--,h._time=h._totalTime-h._cycle*c,h._yoyo&&0!=(1&h._cycle)&&(h._time=m-h._time,(u=h._yoyoEase||h.vars.yoyoEase)&&(h._yoyoEase||(!0!==u||h._initted?h._yoyoEase=u=!0===u?h._ease:u instanceof Ease?u:Ease.map[u]:(u=h.vars.ease,h._yoyoEase=u=u?u instanceof Ease?u:"function"==typeof u?new Ease(u,h.vars.easeParams):Ease.map[u]||g.defaultEase:g.defaultEase)),h.ratio=u?1-u.getRatio((m-h._time)/m):0)),h._time>m?h._time=m:h._time<0&&(h._time=0)),h._easeType&&!u?(c=h._time/m,(1===(a=h._easeType)||3===a&&.5<=c)&&(c=1-c),3===a&&(c*=2),1===(s=h._easePower)?c*=c:2===s?c*=c*c:3===s?c*=c*c*c:4===s&&(c*=c*c*c*c),h.ratio=1===a?1-c:2===a?c:h._time/m<.5?c/2:1-c/2):u||(h.ratio=h._ease.getRatio(h._time/m))),f!==h._time||r||d!==h._cycle){if(!h._initted){if(h._init(),!h._initted||h._gc)return;if(!r&&h._firstPT&&(!1!==h.vars.lazy&&h._duration||h.vars.lazy&&!h._duration))return h._time=f,h._totalTime=p,h._rawPrevTime=_,h._cycle=d,x.lazyTweens.push(h),void(h._lazy=[e,t]);!h._time||i||u?i&&this._ease._calcEnd&&!u&&(h.ratio=h._ease.getRatio(0===h._time?0:1)):h.ratio=h._ease.getRatio(h._time/m)}for(!1!==h._lazy&&(h._lazy=!1),h._active||!h._paused&&h._time!==f&&0<=e&&(h._active=!0),0===p&&(2===h._initted&&0e._startTime;l._timeline;)u&&l._timeline.smoothChildTiming?l.totalTime(l._totalTime,!0):l._gc&&l._enabled(!0,!1),l=l._timeline;return h},e.remove=function(e){var t;if(e instanceof c)return this._remove(e,!1),t=e._timeline=e.vars.useFrames?c._rootFramesTimeline:c._rootTimeline,e._startTime=(e._paused?e._pauseTime:t._time)-(e._reversed?e.totalDuration()-e._totalTime:e._totalTime)/e._timeScale,this;if(e instanceof Array||e&&e.push&&p(e)){for(var r=e.length;-1<--r;)this.remove(e[r]);return this}return"string"==typeof e?this.removeLabel(e):this.kill(null,e)},e._remove=function(e,t){return f.prototype._remove.call(this,e,t),this._last?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},e.append=function(e,t){return this.add(e,this._parseTimeOrLabel(null,t,!0,e))},e.insert=e.insertMultiple=function(e,t,r,i){return this.add(e,t||0,r,i)},e.appendMultiple=function(e,t,r,i){return this.add(e,this._parseTimeOrLabel(null,t,!0,e),r,i)},e.addLabel=function(e,t){return this._labels[e]=this._parseTimeOrLabel(t),this},e.addPause=function(e,t,r,i){r=d.delayedCall(0,n,r,i||this);return r.vars.onComplete=r.vars.onReverseComplete=t,r.data="isPause",this._hasPause=!0,this.add(r,e)},e.removeLabel=function(e){return delete this._labels[e],this},e.getLabelTime=function(e){return null!=this._labels[e]?this._labels[e]:-1},e._parseTimeOrLabel=function(e,t,r,i){var n,o;if(i instanceof c&&i.timeline===this)this.remove(i);else if(i&&(i instanceof Array||i.push&&p(i)))for(o=i.length;-1<--o;)i[o]instanceof c&&i[o].timeline===this&&this.remove(i[o]);if(n="number"!=typeof e||t?99999999999=e&&!l;)i._duration||"isPause"===i.data&&0c._time;)l.render(l._reversed?l.totalDuration()-(e-l._startTime)*l._timeScale:(e-l._startTime)*l._timeScale,t,r),l=l._prev;l=null,c.pause(),c._pauseTime=h}i._reversed?i.render((i._dirty?i.totalDuration():i._totalDuration)-(e-i._startTime)*i._timeScale,t,r):i.render((e-i._startTime)*i._timeScale,t,r)}i=o}!c._onUpdate||t||(b.length&&x(),c._callback("onUpdate")),!a||c._gc||d!==c._startTime&&m===c._timeScale||(0===c._time||p>=c.totalDuration())&&(n&&(b.length&&x(),c._timeline.autoRemoveChildren&&c._enabled(!1,!1),c._active=!1),!t&&c.vars[a]&&c._callback(a))}},e._hasPausedChild=function(){for(var e=this._first;e;){if(e._paused||e instanceof m&&e._hasPausedChild())return!0;e=e._next}return!1},e.getChildren=function(e,t,r,i){i=i||-9999999999;for(var n=[],o=this._first,a=0;o;)o._startTime=r&&(n._startTime+=e),n=n._next;if(t)for(i in o)o[i]>=r&&(o[i]+=e);return this._uncache(!0)},e._kill=function(e,t){if(!e&&!t)return this._enabled(!1,!1);for(var r=t?this.getTweensOf(t):this.getChildren(!0,!0,!1),i=r.length,n=!1;-1<--i;)r[i]._kill(e,t)&&(n=!0);return n},e.clear=function(e){var t=this.getChildren(!1,!0,!0),r=t.length;for(this._time=this._totalTime=0;-1<--r;)t[r]._enabled(!1,!1);return!1!==e&&(this._labels={}),this._uncache(!0)},e.invalidate=function(){for(var e=this._first;e;)e.invalidate(),e=e._next;return c.prototype.invalidate.call(this)},e._enabled=function(e,t){if(e===this._gc)for(var r=this._first;r;)r._enabled(e,!0),r=r._next;return f.prototype._enabled.call(this,e,t)},e.totalTime=function(e,t,r){this._forcingPlayhead=!0;var i=c.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,i},e.duration=function(e){return arguments.length?(0!==this.duration()&&0!==e&&this.timeScale(this._duration/e),this):(this._dirty&&this.totalDuration(),this._duration)},e.totalDuration=function(e){if(arguments.length)return e&&this.totalDuration()?this.timeScale(this._totalDuration/e):this;if(this._dirty){for(var t,r,i=0,n=this,o=n._last,a=999999999999;o;)t=o._prev,o._dirty&&o.totalDuration(),o._startTime>a&&n._sortChildren&&!o._paused&&!n._calculatingDuration?(n._calculatingDuration=1,n.add(o,o._startTime-o._delay),n._calculatingDuration=0):a=o._startTime,o._startTime<0&&!o._paused&&(i-=o._startTime,n._timeline.smoothChildTiming&&(n._startTime+=o._startTime/n._timeScale,n._time-=o._startTime,n._totalTime-=o._startTime,n._rawPrevTime-=o._startTime),n.shiftChildren(-o._startTime,!1,-9999999999),a=0),i<(r=o._startTime+o._totalDuration/o._timeScale)&&(i=r),o=t;n._duration=n._totalDuration=i,n._dirty=!1}return this._totalDuration},e.paused=function(e){if(!1===e&&this._paused)for(var t=this._first;t;)t._startTime===this._time&&"isPause"===t.data&&(t._rawPrevTime=0),t=t._next;return c.prototype.paused.apply(this,arguments)},e.usesFrames=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===c._rootFramesTimeline},e.rawTime=function(e){return e&&(this._paused||this._repeat&&0>0,c._cycle&&c._cycle===c._totalTime/x&&m<=e&&c._cycle--,c._time=c._totalTime-c._cycle*x,c._yoyo&&1&c._cycle&&(c._time=d-c._time),c._time>d?e=(c._time=d)+1e-4:c._time<0?c._time=e=0:e=c._time));if(c._hasPause&&!c._forcingPlayhead&&!t){if(f<(e=c._time)||c._repeat&&b!==c._cycle)for(i=c._first;i&&i._startTime<=e&&!l;)i._duration||"isPause"!==i.data||i.ratio||0===i._startTime&&0===c._rawPrevTime||(l=i),i=i._next;else for(i=c._last;i&&i._startTime>=e&&!l;)i._duration||"isPause"===i.data&&0c._time;)l.render(l._reversed?l.totalDuration()-(e-l._startTime)*l._timeScale:(e-l._startTime)*l._timeScale,t,r),l=l._prev;l=null,c.pause(),c._pauseTime=h}i._reversed?i.render((i._dirty?i.totalDuration():i._totalDuration)-(e-i._startTime)*i._timeScale,t,r):i.render((e-i._startTime)*i._timeScale,t,r)}i=o}!c._onUpdate||t||(O.length&&P(),c._callback("onUpdate")),!a||c._locked||c._gc||_!==c._startTime&&g===c._timeScale||(0===c._time||p>=c.totalDuration())&&(n&&(O.length&&P(),c._timeline.autoRemoveChildren&&c._enabled(!1,!1),c._active=!1),!t&&c.vars[a]&&c._callback(a))}else m!==c._totalTime&&c._onUpdate&&!t&&c._callback("onUpdate")},i.getActive=function(e,t,r){for(var i,n=[],o=this.getChildren(e||null==e,t||null==e,!!r),a=0,s=o.length,l=0;le)return t[i].name;return null},i.getLabelBefore=function(e){null==e&&(e=this._time);for(var t=this.getLabelsArray(),r=t.length;-1<--r;)if(t[r].time>0||6)-1,c=[],f=[];for(r in e){x=b=y=v=x=g=_=m=d=p=y=A=S=void 0;for(var p,d,m,_,g,v,y,b,x,T=e[r],w=a,E=t,S=1/E,A=T.length;-1<--A;)for(d=(b=T[A]).a,m=b.d-d,_=b.c-d,g=b.b-d,p=0,v=1;v<=E;v++)y=p-(p=((x=S*v)*x*m+3*(y=1-x)*(x*_+y*g))*x),w[x=A*E+v-1]=(w[x]||0)+y*y}for(n=a.length,i=0;i>0]=f,s[o]=u,l=0,f=[]);return{length:u,lengths:s,segments:c}}(this._beziers,this._timeRes),this._length=h.length,this._lengths=h.lengths,this._segments=h.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length),c=this._autoRotate)for(this._initialRotations=[],c[0]instanceof Array||(this._autoRotate=c=[c]),o=c.length;-1<--o;){for(a=0;a<3;a++)i=c[o][a],this._func[i]="function"==typeof e[i]&&e[i.indexOf("set")||"function"!=typeof e["get"+i.substr(3)]?i:"get"+i.substr(3)];i=c[o][2],this._initialRotations[o]=(this._func[i]?this._func[i].call(this._target):this._target[i])||0,this._overwriteProps.push(i)}return this._startRatio=r.vars.runBackwards?1:0,!0},set:function(e){var t,r,i,n,o,a,s,l,u,h,c=this._segCount,f=this._func,p=this._target,d=e!==this._startRatio;if(this._timeRes){if(l=this._lengths,u=this._curSeg,h=e*this._length,w=this._li,h>this._l2&&w=h;);0===w&&hthis._s2&&w=h;);0===w&&h>0)*(1/c))*c;for(r=1-o,w=this._props.length;-1<--w;)i=this._props[w],a=(o*o*(n=this._beziers[i][t]).da+3*r*(o*n.ca+r*n.ba))*o+n.a,this._mod[i]&&(a=this._mod[i](a,p)),f[i]?p[i](a):p[i]=a;if(this._autoRotate)for(var m,_,g,v,y,b,x,T=this._autoRotate,w=T.length;-1<--w;)i=T[w][2],b=T[w][3]||0,x=!0===T[w][4]?1:E,n=this._beziers[T[w][0]],m=this._beziers[T[w][1]],n&&m&&(n=n[t],m=m[t],_=n.a+(n.b-n.a)*o,_+=((v=n.b+(n.c-n.b)*o)-_)*o,v+=(n.c+(n.d-n.c)*o-v)*o,g=m.a+(m.b-m.a)*o,g+=((y=m.b+(m.c-m.b)*o)-g)*o,y+=(m.c+(m.d-m.c)*o-y)*o,a=d?Math.atan2(y-g,v-_)*x+b:this._initialRotations[w],this._mod[i]&&(a=this._mod[i](a,p)),f[i]?p[i](a):p[i]=a)}}),e=_.prototype,_.bezierThrough=f,_.cubicToQuadratic=j,_._autoCSS=!0,_.quadraticToCubic=function(e,t,r){return new B(e,(2*t+e)/3,(2*t+r)/3,r)},_._cssRegister=function(){var p,d,m,e=t.CSSPlugin;e&&(e=e._internals,p=e._parseToProxy,d=e._setPluginRatio,m=e.CSSPropTween,e._registerComplexSpecialProp("bezier",{parser:function(e,t,r,i,n,o){t instanceof Array&&(t={values:t}),o=new _;var a,s,l,u=t.values,h=u.length-1,c=[],f={};if(!(h<0)){for(a=0;a<=h;a++)l=p(e,u[a],i,n,o,h!==a),c[a]=l.end;for(s in t)f[s]=t[s];f.values=c,(n=new m(e,"bezier",0,0,l.pt,2)).data=l,n.plugin=o,n.setRatio=d,0===f.autoRotate&&(f.autoRotate=!0),!f.autoRotate||f.autoRotate instanceof Array||(a=!0===f.autoRotate?0:Number(f.autoRotate),f.autoRotate=null!=l.end.left?[["left","top","rotation",a,!1]]:null!=l.end.x&&[["x","y","rotation",a,!1]]),f.autoRotate&&(i._transform||i._enableTransforms(!1),l.autoRotate=i._target._gsTransform,l.proxy.rotation=l.autoRotate.rotation||0,i._overwriteProps.push("rotation")),o._onInitTween(l.proxy,f,i._tween)}return n}}))},e._mod=function(e){for(var t,r=this._overwriteProps,i=r.length;-1<--i;)(t=e[r[i]])&&"function"==typeof t&&(this._mod[r[i]]=t)},e._kill=function(e){var t,r,i=this._props;for(t in this._beziers)if(t in e)for(delete this._beziers[t],delete this._func[t],r=i.length;-1<--r;)i[r]===t&&i.splice(r,1);if(i=this._autoRotate)for(r=i.length;-1<--r;)e[i[r][2]]&&i.splice(r,1);return this._super._kill.call(this,e)},_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(a,R){function C(){a.call(this,"css"),this._overwriteProps.length=0,this.setRatio=C.prototype.setRatio}function s(e,t){return t.toUpperCase()}function l(e,t){return(t=L.createElementNS?L.createElementNS(t||"http://www.w3.org/1999/xhtml",e):L.createElement(e)).style?t:L.createElement(e)}function u(e){return ne.test("string"==typeof e?e:(e.currentStyle||e.style).filter||"")?parseFloat(RegExp.$1)/100:1}function _(e){_gsScope.console&&console.log(e)}function T(e,t){var r,i,n=(t=t||F).style;if(void 0!==n[e])return e;for(e=e.charAt(0).toUpperCase()+e.substr(1),r=["O","Moz","ms","Ms","Webkit"],i=5;-1<--i&&void 0===n[r[i]+e];);return 0<=i?(ve="-"+(ye=3===i?"ms":r[i]).toLowerCase()+"-",ye+e):null}function d(e){return be.getComputedStyle(e)}function f(e,t){var r,i,n={};if(t=t||d(e))if(r=t.length)for(;-1<--r;)-1!==(i=t[r]).indexOf("-transform")&&Ge!==i||(n[i.replace(ue,s)]=t.getPropertyValue(i));else for(r in t)-1!==r.indexOf("Transform")&&H!==r||(n[r]=t[r]);else if(t=e.currentStyle||e.style)for(r in t)"string"==typeof r&&void 0===n[r]&&(n[r.replace(ue,s)]=t[r]);return N||(n.opacity=u(e)),e=Je(e,t,!1),n.rotation=e.rotation,n.skewX=e.skewX,n.scaleX=e.scaleX,n.scaleY=e.scaleY,n.x=e.x,n.y=e.y,Y&&(n.z=e.z,n.rotationX=e.rotationX,n.rotationY=e.rotationY,n.scaleZ=e.scaleZ),n.filters&&delete n.filters,n}function g(e,t,r,i,n){var o,a,s,l={},u=e.style;for(a in r)"cssText"===a||"length"!==a&&isNaN(a)&&(t[a]!==(o=r[a])||n&&n[a])&&-1===a.indexOf("Origin")&&("number"==typeof o||"string"==typeof o)&&(l[a]="auto"!==o||"left"!==a&&"top"!==a?""!==o&&"auto"!==o&&"none"!==o||"string"!=typeof t[a]||""===t[a].replace(re,"")?o:0:xe(e,a),void 0!==u[a]&&(s=new Oe(u,a,u[a],s)));if(i)for(a in i)"className"!==a&&(l[a]=i[a]);return{difs:l,firstMPT:s}}function A(e,t){return"string"==typeof(e="function"==typeof e?e(P,O):e)&&"="===e.charAt(1)?parseInt(e.charAt(0)+"1",10)*parseFloat(e.substr(2)):parseFloat(e)-parseFloat(t)||0}function E(e,t){var r="string"==typeof(e="function"==typeof e?e(P,O):e)&&"="===e.charAt(1);return null==(e="string"==typeof e&&"v"===e.charAt(e.length-2)?(r?e.substr(0,2):0)+window["inner"+("vh"===e.substr(-2)?"Height":"Width")]*(parseFloat(r?e.substr(2):e)/100):e)?t:r?parseInt(e.charAt(0)+"1",10)*parseFloat(e.substr(2))+t:parseFloat(e)||0}function S(e,t,r,i){var n,o;return n=(n=null==(e="function"==typeof e?e(P,O):e)?t:"number"==typeof e?e:(n=e.split("_"),o=((o="="===e.charAt(1))?parseInt(e.charAt(0)+"1",10)*parseFloat(n[0].substr(2)):parseFloat(n[0]))*(-1===e.indexOf("rad")?1:D)-(o?0:t),n.length&&(i&&(i[r]=t+o),-1!==e.indexOf("short")&&(o%=360)!==o%180&&(o=o<0?o+360:o-360),-1!==e.indexOf("_cw")&&o<0?o=(o+3599999999640)%360-360*(o/360|0):-1!==e.indexOf("ccw")&&0>16,e>>8&255,255&e];else{if(","===e.charAt(e.length-1)&&(e=e.substr(0,e.length-1)),Ee[e])r=Ee[e];else if("#"===e.charAt(0))4===e.length&&(e="#"+(i=e.charAt(1))+i+(n=e.charAt(2))+n+(o=e.charAt(3))+o),r=[(e=parseInt(e.substr(1),16))>>16,e>>8&255,255&e];else if("hsl"===e.substr(0,3))if(r=u=e.match(Q),t){if(-1!==e.indexOf("="))return e.match($)}else a=Number(r[0])%360/360,s=Number(r[1])/100,i=2*(l=Number(r[2])/100)-(n=l<=.5?l*(s+1):l+s-l*s),3i--)for(;++ii--)for(;++i>0];return i.parse(e,a,n,o)}}function Oe(e,t,r,i,n){this.t=e,this.p=t,this.v=r,this.r=n,i&&((i._prev=this)._next=i)}t._setPluginRatio=function(e){this.plugin.setRatio(e);for(var t,r,i,n,o,a=this.data,s=a.proxy,l=a.firstMPT;l;)t=s[l.v],l.r?t=l.r(t):t<1e-6&&-1e-6s.length?l:s).length,a=0;an.pr;)o=o._next;(n._prev=o?o._prev:s)?n._prev._next=n:a=n,(n._next=o)?o._prev=n:s=n,n=l}this._firstPT=a}return!0},e.parse=function(e,t,r,i){var n,o,a,s,l,u,h,c,f=e.style;for(n in t){if(l=t[n],s=m[n],"function"!=typeof l||s&&s.allowFunc||(l=l(P,O)),s)r=s.parse(e,l,n,this,r,i,t);else{if("--"===n.substr(0,2)){this._tween._propLookup[n]=this._addTween.call(this._tween,e.style,"setProperty",d(e).getPropertyValue(n)+"",l+"",n,!1,n);continue}s=z(e,n,k)+"",h="string"==typeof l,"color"===n||"fill"===n||"stroke"===n||-1!==n.indexOf("Color")||h&&se.test(l)?(h||(l=(3<(l=Se(l)).length?"rgba(":"rgb(")+l.join(",")+")"),r=Re(f,n,s,l,!0,"transparent",r,0,i)):h&&de.test(l)?r=Re(f,n,s,l,!0,null,r,0,i):(u=(o=parseFloat(s))||0===o?s.substr((o+"").length):"",""!==s&&"auto"!==s||(u="width"===n||"height"===n?(o=function(e,t,r){if("svg"===(e.nodeName+"").toLowerCase())return(r||d(e))[t]||0;if(e.getCTM&&Ve(e))return e.getBBox()[t]||0;var i=parseFloat("width"===t?e.offsetWidth:e.offsetHeight),n=Te[t],o=n.length;for(r=r||d(e);-1<--o;)i=(i-=parseFloat(z(e,"padding"+n[o],r,!0))||0)-(parseFloat(z(e,"border"+n[o]+"Width",r,!0))||0);return i}(e,n,k),"px"):"left"===n||"top"===n?(o=xe(e,n,k),"px"):(o="opacity"!==n?0:1,"")),""===(h=(c=h&&"="===l.charAt(1))?(a=parseInt(l.charAt(0)+"1",10),l=l.substr(2),a*=parseFloat(l),l.replace(ie,"")):(a=parseFloat(l),h?l.replace(ie,""):""))&&(h=n in W?W[n]:u),l=a||0===a?(c?a+o:a)+h:t[n],u===h||""===h&&"lineHeight"!==n||(a||0===a)&&o&&(o=w(e,n,o,u),"%"===h?(o/=w(e,n,100,"%")/100,!0!==t.strictUnits&&(s=o+"%")):"em"===h||"rem"===h||"vw"===h||"vh"===h?o/=w(e,n,1,h):"px"!==h&&(a=w(e,n,a,h),h="px"),c&&(a||0===a)&&(l=a+o+h)),c&&(a+=o),!o&&0!==o||!a&&0!==a?void 0!==f[n]&&(l||l+""!="NaN"&&null!=l)?(r=new U(f,n,a||o||0,0,r,-1,n,!1,0,s,l)).xs0="none"!==l||"display"!==n&&-1===n.indexOf("Style")?l:s:_("invalid "+n+" tween value: "+t[n]):(r=new U(f,n,o,a-o,r,0,n,!1!==q&&("px"===h||"zIndex"===n),0,s,l)).xs0=h)}i&&r&&!r.plugin&&(r.plugin=i)}return r},e.setRatio=function(e){var t,r,i,n=this._firstPT;if(1!==e||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(e||this._tween._time!==this._tween._duration&&0!==this._tween._time||-1e-6===this._tween._rawPrevTime)for(;n;){if(t=n.c*e+n.s,n.r?t=n.r(t):t<1e-6&&-1e-6this._p3?this._calcEnd?1===e?0:1-(e=(e-this._p3)/this._p1)*e:t+(e-t)*(e=(e-this._p3)/this._p1)*e*e*e:this._calcEnd?1:t},f.ease=new f(.7,.7),p.config=f.config=function(e,t,r){return new f(e,t,r)},(p=(i=h("easing.SteppedEase",function(e,t){this._p1=1/(e=e||1),this._p2=e+(t?0:1),this._p3=t?1:0},!0)).prototype=new _).constructor=i,p.getRatio=function(e){return e<0?e=0:1<=e&&(e=.999999999),((this._p2*e|0)+this._p3)*this._p1},p.config=i.config=function(e,t){return new i(e,t)},(p=(n=h("easing.ExpoScaleEase",function(e,t,r){this._p1=Math.log(t/e),this._p2=t-e,this._p3=e,this._ease=r},!0)).prototype=new _).constructor=n,p.getRatio=function(e){return this._ease&&(e=this._ease.getRatio(e)),(this._p3*Math.exp(this._p1*e)-this._p3)/this._p2},p.config=n.config=function(e,t,r){return new n(e,t,r)},(p=(o=h("easing.RoughEase",function(e){for(var t,r,i,n,o,a,s=(e=e||{}).taper||"none",l=[],u=0,h=0|(e.points||20),c=h,f=!1!==e.randomize,p=!0===e.clamp,d=e.template instanceof _?e.template:null,m="number"==typeof e.strength?.4*e.strength:.4;-1<--c;)t=f?Math.random():1/h*c,r=d?d.getRatio(t):t,i="none"===s?m:"out"===s?(n=1-t)*n*m:"in"===s?t*t*m:t<.5?(n=2*t)*n*.5*m:(n=2*(1-t))*n*.5*m,f?r+=Math.random()*i-.5*i:c%2?r+=.5*i:r-=.5*i,p&&(1t.t){for(;t.next&&e>=t.t;)t=t.next;t=t.prev}else for(;t.prev&&e<=t.t;)t=t.prev;return(this._prev=t).v+(e-t.t)/t.gap*t.c},p.config=function(e){return new o(e)},o.ease=new o,t("Bounce",e("BounceOut",function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}),e("BounceIn",function(e){return(e=1-e)<1/2.75?1-7.5625*e*e:e<2/2.75?1-(7.5625*(e-=1.5/2.75)*e+.75):e<2.5/2.75?1-(7.5625*(e-=2.25/2.75)*e+.9375):1-(7.5625*(e-=2.625/2.75)*e+.984375)}),e("BounceInOut",function(e){var t=e<.5;return(e=t?1-2*e:2*e-1)<1/2.75?e*=7.5625*e:e=e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,t?.5*(1-e):.5*e+.5})),t("Circ",e("CircOut",function(e){return Math.sqrt(1-(e-=1)*e)}),e("CircIn",function(e){return-(Math.sqrt(1-e*e)-1)}),e("CircInOut",function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)})),t("Elastic",(p=function(e,t,r){var i=h("easing."+e,function(e,t){this._p1=1<=e?e:1,this._p2=(t||r)/(e<1?e:1),this._p3=this._p2/l*(Math.asin(1/this._p1)||0),this._p2=l/this._p2},!0),e=i.prototype=new _;return e.constructor=i,e.getRatio=t,e.config=function(e,t){return new i(e,t)},i})("ElasticOut",function(e){return this._p1*Math.pow(2,-10*e)*Math.sin((e-this._p3)*this._p2)+1},.3),p("ElasticIn",function(e){return-(this._p1*Math.pow(2,10*--e)*Math.sin((e-this._p3)*this._p2))},.3),p("ElasticInOut",function(e){return(e*=2)<1?this._p1*Math.pow(2,10*--e)*Math.sin((e-this._p3)*this._p2)*-.5:this._p1*Math.pow(2,-10*--e)*Math.sin((e-this._p3)*this._p2)*.5+1},.45)),t("Expo",e("ExpoOut",function(e){return 1-Math.pow(2,-10*e)}),e("ExpoIn",function(e){return Math.pow(2,10*(e-1))-.001}),e("ExpoInOut",function(e){return(e*=2)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*(e-1)))})),t("Sine",e("SineOut",function(e){return Math.sin(e*u)}),e("SineIn",function(e){return 1-Math.cos(e*u)}),e("SineInOut",function(e){return-.5*(Math.cos(Math.PI*e)-1)})),h("easing.EaseLookup",{find:function(e){return _.map[e]}},!0),c(a.SlowMo,"SlowMo","ease,"),c(o,"RoughEase","ease,"),c(i,"SteppedEase","ease,"),s},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),!function(m,f){"use strict";var p={},d=m.document,_=m.GreenSockGlobals=m.GreenSockGlobals||m,e=_[f];if(e)"undefined"!=typeof module&&module.exports&&(module.exports=e);else{var g,t,F,N=function(e){for(var t=e.split("."),r=_,i=0;i=t&&ethis._duration?this._duration:e,t)):this._time},n.totalTime=function(e,t,r){if(g||O.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(e<0&&!r&&(e+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var i=this._totalDuration,n=this._timeline;if(io;)n=n._prev;return n?(e._next=n._next,n._next=e):(e._next=this._first,this._first=e),e._next?e._next._prev=e:this._last=e,e._prev=n,this._recent=e,this._timeline&&this._uncache(!0),this},n._remove=function(e,t){return e.timeline===this&&(t||e._enabled(!1,!0),e._prev?e._prev._next=e._next:this._first===e&&(this._first=e._next),e._next?e._next._prev=e._prev:this._last===e&&(this._last=e._prev),e._next=e._prev=e.timeline=null,e===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},n.render=function(e,t,r){var i,n=this._first;for(this._totalTime=this._time=this._rawPrevTime=e;n;)i=n._next,(n._active||e>=n._startTime&&!n._paused&&!n._gc)&&(n._reversed?n.render((n._dirty?n.totalDuration():n._totalDuration)-(e-n._startTime)*n._timeScale,t,r):n.render((e-n._startTime)*n._timeScale,t,r)),n=i},n.rawTime=function(){return g||O.wake(),this._totalTime},x("TweenLite",function(e,t,r){if(s.call(this,t,r),this.render=P.prototype.render,null==e)throw"Cannot tween a null target.";this.target=e="string"==typeof e&&P.selector(e)||e;var i,n,o,r=e.jquery||e.length&&e!==m&&e[0]&&(e[0]===m||e[0].nodeType&&e[0].style&&!e.nodeType),a=this.vars.overwrite;if(this._overwrite=a=null==a?ee[P.defaultOverwrite]:"number"==typeof a?a>>0:ee[a],(r||e instanceof Array||e.push&&y(e))&&"number"!=typeof e[0])for(this._targets=o=z(e),this._propLookup=[],this._siblings=[],i=0;i=te){for(r in te=O.frame+(parseInt(P.autoSleep,10)||120),l){for(e=(t=l[r].tweens).length;-1<--e;)t[e]._gc&&t.splice(e,1);0===t.length&&delete l[r]}if((!(r=h._first)||r._paused)&&P.autoSleep&&!u._first&&1===O._listeners.tick.length){for(;r&&r._paused;)r=r._next;r||O.sleep()}}},O.addEventListener("tick",s._updateRoot),function(e,t,r){var i,n,o=e._gsTweenID;if(l[o||(e._gsTweenID=o="t"+Q++)]||(l[o]={target:e,tweens:[]}),t&&((i=l[o].tweens)[n=i.length]=t,r))for(;-1<--n;)i[n]===t&&i.splice(n,1);return l[o].tweens}),re=function(e,t,r,i){var n,o,a=e.vars.onOverwrite;return a&&(n=a(e,t,r,i)),(a=P.onOverwrite)&&(o=a(e,t,r,i)),!1!==n&&!1!==o},ie=function(e,t,r,i,n){var o,a,s;if(1===i||4<=i){for(s=n.length,p=0;pu&&((f||!a._initted)&&u-a._startTime<=2e-8||(h[c++]=a)));for(p=c;-1<--p;)s=(a=h[p])._firstPT,2===i&&a._kill(r,e,t)&&(o=!0),(2!==i||!a._firstPT&&a._initted&&s)&&(2===i||re(a,t))&&a._enabled(!1,!1)&&(o=!0)}return o},ne=function(e,t,r){for(var i=e._timeline,n=i._timeScale,o=e._startTime;i._timeline;){if(o+=i._startTime,n*=i._timeScale,i._paused)return-100;i=i._timeline}return t<(o/=n)?o-t:r&&o===t||!e._initted&&o-t<2e-8?v:(o+=e.totalDuration()/e._timeScale/n)>t+v?0:o-t-v},L=(n._init=function(){var e,t,r,i,n,o,a=this.vars,s=this._overwrittenProps,l=this._duration,u=!!a.immediateRender,h=a.ease,c=this._startAt;if(a.startAt){for(i in c&&(c.render(-1,!0),c.kill()),n={},a.startAt)n[i]=a.startAt[i];if(n.data="isStart",n.overwrite=!1,n.immediateRender=!0,n.lazy=u&&!1!==a.lazy,n.startAt=n.delay=null,n.onUpdate=a.onUpdate,n.onUpdateParams=a.onUpdateParams,n.onUpdateScope=a.onUpdateScope||a.callbackScope||this,this._startAt=P.to(this.target||{},0,n),u)if(0s.pr;)i=i._next;(s._prev=i?i._prev:o)?s._prev._next=s:n=s,(s._next=i)?i._prev=s:o=s,s=a}s=t._firstPT=n}for(;s;)s.pg&&"function"==typeof s.t[e]&&s.t[e]()&&(r=!0),s=s._next;return r},L.activate=function(e){for(var t=e.length;-1<--t;)e[t].API===L.API&&(M[(new e[t])._propName]=e[t]);return!0},i.plugin=function(e){if(!(e&&e.propName&&e.init&&e.API))throw"illegal plugin definition.";var t,r=e.propName,i=e.priority||0,n=e.overwriteProps,o={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},a=x("plugins."+r.charAt(0).toUpperCase()+r.substr(1)+"Plugin",function(){L.call(this,r,i),this._overwriteProps=n||[]},!0===e.global),s=a.prototype=new L(r);for(t in(s.constructor=a).API=e.API,o)"function"==typeof e[t]&&(s[o[t]]=e[t]);return a.version=e.version,L.activate([a]),a},o=m._gsQueue){for(a=0;a>0,c._cycle&&c._cycle===c._totalTime/x&&m<=e&&c._cycle--,c._time=c._totalTime-c._cycle*x,c._yoyo&&1&c._cycle&&(c._time=d-c._time),c._time>d?e=(c._time=d)+1e-4:c._time<0?c._time=e=0:e=c._time));if(c._hasPause&&!c._forcingPlayhead&&!t){if(f<(e=c._time)||c._repeat&&b!==c._cycle)for(i=c._first;i&&i._startTime<=e&&!l;)i._duration||"isPause"!==i.data||i.ratio||0===i._startTime&&0===c._rawPrevTime||(l=i),i=i._next;else for(i=c._last;i&&i._startTime>=e&&!l;)i._duration||"isPause"===i.data&&0c._time;)l.render(l._reversed?l.totalDuration()-(e-l._startTime)*l._timeScale:(e-l._startTime)*l._timeScale,t,r),l=l._prev;l=null,c.pause(),c._pauseTime=h}i._reversed?i.render((i._dirty?i.totalDuration():i._totalDuration)-(e-i._startTime)*i._timeScale,t,r):i.render((e-i._startTime)*i._timeScale,t,r)}i=o}!c._onUpdate||t||(O.length&&P(),c._callback("onUpdate")),!a||c._locked||c._gc||_!==c._startTime&&g===c._timeScale||(0===c._time||p>=c.totalDuration())&&(n&&(O.length&&P(),c._timeline.autoRemoveChildren&&c._enabled(!1,!1),c._active=!1),!t&&c.vars[a]&&c._callback(a))}else m!==c._totalTime&&c._onUpdate&&!t&&c._callback("onUpdate")},i.getActive=function(e,t,r){for(var i,n=[],o=this.getChildren(e||null==e,t||null==e,!!r),a=0,s=o.length,l=0;le)return t[i].name;return null},i.getLabelBefore=function(e){null==e&&(e=this._time);for(var t=this.getLabelsArray(),r=t.length;-1<--r;)if(t[r].timee._startTime;l._timeline;)u&&l._timeline.smoothChildTiming?l.totalTime(l._totalTime,!0):l._gc&&l._enabled(!0,!1),l=l._timeline;return h},e.remove=function(e){var t;if(e instanceof c)return this._remove(e,!1),t=e._timeline=e.vars.useFrames?c._rootFramesTimeline:c._rootTimeline,e._startTime=(e._paused?e._pauseTime:t._time)-(e._reversed?e.totalDuration()-e._totalTime:e._totalTime)/e._timeScale,this;if(e instanceof Array||e&&e.push&&p(e)){for(var r=e.length;-1<--r;)this.remove(e[r]);return this}return"string"==typeof e?this.removeLabel(e):this.kill(null,e)},e._remove=function(e,t){return f.prototype._remove.call(this,e,t),this._last?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},e.append=function(e,t){return this.add(e,this._parseTimeOrLabel(null,t,!0,e))},e.insert=e.insertMultiple=function(e,t,r,i){return this.add(e,t||0,r,i)},e.appendMultiple=function(e,t,r,i){return this.add(e,this._parseTimeOrLabel(null,t,!0,e),r,i)},e.addLabel=function(e,t){return this._labels[e]=this._parseTimeOrLabel(t),this},e.addPause=function(e,t,r,i){r=d.delayedCall(0,n,r,i||this);return r.vars.onComplete=r.vars.onReverseComplete=t,r.data="isPause",this._hasPause=!0,this.add(r,e)},e.removeLabel=function(e){return delete this._labels[e],this},e.getLabelTime=function(e){return null!=this._labels[e]?this._labels[e]:-1},e._parseTimeOrLabel=function(e,t,r,i){var n,o;if(i instanceof c&&i.timeline===this)this.remove(i);else if(i&&(i instanceof Array||i.push&&p(i)))for(o=i.length;-1<--o;)i[o]instanceof c&&i[o].timeline===this&&this.remove(i[o]);if(n="number"!=typeof e||t?99999999999=e&&!l;)i._duration||"isPause"===i.data&&0c._time;)l.render(l._reversed?l.totalDuration()-(e-l._startTime)*l._timeScale:(e-l._startTime)*l._timeScale,t,r),l=l._prev;l=null,c.pause(),c._pauseTime=h}i._reversed?i.render((i._dirty?i.totalDuration():i._totalDuration)-(e-i._startTime)*i._timeScale,t,r):i.render((e-i._startTime)*i._timeScale,t,r)}i=o}!c._onUpdate||t||(b.length&&x(),c._callback("onUpdate")),!a||c._gc||d!==c._startTime&&m===c._timeScale||(0===c._time||p>=c.totalDuration())&&(n&&(b.length&&x(),c._timeline.autoRemoveChildren&&c._enabled(!1,!1),c._active=!1),!t&&c.vars[a]&&c._callback(a))}},e._hasPausedChild=function(){for(var e=this._first;e;){if(e._paused||e instanceof m&&e._hasPausedChild())return!0;e=e._next}return!1},e.getChildren=function(e,t,r,i){i=i||-9999999999;for(var n=[],o=this._first,a=0;o;)o._startTime=r&&(n._startTime+=e),n=n._next;if(t)for(i in o)o[i]>=r&&(o[i]+=e);return this._uncache(!0)},e._kill=function(e,t){if(!e&&!t)return this._enabled(!1,!1);for(var r=t?this.getTweensOf(t):this.getChildren(!0,!0,!1),i=r.length,n=!1;-1<--i;)r[i]._kill(e,t)&&(n=!0);return n},e.clear=function(e){var t=this.getChildren(!1,!0,!0),r=t.length;for(this._time=this._totalTime=0;-1<--r;)t[r]._enabled(!1,!1);return!1!==e&&(this._labels={}),this._uncache(!0)},e.invalidate=function(){for(var e=this._first;e;)e.invalidate(),e=e._next;return c.prototype.invalidate.call(this)},e._enabled=function(e,t){if(e===this._gc)for(var r=this._first;r;)r._enabled(e,!0),r=r._next;return f.prototype._enabled.call(this,e,t)},e.totalTime=function(e,t,r){this._forcingPlayhead=!0;var i=c.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,i},e.duration=function(e){return arguments.length?(0!==this.duration()&&0!==e&&this.timeScale(this._duration/e),this):(this._dirty&&this.totalDuration(),this._duration)},e.totalDuration=function(e){if(arguments.length)return e&&this.totalDuration()?this.timeScale(this._totalDuration/e):this;if(this._dirty){for(var t,r,i=0,n=this,o=n._last,a=999999999999;o;)t=o._prev,o._dirty&&o.totalDuration(),o._startTime>a&&n._sortChildren&&!o._paused&&!n._calculatingDuration?(n._calculatingDuration=1,n.add(o,o._startTime-o._delay),n._calculatingDuration=0):a=o._startTime,o._startTime<0&&!o._paused&&(i-=o._startTime,n._timeline.smoothChildTiming&&(n._startTime+=o._startTime/n._timeScale,n._time-=o._startTime,n._totalTime-=o._startTime,n._rawPrevTime-=o._startTime),n.shiftChildren(-o._startTime,!1,-9999999999),a=0),i<(r=o._startTime+o._totalDuration/o._timeScale)&&(i=r),o=t;n._duration=n._totalDuration=i,n._dirty=!1}return this._totalDuration},e.paused=function(e){if(!1===e&&this._paused)for(var t=this._first;t;)t._startTime===this._time&&"isPause"===t.data&&(t._rawPrevTime=0),t=t._next;return c.prototype.paused.apply(this,arguments)},e.usesFrames=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===c._rootFramesTimeline},e.rawTime=function(e){return e&&(this._paused||this._repeat&&0>10|55296,1023&i|56320)}function N(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}function z(){T()}var e,p,b,o,B,d,j,U,x,l,u,T,w,r,E,m,i,n,_,S="sizzle"+ +new Date,g=F.document,A=0,G=0,X=ce(),H=ce(),v=ce(),Y=function(e,t){return e===t&&(u=!0),0},W={}.hasOwnProperty,t=[],q=t.pop,V=t.push,k=t.push,K=t.slice,y=function(e,t){for(var r=0,i=e.length;r+~]|"+a+")"+a+"*"),re=new RegExp("="+a+"*([^\\]'\"]*?)"+a+"*\\]","g"),ie=new RegExp(Q),ne=new RegExp("^"+s+"$"),f={ID:new RegExp("^#("+s+")"),CLASS:new RegExp("^\\.("+s+")"),TAG:new RegExp("^("+s+"|[*])"),ATTR:new RegExp("^"+Z),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+a+"*(even|odd|(([+-]|)(\\d*)n|)"+a+"*(?:([+-]|)"+a+"*(\\d+)|))"+a+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+a+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+a+"*((?:-\\d)?\\d*)"+a+"*\\)|)(?=[^-]|$)","i")},oe=/^(?:input|select|textarea|button)$/i,ae=/^h\d$/i,h=/^[^{]+\{\s*\[native \w/,se=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,le=/[+~]/,P=new RegExp("\\\\([\\da-f]{1,6}"+a+"?|("+a+")|.)","ig"),ue=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,he=L(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{k.apply(t=K.call(g.childNodes),g.childNodes),t[g.childNodes.length].nodeType}catch(e){k={apply:t.length?function(e,t){V.apply(e,K.call(t))}:function(e,t){for(var r=e.length,i=0;e[r++]=t[i++];);e.length=r-1}}}function R(e,t,r,i){var n,o,a,s,l,u,h,c=t&&t.ownerDocument,f=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==f&&9!==f&&11!==f)return r;if(!i&&((t?t.ownerDocument||t:g)!==w&&T(t),t=t||w,E)){if(11!==f&&(l=se.exec(e)))if(n=l[1]){if(9===f){if(!(a=t.getElementById(n)))return r;if(a.id===n)return r.push(a),r}else if(c&&(a=c.getElementById(n))&&_(t,a)&&a.id===n)return r.push(a),r}else{if(l[2])return k.apply(r,t.getElementsByTagName(e)),r;if((n=l[3])&&p.getElementsByClassName&&t.getElementsByClassName)return k.apply(r,t.getElementsByClassName(n)),r}if(p.qsa&&!v[e+" "]&&(!m||!m.test(e))){if(1!==f)c=t,h=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(ue,N):t.setAttribute("id",s=S),o=(u=d(e)).length;o--;)u[o]="#"+s+" "+D(u[o]);h=u.join(","),c=le.test(e)&&me(t.parentNode)||t}if(h)try{return k.apply(r,c.querySelectorAll(h)),r}catch(e){}finally{s===S&&t.removeAttribute("id")}}}return U(e.replace(O,"$1"),t,r,i)}function ce(){var r=[];function i(e,t){return r.push(e+" ")>b.cacheLength&&delete i[r.shift()],i[e+" "]=t}return i}function C(e){return e[S]=!0,e}function M(e){var t=w.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t)}}function fe(e,t){for(var r=e.split("|"),i=r.length;i--;)b.attrHandle[r[i]]=t}function pe(e,t){var r=t&&e,i=r&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(r)for(;r=r.nextSibling;)if(r===t)return-1;return e?1:-1}function de(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&he(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function I(a){return C(function(o){return o=+o,C(function(e,t){for(var r,i=a([],e.length,o),n=i.length;n--;)e[r=i[n]]&&(e[r]=!(t[r]=e[r]))})})}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in p=R.support={},B=R.isXML=function(e){e=e&&(e.ownerDocument||e).documentElement;return!!e&&"HTML"!==e.nodeName},T=R.setDocument=function(e){var e=e?e.ownerDocument||e:g;return e!==w&&9===e.nodeType&&e.documentElement&&(r=(w=e).documentElement,E=!B(w),g!==w&&(e=w.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",z,!1):e.attachEvent&&e.attachEvent("onunload",z)),p.attributes=M(function(e){return e.className="i",!e.getAttribute("className")}),p.getElementsByTagName=M(function(e){return e.appendChild(w.createComment("")),!e.getElementsByTagName("*").length}),p.getElementsByClassName=h.test(w.getElementsByClassName),p.getById=M(function(e){return r.appendChild(e).id=S,!w.getElementsByName||!w.getElementsByName(S).length}),p.getById?(b.filter.ID=function(e){var t=e.replace(P,c);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&E)return(t=t.getElementById(e))?[t]:[]}):(b.filter.ID=function(e){var t=e.replace(P,c);return function(e){e=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return e&&e.value===t}},b.find.ID=function(e,t){if(void 0!==t.getElementById&&E){var r,i,n,o=t.getElementById(e);if(o){if((r=o.getAttributeNode("id"))&&r.value===e)return[o];for(n=t.getElementsByName(e),i=0;o=n[i++];)if((r=o.getAttributeNode("id"))&&r.value===e)return[o]}return[]}}),b.find.TAG=p.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):p.qsa?t.querySelectorAll(e):void 0}:function(e,t){var r,i=[],n=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;r=o[n++];)1===r.nodeType&&i.push(r);return i},b.find.CLASS=p.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&E)return t.getElementsByClassName(e)},i=[],m=[],(p.qsa=h.test(w.querySelectorAll))&&(M(function(e){r.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+a+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+a+"*(?:value|"+J+")"),e.querySelectorAll("[id~="+S+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||m.push(".#.+[+~]")}),M(function(e){e.innerHTML="";var t=w.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+a+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(p.matchesSelector=h.test(n=r.matches||r.webkitMatchesSelector||r.mozMatchesSelector||r.oMatchesSelector||r.msMatchesSelector))&&M(function(e){p.disconnectedMatch=n.call(e,"*"),n.call(e,"[s!='']:x"),i.push("!=",Q)}),m=m.length&&new RegExp(m.join("|")),i=i.length&&new RegExp(i.join("|")),e=h.test(r.compareDocumentPosition),_=e||h.test(r.contains)?function(e,t){var r=9===e.nodeType?e.documentElement:e,t=t&&t.parentNode;return e===t||!(!t||1!==t.nodeType||!(r.contains?r.contains(t):e.compareDocumentPosition&&16&e.compareDocumentPosition(t)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Y=e?function(e,t){var r;return e===t?(u=!0,0):(r=!e.compareDocumentPosition-!t.compareDocumentPosition)||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!p.sortDetached&&t.compareDocumentPosition(e)===r?e===w||e.ownerDocument===g&&_(g,e)?-1:t===w||t.ownerDocument===g&&_(g,t)?1:l?y(l,e)-y(l,t):0:4&r?-1:1)}:function(e,t){if(e===t)return u=!0,0;var r,i=0,n=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!n||!o)return e===w?-1:t===w?1:n?-1:o?1:l?y(l,e)-y(l,t):0;if(n===o)return pe(e,t);for(r=e;r=r.parentNode;)a.unshift(r);for(r=t;r=r.parentNode;)s.unshift(r);for(;a[i]===s[i];)i++;return i?pe(a[i],s[i]):a[i]===g?-1:s[i]===g?1:0}),w},R.matches=function(e,t){return R(e,null,null,t)},R.matchesSelector=function(e,t){if((e.ownerDocument||e)!==w&&T(e),t=t.replace(re,"='$1']"),p.matchesSelector&&E&&!v[t+" "]&&(!i||!i.test(t))&&(!m||!m.test(t)))try{var r=n.call(e,t);if(r||p.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(P,c),e[3]=(e[3]||e[4]||e[5]||"").replace(P,c),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||R.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&R.error(e[0]),e},PSEUDO:function(e){var t,r=!e[6]&&e[2];return f.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":r&&ie.test(r)&&(t=d(r,!0))&&(t=r.indexOf(")",r.length-t)-r.length)&&(e[0]=e[0].slice(0,t),e[2]=r.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(P,c).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=X[e+" "];return t||(t=new RegExp("(^|"+a+")"+e+"("+a+"|$)"))&&X(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(t,r,i){return function(e){e=R.attr(e,t);return null==e?"!="===r:!r||(e+="","="===r?e===i:"!="===r?e!==i:"^="===r?i&&0===e.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function $(e,r,i){return v(r)?w.grep(e,function(e,t){return!!r.call(e,t,e)!==i}):r.nodeType?w.grep(e,function(e){return e===r!==i}):"string"!=typeof r?w.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/,re=((w.fn.init=function(e,t,r){if(e){if(r=r||ee,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==r.ready?r.ready(e):e(w):w.makeArray(e,this);if(!(i="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:te.exec(e))||!i[1]&&t)return(!t||t.jquery?t||r:this.constructor(t)).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:T,!0)),Q.test(i[1])&&w.isPlainObject(t))for(var i in t)v(this[i])?this[i](t[i]):this.attr(i,t[i])}else(r=T.getElementById(i[2]))&&(this[0]=r,this.length=1)}return this}).prototype=w.fn,ee=w(T),/^(?:parents|prev(?:Until|All))/),ie={children:!0,contents:!0,next:!0,prev:!0};function ne(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}w.fn.extend({has:function(e){var t=w(e,this),r=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]+)/i,we=/^$|^module$|\/(?:java|ecma)script/i,S={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function A(e,t){var r=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&l(e,t)?w.merge([e],r):r}function Ee(e,t){for(var r=0,i=e.length;rx",_.noCloneChecked=!!C.cloneNode(!0).lastChild.defaultValue;var ke=T.documentElement,Oe=/^key/,Pe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Re=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function k(){return!1}function Me(){try{return T.activeElement}catch(e){}}function Ie(e,t,r,i,n,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof r&&(i=i||r,r=void 0),t)Ie(e,s,r,i,t[s],o);return e}if(null==i&&null==n?(n=r,i=r=void 0):null==n&&("string"==typeof r?(n=i,i=void 0):(n=i,i=r,r=void 0)),!1===n)n=k;else if(!n)return e;return 1===o&&(a=n,(n=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each(function(){w.event.add(this,t,n,i,r)})}w.event={global:{},add:function(t,e,r,i,n){var o,a,s,l,u,h,c,f,p,d=g.get(t);if(d)for(r.handler&&(r=(o=r).handler,n=o.selector),n&&w.find.matchesSelector(ke,n),r.guid||(r.guid=w.guid++),(s=d.events)||(s=d.events={}),(a=d.handle)||(a=d.handle=function(e){return void 0!==w&&w.event.triggered!==e.type?w.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(E)||[""]).length;l--;)c=p=(f=Re.exec(e[l])||[])[1],f=(f[2]||"").split(".").sort(),c&&(u=w.event.special[c]||{},c=(n?u.delegateType:u.bindType)||c,u=w.event.special[c]||{},p=w.extend({type:c,origType:p,data:i,handler:r,guid:r.guid,selector:n,needsContext:n&&w.expr.match.needsContext.test(n),namespace:f.join(".")},o),(h=s[c])||((h=s[c]=[]).delegateCount=0,u.setup&&!1!==u.setup.call(t,i,f,a)||t.addEventListener&&t.addEventListener(c,a)),u.add&&(u.add.call(t,p),p.handler.guid||(p.handler.guid=r.guid)),n?h.splice(h.delegateCount++,0,p):h.push(p),w.event.global[c]=!0)},remove:function(e,t,r,i,n){var o,a,s,l,u,h,c,f,p,d,m,_=g.hasData(e)&&g.get(e);if(_&&(l=_.events)){for(u=(t=(t||"").match(E)||[""]).length;u--;)if(p=m=(s=Re.exec(t[u])||[])[1],d=(s[2]||"").split(".").sort(),p){for(c=w.event.special[p]||{},f=l[p=(i?c.delegateType:c.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=f.length;o--;)h=f[o],!n&&m!==h.origType||r&&r.guid!==h.guid||s&&!s.test(h.namespace)||i&&i!==h.selector&&("**"!==i||!h.selector)||(f.splice(o,1),h.selector&&f.delegateCount--,c.remove&&c.remove.call(e,h));a&&!f.length&&(c.teardown&&!1!==c.teardown.call(e,d,_.handle)||w.removeEvent(e,p,_.handle),delete l[p])}else for(p in l)w.event.remove(e,p+t[u],r,i,!0);w.isEmptyObject(l)&&g.remove(e,"handle events")}},dispatch:function(e){var t,r,i,n,o,a=w.event.fix(e),s=new Array(arguments.length),e=(g.get(this,"events")||{})[a.type]||[],l=w.event.special[a.type]||{};for(s[0]=a,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,Le=/\s*$/g;function ze(e,t){return l(e,"table")&&l(11!==t.nodeType?t:t.firstChild,"tr")&&w(e).children("tbody")[0]||e}function Be(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function je(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ue(e,t){var r,i,n,o,a,s;if(1===t.nodeType){if(g.hasData(e)&&(o=g.access(e),a=g.set(t,o),s=o.events))for(n in delete a.handle,a.events={},s)for(r=0,i=s[n].length;r")},clone:function(e,t,r){var i,n,o,a,s,l,u,h=e.cloneNode(!0),c=w.contains(e.ownerDocument,e);if(!(_.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(a=A(h),i=0,n=(o=A(e)).length;i").prop({charset:r.scriptCharset,src:r.url}).on("load error",n=function(e){i.remove(),n=null,e&&t("error"===e.type?404:200,e.type)}),T.head.appendChild(i[0])},abort:function(){n&&n()}}}),[]),qt=/(=)\?(?=&|$)|\?\?/,Vt=(w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Wt.pop()||w.expando+"_"+St++;return this[e]=!0,e}}),w.ajaxPrefilter("json jsonp",function(e,t,r){var i,n,o,a=!1!==e.jsonp&&(qt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&qt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(qt,"$1"+i):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return o||w.error(i+" was not called"),o[0]},e.dataTypes[0]="json",n=x[i],x[i]=function(){o=arguments},r.always(function(){void 0===n?w(x).removeProp(i):x[i]=n,e[i]&&(e.jsonpCallback=t.jsonpCallback,Wt.push(i)),o&&v(n)&&n(o[0]),o=n=void 0}),"script"}),_.createHTMLDocument=((e=T.implementation.createHTMLDocument("").body).innerHTML="
",2===e.childNodes.length),w.parseHTML=function(e,t,r){var i;return"string"!=typeof e?[]:("boolean"==typeof t&&(r=t,t=!1),t||(_.createHTMLDocument?((i=(t=T.implementation.createHTMLDocument("")).createElement("base")).href=T.location.href,t.head.appendChild(i)):t=T),i=!r&&[],(r=Q.exec(e))?[t.createElement(r[1])]:(r=Ae([e],t,i),i&&i.length&&w(i).remove(),w.merge([],r.childNodes)))},w.fn.load=function(e,t,r){var i,n,o,a=this,s=e.indexOf(" ");return-1").append(w.parseHTML(e)).find(i):e)}).always(r&&function(e,t){a.each(function(){r.apply(this,o||[e.responseText,t,e])})}),this},w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){w.fn[t]=function(e){return this.on(t,e)}}),w.expr.pseudos.animated=function(t){return w.grep(w.timers,function(e){return t===e.elem}).length},w.offset={setOffset:function(e,t,r){var i,n,o,a,s=w.css(e,"position"),l=w(e),u={};"static"===s&&(e.style.position="relative"),o=l.offset(),i=w.css(e,"top"),a=w.css(e,"left"),s=("absolute"===s||"fixed"===s)&&-1<(i+a).indexOf("auto")?(n=(s=l.position()).top,s.left):(n=parseFloat(i)||0,parseFloat(a)||0),null!=(t=v(t)?t.call(e,r,w.extend({},o)):t).top&&(u.top=t.top-o.top+n),null!=t.left&&(u.left=t.left-o.left+s),"using"in t?t.using.call(e,u):l.css(u)}},w.fn.extend({offset:function(t){var e,r;return arguments.length?void 0===t?this:this.each(function(e){w.offset.setOffset(this,t,e)}):(r=this[0])?r.getClientRects().length?(e=r.getBoundingClientRect(),r=r.ownerDocument.defaultView,{top:e.top+r.pageYOffset,left:e.left+r.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,r,i=this[0],n={top:0,left:0};if("fixed"===w.css(i,"position"))t=i.getBoundingClientRect();else{for(t=this.offset(),r=i.ownerDocument,e=i.offsetParent||r.documentElement;e&&(e===r.body||e===r.documentElement)&&"static"===w.css(e,"position");)e=e.parentNode;e&&e!==i&&1===e.nodeType&&((n=w(e).offset()).top+=w.css(e,"borderTopWidth",!0),n.left+=w.css(e,"borderLeftWidth",!0))}return{top:t.top-n.top-w.css(i,"marginTop",!0),left:t.left-n.left-w.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===w.css(e,"position");)e=e.offsetParent;return e||ke})}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,n){var o="pageYOffset"===n;w.fn[t]=function(e){return c(this,function(e,t,r){var i;if(m(e)?i=e:9===e.nodeType&&(i=e.defaultView),void 0===r)return i?i[n]:e[t];i?i.scrollTo(o?i.pageXOffset:r,o?r:i.pageYOffset):e[t]=r},t,e,arguments.length)}}),w.each(["top","left"],function(e,r){w.cssHooks[r]=$e(_.pixelPosition,function(e,t){if(t)return t=P(e,r),Je.test(t)?w(e).position()[r]+"px":t})}),w.each({Height:"height",Width:"width"},function(a,s){w.each({padding:"inner"+a,content:s,"":"outer"+a},function(i,o){w.fn[o]=function(e,t){var r=arguments.length&&(i||"boolean"!=typeof e),n=i||(!0===e||!0===t?"margin":"border");return c(this,function(e,t,r){var i;return m(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(i=e.documentElement,Math.max(e.body["scroll"+a],i["scroll"+a],e.body["offset"+a],i["offset"+a],i["client"+a])):void 0===r?w.css(e,t,n):w.style(e,t,r,n)},s,r?e:void 0,r)}})}),w.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,r){w.fn[r]=function(e,t){return 0>>0))*i)>>>0,i+=4294967296*(r-=i)}return 2.3283064365386963e-10*(i>>>0)});t.next=function(){var e=2091639*t.s0+2.3283064365386963e-10*t.c;return t.s0=t.s1,t.s1=t.s2,t.s2=e-(t.c=0|e)},t.c=1,t.s0=r(" "),t.s1=r(" "),t.s2=r(" "),t.s0-=r(e),t.s0<0&&(t.s0+=1),t.s1-=r(e),t.s1<0&&(t.s1+=1),t.s2-=r(e),t.s2<0&&(t.s2+=1)}function o(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function r(e,t){var r=new n(e),e=t&&t.state,i=r.next;return i.int32=function(){return 4294967296*r.next()|0},i.double=function(){return i()+11102230246251565e-32*(2097152*i()|0)},i.quick=i,e&&("object"==typeof e&&o(e,r),i.state=function(){return o(r,{})}),i}e&&e.exports?e.exports=r:t&&t.amd?t(function(){return r}):this.alea=r}("object"==typeof t&&t,"function"==typeof define&&define)},{}],16:[function(e,t,r){!function(e,t){function n(e){var n=this,t="";n.next=function(){var e=(e=n.b)<<25^e>>>7^(t=n.c),t=t-(r=n.d)|0,r=r<<24^r>>>8^(i=n.a),i=i-e|0;return n.b=e=e<<20^e>>>12^t,n.c=t=t-r|0,n.d=r<<16^t>>>16^i,n.a=i-e|0},n.a=0,n.b=0,n.c=-1640531527,n.d=1367130551,e===Math.floor(e)?(n.a=e/4294967296|0,n.b=0|e):t+=e;for(var r=0;r>>0)/4294967296}var i=new n(e),e=t&&t.state;return r.double=function(){do{var e=((i.next()>>>11)+(i.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},r.int32=i.next,r.quick=r,e&&("object"==typeof e&&o(e,i),r.state=function(){return o(i,{})}),r}e&&e.exports?e.exports=r:t&&t.amd?t(function(){return r}):this.tychei=r}("object"==typeof t&&t,"function"==typeof define&&define)},{}],17:[function(e,t,r){!function(e,t){function n(e){var t=this,r="";t.x=0,t.y=0,t.z=0,t.w=0,t.next=function(){var e=t.x^t.x<<11;return t.x=t.y,t.y=t.z,t.z=t.w,t.w^=t.w>>>19^e^e>>>8},e===(0|e)?t.x=e:r+=e;for(var i=0;i>>0)/4294967296}var i=new n(e),e=t&&t.state;return r.double=function(){do{var e=((i.next()>>>11)+(i.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},r.int32=i.next,r.quick=r,e&&("object"==typeof e&&o(e,i),r.state=function(){return o(i,{})}),r}e&&e.exports?e.exports=r:t&&t.amd?t(function(){return r}):this.xor128=r}("object"==typeof t&&t,"function"==typeof define&&define)},{}],18:[function(e,t,r){!function(e,t){function n(e){var o=this;o.next=function(){var e,t,r=o.w,i=o.X,n=o.i;return o.w=r=r+1640531527|0,t=i[n+34&127],e=i[n=n+1&127],t=i[n]=(t^=t<<13)^t>>>15^((e^=e<<17)^e>>>12),o.i=n,t+(r^r>>>16)|0};var t,r,i,n,a,s=o,l=e,u=[],h=128;for(l===(0|l)?(r=l,l=null):(l+="\0",r=0,h=Math.max(h,l.length)),i=0,n=-32;n>>15)^r<<4)^r>>>13,0<=n&&(i=0==(t=u[127&n]^=r+(a=a+1640531527|0))?i+1:0);for(128<=i&&(u[127&(l&&l.length||0)]=-1),i=127,n=512;0>>15)^(t=(t^=t<<17)^t>>>12);s.w=a,s.X=u,s.i=i}function o(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function r(e,t){function r(){return(i.next()>>>0)/4294967296}var i=new n(e=null==e?+new Date:e),e=t&&t.state;return r.double=function(){do{var e=((i.next()>>>11)+(i.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},r.int32=i.next,r.quick=r,e&&(e.X&&o(e,i),r.state=function(){return o(i,{})}),r}e&&e.exports?e.exports=r:t&&t.amd?t(function(){return r}):this.xor4096=r}("object"==typeof t&&t,"function"==typeof define&&define)},{}],19:[function(e,t,r){!function(e,t){function n(e){var n=this;n.next=function(){var e=n.x,t=n.i,r=e[t],i=(r^=r>>>7)^r<<24;return i=(i^=(r=e[t+1&7])^r>>>10)^((r=e[t+3&7])^r>>>3)^((r=e[t+4&7])^r<<7),r=e[t+7&7],e[t]=i^=(r^=r<<13)^r<<9,n.i=t+1&7,i};var t,r=n,i=e,o=[];if(i===(0|i))o[0]=i;else for(i=""+i,t=0;t>>0)/4294967296}var i=new n(e=null==e?+new Date:e),e=t&&t.state;return r.double=function(){do{var e=((i.next()>>>11)+(i.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},r.int32=i.next,r.quick=r,e&&(e.x&&o(e,i),r.state=function(){return o(i,{})}),r}e&&e.exports?e.exports=r:t&&t.amd?t(function(){return r}):this.xorshift7=r}("object"==typeof t&&t,"function"==typeof define&&define)},{}],20:[function(e,t,r){!function(e,t){function n(e){var t=this,r="";t.next=function(){var e=t.x^t.x>>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,(t.d=t.d+362437|0)+(t.v=t.v^t.v<<4^e^e<<1)|0},t.x=0,t.y=0,t.z=0,t.w=0,e===((t.v=0)|e)?t.x=e:r+=e;for(var i=0;i>>4),t.next()}function o(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t.v=e.v,t.d=e.d,t}function r(e,t){function r(){return(i.next()>>>0)/4294967296}var i=new n(e),e=t&&t.state;return r.double=function(){do{var e=((i.next()>>>11)+(i.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},r.int32=i.next,r.quick=r,e&&("object"==typeof e&&o(e,i),r.state=function(){return o(i,{})}),r}e&&e.exports?e.exports=r:t&&t.amd?t(function(){return r}):this.xorwow=r}("object"==typeof t&&t,"function"==typeof define&&define)},{}],21:[function(t,r,e){!function(a,s){var l,u=this,h=256,c=6,f="random",p=s.pow(h,c),d=s.pow(2,52),m=2*d,_=h-1;function e(e,t,r){function i(){for(var e=o.g(c),t=p,r=0;e>>=1;return(e+r)/t}var n=[],e=y(function e(t,r){var i,n=[],o=typeof t;if(r&&"object"==o)for(i in t)try{n.push(e(t[i],r-1))}catch(e){}return n.length?n:"string"==o?t:t+"\0"}((t=1==t?{entropy:!0}:t||{}).entropy?[e,b(a)]:null==e?function(){try{return l&&(t=l.randomBytes)?t=t(h):(t=new Uint8Array(h),(u.crypto||u.msCrypto).getRandomValues(t)),b(t)}catch(e){var t=u.navigator,t=t&&t.plugins;return[+new Date,u,t,u.screen,b(a)]}}():e,3),n),o=new g(n);return i.int32=function(){return 0|o.g(4)},i.quick=function(){return o.g(4)/4294967296},i.double=i,y(b(o.S),a),(t.pass||r||function(e,t,r,i){return i&&(i.S&&v(i,o),e.state=function(){return v(o,{})}),r?(s[f]=e,t):e})(i,e,"global"in t?t.global:this==s,t.state)}function g(e){var t,r=e.length,a=this,i=0,n=a.i=a.j=0,o=a.S=[];for(r||(e=[r++]);iMath.PI?l-e:e}function p(e){return e-l*Math.floor(e/l)}t.exports={UP:o,DOWN:a,LEFT:s,RIGHT:0,NORTH:o,SOUTH:a,WEST:s,EAST:0,PI_2:l,PI_QUARTER:u,PI_HALF:h,toDegrees:function(e){return e*i},toRadians:function(e){return e*n},isAngleBetween:function(e,t,r){var i;return((r-t)%l+l)%l>=Math.PI&&(i=t,t=r,r=i),t<=r?t<=e&&e<=r:t<=e||e<=r},differenceAnglesSign:c,differenceAngles:f,shortestAngle:function(e,t){return f(t,e)*c(t,e)+e},normalize:p,angleTwoPoints:function(){return 4===arguments.length?Math.atan2(arguments[3]-arguments[1],arguments[2]-arguments[0]):Math.atan2(arguments[1].y-arguments[0].y,arguments[1].x-arguments[0].x)},distanceTwoPoints:function(){return 2===arguments.length?Math.sqrt(Math.pow(arguments[1].x-arguments[0].x,2)+Math.pow(arguments[1].y-arguments[0].y,2)):Math.sqrt(Math.pow(arguments[2]-arguments[0],2)+Math.pow(arguments[3]-arguments[1],2))},distanceTwoPointsSquared:function(){return 2===arguments.length?Math.pow(arguments[1].x-arguments[0].x,2)+Math.pow(arguments[1].y-arguments[0].y,2):Math.pow(arguments[2]-arguments[0],2)+Math.pow(arguments[3]-arguments[1],2)},closestAngle:function(e){var t=f(e,s),r=f(e,0),i=f(e,o),e=f(e,a);return t<=r&&t<=i&&t<=e?s:r<=i&&r<=e?0:i<=e?o:a},equals:function(e,t,r){return r?f(e,t)>16)+e*(r>>16)<<16|i*(t>>8&255)+e*(r>>8&255)<<8|i*(255&t)+e*(255&r)},random:function(e,t){function r(){return a.range(e,t)}var i=a.pick([{r:1,g:1,b:1},{r:1,g:1,b:0},{r:1,g:0,b:1},{r:0,g:1,b:1},{r:1,g:0,b:0},{r:0,g:1,b:0},{r:0,g:0,b:1}]);return e=e||0,t=t||255,this.rgbToHex(i.r?r():0,i.g?r():0,i.b?r():0)},randomHSL:function(e,t,r,i,n,o){return e={h:a.range(e,t),s:a.range(r,i,!0),l:a.range(n,o,!0)},this.hslToHex(e)},randomGoldenRatioHSL:function(e,t,r){for(var i=a.get(1,!0),n=[],o=0;o=this.time?(this.parent.x=t.end,this.toX=null,this.parent.emit("bounce-x-end",this.parent)):this.parent.x=this.ease(t.time,t.start,t.delta,this.time),this.parent.dirty=!0),this.toY&&((t=this.toY).time+=e,this.parent.emit("moved",{viewport:this.parent,type:"bounce-y"}),t.time>=this.time?(this.parent.y=t.end,this.toY=null,this.parent.emit("bounce-y-end",this.parent)):this.parent.y=this.ease(t.time,t.start,t.delta,this.time),this.parent.dirty=!0))}},{key:"calcUnderflowX",value:function(){var e=void 0;switch(this.underflowX){case-1:e=0;break;case 1:e=this.parent.screenWidth-this.parent.screenWorldWidth;break;default:e=(this.parent.screenWidth-this.parent.screenWorldWidth)/2}return e}},{key:"calcUnderflowY",value:function(){var e=void 0;switch(this.underflowY){case-1:e=0;break;case 1:e=this.parent.screenHeight-this.parent.screenWorldHeight;break;default:e=(this.parent.screenHeight-this.parent.screenWorldHeight)/2}return e}},{key:"bounce",value:function(){var e,t,r,i;this.paused||(e=void 0,(i=this.parent.plugins.decelerate)&&(i.x||i.y)&&(i.x&&i.percentChangeX===i.friction||i.y&&i.percentChangeY===i.friction)&&(((e=this.parent.OOB()).left&&this.left||e.right&&this.right)&&(i.percentChangeX=this.friction),(e.top&&this.top||e.bottom&&this.bottom)&&(i.percentChangeY=this.friction)),t=this.parent.plugins.drag||{},r=this.parent.plugins.pinch||{},i=i||{},t.active||r.active||this.toX&&this.toY||i.x&&i.y||(t=(e=e||this.parent.OOB()).cornerPoint,this.toX||i.x||(r=null,e.left&&this.left?r=this.parent.screenWorldWidththis.maxWidth&&(this.parent.fitWidth(this.maxWidth),e=this.parent.worldScreenWidth,t=this.parent.worldScreenHeight,this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})),this.minHeight&&tthis.maxHeight&&(this.parent.fitHeight(this.maxHeight),this.parent.emit("zoomed",{viewport:this.parent,type:"clamp-zoom"})))}}]),r}()},{"./plugin":9}],3:[function(e,t,r){"use strict";var i=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e};function n(e,t){for(var r=0;r(!0===this.right?this.parent.worldWidth:this.right)&&(this.parent.x=-(!0===this.right?this.parent.worldWidth:this.right)*this.parent.scale.x+this.parent.screenWidth,t=!(e.x=0));t&&this.parent.emit("moved",{viewport:this.parent,type:"clamp-x"})}if(null!==this.top||null!==this.bottom){var r=void 0;if(this.parent.screenWorldHeight(!0===this.bottom?this.parent.worldHeight:this.bottom)&&(this.parent.y=-(!0===this.bottom?this.parent.worldHeight:this.bottom)*this.parent.scale.y+this.parent.screenHeight,r=!(e.y=0));r&&this.parent.emit("moved",{viewport:this.parent,type:"clamp-y"})}}}}]),r}()},{"./plugin":9,"./utils":12}],4:[function(e,t,r){"use strict";var i=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e};function n(e,t){for(var r=0;r=e-100){var s=e-a.time;this.x=(this.parent.x-a.x)/s,this.y=(this.parent.y-a.y)/s,this.percentChangeX=this.percentChangeY=this.friction;break}}}catch(e){r=!0,i=e}finally{try{!t&&o.return&&o.return()}finally{if(r)throw i}}}}},{key:"activate",value:function(e){void 0!==(e=e||{}).x&&(this.x=e.x,this.percentChangeX=this.friction),void 0!==e.y&&(this.y=e.y,this.percentChangeY=this.friction)}},{key:"update",value:function(e){var t;this.paused||(t=void 0,this.x&&(this.parent.x+=this.x*e,this.x*=this.percentChangeX,Math.abs(this.x)this.parent.worldWidth&&(this.parent.x=-this.parent.worldWidth*this.parent.scale.x+this.parent.screenWidth,e.x=0);if("x"!==this.clampWheel)if(this.parent.screenWorldHeightthis.parent.worldHeight&&(this.parent.y=-this.parent.worldHeight*this.parent.scale.y+this.parent.screenHeight,e.y=0)}},{key:"active",get:function(){return this.moved}}]),r}()},{"./plugin":9,"./utils":12}],6:[function(e,t,r){"use strict";var n=function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),e};function i(e,t){for(var r=0;rthis.radius))return;var a=Math.atan2(this.target.y-i.y,this.target.x-i.x),n=this.target.x-Math.cos(a)*this.radius,o=this.target.y-Math.sin(a)*this.radius}this.speed?(a=n-i.x,e=o-i.y,(a||e)&&(t=Math.atan2(o-i.y,n-i.x),r=Math.cos(t)*this.speed,t=Math.sin(t)*this.speed,a=Math.abs(r)>Math.abs(a)?n:i.x+r,r=Math.abs(t)>Math.abs(e)?o:i.y+t,this.parent.moveCenter(a,r),this.parent.emit("moved",{viewport:this.parent,type:"follow"}))):(this.parent.moveCenter(n,o),this.parent.emit("moved",{viewport:this.parent,type:"follow"}))}}}]),i}()},{"./plugin":9}],7:[function(e,t,r){"use strict";var i=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e};function n(e,t){for(var r=0;r=this.radiusSquared?(r=Math.atan2(r.y-e,r.x-t),this.linear?(this.horizontal=Math.round(Math.cos(r))*this.speed*this.reverse*.06,this.vertical=Math.round(Math.sin(r))*this.speed*this.reverse*.06):(this.horizontal=Math.cos(r)*this.speed*this.reverse*.06,this.vertical=Math.sin(r)*this.speed*this.reverse*.06)):(this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=0)):(o.exists(this.left)&&tthis.right?this.horizontal=-1*this.reverse*this.speed*.06:(this.decelerateHorizontal(),this.horizontal=0),o.exists(this.top)&&ethis.bottom?this.vertical=-1*this.reverse*this.speed*.06:(this.decelerateVertical(),this.vertical=0)))}},{key:"decelerateHorizontal",value:function(){var e=this.parent.plugins.decelerate;this.horizontal&&e&&!this.noDecelerate&&e.activate({x:this.horizontal*this.speed*this.reverse/(1e3/60)})}},{key:"decelerateVertical",value:function(){var e=this.parent.plugins.decelerate;this.vertical&&e&&!this.noDecelerate&&e.activate({y:this.vertical*this.speed*this.reverse/(1e3/60)})}},{key:"up",value:function(){this.horizontal&&this.decelerateHorizontal(),this.vertical&&this.decelerateVertical(),this.horizontal=this.vertical=null}},{key:"update",value:function(){var e;this.paused||(this.horizontal||this.vertical)&&(e=this.parent.center,this.horizontal&&(e.x+=this.horizontal*this.speed),this.vertical&&(e.y+=this.vertical*this.speed),this.parent.moveCenter(e),this.parent.emit("moved",{viewport:this.parent,type:"mouse-edges"}))}}]),r}()},{"./plugin":9,"./utils":12}],8:[function(e,t,r){"use strict";var i=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e};function n(e,t){for(var r=0;r=this.time?(this.parent.scale.set(this.x_scale,this.y_scale),this.removeOnComplete&&this.parent.removePlugin("snap-zoom"),this.parent.emit("snap-zoom-end",this.parent),this.snapping=null):(e=this.snapping,this.parent.scale.x=this.ease(e.time,e.startX,e.deltaX,this.time),this.parent.scale.y=this.ease(e.time,e.startY,e.deltaY,this.time)),(r=this.parent.plugins["clamp-zoom"])&&r.clamp(),this.noMove||(this.center?this.parent.moveCenter(this.center):this.parent.moveCenter(t))):this.parent.scale.x===this.x_scale&&this.parent.scale.y===this.y_scale||this.createSnapping())}},{key:"resume",value:function(){this.snapping=null,o(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),"resume",this).call(this)}}]),i}()},{"./plugin":9,"./utils":12}],11:[function(e,t,r){"use strict";var i=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e};function n(e,t){for(var r=0;rthis.time?(e=!0,t=this.startX+this.deltaX,this.startY+this.deltaY):(i=this.ease(i.time,0,1,this.time),t=this.startX+this.deltaX*i,this.startY+this.deltaY*i),this.topLeft?this.parent.moveCorner(t,r):this.parent.moveCenter(t,r),this.parent.emit("moved",{viewport:this.parent,type:"snap"}),e&&(this.removeOnComplete&&this.parent.removePlugin("snap"),this.parent.emit("snap-end",this.parent),this.snapping=null)):(i=this.topLeft?this.parent.corner:this.parent.center).x===this.x&&i.y===this.y||this.snapStart())}}]),n}()},{"./plugin":9,"./utils":12}],12:[function(e,t,r){"use strict";var i=e("penner");function n(e){return null!=e}t.exports={exists:n,defaults:function(e,t){return null!=e?e:t},ease:function(e,t){return n(e)?"function"==typeof e?e:"string"==typeof e?i[e]:void 0:i[t]}}},{penner:15}],13:[function(e,t,r){"use strict";var i=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e};function n(e,t){for(var r=0;r=this.threshold}},{key:"move",value:function(e){if(!this.pause){var t=!0,r=!1,i=void 0;try{for(var n,o=this.pluginsList[Symbol.iterator]();!(t=(n=o.next()).done);t=!0)n.value.move(e)}catch(e){r=!0,i=e}finally{try{!t&&o.return&&o.return()}finally{if(r)throw i}}this.clickedAvailable&&(r=e.data.global.x-this.last.x,i=e.data.global.y-this.last.y,(this.checkThreshold(r)||this.checkThreshold(i))&&(this.clickedAvailable=!1))}}},{key:"up",value:function(e){if(!this.pause){if(e.data.originalEvent instanceof MouseEvent&&0==e.data.originalEvent.button&&(this.leftDown=!1),"mouse"!==e.data.pointerType)for(var t=0;tthis._worldWidth,e.top=this.top<0,e.bottom=this.bottom>this._worldHeight,e.cornerPoint={x:this._worldWidth*this.scale.x-this._screenWidth,y:this._worldHeight*this.scale.y-this._screenHeight},e}},{key:"countDownPointers",value:function(){return(this.leftDown?1:0)+this.touches.length}},{key:"getTouchPointers",value:function(){var e,t=[],r=this.trackedPointers;for(e in r){var i=r[e];-1!==this.touches.indexOf(i.pointerId)&&t.push(i)}return t}},{key:"getPointers",value:function(){var e,t=[],r=this.trackedPointers;for(e in r)t.push(r[e]);return t}},{key:"_reset",value:function(){this.plugins.bounce&&(this.plugins.bounce.reset(),this.plugins.bounce.bounce()),this.plugins.decelerate&&this.plugins.decelerate.reset(),this.plugins.snap&&this.plugins.snap.reset(),this.plugins.clamp&&this.plugins.clamp.update(),this.plugins["clamp-zoom"]&&this.plugins["clamp-zoom"].clamp(),this.dirty=!0}},{key:"removePlugin",value:function(e){this.plugins[e]&&(this.plugins[e]=null,this.emit(e+"-remove"),this.pluginsSort())}},{key:"pausePlugin",value:function(e){this.plugins[e]&&this.plugins[e].pause()}},{key:"resumePlugin",value:function(e){this.plugins[e]&&this.plugins[e].resume()}},{key:"pluginsSort",value:function(){var e=!0,t=!(this.pluginsList=[]),r=void 0;try{for(var i,n=v[Symbol.iterator]();!(e=(i=n.next()).done);e=!0){var o=i.value;this.plugins[o]&&this.pluginsList.push(this.plugins[o])}}catch(e){t=!0,r=e}finally{try{!e&&n.return&&n.return()}finally{if(t)throw r}}}},{key:"drag",value:function(e){return this.plugins.drag=new s(this,e),this.pluginsSort(),this}},{key:"clamp",value:function(e){return this.plugins.clamp=new u(this,e),this.pluginsSort(),this}},{key:"decelerate",value:function(e){return this.plugins.decelerate=new c(this,e),this.pluginsSort(),this}},{key:"bounce",value:function(e){return this.plugins.bounce=new f(this,e),this.pluginsSort(),this}},{key:"pinch",value:function(e){return this.plugins.pinch=new l(this,e),this.pluginsSort(),this}},{key:"snap",value:function(e,t,r){return this.plugins.snap=new p(this,e,t,r),this.pluginsSort(),this}},{key:"follow",value:function(e,t){return this.plugins.follow=new m(this,e,t),this.pluginsSort(),this}},{key:"wheel",value:function(e){return this.plugins.wheel=new _(this,e),this.pluginsSort(),this}},{key:"clampZoom",value:function(e){return this.plugins["clamp-zoom"]=new h(this,e),this.pluginsSort(),this}},{key:"mouseEdges",value:function(e){return this.plugins["mouse-edges"]=new g(this,e),this.pluginsSort(),this}},{key:"screenWidth",get:function(){return this._screenWidth},set:function(e){this._screenWidth=e}},{key:"screenHeight",get:function(){return this._screenHeight},set:function(e){this._screenHeight=e}},{key:"worldWidth",get:function(){return this._worldWidth||this.width},set:function(e){this._worldWidth=e,this.resizePlugins()}},{key:"worldHeight",get:function(){return this._worldHeight||this.height},set:function(e){this._worldHeight=e,this.resizePlugins()}},{key:"worldScreenWidth",get:function(){return this._screenWidth/this.scale.x}},{key:"worldScreenHeight",get:function(){return this._screenHeight/this.scale.y}},{key:"screenWorldWidth",get:function(){return this._worldWidth*this.scale.x}},{key:"screenWorldHeight",get:function(){return this._worldHeight*this.scale.y}},{key:"center",get:function(){return{x:this.worldScreenWidth/2-this.x/this.scale.x,y:this.worldScreenHeight/2-this.y/this.scale.y}},set:function(e){this.moveCenter(e)}},{key:"corner",get:function(){return{x:-this.x/this.scale.x,y:-this.y/this.scale.y}},set:function(e){this.moveCorner(e)}},{key:"right",get:function(){return-this.x/this.scale.x+this.worldScreenWidth},set:function(e){this.x=-e*this.scale.x+this.screenWidth,this._reset()}},{key:"left",get:function(){return-this.x/this.scale.x},set:function(e){this.x=-e*this.scale.x,this._reset()}},{key:"top",get:function(){return-this.y/this.scale.y},set:function(e){this.y=-e*this.scale.y,this._reset()}},{key:"bottom",get:function(){return-this.y/this.scale.y+this.worldScreenHeight},set:function(e){this.y=-e*this.scale.y+this.screenHeight,this._reset()}},{key:"dirty",get:function(){return this._dirty},set:function(e){this._dirty=e}},{key:"forceHitArea",get:function(){return this._forceHitArea},set:function(e){e?(this._forceHitArea=e,this.hitArea=e):(this._forceHitArea=!1,this.hitArea=new PIXI.Rectangle(0,0,this.worldWidth,this.worldHeight))}},{key:"pause",get:function(){return this._pause},set:function(e){(this._pause=e)&&(this.touches=[],this.leftDown=!1)}}]),r}(PIXI.Container);PIXI.extras.Viewport=e,t.exports=e},{"./bounce":1,"./clamp":3,"./clamp-zoom":2,"./decelerate":4,"./drag":5,"./follow":6,"./mouse-edges":7,"./pinch":8,"./snap":11,"./snap-zoom":10,"./utils":12,"./wheel":14}],14:[function(e,t,r){"use strict";var i=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e};function n(e,t){for(var r=0;rt&&(r[i]=this.hyphenate(r[i]).join("­"));return r.join("")},t.prototype.hyphenate=function(e){var t,r,i,n,o,a,s,l,u,h=[],c=[],f=e.toLowerCase(),p=Math.max,d=this.trie,m=[""];if(this.exceptions.hasOwnProperty(f))return e.match(this.exceptions[f]).slice(1);if(-1!==e.indexOf("­"))return[e];for(t=(e="_"+e+"_").toLowerCase().split(""),r=e.split(""),s=t.length,i=0;ithis.leftMin&&i