// Generated by Construct 2, the HTML5 game and app creator :: http://www.scirra.com
'use strict';var u,ba,da,ea,fa,ga,ha,v,ia,ja,ka,la,oa,pa,qa,ra,sa,ta,va,wa,xa,ya,za,Aa,x,Ba,Ca,Da,Ea,Fa,Ga,Ha,Ia,Ja,Ka,La,Na,Oa,Pa,Qa,Ra,Sa,Ta,Ua,Va,Xa,Ya,Za,$a,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb,lb,mb,nb,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,Cb,Db,Eb,Fb,Gb,Hb,Ib,Jb,Kb,Lb,Mb,Nb,Ob,Pb,Qb,Rb,Sb,Tb,Ub,Vb,Wb={},Xb={};"function"!==typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"===typeof"test".__proto__?function(a){return a.__proto__}:function(a){return a.constructor.prototype});
(function(){function a(a,b,c,f){this.set(a,b,c,f)}function c(){this.Zd=this.Yd=this.ae=this.$d=this.oe=this.ne=this.Ic=this.Hc=0}function b(a,b,c,f){a<b?c<f?(n=a<c?a:c,k=b>f?b:f):(n=a<f?a:f,k=b>c?b:c):c<f?(n=b<c?b:c,k=a>f?a:f):(n=b<f?b:f,k=a>c?a:c)}function d(){this.items=this.kc=null;this.ol=0;p&&(this.kc=new Set);this.Xl=[];this.Gi=!0}function e(a){y[A++]=a}function f(){this.mb=this.Hr=this.y=this.u=0}function h(a){this.sc=[];this.$o=this.cp=this.dp=this.bp=0;this.tp=null;this.jo(a)}function g(a,
b){this.$C=a;this.ZC=b;this.cells={}}function m(a,b,c){var f;return D.length?(f=D.pop(),f.WE=a,f.x=b,f.y=c,f):new ba(a,b,c)}function l(a,b,c){this.WE=a;this.x=b;this.y=c;this.Rn=new da}ea=function(a){window.console&&window.console.log&&window.console.log(a)};fa=function(a){window.console&&window.console.error&&window.console.error(a)};ga=function(a){return"undefined"===typeof a};ha=function(a){return"number"===typeof a};v=function(a){return"string"===typeof a};ia=function(a){return 0<a&&0===(a-1&
a)};ja=function(a){--a;for(var b=1;32>b;b<<=1)a|=a>>b;return a+1};ka=function(a){return 0>a?-a:a};la=function(a,b){return a<b?a:b};oa=Math.PI;pa=function(a){return 0<=a?a|0:(a|0)-1};qa=function(a){var b=a|0;return b===a?b:b+1};ra=function(a,b,c,f,d,g,h,m){var w,k,l,e;a<c?(k=a,w=c):(k=c,w=a);d<h?(e=d,l=h):(e=h,l=d);if(w<e||k>l)return!1;b<f?(k=b,w=f):(k=f,w=b);g<m?(e=g,l=m):(e=m,l=g);if(w<e||k>l)return!1;w=d-a+h-c;k=g-b+m-f;a=c-a;b=f-b;d=h-d;g=m-g;m=ka(b*d-g*a);return ka(d*k-g*w)>m?!1:ka(a*k-b*w)<=
m};a.prototype.set=function(a,b,c,f){this.left=a;this.top=b;this.right=c;this.bottom=f};a.prototype.dD=function(a){this.left=a.left;this.top=a.top;this.right=a.right;this.bottom=a.bottom};a.prototype.width=function(){return this.right-this.left};a.prototype.height=function(){return this.bottom-this.top};a.prototype.offset=function(a,b){this.left+=a;this.top+=b;this.right+=a;this.bottom+=b;return this};a.prototype.normalize=function(){var a=0;this.left>this.right&&(a=this.left,this.left=this.right,
this.right=a);this.top>this.bottom&&(a=this.top,this.top=this.bottom,this.bottom=a)};a.prototype.jy=function(a){return!(a.right<this.left||a.bottom<this.top||a.left>this.right||a.top>this.bottom)};a.prototype.ky=function(a,b,c){return!(a.right+b<this.left||a.bottom+c<this.top||a.left+b>this.right||a.top+c>this.bottom)};a.prototype.Ae=function(a,b){return a>=this.left&&a<=this.right&&b>=this.top&&b<=this.bottom};a.prototype.PD=function(a){return this.left===a.left&&this.top===a.top&&this.right===a.right&&
this.bottom===a.bottom};sa=a;c.prototype.Ck=function(a){this.Hc=a.left;this.Ic=a.top;this.ne=a.right;this.oe=a.top;this.$d=a.right;this.ae=a.bottom;this.Yd=a.left;this.Zd=a.bottom};c.prototype.kA=function(a,b){if(0===b)this.Ck(a);else{var c=Math.sin(b),f=Math.cos(b),d=a.left*c,g=a.top*c,h=a.right*c,c=a.bottom*c,m=a.left*f,w=a.top*f,k=a.right*f,f=a.bottom*f;this.Hc=m-g;this.Ic=w+d;this.ne=k-g;this.oe=w+h;this.$d=k-c;this.ae=f+h;this.Yd=m-c;this.Zd=f+d}};c.prototype.offset=function(a,b){this.Hc+=a;
this.Ic+=b;this.ne+=a;this.oe+=b;this.$d+=a;this.ae+=b;this.Yd+=a;this.Zd+=b;return this};var n=0,k=0;c.prototype.kx=function(a){b(this.Hc,this.ne,this.$d,this.Yd);a.left=n;a.right=k;b(this.Ic,this.oe,this.ae,this.Zd);a.top=n;a.bottom=k};c.prototype.Ae=function(a,b){var c=this.ne-this.Hc,f=this.oe-this.Ic,d=this.$d-this.Hc,g=this.ae-this.Ic,h=a-this.Hc,m=b-this.Ic,w=c*c+f*f,k=c*d+f*g,f=c*h+f*m,l=d*d+g*g,e=d*h+g*m,n=1/(w*l-k*k),c=(l*f-k*e)*n,w=(w*e-k*f)*n;if(0<=c&&0<w&&1>c+w)return!0;c=this.Yd-this.Hc;
f=this.Zd-this.Ic;w=c*c+f*f;k=c*d+f*g;f=c*h+f*m;n=1/(w*l-k*k);c=(l*f-k*e)*n;w=(w*e-k*f)*n;return 0<=c&&0<w&&1>c+w};c.prototype.Ci=function(a,b){if(b)switch(a){case 0:return this.Hc;case 1:return this.ne;case 2:return this.$d;case 3:return this.Yd;case 4:return this.Hc;default:return this.Hc}else switch(a){case 0:return this.Ic;case 1:return this.oe;case 2:return this.ae;case 3:return this.Zd;case 4:return this.Ic;default:return this.Ic}};c.prototype.Zi=function(){return(this.Hc+this.ne+this.$d+this.Yd)/
4};c.prototype.$i=function(){return(this.Ic+this.oe+this.ae+this.Zd)/4};c.prototype.Rt=function(a){var b=a.Zi(),c=a.$i();if(this.Ae(b,c))return!0;b=this.Zi();c=this.$i();if(a.Ae(b,c))return!0;var f,d,g,h,w,m,k,l;for(k=0;4>k;k++)for(l=0;4>l;l++)if(b=this.Ci(k,!0),c=this.Ci(k,!1),f=this.Ci(k+1,!0),d=this.Ci(k+1,!1),g=a.Ci(l,!0),h=a.Ci(l,!1),w=a.Ci(l+1,!0),m=a.Ci(l+1,!1),ra(b,c,f,d,g,h,w,m))return!0;return!1};ta=c;va=function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a};wa=function(a,
b){var c,f;b=pa(b);if(!(0>b||b>=a.length)){c=b;for(f=a.length-1;c<f;c++)a[c]=a[c+1];a.length=f}};xa=function(a,b){a.length=b.length;var c,f;c=0;for(f=b.length;c<f;c++)a[c]=b[c]};ya=function(a,b){a.push.apply(a,b)};za=function(a,b){var c,f;c=0;for(f=a.length;c<f;++c)if(a[c]===b)return c;return-1};Aa=function(a,b){var c=za(a,b);-1!==c&&wa(a,c)};x=function(a){return a/(180/oa)};Ba=function(a){return 180/oa*a};Ca=function(a){a%=360;0>a&&(a+=360);return a};Da=function(a){a%=2*oa;0>a&&(a+=2*oa);return a};
Ea=function(a){return Ca(Ba(a))};Fa=function(a){return Da(x(a))};Ga=function(a,b,c,f){return Math.atan2(f-b,c-a)};Ha=function(a,b){if(a===b)return 0;var c=Math.sin(a),f=Math.cos(a),d=Math.sin(b),g=Math.cos(b),c=c*d+f*g;return 1<=c?0:-1>=c?oa:Math.acos(c)};Ia=function(a,b,c){var f=Math.sin(a),d=Math.cos(a),g=Math.sin(b),h=Math.cos(b);return Math.acos(f*g+d*h)>c?0<d*g-f*h?Da(a+c):Da(a-c):Da(b)};Ja=function(a,b){var c=Math.sin(a),f=Math.cos(a),d=Math.sin(b),g=Math.cos(b);return 0>=f*d-c*g};Ka=function(a,
b,c,f,d,g){if(0===c)return g?a:b;var h=Math.sin(c);c=Math.cos(c);a-=f;b-=d;var w=a*h;a=a*c-b*h;b=b*c+w;return g?a+f:b+d};La=function(a,b,c,f){a=c-a;b=f-b;return Math.sqrt(a*a+b*b)};Na=function(a,b){return!a!==!b};Oa=function(a){for(var b in a)if(a.hasOwnProperty(b))return!0;return!1};Pa=function(a){for(var b in a)a.hasOwnProperty(b)&&delete a[b]};var r=+new Date;Qa=function(){if("undefined"!==typeof window.performance){var a=window.performance;if("undefined"!==typeof a.now)return a.now();if("undefined"!==
typeof a.webkitNow)return a.webkitNow();if("undefined"!==typeof a.mozNow)return a.mozNow();if("undefined"!==typeof a.msNow)return a.msNow()}return Date.now()-r};var q=!1,s=q=!1,t=!1;"undefined"!==typeof window&&(q=/chrome/i.test(navigator.userAgent)||/chromium/i.test(navigator.userAgent),q=!q&&/safari/i.test(navigator.userAgent),s=/(iphone|ipod|ipad)/i.test(navigator.userAgent),t=window.c2ejecta);var p=!q&&!t&&!s&&"undefined"!==typeof Set&&"undefined"!==typeof Set.prototype.forEach;d.prototype.contains=
function(a){return this.jl()?!1:p?this.kc.has(a):this.items&&this.items.hasOwnProperty(a)};d.prototype.add=function(a){if(p)this.kc.has(a)||(this.kc.add(a),this.Gi=!1);else{var b=a.toString(),c=this.items;c?c.hasOwnProperty(b)||(c[b]=a,this.ol++,this.Gi=!1):(this.items={},this.items[b]=a,this.ol=1,this.Gi=!1)}};d.prototype.remove=function(a){if(!this.jl())if(p)this.kc.has(a)&&(this.kc["delete"](a),this.Gi=!1);else if(this.items){a=a.toString();var b=this.items;b.hasOwnProperty(a)&&(delete b[a],this.ol--,
this.Gi=!1)}};d.prototype.clear=function(){this.jl()||(p?this.kc.clear():(this.items=null,this.ol=0),this.Xl.length=0,this.Gi=!0)};d.prototype.jl=function(){return 0===this.count()};d.prototype.count=function(){return p?this.kc.size:this.ol};var y=null,A=0;d.prototype.bH=function(){if(!this.Gi){if(p)this.Xl.length=this.kc.size,y=this.Xl,A=0,this.kc.forEach(e),y=null,A=0;else{var a=this.Xl;a.length=this.ol;var b,c=0,f=this.items;if(f)for(b in f)f.hasOwnProperty(b)&&(a[c++]=f[b])}this.Gi=!0}};d.prototype.wg=
function(){this.bH();return this.Xl};da=d;new da;Ta=function(a,b){p?Ra(a,b.kc):Sa(a,b.wg())};Ra=function(a,b){var c,f,d,g;f=c=0;for(d=a.length;c<d;++c)g=a[c],b.has(g)||(a[f++]=g);a.length=f};Sa=function(a,b){var c,f,d,g;f=c=0;for(d=a.length;c<d;++c)g=a[c],-1===za(b,g)&&(a[f++]=g);a.length=f};f.prototype.add=function(a){this.y=a-this.u;this.Hr=this.mb+this.y;this.u=this.Hr-this.mb-this.y;this.mb=this.Hr};f.prototype.reset=function(){this.mb=this.Hr=this.y=this.u=0};Ua=f;Va=function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,
"\\$&")};h.prototype.jo=function(a){this.Vz=a;this.ff=a.length/2;this.sc.length=a.length;this.kp=this.lp=-1;this.nx=0};h.prototype.Oi=function(){return!this.Vz.length};h.prototype.nb=function(){for(var a=this.sc,b=a[0],c=b,f=a[1],d=f,g,h,w=1,m=this.ff;w<m;++w)h=2*w,g=a[h],h=a[h+1],g<b&&(b=g),g>c&&(c=g),h<f&&(f=h),h>d&&(d=h);this.bp=b;this.cp=c;this.dp=f;this.$o=d};h.prototype.Ck=function(a,b,c){this.sc.length=8;this.ff=4;var f=this.sc;f[0]=a.left-b;f[1]=a.top-c;f[2]=a.right-b;f[3]=a.top-c;f[4]=a.right-
b;f[5]=a.bottom-c;f[6]=a.left-b;f[7]=a.bottom-c;this.lp=a.right-a.left;this.kp=a.bottom-a.top;this.nb()};h.prototype.Bk=function(a,b,c,f,d){this.sc.length=8;this.ff=4;var g=this.sc;g[0]=a.Hc-b;g[1]=a.Ic-c;g[2]=a.ne-b;g[3]=a.oe-c;g[4]=a.$d-b;g[5]=a.ae-c;g[6]=a.Yd-b;g[7]=a.Zd-c;this.lp=f;this.kp=d;this.nb()};h.prototype.jA=function(a){this.ff=a.ff;xa(this.sc,a.sc);this.bp=a.bp;this.dp-a.dp;this.cp=a.cp;this.$o=a.$o};h.prototype.Fi=function(a,b,c){if(this.lp!==a||this.kp!==b||this.nx!==c){this.lp=a;
this.kp=b;this.nx=c;var f,d,g,h,w,m=0,k=1,l=this.Vz,e=this.sc;0!==c&&(m=Math.sin(c),k=Math.cos(c));c=0;for(g=this.ff;c<g;c++)f=2*c,d=f+1,h=l[f]*a,w=l[d]*b,e[f]=h*k-w*m,e[d]=w*k+h*m;this.nb()}};h.prototype.Ae=function(a,b){var c=this.sc;if(a===c[0]&&b===c[1])return!0;var f,d,g,h=this.ff,w=this.bp-110,m=this.dp-101,k=this.cp+131,l=this.$o+120,e,n,q=0,p=0;for(f=0;f<h;f++)d=2*f,g=(f+1)%h*2,e=c[d],d=c[d+1],n=c[g],g=c[g+1],ra(w,m,a,b,e,d,n,g)&&q++,ra(k,l,a,b,e,d,n,g)&&p++;return 1===q%2||1===p%2};h.prototype.Xj=
function(a,b,c){var f=a.sc,d=this.sc;if(this.Ae(f[0]+b,f[1]+c)||a.Ae(d[0]-b,d[1]-c))return!0;var g,h,w,m,k,l,e,n,q,p,r,y;g=0;for(m=this.ff;g<m;g++)for(h=2*g,w=(g+1)%m*2,n=d[h],h=d[h+1],q=d[w],p=d[w+1],w=0,e=a.ff;w<e;w++)if(k=2*w,l=(w+1)%e*2,r=f[k]+b,k=f[k+1]+c,y=f[l]+b,l=f[l+1]+c,ra(n,h,q,p,r,k,y,l))return!0;return!1};Xa=h;g.prototype.wt=function(a,b,c){var f;f=this.cells[a];return f?(f=f[b])?f:c?(f=m(this,a,b),this.cells[a][b]=f):null:c?(f=m(this,a,b),this.cells[a]={},this.cells[a][b]=f):null};g.prototype.Uo=
function(a){return pa(a/this.$C)};g.prototype.Vo=function(a){return pa(a/this.ZC)};g.prototype.update=function(a,b,c){var f,d,g,h,w;if(b)for(f=b.left,d=b.right;f<=d;++f)for(g=b.top,h=b.bottom;g<=h;++g)if(!c||!c.Ae(f,g))if(w=this.wt(f,g,!1))w.remove(a),w.jl()&&(w.Rn.clear(),1E3>D.length&&D.push(w),this.cells[f][g]=null);if(c)for(f=c.left,d=c.right;f<=d;++f)for(g=c.top,h=c.bottom;g<=h;++g)b&&b.Ae(f,g)||this.wt(f,g,!0).dF(a)};g.prototype.Yz=function(a,b){var c,f,d,g,h,w;c=this.Uo(a.left);d=this.Vo(a.top);
f=this.Uo(a.right);for(h=this.Vo(a.bottom);c<=f;++c)for(g=d;g<=h;++g)(w=this.wt(c,g,!1))&&w.dump(b)};Ya=g;var D=[];l.prototype.jl=function(){return this.Rn.jl()};l.prototype.dF=function(a){this.Rn.add(a)};l.prototype.remove=function(a){this.Rn.remove(a)};l.prototype.dump=function(a){ya(a,this.Rn.wg())};ba=l;var w="lighter xor copy destination-over source-in destination-in source-out destination-out source-atop destination-atop".split(" ");Za=function(a){return 0>=a||11<=a?"source-over":w[a-1]};$a=
function(a,b,c){if(c)switch(a.Gd=c.ONE,a.yd=c.ONE_MINUS_SRC_ALPHA,b){case 1:a.Gd=c.ONE;a.yd=c.ONE;break;case 3:a.Gd=c.ONE;a.yd=c.ZERO;break;case 4:a.Gd=c.ONE_MINUS_DST_ALPHA;a.yd=c.ONE;break;case 5:a.Gd=c.DST_ALPHA;a.yd=c.ZERO;break;case 6:a.Gd=c.ZERO;a.yd=c.SRC_ALPHA;break;case 7:a.Gd=c.ONE_MINUS_DST_ALPHA;a.yd=c.ZERO;break;case 8:a.Gd=c.ZERO;a.yd=c.ONE_MINUS_SRC_ALPHA;break;case 9:a.Gd=c.DST_ALPHA;a.yd=c.ONE_MINUS_SRC_ALPHA;break;case 10:a.Gd=c.ONE_MINUS_DST_ALPHA,a.yd=c.SRC_ALPHA}};ab=function(a){return Math.round(1E6*
a)/1E6};bb=function(a,b){return"string"!==typeof a||"string"!==typeof b||a.length!==b.length?!1:a===b?!0:a.toLowerCase()===b.toLowerCase()};cb=function(a){a=a.target;return!a||a===document||a===window||document&&document.body&&a===document.body||bb(a.tagName,"canvas")?!0:!1}})();var Yb="undefined"!==typeof Float32Array?Float32Array:Array;function Zb(a){var c=new Yb(3);a&&(c[0]=a[0],c[1]=a[1],c[2]=a[2]);return c}
function $b(a){var c=new Yb(16);a&&(c[0]=a[0],c[1]=a[1],c[2]=a[2],c[3]=a[3],c[4]=a[4],c[5]=a[5],c[6]=a[6],c[7]=a[7],c[8]=a[8],c[9]=a[9],c[10]=a[10],c[11]=a[11],c[12]=a[12],c[13]=a[13],c[14]=a[14],c[15]=a[15]);return c}function ac(a,c){c[0]=a[0];c[1]=a[1];c[2]=a[2];c[3]=a[3];c[4]=a[4];c[5]=a[5];c[6]=a[6];c[7]=a[7];c[8]=a[8];c[9]=a[9];c[10]=a[10];c[11]=a[11];c[12]=a[12];c[13]=a[13];c[14]=a[14];c[15]=a[15]}
function bc(a,c){var b=c[0],d=c[1];c=c[2];a[0]*=b;a[1]*=b;a[2]*=b;a[3]*=b;a[4]*=d;a[5]*=d;a[6]*=d;a[7]*=d;a[8]*=c;a[9]*=c;a[10]*=c;a[11]*=c}
function cc(a,c,b,d){d||(d=$b());var e,f,h,g,m,l,n,k,r=a[0],q=a[1];a=a[2];f=b[0];h=b[1];e=b[2];b=c[1];l=c[2];r===c[0]&&q===b&&a===l?(a=d,a[0]=1,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=1,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=1,a[11]=0,a[12]=0,a[13]=0,a[14]=0,a[15]=1):(b=r-c[0],l=q-c[1],n=a-c[2],k=1/Math.sqrt(b*b+l*l+n*n),b*=k,l*=k,n*=k,c=h*n-e*l,e=e*b-f*n,f=f*l-h*b,(k=Math.sqrt(c*c+e*e+f*f))?(k=1/k,c*=k,e*=k,f*=k):f=e=c=0,h=l*f-n*e,g=n*c-b*f,m=b*e-l*c,(k=Math.sqrt(h*h+g*g+m*m))?(k=1/k,h*=k,g*=k,m*=k):m=g=h=0,
d[0]=c,d[1]=h,d[2]=b,d[3]=0,d[4]=e,d[5]=g,d[6]=l,d[7]=0,d[8]=f,d[9]=m,d[10]=n,d[11]=0,d[12]=-(c*r+e*q+f*a),d[13]=-(h*r+g*q+m*a),d[14]=-(b*r+l*q+n*a),d[15]=1)}
(function(){function a(a){this.Yj=/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent);this.height=this.width=0;this.tx=Zb([0,0,100]);this.Py=Zb([0,0,0]);this.KA=Zb([0,1,0]);this.Zv=Zb([1,1,1]);this.Hx=!0;this.Ou=$b();this.Hf=$b();this.Cy=$b();this.Ts=$b();this.X=a;this.fy()}function c(a,b,c){this.X=a;this.ko=b;this.name=c;this.Df=a.getAttribLocation(b,"aPos");this.Ti=a.getAttribLocation(b,"aTex");this.Ny=a.getUniformLocation(b,"matP");this.Dq=a.getUniformLocation(b,"matMV");this.tl=
a.getUniformLocation(b,"opacity");this.Oy=a.getUniformLocation(b,"samplerFront");this.yn=a.getUniformLocation(b,"samplerBack");this.gk=a.getUniformLocation(b,"destStart");this.fk=a.getUniformLocation(b,"destEnd");this.uu=a.getUniformLocation(b,"seconds");this.tu=a.getUniformLocation(b,"pixelWidth");this.su=a.getUniformLocation(b,"pixelHeight");this.xn=a.getUniformLocation(b,"layerScale");this.wn=a.getUniformLocation(b,"layerAngle");this.An=a.getUniformLocation(b,"viewOrigin");this.zn=a.getUniformLocation(b,
"scrollPos");this.ZE=!!(this.tu||this.su||this.uu||this.yn||this.gk||this.fk||this.xn||this.wn||this.An||this.zn);this.Xy=this.Yy=-999;this.Fq=1;this.Ty=this.Sy=0;this.Vy=this.Ry=this.Qy=1;this.$y=this.Zy=this.bz=this.az=this.Uy=0;this.cu=[];this.Wy=$b();this.tl&&a.uniform1f(this.tl,1);this.Oy&&a.uniform1i(this.Oy,0);this.yn&&a.uniform1i(this.yn,1);this.gk&&a.uniform2f(this.gk,0,0);this.fk&&a.uniform2f(this.fk,1,1);this.xn&&a.uniform1f(this.xn,1);this.wn&&a.uniform1f(this.wn,0);this.An&&a.uniform2f(this.An,
0,0);this.zn&&a.uniform2f(this.zn,0,0);this.Tj=!1}function b(a,b){this.type=a;this.ka=b;this.X=b.X;this.Rg=this.Of=this.Dz=0;this.rb=this.ug=null;this.lA=[]}a.prototype.fy=function(){var a=this.X,b;this.Dy=1;this.ck=this.Ri=null;this.yp=1;a.clearColor(0,0,0,0);a.clear(a.COLOR_BUFFER_BIT);a.enable(a.BLEND);a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA);a.disable(a.CULL_FACE);a.disable(a.DEPTH_TEST);this.Fy=a.ONE;this.Ay=a.ONE_MINUS_SRC_ALPHA;this.gv=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,this.gv);
this.yo=Array(4);this.po=Array(4);for(b=0;4>b;b++)this.yo[b]=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,this.yo[b]),this.po[b]=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,this.po[b]);this.Gh=0;this.bF=a.createBuffer();a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.bF);this.Wv=new Float32Array(16E3);this.Lv=new Float32Array(16E3);this.nG=new Float32Array(32E3);for(var c=new Uint16Array(12E3),d=b=0;12E3>b;)c[b++]=d,c[b++]=d+1,c[b++]=d+2,c[b++]=d,c[b++]=d+2,c[b++]=d+3,d+=4;a.bufferData(a.ELEMENT_ARRAY_BUFFER,
c,a.STATIC_DRAW);this.hv=this.uh=0;this.Sc=[];b=this.Ss({src:"varying mediump vec2 vTex;\nuniform lowp float opacity;\nuniform lowp sampler2D samplerFront;\nvoid main(void) {\n\tgl_FragColor = texture2D(samplerFront, vTex);\n\tgl_FragColor *= opacity;\n}"},"attribute highp vec2 aPos;\nattribute mediump vec2 aTex;\nvarying mediump vec2 vTex;\nuniform highp mat4 matP;\nuniform highp mat4 matMV;\nvoid main(void) {\n\tgl_Position = matP * matMV * vec4(aPos.x, aPos.y, 0.0, 1.0);\n\tvTex = aTex;\n}","<default>");
this.Sc.push(b);b=this.Ss({src:"uniform mediump sampler2D samplerFront;\nvarying lowp float opacity;\nvoid main(void) {\n\tgl_FragColor = texture2D(samplerFront, gl_PointCoord);\n\tgl_FragColor *= opacity;\n}"},"attribute vec4 aPos;\nvarying float opacity;\nuniform mat4 matP;\nuniform mat4 matMV;\nvoid main(void) {\n\tgl_Position = matP * matMV * vec4(aPos.x, aPos.y, 0.0, 1.0);\n\tgl_PointSize = aPos.z;\n\topacity = aPos.w;\n}","<point>");this.Sc.push(b);for(var l in dc)dc.hasOwnProperty(l)&&this.Sc.push(this.Ss(dc[l],
"attribute highp vec2 aPos;\nattribute mediump vec2 aTex;\nvarying mediump vec2 vTex;\nuniform highp mat4 matP;\nuniform highp mat4 matMV;\nvoid main(void) {\n\tgl_Position = matP * matMV * vec4(aPos.x, aPos.y, 0.0, 1.0);\n\tvTex = aTex;\n}",l));a.activeTexture(a.TEXTURE0);a.bindTexture(a.TEXTURE_2D,null);this.Ei=[];this.Dh=0;this.Ee=!1;this.Ex=this.pn=-1;this.Jm=null;this.mE=a.createFramebuffer();this.cA=null;this.oj=Zb([0,0,0]);this.mz=a.getParameter(a.ALIASED_POINT_SIZE_RANGE)[1];2048<this.mz&&
(this.mz=2048);this.nh(0)};c.prototype.Qv=function(a){var b=this.Wy;if(b[0]!==a[0]||b[1]!==a[1]||b[2]!==a[2]||b[3]!==a[3]||b[4]!==a[4]||b[5]!==a[5]||b[6]!==a[6]||b[7]!==a[7]||b[8]!==a[8]||b[9]!==a[9]||b[10]!==a[10]||b[11]!==a[11]||b[12]!==a[12]||b[13]!==a[13]||b[14]!==a[14]||b[15]!==a[15])ac(a,this.Wy),this.X.uniformMatrix4fv(this.Dq,!1,a)};a.prototype.Ss=function(a,b,d){var m=this.X,l=m.createShader(m.FRAGMENT_SHADER);m.shaderSource(l,a.src);m.compileShader(l);if(!m.getShaderParameter(l,m.COMPILE_STATUS))return m.deleteShader(l),
null;var e=m.createShader(m.VERTEX_SHADER);m.shaderSource(e,b);m.compileShader(e);if(!m.getShaderParameter(e,m.COMPILE_STATUS))return m.deleteShader(l),m.deleteShader(e),null;b=m.createProgram();m.attachShader(b,l);m.attachShader(b,e);m.linkProgram(b);if(!m.getProgramParameter(b,m.LINK_STATUS))return m.deleteShader(l),m.deleteShader(e),m.deleteProgram(b),null;m.useProgram(b);m.deleteShader(l);m.deleteShader(e);d=new c(m,b,d);d.gt=a.gt||0;d.ht=a.ht||0;d.Cx=!!a.Cx;d.ax=!!a.ax;d.Ha=a.Ha||[];a=0;for(l=
d.Ha.length;a<l;a++)d.Ha[a][1]=m.getUniformLocation(b,d.Ha[a][0]),d.cu.push(0),m.uniform1f(d.Ha[a][1],0);return d};a.prototype.Ct=function(a){var b,c;b=0;for(c=this.Sc.length;b<c;b++)if(this.Sc[b].name===a)return b;return-1};a.prototype.Uz=function(a,b,c){var d=this.Hf,l=this.Ou,e=[0,0,0,0,0,0,0,0];e[0]=d[0]*a+d[4]*b+d[12];e[1]=d[1]*a+d[5]*b+d[13];e[2]=d[2]*a+d[6]*b+d[14];e[3]=d[3]*a+d[7]*b+d[15];e[4]=l[0]*e[0]+l[4]*e[1]+l[8]*e[2]+l[12]*e[3];e[5]=l[1]*e[0]+l[5]*e[1]+l[9]*e[2]+l[13]*e[3];e[6]=l[2]*
e[0]+l[6]*e[1]+l[10]*e[2]+l[14]*e[3];e[7]=-e[2];0!==e[7]&&(e[7]=1/e[7],e[4]*=e[7],e[5]*=e[7],e[6]*=e[7],c[0]=(.5*e[4]+.5)*this.width,c[1]=(.5*e[5]+.5)*this.height)};a.prototype.Rl=function(a,b,c){if(this.width!==a||this.height!==b||c){this.Ji();this.width=a;this.height=b;this.X.viewport(0,0,a,b);b=a/b;var d=this.Ou,e;e=1*Math.tan(45*Math.PI/360);b*=e;a=-b;c=-e;d||(d=$b());var n=b-a,k=e-c;d[0]=2/n;d[1]=0;d[2]=0;d[3]=0;d[4]=0;d[5]=2/k;d[6]=0;d[7]=0;d[8]=(b+a)/n;d[9]=(e+c)/k;d[10]=-1001/999;d[11]=-1;
d[12]=0;d[13]=0;d[14]=-2E3/999;d[15]=0;cc(this.tx,this.Py,this.KA,this.Hf);a=[0,0];b=[0,0];this.Uz(0,0,a);this.Uz(1,1,b);this.Zv[0]=1/(b[0]-a[0]);this.Zv[1]=-1/(b[1]-a[1]);a=0;for(b=this.Sc.length;a<b;a++)c=this.Sc[a],c.Tj=!1,c.Ny&&(this.X.useProgram(c.ko),this.X.uniformMatrix4fv(c.Ny,!1,this.Ou));this.X.useProgram(this.Sc[this.pn].ko);this.X.bindTexture(this.X.TEXTURE_2D,null);this.X.activeTexture(this.X.TEXTURE1);this.X.bindTexture(this.X.TEXTURE_2D,null);this.X.activeTexture(this.X.TEXTURE0);this.ck=
this.Ri=null}};a.prototype.kh=function(){cc(this.tx,this.Py,this.KA,this.Hf);bc(this.Hf,this.Zv)};a.prototype.translate=function(a,b){if(0!==a||0!==b){this.oj[0]=a;this.oj[1]=b;this.oj[2]=0;var c=this.Hf,d=this.oj,e=d[0],n=d[1],d=d[2];c[12]=c[0]*e+c[4]*n+c[8]*d+c[12];c[13]=c[1]*e+c[5]*n+c[9]*d+c[13];c[14]=c[2]*e+c[6]*n+c[10]*d+c[14];c[15]=c[3]*e+c[7]*n+c[11]*d+c[15]}};a.prototype.scale=function(a,b){if(1!==a||1!==b)this.oj[0]=a,this.oj[1]=b,this.oj[2]=1,bc(this.Hf,this.oj)};a.prototype.sv=function(a){if(0!==
a){var b=this.Hf,c,d=Math.sin(a);a=Math.cos(a);var e=b[0],n=b[1],k=b[2],r=b[3],q=b[4],s=b[5],t=b[6],p=b[7];c?b!==c&&(c[8]=b[8],c[9]=b[9],c[10]=b[10],c[11]=b[11],c[12]=b[12],c[13]=b[13],c[14]=b[14],c[15]=b[15]):c=b;c[0]=e*a+q*d;c[1]=n*a+s*d;c[2]=k*a+t*d;c[3]=r*a+p*d;c[4]=e*-d+q*a;c[5]=n*-d+s*a;c[6]=k*-d+t*a;c[7]=r*-d+p*a}};a.prototype.sh=function(){for(var a=!1,b=0;16>b;b++)if(this.Cy[b]!==this.Hf[b]){a=!0;break}a&&(a=this.sg(),a.type=5,a.rb?ac(this.Hf,a.rb):a.rb=$b(this.Hf),ac(this.Hf,this.Cy),this.Ee=
!1)};b.prototype.AD=function(){this.X.bindTexture(this.X.TEXTURE_2D,this.ug)};b.prototype.BD=function(){var a=this.X;a.activeTexture(a.TEXTURE1);a.bindTexture(a.TEXTURE_2D,this.ug);a.activeTexture(a.TEXTURE0)};b.prototype.xD=function(){var a=this.Dz,b=this.ka;b.yp=a;b=b.Jm;b.tl&&b.Fq!==a&&(b.Fq=a,this.X.uniform1f(b.tl,a))};b.prototype.uD=function(){this.X.drawElements(this.X.TRIANGLES,this.Rg,this.X.UNSIGNED_SHORT,2*this.Of)};b.prototype.wD=function(){this.X.blendFunc(this.Of,this.Rg)};b.prototype.CD=
function(){var a,b,c,d=this.ka.Sc,e=this.ka.Ex;a=0;for(b=d.length;a<b;a++)c=d[a],a===e&&c.Dq?(c.Qv(this.rb),c.Tj=!0):c.Tj=!1;ac(this.rb,this.ka.Ts)};b.prototype.vD=function(){var a=this.X,b=this.ka;this.ug?(b.ck===this.ug&&(a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,null),b.ck=null,a.activeTexture(a.TEXTURE0)),a.bindFramebuffer(a.FRAMEBUFFER,b.mE),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,this.ug,0)):(a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,
a.TEXTURE_2D,null,0),a.bindFramebuffer(a.FRAMEBUFFER,null))};b.prototype.oD=function(){var a=this.X;0===this.Of?(a.clearColor(this.rb[0],this.rb[1],this.rb[2],this.rb[3]),a.clear(a.COLOR_BUFFER_BIT)):(a.enable(a.SCISSOR_TEST),a.scissor(this.rb[0],this.rb[1],this.rb[2],this.rb[3]),a.clearColor(0,0,0,0),a.clear(this.X.COLOR_BUFFER_BIT),a.disable(a.SCISSOR_TEST))};b.prototype.tD=function(){var a=this.X,b=this.ka,c=b.Sc[1];a.useProgram(c.ko);!c.Tj&&c.Dq&&(c.Qv(b.Ts),c.Tj=!0);a.enableVertexAttribArray(c.Df);
a.bindBuffer(a.ARRAY_BUFFER,b.gv);a.vertexAttribPointer(c.Df,4,a.FLOAT,!1,0,0);a.drawArrays(a.POINTS,this.Of/4,this.Rg);c=b.Jm;a.useProgram(c.ko);0<=c.Df&&(a.enableVertexAttribArray(c.Df),a.bindBuffer(a.ARRAY_BUFFER,b.yo[b.Gh]),a.vertexAttribPointer(c.Df,2,a.FLOAT,!1,0,0));0<=c.Ti&&(a.enableVertexAttribArray(c.Ti),a.bindBuffer(a.ARRAY_BUFFER,b.po[b.Gh]),a.vertexAttribPointer(c.Ti,2,a.FLOAT,!1,0,0))};b.prototype.yD=function(){var a=this.X,b=this.ka,c=b.Sc[this.Of];b.Ex=this.Of;b.Jm=c;a.useProgram(c.ko);
!c.Tj&&c.Dq&&(c.Qv(b.Ts),c.Tj=!0);c.tl&&c.Fq!==b.yp&&(c.Fq=b.yp,a.uniform1f(c.tl,b.yp));0<=c.Df&&(a.enableVertexAttribArray(c.Df),a.bindBuffer(a.ARRAY_BUFFER,b.yo[b.Gh]),a.vertexAttribPointer(c.Df,2,a.FLOAT,!1,0,0));0<=c.Ti&&(a.enableVertexAttribArray(c.Ti),a.bindBuffer(a.ARRAY_BUFFER,b.po[b.Gh]),a.vertexAttribPointer(c.Ti,2,a.FLOAT,!1,0,0))};b.prototype.zD=function(){var a,b,c=this.ka.Jm,d=this.X;a=this.rb;c.yn&&this.ka.ck!==this.ug&&(d.activeTexture(d.TEXTURE1),d.bindTexture(d.TEXTURE_2D,this.ug),
this.ka.ck=this.ug,d.activeTexture(d.TEXTURE0));var e=a[0];c.tu&&e!==c.Yy&&(c.Yy=e,d.uniform1f(c.tu,e));e=a[1];c.su&&e!==c.Xy&&(c.Xy=e,d.uniform1f(c.su,e));e=a[2];b=a[3];!c.gk||e===c.Sy&&b===c.Ty||(c.Sy=e,c.Ty=b,d.uniform2f(c.gk,e,b));e=a[4];b=a[5];!c.fk||e===c.Qy&&b===c.Ry||(c.Qy=e,c.Ry=e,d.uniform2f(c.fk,e,b));e=a[6];c.xn&&e!==c.Vy&&(c.Vy=e,d.uniform1f(c.xn,e));e=a[7];c.wn&&e!==c.Uy&&(c.Uy=e,d.uniform1f(c.wn,e));e=a[8];b=a[9];!c.An||e===c.az&&b===c.bz||(c.az=e,c.bz=b,d.uniform2f(c.An,e,b));e=a[10];
b=a[11];!c.zn||e===c.Zy&&b===c.$y||(c.Zy=e,c.$y=b,d.uniform2f(c.zn,e,b));c.uu&&d.uniform1f(c.uu,Qa()/1E3);if(c.Ha.length)for(a=0,b=c.Ha.length;a<b;a++)e=this.lA[a],e!==c.cu[a]&&(c.cu[a]=e,d.uniform1f(c.Ha[a][1],e))};a.prototype.sg=function(){this.Dh===this.Ei.length&&this.Ei.push(new b(0,this));return this.Ei[this.Dh++]};a.prototype.Ji=function(){if(0!==this.Dh&&!this.X.isContextLost()){var a=this.X;0<this.hv&&(a.bindBuffer(a.ARRAY_BUFFER,this.gv),a.bufferData(a.ARRAY_BUFFER,this.nG.subarray(0,this.hv),
a.STREAM_DRAW),b&&0<=b.Df&&"<point>"===b.name&&a.vertexAttribPointer(b.Df,4,a.FLOAT,!1,0,0));if(0<this.uh){var b=this.Jm;a.bindBuffer(a.ARRAY_BUFFER,this.yo[this.Gh]);a.bufferData(a.ARRAY_BUFFER,this.Wv.subarray(0,this.uh),a.STREAM_DRAW);b&&0<=b.Df&&"<point>"!==b.name&&a.vertexAttribPointer(b.Df,2,a.FLOAT,!1,0,0);a.bindBuffer(a.ARRAY_BUFFER,this.po[this.Gh]);a.bufferData(a.ARRAY_BUFFER,this.Lv.subarray(0,this.uh),a.STREAM_DRAW);b&&0<=b.Ti&&"<point>"!==b.name&&a.vertexAttribPointer(b.Ti,2,a.FLOAT,
!1,0,0)}for(var c,a=0,b=this.Dh;a<b;a++)switch(c=this.Ei[a],c.type){case 1:c.uD();break;case 2:c.AD();break;case 3:c.xD();break;case 4:c.wD();break;case 5:c.CD();break;case 6:c.vD();break;case 7:c.oD();break;case 8:c.tD();break;case 9:c.yD();break;case 10:c.zD();break;case 11:c.BD()}this.hv=this.uh=this.Dh=0;this.Ee=!1;this.Gh++;4<=this.Gh&&(this.Gh=0)}};a.prototype.Pl=function(a){if(a!==this.Dy){var b=this.sg();b.type=3;this.Dy=b.Dz=a;this.Ee=!1}};a.prototype.gf=function(a){if(a!==this.Ri){var b=
this.sg();b.type=2;this.Ri=b.ug=a;this.Ee=!1}};a.prototype.ij=function(a,b){if(a!==this.Fy||b!==this.Ay){var c=this.sg();c.type=4;c.Of=a;c.Rg=b;this.Fy=a;this.Ay=b;this.Ee=!1}};a.prototype.gA=function(){this.ij(this.X.ONE,this.X.ONE_MINUS_SRC_ALPHA)};a.prototype.jr=function(a,b,c,d,e,n,k,r){15992<=this.uh&&this.Ji();var q=this.uh,s=this.Wv,t=this.Lv;if(this.Ee)this.Ei[this.Dh-1].Rg+=6;else{var p=this.sg();p.type=1;p.Of=q/4*3;p.Rg=6;this.Ee=!0}s[q]=a;t[q++]=0;s[q]=b;t[q++]=0;s[q]=c;t[q++]=1;s[q]=d;
t[q++]=0;s[q]=e;t[q++]=1;s[q]=n;t[q++]=1;s[q]=k;t[q++]=0;s[q]=r;t[q++]=1;this.uh=q};a.prototype.fj=function(a,b,c,d,e,n,k,r,q){15992<=this.uh&&this.Ji();var s=this.uh,t=this.Wv,p=this.Lv;if(this.Ee)this.Ei[this.Dh-1].Rg+=6;else{var y=this.sg();y.type=1;y.Of=s/4*3;y.Rg=6;this.Ee=!0}var y=q.left,A=q.top,D=q.right;q=q.bottom;t[s]=a;p[s++]=y;t[s]=b;p[s++]=A;t[s]=c;p[s++]=D;t[s]=d;p[s++]=A;t[s]=e;p[s++]=D;t[s]=n;p[s++]=q;t[s]=k;p[s++]=y;t[s]=r;p[s++]=q;this.uh=s};a.prototype.nh=function(a){if(this.pn!==
a){if(!this.Sc[a]){if(0===this.pn)return;a=0}var b=this.sg();b.type=9;this.pn=b.Of=a;this.Ee=!1}};a.prototype.$n=function(a){a=this.Sc[a];return!(!a.gk&&!a.fk)};a.prototype.jv=function(a){a=this.Sc[a];return!!(a.gk||a.fk||a.Cx)};a.prototype.rG=function(a){a=this.Sc[a];return 0!==a.gt||0!==a.ht};a.prototype.EE=function(a){return this.Sc[a].gt};a.prototype.FE=function(a){return this.Sc[a].ht};a.prototype.GE=function(a,b){return this.Sc[a].Ha[b][2]};a.prototype.gr=function(a){return this.Sc[a].ax};a.prototype.Ql=
function(a,b,c,d,e,n,k,r,q,s,t,p,y,A){var D=this.Sc[this.pn],w,G;if(D.ZE||A.length){w=this.sg();w.type=10;w.rb?ac(this.Hf,w.rb):w.rb=$b();G=w.rb;G[0]=b;G[1]=c;G[2]=d;G[3]=e;G[4]=n;G[5]=k;G[6]=r;G[7]=q;G[8]=s;G[9]=t;G[10]=p;G[11]=y;w.ug=D.yn?a:null;if(A.length)for(c=w.lA,c.length=A.length,a=0,b=A.length;a<b;a++)c[a]=A[a];this.Ee=!1}};a.prototype.clear=function(a,b,c,d){var e=this.sg();e.type=7;e.Of=0;e.rb||(e.rb=$b());e.rb[0]=a;e.rb[1]=b;e.rb[2]=c;e.rb[3]=d;this.Ee=!1};a.prototype.clearRect=function(a,
b,c,d){if(!(0>c||0>d)){var e=this.sg();e.type=7;e.Of=1;e.rb||(e.rb=$b());e.rb[0]=a;e.rb[1]=b;e.rb[2]=c;e.rb[3]=d;this.Ee=!1}};a.prototype.qG=function(){this.Ji();this.X.flush()};var d=[],e={};a.prototype.cD=function(){d.length=0;e={}};a.prototype.My=function(a,b,c){var m;m=!1;b=!!b;var l=a.src+","+m+","+b+(m?",undefined":""),n=null;if("undefined"!==typeof a.src&&e.hasOwnProperty(l))return n=e[l],n.jp++,n;this.Ji();var k=this.X,r=ia(a.width)&&ia(a.height),n=k.createTexture();k.bindTexture(k.TEXTURE_2D,
n);k.pixelStorei(k.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);var q=k.RGBA,s=k.RGBA,t=k.UNSIGNED_BYTE;if(c&&!this.Yj)switch(c){case 1:s=q=k.RGB;break;case 2:t=k.UNSIGNED_SHORT_4_4_4_4;break;case 3:t=k.UNSIGNED_SHORT_5_5_5_1;break;case 4:s=q=k.RGB,t=k.UNSIGNED_SHORT_5_6_5}if(!r&&m){c=document.createElement("canvas");c.width=ja(a.width);c.height=ja(a.height);var p=c.getContext("2d");p.webkitImageSmoothingEnabled=b;p.mozImageSmoothingEnabled=b;p.msImageSmoothingEnabled=b;p.imageSmoothingEnabled=b;p.drawImage(a,
0,0,a.width,a.height,0,0,c.width,c.height);k.texImage2D(k.TEXTURE_2D,0,q,s,t,c)}else k.texImage2D(k.TEXTURE_2D,0,q,s,t,a);m?(k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_S,k.REPEAT),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_T,k.REPEAT)):(k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_S,k.CLAMP_TO_EDGE),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_T,k.CLAMP_TO_EDGE));b?(k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MAG_FILTER,k.LINEAR),r&&this.Hx?(k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MIN_FILTER,k.LINEAR_MIPMAP_LINEAR),
k.generateMipmap(k.TEXTURE_2D)):k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MIN_FILTER,k.LINEAR)):(k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MAG_FILTER,k.NEAREST),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MIN_FILTER,k.NEAREST));k.bindTexture(k.TEXTURE_2D,null);this.Ri=null;n.Em=a.width;n.Dm=a.height;n.jp=1;n.mx=l;d.push(n);return e[l]=n};a.prototype.Fh=function(a,b,c,e){this.Ji();var l=this.X;this.Yj&&(e=!1);var n=l.createTexture();l.bindTexture(l.TEXTURE_2D,n);l.texImage2D(l.TEXTURE_2D,0,l.RGBA,a,b,0,l.RGBA,
e?l.UNSIGNED_SHORT_4_4_4_4:l.UNSIGNED_BYTE,null);l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,l.CLAMP_TO_EDGE);l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,l.CLAMP_TO_EDGE);l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,c?l.LINEAR:l.NEAREST);l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,c?l.LINEAR:l.NEAREST);l.bindTexture(l.TEXTURE_2D,null);this.Ri=null;n.Em=a;n.Dm=b;d.push(n);return n};a.prototype.gH=function(a,b,c){this.Ji();var d=this.X;this.Yj&&(c=!1);d.bindTexture(d.TEXTURE_2D,b);d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,
!0);try{d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,c?d.UNSIGNED_SHORT_4_4_4_4:d.UNSIGNED_BYTE,a)}catch(e){console&&console.error&&console.error("Error updating WebGL texture: ",e)}d.bindTexture(d.TEXTURE_2D,null);this.Ri=null};a.prototype.deleteTexture=function(a){a&&("undefined"!==typeof a.jp&&1<a.jp?a.jp--:(this.Ji(),a===this.Ri&&(this.X.bindTexture(this.X.TEXTURE_2D,null),this.Ri=null),a===this.ck&&(this.X.activeTexture(this.X.TEXTURE1),this.X.bindTexture(this.X.TEXTURE_2D,null),this.X.activeTexture(this.X.TEXTURE0),
this.ck=null),Aa(d,a),"undefined"!==typeof a.mx&&delete e[a.mx],this.X.deleteTexture(a)))};a.prototype.mh=function(a){if(a!==this.cA){var b=this.sg();b.type=6;this.cA=b.ug=a;this.Ee=!1}};db=a})();
(function(){function a(){return"undefined"!==typeof jQuery?jQuery(window).width():window.innerWidth}function c(){return"undefined"!==typeof jQuery?jQuery(window).height():window.innerHeight}function b(a){if(a&&(a.getContext||a.dc)&&!a.c2runtime){a.c2runtime=this;var b=this;this.Bf=(this.dn=/crosswalk/i.test(navigator.userAgent)||/xwalk/i.test(navigator.userAgent)||!("undefined"===typeof window.c2isCrosswalk||!window.c2isCrosswalk))||"undefined"!==typeof window.device&&("undefined"!==typeof window.device.cordova||
"undefined"!==typeof window.device.phonegap)||"undefined"!==typeof window.c2isphonegap&&window.c2isphonegap;this.Ad=!!a.dc;this.il="undefined"!==typeof window.AppMobi||this.Ad;this.zf=!!window.c2cocoonjs;this.fg=!!window.c2ejecta;this.zf&&(CocoonJS.App.onSuspended.addEventListener(function(){b.setSuspended(!0)}),CocoonJS.App.onActivated.addEventListener(function(){b.setSuspended(!1)}));this.fg&&(document.addEventListener("pagehide",function(){b.setSuspended(!0)}),document.addEventListener("pageshow",
function(){b.setSuspended(!1)}),document.addEventListener("resize",function(){b.setSize(window.innerWidth,window.innerHeight)}));this.Db=this.Ad||this.zf||this.fg;this.Yj=/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent)||/iemobile/i.test(navigator.userAgent);this.qy=/tizen/i.test(navigator.userAgent);this.fq=/android/i.test(navigator.userAgent)&&!this.qy&&!this.Yj;this.Zt=(/iphone/i.test(navigator.userAgent)||/ipod/i.test(navigator.userAgent))&&!this.Yj;this.xy=/ipad/i.test(navigator.userAgent);
this.nq=this.Zt||this.xy||this.fg;this.oF=this.Zt&&/os\s6/i.test(navigator.userAgent);this.cn=/chrome/i.test(navigator.userAgent)||/chromium/i.test(navigator.userAgent);this.ly=/amazonwebappplatform/i.test(navigator.userAgent);this.hF=/firefox/i.test(navigator.userAgent);this.oy=/safari/i.test(navigator.userAgent)&&!this.cn&&!this.Yj;this.kF=/windows/i.test(navigator.userAgent);this.Ni="undefined"!==typeof window.c2nodewebkit||/nodewebkit/i.test(navigator.userAgent);this.mF=!("undefined"===typeof window.c2isWindows8||
!window.c2isWindows8);this.nF=!("undefined"===typeof window.c2isWindows8Capable||!window.c2isWindows8Capable);this.iq=!("undefined"===typeof window.c2isWindowsPhone8||!window.c2isWindowsPhone8);this.uy=!("undefined"===typeof window.c2isWindowsPhone81||!window.c2isWindowsPhone81);this.ty=this.mF||this.nF||this.uy;this.fF=!("undefined"===typeof window.c2isBlackberry10||!window.c2isBlackberry10);this.gq=this.fq&&!this.cn&&!this.dn&&!this.hF&&!this.ly&&!this.Db;this.devicePixelRatio=1;this.Sg=this.Bf||
this.dn||this.il||this.zf||this.fq||this.nq||this.iq||this.uy||this.fF||this.qy||this.fg;this.Sg||(this.Sg=/(blackberry|bb10|playbook|palm|symbian|nokia|windows\s+ce|phone|mobile|tablet|kindle|silk)/i.test(navigator.userAgent));"undefined"===typeof cr_is_preview||this.Ni||"?nw"!==window.location.search&&!/nodewebkit/i.test(navigator.userAgent)||(this.Ni=!0);this.gF="undefined"!==typeof cr_is_preview&&-1<window.location.search.indexOf("debug");this.canvas=a;this.mp=document.getElementById("c2canvasdiv");
this.wb=this.ka=this.X=null;this.pt="";this.Mp=!1;this.wz=this.xz=0;this.canvas.oncontextmenu=function(a){a.preventDefault&&a.preventDefault();return!1};this.canvas.onselectstart=function(a){a.preventDefault&&a.preventDefault();return!1};this.Ad&&(window.c2runtime=this);this.Ni&&(window.ondragover=function(a){a.preventDefault();return!1},window.ondrop=function(a){a.preventDefault();return!1},require("nw.gui").App.clearCache());this.gq&&"undefined"!==typeof jQuery&&jQuery("canvas").parents("*").css("overflow",
"visible");this.width=a.width;this.height=a.height;this.Ka=this.width;this.Ja=this.height;this.wp=this.width;this.vp=this.height;this.rn=window.innerWidth;this.qn=window.innerHeight;this.oE=!1;this.Hb=!0;this.hn=!1;Date.now||(Date.now=function(){return+new Date});this.plugins=[];this.types={};this.Y=[];this.wc=[];this.ku={};this.ig=[];this.et={};this.Mh=[];this.Zl=[];this.Qr=[];this.MC=[];this.NC=[];this.yy=this.rA=null;this.Lj={};this.Tt=this.Mi=!1;this.Uh=0;this.Vt=!1;this.cg=[];this.Xh=this.Qd=
this.zq=this.wv="";this.no=this.oA=!1;this.Qs=this.Bn=this.Lh=this.Fa=0;this.ni=1;this.He=new Ua;this.vh=new Ua;this.tq=0;this.oz=!0;this.Wq=this.Sp=this.Ip=this.hf=this.sn=this.ot=0;this.Gm=null;this.Ep=[];this.dt=[];this.Hp=-1;this.vu=[[]];this.Ov=this.Eq=0;this.ir(null);this.Om=this.rz=this.Qn=0;this.oo=[];this.Lr=this.lr=-1;this.ln=!0;this.Cq=0;this.gn=!1;this.NG=0;this.Uk=null;this.XE=!1;this.eu=0;this.Af=this.Gt=this.mv=!1;this.vz=new da;this.Vu=new da;this.Wu=new da;this.mr=[];this.le=new Xa([]);
this.Jv=new Xa([]);this.Tk=[];this.bq={};this.Xk={};this.Sk={};this.Yl={};this.jx={};this.Ly=this.xq=this.Ie=this.Xe=this.Ky=this.wq=this.Ib=null;this.Wl=this.Yt=!1;this.qt=[null,null];this.Qj=0;this.jt="";this.aj={};this.Dr=this.sl=null;this.Vq=[];this.vG()}}function d(a){a.target.result.createObjectStore("saves",{keyPath:"slot"})}function e(a,b,c,g){var f=indexedDB.open("_C2SaveStates");f.onupgradeneeded=d;f.onerror=g;f.onsuccess=function(d){d=d.target.result;d.onerror=g;d.transaction(["saves"],
"readwrite").objectStore("saves").put({slot:a,data:b}).onsuccess=c}}function f(a,b,c){var g=indexedDB.open("_C2SaveStates");g.onupgradeneeded=d;g.onerror=c;g.onsuccess=function(d){d=d.target.result;d.onerror=c;var g=d.transaction(["saves"]).objectStore("saves").get(a);g.onsuccess=function(){g.result?b(g.result.data):b(null)}}}function h(){ea("Reloading for continuous preview");window.c2cocoonjs?CocoonJS.App.reload():-1<window.location.search.indexOf("continuous")?window.location.reload(!0):window.location+=
"?continuous"}function g(a){var b,c={};for(b in a)!a.hasOwnProperty(b)||a[b]instanceof da||a[b]&&"undefined"!==typeof a[b].Gg||(c[b]=a[b]);return c}b.prototype.vG=function(){var a=this,b;b=this.iq?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest;b.open("GET","data.js",!0);var c=!1;if(!this.Db&&"response"in b&&"responseType"in b)try{b.responseType="json",c="json"===b.responseType}catch(d){c=!1}if(!c&&"responseType"in b)try{b.responseType="text"}catch(g){}if("overrideMimeType"in b)try{b.overrideMimeType("application/json; charset=utf-8")}catch(f){}b.onload=
function(){if(c)a.ru(b.response);else if(a.fg){var d=b.responseText,d=d.substr(d.indexOf("{"));a.ru(JSON.parse(d))}else a.ru(JSON.parse(b.responseText))};b.onerror=function(a){fa("Error requesting data.js:");fa(a)};b.send()};b.prototype.cF=function(){var b=this,d,g,f,h,e,k,m,l,n;this.devicePixelRatio=(this.Zj=(!this.Db||this.fg)&&this.cH&&!this.gq)?window.devicePixelRatio||window.webkitDevicePixelRatio||window.mozDevicePixelRatio||window.msDevicePixelRatio||1:1;this.ud();g=!(!this.oE&&(!this.Es||
this.Ni||this.ty||this.iq||this.dn||this.Bf||this.ly));0<this.De&&this.setSize(a(),c(),!0);try{this.MD&&(this.zf||this.fg||!this.Db)&&(d={alpha:g,depth:!1,antialias:!1,failIfMajorPerformanceCaveat:!0},this.X=this.canvas.getContext("webgl",d)||this.canvas.getContext("experimental-webgl",d))}catch(q){}if(this.X){this.Db||(this.pd=document.createElement("canvas"),jQuery(this.pd).appendTo(this.canvas.parentNode),this.pd.oncontextmenu=function(){return!1},this.pd.onselectstart=function(){return!1},this.pd.width=
this.wp,this.pd.height=this.vp,jQuery(this.pd).css({width:this.wp+"px",height:this.vp+"px"}),this.Pz(),this.cv=this.pd.getContext("2d"));this.ka=new db(this.X,this.Sg);this.ka.Rl(this.canvas.width,this.canvas.height);this.ka.Hx=0!==this.DD;this.wb=null;this.canvas.addEventListener("webglcontextlost",function(a){a.preventDefault();b.$F();ea("[Construct 2] WebGL context lost");window.cr_setSuspended(!0)},!1);this.canvas.addEventListener("webglcontextrestored",function(){b.ka.fy();b.ka.Rl(b.ka.width,
b.ka.height,!0);b.Xe=null;b.Ie=null;b.qt[0]=null;b.qt[1]=null;b.aG();b.Hb=!0;ea("[Construct 2] WebGL context restored");window.cr_setSuspended(!1)},!1);d=0;for(g=this.Y.length;d<g;d++)for(e=this.Y[d],f=0,h=e.Ca.length;f<h;f++)m=e.Ca[f],m.qd=this.ka.Ct(m.id),this.Wl=this.Wl||this.ka.$n(m.qd);d=0;for(g=this.ig.length;d<g;d++){l=this.ig[d];f=0;for(h=l.Ca.length;f<h;f++)m=l.Ca[f],m.qd=this.ka.Ct(m.id);f=0;for(h=l.Ma.length;f<h;f++)for(n=l.Ma[f],e=0,k=n.Ca.length;e<k;e++)m=n.Ca[e],m.qd=this.ka.Ct(m.id),
this.Wl=this.Wl||this.ka.$n(m.qd)}}else{if(0<this.De&&this.Ad){this.canvas=null;document.oncontextmenu=function(){return!1};document.onselectstart=function(){return!1};this.wb=AppMobi.canvas.getContext("2d");try{this.wb.samplingMode=this.qb?"smooth":"sharp",this.wb.globalScale=1,this.wb.HTML5CompatibilityMode=!0,this.wb.imageSmoothingEnabled=this.qb}catch(p){}0!==this.width&&0!==this.height&&(this.wb.width=this.width,this.wb.height=this.height)}this.wb||(d=this.zf?{antialias:!!this.qb,alpha:g}:{alpha:g},
this.wb=this.canvas.getContext("2d",d),this.wb.webkitImageSmoothingEnabled=this.qb,this.wb.mozImageSmoothingEnabled=this.qb,this.wb.msImageSmoothingEnabled=this.qb,this.wb.imageSmoothingEnabled=this.qb);this.cv=this.pd=null}this.Kr=function(){b.tc(!1)};window==window.top||this.Db||this.ty||this.iq||(document.addEventListener("mousedown",function(){window.focus()},!0),document.addEventListener("touchstart",function(){window.focus()},!0));"undefined"!==typeof cr_is_preview&&(this.zf&&console.log("[Construct 2] In preview-over-wifi via CocoonJS mode"),
-1<window.location.search.indexOf("continuous")&&(ea("Reloading for continuous preview"),this.zq="__c2_continuouspreview",this.no=!0),this.lG&&!this.Sg&&(jQuery(window).focus(function(){b.setSuspended(!1)}),jQuery(window).blur(function(){b.setSuspended(!0)})));this.Db||(d=function(a){cb(a)&&document.activeElement&&document.activeElement!==document.getElementsByTagName("body")[0]&&document.activeElement.blur&&document.activeElement.blur()},window.navigator.pointerEnabled?document.addEventListener("pointerdown",
d):window.navigator.msPointerEnabled?document.addEventListener("MSPointerDown",d):document.addEventListener("touchstart",d),document.addEventListener("mousedown",d));0===this.De&&this.Zj&&1<this.devicePixelRatio&&this.setSize(this.gd,this.fd,!0);this.FA();this.UE();this.go();this.da={}};b.prototype.setSize=function(a,b,c){var d=0,g=0,f=0,h=0,h=0,e=this.oF&&this.oy&&!navigator.standalone&&!this.Db&&!this.Bf;e&&(b+=60);if(this.rn!==a||this.qn!==b||c){this.rn=a;this.qn=b;var k=this.De,m=(document.mozFullScreen||
document.webkitIsFullScreen||!!document.msFullscreenElement||document.fullScreen||this.gn)&&!this.Bf;if(m||0!==this.De||c)m&&0<this.Qj&&(k=this.Qj),c=this.devicePixelRatio,4<=k?(f=this.gd/this.fd,a/b>f?(f*=b,5===k?(h=f*c/this.gd,1<h?h=Math.floor(h):1>h&&(h=1/Math.ceil(1/h)),f=this.gd*h/c,h=this.fd*h/c,d=(a-f)/2,g=(b-h)/2,a=f,b=h):(d=(a-f)/2,a=f)):(h=a/f,5===k?(h=h*c/this.fd,1<h?h=Math.floor(h):1>h&&(h=1/Math.ceil(1/h)),f=this.gd*h/c,h=this.fd*h/c,d=(a-f)/2,g=(b-h)/2,a=f):g=(b-h)/2,b=h),m&&!this.Ni&&
(g=d=0)):this.Ni&&this.gn&&0===this.Px&&(d=Math.floor((a-this.gd)/2),g=Math.floor((b-this.fd)/2),a=this.gd,b=this.fd),2>k&&(this.Cm=c),this.Zj&&this.xy&&1<c&&(1024<=a&&(a=1023),1024<=b&&(b=1023)),this.wp=Math.round(a),this.vp=Math.round(b),this.width=Math.round(a*c),this.height=Math.round(b*c),this.Hb=!0,this.XA?(this.Ka=this.width,this.Ja=this.height,this.vf=!0):this.width<this.gd&&this.height<this.fd||1===k?(this.Ka=this.width,this.Ja=this.height,this.vf=!0):(this.Ka=this.gd,this.Ja=this.fd,this.vf=
!1,2===k?(f=this.gd/this.fd,k=this.rn/this.qn,k<f?this.Ka=this.Ja*k:k>f&&(this.Ja=this.Ka/k)):3===k&&(f=this.gd/this.fd,k=this.rn/this.qn,k>f?this.Ka=this.Ja*k:k<f&&(this.Ja=this.Ka/k))),this.mp&&!this.Db&&(jQuery(this.mp).css({width:Math.round(a)+"px",height:Math.round(b)+"px","margin-left":Math.floor(d)+"px","margin-top":Math.floor(g)+"px"}),"undefined"!==typeof cr_is_preview&&jQuery("#borderwrap").css({width:Math.round(a)+"px",height:Math.round(b)+"px"})),this.canvas&&(this.canvas.width=Math.round(a*
c),this.canvas.height=Math.round(b*c),this.fg?(this.canvas.style.left=Math.floor(d)+"px",this.canvas.style.top=Math.floor(g)+"px",this.canvas.style.width=Math.round(a)+"px",this.canvas.style.height=Math.round(b)+"px"):this.Zj&&!this.Db&&jQuery(this.canvas).css({width:Math.round(a)+"px",height:Math.round(b)+"px"})),this.pd&&(this.pd.width=Math.round(a),this.pd.height=Math.round(b),jQuery(this.pd).css({width:Math.round(a)+"px",height:Math.round(b)+"px"})),this.ka&&this.ka.Rl(Math.round(a*c),Math.round(b*
c)),this.Ad&&this.wb&&(this.wb.width=Math.round(a),this.wb.height=Math.round(b)),this.wb&&(this.wb.webkitImageSmoothingEnabled=this.qb,this.wb.mozImageSmoothingEnabled=this.qb,this.wb.msImageSmoothingEnabled=this.qb,this.wb.imageSmoothingEnabled=this.qb),this.FA(),this.Db||!e&&!this.Zt||window.setTimeout(function(){window.scrollTo(0,1)},100)}};b.prototype.FA=function(){if(this.RC&&0!==this.$u){var a="portrait";2===this.$u&&(a="landscape");screen.orientation&&screen.orientation.lock?screen.orientation.lock(a):
screen.lockOrientation?screen.lockOrientation(a):screen.webkitLockOrientation?screen.webkitLockOrientation(a):screen.mozLockOrientation?screen.mozLockOrientation(a):screen.msLockOrientation&&screen.msLockOrientation(a)}};b.prototype.$F=function(){this.ka.cD();this.Yt=!0;var a,b,c;a=0;for(b=this.Y.length;a<b;a++)c=this.Y[a],c.Yu&&c.Yu()};b.prototype.aG=function(){this.Yt=!1;var a,b,c;a=0;for(b=this.Y.length;a<b;a++)c=this.Y[a],c.Az&&c.Az()};b.prototype.Pz=function(){if(!this.Db){var a=(document.mozFullScreen||
document.webkitIsFullScreen||document.fullScreen||document.msFullscreenElement||this.gn)&&!this.Bf?jQuery(this.canvas).offset():jQuery(this.canvas).position();a.position="absolute";jQuery(this.pd).css(a)}};var m=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||window.oCancelAnimationFrame;b.prototype.setSuspended=function(a){var b;if(a&&!this.hn)for(ea("[Construct 2] Suspending"),this.hn=!0,-1!==this.lr&&m&&m(this.lr),-1!==
this.Lr&&clearTimeout(this.Lr),a=0,b=this.oo.length;a<b;a++)this.oo[a](!0);else if(!a&&this.hn){ea("[Construct 2] Resuming");this.hn=!1;this.tq=Qa();this.sn=Qa();a=this.Bn=this.Sp=0;for(b=this.oo.length;a<b;a++)this.oo[a](!1);this.tc(!1)}};b.prototype.KC=function(a){this.oo.push(a)};b.prototype.xi=function(a){return this.Vq[a]};b.prototype.ru=function(a){a&&a.project||fa("Project model unavailable");a=a.project;this.name=a[0];this.Ox=a[1];this.De=a[12];this.Px=a[12];this.gd=a[10];this.fd=a[11];this.Kz=
this.gd/2;this.Lz=this.fd/2;this.Db&&!this.fg&&(4<=a[12]||0===a[12])&&(ea("[Construct 2] Letterbox scale fullscreen modes are not supported on this platform - falling back to 'Scale outer'"),this.Px=this.De=3);this.Uv=a[18];this.vn=a[19];0===this.vn&&(this.sl=new Image,this.sl.src="loading-logo.png");this.Qn=a[21];this.Vq=ec();this.oh=new B(this);var b,c,d,f,g,h,e,k,m;b=0;for(c=a[2].length;b<c;b++)e=a[2][b],d=this.xi(e[0]),eb(e,d.prototype),m=new d(this),m.Cr=e[1],m.Pi=e[2],m.pz=e[9],m.lb&&m.lb(),
this.plugins.push(m);this.Vq=ec();b=0;for(c=a[3].length;b<c;b++){e=a[3][b];g=this.xi(e[1]);m=null;d=0;for(f=this.plugins.length;d<f;d++)if(this.plugins[d]instanceof g){m=this.plugins[d];break}var l=new m.vc(m);l.name=e[0];l.Ua=e[2];l.Qt=e[3].slice(0);l.fH=e[3].length;l.VC=e[4];l.qE=e[5];l.Pa=e[11];l.Ua?(l.Rq=[],l.Nh=this.Om++,l.Yb=null):(l.Rq=null,l.Nh=-1,l.Yb=[]);l.Jp=null;l.cl=null;l.Jx=null;l.gg=!1;l.ze=null;e[6]?(l.zA=e[6][0],l.AA=e[6][1],l.UG=e[6][2]):(l.zA=null,l.AA=0,l.UG=0);l.we=e[7]?e[7]:
null;l.index=b;l.B=[];l.Bp=[];l.lj=[new fb(l)];l.Jh=0;l.Kg=null;l.lD=0;l.Tl=!0;l.Rr=gb;l.wE=hb;l.CE=ib;l.pb=jb;l.bo=kb;l.hr=lb;l.wk=mb;l.Vp=nb;l.ut=ob;l.zt=pb;l.ag=qb;l.Vx=rb;l.pp=new Ya(this.gd,this.fd);l.Xo=!0;l.Yo=!1;l.da={};l.toString=sb;l.wc=[];d=0;for(f=e[8].length;d<f;d++){k=e[8][d];var n=this.xi(k[1]),q=null;g=0;for(h=this.wc.length;g<h;g++)if(this.wc[g]instanceof n){q=this.wc[g];break}q||(q=new n(this),q.Uq=[],q.Tq=new da,q.lb&&q.lb(),this.wc.push(q),fc&&q instanceof fc&&(this.rA=q),Xb.qF&&
q instanceof Xb.qF&&(this.yy=q));-1===q.Uq.indexOf(l)&&q.Uq.push(l);g=new q.vc(q,l);g.name=k[0];g.Pa=k[2];g.lb();l.wc.push(g)}l.global=e[9];l.Ut=e[10];l.Ca=[];d=0;for(f=e[12].length;d<f;d++)l.Ca.push({id:e[12][d][0],name:e[12][d][1],qd:-1,xd:!0,index:d});l.QI=e[13];this.Uv&&!l.Ua&&!l.Ut&&m.Pi||l.lb();l.name&&(this.types[l.name]=l);this.Y.push(l);m.Cr&&(d=new m.Xb(l),d.uid=this.Qn++,d.Wz=this.rz++,d.Vj=0,d.Wm=tb,d.toString=ub,d.V=e[14],d.lb(),l.B.push(d),this.aj[d.uid.toString()]=d)}b=0;for(c=a[4].length;b<
c;b++)for(g=a[4][b],h=this.Y[g[0]],d=1,f=g.length;d<f;d++)e=this.Y[g[d]],e.Yb.push(h),h.Rq.push(e);b=0;for(c=a[27].length;b<c;b++){g=a[27][b];h=[];d=0;for(f=g.length;d<f;d++)h.push(this.Y[g[d]]);d=0;for(f=h.length;d<f;d++)h[d].gg=!0,h[d].ze=h}if(0<this.Om)for(b=0,c=this.Y.length;b<c;b++)if(e=this.Y[b],!e.Ua&&e.Yb.length){e.Jp=Array(this.Om);e.cl=Array(this.Om);e.Jx=Array(this.Om);l=[];d=q=n=k=0;for(f=e.Yb.length;d<f;d++)for(m=e.Yb[d],e.Jp[m.Nh]=k,k+=m.fH,e.cl[m.Nh]=n,n+=m.VC,e.Jx[m.Nh]=q,q+=m.qE,
g=0,h=m.Ca.length;g<h;g++)l.push(va({},m.Ca[g]));e.Ca=l.concat(e.Ca);d=0;for(f=e.Ca.length;d<f;d++)e.Ca[d].index=d}b=0;for(c=a[5].length;b<c;b++)e=a[5][b],d=new vb(this,e),this.ku[d.name]=d,this.ig.push(d);b=0;for(c=a[6].length;b<c;b++)e=a[6][b],d=new wb(this,e),this.et[d.name]=d,this.Mh.push(d);b=0;for(c=this.Mh.length;b<c;b++)this.Mh[b].rc();b=0;for(c=this.Mh.length;b<c;b++)this.Mh[b].NA();b=0;for(c=this.Qr.length;b<c;b++)this.Qr[b].rc();this.Qr.length=0;this.PC=a[7];this.jt=a[8];this.ej=a[9];this.Cm=
1;this.MD=a[13];this.qb=a[14];this.Es=a[15];this.cH=a[17];this.$u=a[20];this.RC=0<this.$u;this.lG=a[22];this.vf=this.XA=a[23];this.DD=a[24];this.pG=a[25];this.Er=Date.now();this.Vq.length=0;this.cF()};var l=!1;b.prototype.hH=function(a,b){a.cocoonLazyLoad=!0;a.onerror=function(b){l=a.lx=!0;console&&console.error&&console.error("Error loading image '"+a.src+"': ",b)};this.fg?a.src=b:a.src||("undefined"!==typeof XAPKReader?XAPKReader.get(b,function(b){a.src=b},function(c){l=a.lx=!0;console&&console.error&&
console.error("Error extracting image '"+b+"' from expansion file: ",c)}):a.src=b);this.Zl.push(a)};b.prototype.nE=function(a){var b,c;b=0;for(c=this.Zl.length;b<c;b++)if(this.Zl[b].gD===a)return this.Zl[b];return null};var n=0,k=!1;b.prototype.UE=function(){this.Uk&&(n=this.Uk.JG(this.PC))};b.prototype.bx=function(){var a=n,b=0,c=0,d=!0,g,f,c=0;for(g=this.Zl.length;c<g;c++){f=this.Zl[c];var h=f.fD;if(!h||0>=h)h=5E4;a+=h;f.src&&(f.complete||f.loaded)&&!f.lx?b+=h:d=!1}d&&this.pG&&this.Uk&&(k||(this.Uk.OG(),
k=!0),c=this.Uk.DE(),b+=c,c<n&&(d=!1));this.xk=0==a?0:b/a;return d};b.prototype.go=function(){if(this.wb||this.ka){var a=this.wb||this.cv;this.pd&&this.Pz();this.xk=0;this.Jy=-1;if(this.bx())this.VE();else{var b=Date.now()-this.Er;if(a){var c=this.width,d=this.height,f=this.devicePixelRatio;this.pd&&(c=this.wp,d=this.vp,f=1);if(3!==this.vn&&(this.zf||500<=b&&this.Jy!=this.xk)){a.clearRect(0,0,c,d);var b=c/2,d=d/2,c=0===this.vn&&this.sl.complete,g=40*f,h=0,e=80*f,k;c&&(e=this.sl.width*f,k=this.sl.height*
f,g=e/2,h=k/2,a.drawImage(this.sl,pa(b-g),pa(d-h),e,k));1>=this.vn?(b=pa(b-g)+.5,d=pa(d+(h+(c?12*f:0)))+.5,a.fillStyle=l?"red":"DodgerBlue",a.fillRect(b,d,Math.floor(e*this.xk),6*f),a.strokeStyle="black",a.strokeRect(b,d,e,6*f),a.strokeStyle="white",a.strokeRect(b-1*f,d-1*f,e+2*f,8*f)):2===this.vn&&(a.font=this.fg?"12pt ArialMT":"12pt Arial",a.fillStyle=l?"#f00":"#999",a.OI="middle",f=Math.round(100*this.xk)+"%",c=a.measureText?a.measureText(f):null,a.fillText(f,b-(c?c.width:0)/2,d))}this.Jy=this.xk}setTimeout(function(a){return function(){a.go()}}(this),
this.zf?10:100)}}};b.prototype.VE=function(){this.pd&&(this.canvas.parentNode.removeChild(this.pd),this.pd=this.cv=null);this.Er=Date.now();this.sn=Qa();var a,b,c;if(this.Uv)for(a=0,b=this.Y.length;a<b;a++)c=this.Y[a],c.Ua||c.Ut||!c.Ec.Pi||c.lb();else this.ln=!1;a=0;for(b=this.ig.length;a<b;a++)this.ig[a].hD();2<=this.De&&(a=this.gd/this.fd,b=this.width/this.height,this.Cm=2!==this.De&&b>a||2===this.De&&b<a?this.height/this.fd:this.width/this.gd);this.Ox?this.ku[this.Ox].Hv():this.ig[0].Hv();this.Uv||
(this.Cq=1,this.trigger(B.prototype.W.vw,null));navigator.splashscreen&&navigator.splashscreen.hide&&navigator.splashscreen.hide();a=0;for(b=this.Y.length;a<b;a++)c=this.Y[a],c.ZF&&c.ZF();this.tc(!1);this.Ad&&AppMobi.webview.execute("onGameReady();")};var r=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame;b.prototype.tc=function(b){if(this.Ib){var d=Qa();if(this.XE&&this.mv&&29>d-this.eu)this.mv=
!1,this.eu=d,r?this.lr=r(this.Kr,this.canvas):this.Lr=setTimeout(this.Kr,this.Sg?1:16);else{this.mv=!0;this.eu=d;var f=this.De,g=(document.mozFullScreen||document.webkitIsFullScreen||document.fullScreen||!!document.msFullscreenElement)&&!this.Bf;(g||this.gn)&&0<this.Qj&&(f=this.Qj);0<f&&(!this.nq||window.self!==window.top)&&(f=window.innerHeight,this.rn===window.innerWidth&&this.qn===f||this.setSize(a(),c()));this.Db||(g?(this.Mp||(this.pt=jQuery(this.canvas).css("margin")||"0",this.Mp=!0),this.cn||
this.Ni||jQuery(this.canvas).css({"margin-left":""+Math.floor((screen.width-this.width/this.devicePixelRatio)/2)+"px","margin-top":""+Math.floor((screen.height-this.height/this.devicePixelRatio)/2)+"px"})):this.Mp?(this.cn||this.Ni||jQuery(this.canvas).css("margin",this.pt),this.pt="",this.Mp=!1,0===this.De&&this.setSize(Math.round(this.xz/this.devicePixelRatio),Math.round(this.wz/this.devicePixelRatio),!0)):(this.xz=this.width,this.wz=this.height));this.ln&&(g=this.bx(),this.Cq=this.xk,g&&(this.ln=
!1,this.xk=1,this.trigger(B.prototype.W.vw,null)));this.uF();!this.Hb&&!this.zf||this.Yt||this.no||b||(this.Hb=!1,this.ka?this.tf():this.Lg(),this.Dr&&(this.canvas&&this.canvas.toDataURL&&(this.canvas.toDataURL(this.Dr[0],this.Dr[1]),this.trigger(B.prototype.W.HB,null)),this.Dr=null));this.HI||(this.hf++,this.Ip++,this.Sp++);this.Bn+=Qa()-d;this.hn||b||(r?this.lr=r(this.Kr,this.canvas):this.Lr=setTimeout(this.Kr,this.Sg?1:16))}}};b.prototype.uF=function(){var a,b,c,d,f,g,h,e,k;a=Qa();1E3<=a-this.sn&&
(this.sn+=1E3,this.ot=this.Sp,this.Sp=0,this.Qs=this.Bn,this.Bn=0);this.oz&&(0!==this.tq&&(b=a-this.tq,0!==b||this.gF?(this.Lh=b/1E3,.5<this.Lh?this.Lh=0:.1<this.Lh&&(this.Lh=.1)):(10<=this.SI&&(this.oz=!1),this.Lh=1/60)),this.tq=a);this.Fa=this.Lh*this.ni;this.He.add(this.Fa);this.vh.add(this.Lh);a=(document.mozFullScreen||document.webkitIsFullScreen||document.fullScreen||!!document.msFullscreenElement||this.gn)&&!this.Bf;2<=this.De||a&&0<this.Qj?(b=this.gd/this.fd,c=this.width/this.height,d=this.De,
a&&0<this.Qj&&(d=this.Qj),this.Cm=2!==d&&c>b||2===d&&c<b?this.height/this.fd:this.width/this.gd,this.Ib&&(this.Ib.xv(this.Ib.scrollX),this.Ib.yv(this.Ib.scrollY))):this.Cm=this.Zj?this.devicePixelRatio:1;this.ud();this.Uh++;this.oh.zG();this.Uh--;this.ud();this.Uh++;c=this.vz.wg();a=0;for(b=c.length;a<b;a++)c[a].JI();a=0;for(b=this.Y.length;a<b;a++)if(h=this.Y[a],!h.Ua&&(h.wc.length||h.Yb.length))for(c=0,d=h.B.length;c<d;c++)for(e=h.B[c],f=0,g=e.Ea.length;f<g;f++)e.Ea[f].tc();a=0;for(b=this.Y.length;a<
b;a++)if(h=this.Y[a],!h.Ua&&(h.wc.length||h.Yb.length))for(c=0,d=h.B.length;c<d;c++)for(e=h.B[c],f=0,g=e.Ea.length;f<g;f++)k=e.Ea[f],k.Rz&&k.Rz();c=this.Vu.wg();a=0;for(b=c.length;a<b;a++)c[a].tc();this.Uh--;this.YE();for(a=0;this.Gm&&10>a++;)this.Gx(this.Gm);a=0;for(b=this.Mh.length;a<b;a++)this.Mh[a].It=!1;this.Ib.Mm&&this.Ib.Mm.Gc();this.mr.length=0;this.Uh++;a=0;for(b=this.Y.length;a<b;a++)if(h=this.Y[a],!h.Ua&&(h.wc.length||h.Yb.length))for(c=0,d=h.B.length;c<d;c++)for(e=h.B[c],f=0,g=e.Ea.length;f<
g;f++)k=e.Ea[f],k.qo&&k.qo();c=this.Wu.wg();a=0;for(b=c.length;a<b;a++)c[a].qo();this.Uh--};b.prototype.Gx=function(a){var b=this.Ib;this.Ib.QG();var c,d,f,g,h,e,k;if(this.ka)for(c=0,d=this.Y.length;c<d;c++)h=this.Y[c],h.Ua||!h.JA||h.global&&0!==h.B.length||-1!==a.an.indexOf(h)||h.JA();b==a&&(this.oh.pe.length=0);a.Hv();c=0;for(d=this.Y.length;c<d;c++)if(h=this.Y[c],h.global||h.Ec.Cr)for(a=0,b=h.B.length;a<b;a++)if(e=h.B[a],e.Xq&&e.Xq(),e.Ea)for(f=0,g=e.Ea.length;f<g;f++)k=e.Ea[f],k.Xq&&k.Xq();this.Hb=
!0;this.ud()};b.prototype.ro=function(a){this.Vu.add(a)};b.prototype.VG=function(a){this.Wu.add(a)};b.prototype.Tm=function(a){return a&&-1!==a.Pn?this.Lh*a.Pn:this.Fa};b.prototype.Lg=function(){this.Ib.Lg(this.wb);this.Ad&&this.wb.present()};b.prototype.tf=function(){this.Ib.tf(this.ka);this.ka.qG()};b.prototype.Wo=function(a){a&&this.Ep.push(a)};b.prototype.bA=function(a){Aa(this.Ep,a)};b.prototype.Qh=function(a){a=a.toString();return this.aj.hasOwnProperty(a)?this.aj[a]:null};var q=[];b.prototype.qj=
function(a){var b,c;b=a.type.name;var d=null;if(this.Lj.hasOwnProperty(b)){if(d=this.Lj[b],d.contains(a))return}else d=q.length?q.pop():new da,this.Lj[b]=d;d.add(a);this.Mi=!0;if(a.gg)for(b=0,c=a.siblings.length;b<c;b++)this.qj(a.siblings[b]);this.Tt&&d.Xl.push(a);this.Uh++;this.trigger(Object.getPrototypeOf(a.type.Ec).W.KB,a);this.Uh--};b.prototype.ud=function(){if(this.Mi){var a,b,c,d,f,g;this.Tt=!0;c=0;for(f=this.cg.length;c<f;++c)for(a=this.cg[c],b=a.type,b.B.push(a),d=0,g=b.Yb.length;d<g;++d)b.Yb[d].B.push(a),
b.Yb[d].Tl=!0;this.cg.length=0;this.xB();Pa(this.Lj);this.Mi=this.Tt=!1}};b.prototype.xB=function(){for(var a in this.Lj)this.Lj.hasOwnProperty(a)&&this.fB(this.Lj[a])};b.prototype.fB=function(a){var b=a.wg(),c=b[0].type,d,f,g,h,e,k;Ta(c.B,a);c.Tl=!0;0===c.B.length&&(c.Yo=!1);d=0;for(f=c.Yb.length;d<f;++d)k=c.Yb[d],Ta(k.B,a),k.Tl=!0;d=0;for(f=this.oh.pe.length;d<f;++d)if(e=this.oh.pe[d],e.Wd.hasOwnProperty(c.index)&&Ta(e.Wd[c.index].Sh,a),!c.Ua)for(g=0,h=c.Yb.length;g<h;++g)k=c.Yb[g],e.Wd.hasOwnProperty(k.index)&&
Ta(e.Wd[k.index].Sh,a);(d=b[0].H)&&Ta(d.B,a);for(d=0;d<b.length;++d)this.eB(b[d],c);a.clear();q.push(a);this.Hb=!0};b.prototype.eB=function(a,b){var c,d,f;c=0;for(d=this.Ep.length;c<d;++c)this.Ep[c](a);a.op&&b.pp.update(a,a.op,null);if(c=a.H)Aa(c.B,a),c.Qe=!0;if(a.Ea)for(c=0,d=a.Ea.length;c<d;++c)f=a.Ea[c],f.bj&&f.bj(),f.behavior.Tq.remove(a);this.vz.remove(a);this.Vu.remove(a);this.Wu.remove(a);a.bj&&a.bj();this.aj.hasOwnProperty(a.uid.toString())&&delete this.aj[a.uid.toString()];this.Wq--;100>
b.Bp.length&&b.Bp.push(a)};var s=[];b.prototype.Kj=function(a,b,c,d,f,g){var h,e,k,m;if(!a)return null;var l=this.Y[a[1]],n=l.Ec.Pi;if(this.ln&&n&&!l.Ut||n&&!this.ka&&11===a[0][11])return null;var q=b;n||(b=null);var p;l.Bp.length?(p=l.Bp.pop(),p.je=!0,l.Ec.Xb.call(p,l)):(p=new l.Ec.Xb(l),p.je=!1);p.uid=c&&!g?a[2]:this.Qn++;this.aj[p.uid.toString()]=p;p.Wz=this.rz++;p.Vj=l.B.length;h=0;for(e=this.cg.length;h<e;++h)this.cg[h].type===l&&p.Vj++;p.Wm=tb;k=a[3];if(p.je)Pa(p.da);else{p.da={};if("undefined"!==
typeof cr_is_preview)for(p.iy=[],p.iy.length=k.length,h=0,e=k.length;h<e;h++)p.iy[h]=k[h][1];p.Qc=[];p.Qc.length=k.length}h=0;for(e=k.length;h<e;h++)p.Qc[h]=k[h][0];if(n){var r=a[0];p.x=ga(d)?r[0]:d;p.y=ga(f)?r[1]:f;p.z=r[2];p.width=r[3];p.height=r[4];p.depth=r[5];p.M=r[6];p.opacity=r[7];p.Fe=r[8];p.Ge=r[9];p.Xd=r[10];h=r[11];!this.ka&&l.Ca.length&&(p.Xd=h);p.Hm=Za(p.Xd);this.X&&$a(p,p.Xd,this.X);if(p.je){h=0;for(e=r[12].length;h<e;h++)for(k=0,m=r[12][h].length;k<m;k++)p.ac[h][k]=r[12][h][k];p.$b.set(0,
0,0,0);p.op.set(0,0,-1,-1);p.ub.Ck(p.$b);p.Is.length=0}else{p.ac=r[12].slice(0);h=0;for(e=p.ac.length;h<e;h++)p.ac[h]=r[12][h].slice(0);p.eb=[];p.Bi=[];p.Bi.length=l.Ca.length;p.$b=new sa(0,0,0,0);p.op=new sa(0,0,-1,-1);p.ub=new ta;p.Is=[];p.ea=xb;p.wI=Cb;p.Ae=Db;p.nb=Eb;p.SA=Fb;p.xf=Gb}p.qh=!1;p.YG=0;p.XG=0;p.WG=null;14===r.length&&(p.qh=!0,p.YG=r[13][0],p.XG=r[13][1],p.WG=r[13][2]);h=0;for(e=l.Ca.length;h<e;h++)p.Bi[h]=!0;p.qi=Hb;p.qi();p.UA=!!p.eb.length;p.Hs=!0;p.Js=!0;l.Xo=!0;p.visible=!0;p.Pn=
-1;p.H=b;p.Fk=b.B.length;"undefined"===typeof p.Ba&&(p.Ba=null);this.Hb=p.Ig=!0}p.toString=ub;var y;h=s.length=0;for(e=l.Yb.length;h<e;h++)s.push.apply(s,l.Yb[h].wc);s.push.apply(s,l.wc);if(p.je)for(h=0,e=s.length;h<e;h++){var A=s[h];y=p.Ea[h];y.je=!0;A.behavior.Xb.call(y,A,p);r=a[4][h];k=0;for(m=r.length;k<m;k++)y.V[k]=r[k];y.lb();A.behavior.Tq.add(p)}else for(p.Ea=[],h=0,e=s.length;h<e;h++)A=s[h],y=new A.behavior.Xb(A,p),y.je=!1,y.V=a[4][h].slice(0),y.lb(),p.Ea.push(y),A.behavior.Tq.add(p);r=a[5];
if(p.je)for(h=0,e=r.length;h<e;h++)p.V[h]=r[h];else p.V=r.slice(0);this.cg.push(p);this.Mi=!0;b&&(b.B.push(p),1!==b.Jf||1!==b.Kf)&&(l.Yo=!0);this.Wq++;if(l.gg){if(p.gg=!0,p.je?p.siblings.length=0:p.siblings=[],!c&&!g){h=0;for(e=l.ze.length;h<e;h++)if(l.ze[h]!==l){if(!l.ze[h].Kg)return null;p.siblings.push(this.Kj(l.ze[h].Kg,q,!1,n?p.x:d,n?p.y:f,!0))}h=0;for(e=p.siblings.length;h<e;h++)for(p.siblings[h].siblings.push(p),k=0;k<e;k++)h!==k&&p.siblings[h].siblings.push(p.siblings[k])}}else p.gg=!1,p.siblings=
null;p.lb();h=0;for(e=p.Ea.length;h<e;h++)p.Ea[h].Qz&&p.Ea[h].Qz();return p};b.prototype.At=function(a){var b,c;b=0;for(c=this.Ib.Ma.length;b<c;b++){var d=this.Ib.Ma[b];if(bb(d.name,a))return d}return null};b.prototype.Um=function(a){a=pa(a);0>a&&(a=0);a>=this.Ib.Ma.length&&(a=this.Ib.Ma.length-1);return this.Ib.Ma[a]};b.prototype.Ls=function(a){var b,c;b=0;for(c=a.length;b<c;b++)a[b].pb().Ab=!0};b.prototype.bo=function(a){var b,c;b=0;for(c=a.length;b<c;b++)a[b].bo()};b.prototype.hr=function(a){var b,
c;b=0;for(c=a.length;b<c;b++)a[b].hr()};b.prototype.wk=function(a){var b,c;b=0;for(c=a.length;b<c;b++)a[b].wk()};b.prototype.LA=function(a){if(a.Xo){var b,c,d=a.B;b=0;for(c=d.length;b<c;++b)d[b].SA();d=this.cg;b=0;for(c=d.length;b<c;++b)d[b].type===a&&d[b].SA();a.Xo=!1}};b.prototype.xt=function(a,b,c,d){var f,g,h=a?1!==a.Jf||1!==a.Kf:!1;if(b.Ua)for(a=0,f=b.Rq.length;a<f;++a)g=b.Rq[a],h||g.Yo?ya(d,g.B):(this.LA(g),g.pp.Yz(c,d));else h||b.Yo?ya(d,b.B):(this.LA(b),b.pp.Yz(c,d))};b.prototype.Dt=function(a,
b,c,d){var f,g;f=0;for(g=b.length;f<g;++f)this.xt(a,b[f],c,d)};b.prototype.Yx=function(a,b,c){var d=this.rA;d&&this.Dt(a,d.Uq,b,c)};b.prototype.AE=function(a,b,c){var d=this.yy;d&&this.Dt(a,d.Uq,b,c)};b.prototype.Ir=function(a,b,c){var d=a.pb(),f,g,h,e,k,m;if(d.Ab)for(d.Ab=!1,f=d.B.length=0,e=a.B.length;f<e;f++)h=a.B[f],h.nb(),k=h.H.xe(b,c,!0),m=h.H.xe(b,c,!1),h.Ae(k,m)&&d.B.push(h);else{f=g=0;for(e=d.B.length;f<e;f++)h=d.B[f],h.nb(),k=h.H.xe(b,c,!0),m=h.H.xe(b,c,!1),h.Ae(k,m)&&(d.B[g]=d.B[f],g++);
d.B.length=g}a.ag();return d.Ht()};b.prototype.Qf=function(a,b){if(!(a&&b&&a!==b&&a.Ig&&b.Ig))return!1;a.nb();b.nb();var c=a.H,d=b.H,f,g,h,e,k,m,l,p;if(c===d||c.Jf===d.Jf&&d.Kf===d.Kf&&c.scale===d.scale&&c.M===d.M&&c.xg===d.xg){if(!a.$b.jy(b.$b)||!a.ub.Rt(b.ub)||a.qh&&b.qh)return!1;if(a.qh)return this.wA(a,b);if(b.qh)return this.wA(b,a);l=a.Ba&&!a.Ba.Oi();f=b.Ba&&!b.Ba.Oi();if(!l&&!f)return!0;l?(a.Ba.Fi(a.width,a.height,a.M),l=a.Ba):(this.le.Bk(a.ub,a.x,a.y,a.width,a.height),l=this.le);f?(b.Ba.Fi(b.width,
b.height,b.M),p=b.Ba):(this.le.Bk(b.ub,b.x,b.y,b.width,b.height),p=this.le);return l.Xj(p,b.x-a.x,b.y-a.y)}l=a.Ba&&!a.Ba.Oi();f=b.Ba&&!b.Ba.Oi();l?(a.Ba.Fi(a.width,a.height,a.M),this.le.jA(a.Ba)):this.le.Bk(a.ub,a.x,a.y,a.width,a.height);l=this.le;f?(b.Ba.Fi(b.width,b.height,b.M),this.Jv.jA(b.Ba)):this.Jv.Bk(b.ub,b.x,b.y,b.width,b.height);p=this.Jv;f=0;for(g=l.ff;f<g;f++)h=2*f,e=h+1,k=l.sc[h],m=l.sc[e],l.sc[h]=c.xb(k+a.x,m+a.y,!0),l.sc[e]=c.xb(k+a.x,m+a.y,!1);l.nb();f=0;for(g=p.ff;f<g;f++)h=2*f,e=
h+1,k=p.sc[h],m=p.sc[e],p.sc[h]=d.xb(k+b.x,m+b.y,!0),p.sc[e]=d.xb(k+b.x,m+b.y,!1);p.nb();return l.Xj(p,0,0)};var t=new ta;new sa(0,0,0,0);var p=[];b.prototype.wA=function(a,b){var c,d,f,g,h=b.$b,e=a.x,k=a.y;a.vE(h,p);var m=b.Ba&&!b.Ba.Oi();c=0;for(d=p.length;c<d;++c)if(f=p[c],g=f.Zz,h.ky(g,e,k)&&(t.Ck(g),t.offset(e,k),t.Rt(b.ub)))if(m)if(b.Ba.Fi(b.width,b.height,b.M),f.Mf){if(f.Mf.Xj(b.Ba,b.x-(e+g.left),b.y-(k+g.top)))return p.length=0,!0}else{if(this.le.Bk(t,0,0,g.right-g.left,g.bottom-g.top),this.le.Xj(b.Ba,
b.x,b.y))return p.length=0,!0}else if(f.Mf){if(this.le.Bk(b.ub,0,0,b.width,b.height),f.Mf.Xj(this.le,-(e+g.left),-(k+g.top)))return p.length=0,!0}else return p.length=0,!0;p.length=0;return!1};b.prototype.Kv=function(a,b){if(!b||!b.Ig)return!1;b.nb();if(!b.$b.jy(a))return!1;if(b.qh){b.vE(a,p);var c,d,f,g,h=b.x,e=b.y;c=0;for(d=p.length;c<d;++c)if(f=p[c],g=f.Zz,a.ky(g,h,e))if(f.Mf){if(this.le.Ck(a,0,0),f.Mf.Xj(this.le,-(h+g.left),-(e+g.top)))return p.length=0,!0}else return p.length=0,!0;p.length=0;
return!1}t.Ck(a);if(!b.ub.Rt(t))return!1;if(!b.Ba||b.Ba.Oi())return!0;b.Ba.Fi(b.width,b.height,b.M);t.offset(-a.left,-a.top);this.le.Bk(t,0,0,1,1);return b.Ba.Xj(this.le,a.left-b.x,a.top-b.y)};b.prototype.GA=function(a,b){if(!b)return!1;var c,d,f,g,h;c=0;for(d=a.wc.length;c<d;c++)if(a.wc[c].behavior instanceof b)return!0;if(!a.Ua)for(c=0,d=a.Yb.length;c<d;c++)for(h=a.Yb[c],f=0,g=h.wc.length;f<g;f++)if(h.wc[f].behavior instanceof b)return!0;return!1};b.prototype.HA=function(a){return this.GA(a,Xb.RH)};
b.prototype.Pv=function(a){return this.GA(a,Xb.SH)};var y=[];b.prototype.Pe=function(a){var b,c,d;a.nb();this.Yx(a.H,a.$b,y);b=0;for(c=y.length;b<c;++b)if(d=y[b],d.da.solidEnabled&&this.Qf(a,d))return y.length=0,d;y.length=0;return null};b.prototype.TG=function(a){var b,c,d;this.Yx(null,a,y);b=0;for(c=y.length;b<c;++b)if(d=y[b],d.da.solidEnabled&&this.Kv(a,d))return y.length=0,d;y.length=0;return null};var A=[];b.prototype.nj=function(a,b){var c=null;b&&(c=A,c.length=0);a.nb();this.AE(a.H,a.$b,y);
var d,f,g;d=0;for(f=y.length;d<f;++d)if(g=y[d],g.da.jumpthruEnabled&&this.Qf(a,g))if(b)c.push(g);else return y.length=0,g;y.length=0;return c};b.prototype.tg=function(a,b,c,d,f,g){d=d||50;var h=a.x,e=a.y,k,m=null,l=null;for(k=0;k<d;k++)if(a.x=h+b*k,a.y=e+c*k,a.ea(),!this.Qf(a,m)&&((m=this.Pe(a))&&(l=m),!m&&(f&&(m=g?this.Qf(a,g)?g:null:this.nj(a))&&(l=m),!m)))return l&&this.kv(a,b,c,l),!0;a.x=h;a.y=e;a.ea();return!1};b.prototype.kv=function(a,b,c,d){var f=2,g,h=!1;g=!1;for(var e=a.x,k=a.y;16>=f;)g=
1/f,f*=2,a.x+=b*g*(h?1:-1),a.y+=c*g*(h?1:-1),a.ea(),this.Qf(a,d)?g=h=!0:(g=h=!1,e=a.x,k=a.y);g&&(a.x=e,a.y=k,a.ea())};b.prototype.tG=function(a,b){var c=ga(b)?100:b,d=0,f=a.x,g=a.y,h=0,e=0,k=0,m=this.Pe(a);if(!m)return!0;for(;d<=c;){switch(h){case 0:e=0;k=-1;d++;break;case 1:e=1;k=-1;break;case 2:e=1;k=0;break;case 3:k=e=1;break;case 4:e=0;k=1;break;case 5:e=-1;k=1;break;case 6:e=-1;k=0;break;case 7:k=e=-1}h=(h+1)%8;a.x=pa(f+e*d);a.y=pa(g+k*d);a.ea();if(!this.Qf(a,m)&&(m=this.Pe(a),!m))return!0}a.x=
f;a.y=g;a.ea();return!1};b.prototype.Ol=function(a,b){a.Ig&&b.Ig&&this.mr.push([a,b])};b.prototype.aD=function(a,b){var c,d,f;c=0;for(d=this.mr.length;c<d;c++)if(f=this.mr[c],f[0]==a&&f[1]==b||f[0]==b&&f[1]==a)return!0;return!1};var D=-1;b.prototype.trigger=function(a,b,c){if(!this.Ib)return!1;var d=this.Ib.Mm;if(!d)return!1;var f=!1,g,h,e;D++;var k=d.Vs;h=0;for(e=k.length;h<e;++h)g=this.DA(a,b,k[h],c),f=f||g;g=this.DA(a,b,d,c);D--;return f||g};b.prototype.DA=function(a,b,c,d){var f=!1,g,h,e,k;if(b)for(e=
this.Nv(a,b,b.type.name,c,d),f=f||e,k=b.type.Yb,g=0,h=k.length;g<h;++g)e=this.Nv(a,b,k[g].name,c,d),f=f||e;else e=this.Nv(a,b,"system",c,d),f=f||e;return f};b.prototype.Nv=function(a,b,c,d,f){var g,h=!1,e=!1,e="undefined"!==typeof f,k=(e?d.Lx:d.EA)[c];if(!k)return h;var m=null;d=0;for(g=k.length;d<g;++d)if(k[d].method==a){m=k[d].Nm;break}if(!m)return h;a=e?m[f]:m;if(!a)return null;d=0;for(g=a.length;d<g;d++)f=a[d][0],e=a[d][1],e=this.lE(b,c,f,e),h=h||e;return h};b.prototype.lE=function(a,b,c,d){var f,
g,h=!1;this.Ov++;var e=this.zd().Be;e&&this.bo(e.jj);var k=1<this.Ov;this.bo(c.jj);k&&this.sG();var m=this.ir(c);m.Be=c;a&&(f=this.types[b].pb(),f.Ab=!1,f.B.length=1,f.B[0]=a,this.types[b].ag());a=!0;if(c.parent){b=m.vA;for(f=c.parent;f;)b.push(f),f=f.parent;b.reverse();f=0;for(g=b.length;f<g;f++)if(!b[f].BG()){a=!1;break}}a&&(this.Ip++,c.pg?c.AG(d):c.Gc(),h=h||m.dk);this.cr();k&&this.oG();this.wk(c.jj);e&&this.wk(e.jj);this.Mi&&0===this.Uh&&0===D&&!this.Vt&&this.ud();this.Ov--;return h};b.prototype.Sx=
function(){var a=this.zd();return a.Be.Zc[a.Nc]};b.prototype.sG=function(){this.Eq++;this.Eq>=this.vu.length&&this.vu.push([])};b.prototype.oG=function(){this.Eq--};b.prototype.Tx=function(){return this.vu[this.Eq]};b.prototype.ir=function(a){this.Hp++;this.Hp>=this.dt.length&&this.dt.push(new Ib);var b=this.zd();b.reset(a);return b};b.prototype.cr=function(){this.Hp--};b.prototype.zd=function(){return this.dt[this.Hp]};b.prototype.Ux=function(a,b){for(var c,d,f,g,h,e;b;){c=0;for(d=b.Pf.length;c<
d;c++)if(e=b.Pf[c],e instanceof Jb&&bb(a,e.name))return e;b=b.parent}c=0;for(d=this.Mh.length;c<d;c++)for(h=this.Mh[c],f=0,g=h.Ki.length;f<g;f++)if(e=h.Ki[f],e instanceof Jb&&bb(a,e.name))return e;return null};b.prototype.Wx=function(a){var b,c;b=0;for(c=this.ig.length;b<c;b++)if(this.ig[b].Pa===a)return this.ig[b];return null};b.prototype.fl=function(a){var b,c;b=0;for(c=this.Y.length;b<c;b++)if(this.Y[b].Pa===a)return this.Y[b];return null};b.prototype.xE=function(a){var b,c;b=0;for(c=this.Tk.length;b<
c;b++)if(this.Tk[b].Pa===a)return this.Tk[b];return null};b.prototype.YE=function(){var a=this,b=this.wv,c=this.Xh,d=this.zq,g=!1;this.oA&&(g=!0,b="__c2_continuouspreview",this.oA=!1);if(b.length){this.ud();c=this.GG();if(window.indexedDB&&!this.zf)e(b,c,function(){ea("Saved state to IndexedDB storage ("+c.length+" bytes)");a.Xh=c;a.trigger(B.prototype.W.rs,null);a.Xh="";g&&h()},function(d){try{localStorage.setItem("__c2save_"+b,c),ea("Saved state to WebStorage ("+c.length+" bytes)"),a.Xh=c,a.trigger(B.prototype.W.rs,
null),a.Xh="",g&&h()}catch(f){ea("Failed to save game state: "+d+"; "+f)}});else try{localStorage.setItem("__c2save_"+b,c),ea("Saved state to WebStorage ("+c.length+" bytes)"),a.Xh=c,this.trigger(B.prototype.W.rs,null),a.Xh="",g&&h()}catch(k){ea("Error saving to WebStorage: "+k)}this.Qd=this.zq=this.wv=""}d.length&&(window.indexedDB&&!this.zf?f(d,function(b){b?(a.Qd=b,ea("Loaded state from IndexedDB storage ("+a.Qd.length+" bytes)")):(a.Qd=localStorage.getItem("__c2save_"+d)||"",ea("Loaded state from WebStorage ("+
a.Qd.length+" bytes)"));a.no=!1;a.Qd.length||a.trigger(B.prototype.W.qs,null)},function(){a.Qd=localStorage.getItem("__c2save_"+d)||"";ea("Loaded state from WebStorage ("+a.Qd.length+" bytes)");a.no=!1;a.Qd.length||a.trigger(B.prototype.W.qs,null)}):(this.Qd=localStorage.getItem("__c2save_"+d)||"",ea("Loaded state from WebStorage ("+this.Qd.length+" bytes)"),this.no=!1,a.Qd.length||a.trigger(B.prototype.W.qs,null)),this.wv=this.zq="");this.Qd.length&&(this.ud(),this.sF(this.Qd),this.Xh=this.Qd,this.trigger(B.prototype.W.UB,
null),this.Qd=this.Xh="")};b.prototype.GG=function(){var a,b,c,d,f,h,e,k={c2save:!0,version:1,rt:{time:this.He.mb,walltime:this.vh.mb,timescale:this.ni,tickcount:this.hf,execcount:this.Ip,next_uid:this.Qn,running_layout:this.Ib.Pa,start_time_offset:Date.now()-this.Er},types:{},layouts:{},events:{groups:{},cnds:{},acts:{},vars:{}}};a=0;for(b=this.Y.length;a<b;a++)if(f=this.Y[a],!f.Ua&&!this.HA(f)){h={instances:[]};Oa(f.da)&&(h.ex=g(f.da));c=0;for(d=f.B.length;c<d;c++)h.instances.push(this.vv(f.B[c]));
k.types[f.Pa.toString()]=h}a=0;for(b=this.ig.length;a<b;a++)c=this.ig[a],k.layouts[c.Pa.toString()]=c.Fd();d=k.events.groups;a=0;for(b=this.Tk.length;a<b;a++)c=this.Tk[a],d[c.Pa.toString()]=this.bq[c.Xm].aq;b=k.events.cnds;for(e in this.Xk)this.Xk.hasOwnProperty(e)&&(a=this.Xk[e],Oa(a.da)&&(b[e]={ex:g(a.da)}));b=k.events.acts;for(e in this.Sk)this.Sk.hasOwnProperty(e)&&(a=this.Sk[e],Oa(a.da)&&(b[e]={ex:a.da}));b=k.events.vars;for(e in this.Yl)this.Yl.hasOwnProperty(e)&&(a=this.Yl[e],a.jq||a.parent&&
!a.kn||(b[e]=a.data));k.system=this.oh.Fd();return JSON.stringify(k)};b.prototype.aA=function(){var a,b,c,d,f,g;this.aj={};a=0;for(b=this.Y.length;a<b;a++)if(c=this.Y[a],!c.Ua)for(d=0,f=c.B.length;d<f;d++)g=c.B[d],this.aj[g.uid.toString()]=g};b.prototype.sF=function(a){a=JSON.parse(a);if(a.c2save&&!(1<a.version)){var b=a.rt;this.He.reset();this.He.mb=b.time;this.vh.reset();this.vh.mb=b.walltime||0;this.ni=b.timescale;this.hf=b.tickcount;this.Er=Date.now()-b.start_time_offset;var c=b.running_layout;
if(c!==this.Ib.Pa)if(c=this.Wx(c))this.Gx(c);else return;var d,f,g,h,e,k,m;k=a.types;for(f in k)if(k.hasOwnProperty(f)&&(h=this.fl(parseInt(f,10)))&&!h.Ua&&!this.HA(h)){k[f].ex?h.da=k[f].ex:Pa(h.da);e=h.B;g=k[f].instances;c=0;for(d=la(e.length,g.length);c<d;c++)this.Aq(e[c],g[c]);c=g.length;for(d=e.length;c<d;c++)this.qj(e[c]);c=e.length;for(d=g.length;c<d;c++){e=null;if(h.Ec.Pi&&(e=this.Ib.Yp(g[c].w.l),!e))continue;e=this.Kj(h.Kg,e,!1,0,0,!0);this.Aq(e,g[c])}h.Tl=!0}this.ud();this.aA();d=a.layouts;
for(f in d)d.hasOwnProperty(f)&&(c=this.Wx(parseInt(f,10)))&&c.fe(d[f]);d=a.events.groups;for(f in d)d.hasOwnProperty(f)&&(c=this.xE(parseInt(f,10)))&&this.bq[c.Xm]&&(this.bq[c.Xm].aq=d[f]);c=a.events.cnds;for(f in c)c.hasOwnProperty(f)&&this.Xk.hasOwnProperty(f)&&(this.Xk[f].da=c[f].ex);c=a.events.acts;for(f in c)c.hasOwnProperty(f)&&this.Sk.hasOwnProperty(f)&&(this.Sk[f].da=c[f].ex);c=a.events.vars;for(f in c)c.hasOwnProperty(f)&&this.Yl.hasOwnProperty(f)&&(this.Yl[f].data=c[f]);this.Qn=b.next_uid;
this.oh.fe(a.system);c=0;for(d=this.Y.length;c<d;c++)if(h=this.Y[c],!h.Ua)for(f=0,a=h.B.length;f<a;f++){e=h.B[f];if(h.gg)for(k=e.Wm(),b=e.siblings.length=0,g=h.ze.length;b<g;b++)m=h.ze[b],h!==m&&e.siblings.push(m.B[k]);e.Yf&&e.Yf();if(e.Ea)for(b=0,g=e.Ea.length;b<g;b++)k=e.Ea[b],k.Yf&&k.Yf()}this.Hb=!0}};b.prototype.vv=function(a,b){var c,d,f,h,e;h=a.type;f=h.Ec;var k={};b?k.c2=!0:k.uid=a.uid;Oa(a.da)&&(k.ex=g(a.da));if(a.Qc&&a.Qc.length)for(k.ivs={},c=0,d=a.Qc.length;c<d;c++)k.ivs[a.type.Qt[c].toString()]=
a.Qc[c];if(f.Pi){f={x:a.x,y:a.y,w:a.width,h:a.height,l:a.H.Pa,zi:a.xf()};0!==a.M&&(f.a=a.M);1!==a.opacity&&(f.o=a.opacity);.5!==a.Fe&&(f.hX=a.Fe);.5!==a.Ge&&(f.hY=a.Ge);0!==a.Xd&&(f.bm=a.Xd);a.visible||(f.v=a.visible);a.Ig||(f.ce=a.Ig);-1!==a.Pn&&(f.mts=a.Pn);if(h.Ca.length)for(f.fx=[],c=0,d=h.Ca.length;c<d;c++)e=h.Ca[c],f.fx.push({name:e.name,active:a.Bi[e.index],params:a.ac[e.index]});k.w=f}if(a.Ea&&a.Ea.length)for(k.behs={},c=0,d=a.Ea.length;c<d;c++)h=a.Ea[c],h.Fd&&(k.behs[h.type.Pa.toString()]=
h.Fd());a.Fd&&(k.data=a.Fd());return k};b.prototype.zE=function(a,b){var c,d;c=0;for(d=a.Qt.length;c<d;c++)if(a.Qt[c]===b)return c;return-1};b.prototype.uE=function(a,b){var c,d;c=0;for(d=a.Ea.length;c<d;c++)if(a.Ea[c].type.Pa===b)return c;return-1};b.prototype.Aq=function(a,b,c){var d,f,g,h,e;e=a.type;g=e.Ec;if(c){if(!b.c2)return}else a.uid=b.uid;b.ex?a.da=b.ex:Pa(a.da);if(f=b.ivs)for(d in f)f.hasOwnProperty(d)&&(c=this.zE(e,parseInt(d,10)),0>c||c>=a.Qc.length||(a.Qc[c]=f[d]));if(g.Pi){g=b.w;a.H.Pa!==
g.l&&(c=a.H,a.H=this.Ib.Yp(g.l),a.H?(a.H.B.push(a),a.H.Qe=!0,Aa(c.B,a),c.Qe=!0):(a.H=c,this.qj(a)));a.x=g.x;a.y=g.y;a.width=g.w;a.height=g.h;a.Fk=g.zi;a.M=g.hasOwnProperty("a")?g.a:0;a.opacity=g.hasOwnProperty("o")?g.o:1;a.Fe=g.hasOwnProperty("hX")?g.hX:.5;a.Ge=g.hasOwnProperty("hY")?g.hY:.5;a.visible=g.hasOwnProperty("v")?g.v:!0;a.Ig=g.hasOwnProperty("ce")?g.ce:!0;a.Pn=g.hasOwnProperty("mts")?g.mts:-1;a.Xd=g.hasOwnProperty("bm")?g.bm:0;a.Hm=Za(a.Xd);this.X&&$a(a,a.Xd,this.X);a.ea();if(g.hasOwnProperty("fx"))for(c=
0,f=g.fx.length;c<f;c++)h=e.zt(g.fx[c].name),0>h||(a.Bi[h]=g.fx[c].active,a.ac[h]=g.fx[c].params);a.qi()}if(e=b.behs)for(d in e)e.hasOwnProperty(d)&&(g=this.uE(a,parseInt(d,10)),0>g||a.Ea[g].fe(e[d]));b.data&&a.fe(b.data)};Kb=function(a){return new b(document.getElementById(a))};Lb=function(a,c){return new b({dc:!0,width:a,height:c})};window.cr_createRuntime=Kb;window.cr_createDCRuntime=Lb;window.createCocoonJSRuntime=function(){window.c2cocoonjs=!0;var a=document.createElement("screencanvas")||document.createElement("canvas");
a.NI=!0;document.body.appendChild(a);a=new b(a);window.c2runtime=a;window.addEventListener("orientationchange",function(){window.c2runtime.setSize(window.innerWidth,window.innerHeight)});window.c2runtime.setSize(window.innerWidth,window.innerHeight);return a};window.createEjectaRuntime=function(){var a=new b(document.getElementById("canvas"));window.c2runtime=a;window.c2runtime.setSize(window.innerWidth,window.innerHeight);return a}})();
window.cr_getC2Runtime=function(){var a=document.getElementById("c2canvas");return a?a.c2runtime:window.c2runtime?window.c2runtime:null};window.cr_sizeCanvas=function(a,c){if(0!==a&&0!==c){var b=window.cr_getC2Runtime();b&&b.setSize(a,c)}};window.cr_setSuspended=function(a){var c=window.cr_getC2Runtime();c&&c.setSuspended(a)};
(function(){function a(a,b){this.i=a;this.Mm=null;this.scrollX=this.i.gd/2;this.scrollY=this.i.fd/2;this.scale=1;this.M=0;this.Qm=!0;this.name=b[0];this.width=b[1];this.height=b[2];this.IA=b[3];this.mA=b[4];this.Pa=b[5];var c=b[6],d,e;this.Ma=[];this.an=[];d=0;for(e=c.length;d<e;d++){var n=new Mb(this,c[d]);n.tz=d;this.Ma.push(n)}c=b[7];this.Wj=[];d=0;for(e=c.length;d<e;d++){var n=c[d],k=this.i.Y[n[1]];k.Kg||(k.Kg=n);this.Wj.push(n);-1===this.an.indexOf(k)&&this.an.push(k)}this.Ca=[];this.eb=[];this.ac=
[];d=0;for(e=b[8].length;d<e;d++)this.Ca.push({id:b[8][d][0],name:b[8][d][1],qd:-1,xd:!0,index:d}),this.ac.push(b[8][d][2].slice(0));this.qi();this.Nl=new sa(0,0,1,1);this.nv=new sa(0,0,1,1);this.cj={}}function c(a,b){return a.Fk-b.Fk}function b(a,b){this.yb=a;this.i=a.i;this.B=[];this.scale=1;this.M=0;this.Mj=!1;this.oi=new sa(0,0,0,0);this.CA=new ta;this.rd=this.Uc=this.sd=this.Tc=0;this.Qe=!1;this.name=b[0];this.index=b[1];this.Pa=b[2];this.visible=b[3];this.Di=b[4];this.pi=b[5];this.Jf=b[6];this.Kf=
b[7];this.opacity=b[8];this.nt=b[9];this.xg=b[10];this.Xd=b[11];this.LD=b[12];this.Hm="source-over";this.yd=this.Gd=0;this.hj=!1;var c=b[13],d,e;this.hl=[];d=0;for(e=c.length;d<e;d++){var n=c[d],k=this.i.Y[n[1]];k.Kg||(k.Kg=n,k.lD=this.index);this.hl.push(n);-1===this.yb.an.indexOf(k)&&this.yb.an.push(k)}this.Ca=[];this.eb=[];this.ac=[];d=0;for(e=b[14].length;d<e;d++)this.Ca.push({id:b[14][d][0],name:b[14][d][1],qd:-1,xd:!0,index:d}),this.ac.push(b[14][d][2].slice(0));this.qi();this.Nl=new sa(0,0,
1,1);this.nv=new sa(0,0,1,1)}a.prototype.FG=function(a){var b=a.type.Pa.toString();this.cj.hasOwnProperty(b)||(this.cj[b]=[]);this.cj[b].push(this.i.vv(a))};a.prototype.ay=function(){var a=this.Ma[0];return!a.pi&&1===a.opacity&&!a.nt&&a.visible};a.prototype.qi=function(){this.eb.length=0;var a,b,c;a=0;for(b=this.Ca.length;a<b;a++)c=this.Ca[a],c.xd&&this.eb.push(c)};a.prototype.yt=function(a){var b,c,d;b=0;for(c=this.Ca.length;b<c;b++)if(d=this.Ca[b],d.name===a)return d;return null};var d=[],e=!0;
a.prototype.Hv=function(){this.mA&&(this.Mm=this.i.et[this.mA],this.Mm.NA());this.i.Ib=this;this.scrollX=this.i.gd/2;this.scrollY=this.i.fd/2;var a,b,g,m,l,n,k;a=0;for(g=this.i.Y.length;a<g;a++)if(b=this.i.Y[a],!b.Ua)for(l=b.B,b=0,m=l.length;b<m;b++)if(n=l[b],n.H){var r=n.H.tz;r>=this.Ma.length&&(r=this.Ma.length-1);n.H=this.Ma[r];-1===n.H.B.indexOf(n)&&n.H.B.push(n);n.H.Qe=!0}if(!e)for(a=0,g=this.Ma.length;a<g;++a)this.Ma[a].B.sort(c);d.length=0;this.WC();a=0;for(g=this.Ma.length;a<g;a++)n=this.Ma[a],
n.iD(),n.Rv();l=!1;if(!this.Qm){for(k in this.cj)if(this.cj.hasOwnProperty(k)&&(b=this.i.fl(parseInt(k,10)))&&!b.Ua&&this.i.Pv(b)){m=this.cj[k];a=0;for(g=m.length;a<g;a++){n=null;if(b.Ec.Pi&&(n=this.Yp(m[a].w.l),!n))continue;n=this.i.Kj(b.Kg,n,!1,0,0,!0);this.i.Aq(n,m[a]);l=!0;d.push(n)}m.length=0}a=0;for(g=this.Ma.length;a<g;a++)this.Ma[a].B.sort(c),this.Ma[a].Qe=!0}l&&(this.i.ud(),this.i.aA());for(a=0;a<d.length;a++)if(n=d[a],n.type.gg)for(g=n.Wm(),b=0,m=n.type.ze.length;b<m;b++)k=n.type.ze[b],
n.type!==k&&(k.B.length>g?n.siblings.push(k.B[g]):k.Kg&&(l=this.i.Kj(k.Kg,n.H,!0,n.x,n.y,!0),this.i.ud(),k.Rr(),n.siblings.push(l),d.push(l)));a=0;for(g=this.Wj.length;a<g;a++)this.i.Kj(this.Wj[a],null,!0);this.i.Gm=null;this.i.ud();if(this.i.wb&&!this.i.Db)for(a=0,g=this.i.Y.length;a<g;a++)k=this.i.Y[a],!k.Ua&&k.B.length&&k.Sz&&k.Sz(this.i.wb);a=0;for(g=d.length;a<g;a++)n=d[a],this.i.trigger(Object.getPrototypeOf(n.type.Ec).W.JB,n);d.length=0;this.i.trigger(B.prototype.W.uw,null);this.Qm=!1};a.prototype.hD=
function(){var a,b,c,d,e;b=a=0;for(c=this.Wj.length;a<c;a++)d=this.Wj[a],e=this.i.Y[d[1]],e.global?this.i.Kj(d,null,!0):(this.Wj[b]=d,b++);this.Wj.length=b};a.prototype.QG=function(){this.i.trigger(B.prototype.W.TB,null);this.i.oh.pe.length=0;var a,b,c,d,l,n;a=0;for(b=this.Ma.length;a<b;a++)for(this.Ma[a].RA(),l=this.Ma[a].B,c=0,d=l.length;c<d;c++)n=l[c],n.type.global||this.i.Pv(n.type)&&this.FG(n);a=0;for(b=this.Ma.length;a<b;a++){l=this.Ma[a].B;c=0;for(d=l.length;c<d;c++)n=l[c],n.type.global||this.i.qj(n);
this.i.ud();l.length=0;this.Ma[a].Qe=!0}a=0;for(b=this.i.Y.length;a<b;a++)if(l=this.i.Y[a],!(l.global||l.Ec.Pi||l.Ec.Cr||l.Ua)){c=0;for(d=l.B.length;c<d;c++)this.i.qj(l.B[c]);this.i.ud()}e=!1};a.prototype.Lg=function(a){var b,c=a,d=!1,e=!this.i.vf;e&&(this.i.xq||(this.i.xq=document.createElement("canvas"),b=this.i.xq,b.width=this.i.Ka,b.height=this.i.Ja,this.i.Ly=b.getContext("2d"),d=!0),b=this.i.xq,c=this.i.Ly,b.width!==this.i.Ka&&(b.width=this.i.Ka,d=!0),b.height!==this.i.Ja&&(b.height=this.i.Ja,
d=!0),d&&(c.webkitImageSmoothingEnabled=this.i.qb,c.mozImageSmoothingEnabled=this.i.qb,c.msImageSmoothingEnabled=this.i.qb,c.imageSmoothingEnabled=this.i.qb));c.globalAlpha=1;c.globalCompositeOperation="source-over";this.i.Es&&!this.ay()&&c.clearRect(0,0,this.i.Ka,this.i.Ja);var n,k,d=0;for(n=this.Ma.length;d<n;d++)k=this.Ma[d],k.visible&&0<k.opacity&&11!==k.Xd&&(k.B.length||!k.pi)?k.Lg(c):k.Rv();e&&a.drawImage(b,0,0,this.i.width,this.i.height)};a.prototype.tf=function(a){var b=0<this.eb.length||
this.i.Wl||!this.i.vf;if(b){this.i.Ie||(this.i.Ie=a.Fh(this.i.Ka,this.i.Ja,this.i.qb));if(this.i.Ie.Em!==this.i.Ka||this.i.Ie.Dm!==this.i.Ja)a.deleteTexture(this.i.Ie),this.i.Ie=a.Fh(this.i.Ka,this.i.Ja,this.i.qb);a.mh(this.i.Ie);this.i.vf||a.Rl(this.i.Ka,this.i.Ja)}else this.i.Ie&&(a.mh(null),a.deleteTexture(this.i.Ie),this.i.Ie=null);this.i.Es&&!this.ay()&&a.clear(0,0,0,0);var c,d,e;c=0;for(d=this.Ma.length;c<d;c++)e=this.Ma[c],e.visible&&0<e.opacity&&(e.B.length||!e.pi)?e.tf(a):e.Rv();b&&(0===
this.eb.length||1===this.eb.length&&this.i.vf?(1===this.eb.length?(b=this.eb[0].index,a.nh(this.eb[0].qd),a.Ql(null,1/this.i.Ka,1/this.i.Ja,0,0,1,1,this.scale,this.M,0,0,this.i.Ka/2,this.i.Ja/2,this.ac[b]),a.gr(this.eb[0].qd)&&(this.i.Hb=!0)):a.nh(0),this.i.vf||a.Rl(this.i.width,this.i.height),a.mh(null),a.Pl(1),a.gf(this.i.Ie),a.gA(),a.kh(),a.sh(),b=this.i.width/2,c=this.i.height/2,a.jr(-b,c,b,c,b,-c,-b,-c),a.gf(null)):this.pv(a,null,null,null))};a.prototype.Vm=function(){return 0<this.eb.length||
this.i.Wl||!this.i.vf?this.i.Ie:null};a.prototype.Xx=function(){var a=this.Ma[0].ee(),b,c,d;b=1;for(c=this.Ma.length;b<c;b++)d=this.Ma[b],(0!==d.Jf||0!==d.Kf)&&d.ee()<a&&(a=d.ee());return a};a.prototype.xv=function(a){if(!this.IA){var b=1/this.Xx()*this.i.Ka/2;a>this.width-b&&(a=this.width-b);a<b&&(a=b)}this.scrollX!==a&&(this.scrollX=a,this.i.Hb=!0)};a.prototype.yv=function(a){if(!this.IA){var b=1/this.Xx()*this.i.Ja/2;a>this.height-b&&(a=this.height-b);a<b&&(a=b)}this.scrollY!==a&&(this.scrollY=
a,this.i.Hb=!0)};a.prototype.WC=function(){this.xv(this.scrollX);this.yv(this.scrollY)};a.prototype.pv=function(a,b,c,d){var e=c?c.eb:b?b.eb:this.eb,n=1,k=0,r=0,q=0,s=this.i.Ka,t=this.i.Ja;c?(n=c.H.ee(),k=c.H.Bc(),r=c.H.Tc,q=c.H.Uc,s=c.H.sd,t=c.H.rd):b&&(n=b.ee(),k=b.Bc(),r=b.Tc,q=b.Uc,s=b.sd,t=b.rd);var p=this.i.qt,y,A,D,w,G=0,I=1,E,z=this.i.Ka,H=this.i.Ja,C=z/2,X=H/2,M=b?b.Nl:this.Nl,O=b?b.nv:this.nv,K=0,F=0,N=0,J=0,L=z,ca=z,P=H,U=H,V=D=0,ma=c?c.H.Bc():0;if(c){y=0;for(A=e.length;y<A;y++)D+=a.EE(e[y].qd),
V+=a.FE(e[y].qd);w=c.$b;K=b.xb(w.left,w.top,!0,!0);N=b.xb(w.left,w.top,!1,!0);L=b.xb(w.right,w.bottom,!0,!0);P=b.xb(w.right,w.bottom,!1,!0);0!==ma&&(y=b.xb(w.right,w.top,!0,!0),A=b.xb(w.right,w.top,!1,!0),F=b.xb(w.left,w.bottom,!0,!0),J=b.xb(w.left,w.bottom,!1,!0),w=Math.min(K,L,y,F),L=Math.max(K,L,y,F),K=w,w=Math.min(N,P,A,J),P=Math.max(N,P,A,J),N=w);K-=D;N-=V;L+=D;P+=V;O.left=K/z;O.top=1-N/H;O.right=L/z;O.bottom=1-P/H;F=K=pa(K);J=N=pa(N);ca=L=qa(L);U=P=qa(P);F-=D;J-=V;ca+=D;U+=V;0>K&&(K=0);0>N&&
(N=0);L>z&&(L=z);P>H&&(P=H);0>F&&(F=0);0>J&&(J=0);ca>z&&(ca=z);U>H&&(U=H);M.left=K/z;M.top=1-N/H;M.right=L/z;M.bottom=1-P/H}else M.left=O.left=0,M.top=O.top=0,M.right=O.right=1,M.bottom=O.bottom=1;V=c&&((c.M||ma)&&a.$n(e[0].qd)||0!==D||0!==V||1!==c.opacity||c.type.Ec.pz)||b&&!c&&1!==b.opacity;a.gA();if(V){p[G]||(p[G]=a.Fh(z,H,this.i.qb));if(p[G].Em!==z||p[G].Dm!==H)a.deleteTexture(p[G]),p[G]=a.Fh(z,H,this.i.qb);a.nh(0);a.mh(p[G]);E=U-J;a.clearRect(F,H-J-E,ca-F,E);c?c.tf(a):(a.gf(this.i.Xe),a.Pl(b.opacity),
a.kh(),a.translate(-C,-X),a.sh(),a.fj(K,P,L,P,L,N,K,N,M));O.left=O.top=0;O.right=O.bottom=1;c&&(w=M.top,M.top=M.bottom,M.bottom=w);G=1;I=0}a.Pl(1);D=e.length-1;var ma=a.jv(e[D].qd)||!b&&!c&&!this.i.vf,na=0;y=0;for(A=e.length;y<A;y++){p[G]||(p[G]=a.Fh(z,H,this.i.qb));if(p[G].Em!==z||p[G].Dm!==H)a.deleteTexture(p[G]),p[G]=a.Fh(z,H,this.i.qb);a.nh(e[y].qd);na=e[y].index;a.gr(e[y].qd)&&(this.i.Hb=!0);0!=y||V?(a.Ql(d,1/z,1/H,O.left,O.top,O.right,O.bottom,n,k,r,q,(r+s)/2,(q+t)/2,c?c.ac[na]:b?b.ac[na]:this.ac[na]),
a.gf(null),y!==D||ma?(a.mh(p[G]),E=U-J,w=H-J-E,a.clearRect(F,w,ca-F,E)):(c?a.ij(c.Gd,c.yd):b&&a.ij(b.Gd,b.yd),a.mh(d)),a.gf(p[I]),a.kh(),a.translate(-C,-X),a.sh(),a.fj(K,P,L,P,L,N,K,N,M),y!==D||ma||a.gf(null)):(a.mh(p[G]),E=U-J,w=H-J-E,a.clearRect(F,w,ca-F,E),c?(a.Ql(d,1/c.width,1/c.height,O.left,O.top,O.right,O.bottom,n,k,r,q,(r+s)/2,(q+t)/2,c.ac[na]),c.tf(a)):(a.Ql(d,1/z,1/H,0,0,1,1,n,k,r,q,(r+s)/2,(q+t)/2,b?b.ac[na]:this.ac[na]),a.gf(b?this.i.Xe:this.i.Ie),a.kh(),a.translate(-C,-X),a.sh(),a.fj(K,
P,L,P,L,N,K,N,M)),O.left=O.top=0,O.right=O.bottom=1,c&&!ma&&(w=P,P=N,N=w));G=0===G?1:0;I=0===G?1:0}ma&&(a.nh(0),c?a.ij(c.Gd,c.yd):b?a.ij(b.Gd,b.yd):this.i.vf||(a.Rl(this.i.width,this.i.height),C=this.i.width/2,X=this.i.height/2,N=K=0,L=this.i.width,P=this.i.height),a.mh(d),a.gf(p[I]),a.kh(),a.translate(-C,-X),a.sh(),c&&1===e.length&&!V?a.fj(K,N,L,N,L,P,K,P,M):a.fj(K,P,L,P,L,N,K,N,M),a.gf(null))};a.prototype.Yp=function(a){var b,c;b=0;for(c=this.Ma.length;b<c;b++)if(this.Ma[b].Pa===a)return this.Ma[b];
return null};a.prototype.Fd=function(){var a,b,c,d={sx:this.scrollX,sy:this.scrollY,s:this.scale,a:this.M,w:this.width,h:this.height,fv:this.Qm,persist:this.cj,fx:[],layers:{}};a=0;for(b=this.Ca.length;a<b;a++)c=this.Ca[a],d.fx.push({name:c.name,active:c.xd,params:this.ac[c.index]});a=0;for(b=this.Ma.length;a<b;a++)c=this.Ma[a],d.layers[c.Pa.toString()]=c.Fd();return d};a.prototype.fe=function(a){var b,c,d,e;this.scrollX=a.sx;this.scrollY=a.sy;this.scale=a.s;this.M=a.a;this.width=a.w;this.height=
a.h;this.cj=a.persist;"undefined"!==typeof a.fv&&(this.Qm=a.fv);var n=a.fx;b=0;for(c=n.length;b<c;b++)if(d=this.yt(n[b].name))d.xd=n[b].active,this.ac[d.index]=n[b].params;this.qi();b=a.layers;for(e in b)b.hasOwnProperty(e)&&(a=this.Yp(parseInt(e,10)))&&a.fe(b[e])};vb=a;b.prototype.qi=function(){this.eb.length=0;var a,b,c;a=0;for(b=this.Ca.length;a<b;a++)c=this.Ca[a],c.xd&&this.eb.push(c)};b.prototype.yt=function(a){var b,c,d;b=0;for(c=this.Ca.length;b<c;b++)if(d=this.Ca[b],d.name===a)return d;return null};
b.prototype.iD=function(){var a,b,c,e,l,n;b=a=0;for(c=this.hl.length;a<c;a++){e=this.hl[a];l=this.i.Y[e[1]];n=this.i.Pv(l);l=!0;if(!n||this.yb.Qm)e=this.i.Kj(e,this,!0),d.push(e),e.type.global&&(l=!1);l&&(this.hl[b]=this.hl[a],b++)}this.hl.length=b;this.i.ud();!this.i.ka&&this.Ca.length&&(this.Xd=this.LD);this.Hm=Za(this.Xd);this.i.X&&$a(this,this.Xd,this.i.X)};b.prototype.RA=function(){if(this.Qe){var a,b;a=0;for(b=this.B.length;a<b;a++)this.B[a].Fk=a;this.Qe=!1}};b.prototype.ee=function(a){return this.BE()*
(this.i.vf||a?this.i.Cm:1)};b.prototype.BE=function(){return(this.scale*this.yb.scale-1)*this.xg+1};b.prototype.Bc=function(){return this.Mj?0:Da(this.yb.M+this.M)};b.prototype.Lg=function(a){this.hj=this.nt||1!==this.opacity||0!==this.Xd;var b=this.i.canvas,c=a,d=!1;this.hj&&(this.i.wq||(this.i.wq=document.createElement("canvas"),b=this.i.wq,b.width=this.i.Ka,b.height=this.i.Ja,this.i.Ky=b.getContext("2d"),d=!0),b=this.i.wq,c=this.i.Ky,b.width!==this.i.Ka&&(b.width=this.i.Ka,d=!0),b.height!==this.i.Ja&&
(b.height=this.i.Ja,d=!0),d&&(c.webkitImageSmoothingEnabled=this.i.qb,c.mozImageSmoothingEnabled=this.i.qb,c.msImageSmoothingEnabled=this.i.qb,c.imageSmoothingEnabled=this.i.qb),this.pi&&c.clearRect(0,0,this.i.Ka,this.i.Ja));c.globalAlpha=1;c.globalCompositeOperation="source-over";this.pi||(c.fillStyle="rgb("+this.Di[0]+","+this.Di[1]+","+this.Di[2]+")",c.fillRect(0,0,this.i.Ka,this.i.Ja));c.save();this.Mj=!0;var d=this.xe(0,0,!0,!0),e=this.xe(0,0,!1,!0);this.Mj=!1;this.i.ej&&(d=Math.round(d),e=Math.round(e));
this.rv(d,e,c);var n=this.ee();c.scale(n,n);c.translate(-d,-e);for(var k,d=0,e=this.B.length;d<e;d++)n=this.B[d],n.visible&&0!==n.width&&0!==n.height&&(n.nb(),k=n.$b,k.right<this.Tc||k.bottom<this.Uc||k.left>this.sd||k.top>this.rd||(c.globalCompositeOperation=n.Hm,n.Lg(c)));c.restore();this.hj&&(a.globalCompositeOperation=this.Hm,a.globalAlpha=this.opacity,a.drawImage(b,0,0))};b.prototype.Rv=function(){this.Mj=!0;var a=this.xe(0,0,!0,!0),b=this.xe(0,0,!1,!0);this.Mj=!1;this.i.ej&&(a=Math.round(a),
b=Math.round(b));this.rv(a,b,null)};b.prototype.rv=function(a,b,c){var d=this.ee();this.Tc=a;this.Uc=b;this.sd=a+1/d*this.i.Ka;this.rd=b+1/d*this.i.Ja;a=this.Bc();0!==a&&(c&&(c.translate(this.i.Ka/2,this.i.Ja/2),c.rotate(-a),c.translate(this.i.Ka/-2,this.i.Ja/-2)),this.oi.set(this.Tc,this.Uc,this.sd,this.rd),this.oi.offset((this.Tc+this.sd)/-2,(this.Uc+this.rd)/-2),this.CA.kA(this.oi,a),this.CA.kx(this.oi),this.oi.offset((this.Tc+this.sd)/2,(this.Uc+this.rd)/2),this.Tc=this.oi.left,this.Uc=this.oi.top,
this.sd=this.oi.right,this.rd=this.oi.bottom)};b.prototype.tf=function(a){var b=this.i.Ka,c=this.i.Ja,d=0,e=0;if(this.hj=this.nt||1!==this.opacity||0<this.eb.length||0!==this.Xd){this.i.Xe||(this.i.Xe=a.Fh(this.i.Ka,this.i.Ja,this.i.qb));if(this.i.Xe.Em!==this.i.Ka||this.i.Xe.Dm!==this.i.Ja)a.deleteTexture(this.i.Xe),this.i.Xe=a.Fh(this.i.Ka,this.i.Ja,this.i.qb);a.mh(this.i.Xe);this.pi&&a.clear(0,0,0,0)}this.pi||a.clear(this.Di[0]/255,this.Di[1]/255,this.Di[2]/255,1);this.Mj=!0;var e=this.xe(0,0,
!0,!0),n=this.xe(0,0,!1,!0);this.Mj=!1;this.i.ej&&(e=Math.round(e),n=Math.round(n));this.rv(e,n,null);n=this.ee();a.kh();a.scale(n,n);a.sv(-this.Bc());a.translate((this.Tc+this.sd)/-2,(this.Uc+this.rd)/-2);a.sh();var k,r,q;k=0;for(r=this.B.length;k<r;k++)if(q=this.B[k],q.visible&&0!==q.width&&0!==q.height&&(q.nb(),d=q.$b,!(d.right<this.Tc||d.bottom<this.Uc||d.left>this.sd||d.top>this.rd)))if(q.UA)if(d=q.eb[0].qd,e=q.eb[0].index,1!==q.eb.length||a.jv(d)||a.rG(d)||(q.M||q.H.Bc())&&a.$n(d)||1!==q.opacity||
q.type.Ec.pz)this.yb.pv(a,this,q,this.hj?this.i.Xe:this.yb.Vm()),a.kh(),a.scale(n,n),a.sv(-this.Bc()),a.translate((this.Tc+this.sd)/-2,(this.Uc+this.rd)/-2),a.sh();else{a.nh(d);a.ij(q.Gd,q.yd);a.gr(d)&&(this.i.Hb=!0);var s=0,t=0,p=0,y=0;a.$n(d)&&(d=q.$b,s=this.xb(d.left,d.top,!0,!0),t=this.xb(d.left,d.top,!1,!0),p=this.xb(d.right,d.bottom,!0,!0),d=this.xb(d.right,d.bottom,!1,!0),s/=b,t=1-t/c,p/=b,y=1-d/c);a.Ql(this.hj?this.i.Xe:this.yb.Vm(),1/q.width,1/q.height,s,t,p,y,this.ee(),this.Bc(),this.Tc,
this.Uc,(this.Tc+this.sd)/2,(this.Uc+this.rd)/2,q.ac[e]);q.tf(a)}else a.nh(0),a.ij(q.Gd,q.yd),q.tf(a);this.hj&&(d=this.eb.length?this.eb[0].qd:0,e=this.eb.length?this.eb[0].index:0,0===this.eb.length||1===this.eb.length&&!a.jv(d)&&1===this.opacity?(1===this.eb.length?(a.nh(d),a.Ql(this.yb.Vm(),1/this.i.Ka,1/this.i.Ja,0,0,1,1,this.ee(),this.Bc(),this.Tc,this.Uc,(this.Tc+this.sd)/2,(this.Uc+this.rd)/2,this.ac[e]),a.gr(d)&&(this.i.Hb=!0)):a.nh(0),a.mh(this.yb.Vm()),a.Pl(this.opacity),a.gf(this.i.Xe),
a.ij(this.Gd,this.yd),a.kh(),a.sh(),b=this.i.Ka/2,c=this.i.Ja/2,a.jr(-b,c,b,c,b,-c,-b,-c),a.gf(null)):this.yb.pv(a,this,null,this.yb.Vm()))};b.prototype.xe=function(a,b,c,d){var e=this.i.devicePixelRatio;this.i.Zj&&(a*=e,b*=e);var e=this.i.Kz,n=this.i.Lz,e=(this.yb.scrollX-e)*this.Jf+e,n=(this.yb.scrollY-n)*this.Kf+n,k=1/this.ee(!d);d?(e-=this.i.Ka*k/2,n-=this.i.Ja*k/2):(e-=this.i.width*k/2,n-=this.i.height*k/2);e+=a*k;n+=b*k;b=this.Bc();0!==b&&(e-=this.yb.scrollX,n-=this.yb.scrollY,a=Math.cos(b),
b=Math.sin(b),d=e*a-n*b,n=n*a+e*b,e=d+this.yb.scrollX,n+=this.yb.scrollY);return c?e:n};b.prototype.xb=function(a,b,c,d){var e=this.Bc();if(0!==e){a-=this.yb.scrollX;b-=this.yb.scrollY;var n=Math.cos(-e),e=Math.sin(-e),k=a*n-b*e;b=b*n+a*e;a=k+this.yb.scrollX;b+=this.yb.scrollY}n=this.i.Kz;e=this.i.Lz;n=(this.yb.scrollX-n)*this.Jf+n;e=(this.yb.scrollY-e)*this.Kf+e;k=1/this.ee(!d);d?(n-=this.i.Ka*k/2,e-=this.i.Ja*k/2):(n-=this.i.width*k/2,e-=this.i.height*k/2);n=(a-n)/k;e=(b-e)/k;a=this.i.devicePixelRatio;
this.i.Zj&&!d&&(n/=a,e/=a);return c?n:e};b.prototype.Fd=function(){var a,b,c,d={s:this.scale,a:this.M,vl:this.Tc,vt:this.Uc,vr:this.sd,vb:this.rd,v:this.visible,bc:this.Di,t:this.pi,px:this.Jf,py:this.Kf,o:this.opacity,zr:this.xg,fx:[],instances:[]};a=0;for(b=this.Ca.length;a<b;a++)c=this.Ca[a],d.fx.push({name:c.name,active:c.xd,params:this.ac[c.index]});return d};b.prototype.fe=function(a){var b,d;this.scale=a.s;this.M=a.a;this.Tc=a.vl;this.Uc=a.vt;this.sd=a.vr;this.rd=a.vb;this.visible=a.v;this.Di=
a.bc;this.pi=a.t;this.Jf=a.px;this.Kf=a.py;this.opacity=a.o;this.xg=a.zr;var e=a.fx;a=0;for(b=e.length;a<b;a++)if(d=this.yt(e[a].name))d.xd=e[a].active,this.ac[d.index]=e[a].params;this.qi();this.B.sort(c);this.Qe=!0};Mb=b})();
(function(){function a(a,b){var c,d=a.length;switch(d){case 0:return!0;case 1:return a[0]===b[0];case 2:return a[0]===b[0]&&a[1]===b[1];default:for(c=0;c<d;c++)if(a[c]!==b[c])return!1;return!0}}function c(a,b){return a.index-b.index}function b(b){var d,e,g,f;2===b.length?b[0].index>b[1].index&&(d=b[0],b[0]=b[1],b[1]=d):2<b.length&&b.sort(c);b.length>=q.length&&(q.length=b.length+1);q[b.length]||(q[b.length]=[]);f=q[b.length];d=0;for(e=f.length;d<e;d++)if(g=f[d],a(b,g))return g;f.push(b);return b}
function d(a,b){this.i=a;this.EA={};this.Lx={};this.It=!1;this.cy=new da;this.Vs=[];this.Fs=[];this.name=b[0];var c=b[1];this.Ki=[];var d,e;d=0;for(e=c.length;d<e;d++)this.gy(c[d],null,this.Ki)}function e(a){this.type=a;this.B=[];this.hb=[];this.Ab=!0}function f(a,b,c){this.sheet=a;this.parent=b;this.i=a.i;this.Jb=[];this.jj=[];this.by=this.Mr=this.Mv=this.Pt=this.group=this.qA=!1;this.Zc=[];this.Xf=[];this.Pf=[];this.Xm="";this.aq=this.Pt=this.group=!1;this.zx=null;c[1]&&(this.Xm=c[1][1].toLowerCase(),
this.group=!0,this.Pt=!!c[1][0],this.zx=[],this.aq=this.Pt,this.i.Tk.push(this),this.i.bq[this.Xm]=this);this.pg=c[2];this.Pa=c[4];this.group||(this.i.jx[this.Pa.toString()]=this);var d=c[5];a=0;for(b=d.length;a<b;a++){var e=new Nb(this,d[a]);e.index=a;this.Zc.push(e);this.Ww(e.type)}d=c[6];a=0;for(b=d.length;a<b;a++)e=new Ob(this,d[a]),e.index=a,this.Xf.push(e);if(8===c.length)for(c=c[7],a=0,b=c.length;a<b;a++)this.sheet.gy(c[a],this,this.Pf);this.lq=!1;this.Zc.length&&(this.lq=null==this.Zc[0].type&&
this.Zc[0].od==B.prototype.W.mB)}function h(a,b){var c,d,e;if(a&&(-1===b.indexOf(a)&&b.push(a),a.gg))for(c=0,d=a.ze.length;c<d;c++)e=a.ze[c],a!==e&&-1===b.indexOf(e)&&b.push(e)}function g(a,b){this.Ue=a;this.sheet=a.sheet;this.i=a.i;this.Ha=[];this.zb=[];this.da={};this.index=-1;this.Bm=!1;this.od=this.i.xi(b[1]);this.trigger=0<b[3];this.Kx=2===b[3];this.Ug=b[4];this.St=b[5];this.pF=b[6];this.Pa=b[7];this.i.Xk[this.Pa.toString()]=this;-1===b[0]?(this.type=null,this.Gc=this.uv,this.Fj=null,this.of=
-1):(this.type=this.i.Y[b[0]],this.Gc=this.pF?this.CG:this.tv,b[2]?(this.Fj=this.type.Vp(b[2]),this.of=this.type.ut(b[2])):(this.Fj=null,this.of=-1),this.Ue.parent&&this.Ue.parent.yr());this.Kx&&(this.Gc=this.DG);if(10===b.length){var c,d,e=b[9];c=0;for(d=e.length;c<d;c++){var g=new Pb(this,e[c]);this.Ha.push(g)}this.zb.length=e.length}}function m(a,b){this.Ue=a;this.sheet=a.sheet;this.i=a.i;this.Ha=[];this.zb=[];this.da={};this.index=-1;this.Bm=!1;this.od=this.i.xi(b[1]);-1===b[0]?(this.type=null,
this.Gc=this.uv,this.Fj=null,this.of=-1):(this.type=this.i.Y[b[0]],this.Gc=this.tv,b[2]?(this.Fj=this.type.Vp(b[2]),this.of=this.type.ut(b[2])):(this.Fj=null,this.of=-1));this.Pa=b[3];this.i.Sk[this.Pa.toString()]=this;if(6===b.length){var c,d,e=b[5];c=0;for(d=e.length;c<d;c++){var g=new Pb(this,e[c]);this.Ha.push(g)}this.zb.length=e.length}}function l(a,b){this.la=a;this.Ue=a.Ue;this.sheet=a.sheet;this.i=a.i;this.type=b[0];this.Ng=null;this.kj=0;this.get=null;this.yx=0;this.yb=null;this.key=0;this.object=
null;this.index=0;this.uo=this.Dk=this.uo=this.Dk=this.Mx=this.Pj=this.vo=null;this.Rf=!1;var c,d,e;switch(b[0]){case 0:case 7:this.Ng=new Qb(this,b[1]);this.kj=0;this.get=this.LE;break;case 1:this.Ng=new Qb(this,b[1]);this.kj=0;this.get=this.ME;break;case 5:this.Ng=new Qb(this,b[1]);this.kj=0;this.get=this.QE;break;case 3:case 8:this.yx=b[1];this.get=this.JE;break;case 6:this.yb=this.i.ku[b[1]];this.get=this.RE;break;case 9:this.key=b[1];this.get=this.PE;break;case 4:this.object=this.i.Y[b[1]];this.get=
this.SE;this.Ue.Ww(this.object);this.la instanceof Ob?this.Ue.yr():this.Ue.parent&&this.Ue.parent.yr();break;case 10:this.index=b[1];a.type.Ua?(this.get=this.NE,this.Rf=!0):this.get=this.OE;break;case 11:this.vo=b[1];this.Pj=null;this.get=this.KE;break;case 2:case 12:this.Mx=b[1];this.get=this.IE;break;case 13:for(this.get=this.TE,this.Dk=[],this.uo=[],c=1,d=b.length;c<d;c++)e=new Pb(this.la,b[c]),this.Dk.push(e),this.uo.push(0)}}function n(a,b,c){this.sheet=a;this.parent=b;this.i=a.i;this.Jb=[];
this.name=c[1];this.Ot=c[3];this.kn=!!c[4];this.jq=!!c[5];this.Pa=c[6];this.i.Yl[this.Pa.toString()]=this;this.data=this.Ot;this.parent?(this.ik=this.kn||this.jq?-1:this.i.NG++,this.i.NC.push(this)):(this.ik=-1,this.i.MC.push(this))}function k(a,b,c){this.sheet=a;this.parent=b;this.i=a.i;this.Jb=[];this.$m=null;this.aF=c[1];this.xd=!0}function r(){this.vA=[];this.reset(null)}var q=[];d.prototype.toString=function(){return this.name};d.prototype.gy=function(a,b,c){switch(a[0]){case 0:a=new Rb(this,
b,a);if(a.pg)for(c.push(a),c=0,b=a.Zc.length;c<b;c++)a.Zc[c].trigger&&this.hy(a,c);else a.wy()?this.hy(a,0):c.push(a);break;case 1:a=new Jb(this,b,a);c.push(a);break;case 2:a=new Sb(this,b,a),c.push(a)}};d.prototype.rc=function(){var a,b;a=0;for(b=this.Ki.length;a<b;a++)this.Ki[a].rc(a<b-1&&this.Ki[a+1].lq)};d.prototype.NA=function(){this.Vs.length=0;this.Fs.length=0;this.Vw(this);this.Fs.length=0};d.prototype.Vw=function(a){var b,c,d,e,g=a.Vs,f=a.Fs,h=this.cy.wg();b=0;for(c=h.length;b<c;++b)d=h[b],
e=d.$m,!d.xd||a===e||-1<f.indexOf(e)||(f.push(e),e.Vw(a),g.push(e))};d.prototype.Gc=function(a){this.i.KI||(this.It=!0,a||(this.i.Vt=!0));var b,c;b=0;for(c=this.Ki.length;b<c;b++){var d=this.Ki[b];d.Gc();this.i.Ls(d.Jb);this.i.Mi&&this.i.ud()}a||(this.i.Vt=!1)};d.prototype.hy=function(a,b){a.pg||this.i.Qr.push(a);var c,d,e=a.Zc[b],g;g=e.type?e.type.name:"system";var f=(c=e.Kx)?this.Lx:this.EA;f[g]||(f[g]=[]);g=f[g];f=e.od;if(c){if(e.Ha.length&&(e=e.Ha[0],1===e.type&&2===e.Ng.type)){e=e.Ng.value.toLowerCase();
c=0;for(d=g.length;c<d;c++)if(g[c].method==f){c=g[c].Nm;c[e]?c[e].push([a,b]):c[e]=[[a,b]];return}c={};c[e]=[[a,b]];g.push({method:f,Nm:c})}}else{c=0;for(d=g.length;c<d;c++)if(g[c].method==f){g[c].Nm.push([a,b]);return}gc&&f===gc.prototype.W.Qk?g.unshift({method:f,Nm:[[a,b]]}):g.push({method:f,Nm:[[a,b]]})}};wb=d;e.prototype.Ht=function(){return this.Ab?this.type.B.length:this.B.length};e.prototype.wf=function(){return this.Ab?this.type.B:this.B};e.prototype.Yn=function(a){a&&(a.i.zd().Be.pg?(this.Ab&&
(this.B.length=0,xa(this.hb,a.type.B),this.Ab=!1),a=this.hb.indexOf(a),-1!==a&&(this.B.push(this.hb[a]),this.hb.splice(a,1))):(this.Ab=!1,this.B.length=1,this.B[0]=a))};fb=e;window._c2hh_="";f.prototype.rc=function(a){var c,d=this.parent;if(this.group)for(this.Mr=!0;d;){if(!d.group){this.Mr=!1;break}d=d.parent}this.Mv=!this.wy()&&(!this.parent||this.parent.group&&this.parent.Mr);this.by=!!a;this.jj=this.Jb.slice(0);for(d=this.parent;d;){a=0;for(c=d.Jb.length;a<c;a++)this.JC(d.Jb[a]);d=d.parent}this.Jb=
b(this.Jb);this.jj=b(this.jj);a=0;for(c=this.Zc.length;a<c;a++)this.Zc[a].rc();a=0;for(c=this.Xf.length;a<c;a++)this.Xf[a].rc();a=0;for(c=this.Pf.length;a<c;a++)this.Pf[a].rc(a<c-1&&this.Pf[a+1].lq)};f.prototype.Ww=function(a){h(a,this.Jb)};f.prototype.JC=function(a){h(a,this.jj)};f.prototype.yr=function(){this.qA=!0;this.parent&&this.parent.yr()};f.prototype.wy=function(){return this.Zc.length?this.Zc[0].trigger:!1};f.prototype.Gc=function(){var a,b=!1,c,d=this.i,e=this.i.zd();e.Be=this;var g=this.Zc;
this.lq||(e.bt=!1);if(this.pg){0===g.length&&(b=!0);e.Nc=0;for(a=g.length;e.Nc<a;e.Nc++)g[e.Nc].trigger||(c=g[e.Nc].Gc())&&(b=!0);(e.dk=b)&&this.rr()}else{e.Nc=0;for(a=g.length;e.Nc<a;e.Nc++)if(c=g[e.Nc].Gc(),!c){e.dk=!1;this.Mv&&d.Mi&&d.ud();return}e.dk=!0;this.rr()}this.ND(e)};f.prototype.ND=function(a){a.dk&&this.by&&(a.bt=!0);this.Mv&&this.i.Mi&&this.i.ud()};f.prototype.AG=function(a){this.i.zd().Be=this;this.Zc[a].Gc()&&(this.rr(),this.i.zd().dk=!0)};f.prototype.rr=function(){var a=this.i.zd(),
b;a.ve=0;for(b=this.Xf.length;a.ve<b;a.ve++)if(this.Xf[a.ve].Gc())return;this.dA()};f.prototype.xG=function(){var a=this.i.zd(),b;for(b=this.Xf.length;a.ve<b;a.ve++)if(this.Xf[a.ve].Gc())return;this.dA()};f.prototype.dA=function(){if(this.Pf.length){var a,b,c,d,e=this.Pf.length-1;this.i.ir(this);if(this.qA)for(a=0,b=this.Pf.length;a<b;a++)c=this.Pf[a],(d=!this.Mr||!this.group&&a<e)&&this.i.hr(c.Jb),c.Gc(),d?this.i.wk(c.Jb):this.i.Ls(c.Jb);else for(a=0,b=this.Pf.length;a<b;a++)this.Pf[a].Gc();this.i.cr()}};
f.prototype.BG=function(){var a=this.i.zd();a.Be=this;var b=!1,c;a.Nc=0;for(c=this.Zc.length;a.Nc<c;a.Nc++)if(this.Zc[a.Nc].Gc())b=!0;else if(!this.pg)return!1;return this.pg?b:!0};f.prototype.yG=function(){this.i.Ip++;var a=this.i.zd().Nc,b=this.i.ir(this);if(!this.pg)for(b.Nc=a+1,a=this.Zc.length;b.Nc<a;b.Nc++)if(!this.Zc[b.Nc].Gc()){this.i.cr();return}this.rr();this.i.cr()};f.prototype.iF=function(a){var b=a.index;if(0===b)return!0;for(--b;0<=b;--b)if(this.Zc[b].type===a.type)return!1;return!0};
Rb=f;g.prototype.rc=function(){var a,b,c;a=0;for(b=this.Ha.length;a<b;a++)c=this.Ha[a],c.rc(),c.Rf&&(this.Bm=!0)};g.prototype.DG=function(){return!0};g.prototype.uv=function(){var a,b;a=0;for(b=this.Ha.length;a<b;a++)this.zb[a]=this.Ha[a].get();return Na(this.od.apply(this.i.oh,this.zb),this.St)};g.prototype.CG=function(){var a,b;a=0;for(b=this.Ha.length;a<b;a++)this.zb[a]=this.Ha[a].get();a=this.od.apply(this.Fj?this.Fj:this.type,this.zb);this.type.ag();return a};g.prototype.tv=function(){var a,
b,c,d,e,g,f,h,k=this.type,l=k.pb(),m=this.Ue.pg&&!this.trigger;b=0;var n=k.gg,q=k.Ua,r=k.Nh,s=this.of,t=-1<s,N=this.Bm,J=this.Ha,L=this.zb,ca=this.St,P=this.od,U;if(N)for(b=0,e=J.length;b<e;++b)g=J[b],g.Rf||(L[b]=g.get(0));else for(b=0,e=J.length;b<e;++b)L[b]=J[b].get(0);if(l.Ab){l.B.length=0;l.hb.length=0;U=k.B;a=0;for(d=U.length;a<d;++a){h=U[a];if(N)for(b=0,e=J.length;b<e;++b)g=J[b],g.Rf&&(L[b]=g.get(a));t?(b=0,q&&(b=h.type.cl[r]),b=P.apply(h.Ea[s+b],L)):b=P.apply(h,L);(f=Na(b,ca))?l.B.push(h):
m&&l.hb.push(h)}k.finish&&k.finish(!0);l.Ab=!1;k.ag();return l.Ht()}c=0;U=(f=m&&!this.Ue.iF(this))?l.hb:l.B;var V=!1;a=0;for(d=U.length;a<d;++a){h=U[a];if(N)for(b=0,e=J.length;b<e;++b)g=J[b],g.Rf&&(L[b]=g.get(a));t?(b=0,q&&(b=h.type.cl[r]),b=P.apply(h.Ea[s+b],L)):b=P.apply(h,L);if(Na(b,ca))if(V=!0,f){if(l.B.push(h),n)for(b=0,e=h.siblings.length;b<e;b++)g=h.siblings[b],g.type.pb().B.push(g)}else{U[c]=h;if(n)for(b=0,e=h.siblings.length;b<e;b++)g=h.siblings[b],g.type.pb().B[c]=g;c++}else if(f){U[c]=
h;if(n)for(b=0,e=h.siblings.length;b<e;b++)g=h.siblings[b],g.type.pb().hb[c]=g;c++}else if(m&&(l.hb.push(h),n))for(b=0,e=h.siblings.length;b<e;b++)g=h.siblings[b],g.type.pb().hb.push(g)}U.length=c;if(n)for(q=k.ze,a=0,d=q.length;a<d;a++)h=q[a].pb(),f?h.hb.length=c:h.B.length=c;c=V;if(f&&!V)for(a=0,d=l.B.length;a<d;a++){h=l.B[a];if(N)for(b=0,e=J.length;b<e;b++)g=J[b],g.Rf&&(L[b]=g.get(a));b=t?P.apply(h.Ea[s],L):P.apply(h,L);if(Na(b,ca)){V=!0;break}}k.finish&&k.finish(c||m);return m?V:l.Ht()};Nb=g;m.prototype.rc=
function(){var a,b,c;a=0;for(b=this.Ha.length;a<b;a++)c=this.Ha[a],c.rc(),c.Rf&&(this.Bm=!0)};m.prototype.uv=function(){var a,b;a=0;for(b=this.Ha.length;a<b;a++)this.zb[a]=this.Ha[a].get();return this.od.apply(this.i.oh,this.zb)};m.prototype.tv=function(){var a=this.type.pb().wf(),b=this.type.Ua,c=this.type.Nh,d=this.of,e=-1<d,g=this.Bm,f=this.Ha,h=this.zb,k=this.od,l,m,n,q,r,s;if(g)for(m=0,q=f.length;m<q;++m)r=f[m],r.Rf||(h[m]=r.get(0));else for(m=0,q=f.length;m<q;++m)h[m]=f[m].get(0);l=0;for(n=
a.length;l<n;++l){s=a[l];if(g)for(m=0,q=f.length;m<q;++m)r=f[m],r.Rf&&(h[m]=r.get(l));e?(m=0,b&&(m=s.type.cl[c]),k.apply(s.Ea[d+m],h)):k.apply(s,h)}return!1};Ob=m;var s=[],t=-1;l.prototype.rc=function(){var a,b;if(11===this.type)this.Pj=this.i.Ux(this.vo,this.Ue.parent);else if(13===this.type)for(a=0,b=this.Dk.length;a<b;a++)this.Dk[a].rc();this.Ng&&this.Ng.rc()};l.prototype.TF=function(a){this.Rf||!a||a.Ec.Cr||(this.Rf=!0)};l.prototype.iA=function(){this.Rf=!0};l.prototype.Rc=function(){t++;s.length===
t&&s.push(new Tb);return s[t]};l.prototype.Fc=function(){t--};l.prototype.LE=function(a){this.kj=a||0;a=this.Rc();this.Ng.get(a);this.Fc();return a.data};l.prototype.ME=function(a){this.kj=a||0;a=this.Rc();this.Ng.get(a);this.Fc();return v(a.data)?a.data:""};l.prototype.SE=function(){return this.object};l.prototype.JE=function(){return this.yx};l.prototype.QE=function(a){this.kj=a||0;a=this.Rc();this.Ng.get(a);this.Fc();return a.dd()?this.i.Um(a.data):this.i.At(a.data)};l.prototype.RE=function(){return this.yb};
l.prototype.PE=function(){return this.key};l.prototype.OE=function(){return this.index};l.prototype.NE=function(a){a=a||0;var b=this.la.type,c=null,c=b.pb(),d=c.wf();if(d.length)c=d[a%d.length].type;else if(c.hb.length)c=c.hb[a%c.hb.length].type;else if(b.B.length)c=b.B[a%b.B.length].type;else return 0;return this.index+c.Jp[b.Nh]};l.prototype.KE=function(){return this.Pj};l.prototype.IE=function(){return this.Mx};l.prototype.TE=function(){var a,b;a=0;for(b=this.Dk.length;a<b;a++)this.uo[a]=this.Dk[a].get();
return this.uo};Pb=l;n.prototype.rc=function(){this.Jb=b(this.Jb)};n.prototype.LG=function(a){var b=this.i.Tx();this.parent&&!this.kn&&b?(this.ik>=b.length&&(b.length=this.ik+1),b[this.ik]=a):this.data=a};n.prototype.HE=function(){var a=this.i.Tx();return!this.parent||this.kn||!a||this.jq?this.data:this.ik>=a.length||"undefined"===typeof a[this.ik]?this.Ot:a[this.ik]};n.prototype.Gc=function(){!this.parent||this.kn||this.jq||this.LG(this.Ot)};Jb=n;k.prototype.toString=function(){return"include:"+
this.$m.toString()};k.prototype.rc=function(){this.$m=this.i.et[this.aF];this.sheet.cy.add(this);this.Jb=b(this.Jb);for(var a=this.parent;a;)a.group&&a.zx.push(this),a=a.parent;this.$G()};k.prototype.Gc=function(){this.parent&&this.i.bo(this.i.Y);this.$m.It||this.$m.Gc(!0);this.parent&&this.i.wk(this.i.Y)};k.prototype.$G=function(){for(var a=this.parent;a;){if(a.group&&!a.aq){this.xd=!1;return}a=a.parent}this.xd=!0};Sb=k;r.prototype.reset=function(a){this.Be=a;this.ve=this.Nc=0;this.vA.length=0;this.bt=
this.dk=!1};Ib=r})();
(function(){function a(a,c){this.la=a;this.i=a.i;this.type=c[0];this.get=[this.$D,this.WD,this.hE,this.kE,this.QD,this.iE,this.dE,this.TD,this.cE,this.gE,this.RD,this.fE,this.UD,this.eE,this.aE,this.bE,this.XD,this.YD,this.SD,this.jE,this.Ix,this.ZD,this.Ix,this.VD][this.type];var e=null;this.ie=this.Ha=this.zb=this.od=this.Jr=this.jd=this.first=this.value=null;this.of=-1;this.Rh=null;this.Vv=-1;this.Pj=this.vo=null;this.fo=!1;switch(this.type){case 0:case 1:case 2:this.value=c[1];break;case 3:this.first=
new Qb(a,c[1]);break;case 18:this.first=new Qb(a,c[1]);this.jd=new Qb(a,c[2]);this.Jr=new Qb(a,c[3]);break;case 19:this.od=this.i.xi(c[1]);this.od!==B.prototype.Ce.random&&this.od!==B.prototype.Ce.bD||this.la.iA();this.zb=[];this.Ha=[];3===c.length?(e=c[2],this.zb.length=e.length+1):this.zb.length=1;break;case 20:this.ie=this.i.Y[c[1]];this.of=-1;this.od=this.i.xi(c[2]);this.fo=c[3];Wb.Function&&this.od===Wb.Function.prototype.Ce.tH&&this.la.iA();this.Rh=c[4]?new Qb(a,c[4]):null;this.zb=[];this.Ha=
[];6===c.length?(e=c[5],this.zb.length=e.length+1):this.zb.length=1;break;case 21:this.ie=this.i.Y[c[1]];this.fo=c[2];this.Rh=c[3]?new Qb(a,c[3]):null;this.Vv=c[4];break;case 22:this.ie=this.i.Y[c[1]];this.ie.Vp(c[2]);this.of=this.ie.ut(c[2]);this.od=this.i.xi(c[3]);this.fo=c[4];this.Rh=c[5]?new Qb(a,c[5]):null;this.zb=[];this.Ha=[];7===c.length?(e=c[6],this.zb.length=e.length+1):this.zb.length=1;break;case 23:this.vo=c[1],this.Pj=null}this.la.TF(this.ie);4<=this.type&&17>=this.type&&(this.first=
new Qb(a,c[1]),this.jd=new Qb(a,c[2]));if(e){var f,h;f=0;for(h=e.length;f<h;f++)this.Ha.push(new Qb(a,e[f]))}}function c(a,c){this.type=a||Ub.Pk;this.data=c||0;this.Jl=null;this.type==Ub.Pk&&(this.data=Math.floor(this.data))}a.prototype.rc=function(){23===this.type&&(this.Pj=this.la.i.Ux(this.vo,this.la.Ue.parent));this.first&&this.first.rc();this.jd&&this.jd.rc();this.Jr&&this.Jr.rc();this.Rh&&this.Rh.rc();if(this.Ha){var a,c;a=0;for(c=this.Ha.length;a<c;a++)this.Ha[a].rc()}};a.prototype.jE=function(a){this.zb[0]=
a;a=this.la.Rc();var c,e;c=0;for(e=this.Ha.length;c<e;c++)this.Ha[c].get(a),this.zb[c+1]=a.data;this.la.Fc();this.od.apply(this.i.oh,this.zb)};a.prototype.Ix=function(a){var c=this.ie.pb(),e=c.wf();if(!e.length)if(c.hb.length)e=c.hb;else{this.fo?a.Ne(""):a.Bb(0);return}this.zb[0]=a;a.Jl=this.ie;a=this.la.Rc();var f,c=0;for(f=this.Ha.length;c<f;c++)this.Ha[c].get(a),this.zb[c+1]=a.data;c=this.la.kj;this.Rh&&(this.Rh.get(a),a.dd()&&(c=a.data,e=this.ie.B));this.la.Fc();c%=e.length;0>c&&(c+=e.length);
e=e[c];-1<this.of?(a=0,this.ie.Ua&&(a=e.type.cl[this.ie.Nh]),this.od.apply(e.Ea[this.of+a],this.zb)):this.od.apply(e,this.zb)};a.prototype.ZD=function(a){var c=this.ie.pb(),e=c.wf();if(!e.length)if(c.hb.length)e=c.hb;else{this.fo?a.Ne(""):a.Bb(0);return}c=this.la.kj;if(this.Rh){var f=this.la.Rc();this.Rh.get(f);if(f.dd()){c=f.data;e=this.ie.B;c%=e.length;0>c&&(c+=e.length);e=e[c].Qc[this.Vv];v(e)?a.Ne(e):a.na(e);this.la.Fc();return}this.la.Fc()}c%=e.length;0>c&&(c+=e.length);e=e[c];c=0;this.ie.Ua&&
(c=e.type.Jp[this.ie.Nh]);e=e.Qc[this.Vv+c];v(e)?a.Ne(e):a.na(e)};a.prototype.$D=function(a){a.type=Ub.Pk;a.data=this.value};a.prototype.WD=function(a){a.type=Ub.Kk;a.data=this.value};a.prototype.hE=function(a){a.type=Ub.String;a.data=this.value};a.prototype.kE=function(a){this.first.get(a);a.dd()&&(a.data=-a.data)};a.prototype.QD=function(a){this.first.get(a);var c=this.la.Rc();this.jd.get(c);a.dd()&&c.dd()&&(a.data+=c.data,c.ml()&&a.Dl());this.la.Fc()};a.prototype.iE=function(a){this.first.get(a);
var c=this.la.Rc();this.jd.get(c);a.dd()&&c.dd()&&(a.data-=c.data,c.ml()&&a.Dl());this.la.Fc()};a.prototype.dE=function(a){this.first.get(a);var c=this.la.Rc();this.jd.get(c);a.dd()&&c.dd()&&(a.data*=c.data,c.ml()&&a.Dl());this.la.Fc()};a.prototype.TD=function(a){this.first.get(a);var c=this.la.Rc();this.jd.get(c);a.dd()&&c.dd()&&(a.data/=c.data,a.Dl());this.la.Fc()};a.prototype.cE=function(a){this.first.get(a);var c=this.la.Rc();this.jd.get(c);a.dd()&&c.dd()&&(a.data%=c.data,c.ml()&&a.Dl());this.la.Fc()};
a.prototype.gE=function(a){this.first.get(a);var c=this.la.Rc();this.jd.get(c);a.dd()&&c.dd()&&(a.data=Math.pow(a.data,c.data),c.ml()&&a.Dl());this.la.Fc()};a.prototype.RD=function(a){this.first.get(a);var c=this.la.Rc();this.jd.get(c);a.dd()?c.mq()?a.Ne(a.data.toString()+c.data):a.data&&c.data?a.Bb(1):a.Bb(0):a.mq()&&(a.data=c.mq()?a.data+c.data:a.data+(Math.round(1E10*c.data)/1E10).toString());this.la.Fc()};a.prototype.fE=function(a){this.first.get(a);var c=this.la.Rc();this.jd.get(c);a.dd()&&c.dd()&&
(a.data||c.data?a.Bb(1):a.Bb(0));this.la.Fc()};a.prototype.SD=function(a){this.first.get(a);a.data?this.jd.get(a):this.Jr.get(a)};a.prototype.UD=function(a){this.first.get(a);var c=this.la.Rc();this.jd.get(c);a.Bb(a.data===c.data?1:0);this.la.Fc()};a.prototype.eE=function(a){this.first.get(a);var c=this.la.Rc();this.jd.get(c);a.Bb(a.data!==c.data?1:0);this.la.Fc()};a.prototype.aE=function(a){this.first.get(a);var c=this.la.Rc();this.jd.get(c);a.Bb(a.data<c.data?1:0);this.la.Fc()};a.prototype.bE=function(a){this.first.get(a);
var c=this.la.Rc();this.jd.get(c);a.Bb(a.data<=c.data?1:0);this.la.Fc()};a.prototype.XD=function(a){this.first.get(a);var c=this.la.Rc();this.jd.get(c);a.Bb(a.data>c.data?1:0);this.la.Fc()};a.prototype.YD=function(a){this.first.get(a);var c=this.la.Rc();this.jd.get(c);a.Bb(a.data>=c.data?1:0);this.la.Fc()};a.prototype.VD=function(a){var c=this.Pj.HE();ha(c)?a.na(c):a.Ne(c)};Qb=a;c.prototype.ml=function(){return this.type===Ub.Kk};c.prototype.dd=function(){return this.type===Ub.Pk||this.type===Ub.Kk};
c.prototype.mq=function(){return this.type===Ub.String};c.prototype.Dl=function(){this.ml()||(this.mq()&&(this.data=parseFloat(this.data)),this.type=Ub.Kk)};c.prototype.Bb=function(a){this.type=Ub.Pk;this.data=Math.floor(a)};c.prototype.na=function(a){this.type=Ub.Kk;this.data=a};c.prototype.Ne=function(a){this.type=Ub.String;this.data=a};c.prototype.MG=function(a){ha(a)?(this.type=Ub.Kk,this.data=a):v(a)?(this.type=Ub.String,this.data=a.toString()):(this.type=Ub.Pk,this.data=0)};Tb=c;Ub={Pk:0,Kk:1,
String:2}})();function B(a){this.i=a;this.pe=[]}
B.prototype.Fd=function(){var a={},c,b,d,e,f,h,g,m;a.waits=[];var l=a.waits,n;c=0;for(b=this.pe.length;c<b;c++){h=this.pe[c];n={t:h.time,st:h.pA,s:h.Ev,ev:h.$k.Pa,sm:[],sols:{}};h.$k.Xf[h.ve]&&(n.act=h.$k.Xf[h.ve].Pa);d=0;for(e=h.Jb.length;d<e;d++)n.sm.push(h.Jb[d].Pa);for(f in h.Wd)if(h.Wd.hasOwnProperty(f)){g=this.i.Y[parseInt(f,10)];m={sa:h.Wd[f].sr,insts:[]};d=0;for(e=h.Wd[f].Sh.length;d<e;d++)m.insts.push(h.Wd[f].Sh[d].uid);n.sols[g.Pa.toString()]=m}l.push(n)}return a};
B.prototype.fe=function(a){a=a.waits;var c,b,d,e,f,h,g,m,l,n,k;c=this.pe.length=0;for(b=a.length;c<b;c++)if(h=a[c],m=this.i.jx[h.ev.toString()]){l=-1;d=0;for(e=m.Xf.length;d<e;d++)if(m.Xf[d].Pa===h.act){l=d;break}if(-1!==l){g={Wd:{},Jb:[],Ys:!1};g.time=h.t;g.pA=h.st||"";g.Ev=!!h.s;g.$k=m;g.ve=l;d=0;for(e=h.sm.length;d<e;d++)(m=this.i.fl(h.sm[d]))&&g.Jb.push(m);for(f in h.sols)if(h.sols.hasOwnProperty(f)&&(m=this.i.fl(parseInt(f,10)))){l=h.sols[f];n={sr:l.sa,Sh:[]};d=0;for(e=l.insts.length;d<e;d++)(k=
this.i.Qh(l.insts[d]))&&n.Sh.push(k);g.Wd[m.index.toString()]=n}this.pe.push(g)}}};
(function(){function a(){}function c(){}function b(){}var d=B.prototype;a.prototype.uw=function(){return!0};a.prototype.TB=function(){return!0};a.prototype.mB=function(){var a=this.i.zd();return a.bt?!1:!a.dk};a.prototype.vw=function(){return!0};a.prototype.HB=function(){return!0};a.prototype.rs=function(){return!0};a.prototype.UB=function(){return!0};a.prototype.qs=function(){return!0};a.prototype.bB=function(a,b,c){return Ha(x(a),x(c))<=x(b)};a.prototype.vB=function(a,b){return Ja(x(a),x(b))};a.prototype.uB=
function(a,b,c){a=Fa(a);b=Fa(b);c=Fa(c);return Ja(c,b)?Ja(a,b)&&!Ja(a,c):!(!Ja(a,b)&&Ja(a,c))};d.W=new a;c.prototype.tB=function(a){this.i.ln||this.i.Gm||(this.i.Gm=a)};var e=[],f=[];c.prototype.qC=function(a){if(!(0>a)){var b,c,d,n=this.i.zd(),k;k=e.length?e.pop():{Wd:{},Jb:[]};k.Ys=!1;k.time=this.i.He.mb+a;k.pA="";k.Ev=!1;k.$k=n.Be;k.ve=n.ve+1;a=0;for(b=this.i.Y.length;a<b;a++)d=this.i.Y[a],c=d.pb(),c.Ab&&-1===n.Be.Jb.indexOf(d)||(k.Jb.push(d),d=void 0,d=f.length?f.pop():{Sh:[]},d.sr=!1,d.sr=c.Ab,
xa(d.Sh,c.B),k.Wd[a.toString()]=d);this.pe.push(k);return!0}};d.Lc=new c;b.prototype["int"]=function(a,b){v(b)?(a.Bb(parseInt(b,10)),isNaN(a.data)&&(a.data=0)):a.Bb(b)};b.prototype["float"]=function(a,b){v(b)?(a.na(parseFloat(b)),isNaN(a.data)&&(a.data=0)):a.na(b)};b.prototype.random=function(a,b,c){void 0===c?a.na(Math.random()*b):a.na(Math.random()*(c-b)+b)};b.prototype.sqrt=function(a,b){a.na(Math.sqrt(b))};b.prototype.abs=function(a,b){a.na(Math.abs(b))};b.prototype.round=function(a,b){a.Bb(Math.round(b))};
b.prototype.floor=function(a,b){a.Bb(Math.floor(b))};b.prototype.ceil=function(a,b){a.Bb(Math.ceil(b))};b.prototype.sin=function(a,b){a.na(Math.sin(x(b)))};b.prototype.cos=function(a,b){a.na(Math.cos(x(b)))};b.prototype.tan=function(a,b){a.na(Math.tan(x(b)))};b.prototype.asin=function(a,b){a.na(Ba(Math.asin(b)))};b.prototype.acos=function(a,b){a.na(Ba(Math.acos(b)))};b.prototype.atan=function(a,b){a.na(Ba(Math.atan(b)))};b.prototype.exp=function(a,b){a.na(Math.exp(b))};b.prototype.log10=function(a,
b){a.na(Math.log(b)/Math.LN10)};b.prototype.max=function(a){var b=arguments[1];"number"!==typeof b&&(b=0);var c,d,e;c=2;for(d=arguments.length;c<d;c++)e=arguments[c],"number"===typeof e&&b<e&&(b=e);a.na(b)};b.prototype.min=function(a){var b=arguments[1];"number"!==typeof b&&(b=0);var c,d,e;c=2;for(d=arguments.length;c<d;c++)e=arguments[c],"number"===typeof e&&b>e&&(b=e);a.na(b)};b.prototype.Fa=function(a){a.na(this.i.Fa)};b.prototype.ni=function(a){a.na(this.i.ni)};b.prototype.time=function(a){a.na(this.i.He.mb)};
b.prototype.hf=function(a){a.Bb(this.i.hf)};b.prototype.Wq=function(a){a.Bb(this.i.Wq)};b.prototype.ot=function(a){a.Bb(this.i.ot)};b.prototype.Kh=function(a,b,c,d,e){a.na(La(b,c,d,e))};b.prototype.M=function(a,b,c,d,e){a.na(Ba(Ga(b,c,d,e)))};b.prototype.find=function(a,b,c){v(b)&&v(c)?a.Bb(b.search(new RegExp(Va(c),"i"))):a.Bb(-1)};b.prototype.left=function(a,b,c){a.Ne(v(b)?b.substr(0,c):"")};b.prototype.right=function(a,b,c){a.Ne(v(b)?b.substr(b.length-c):"")};b.prototype.replace=function(a,b,c,
d){v(b)&&v(c)&&v(d)?a.Ne(b.replace(new RegExp(Va(c),"gi"),d)):a.Ne(v(b)?b:"")};b.prototype.trim=function(a,b){a.Ne(v(b)?b.trim():"")};b.prototype.bD=function(a){var b=pa(Math.random()*(arguments.length-1));a.MG(arguments[b+1])};b.prototype.Qs=function(a){a.na(this.i.Qs/1E3)};b.prototype.Cq=function(a){a.na(this.i.Cq)};d.Ce=new b;d.zG=function(){var a,b,c,d,n,k,r=this.i.zd();a=0;for(c=this.pe.length;a<c;a++){d=this.pe[a];if(-1===d.time){if(!d.Ev)continue}else if(d.time>this.i.He.mb)continue;r.Be=d.$k;
r.ve=d.ve;r.Nc=0;for(b in d.Wd)d.Wd.hasOwnProperty(b)&&(n=this.i.Y[parseInt(b,10)].pb(),k=d.Wd[b],n.Ab=k.sr,xa(n.B,k.Sh),n=k,n.Sh.length=0,f.push(n));d.$k.xG();this.i.Ls(d.Jb);d.Ys=!0}b=a=0;for(c=this.pe.length;a<c;a++)d=this.pe[a],this.pe[b]=d,d.Ys?(Pa(d.Wd),d.Jb.length=0,e.push(d)):b++;this.pe.length=b}})();
(function(){eb=function(a,b){var d=a[1],e=a[3],f=a[4],h=a[5],g=a[6],m=a[7],l=a[8];b.W||(b.W={});b.Lc||(b.Lc={});b.Ce||(b.Ce={});var n=b.W,k=b.Lc,r=b.Ce;e&&(n.yH=function(a,b){return Vb(this.x,a,b)},n.zH=function(a,b){return Vb(this.y,a,b)},n.FH=function(){var a=this.H;this.nb();var b=this.$b;return!(b.right<a.Tc||b.bottom<a.Uc||b.left>a.sd||b.top>a.rd)},n.wB=function(){this.nb();var a=this.$b,b=this.i.Ib;return 0>a.right||0>a.bottom||a.left>b.width||a.top>b.height},n.UH=function(a,b,c){var d=this.pb(),
e=d.wf();if(!e.length)return!1;var g=e[0],f=g,k=La(g.x,g.y,b,c),h,l,m;h=1;for(l=e.length;h<l;h++)if(g=e[h],m=La(g.x,g.y,b,c),0===a&&m<k||1===a&&m>k)k=m,f=g;d.Yn(f);return!0},k.nI=function(a){this.x!==a&&(this.x=a,this.ea())},k.oI=function(a){this.y!==a&&(this.y=a,this.ea())},k.jI=function(a,b){if(this.x!==a||this.y!==b)this.x=a,this.y=b,this.ea()},k.kI=function(a,b){var c=a.CE(this);if(c){var d;c.Qg?(d=c.Qg(b,!0),c=c.Qg(b,!1)):(d=c.x,c=c.y);if(this.x!==d||this.y!==c)this.x=d,this.y=c,this.ea()}},
k.MH=function(a){0!==a&&(this.x+=Math.cos(this.M)*a,this.y+=Math.sin(this.M)*a,this.ea())},k.LH=function(a,b){0!==b&&(this.x+=Math.cos(x(a))*b,this.y+=Math.sin(x(a))*b,this.ea())},r.uC=function(a){a.na(this.x)},r.vC=function(a){a.na(this.y)},r.Fa=function(a){a.na(this.i.Tm(this))});f&&(n.xH=function(a,b){return Vb(this.width,a,b)},n.uH=function(a,b){return Vb(this.height,a,b)},k.gC=function(a){this.width!==a&&(this.width=a,this.ea())},k.gI=function(a){this.height!==a&&(this.height=a,this.ea())},k.lI=
function(a,b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.ea()},r.tI=function(a){a.na(this.width)},r.BH=function(a){a.na(this.height)},r.qH=function(a){this.nb();a.na(this.$b.left)},r.sH=function(a){this.nb();a.na(this.$b.top)},r.rH=function(a){this.nb();a.na(this.$b.right)},r.pH=function(a){this.nb();a.na(this.$b.bottom)});h&&(n.bB=function(a,b){return Ha(this.M,x(b))<=x(a)},n.vB=function(a){return Ja(this.M,x(a))},n.uB=function(a,b){var c=Fa(a),d=Fa(b),e=Da(this.M);return Ja(d,
c)?Ja(e,c)&&!Ja(e,d):!(!Ja(e,c)&&Ja(e,d))},k.Ro=function(a){a=x(Ca(a));isNaN(a)||this.M===a||(this.M=a,this.ea())},k.$H=function(a){0===a||isNaN(a)||(this.M+=x(a),this.M=Da(this.M),this.ea())},k.aI=function(a){0===a||isNaN(a)||(this.M-=x(a),this.M=Da(this.M),this.ea())},k.bI=function(a,b){var c=Ia(this.M,x(b),x(a));isNaN(c)||this.M===c||(this.M=c,this.ea())},k.cI=function(a,b,c){a=Ia(this.M,Math.atan2(c-this.y,b-this.x),x(a));isNaN(a)||this.M===a||(this.M=a,this.ea())},k.mI=function(a,b){var c=Math.atan2(b-
this.y,a-this.x);isNaN(c)||this.M===c||(this.M=c,this.ea())},r.jH=function(a){a.na(Ea(this.M))});d||(n.vH=function(a,b,c){return Vb(this.Qc[a],b,c)},n.DH=function(a){return this.Qc[a]},n.VH=function(a,b){var c=this.pb(),d=c.wf();if(!d.length)return!1;var e=d[0],g=e,f=e.Qc[b],k,h,l;k=1;for(h=d.length;k<h;k++)if(e=d[k],l=e.Qc[b],0===a&&l<f||1===a&&l>f)f=l,g=e;c.Yn(g);return!0},n.TH=function(a){var b,c,d,e,g;if(this.i.Sx().St){g=this.pb();if(g.Ab)for(g.Ab=!1,g.B.length=0,g.hb.length=0,d=this.B,b=0,c=
d.length;b<c;b++)e=d[b],e.uid===a?g.hb.push(e):g.B.push(e);else{d=b=0;for(c=g.B.length;b<c;b++)e=g.B[b],g.B[d]=e,e.uid===a?g.hb.push(e):d++;g.B.length=d}this.ag();return!!g.B.length}e=this.i.Qh(a);if(!e)return!1;g=this.pb();if(!g.Ab&&-1===g.B.indexOf(e))return!1;if(this.Ua)for(a=e.type.Yb,b=0,c=a.length;b<c;b++){if(a[b]===this)return g.Yn(e),this.ag(),!0}else if(e.type===this)return g.Yn(e),this.ag(),!0;return!1},n.JB=function(){return!0},n.KB=function(){return!0},k.hI=function(a,b){var c=this.Qc;
ha(c[a])?c[a]=ha(b)?b:parseFloat(b):v(c[a])&&(c[a]=v(b)?b:b.toString())},k.iH=function(a,b){var c=this.Qc;ha(c[a])?c[a]=ha(b)?c[a]+b:c[a]+parseFloat(b):v(c[a])&&(c[a]=v(b)?c[a]+b:c[a]+b.toString())},k.pI=function(a,b){var c=this.Qc;ha(c[a])&&(c[a]=ha(b)?c[a]-b:c[a]-parseFloat(b))},k.dI=function(a,b){this.Qc[a]=b?1:0},k.rI=function(a){this.Qc[a]=1-this.Qc[a]},k.Id=function(){this.i.qj(this)},k.yB||(k.yB=function(a){var b,c;try{b=JSON.parse(a)}catch(d){return}this.i.Aq(this,b,!0);this.Yf&&this.Yf();
if(this.Ea)for(a=0,b=this.Ea.length;a<b;++a)c=this.Ea[a],c.Yf&&c.Yf()}),r.AH=function(a){var b=a.Jl.B.length,c,d,e;c=0;for(d=this.i.cg.length;c<d;c++)e=this.i.cg[c],a.Jl.Ua?0<=e.type.Yb.indexOf(a.Jl)&&b++:e.type===a.Jl&&b++;a.Bb(b)},r.XH=function(a){a.Bb(a.Jl.pb().wf().length)},r.sI=function(a){a.Bb(this.uid)},r.CH=function(a){a.Bb(this.Wm())},r.cB||(r.cB=function(a){a.Ne(JSON.stringify(this.i.vv(this,!0)))}));g&&(n.HH=function(){return this.visible},k.fC=function(a){!a!==!this.visible&&(this.visible=
a,this.i.Hb=!0)},n.wH=function(a,b){return Vb(ab(100*this.opacity),a,b)},k.iI=function(a){a/=100;0>a?a=0:1<a&&(a=1);a!==this.opacity&&(this.opacity=a,this.i.Hb=!0)},r.Opacity=function(a){a.na(ab(100*this.opacity))});m&&(n.EH=function(a){return a?this.H===a:!1},n.WH=function(a){var b=this.pb(),c=b.wf();if(!c.length)return!1;var d=c[0],e=d,g,f;g=1;for(f=c.length;g<f;g++)if(d=c[g],0===a){if(d.H.index>e.H.index||d.H.index===e.H.index&&d.xf()>e.xf())e=d}else if(d.H.index<e.H.index||d.H.index===e.H.index&&
d.xf()<e.xf())e=d;b.Yn(e);return!0},k.PH=function(){var a=this.xf();a!==this.H.B.length-1&&(wa(this.H.B,a),this.H.B.push(this),this.i.Hb=!0,this.H.Qe=!0)},k.NH=function(){var a=this.xf();0!==a&&(wa(this.H.B,a),this.H.B.unshift(this),this.i.Hb=!0,this.H.Qe=!0)},k.OH=function(a){a&&a!=this.H&&(wa(this.H.B,this.xf()),this.H.Qe=!0,this.H=a,this.Fk=a.B.length,a.B.push(this),this.i.Hb=!0)},k.vI=function(a,b){var c=0===a;if(b){var d=b.wE(this);if(d&&d.uid!==this.uid){this.H.index!==d.H.index&&(wa(this.H.B,
this.xf()),this.H.Qe=!0,this.H=d.H,this.Fk=d.H.B.length,d.H.B.push(this));var e=this.xf(),d=d.xf();wa(this.H.B,e);e<d&&d--;c&&d++;d===this.H.B.length?this.H.B.push(this):this.H.B.splice(d,0,this);this.H.Qe=!0;this.i.Hb=!0}}},r.JH=function(a){a.Bb(this.H.tz)},r.IH=function(a){a.Ne(this.H.name)},r.uI=function(a){a.Bb(this.xf())});l&&(k.eI=function(a,b){if(this.i.ka){var c=this.type.zt(b);if(!(0>c)){var d=1===a;this.Bi[c]!==d&&(this.Bi[c]=d,this.qi(),this.i.Hb=!0)}}},k.fI=function(a,b,c){if(this.i.ka){var d=
this.type.zt(a);0>d||(a=this.type.Ca[d],d=this.ac[d],b=Math.floor(b),0>b||b>=d.length||(1===this.i.ka.GE(a.qd,b)&&(c/=100),d[b]!==c&&(d[b]=c,a.xd&&(this.i.Hb=!0))))}})};xb=function(){this.Js=this.Hs=!0;this.type.Xo=!0;this.i.Hb=!0;var a,b,d=this.Is;a=0;for(b=d.length;a<b;++a)d[a](this)};Cb=function(a){a&&this.Is.push(a)};Eb=function(){if(this.Hs){var a=this.$b,b=this.ub;a.set(this.x,this.y,this.x+this.width,this.y+this.height);a.offset(-this.Fe*this.width,-this.Ge*this.height);this.M?(a.offset(-this.x,
-this.y),b.kA(a,this.M),b.offset(this.x,this.y),b.kx(a)):b.Ck(a);a.normalize();this.Hs=!1}};var a=new sa(0,0,0,0);Fb=function(){if(this.Js&&this.Ig){this.nb();var c=this.type.pp,b=this.op,d=this.$b;a.set(c.Uo(d.left),c.Vo(d.top),c.Uo(d.right),c.Vo(d.bottom));b.PD(a)||(b.right<b.left?c.update(this,null,a):c.update(this,b,a),b.dD(a),this.Js=!1)}};Db=function(a,b){return this.$b.Ae(a,b)&&this.ub.Ae(a,b)?this.Ba&&!this.Ba.Oi()?(this.Ba.Fi(this.width,this.height,this.M),this.Ba.Ae(a-this.x,b-this.y)):
!0:!1};tb=function(){this.type.Rr();return this.Vj};Gb=function(){this.H.RA();return this.Fk};Hb=function(){this.eb.length=0;var a,b;a=0;for(b=this.Bi.length;a<b;a++)this.Bi[a]&&this.eb.push(this.type.Ca[a]);this.UA=!!this.eb.length};ub=function(){return"Inst"+this.Wz};hb=function(a){if(a&&a.gg&&a.type!=this){var b,d,e;b=0;for(d=a.siblings.length;b<d;b++)if(e=a.siblings[b],e.type==this)return e}a=this.pb().wf();return a.length?a[0]:null};ib=function(a){var b=this.pb().wf();return b.length?b[a.Wm()%
b.length]:null};gb=function(){if(this.Tl&&!this.Ua){var a,b;a=0;for(b=this.B.length;a<b;a++)this.B[a].Vj=a;var d=a,e=this.i.cg;a=0;for(b=e.length;a<b;++a)e[a].type===this&&(e[a].Vj=d++);this.Tl=!1}};rb=function(a){if(a<this.B.length)return this.B[a];a-=this.B.length;var b=this.i.cg,d,e;d=0;for(e=b.length;d<e;++d)if(b[d].type===this){if(0===a)return b[d];--a}return null};jb=function(){return this.lj[this.Jh]};kb=function(){this.Jh++;this.Jh===this.lj.length?this.lj.push(new fb(this)):this.lj[this.Jh].Ab=
!0};lb=function(){this.Jh++;this.Jh===this.lj.length&&this.lj.push(new fb(this));var a=this.lj[this.Jh],b=this.lj[this.Jh-1];b.Ab?a.Ab=!0:(a.Ab=!1,xa(a.B,b.B),xa(a.hb,b.hb))};mb=function(){this.Jh--};nb=function(a){var b,d,e,f,h,g=0;if(!this.Ua)for(b=0,d=this.Yb.length;b<d;b++)for(h=this.Yb[b],e=0,f=h.wc.length;e<f;e++){if(a===h.wc[e].name)return this.da.lastBehIndex=g,h.wc[e];g++}b=0;for(d=this.wc.length;b<d;b++){if(a===this.wc[b].name)return this.da.lastBehIndex=g,this.wc[b];g++}return null};ob=
function(a){return this.Vp(a)?this.da.lastBehIndex:-1};pb=function(a){var b,d;b=0;for(d=this.Ca.length;b<d;b++)if(this.Ca[b].name===a)return b;return-1};qb=function(){if(this.gg&&!this.Ua){var a,b,d,e,f,h,g;this.Rr();h=this.pb();var m=h.Ab,l=(a=this.i.zd())&&a.Be&&a.Be.pg;a=0;for(b=this.ze.length;a<b;a++)if(f=this.ze[a],f!==this&&(f.Rr(),g=f.pb(),g.Ab=m,!m)){g.B.length=h.B.length;d=0;for(e=h.B.length;d<e;d++)g.B[d]=f.Vx(h.B[d].Vj);if(l)for(g.hb.length=h.hb.length,d=0,e=h.hb.length;d<e;d++)g.hb[d]=
f.Vx(h.hb[d].Vj)}}};sb=function(){return"Type"+this.Pa};Vb=function(a,b,d){if("undefined"===typeof a||"undefined"===typeof d)return!1;switch(b){case 0:return a===d;case 1:return a!==d;case 2:return a<d;case 3:return a<=d;case 4:return a>d;case 5:return a>=d;default:return!1}}})();var dc={};function hc(a){this.i=a}
(function(){function a(a){0>a&&(a=0);1<a&&(a=1);return Math.log(a)/Math.log(10)*20}function c(a){a=a.toLowerCase();return aa.hasOwnProperty(a)&&aa[a].length?aa[a][0].Ve():F.destination}function b(){return F.createGain?F.createGain():F.createGainNode()}function d(a){return F.createDelay?F.createDelay(a):F.createDelayNode(a)}function e(a){a.start?a.start(0):a.noteOn(0)}function f(a,b,c){a.start?a.start(0,b):a.noteGrainOn(0,b,c-b)}function h(a){try{a.stop?a.stop(0):a.noteOff(0)}catch(b){}}function g(a,
c,d,e,g,f){this.type="filter";this.ic=[a,c,d,e,g,f];this.Xa=b();this.Aa=b();this.Aa.gain.value=f;this.wa=b();this.wa.gain.value=1-f;this.zc=F.createBiquadFilter();this.zc.type="number"===typeof this.zc.type?a:We[a];this.zc.frequency.value=c;this.zc.detune&&(this.zc.detune.value=d);this.zc.Q.value=e;this.zc.gain.value=g;this.Xa.connect(this.zc);this.Xa.connect(this.wa);this.zc.connect(this.Aa)}function m(a,c,e){this.type="delay";this.ic=[a,c,e];this.Xa=b();this.Aa=b();this.Aa.gain.value=e;this.wa=
b();this.wa.gain.value=1-e;this.Nn=b();this.sf=d(a);this.sf.delayTime.value=a;this.Cp=b();this.Cp.gain.value=c;this.Xa.connect(this.Nn);this.Xa.connect(this.wa);this.Nn.connect(this.Aa);this.Nn.connect(this.sf);this.sf.connect(this.Cp);this.Cp.connect(this.Nn)}function l(a,c,d,e){this.type="convolve";this.ic=[c,d,e];this.Xa=b();this.Aa=b();this.Aa.gain.value=d;this.wa=b();this.wa.gain.value=1-d;this.Jj=F.createConvolver();a&&(this.Jj.normalize=c,this.Jj.buffer=a);this.Xa.connect(this.Jj);this.Xa.connect(this.wa);
this.Jj.connect(this.Aa)}function n(a,c,g,f,k){this.type="flanger";this.ic=[a,c,g,f,k];this.Xa=b();this.wa=b();this.wa.gain.value=1-k/2;this.Aa=b();this.Aa.gain.value=k/2;this.Kp=b();this.Kp.gain.value=f;this.sf=d(a+c);this.sf.delayTime.value=a;this.hd=F.createOscillator();this.hd.frequency.value=g;this.Me=b();this.Me.gain.value=c;this.Xa.connect(this.sf);this.Xa.connect(this.wa);this.sf.connect(this.Aa);this.sf.connect(this.Kp);this.Kp.connect(this.sf);this.hd.connect(this.Me);this.Me.connect(this.sf.delayTime);
e(this.hd)}function k(a,c,d,g,f,k){this.type="phaser";this.ic=[a,c,d,g,f,k];this.Xa=b();this.wa=b();this.wa.gain.value=1-k/2;this.Aa=b();this.Aa.gain.value=k/2;this.zc=F.createBiquadFilter();this.zc.type="number"===typeof this.zc.type?7:"allpass";this.zc.frequency.value=a;this.zc.detune&&(this.zc.detune.value=c);this.zc.Q.value=d;this.hd=F.createOscillator();this.hd.frequency.value=f;this.Me=b();this.Me.gain.value=g;this.Xa.connect(this.zc);this.Xa.connect(this.wa);this.zc.connect(this.Aa);this.hd.connect(this.Me);
this.Me.connect(this.zc.frequency);e(this.hd)}function r(a){this.type="gain";this.ic=[a];this.bb=b();this.bb.gain.value=a}function q(a,c){this.type="tremolo";this.ic=[a,c];this.bb=b();this.bb.gain.value=1-c/2;this.hd=F.createOscillator();this.hd.frequency.value=a;this.Me=b();this.Me.gain.value=c/2;this.hd.connect(this.Me);this.Me.connect(this.bb.gain);e(this.hd)}function s(a,c){this.type="ringmod";this.ic=[a,c];this.Xa=b();this.Aa=b();this.Aa.gain.value=c;this.wa=b();this.wa.gain.value=1-c;this.ho=
b();this.ho.gain.value=0;this.hd=F.createOscillator();this.hd.frequency.value=a;this.hd.connect(this.ho.gain);e(this.hd);this.Xa.connect(this.ho);this.Xa.connect(this.wa);this.ho.connect(this.Aa)}function t(a,c,d,e,g){this.type="distortion";this.ic=[a,c,d,e,g];this.Xa=b();this.er=b();this.dr=b();this.HG(d,Math.pow(10,e/20));this.Aa=b();this.Aa.gain.value=g;this.wa=b();this.wa.gain.value=1-g;this.Tr=F.createWaveShaper();this.zp=new Float32Array(65536);this.rE(a,c);this.Tr.zp=this.zp;this.Xa.connect(this.er);
this.Xa.connect(this.wa);this.er.connect(this.Tr);this.Tr.connect(this.dr);this.dr.connect(this.Aa)}function p(a,b,c,d,e){this.type="compressor";this.ic=[a,b,c,d,e];this.bb=F.createDynamicsCompressor();try{this.bb.threshold.value=a,this.bb.knee.value=b,this.bb.ratio.value=c,this.bb.attack.value=d,this.bb.release.value=e}catch(g){}}function y(a,b){this.type="analyser";this.ic=[a,b];this.bb=F.createAnalyser();this.bb.fftSize=a;this.bb.smoothingTimeConstant=b;this.pE=new Float32Array(this.bb.frequencyBinCount);
this.nA=new Uint8Array(a);this.Xn=0}function A(){this.ta=null;this.Bq=0;this.mj=[];this.Tu=this.sq=this.rq=0}function D(a,c){this.src=a;this.Ta=K;this.hg=c;this.Xw=!1;var d=this;this.Ru=this.bv=null;this.Ml=[];this.tr=0;this.Yv=this.it=this.sA=this.Zq=!1;1===K&&c&&(this.Ta=0,this.bv=b());this.Ej=this.ob=null;var e;switch(this.Ta){case 0:this.ob=new Audio;this.ob.addEventListener("canplaythrough",function(){d.Yv=!0});1===K&&F.createMediaElementSource&&!/wiiu/i.test(navigator.userAgent)&&(this.sA=!0,
this.ob.addEventListener("canplay",function(){d.Ru||(d.Ru=F.createMediaElementSource(d.ob),d.Ru.connect(d.bv))}));this.ob.autoplay=!1;this.ob.II="auto";this.ob.src=a;break;case 1:e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";e.onload=function(){d.Ej=e.response;d.jD()};e.onerror=function(){d.it=!0};e.send();break;case 2:this.ob=!0;break;case 3:this.ob=!0}}function w(a,d){var e=this;this.tag=d;this.Oe=this.Og=!0;this.src=a.src;this.buffer=a;this.Ta=K;this.hg=a.hg;this.playbackRate=
1;this.dv=!0;this.Cf=this.li=!1;this.ke=0;this.jn=this.nl=this.Ug=!1;this.volume=1;this.$j=1===P&&!this.hg||2===P;this.Hl=1;this.startTime=this.$j?C.He.mb:C.vh.mb;this.qc=this.Ac=null;this.fh=!1;this.pc=null;this.Hz=this.Gz=this.Fz=this.Ez=this.Jz=this.Iz=0;this.P=null;var g=!1;1!==this.Ta||0!==this.buffer.Ta||this.buffer.sA||(this.Ta=0);switch(this.Ta){case 0:this.hg?(this.P=a.ob,g=!a.Xw,a.Xw=!0):(this.P=new Audio,this.P.autoplay=!1,this.P.src=a.ob.src,g=!0);g&&this.P.addEventListener("ended",function(){M=
e.tag;e.Oe=!0;C.trigger(hc.prototype.W.os,X)});break;case 1:this.Ac=b();this.Ac.connect(c(d));1===this.buffer.Ta?a.ob&&(this.P=F.createBufferSource(),this.P.buffer=a.ob,this.P.connect(this.Ac)):(this.P=this.buffer.ob,this.buffer.bv.connect(this.Ac));break;case 2:this.P=new window.Media(O+this.src,null,null,function(a){a===window.Media.MEDIA_STOPPED&&(e.dv=!0,e.Oe=!0,M=e.tag,C.trigger(hc.prototype.W.os,X))});break;case 3:this.P=!0}}function G(a){Ma.length=0;if(a.length){var b,c,d;b=0;for(c=J.length;b<
c;b++)d=J[b],bb(a,d.tag)&&Ma.push(d)}else L&&!L.Uj()&&(Ma.length=1,Ma[0]=L)}function I(a,b){aa.hasOwnProperty(a)?aa[a].push(b):aa[a]=[b];var c,d,e,g,f=F.destination;if(aa.hasOwnProperty(a)&&(e=aa[a],e.length))for(f=e[0].Ve(),c=0,d=e.length;c<d;c++)g=e[c],c+1===d?g.qf(F.destination):g.qf(e[c+1].Ve());G(a);c=0;for(d=Ma.length;c<d;c++)Ma[c].uG(f);Wa&&Lc===a&&(Wa.disconnect(),Wa.connect(f))}function E(){}function z(){}var H=hc.prototype;H.vc=function(a){this.Ec=a;this.i=a.i};H.vc.prototype.lb=function(){};
var C=null,X=null,M="",O="",K=0,F=null,N=[],J=[],L=null,ca=!1,P=0,U=!1,V=1,ma=0,na=0,Mc=1,Nc=1,ie=10,je=1E4,ke=1,Wa=null,Lc="",yb=!1,zb=[],aa={},We="lowpass highpass bandpass lowshelf highshelf peaking notch allpass".split(" ");g.prototype.qf=function(a){this.Aa.disconnect();this.Aa.connect(a);this.wa.disconnect();this.wa.connect(a)};g.prototype.remove=function(){this.Xa.disconnect();this.zc.disconnect();this.Aa.disconnect();this.wa.disconnect()};g.prototype.Ve=function(){return this.Xa};m.prototype.qf=
function(a){this.Aa.disconnect();this.Aa.connect(a);this.wa.disconnect();this.wa.connect(a)};m.prototype.remove=function(){this.Xa.disconnect();this.Nn.disconnect();this.sf.disconnect();this.Cp.disconnect();this.Aa.disconnect();this.wa.disconnect()};m.prototype.Ve=function(){return this.Xa};l.prototype.qf=function(a){this.Aa.disconnect();this.Aa.connect(a);this.wa.disconnect();this.wa.connect(a)};l.prototype.remove=function(){this.Xa.disconnect();this.Jj.disconnect();this.Aa.disconnect();this.wa.disconnect()};
l.prototype.Ve=function(){return this.Xa};n.prototype.qf=function(a){this.wa.disconnect();this.wa.connect(a);this.Aa.disconnect();this.Aa.connect(a)};n.prototype.remove=function(){this.Xa.disconnect();this.sf.disconnect();this.hd.disconnect();this.Me.disconnect();this.wa.disconnect();this.Aa.disconnect();this.Kp.disconnect()};n.prototype.Ve=function(){return this.Xa};k.prototype.qf=function(a){this.wa.disconnect();this.wa.connect(a);this.Aa.disconnect();this.Aa.connect(a)};k.prototype.remove=function(){this.Xa.disconnect();
this.zc.disconnect();this.hd.disconnect();this.Me.disconnect();this.wa.disconnect();this.Aa.disconnect()};k.prototype.Ve=function(){return this.Xa};r.prototype.qf=function(a){this.bb.disconnect();this.bb.connect(a)};r.prototype.remove=function(){this.bb.disconnect()};r.prototype.Ve=function(){return this.bb};q.prototype.qf=function(a){this.bb.disconnect();this.bb.connect(a)};q.prototype.remove=function(){this.hd.disconnect();this.Me.disconnect();this.bb.disconnect()};q.prototype.Ve=function(){return this.bb};
s.prototype.qf=function(a){this.Aa.disconnect();this.Aa.connect(a);this.wa.disconnect();this.wa.connect(a)};s.prototype.remove=function(){this.hd.disconnect();this.ho.disconnect();this.Xa.disconnect();this.Aa.disconnect();this.wa.disconnect()};s.prototype.Ve=function(){return this.Xa};t.prototype.HG=function(a,b){.01>a&&(a=.01);this.er.gain.value=a;this.dr.gain.value=Math.pow(1/a,.6)*b};t.prototype.shape=function(a,b,c){var d=1.05*c*b-b;c=0>a?-1:1;a=0>a?-a:a;b=a<b?a:b+d*(1-Math.exp(-(1/d)*(a-b)));
return b*c};t.prototype.rE=function(a,b){for(var c=Math.pow(10,a/20),d=Math.pow(10,b/20),e=0,g=0;32768>g;++g)e=g/32768,e=this.shape(e,c,d),this.zp[32768+g]=e,this.zp[32768-g-1]=-e};t.prototype.qf=function(a){this.Aa.disconnect();this.Aa.connect(a);this.wa.disconnect();this.wa.connect(a)};t.prototype.remove=function(){this.Xa.disconnect();this.er.disconnect();this.Tr.disconnect();this.dr.disconnect();this.Aa.disconnect();this.wa.disconnect()};t.prototype.Ve=function(){return this.Xa};p.prototype.qf=
function(a){this.bb.disconnect();this.bb.connect(a)};p.prototype.remove=function(){this.bb.disconnect()};p.prototype.Ve=function(){return this.bb};y.prototype.tc=function(){this.bb.getFloatFrequencyData(this.pE);this.bb.getByteTimeDomainData(this.nA);for(var b=this.bb.fftSize,c=0,d=this.Xn=0,e=0;c<b;c++)e=(this.nA[c]-128)/128,0>e&&(e=-e),this.Xn<e&&(this.Xn=e),d+=e*e;this.Xn=a(this.Xn);a(Math.sqrt(d/b))};y.prototype.qf=function(a){this.bb.disconnect();this.bb.connect(a)};y.prototype.remove=function(){this.bb.disconnect()};
y.prototype.Ve=function(){return this.bb};A.prototype.io=function(a){if(this.ta=a)this.rq=this.ta.x,this.sq=this.ta.y;this.mj.length=0};A.prototype.dq=function(){return!!this.ta};A.prototype.tc=function(a){this.ta&&0!==a&&(this.Tu=Ga(this.rq,this.sq,this.ta.x,this.ta.y),a=La(this.rq,this.sq,this.ta.x,this.ta.y)/a,4>this.mj.length||this.mj.shift(),this.mj.push(a),this.rq=this.ta.x,this.sq=this.ta.y)};A.prototype.Zx=function(){if(!this.mj.length)return 0;var a,b,c=0;a=0;for(b=this.mj.length;a<b;a++)c+=
this.mj[a];return c/this.mj.length};A.prototype.Et=function(){return Math.cos(this.Tu)*this.Zx()};A.prototype.Ft=function(){return Math.sin(this.Tu)*this.Zx()};var le=!1;D.prototype.jD=function(){if(!this.ob&&this.Ej){var a=this;if(F.decodeAudioData)F.decodeAudioData(this.Ej,function(b){a.ob=b;a.Ej=null;var c,d,e;if(ga(a.$q)||U)ga(a.up)||(c=a.up.Jj,c.normalize=a.sz,c.buffer=b);else if(a.Ml.length){c=0;for(d=a.Ml.length;c<d;c++){b=a.Ml[c];e=new w(a,b.BA);e.Av(!0);if("undefined"!==typeof b.uz&&(b.ta=
C.Qh(b.uz),!b.ta))continue;if(b.ta){var g=Ka(b.ta.x,b.ta.y,-b.ta.H.Bc(),ma,na,!0),f=Ka(b.ta.x,b.ta.y,-b.ta.H.Bc(),ma,na,!1);e.zv(g,f,Ba(b.ta.M-b.ta.H.Bc()),b.Jt,b.Uu,b.Xu);e.io(b.ta)}else e.zv(b.x,b.y,b.G,b.Jt,b.Uu,b.Xu);e.play(a.wu,a.Xv,a.tr);a.Zq&&e.pause();J.push(e)}a.Ml.length=0}else e=new w(a,a.$q),e.play(a.wu,a.Xv,a.tr),a.Zq&&e.pause(),J.push(e)},function(){a.it=!0});else if(this.ob=F.createBuffer(this.Ej,!1),this.Ej=null,ga(this.$q)||U)ga(this.up)||(b=this.up.Jj,b.normalize=this.sz,b.buffer=
this.ob);else{var b=new w(this,this.$q);b.play(this.wu,this.Xv,this.tr);this.Zq&&b.pause();J.push(b)}}};D.prototype.my=function(){switch(this.Ta){case 0:var a=4<=this.ob.readyState;a&&(this.Yv=!0);return a||this.Yv;case 1:return!!this.Ej||!!this.ob;case 2:return!0;case 3:return!0}return!1};D.prototype.jF=function(){switch(this.Ta){case 0:return this.my();case 1:return!!this.ob;case 2:return!0;case 3:return!0}return!1};D.prototype.$E=function(){switch(this.Ta){case 0:return!!this.ob.error;case 1:return this.it}return!1};
w.prototype.Uj=function(){var a;switch(this.Ta){case 0:return this.P.ended;case 1:if(1===this.buffer.Ta){if(!this.Og&&!this.Oe&&this.P.loop||this.Cf)return!1;a=this.$j?C.He.mb:C.vh.mb;return a-this.startTime>this.buffer.ob.duration}return this.P.ended;case 2:return this.dv;case 3:!0}return!0};w.prototype.YC=function(){return this.Og||this.Oe?!0:this.Uj()};w.prototype.Av=function(a){1===K&&(!this.fh&&a?this.Ac&&(this.qc||(this.qc=F.createPanner(),this.qc.panningModel="number"===typeof this.qc.panningModel?
Mc:["equalpower","HRTF","soundfield"][Mc],this.qc.distanceModel="number"===typeof this.qc.distanceModel?Nc:["linear","inverse","exponential"][Nc],this.qc.refDistance=ie,this.qc.maxDistance=je,this.qc.rolloffFactor=ke),this.Ac.disconnect(),this.Ac.connect(this.qc),this.qc.connect(c(this.tag)),this.fh=!0):this.fh&&!a&&this.Ac&&(this.qc.disconnect(),this.Ac.disconnect(),this.Ac.connect(c(this.tag)),this.fh=!1))};w.prototype.zv=function(a,b,c,d,e,g){this.fh&&1===K&&(this.qc.setPosition(a,b,0),this.qc.setOrientation(Math.cos(x(c)),
Math.sin(x(c)),0),this.qc.coneInnerAngle=d,this.qc.coneOuterAngle=e,this.qc.coneOuterGain=g,this.Iz=a,this.Jz=b,this.Ez=c,this.Fz=d,this.Gz=e,this.Hz=g)};w.prototype.io=function(a){this.fh&&1===K&&(this.pc||(this.pc=new A),this.pc.io(a))};w.prototype.tc=function(a){if(this.fh&&1===K&&this.pc&&this.pc.dq()&&this.ll()){this.pc.tc(a);a=this.pc.ta;var b=Ka(a.x,a.y,-a.H.Bc(),ma,na,!0),c=Ka(a.x,a.y,-a.H.Bc(),ma,na,!1);this.qc.setPosition(b,c,0);b=0;"undefined"!==typeof this.pc.ta.M&&(b=a.M-a.H.Bc(),this.qc.setOrientation(Math.cos(b),
Math.sin(b),0));b=Ka(this.pc.Et(),this.pc.Ft(),-a.H.Bc(),0,0,!0);c=Ka(this.pc.Et(),this.pc.Ft(),-a.H.Bc(),0,0,!1);this.qc.setVelocity(b,c,0)}};w.prototype.play=function(a,b,c){var d=this.P;this.Ug=a;this.volume=b;c=c||0;switch(this.Ta){case 0:1!==d.playbackRate&&(d.playbackRate=1);d.volume!==b*V&&(d.volume=b*V);d.loop!==a&&(d.loop=a);d.muted&&(d.muted=!1);if(d.currentTime!==c)try{d.currentTime=c}catch(g){}if(this.hg&&yb&&!C.Af)zb.push(this);else try{this.P.play()}catch(k){console&&console.log&&console.log("[C2] WARNING: exception trying to play audio '"+
this.buffer.src+"': ",k)}break;case 1:this.muted=!1;this.Hl=1;if(1===this.buffer.Ta)this.Og||(this.P=F.createBufferSource(),this.P.buffer=this.buffer.ob,this.P.connect(this.Ac)),this.P.loop=a,this.Ac.gain.value=b*V,0===c?e(this.P):f(this.P,c,this.Rj());else{1!==d.playbackRate&&(d.playbackRate=1);d.loop!==a&&(d.loop=a);this.Ac.gain.value=b*V;if(d.currentTime!==c)try{d.currentTime=c}catch(h){}this.hg&&yb&&!C.Af?zb.push(this):d.play()}break;case 2:(!this.Og&&this.Oe||0!==c)&&d.seekTo(c);d.play();this.dv=
!1;break;case 3:C.Ad?AppMobi.context.playSound(this.src,a):AppMobi.player.playSound(this.src,a)}this.playbackRate=1;this.startTime=(this.$j?C.He.mb:C.vh.mb)-c;this.Cf=this.Oe=this.Og=!1};w.prototype.stop=function(){switch(this.Ta){case 0:this.P.paused||this.P.pause();break;case 1:1===this.buffer.Ta?h(this.P):this.P.paused||this.P.pause();break;case 2:this.P.stop();break;case 3:C.Ad&&AppMobi.context.stopSound(this.src)}this.Oe=!0;this.Cf=!1};w.prototype.pause=function(){if(!(this.Og||this.Oe||this.Uj()||
this.Cf)){switch(this.Ta){case 0:this.P.paused||this.P.pause();break;case 1:1===this.buffer.Ta?(this.ke=this.Bt(),this.Ug&&(this.ke%=this.Rj()),h(this.P)):this.P.paused||this.P.pause();break;case 2:this.P.pause();break;case 3:C.Ad&&AppMobi.context.stopSound(this.src)}this.Cf=!0}};w.prototype.wG=function(){if(!(this.Og||this.Oe||this.Uj())&&this.Cf){switch(this.Ta){case 0:this.P.play();break;case 1:1===this.buffer.Ta?(this.P=F.createBufferSource(),this.P.buffer=this.buffer.ob,this.P.connect(this.Ac),
this.P.loop=this.Ug,this.Ac.gain.value=V*this.volume*this.Hl,this.startTime=(this.$j?C.He.mb:C.vh.mb)-this.ke,f(this.P,this.ke,this.Rj())):this.P.play();break;case 2:this.P.play();break;case 3:C.Ad&&AppMobi.context.resumeSound(this.src)}this.Cf=!1}};w.prototype.seek=function(a){if(!(this.Og||this.Oe||this.Uj()))switch(this.Ta){case 0:try{this.P.currentTime=a}catch(b){}break;case 1:if(1===this.buffer.Ta)this.Cf?this.ke=a:(this.pause(),this.ke=a,this.wG());else try{this.P.currentTime=a}catch(c){}break;
case 3:C.Ad&&AppMobi.context.seekSound(this.src,a)}};w.prototype.uG=function(a){1===this.Ta&&(this.fh?(this.qc.disconnect(),this.qc.connect(a)):(this.Ac.disconnect(),this.Ac.connect(a)))};w.prototype.Rj=function(){switch(this.Ta){case 0:if("undefined"!==typeof this.P.duration)return this.P.duration;break;case 1:return this.buffer.ob.duration;case 2:return this.P.getDuration();case 3:if(C.Ad)return AppMobi.context.getDurationSound(this.src)}return 0};w.prototype.Bt=function(){var a=this.Rj(),b=0;switch(this.Ta){case 0:"undefined"!==
typeof this.P.currentTime&&(b=this.P.currentTime);break;case 1:if(1===this.buffer.Ta){if(this.Cf)return this.ke;b=(this.$j?C.He.mb:C.vh.mb)-this.startTime}else"undefined"!==typeof this.P.currentTime&&(b=this.P.currentTime);break;case 3:C.Ad&&(b=AppMobi.context.getPlaybackTimeSound(this.src))}!this.Ug&&b>a&&(b=a);return b};w.prototype.ll=function(){return!this.Cf&&!this.Og&&!this.Oe&&!this.Uj()};w.prototype.aH=function(){var a=this.volume*V;switch(this.Ta){case 0:this.P.volume&&this.P.volume!==a&&
(this.P.volume=a);break;case 1:this.Ac.gain.value=a*this.Hl}};w.prototype.Gp=function(a){switch(this.Ta){case 0:this.P.muted!==!!a&&(this.P.muted=!!a);break;case 1:this.Hl=a?0:1,this.Ac.gain.value=V*this.volume*this.Hl}};w.prototype.IG=function(){this.nl=!0;this.Gp(this.nl||this.jn)};w.prototype.hA=function(a){this.jn=!!a;this.Gp(this.nl||this.jn)};w.prototype.PA=function(){var a=this.playbackRate;this.$j&&(a*=C.ni);switch(this.Ta){case 0:this.P.playbackRate!==a&&(this.P.playbackRate=a);break;case 1:1===
this.buffer.Ta?this.P.playbackRate.value!==a&&(this.P.playbackRate.value=a):this.P.playbackRate!==a&&(this.P.playbackRate=a)}};w.prototype.KG=function(a){switch(this.Ta){case 0:a?this.ll()?(this.P.pause(),this.li=!0):this.li=!1:this.li&&this.P.play();break;case 1:a?this.ll()?(1===this.buffer.Ta?(this.ke=this.Bt(),this.Ug&&(this.ke%=this.Rj()),h(this.P)):this.P.pause(),this.li=!0):this.li=!1:this.li&&(1===this.buffer.Ta?(this.P=F.createBufferSource(),this.P.buffer=this.buffer.ob,this.P.connect(this.Ac),
this.P.loop=this.Ug,this.Ac.gain.value=V*this.volume*this.Hl,this.startTime=(this.$j?C.He.mb:C.vh.mb)-this.ke,f(this.P,this.ke,this.Rj())):this.P.play());break;case 2:a?this.ll()?(this.P.pause(),this.li=!0):this.li=!1:this.li&&this.P.play()}};H.Xb=function(a){this.type=a;C=this.i=a.i;X=this;this.Pd=null;this.un=-600;!(this.i.nq||this.i.fq&&(this.i.cn||this.i.gq))||this.i.dn||this.i.Db||(yb=!0);F=null;"undefined"!==typeof AudioContext?(K=1,F=new AudioContext):"undefined"!==typeof webkitAudioContext&&
(K=1,F=new webkitAudioContext);(this.i.nq&&1===K||yb)&&document.addEventListener("touchstart",function(){var a,b,c;!le&&F&&(a=F.createBuffer(1,1,22050),b=F.createBufferSource(),b.buffer=a,b.connect(F.destination),e(b),le=!0);if(yb){if(!U)for(a=0,b=zb.length;a<b;++a)c=zb[a],c.Oe||c.Cf||c.P.play();zb.length=0}},!0);1!==K&&(this.i.Bf&&"undefined"!==typeof window.Media?K=2:this.i.il&&(K=3));2===K&&(O=location.href,a=O.lastIndexOf("/"),-1<a&&(O=O.substr(0,a+1)),O=O.replace("file://",""));if(this.i.oy&&
this.i.kF&&"undefined"===typeof Audio)alert("It looks like you're using Safari for Windows without Quicktime.  Audio cannot be played until Quicktime is installed."),this.i.qj(this);else{if(this.i.Ad)ca=this.i.fq;else try{ca=!!(new Audio).canPlayType('audio/ogg; codecs="vorbis"')}catch(b){ca=!1}this.i.ro(this)}};var ua=H.Xb.prototype;ua.lb=function(){this.i.Uk=this;P=this.V[0];this.mi=this.V[1];this.mG=0!==this.V[2];Mc=this.V[3];Nc=this.V[4];this.un=-this.V[5];ie=this.V[6];je=this.V[7];ke=this.V[8];
this.Pd=new A;var a=this.i.Ka||this.i.width,b=this.i.Ja||this.i.height;1===K&&(F.listener.speedOfSound=this.V[9],F.listener.dopplerFactor=this.V[10],F.listener.setPosition(a/2,b/2,this.un),F.listener.setOrientation(0,0,1,0,-1,0),window.c2OnAudioMicStream=function(a,b){Wa&&Wa.disconnect();Lc=b.toLowerCase();Wa=F.createMediaStreamSource(a);Wa.connect(c(Lc))});this.i.KC(function(a){X.hG(a)});var d=this;this.i.Wo(function(a){d.Tn(a)})};ua.Tn=function(a){var b,c,d;b=0;for(c=J.length;b<c;b++)d=J[b],d.pc&&
d.pc.ta===a&&(d.pc.ta=null,d.fh&&d.ll()&&d.Ug&&d.stop());this.Pd.ta===a&&(this.Pd.ta=null)};ua.Fd=function(){var a={silent:U,masterVolume:V,listenerZ:this.un,listenerUid:this.Pd.dq()?this.Pd.ta.uid:-1,playing:[],effects:{}},b=a.playing,c,d,e,g,f,k;c=0;for(d=J.length;c<d;c++)e=J[c],!e.ll()||3===this.mi||e.hg&&1===this.mi||!e.hg&&2===this.mi||(g=e.Bt(),e.Ug&&(g%=e.Rj()),g={tag:e.tag,buffersrc:e.buffer.src,is_music:e.hg,playbackTime:g,volume:e.volume,looping:e.Ug,muted:e.nl,playbackRate:e.playbackRate,
paused:e.Cf,resume_position:e.ke},e.fh&&(g.pan={},k=g.pan,e.pc&&e.pc.dq()?k.objUid=e.pc.ta.uid:(k.x=e.Iz,k.y=e.Jz,k.a=e.Ez),k.ia=e.Fz,k.oa=e.Gz,k.og=e.Hz),b.push(g));b=a.effects;for(f in aa)if(aa.hasOwnProperty(f)){e=[];c=0;for(d=aa[f].length;c<d;c++)e.push({type:aa[f][c].type,params:aa[f][c].ic});b[f]=e}return a};var Ab=[];ua.fe=function(a){var b=a.silent;V=a.masterVolume;this.un=a.listenerZ;this.Pd.io(null);var c=a.listenerUid;-1!==c&&(this.Pd.Bq=c,Ab.push(this.Pd));var c=a.playing,d,e,f,h,D,w,
G,E,C,z,H;if(3!==this.mi)for(d=0,e=J.length;d<e;d++)C=J[d],C.hg&&1===this.mi||(C.hg||2!==this.mi)&&C.stop();for(D in aa)if(aa.hasOwnProperty(D))for(d=0,e=aa[D].length;d<e;d++)aa[D][d].remove();Pa(aa);for(D in a.effects)if(a.effects.hasOwnProperty(D))for(w=a.effects[D],d=0,e=w.length;d<e;d++)switch(f=w[d].type,z=w[d].params,f){case "filter":I(D,new g(z[0],z[1],z[2],z[3],z[4],z[5]));break;case "delay":I(D,new m(z[0],z[1],z[2]));break;case "convolve":f=z[2];C=this.Up(f,!1);C.ob?f=new l(C.ob,z[0],z[1],
f):(f=new l(null,z[0],z[1],f),C.sz=z[0],C.up=f);I(D,f);break;case "flanger":I(D,new n(z[0],z[1],z[2],z[3],z[4]));break;case "phaser":I(D,new k(z[0],z[1],z[2],z[3],z[4],z[5]));break;case "gain":I(D,new r(z[0]));break;case "tremolo":I(D,new q(z[0],z[1]));break;case "ringmod":I(D,new s(z[0],z[1]));break;case "distortion":I(D,new t(z[0],z[1],z[2],z[3],z[4]));break;case "compressor":I(D,new p(z[0],z[1],z[2],z[3],z[4]));break;case "analyser":I(D,new y(z[0],z[1]))}d=0;for(e=c.length;d<e;d++)3===this.mi||
(a=c[d],f=a.buffersrc,h=a.is_music,D=a.tag,w=a.playbackTime,G=a.looping,E=a.volume,H=(z=a.pan)&&z.hasOwnProperty("objUid")?z.objUid:-1,h&&1===this.mi)||!h&&2===this.mi||((C=this.Rx(f,D,h,G,E))?(C.ke=a.resume_position,C.Av(!!z),C.play(G,E,w),C.PA(),C.aH(),C.Gp(C.nl||C.jn),a.paused&&C.pause(),a.muted&&C.IG(),C.Gp(C.nl||C.jn),z&&(-1!==H?(C.pc=C.pc||new A,C.pc.Bq=H,Ab.push(C.pc)):C.zv(z.x,z.y,z.a,z.ia,z.oa,z.og))):(C=this.Up(f,h),C.tr=w,C.Zq=a.paused,z&&(-1!==H?C.Ml.push({uz:H,Jt:z.ia,Uu:z.oa,Xu:z.og,
BA:D}):C.Ml.push({x:z.x,y:z.y,G:z.a,Jt:z.ia,Uu:z.oa,Xu:z.og,BA:D}))));if(b&&!U){d=0;for(e=J.length;d<e;d++)J[d].hA(!0);U=!0}else if(!b&&U){d=0;for(e=J.length;d<e;d++)J[d].hA(!1);U=!1}};ua.Yf=function(){var a,b,c,d;a=0;for(b=Ab.length;a<b;a++)c=Ab[a],d=this.i.Qh(c.Bq),c.io(d),c.Bq=-1,d&&(ma=d.x,na=d.y);Ab.length=0};ua.hG=function(a){if(!this.mG){!a&&F&&F.resume&&F.resume();var b,c;b=0;for(c=J.length;b<c;b++)J[b].KG(a);a&&F&&F.suspend&&F.suspend()}};ua.tc=function(){var a=this.i.Fa,b,c,d;b=0;for(c=
J.length;b<c;b++)d=J[b],d.tc(a),0===d.Ta||3===d.Ta||d.Og||d.Oe||!d.Uj()||(d.Oe=!0,M=d.tag,C.trigger(hc.prototype.W.os,X)),0!==P&&d.PA();var e,g;for(e in aa)if(aa.hasOwnProperty(e))for(d=aa[e],b=0,c=d.length;b<c;b++)g=d[b],g.tc&&g.tc();1===K&&this.Pd.dq()&&(this.Pd.tc(a),ma=this.Pd.ta.x,na=this.Pd.ta.y,F.listener.setPosition(this.Pd.ta.x,this.Pd.ta.y,this.un),F.listener.setVelocity(this.Pd.Et(),this.Pd.Ft(),0))};var Bb=[];ua.JG=function(a){var b,c,d,e,g,f=0;b=0;for(c=a.length;b<c;++b)if(d=a[b],e=d[0],
d=2*d[1],(g=4<e.length&&".ogg"===e.substr(e.length-4))&&ca||!g&&!ca)Bb.push({filename:e,size:d,ta:null}),f+=d;return f};ua.OG=function(){var a,b,c,d;a=0;for(b=Bb.length;a<b;++a)c=Bb[a],d=this.i.jt+c.filename,c.ta=this.Up(d,!1)};ua.DE=function(){var a=0,b,c,d;b=0;for(c=Bb.length;b<c;++b)d=Bb[b],d.ta.jF()||d.ta.$E()||this.i.Db||this.i.gq?a+=d.size:d.ta.my()&&(a+=Math.floor(d.size/2));return a};ua.Up=function(a,b){var c,d,e,g=null;c=0;for(d=N.length;c<d;c++)if(e=N[c],e.src===a){g=e;break}g||(g=new D(a,
b),N.push(g));return g};ua.Rx=function(a,b,c,d,e){var g,f,k;g=0;for(f=J.length;g<f;g++)if(k=J[g],k.src===a&&(k.YC()||c))return k.tag=b,k;a=this.Up(a,c);if(!a.ob)return"<preload>"!==b&&(a.$q=b,a.wu=d,a.Xv=e),null;k=new w(a,b);J.push(k);return k};var Ma=[];E.prototype.os=function(a){return bb(M,a)};H.W=new E;z.prototype.Play=function(a,b,c,d){!U&&(c=Math.pow(10,c/20),0>c&&(c=0),1<c&&(c=1),L=this.Rx(this.i.jt+a[0]+(ca?".ogg":".m4a"),d,a[1],0!==b,c))&&(L.Av(!1),L.play(0!==b,c))};z.prototype.Lw=function(a){G(a);
var b;a=0;for(b=Ma.length;a<b;a++)Ma[a].stop()};z.prototype.lC=function(){var a,b;a=0;for(b=J.length;a<b;a++)J[a].stop()};H.Lc=new z;H.Ce=new function(){}})();function ic(a){this.i=a}
(function(){function a(){}function c(){}var b=ic.prototype;b.vc=function(a){this.Ec=a;this.i=a.i};b.vc.prototype.lb=function(){};b.Xb=function(a){this.type=a;this.i=a.i};var d=b.Xb.prototype;d.lb=function(){this.i.Db?ea("[Construct 2] Button plugin not supported on this platform - the object will not be created"):(this.bn=1===this.V[0],this.yf=document.createElement("input"),this.tb=this.bn?document.createElement("label"):this.yf,this.oq=null,this.yf.type=this.bn?"checkbox":"button",this.yf.id=this.V[6],
jQuery(this.tb).appendTo(this.i.mp?this.i.mp:"body"),this.bn?(jQuery(this.yf).appendTo(this.tb),this.oq=document.createTextNode(this.V[1]),jQuery(this.tb).append(this.oq),this.yf.checked=0!==this.V[7],jQuery(this.tb).css("font-family","sans-serif"),jQuery(this.tb).css("display","inline-block"),jQuery(this.tb).css("color","black")):this.yf.value=this.V[1],this.tb.title=this.V[2],this.yf.disabled=0===this.V[4],this.QC=0!==this.V[5],this.Nj=!1,0===this.V[3]&&(jQuery(this.tb).hide(),this.visible=!1,this.Nj=
!0),this.yf.onclick=function(a){return function(b){b.stopPropagation();a.i.Af=!0;a.i.trigger(ic.prototype.W.sw,a);a.i.Af=!1}}(this),this.tb.addEventListener("touchstart",function(a){a.stopPropagation()},!1),this.tb.addEventListener("touchmove",function(a){a.stopPropagation()},!1),this.tb.addEventListener("touchend",function(a){a.stopPropagation()},!1),jQuery(this.tb).mousedown(function(a){a.stopPropagation()}),jQuery(this.tb).mouseup(function(a){a.stopPropagation()}),jQuery(this.tb).keydown(function(a){a.stopPropagation()}),
jQuery(this.tb).keyup(function(a){a.stopPropagation()}),this.Hy=this.Iy=this.zy=this.Ey=this.Gy=this.By=0,this.QA(!0),this.i.ro(this))};d.Fd=function(){var a={tooltip:this.tb.title,disabled:!!this.yf.disabled};this.bn?(a.checked=!!this.yf.checked,a.text=this.oq.nodeValue):a.text=this.tb.value;return a};d.fe=function(a){this.tb.title=a.tooltip;this.yf.disabled=a.disabled;this.bn?(this.yf.checked=a.checked,this.oq.nodeValue=a.text):this.tb.value=a.text};d.bj=function(){this.i.Db||(jQuery(this.tb).remove(),
this.tb=null)};d.tc=function(){this.QA()};d.QA=function(a){if(!this.i.Db){var b=this.H.xb(this.x,this.y,!0),c=this.H.xb(this.x,this.y,!1),d=this.H.xb(this.x+this.width,this.y+this.height,!0),m=this.H.xb(this.x+this.width,this.y+this.height,!1),l=this.i.width/this.i.devicePixelRatio,n=this.i.height/this.i.devicePixelRatio;!this.visible||!this.H.visible||0>=d||0>=m||b>=l||c>=n?(this.Nj||jQuery(this.tb).hide(),this.Nj=!0):(1>b&&(b=1),1>c&&(c=1),d>=l&&(d=l-1),m>=n&&(m=n-1),l=window.innerWidth,n=window.innerHeight,
a||this.By!==b||this.Gy!==c||this.Ey!==d||this.zy!==m||this.Iy!==l||this.Hy!==n?(this.By=b,this.Gy=c,this.Ey=d,this.zy=m,this.Iy=l,this.Hy=n,this.Nj&&(jQuery(this.tb).show(),this.Nj=!1),a=Math.round(b)+jQuery(this.i.canvas).offset().left,l=Math.round(c)+jQuery(this.i.canvas).offset().top,jQuery(this.tb).css("position","absolute"),jQuery(this.tb).offset({left:a,top:l}),jQuery(this.tb).width(Math.round(d-b)),jQuery(this.tb).height(Math.round(m-c)),this.QC&&jQuery(this.tb).css("font-size",this.H.ee(!0)/
this.i.devicePixelRatio-.2+"em")):this.Nj&&(jQuery(this.tb).show(),this.Nj=!1))}};d.Lg=function(){};d.tf=function(){};a.prototype.sw=function(){return!0};b.W=new a;c.prototype.fC=function(a){this.i.Db||(this.visible=0!==a)};b.Lc=new c;b.Ce=new function(){}})();function gc(a){this.i=a}
(function(){function a(){if(0===this.Us.length){var a=document.createElement("canvas");a.width=this.width;a.height=this.height;var b=a.getContext("2d");this.Sl?b.drawImage(this.me,this.Kl,this.Ll,this.width,this.height,0,0,this.width,this.height):b.drawImage(this.me,0,0,this.width,this.height);this.Us=a.toDataURL("image/png")}return this.Us}function c(){}function b(a){a[0]=0;a[1]=0;a[2]=0;r.push(a)}function d(a,b){return a<b?""+a+","+b:""+b+","+a}function e(a,b,c,e){b=b.uid;c=c.uid;var g=d(b,c);if(a.hasOwnProperty(g))a[g][2]=
e;else{var f=r.length?r.pop():[0,0,0];f[0]=b;f[1]=c;f[2]=e;a[g]=f}}function f(a,c,e){c=d(c.uid,e.uid);a.hasOwnProperty(c)&&(b(a[c]),delete a[c])}function h(a,b,c){b=d(b.uid,c.uid);if(a.hasOwnProperty(b))return q=a[b][2],!0;q=-2;return!1}function g(){}var m=gc.prototype;m.vc=function(a){this.Ec=a;this.i=a.i};var l=m.vc.prototype;l.lb=function(){if(!this.Ua){var b,c,d,e,g,f,k,h,l;this.Zf=[];this.Zm=!1;b=0;for(c=this.we.length;b<c;b++){g=this.we[b];k={};k.name=g[0];k.speed=g[1];k.loop=g[2];k.qv=g[3];
k.nr=g[4];k.Nz=g[5];k.Pa=g[6];k.frames=[];d=0;for(e=g[7].length;d<e;d++)f=g[7][d],h={},h.zA=f[0],h.AA=f[1],h.Kl=f[2],h.Ll=f[3],h.width=f[4],h.height=f[5],h.duration=f[6],h.Fe=f[7],h.Ge=f[8],h.Lt=f[9],h.br=f[10],h.Oz=f[11],h.Sl=0!==h.width,h.Us="",h.DI=a,l={left:0,top:0,right:1,bottom:1},h.Dv=l,h.si=null,(l=this.i.nE(f[0]))?h.me=l:(h.me=new Image,h.me.gD=f[0],h.me.fD=f[1],h.me.XC=null,this.i.hH(h.me,f[0])),k.frames.push(h),this.Zf.push(h);this.we[b]=k}}};l.MA=function(){var a,b,c;a=0;for(b=this.B.length;a<
b;a++)c=this.B[a],c.xp=c.rf.si};l.Yu=function(){if(!this.Ua){var a,b,c;a=0;for(b=this.Zf.length;a<b;++a)c=this.Zf[a],c.me.XC=null,c.si=null;this.Zm=!1;this.MA()}};l.Az=function(){if(!this.Ua&&this.B.length){var a,b,c;a=0;for(b=this.Zf.length;a<b;++a)c=this.Zf[a],c.si=this.i.ka.My(c.me,this.i.qb,c.Oz);this.MA()}};l.tF=function(){if(!this.Ua&&!this.Zm&&this.i.ka){var a,b,c;a=0;for(b=this.Zf.length;a<b;++a)c=this.Zf[a],c.si=this.i.ka.My(c.me,this.i.qb,c.Oz);this.Zm=!0}};l.JA=function(){if(!this.Ua&&
!this.B.length&&this.Zm){var a,b,c;a=0;for(b=this.Zf.length;a<b;++a)c=this.Zf[a],this.i.ka.deleteTexture(c.si),c.si=null;this.Zm=!1}};var n=[];l.Sz=function(a){var b,c,d;b=n.length=0;for(c=this.Zf.length;b<c;++b)d=this.Zf[b].me,-1===n.indexOf(d)&&(a.drawImage(d,0,0),n.push(d))};m.Xb=function(a){this.type=a;this.i=a.i;a=this.type.we[0].frames[0].br;this.je?this.Ba.jo(a):this.Ba=new Xa(a)};var k=m.Xb.prototype;k.lb=function(){this.visible=0===this.V[0];this.Nt=this.Xt=!1;this.Ig=0!==this.V[3];1===this.type.we.length&&
1===this.type.we[0].frames.length||0===this.type.we[0].speed||(this.i.ro(this),this.Xt=!0);this.Lb=this.Qx(this.V[1])||this.type.we[0];this.aa=this.V[2];0>this.aa&&(this.aa=0);this.aa>=this.Lb.frames.length&&(this.aa=this.Lb.frames.length-1);var a=this.Lb.frames[this.aa];this.Ba.jo(a.br);this.Fe=a.Fe;this.Ge=a.Ge;this.Im=this.Lb.speed;this.je?this.Fg.reset():this.Fg=new Ua;this.Oh=this.Fg.mb;this.Dj=!0;this.Ch=0;this.Cj=!0;this.np=this.$w="";this.ux=0;this.Ks=-1;this.type.tF();var b,c,d,e,g,f,k,a=
0;for(b=this.type.we.length;a<b;a++)for(e=this.type.we[a],c=0,d=e.frames.length;c<d;c++)g=e.frames[c],0===g.width&&(g.width=g.me.width,g.height=g.me.height),g.Sl&&(k=g.me,f=g.Dv,f.left=g.Kl/k.width,f.top=g.Ll/k.height,f.right=(g.Kl+g.width)/k.width,f.bottom=(g.Ll+g.height)/k.height,0===g.Kl&&0===g.Ll&&g.width===k.width&&g.height===k.height&&(g.Sl=!1));this.rf=this.Lb.frames[this.aa];this.xp=this.rf.si};k.Fd=function(){var a={a:this.Lb.Pa,f:this.aa,cas:this.Im,fs:this.Oh,ar:this.Ch,at:this.Fg.mb};
this.Dj||(a.ap=this.Dj);this.Cj||(a.af=this.Cj);return a};k.fe=function(a){var b=this.tE(a.a);b&&(this.Lb=b);this.aa=a.f;0>this.aa&&(this.aa=0);this.aa>=this.Lb.frames.length&&(this.aa=this.Lb.frames.length-1);this.Im=a.cas;this.Oh=a.fs;this.Ch=a.ar;this.Fg.reset();this.Fg.mb=a.at;this.Dj=a.hasOwnProperty("ap")?a.ap:!0;this.Cj=a.hasOwnProperty("af")?a.af:!0;this.rf=this.Lb.frames[this.aa];this.xp=this.rf.si;this.Ba.jo(this.rf.br);this.Fe=this.rf.Fe;this.Ge=this.rf.Ge};k.Gs=function(a){this.aa=a?0:
this.Lb.frames.length-1;this.Dj=!1;this.$w=this.Lb.name;this.Nt=!0;this.i.trigger(gc.prototype.W.EB,this);this.i.trigger(gc.prototype.W.DB,this);this.Nt=!1;this.Ch=0};k.GI=function(){return this.Fg.mb};k.tc=function(){this.Fg.add(this.i.Tm(this));this.np.length&&this.Fx();0<=this.Ks&&this.nD();var a=this.Fg.mb,b=this.Lb,c=b.frames[this.aa],d=c.duration/this.Im;this.Dj&&a>=this.Oh+d&&(this.Cj?this.aa++:this.aa--,this.Oh+=d,this.aa>=b.frames.length&&(b.Nz?(this.Cj=!1,this.aa=b.frames.length-2):b.loop?
this.aa=b.nr:(this.Ch++,this.Ch>=b.qv?this.Gs(!1):this.aa=b.nr)),0>this.aa&&(b.Nz?(this.aa=1,this.Cj=!0,b.loop||(this.Ch++,this.Ch>=b.qv&&this.Gs(!0))):b.loop?this.aa=b.nr:(this.Ch++,this.Ch>=b.qv?this.Gs(!0):this.aa=b.nr)),0>this.aa?this.aa=0:this.aa>=b.frames.length&&(this.aa=b.frames.length-1),a>this.Oh+b.frames[this.aa].duration/this.Im&&(this.Oh=a),a=b.frames[this.aa],this.Qk(c,a),this.i.Hb=!0)};k.Qx=function(a){var b,c,d;b=0;for(c=this.type.we.length;b<c;b++)if(d=this.type.we[b],bb(d.name,a))return d;
return null};k.tE=function(a){var b,c,d;b=0;for(c=this.type.we.length;b<c;b++)if(d=this.type.we[b],d.Pa===a)return d;return null};k.Fx=function(){var a=this.Lb.frames[this.aa],b=this.Qx(this.np);this.np="";!b||bb(b.name,this.Lb.name)&&this.Dj||(this.Lb=b,this.Im=b.speed,0>this.aa&&(this.aa=0),this.aa>=this.Lb.frames.length&&(this.aa=this.Lb.frames.length-1),1===this.ux&&(this.aa=0),this.Dj=!0,this.Oh=this.Fg.mb,this.Cj=!0,this.Qk(a,this.Lb.frames[this.aa]),this.i.Hb=!0)};k.nD=function(){var a=this.Lb.frames[this.aa],
b=this.aa;this.aa=pa(this.Ks);0>this.aa&&(this.aa=0);this.aa>=this.Lb.frames.length&&(this.aa=this.Lb.frames.length-1);b!==this.aa&&(this.Qk(a,this.Lb.frames[this.aa]),this.Oh=this.Fg.mb,this.i.Hb=!0);this.Ks=-1};k.Qk=function(a,b){var c=a.width,d=a.height,e=b.width,g=b.height;c!=e&&(this.width*=e/c);d!=g&&(this.height*=g/d);this.Fe=b.Fe;this.Ge=b.Ge;this.Ba.jo(b.br);this.ea();this.rf=b;this.xp=b.si;c=0;for(d=this.Ea.length;c<d;c++)e=this.Ea[c],e.gG&&e.gG(a,b);this.i.trigger(gc.prototype.W.Qk,this)};
k.Lg=function(a){a.globalAlpha=this.opacity;var b=this.rf,c=b.Sl,d=b.me,e=this.x,g=this.y,f=this.width,k=this.height;if(0===this.M&&0<=f&&0<=k)e-=this.Fe*f,g-=this.Ge*k,this.i.ej&&(e=Math.round(e),g=Math.round(g)),c?a.drawImage(d,b.Kl,b.Ll,b.width,b.height,e,g,f,k):a.drawImage(d,e,g,f,k);else{this.i.ej&&(e=Math.round(e),g=Math.round(g));a.save();var h=0<f?1:-1,l=0<k?1:-1;a.translate(e,g);1===h&&1===l||a.scale(h,l);a.rotate(this.M*h*l);e=0-this.Fe*ka(f);g=0-this.Ge*ka(k);c?a.drawImage(d,b.Kl,b.Ll,
b.width,b.height,e,g,ka(f),ka(k)):a.drawImage(d,e,g,ka(f),ka(k));a.restore()}};k.tf=function(a){a.gf(this.xp);a.Pl(this.opacity);var b=this.rf,c=this.ub;if(this.i.ej){var d=Math.round(this.x)-this.x,e=Math.round(this.y)-this.y;b.Sl?a.fj(c.Hc+d,c.Ic+e,c.ne+d,c.oe+e,c.$d+d,c.ae+e,c.Yd+d,c.Zd+e,b.Dv):a.jr(c.Hc+d,c.Ic+e,c.ne+d,c.oe+e,c.$d+d,c.ae+e,c.Yd+d,c.Zd+e)}else b.Sl?a.fj(c.Hc,c.Ic,c.ne,c.oe,c.$d,c.ae,c.Yd,c.Zd,b.Dv):a.jr(c.Hc,c.Ic,c.ne,c.oe,c.$d,c.ae,c.Yd,c.Zd)};k.yE=function(a){var b=this.rf,c,
d;c=0;for(d=b.Lt.length;c<d;c++)if(bb(a,b.Lt[c][0]))return c;return-1};k.Qg=function(a,b){var c=this.rf,d=c.Lt,e;e=v(a)?this.yE(a):a-1;e=pa(e);if(0>e||e>=d.length)return b?this.x:this.y;var g=(d[e][1]-c.Fe)*this.width,d=d[e][2],d=(d-c.Ge)*this.height,c=Math.cos(this.M);e=Math.sin(this.M);var f=g*c-d*e,d=d*c+g*e,g=f+this.x,d=d+this.y;return b?g:d};var r=[],q=-2,s=[];c.prototype.IB=function(a){if(!a)return!1;var c=this.i,d=c.Sx(),g=d.type;d.da.collmemory||(d.da.collmemory={},c.Wo(function(a){return function(c){c=
c.uid;var d,e;for(d in a)a.hasOwnProperty(d)&&(e=a[d],e[0]===c||e[1]===c)&&(b(a[d]),delete a[d])}}(d.da.collmemory)));var d=d.da.collmemory,k=g.pb(),l=a.pb(),k=k.wf(),m,n,r,p,t,M,O,K=this.i.hf,F=K-1,N=c.zd().Be;for(n=0;n<k.length;n++){r=k[n];l.Ab?(r.nb(),this.i.xt(r.H,a,r.$b,s),m=s):m=l.wf();for(p=0;p<m.length;p++)t=m[p],c.Qf(r,t)||c.aD(r,t)?(M=h(d,r,t),M=!M||q<F,e(d,r,t,K),M&&(c.hr(N.Jb),M=g.pb(),O=a.pb(),M.Ab=!1,O.Ab=!1,g===a?(M.B.length=2,M.B[0]=r,M.B[1]=t,g.ag()):(M.B.length=1,O.B.length=1,M.B[0]=
r,O.B[0]=t,g.ag(),a.ag()),N.yG(),c.wk(N.Jb))):f(d,r,t);s.length=0}return!1};var t=new da,p=!1;l.finish=function(a){if(p){if(a){var b=this.i.zd().Be.pg;a=null.pb();var c=t.wg(),d,e;if(a.Ab){a.Ab=!1;a.B.length=c.length;d=0;for(e=c.length;d<e;d++)a.B[d]=c[d];if(b)for(d=a.hb.length=0,e=null.B.length;d<e;d++)c=null.B[d],t.contains(c)||a.hb.push(c)}else if(b)for(b=a.B.length,a.B.length=b+c.length,d=0,e=c.length;d<e;d++)a.B[b+d]=c[d],Aa(a.hb,c[d]);else xa(a.B,c);null.ag()}t.clear();p=!1}};c.prototype.DB=
function(a){return bb(this.$w,a)};c.prototype.EB=function(){return!0};c.prototype.Qk=function(){return!0};m.W=new c;g.prototype.cC=function(a,b){this.np=a;this.ux=b;this.Xt||(this.i.ro(this),this.Xt=!0);this.Nt||this.Fx()};m.Lc=new g;m.Ce=new function(){}})();function jc(a){this.i=a}
(function(){function a(){return h.length?h.pop():{}}function c(a){var b,c;b=0;for(c=a.length;b<c;b++)h.push(a[b]);a.length=0}function b(){}var d=jc.prototype;d.lb=function(){d.Lc.gC=function(a){this.width!==a&&(this.width=a,this.Ul=!0,this.ea())}};d.vc=function(a){this.Ec=a;this.i=a.i};var e=d.vc.prototype;e.lb=function(){};e.Yu=function(){if(!this.Ua){var a,b,c;a=0;for(b=this.B.length;a<b;a++)c=this.B[a],c.eh=null,c.uk=null,c.Le=null}};d.Xb=function(a){this.type=a;this.i=a.i;this.je?this.Si.length=
0:this.Si=[];this.Ul=!0};e=d.Xb.prototype;e.lb=function(){this.text=this.V[0];this.visible=0===this.V[1];this.font=this.V[2];this.color=this.V[3];this.cq=this.V[4];this.Sr=this.V[5];this.$v=0===this.V[7];this.ju=this.vq=this.width;this.uq=this.height;this.nu=this.V[8];this.Rp=this.al="";this.xA=this.yA=this.ao=0;this.iG();this.Le=this.uk=this.eh=null;this.qz=!1;this.tn=this.i.hf;this.je?this.Nl.set(0,0,1,1):this.Nl=new sa(0,0,1,1);this.i.ka&&this.i.ro(this)};e.iG=function(){var a=this.font.split(" "),
b;for(b=0;b<a.length;b++)if("pt"===a[b].substr(a[b].length-2,2)){this.ao=parseInt(a[b].substr(0,a[b].length-2));this.lv=Math.ceil(this.ao/72*96)+4;0<b&&(this.Rp=a[b-1]);this.al=a[b+1];for(b+=2;b<a.length;b++)this.al+=" "+a[b];break}};e.Fd=function(){return{t:this.text,f:this.font,c:this.color,ha:this.cq,va:this.Sr,wr:this.$v,lho:this.nu,fn:this.al,fs:this.Rp,ps:this.ao,pxh:this.lv,tw:this.yA,th:this.xA,lrt:this.tn}};e.fe=function(a){this.text=a.t;this.font=a.f;this.color=a.c;this.cq=a.ha;this.Sr=
a.va;this.$v=a.wr;this.nu=a.lho;this.al=a.fn;this.Rp=a.fs;this.ao=a.ps;this.lv=a.pxh;this.yA=a.tw;this.xA=a.th;this.tn=a.lrt;this.Ul=!0;this.ju=this.vq=this.width;this.uq=this.height};e.tc=function(){if(this.i.ka&&this.Le&&300<=this.i.hf-this.tn){var a=this.H;this.nb();var b=this.$b;if(b.right<a.Tc||b.bottom<a.Uc||b.left>a.sd||b.top>a.rd)this.i.ka.deleteTexture(this.Le),this.eh=this.uk=this.Le=null}};e.bj=function(){this.eh=this.uk=null;this.i.ka&&this.Le&&this.i.ka.deleteTexture(this.Le);this.Le=
null};e.RI=function(){this.font=this.Rp+" "+this.ao.toString()+"pt "+this.al;this.Ul=!0;this.i.Hb=!0};e.Lg=function(a,b){a.font=this.font;a.textBaseline="top";a.fillStyle=this.color;a.globalAlpha=b?1:this.opacity;var c=1;b&&(c=this.H.ee(),a.save(),a.scale(c,c));if(this.Ul||this.width!==this.ju)this.type.Ec.rC(this.text,this.Si,a,this.width,this.$v),this.Ul=!1,this.ju=this.width;this.nb();var c=b?0:this.ub.Hc,d=b?0:this.ub.Ic;this.i.ej&&(c=c+.5|0,d=d+.5|0);0===this.M||b||(a.save(),a.translate(c,d),
a.rotate(this.M),d=c=0);var e=d+this.height,f=this.lv,f=f+this.nu,h,s;1===this.Sr?d+=Math.max(this.height/2-this.Si.length*f/2,0):2===this.Sr&&(d+=Math.max(this.height-this.Si.length*f-2,0));for(s=0;s<this.Si.length&&!(h=c,1===this.cq?h=c+(this.width-this.Si[s].width)/2:2===this.cq&&(h=c+(this.width-this.Si[s].width)),a.fillText(this.Si[s].text,h,d),d+=f,d>=e-f);s++);(0!==this.M||b)&&a.restore();this.tn=this.i.hf};e.tf=function(a){if(!(1>this.width||1>this.height)){var b=this.Ul||this.qz;this.qz=
!1;var c=this.H.ee(),d=this.H.Bc(),e=this.Nl,f=c*this.width,h=c*this.height,s=Math.ceil(f),t=Math.ceil(h),p=this.i.Ka/2,y=this.i.Ja/2;this.uk||(this.eh=document.createElement("canvas"),this.eh.width=s,this.eh.height=t,this.vq=s,this.uq=t,b=!0,this.uk=this.eh.getContext("2d"));if(s!==this.vq||t!==this.uq)this.eh.width=s,this.eh.height=t,this.Le&&(a.deleteTexture(this.Le),this.Le=null),b=!0;b&&(this.uk.clearRect(0,0,s,t),this.Lg(this.uk,!0),this.Le||(this.Le=a.Fh(s,t,this.i.qb,this.i.Sg)),a.gH(this.eh,
this.Le,this.i.Sg));this.vq=s;this.uq=t;a.gf(this.Le);a.Pl(this.opacity);a.kh();a.translate(-p,-y);a.sh();var A=this.ub,b=this.H.xb(A.Hc,A.Ic,!0,!0),p=this.H.xb(A.Hc,A.Ic,!1,!0),y=this.H.xb(A.ne,A.oe,!0,!0),D=this.H.xb(A.ne,A.oe,!1,!0),w=this.H.xb(A.$d,A.ae,!0,!0),G=this.H.xb(A.$d,A.ae,!1,!0),I=this.H.xb(A.Yd,A.Zd,!0,!0),A=this.H.xb(A.Yd,A.Zd,!1,!0);if(this.i.ej||0===this.M&&0===d)var E=(b+.5|0)-b,z=(p+.5|0)-p,b=b+E,p=p+z,y=y+E,D=D+z,w=w+E,G=G+z,I=I+E,A=A+z;0===this.M&&0===d?(y=b+s,D=p,w=y,G=p+t,
I=b,A=G,e.right=1,e.bottom=1):(e.right=f/s,e.bottom=h/t);a.fj(b,p,y,D,w,G,I,A,e);a.kh();a.scale(c,c);a.sv(-this.H.Bc());a.translate((this.H.Tc+this.H.sd)/-2,(this.H.Uc+this.H.rd)/-2);a.sh();this.tn=this.i.hf}};var f=[];d.nC=function(a){f.length=0;for(var b="",c,d=0;d<a.length;)if(c=a.charAt(d),"\n"===c)b.length&&(f.push(b),b=""),f.push("\n"),++d;else if(" "===c||"\t"===c||"-"===c){do b+=a.charAt(d),d++;while(d<a.length&&(" "===a.charAt(d)||"\t"===a.charAt(d)));f.push(b);b=""}else d<a.length&&(b+=
c,d++);b.length&&f.push(b)};var h=[];d.rC=function(b,d,e,f,k){if(b&&b.length)if(2>=f)c(d);else{if(100>=b.length&&-1===b.indexOf("\n")){var h=e.measureText(b).width;if(h<=f){c(d);d.push(a());d[0].text=b;d[0].width=h;return}}this.sC(b,d,e,f,k)}else c(d)};d.sC=function(b,c,d,e,k){k&&(this.nC(b),b=f);var r="",q,s,t,p=0;for(t=0;t<b.length;t++)"\n"===b[t]?(p>=c.length&&c.push(a()),s=c[p],s.text=r,s.width=d.measureText(r).width,p++,r=""):(q=r,r+=b[t],s=d.measureText(r).width,s>=e&&(p>=c.length&&c.push(a()),
s=c[p],s.text=q,s.width=d.measureText(q).width,p++,r=b[t],k||" "!==r||(r="")));r.length&&(p>=c.length&&c.push(a()),s=c[p],s.text=r,s.width=d.measureText(r).width,p++);for(t=p;t<c.length;t++)h.push(c[t]);c.length=p};d.W=new function(){};d.Lc=new function(){};b.prototype.Text=function(a){a.Ne(this.text)};d.Ce=new b})();function kc(a){this.i=a}
(function(){function a(a){l=a.x;n=a.y;k=a.z}function c(a){r=a.x;q=a.y;s=a.z}function b(a,b,c,e){var f;f=t.length?t.pop():new d;f.init(a,b,c,e);return f}function d(){this.mo=this.id=this.y=this.x=this.Gr=this.Fr=this.iu=this.time=this.Iv=0;this.so=this.Pr=!1}function e(){}function f(){}var h=kc.prototype;h.vc=function(a){this.Ec=a;this.i=a.i};h.vc.prototype.lb=function(){};h.Xb=function(a){this.type=a;this.i=a.i;this.touches=[];this.Su=!1};var g=h.Xb.prototype,m={left:0,top:0};g.Pm=function(a){var b,
c;b=0;for(c=this.touches.length;b<c;b++)if(this.touches[b].id===a)return b;return-1};var l=0,n=0,k=0,r=0,q=0,s=0,t=[];d.prototype.init=function(a,b,c,d){var e=Qa();this.Iv=this.iu=this.time=e;this.Fr=a;this.Gr=b;this.x=a;this.y=b;this.id=c;this.mo=d;this.so=this.Pr=!1};d.prototype.update=function(a,b,c){this.iu=this.time;this.time=a;this.x=b;this.y=c;!this.so&&15<=La(this.Fr,this.Gr,this.x,this.y)&&(this.so=!0)};d.prototype.SF=function(a,b){!this.Pr&&500<=Qa()-this.Iv&&!this.so&&15>La(this.Fr,this.Gr,
this.x,this.y)&&(this.Pr=!0,a.rh=this.mo,a.Vl=this.id,a.gl=b,a.i.trigger(kc.prototype.W.PB,a),a.Hh=this.x,a.Ih=this.y,a.i.trigger(kc.prototype.W.QB,a),a.gl=0)};var p=-1E3,y=-1E3,A=-1E4;d.prototype.nz=function(a,b){if(!this.Pr){var c=Qa();333>=c-this.Iv&&!this.so&&15>La(this.Fr,this.Gr,this.x,this.y)&&(a.rh=this.mo,a.Vl=this.id,a.gl=b,666>=c-A&&25>La(p,y,this.x,this.y)?(a.i.trigger(kc.prototype.W.LB,a),a.Hh=this.x,a.Ih=this.y,a.i.trigger(kc.prototype.W.MB,a),y=p=-1E3,A=-1E4):(a.i.trigger(kc.prototype.W.YB,
a),a.Hh=this.x,a.Ih=this.y,a.i.trigger(kc.prototype.W.ZB,a),p=this.x,y=this.y,A=c),a.gl=0)}};g.lb=function(){this.lF=!("undefined"===typeof window.c2isWindows8||!window.c2isWindows8);this.gl=this.Vl=this.rh=this.Ih=this.Hh=this.Uw=this.Tw=this.Sw=this.IC=this.HC=this.GC=this.Wn=this.Vn=this.Un=0;this.dH=0!==this.V[0];var b=0<this.i.De?document:this.i.canvas,d=document;this.i.Ad?d=b=window.Canvas:this.i.zf&&(d=b=window);var e=this;window.navigator.pointerEnabled?(b.addEventListener("pointerdown",function(a){e.zz(a)},
!1),b.addEventListener("pointermove",function(a){e.yz(a)},!1),d.addEventListener("pointerup",function(a){e.Yq(a,!1)},!1),d.addEventListener("pointercancel",function(a){e.Yq(a,!0)},!1),this.i.canvas&&(this.i.canvas.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1),document.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1),this.i.canvas.addEventListener("gesturehold",function(a){a.preventDefault()},!1),document.addEventListener("gesturehold",function(a){a.preventDefault()},
!1))):window.navigator.msPointerEnabled?(b.addEventListener("MSPointerDown",function(a){e.zz(a)},!1),b.addEventListener("MSPointerMove",function(a){e.yz(a)},!1),d.addEventListener("MSPointerUp",function(a){e.Yq(a,!1)},!1),d.addEventListener("MSPointerCancel",function(a){e.Yq(a,!0)},!1),this.i.canvas&&(this.i.canvas.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1),document.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1))):(b.addEventListener("touchstart",function(a){e.Cz(a)},
!1),b.addEventListener("touchmove",function(a){e.Bz(a)},!1),d.addEventListener("touchend",function(a){e.Zu(a,!1)},!1),d.addEventListener("touchcancel",function(a){e.Zu(a,!0)},!1));if(this.lF){var f=function(a){a=a.reading;e.Sw=a.accelerationX;e.Tw=a.accelerationY;e.Uw=a.accelerationZ},g=function(a){a=a.reading;e.Un=a.yawDegrees;e.Vn=a.pitchDegrees;e.Wn=a.rollDegrees},k=Windows.Devices.Sensors.Accelerometer.getDefault();k&&(k.reportInterval=Math.max(k.minimumReportInterval,16),k.addEventListener("readingchanged",
f));var h=Windows.Devices.Sensors.Inclinometer.getDefault();h&&(h.reportInterval=Math.max(h.minimumReportInterval,16),h.addEventListener("readingchanged",g));document.addEventListener("visibilitychange",function(){document.hidden||document.msHidden?(k&&k.removeEventListener("readingchanged",f),h&&h.removeEventListener("readingchanged",g)):(k&&k.addEventListener("readingchanged",f),h&&h.addEventListener("readingchanged",g))},!1)}else window.addEventListener("deviceorientation",function(a){e.Un=a.alpha||
0;e.Vn=a.beta||0;e.Wn=a.gamma||0},!1),window.addEventListener("devicemotion",function(a){a.accelerationIncludingGravity&&(e.GC=a.accelerationIncludingGravity.x||0,e.HC=a.accelerationIncludingGravity.y||0,e.IC=a.accelerationIncludingGravity.z||0);a.acceleration&&(e.Sw=a.acceleration.x||0,e.Tw=a.acceleration.y||0,e.Uw=a.acceleration.z||0)},!1);this.dH&&!this.i.Db&&(jQuery(document).mousemove(function(a){e.eG(a)}),jQuery(document).mousedown(function(a){e.dG(a)}),jQuery(document).mouseup(function(a){e.fG(a)}));
this.i.il&&!this.i.Ad&&AppMobi.accelerometer.watchAcceleration(a,{frequency:40,adjustForRotation:!0});this.i.Bf&&navigator.accelerometer&&navigator.accelerometer.watchAcceleration&&navigator.accelerometer.watchAcceleration(c,null,{frequency:40});this.i.VG(this)};g.yz=function(a){if(a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType){a.preventDefault&&a.preventDefault();var b=this.Pm(a.pointerId),c=Qa();if(0<=b){var d=this.i.Db?m:jQuery(this.i.canvas).offset(),b=this.touches[b];2>c-b.time||
b.update(c,a.pageX-d.left,a.pageY-d.top)}}};g.zz=function(a){if(a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType){a.preventDefault&&cb(a)&&a.preventDefault();var c=this.i.Db?m:jQuery(this.i.canvas).offset(),d=a.pageX-c.left,c=a.pageY-c.top;Qa();this.rh=this.touches.length;this.Vl=a.pointerId;this.touches.push(b(d,c,a.pointerId,this.rh));this.i.Af=!0;this.i.trigger(kc.prototype.W.xw,this);this.i.trigger(kc.prototype.W.Aw,this);this.Hh=d;this.Ih=c;this.i.trigger(kc.prototype.W.zw,this);
this.i.Af=!1}};g.Yq=function(a,b){if(a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType){a.preventDefault&&cb(a)&&a.preventDefault();var c=this.Pm(a.pointerId);this.rh=0<=c?this.touches[c].mo:-1;this.Vl=0<=c?this.touches[c].id:-1;this.i.Af=!0;this.i.trigger(kc.prototype.W.ww,this);this.i.trigger(kc.prototype.W.yw,this);0<=c&&(b||this.touches[c].nz(this,c),100>t.length&&t.push(this.touches[c]),this.touches.splice(c,1));this.i.Af=!1}};g.Bz=function(a){a.preventDefault&&a.preventDefault();
var b=Qa(),c,d,e,f;c=0;for(d=a.changedTouches.length;c<d;c++)if(e=a.changedTouches[c],f=this.Pm(e.identifier),0<=f){var g=this.i.Db?m:jQuery(this.i.canvas).offset();f=this.touches[f];2>b-f.time||f.update(b,e.pageX-g.left,e.pageY-g.top)}};g.Cz=function(a){a.preventDefault&&cb(a)&&a.preventDefault();var c=this.i.Db?m:jQuery(this.i.canvas).offset();Qa();this.i.Af=!0;var d,e,f,g;d=0;for(e=a.changedTouches.length;d<e;d++)if(f=a.changedTouches[d],g=this.Pm(f.identifier),-1===g){g=f.pageX-c.left;var k=f.pageY-
c.top;this.rh=this.touches.length;this.Vl=f.identifier;this.touches.push(b(g,k,f.identifier,this.rh));this.i.trigger(kc.prototype.W.xw,this);this.i.trigger(kc.prototype.W.Aw,this);this.Hh=g;this.Ih=k;this.i.trigger(kc.prototype.W.zw,this)}this.i.Af=!1};g.Zu=function(a,b){a.preventDefault&&cb(a)&&a.preventDefault();this.i.Af=!0;var c,d,e;c=0;for(d=a.changedTouches.length;c<d;c++)e=a.changedTouches[c],e=this.Pm(e.identifier),0<=e&&(this.rh=this.touches[e].mo,this.Vl=this.touches[e].id,this.i.trigger(kc.prototype.W.ww,
this),this.i.trigger(kc.prototype.W.yw,this),b||this.touches[e].nz(this,e),100>t.length&&t.push(this.touches[e]),this.touches.splice(e,1));this.i.Af=!1};g.BI=function(){return this.i.il&&0===this.Un&&0!==k?90*k:this.i.Bf&&0===this.Un&&0!==s?90*s:this.Un};g.CI=function(){return this.i.il&&0===this.Vn&&0!==n?-90*n:this.i.Bf&&0===this.Vn&&0!==q?-90*q:this.Vn};g.FI=function(){return this.i.il&&0===this.Wn&&0!==l?90*l:this.i.Bf&&0===this.Wn&&0!==r?90*r:this.Wn};g.dG=function(a){a.preventDefault&&this.i.Gt&&
!this.i.Sg&&a.preventDefault();this.Cz({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]});this.Su=!0};g.eG=function(a){this.Su&&this.Bz({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]})};g.fG=function(a){a.preventDefault&&this.i.Gt&&!this.i.Sg&&a.preventDefault();this.i.Gt=!0;this.Zu({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]});this.Su=!1};g.qo=function(){var a,b,c,d=Qa();a=0;for(b=this.touches.length;a<b;++a)c=this.touches[a],c.time<=d-50&&(c.iu=d),c.SF(this,
a)};e.prototype.Aw=function(){return!0};e.prototype.yw=function(){return!0};e.prototype.zw=function(a){return a?this.i.Ir(a,this.Hh,this.Ih):!1};e.prototype.xw=function(a){a=Math.floor(a);return a===this.rh};e.prototype.ww=function(a){a=Math.floor(a);return a===this.rh};e.prototype.PB=function(){return!0};e.prototype.YB=function(){return!0};e.prototype.LB=function(){return!0};e.prototype.QB=function(a){return a?this.i.Ir(a,this.Hh,this.Ih):!1};e.prototype.ZB=function(a){return a?this.i.Ir(a,this.Hh,
this.Ih):!1};e.prototype.MB=function(a){return a?this.i.Ir(a,this.Hh,this.Ih):!1};h.W=new e;f.prototype.uC=function(a,b){var c=this.gl;if(0>c||c>=this.touches.length)a.na(0);else{var d,e,f,g,k;ga(b)?(d=this.i.Um(0),e=d.scale,f=d.xg,g=d.Jf,k=d.M,d.scale=1,d.xg=1,d.Jf=1,d.M=0,a.na(d.xe(this.touches[c].x,this.touches[c].y,!0)),d.scale=e,d.xg=f,d.Jf=g,d.M=k):(d=ha(b)?this.i.Um(b):this.i.At(b))?a.na(d.xe(this.touches[c].x,this.touches[c].y,!0)):a.na(0)}};f.prototype.vC=function(a,b){var c=this.gl;if(0>
c||c>=this.touches.length)a.na(0);else{var d,e,f,g,k;ga(b)?(d=this.i.Um(0),e=d.scale,f=d.xg,g=d.Kf,k=d.M,d.scale=1,d.xg=1,d.Kf=1,d.M=0,a.na(d.xe(this.touches[c].x,this.touches[c].y,!1)),d.scale=e,d.xg=f,d.Kf=g,d.M=k):(d=ha(b)?this.i.Um(b):this.i.At(b))?a.na(d.xe(this.touches[c].x,this.touches[c].y,!1)):a.na(0)}};h.Ce=new f})();function lc(a){this.i=a}
(function(){function a(){}function c(){}var b=lc.prototype;b.vc=function(a){this.behavior=a;this.i=a.i};b.vc.prototype.lb=function(){this.Sn=[];this.Hi=[]};var d={};b.Xb=function(a,b){this.type=a;this.behavior=a.behavior;this.r=b;this.i=a.i};var e=b.Xb.prototype;e.lb=function(){this.xc=this.V[0];3>this.xc&&(this.xc=3);this.bg=this.V[1];this.YF=this.V[2];this.dh=this.V[3];this.Eg=this.V[4];this.Jg=this.V[5];this.Zo=x(this.V[6]);this.qr=0!==this.V[7];this.Fp=0!==this.V[8];this.enabled=0!==this.V[9];
this.Ym=this.Op=this.Sq=this.kl=!1;this.he=0;this.Qi=this.G=this.r.M;this.co=this.hh=this.gh=this.kc=0;this.tk=Math.ceil(this.i.Ib.width/this.xc);this.Il=Math.ceil(this.i.Ib.height/this.xc);this.gc=[];this.Km=!1;this.Xs=this.Ws=0;this.hq=this.kq=!1;this.qx=this.ox=0;this.Nx=!0;var a=this;this.je||(this.kG=function(){a.kq||(a.hq=!1,a.eD(),a.Ym=0<a.gc.length,a.he=0,a.i.trigger(lc.prototype.W.WB,a.r),a.Zs())},this.jG=function(){a.kq||(a.hq=!1,a.wx(),a.Ym=!1,a.kl=!1,a.he=0,a.i.trigger(lc.prototype.W.NB,
a.r),a.Zs())})};e.bj=function(){this.kq=!0;this.Km=!1};e.Fd=function(){var a={cs:this.xc,cb:this.bg,ms:this.dh,acc:this.Eg,dec:this.Jg,av:this.Zo,re:this.qr,de:this.Fp,im:this.kl,mfs:this.Sq,ftmwm:this.Op,hp:this.Ym,mn:this.he,a:this.G,lka:this.Qi,s:this.kc,rx:this.gh,ry:this.hh,ra:this.co,myhc:this.tk,myvc:this.Il,path:this.gc,en:this.enabled,fr:this.Nx,obs:[],costs:[]};this.hq?(a.dfp=!0,a.dpx=this.ox,a.dpy=this.qx):(a.dfp=this.Km,a.dpx=this.Ws,a.dpy=this.Xs);var b,c;b=0;for(c=this.type.Sn.length;b<
c;b++)a.obs.push(this.type.Sn[b].Pa);b=0;for(c=this.type.Hi.length;b<c;b++)a.costs.push({sid:this.type.Hi[b].ta.Pa,cost:this.type.Hi[b].Bx});return a};e.fe=function(a){this.xc=a.cs;this.bg=a.cb;this.dh=a.ms;this.Eg=a.acc;this.Jg=a.dec;this.Zo=a.av;this.qr=a.re;this.Fp=a.de;this.kl=a.im;this.Sq=a.mfs;this.Op=a.ftmwm;this.Ym=a.hp;this.he=a.mn;this.G=a.a;this.Qi=a.lka;this.kc=a.s;this.gh=a.rx;this.hh=a.ry;this.co=a.ra;this.tk=a.myhc;this.Il=a.myvc;this.gc=a.path;this.enabled=a.en;this.Nx=a.fr;this.Km=
a.dfp;this.Ws=a.dpx;this.Xs=a.dpy;this.type.Sn.length=0;var b=a.obs,c,d,e;c=0;for(d=b.length;c<d;c++)(e=this.i.fl(b[c]))&&this.type.Sn.push(e);this.type.Hi.length=0;a=a.costs;c=0;for(d=a.length;c<d;c++)(e=this.i.fl(a[c].sid))&&this.type.Hi.push({ta:e,Bx:a[c].cost});this.Sj().vk.setDiagonals(this.Fp)};e.Yf=function(){this.Sj().eo=!0};e.tc=function(){if(this.enabled&&this.kl){this.qr&&this.r.M!==this.Qi&&(this.G=this.r.M);var a=this.i.Tm(this.r),b,c,d,e,f,h=this.r,s=Math.min(.4*this.dh,2*Math.abs(this.r.width)),
t=Math.max(1.5*this.kc,30);this.he<this.gc.length?(e=this.gc[this.he].x,f=this.gc[this.he].y,d=La(this.gh,this.hh,e,f),d<3*t*a&&(this.he++,this.gh=e,this.hh=f,this.he<this.gc.length&&(e=this.gc[this.he].x,f=this.gc[this.he].y))):(e=this.gc[this.gc.length-1].x,f=this.gc[this.gc.length-1].y);this.co=Ga(this.gh,this.hh,e,f);d=La(h.x,h.y,this.gh,this.hh);d<s&&this.he<this.gc.length&&(this.Op?this.Op=!1:s=t*a,this.gh+=Math.cos(this.co)*s,this.hh+=Math.sin(this.co)*s);b=Ga(h.x,h.y,this.gh,this.hh);c=Ha(this.G,
b);s=La(h.x,h.y,this.gc[this.gc.length-1].x,this.gc[this.gc.length-1].y);t=this.dh*this.dh/(2*this.Jg);1<d&&(this.G=Ia(this.G,b,this.Zo*a),.5>=Ba(c)?c=this.dh:120<=Ba(c)||this.Sq&&0===this.he?(c=0,this.Sq=!0):(b=c/this.Zo,d=La(h.x,h.y,this.gh,this.hh),d/=2*Math.sin(c),c=d*c/b,0>c&&(c=0),c>this.dh&&(c=this.dh)),s<t&&(c=Math.min(c,s/t*this.dh+this.dh/40)),this.kc+=this.Eg*a,this.kc>c&&(this.kc=c));h.x+=Math.cos(this.G)*this.kc*a;h.y+=Math.sin(this.G)*this.kc*a;this.qr&&(this.Qi=h.M=this.G);h.ea();this.he===
this.gc.length&&La(h.x,h.y,e,f)<Math.max(3*this.kc*a,10)&&(this.Ym=this.kl=!1,this.kc=this.he=0,this.i.trigger(lc.prototype.W.GB,h))}};e.qo=function(){this.enabled&&(this.sE(),this.Zs())};e.Zs=function(){this.Km&&!this.kq&&(this.Km=!1,this.sD(this.r.x,this.r.y,this.Ws,this.Xs))};e.Sj=function(){var a=""+this.xc+","+this.bg;d.hasOwnProperty(a)||(d[a]={vk:new window.Pathfinder,cells:null,eo:!1,yk:[]});return d[a]};e.sE=function(){var a=this.Sj();if(!a.vk.isReady()||a.eo||a.yk.length){var b,c,d,e,f,
h,s,t,p,y;if(!a.vk.isReady()||a.eo){b=[];e=b.length=this.tk;f=this.Il;for(c=0;c<e;++c)for(b[c]=[],b[c].length=f,d=0;d<f;++d)b[c][d]=this.Xz(c,d);a.cells=b;a.vk.init(this.tk,this.Il,b,this.Fp);a.eo=!1;a.yk.length=0}else if(a.yk.length){h=0;for(s=a.yk.length;h<s;++h){b=a.yk[h];t=b[0];p=b[1];e=b[2];c=b[3];b=[];e-=t;f=c-p;b.length=e;for(c=0;c<e;++c)for(b[c]=[],b[c].length=f,d=0;d<f;++d)y=this.Xz(t+c,p+d),b[c][d]=y,a.cells[t+c][p+d]=y;a.vk.updateRegion(t,p,e,f,b)}a.yk.length=0}}};e.wx=function(){var a,
b;a=0;for(b=this.gc.length;a<b;a++)window.freeResultNode(this.gc[a]);this.gc.length=0};e.eD=function(){var a=this.Sj().vk.pathList;this.wx();var b,c,d,e;b=0;for(c=a.length;b<c;b++)d=a[b],e=window.allocResultNode(),e.x=(d.x+.5)*this.xc,e.y=(d.y+.5)*this.xc,this.gc.push(e)};var f=[],h=new sa;e.Xz=function(a,b){var c,d,e,r,q,s=0;h.left=a*this.xc-this.bg;h.top=b*this.xc-this.bg;h.right=(a+1)*this.xc+this.bg;h.bottom=(b+1)*this.xc+this.bg;if(0===this.YF){if(this.i.TG(h))return window.PF_OBSTACLE}else{this.i.Dt(this.r.H,
this.type.Sn,h,f);c=0;for(d=f.length;c<d;++c)if(this.i.Kv(h,f[c]))return f.length=0,window.PF_OBSTACLE;f.length=0}c=0;for(d=this.type.Hi.length;c<d;c++){e=this.type.Hi[c].ta;q=this.type.Hi[c].Bx;this.i.xt(this.r.H,e,h,f);e=0;for(r=f.length;e<r;++e)this.i.Kv(h,f[e])&&(s+=q);f.length=0}return s};e.sD=function(a,b,c,d){var e=this.Sj().vk;if(e.isReady()){this.hq=!0;this.ox=c;this.qx=d;a=Math.floor(a/this.xc);b=Math.floor(b/this.xc);c=Math.floor(c/this.xc);d=Math.floor(d/this.xc);var f,h,s,t,p,y,A;if(e.at(c,
d)===window.PF_OBSTACLE){f=1E6;for(t=s=h=0;t<this.tk;t++)for(p=0;p<this.Il;p++)e.at(t,p)!==window.PF_OBSTACLE&&(y=c-t,A=d-p,y=y*y+A*A,y<f&&(f=y,h=t,s=p));c=h;d=s}e.findPath(a,b,c,d,this.kG,this.jG)}};e.Xq=function(){this.Sj().eo=!0};a.prototype.WB=function(){return!0};a.prototype.NB=function(){return!0};a.prototype.GB=function(){return!0};b.W=new a;c.prototype.Lw=function(){this.kl=!1};e.yI=function(a,b,c,d){var e=Math.min(a,c)-this.bg,f=Math.min(b,d)-this.bg;a=Math.max(a,c)+this.bg;b=Math.max(b,
d)+this.bg;e=Math.max(Math.floor(e/this.xc),0);f=Math.max(Math.floor(f/this.xc),0);a=Math.min(Math.ceil(a/this.xc),this.tk);b=Math.min(Math.ceil(b/this.xc),this.Il);e>=a||f>=b||this.Sj().yk.push([e,f,a,b])};b.Lc=new c;b.Ce=new function(){}})();function Q(a,c){for(var b in c.prototype)c.prototype.hasOwnProperty(b)&&(a.prototype[b]=c.prototype[b])}
if(navigator.isCocoonJS&&"undefined"!==typeof window.cr_cjs_accelerated_physics)ea("Using CocoonJS native physics"),window.ext&&"undefined"!==typeof window.ext.IDTK_SRV_BOX2D?function(){function a(a,b,d,e){this.type=c.Yk;this.Eb=new n;this.Fb=new n;this.vg=null;void 0!==a&&(this.K=a);void 0!==b&&(this.L=b);void 0!==d&&this.Eb.F(d);void 0!==e&&this.Fb.F(e);this.Gl=this.lz=this.Sv=this.xu=this.jh=0;this.Zk=this.Oj=!1}function c(a){this.K=a.K;this.L=a.L;this.vg=a.vg;this.type=a.type;this.next=null}function b(a,
b){this.Gq=[];this.Ob=[];this.lk=[];this.Zh=null;this.GF=[];this.fc=window.ext.IDTK_SRV_BOX2D.makeCall("createWorld",a.x,a.y,b)}function d(){}function e(a,b,c){this.Rb=a;this.Nb=b;this.NF=c}function f(a,b){var c=a.vg;a.vg=null;this.Oa=b;this.A=new m(a.position,l.Lk(a.M));this.Gn=[];this.Cn=a.xd;a.type===f.Te&&(a.dg=0);this.Cc=window.ext.IDTK_SRV_BOX2D.makeCall("createBody",b.fc,a);a.vg=c}function h(a,b,c,d){this.En=a;this.Cu=c;this.fi={};this.fi.Rd=n.q(0,0);this.Jq=!1;this.Hq=d.dg;this.Eu=d.Pg;this.Lu=
d.lh;this.Jq=d.Wt}function g(){}function m(a,b){this.position=n.q(0,0);this.n=new l;void 0===a&&(a=null);void 0===b&&(b=null);a&&(this.position.F(a),this.n.Uf(b))}function l(){this.j=n.q(0,0);this.k=n.q(0,0);this.yi()}function n(a,b){void 0===a&&(a=0);void 0===b&&(b=0);this.x=a;this.y=b}R=n;n.Bh=[];n.q=function(a,b){if(0<R.Bh.length){var c=R.Bh.pop();c.Set(a,b);return c}return new R(a,b)};n.lc=function(a){1E4>R.Bh.length&&R.Bh.push(a)};n.prototype.fa=function(){this.y=this.x=0};n.prototype.Set=function(a,
b){void 0===a&&(a=0);void 0===b&&(b=0);this.x=a;this.y=b};n.prototype.F=function(a){this.x=a.x;this.y=a.y};n.KH=function(a,b){void 0===a&&(a=0);void 0===b&&(b=0);return n.q(a,b)};n.prototype.uc=function(){return n.q(this.x,this.y)};n.prototype.xh=function(a){this.x+=a.x;this.y+=a.y};n.prototype.zs=function(a){this.x-=a.x;this.y-=a.y};n.prototype.Ld=function(a){void 0===a&&(a=0);this.x*=a;this.y*=a};n.prototype.Cg=function(){return Math.sqrt(this.x*this.x+this.y*this.y)};n.prototype.Qo=function(){return this.x*
this.x+this.y*this.y};n.prototype.Md=function(){var a=Math.sqrt(this.x*this.x+this.y*this.y);if(a<Number.MIN_VALUE)return 0;var b=1/a;this.x*=b;this.y*=b;return a};n.prototype.ns=function(){this.x=-this.x;this.y=-this.y};S=l;l.Lk=function(a){void 0===a&&(a=0);var b=new l;b.Set(a);return b};l.Bg=function(a,b){var c=new l;c.xs(a,b);return c};l.prototype.Set=function(a){void 0===a&&(a=0);var b=Math.cos(a);a=Math.sin(a);this.j.x=b;this.k.x=-a;this.j.y=a;this.k.y=b};l.prototype.xs=function(a,b){this.j.F(a);
this.k.F(b)};l.prototype.uc=function(){var a=new l;a.Uf(this);return a};l.prototype.Uf=function(a){this.j.F(a.j);this.k.F(a.k)};l.prototype.Ao=function(a){this.j.x+=a.j.x;this.j.y+=a.j.y;this.k.x+=a.k.x;this.k.y+=a.k.y};l.prototype.yi=function(){this.j.x=1;this.k.x=0;this.j.y=0;this.k.y=1};l.prototype.fa=function(){this.j.x=0;this.k.x=0;this.j.y=0;this.k.y=0};l.prototype.Jd=function(){return Math.atan2(this.j.y,this.j.x)};l.prototype.as=function(a){var b=this.j.x,c=this.k.x,d=this.j.y,e=this.k.y,
f=b*e-c*d;0!==f&&(f=1/f);a.j.x=f*e;a.k.x=-f*c;a.j.y=-f*d;a.k.y=f*b;return a};l.prototype.Ai=function(a,b,c){void 0===b&&(b=0);void 0===c&&(c=0);var d=this.j.x,e=this.k.x,f=this.j.y,g=this.k.y,h=d*g-e*f;0!==h&&(h=1/h);a.x=h*(g*b-e*c);a.y=h*(d*c-f*b);return a};l.prototype.wh=function(){this.j.wh();this.k.wh()};mc=m;m.prototype.mc=function(a,b){this.position.F(a);this.n.Uf(b)};m.prototype.yi=function(){this.position.fa();this.n.yi()};m.prototype.Set=function(a){this.position.F(a.position);this.n.Uf(a.n)};
m.prototype.Ro=function(){return Math.atan2(this.n.j.y,this.n.j.x)};T=g;g.Po=function(a){void 0===a&&(a=0);return isFinite(a)};g.Pb=function(a,b){return a.x*b.x+a.y*b.y};g.pj=function(a,b){return a.x*b.y-a.y*b.x};g.yh=function(a,b){void 0===b&&(b=0);return n.q(b*a.y,-b*a.x)};g.Xr=function(a,b){void 0===a&&(a=0);return n.q(-a*b.y,a*b.x)};g.Zb=function(a,b){return n.q(a.j.x*b.x+a.k.x*b.y,a.j.y*b.x+a.k.y*b.y)};g.zh=function(a,b){return n.q(g.Pb(b,a.j),g.Pb(b,a.k))};g.Kc=function(a,b){var c=g.Zb(a.n,
b);c.x+=a.position.x;c.y+=a.position.y;return c};g.ks=function(a,b){var c=g.Cb(b,a.position),d=c.x*a.n.j.x+c.y*a.n.j.y;c.y=c.x*a.n.k.x+c.y*a.n.k.y;c.x=d;return c};g.fm=function(a,b){return n.q(a.x+b.x,a.y+b.y)};g.Cb=function(a,b){return n.q(a.x-b.x,a.y-b.y)};g.lB=function(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)};g.gw=function(a,b){var c=a.x-b.x,d=a.y-b.y;return c*c+d*d};g.AB=function(a,b){void 0===a&&(a=0);return n.q(a*b.x,a*b.y)};g.$A=function(a,b){return l.Bg(g.fm(a.j,b.j),g.fm(a.k,
b.k))};g.BB=function(a,b){return l.Bg(g.Zb(a,b.j),g.Zb(a,b.k))};g.CB=function(a,b){var c=n.q(g.Pb(a.j,b.j),g.Pb(a.k,b.j)),d=n.q(g.Pb(a.j,b.k),g.Pb(a.k,b.k));return l.Bg(c,d)};g.wh=function(a){void 0===a&&(a=0);return 0<a?a:-a};g.cm=function(a){return n.q(g.wh(a.x),g.wh(a.y))};g.YA=function(a){return l.Bg(g.cm(a.j),g.cm(a.k))};g.qw=function(a,b){void 0===a&&(a=0);void 0===b&&(b=0);return a<b?a:b};g.rw=function(a,b){return n.q(g.qw(a.x,b.x),g.qw(a.y,b.y))};g.ow=function(a,b){void 0===a&&(a=0);void 0===
b&&(b=0);return a>b?a:b};g.pw=function(a,b){return n.q(g.ow(a.x,b.x),g.ow(a.y,b.y))};g.Kb=function(a,b,c){void 0===a&&(a=0);void 0===b&&(b=0);void 0===c&&(c=0);return a<b?b:a>c?c:a};g.dB=function(a,b,c){return g.pw(b,g.rw(a,c))};g.qI=function(a,b){var c=a[0];a[0]=b[0];b[0]=c};g.YH=function(){return 2*Math.random()-1};g.ZH=function(a,b){void 0===a&&(a=0);void 0===b&&(b=0);var c=Math.random();return(b-a)*c+a};g.QH=function(a){void 0===a&&(a=0);a|=a>>1&2147483647;a|=a>>2&1073741823;a|=a>>4&268435455;
a|=a>>8&16777215;return(a|a>>16&65535)+1};g.GH=function(a){void 0===a&&(a=0);return 0<a&&0===(a&a-1)};g.TC=new n(0,0);g.SC=l.Bg(new n(1,0),new n(0,1));g.xI=new m(g.TC,g.SC);W=function(){this.position=n.q(0,0);this.ou=n.q(0,0);this.vg=null;this.M=0;this.ou.Set(0,0);this.Bj=this.ek=this.Zw=0;this.cx=this.Yw=!0;this.Gj=this.kt=!1;this.type=f.Te;this.xd=!0;this.ey=1};nc=h;h.prototype.Va=function(){return this.En};h.prototype.Jc=function(){console.log("fixture.GetShape not yet supported in CocoonJS Box2D binding");
return null};h.prototype.vj=function(){return this.Jq};oc=f;f.prototype.Jk=function(a){var b=a.vg;a.vg=null;var c=window.ext.IDTK_SRV_BOX2D.makeCall("createFixture",this.Oa.fc,this.Cc,a);a.vg=b;a=new h(this,0,c,a);this.Oa.lk[c]=a;this.Gn.push(a);return a};f.prototype.$r=function(){return 0===this.Gn.length?null:this.Gn[0]};f.prototype.fw=function(a){window.ext.IDTK_SRV_BOX2D.makeCall("deleteFixture",this.Oa.fc,a.Cu);delete this.Oa.lk[a.Cu]};f.prototype.ym=function(a,b){window.ext.IDTK_SRV_BOX2D.makeCall("setBodyTransform",
this.Oa.fc,this.Cc,a.x,a.y,b);this.A.n.Set(b);this.A.position.F(a)};f.prototype.ws=function(a){this.ym(a,this.Jd())};f.prototype.rj=function(){var a=window.ext.IDTK_SRV_BOX2D.makeCall("getLinearVelocity",this.Oa.fc,this.Cc);return n.q(a[0],a[1])};f.prototype.Nk=function(){var a=window.ext.IDTK_SRV_BOX2D.makeCall("getWorldCenter",this.Oa.fc,this.Cc);return n.q(a[0],a[1])};f.prototype.sj=function(){var a=window.ext.IDTK_SRV_BOX2D.makeCall("getLocalCenter",this.Oa.fc,this.Cc);return n.q(a[0],a[1])};
f.prototype.vd=function(a){return g.ks(this.A,a)};f.prototype.Mk=function(){return window.ext.IDTK_SRV_BOX2D.makeCall("getMass",this.Oa.fc,this.Cc)};f.prototype.wd=function(){return window.ext.IDTK_SRV_BOX2D.makeCall("isAwake",this.Oa.fc,this.Cc)};f.prototype.Ko=function(){return window.ext.IDTK_SRV_BOX2D.makeCall("getAngularVelocity",this.Oa.fc,this.Cc)};f.prototype.nd=function(a){window.ext.IDTK_SRV_BOX2D.makeCall("setAwake",this.Oa.fc,this.Cc,a)};f.prototype.xj=function(a){window.ext.IDTK_SRV_BOX2D.makeCall("setLinearVelocity",
this.Oa.fc,this.Cc,a.x,a.y)};f.prototype.yg=function(a,b,c){window.ext.IDTK_SRV_BOX2D.makeCall("applyForce",this.Oa.fc,this.Cc,a.x,a.y,b.x,b.y,c)};f.prototype.Bo=function(a,b){window.ext.IDTK_SRV_BOX2D.makeCall("applyTorque",this.Oa.fc,this.Cc,a,b)};f.prototype.wm=function(a){window.ext.IDTK_SRV_BOX2D.makeCall("setAngularVelocity",this.Oa.fc,this.Cc,a)};f.prototype.uj=function(){return this.Cn};f.prototype.Jd=function(){return this.A.n.Jd()};f.prototype.Ro=function(a){void 0===a&&(a=0);this.ym(this.A.position,
a)};f.prototype.vi=function(){for(var a=window.ext.IDTK_SRV_BOX2D.makeCall("getObjectContacts",this.Oa.fc,this.Cc),b=[],c=0;c<a.length;c++)b.push(this.Oa.Gq[a[c]]);return b};oc.Te=0;oc.hx=1;oc.Mc=2;e.prototype.gs=function(){return this.NF};pc=d;d.prototype.Co=function(){};pc.gx=new d;qc=function(){};rc=b;b.prototype.Hw=function(a){this.Zh=a};b.prototype.Gw=function(a){var b=this;window.ext.IDTK_SRV_BOX2D.makeCall("setContactFilter",this.fc,function(c,d){return a.yj(b.lk[c],b.lk[d])})};b.prototype.Wr=
function(a){a=new f(a,this);return this.Gq[a.Cc]=a};b.prototype.Ho=function(a){window.ext.IDTK_SRV_BOX2D.makeCall("deleteBody",this.fc,a.Cc);delete this.Gq[a.Cc];for(var b=0;b<a.Gn.length;++b)delete this.lk[a.Gn[b].Cu]};b.prototype.Go=function(a){if(a.K.Cc!==a.L.Cc){var b=a.K,d=a.L;a.K=b.Cc;a.L=d.Cc;var e="createDistanceJoint";a.type===c.Yk&&(e="createRevoluteJoint");var f=new c(a);f.FF=window.ext.IDTK_SRV_BOX2D.makeCall(e,this.fc,a);a.K=b;a.L=d;this.GF.push(f);return f}};b.prototype.Io=function(a){window.ext.IDTK_SRV_BOX2D.makeCall("destroyJoint",
this.fc,a.FF)};b.prototype.Ah=function(a,b,c){c=window.ext.IDTK_SRV_BOX2D.makeCall("step",this.fc,a,b,c);b=c[0];for(a=1;a<=4*b;a+=4){var d=this.Gq[c[a+0]];if(null===d)break;d.A.position.Set(c[a+1],c[a+2]);d.A.n.Set(c[a+3])}if(null!==this.Zh)for(c=window.ext.IDTK_SRV_BOX2D.makeCall("getLastContacts",this.fc),b=c[0],a=1;a<=3*b;a+=3){var d=c[a+2],f=this.lk[c[a+0]],g=this.lk[c[a+1]];"undefined"===typeof f||"undefined"===typeof g?console.log("One of the fixtures in a contact DOESN'T EXIST!!"):this.Zh.Co(new e(f,
g,d))}};b.prototype.ew=function(){window.ext.IDTK_SRV_BOX2D.makeCall("clearForces",this.fc)};sc=function(a){this.kr=a;this.type="circle"};Y=function(){};Y.prototype.So=function(a,b){this.type="box";this.width=a;this.height=b};Y.prototype.Ew=function(){this.type="edge"};Y.prototype.xm=function(a,b){this.type="polygon";this.WA=[];for(var c=0;c<b;c++)this.WA.push(a[c].x),this.WA.push(a[c].y)};tc=function(){this.vg=this.shape=null;this.Pg=.2;this.dg=this.lh=0;this.Wt=!1;this.filter={Wk:1,El:65535,Li:0}};
Z=c;c.prototype.km=function(){return this.K};c.prototype.Zr=function(){return this.L};c.prototype.Vc=function(){return this.type};c.$s=0;c.Yk=1;uc=function(a,b,d,e){this.type=c.$s;this.Eb=n.q(0,0);this.Fb=n.q(0,0);this.vg=null;void 0!==a&&(this.K=a);void 0!==b&&(this.L=b);void 0!==d&&this.Eb.F(d);void 0!==e&&this.Fb.F(e);void 0!==d&&void 0!==e&&(a=e.x-d.x,d=e.y-d.y,this.length=Math.sqrt(a*a+d*d));this.Ap=this.Tp=0};a.prototype.mc=function(a,b,c){this.K=a;this.L=b;this.Eb=this.K.vd(c);this.Fb=this.L.vd(c);
this.jh=this.L.Jd()-this.K.Jd()};vc=a}():console.log("The CocoonJS binding for Box2D has been ignored because ext.IDTK_SRV_BOX2D is not available");else{var T={},wc=2/180*Math.PI,xc=8/180*Math.PI,yc=.5*Math.PI,zc=yc*yc,Ac=2/180*Math.PI,Bc=Number.MIN_VALUE*Number.MIN_VALUE;T.Pb=function(a,c){return a.x*c.x+a.y*c.y};T.pj=function(a,c){return a.x*c.y-a.y*c.x};T.yh=function(a,c){return R.q(c*a.y,-c*a.x)};T.Xr=function(a,c){return R.q(-a*c.y,a*c.x)};T.Zb=function(a,c){return R.q(a.j.x*c.x+a.k.x*c.y,a.j.y*
c.x+a.k.y*c.y)};T.zh=function(a,c){return R.q(T.Pb(c,a.j),T.Pb(c,a.k))};T.Kc=function(a,c){var b=T.Zb(a.n,c);b.x+=a.position.x;b.y+=a.position.y;return b};T.ks=function(a,c){var b=T.Cb(c,a.position),d=b.x*a.n.j.x+b.y*a.n.j.y;b.y=b.x*a.n.k.x+b.y*a.n.k.y;b.x=d;return b};T.fm=function(a,c){return R.q(a.x+c.x,a.y+c.y)};T.Cb=function(a,c){return R.q(a.x-c.x,a.y-c.y)};T.lB=function(a,c){return Math.sqrt(T.gw(a,c))};T.gw=function(a,c){var b=a.x-c.x,d=a.y-c.y;return b*b+d*d};T.AB=function(a,c){return R.q(a*
c.x,a*c.y)};T.$A=function(a,c){return S.Bg(T.fm(a.j,c.j),T.fm(a.k,c.k))};T.BB=function(a,c){return S.Bg(T.Zb(a,c.j),T.Zb(a,c.k))};T.CB=function(a,c){var b=R.q(T.Pb(a.j,c.j),T.Pb(a.k,c.j)),d=R.q(T.Pb(a.j,c.k),T.Pb(a.k,c.k));return S.Bg(b,d)};T.cm=function(a){return R.q(Math.abs(a.x),Math.abs(a.y))};T.YA=function(a){return S.Bg(T.cm(a.j),T.cm(a.k))};T.Kb=function(a,c,b){return a<c?c:a>b?b:a};T.dB=function(a,c,b){return R.q(T.Kb(a.x,c.x,b.x),T.Kb(a.y,c.y,b.y))};var S=function(){this.j=R.q(0,0);this.k=
R.q(0,0);this.yi()};S.Lk=function(a){var c=new S;c.Set(a);return c};S.Bg=function(a,c){var b=new S;b.xs(a,c);return b};u=S.prototype;u.Set=function(a){var c=Math.cos(a);a=Math.sin(a);this.j.Set(c,a);this.k.Set(-a,c)};u.xs=function(a,c){this.j.F(a);this.k.F(c)};u.uc=function(){var a=new S;a.Uf(this);return a};u.Uf=function(a){this.j.F(a.j);this.k.F(a.k)};u.Ao=function(a){this.j.xh(a.j);this.k.xh(a.k)};u.yi=function(){this.j.Set(1,0);this.k.Set(0,1)};u.fa=function(){this.j.Set(0,0);this.k.Set(0,0)};
u.Jd=function(){return Math.atan2(this.j.y,this.j.x)};u.as=function(a){var c=this.j.x*this.k.y-this.k.x*this.j.y;0!==c&&(c=1/c);a.j.x=c*this.k.y;a.k.x=-c*this.k.x;a.j.y=-c*this.j.y;a.k.y=c*this.j.x;return a};u.Ai=function(a,c,b){var d=this.j.x*this.k.y-this.k.x*this.j.y;0!==d&&(d=1/d);a.x=d*(this.k.y*c-this.k.x*b);a.y=d*(this.j.x*b-this.j.y*c);return a};u.wh=function(){this.j.wh();this.k.wh()};var Dc=function(a,c,b){this.j=new Cc(0,0,0);this.k=new Cc(0,0,0);this.ua=new Cc(0,0,0);a&&this.j.F(a);c&&
this.k.F(c);b&&this.ua.F(b)};u=Dc.prototype;u.uc=function(){return new Dc(this.j,this.k,this.ua)};u.Uf=function(a){this.j.F(a.j);this.k.F(a.k);this.ua.F(a.ua)};u.Ao=function(a){this.j.x+=a.j.x;this.j.y+=a.j.y;this.j.z+=a.j.z;this.k.x+=a.k.x;this.k.y+=a.k.y;this.k.z+=a.k.z;this.ua.x+=a.ua.x;this.ua.y+=a.ua.y;this.ua.z+=a.ua.z};u.yi=function(){this.j.Set(1,0,0);this.k.Set(0,1,0);this.ua.Set(0,0,1)};u.fa=function(){this.j.Set(0,0,0);this.k.Set(0,0,0);this.ua.Set(0,0,0)};u.Rk=function(a,c,b){var d=this.j.x,
e=this.k.x,f=this.j.y,h=this.k.y,g=d*h-e*f;0!=g&&(g=1/g);a.x=g*(h*c-e*b);a.y=g*(d*b-f*c);return a};u.zm=function(a,c,b,d){var e=this.j.x,f=this.j.y,h=this.j.z,g=this.k.x,m=this.k.y,l=this.k.z,n=this.ua.x,k=this.ua.y,r=this.ua.z,q=e*(m*r-l*k)+f*(l*n-g*r)+h*(g*k-m*n);0!=q&&(q=1/q);a.x=q*(c*(m*r-l*k)+b*(l*n-g*r)+d*(g*k-m*n));a.y=q*(e*(b*r-d*k)+f*(d*n-c*r)+h*(c*k-b*n));a.z=q*(e*(m*d-l*b)+f*(l*c-g*d)+h*(g*b-m*c));return a};var Ec=function(){this.N=R.q(0,0);this.Yc=R.q(0,0);this.u=R.q(0,0)};Ec.prototype.Set=
function(a){this.N.F(a.N);this.Yc.F(a.Yc);this.u.F(a.u);this.nf=a.nf;this.G=a.G;this.Hd=a.Hd};Ec.prototype.uc=function(){var a=new Ec;a.N.F(this.N);a.Yc.F(this.Yc);a.u.F(this.u);a.nf=this.nf;a.G=this.G;a.Hd=this.Hd;return a};Ec.prototype.te=function(a,c){void 0===c&&(c=0);a.position.x=(1-c)*this.Yc.x+c*this.u.x;a.position.y=(1-c)*this.Yc.y+c*this.u.y;a.n.Set((1-c)*this.nf+c*this.G);var b=a.n;a.position.x-=b.j.x*this.N.x+b.k.x*this.N.y;a.position.y-=b.j.y*this.N.x+b.k.y*this.N.y};Ec.prototype.ti=function(a){void 0===
a&&(a=0);if(this.Hd<a&&1-this.Hd>Number.MIN_VALUE){var c=(a-this.Hd)/(1-this.Hd);this.Yc.x=(1-c)*this.Yc.x+c*this.u.x;this.Yc.y=(1-c)*this.Yc.y+c*this.u.y;this.nf=(1-c)*this.nf+c*this.G;this.Hd=a}};var mc=function(a,c){this.position=R.q(0,0);this.n=new S;a&&this.position.F(a);c&&this.n.Uf(c)};mc.prototype.mc=function(a,c){this.position.F(a);this.n.Uf(c)};mc.prototype.yi=function(){this.position.fa();this.n.yi()};mc.prototype.Set=function(a){this.position.F(a.position);this.n.Uf(a.n)};mc.prototype.Jd=
function(){return Math.atan2(this.n.j.y,this.n.j.x)};var R=function(a,c){this.x=a;this.y=c};R.Bh=[];R.q=function(a,c){if(0<R.Bh.length){var b=R.Bh.pop();b.Set(a,c);return b}return new R(a,c)};R.lc=function(a){R.Bh.push(a)};u=R.prototype;u.fa=function(){this.y=this.x=0};u.Set=function(a,c){this.x=a;this.y=c};u.F=function(a){this.x=a.x;this.y=a.y};u.wi=function(){return R.q(-this.x,-this.y)};u.ns=function(){this.x=-this.x;this.y=-this.y};u.uc=function(){return R.q(this.x,this.y)};u.xh=function(a){this.x+=
a.x;this.y+=a.y};u.zs=function(a){this.x-=a.x;this.y-=a.y};u.Ld=function(a){this.x*=a;this.y*=a};u.yh=function(a){var c=this.x;this.x=a*this.y;this.y=-a*c};u.Xr=function(a){var c=this.x;this.x=-a*this.y;this.y=a*c};u.rw=function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y)};u.pw=function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y)};u.wh=function(){this.x=Math.abs(this.x);this.y=Math.abs(this.y)};u.Cg=function(){return Math.sqrt(this.Qo())};u.Qo=function(){return this.x*
this.x+this.y*this.y};u.Md=function(){var a=this.Cg();if(a<Number.MIN_VALUE)return 0;var c=1/a;this.x*=c;this.y*=c;return a};u.Po=function(){return isFinite(this.x)&&isFinite(this.y)};var Cc=function(a,c,b){this.x=a;this.y=c;this.z=b};u=Cc.prototype;u.fa=function(){this.z=this.y=this.x=0};u.Set=function(a,c,b){this.x=a;this.y=c;this.z=b};u.F=function(a){this.x=a.x;this.y=a.y;this.z=a.z};u.wi=function(){return new Cc(-this.x,-this.y,-this.z)};u.ns=function(){this.x=-this.x;this.y=-this.y;this.z=-this.z};
u.uc=function(){return new Cc(this.x,this.y,this.z)};u.xh=function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z};u.zs=function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z};u.Ld=function(a){this.x*=a;this.y*=a;this.z*=a};var Fc=function(){this.Ya=.005};u=Fc.prototype;u.tj=function(){};u.uc=function(){};u.Set=function(a){this.Ya=a.Ya};u.Ik=function(){};u.gm=function(){};u.Fo=function(){};u.vs=function(){};var sc=function(a){this.Ya=.005;this.Ya=a;this.Bl=a*a;this.ib=R.q(0,0)};Q(sc,Fc);u=sc.prototype;u.tj=function(){return sc.Tf};
u.uc=function(){var a=new sc(this.Ya);a.Set(this);return a};u.Set=function(a){Fc.prototype.Set.call(this,a);a instanceof sc&&this.ib.F(a.ib)};u.Ik=function(a,c){var b=c.n,d=c.position.x+(b.j.x*this.ib.x+b.k.x*this.ib.y),b=c.position.y+(b.j.y*this.ib.x+b.k.y*this.ib.y);a.Ga.Set(d-this.Ya,b-this.Ya);a.Ia.Set(d+this.Ya,b+this.Ya)};u.gm=function(a,c){a.bh=c*Math.PI*this.Bl;a.Eh.F(this.ib);a.Ok=a.bh*(.5*this.Bl+(this.ib.x*this.ib.x+this.ib.y*this.ib.y))};u.Fo=function(a,c,b,d){b=T.Kc(b,this.ib);var e=
-(T.Pb(a,b)-c);if(e<-this.Ya+Number.MIN_VALUE)return 0;if(e>this.Ya)return d.F(b),Math.PI*this.Bl;c=e*e;e=this.Bl*(Math.asin(e/this.Ya)+Math.PI/2)+e*Math.sqrt(this.Bl-c);c=-2/3*Math.pow(this.Bl-c,1.5)/e;d.x=b.x+a.x*c;d.y=b.y+a.y*c;return e};u.vs=function(a){a.J=[this.ib];a.pa=1;a.Ya=this.Ya};sc.Tf="b2CircleShape";var Gc=function(a,c){this.Ya=.005;this.qa=a;this.Na=c;this.kk=R.q(this.Na.x-this.qa.x,this.Na.y-this.qa.y);this.Fu=this.kk.Md();this.ya=R.q(this.kk.y,-this.kk.x);R.q(-.04*(this.ya.x-this.kk.x)+
this.qa.x,-.04*(this.ya.y-this.kk.y)+this.qa.y);R.q(-.04*(this.ya.x+this.kk.x)+this.Na.x,-.04*(this.ya.y+this.kk.y)+this.Na.y);R.q(-this.ya.x,-this.ya.y)};Q(Gc,Fc);Gc.prototype.tj=function(){return"b2EdgeShape"};Gc.prototype.Ik=function(a,c){var b=c.n,d=c.position.x+(b.j.x*this.qa.x+b.k.x*this.qa.y),e=c.position.y+(b.j.y*this.qa.x+b.k.y*this.qa.y),f=c.position.x+(b.j.x*this.Na.x+b.k.x*this.Na.y),b=c.position.y+(b.j.y*this.Na.x+b.k.y*this.Na.y);d<f?(a.Ga.x=d,a.Ia.x=f):(a.Ga.x=f,a.Ia.x=d);e<b?(a.Ga.y=
e,a.Ia.y=b):(a.Ga.y=b,a.Ia.y=e)};Gc.prototype.gm=function(a){a.bh=0;a.Eh.F(this.qa);a.Ok=0};Gc.prototype.Fo=function(a,c,b,d){void 0===c&&(c=0);var e=R.q(a.x*c,a.y*c),f=T.Kc(b,this.qa);b=T.Kc(b,this.Na);var h=T.Pb(a,f)-c;a=T.Pb(a,b)-c;if(0<h){if(0<a)return 0;f.x=-a/(h-a)*f.x+h/(h-a)*b.x;f.y=-a/(h-a)*f.y+h/(h-a)*b.y}else 0<a&&(b.x=-a/(h-a)*f.x+h/(h-a)*b.x,b.y=-a/(h-a)*f.y+h/(h-a)*b.y);d.x=(e.x+f.x+b.x)/3;d.y=(e.y+f.y+b.y)/3;return.5*((f.x-e.x)*(b.y-e.y)-(f.y-e.y)*(b.x-e.x))};var Hc=function(){this.bh=
0;this.Eh=R.q(0,0);this.Ok=0},Y=function(){this.Ya=.005;this.Rd=R.q(0,0);this.J=[];this.za=[]};Q(Y,Fc);Y.prototype.tj=function(){return Y.Tf};Y.prototype.uc=function(){var a=new Y;a.Set(this);return a};Y.prototype.Set=function(a){Fc.prototype.Set.call(this,a);if(a instanceof Y){this.Rd.F(a.Rd);this.Sa=a.Sa;this.vm(this.Sa);for(var c=0;c<this.Sa;c++)this.J[c].F(a.J[c]),this.za[c].F(a.za[c])}};Y.prototype.xm=function(a){this.Fw(a)};Y.kH=function(a){var c=new Y;c.xm(a);return c};Y.prototype.Fw=function(a){var c=
a.length;this.Sa=c;this.vm(c);for(c=c=0;c<this.Sa;c++)this.J[c].F(a[c]);for(c=0;c<this.Sa;++c)a=T.Cb(this.J[c+1<this.Sa?c+1:0],this.J[c]),this.za[c].F(T.yh(a,1)),this.za[c].Md();this.Rd=Y.jB(this.J,this.Sa)};Y.oH=function(a){var c=new Y;c.Fw(a);return c};Y.prototype.So=function(a,c){this.Sa=4;this.vm(4);this.J[0].Set(-a,-c);this.J[1].Set(a,-c);this.J[2].Set(a,c);this.J[3].Set(-a,c);this.za[0].Set(0,-1);this.za[1].Set(1,0);this.za[2].Set(0,1);this.za[3].Set(-1,0);this.Rd.fa()};Y.lH=function(a,c){var b=
new Y;b.So(a,c);return b};Y.prototype.dC=function(a,c,b,d){this.Sa=4;this.vm(4);this.J[0].Set(-a,-c);this.J[1].Set(a,-c);this.J[2].Set(a,c);this.J[3].Set(-a,c);this.za[0].Set(0,-1);this.za[1].Set(1,0);this.za[2].Set(0,1);this.za[3].Set(-1,0);this.Rd=b;a=new S;a.Set(d);b=new mc(b,a);for(d=0;d<this.Sa;++d)this.J[d]=T.Kc(b,this.J[d]),this.za[d]=T.Zb(b.n,this.za[d])};Y.nH=function(a,c,b,d){var e=new Y;e.dC(a,c,b,d);return e};Y.prototype.Ew=function(a,c){this.Sa=2;this.vm(2);this.J[0].F(a);this.J[1].F(c);
this.Rd.x=.5*(a.x+c.x);this.Rd.y=.5*(a.y+c.y);this.za[0]=T.yh(T.Cb(c,a),1);this.za[0].Md();this.za[1].x=-this.za[0].x;this.za[1].y=-this.za[0].y};Y.mH=function(a,c){var b=new Y;b.Ew(a,c);return b};u=Y.prototype;u.Ik=function(a,c){for(var b=c.n,d=this.J[0],e=c.position.x+(b.j.x*d.x+b.k.x*d.y),f=c.position.y+(b.j.y*d.x+b.k.y*d.y),h=e,g=f,m=1;m<this.Sa;++m)var d=this.J[m],l=c.position.x+(b.j.x*d.x+b.k.x*d.y),d=c.position.y+(b.j.y*d.x+b.k.y*d.y),e=e<l?e:l,f=f<d?f:d,h=h>l?h:l,g=g>d?g:d;a.Ga.x=e-this.Ya;
a.Ga.y=f-this.Ya;a.Ia.x=h+this.Ya;a.Ia.y=g+this.Ya};u.gm=function(a,c){if(2==this.Sa)a.Eh.x=.5*(this.J[0].x+this.J[1].x),a.Eh.y=.5*(this.J[0].y+this.J[1].y),a.bh=0,a.Ok=0;else{for(var b=0,d=0,e=0,f=0,h=1/3,g=0;g<this.Sa;++g)var m=this.J[g],l=g+1<this.Sa?this.J[g+1]:this.J[0],n=m.x-0,k=m.y-0,r=l.x-0,q=l.y-0,s=n*q-k*r,t=.5*s,e=e+t,b=b+t*h*(0+m.x+l.x),d=d+t*h*(0+m.y+l.y),m=n,f=f+s*(h*(.25*(m*m+r*m+r*r)+(0*m+0*r))+0+(h*(.25*(k*k+q*k+q*q)+(0*k+0*q))+0));a.bh=c*e;a.Eh.Set(1/e*b,1/e*d);a.Ok=c*f}};u.Fo=function(a,
c,b,d){var e=T.zh(b.n,a),f=c-T.Pb(a,b.position),h=[],g=0,m=-1;c=-1;var l=!1;for(a=a=0;a<this.Sa;++a){h[a]=T.Pb(e,this.J[a])-f;var n=h[a]<-Number.MIN_VALUE;0<a&&(n?l||(m=a-1,g++):l&&(c=a-1,g++));l=n}switch(g){case 0:return l?(a=new Hc,this.gm(a,1),d.F(T.Kc(b,a.Eh)),a.bh):0;case 1:-1==m?m=this.Sa-1:c=this.Sa-1}a=(m+1)%this.Sa;e=(c+1)%this.Sa;f=(0-h[m])/(h[a]-h[m]);h=(0-h[c])/(h[e]-h[c]);m=R.q(this.J[m].x*(1-f)+this.J[a].x*f,this.J[m].y*(1-f)+this.J[a].y*f);c=R.q(this.J[c].x*(1-h)+this.J[e].x*h,this.J[c].y*
(1-h)+this.J[e].y*h);h=0;f=R.q(0,0);for(g=this.J[a];a!=e;)a=(a+1)%this.Sa,l=a==e?c:this.J[a],n=.5*((g.x-m.x)*(l.y-m.y)-(g.y-m.y)*(l.x-m.x)),h+=n,f.x+=n*(m.x+g.x+l.x)/3,f.y+=n*(m.y+g.y+l.y)/3,g=l;f.Ld(1/h);d.F(T.Kc(b,f));return h};u.vs=function(a){a.J=this.J;a.pa=this.Sa;a.Ya=this.Ya};u.No=function(a){for(var c=0,b=this.J[0].x*a.x+this.J[0].y*a.y,d=1;d<this.Sa;++d){var e=this.J[d].x*a.x+this.J[d].y*a.y;e>b&&(c=d,b=e)}return c};u.nm=function(a){for(var c=0,b=this.J[0].x*a.x+this.J[0].y*a.y,d=1;d<this.Sa;++d){var e=
this.J[d].x*a.x+this.J[d].y*a.y;e>b&&(c=d,b=e)}return this.J[c]};u.vm=function(a){this.J=[];this.za=[];for(var c=this.J.length;c<a;c++)this.J[c]=R.q(0,0),this.za[c]=R.q(0,0)};Y.jB=function(a,c){for(var b=R.q(0,0),d=0,e=1/3,f=0;f<c;++f){var h=a[f],g=f+1<c?a[f+1]:a[0],m=.5*((h.x-0)*(g.y-0)-(h.y-0)*(g.x-0)),d=d+m;b.x+=m*e*(0+h.x+g.x);b.y+=m*e*(0+h.y+g.y)}b.x*=1/d;b.y*=1/d;return b};Y.LI=new S;Y.Tf="b2PolygonShape";var Ic=function(){this.Cs=this.Bs=this.Ds=this.Nd=0};u=Ic.prototype;u.wj=function(a){this.Nd=
a;this.Ds=this.Nd&255;this.Bs=(this.Nd&65280)>>8&255;this.Cs=(this.Nd&16711680)>>16&255;this.Rw=(this.Nd&4278190080)>>24&255};u.Set=function(a){this.wj(a.Nd)};u.Kw=function(a){this.Ds=a;this.Nd=this.Nd&4294967040|this.Ds&255};u.Iw=function(a){this.Bs=a;this.Nd=this.Nd&4294902015|this.Bs<<8&65280};u.Jw=function(a){this.Cs=a;this.Nd=this.Nd&4278255615|this.Cs<<16&16711680};u.eC=function(a){this.Rw=a;this.Nd=this.Nd&16777215|this.Rw<<24&4278190080};u.uc=function(){var a=new Ic;a.Set(this);return a};
var Jc=function(){this.jf=R.q(0,0);this.id=new Ic};Jc.prototype.Set=function(a){this.jf.F(a.jf);this.id.Set(a.id)};var Kc=function(){this.Ga=R.q(0,0);this.Ia=R.q(0,0)},Oc=[],Pc=function(){if(0<Oc.length){var a=Oc.pop();a.fa();return a}return new Kc};u=Kc.prototype;u.fa=function(){this.Ga.Set(0,0);this.Ia.Set(0,0)};u.Po=function(){return 0>this.Ia.x-this.Ga.x||0>this.Ia.y-this.Ga.y?!1:this.Ga.Po()&&this.Ia.Po()};u.pB=function(){return R.q((this.Ga.x+this.Ia.x)/2,(this.Ga.y+this.Ia.y)/2)};u.Vr=function(a){var c;
return c=(c=(c=(c=this.Ga.x<=a.Ga.x)&&this.Ga.y<=a.Ga.y)&&a.Ia.x<=this.Ia.x)&&a.Ia.y<=this.Ia.y};u.Am=function(a){return 0<a.Ga.x-this.Ia.x||0<a.Ga.y-this.Ia.y||0<this.Ga.x-a.Ia.x||0<this.Ga.y-a.Ia.y?!1:!0};u.Eo=function(a,c){this.Ga.x=Math.min(a.Ga.x,c.Ga.x);this.Ga.y=Math.min(a.Ga.y,c.Ga.y);this.Ia.x=Math.max(a.Ia.x,c.Ia.x);this.Ia.y=Math.max(a.Ia.y,c.Ia.y)};var Qc=function(a,c,b,d){var e=0,f=c[0].jf,h=c[1].jf,g=b.x*f.x+b.y*f.y-d;b=b.x*h.x+b.y*h.y-d;0>=g&&a[e++].Set(c[0]);0>=b&&a[e++].Set(c[1]);
0>g*b&&(b=g/(g-b),d=a[e].jf,d.x=f.x+b*(h.x-f.x),d.y=f.y+b*(h.y-f.y),a[e].id=0<g?c[0].id:c[1].id,e++);return e},Rc=function(a,c,b,d,e){for(var f=c.n.j.x*a.za[b].x+c.n.k.x*a.za[b].y,h=c.n.j.y*a.za[b].x+c.n.k.y*a.za[b].y,g=e.n.j.x*f+e.n.j.y*h,m=e.n.k.x*f+e.n.k.y*h,l=0,n=Number.MAX_VALUE,k=0;k<d.Sa;k++){var r=d.J[k].x*g+d.J[k].y*m;r<n&&(n=r,l=k)}return(e.position.x+(e.n.j.x*d.J[l].x+e.n.k.x*d.J[l].y)-(c.position.x+(c.n.j.x*a.J[b].x+c.n.k.x*a.J[b].y)))*f+(e.position.y+(e.n.j.y*d.J[l].x+e.n.k.y*d.J[l].y)-
(c.position.y+(c.n.j.y*a.J[b].x+c.n.k.y*a.J[b].y)))*h},Sc=function(a,c,b,d){for(var e=d.position.x+(d.n.j.x*b.Rd.x+d.n.k.x*b.Rd.y),f=d.position.y+(d.n.j.y*b.Rd.x+d.n.k.y*b.Rd.y),e=e-(c.position.x+(c.n.j.x*a.Rd.x+c.n.k.x*a.Rd.y)),f=f-(c.position.y+(c.n.j.y*a.Rd.x+c.n.k.y*a.Rd.y)),h=e*c.n.j.x+f*c.n.j.y,f=e*c.n.k.x+f*c.n.k.y,e=0,g=-Number.MAX_VALUE,m=0;m<a.Sa;++m){var l=a.za[m].x*h+a.za[m].y*f;l>g&&(g=l,e=m)}h=Rc(a,c,e,b,d);f=e-1;0>f&&(f=a.Sa-1);g=Rc(a,c,f,b,d);m=e+1;m>=a.Sa&&(m=0);var l=Rc(a,c,m,b,
d),n=0,k=0;if(g>h&&g>l)for(n=f,k=g;;)if(e=n-1,0>e&&(e=a.Sa-1),h=Rc(a,c,e,b,d),h>k)n=e,k=h;else break;else if(l>h)for(n=m,k=l;;)if(e=n+1,e>=a.Sa&&(e=0),h=Rc(a,c,e,b,d),h>k)n=e,k=h;else break;else n=e,k=h;return{ix:n,xr:k}},Uc=function(a,c,b){var d=new Tc;d.$B(c,b.ji,b.Nr,b.ki,b.Or);for(var e=0;20>e;){for(var f=[],h=0;h<d.pa;h++)f[h]={},f[h].nc=d.J[h].nc,f[h].oc=d.J[h].oc;2==d.pa?d.hC():3==d.pa&&d.iC();if(3==d.pa)break;h=d.rB();if(h.Qo()<Bc)break;var g=h.wi();d.J[d.pa].nc=b.ji.No(T.zh(b.Nr.n,g));d.J[d.pa].td=
T.Kc(b.Nr,b.ji.md(d.J[d.pa].nc));d.J[d.pa].oc=b.ki.No(T.zh(b.Or.n,h));d.J[d.pa].Sf=T.Kc(b.Or,b.ki.md(d.J[d.pa].oc));d.J[d.pa].kd=T.Cb(d.J[d.pa].Sf,d.J[d.pa].td);R.lc(h);R.lc(g);e++;g=!1;for(h=0;h<f.length;h++)if(d.J[d.pa].nc==f[h].nc&&d.J[d.pa].oc==f[h].oc){g=!0;break}if(g)break;d.pa++}d.sB(a.qg,a.rg);a.Kh=T.Cb(a.qg,a.rg).Cg();d.tC(c);b.TA&&(c=b.ji.Ya,b=b.ki.Ya,a.Kh>c+b&&a.Kh>Number.MIN_VALUE?(a.Kh-=c+b,d=T.Cb(a.rg,a.qg),d.Md(),a.qg.x+=c*d.x,a.qg.y+=c*d.y,a.rg.x-=b*d.x,a.rg.y-=b*d.y,R.lc(d)):(b=R.q(0,
0),b.x=.5*(a.qg.x+a.rg.x),b.y=.5*(a.qg.y+a.rg.y),a.qg.x=a.rg.x=b.x,a.qg.y=a.rg.y=b.y,a.Kh=0,R.lc(b)))},Vc=function(){},Wc=function(){this.qg=R.q(0,0);this.rg=R.q(0,0);this.Kh=0},Xc=function(){};Xc.prototype.Set=function(a){a.vs(this)};Xc.prototype.No=function(a){for(var c=0,b=this.J[0].x*a.x+this.J[0].y*a.y,d=1;d<this.pa;d++){var e=this.J[d].x*a.x+this.J[d].y*a.y;e>b&&(c=d,b=e)}return c};Xc.prototype.nm=function(a){return this.J[this.No(a)]};Xc.prototype.md=function(a){void 0===a&&(a=0);return this.J[a]};
var Yc=function(){this.ah=null};u=Yc.prototype;u.hm=function(a,c){var b=Zc(c);b.Wa.Ga.x=a.Ga.x-.1;b.Wa.Ga.y=a.Ga.y-.1;b.Wa.Ia.x=a.Ia.x+.1;b.Wa.Ia.y=a.Ia.y+.1;this.mw(b);return b};u.jm=function(a){this.Bw(a);a.Id()};u.hs=function(a,c,b){if(a.Wa.Vr(c))return!1;this.Bw(a);var d=.1+2*Math.abs(b.x);b=.1+2*Math.abs(b.y);a.Wa.Ga.x=c.Ga.x-d;a.Wa.Ga.y=c.Ga.y-b;a.Wa.Ia.x=c.Ia.x+d;a.Wa.Ia.y=c.Ia.y+b;this.mw(a);return!0};u.lm=function(a){return a.Wa};u.ts=function(a,c){if(null!==this.ah){var b=[];for(b.push(this.ah);0<
b.length;){var d=b.pop();if(d.Wa.Am(c))if(d.nw()){if(!a(d.uf))break}else b.push(d.ye),b.push(d.Hg)}}};u.mw=function(a){if(null===this.ah)this.ah=a,this.ah.parent=null;else{var c=this.oB(a),b=c.parent,d=Zc();d.parent=b;d.Wa.Eo(a.Wa,c.Wa);if(b)for(c.parent.ye==c?b.ye=d:b.Hg=d,d.ye=c,d.Hg=a,c.parent=d,a.parent=d;b&&!b.Wa.Vr(d.Wa);)b.Wa.Eo(b.ye.Wa,b.Hg.Wa),d=b,b=b.parent;else d.ye=c,d.Hg=a,c.parent=d,this.ah=a.parent=d}};u.oB=function(a){a=a.Wa.pB();for(var c=this.ah;!c.nw();)var b=c.ye,c=c.Hg,d=Math.abs((b.Wa.Ga.x+
b.Wa.Ia.x)/2-a.x)+Math.abs((b.Wa.Ga.y+b.Wa.Ia.y)/2-a.y),e=Math.abs((c.Wa.Ga.x+c.Wa.Ia.x)/2-a.x)+Math.abs((c.Wa.Ga.y+c.Wa.Ia.y)/2-a.y),c=d<e?b:c;R.lc(a);return c};u.Bw=function(a){if(a==this.ah)this.ah=null;else{var c=a.parent,b=c.parent;a=c.ye==a?c.Hg:c.ye;if(b)for(b.ye==c?b.ye=a:b.Hg=a,a.parent=b;b;){a=b.Wa;b.Wa.Eo(b.ye.Wa,b.Hg.Wa);if(a.Vr(b.Wa))break;b=b.parent}else this.ah=a,a.parent=null;c.Id()}};var $c=function(){this.gi=new Yc;this.Nq=[]};u=$c.prototype;u.hm=function(a,c){var b=this.gi.hm(a,
c);this.dw(b);return b};u.jm=function(a){this.oC(a);this.gi.jm(a)};u.hs=function(a,c,b){this.gi.hs(a,c,b)&&this.dw(a)};u.Am=function(a,c){return this.gi.lm(a).Am(this.gi.lm(c))};u.lm=function(a){return this.gi.lm(a)};u.pC=function(a){for(var c=[];0<this.Nq.length;){var b=this.Nq.pop();this.gi.ts(function(a){a!=b.uf&&c.push(new ad(b.uf,a));return!0},this.gi.lm(b))}for(var d=0;d<c.length;){var e=c[d];a(e.Rm,e.Sm);for(d++;d<c.length;){var f=c[d];if(!(f.Rm==e.Rm&&f.Sm==e.Sm||f.Rm==e.Sm&&f.Sm==e.Rm))break;
d++}}};u.ts=function(a,c){this.gi.ts(a,c)};u.dw=function(a){this.Nq.push(a)};u.oC=function(a){Aa(this.Nq,a)};var bd=function(a){this.Wa=Pc();this.uf=this.parent=this.Hg=this.ye=null;"undefined"!=typeof a&&(this.uf=a)},cd=[],Zc=function(a){if(0<cd.length){var c=cd.pop();"undefined"!=typeof a&&(c.uf=a);c.Wa.fa();return c}return new bd(a)};bd.prototype.Id=function(){this.uf=this.parent=this.Hg=this.ye=null;cd.push(this)};bd.prototype.nw=function(){return null===this.ye};var ad=function(a,c){this.Rm=
a;this.Sm=c},ed=function(){this.Za=this.ec=0;this.ma=[];for(var a=0;2>a;a++)this.ma[a]=new dd;this.ed=R.q(0,0);this.xa=R.q(0,0)};ed.prototype.Wc=function(){for(var a=0;2>a;a++)this.ma[a].Wc();this.ed.fa();this.xa.fa();this.ec=this.Za=0};ed.prototype.Set=function(a){this.ec=a.ec;for(var c=0;2>c;c++)this.ma[c].Set(a.ma[c]);this.ed.F(a.ed);this.xa.F(a.xa);this.Za=a.Za};ed.prototype.uc=function(){var a=new ed;a.Set(this);return a};var dd=function(){this.xa=R.q(0,0);this.Gf=new Ic;this.Wc()};dd.prototype.Wc=
function(){this.xa.fa();this.rk=this.nk=0;this.Gf.wj(0)};dd.prototype.Set=function(a){this.xa.F(a.xa);this.nk=a.nk;this.rk=a.rk;this.Gf.Set(a.Gf)};var fd=function(){this.xa=R.q(0,0);this.R=R.q(0,0)};fd.prototype.mc=function(a,c,b,d,e){this.Xi=c;this.Yi=d;var f,h,g,m=g=h=0,l=0;d=c=0;var n,k,m=0;1==a.count?(this.Za=gd,f=this.Xi.md(a.nc[0]),a=this.Yi.md(a.oc[0]),k=f,n=b.n,h=b.position.x+(n.j.x*k.x+n.k.x*k.y),g=b.position.y+(n.j.y*k.x+n.k.y*k.y),k=a,n=e.n,m=e.position.x+(n.j.x*k.x+n.k.x*k.y),l=e.position.y+
(n.j.y*k.x+n.k.y*k.y),this.R.x=m-h,this.R.y=l-g,this.R.Md()):(a.oc[0]==a.oc[1]?(this.Za=hd,c=this.Xi.md(a.nc[0]),d=this.Xi.md(a.nc[1]),a=this.Yi.md(a.oc[0]),this.xa.x=.5*(c.x+d.x),this.xa.y=.5*(c.y+d.y),this.R=T.yh(T.Cb(d,c),1),this.R.Md(),k=this.R,n=b.n,c=n.j.x*k.x+n.k.x*k.y,d=n.j.y*k.x+n.k.y*k.y,k=this.xa,n=b.n,h=b.position.x+(n.j.x*k.x+n.k.x*k.y),g=b.position.y+(n.j.y*k.x+n.k.y*k.y),k=a,n=e.n,m=e.position.x+(n.j.x*k.x+n.k.x*k.y),l=e.position.y+(n.j.y*k.x+n.k.y*k.y),m=(m-h)*c+(l-g)*d):a.nc[0]==
a.nc[0]?(this.Za=id,h=this.Yi.md(a.oc[0]),g=this.Yi.md(a.oc[1]),f=this.Xi.md(a.nc[0]),this.xa.x=.5*(h.x+g.x),this.xa.y=.5*(h.y+g.y),this.R=T.yh(T.Cb(g,h),1),this.R.Md(),k=this.R,n=e.n,c=n.j.x*k.x+n.k.x*k.y,d=n.j.y*k.x+n.k.y*k.y,k=this.xa,n=e.n,m=e.position.x+(n.j.x*k.x+n.k.x*k.y),l=e.position.y+(n.j.y*k.x+n.k.y*k.y),k=f,n=b.n,h=b.position.x+(n.j.x*k.x+n.k.x*k.y),g=b.position.y+(n.j.y*k.x+n.k.y*k.y),m=(h-m)*c+(g-l)*d):(c=this.Xi.md(a.nc[0]),d=this.Xi.md(a.nc[1]),h=this.Yi.md(a.oc[0]),g=this.Yi.md(a.oc[1]),
m=T.Zb(b.n,T.Cb(d,c)),l=T.Zb(e.n,T.Cb(g,h)),e=m.x*m.x+m.y*m.y,b=l.x*l.x+l.y*l.y,f=T.Cb(l,m),a=m.x*f.x+m.y*f.y,f=l.x*f.x+l.y*f.y,l=m.x*l.x+m.y*l.y,n=e*b-l*l,m=0,0!=n&&(m=T.Kb((l*f-a*b)/n,0,1)),0>(l*m+f)/b&&(m=T.Kb((l-a)/e,0,1)),f=R.q(0,0),f.x=c.x+m*(d.x-c.x),f.y=c.y+m*(d.y-c.y),a=R.q(0,0),a.x=h.x+m*(g.x-h.x),a.y=h.y+m*(g.y-h.y),0==m||1==m?(this.Za=id,this.R=T.yh(T.Cb(g,h),1),this.R.Md(),this.xa=a):(this.Za=hd,this.R=T.yh(T.Cb(d,c),1),this.xa=f)),0>m&&this.R.ns())};fd.prototype.Ag=function(a,c){var b,
d,e=0;switch(this.Za){case gd:b=T.zh(a.n,this.R);d=T.zh(c.n,this.R.wi());b=this.Xi.nm(b);d=this.Yi.nm(d);b=T.Kc(a,b);d=T.Kc(c,d);e=(d.x-b.x)*this.R.x+(d.y-b.y)*this.R.y;break;case hd:e=T.Zb(a.n,this.R);b=T.Kc(a,this.xa);d=T.zh(c.n,e.wi());d=this.Yi.nm(d);d=T.Kc(c,d);e=(d.x-b.x)*e.x+(d.y-b.y)*e.y;break;case id:e=T.Zb(c.n,this.R),d=T.Kc(c,this.xa),b=T.zh(a.n,e.wi()),b=this.Xi.nm(b),b=T.Kc(a,b),e=(b.x-d.x)*e.x+(b.y-d.y)*e.y}return e};var gd=1,hd=2,id=4,Tc=function(){this.qa=new jd;this.Na=new jd;this.Je=
new jd;this.J=[this.qa,this.Na,this.Je]};u=Tc.prototype;u.$B=function(a,c,b,d,e){var f,h;this.pa=a.count;for(var g=this.J,m=0;m<this.pa;m++){var l=g[m];l.nc=a.nc[m];l.oc=a.oc[m];f=c.md(l.nc);h=d.md(l.oc);l.td=T.Kc(b,f);l.Sf=T.Kc(e,h);l.kd=T.Cb(l.Sf,l.td);l.G=0}1<this.pa&&(a=a.UF,f=this.lw(),f<.5*a||2*a<f||f<Number.MIN_VALUE)&&(this.pa=0);0==this.pa&&(l=g[0],l.nc=0,l.oc=0,f=c.md(0),h=d.md(0),l.td=T.Kc(b,f),l.Sf=T.Kc(e,h),l.kd=T.Cb(l.Sf,l.td),this.pa=1)};u.tC=function(a){a.UF=this.lw();a.count=this.pa;
for(var c=this.J,b=0;b<this.pa;b++)a.nc[b]=c[b].nc,a.oc[b]=c[b].oc};u.rB=function(){if(1==this.pa)return this.qa.kd.wi();if(2==this.pa){var a=T.Cb(this.Na.kd,this.qa.kd);return 0<T.pj(a,this.qa.kd.wi())?T.Xr(1,a):T.yh(a,1)}return R.q(0,0)};u.sB=function(a,c){1==this.pa?(a.F(this.qa.td),c.F(this.qa.Sf)):2==this.pa?(a.x=this.qa.G*this.qa.td.x+this.Na.G*this.Na.td.x,a.y=this.qa.G*this.qa.td.y+this.Na.G*this.Na.td.y,c.x=this.qa.G*this.qa.Sf.x+this.Na.G*this.Na.Sf.x,c.y=this.qa.G*this.qa.Sf.y+this.Na.G*
this.Na.Sf.y):3==this.pa&&(c.x=a.x=this.qa.G*this.qa.td.x+this.Na.G*this.Na.td.x+this.Je.G*this.Je.td.x,c.y=a.y=this.qa.G*this.qa.td.y+this.Na.G*this.Na.td.y+this.Je.G*this.Je.td.y)};u.lw=function(){return 1==this.pa?0:2==this.pa?T.Cb(this.qa.kd,this.Na.kd).Cg():3==this.pa?T.pj(T.Cb(this.Na.kd,this.qa.kd),T.Cb(this.Je.kd,this.qa.kd)):0};u.hC=function(){var a=this.qa.kd,c=this.Na.kd,b=T.Cb(c,a),a=-(a.x*b.x+a.y*b.y);0>=a?this.pa=this.qa.G=1:(c=c.x*b.x+c.y*b.y,0>=c?(this.pa=this.Na.G=1,this.qa.Set(this.Na)):
(b=1/(c+a),this.qa.G=c*b,this.Na.G=a*b,this.pa=2))};u.iC=function(){var a=this.qa.kd,c=this.Na.kd,b=this.Je.kd,d=T.Cb(c,a),e=T.Pb(c,d),f=-T.Pb(a,d),h=T.Cb(b,a),g=T.Pb(b,h),m=-T.Pb(a,h),l=T.Cb(b,c),n=T.Pb(b,l),l=-T.Pb(c,l),h=T.pj(d,h),d=h*T.pj(c,b),b=h*T.pj(b,a),a=h*T.pj(a,c);0>=f&&0>=m?this.pa=this.qa.G=1:0<e&&0<f&&0>=a?(g=1/(e+f),this.qa.G=e*g,this.Na.G=f*g,this.pa=2):0<g&&0<m&&0>=b?(e=1/(g+m),this.qa.G=g*e,this.Je.G=m*e,this.pa=2,this.Na.Set(this.Je)):0>=e&&0>=l?(this.pa=this.Na.G=1,this.qa.Set(this.Na)):
0>=g&&0>=n?(this.pa=this.Je.G=1,this.qa.Set(this.Je)):0<n&&0<l&&0>=d?(e=1/(n+l),this.Na.G=n*e,this.Je.G=l*e,this.pa=2,this.qa.Set(this.Je)):(e=1/(d+b+a),this.qa.G=d*e,this.Na.G=b*e,this.Je.G=a*e,this.pa=3)};var kd=function(){this.nc=[0,0,0];this.oc=[0,0,0]},jd=function(){};jd.prototype.Set=function(a){this.td.F(a.td);this.Sf.F(a.Sf);this.kd.F(a.kd);this.G=a.G;this.nc=a.nc;this.oc=a.oc};var ld=function(){this.ji=new Xc;this.ki=new Xc;this.tA=new Ec;this.uA=new Ec},md=function(){this.ya=R.q(0,0);this.ma=
[];for(var a=this.ec=0;2>a;a++)this.ma[a]=R.q(0,0)};md.prototype.mc=function(a,c,b,d,e){if(0!=a.ec){var f=0,h,g,m=0,l=0,n=0,k=0,r=0;h=0;switch(a.Za){case 1:g=c.n;h=a.xa;f=c.position.x+g.j.x*h.x+g.k.x*h.y;c=c.position.y+g.j.y*h.x+g.k.y*h.y;g=d.n;h=a.ma[0].xa;a=d.position.x+g.j.x*h.x+g.k.x*h.y;d=d.position.y+g.j.y*h.x+g.k.y*h.y;h=a-f;g=d-c;m=h*h+g*g;m>Bc?(m=Math.sqrt(m),this.ya.x=h/m,this.ya.y=g/m):(this.ya.x=1,this.ya.y=0);h=c+b*this.ya.y;d-=e*this.ya.y;this.ma[0].x=.5*(f+b*this.ya.x+(a-e*this.ya.x));
this.ma[0].y=.5*(h+d);break;case 2:g=c.n;h=a.ed;m=g.j.x*h.x+g.k.x*h.y;l=g.j.y*h.x+g.k.y*h.y;g=c.n;h=a.xa;n=c.position.x+g.j.x*h.x+g.k.x*h.y;k=c.position.y+g.j.y*h.x+g.k.y*h.y;this.ya.x=m;this.ya.y=l;for(f=0;f<a.ec;f++)g=d.n,h=a.ma[f].xa,r=d.position.x+g.j.x*h.x+g.k.x*h.y,h=d.position.y+g.j.y*h.x+g.k.y*h.y,this.ma[f].x=r+.5*(b-(r-n)*m-(h-k)*l-e)*m,this.ma[f].y=h+.5*(b-(r-n)*m-(h-k)*l-e)*l;break;case 4:for(g=d.n,h=a.ed,m=g.j.x*h.x+g.k.x*h.y,l=g.j.y*h.x+g.k.y*h.y,g=d.n,h=a.xa,n=d.position.x+g.j.x*h.x+
g.k.x*h.y,k=d.position.y+g.j.y*h.x+g.k.y*h.y,this.ya.x=-m,this.ya.y=-l,f=0;f<a.ec;f++)g=c.n,h=a.ma[f].xa,r=c.position.x+g.j.x*h.x+g.k.x*h.y,h=c.position.y+g.j.y*h.x+g.k.y*h.y,this.ma[f].x=r+.5*(e-(r-n)*m-(h-k)*l-b)*m,this.ma[f].y=h+.5*(e-(r-n)*m-(h-k)*l-b)*l}}};var oc=function(a,c){this.Kd="Body"+oc.ls++;this.A=new mc;this.A.position.F(a.position);this.A.n.Set(a.M);this.m=new Ec;this.m.N.fa();this.m.Hd=1;this.m.nf=this.m.G=a.M;this.m.u.x=this.A.n.j.x*this.m.N.x+this.A.n.k.x*this.m.N.y;this.m.u.y=
this.A.n.j.y*this.m.N.x+this.A.n.k.y*this.m.N.y;this.m.u.x+=this.A.position.x;this.m.u.y+=this.A.position.y;this.m.Yc.F(this.m.u);this.p=a.ou.uc();this.ai=R.q(0,0);this.wl=a.Gj;this.AF=a.kt;this.zu=a.Yw;this.Au=a.cx;this.Cn=a.xd;this.Oa=c;this.Ob=null;this.be=new nd;this.Ij=new od;this.D=a.Zw;this.HF=a.ek;this.vF=a.Bj;this.Mn=this.sk=0;this.Za=a.type;this.S=this.Za==W.Mc?1:0;this.I=this.Za==W.Mc?1:0;this.O=this.Ef=0;this.EF=a.ey;this.dl=new pd;this.Lq=[]};u=oc.prototype;u.Jk=function(a){a=new nc(this,
this.A,a);this.Cn&&a.hm(this.Oa.Sd.ul,this.A);this.dl.ZA(a);a.En=this;0<a.Hq&&this.Dw();this.Oa.Ku=!0;return a};u.Id=function(){R.lc(this.p);R.lc(this.ai)};u.fw=function(a){this.dl.aC(a);for(var c=this.be.Qa(qd);c;c=c.next)a!=c.Oc.Rb&&a!=c.Oc.Nb||this.Oa.Sd.Id(c.Oc);this.Cn&&a.jm(this.Oa.Sd.ul);a.Id();a.En=null;this.Dw()};u.ym=function(a,c){this.A.n.Set(c);this.A.position.F(a);var b=this.A.n,d=this.m.N;this.m.u.x=b.j.x*d.x+b.k.x*d.y;this.m.u.y=b.j.y*d.x+b.k.y*d.y;this.m.u.x+=this.A.position.x;this.m.u.y+=
this.A.position.y;this.m.Yc.F(this.m.u);this.m.nf=this.m.G=c;b=this.Oa.Sd.ul;for(d=this.dl.Qa();d;d=d.next)d.uf.Mw(b,this.A,this.A);this.Oa.Sd.Jo()};u.te=function(){return this.A};u.ws=function(a){this.ym(a,this.Jd())};u.Jd=function(){return this.m.G};u.Ro=function(a){this.ym(this.A.position,a)};u.Nk=function(){return this.m.u};u.sj=function(){return this.m.N};u.xj=function(a){this.Za!=W.Te&&this.p.F(a)};u.rj=function(){return this.p};u.wm=function(a){void 0===a&&(a=0);this.Za!=W.Te&&(this.D=a)};
u.Ko=function(){return this.D};u.yg=function(a,c){this.Za==W.Mc&&(this.nd(!0),this.ai.x+=a.x,this.ai.y+=a.y,this.sk+=(c.x-this.m.u.x)*a.y-(c.y-this.m.u.y)*a.x)};u.Bo=function(a){void 0===a&&(a=0);this.Za==W.Mc&&(this.nd(!0),this.sk+=a)};u.Mk=function(){return this.S};u.kw=function(a){a||(a=new Hc);a.bh=this.S;a.Ok=this.Ef;a.Eh.F(this.m.N);return a};u.Dw=function(){this.O=this.Ef=this.I=this.S=0;this.m.N.fa();if(this.Za!=W.Te&&this.Za!=W.hx){for(var a=R.q(0,0),c=this.dl.Qa();c;c=c.next){var b=c.uf;
0!=b.Hq&&(b=b.kw(),this.S+=b.bh,a.x+=b.Eh.x*b.bh,a.y+=b.Eh.y*b.bh,this.Ef+=b.Ok)}0<this.S?(this.I=1/this.S,a.x*=this.I,a.y*=this.I):this.I=this.S=1;0<this.Ef&&!this.AF?(this.Ef-=this.S*(a.x*a.x+a.y*a.y),this.Ef*=this.EF,this.O=1/this.Ef):this.O=this.Ef=0;c=this.m.u.uc();this.m.N.F(a);this.m.Yc.F(T.Kc(this.A,this.m.N));this.m.u.F(this.m.Yc);this.p.x+=this.D*-(this.m.u.y-c.y);this.p.y+=this.D*+(this.m.u.x-c.x);R.lc(a);R.lc(c)}};u.Oo=function(a){var c=this.A.n;a=R.q(c.j.x*a.x+c.k.x*a.y,c.j.y*a.x+c.k.y*
a.y);a.x+=this.A.position.x;a.y+=this.A.position.y;return a};u.ds=function(a){return T.Zb(this.A.n,a)};u.vd=function(a){return T.ks(this.A,a)};u.bs=function(a){return T.zh(this.A.n,a)};u.qB=function(a){return R.q(this.p.x-this.D*(a.y-this.m.u.y),this.p.y+this.D*(a.x-this.m.u.x))};u.Vc=function(){return this.Za};u.nd=function(a){if(this.Au!=a)for(this.Au=a,this.Mn=0,a||(this.p.fa(),this.D=0,this.ai.fa(),this.sk=0),a=0;a<this.Lq.length;a++)this.Lq[a].Pw(this)};u.wd=function(){return this.Au};u.uj=function(){return this.Cn};
u.$r=function(){return this.dl};u.dm=function(a){this.Ij.dm(a)};u.um=function(a){this.Ij.um(a)};u.vi=function(){return this.be};u.Nw=function(){var a=oc.EG;a.n.Set(this.m.nf);var c=a.n,b=this.m.N;a.position.x=this.m.Yc.x-(c.j.x*b.x+c.k.x*b.y);a.position.y=this.m.Yc.y-(c.j.y*b.x+c.k.y*b.y);c=this.Oa.Sd.ul;for(b=this.dl.Qa();b;b=b.next)b.uf.Mw(c,a,this.A)};u.Qb=function(){this.A.n.Set(this.m.G);var a=this.A.n,c=this.m.N;this.A.position.x=this.m.u.x-(a.j.x*c.x+a.k.x*c.y);this.A.position.y=this.m.u.y-
(a.j.y*c.x+a.k.y*c.y)};u.yj=function(a){if(this.Za!=W.Mc&&a.Za!=W.Mc)return!1;for(var c=this.Ob;c;c=c.next)if(c.ef==a&&0==c.Wh.dz)return!1;return!0};u.ti=function(a){this.m.ti(a);this.m.u.F(this.m.Yc);this.m.G=this.m.nf;this.Qb()};oc.ls=0;var W=function(){this.position=R.q(0,0);this.ou=R.q(0,0);this.Bj=this.ek=this.Zw=this.M=0;this.cx=this.Yw=!0;this.Gj=this.kt=!1;this.type=W.Te;this.xd=!0;this.ey=1};W.Te=0;W.hx=1;W.Mc=2;var sd=function(){this.gp=[];for(var a=0;a<=rd;a++)this.gp[a]=null;this.ip=[];
for(a=0;a<=rd;a++)this.ip[a]=null;this.Vk={}};u=sd.prototype;u.Qa=function(a){return this.gp[a]};u.Gk=function(a){var c=a.Kd;null==this.Vk[c]&&(this.zg(a,c,rd),this.Pw(a),a.Lq.push(this))};u.Pw=function(a){var c=a.Vc(),b=a.Kd,d=a.wd(),e=a.uj();c==W.Mc?this.zg(a,b,td):this.Dg(b,td);c!=W.Te?this.zg(a,b,ud):this.Dg(b,ud);c!=W.Te&&e&&d?this.zg(a,b,vd):this.Dg(b,vd);d?this.zg(a,b,wd):this.Dg(b,wd);e?this.zg(a,b,xd):this.Dg(b,xd)};u.tm=function(a){var c=a.Kd;if(null!=this.Vk[c]){Aa(a.Lq,this);for(a=0;a<=
rd;a++)this.Dg(c,a);delete this.Vk[c]}};u.Dg=function(a,c){var b=this.Vk[a];if(null!=b){var d=b[c];null!=d&&(b[c]=null,b=d.Nf,d=d.next,null==b?this.gp[c]=d:b.Vf(d),null==d?this.ip[c]=b:d.Wf(b))}};u.zg=function(a,c,b){var d=this.Vk[c];if(null==d){for(var d=[],e=0;e<=rd;e++)d[e]=null;this.Vk[c]=d}null==d[b]&&(d[b]=new yd(a),a=this.ip[b],null!=a?a.Vf(d[b]):this.gp[b]=d[b],d[b].Wf(a),this.ip[b]=d[b])};var td=0,ud=1,xd=2,vd=3,wd=4,rd=5,yd=function(a){this.body=a;this.Nf=this.next=null};yd.prototype.Vf=
function(a){this.next=a};yd.prototype.Wf=function(a){this.Nf=a};yd.prototype.Va=function(){return this.body};var qc=function(){};qc.prototype.yj=function(a,c){var b=a.jw(),d=c.jw();return b.Li==d.Li&&0!=b.Li?0<b.Li:0!=(b.El&d.Wk)&&0!=(b.Wk&d.El)};qc.UC=new qc;var zd=function(){this.XF=[];this.RG=[]},pc=function(){};pc.prototype.Co=function(){};var Bd=function(a){this.Oa=a;this.Bu=qc.UC;this.Zh=pc.gx;this.ez=new Ad;this.ul=new $c};Bd.prototype.aB=function(a,c){var b=a.Va(),d=c.Va();if(b!=d&&d.yj(b)&&
this.Bu.yj(a,c)){for(b=d.be.Qa(qd);b;b=b.next)if(d=b.Oc.Rb,d==a){if(d=b.Oc.Nb,d==c)return}else if(d==c&&(d=b.Oc.Nb,d==a))return;this.ez.kf(a,c)}};Bd.prototype.Jo=function(){var a=this;this.ul.pC(function(c,b){a.aB(c,b)})};Bd.prototype.Id=function(a){0<a.cf.ec&&(a.Rb.Va().nd(!0),a.Nb.Va().nd(!0));a.bC();this.ez.Id(a)};Bd.prototype.hB=function(){for(var a=this.Oa.be.Qa(qd);a;a=a.next){var c=a.Oc,b=c.Rb,d=c.Nb,e=b.Va(),f=d.Va();if(0!=e.wd()||0!=f.wd()){if(c.Lp){if(0==f.yj(e)){this.Id(c);continue}if(0==
this.Bu.yj(b,d)){this.Id(c);continue}c.gB()}0==this.ul.Am(b.ok,d.ok)?this.Id(c):c.Ow(this.Zh)}}};var Cd=function(){this.Wk=1;this.El=65535;this.Li=0};Cd.prototype.uc=function(){var a=new Cd;a.Wk=this.Wk;a.El=this.El;a.Li=this.Li;return a};var nc=function(a,c,b){this.Kd="Fixture"+nc.ls++;this.zF=b.filter.uc();this.jk=Pc();this.En=a;this.fi=b.shape.uc();this.Hq=b.dg;this.Eu=b.Pg;this.Lu=b.lh;this.Jq=b.Wt};u=nc.prototype;u.Jc=function(){return this.fi};u.vj=function(){return this.Jq};u.jw=function(){return this.zF.uc()};
u.Va=function(){return this.En};u.kw=function(a){a||(a=new Hc);this.fi.gm(a,this.Hq);return a};u.Id=function(){Oc.push(this.jk)};u.hm=function(a,c){this.fi.Ik(this.jk,c);this.ok=a.hm(this.jk,this)};u.jm=function(a){null!=this.ok&&(a.jm(this.ok),this.ok=null)};u.Mw=function(a,c,b){if(this.ok){var d=Pc(),e=Pc();this.fi.Ik(d,c);this.fi.Ik(e,b);this.jk.Eo(d,e);Oc.push(d);Oc.push(e);c=T.Cb(b.position,c.position);a.hs(this.ok,this.jk,c);R.lc(c)}};nc.ls=0;var tc=function(){this.filter=new Cd;this.filter.Wk=
1;this.filter.El=65535;this.filter.Li=0;this.shape=null;this.Pg=.2;this.dg=this.lh=0;this.Wt=!1},pd=function(){this.mt=this.lt=null;this.Pp={}};pd.prototype.Qa=function(){return this.lt};pd.prototype.ZA=function(a){var c=a.Kd;if(null==this.Pp[c]){a=new Dd(a);var b=this.mt;null!=b?b.Vf(a):this.lt=a;a.Wf(b);this.mt=a;this.Pp[c]=a}};pd.prototype.aC=function(a){a=a.Kd;var c=this.Pp[a];if(null!=c){var b=c.Nf,c=c.next;null==b?this.lt=c:b.Vf(c);null==c?this.mt=b:c.Wf(b);delete this.Pp[a]}};var Dd=function(a){this.uf=
a;this.Nf=this.next=null};Dd.prototype.Vf=function(a){this.next=a};Dd.prototype.Wf=function(a){this.Nf=a};var Ed=function(a,c){this.IF=a;this.lg=c;this.Vg=[];this.Iq=[];this.Wi=[];this.$h=[];this.Dd=[]};u=Ed.prototype;u.Do=function(){this.Vg=[];this.Iq=[];this.Wi=[];this.$h=[];this.Dd=[]};u.Ai=function(a,c,b){this.zC(a,c);this.lg.mc(a,this.$h,this.$h.length);this.FC(a);this.BC(a);this.CC(a);this.Cw(this.lg.Wg);b&&this.AC(a)};u.zC=function(a,c){for(var b=0;b<this.Iq.length;b++){var d=this.Iq[b];d.p.x+=
a.Fa*(c.x+d.I*d.ai.x);d.p.y+=a.Fa*(c.y+d.I*d.ai.y);d.D+=a.Fa*d.O*d.sk;d.p.Ld(T.Kb(1-a.Fa*d.HF,0,1));d.D*=T.Kb(1-a.Fa*d.vF,0,1)}};u.FC=function(a){this.lg.lf(a);for(var c=0;c<this.Dd.length;c++)this.Dd[c].lf(a);for(c=0;c<a.xo;c++){for(var b=0;b<this.Dd.length;b++)this.Dd[b].Se(a);this.lg.Se()}for(a=0;a<this.Dd.length;a++)this.Dd[a].Yr();this.lg.Yr()};u.BC=function(a){for(var c=0;c<this.Wi.length;++c){var b=this.Wi[c],d=a.Fa*b.p.x,e=a.Fa*b.p.y;4<d*d+e*e&&(b.p.Md(),b.p.x=2*b.p.x*a.Th,b.p.y=2*b.p.y*a.Th);
d=a.Fa*b.D;d*d>zc&&(b.D=0>b.D?-yc*a.Th:yc*a.Th);b.m.Yc.F(b.m.u);b.m.nf=b.m.G;b.m.u.x+=a.Fa*b.p.x;b.m.u.y+=a.Fa*b.p.y;b.m.G+=a.Fa*b.D;b.Qb()}};u.CC=function(a){for(var c=0;c<a.Zn;c++){for(var b=this.lg.Re(.2),d=!0,e=0;e<this.Dd.length;e++)var f=this.Dd[e].Re(.2),d=d&&f;if(b&&d)break}};u.AC=function(a){for(var c=Number.MAX_VALUE,b=0;b<this.Wi.length;b++){var d=this.Wi[b];!d.zu||Math.abs(d.D)>Ac||1E-4<T.Pb(d.p,d.p)?c=d.Mn=0:(d.Mn+=a.Fa,c=Math.min(c,d.Mn))}if(.5<=c)for(a=0;a<this.Vg.length;a++)this.Vg[a].nd(!1)};
u.ys=function(a){var c=0,b=0;this.lg.mc(a,this.$h,this.$h.length);for(var d=this.lg,c=0;c<this.Dd.length;++c)this.Dd[c].lf(a);for(c=0;c<a.xo;++c)for(d.Se(),b=0;b<this.Dd.length;++b)this.Dd[b].Se(a);for(c=0;c<this.Wi.length;++c){var b=this.Wi[c],e=a.Fa*b.p.x,f=a.Fa*b.p.y;4<e*e+f*f&&(b.p.Md(),b.p.x=2*b.p.x*a.Th,b.p.y=2*b.p.y*a.Th);e=a.Fa*b.D;e*e>zc&&(b.D=0>b.D?-yc*a.Th:yc*a.Th);b.m.Yc.F(b.m.u);b.m.nf=b.m.G;b.m.u.x+=a.Fa*b.p.x;b.m.u.y+=a.Fa*b.p.y;b.m.G+=a.Fa*b.D;b.Qb()}for(c=0;c<a.Zn;++c){e=d.Re(.75);
f=!0;for(b=0;b<this.Dd.length;++b)var h=this.Dd[b].Re(.2),f=f&&h;if(e&&f)break}this.Cw(d.Wg)};u.Cw=function(a){if(null!=this.IF)for(var c=0;c<this.$h.length;++c)for(var b=a[c],d=new zd,e=0;e<b.Lf;++e)d.XF[e]=b.jc[e].hc,d.RG[e]=b.jc[e].ph};u.Gk=function(a){this.Vg.push(a);a.Vc()!=W.Te&&(this.Wi.push(a),a.Vc()==W.Mc&&this.Iq.push(a))};u.Hk=function(a){this.$h.push(a)};u.bw=function(a){this.Dd.push(a)};var Fd=function(a,c,b,d,e){this.Fa=a;var f=0;0<a&&(f=1/a);this.Th=f;this.yc=c;this.Zn=b;this.xo=d;
this.ri=e},rc=function(a,c){this.Sd=new Bd(this);this.lg=new Gd;this.Ku=!1;this.Xc=new sd;this.be=new nd;this.Ob=null;this.Ij=new od;this.Kq=0;this.xF=this.OF=!0;this.zu=c;this.fz=a;this.gz=0;this.DF=this.Wr(new W)};rc.zB=1-100*Number.MIN_VALUE;u=rc.prototype;u.Gw=function(a){this.Sd.Bu=a};u.Hw=function(a){this.Sd.Zh=a};u.Wr=function(a){a=new oc(a,this);this.Xc.Gk(a);return a};u.Ho=function(a){for(var c=a.Ob;c;){var b=c,c=c.next;this.Io(b.Wh)}for(c=a.Ij.Qa();c;c=c.next)c.Ax.tm(a);for(c=a.be.Qa(qd);c;c=
c.next)this.Sd.Id(c.Oc);for(c=a.$r().Qa();c;c=c.next)a.fw(c.uf);a.Id();this.Xc.tm(a)};u.Go=function(a){var c=Z.kf(a);c.yl=null;if(c.Vi=this.Ob)this.Ob.yl=c;this.Ob=c;this.Kq++;c.Td.Wh=c;c.Td.ef=c.U;c.Td.prev=null;if(c.Td.next=c.T.Ob)c.T.Ob.prev=c.Td;c.T.Ob=c.Td;c.Ud.Wh=c;c.Ud.ef=c.T;c.Ud.prev=null;if(c.Ud.next=c.U.Ob)c.U.Ob.prev=c.Ud;c.U.Ob=c.Ud;var b=a.K,d=a.L;if(!a.Ms)for(a=d.be.Qa(qd);a;a=a.next)a.Oc.Mo(d)==b&&a.Oc.hw();return c};u.Io=function(a){var c=a.dz;a.yl&&(a.yl.Vi=a.Vi);a.Vi&&(a.Vi.yl=
a.yl);a==this.Ob&&(this.Ob=a.Vi);var b=a.T,d=a.U;b.nd(!0);d.nd(!0);a.Td.prev&&(a.Td.prev.next=a.Td.next);a.Td.next&&(a.Td.next.prev=a.Td.prev);a.Td==b.Ob&&(b.Ob=a.Td.next);a.Td.prev=null;a.Td.next=null;a.Ud.prev&&(a.Ud.prev.next=a.Ud.next);a.Ud.next&&(a.Ud.next.prev=a.Ud.prev);a.Ud==d.Ob&&(d.Ob=a.Ud.next);a.Ud.prev=null;a.Ud.next=null;this.Kq--;if(!c)for(a=d.be.Qa(qd);a;a=a.next)a.Oc.Mo(d)==b&&a.Oc.hw()};u.dm=function(a){if(null!==a.Oa&&a.Oa!=this)throw Error("Controller can only be a member of one world");
this.Ij.dm(a);a.Oa=this;return a};u.um=function(a){this.Ij.um(a);a.Oa=null;a.Do()};u.Ah=function(a,c,b){this.Ku&&(this.Sd.Jo(),this.Ku=!1);a=new Fd(a,this.gz*a,c,b,this.OF);this.Sd.hB();0<a.Fa&&(this.Ai(a),this.xF&&this.ys(a),this.gz=a.Th)};u.ew=function(){for(var a=this.Xc.Qa(td);a;a=a.next)a.body.ai.fa(),a.body.sk=0};u.vi=function(){return this.be};var Hd=[];rc.prototype.Ai=function(a){for(var c=this.Ij.Qa();c;c=c.next)c.Ax.Ah(a);for(var c=new Ed(this.Sd.Zh,this.lg),b=this.Xc.Qa(rd);b;b=b.next)b.body.Gb=
!1;for(var d=this.be.Qa(qd);d;d=d.next)d.Oc.Gb=!1;for(b=this.Ob;b;b=b.Vi)b.Gb=!1;for(b=this.Xc.Qa(vd);b;b=b.next)if(d=b.body,!d.Gb){c.Do();Hd.length=0;var e=Hd;e.push(d);for(d.Gb=!0;0<e.length;){var f=e.pop();c.Gk(f);f.wd()||f.nd(!0);if(f.Vc()!=W.Te){for(d=f.be.Qa(Id);d;d=d.next){var h=d.Oc;h.Gb||(c.Hk(h),h.Gb=!0,h=h.Mo(f),h.Gb||(e.push(h),h.Gb=!0))}for(d=f.Ob;d;d=d.next)!d.Wh.Gb&&d.ef.uj()&&(c.bw(d.Wh),d.Wh.Gb=!0,d.ef.Gb||(e.push(d.ef),d.ef.Gb=!0))}}c.Ai(a,this.fz,this.zu)}for(b=this.Xc.Qa(vd);b;b=
b.next)b.body.Nw();this.Sd.Jo()};rc.prototype.ys=function(a){for(var c=new Ed(this.Sd.Zh,this.lg),b=this.Xc.Qa(rd);b;b=b.next){var d=b.body;d.Gb=!1;d.m.Hd=0}for(var e=this.be.Qa(qd);e;e=e.next)e.Oc.Gb=!1,e.Oc.Cl=null;for(b=this.Ob;b;b=b.Vi)b.Gb=!1;for(;;){var b=this.DC(),f=b.VF,b=b.WF;if(null===f||rc.zB<b)break;e=f.Rb.Va();d=f.Nb.Va();rc.eA.Set(e.m);rc.fA.Set(d.m);e.ti(b);d.ti(b);f.Ow(this.Sd.Zh);f.Cl=null;if(f.ur||!f.enabled)e.m.Set(rc.eA),d.m.Set(rc.fA),e.Qb(),d.Qb();else if(f.to){e.Vc()!=W.Mc&&
(e=d);c.Do();Hd.length=0;f=Hd;f.push(e);for(e.Gb=!0;0<f.length;)if(d=f.pop(),c.Gk(d),d.wd()||d.nd(!0),d.Vc()==W.Mc){for(e=d.be.Qa(Id);e&&32!=c.wF;e=e.next){var h=e.Oc;h.Gb||(c.Hk(h),h.Gb=!0,h=h.Mo(d),h.Gb||(h.Vc()!=W.Te&&(h.ti(b),h.nd(!0),f.push(h)),h.Gb=!0))}for(d=d.Ob;d;d=d.next)32!=c.Kq&&!d.Wh.Gb&&d.ef.uj()&&(c.bw(d.Wh),d.Wh.Gb=!0,d.ef.Gb||(d.ef.Vc()!=W.Te&&(d.ef.ti(b),d.ef.nd(!0),f.push(d.ef)),d.ef.Gb=!0))}c.ys(new Fd((1-b)*a.Fa,0,a.xo,a.Zn,!1));for(b=0;b<c.Vg.length;b++)if(c.Vg[b].Gb=!1,c.Vg[b].wd()&&
c.Vg[b].Vc()==W.Mc)for(c.Vg[b].Nw(),e=c.Vg[b].be.Qa(qd);e;e=e.next)e.Oc.Cl=null;for(b=0;b<c.wF;b++)c.$h[b].Gb=!1,c.$h[b].Cl=null;for(b=0;b<c.Kq;b++)c.Dd[b].Gb=!1;this.Sd.Jo()}}};rc.prototype.DC=function(){for(var a=null,c=1,b=this.be.Qa(Jd);b;b=b.next){var d=b.Oc;if(!this.EC(d)){var e=1;if(null!=d.Cl)e=d.Cl;else{if(d.to)e=1;else{var e=d.Rb.Va(),f=d.Nb.Va(),h=e.m.Hd;e.m.Hd<f.m.Hd?(h=f.m.Hd,e.m.ti(h)):f.m.Hd<e.m.Hd&&(h=e.m.Hd,f.m.ti(h));e=d.kB(e.m,f.m);0<e&&1>e&&(e=(1-e)*h+e)}d.Cl=e}Number.MIN_VALUE<
e&&e<c&&(a=d,c=e)}}return{VF:a,WF:c}};rc.prototype.EC=function(a){var c=a.Rb.Va();a=a.Nb.Va();return c.Vc()==W.Mc&&c.wd()||a.Vc()==W.Mc&&a.wd()?!1:!0};var Ld=function(a,c){this.Kd="Contact"+Kd++;this.cf=new ed;this.Kn=new ed;this.to=!1;var b=a.Va(),d=c.Va();this.Ns=b.Vc()!=W.Mc||b.wl||d.Vc()!=W.Mc||d.wl;this.ur=a.vj()||c.vj();this.Lp=!1;this.Rb=a;this.Nb=c;this.enabled=!0;this.ep=b.vi();this.fp=d.vi();this.Ur=d.Oa.vi();this.cw()};u=Ld.prototype;u.Wc=function(a,c){this.cf.Wc();this.Kn.Wc();this.to=
!1;var b=a.Va(),d=c.Va();this.Ns=b.Vc()!=W.Mc||b.wl||d.Vc()!=W.Mc||d.wl;this.ur=a.vj()||c.vj();this.Lp=!1;this.Rb=a;this.Nb=c;this.enabled=!0;this.ep=b.vi();this.fp=d.vi();this.Ur=d.Oa.vi();this.cw()};u.cw=function(){this.ep.Hk(this);this.fp.Hk(this);this.Ur.Hk(this);this.Qw()};u.Qw=function(){var a=!1,c=!1;!this.vj()&&this.es()&&(this.gs()&&(a=!0),this.Ns&&(c=!0));this.ep.As(this,a,c);this.fp.As(this,a,c);this.Ur.As(this,a,c)};u.bC=function(){this.ep.us(this);this.fp.us(this);this.Ur.us(this)};u.gs=
function(){return this.to};u.vj=function(){return this.ur};u.es=function(){return this.enabled};u.Mo=function(a){var c=this.Rb.Va();return c!=a?c:this.Nb.Va()};u.hw=function(){this.Lp=!0};u.gB=function(){this.Lp=!1};u.Ow=function(a){var c=this.Kn;this.Kn=this.cf;this.cf=c;this.enabled=!0;var b=!1,c=this.gs(),d=this.Rb.Va(),e=this.Nb.Va(),f=this.Rb.jk.Am(this.Nb.jk);if(this.ur){if(f){var b=this.Rb.Jc(),d=d.te(),f=this.Nb.Jc(),h=e.te(),e=new Vc;e.ji=new Xc;e.ji.Set(b);e.ki=new Xc;e.ki.Set(f);e.Nr=d;
e.Or=h;e.TA=!0;d=new kd;d.count=0;b=new Wc;Uc(b,d,e);b=b.Kh<10*Number.MIN_VALUE}this.cf.ec=0}else{this.Ns=d.Vc()!=W.Mc||d.wl||e.Vc()!=W.Mc||e.wl?!0:!1;if(f)for(this.Ag(),b=0<this.cf.ec,f=0;f<this.cf.ec;f++){h=this.cf.ma[f];h.nk=0;for(var g=h.rk=0;g<this.Kn.ec;g++){var m=this.Kn.ma[g];if(m.Gf.Nd==h.Gf.Nd){h.nk=m.nk;h.rk=m.rk;break}}}else this.cf.ec=0;b!=c&&(d.nd(!0),e.nd(!0))}this.to=b;b!=c&&this.Qw();!c&&b&&a.Co(this)};u.Ag=function(){};u.kB=function(a,c){Md.ji.Set(this.Rb.Jc());Md.ki.Set(this.Nb.Jc());
Md.tA=a;Md.uA=c;Md.ZG=.005;var b=Md;Nd++;var d=b.ji,e=b.ki,f=b.tA,h=b.uA,g=d.Ya+e.Ya,b=b.ZG,m=0,l=0,n=0;Od.count=0;for(Pd.TA=!1;;){f.te(Qd,m);h.te(Rd,m);Pd.ji=d;Pd.ki=e;Pd.Nr=Qd;Pd.Or=Rd;Uc(Sd,Od,Pd);if(0>=Sd.Kh){m=1;break}Td.mc(Od,d,Qd,e,Rd);var k=Td.Ag(Qd,Rd);if(0>=k){m=1;break}0==l&&(n=k>g?Math.max(g-b,.75*g):Math.max(k-b,.02*g));if(k-n<.5*b){if(0==l){m=1;break}break}var r=m,q=m,s=1;f.te(Qd,s);h.te(Rd,s);var t=Td.Ag(Qd,Rd);if(t>=n){m=1;break}for(var p=0;;){var y=0,y=p&1?q+(n-k)*(s-q)/(t-k):.5*
(q+s);f.te(Qd,y);h.te(Rd,y);var A=Td.Ag(Qd,Rd);if(Math.abs(A-n)<.025*b){r=y;break}A>n?(q=y,k=A):(s=y,t=A);p++;Ud++;if(50==p)break}Vd=Math.max(Vd,p);if(r<(1+100*Number.MIN_VALUE)*m)break;m=r;l++;Wd++;if(1E3==l)break}Xd=Math.max(Xd,l);return m};var Md=new ld,Kd=0,Yd=function(a,c){Ld.call(this,a,c)};Q(Yd,Ld);Yd.prototype.Wc=function(a,c){Ld.prototype.Wc.call(this,a,c)};Yd.prototype.Ag=function(){var a=this.cf,c=this.Rb.Jc(),b=this.Rb.Va().A,d=this.Nb.Jc(),e=this.Nb.Va().A;a.ec=0;var f=e.position.x+(e.n.j.x*
d.ib.x+e.n.k.x*d.ib.y)-(b.position.x+(b.n.j.x*c.ib.x+b.n.k.x*c.ib.y)),b=e.position.y+(e.n.j.y*d.ib.x+e.n.k.y*d.ib.y)-(b.position.y+(b.n.j.y*c.ib.x+b.n.k.y*c.ib.y)),e=c.Ya+d.Ya;f*f+b*b>e*e||(a.Za=1,a.xa.F(c.ib),a.ed.fa(),a.ec=1,a.ma[0].xa.F(d.ib),a.ma[0].Gf.wj(0))};var $d=function(){this.Tg=R.q(0,0);this.cc=R.q(0,0);this.Ed=R.q(0,0);this.hi=new S;this.ue=new S;this.jc=[];for(var a=0;2>a;a++)this.jc[a]=new Zd},Zd=function(){this.cc=R.q(0,0);this.Vb=R.q(0,0);this.Wb=R.q(0,0)};Zd.prototype.Wc=function(){this.cc.Set(0,
0);this.Vb.Set(0,0);this.Wb.Set(0,0)};var Ad=function(){this.ng={};this.bi={};this.em(Yd,sc.Tf,sc.Tf);this.em(ae,Y.Tf,sc.Tf);this.em(be,Y.Tf,Y.Tf);this.em(ce,"b2EdgeShape",sc.Tf);this.em(de,Y.Tf,"b2EdgeShape")};Ad.prototype.em=function(a,c,b){this.bi[c]=this.bi[c]||{};this.bi[c][b]=this.bi[c][b]||[];this.ng[c]=this.ng[c]||{};this.ng[c][b]=new ee;this.ng[c][b].Dx=a;this.ng[c][b].Tz=!0;c!=b&&(this.ng[b]=this.ng[b]||{},this.ng[b][c]=new ee,this.ng[b][c].Dx=a,this.ng[b][c].Tz=!1)};Ad.prototype.kf=function(a,
c){var b=a.Jc().tj(),d=c.Jc().tj(),e=this.ng[b][d],f=e.Dx;return null!=f?e.Tz?0<this.bi[b][d].length?(b=this.bi[b][d].pop(),b.Wc(a,c),b):new f(a,c):0<this.bi[d][b].length?(b=this.bi[d][b].pop(),b.Wc(c,a),b):new f(c,a):null};Ad.prototype.Id=function(a){var c=a.Rb.Jc().tj(),b=a.Nb.Jc().tj();this.bi[c][b].push(a)};var nd=function(){this.qp=[];for(var a=0;a<=qd;a++)this.qp[a]=null;this.rp=[];for(a=0;a<=qd;a++)this.rp[a]=null;this.Hj={}};u=nd.prototype;u.Qa=function(a){return this.qp[a]};u.Hk=function(a){var c=
a.Kd;if(null==this.Hj[c]){this.Hj[c]=[];for(var b=0;b<=qd;b++)this.Hj[c][b]=null;this.zg(a,c,qd)}};u.As=function(a,c,b){c?this.zg(a,a.Kd,Id):this.Dg(a.Kd,Id);b?this.zg(a,a.Kd,Jd):this.Dg(a.Kd,Jd)};u.us=function(a){a=a.Kd;if(null!=this.Hj[a]){for(var c=0;c<=qd;c++)this.Dg(a,c);delete this.Hj[a]}};u.Dg=function(a,c){var b=this.Hj[a];if(null!=b){var d=b[c];if(null!=d){b[c]=null;var b=d.Nf,e=d.next;null==b?this.qp[c]=e:b.Vf(e);null==e?this.rp[c]=b:e.Wf(b);fe.push(d)}}};u.zg=function(a,c,b){c=this.Hj[c];
if(null==c[b]){if(0<fe.length){var d=fe.pop();d.next=null;d.Nf=null;d.Oc=a;a=d}else a=new ge(a);c[b]=a;a=this.rp[b];null!=a?(a.Vf(c[b]),c[b].Wf(a)):this.qp[b]=c[b];this.rp[b]=c[b]}};var Id=0,Jd=1,qd=2,ge=function(a){this.Oc=a;this.Nf=this.next=null},fe=[];ge.prototype.Vf=function(a){this.next=a};ge.prototype.Wf=function(a){this.Nf=a};var ee=function(){},he=function(){this.ya=R.q(0,0);this.Pq=[];this.ma=[];for(var a=0;2>a;a++)this.ma[a]=R.q(0,0)};he.prototype.mc=function(a){switch(a.type){case 1:this.wC(a);
break;case 2:this.xC(a);break;case 4:this.yC(a)}};he.prototype.wC=function(a){var c=a.K.A.n,b=a.cc,d=a.K.A.position.x+(c.j.x*b.x+c.k.x*b.y),e=a.K.A.position.y+(c.j.y*b.x+c.k.y*b.y),c=a.L.A.n,b=a.jc[0].cc,f=a.L.A.position.x+(c.j.x*b.x+c.k.x*b.y),c=a.L.A.position.y+(c.j.y*b.x+c.k.y*b.y),b=f-d,h=c-e,g=b*b+h*h;g>Bc?(g=Math.sqrt(g),this.ya.x=b/g,this.ya.y=h/g):(this.ya.x=1,this.ya.y=0);this.ma[0].x=.5*(d+f);this.ma[0].y=.5*(e+c);this.Pq[0]=b*this.ya.x+h*this.ya.y-a.kr};he.prototype.xC=function(a){this.ya.x=
a.K.A.n.j.x*a.Tg.x+a.K.A.n.k.x*a.Tg.y;this.ya.y=a.K.A.n.j.y*a.Tg.x+a.K.A.n.k.y*a.Tg.y;for(var c=a.K.A.position.x+(a.K.A.n.j.x*a.cc.x+a.K.A.n.k.x*a.cc.y),b=a.K.A.position.y+(a.K.A.n.j.y*a.cc.x+a.K.A.n.k.y*a.cc.y),d=0;d<a.Lf;d++){var e=a.L.A.position.x+(a.L.A.n.j.x*a.jc[d].cc.x+a.L.A.n.k.x*a.jc[d].cc.y),f=a.L.A.position.y+(a.L.A.n.j.y*a.jc[d].cc.x+a.L.A.n.k.y*a.jc[d].cc.y);this.Pq[d]=(e-c)*this.ya.x+(f-b)*this.ya.y-a.kr;this.ma[d].x=e;this.ma[d].y=f}};he.prototype.yC=function(a){this.ya.x=a.L.A.n.j.x*
a.Tg.x+a.L.A.n.k.x*a.Tg.y;this.ya.y=a.L.A.n.j.y*a.Tg.x+a.L.A.n.k.y*a.Tg.y;for(var c=a.L.A.position.x+(a.L.A.n.j.x*a.cc.x+a.L.A.n.k.x*a.cc.y),b=a.L.A.position.y+(a.L.A.n.j.y*a.cc.x+a.L.A.n.k.y*a.cc.y),d=0;d<a.Lf;d++){var e=a.K.A.position.x+(a.K.A.n.j.x*a.jc[d].cc.x+a.K.A.n.k.x*a.jc[d].cc.y),f=a.K.A.position.y+(a.K.A.n.j.y*a.jc[d].cc.x+a.K.A.n.k.y*a.jc[d].cc.y);this.Pq[d]=(e-c)*this.ya.x+(f-b)*this.ya.y-a.kr;this.ma[d].Set(e,f)}this.ya.x*=-1;this.ya.y*=-1};var Gd=function(){this.Wg=[]};u=Gd.prototype;
u.mc=function(a,c,b){for(this.Fn=b;this.Wg.length<this.Fn;)this.Wg[this.Wg.length]=new $d;for(a=0;a<b;a++){var d=c[a],e=d.Rb,f=d.Nb,h=e.fi.Ya,g=f.fi.Ya,m=e.Va(),l=f.Va(),n=d.cf,k=Math.sqrt(e.Eu*f.Eu),r,e=e.Lu,f=f.Lu;r=e>f?e:f;var q=m.p.x,s=m.p.y,t=l.p.x,p=l.p.y,y=m.D,A=l.D;me.mc(n,m.A,h,l.A,g);e=me.ya.x;d=me.ya.y;f=this.Wg[a];f.K=m;f.L=l;f.PF=n;f.Ed.x=e;f.Ed.y=d;f.Lf=n.ec;f.Pg=k;f.lh=r;f.Tg.x=n.ed.x;f.Tg.y=n.ed.y;f.cc.x=n.xa.x;f.cc.y=n.xa.y;f.kr=h+g;f.type=n.Za;for(h=0;h<f.Lf;++h){k=n.ma[h];g=f.jc[h];
g.hc=k.nk;g.ph=k.rk;g.cc.F(k.xa);k=g.Vb.x=me.ma[h].x-m.m.u.x;r=g.Vb.y=me.ma[h].y-m.m.u.y;var D=g.Wb.x=me.ma[h].x-l.m.u.x,w=g.Wb.y=me.ma[h].y-l.m.u.y,G=k*d-r*e,I=D*d-w*e,G=G*G,I=I*I;g.hi=1/(m.I+l.I+m.O*G+l.O*I);var E=m.S*m.I+l.S*l.I,E=E+(m.S*m.O*G+l.S*l.O*I);g.OD=1/E;I=d;E=-e;G=k*E-r*I;I=D*E-w*I;G*=G;I*=I;g.SG=1/(m.I+l.I+m.O*G+l.O*I);g.wo=0;k=f.Ed.x*(t+-A*w-q- -y*r)+f.Ed.y*(p+A*D-s-y*k);-1>k&&(g.wo+=-f.lh*k)}2==f.Lf&&(p=f.jc[0],t=f.jc[1],n=m.I,m=m.O,q=l.I,l=l.O,s=p.Vb.x*d-p.Vb.y*e,p=p.Wb.x*d-p.Wb.y*
e,y=t.Vb.x*d-t.Vb.y*e,t=t.Wb.x*d-t.Wb.y*e,e=n+q+m*s*s+l*p*p,d=n+q+m*y*y+l*t*t,l=n+q+m*s*y+l*p*t,e*e<100*(e*d-l*l)?(f.ue.j.Set(e,l),f.ue.k.Set(l,d),f.ue.as(f.hi)):f.Lf=1)}};u.lf=function(a){for(var c=0;c<this.Fn;++c){var b=this.Wg[c],d=b.K,e=b.L,f=d.I,h=d.O,g=e.I,m=e.O,l=b.Ed.x,n=b.Ed.y,k=n,r=-l,q=0,s=0;if(a.ri)for(s=b.Lf,q=0;q<s;++q){var t=b.jc[q];t.hc*=a.yc;t.ph*=a.yc;var p=t.hc*l+t.ph*k,y=t.hc*n+t.ph*r;d.D-=h*(t.Vb.x*y-t.Vb.y*p);d.p.x-=f*p;d.p.y-=f*y;e.D+=m*(t.Wb.x*y-t.Wb.y*p);e.p.x+=g*p;e.p.y+=
g*y}else for(s=b.Lf,q=0;q<s;++q)d=b.jc[q],d.hc=0,d.ph=0}};u.Se=function(){for(var a=0;a<this.Fn;a++)this.jC(this.Wg[a])};u.jC=function(a){for(var c=a.Ed.x,b=a.Ed.y,d=0;d<a.Lf;d++)Gd.prototype.kC(a,a.jc[d]);if(1==a.Lf){var d=a.jc[0],e=d.hc-d.hi*((a.L.p.x-a.L.D*d.Wb.y-a.K.p.x+a.K.D*d.Vb.y)*c+(a.L.p.y+a.L.D*d.Wb.x-a.K.p.y-a.K.D*d.Vb.x)*b-d.wo),e=0<e?e:0,f=e-d.hc,h=f*c,b=f*b;a.K.p.x-=a.K.I*h;a.K.p.y-=a.K.I*b;a.K.D-=a.K.O*(d.Vb.x*b-d.Vb.y*h);a.L.p.x+=a.L.I*h;a.L.p.y+=a.L.I*b;a.L.D+=a.L.O*(d.Wb.x*b-d.Wb.y*
h);d.hc=e}else for(var d=a.jc[0],e=a.jc[1],f=d.hc,h=e.hc,g=(a.L.p.x-a.L.D*d.Wb.y-a.K.p.x+a.K.D*d.Vb.y)*c+(a.L.p.y+a.L.D*d.Wb.x-a.K.p.y-a.K.D*d.Vb.x)*b-d.wo,b=(a.L.p.x-a.L.D*e.Wb.y-a.K.p.x+a.K.D*e.Vb.y)*c+(a.L.p.y+a.L.D*e.Wb.x-a.K.p.y-a.K.D*e.Vb.x)*b-e.wo,g=g-(a.ue.j.x*f+a.ue.k.x*h),b=b-(a.ue.j.y*f+a.ue.k.y*h);;){c=-(a.hi.j.x*g+a.hi.k.x*b);if(0<=c){var m=-(a.hi.j.y*g+a.hi.k.y*b);if(0<=m){this.To(a,d,e,c-f,m-h);d.hc=c;e.hc=m;break}}c=-d.hi*g;if(0<=c&&0<=a.ue.j.y*c+b){this.To(a,d,e,c-f,-h);d.hc=c;e.hc=
0;break}c=-e.hi*b;if(0<=c&&0<=a.ue.k.x*c+g){this.To(a,d,e,-f,c-h);d.hc=0;e.hc=c;break}if(0<=g&&0<=b){this.To(a,d,e,-f,-h);d.hc=0;e.hc=0;break}break}};u.kC=function(a,c){var b=a.Ed.y,d=-a.Ed.x,e=a.Pg*c.hc,e=T.Kb(c.ph-c.SG*((a.L.p.x-a.L.D*c.Wb.y-a.K.p.x+a.K.D*c.Vb.y)*b+(a.L.p.y+a.L.D*c.Wb.x-a.K.p.y-a.K.D*c.Vb.x)*d),-e,e),f=e-c.ph,b=f*b,d=f*d;a.K.p.x-=a.K.I*b;a.K.p.y-=a.K.I*d;a.K.D-=a.K.O*(c.Vb.x*d-c.Vb.y*b);a.L.p.x+=a.L.I*b;a.L.p.y+=a.L.I*d;a.L.D+=a.L.O*(c.Wb.x*d-c.Wb.y*b);c.ph=e};u.To=function(a,c,
b,d,e){var f=d*a.Ed.x;d*=a.Ed.y;var h=e*a.Ed.x;e*=a.Ed.y;a.K.p.x-=a.K.I*(f+h);a.K.p.y-=a.K.I*(d+e);a.K.D-=a.K.O*(c.Vb.x*d-c.Vb.y*f+b.Vb.x*e-b.Vb.y*h);a.L.p.x+=a.L.I*(f+h);a.L.p.y+=a.L.I*(d+e);a.L.D+=a.L.O*(c.Wb.x*d-c.Wb.y*f+b.Wb.x*e-b.Wb.y*h);c.hc=0;b.hc=0};u.Yr=function(){for(var a=0;a<this.Fn;++a)for(var c=this.Wg[a],b=c.PF,d=0;d<c.Lf;++d){var e=b.ma[d],f=c.jc[d];e.nk=f.hc;e.rk=f.ph}};u.Re=function(a){void 0===a&&(a=0);for(var c=0,b=0;b<this.Fn;b++){var d=this.Wg[b],e=d.K,f=d.L,h=e.S*e.I,g=e.S*
e.O,m=f.S*f.I,l=f.S*f.O;ne.mc(d);for(var n=ne.ya,k=0;k<d.Lf;k++){var r=d.jc[k],q=ne.ma[k],s=ne.Pq[k],t=q.x-e.m.u.x,p=q.y-e.m.u.y,y=q.x-f.m.u.x,q=q.y-f.m.u.y,c=c<s?c:s,s=-r.OD*T.Kb(a*(s+.005),-.2,0),r=s*n.x,s=s*n.y;e.m.u.x-=h*r;e.m.u.y-=h*s;e.m.G-=g*(t*s-p*r);e.Qb();f.m.u.x+=m*r;f.m.u.y+=m*s;f.m.G+=l*(y*s-q*r);f.Qb()}}return-.0075<c};var ce=function(a,c){Ld.call(this,a,c)};Q(ce,Ld);ce.prototype.Wc=function(a,c){Ld.prototype.Wc.call(this,a,c)};ce.prototype.Ag=function(){this.Rb.Jc();this.Nb.Jc()};var ae=
function(a,c){Ld.call(this,a,c)};Q(ae,Ld);ae.prototype.Wc=function(a,c){Ld.prototype.Wc.call(this,a,c)};ae.prototype.Ag=function(){a:{var a=this.cf,c=this.Rb.Jc(),b=this.Rb.Va().A,d=this.Nb.Jc(),e=this.Nb.Va().A;a.ec=0;for(var f=e.position.x+(e.n.j.x*d.ib.x+e.n.k.x*d.ib.y)-b.position.x,h=e.position.y+(e.n.j.y*d.ib.x+e.n.k.y*d.ib.y)-b.position.y,e=f*b.n.j.x+h*b.n.j.y,b=f*b.n.k.x+h*b.n.k.y,f=0,h=-Number.MAX_VALUE,g=c.Ya+d.Ya,m=0;m<c.Sa;++m){var l=c.za[m].x*(e-c.J[m].x)+c.za[m].y*(b-c.J[m].y);if(l>g)break a;
l>h&&(h=l,f=m)}l=f+1;l>=c.Sa&&(l=0);var m=c.J[f],n=c.J[l];h<Number.MIN_VALUE?(a.ec=1,a.Za=2,a.ed.F(c.za[f]),a.xa.x=.5*(m.x+n.x),a.xa.y=.5*(m.y+n.y),a.ma[0].xa.F(d.ib),a.ma[0].Gf.wj(0)):0>=(e-m.x)*(n.x-m.x)+(b-m.y)*(n.y-m.y)?(e-m.x)*(e-m.x)+(b-m.y)*(b-m.y)>g*g||(a.ec=1,a.Za=2,a.ed.x=e-m.x,a.ed.y=b-m.y,a.ed.Md(),a.xa.F(m),a.ma[0].xa.F(d.ib),a.ma[0].Gf.wj(0)):0>=(e-n.x)*(m.x-n.x)+(b-n.y)*(m.y-n.y)?(e-n.x)*(e-n.x)+(b-n.y)*(b-n.y)>g*g||(a.ec=1,a.Za=2,a.ed.x=e-n.x,a.ed.y=b-n.y,a.ed.Md(),a.xa.F(n),a.ma[0].xa.F(d.ib),
a.ma[0].Gf.wj(0)):(l=.5*(m.x+n.x),m=.5*(m.y+n.y),h=(e-l)*c.za[f].x+(b-m)*c.za[f].y,h>g||(a.ec=1,a.Za=2,a.ed.x=c.za[f].x,a.ed.y=c.za[f].y,a.ed.Md(),a.xa.Set(l,m),a.ma[0].xa.F(d.ib),a.ma[0].Gf.wj(0)))}};var de=function(a,c){Ld.call(this,a,c)};Q(de,Ld);de.prototype.Wc=function(a,c){Ld.prototype.Wc.call(this,a,c)};de.prototype.Ag=function(){this.Rb.Jc();this.Nb.Jc()};var be=function(a,c){Ld.call(this,a,c)};Q(be,Ld);be.prototype.Wc=function(a,c){Ld.prototype.Wc.call(this,a,c)};be.prototype.Ag=function(){var a=
this.cf,c=this.Rb.Jc(),b=this.Rb.Va().A,d=this.Nb.Jc(),e=this.Nb.Va().A;a.ec=0;var f=c.Ya+d.Ya,h=Sc(c,b,d,e),g=h.ix;if(!(h.xr>f)){var m=Sc(d,e,c,b);if(!(m.xr>f)){var l=c,n=d,k=b,r=e,q=0;a.Za=2;m.xr>.98*h.xr+.001&&(l=d,n=c,k=e,r=b,g=m.ix,a.Za=4,q=1);c=g;b=r;d=oe;void 0===c&&(c=0);for(var e=k.n.j.x*l.za[c].x+k.n.k.x*l.za[c].y,h=k.n.j.y*l.za[c].x+k.n.k.y*l.za[c].y,m=b.n.j.x*e+b.n.j.y*h,h=b.n.k.x*e+b.n.k.y*h,e=m,m=0,s=Number.MAX_VALUE,t=0;t<n.Sa;t++){var p=e*n.za[t].x+h*n.za[t].y;p<s&&(s=p,m=t)}e=m+1;
e>=n.Sa&&(e=0);d[0].jf.x=b.position.x+(b.n.j.x*n.J[m].x+b.n.k.x*n.J[m].y);d[0].jf.y=b.position.y+(b.n.j.y*n.J[m].x+b.n.k.y*n.J[m].y);d[0].id.Kw(c);d[0].id.Iw(m);d[0].id.Jw(0);d[1].jf.x=b.position.x+(b.n.j.x*n.J[e].x+b.n.k.x*n.J[e].y);d[1].jf.y=b.position.y+(b.n.j.y*n.J[e].x+b.n.k.y*n.J[e].y);d[1].id.Kw(c);d[1].id.Iw(e);d[1].id.Jw(1);c=l.J[g];g=g+1<l.Sa?l.J[g+1]:l.J[0];pe.Set(g.x-c.x,g.y-c.y);pe.Md();qe.x=pe.y;qe.y=-pe.x;re.Set(.5*(c.x+g.x),.5*(c.y+g.y));se.x=k.n.j.x*pe.x+k.n.k.x*pe.y;se.y=k.n.j.y*
pe.x+k.n.k.y*pe.y;te.x=-se.x;te.y=-se.y;ue.x=se.y;ue.y=-se.x;ve.x=k.position.x+(k.n.j.x*c.x+k.n.k.x*c.y);ve.y=k.position.y+(k.n.j.y*c.x+k.n.k.y*c.y);we.x=k.position.x+(k.n.j.x*g.x+k.n.k.x*g.y);we.y=k.position.y+(k.n.j.y*g.x+k.n.k.y*g.y);if(!(2>Qc(xe,oe,te,-se.x*ve.x-se.y*ve.y+f)||2>Qc(ye,xe,se,se.x*we.x+se.y*we.y+f))){a.ed.F(qe);a.xa.F(re);k=ue.x*ve.x+ue.y*ve.y;for(l=g=0;2>l;++l)ue.x*ye[l].jf.x+ue.y*ye[l].jf.y-k<=f&&(c=ye[l].jf.x-r.position.x,n=ye[l].jf.y-r.position.y,a.ma[g].xa.x=c*r.n.j.x+n*r.n.j.y,
a.ma[g].xa.y=c*r.n.k.x+n*r.n.k.y,a.ma[g].Gf.Set(ye[l].id),a.ma[g].Gf.eC(q),g++);a.ec=g}}}};var Ae=function(){this.Kd="Controller"+ze++;this.Oa=null;this.Xc=new sd};Ae.prototype.Ah=function(){};Ae.prototype.Gk=function(a){this.Xc.Gk(a);a.dm(this)};Ae.prototype.tm=function(a){this.Xc.tm(a);a.um(this)};Ae.prototype.Do=function(){for(var a=this.Xc.Qa(rd);a;a=a.next)this.tm(a.body)};var ze=0,Be=function(){Ae.call(this);this.Ed=R.q(0,-1);this.dg=this.offset=0;this.VA=R.q(0,0);this.rF=2;this.OC=1;this.eH=
!0;this.$x=null};Q(Be,Ae);Be.prototype.Ah=function(){this.eH&&(this.$x=this.Oa.fz.uc());for(var a=this.Xc.Qa(wd);a;a=a.next){for(var c=a.body,b=R.q(0,0),d=R.q(0,0),e=0,f=0,h=c.$r().Qa();h;h=h.next){var g=R.q(0,0),m=h.uf.Jc().Fo(this.Ed,this.offset,c.te(),g),e=e+m;b.x+=m*g.x;b.y+=m*g.y;var l=0,l=1,f=f+m*l;d.x+=m*g.x*l;d.y+=m*g.y*l}e<Number.MIN_VALUE||(b.x/=e,b.y/=e,d.x/=f,d.y/=f,f=this.$x.wi(),f.Ld(this.dg*e),c.yg(f,d),f=c.qB(b),f.zs(this.VA),f.Ld(-this.rF*e),c.yg(f,b),c.Bo(-c.Ef/c.Mk()*e*c.Ko()*this.OC),
R.lc(b),R.lc(d))}};var Ce=function(){Ae.call(this);this.aw=R.q(0,0)};Q(Ce,Ae);Ce.prototype.Ah=function(a){a=R.q(this.aw.x*a.Fa,this.aw.y*a.Fa);for(var c=this.Xc.Qa(wd);c;c=c.next){var b=c.body,d=b.rj();b.xj(R.q(d.x+a.x,d.y+a.y))}R.lc(a)};var De=function(){Ae.call(this);this.nB=R.q(0,0)};Q(De,Ae);De.prototype.Ah=function(){for(var a=this.Xc.Qa(wd);a;a=a.next){var c=a.body;c.yg(this.nB,c.Nk())}};var od=function(){this.Ps=this.Os=null;this.sp={}};od.prototype.Qa=function(){return this.Os};od.prototype.dm=
function(a){var c=a.Kd;if(null==this.sp[c]){a=new Ee(a);var b=this.Ps;null!=b?b.Vf(a):this.Os=a;a.Wf(b);this.Ps=a;this.sp[c]=a}};od.prototype.um=function(a){a=a.Kd;var c=this.sp[a];if(null!=c){var b=c.Nf,c=c.next;null==b?this.Os=c:b.Vf(c);null==c?this.Ps=b:c.Wf(b);delete this.sp[a]}};var Ee=function(a){this.Ax=a;this.Nf=this.next=null};Ee.prototype.Vf=function(a){this.next=a};Ee.prototype.Wf=function(a){this.Nf=a};var Fe=function(){Ae.call(this);this.iw=1;this.eF=!0};Q(Fe,Ae);Fe.prototype.Ah=function(){var a=
null,c=null,b=0,d=null,e=null,f=0,h=0,g=0,f=null;if(this.eF)for(var m=this.Xc.Qa(rd);m;m=m.next)for(var a=m.body,c=a.Nk(),b=a.Mk(),l=this.Xc.Qa(rd);l;l=l.next){if(d=l.body,a.wd()||d.wd())e=d.Nk(),f=e.x-c.x,h=e.y-c.y,g=f*f+h*h,g<Number.MIN_VALUE||(f=R.q(f,h),f.Ld(this.iw/g/Math.sqrt(g)*b*d.Mk()),a.wd()&&a.yg(f,c),f.Ld(-1),d.wd()&&d.yg(f,e),R.lc(f))}else for(m=this.Xc.Qa(rd);m;m=m.next)for(a=bodyNode.body,c=a.Nk(),b=a.Mk(),l=this.Xc.Qa(rd);l;l=l.next)if(d=bodyNode.body,a.wd()||d.wd())e=d.Nk(),f=e.x-
c.x,h=e.y-c.y,g=f*f+h*h,g<Number.MIN_VALUE||(f=R.q(f,h),f.Ld(this.iw/g*b*d.Mk()),a.wd()&&a.yg(f,c),f.Ld(-1),d.wd()&&d.yg(f,e),R.lc(f))};var Ge=function(){Ae.call(this);this.mC=new S;this.Qu=0};Q(Ge,Ae);Ge.prototype.Ah=function(a){a=a.Fa;if(!(a<=Number.MIN_VALUE)){a>this.Qu&&0<this.Qu&&(a=this.Qu);for(var c=this.Xc.Qa(wd);c;c=c.next){var b=c.body,d=b.ds(T.Zb(this.mC,b.bs(b.rj())));b.xj(R.q(b.rj().x+d.x*a,b.rj().y+d.y*a))}}};var Z=function(a){this.Td=new He;this.Ud=new He;this.Zg=R.q(0,0);this.$g=R.q(0,
0);this.Za=a.type;this.Vi=this.yl=null;this.T=a.K;this.U=a.L;this.dz=a.Ms};Z.prototype.Vc=function(){return this.Za};Z.prototype.km=function(){return this.T};Z.prototype.Zr=function(){return this.U};Z.prototype.uj=function(){return this.T.uj()&&this.U.uj()};Z.kf=function(a){return a.kf()};Z.prototype.lf=function(){};Z.prototype.Se=function(){};Z.prototype.Yr=function(){};Z.prototype.Re=function(){return!1};Z.JD=0;Z.Yk=1;Z.HD=2;Z.$s=3;Z.ID=4;Z.zI=5;Z.FD=6;Z.GD=7;Z.KD=8;Z.ED=9;Z.Od=0;Z.Mg=1;Z.cd=2;
Z.Ii=3;var Ie=function(){this.type=Z.JD;this.L=this.K=null;this.Ms=!1},He=function(){},Je=function(a){Z.call(this,a);this.ba=R.q(0,0);this.ca=R.q(0,0);this.Dc=R.q(0,0);this.ba.F(a.Eb);this.ca.F(a.Fb);this.Fu=a.length;this.Du=a.Tp;this.yF=a.Ap;this.cz=this.mk=this.C=0};Q(Je,Z);Je.prototype.lf=function(a){var c,b=0,d=this.T,e=this.U;c=d.A.n;var f=this.ba.x-d.m.N.x,h=this.ba.y-d.m.N.y,b=c.j.x*f+c.k.x*h,h=c.j.y*f+c.k.y*h,f=b;c=e.A.n;var g=this.ca.x-e.m.N.x,m=this.ca.y-e.m.N.y,b=c.j.x*g+c.k.x*m,m=c.j.y*
g+c.k.y*m,g=b;this.Dc.x=e.m.u.x+g-d.m.u.x-f;this.Dc.y=e.m.u.y+m-d.m.u.y-h;b=Math.sqrt(this.Dc.x*this.Dc.x+this.Dc.y*this.Dc.y);.005<b?this.Dc.Ld(1/b):this.Dc.fa();c=f*this.Dc.y-h*this.Dc.x;var l=g*this.Dc.y-m*this.Dc.x;c=d.I+d.O*c*c+e.I+e.O*l*l;this.S=0!=c?1/c:0;if(0<this.Du){var b=b-this.Fu,l=2*Math.PI*this.Du,n=this.S*l*l;this.mk=a.Fa*(2*this.S*this.yF*l+a.Fa*n);this.mk=0!=this.mk?1/this.mk:0;this.cz=b*a.Fa*n*this.mk;this.S=c+this.mk;this.S=0!=this.S?1/this.S:0}a.ri?(this.C*=a.yc,a=this.C*this.Dc.x,
c=this.C*this.Dc.y,d.p.x-=d.I*a,d.p.y-=d.I*c,d.D-=d.O*(f*c-h*a),e.p.x+=e.I*a,e.p.y+=e.I*c,e.D+=e.O*(g*c-m*a)):this.C=0};Je.prototype.Se=function(){var a=this.ba.x-this.T.m.N.x,c=this.ba.y-this.T.m.N.y,b=this.T.A.n.j.x*a+this.T.A.n.k.x*c,c=this.T.A.n.j.y*a+this.T.A.n.k.y*c,a=b,d=this.ca.x-this.U.m.N.x,e=this.ca.y-this.U.m.N.y,b=this.U.A.n.j.x*d+this.U.A.n.k.x*e,e=this.U.A.n.j.y*d+this.U.A.n.k.y*e,d=b,f=-this.S*(this.Dc.x*(this.U.p.x-this.U.D*e-(this.T.p.x-this.T.D*c))+this.Dc.y*(this.U.p.y+this.U.D*
d-(this.T.p.y+this.T.D*a))+this.cz+this.mk*this.C);this.C+=f;b=f*this.Dc.x;f*=this.Dc.y;this.T.p.x-=this.T.I*b;this.T.p.y-=this.T.I*f;this.T.D-=this.T.O*(a*f-c*b);this.U.p.x+=this.U.I*b;this.U.p.y+=this.U.I*f;this.U.D+=this.U.O*(d*f-e*b)};Je.prototype.Re=function(){if(0<this.Du)return!0;var a=this.ba.x-this.T.m.N.x,c=this.ba.y-this.T.m.N.y,b=this.T.A.n.j.x*a+this.T.A.n.k.x*c,c=this.T.A.n.j.y*a+this.T.A.n.k.y*c,a=b,d=this.ca.x-this.U.m.N.x,e=this.ca.y-this.U.m.N.y,b=this.U.A.n.j.x*d+this.U.A.n.k.x*
e,e=this.U.A.n.j.y*d+this.U.A.n.k.y*e,d=b,f=this.U.m.u.x+d-this.T.m.u.x-a,h=this.U.m.u.y+e-this.T.m.u.y-c,g=Math.sqrt(f*f+h*h),b=T.Kb(g-this.Fu,-.2,.2),m=-this.S*b;this.Dc.Set(f/g,h/g);f=m*this.Dc.x;m*=this.Dc.y;this.T.m.u.x-=this.T.I*f;this.T.m.u.y-=this.T.I*m;this.T.m.G-=this.T.O*(a*m-c*f);this.U.m.u.x+=this.U.I*f;this.U.m.u.y+=this.U.I*m;this.U.m.G+=this.U.O*(d*m-e*f);this.T.Qb();this.U.Qb();return.005>Math.abs(b)};var uc=function(){Ie.call(this);this.Eb=R.q(0,0);this.Fb=R.q(0,0);this.type=Z.$s;
this.length=1;this.Ap=this.Tp=0};Q(uc,Ie);uc.prototype.mc=function(a,c,b,d){this.K=a;this.L=c;this.Eb.F(this.K.vd(b));this.Fb.F(this.L.vd(d));a=d.x-b.x;b=d.y-b.y;this.length=Math.sqrt(a*a+b*b);this.Ap=this.Tp=0};uc.prototype.kf=function(){return new Je(this)};var Ke=function(a){Z.call(this,a);this.Ze=R.q(0,0);this.$e=R.q(0,0);this.Iu=new S;this.Ye=R.q(0,0);this.Ze.F(a.Eb);this.$e.F(a.Fb);this.Iu.fa();this.Dn=0;this.Ye.fa();this.Yh=0;this.JF=a.QF;this.LF=a.RF};Q(Ke,Z);Ke.prototype.lf=function(a){var c,
b=0,d=this.T,e=this.U;c=d.A.n;var f=this.Ze.x-d.m.N.x,h=this.Ze.y-d.m.N.y,b=c.j.x*f+c.k.x*h,h=c.j.y*f+c.k.y*h,f=b;c=e.A.n;var g=this.$e.x-e.m.N.x,m=this.$e.y-e.m.N.y,b=c.j.x*g+c.k.x*m,m=c.j.y*g+c.k.y*m,g=b;c=d.I;var b=e.I,l=d.O,n=e.O,k=new S;k.j.x=c+b;k.k.x=0;k.j.y=0;k.k.y=c+b;k.j.x+=l*h*h;k.k.x+=-l*f*h;k.j.y+=-l*f*h;k.k.y+=l*f*f;k.j.x+=n*m*m;k.k.x+=-n*g*m;k.j.y+=-n*g*m;k.k.y+=n*g*g;k.as(this.Iu);this.Dn=l+n;0<this.Dn&&(this.Dn=1/this.Dn);a.ri?(this.Ye.x*=a.yc,this.Ye.y*=a.yc,this.Yh*=a.yc,a=this.Ye,
d.p.x-=c*a.x,d.p.y-=c*a.y,d.D-=l*(f*a.y-h*a.x+this.Yh),e.p.x+=b*a.x,e.p.y+=b*a.y,e.D+=n*(g*a.y-m*a.x+this.Yh)):(this.Ye.fa(),this.Yh=0)};Ke.prototype.Se=function(a){var c,b=0,d=this.T,e=this.U,f=d.p,h=d.D,g=e.p,m=e.D,l=d.I,n=e.I,k=d.O,r=e.O;c=d.A.n;var q=this.Ze.x-d.m.N.x,s=this.Ze.y-d.m.N.y,b=c.j.x*q+c.k.x*s,s=c.j.y*q+c.k.y*s,q=b;c=e.A.n;var t=this.$e.x-e.m.N.x,p=this.$e.y-e.m.N.y,b=c.j.x*t+c.k.x*p,p=c.j.y*t+c.k.y*p,t=b;c=0;var b=-this.Dn*(m-h),y=this.Yh;c=a.Fa*this.LF;this.Yh=T.Kb(this.Yh+b,-c,
c);b=this.Yh-y;h-=k*b;m+=r*b;c=T.Zb(this.Iu,R.q(-(g.x-m*p-f.x+h*s),-(g.y+m*t-f.y-h*q)));b=this.Ye.uc();this.Ye.xh(c);c=a.Fa*this.JF;this.Ye.Qo()>c*c&&(this.Ye.Md(),this.Ye.Ld(c));c=T.Cb(this.Ye,b);f.x-=l*c.x;f.y-=l*c.y;h-=k*(q*c.y-s*c.x);g.x+=n*c.x;g.y+=n*c.y;m+=r*(t*c.y-p*c.x);d.D=h;e.D=m};Ke.prototype.Re=function(){return!0};var Le=function(){Ie.call(this);this.Eb=R.q(0,0);this.Fb=R.q(0,0);this.type=Z.ED;this.RF=this.QF=0};Q(Le,Ie);Le.prototype.mc=function(a,c,b){this.K=a;this.L=c;this.Eb.F(this.K.vd(b));
this.Fb.F(this.L.vd(b))};Le.prototype.kf=function(){return new Ke(this)};var Ne=function(a){Z.call(this,a);this.ci=R.q(0,0);this.di=R.q(0,0);this.ba=R.q(0,0);this.ca=R.q(0,0);this.Mb=new Me;var c=a.pl.Za,b=a.ql.Za;this.Al=this.qk=this.zl=this.pk=null;var d=0,e=0;this.BF=a.pl.km();this.T=a.pl.Zr();c==Z.Yk?(this.pk=a.pl,this.ci.F(this.pk.ba),this.ba.F(this.pk.ca),d=this.pk.Lo()):(this.zl=a.pl,this.ci.F(this.zl.ba),this.ba.F(this.zl.ca),d=this.zl.mm());this.CF=a.ql.km();this.U=a.ql.Zr();b==Z.Yk?(this.qk=
a.ql,this.di.F(this.qk.ba),this.ca.F(this.qk.ca),e=this.qk.Lo()):(this.Al=a.ql,this.di.F(this.Al.ba),this.ca.F(this.Al.ca),e=this.Al.mm());this.Ub=a.gj;this.xl=d+this.Ub*e;this.C=0};Q(Ne,Z);Ne.prototype.lf=function(a){var c=this.BF,b=this.CF,d=this.T,e=this.U,f=0,h=0,g=0,m=0,l=g=0,n=0;this.Mb.fa();this.pk?(this.Mb.zj=-1,n+=d.O):(c=c.A.n,h=this.zl.ge,f=c.j.x*h.x+c.k.x*h.y,h=c.j.y*h.x+c.k.y*h.y,c=d.A.n,g=this.ba.x-d.m.N.x,m=this.ba.y-d.m.N.y,l=c.j.x*g+c.k.x*m,m=c.j.y*g+c.k.y*m,g=l*h-m*f,this.Mb.jg.Set(-f,
-h),this.Mb.zj=-g,n+=d.I+d.O*g*g);this.qk?(this.Mb.Aj=-this.Ub,n+=this.Ub*this.Ub*e.O):(c=b.A.n,h=this.Al.ge,f=c.j.x*h.x+c.k.x*h.y,h=c.j.y*h.x+c.k.y*h.y,c=e.A.n,g=this.ca.x-e.m.N.x,m=this.ca.y-e.m.N.y,l=c.j.x*g+c.k.x*m,m=c.j.y*g+c.k.y*m,g=l*h-m*f,this.Mb.kg.Set(-this.Ub*f,-this.Ub*h),this.Mb.Aj=-this.Ub*g,n+=this.Ub*this.Ub*(e.I+e.O*g*g));this.S=0<n?1/n:0;a.ri?(d.p.x+=d.I*this.C*this.Mb.jg.x,d.p.y+=d.I*this.C*this.Mb.jg.y,d.D+=d.O*this.C*this.Mb.zj,e.p.x+=e.I*this.C*this.Mb.kg.x,e.p.y+=e.I*this.C*
this.Mb.kg.y,e.D+=e.O*this.C*this.Mb.Aj):this.C=0};Ne.prototype.Se=function(){var a=this.T,c=this.U,b=-this.S*this.Mb.iB(a.p,a.D,c.p,c.D);this.C+=b;a.p.x+=a.I*b*this.Mb.jg.x;a.p.y+=a.I*b*this.Mb.jg.y;a.D+=a.O*b*this.Mb.zj;c.p.x+=c.I*b*this.Mb.kg.x;c.p.y+=c.I*b*this.Mb.kg.y;c.D+=c.O*b*this.Mb.Aj};Ne.prototype.Re=function(){var a=this.T,c=this.U,b=0,d=0,b=this.pk?this.pk.Lo():this.zl.mm(),d=this.qk?this.qk.Lo():this.Al.mm(),b=-this.S*(this.xl-(b+this.Ub*d));a.m.u.x+=a.I*b*this.Mb.jg.x;a.m.u.y+=a.I*
b*this.Mb.jg.y;a.m.G+=a.O*b*this.Mb.zj;c.m.u.x+=c.I*b*this.Mb.kg.x;c.m.u.y+=c.I*b*this.Mb.kg.y;c.m.G+=c.O*b*this.Mb.Aj;a.Qb();c.Qb();return!0};var Oe=function(){Ie.call(this);this.type=Z.FD;this.ql=this.pl=null;this.gj=1};Q(Oe,Ie);Oe.prototype.mc=function(a,c,b){this.pl=a;this.K=a.km();this.ql=c;this.L=c.km();this.gj=b};Oe.prototype.kf=function(){return new Ne(this)};var Me=function(){this.jg=R.q(0,0);this.kg=R.q(0,0)};Me.prototype.fa=function(){this.jg.fa();this.zj=0;this.kg.fa();this.Aj=0};Me.prototype.Set=
function(a,c,b,d){void 0===c&&(c=0);void 0===d&&(d=0);this.jg.F(a);this.zj=c;this.kg.F(b);this.Aj=d};Me.prototype.iB=function(a,c,b,d){void 0===c&&(c=0);void 0===d&&(d=0);return this.jg.x*a.x+this.jg.y*a.y+this.zj*c+(this.kg.x*b.x+this.kg.y*b.y)+this.Aj*d};var Pe=function(a){Z.call(this,a);this.ba=R.q(0,0);this.ca=R.q(0,0);this.ge=R.q(0,0);this.ei=R.q(0,0);this.R=R.q(0,0);this.ja=R.q(0,0);this.Z=new S;this.C=R.q(0,0);this.ba.F(a.Eb);this.ca.F(a.Fb);this.ge.F(a.hk);this.ei.x=-this.ge.y;this.ei.y=this.ge.x;
this.C.fa();this.Ra=this.Vd=0;this.bf=a.yu;this.df=a.Tv;this.Ju=a.Pu;this.Jn=a.Gl;this.mg=a.Oj;this.Ui=a.Zk;this.Da=Z.Od;this.R.fa();this.ja.fa()};Q(Pe,Z);Pe.prototype.mm=function(){var a=this.T,c=this.U,b=a.Oo(this.ba),d=c.Oo(this.ca),c=d.x-b.x,b=d.y-b.y,a=a.ds(this.ge);return a.x*c+a.y*b};Pe.prototype.lf=function(a){var c=this.T,b=this.U,d,e=0;this.Zg.F(c.sj());this.$g.F(b.sj());var f=c.te();b.te();d=c.A.n;var h=this.ba.x-this.Zg.x,g=this.ba.y-this.Zg.y,e=d.j.x*h+d.k.x*g,g=d.j.y*h+d.k.y*g,h=e;d=
b.A.n;var m=this.ca.x-this.$g.x,l=this.ca.y-this.$g.y,e=d.j.x*m+d.k.x*l,l=d.j.y*m+d.k.y*l,m=e;d=b.m.u.x+m-c.m.u.x-h;e=b.m.u.y+l-c.m.u.y-g;this.Sb=c.I;this.Tb=b.I;this.Bd=c.O;this.Cd=b.O;this.R.F(T.Zb(f.n,this.ge));this.$a=(d+h)*this.R.y-(e+g)*this.R.x;this.ab=m*this.R.y-l*this.R.x;this.Vd=this.Sb+this.Tb+this.Bd*this.$a*this.$a+this.Cd*this.ab*this.ab;this.Vd=this.Vd>Number.MIN_VALUE?1/this.Vd:0;this.ja.F(T.Zb(f.n,this.ei));this.fb=(d+h)*this.ja.y-(e+g)*this.ja.x;this.gb=m*this.ja.y-l*this.ja.x;f=
this.Sb;h=this.Tb;g=this.Bd;m=this.Cd;this.Z.j.x=f+h+g*this.fb*this.fb+m*this.gb*this.gb;this.Z.j.y=g*this.fb*this.$a+m*this.gb*this.ab;this.Z.k.x=this.Z.j.y;this.Z.k.y=f+h+g*this.$a*this.$a+m*this.ab*this.ab;this.mg?(d=this.R.x*d+this.R.y*e,.01>Math.abs(this.df-this.bf)?this.Da=Z.Ii:d<=this.bf?this.Da!=Z.Mg&&(this.Da=Z.Mg,this.C.y=0):d>=this.df?this.Da!=Z.cd&&(this.Da=Z.cd,this.C.y=0):(this.Da=Z.Od,this.C.y=0)):this.Da=Z.Od;0==this.Ui&&(this.Ra=0);a.ri?(this.C.x*=a.yc,this.C.y*=a.yc,this.Ra*=a.yc,
a=this.C.x*this.ja.x+(this.Ra+this.C.y)*this.R.x,d=this.C.x*this.ja.y+(this.Ra+this.C.y)*this.R.y,e=this.C.x*this.fb+(this.Ra+this.C.y)*this.$a,f=this.C.x*this.gb+(this.Ra+this.C.y)*this.ab,c.p.x-=this.Sb*a,c.p.y-=this.Sb*d,c.D-=this.Bd*e,b.p.x+=this.Tb*a,b.p.y+=this.Tb*d,b.D+=this.Cd*f):(this.C.fa(),this.Ra=0)};Pe.prototype.Se=function(a){var c=this.T,b=this.U,d=c.p,e=c.D,f=b.p,h=b.D,g=0,m=0,l=0,n=0;this.Ui&&this.Da!=Z.Ii&&(n=this.Vd*(this.Jn-(this.R.x*(f.x-d.x)+this.R.y*(f.y-d.y)+this.ab*h-this.$a*
e)),g=this.Ra,m=a.Fa*this.Ju,this.Ra=T.Kb(this.Ra+n,-m,m),n=this.Ra-g,g=n*this.R.x,m=n*this.R.y,l=n*this.$a,n*=this.ab,d.x-=this.Sb*g,d.y-=this.Sb*m,e-=this.Bd*l,f.x+=this.Tb*g,f.y+=this.Tb*m,h+=this.Cd*n);m=this.ja.x*(f.x-d.x)+this.ja.y*(f.y-d.y)+this.gb*h-this.fb*e;this.mg&&this.Da!=Z.Od?(l=this.R.x*(f.x-d.x)+this.R.y*(f.y-d.y)+this.ab*h-this.$a*e,g=this.C.uc(),a=this.Z.Ai(R.q(0,0),-m,-l),this.C.xh(a),this.Da==Z.Mg?this.C.y=Math.max(this.C.y,0):this.Da==Z.cd&&(this.C.y=Math.min(this.C.y,0)),m=-m-
(this.C.y-g.y)*this.Z.k.x,l=0,l=0!=this.Z.j.x?m/this.Z.j.x+g.x:g.x,this.C.x=l,a.x=this.C.x-g.x,a.y=this.C.y-g.y,g=a.x*this.ja.x+a.y*this.R.x,m=a.x*this.ja.y+a.y*this.R.y,l=a.x*this.fb+a.y*this.$a,n=a.x*this.gb+a.y*this.ab):(a=0,a=0!=this.Z.j.x?-m/this.Z.j.x:0,this.C.x+=a,g=a*this.ja.x,m=a*this.ja.y,l=a*this.fb,n=a*this.gb);d.x-=this.Sb*g;d.y-=this.Sb*m;e-=this.Bd*l;f.x+=this.Tb*g;f.y+=this.Tb*m;h+=this.Cd*n;c.p.F(d);c.D=e;b.p.F(f);b.D=h};Pe.prototype.Re=function(){var a=this.T,c=this.U,b=a.m.u,d=
a.m.G,e=c.m.u,f=c.m.G,h,g=0,m=0,l=0,n=0,k=h=0,r=0,m=!1,q=0,s=S.Lk(d),l=S.Lk(f);h=s;var r=this.ba.x-this.Zg.x,t=this.ba.y-this.Zg.y,g=h.j.x*r+h.k.x*t,t=h.j.y*r+h.k.y*t,r=g;h=l;l=this.ca.x-this.$g.x;n=this.ca.y-this.$g.y;g=h.j.x*l+h.k.x*n;n=h.j.y*l+h.k.y*n;l=g;h=e.x+l-b.x-r;g=e.y+n-b.y-t;if(this.mg){this.R=T.Zb(s,this.ge);this.$a=(h+r)*this.R.y-(g+t)*this.R.x;this.ab=l*this.R.y-n*this.R.x;var p=this.R.x*h+this.R.y*g;.01>Math.abs(this.df-this.bf)?(q=T.Kb(p,-.2,.2),k=Math.abs(p),m=!0):p<=this.bf?(q=T.Kb(p-
this.bf+.005,-.2,0),k=this.bf-p,m=!0):p>=this.df&&(q=T.Kb(p-this.df+.005,0,.2),k=p-this.df,m=!0)}this.ja=T.Zb(s,this.ei);this.fb=(h+r)*this.ja.y-(g+t)*this.ja.x;this.gb=l*this.ja.y-n*this.ja.x;s=R.q(0,0);t=this.ja.x*h+this.ja.y*g;k=Math.max(k,Math.abs(t));r=0;m?(m=this.Sb,l=this.Tb,n=this.Bd,h=this.Cd,this.Z.j.x=m+l+n*this.fb*this.fb+h*this.gb*this.gb,this.Z.j.y=n*this.fb*this.$a+h*this.gb*this.ab,this.Z.k.x=this.Z.j.y,this.Z.k.y=m+l+n*this.$a*this.$a+h*this.ab*this.ab,this.Z.Ai(s,-t,-q)):(m=this.Sb,
l=this.Tb,n=this.Bd,h=this.Cd,q=m+l+n*this.fb*this.fb+h*this.gb*this.gb,s.x=0!=q?-t/q:0,s.y=0);q=s.x*this.ja.x+s.y*this.R.x;m=s.x*this.ja.y+s.y*this.R.y;t=s.x*this.fb+s.y*this.$a;s=s.x*this.gb+s.y*this.ab;b.x-=this.Sb*q;b.y-=this.Sb*m;d-=this.Bd*t;e.x+=this.Tb*q;e.y+=this.Tb*m;f+=this.Cd*s;a.m.G=d;c.m.G=f;a.Qb();c.Qb();return.005>=k&&r<=wc};var Qe=function(){Ie.call(this);this.Eb=R.q(0,0);this.Fb=R.q(0,0);this.hk=R.q(0,0);this.type=Z.GD;this.hk.Set(1,0);this.Oj=!1;this.Tv=this.yu=0;this.Zk=!1;this.Gl=
this.Pu=0};Q(Qe,Ie);Qe.prototype.mc=function(a,c,b,d){this.K=a;this.L=c;this.Eb=this.K.vd(b);this.Fb=this.L.vd(b);this.hk=this.K.bs(d)};Qe.prototype.kf=function(){return new Pe(this)};var Re=function(a){Z.call(this,a);this.ba=R.q(0,0);this.ca=R.q(0,0);this.ge=R.q(0,0);this.ei=R.q(0,0);this.R=R.q(0,0);this.ja=R.q(0,0);this.Z=new Dc;this.C=new Cc(0,0,0);this.ba.F(a.Eb);this.ca.F(a.Fb);this.ge.F(a.hk);this.ei.x=-this.ge.y;this.ei.y=this.ge.x;this.MF=a.jh;this.C.fa();this.Ra=this.Vd=0;this.bf=a.yu;this.df=
a.Tv;this.Ju=a.Pu;this.Jn=a.Gl;this.mg=a.Oj;this.Ui=a.Zk;this.Da=Z.Od;this.R.fa();this.ja.fa()};Q(Re,Z);Re.prototype.mm=function(){var a=this.T,c=this.U,b=a.Oo(this.ba),d=c.Oo(this.ca),c=d.x-b.x,b=d.y-b.y,a=a.ds(this.ge);return a.x*c+a.y*b};Re.prototype.lf=function(a){var c=this.T,b=this.U,d,e=0;this.Zg.F(c.sj());this.$g.F(b.sj());var f=c.te();b.te();d=c.A.n;var h=this.ba.x-this.Zg.x,g=this.ba.y-this.Zg.y,e=d.j.x*h+d.k.x*g,g=d.j.y*h+d.k.y*g,h=e;d=b.A.n;var m=this.ca.x-this.$g.x,l=this.ca.y-this.$g.y,
e=d.j.x*m+d.k.x*l,l=d.j.y*m+d.k.y*l,m=e;d=b.m.u.x+m-c.m.u.x-h;e=b.m.u.y+l-c.m.u.y-g;this.Sb=c.I;this.Tb=b.I;this.Bd=c.O;this.Cd=b.O;this.R.F(T.Zb(f.n,this.ge));this.$a=(d+h)*this.R.y-(e+g)*this.R.x;this.ab=m*this.R.y-l*this.R.x;this.Vd=this.Sb+this.Tb+this.Bd*this.$a*this.$a+this.Cd*this.ab*this.ab;this.Vd>Number.MIN_VALUE&&(this.Vd=1/this.Vd);this.ja.F(T.Zb(f.n,this.ei));this.fb=(d+h)*this.ja.y-(e+g)*this.ja.x;this.gb=m*this.ja.y-l*this.ja.x;f=this.Sb;h=this.Tb;g=this.Bd;m=this.Cd;this.Z.j.x=f+h+
g*this.fb*this.fb+m*this.gb*this.gb;this.Z.j.y=g*this.fb+m*this.gb;this.Z.j.z=g*this.fb*this.$a+m*this.gb*this.ab;this.Z.k.x=this.Z.j.y;this.Z.k.y=g+m;this.Z.k.z=g*this.$a+m*this.ab;this.Z.ua.x=this.Z.j.z;this.Z.ua.y=this.Z.k.z;this.Z.ua.z=f+h+g*this.$a*this.$a+m*this.ab*this.ab;this.mg?(d=this.R.x*d+this.R.y*e,.01>Math.abs(this.df-this.bf)?this.Da=Z.Ii:d<=this.bf?this.Da!=Z.Mg&&(this.Da=Z.Mg,this.C.z=0):d>=this.df?this.Da!=Z.cd&&(this.Da=Z.cd,this.C.z=0):(this.Da=Z.Od,this.C.z=0)):this.Da=Z.Od;0==
this.Ui&&(this.Ra=0);a.ri?(this.C.x*=a.yc,this.C.y*=a.yc,this.Ra*=a.yc,a=this.C.x*this.ja.x+(this.Ra+this.C.z)*this.R.x,d=this.C.x*this.ja.y+(this.Ra+this.C.z)*this.R.y,e=this.C.x*this.fb+this.C.y+(this.Ra+this.C.z)*this.$a,f=this.C.x*this.gb+this.C.y+(this.Ra+this.C.z)*this.ab,c.p.x-=this.Sb*a,c.p.y-=this.Sb*d,c.D-=this.Bd*e,b.p.x+=this.Tb*a,b.p.y+=this.Tb*d,b.D+=this.Cd*f):(this.C.fa(),this.Ra=0)};Re.prototype.Se=function(a){var c=this.T,b=this.U,d=c.p,e=c.D,f=b.p,h=b.D,g=0,m=0,l=0,n=0;this.Ui&&
this.Da!=Z.Ii&&(n=this.Vd*(this.Jn-(this.R.x*(f.x-d.x)+this.R.y*(f.y-d.y)+this.ab*h-this.$a*e)),g=this.Ra,a=a.Fa*this.Ju,this.Ra=T.Kb(this.Ra+n,-a,a),n=this.Ra-g,g=n*this.R.x,m=n*this.R.y,l=n*this.$a,n*=this.ab,d.x-=this.Sb*g,d.y-=this.Sb*m,e-=this.Bd*l,f.x+=this.Tb*g,f.y+=this.Tb*m,h+=this.Cd*n);l=this.ja.x*(f.x-d.x)+this.ja.y*(f.y-d.y)+this.gb*h-this.fb*e;m=h-e;this.mg&&this.Da!=Z.Od?(a=this.R.x*(f.x-d.x)+this.R.y*(f.y-d.y)+this.ab*h-this.$a*e,g=this.C.uc(),a=this.Z.zm(new Cc(0,0,0),-l,-m,-a),this.C.xh(a),
this.Da==Z.Mg?this.C.z=Math.max(this.C.z,0):this.Da==Z.cd&&(this.C.z=Math.min(this.C.z,0)),l=-l-(this.C.z-g.z)*this.Z.ua.x,m=-m-(this.C.z-g.z)*this.Z.ua.y,m=this.Z.Rk(R.q(0,0),l,m),m.x+=g.x,m.y+=g.y,this.C.x=m.x,this.C.y=m.y,a.x=this.C.x-g.x,a.y=this.C.y-g.y,a.z=this.C.z-g.z,g=a.x*this.ja.x+a.z*this.R.x,m=a.x*this.ja.y+a.z*this.R.y,l=a.x*this.fb+a.y+a.z*this.$a,n=a.x*this.gb+a.y+a.z*this.ab):(a=this.Z.Rk(R.q(0,0),-l,-m),this.C.x+=a.x,this.C.y+=a.y,g=a.x*this.ja.x,m=a.x*this.ja.y,l=a.x*this.fb+a.y,
n=a.x*this.gb+a.y);d.x-=this.Sb*g;d.y-=this.Sb*m;e-=this.Bd*l;f.x+=this.Tb*g;f.y+=this.Tb*m;h+=this.Cd*n;c.p.F(d);c.D=e;b.p.F(f);b.D=h};Re.prototype.Re=function(){var a=this.T,c=this.U,b=a.m.u,d=a.m.G,e=c.m.u,f=c.m.G,h,g=0,m=0,l=0,n=g=h=0,k=0,m=!1,r=0,q=S.Lk(d),s=S.Lk(f);h=q;var k=this.ba.x-this.Zg.x,t=this.ba.y-this.Zg.y,g=h.j.x*k+h.k.x*t,t=h.j.y*k+h.k.y*t,k=g;h=s;s=this.ca.x-this.$g.x;l=this.ca.y-this.$g.y;g=h.j.x*s+h.k.x*l;l=h.j.y*s+h.k.y*l;s=g;h=e.x+s-b.x-k;g=e.y+l-b.y-t;if(this.mg){this.R=T.Zb(q,
this.ge);this.$a=(h+k)*this.R.y-(g+t)*this.R.x;this.ab=s*this.R.y-l*this.R.x;var p=this.R.x*h+this.R.y*g;.01>Math.abs(this.df-this.bf)?(r=T.Kb(p,-.2,.2),n=Math.abs(p),m=!0):p<=this.bf?(r=T.Kb(p-this.bf+.005,-.2,0),n=this.bf-p,m=!0):p>=this.df&&(r=T.Kb(p-this.df+.005,0,.2),n=p-this.df,m=!0)}this.ja=T.Zb(q,this.ei);this.fb=(h+k)*this.ja.y-(g+t)*this.ja.x;this.gb=s*this.ja.y-l*this.ja.x;q=new Cc(0,0,0);t=this.ja.x*h+this.ja.y*g;s=f-d-this.MF;n=Math.max(n,Math.abs(t));k=Math.abs(s);m?(m=this.Sb,l=this.Tb,
h=this.Bd,g=this.Cd,this.Z.j.x=m+l+h*this.fb*this.fb+g*this.gb*this.gb,this.Z.j.y=h*this.fb+g*this.gb,this.Z.j.z=h*this.fb*this.$a+g*this.gb*this.ab,this.Z.k.x=this.Z.j.y,this.Z.k.y=h+g,this.Z.k.z=h*this.$a+g*this.ab,this.Z.ua.x=this.Z.j.z,this.Z.ua.y=this.Z.k.z,this.Z.ua.z=m+l+h*this.$a*this.$a+g*this.ab*this.ab,this.Z.zm(q,-t,-s,-r)):(m=this.Sb,l=this.Tb,h=this.Bd,g=this.Cd,r=h*this.fb+g*this.gb,p=h+g,this.Z.j.Set(m+l+h*this.fb*this.fb+g*this.gb*this.gb,r,0),this.Z.k.Set(r,p,0),r=this.Z.Rk(R.q(0,
0),-t,-s),q.x=r.x,q.y=r.y,q.z=0);r=q.x*this.ja.x+q.z*this.R.x;m=q.x*this.ja.y+q.z*this.R.y;t=q.x*this.fb+q.y+q.z*this.$a;q=q.x*this.gb+q.y+q.z*this.ab;b.x-=this.Sb*r;b.y-=this.Sb*m;d-=this.Bd*t;e.x+=this.Tb*r;e.y+=this.Tb*m;f+=this.Cd*q;a.m.G=d;c.m.G=f;a.Qb();c.Qb();return.005>=n&&k<=wc};var Se=function(){Ie.call(this);this.Eb=R.q(0,0);this.Fb=R.q(0,0);this.hk=R.q(0,0);this.type=Z.HD;this.hk.Set(1,0);this.jh=0;this.Oj=!1;this.Tv=this.yu=0;this.Zk=!1;this.Gl=this.Pu=0};Q(Se,Ie);Se.prototype.mc=function(a,
c,b,d){this.K=a;this.L=c;this.Eb=this.K.vd(b);this.Fb=this.L.vd(b);this.hk=this.K.bs(d);this.jh=this.L.Jd()-this.K.Jd()};Se.prototype.kf=function(){return new Re(this)};var Ue=function(a){Z.call(this,a);this.ci=R.q(0,0);this.di=R.q(0,0);this.ba=R.q(0,0);this.ca=R.q(0,0);this.jb=R.q(0,0);this.kb=R.q(0,0);this.Ff=this.T.Oa.DF;this.ci.x=a.Zp.x-this.Ff.A.position.x;this.ci.y=a.Zp.y-this.Ff.A.position.y;this.di.x=a.$p.x-this.Ff.A.position.x;this.di.y=a.$p.y-this.Ff.A.position.y;this.ba.F(a.Eb);this.ca.F(a.Fb);
this.Ub=a.gj;this.xl=a.lu+this.Ub*a.mu;this.hz=Math.min(a.jz,this.xl-this.Ub*Te);this.iz=Math.min(a.kz,(this.xl-Te)/this.Ub);this.Yg=this.Xg=this.C=0};Q(Ue,Z);Ue.prototype.lf=function(a){var c=this.T,b=this.U,d;d=c.A.n;var e=this.ba.x-c.m.N.x,f=this.ba.y-c.m.N.y,h=d.j.x*e+d.k.x*f,f=d.j.y*e+d.k.y*f,e=h;d=b.A.n;var g=this.ca.x-b.m.N.x,m=this.ca.y-b.m.N.y,h=d.j.x*g+d.k.x*m,m=d.j.y*g+d.k.y*m,g=h;d=b.m.u.x+g;var h=b.m.u.y+m,l=this.Ff.A.position.x+this.di.x,n=this.Ff.A.position.y+this.di.y;this.jb.Set(c.m.u.x+
e-(this.Ff.A.position.x+this.ci.x),c.m.u.y+f-(this.Ff.A.position.y+this.ci.y));this.kb.Set(d-l,h-n);d=this.jb.Cg();h=this.kb.Cg();.005<d?this.jb.Ld(1/d):this.jb.fa();.005<h?this.kb.Ld(1/h):this.kb.fa();0<this.xl-d-this.Ub*h?(this.Mu=Z.Od,this.C=0):this.Mu=Z.cd;d<this.hz?(this.Gu=Z.Od,this.Xg=0):this.Gu=Z.cd;h<this.iz?(this.Hu=Z.Od,this.Yg=0):this.Hu=Z.cd;d=e*this.jb.y-f*this.jb.x;h=g*this.kb.y-m*this.kb.x;this.Hn=c.I+c.O*d*d;this.In=b.I+b.O*h*h;this.Oq=this.Hn+this.Ub*this.Ub*this.In;this.Hn=1/this.Hn;
this.In=1/this.In;this.Oq=1/this.Oq;a.ri?(this.C*=a.yc,this.Xg*=a.yc,this.Yg*=a.yc,a=(-this.C-this.Xg)*this.jb.x,d=(-this.C-this.Xg)*this.jb.y,h=(-this.Ub*this.C-this.Yg)*this.kb.x,l=(-this.Ub*this.C-this.Yg)*this.kb.y,c.p.x+=c.I*a,c.p.y+=c.I*d,c.D+=c.O*(e*d-f*a),b.p.x+=b.I*h,b.p.y+=b.I*l,b.D+=b.O*(g*l-m*h)):this.Yg=this.Xg=this.C=0};Ue.prototype.Se=function(){var a=this.T,c=this.U,b;b=a.A.n;var d=this.ba.x-a.m.N.x,e=this.ba.y-a.m.N.y,f=b.j.x*d+b.k.x*e,e=b.j.y*d+b.k.y*e,d=f;b=c.A.n;var h=this.ca.x-
c.m.N.x,g=this.ca.y-c.m.N.y,f=b.j.x*h+b.k.x*g,g=b.j.y*h+b.k.y*g,h=f,m=f=b=0,l=0;b=l=b=l=m=f=b=0;this.Mu==Z.cd&&(b=a.p.x+-a.D*e,f=a.p.y+a.D*d,m=c.p.x+-c.D*g,l=c.p.y+c.D*h,b=-(this.jb.x*b+this.jb.y*f)-this.Ub*(this.kb.x*m+this.kb.y*l),l=this.Oq*-b,b=this.C,this.C=Math.max(0,this.C+l),l=this.C-b,b=-l*this.jb.x,f=-l*this.jb.y,m=-this.Ub*l*this.kb.x,l=-this.Ub*l*this.kb.y,a.p.x+=a.I*b,a.p.y+=a.I*f,a.D+=a.O*(d*f-e*b),c.p.x+=c.I*m,c.p.y+=c.I*l,c.D+=c.O*(h*l-g*m));this.Gu==Z.cd&&(b=a.p.x+-a.D*e,f=a.p.y+a.D*
d,b=-(this.jb.x*b+this.jb.y*f),l=-this.Hn*b,b=this.Xg,this.Xg=Math.max(0,this.Xg+l),l=this.Xg-b,b=-l*this.jb.x,f=-l*this.jb.y,a.p.x+=a.I*b,a.p.y+=a.I*f,a.D+=a.O*(d*f-e*b));this.Hu==Z.cd&&(m=c.p.x+-c.D*g,l=c.p.y+c.D*h,b=-(this.kb.x*m+this.kb.y*l),l=-this.In*b,b=this.Yg,this.Yg=Math.max(0,this.Yg+l),l=this.Yg-b,m=-l*this.kb.x,l=-l*this.kb.y,c.p.x+=c.I*m,c.p.y+=c.I*l,c.D+=c.O*(h*l-g*m))};Ue.prototype.Re=function(){var a=this.T,c=this.U,b,d=this.Ff.A.position.x+this.ci.x,e=this.Ff.A.position.y+this.ci.y,
f=this.Ff.A.position.x+this.di.x,h=this.Ff.A.position.y+this.di.y,g=0,m=0,l=0,n=0,k=b=0,r=0,q=0,s=k=q=b=k=b=0;this.Mu==Z.cd&&(b=a.A.n,g=this.ba.x-a.m.N.x,m=this.ba.y-a.m.N.y,k=b.j.x*g+b.k.x*m,m=b.j.y*g+b.k.y*m,g=k,b=c.A.n,l=this.ca.x-c.m.N.x,n=this.ca.y-c.m.N.y,k=b.j.x*l+b.k.x*n,n=b.j.y*l+b.k.y*n,l=k,b=a.m.u.x+g,k=a.m.u.y+m,r=c.m.u.x+l,q=c.m.u.y+n,this.jb.Set(b-d,k-e),this.kb.Set(r-f,q-h),b=this.jb.Cg(),k=this.kb.Cg(),.005<b?this.jb.Ld(1/b):this.jb.fa(),.005<k?this.kb.Ld(1/k):this.kb.fa(),b=this.xl-
b-this.Ub*k,s=Math.max(s,-b),b=T.Kb(b+.005,-.2,0),q=-this.Oq*b,b=-q*this.jb.x,k=-q*this.jb.y,r=-this.Ub*q*this.kb.x,q=-this.Ub*q*this.kb.y,a.m.u.x+=a.I*b,a.m.u.y+=a.I*k,a.m.G+=a.O*(g*k-m*b),c.m.u.x+=c.I*r,c.m.u.y+=c.I*q,c.m.G+=c.O*(l*q-n*r),a.Qb(),c.Qb());this.Gu==Z.cd&&(b=a.A.n,g=this.ba.x-a.m.N.x,m=this.ba.y-a.m.N.y,k=b.j.x*g+b.k.x*m,m=b.j.y*g+b.k.y*m,g=k,b=a.m.u.x+g,k=a.m.u.y+m,this.jb.Set(b-d,k-e),b=this.jb.Cg(),.005<b?(this.jb.x*=1/b,this.jb.y*=1/b):this.jb.fa(),b=this.hz-b,s=Math.max(s,-b),
b=T.Kb(b+.005,-.2,0),q=-this.Hn*b,b=-q*this.jb.x,k=-q*this.jb.y,a.m.u.x+=a.I*b,a.m.u.y+=a.I*k,a.m.G+=a.O*(g*k-m*b),a.Qb());this.Hu==Z.cd&&(b=c.A.n,l=this.ca.x-c.m.N.x,n=this.ca.y-c.m.N.y,k=b.j.x*l+b.k.x*n,n=b.j.y*l+b.k.y*n,l=k,r=c.m.u.x+l,q=c.m.u.y+n,this.kb.Set(r-f,q-h),k=this.kb.Cg(),.005<k?(this.kb.x*=1/k,this.kb.y*=1/k):this.kb.fa(),b=this.iz-k,s=Math.max(s,-b),b=T.Kb(b+.005,-.2,0),q=-this.In*b,r=-q*this.kb.x,q=-q*this.kb.y,c.m.u.x+=c.I*r,c.m.u.y+=c.I*q,c.m.G+=c.O*(l*q-n*r),c.Qb());return.005>
s};var Te=1,Ve=function(){Ie.call(this);this.Zp=R.q(0,0);this.$p=R.q(0,0);this.Eb=R.q(0,0);this.Fb=R.q(0,0);this.type=Z.ID;this.Zp.Set(-1,1);this.$p.Set(1,1);this.Eb.Set(-1,0);this.Fb.Set(1,0);this.kz=this.mu=this.jz=this.lu=0;this.gj=1;this.Ms=!0};Q(Ve,Ie);Ve.prototype.mc=function(a,c,b,d,e,f,h){void 0===h&&(h=0);this.K=a;this.L=c;this.Zp.F(b);this.$p.F(d);this.Eb=this.K.vd(e);this.Fb=this.L.vd(f);a=e.x-b.x;b=e.y-b.y;this.lu=Math.sqrt(a*a+b*b);b=f.x-d.x;d=f.y-d.y;this.mu=Math.sqrt(b*b+d*d);this.gj=
h;h=this.lu+this.gj*this.mu;this.jz=h-this.gj*Te;this.kz=(h-Te)/this.gj};Ve.prototype.kf=function(){return new Ue(this)};var Xe=function(a){Z.call(this,a);this.ue=new S;this.pm=new S;this.qm=new S;this.rm=new S;this.Pc=new Cc(0,0,0);this.eg=R.q(0,0);this.ih=R.q(0,0);this.ba=R.q(0,0);this.ca=R.q(0,0);this.C=new Cc(0,0,0);this.S=new Dc;this.ba.F(a.Eb);this.ca.F(a.Fb);this.Ln=a.jh;this.C.fa();this.Ra=0;this.Mq=a.xu;this.Nu=a.Sv;this.KF=a.lz;this.Jn=a.Gl;this.mg=a.Oj;this.Ui=a.Zk;this.Da=Z.Od};Q(Xe,Z);
Xe.prototype.Lo=function(){return this.U.m.G-this.T.m.G-this.Ln};Xe.prototype.lf=function(a){var c=this.T,b=this.U,d,e=0;d=c.A.n;var f=this.ba.x-c.m.N.x,h=this.ba.y-c.m.N.y,e=d.j.x*f+d.k.x*h,h=d.j.y*f+d.k.y*h,f=e;d=b.A.n;var g=this.ca.x-b.m.N.x,m=this.ca.y-b.m.N.y,e=d.j.x*g+d.k.x*m,m=d.j.y*g+d.k.y*m,g=e;d=c.I;var e=b.I,l=c.O,n=b.O;this.S.j.x=d+e+h*h*l+m*m*n;this.S.k.x=-h*f*l-m*g*n;this.S.ua.x=-h*l-m*n;this.S.j.y=this.S.k.x;this.S.k.y=d+e+f*f*l+g*g*n;this.S.ua.y=f*l+g*n;this.S.j.z=this.S.ua.x;this.S.k.z=
this.S.ua.y;this.S.ua.z=l+n;this.Vd=1/(l+n);this.Ui||(this.Ra=0);if(this.mg){var k=b.m.G-c.m.G-this.Ln;Math.abs(this.Nu-this.Mq)<2*wc?this.Da=Z.Ii:k<=this.Mq?(this.Da!=Z.Mg&&(this.C.z=0),this.Da=Z.Mg):k>=this.Nu?(this.Da!=Z.cd&&(this.C.z=0),this.Da=Z.cd):(this.Da=Z.Od,this.C.z=0)}else this.Da=Z.Od;a.ri?(this.C.x*=a.yc,this.C.y*=a.yc,this.Ra*=a.yc,a=this.C.x,k=this.C.y,c.p.x-=d*a,c.p.y-=d*k,c.D-=l*(f*k-h*a+this.Ra+this.C.z),b.p.x+=e*a,b.p.y+=e*k,b.D+=n*(g*k-m*a+this.Ra+this.C.z)):(this.C.fa(),this.Ra=
0)};Xe.prototype.Se=function(a){var c=this.T,b=this.U,d=0,e=d=0,f=0,h=0,g=0,m=c.p,l=c.D,n=b.p,k=b.D,r=c.I,q=b.I,s=c.O,t=b.O;this.Ui&&this.Da!=Z.Ii&&(e=this.Vd*-(k-l-this.Jn),f=this.Ra,h=a.Fa*this.KF,this.Ra=T.Kb(this.Ra+e,-h,h),e=this.Ra-f,l-=s*e,k+=t*e);if(this.mg&&this.Da!=Z.Od){a=c.A.n;e=this.ba.x-c.m.N.x;f=this.ba.y-c.m.N.y;d=a.j.x*e+a.k.x*f;f=a.j.y*e+a.k.y*f;e=d;a=b.A.n;h=this.ca.x-b.m.N.x;g=this.ca.y-b.m.N.y;d=a.j.x*h+a.k.x*g;g=a.j.y*h+a.k.y*g;h=d;a=n.x+-k*g-m.x- -l*f;var p=n.y+k*h-m.y-l*e;
this.S.zm(this.Pc,-a,-p,-(k-l));this.Da==Z.Ii?this.C.xh(this.Pc):this.Da==Z.Mg?(d=this.C.z+this.Pc.z,0>d&&(this.S.Rk(this.ih,-a,-p),this.Pc.x=this.ih.x,this.Pc.y=this.ih.y,this.Pc.z=-this.C.z,this.C.x+=this.ih.x,this.C.y+=this.ih.y,this.C.z=0)):this.Da==Z.cd&&(d=this.C.z+this.Pc.z,0<d&&(this.S.Rk(this.ih,-a,-p),this.Pc.x=this.ih.x,this.Pc.y=this.ih.y,this.Pc.z=-this.C.z,this.C.x+=this.ih.x,this.C.y+=this.ih.y,this.C.z=0));m.x-=r*this.Pc.x;m.y-=r*this.Pc.y;l-=s*(e*this.Pc.y-f*this.Pc.x+this.Pc.z);
n.x+=q*this.Pc.x;n.y+=q*this.Pc.y;k+=t*(h*this.Pc.y-g*this.Pc.x+this.Pc.z)}else a=c.A.n,e=this.ba.x-c.m.N.x,f=this.ba.y-c.m.N.y,d=a.j.x*e+a.k.x*f,f=a.j.y*e+a.k.y*f,e=d,a=b.A.n,h=this.ca.x-b.m.N.x,g=this.ca.y-b.m.N.y,d=a.j.x*h+a.k.x*g,g=a.j.y*h+a.k.y*g,h=d,this.S.Rk(this.eg,-(n.x+-k*g-m.x- -l*f),-(n.y+k*h-m.y-l*e)),this.C.x+=this.eg.x,this.C.y+=this.eg.y,m.x-=r*this.eg.x,m.y-=r*this.eg.y,l-=s*(e*this.eg.y-f*this.eg.x),n.x+=q*this.eg.x,n.y+=q*this.eg.y,k+=t*(h*this.eg.y-g*this.eg.x);c.p.F(m);c.D=l;
b.p.F(n);b.D=k};Xe.prototype.Re=function(){var a=0,c,b=this.T,d=this.U,e=0,f=c=0,h=0,g=0;if(this.mg&&this.Da!=Z.Od){var a=d.m.G-b.m.G-this.Ln,m=0;this.Da==Z.Ii?(a=T.Kb(a-this.Mq,-xc,xc),m=-this.Vd*a,e=Math.abs(a)):this.Da==Z.Mg?(a-=this.Mq,e=-a,a=T.Kb(a+wc,-xc,0),m=-this.Vd*a):this.Da==Z.cd&&(e=a-=this.Nu,a=T.Kb(a-wc,0,xc),m=-this.Vd*a);b.m.G-=b.O*m;d.m.G+=d.O*m;b.Qb();d.Qb()}c=b.A.n;m=this.ba.x-b.m.N.x;a=this.ba.y-b.m.N.y;f=c.j.x*m+c.k.x*a;a=c.j.y*m+c.k.y*a;m=f;c=d.A.n;var l=this.ca.x-d.m.N.x,n=
this.ca.y-d.m.N.y,f=c.j.x*l+c.k.x*n,n=c.j.y*l+c.k.y*n,l=f,h=d.m.u.x+l-b.m.u.x-m,g=d.m.u.y+n-b.m.u.y-a,k=h*h+g*g;c=Math.sqrt(k);var f=b.I,r=d.I,q=b.O,s=d.O;k>.05*.05&&(k=1/(f+r),h=k*-h,g=k*-g,b.m.u.x-=.5*f*h,b.m.u.y-=.5*f*g,d.m.u.x+=.5*r*h,d.m.u.y+=.5*r*g,h=d.m.u.x+l-b.m.u.x-m,g=d.m.u.y+n-b.m.u.y-a);this.pm.j.x=f+r;this.pm.k.x=0;this.pm.j.y=0;this.pm.k.y=f+r;this.qm.j.x=q*a*a;this.qm.k.x=-q*m*a;this.qm.j.y=-q*m*a;this.qm.k.y=q*m*m;this.rm.j.x=s*n*n;this.rm.k.x=-s*l*n;this.rm.j.y=-s*l*n;this.rm.k.y=
s*l*l;this.ue.Uf(this.pm);this.ue.Ao(this.qm);this.ue.Ao(this.rm);this.ue.Ai(Ye,-h,-g);h=Ye.x;g=Ye.y;b.m.u.x-=b.I*h;b.m.u.y-=b.I*g;b.m.G-=b.O*(m*g-a*h);d.m.u.x+=d.I*h;d.m.u.y+=d.I*g;d.m.G+=d.O*(l*g-n*h);b.Qb();d.Qb();return.005>=c&&e<=wc};var Ye=R.q(0,0),vc=function(){Ie.call(this);this.Eb=R.q(0,0);this.Fb=R.q(0,0);this.type=Z.Yk;this.Eb.fa();this.Fb.fa();this.Gl=this.lz=this.Sv=this.xu=this.jh=0;this.Zk=this.Oj=!1};Q(vc,Ie);vc.prototype.mc=function(a,c,b){this.K=a;this.L=c;this.Eb=this.K.vd(b);this.Fb=
this.L.vd(b);this.jh=this.L.Jd()-this.K.Jd()};vc.prototype.kf=function(){return new Xe(this)};var Ze=function(a){Z.call(this,a);this.Ze=R.q(0,0);this.$e=R.q(0,0);this.C=new Cc(0,0,0);this.S=new Dc;this.Ze.F(a.Eb);this.$e.F(a.Fb);this.Ln=a.jh};Q(Ze,Z);Ze.prototype.lf=function(a){var c,b=0,d=this.T,e=this.U;c=d.A.n;var f=this.Ze.x-d.m.N.x,h=this.Ze.y-d.m.N.y,b=c.j.x*f+c.k.x*h,h=c.j.y*f+c.k.y*h,f=b;c=e.A.n;var g=this.$e.x-e.m.N.x,m=this.$e.y-e.m.N.y,b=c.j.x*g+c.k.x*m,m=c.j.y*g+c.k.y*m,g=b;c=d.I;var b=
e.I,l=d.O,n=e.O;this.S.j.x=c+b+h*h*l+m*m*n;this.S.k.x=-h*f*l-m*g*n;this.S.ua.x=-h*l-m*n;this.S.j.y=this.S.k.x;this.S.k.y=c+b+f*f*l+g*g*n;this.S.ua.y=f*l+g*n;this.S.j.z=this.S.ua.x;this.S.k.z=this.S.ua.y;this.S.ua.z=l+n;a.ri?(this.C.x*=a.yc,this.C.y*=a.yc,this.C.z*=a.yc,d.p.x-=c*this.C.x,d.p.y-=c*this.C.y,d.D-=l*(f*this.C.y-h*this.C.x+this.C.z),e.p.x+=b*this.C.x,e.p.y+=b*this.C.y,e.D+=n*(g*this.C.y-m*this.C.x+this.C.z)):this.C.fa()};Ze.prototype.Se=function(){var a,c=0,b=this.T,d=this.U,e=b.p,f=b.D,
h=d.p,g=d.D,m=b.I,l=d.I,n=b.O,k=d.O;a=b.A.n;var r=this.Ze.x-b.m.N.x,q=this.Ze.y-b.m.N.y,c=a.j.x*r+a.k.x*q,q=a.j.y*r+a.k.y*q,r=c;a=d.A.n;var s=this.$e.x-d.m.N.x,t=this.$e.y-d.m.N.y,c=a.j.x*s+a.k.x*t,t=a.j.y*s+a.k.y*t,s=c;a=new Cc(0,0,0);this.S.zm(a,-(h.x-g*t-e.x+f*q),-(h.y+g*s-e.y-f*r),-(g-f));this.C.xh(a);e.x-=m*a.x;e.y-=m*a.y;f-=n*(r*a.y-q*a.x+a.z);h.x+=l*a.x;h.y+=l*a.y;g+=k*(s*a.y-t*a.x+a.z);b.D=f;d.D=g};Ze.prototype.Re=function(){var a,c=0,b=this.T,d=this.U;a=b.A.n;var e=this.Ze.x-b.m.N.x,f=this.Ze.y-
b.m.N.y,c=a.j.x*e+a.k.x*f,f=a.j.y*e+a.k.y*f,e=c;a=d.A.n;var h=this.$e.x-d.m.N.x,g=this.$e.y-d.m.N.y,c=a.j.x*h+a.k.x*g,g=a.j.y*h+a.k.y*g,h=c;a=b.I;var c=d.I,m=b.O,l=d.O,n=d.m.u.x+h-b.m.u.x-e,k=d.m.u.y+g-b.m.u.y-f,r=d.m.G-b.m.G-this.Ln,q=Math.sqrt(n*n+k*k),s=Math.abs(r);.05<q&&(m*=1,l*=1);this.S.j.x=a+c+f*f*m+g*g*l;this.S.k.x=-f*e*m-g*h*l;this.S.ua.x=-f*m-g*l;this.S.j.y=this.S.k.x;this.S.k.y=a+c+e*e*m+h*h*l;this.S.ua.y=e*m+h*l;this.S.j.z=this.S.ua.x;this.S.k.z=this.S.ua.y;this.S.ua.z=m+l;var t=new Cc(0,
0,0);this.S.zm(t,-n,-k,-r);b.m.u.x-=a*t.x;b.m.u.y-=a*t.y;b.m.G-=m*(e*t.y-f*t.x+t.z);d.m.u.x+=c*t.x;d.m.u.y+=c*t.y;d.m.G+=l*(h*t.y-g*t.x+t.z);b.Qb();d.Qb();return.005>=q&&s<=wc};var $e=function(){Ie.call(this);this.Eb=R.q(0,0);this.Fb=R.q(0,0);this.type=Z.KD;this.jh=0};Q($e,Ie);$e.prototype.mc=function(a,c,b){this.K=a;this.L=c;this.Eb.F(this.K.vd(b));this.Fb.F(this.L.vd(b));this.jh=this.L.Jd()-this.K.Jd()};$e.prototype.kf=function(){return new Ze(this)};var oe=[new Jc,new Jc],xe=[new Jc,new Jc],ye=
[new Jc,new Jc],pe=R.q(0,0),qe=R.q(0,0),re=R.q(0,0),ue=R.q(0,0),se=R.q(0,0),te=R.q(0,0),ve=R.q(0,0),we=R.q(0,0),Nd=0,Wd=0,Xd=0,Ud=0,Vd=0,Od=new kd,Pd=new Vc,Qd=new mc,Rd=new mc,Td=new fd,Sd=new Wc;oc.EG=new mc;pc.gx=new pc;new function(){this.position=R.q(0,0);this.VA=R.q(0,0);this.Ed=R.q(0,0);this.id=new Ic};rc.MI=new mc;rc.eA=new Ec;rc.fA=new Ec;var Md=new ld,me=new md,ne=new he}
function af(a,c,b,d,e,f){var h;if(h=(b+.1>=a&&a>=e-.1||b-.1<=a&&a<=e+.1)&&(d+.1>=c&&c>=f-.1||d-.1<=c&&c<=f+.1))h=.1<Math.abs(e-b)?.1>Math.abs((f-d)/(e-b)*(a-b)+d-c):.1>Math.abs(a-b);return h}function bf(a,c){var b=R,d=cf(a),e=[],f,h,g,m,l,n,k,r,q;l=0;for(n=d.length;l<n;l++){h=d[l];f=[];f.length=h.length;k=q=0;for(r=h.length;k<r;k++)g=h[k],m=h[(k+1)%r],q+=g.x*m.y-g.y*m.x,f[k]=b.q(g.x,g.y);q=Math.abs(q/2);q>=.001*c&&e.push(f)}return e}
function cf(a){var c=[],b=0,d=0,e=0,f=0,h=0,g=h=0,m=0,l=0,n=0,f=0,k,r,q,s,t,p=f=b=0,y=0,e=[],m=[],A=!1,D=[],w=[];for(w.push(a);w.length;){c=w[0];d=c.length;A=!0;for(b=0;b<d;b++)if(l=b,n=b<d-1?b+1:b+1-d,f=b<d-2?b+2:b+2-d,a=c[l],k=c[n],r=c[f],f=a.x,e=a.y,m=k.x,h=k.y,g=r.x,r=r.y,f=f*h+m*r+g*e-e*m-h*g-r*f,0>f){A=!1;m=1E9;for(e=0;e<d;e++)if(e!==l&&e!==n){b=e;f=e<d-1?e+1:0;q=c[b];s=c[f];g=a.x;r=a.y;var G=k.x,I=k.y,h=q.x;q=q.y;var E=s.x;s=s.y;var z=G-g,H=I-r,C=E-h,X=s-q,C=(C*(q-r)-X*(h-g))/(H*C-z*X),z=g+
C*z,H=r+C*H,g=af(G,I,g,r,z,H),h=af(z,H,h,q,E,s);if(r=g&&h?R.q(z,H):null)h=k.x-r.x,g=k.y-r.y,h=h*h+g*g,h<m&&(y=b,p=f,t=r,m=h)}if(1E9===m)return[];e=[];m=[];b=y;f=p;q=c[b];s=c[f];p=t.y;y=s.y;.1>Math.abs(s.x-t.x)&&.1>Math.abs(y-p)||e.push(t);p=t.y;y=q.y;.1>Math.abs(q.x-t.x)&&.1>Math.abs(y-p)||m.push(t);y=-1;for(p=l;;){if(p!==f)e.push(c[p]);else{if(0>y||y>=d)return[];af(s.x,s.y,c[y].x,c[y].y,a.x,a.y)||e.push(c[p]);break}y=p;0>p-1?p=d-1:p--}e.reverse();y=-1;for(p=n;;){if(p!==b)m.push(c[p]);else{if(0>y||
y>=d)return[];p!==b||af(q.x,q.y,c[y].x,c[y].y,k.x,k.y)||m.push(c[p]);break}y=p;p+1>d-1?p=0:p++}w.push(e,m);w.shift();break}A&&D.push(w.shift())}return D}
function df(a){for(var c=0;4E3>c;c++)R.Bh.push(new R(0,0));this.i=a;this.qe=new rc(R.q(0,10),!0);this.gu=-1;a=new pc;a.behavior=this;a.Co=function(a){this.behavior.i.Ol(a.Rb.Va().Gg.r,a.Nb.Va().Gg.r)};this.qe.Hw(a);a=new qc;a.behavior=this;a.yj=function(a,c){if(this.behavior.LC)return!0;var e=a.Va().Gg.r.type,f=c.Va().Gg.r.type,h=e.da.Physics_DisabledCollisions;return h&&h.contains(f)?!1:(h=f.da.Physics_DisabledCollisions)&&h.contains(e)?!1:!0};this.qe.Gw(a);this.PG=0;this.xo=8;this.Zn=3;this.LC=
!0}
(function(){function a(){}function c(){}var b=R,d=W,e=tc,f=Y,h=sc,g=uc,m=vc,l=df.prototype;l.vc=function(a){this.behavior=a;this.i=a.i};l.vc.prototype.lb=function(){};l.Xb=function(a,b){this.type=a;this.behavior=a.behavior;this.r=b;this.i=a.i;this.qe=this.behavior.qe};var n=l.Xb.prototype;n.lb=function(){this.Mt=0!==this.V[0];this.xx=this.V[1];this.iv=0!==this.V[2];this.dg=this.V[3];this.Pg=this.V[4];this.lh=this.V[5];this.ek=this.V[6];this.Bj=this.V[7];this.Gj=0!==this.V[8];this.enabled=0!==this.V[9];this.body=
null;this.r.nb();this.pq=this.r.x;this.qq=this.r.y;this.Qi=this.r.M;this.du=this.hu=0;this.$z=this.fu=!1;this.au=null;this.bu=-1;this.Ke?(this.Ke.length=0,this.If.length=0,this.Vh.clear()):(this.Ke=[],this.If=[],this.Vh=new da);var a=this;this.je||(this.On=function(b){a.Tn(b)});this.i.Wo(this.On)};n.Qz=function(){this.r.nb();this.Rs();this.au=this.r.Lb;this.bu=this.r.aa};n.bj=function(){this.Dp();this.If.length=0;this.Vh.clear();this.body&&(this.qe.Ho(this.body),this.body=null);this.i.bA(this.On)};
n.Fd=function(){var a={e:this.enabled,im:this.Mt,pr:this.iv,d:this.dg,fr:this.Pg,re:this.lh,ld:this.ek,ad:this.Bj,b:this.Gj,mcj:this.If};if(this.enabled){var c=b.q(0,0);c.F(this.body.rj());a.vx=c.x;a.vy=c.y;a.om=this.body.Ko()}return a};n.fe=function(a){this.Dp();this.If.length=0;this.Vh.clear();this.body&&(this.qe.Ho(this.body),this.body=null);this.enabled=a.e;this.Mt=a.im;this.iv=a.pr;this.dg=a.d;this.Pg=a.fr;this.lh=a.re;this.ek=a.ld;this.Bj=a.ad;this.Gj=a.b;this.pq=this.r.x;this.qq=this.r.y;this.Qi=
this.r.M;this.hu=this.r.width;this.du=this.r.height;this.enabled&&(this.Rs(),this.body.xj(b.q(a.vx,a.vy)),this.body.wm(a.om),0===a.vx&&0===a.vy&&0===a.om||this.body.nd(!0),this.If=a.mcj)};n.Yf=function(){this.enabled&&this.ov();this.behavior.gu=this.i.hf-1};n.Tn=function(a){var b,c,d,e=a.uid;d=b=0;for(c=this.If.length;b<c;b++)this.If[d]=this.If[b],d<this.Ke.length&&(this.Ke[d]=this.Ke[b]),this.If[b].ic[1]==e?this.qe.Io(this.Ke[b]):d++;this.If.length=d;d<this.Ke.length&&(this.Ke.length=d);this.Vh.remove(a)};
n.Dp=function(){var a,b;a=0;for(b=this.Ke.length;a<b;a++)this.qe.Io(this.Ke[a]);this.Ke.length=0};n.ov=function(){var a,b,c;a=0;for(b=this.If.length;a<b;a++)switch(c=this.If[a],c.type){case 0:this.pD(c.ic[0],c.ic[1],c.ic[2],c.ic[3],c.ic[4]);break;case 1:this.rD(c.ic[0],c.ic[1]);break;case 2:this.qD(c.ic[0],c.ic[1],c.ic[2],c.ic[3])}};n.mD=function(){this.body&&(this.Dp(),this.qe.Ho(this.body),this.body=null,this.r.da.pf=null)};var k=[];n.Rs=function(){if(this.enabled){var a=this.r,c=!1,g=null,l=null,
m,n,A,D,w,G,I,E,z,H,C,X,M;if(this.body){c=!0;g=b.q(0,0);g.F(this.body.rj());l=this.body.Ko();E=this.Vh.wg();m=0;for(n=E.length;m<n;m++)z=E[m].da.pf.Gg,z.Dp();this.mD()}z=new e;z.dg=this.dg;z.Pg=this.Pg;z.lh=this.lh;m=new d;m.type=this.Mt?0:2;a.nb();m.position.x=.02*a.ub.Zi();m.position.y=.02*a.ub.$i();m.M=a.M;m.kt=this.iv;m.ek=this.ek;m.Bj=this.Bj;m.Gj=this.Gj;E=this.r.Ba&&!this.r.Ba.Oi();this.body=this.qe.Wr(m);this.body.Gg=this;m=this.xx;E||this.r.qh||0!==this.xx||(m=1);n=Math.max(Math.abs(a.width),
1);A=Math.max(Math.abs(a.height),1);H=0>a.width;C=0>a.height;if(0===m)if(a.qh)for(X=a.ub.Zi()-a.x,I=a.ub.$i()-a.y,a.AI(k),E=[],m=0,n=k.length;m<n;++m){H=k[m];C=H.Zz;if(H.Mf){if(!H.Mf.tp){w=H.Mf.sc;D=H.Mf.ff;for(A=0;A<D;++A)E.push(b.q(w[2*A],w[2*A+1]));A=H.id&3758096384;(-2147483648===A||1073741824===A||536870912===A||A&-2147483648&&A&1073741824&&A&536870912)&&E.reverse();H.Mf.tp=bf(E,(C.right-C.left)*(C.bottom-C.top));A=0;for(D=E.length;A<D;++A)b.lc(E[A]);E.length=0}A=0;for(D=H.Mf.tp.length;A<D;++A){M=
H.Mf.tp[A];w=0;for(G=M.length;w<G;++w)E.push(b.q(.02*(C.left+M[w].x-X),.02*(C.top+M[w].y-I)));z.shape=new f;z.shape.xm(E,E.length);this.body.Jk(z);w=0;for(G=E.length;w<G;++w)b.lc(E[w]);E.length=0}}else E.push(b.q(.02*(C.left-X),.02*(C.top-I))),E.push(b.q(.02*(C.right-X),.02*(C.top-I))),E.push(b.q(.02*(C.right-X),.02*(C.bottom-I))),E.push(b.q(.02*(C.left-X),.02*(C.bottom-I))),z.shape=new f,z.shape.xm(E,E.length),this.body.Jk(z);A=0;for(D=E.length;A<D;++A)b.lc(E[A]);E.length=0}else{m=a.M;a.M=0;a.ea();
a.nb();X=a.ub.Zi()-a.x;I=a.ub.$i()-a.y;a.M=m;a.ea();a.Ba.Fi(H?-n:n,C?-A:A,0);w=a.Ba.sc;D=a.Ba.ff;E=[];E.length=D;for(m=0;m<D;m++)E[m]=b.q(w[2*m]-X,w[2*m+1]-I);H!==C&&E.reverse();X=bf(E,n*A);for(m=0;m<D;m++)b.lc(E[m]);if(X.length)for(m=0,n=X.length;m<n;m++){E=X[m];A=0;for(D=E.length;A<D;A++)I=E[A],I.x*=.02,I.y*=.02;z.shape=new f;z.shape.xm(E,E.length);this.body.Jk(z);A=0;for(D=E.length;A<D;A++)b.lc(E[A])}else z.shape=new f,z.shape.So(.01*n,.01*A),this.body.Jk(z)}else 1===m?(z.shape=new f,z.shape.So(.01*
n,.01*A)):z.shape=new h(.01*Math.min(n,A)),this.body.Jk(z);a.da.pf=this.body;this.hu=a.width;this.du=a.height;if(c)for(this.body.xj(g),this.body.wm(l),b.lc(g),this.ov(),E=this.Vh.wg(),m=0,n=E.length;m<n;m++)z=E[m].da.pf.Gg,z.ov();k.length=0}};n.tc=function(){if(this.enabled){var a=this.r,c;0===this.behavior.PG?c=this.i.ni/60:(c=this.i.Tm(this.r),c>1/30&&(c=1/30));this.i.hf>this.behavior.gu&&0<this.i.ni&&(this.qe.Ah(c,this.behavior.xo,this.behavior.Zn),this.qe.ew(),this.behavior.gu=this.i.hf);if(this.$z||
a.width!==this.hu||a.height!==this.du||a.Lb!==this.au||a.aa!==this.bu||a.qh&&a.Mz)this.Rs(),this.$z=!1,this.au=a.Lb,this.bu=a.aa,a.qh&&a.Mz&&(a.Mz=!1);c=a.M!==this.Qi;if(a.x!==this.pq||a.y!==this.qq){a.nb();var d=a.ub.Zi(),e=a.ub.$i(),f=d-this.pq,g=e-this.qq;this.body.ws(b.q(.02*d,.02*e));this.body.xj(b.q(f,g));this.fu=!0;this.body.nd(!0)}else this.fu&&(this.fu=!1,this.body.xj(b.q(0,0)),this.body.ws(b.q(.02*a.ub.Zi(),.02*a.ub.$i())));c&&(this.body.Ro(a.M),this.body.nd(!0));d=this.body.A.position;
c=d.x/.02;d=d.y/.02;e=this.body.Jd();if(c!==a.x||d!==a.y||e!==a.M)if(a.x=c,a.y=d,a.M=e,a.ea(),a.nb(),c=a.ub.Zi()-a.x,d=a.ub.$i()-a.y,0!==c||0!==d)a.x-=c,a.y-=d,a.ea();this.pq=a.x;this.qq=a.y;this.Qi=a.M}};n.Wp=function(a){return-1!==a&&this.r.Qg?0===a&&this.body?(this.body.A.position.x+this.body.sj().x)/.02:this.r.Qg(a,!0):this.r.x};n.Xp=function(a){return-1!==a&&this.r.Qg?0===a&&this.body?(this.body.A.position.y+this.body.sj().y)/.02:this.r.Qg(a,!1):this.r.y};a.prototype.es=function(){return this.enabled};
l.W=new a;c.prototype.yg=function(a,c,d){if(this.enabled){var e=this.Wp(d);d=this.Xp(d);this.body.yg(b.q(a,c),b.q(.02*e,.02*d))}};c.prototype.Bo=function(a){this.enabled&&this.body.Bo(x(a))};c.prototype.wm=function(a){this.enabled&&(this.body.wm(x(a)),this.body.nd(!0))};n.pD=function(a,c,d,e,f){if(this.enabled&&(c=this.i.Qh(c))&&c!=this.r&&c.da.pf){c.da.pf.Gg.Vh.add(this.r);var h=this.Wp(a);a=this.Xp(a);var k;c.Qg?(k=c.Qg(d,!0),d=c.Qg(d,!1)):(k=c.x,d=c.y);var l=h-k,m=a-d,n=new g;n.mc(this.body,c.da.pf,
b.q(.02*h,.02*a),b.q(.02*k,.02*d));n.length=.02*Math.sqrt(l*l+m*m);n.Ap=e;n.Tp=f;this.Ke.push(this.qe.Go(n))}};n.rD=function(a,c){if(this.enabled){var d=this.i.Qh(c);if(d&&d!=this.r&&d.da.pf){d.da.pf.Gg.Vh.add(this.r);var e=this.Wp(a),f=this.Xp(a),g=new m;g.mc(this.body,d.da.pf,b.q(.02*e,.02*f));this.Ke.push(this.qe.Go(g))}}};n.qD=function(a,c,d,e){if(this.enabled&&(c=this.i.Qh(c))&&c!=this.r&&c.da.pf){c.da.pf.Gg.Vh.add(this.r);var f=this.Wp(a);a=this.Xp(a);var g=new m;g.mc(this.body,c.da.pf,b.q(.02*
f,.02*a));g.Oj=!0;g.xu=x(d);g.Sv=x(e);this.Ke.push(this.qe.Go(g))}};l.Lc=new c;l.Ce=new function(){}})();function ef(a){this.i=a}
(function(){function a(){}var c=ef.prototype;c.vc=function(a){this.behavior=a;this.i=a.i};c.vc.prototype.lb=function(){};c.Xb=function(a,b){this.type=a;this.behavior=a.behavior;this.r=b;this.i=a.i;this.Br=this.Gv=this.Fv=this.Kt=this.Fm=this.Lm=this.rl=this.on=this.or=this.yq=!1;this.We=null;this.pu=-1;this.bk=this.ak=0;this.Qp=!1;this.bl=this.$f=0;this.Np=!0;this.sb=this.La=0};var b=c.Xb.prototype;b.OA=function(){this.$c=Math.cos(this.el);this.bd=Math.sin(this.el);this.zk=Math.cos(this.el-Math.PI/
2);this.Ak=Math.sin(this.el-Math.PI/2);this.$c=ab(this.$c);this.bd=ab(this.bd);this.zk=ab(this.zk);this.Ak=ab(this.Ak);this.tt=this.Ph;0>this.Ph&&(this.$c*=-1,this.bd*=-1,this.Ph=Math.abs(this.Ph))};b.lb=function(){this.Fl=this.V[0];this.Eg=this.V[1];this.Jg=this.V[2];this.nn=this.V[3];this.tt=this.Ph=this.V[4];this.Qq=this.V[5];this.ct=0!==this.V[6];this.$t=this.V[7]/1E3;this.kD=1===this.V[8];this.enabled=0!==this.V[9];this.$l=!1;this.zo=this.i.nj(this.r);this.qu=-1;this.Ek=0;this.el=x(90);this.OA();
var a=this;this.kD&&!this.i.Db&&(jQuery(document).keydown(function(b){a.bG(b)}),jQuery(document).keyup(function(b){a.cG(b)}));this.je||(this.On=function(b){a.Tn(b)});this.i.Wo(this.On);this.r.da.isPlatformBehavior=!0};b.Fd=function(){return{ii:this.Kt,lfx:this.ak,lfy:this.bk,lfo:this.We?this.We.uid:-1,am:this.$f,en:this.enabled,fall:this.bl,ft:this.Np,dx:this.La,dy:this.sb,ms:this.Fl,acc:this.Eg,dec:this.Jg,js:this.nn,g:this.Ph,g1:this.tt,mf:this.Qq,wof:this.$l,woj:this.zo?this.zo.uid:-1,ga:this.el,
edj:this.ct,cdj:this.Fm,dj:this.Lm,sus:this.$t}};b.fe=function(a){this.Kt=a.ii;this.ak=a.lfx;this.bk=a.lfy;this.pu=a.lfo;this.$f=a.am;this.enabled=a.en;this.bl=a.fall;this.Np=a.ft;this.La=a.dx;this.sb=a.dy;this.Fl=a.ms;this.Eg=a.acc;this.Jg=a.dec;this.nn=a.js;this.Ph=a.g;this.tt=a.g1;this.Qq=a.mf;this.$l=a.wof;this.qu=a.woj;this.el=a.ga;this.ct=a.edj;this.Fm=a.cdj;this.Lm=a.dj;this.$t=a.sus;this.Br=this.Gv=this.Fv=this.rl=this.on=this.or=this.yq=!1;this.Ek=0;this.OA()};b.Yf=function(){this.We=-1===
this.pu?null:this.i.Qh(this.pu);this.zo=-1===this.qu?null:this.i.Qh(this.qu)};b.Tn=function(a){this.We==a&&(this.We=null)};b.bj=function(){this.We=null;this.i.bA(this.On)};b.bG=function(a){switch(a.which){case 38:a.preventDefault();this.on=!0;break;case 37:a.preventDefault();this.yq=!0;break;case 39:a.preventDefault(),this.or=!0}};b.cG=function(a){switch(a.which){case 38:a.preventDefault();this.rl=this.on=!1;break;case 37:a.preventDefault();this.yq=!1;break;case 39:a.preventDefault(),this.or=!1}};
b.EI=function(){return 0>this.Ph?-1:1};b.ny=function(){var a=null,b=null,c,h;c=this.r.x;h=this.r.y;this.r.x+=this.$c;this.r.y+=this.bd;this.r.ea();if(this.We&&this.i.Qf(this.r,this.We))return this.r.x=c,this.r.y=h,this.r.ea(),this.We;(a=this.i.Pe(this.r))||0!==this.bl||(b=this.i.nj(this.r,!0));this.r.x=c;this.r.y=h;this.r.ea();if(a){if(this.i.Qf(this.r,a))return null;this.Qp=!1;return a}if(b&&b.length){h=a=0;for(c=b.length;a<c;a++)b[h]=b[a],this.i.Qf(this.r,b[a])||h++;if(1<=h)return this.Qp=!0,b[0]}return null};
b.tc=function(){};b.Rz=function(){var a=this.i.Tm(this.r),b,c,h,g,m,l,n,k,r;this.on||this.Br||(this.rl=!1);var q=this.yq||this.Fv;h=this.or||this.Gv;var s=(g=this.on||this.Br)&&!this.rl;this.Br=this.Gv=this.Fv=!1;if(this.enabled){this.Kt&&(s=g=h=q=!1);g||(this.Ek=0);k=this.We;r=!1;this.Np&&((this.i.Pe(this.r)||this.i.nj(this.r))&&this.i.tg(this.r,-this.$c,-this.bd,4,!0),this.Np=!1);!k||0!==this.sb||k.y===this.bk&&k.x===this.ak||(b=k.x-this.ak,c=k.y-this.bk,this.r.x+=b,this.r.y+=c,this.r.ea(),this.ak=
k.x,this.bk=k.y,r=!0,this.i.Pe(this.r)&&this.i.tg(this.r,-b,-c,2.5*Math.sqrt(b*b+c*c)));var t=this.ny();if(c=this.i.Pe(this.r))if(this.r.da.inputPredicted)this.i.tg(this.r,-this.$c,-this.bd,10,!1);else if(this.i.tG(this.r,Math.max(this.r.width,this.r.height)/2))this.i.Ol(this.r,c);else return;t?(this.Fm=this.Lm=!1,0<this.sb&&(this.$l||(this.i.kv(this.r,-this.$c,-this.bd,t),this.$l=!0),this.sb=0),k!=t)?(this.We=t,this.ak=t.x,this.bk=t.y,this.i.Ol(this.r,t)):r&&(c=this.i.Pe(this.r))&&(this.i.Ol(this.r,
c),0!==b&&(0<b?this.i.tg(this.r,-this.zk,-this.Ak):this.i.tg(this.r,this.zk,this.Ak)),this.i.tg(this.r,-this.$c,-this.bd)):g||(this.Fm=!0);if(t&&s||!t&&this.ct&&g&&this.Fm&&!this.Lm)k=this.r.x,r=this.r.y,this.r.x-=this.$c,this.r.y-=this.bd,this.r.ea(),this.i.Pe(this.r)?s=!1:(this.Ek=this.$t,this.i.trigger(ef.prototype.W.RB,this.r),this.$f=2,this.sb=-this.nn,s=!0,t?this.rl=!0:this.Lm=!0),this.r.x=k,this.r.y=r,this.r.ea();t||(g&&0<this.Ek?(this.sb=-this.nn,this.Ek-=a):(this.We=null,this.sb+=this.Ph*
a,this.sb>this.Qq&&(this.sb=this.Qq)),s&&(this.rl=!0));this.$l=!!t;q==h&&(0>this.La?(this.La+=this.Jg*a,0<this.La&&(this.La=0)):0<this.La&&(this.La-=this.Jg*a,0>this.La&&(this.La=0)));q&&!h&&(this.La=0<this.La?this.La-(this.Eg+this.Jg)*a:this.La-this.Eg*a);h&&!q&&(this.La=0>this.La?this.La+(this.Eg+this.Jg)*a:this.La+this.Eg*a);this.La>this.Fl?this.La=this.Fl:this.La<-this.Fl&&(this.La=-this.Fl);q=!1;0!==this.La&&(k=this.r.x,r=this.r.y,b=this.La*a*this.zk,c=this.La*a*this.Ak,this.r.x+=this.zk*(1<
this.La?1:-1)-this.$c,this.r.y+=this.Ak*(1<this.La?1:-1)-this.bd,this.r.ea(),g=!1,m=this.i.Pe(this.r),this.r.x=k+b,this.r.y=r+c,this.r.ea(),h=this.i.Pe(this.r),!h&&t&&(h=this.i.nj(this.r))&&(this.r.x=k,this.r.y=r,this.r.ea(),this.i.Qf(this.r,h)?(h=null,g=!1):g=!0,this.r.x=k+b,this.r.y=r+c,this.r.ea()),h?(b=Math.abs(this.La*a)+2,m||!this.i.tg(this.r,-this.$c,-this.bd,b,g,h))?(this.i.Ol(this.r,h),b=Math.max(Math.abs(this.La*a*2.5),30),this.i.tg(this.r,this.zk*(0>this.La?1:-1),this.Ak*(0>this.La?1:-1),
b,!1)?!t||g||this.Qp||(k=this.r.x,r=this.r.y,this.r.x+=this.$c,this.r.y+=this.bd,this.i.Pe(this.r)?this.i.tg(this.r,-this.$c,-this.bd,3,!1)||(this.r.x=k,this.r.y=r,this.r.ea()):(this.r.x=k,this.r.y=r,this.r.ea())):(this.r.x=k,this.r.y=r,this.r.ea()),g||(this.La=0)):!m&&!s&&Math.abs(this.sb)<Math.abs(this.nn/4)&&(this.sb=0,t||(q=!0)):(k=this.ny(),t&&!k?(c=Math.ceil(Math.abs(this.La*a))+2,k=this.r.x,r=this.r.y,this.r.x+=this.$c*c,this.r.y+=this.bd*c,this.r.ea(),this.i.Pe(this.r)||this.i.nj(this.r)?
this.i.tg(this.r,-this.$c,-this.bd,c+2,!0):(this.r.x=k,this.r.y=r,this.r.ea())):k&&0===this.sb&&this.i.kv(this.r,-this.$c,-this.bd,k)));if(0!==this.sb){k=this.r.x;r=this.r.y;this.r.x+=this.sb*a*this.$c;this.r.y+=this.sb*a*this.bd;b=this.r.x;h=this.r.y;this.r.ea();c=this.i.Pe(this.r);g=!1;if(!c&&0<this.sb&&!t){if((g=0<this.bl?null:this.i.nj(this.r,!0))&&g.length){if(this.zo){this.r.x=k;this.r.y=r;this.r.ea();n=m=0;for(l=g.length;m<l;m++)g[n]=g[m],this.i.Qf(this.r,g[m])||n++;g.length=n;this.r.x=b;this.r.y=
h;this.r.ea()}1<=g.length&&(c=g[0])}g=!!c}c&&(this.i.Ol(this.r,c),this.Ek=0,b=g?Math.abs(this.sb*a*2.5+10):Math.max(Math.abs(this.sb*a*2.5+10),30),this.i.tg(this.r,this.$c*(0>this.sb?1:-1),this.bd*(0>this.sb?1:-1),b,g,c)?(this.We=c,this.ak=c.x,this.bk=c.y,(this.Qp=g)&&(q=!0),this.sb=0):(this.r.x=k,this.r.y=r,this.r.ea(),this.$l=!0,g||(this.sb=0)))}3!==this.$f&&0<this.sb&&!t&&(this.i.trigger(ef.prototype.W.OB,this.r),this.$f=3);if(t||q)3===this.$f||q||s&&0===this.sb?(this.i.trigger(ef.prototype.W.SB,
this.r),this.$f=0===this.La&&0===this.sb?0:1):(0!==this.$f&&0===this.La&&0===this.sb&&(this.i.trigger(ef.prototype.W.XB,this.r),this.$f=0),1===this.$f||0===this.La&&0===this.sb||s||(this.i.trigger(ef.prototype.W.VB,this.r),this.$f=1));0<this.bl&&this.bl--;this.zo=this.i.nj(this.r)}};a.prototype.RB=function(){return!0};a.prototype.OB=function(){return!0};a.prototype.XB=function(){return!0};a.prototype.VB=function(){return!0};a.prototype.SB=function(){return!0};c.W=new a;c.Lc=new function(){};c.Ce=
new function(){}})();function ff(a){this.i=a;this.Cv=this.Ar=this.lo=this.Bv=0}
(function(){var a=ff.prototype;a.vc=function(a){this.behavior=a;this.i=a.i};a.vc.prototype.lb=function(){};a.Xb=function(a,c){this.type=a;this.behavior=a.behavior;this.r=c;this.i=a.i};var c=a.Xb.prototype;c.lb=function(){this.enabled=0!==this.V[0]};c.Fd=function(){return{smg:this.behavior.Bv,ss:this.behavior.lo,se:this.behavior.Ar,smd:this.behavior.Cv}};c.fe=function(a){this.behavior.Bv=a.smg;this.behavior.lo=a.ss;this.behavior.Ar=a.se;this.behavior.Cv=a.smd};c.tc=function(){};c.qo=function(){if(this.enabled){var a=
this.behavior.Tq.wg(),c=0,e=0,f,h,g,m=0;f=0;for(h=a.length;f<h;f++){a:{g=a[f];for(var l=void 0,n=void 0,k=void 0,l=0,n=g.Ea.length;l<n;++l)if(k=g.Ea[l],k.behavior instanceof ff){g=k;break a}g=null}g&&g.enabled&&(c+=a[f].x,e+=a[f].y,++m)}a=this.r.H.yb;h=this.i.He.mb;g=f=0;h>=this.behavior.lo&&h<this.behavior.Ar&&(f=this.behavior.Bv*Math.min(this.i.ni,1),0===this.behavior.Cv&&(f*=1-(h-this.behavior.lo)/(this.behavior.Ar-this.behavior.lo)),h=Math.random()*Math.PI*2,g=Math.random()*f,f=Math.cos(h)*g,
g*=Math.sin(h));a.xv(c/m+f);a.yv(e/m+g)}};a.Lc=new function(){}})();function fc(a){this.i=a}(function(){function a(){}var c=fc.prototype;c.vc=function(a){this.behavior=a;this.i=a.i};c.vc.prototype.lb=function(){};c.Xb=function(a,b){this.type=a;this.behavior=a.behavior;this.r=b;this.i=a.i};var b=c.Xb.prototype;b.lb=function(){this.r.da.solidEnabled=0!==this.V[0]};b.tc=function(){};a.prototype.es=function(){return this.r.da.solidEnabled};c.W=new a;c.Lc=new function(){}})();
function ec(){return[hc,ic,gc,jc,kc,fc,df,ff,ef,lc,gc.prototype.W.IB,gc.prototype.Lc.cC,B.prototype.Lc.qC,gc.prototype.Lc.Id,B.prototype.Lc.tB,gc.prototype.W.wB,B.prototype.W.uw,hc.prototype.Lc.lC,hc.prototype.Lc.Lw,ic.prototype.W.sw,hc.prototype.Lc.Play]};
