// Generated by Construct 2, the HTML5 game and app creator :: http://www.scirra.com
'use strict';var r,ba,ca,ea,fa,ga,ha,ia,ja,ka,la,ma,na,pa,ra,sa,ta,ua,va,xa,Aa,Ba,Ca,Da,Ea,v,Fa,Ga,Ia,Ja,Ka,La,Na,Oa,Pa,Qa,Ra,Sa,Ta,Ua,Va,Wa,Xa,Ya,Za,$a,ab,bb,cb,db,eb,fb,gb,hb,jb,kb,lb,mb,nb,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,yb,zb,Ab,Bb,Gb,Hb,Ib,Jb,Kb,Lb,Mb,Nb,Ob,Pb,Qb,Rb,Sb,Tb,Ub,Vb,Wb,Xb,Yb,Zb,$b,ac,bc,cc={},dc={};"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,e){this.set(a,b,c,e)}function c(){this.ud=this.td=this.wd=this.vd=this.Hd=this.Gd=this.fc=this.ec=0}function b(a,b,c,e){a<b?c<e?(s=a<c?a:c,t=b>e?b:e):(s=a<e?a:e,t=b>c?b:c):c<e?(s=b<c?b:c,t=a>e?a:e):(s=b<e?b:e,t=a>c?a:c)}function d(){this.items=this.fg=null;this.Zk=0;C&&(this.fg=new Set);this.Gl=[];this.ri=!0}function f(a){F[H++]=a}function k(){this.kb=this.Gq=this.y=this.r=0}function e(a){this.rc=[];this.vo=this.xo=this.yo=this.wo=0;this.Mo=null;this.Jn(a)}function g(a,
b){this.Nr=a;this.Mr=b;this.cells={}}function l(a,b){this.Nr=a;this.Mr=b;this.cells={}}function n(a,b,c){var e;return E.length?(e=E.pop(),e.Es=a,e.x=b,e.y=c,e):new ba(a,b,c)}function h(a,b,c){this.Es=a;this.x=b;this.y=c;this.$c=new ca}function m(a,b,c){var e;return I.length?(e=I.pop(),e.Es=a,e.x=b,e.y=c,e):new ea(a,b,c)}function q(a,b,c){this.Es=a;this.x=b;this.y=c;this.$c=[];this.Xk=!0;this.Qg=new ca;this.hm=!1}function p(a,b){return a.lg-b.lg}fa=function(a){window.console&&window.console.log&&window.console.log(a)};
ga=function(a){window.console&&window.console.error&&window.console.error(a)};ha=function(a){return"undefined"===typeof a};ia=function(a){return"number"===typeof a};ja=function(a){return"string"===typeof a};ka=function(a){return 0<a&&0===(a-1&a)};la=function(a){--a;for(var b=1;32>b;b<<=1)a|=a>>b;return a+1};ma=function(a){return 0>a?-a:a};na=function(a,b){return a<b?a:b};pa=Math.PI;ra=function(a){return 0<=a?a|0:(a|0)-1};sa=function(a){var b=a|0;return b===a?b:b+1};ta=function(a,b,c,e,d,u,g,k){var m,
h,A,l;a<c?(h=a,m=c):(h=c,m=a);d<g?(l=d,A=g):(l=g,A=d);if(m<l||h>A)return!1;b<e?(h=b,m=e):(h=e,m=b);u<k?(l=u,A=k):(l=k,A=u);if(m<l||h>A)return!1;m=d-a+g-c;h=u-b+k-e;a=c-a;b=e-b;d=g-d;u=k-u;k=ma(b*d-u*a);return ma(d*h-u*m)>k?!1:ma(a*h-b*m)<=k};a.prototype.set=function(a,b,c,e){this.left=a;this.top=b;this.right=c;this.bottom=e};a.prototype.Oo=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.LD=function(a){return!(a.right<this.left||a.bottom<this.top||a.left>this.right||a.top>this.bottom)};a.prototype.MD=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.Pd=function(a,b){return a>=this.left&&a<=this.right&&b>=this.top&&b<=this.bottom};a.prototype.$o=function(a){return this.left===a.left&&this.top===a.top&&this.right===a.right&&this.bottom===a.bottom};ua=a;c.prototype.In=function(a){this.ec=a.left;this.fc=a.top;this.Gd=a.right;this.Hd=a.top;this.vd=a.right;this.wd=a.bottom;this.td=a.left;this.ud=a.bottom};c.prototype.Qy=function(a,b){if(0===b)this.In(a);else{var c=Math.sin(b),e=Math.cos(b),
d=a.left*c,u=a.top*c,g=a.right*c,c=a.bottom*c,k=a.left*e,m=a.top*e,h=a.right*e,e=a.bottom*e;this.ec=k-u;this.fc=m+d;this.Gd=h-u;this.Hd=m+g;this.vd=h-c;this.wd=e+g;this.td=k-c;this.ud=e+d}};c.prototype.offset=function(a,b){this.ec+=a;this.fc+=b;this.Gd+=a;this.Hd+=b;this.vd+=a;this.wd+=b;this.td+=a;this.ud+=b;return this};var s=0,t=0;c.prototype.jw=function(a){b(this.ec,this.Gd,this.vd,this.td);a.left=s;a.right=t;b(this.fc,this.Hd,this.wd,this.ud);a.top=s;a.bottom=t};c.prototype.Pd=function(a,b){var c=
this.Gd-this.ec,e=this.Hd-this.fc,d=this.vd-this.ec,u=this.wd-this.fc,g=a-this.ec,k=b-this.fc,m=c*c+e*e,h=c*d+e*u,e=c*g+e*k,A=d*d+u*u,l=d*g+u*k,f=1/(m*A-h*h),c=(A*e-h*l)*f,m=(m*l-h*e)*f;if(0<=c&&0<m&&1>c+m)return!0;c=this.td-this.ec;e=this.ud-this.fc;m=c*c+e*e;h=c*d+e*u;e=c*g+e*k;f=1/(m*A-h*h);c=(A*e-h*l)*f;m=(m*l-h*e)*f;return 0<=c&&0<m&&1>c+m};c.prototype.oi=function(a,b){if(b)switch(a){case 0:return this.ec;case 1:return this.Gd;case 2:return this.vd;case 3:return this.td;case 4:return this.ec;
default:return this.ec}else switch(a){case 0:return this.fc;case 1:return this.Hd;case 2:return this.wd;case 3:return this.ud;case 4:return this.fc;default:return this.fc}};c.prototype.Qi=function(){return(this.ec+this.Gd+this.vd+this.td)/4};c.prototype.Ri=function(){return(this.fc+this.Hd+this.wd+this.ud)/4};c.prototype.$w=function(a){var b=a.Qi(),c=a.Ri();if(this.Pd(b,c))return!0;b=this.Qi();c=this.Ri();if(a.Pd(b,c))return!0;var e,d,u,g,k,m,h,A;for(h=0;4>h;h++)for(A=0;4>A;A++)if(b=this.oi(h,!0),
c=this.oi(h,!1),e=this.oi(h+1,!0),d=this.oi(h+1,!1),u=a.oi(A,!0),g=a.oi(A,!1),k=a.oi(A+1,!0),m=a.oi(A+1,!1),ta(b,c,e,d,u,g,k,m))return!0;return!1};va=c;xa=function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a};Aa=function(a,b){var c,e;b=ra(b);if(!(0>b||b>=a.length)){c=b;for(e=a.length-1;c<e;c++)a[c]=a[c+1];a.length=e}};Ba=function(a,b){a.length=b.length;var c,e;c=0;for(e=b.length;c<e;c++)a[c]=b[c]};Ca=function(a,b){a.push.apply(a,b)};Da=function(a,b){var c,e;c=0;for(e=a.length;c<
e;++c)if(a[c]===b)return c;return-1};Ea=function(a,b){var c=Da(a,b);-1!==c&&Aa(a,c)};v=function(a){return a/(180/pa)};Fa=function(a){return 180/pa*a};Ga=function(a){a%=360;0>a&&(a+=360);return a};Ia=function(a){a%=2*pa;0>a&&(a+=2*pa);return a};Ja=function(a){return Ga(Fa(a))};Ka=function(a){return Ia(v(a))};La=function(a,b,c,e){return Math.atan2(e-b,c-a)};Na=function(a,b){if(a===b)return 0;var c=Math.sin(a),e=Math.cos(a),d=Math.sin(b),u=Math.cos(b),c=c*d+e*u;return 1<=c?0:-1>=c?pa:Math.acos(c)};Oa=
function(a,b,c){var e=Math.sin(a),d=Math.cos(a),u=Math.sin(b),g=Math.cos(b);return Math.acos(e*u+d*g)>c?0<d*u-e*g?Ia(a+c):Ia(a-c):Ia(b)};Pa=function(a,b){var c=Math.sin(a),e=Math.cos(a),d=Math.sin(b),u=Math.cos(b);return 0>=e*d-c*u};Qa=function(a,b,c,e,d,u){if(0===c)return u?a:b;var g=Math.sin(c);c=Math.cos(c);a-=e;b-=d;var k=a*g;a=a*c-b*g;b=b*c+k;return u?a+e:b+d};Ra=function(a,b,c,e){a=c-a;b=e-b;return Math.sqrt(a*a+b*b)};Sa=function(a,b){return!a!==!b};Ta=function(a){for(var b in a)if(a.hasOwnProperty(b))return!0;
return!1};Ua=function(a){for(var b in a)a.hasOwnProperty(b)&&delete a[b]};var w=+new Date;Va=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()-w};var z=!1,u=z=!1,A=!1;"undefined"!==typeof window&&(z=/chrome/i.test(navigator.userAgent)||/chromium/i.test(navigator.userAgent),
z=!z&&/safari/i.test(navigator.userAgent),u=/(iphone|ipod|ipad)/i.test(navigator.userAgent),A=window.c2ejecta);var C=!z&&!A&&!u&&"undefined"!==typeof Set&&"undefined"!==typeof Set.prototype.forEach;d.prototype.contains=function(a){return this.Dh()?!1:C?this.fg.has(a):this.items&&this.items.hasOwnProperty(a)};d.prototype.add=function(a){if(C)this.fg.has(a)||(this.fg.add(a),this.ri=!1);else{var b=a.toString(),c=this.items;c?c.hasOwnProperty(b)||(c[b]=a,this.Zk++,this.ri=!1):(this.items={},this.items[b]=
a,this.Zk=1,this.ri=!1)}};d.prototype.remove=function(a){if(!this.Dh())if(C)this.fg.has(a)&&(this.fg["delete"](a),this.ri=!1);else if(this.items){a=a.toString();var b=this.items;b.hasOwnProperty(a)&&(delete b[a],this.Zk--,this.ri=!1)}};d.prototype.clear=function(){this.Dh()||(C?this.fg.clear():(this.items=null,this.Zk=0),this.Gl.length=0,this.ri=!0)};d.prototype.Dh=function(){return 0===this.count()};d.prototype.count=function(){return C?this.fg.size:this.Zk};var F=null,H=0;d.prototype.DF=function(){if(!this.ri){if(C)this.Gl.length=
this.fg.size,F=this.Gl,H=0,this.fg.forEach(f),F=null,H=0;else{var a=this.Gl;a.length=this.Zk;var b,c=0,e=this.items;if(e)for(b in e)e.hasOwnProperty(b)&&(a[c++]=e[b])}this.ri=!0}};d.prototype.kg=function(){this.DF();return this.Gl};ca=d;new ca;Wa=function(a,b){C?Xa(a,b.fg):Ya(a,b.kg())};Xa=function(a,b){var c,e,d,u;e=c=0;for(d=a.length;c<d;++c)u=a[c],b.has(u)||(a[e++]=u);a.length=e};Ya=function(a,b){var c,e,d,u;e=c=0;for(d=a.length;c<d;++c)u=a[c],-1===Da(b,u)&&(a[e++]=u);a.length=e};k.prototype.add=
function(a){this.y=a-this.r;this.Gq=this.kb+this.y;this.r=this.Gq-this.kb-this.y;this.kb=this.Gq};k.prototype.reset=function(){this.kb=this.Gq=this.y=this.r=0};Za=k;$a=function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")};e.prototype.Jn=function(a){this.By=a;this.Ze=a.length/2;this.rc.length=a.length;this.Fo=this.Go=-1;this.mw=0};e.prototype.Pj=function(){return!this.By.length};e.prototype.lb=function(){for(var a=this.rc,b=a[0],c=b,e=a[1],d=e,u,g,k=1,m=this.Ze;k<m;++k)g=2*k,u=a[g],g=a[g+
1],u<b&&(b=u),u>c&&(c=u),g<e&&(e=g),g>d&&(d=g);this.wo=b;this.xo=c;this.yo=e;this.vo=d};e.prototype.In=function(a,b,c){this.rc.length=8;this.Ze=4;var e=this.rc;e[0]=a.left-b;e[1]=a.top-c;e[2]=a.right-b;e[3]=a.top-c;e[4]=a.right-b;e[5]=a.bottom-c;e[6]=a.left-b;e[7]=a.bottom-c;this.Go=a.right-a.left;this.Fo=a.bottom-a.top;this.lb()};e.prototype.Al=function(a,b,c,e,d){this.rc.length=8;this.Ze=4;var u=this.rc;u[0]=a.ec-b;u[1]=a.fc-c;u[2]=a.Gd-b;u[3]=a.Hd-c;u[4]=a.vd-b;u[5]=a.wd-c;u[6]=a.td-b;u[7]=a.ud-
c;this.Go=e;this.Fo=d;this.lb()};e.prototype.Py=function(a){this.Ze=a.Ze;Ba(this.rc,a.rc);this.wo=a.wo;this.yo-a.yo;this.xo=a.xo;this.vo=a.vo};e.prototype.wj=function(a,b,c){if(this.Go!==a||this.Fo!==b||this.mw!==c){this.Go=a;this.Fo=b;this.mw=c;var e,d,u,g,k,m=0,h=1,A=this.By,l=this.rc;0!==c&&(m=Math.sin(c),h=Math.cos(c));c=0;for(u=this.Ze;c<u;c++)e=2*c,d=e+1,g=A[e]*a,k=A[d]*b,l[e]=g*h-k*m,l[d]=k*h+g*m;this.lb()}};e.prototype.Pd=function(a,b){var c=this.rc;if(a===c[0]&&b===c[1])return!0;var e,d,
u,g=this.Ze,k=this.wo-110,m=this.yo-101,h=this.xo+131,A=this.vo+120,l,f,n=0,q=0;for(e=0;e<g;e++)d=2*e,u=(e+1)%g*2,l=c[d],d=c[d+1],f=c[u],u=c[u+1],ta(k,m,a,b,l,d,f,u)&&n++,ta(h,A,a,b,l,d,f,u)&&q++;return 1===n%2||1===q%2};e.prototype.Jm=function(a,b,c){var e=a.rc,d=this.rc;if(this.Pd(e[0]+b,e[1]+c)||a.Pd(d[0]-b,d[1]-c))return!0;var u,g,k,m,h,A,l,f,n,q,p,C;u=0;for(m=this.Ze;u<m;u++)for(g=2*u,k=(u+1)%m*2,f=d[g],g=d[g+1],n=d[k],q=d[k+1],k=0,l=a.Ze;k<l;k++)if(h=2*k,A=(k+1)%l*2,p=e[h]+b,h=e[h+1]+c,C=e[A]+
b,A=e[A+1]+c,ta(f,g,n,q,p,h,C,A))return!0;return!1};ab=e;g.prototype.Ai=function(a,b,c){var e;e=this.cells[a];return e?(e=e[b])?e:c?(e=n(this,a,b),this.cells[a][b]=e):null:c?(e=n(this,a,b),this.cells[a]={},this.cells[a][b]=e):null};g.prototype.Je=function(a){return ra(a/this.Nr)};g.prototype.Ke=function(a){return ra(a/this.Mr)};g.prototype.update=function(a,b,c){var e,d,u,g,k;if(b)for(e=b.left,d=b.right;e<=d;++e)for(u=b.top,g=b.bottom;u<=g;++u)if(!c||!c.Pd(e,u))if(k=this.Ai(e,u,!1))k.remove(a),k.Dh()&&
(k.$c.clear(),1E3>E.length&&E.push(k),this.cells[e][u]=null);if(c)for(e=c.left,d=c.right;e<=d;++e)for(u=c.top,g=c.bottom;u<=g;++u)b&&b.Pd(e,u)||this.Ai(e,u,!0).Ms(a)};g.prototype.rq=function(a,b){var c,e,d,u,g,k;c=this.Je(a.left);d=this.Ke(a.top);e=this.Je(a.right);for(g=this.Ke(a.bottom);c<=e;++c)for(u=d;u<=g;++u)(k=this.Ai(c,u,!1))&&k.dump(b)};bb=g;l.prototype.Ai=function(a,b,c){var e;e=this.cells[a];return e?(e=e[b])?e:c?(e=m(this,a,b),this.cells[a][b]=e):null:c?(e=m(this,a,b),this.cells[a]={},
this.cells[a][b]=e):null};l.prototype.Je=function(a){return ra(a/this.Nr)};l.prototype.Ke=function(a){return ra(a/this.Mr)};l.prototype.update=function(a,b,c){var e,d,u,g,k;if(b)for(e=b.left,d=b.right;e<=d;++e)for(u=b.top,g=b.bottom;u<=g;++u)if(!c||!c.Pd(e,u))if(k=this.Ai(e,u,!1))k.remove(a),k.Dh()&&(k.reset(),1E3>I.length&&I.push(k),this.cells[e][u]=null);if(c)for(e=c.left,d=c.right;e<=d;++e)for(u=c.top,g=c.bottom;u<=g;++u)b&&b.Pd(e,u)||this.Ai(e,u,!0).Ms(a)};l.prototype.rq=function(a,b,c,e,d){var u,
g;a=this.Je(a);b=this.Ke(b);c=this.Je(c);for(u=this.Ke(e);a<=c;++a)for(e=b;e<=u;++e)(g=this.Ai(a,e,!1))&&g.dump(d)};l.prototype.uE=function(a){var b,c,e,d,u;b=a.left;e=a.top;c=a.right;for(d=a.bottom;b<=c;++b)for(a=e;a<=d;++a)if(u=this.Ai(b,a,!1))u.Xk=!1};cb=l;var E=[];h.prototype.Dh=function(){return this.$c.Dh()};h.prototype.Ms=function(a){this.$c.add(a)};h.prototype.remove=function(a){this.$c.remove(a)};h.prototype.dump=function(a){Ca(a,this.$c.kg())};ba=h;var I=[];q.prototype.Dh=function(){if(!this.$c.length)return!0;
if(this.$c.length>this.Qg.count())return!1;this.qs();return!0};q.prototype.Ms=function(a){this.Qg.contains(a)?(this.Qg.remove(a),this.Qg.Dh()&&(this.hm=!1)):this.$c.length?(this.$c[this.$c.length-1].Bg()>a.Bg()&&(this.Xk=!1),this.$c.push(a)):(this.$c.push(a),this.Xk=!0)};q.prototype.remove=function(a){this.Qg.add(a);this.hm=!0;30<=this.Qg.count()&&this.qs()};q.prototype.qs=function(){this.hm&&(this.Qg.count()===this.$c.length?this.reset():(Wa(this.$c,this.Qg),this.Qg.clear(),this.hm=!1))};q.prototype.zC=
function(){this.Xk||(this.$c.sort(p),this.Xk=!0)};q.prototype.reset=function(){this.$c.length=0;this.Xk=!0;this.Qg.clear();this.hm=!1};q.prototype.dump=function(a){this.qs();this.zC();this.$c.length&&a.push(this.$c)};ea=q;var x="lighter xor copy destination-over source-in destination-in source-out destination-out source-atop destination-atop".split(" ");db=function(a){return 0>=a||11<=a?"source-over":x[a-1]};eb=function(a,b,c){if(c)switch(a.Ed=c.ONE,a.xd=c.ONE_MINUS_SRC_ALPHA,b){case 1:a.Ed=c.ONE;
a.xd=c.ONE;break;case 3:a.Ed=c.ONE;a.xd=c.ZERO;break;case 4:a.Ed=c.ONE_MINUS_DST_ALPHA;a.xd=c.ONE;break;case 5:a.Ed=c.DST_ALPHA;a.xd=c.ZERO;break;case 6:a.Ed=c.ZERO;a.xd=c.SRC_ALPHA;break;case 7:a.Ed=c.ONE_MINUS_DST_ALPHA;a.xd=c.ZERO;break;case 8:a.Ed=c.ZERO;a.xd=c.ONE_MINUS_SRC_ALPHA;break;case 9:a.Ed=c.DST_ALPHA;a.xd=c.ONE_MINUS_SRC_ALPHA;break;case 10:a.Ed=c.ONE_MINUS_DST_ALPHA,a.xd=c.SRC_ALPHA}};fb=function(a){return Math.round(1E6*a)/1E6};gb=function(a,b){return"string"!==typeof a||"string"!==
typeof b||a.length!==b.length?!1:a===b?!0:a.toLowerCase()===b.toLowerCase()};hb=function(a){a=a.target;return!a||a===document||a===window||document&&document.body&&a===document.body||gb(a.tagName,"canvas")?!0:!1}})();var ec="undefined"!==typeof Float32Array?Float32Array:Array;function fc(a){var c=new ec(3);a&&(c[0]=a[0],c[1]=a[1],c[2]=a[2]);return c}
function gc(a){var c=new ec(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 hc(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 ic(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 jc(a,c,b,d){d||(d=gc());var f,k,e,g,l,n,h,m,q=a[0],p=a[1];a=a[2];k=b[0];e=b[1];f=b[2];b=c[1];n=c[2];q===c[0]&&p===b&&a===n?(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=q-c[0],n=p-c[1],h=a-c[2],m=1/Math.sqrt(b*b+n*n+h*h),b*=m,n*=m,h*=m,c=e*h-f*n,f=f*b-k*h,k=k*n-e*b,(m=Math.sqrt(c*c+f*f+k*k))?(m=1/m,c*=m,f*=m,k*=m):k=f=c=0,e=n*k-h*f,g=h*c-b*k,l=b*f-n*c,(m=Math.sqrt(e*e+g*g+l*l))?(m=1/m,e*=m,g*=m,l*=m):l=g=e=0,
d[0]=c,d[1]=e,d[2]=b,d[3]=0,d[4]=f,d[5]=g,d[6]=n,d[7]=0,d[8]=k,d[9]=l,d[10]=h,d[11]=0,d[12]=-(c*q+f*p+k*a),d[13]=-(e*q+g*p+l*a),d[14]=-(b*q+n*p+h*a),d[15]=1)}
(function(){function a(a){this.Fi=/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent);this.height=this.width=0;this.nw=fc([0,0,100]);this.ux=fc([0,0,0]);this.nz=fc([0,1,0]);this.Wu=fc([1,1,1]);this.zw=!0;this.Lt=gc();this.wf=gc();this.kx=gc();this.Zr=gc();this.W=a;this.Ww()}function c(a,b,c){this.W=a;this.Kn=b;this.name=c;this.sf=a.getAttribLocation(b,"aPos");this.Ki=a.getAttribLocation(b,"aTex");this.rx=a.getUniformLocation(b,"matP");this.Op=a.getUniformLocation(b,"matMV");this.dl=
a.getUniformLocation(b,"opacity");this.tx=a.getUniformLocation(b,"samplerFront");this.$m=a.getUniformLocation(b,"samplerBack");this.Vj=a.getUniformLocation(b,"destStart");this.Uj=a.getUniformLocation(b,"destEnd");this.nt=a.getUniformLocation(b,"seconds");this.mt=a.getUniformLocation(b,"pixelWidth");this.lt=a.getUniformLocation(b,"pixelHeight");this.Zm=a.getUniformLocation(b,"layerScale");this.Ym=a.getUniformLocation(b,"layerAngle");this.bn=a.getUniformLocation(b,"viewOrigin");this.an=a.getUniformLocation(b,
"scrollPos");this.GD=!!(this.mt||this.lt||this.nt||this.$m||this.Vj||this.Uj||this.Zm||this.Ym||this.bn||this.an);this.Dx=this.Ex=-999;this.Qp=1;this.zx=this.yx=0;this.Bx=this.xx=this.wx=1;this.Gx=this.Fx=this.Ix=this.Hx=this.Ax=0;this.Zs=[];this.Cx=gc();this.dl&&a.uniform1f(this.dl,1);this.tx&&a.uniform1i(this.tx,0);this.$m&&a.uniform1i(this.$m,1);this.Vj&&a.uniform2f(this.Vj,0,0);this.Uj&&a.uniform2f(this.Uj,1,1);this.Zm&&a.uniform1f(this.Zm,1);this.Ym&&a.uniform1f(this.Ym,0);this.bn&&a.uniform2f(this.bn,
0,0);this.an&&a.uniform2f(this.an,0,0);this.Jj=!1}function b(a,b){this.type=a;this.Z=b;this.W=b.W;this.Cg=this.Bf=this.iy=0;this.nb=this.hg=null;this.Ry=[]}a.prototype.Ww=function(){var a=this.W,b;this.lx=1;this.Qj=this.Ii=null;this.So=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.mx=a.ONE;this.jx=a.ONE_MINUS_SRC_ALPHA;this.du=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,this.du);this.Wn=
Array(4);this.Pn=Array(4);for(b=0;4>b;b++)this.Wn[b]=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,this.Wn[b]),this.Pn[b]=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,this.Pn[b]);this.rh=0;this.JD=a.createBuffer();a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.JD);this.Tu=new Float32Array(16E3);this.Bu=new Float32Array(16E3);this.OE=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.eu=this.eh=0;this.Qc=[];b=this.Yr({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.Qc.push(b);b=this.Yr({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.Qc.push(b);for(var f in kc)kc.hasOwnProperty(f)&&this.Qc.push(this.Yr(kc[f],
"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}",f));a.activeTexture(a.TEXTURE0);a.bindTexture(a.TEXTURE_2D,null);this.qi=[];this.nh=0;this.ve=!1;this.xw=this.Sm=-1;this.qm=null;this.$C=a.createFramebuffer();this.Gy=null;this.ej=fc([0,0,0]);this.Sx=a.getParameter(a.ALIASED_POINT_SIZE_RANGE)[1];2048<this.Sx&&
(this.Sx=2048);this.Zg(0)};c.prototype.Nu=function(a){var b=this.Cx;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])hc(a,this.Cx),this.W.uniformMatrix4fv(this.Op,!1,a)};a.prototype.Yr=function(a,b,d){var l=this.W,f=l.createShader(l.FRAGMENT_SHADER);l.shaderSource(f,a.src);l.compileShader(f);if(!l.getShaderParameter(f,l.COMPILE_STATUS))return l.deleteShader(f),
null;var h=l.createShader(l.VERTEX_SHADER);l.shaderSource(h,b);l.compileShader(h);if(!l.getShaderParameter(h,l.COMPILE_STATUS))return l.deleteShader(f),l.deleteShader(h),null;b=l.createProgram();l.attachShader(b,f);l.attachShader(b,h);l.linkProgram(b);if(!l.getProgramParameter(b,l.LINK_STATUS))return l.deleteShader(f),l.deleteShader(h),l.deleteProgram(b),null;l.useProgram(b);l.deleteShader(f);l.deleteShader(h);d=new c(l,b,d);d.hs=a.hs||0;d.js=a.js||0;d.vw=!!a.vw;d.cw=!!a.cw;d.Ka=a.Ka||[];a=0;for(f=
d.Ka.length;a<f;a++)d.Ka[a][1]=l.getUniformLocation(b,d.Ka[a][0]),d.Zs.push(0),l.uniform1f(d.Ka[a][1],0);return d};a.prototype.Bs=function(a){var b,c;b=0;for(c=this.Qc.length;b<c;b++)if(this.Qc[b].name===a)return b;return-1};a.prototype.Ay=function(a,b,c){var d=this.wf,f=this.Lt,h=[0,0,0,0,0,0,0,0];h[0]=d[0]*a+d[4]*b+d[12];h[1]=d[1]*a+d[5]*b+d[13];h[2]=d[2]*a+d[6]*b+d[14];h[3]=d[3]*a+d[7]*b+d[15];h[4]=f[0]*h[0]+f[4]*h[1]+f[8]*h[2]+f[12]*h[3];h[5]=f[1]*h[0]+f[5]*h[1]+f[9]*h[2]+f[13]*h[3];h[6]=f[2]*
h[0]+f[6]*h[1]+f[10]*h[2]+f[14]*h[3];h[7]=-h[2];0!==h[7]&&(h[7]=1/h[7],h[4]*=h[7],h[5]*=h[7],h[6]*=h[7],c[0]=(.5*h[4]+.5)*this.width,c[1]=(.5*h[5]+.5)*this.height)};a.prototype.zl=function(a,b,c){if(this.width!==a||this.height!==b||c){this.xi();this.width=a;this.height=b;this.W.viewport(0,0,a,b);b=a/b;var d=this.Lt,f;f=1*Math.tan(45*Math.PI/360);b*=f;a=-b;c=-f;d||(d=gc());var h=b-a,m=f-c;d[0]=2/h;d[1]=0;d[2]=0;d[3]=0;d[4]=0;d[5]=2/m;d[6]=0;d[7]=0;d[8]=(b+a)/h;d[9]=(f+c)/m;d[10]=-1001/999;d[11]=-1;
d[12]=0;d[13]=0;d[14]=-2E3/999;d[15]=0;jc(this.nw,this.ux,this.nz,this.wf);a=[0,0];b=[0,0];this.Ay(0,0,a);this.Ay(1,1,b);this.Wu[0]=1/(b[0]-a[0]);this.Wu[1]=-1/(b[1]-a[1]);a=0;for(b=this.Qc.length;a<b;a++)c=this.Qc[a],c.Jj=!1,c.rx&&(this.W.useProgram(c.Kn),this.W.uniformMatrix4fv(c.rx,!1,this.Lt));this.W.useProgram(this.Qc[this.Sm].Kn);this.W.bindTexture(this.W.TEXTURE_2D,null);this.W.activeTexture(this.W.TEXTURE1);this.W.bindTexture(this.W.TEXTURE_2D,null);this.W.activeTexture(this.W.TEXTURE0);this.Qj=
this.Ii=null}};a.prototype.Wg=function(){jc(this.nw,this.ux,this.nz,this.wf);ic(this.wf,this.Wu)};a.prototype.translate=function(a,b){if(0!==a||0!==b){this.ej[0]=a;this.ej[1]=b;this.ej[2]=0;var c=this.wf,d=this.ej,f=d[0],h=d[1],d=d[2];c[12]=c[0]*f+c[4]*h+c[8]*d+c[12];c[13]=c[1]*f+c[5]*h+c[9]*d+c[13];c[14]=c[2]*f+c[6]*h+c[10]*d+c[14];c[15]=c[3]*f+c[7]*h+c[11]*d+c[15]}};a.prototype.scale=function(a,b){if(1!==a||1!==b)this.ej[0]=a,this.ej[1]=b,this.ej[2]=1,ic(this.wf,this.ej)};a.prototype.pu=function(a){if(0!==
a){var b=this.wf,c,d=Math.sin(a);a=Math.cos(a);var f=b[0],h=b[1],m=b[2],q=b[3],p=b[4],s=b[5],t=b[6],w=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]=f*a+p*d;c[1]=h*a+s*d;c[2]=m*a+t*d;c[3]=q*a+w*d;c[4]=f*-d+p*a;c[5]=h*-d+s*a;c[6]=m*-d+t*a;c[7]=q*-d+w*a}};a.prototype.dh=function(){for(var a=!1,b=0;16>b;b++)if(this.kx[b]!==this.wf[b]){a=!0;break}a&&(a=this.eg(),a.type=5,a.nb?hc(this.wf,a.nb):a.nb=gc(this.wf),hc(this.wf,this.kx),this.ve=
!1)};b.prototype.iC=function(){this.W.bindTexture(this.W.TEXTURE_2D,this.hg)};b.prototype.jC=function(){var a=this.W;a.activeTexture(a.TEXTURE1);a.bindTexture(a.TEXTURE_2D,this.hg);a.activeTexture(a.TEXTURE0)};b.prototype.fC=function(){var a=this.iy,b=this.Z;b.So=a;b=b.qm;b.dl&&b.Qp!==a&&(b.Qp=a,this.W.uniform1f(b.dl,a))};b.prototype.cC=function(){this.W.drawElements(this.W.TRIANGLES,this.Cg,this.W.UNSIGNED_SHORT,2*this.Bf)};b.prototype.eC=function(){this.W.blendFunc(this.Bf,this.Cg)};b.prototype.kC=
function(){var a,b,c,d=this.Z.Qc,f=this.Z.xw;a=0;for(b=d.length;a<b;a++)c=d[a],a===f&&c.Op?(c.Nu(this.nb),c.Jj=!0):c.Jj=!1;hc(this.nb,this.Z.Zr)};b.prototype.dC=function(){var a=this.W,b=this.Z;this.hg?(b.Qj===this.hg&&(a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,null),b.Qj=null,a.activeTexture(a.TEXTURE0)),a.bindFramebuffer(a.FRAMEBUFFER,b.$C),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,this.hg,0)):(a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,
null,0),a.bindFramebuffer(a.FRAMEBUFFER,null))};b.prototype.YB=function(){var a=this.W;0===this.Bf?(a.clearColor(this.nb[0],this.nb[1],this.nb[2],this.nb[3]),a.clear(a.COLOR_BUFFER_BIT)):(a.enable(a.SCISSOR_TEST),a.scissor(this.nb[0],this.nb[1],this.nb[2],this.nb[3]),a.clearColor(0,0,0,0),a.clear(this.W.COLOR_BUFFER_BIT),a.disable(a.SCISSOR_TEST))};b.prototype.bC=function(){var a=this.W,b=this.Z,c=b.Qc[1];a.useProgram(c.Kn);!c.Jj&&c.Op&&(c.Nu(b.Zr),c.Jj=!0);a.enableVertexAttribArray(c.sf);a.bindBuffer(a.ARRAY_BUFFER,
b.du);a.vertexAttribPointer(c.sf,4,a.FLOAT,!1,0,0);a.drawArrays(a.POINTS,this.Bf/4,this.Cg);c=b.qm;a.useProgram(c.Kn);0<=c.sf&&(a.enableVertexAttribArray(c.sf),a.bindBuffer(a.ARRAY_BUFFER,b.Wn[b.rh]),a.vertexAttribPointer(c.sf,2,a.FLOAT,!1,0,0));0<=c.Ki&&(a.enableVertexAttribArray(c.Ki),a.bindBuffer(a.ARRAY_BUFFER,b.Pn[b.rh]),a.vertexAttribPointer(c.Ki,2,a.FLOAT,!1,0,0))};b.prototype.gC=function(){var a=this.W,b=this.Z,c=b.Qc[this.Bf];b.xw=this.Bf;b.qm=c;a.useProgram(c.Kn);!c.Jj&&c.Op&&(c.Nu(b.Zr),
c.Jj=!0);c.dl&&c.Qp!==b.So&&(c.Qp=b.So,a.uniform1f(c.dl,b.So));0<=c.sf&&(a.enableVertexAttribArray(c.sf),a.bindBuffer(a.ARRAY_BUFFER,b.Wn[b.rh]),a.vertexAttribPointer(c.sf,2,a.FLOAT,!1,0,0));0<=c.Ki&&(a.enableVertexAttribArray(c.Ki),a.bindBuffer(a.ARRAY_BUFFER,b.Pn[b.rh]),a.vertexAttribPointer(c.Ki,2,a.FLOAT,!1,0,0))};b.prototype.hC=function(){var a,b,c=this.Z.qm,d=this.W;a=this.nb;c.$m&&this.Z.Qj!==this.hg&&(d.activeTexture(d.TEXTURE1),d.bindTexture(d.TEXTURE_2D,this.hg),this.Z.Qj=this.hg,d.activeTexture(d.TEXTURE0));
var f=a[0];c.mt&&f!==c.Ex&&(c.Ex=f,d.uniform1f(c.mt,f));f=a[1];c.lt&&f!==c.Dx&&(c.Dx=f,d.uniform1f(c.lt,f));f=a[2];b=a[3];!c.Vj||f===c.yx&&b===c.zx||(c.yx=f,c.zx=b,d.uniform2f(c.Vj,f,b));f=a[4];b=a[5];!c.Uj||f===c.wx&&b===c.xx||(c.wx=f,c.xx=f,d.uniform2f(c.Uj,f,b));f=a[6];c.Zm&&f!==c.Bx&&(c.Bx=f,d.uniform1f(c.Zm,f));f=a[7];c.Ym&&f!==c.Ax&&(c.Ax=f,d.uniform1f(c.Ym,f));f=a[8];b=a[9];!c.bn||f===c.Hx&&b===c.Ix||(c.Hx=f,c.Ix=b,d.uniform2f(c.bn,f,b));f=a[10];b=a[11];!c.an||f===c.Fx&&b===c.Gx||(c.Fx=f,c.Gx=
b,d.uniform2f(c.an,f,b));c.nt&&d.uniform1f(c.nt,Va()/1E3);if(c.Ka.length)for(a=0,b=c.Ka.length;a<b;a++)f=this.Ry[a],f!==c.Zs[a]&&(c.Zs[a]=f,d.uniform1f(c.Ka[a][1],f))};a.prototype.eg=function(){this.nh===this.qi.length&&this.qi.push(new b(0,this));return this.qi[this.nh++]};a.prototype.xi=function(){if(0!==this.nh&&!this.W.isContextLost()){var a=this.W;0<this.eu&&(a.bindBuffer(a.ARRAY_BUFFER,this.du),a.bufferData(a.ARRAY_BUFFER,this.OE.subarray(0,this.eu),a.STREAM_DRAW),b&&0<=b.sf&&"<point>"===b.name&&
a.vertexAttribPointer(b.sf,4,a.FLOAT,!1,0,0));if(0<this.eh){var b=this.qm;a.bindBuffer(a.ARRAY_BUFFER,this.Wn[this.rh]);a.bufferData(a.ARRAY_BUFFER,this.Tu.subarray(0,this.eh),a.STREAM_DRAW);b&&0<=b.sf&&"<point>"!==b.name&&a.vertexAttribPointer(b.sf,2,a.FLOAT,!1,0,0);a.bindBuffer(a.ARRAY_BUFFER,this.Pn[this.rh]);a.bufferData(a.ARRAY_BUFFER,this.Bu.subarray(0,this.eh),a.STREAM_DRAW);b&&0<=b.Ki&&"<point>"!==b.name&&a.vertexAttribPointer(b.Ki,2,a.FLOAT,!1,0,0)}for(var c,a=0,b=this.nh;a<b;a++)switch(c=
this.qi[a],c.type){case 1:c.cC();break;case 2:c.iC();break;case 3:c.fC();break;case 4:c.eC();break;case 5:c.kC();break;case 6:c.dC();break;case 7:c.YB();break;case 8:c.bC();break;case 9:c.gC();break;case 10:c.hC();break;case 11:c.jC()}this.eu=this.eh=this.nh=0;this.ve=!1;this.rh++;4<=this.rh&&(this.rh=0)}};a.prototype.mk=function(a){if(a!==this.lx){var b=this.eg();b.type=3;this.lx=b.iy=a;this.ve=!1}};a.prototype.Fe=function(a){if(a!==this.Ii){var b=this.eg();b.type=2;this.Ii=b.hg=a;this.ve=!1}};a.prototype.Zi=
function(a,b){if(a!==this.mx||b!==this.jx){var c=this.eg();c.type=4;c.Bf=a;c.Cg=b;this.mx=a;this.jx=b;this.ve=!1}};a.prototype.My=function(){this.Zi(this.W.ONE,this.W.ONE_MINUS_SRC_ALPHA)};a.prototype.qq=function(a,b,c,d,f,h,m,q){15992<=this.eh&&this.xi();var p=this.eh,s=this.Tu,t=this.Bu;if(this.ve)this.qi[this.nh-1].Cg+=6;else{var w=this.eg();w.type=1;w.Bf=p/4*3;w.Cg=6;this.ve=!0}s[p]=a;t[p++]=0;s[p]=b;t[p++]=0;s[p]=c;t[p++]=1;s[p]=d;t[p++]=0;s[p]=f;t[p++]=1;s[p]=h;t[p++]=1;s[p]=m;t[p++]=0;s[p]=
q;t[p++]=1;this.eh=p};a.prototype.Tg=function(a,b,c,d,f,h,m,q,p){15992<=this.eh&&this.xi();var s=this.eh,t=this.Tu,w=this.Bu;if(this.ve)this.qi[this.nh-1].Cg+=6;else{var z=this.eg();z.type=1;z.Bf=s/4*3;z.Cg=6;this.ve=!0}var z=p.left,u=p.top,A=p.right;p=p.bottom;t[s]=a;w[s++]=z;t[s]=b;w[s++]=u;t[s]=c;w[s++]=A;t[s]=d;w[s++]=u;t[s]=f;w[s++]=A;t[s]=h;w[s++]=p;t[s]=m;w[s++]=z;t[s]=q;w[s++]=p;this.eh=s};a.prototype.Zg=function(a){if(this.Sm!==a){if(!this.Qc[a]){if(0===this.Sm)return;a=0}var b=this.eg();
b.type=9;this.Sm=b.Bf=a;this.ve=!1}};a.prototype.Cn=function(a){a=this.Qc[a];return!(!a.Vj&&!a.Uj)};a.prototype.hu=function(a){a=this.Qc[a];return!!(a.Vj||a.Uj||a.vw)};a.prototype.UE=function(a){a=this.Qc[a];return 0!==a.hs||0!==a.js};a.prototype.oD=function(a){return this.Qc[a].hs};a.prototype.pD=function(a){return this.Qc[a].js};a.prototype.qD=function(a,b){return this.Qc[a].Ka[b][2]};a.prototype.nq=function(a){return this.Qc[a].cw};a.prototype.yl=function(a,b,c,d,f,h,m,q,p,s,t,w,z,u){var A=this.Qc[this.Sm],
C,F;if(A.GD||u.length){C=this.eg();C.type=10;C.nb?hc(this.wf,C.nb):C.nb=gc();F=C.nb;F[0]=b;F[1]=c;F[2]=d;F[3]=f;F[4]=h;F[5]=m;F[6]=q;F[7]=p;F[8]=s;F[9]=t;F[10]=w;F[11]=z;C.hg=A.$m?a:null;if(u.length)for(c=C.Ry,c.length=u.length,a=0,b=u.length;a<b;a++)c[a]=u[a];this.ve=!1}};a.prototype.clear=function(a,b,c,d){var f=this.eg();f.type=7;f.Bf=0;f.nb||(f.nb=gc());f.nb[0]=a;f.nb[1]=b;f.nb[2]=c;f.nb[3]=d;this.ve=!1};a.prototype.clearRect=function(a,b,c,d){if(!(0>c||0>d)){var f=this.eg();f.type=7;f.Bf=1;f.nb||
(f.nb=gc());f.nb[0]=a;f.nb[1]=b;f.nb[2]=c;f.nb[3]=d;this.ve=!1}};a.prototype.TE=function(){this.xi();this.W.flush()};var d=[],f={};a.prototype.PB=function(){d.length=0;f={}};a.prototype.Lp=function(a,b,c,l){b=!!b;c=!!c;var n=a.src+","+b+","+c+(b?",undefined":""),h=null;if("undefined"!==typeof a.src&&f.hasOwnProperty(n))return h=f[n],h.Eo++,h;this.xi();var m=this.W,q=ka(a.width)&&ka(a.height),h=m.createTexture();m.bindTexture(m.TEXTURE_2D,h);m.pixelStorei(m.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);var p=
m.RGBA,s=m.RGBA,t=m.UNSIGNED_BYTE;if(l&&!this.Fi)switch(l){case 1:s=p=m.RGB;break;case 2:t=m.UNSIGNED_SHORT_4_4_4_4;break;case 3:t=m.UNSIGNED_SHORT_5_5_5_1;break;case 4:s=p=m.RGB,t=m.UNSIGNED_SHORT_5_6_5}if(!q&&b){l=document.createElement("canvas");l.width=la(a.width);l.height=la(a.height);var w=l.getContext("2d");w.webkitImageSmoothingEnabled=c;w.mozImageSmoothingEnabled=c;w.msImageSmoothingEnabled=c;w.imageSmoothingEnabled=c;w.drawImage(a,0,0,a.width,a.height,0,0,l.width,l.height);m.texImage2D(m.TEXTURE_2D,
0,p,s,t,l)}else m.texImage2D(m.TEXTURE_2D,0,p,s,t,a);b?(m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,m.REPEAT),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,m.REPEAT)):(m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,m.CLAMP_TO_EDGE),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,m.CLAMP_TO_EDGE));c?(m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.LINEAR),q&&this.zw?(m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.LINEAR_MIPMAP_LINEAR),m.generateMipmap(m.TEXTURE_2D)):m.texParameteri(m.TEXTURE_2D,
m.TEXTURE_MIN_FILTER,m.LINEAR)):(m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.NEAREST),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.NEAREST));m.bindTexture(m.TEXTURE_2D,null);this.Ii=null;h.mm=a.width;h.lm=a.height;h.Eo=1;h.lw=n;d.push(h);return f[n]=h};a.prototype.qh=function(a,b,c,f){this.xi();var n=this.W;this.Fi&&(f=!1);var h=n.createTexture();n.bindTexture(n.TEXTURE_2D,h);n.texImage2D(n.TEXTURE_2D,0,n.RGBA,a,b,0,n.RGBA,f?n.UNSIGNED_SHORT_4_4_4_4:n.UNSIGNED_BYTE,null);n.texParameteri(n.TEXTURE_2D,
n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE);n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE);n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,c?n.LINEAR:n.NEAREST);n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,c?n.LINEAR:n.NEAREST);n.bindTexture(n.TEXTURE_2D,null);this.Ii=null;h.mm=a;h.lm=b;d.push(h);return h};a.prototype.JF=function(a,b,c){this.xi();var d=this.W;this.Fi&&(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(f){console&&console.error&&console.error("Error updating WebGL texture: ",f)}d.bindTexture(d.TEXTURE_2D,null);this.Ii=null};a.prototype.deleteTexture=function(a){a&&("undefined"!==typeof a.Eo&&1<a.Eo?a.Eo--:(this.xi(),a===this.Ii&&(this.W.bindTexture(this.W.TEXTURE_2D,null),this.Ii=null),a===this.Qj&&(this.W.activeTexture(this.W.TEXTURE1),this.W.bindTexture(this.W.TEXTURE_2D,null),this.W.activeTexture(this.W.TEXTURE0),this.Qj=null),
Ea(d,a),"undefined"!==typeof a.lw&&delete f[a.lw],this.W.deleteTexture(a)))};a.prototype.Yg=function(a){if(a!==this.Gy){var b=this.eg();b.type=6;this.Gy=b.hg=a;this.ve=!1}};jb=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.pf=(this.Lm=/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.c2iscordova&&window.c2iscordova;this.zd=!!a.dc;this.Sk="undefined"!==typeof window.AppMobi||this.zd;this.of=!!window.c2cocoonjs;this.Sf=!!window.c2ejecta;this.of&&(CocoonJS.App.onSuspended.addEventListener(function(){b.setSuspended(!0)}),CocoonJS.App.onActivated.addEventListener(function(){b.setSuspended(!1)}));this.Sf&&(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.Rb=this.zd||this.of||this.Sf;this.Fi=/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent)||/iemobile/i.test(navigator.userAgent)||/edge\//i.test(navigator.userAgent);this.cx=/tizen/i.test(navigator.userAgent);this.tp=/android/i.test(navigator.userAgent)&&!this.cx&&!this.Fi;this.Ws=(/iphone/i.test(navigator.userAgent)||/ipod/i.test(navigator.userAgent))&&
!this.Fi;this.ix=/ipad/i.test(navigator.userAgent);this.yp=this.Ws||this.ix||this.Sf;this.VD=this.Ws&&/os\s6/i.test(navigator.userAgent);this.Km=(/chrome/i.test(navigator.userAgent)||/chromium/i.test(navigator.userAgent))&&!this.Fi;this.Ps=/amazonwebappplatform/i.test(navigator.userAgent);this.PD=/firefox/i.test(navigator.userAgent);this.bx=/safari/i.test(navigator.userAgent)&&!this.Km&&!this.Fi;this.SD=/windows/i.test(navigator.userAgent);this.Gi="undefined"!==typeof window.c2nodewebkit||"undefined"!==
typeof window.c2nwjs||/nodewebkit/i.test(navigator.userAgent)||/nwjs/i.test(navigator.userAgent);this.gx=!("undefined"===typeof window.c2isWindows8||!window.c2isWindows8);this.UD=!("undefined"===typeof window.c2isWindows8Capable||!window.c2isWindows8Capable);this.Uk=!("undefined"===typeof window.c2isWindowsPhone8||!window.c2isWindowsPhone8);this.Us=!("undefined"===typeof window.c2isWindowsPhone81||!window.c2isWindowsPhone81);this.dx=this.gx||this.UD||this.Us;this.OD=!("undefined"===typeof window.c2isBlackberry10||
!window.c2isBlackberry10);this.up=this.tp&&!this.Km&&!this.Lm&&!this.PD&&!this.Ps&&!this.Rb;this.devicePixelRatio=1;this.Uf=this.pf||this.Lm||this.Sk||this.of||this.tp||this.yp||this.Uk||this.Us||this.OD||this.cx||this.Sf;this.Uf||(this.Uf=/(blackberry|bb10|playbook|palm|symbian|nokia|windows\s+ce|phone|mobile|tablet|kindle|silk)/i.test(navigator.userAgent));"undefined"===typeof cr_is_preview||this.Gi||"?nw"!==window.location.search&&!/nodewebkit/i.test(navigator.userAgent)&&!/nwjs/i.test(navigator.userAgent)||
(this.Gi=!0);this.canvas=a;this.ow=document.getElementById("c2canvasdiv");this.qb=this.Z=this.W=null;this.ts="";this.fp=!1;this.cy=this.dy=0;this.canvas.oncontextmenu=function(a){a.preventDefault&&a.preventDefault();return!1};this.canvas.onselectstart=function(a){a.preventDefault&&a.preventDefault();return!1};this.zd&&(window.c2runtime=this);this.Gi&&(window.ondragover=function(a){a.preventDefault();return!1},window.ondrop=function(a){a.preventDefault();return!1},require("nw.gui").App.clearCache());
this.up&&"undefined"!==typeof jQuery&&jQuery("canvas").parents("*").css("overflow","visible");this.width=a.width;this.height=a.height;this.Ga=this.width;this.Fa=this.height;this.Qo=this.width;this.Po=this.height;this.Um=window.innerWidth;this.Tm=window.innerHeight;this.bD=!1;this.ob=!0;this.Nm=!1;Date.now||(Date.now=function(){return+new Date});this.plugins=[];this.types={};this.X=[];this.uc=[];this.ft={};this.Wf=[];this.gs={};this.xh=[];this.Il=[];this.Pq=[];this.zB=[];this.AB=[];this.Bj={};this.Qs=
this.Di=!1;this.Tf=0;this.Ss=!1;this.Pf=[];this.Gh=this.Sd=this.Ip=this.tu="";this.Mn=this.Uy=!1;this.Wr=this.cn=this.vi=this.Ba=0;this.dj=1;this.we=new Za;this.fh=new Za;this.cq=this.ip=this.tm=this.$e=this.Sj=this.ss=this.Dp=0;this.xj=null;this.Yo=[];this.es=[];this.bp=-1;this.ot=[[]];this.Ju=this.Pp=0;this.pq(null);this.um=this.Yx=this.tn=0;this.Nn=[];this.Gu=this.ju=-1;this.Yk=!0;this.Np=0;this.Mm=!1;this.qF=0;this.Ek=null;this.kd=this.Qk=!1;this.by=new ca;this.St=new ca;this.Tt=new ca;this.tq=
[];this.gg=new ab([]);this.Au=new ab([]);this.ni=[];this.Fm={};this.Hk={};this.Dk={};this.Hl={};this.iw={};this.qx=this.Hp=this.xe=this.Re=this.ox=this.Gp=this.sb=null;this.Fl=this.Vs=!1;this.us=[null,null];this.Gj=0;this.ls="";this.Ui={};this.Cq=this.cl=null;this.bq=[];this.ZE()}}function d(a){a.target.result.createObjectStore("saves",{keyPath:"slot"})}function f(a,b,c,e){var m=indexedDB.open("_C2SaveStates");m.onupgradeneeded=d;m.onerror=e;m.onsuccess=function(d){d=d.target.result;d.onerror=e;d.transaction(["saves"],
"readwrite").objectStore("saves").put({slot:a,data:b}).onsuccess=c}}function k(a,b,c){var e=indexedDB.open("_C2SaveStates");e.onupgradeneeded=d;e.onerror=c;e.onsuccess=function(d){d=d.target.result;d.onerror=c;var e=d.transaction(["saves"]).objectStore("saves").get(a);e.onsuccess=function(){e.result?b(e.result.data):b(null)}}}function e(){fa("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 ca||a[b]&&"undefined"!==typeof a[b].tg||(c[b]=a[b]);return c}b.prototype.ZE=function(){var a=this,b;b=this.Uk?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest;var c="data.js";if(this.gx||this.Uk||this.Us)c="data.json";b.open("GET",c,!0);var d=!1;if(!this.Rb&&"response"in b&&"responseType"in b)try{b.responseType="json",d="json"===b.responseType}catch(e){d=!1}if(!d&&"responseType"in b)try{b.responseType=
"text"}catch(m){}if("overrideMimeType"in b)try{b.overrideMimeType("application/json; charset=utf-8")}catch(h){}this.Uk?b.onreadystatechange=function(){4===b.readyState&&a.Kp(JSON.parse(b.responseText))}:(b.onload=function(){if(d)a.Kp(b.response);else if(a.Sf){var c=b.responseText,c=c.substr(c.indexOf("{"));a.Kp(JSON.parse(c))}else a.Kp(JSON.parse(b.responseText))},b.onerror=function(a){ga("Error requesting "+c+":");ga(a)});b.send()};b.prototype.KD=function(){var b=this,d,e,m,h,g,f,k,l,q;this.devicePixelRatio=
(this.Nj=(!this.Rb||this.Sf)&&this.FF&&!this.up)?window.devicePixelRatio||window.webkitDevicePixelRatio||window.mozDevicePixelRatio||window.msDevicePixelRatio||1:1;this.qd();e=!(!this.bD&&(!this.Gr||this.Gi||this.dx||this.Uk||this.Lm||this.pf||this.Ps));0<this.be&&this.setSize(a(),c(),!0);try{this.xC&&(this.of||this.Sf||!this.Rb)&&(d={alpha:e,depth:!1,antialias:!1,failIfMajorPerformanceCaveat:!0},this.W=this.canvas.getContext("webgl",d)||this.canvas.getContext("experimental-webgl",d))}catch(p){}if(this.W){this.Rb||
(this.md=document.createElement("canvas"),jQuery(this.md).appendTo(this.canvas.parentNode),this.md.oncontextmenu=function(){return!1},this.md.onselectstart=function(){return!1},this.md.width=this.Qo,this.md.height=this.Po,jQuery(this.md).css({width:this.Qo+"px",height:this.Po+"px"}),this.xy(),this.cu=this.md.getContext("2d"));this.Z=new jb(this.W,this.Uf);this.Z.zl(this.canvas.width,this.canvas.height);this.Z.zw=0!==this.lC;this.qb=null;this.canvas.addEventListener("webglcontextlost",function(a){a.preventDefault();
b.FE();fa("[Construct 2] WebGL context lost");window.cr_setSuspended(!0)},!1);this.canvas.addEventListener("webglcontextrestored",function(){b.Z.Ww();b.Z.zl(b.Z.width,b.Z.height,!0);b.Re=null;b.xe=null;b.us[0]=null;b.us[1]=null;b.GE();b.ob=!0;fa("[Construct 2] WebGL context restored");window.cr_setSuspended(!1)},!1);d=0;for(e=this.X.length;d<e;d++)for(g=this.X[d],m=0,h=g.ya.length;m<h;m++)k=g.ya[m],k.nd=this.Z.Bs(k.id),this.Fl=this.Fl||this.Z.Cn(k.nd);d=0;for(e=this.Wf.length;d<e;d++){l=this.Wf[d];
m=0;for(h=l.ya.length;m<h;m++)k=l.ya[m],k.nd=this.Z.Bs(k.id);m=0;for(h=l.Ha.length;m<h;m++)for(q=l.Ha[m],g=0,f=q.ya.length;g<f;g++)k=q.ya[g],k.nd=this.Z.Bs(k.id),this.Fl=this.Fl||this.Z.Cn(k.nd)}}else{if(0<this.be&&this.zd){this.canvas=null;document.oncontextmenu=function(){return!1};document.onselectstart=function(){return!1};this.qb=AppMobi.canvas.getContext("2d");try{this.qb.samplingMode=this.cb?"smooth":"sharp",this.qb.globalScale=1,this.qb.HTML5CompatibilityMode=!0,this.qb.imageSmoothingEnabled=
this.cb}catch(n){}0!==this.width&&0!==this.height&&(this.qb.width=this.width,this.qb.height=this.height)}this.qb||(d=this.of?{antialias:!!this.cb,alpha:e}:{alpha:e},this.qb=this.canvas.getContext("2d",d),this.qb.webkitImageSmoothingEnabled=this.cb,this.qb.mozImageSmoothingEnabled=this.cb,this.qb.msImageSmoothingEnabled=this.cb,this.qb.imageSmoothingEnabled=this.cb);this.cu=this.md=null}this.ez=function(a){b.dd(!1,a)};window==window.top||this.Rb||this.dx||this.Uk||(document.addEventListener("mousedown",
function(){window.focus()},!0),document.addEventListener("touchstart",function(){window.focus()},!0));"undefined"!==typeof cr_is_preview&&(this.of&&console.log("[Construct 2] In preview-over-wifi via CocoonJS mode"),-1<window.location.search.indexOf("continuous")&&(fa("Reloading for continuous preview"),this.Ip="__c2_continuouspreview",this.Mn=!0),this.ME&&!this.Uf&&(jQuery(window).focus(function(){b.setSuspended(!1)}),jQuery(window).blur(function(){b.setSuspended(!0)})));this.Rb||(d=function(a){if(hb(a)&&
document.activeElement&&document.activeElement!==document.getElementsByTagName("body")[0]&&document.activeElement.blur)try{document.activeElement.blur()}catch(b){}},window.navigator.pointerEnabled?document.addEventListener("pointerdown",d):window.navigator.msPointerEnabled?document.addEventListener("MSPointerDown",d):document.addEventListener("touchstart",d),document.addEventListener("mousedown",d));0===this.be&&this.Nj&&1<this.devicePixelRatio&&this.setSize(this.Oc,this.Nc,!0);this.jz();this.DD();
this.go();this.Y={}};b.prototype.setSize=function(a,b,c){var d=0,e=0,m=0,h=0,h=0,g=this.VD&&this.bx&&!navigator.standalone&&!this.Rb&&!this.pf;g&&(b+=60);if(this.Um!==a||this.Tm!==b||c){this.Um=a;this.Tm=b;var f=this.be,k=(document.mozFullScreen||document.webkitIsFullScreen||!!document.msFullscreenElement||document.fullScreen||this.Mm)&&!this.pf;if(k||0!==this.be||c)k&&0<this.Gj&&(f=this.Gj),c=this.devicePixelRatio,4<=f?(m=this.Oc/this.Nc,a/b>m?(m*=b,5===f?(h=m*c/this.Oc,1<h?h=Math.floor(h):1>h&&
(h=1/Math.ceil(1/h)),m=this.Oc*h/c,h=this.Nc*h/c,d=(a-m)/2,e=(b-h)/2,a=m,b=h):(d=(a-m)/2,a=m)):(h=a/m,5===f?(h=h*c/this.Nc,1<h?h=Math.floor(h):1>h&&(h=1/Math.ceil(1/h)),m=this.Oc*h/c,h=this.Nc*h/c,d=(a-m)/2,e=(b-h)/2,a=m):e=(b-h)/2,b=h),k&&!this.Gi&&(e=d=0)):this.Gi&&this.Mm&&0===this.Fw&&(d=Math.floor((a-this.Oc)/2),e=Math.floor((b-this.Nc)/2),a=this.Oc,b=this.Nc),2>f&&(this.km=c),this.Nj&&this.ix&&1<c&&(1024<=a&&(a=1023),1024<=b&&(b=1023)),this.Qo=Math.round(a),this.Po=Math.round(b),this.width=
Math.round(a*c),this.height=Math.round(b*c),this.ob=!0,this.zz?(this.Ga=this.width,this.Fa=this.height,this.nf=!0):this.width<this.Oc&&this.height<this.Nc||1===f?(this.Ga=this.width,this.Fa=this.height,this.nf=!0):(this.Ga=this.Oc,this.Fa=this.Nc,this.nf=!1,2===f?(m=this.Oc/this.Nc,f=this.Um/this.Tm,f<m?this.Ga=this.Fa*f:f>m&&(this.Fa=this.Ga/f)):3===f&&(m=this.Oc/this.Nc,f=this.Um/this.Tm,f>m?this.Ga=this.Fa*f:f<m&&(this.Fa=this.Ga/f))),this.ow&&!this.Rb&&(jQuery(this.ow).css({width:Math.round(a)+
"px",height:Math.round(b)+"px","margin-left":Math.floor(d)+"px","margin-top":Math.floor(e)+"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.Sf?(this.canvas.style.left=Math.floor(d)+"px",this.canvas.style.top=Math.floor(e)+"px",this.canvas.style.width=Math.round(a)+"px",this.canvas.style.height=Math.round(b)+"px"):this.Nj&&!this.Rb&&jQuery(this.canvas).css({width:Math.round(a)+
"px",height:Math.round(b)+"px"})),this.md&&(this.md.width=Math.round(a),this.md.height=Math.round(b),jQuery(this.md).css({width:Math.round(a)+"px",height:Math.round(b)+"px"})),this.Z&&this.Z.zl(Math.round(a*c),Math.round(b*c)),this.zd&&this.qb&&(this.qb.width=Math.round(a),this.qb.height=Math.round(b)),this.qb&&(this.qb.webkitImageSmoothingEnabled=this.cb,this.qb.mozImageSmoothingEnabled=this.cb,this.qb.msImageSmoothingEnabled=this.cb,this.qb.imageSmoothingEnabled=this.cb),this.jz(),this.Rb||!g&&
!this.Ws||window.setTimeout(function(){window.scrollTo(0,1)},100)}};b.prototype.jz=function(){if(this.DB&&0!==this.au){var a="portrait";2===this.au&&(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.FE=function(){this.Z.PB();this.Vs=
!0;var a,b,c;a=0;for(b=this.X.length;a<b;a++)c=this.X[a],c.dq&&c.dq()};b.prototype.GE=function(){this.Vs=!1;var a,b,c;a=0;for(b=this.X.length;a<b;a++)c=this.X[a],c.Zt&&c.Zt()};b.prototype.xy=function(){if(!this.Rb){var a=(document.mozFullScreen||document.webkitIsFullScreen||document.fullScreen||document.msFullscreenElement||this.Mm)&&!this.pf?jQuery(this.canvas).offset():jQuery(this.canvas).position();a.position="absolute";jQuery(this.md).css(a)}};var l=window.cancelAnimationFrame||window.mozCancelAnimationFrame||
window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||window.oCancelAnimationFrame;b.prototype.setSuspended=function(a){var b;if(a&&!this.Nm)for(fa("[Construct 2] Suspending"),this.Nm=!0,-1!==this.ju&&l&&l(this.ju),-1!==this.Gu&&clearTimeout(this.Gu),a=0,b=this.Nn.length;a<b;a++)this.Nn[a](!0);else if(!a&&this.Nm){fa("[Construct 2] Resuming");this.Nm=!1;this.Dp=Va();this.Sj=Va();a=this.cn=this.ip=0;for(b=this.Nn.length;a<b;a++)this.Nn[a](!1);this.dd(!1)}};b.prototype.xB=function(a){this.Nn.push(a)};
b.prototype.ii=function(a){return this.bq[a]};b.prototype.Kp=function(a){a&&a.project||ga("Project model unavailable");a=a.project;this.name=a[0];this.Ew=a[1];this.be=a[12];this.Fw=a[12];this.Oc=a[10];this.Nc=a[11];this.qy=this.Oc/2;this.ry=this.Nc/2;this.Rb&&!this.Sf&&(4<=a[12]||0===a[12])&&(fa("[Construct 2] Letterbox scale fullscreen modes are not supported on this platform - falling back to 'Scale outer'"),this.Fw=this.be=3);this.Su=a[18];this.Xm=a[19];0===this.Xm&&(this.cl=new Image,this.cl.src=
"loading-logo.png");this.tn=a[21];this.bq=lc();this.$g=new y(this);var b,c,d,e,m,h,g,f,k;b=0;for(c=a[2].length;b<c;b++)g=a[2][b],d=this.ii(g[0]),kb(g,d.prototype),k=new d(this),k.Bq=g[1],k.Hi=g[2],k.Vx=g[9],k.rb&&k.rb(),this.plugins.push(k);this.bq=lc();b=0;for(c=a[3].length;b<c;b++){g=a[3][b];m=this.ii(g[1]);k=null;d=0;for(e=this.plugins.length;d<e;d++)if(this.plugins[d]instanceof m){k=this.plugins[d];break}var l=new k.Tc(k);l.name=g[0];l.qa=g[2];l.Ns=g[3].slice(0);l.IF=g[3].length;l.IB=g[4];l.dD=
g[5];l.Ra=g[11];l.qa?(l.ol=[],l.yh=this.um++,l.Qb=null):(l.ol=null,l.yh=-1,l.Qb=[]);l.cp=null;l.Mk=null;l.Aw=null;l.Qe=!1;l.te=null;g[6]?(l.Cu=g[6][0],l.Du=g[6][1],l.Eu=g[6][2]):(l.Cu=null,l.Du=0,l.Eu=0);l.pe=g[7]?g[7]:null;l.index=b;l.u=[];l.Vo=[];l.aj=[new lb(l)];l.vh=0;l.jf=null;l.UB=0;l.Cl=!0;l.Qq=mb;l.Kw=nb;l.mD=ob;l.Ya=pb;l.En=qb;l.oq=rb;l.kk=sb;l.lp=tb;l.vs=ub;l.zs=vb;l.Nf=wb;l.Lw=xb;l.Ho=new bb(this.Oc,this.Nc);l.to=!0;l.uo=!1;l.Y={};l.toString=yb;l.uc=[];d=0;for(e=g[8].length;d<e;d++){f=
g[8][d];var q=this.ii(f[1]),p=null;m=0;for(h=this.uc.length;m<h;m++)if(this.uc[m]instanceof q){p=this.uc[m];break}p||(p=new q(this),p.Wx=[],p.aq=new ca,p.rb&&p.rb(),this.uc.push(p));-1===p.Wx.indexOf(l)&&p.Wx.push(l);m=new p.Tc(p,l);m.name=f[0];m.Ra=f[2];m.rb();l.uc.push(m)}l.global=g[9];l.Rs=g[10];l.ya=[];d=0;for(e=g[12].length;d<e;d++)l.ya.push({id:g[12][d][0],name:g[12][d][1],nd:-1,sd:!0,index:d});l.kH=g[13];this.Su&&!l.qa&&!l.Rs&&k.Hi||l.rb();l.name&&(this.types[l.name]=l);this.X.push(l);k.Bq&&
(d=new k.kc(l),d.uid=this.tn++,d.Cy=this.Yx++,d.Lj=0,d.Dm=zb,d.toString=Ab,d.Aa=g[14],d.rb(),l.u.push(d),this.Ui[d.uid.toString()]=d)}b=0;for(c=a[4].length;b<c;b++)for(m=a[4][b],h=this.X[m[0]],d=1,e=m.length;d<e;d++)g=this.X[m[d]],g.Qb.push(h),h.ol.push(g);b=0;for(c=a[27].length;b<c;b++){m=a[27][b];h=[];d=0;for(e=m.length;d<e;d++)h.push(this.X[m[d]]);d=0;for(e=h.length;d<e;d++)h[d].Qe=!0,h[d].te=h}if(0<this.um)for(b=0,c=this.X.length;b<c;b++)if(g=this.X[b],!g.qa&&g.Qb.length){g.cp=Array(this.um);
g.Mk=Array(this.um);g.Aw=Array(this.um);l=[];d=p=q=f=0;for(e=g.Qb.length;d<e;d++)for(k=g.Qb[d],g.cp[k.yh]=f,f+=k.IF,g.Mk[k.yh]=q,q+=k.IB,g.Aw[k.yh]=p,p+=k.dD,m=0,h=k.ya.length;m<h;m++)l.push(xa({},k.ya[m]));g.ya=l.concat(g.ya);d=0;for(e=g.ya.length;d<e;d++)g.ya[d].index=d}b=0;for(c=a[5].length;b<c;b++)g=a[5][b],d=new Bb(this,g),this.ft[d.name]=d,this.Wf.push(d);b=0;for(c=a[6].length;b<c;b++)g=a[6][b],d=new Gb(this,g),this.gs[d.name]=d,this.xh.push(d);b=0;for(c=this.xh.length;b<c;b++)this.xh[b].qc();
b=0;for(c=this.xh.length;b<c;b++)this.xh[b].Mu();b=0;for(c=this.Pq.length;b<c;b++)this.Pq[b].qc();this.Pq.length=0;this.CB=a[7];this.ls=a[8];this.Rg=a[9];this.km=1;this.xC=a[13];this.cb=a[14];this.Gr=a[15];this.FF=a[17];this.au=a[20];this.DB=0<this.au;this.ME=a[22];this.nf=this.zz=a[23];this.lC=a[24];this.RE=a[25];this.Dq=Date.now();this.bq.length=0;this.KD()};var n=!1;b.prototype.yz=function(a,b){a.cocoonLazyLoad=!0;a.onerror=function(b){n=a.kw=!0;console&&console.error&&console.error("Error loading image '"+
a.src+"': ",b)};this.Sf?a.src=b:a.src||("undefined"!==typeof XAPKReader?XAPKReader.get(b,function(b){a.src=b},function(c){n=a.kw=!0;console&&console.error&&console.error("Error extracting image '"+b+"' from expansion file: ",c)}):a.src=b);this.Il.push(a)};b.prototype.aD=function(a){var b,c;b=0;for(c=this.Il.length;b<c;b++)if(this.Il[b].QB===a)return this.Il[b];return null};var h=0,m=!1;b.prototype.DD=function(){this.Ek&&(h=this.Ek.nF(this.CB))};b.prototype.dw=function(){var a=h,b=0,c=0,d=!0,e,g,c=
0;for(e=this.Il.length;c<e;c++){g=this.Il[c];var f=g.sw;if(!f||0>=f)f=5E4;a+=f;g.src&&(g.complete||g.loaded)&&!g.kw?b+=f:d=!1}d&&this.RE&&this.Ek&&(m||(this.Ek.rF(),m=!0),c=this.Ek.nD(),b+=c,c<h&&(d=!1));this.lk=0==a?0:b/a;return d};b.prototype.go=function(){if(this.qb||this.Z){var a=this.qb||this.cu;this.md&&this.xy();this.lk=0;this.nx=-1;if(this.dw())this.ED();else{var b=Date.now()-this.Dq;if(a){var c=this.width,d=this.height,e=this.devicePixelRatio;this.md&&(c=this.Qo,d=this.Po,e=1);if(3!==this.Xm&&
(this.of||500<=b&&this.nx!=this.lk)){a.clearRect(0,0,c,d);var b=c/2,d=d/2,c=0===this.Xm&&this.cl.complete,m=40*e,h=0,g=80*e,f;c&&(g=this.cl.width*e,f=this.cl.height*e,m=g/2,h=f/2,a.drawImage(this.cl,ra(b-m),ra(d-h),g,f));1>=this.Xm?(b=ra(b-m)+.5,d=ra(d+(h+(c?12*e:0)))+.5,a.fillStyle=n?"red":"DodgerBlue",a.fillRect(b,d,Math.floor(g*this.lk),6*e),a.strokeStyle="black",a.strokeRect(b,d,g,6*e),a.strokeStyle="white",a.strokeRect(b-1*e,d-1*e,g+2*e,8*e)):2===this.Xm&&(a.font=this.Sf?"12pt ArialMT":"12pt Arial",
a.fillStyle=n?"#f00":"#999",a.jH="middle",e=Math.round(100*this.lk)+"%",c=a.measureText?a.measureText(e):null,a.fillText(e,b-(c?c.width:0)/2,d))}this.nx=this.lk}setTimeout(function(a){return function(){a.go()}}(this),this.of?10:100)}}};b.prototype.ED=function(){this.md&&(this.canvas.parentNode.removeChild(this.md),this.md=this.cu=null);this.Dq=Date.now();this.Sj=Va();var a,b,c;if(this.Su)for(a=0,b=this.X.length;a<b;a++)c=this.X[a],c.qa||c.Rs||!c.Ub.Hi||c.rb();else this.Yk=!1;a=0;for(b=this.Wf.length;a<
b;a++)this.Wf[a].RB();2<=this.be&&(a=this.Oc/this.Nc,b=this.width/this.height,this.km=2!==this.be&&b>a||2===this.be&&b<a?this.height/this.Nc:this.width/this.Oc);this.Ew?this.ft[this.Ew].yu():this.Wf[0].yu();this.Su||(this.Np=1,this.trigger(y.prototype.N.vv,null));navigator.splashscreen&&navigator.splashscreen.hide&&navigator.splashscreen.hide();a=0;for(b=this.X.length;a<b;a++)c=this.X[a],c.EE&&c.EE();document.hidden||document.webkitHidden||document.mozHidden||document.msHidden?window.cr_setSuspended(!0):
this.dd(!1);this.zd&&AppMobi.webview.execute("onGameReady();")};var q=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame;b.prototype.dd=function(b,d){if(this.sb){var e=Va(),m=d||e,h=this.be,g=(document.mozFullScreen||document.webkitIsFullScreen||document.fullScreen||!!document.msFullscreenElement)&&!this.pf;(g||this.Mm)&&0<this.Gj&&(h=this.Gj);0<h&&(!this.yp||window.self!==window.top)&&(h=
window.innerHeight,this.Um===window.innerWidth&&this.Tm===h||this.setSize(a(),c()));this.Rb||(g?(this.fp||(this.ts=jQuery(this.canvas).css("margin")||"0",this.fp=!0),this.Km||this.Gi||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.fp?(this.Km||this.Gi||jQuery(this.canvas).css("margin",this.ts),this.ts="",this.fp=!1,0===this.be&&this.setSize(Math.round(this.dy/
this.devicePixelRatio),Math.round(this.cy/this.devicePixelRatio),!0)):(this.dy=this.width,this.cy=this.height));this.Yk&&(g=this.dw(),this.Np=this.lk,g&&(this.Yk=!1,this.lk=1,this.trigger(y.prototype.N.vv,null)));this.ZD(m);!this.ob&&!this.of||this.Vs||this.Mn||b||(this.ob=!1,this.Z?this.lf():this.vg(),this.Cq&&(this.canvas&&this.canvas.toDataURL&&(this.canvas.toDataURL(this.Cq[0],this.Cq[1]),this.trigger(y.prototype.N.wA,null)),this.Cq=null));this.cH||(this.$e++,this.tm++,this.ip++);this.cn+=Va()-
e;this.Nm||b||(q?this.ju=q(this.ez,this.canvas):this.Gu=setTimeout(this.ez,this.Uf?1:16))}};b.prototype.ZD=function(a){var b,c,d,e,m,h,g,f;1E3<=a-this.Sj&&(this.Sj+=1E3,1E3<=a-this.Sj&&(this.Sj=a),this.ss=this.ip,this.ip=0,this.Wr=this.cn,this.cn=0);0!==this.Dp&&(b=a-this.Dp,0>b&&(b=0),this.vi=b/1E3,.5<this.vi?this.vi=0:.1<this.vi&&(this.vi=.1));this.Dp=a;this.Ba=this.vi*this.dj;this.we.add(this.Ba);this.fh.add(this.vi);a=(document.mozFullScreen||document.webkitIsFullScreen||document.fullScreen||
!!document.msFullscreenElement||this.Mm)&&!this.pf;2<=this.be||a&&0<this.Gj?(b=this.Oc/this.Nc,c=this.width/this.height,d=this.be,a&&0<this.Gj&&(d=this.Gj),this.km=2!==d&&c>b||2===d&&c<b?this.height/this.Nc:this.width/this.Oc,this.sb&&(this.sb.Ky(this.sb.scrollX),this.sb.Ly(this.sb.scrollY))):this.km=this.Nj?this.devicePixelRatio:1;this.qd();this.Tf++;this.$g.cF();this.Tf--;this.qd();this.Tf++;c=this.by.kg();a=0;for(b=c.length;a<b;a++)c[a].eH();a=0;for(b=this.X.length;a<b;a++)if(h=this.X[a],!h.qa&&
(h.uc.length||h.Qb.length))for(c=0,d=h.u.length;c<d;c++)for(g=h.u[c],e=0,m=g.Ea.length;e<m;e++)g.Ea[e].dd();a=0;for(b=this.X.length;a<b;a++)if(h=this.X[a],!h.qa&&(h.uc.length||h.Qb.length))for(c=0,d=h.u.length;c<d;c++)for(g=h.u[c],e=0,m=g.Ea.length;e<m;e++)f=g.Ea[e],f.QE&&f.QE();c=this.St.kg();a=0;for(b=c.length;a<b;a++)c[a].dd();this.Tf--;this.FD();for(a=0;this.xj&&10>a++;)this.yw(this.xj);a=0;for(b=this.xh.length;a<b;a++)this.xh[a].Hs=!1;this.sb.Ej&&this.sb.Ej.Bc();this.tq.length=0;this.Tf++;a=
0;for(b=this.X.length;a<b;a++)if(h=this.X[a],!h.qa&&(h.uc.length||h.Qb.length))for(c=0,d=h.u.length;c<d;c++)for(g=h.u[c],e=0,m=g.Ea.length;e<m;e++)f=g.Ea[e],f.Jq&&f.Jq();c=this.Tt.kg();a=0;for(b=c.length;a<b;a++)c[a].Jq();this.Tf--};b.prototype.yw=function(a){var b=this.sb;this.sb.tF();var c,d,e,m,h,g,f;if(this.Z)for(c=0,d=this.X.length;c<d;c++)h=this.X[c],h.qa||!h.Lu||h.global&&0!==h.u.length||-1!==a.Im.indexOf(h)||h.Lu();b==a&&(this.$g.le.length=0);a.yu();c=0;for(d=this.X.length;c<d;c++)if(h=this.X[c],
h.global||h.Ub.Bq)for(a=0,b=h.u.length;a<b;a++)if(g=h.u[a],g.Vt&&g.Vt(),g.Ea)for(e=0,m=g.Ea.length;e<m;e++)f=g.Ea[e],f.Vt&&f.Vt();this.ob=!0;this.qd()};b.prototype.Fu=function(a){this.St.add(a)};b.prototype.xF=function(a){this.Tt.add(a)};b.prototype.xs=function(a){return a&&-1!==a.sn?this.vi*a.sn:this.Ba};b.prototype.vg=function(){this.sb.vg(this.qb);this.zd&&this.qb.present()};b.prototype.lf=function(){this.sb.lf(this.Z);this.Z.TE()};b.prototype.so=function(a){a&&this.Yo.push(a)};b.prototype.Fy=
function(a){Ea(this.Yo,a)};b.prototype.Bi=function(a){a=a.toString();return this.Ui.hasOwnProperty(a)?this.Ui[a]:null};var p=[];b.prototype.gj=function(a){var b,c;b=a.type.name;var d=null;if(this.Bj.hasOwnProperty(b)){if(d=this.Bj[b],d.contains(a))return}else d=p.length?p.pop():new ca,this.Bj[b]=d;d.add(a);this.Di=!0;if(a.Qe)for(b=0,c=a.siblings.length;b<c;b++)this.gj(a.siblings[b]);this.Qs&&d.Gl.push(a);this.Tf++;this.trigger(Object.getPrototypeOf(a.type.Ub).N.tv,a);this.Tf--};b.prototype.qd=function(){if(this.Di){var a,
b,c,d,e,m;this.Qs=!0;c=0;for(e=this.Pf.length;c<e;++c)for(a=this.Pf[c],b=a.type,b.u.push(a),d=0,m=b.Qb.length;d<m;++d)b.Qb[d].u.push(a),b.Qb[d].Cl=!0;this.Pf.length=0;this.mA();Ua(this.Bj);this.Di=this.Qs=!1}};b.prototype.mA=function(){for(var a in this.Bj)this.Bj.hasOwnProperty(a)&&this.Nz(this.Bj[a])};b.prototype.Nz=function(a){var b=a.kg(),c=b[0].type,d,e,m,h,g,f;Wa(c.u,a);c.Cl=!0;0===c.u.length&&(c.uo=!1);d=0;for(e=c.Qb.length;d<e;++d)f=c.Qb[d],Wa(f.u,a),f.Cl=!0;d=0;for(e=this.$g.le.length;d<
e;++d)if(g=this.$g.le[d],g.Yd.hasOwnProperty(c.index)&&Wa(g.Yd[c.index].Bh,a),!c.qa)for(m=0,h=c.Qb.length;m<h;++m)f=c.Qb[m],g.Yd.hasOwnProperty(f.index)&&Wa(g.Yd[f.index].Bh,a);if(g=b[0].M){if(g.ig)for(m=g.u,d=0,e=m.length;d<e;++d)h=m[d],a.contains(h)&&(h.lb(),g.De.update(h,h.ie,null),h.ie.set(0,0,-1,-1));Wa(g.u,a);g.Hn(0)}for(d=0;d<b.length;++d)this.Mz(b[d],c);a.clear();p.push(a);this.ob=!0};b.prototype.Mz=function(a,b){var c,d,e;c=0;for(d=this.Yo.length;c<d;++c)this.Yo[c](a);a.si&&b.Ho.update(a,
a.si,null);(c=a.M)&&c.wl(a,!0);if(a.Ea)for(c=0,d=a.Ea.length;c<d;++c)e=a.Ea[c],e.jk&&e.jk(),e.behavior.aq.remove(a);this.by.remove(a);this.St.remove(a);this.Tt.remove(a);a.jk&&a.jk();this.Ui.hasOwnProperty(a.uid.toString())&&delete this.Ui[a.uid.toString()];this.cq--;100>b.Vo.length&&b.Vo.push(a)};b.prototype.uw=function(a,b,c,d){if(a.qa){var e=ra(Math.random()*a.ol.length);return this.uw(a.ol[e],b,c,d)}return a.jf?this.ti(a.jf,b,!1,c,d,!1):null};var s=[];b.prototype.ti=function(a,b,c,d,e,m){var h,
g,f,l;if(!a)return null;var k=this.X[a[1]],q=k.Ub.Hi;if(this.Yk&&q&&!k.Rs||q&&!this.Z&&11===a[0][11])return null;var p=b;q||(b=null);var n;k.Vo.length?(n=k.Vo.pop(),n.Ce=!0,k.Ub.kc.call(n,k)):(n=new k.Ub.kc(k),n.Ce=!1);n.uid=c&&!m?a[2]:this.tn++;this.Ui[n.uid.toString()]=n;n.Cy=this.Yx++;n.Lj=k.u.length;h=0;for(g=this.Pf.length;h<g;++h)this.Pf[h].type===k&&n.Lj++;n.Dm=zb;n.toString=Ab;f=a[3];if(n.Ce)Ua(n.Y);else{n.Y={};if("undefined"!==typeof cr_is_preview)for(n.Zw=[],n.Zw.length=f.length,h=0,g=f.length;h<
g;h++)n.Zw[h]=f[h][1];n.Lc=[];n.Lc.length=f.length}h=0;for(g=f.length;h<g;h++)n.Lc[h]=f[h][0];if(q){var z=a[0];n.x=ha(d)?z[0]:d;n.y=ha(e)?z[1]:e;n.z=z[2];n.width=z[3];n.height=z[4];n.depth=z[5];n.G=z[6];n.opacity=z[7];n.de=z[8];n.ee=z[9];n.$d=z[10];h=z[11];!this.Z&&k.ya.length&&(n.$d=h);n.nm=db(n.$d);this.W&&eb(n,n.$d,this.W);if(n.Ce){h=0;for(g=z[12].length;h<g;h++)for(f=0,l=z[12][h].length;f<l;f++)n.Wb[h][f]=z[12][h][f];n.tc.set(0,0,0,0);n.si.set(0,0,-1,-1);n.ie.set(0,0,-1,-1);n.ub.In(n.tc);n.Kr.length=
0}else{n.Wb=z[12].slice(0);h=0;for(g=n.Wb.length;h<g;h++)n.Wb[h]=z[12][h].slice(0);n.bb=[];n.mi=[];n.mi.length=k.ya.length;n.tc=new ua(0,0,0,0);n.si=new ua(0,0,-1,-1);n.ie=new ua(0,0,-1,-1);n.ub=new va;n.Kr=[];n.Gb=Hb;n.TG=Ib;n.Pd=Jb;n.lb=Kb;n.EF=Lb;n.sz=Mb;n.Bg=Nb}n.$h=!1;n.AF=0;n.zF=0;n.yF=null;14===z.length&&(n.$h=!0,n.AF=z[13][0],n.zF=z[13][1],n.yF=z[13][2]);h=0;for(g=k.ya.length;h<g;h++)n.mi[h]=!0;n.ci=Ob;n.ci();n.uz=!!n.bb.length;n.Jr=!0;n.Lr=!0;k.to=!0;n.visible=!0;n.sn=-1;n.M=b;n.lg=b.u.length;
"undefined"===typeof n.Ma&&(n.Ma=null);this.ob=n.ph=!0}var w;h=s.length=0;for(g=k.Qb.length;h<g;h++)s.push.apply(s,k.Qb[h].uc);s.push.apply(s,k.uc);if(n.Ce)for(h=0,g=s.length;h<g;h++){var t=s[h];w=n.Ea[h];w.Ce=!0;t.behavior.kc.call(w,t,n);z=a[4][h];f=0;for(l=z.length;f<l;f++)w.Aa[f]=z[f];w.rb();t.behavior.aq.add(n)}else for(n.Ea=[],h=0,g=s.length;h<g;h++)t=s[h],w=new t.behavior.kc(t,n),w.Ce=!1,w.Aa=a[4][h].slice(0),w.rb(),n.Ea.push(w),t.behavior.aq.add(n);z=a[5];if(n.Ce)for(h=0,g=z.length;h<g;h++)n.Aa[h]=
z[h];else n.Aa=z.slice(0);this.Pf.push(n);this.Di=!0;b&&(b.jm(n,!0),1!==b.ge||1!==b.he)&&(k.uo=!0);this.cq++;if(k.Qe){if(n.Qe=!0,n.Ce?n.siblings.length=0:n.siblings=[],!c&&!m){h=0;for(g=k.te.length;h<g;h++)if(k.te[h]!==k){if(!k.te[h].jf)return null;n.siblings.push(this.ti(k.te[h].jf,p,!1,q?n.x:d,q?n.y:e,!0))}h=0;for(g=n.siblings.length;h<g;h++)for(n.siblings[h].siblings.push(n),f=0;f<g;f++)h!==f&&n.siblings[h].siblings.push(n.siblings[f])}}else n.Qe=!1,n.siblings=null;n.rb();h=0;for(g=n.Ea.length;h<
g;h++)n.Ea[h].yy&&n.Ea[h].yy();return n};b.prototype.Am=function(a){var b,c;b=0;for(c=this.sb.Ha.length;b<c;b++){var d=this.sb.Ha[b];if(gb(d.name,a))return d}return null};b.prototype.Ah=function(a){a=ra(a);0>a&&(a=0);a>=this.sb.Ha.length&&(a=this.sb.Ha.length-1);return this.sb.Ha[a]};b.prototype.Qr=function(a){var b,c;b=0;for(c=a.length;b<c;b++)a[b].Ya().pb=!0};b.prototype.En=function(a){var b,c;b=0;for(c=a.length;b<c;b++)a[b].En()};b.prototype.oq=function(a){var b,c;b=0;for(c=a.length;b<c;b++)a[b].oq()};
b.prototype.kk=function(a){var b,c;b=0;for(c=a.length;b<c;b++)a[b].kk()};b.prototype.pz=function(a){if(a.to){var b,c,d=a.u;b=0;for(c=d.length;b<c;++b)d[b].sz();d=this.Pf;b=0;for(c=d.length;b<c;++b)d[b].type===a&&d[b].sz();a.to=!1}};b.prototype.hD=function(a,b,c,d){var e,m,h=a?1!==a.ge||1!==a.he:!1;if(b.qa)for(a=0,e=b.ol.length;a<e;++a)m=b.ol[a],h||m.uo?Ca(d,m.u):(this.pz(m),m.Ho.rq(c,d));else h||b.uo?Ca(d,b.u):(this.pz(b),b.Ho.rq(c,d))};b.prototype.On=function(a,b,c){var d=a.Ya(),e,m,h,g,f,l;if(d.pb)for(d.pb=
!1,e=d.u.length=0,g=a.u.length;e<g;e++)h=a.u[e],h.lb(),f=h.M.hd(b,c,!0),l=h.M.hd(b,c,!1),h.Pd(f,l)&&d.u.push(h);else{e=m=0;for(g=d.u.length;e<g;e++)h=d.u[e],h.lb(),f=h.M.hd(b,c,!0),l=h.M.hd(b,c,!1),h.Pd(f,l)&&(d.u[m]=d.u[e],m++);d.u.length=m}a.Nf();return d.Gs()};b.prototype.wF=function(a,b){if(!(a&&b&&a!==b&&a.ph&&b.ph))return!1;a.lb();b.lb();var c=a.M,d=b.M,e,h,m,g,f,l,k,q;if(c===d||c.ge===d.ge&&d.he===d.he&&c.scale===d.scale&&c.G===d.G&&c.Id===d.Id){if(!a.tc.LD(b.tc)||!a.ub.$w(b.ub)||a.$h&&b.$h)return!1;
if(a.$h)return this.az(a,b);if(b.$h)return this.az(b,a);k=a.Ma&&!a.Ma.Pj();e=b.Ma&&!b.Ma.Pj();if(!k&&!e)return!0;k?(a.Ma.wj(a.width,a.height,a.G),k=a.Ma):(this.gg.Al(a.ub,a.x,a.y,a.width,a.height),k=this.gg);e?(b.Ma.wj(b.width,b.height,b.G),q=b.Ma):(this.gg.Al(b.ub,b.x,b.y,b.width,b.height),q=this.gg);return k.Jm(q,b.x-a.x,b.y-a.y)}k=a.Ma&&!a.Ma.Pj();e=b.Ma&&!b.Ma.Pj();k?(a.Ma.wj(a.width,a.height,a.G),this.gg.Py(a.Ma)):this.gg.Al(a.ub,a.x,a.y,a.width,a.height);k=this.gg;e?(b.Ma.wj(b.width,b.height,
b.G),this.Au.Py(b.Ma)):this.Au.Al(b.ub,b.x,b.y,b.width,b.height);q=this.Au;e=0;for(h=k.Ze;e<h;e++)m=2*e,g=m+1,f=k.rc[m],l=k.rc[g],k.rc[m]=c.Sb(f+a.x,l+a.y,!0),k.rc[g]=c.Sb(f+a.x,l+a.y,!1);k.lb();e=0;for(h=q.Ze;e<h;e++)m=2*e,g=m+1,f=q.rc[m],l=q.rc[g],q.rc[m]=d.Sb(f+b.x,l+b.y,!0),q.rc[g]=d.Sb(f+b.x,l+b.y,!1);q.lb();return k.Jm(q,0,0)};var t=new va;new ua(0,0,0,0);var w=[];b.prototype.az=function(a,b){var c,d,e,m,h=b.tc,g=a.x,f=a.y;a.ZG(h,w);var l=b.Ma&&!b.Ma.Pj();c=0;for(d=w.length;c<d;++c)if(e=w[c],
m=e.WE,h.MD(m,g,f)&&(t.In(m),t.offset(g,f),t.$w(b.ub)))if(l)if(b.Ma.wj(b.width,b.height,b.G),e.Sg){if(e.Sg.Jm(b.Ma,b.x-(g+m.left),b.y-(f+m.top)))return w.length=0,!0}else{if(this.gg.Al(t,0,0,m.right-m.left,m.bottom-m.top),this.gg.Jm(b.Ma,b.x,b.y))return w.length=0,!0}else if(e.Sg){if(this.gg.Al(b.ub,0,0,b.width,b.height),e.Sg.Jm(this.gg,-(g+m.left),-(f+m.top)))return w.length=0,!0}else return w.length=0,!0;w.length=0;return!1};b.prototype.kz=function(a,b){if(!b)return!1;var c,d,e,m,h;c=0;for(d=a.uc.length;c<
d;c++)if(a.uc[c].behavior instanceof b)return!0;if(!a.qa)for(c=0,d=a.Qb.length;c<d;c++)for(h=a.Qb[c],e=0,m=h.uc.length;e<m;e++)if(h.uc[e].behavior instanceof b)return!0;return!1};b.prototype.lz=function(a){return this.kz(a,dc.rG)};b.prototype.Ku=function(a){return this.kz(a,dc.sG)};b.prototype.YE=function(a,b){a.ph&&b.ph&&this.tq.push([a,b])};b.prototype.NB=function(a,b){var c,d,e;c=0;for(d=this.tq.length;c<d;c++)if(e=this.tq[c],e[0]==a&&e[1]==b||e[0]==b&&e[1]==a)return!0;return!1};var z=-1;b.prototype.trigger=
function(a,b,c){if(!this.sb)return!1;var d=this.sb.Ej;if(!d)return!1;var e=!1,m,h,g;z++;var f=d.as;h=0;for(g=f.length;h<g;++h)m=this.hz(a,b,f[h],c),e=e||m;m=this.hz(a,b,d,c);z--;return e||m};b.prototype.hz=function(a,b,c,d){var e=!1,m,h,g,f;if(b)for(g=this.Iu(a,b,b.type.name,c,d),e=e||g,f=b.type.Qb,m=0,h=f.length;m<h;++m)g=this.Iu(a,b,f[m].name,c,d),e=e||g;else g=this.Iu(a,b,"system",c,d),e=e||g;return e};b.prototype.Iu=function(a,b,c,d,e){var m,h=!1,g=!1,g="undefined"!==typeof e,f=(g?d.Cw:d.iz)[c];
if(!f)return h;var l=null;d=0;for(m=f.length;d<m;++d)if(f[d].method==a){l=f[d].rm;break}if(!l)return h;a=g?l[e]:l;if(!a)return null;d=0;for(m=a.length;d<m;d++)e=a[d][0],g=a[d][1],g=this.ZC(b,c,e,g),h=h||g;return h};b.prototype.ZC=function(a,b,c,d){var e,m,h=!1;this.Ju++;var g=this.yd().ue;g&&this.En(g.$i);var f=1<this.Ju;this.En(c.$i);f&&this.VE();var l=this.pq(c);l.ue=c;a&&(e=this.types[b].Ya(),e.pb=!1,e.u.length=1,e.u[0]=a,this.types[b].Nf());a=!0;if(c.parent){b=l.$y;for(e=c.parent;e;)b.push(e),
e=e.parent;b.reverse();e=0;for(m=b.length;e<m;e++)if(!b[e].eF()){a=!1;break}}a&&(this.tm++,c.bg?c.dF(d):c.Bc(),h=h||l.Rj);this.kq();f&&this.PE();this.kk(c.$i);g&&this.kk(g.$i);this.Di&&0===this.Tf&&0===z&&!this.Ss&&this.qd();this.Ju--;return h};b.prototype.ws=function(){var a=this.yd();return a.ue.Wc[a.Ic]};b.prototype.VE=function(){this.Pp++;this.Pp>=this.ot.length&&this.ot.push([])};b.prototype.PE=function(){this.Pp--};b.prototype.Iw=function(){return this.ot[this.Pp]};b.prototype.pq=function(a){this.bp++;
this.bp>=this.es.length&&this.es.push(new Pb);var b=this.yd();b.reset(a);return b};b.prototype.kq=function(){this.bp--};b.prototype.yd=function(){return this.es[this.bp]};b.prototype.Jw=function(a,b){for(var c,d,e,m,h,g;b;){c=0;for(d=b.Cf.length;c<d;c++)if(g=b.Cf[c],g instanceof Qb&&gb(a,g.name))return g;b=b.parent}c=0;for(d=this.xh.length;c<d;c++)for(h=this.xh[c],e=0,m=h.yi.length;e<m;e++)if(g=h.yi[e],g instanceof Qb&&gb(a,g.name))return g;return null};b.prototype.Mw=function(a){var b,c;b=0;for(c=
this.Wf.length;b<c;b++)if(this.Wf[b].Ra===a)return this.Wf[b];return null};b.prototype.np=function(a){var b,c;b=0;for(c=this.X.length;b<c;b++)if(this.X[b].Ra===a)return this.X[b];return null};b.prototype.iD=function(a){var b,c;b=0;for(c=this.ni.length;b<c;b++)if(this.ni[b].Ra===a)return this.ni[b];return null};b.prototype.FD=function(){var a=this,b=this.tu,c=this.Gh,d=this.Ip,m=!1;this.Uy&&(m=!0,b="__c2_continuouspreview",this.Uy=!1);if(b.length){this.qd();c=this.jF();if(window.indexedDB&&!this.of)f(b,
c,function(){fa("Saved state to IndexedDB storage ("+c.length+" bytes)");a.Gh=c;a.trigger(y.prototype.N.qr,null);a.Gh="";m&&e()},function(d){try{localStorage.setItem("__c2save_"+b,c),fa("Saved state to WebStorage ("+c.length+" bytes)"),a.Gh=c,a.trigger(y.prototype.N.qr,null),a.Gh="",m&&e()}catch(h){fa("Failed to save game state: "+d+"; "+h)}});else try{localStorage.setItem("__c2save_"+b,c),fa("Saved state to WebStorage ("+c.length+" bytes)"),a.Gh=c,this.trigger(y.prototype.N.qr,null),a.Gh="",m&&e()}catch(h){fa("Error saving to WebStorage: "+
h)}this.Sd=this.Ip=this.tu=""}d.length&&(window.indexedDB&&!this.of?k(d,function(b){b?(a.Sd=b,fa("Loaded state from IndexedDB storage ("+a.Sd.length+" bytes)")):(a.Sd=localStorage.getItem("__c2save_"+d)||"",fa("Loaded state from WebStorage ("+a.Sd.length+" bytes)"));a.Mn=!1;a.Sd.length||a.trigger(y.prototype.N.nr,null)},function(){a.Sd=localStorage.getItem("__c2save_"+d)||"";fa("Loaded state from WebStorage ("+a.Sd.length+" bytes)");a.Mn=!1;a.Sd.length||a.trigger(y.prototype.N.nr,null)}):(this.Sd=
localStorage.getItem("__c2save_"+d)||"",fa("Loaded state from WebStorage ("+this.Sd.length+" bytes)"),this.Mn=!1,a.Sd.length||a.trigger(y.prototype.N.nr,null)),this.tu=this.Ip="");this.Sd.length&&(this.qd(),this.YD(this.Sd),this.Gh=this.Sd,this.trigger(y.prototype.N.DA,null),this.Sd=this.Gh="")};b.prototype.jF=function(){var a,b,c,d,e,m,h,f={c2save:!0,version:1,rt:{time:this.we.kb,walltime:this.fh.kb,timescale:this.dj,tickcount:this.$e,execcount:this.tm,next_uid:this.tn,running_layout:this.sb.Ra,
start_time_offset:Date.now()-this.Dq},types:{},layouts:{},events:{groups:{},cnds:{},acts:{},vars:{}}};a=0;for(b=this.X.length;a<b;a++)if(e=this.X[a],!e.qa&&!this.lz(e)){m={instances:[]};Ta(e.Y)&&(m.ex=g(e.Y));c=0;for(d=e.u.length;c<d;c++)m.instances.push(this.su(e.u[c]));f.types[e.Ra.toString()]=m}a=0;for(b=this.Wf.length;a<b;a++)c=this.Wf[a],f.layouts[c.Ra.toString()]=c.Ee();d=f.events.groups;a=0;for(b=this.ni.length;a<b;a++)c=this.ni[a],d[c.Ra.toString()]=this.Fm[c.Em].Ij;b=f.events.cnds;for(h in this.Hk)this.Hk.hasOwnProperty(h)&&
(a=this.Hk[h],Ta(a.Y)&&(b[h]={ex:g(a.Y)}));b=f.events.acts;for(h in this.Dk)this.Dk.hasOwnProperty(h)&&(a=this.Dk[h],Ta(a.Y)&&(b[h]={ex:a.Y}));b=f.events.vars;for(h in this.Hl)this.Hl.hasOwnProperty(h)&&(a=this.Hl[h],a.vp||a.parent&&!a.Pm||(b[h]=a.data));f.system=this.$g.Ee();return JSON.stringify(f)};b.prototype.Ey=function(){var a,b,c,d,e,m;this.Ui={};a=0;for(b=this.X.length;a<b;a++)if(c=this.X[a],!c.qa)for(d=0,e=c.u.length;d<e;d++)m=c.u[d],this.Ui[m.uid.toString()]=m};b.prototype.YD=function(a){a=
JSON.parse(a);if(a.c2save&&!(1<a.version)){var b=a.rt;this.we.reset();this.we.kb=b.time;this.fh.reset();this.fh.kb=b.walltime||0;this.dj=b.timescale;this.$e=b.tickcount;this.tm=b.execcount;this.Dq=Date.now()-b.start_time_offset;var c=b.running_layout;if(c!==this.sb.Ra)if(c=this.Mw(c))this.yw(c);else return;var d,e,m,h,g,f,l;f=a.types;for(e in f)if(f.hasOwnProperty(e)&&(h=this.np(parseInt(e,10)))&&!h.qa&&!this.lz(h)){f[e].ex?h.Y=f[e].ex:Ua(h.Y);g=h.u;m=f[e].instances;c=0;for(d=na(g.length,m.length);c<
d;c++)this.Jp(g[c],m[c]);c=m.length;for(d=g.length;c<d;c++)this.gj(g[c]);c=g.length;for(d=m.length;c<d;c++){g=null;if(h.Ub.Hi&&(g=this.sb.mp(m[c].w.l),!g))continue;g=this.ti(h.jf,g,!1,0,0,!0);this.Jp(g,m[c])}h.Cl=!0}this.qd();this.Ey();d=a.layouts;for(e in d)d.hasOwnProperty(e)&&(c=this.Mw(parseInt(e,10)))&&c.rf(d[e]);d=a.events.groups;for(e in d)d.hasOwnProperty(e)&&(c=this.iD(parseInt(e,10)))&&this.Fm[c.Em]&&(this.Fm[c.Em].Ij=d[e]);c=a.events.cnds;for(e in c)c.hasOwnProperty(e)&&this.Hk.hasOwnProperty(e)&&
(this.Hk[e].Y=c[e].ex);c=a.events.acts;for(e in c)c.hasOwnProperty(e)&&this.Dk.hasOwnProperty(e)&&(this.Dk[e].Y=c[e].ex);c=a.events.vars;for(e in c)c.hasOwnProperty(e)&&this.Hl.hasOwnProperty(e)&&(this.Hl[e].data=c[e]);this.tn=b.next_uid;this.$g.rf(a.system);c=0;for(d=this.X.length;c<d;c++)if(h=this.X[c],!h.qa)for(e=0,a=h.u.length;e<a;e++){g=h.u[e];if(h.Qe)for(f=g.Dm(),b=g.siblings.length=0,m=h.te.length;b<m;b++)l=h.te[b],h!==l&&g.siblings.push(l.u[f]);g.Lf&&g.Lf();if(g.Ea)for(b=0,m=g.Ea.length;b<
m;b++)f=g.Ea[b],f.Lf&&f.Lf()}this.ob=!0}};b.prototype.su=function(a,b){var c,d,e,h,m;h=a.type;e=h.Ub;var f={};b?f.c2=!0:f.uid=a.uid;Ta(a.Y)&&(f.ex=g(a.Y));if(a.Lc&&a.Lc.length)for(f.ivs={},c=0,d=a.Lc.length;c<d;c++)f.ivs[a.type.Ns[c].toString()]=a.Lc[c];if(e.Hi){e={x:a.x,y:a.y,w:a.width,h:a.height,l:a.M.Ra,zi:a.Bg()};0!==a.G&&(e.a=a.G);1!==a.opacity&&(e.o=a.opacity);.5!==a.de&&(e.hX=a.de);.5!==a.ee&&(e.hY=a.ee);0!==a.$d&&(e.bm=a.$d);a.visible||(e.v=a.visible);a.ph||(e.ce=a.ph);-1!==a.sn&&(e.mts=a.sn);
if(h.ya.length)for(e.fx=[],c=0,d=h.ya.length;c<d;c++)m=h.ya[c],e.fx.push({name:m.name,active:a.mi[m.index],params:a.Wb[m.index]});f.w=e}if(a.Ea&&a.Ea.length)for(f.behs={},c=0,d=a.Ea.length;c<d;c++)h=a.Ea[c],h.Ee&&(f.behs[h.type.Ra.toString()]=h.Ee());a.Ee&&(f.data=a.Ee());return f};b.prototype.kD=function(a,b){var c,d;c=0;for(d=a.Ns.length;c<d;c++)if(a.Ns[c]===b)return c;return-1};b.prototype.gD=function(a,b){var c,d;c=0;for(d=a.Ea.length;c<d;c++)if(a.Ea[c].type.Ra===b)return c;return-1};b.prototype.Jp=
function(a,b,c){var d,e,h,m,g;g=a.type;h=g.Ub;if(c){if(!b.c2)return}else a.uid=b.uid;b.ex?a.Y=b.ex:Ua(a.Y);if(e=b.ivs)for(d in e)e.hasOwnProperty(d)&&(c=this.kD(g,parseInt(d,10)),0>c||c>=a.Lc.length||(a.Lc[c]=e[d]));if(h.Hi){h=b.w;a.M.Ra!==h.l&&(c=a.M,a.M=this.sb.mp(h.l),a.M?(c.wl(a,!0),a.M.jm(a,!0),a.Gb(),a.M.Hn(0)):(a.M=c,this.gj(a)));a.x=h.x;a.y=h.y;a.width=h.w;a.height=h.h;a.lg=h.zi;a.G=h.hasOwnProperty("a")?h.a:0;a.opacity=h.hasOwnProperty("o")?h.o:1;a.de=h.hasOwnProperty("hX")?h.hX:.5;a.ee=
h.hasOwnProperty("hY")?h.hY:.5;a.visible=h.hasOwnProperty("v")?h.v:!0;a.ph=h.hasOwnProperty("ce")?h.ce:!0;a.sn=h.hasOwnProperty("mts")?h.mts:-1;a.$d=h.hasOwnProperty("bm")?h.bm:0;a.nm=db(a.$d);this.W&&eb(a,a.$d,this.W);a.Gb();if(h.hasOwnProperty("fx"))for(c=0,e=h.fx.length;c<e;c++)m=g.zs(h.fx[c].name),0>m||(a.mi[m]=h.fx[c].active,a.Wb[m]=h.fx[c].params);a.ci()}if(g=b.behs)for(d in g)g.hasOwnProperty(d)&&(h=this.gD(a,parseInt(d,10)),0>h||a.Ea[h].rf(g[d]));b.data&&a.rf(b.data)};Rb=function(a){return new b(document.getElementById(a))};
Sb=function(a,c){return new b({dc:!0,width:a,height:c})};window.cr_createRuntime=Rb;window.cr_createDCRuntime=Sb;window.createCocoonJSRuntime=function(){window.c2cocoonjs=!0;var a=document.createElement("screencanvas")||document.createElement("canvas");a.iH=!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.g=a;this.Ej=null;this.scrollX=this.g.Oc/2;this.scrollY=this.g.Nc/2;this.scale=1;this.G=0;this.Nk=!0;this.name=b[0];this.width=b[1];this.height=b[2];this.mz=b[3];this.Sy=b[4];this.Ra=b[5];var c=b[6],d,e;this.Ha=[];this.Im=[];d=0;for(e=c.length;d<e;d++){var g=new Tb(this,c[d]);g.$x=d;this.Ha.push(g)}c=b[7];this.Mj=[];d=0;for(e=c.length;d<e;d++){var g=c[d],f=this.g.X[g[1]];f.jf||(f.jf=g);this.Mj.push(g);-1===this.Im.indexOf(f)&&this.Im.push(f)}this.ya=[];this.bb=[];this.Wb=
[];d=0;for(e=b[8].length;d<e;d++)this.ya.push({id:b[8][d][0],name:b[8][d][1],nd:-1,sd:!0,index:d}),this.Wb.push(b[8][d][2].slice(0));this.ci();this.Xi=new ua(0,0,1,1);this.ku=new ua(0,0,1,1);this.Vi={}}function c(a,b){return a.lg-b.lg}function b(a,b){this.Yc=a;this.g=a.g;this.u=[];this.scale=1;this.G=0;this.Cj=!1;this.ai=new ua(0,0,0,0);this.fz=new va;this.Cc=this.hc=this.Dc=this.gc=0;this.pk=!1;this.ei=-1;this.name=b[0];this.index=b[1];this.Ra=b[2];this.visible=b[3];this.pi=b[4];this.bi=b[5];this.ge=
b[6];this.he=b[7];this.opacity=b[8];this.rs=b[9];this.ig=b[10];this.Id=b[11];this.$d=b[12];this.wC=b[13];this.nm="source-over";this.xd=this.Ed=0;this.De=null;this.bl=d();this.Wh=!0;this.Cp=new ua(0,0,-1,-1);this.hf=new ua(0,0,-1,-1);this.ig&&(this.De=new cb(this.g.Oc,this.g.Nc));this.Yi=!1;var c=b[14],e,g;this.Rk=[];e=0;for(g=c.length;e<g;e++){var f=c[e],l=this.g.X[f[1]];l.jf||(l.jf=f,l.UB=this.index);this.Rk.push(f);-1===this.Yc.Im.indexOf(l)&&this.Yc.Im.push(l)}this.ya=[];this.bb=[];this.Wb=[];
e=0;for(g=b[15].length;e<g;e++)this.ya.push({id:b[15][e][0],name:b[15][e][1],nd:-1,sd:!0,index:e}),this.Wb.push(b[15][e][2].slice(0));this.ci();this.Xi=new ua(0,0,1,1);this.ku=new ua(0,0,1,1)}function d(){return g.length?g.pop():[]}function f(a){a.length=0;g.push(a)}a.prototype.iF=function(a){var b=a.type.Ra.toString();this.Vi.hasOwnProperty(b)||(this.Vi[b]=[]);this.Vi[b].push(this.g.su(a))};a.prototype.Rw=function(){var a=this.Ha[0];return!a.bi&&1===a.opacity&&!a.rs&&a.visible};a.prototype.ci=function(){this.bb.length=
0;var a,b,c;a=0;for(b=this.ya.length;a<b;a++)c=this.ya[a],c.sd&&this.bb.push(c)};a.prototype.ys=function(a){var b,c,d;b=0;for(c=this.ya.length;b<c;b++)if(d=this.ya[b],d.name===a)return d;return null};var k=[],e=!0;a.prototype.yu=function(){this.Sy&&(this.Ej=this.g.gs[this.Sy],this.Ej.Mu());this.g.sb=this;this.scrollX=this.g.Oc/2;this.scrollY=this.g.Nc/2;var a,b,d,g,f,l,n;a=0;for(d=this.g.X.length;a<d;a++)if(b=this.g.X[a],!b.qa)for(f=b.u,b=0,g=f.length;b<g;b++)if(l=f[b],l.M){var z=l.M.$x;z>=this.Ha.length&&
(z=this.Ha.length-1);l.M=this.Ha[z];-1===l.M.u.indexOf(l)&&l.M.u.push(l);l.M.pk=!0}if(!e)for(a=0,d=this.Ha.length;a<d;++a)this.Ha[a].u.sort(c);k.length=0;this.JB();a=0;for(d=this.Ha.length;a<d;a++)l=this.Ha[a],l.SB(),l.Ou();f=!1;if(!this.Nk){for(n in this.Vi)if(this.Vi.hasOwnProperty(n)&&(b=this.g.np(parseInt(n,10)))&&!b.qa&&this.g.Ku(b)){g=this.Vi[n];a=0;for(d=g.length;a<d;a++){l=null;if(b.Ub.Hi&&(l=this.mp(g[a].w.l),!l))continue;l=this.g.ti(b.jf,l,!1,0,0,!0);this.g.Jp(l,g[a]);f=!0;k.push(l)}g.length=
0}a=0;for(d=this.Ha.length;a<d;a++)this.Ha[a].u.sort(c),this.Ha[a].pk=!0}f&&(this.g.qd(),this.g.Ey());for(a=0;a<k.length;a++)if(l=k[a],l.type.Qe)for(d=l.Dm(),b=0,g=l.type.te.length;b<g;b++)n=l.type.te[b],l.type!==n&&(n.u.length>d?l.siblings.push(n.u[d]):n.jf&&(f=this.g.ti(n.jf,l.M,!0,l.x,l.y,!0),this.g.qd(),n.Qq(),l.siblings.push(f),k.push(f)));a=0;for(d=this.Mj.length;a<d;a++)this.g.ti(this.Mj[a],null,!0);this.g.xj=null;this.g.qd();if(this.g.qb&&!this.g.Rb)for(a=0,d=this.g.X.length;a<d;a++)n=this.g.X[a],
!n.qa&&n.u.length&&n.fu&&n.fu(this.g.qb);a=0;for(d=k.length;a<d;a++)l=k[a],this.g.trigger(Object.getPrototypeOf(l.type.Ub).N.lr,l);k.length=0;this.g.trigger(y.prototype.N.uv,null);this.Nk=!1};a.prototype.RB=function(){var a,b,c,d,e;b=a=0;for(c=this.Mj.length;a<c;a++)d=this.Mj[a],e=this.g.X[d[1]],e.global?this.g.ti(d,null,!0):(this.Mj[b]=d,b++);this.Mj.length=b};a.prototype.tF=function(){this.g.trigger(y.prototype.N.CA,null);this.g.$g.le.length=0;var a,b,c,d,g,f;if(!this.Nk)for(a=0,b=this.Ha.length;a<
b;a++)for(this.Ha[a].Pu(),g=this.Ha[a].u,c=0,d=g.length;c<d;c++)f=g[c],f.type.global||this.g.Ku(f.type)&&this.iF(f);a=0;for(b=this.Ha.length;a<b;a++){g=this.Ha[a].u;c=0;for(d=g.length;c<d;c++)f=g[c],f.type.global||this.g.gj(f);this.g.qd();g.length=0;this.Ha[a].pk=!0}a=0;for(b=this.g.X.length;a<b;a++)if(g=this.g.X[a],!(g.global||g.Ub.Hi||g.Ub.Bq||g.qa)){c=0;for(d=g.u.length;c<d;c++)this.g.gj(g.u[c]);this.g.qd()}e=!1};new ua(0,0,0,0);a.prototype.vg=function(a){var b,c=a,d=!1,e=!this.g.nf;e&&(this.g.Hp||
(this.g.Hp=document.createElement("canvas"),b=this.g.Hp,b.width=this.g.Ga,b.height=this.g.Fa,this.g.qx=b.getContext("2d"),d=!0),b=this.g.Hp,c=this.g.qx,b.width!==this.g.Ga&&(b.width=this.g.Ga,d=!0),b.height!==this.g.Fa&&(b.height=this.g.Fa,d=!0),d&&(c.webkitImageSmoothingEnabled=this.g.cb,c.mozImageSmoothingEnabled=this.g.cb,c.msImageSmoothingEnabled=this.g.cb,c.imageSmoothingEnabled=this.g.cb));c.globalAlpha=1;c.globalCompositeOperation="source-over";this.g.Gr&&!this.Rw()&&c.clearRect(0,0,this.g.Ga,
this.g.Fa);var g,f,d=0;for(g=this.Ha.length;d<g;d++)f=this.Ha[d],f.visible&&0<f.opacity&&11!==f.$d&&(f.u.length||!f.bi)?f.vg(c):f.Ou();e&&a.drawImage(b,0,0,this.g.width,this.g.height)};a.prototype.lf=function(a){var b=0<this.bb.length||this.g.Fl||!this.g.nf;if(b){this.g.xe||(this.g.xe=a.qh(this.g.Ga,this.g.Fa,this.g.cb));if(this.g.xe.mm!==this.g.Ga||this.g.xe.lm!==this.g.Fa)a.deleteTexture(this.g.xe),this.g.xe=a.qh(this.g.Ga,this.g.Fa,this.g.cb);a.Yg(this.g.xe);this.g.nf||a.zl(this.g.Ga,this.g.Fa)}else this.g.xe&&
(a.Yg(null),a.deleteTexture(this.g.xe),this.g.xe=null);this.g.Gr&&!this.Rw()&&a.clear(0,0,0,0);var c,d,e;c=0;for(d=this.Ha.length;c<d;c++)e=this.Ha[c],e.visible&&0<e.opacity&&(e.u.length||!e.bi)?e.lf(a):e.Ou();b&&(0===this.bb.length||1===this.bb.length&&this.g.nf?(1===this.bb.length?(b=this.bb[0].index,a.Zg(this.bb[0].nd),a.yl(null,1/this.g.Ga,1/this.g.Fa,0,0,1,1,this.scale,this.G,0,0,this.g.Ga/2,this.g.Fa/2,this.Wb[b]),a.nq(this.bb[0].nd)&&(this.g.ob=!0)):a.Zg(0),this.g.nf||a.zl(this.g.width,this.g.height),
a.Yg(null),a.mk(1),a.Fe(this.g.xe),a.My(),a.Wg(),a.dh(),b=this.g.width/2,c=this.g.height/2,a.qq(-b,c,b,c,b,-c,-b,-c),a.Fe(null)):this.mu(a,null,null,null))};a.prototype.Bm=function(){return 0<this.bb.length||this.g.Fl||!this.g.nf?this.g.xe:null};a.prototype.Nw=function(){var a=this.Ha[0].Pe(),b,c,d;b=1;for(c=this.Ha.length;b<c;b++)d=this.Ha[b],(0!==d.ge||0!==d.he)&&d.Pe()<a&&(a=d.Pe());return a};a.prototype.Ky=function(a){if(!this.mz){var b=1/this.Nw()*this.g.Ga/2;a>this.width-b&&(a=this.width-b);
a<b&&(a=b)}this.scrollX!==a&&(this.scrollX=a,this.g.ob=!0)};a.prototype.Ly=function(a){if(!this.mz){var b=1/this.Nw()*this.g.Fa/2;a>this.height-b&&(a=this.height-b);a<b&&(a=b)}this.scrollY!==a&&(this.scrollY=a,this.g.ob=!0)};a.prototype.JB=function(){this.Ky(this.scrollX);this.Ly(this.scrollY)};a.prototype.mu=function(a,b,c,d){var e=c?c.bb:b?b.bb:this.bb,g=1,f=0,l=0,k=0,n=this.g.Ga,C=this.g.Fa;c?(g=c.M.Pe(),f=c.M.yc(),l=c.M.gc,k=c.M.hc,n=c.M.Dc,C=c.M.Cc):b&&(g=b.Pe(),f=b.yc(),l=b.gc,k=b.hc,n=b.Dc,
C=b.Cc);var F=this.g.us,H,E,I,x,D=0,N=1,Z,L=this.g.Ga,G=this.g.Fa,wa=L/2,W=G/2,aa=b?b.Xi:this.Xi,K=b?b.ku:this.ku,M=0,X=0,J=0,S=0,O=L,ya=L,T=G,Ha=G,qa=I=0,Ma=c?c.M.yc():0;if(c){H=0;for(E=e.length;H<E;H++)I+=a.oD(e[H].nd),qa+=a.pD(e[H].nd);x=c.tc;M=b.Sb(x.left,x.top,!0,!0);J=b.Sb(x.left,x.top,!1,!0);O=b.Sb(x.right,x.bottom,!0,!0);T=b.Sb(x.right,x.bottom,!1,!0);0!==Ma&&(H=b.Sb(x.right,x.top,!0,!0),E=b.Sb(x.right,x.top,!1,!0),X=b.Sb(x.left,x.bottom,!0,!0),S=b.Sb(x.left,x.bottom,!1,!0),x=Math.min(M,O,
H,X),O=Math.max(M,O,H,X),M=x,x=Math.min(J,T,E,S),T=Math.max(J,T,E,S),J=x);M-=I;J-=qa;O+=I;T+=qa;K.left=M/L;K.top=1-J/G;K.right=O/L;K.bottom=1-T/G;X=M=ra(M);S=J=ra(J);ya=O=sa(O);Ha=T=sa(T);X-=I;S-=qa;ya+=I;Ha+=qa;0>M&&(M=0);0>J&&(J=0);O>L&&(O=L);T>G&&(T=G);0>X&&(X=0);0>S&&(S=0);ya>L&&(ya=L);Ha>G&&(Ha=G);aa.left=M/L;aa.top=1-J/G;aa.right=O/L;aa.bottom=1-T/G}else aa.left=K.left=0,aa.top=K.top=0,aa.right=K.right=1,aa.bottom=K.bottom=1;qa=c&&((c.G||Ma)&&a.Cn(e[0].nd)||0!==I||0!==qa||1!==c.opacity||c.type.Ub.Vx)||
b&&!c&&1!==b.opacity;a.My();if(qa){F[D]||(F[D]=a.qh(L,G,this.g.cb));if(F[D].mm!==L||F[D].lm!==G)a.deleteTexture(F[D]),F[D]=a.qh(L,G,this.g.cb);a.Zg(0);a.Yg(F[D]);Z=Ha-S;a.clearRect(X,G-S-Z,ya-X,Z);c?c.lf(a):(a.Fe(this.g.Re),a.mk(b.opacity),a.Wg(),a.translate(-wa,-W),a.dh(),a.Tg(M,T,O,T,O,J,M,J,aa));K.left=K.top=0;K.right=K.bottom=1;c&&(x=aa.top,aa.top=aa.bottom,aa.bottom=x);D=1;N=0}a.mk(1);I=e.length-1;var Ma=a.hu(e[I].nd)||!b&&!c&&!this.g.nf,oa=0;H=0;for(E=e.length;H<E;H++){F[D]||(F[D]=a.qh(L,G,
this.g.cb));if(F[D].mm!==L||F[D].lm!==G)a.deleteTexture(F[D]),F[D]=a.qh(L,G,this.g.cb);a.Zg(e[H].nd);oa=e[H].index;a.nq(e[H].nd)&&(this.g.ob=!0);0!=H||qa?(a.yl(d,1/L,1/G,K.left,K.top,K.right,K.bottom,g,f,l,k,(l+n)/2,(k+C)/2,c?c.Wb[oa]:b?b.Wb[oa]:this.Wb[oa]),a.Fe(null),H!==I||Ma?(a.Yg(F[D]),Z=Ha-S,x=G-S-Z,a.clearRect(X,x,ya-X,Z)):(c?a.Zi(c.Ed,c.xd):b&&a.Zi(b.Ed,b.xd),a.Yg(d)),a.Fe(F[N]),a.Wg(),a.translate(-wa,-W),a.dh(),a.Tg(M,T,O,T,O,J,M,J,aa),H!==I||Ma||a.Fe(null)):(a.Yg(F[D]),Z=Ha-S,x=G-S-Z,a.clearRect(X,
x,ya-X,Z),c?(a.yl(d,1/c.width,1/c.height,K.left,K.top,K.right,K.bottom,g,f,l,k,(l+n)/2,(k+C)/2,c.Wb[oa]),c.lf(a)):(a.yl(d,1/L,1/G,0,0,1,1,g,f,l,k,(l+n)/2,(k+C)/2,b?b.Wb[oa]:this.Wb[oa]),a.Fe(b?this.g.Re:this.g.xe),a.Wg(),a.translate(-wa,-W),a.dh(),a.Tg(M,T,O,T,O,J,M,J,aa)),K.left=K.top=0,K.right=K.bottom=1,c&&!Ma&&(x=T,T=J,J=x));D=0===D?1:0;N=0===D?1:0}Ma&&(a.Zg(0),c?a.Zi(c.Ed,c.xd):b?a.Zi(b.Ed,b.xd):this.g.nf||(a.zl(this.g.width,this.g.height),wa=this.g.width/2,W=this.g.height/2,J=M=0,O=this.g.width,
T=this.g.height),a.Yg(d),a.Fe(F[N]),a.Wg(),a.translate(-wa,-W),a.dh(),c&&1===e.length&&!qa?a.Tg(M,J,O,J,O,T,M,T,aa):a.Tg(M,T,O,T,O,J,M,J,aa),a.Fe(null))};a.prototype.mp=function(a){var b,c;b=0;for(c=this.Ha.length;b<c;b++)if(this.Ha[b].Ra===a)return this.Ha[b];return null};a.prototype.Ee=function(){var a,b,c,d={sx:this.scrollX,sy:this.scrollY,s:this.scale,a:this.G,w:this.width,h:this.height,fv:this.Nk,persist:this.Vi,fx:[],layers:{}};a=0;for(b=this.ya.length;a<b;a++)c=this.ya[a],d.fx.push({name:c.name,
active:c.sd,params:this.Wb[c.index]});a=0;for(b=this.Ha.length;a<b;a++)c=this.Ha[a],d.layers[c.Ra.toString()]=c.Ee();return d};a.prototype.rf=function(a){var b,c,d,e;this.scrollX=a.sx;this.scrollY=a.sy;this.scale=a.s;this.G=a.a;this.width=a.w;this.height=a.h;this.Vi=a.persist;"undefined"!==typeof a.fv&&(this.Nk=a.fv);var g=a.fx;b=0;for(c=g.length;b<c;b++)if(d=this.ys(g[b].name))d.sd=g[b].active,this.Wb[d.index]=g[b].params;this.ci();b=a.layers;for(e in b)b.hasOwnProperty(e)&&(a=this.mp(parseInt(e,
10)))&&a.rf(b[e])};Bb=a;b.prototype.ci=function(){this.bb.length=0;var a,b,c;a=0;for(b=this.ya.length;a<b;a++)c=this.ya[a],c.sd&&this.bb.push(c)};b.prototype.ys=function(a){var b,c,d;b=0;for(c=this.ya.length;b<c;b++)if(d=this.ya[b],d.name===a)return d;return null};b.prototype.SB=function(){var a,b,c,d,e,g;b=a=0;for(c=this.Rk.length;a<c;a++){d=this.Rk[a];e=this.g.X[d[1]];g=this.g.Ku(e);e=!0;if(!g||this.Yc.Nk)d=this.g.ti(d,this,!0),k.push(d),d.type.global&&(e=!1);e&&(this.Rk[b]=this.Rk[a],b++)}this.Rk.length=
b;this.g.qd();!this.g.Z&&this.ya.length&&(this.$d=this.wC);this.nm=db(this.$d);this.g.W&&eb(this,this.$d,this.g.W);this.Wh=!0};b.prototype.wl=function(a,b){var c=Da(this.u,a);0>c||(b&&this.ig&&a.ie&&a.ie.right>=a.ie.left&&(a.lb(),this.De.update(a,a.ie,null),a.ie.set(0,0,-1,-1)),c===this.u.length-1?this.u.pop():(Aa(this.u,c),this.Hn(c)),this.Wh=!0)};b.prototype.jm=function(a,b){a.lg=this.u.length;this.u.push(a);b&&this.ig&&a.ie&&a.Gb();this.Wh=!0};b.prototype.SE=function(a){this.u.unshift(a);this.Hn(0)};
b.prototype.CE=function(a,b,c){var d=a.Bg();b=b.Bg();Aa(this.u,d);d<b&&b--;c&&b++;b===this.u.length?this.u.push(a):this.u.splice(b,0,a);this.Hn(d<b?d:b)};b.prototype.Hn=function(a){-1===this.ei?this.ei=a:a<this.ei&&(this.ei=a);this.Wh=this.pk=!0};b.prototype.Pu=function(){if(this.pk){-1===this.ei&&(this.ei=0);var a,b,c;if(this.ig)for(a=this.ei,b=this.u.length;a<b;++a)c=this.u[a],c.lg=a,this.De.uE(c.ie);else for(a=this.ei,b=this.u.length;a<b;++a)this.u[a].lg=a;this.pk=!1;this.ei=-1}};b.prototype.Pe=
function(a){return this.lD()*(this.g.nf||a?this.g.km:1)};b.prototype.lD=function(){return(this.scale*this.Yc.scale-1)*this.Id+1};b.prototype.yc=function(){return this.Cj?0:Ia(this.Yc.G+this.G)};var g=[],l=[],n=[];b.prototype.Ow=function(){this.Pu();this.De.rq(this.gc,this.hc,this.Dc,this.Cc,n);if(!n.length)return d();if(1===n.length){var a=d();Ba(a,n[0]);n.length=0;return a}for(var b=!0;1<n.length;){for(var a=n,c=void 0,e=void 0,g=void 0,k=void 0,w=void 0,c=0,e=a.length;c<e-1;c+=2){var g=a[c],k=a[c+
1],w=d(),z=g,u=k,A=w,C=0,F=0,H=0,E=z.length,I=u.length,x=void 0,D=void 0;for(A.length=E+I;C<E&&F<I;++H)x=z[C],D=u[F],x.lg<D.lg?(A[H]=x,++C):(A[H]=D,++F);for(;C<E;++C,++H)A[H]=z[C];for(;F<I;++F,++H)A[H]=u[F];b||(f(g),f(k));l.push(w)}1===e%2&&(b?(g=d(),Ba(g,a[e-1]),l.push(g)):l.push(a[e-1]));Ba(a,l);l.length=0;b=!1}a=n[0];n.length=0;return a};b.prototype.vg=function(a){this.Yi=this.rs||1!==this.opacity||0!==this.$d;var b=this.g.canvas,c=a,d=!1;this.Yi&&(this.g.Gp||(this.g.Gp=document.createElement("canvas"),
b=this.g.Gp,b.width=this.g.Ga,b.height=this.g.Fa,this.g.ox=b.getContext("2d"),d=!0),b=this.g.Gp,c=this.g.ox,b.width!==this.g.Ga&&(b.width=this.g.Ga,d=!0),b.height!==this.g.Fa&&(b.height=this.g.Fa,d=!0),d&&(c.webkitImageSmoothingEnabled=this.g.cb,c.mozImageSmoothingEnabled=this.g.cb,c.msImageSmoothingEnabled=this.g.cb,c.imageSmoothingEnabled=this.g.cb),this.bi&&c.clearRect(0,0,this.g.Ga,this.g.Fa));c.globalAlpha=1;c.globalCompositeOperation="source-over";this.bi||(c.fillStyle="rgb("+this.pi[0]+","+
this.pi[1]+","+this.pi[2]+")",c.fillRect(0,0,this.g.Ga,this.g.Fa));c.save();this.Cj=!0;var d=this.hd(0,0,!0,!0),e=this.hd(0,0,!1,!0);this.Cj=!1;this.g.Rg&&(d=Math.round(d),e=Math.round(e));this.ou(d,e,c);var g=this.Pe();c.scale(g,g);c.translate(-d,-e);this.ig?(this.hf.left=this.De.Je(this.gc),this.hf.top=this.De.Ke(this.hc),this.hf.right=this.De.Je(this.Dc),this.hf.bottom=this.De.Ke(this.Cc),this.Wh||!this.hf.$o(this.Cp)?(f(this.bl),d=this.Ow(),this.Wh=!1,this.Cp.Oo(this.hf)):d=this.bl):d=this.u;
for(var l,k=null,e=0,g=d.length;e<g;++e)l=d[e],l!==k&&(this.mC(l,c),k=l);this.ig&&(this.bl=d);c.restore();this.Yi&&(a.globalCompositeOperation=this.nm,a.globalAlpha=this.opacity,a.drawImage(b,0,0))};b.prototype.mC=function(a,b){if(a.visible&&0!==a.width&&0!==a.height){a.lb();var c=a.tc;c.right<this.gc||c.bottom<this.hc||c.left>this.Dc||c.top>this.Cc||(b.globalCompositeOperation=a.nm,a.vg(b))}};b.prototype.Ou=function(){this.Cj=!0;var a=this.hd(0,0,!0,!0),b=this.hd(0,0,!1,!0);this.Cj=!1;this.g.Rg&&
(a=Math.round(a),b=Math.round(b));this.ou(a,b,null)};b.prototype.ou=function(a,b,c){var d=this.Pe();this.gc=a;this.hc=b;this.Dc=a+1/d*this.g.Ga;this.Cc=b+1/d*this.g.Fa;a=this.yc();0!==a&&(c&&(c.translate(this.g.Ga/2,this.g.Fa/2),c.rotate(-a),c.translate(this.g.Ga/-2,this.g.Fa/-2)),this.ai.set(this.gc,this.hc,this.Dc,this.Cc),this.ai.offset((this.gc+this.Dc)/-2,(this.hc+this.Cc)/-2),this.fz.Qy(this.ai,a),this.fz.jw(this.ai),this.ai.offset((this.gc+this.Dc)/2,(this.hc+this.Cc)/2),this.gc=this.ai.left,
this.hc=this.ai.top,this.Dc=this.ai.right,this.Cc=this.ai.bottom)};b.prototype.lf=function(a){var b=0,c=0;if(this.Yi=this.rs||1!==this.opacity||0<this.bb.length||0!==this.$d){this.g.Re||(this.g.Re=a.qh(this.g.Ga,this.g.Fa,this.g.cb));if(this.g.Re.mm!==this.g.Ga||this.g.Re.lm!==this.g.Fa)a.deleteTexture(this.g.Re),this.g.Re=a.qh(this.g.Ga,this.g.Fa,this.g.cb);a.Yg(this.g.Re);this.bi&&a.clear(0,0,0,0)}this.bi||a.clear(this.pi[0]/255,this.pi[1]/255,this.pi[2]/255,1);this.Cj=!0;var d=this.hd(0,0,!0,!0),
b=this.hd(0,0,!1,!0);this.Cj=!1;this.g.Rg&&(d=Math.round(d),b=Math.round(b));this.ou(d,b,null);d=this.Pe();a.Wg();a.scale(d,d);a.pu(-this.yc());a.translate((this.gc+this.Dc)/-2,(this.hc+this.Cc)/-2);a.dh();this.ig?(this.hf.left=this.De.Je(this.gc),this.hf.top=this.De.Ke(this.hc),this.hf.right=this.De.Je(this.Dc),this.hf.bottom=this.De.Ke(this.Cc),this.Wh||!this.hf.$o(this.Cp)?(f(this.bl),b=this.Ow(),this.Wh=!1,this.Cp.Oo(this.hf)):b=this.bl):b=this.u;var e,g,l=null,c=0;for(e=b.length;c<e;++c)g=b[c],
g!==l&&(this.nC(b[c],a),l=g);this.ig&&(this.bl=b);this.Yi&&(b=this.bb.length?this.bb[0].nd:0,c=this.bb.length?this.bb[0].index:0,0===this.bb.length||1===this.bb.length&&!a.hu(b)&&1===this.opacity?(1===this.bb.length?(a.Zg(b),a.yl(this.Yc.Bm(),1/this.g.Ga,1/this.g.Fa,0,0,1,1,d,this.yc(),this.gc,this.hc,(this.gc+this.Dc)/2,(this.hc+this.Cc)/2,this.Wb[c]),a.nq(b)&&(this.g.ob=!0)):a.Zg(0),a.Yg(this.Yc.Bm()),a.mk(this.opacity),a.Fe(this.g.Re),a.Zi(this.Ed,this.xd),a.Wg(),a.dh(),d=this.g.Ga/2,b=this.g.Fa/
2,a.qq(-d,b,d,b,d,-b,-d,-b),a.Fe(null)):this.Yc.mu(a,this,null,this.Yc.Bm()))};b.prototype.nC=function(a,b){if(a.visible&&0!==a.width&&0!==a.height){a.lb();var c=a.tc;c.right<this.gc||c.bottom<this.hc||c.left>this.Dc||c.top>this.Cc||(a.uz?this.oC(a,b):(b.Zg(0),b.Zi(a.Ed,a.xd),a.lf(b)))}};b.prototype.oC=function(a,b){var c=a.bb[0].nd,d=a.bb[0].index,e=this.Pe();if(1!==a.bb.length||b.hu(c)||b.UE(c)||(a.G||a.M.yc())&&b.Cn(c)||1!==a.opacity||a.type.Ub.Vx)this.Yc.mu(b,this,a,this.Yi?this.g.Re:this.Yc.Bm()),
b.Wg(),b.scale(e,e),b.pu(-this.yc()),b.translate((this.gc+this.Dc)/-2,(this.hc+this.Cc)/-2),b.dh();else{b.Zg(c);b.Zi(a.Ed,a.xd);b.nq(c)&&(this.g.ob=!0);var g=0,f=0,l=0,k=0;b.Cn(c)&&(c=a.tc,g=this.Sb(c.left,c.top,!0,!0),f=this.Sb(c.left,c.top,!1,!0),l=this.Sb(c.right,c.bottom,!0,!0),c=this.Sb(c.right,c.bottom,!1,!0),g/=windowWidth,f=1-f/windowHeight,l/=windowWidth,k=1-c/windowHeight);b.yl(this.Yi?this.g.Re:this.Yc.Bm(),1/a.width,1/a.height,g,f,l,k,e,this.yc(),this.gc,this.hc,(this.gc+this.Dc)/2,(this.hc+
this.Cc)/2,a.Wb[d]);a.lf(b)}};b.prototype.hd=function(a,b,c,d){var e=this.g.devicePixelRatio;this.g.Nj&&(a*=e,b*=e);var e=this.g.qy,g=this.g.ry,e=(this.Yc.scrollX-e)*this.ge+e,g=(this.Yc.scrollY-g)*this.he+g,f=e,l=g,k=1/this.Pe(!d);d?(f-=this.g.Ga*k/2,l-=this.g.Fa*k/2):(f-=this.g.width*k/2,l-=this.g.height*k/2);f+=a*k;l+=b*k;b=this.yc();0!==b&&(f-=e,l-=g,a=Math.cos(b),b=Math.sin(b),d=f*a-l*b,l=l*a+f*b,f=d+e,l+=g);return c?f:l};b.prototype.Sb=function(a,b,c,d){var e=this.g.qy,g=this.g.ry,f=(this.Yc.scrollX-
e)*this.ge+e,l=(this.Yc.scrollY-g)*this.he+g,g=f,e=l,k=this.yc();if(0!==k){a-=f;b-=l;var n=Math.cos(-k),k=Math.sin(-k),C=a*n-b*k;b=b*n+a*k;a=C+f;b+=l}f=1/this.Pe(!d);d?(g-=this.g.Ga*f/2,e-=this.g.Fa*f/2):(g-=this.g.width*f/2,e-=this.g.height*f/2);g=(a-g)/f;e=(b-e)/f;a=this.g.devicePixelRatio;this.g.Nj&&!d&&(g/=a,e/=a);return c?g:e};b.prototype.Ee=function(){var a,b,c,d={s:this.scale,a:this.G,vl:this.gc,vt:this.hc,vr:this.Dc,vb:this.Cc,v:this.visible,bc:this.pi,t:this.bi,px:this.ge,py:this.he,o:this.opacity,
zr:this.Id,fx:[],instances:[]};a=0;for(b=this.ya.length;a<b;a++)c=this.ya[a],d.fx.push({name:c.name,active:c.sd,params:this.Wb[c.index]});return d};b.prototype.rf=function(a){var b,d;this.scale=a.s;this.G=a.a;this.gc=a.vl;this.hc=a.vt;this.Dc=a.vr;this.Cc=a.vb;this.visible=a.v;this.pi=a.bc;this.bi=a.t;this.ge=a.px;this.he=a.py;this.opacity=a.o;this.Id=a.zr;var e=a.fx;a=0;for(b=e.length;a<b;a++)if(d=this.ys(e[a].name))d.sd=e[a].active,this.Wb[d.index]=e[a].params;this.ci();this.u.sort(c);this.pk=!0};
Tb=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>=s.length&&(s.length=b.length+1);s[b.length]||(s[b.length]=[]);f=s[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.g=a;this.iz={};this.Cw={};this.Hs=!1;this.Uw=new ca;this.as=[];this.Hr=[];this.name=b[0];var c=b[1];this.yi=[];var d,e;d=0;for(e=c.length;d<e;d++)this.Xw(c[d],null,this.yi)}function f(a){this.type=a;this.u=[];this.Xa=[];this.pb=!0}function k(a,b,c){this.sheet=a;this.parent=b;this.g=a.g;this.Ab=[];this.$i=[];this.Sw=this.Kq=this.Hu=this.sp=this.group=this.Wy=!1;this.Wc=[];this.Kf=[];this.Cf=[];this.Em="";this.Ij=this.sp=this.group=!1;this.Ko=null;c[1]&&(this.Em=c[1][1].toLowerCase(),
this.group=!0,this.sp=!!c[1][0],this.Ko=[],this.Ij=this.sp,this.g.ni.push(this),this.g.Fm[this.Em]=this);this.bg=c[2];this.Ra=c[4];this.group||(this.g.iw[this.Ra.toString()]=this);var d=c[5];a=0;for(b=d.length;a<b;a++){var e=new Ub(this,d[a]);e.index=a;this.Wc.push(e);this.Yv(e.type)}d=c[6];a=0;for(b=d.length;a<b;a++)e=new Vb(this,d[a]),e.index=a,this.Kf.push(e);if(8===c.length)for(c=c[7],a=0,b=c.length;a<b;a++)this.sheet.Xw(c[a],this,this.Cf);this.wp=!1;this.Wc.length&&(this.wp=null==this.Wc[0].type&&
this.Wc[0].jd==y.prototype.N.Xz)}function e(a,b){var c,d,e;if(a&&(-1===b.indexOf(a)&&b.push(a),a.Qe))for(c=0,d=a.te.length;c<d;c++)e=a.te[c],a!==e&&-1===b.indexOf(e)&&b.push(e)}function g(a,b){this.Me=a;this.sheet=a.sheet;this.g=a.g;this.Ka=[];this.cc=[];this.Y={};this.index=-1;this.gm=!1;this.jd=this.g.ii(b[1]);this.trigger=0<b[3];this.Bw=2===b[3];this.Fg=b[4];this.Os=b[5];this.WD=b[6];this.Ra=b[7];this.g.Hk[this.Ra.toString()]=this;-1===b[0]?(this.type=null,this.Bc=this.ru,this.uj=null,this.Of=
-1):(this.type=this.g.X[b[0]],this.Bc=this.WD?this.fF:this.qu,b[2]?(this.uj=this.type.lp(b[2]),this.Of=this.type.vs(b[2])):(this.uj=null,this.Of=-1),this.Me.parent&&this.Me.parent.Aq());this.Bw&&(this.Bc=this.gF);if(10===b.length){var c,d,e=b[9];c=0;for(d=e.length;c<d;c++){var g=new Wb(this,e[c]);this.Ka.push(g)}this.cc.length=e.length}}function l(a,b){this.Me=a;this.sheet=a.sheet;this.g=a.g;this.Ka=[];this.cc=[];this.Y={};this.index=-1;this.gm=!1;this.jd=this.g.ii(b[1]);-1===b[0]?(this.type=null,
this.Bc=this.ru,this.uj=null,this.Of=-1):(this.type=this.g.X[b[0]],this.Bc=this.qu,b[2]?(this.uj=this.type.lp(b[2]),this.Of=this.type.vs(b[2])):(this.uj=null,this.Of=-1));this.Ra=b[3];this.g.Dk[this.Ra.toString()]=this;if(6===b.length){var c,d,e=b[5];c=0;for(d=e.length;c<d;c++){var g=new Wb(this,e[c]);this.Ka.push(g)}this.cc.length=e.length}}function n(){w++;t.length===w&&t.push(new Xb);return t[w]}function h(a,b){this.yf=a;this.Me=a.Me;this.sheet=a.sheet;this.g=a.g;this.type=b[0];this.xg=null;this.Zh=
0;this.get=null;this.qw=0;this.Yc=null;this.key=0;this.object=null;this.index=0;this.Sn=this.ok=this.Sn=this.ok=this.Dw=this.Fj=this.Tn=null;this.Df=!1;var c,d,e;switch(b[0]){case 0:case 7:this.xg=new Yb(this,b[1]);this.Zh=0;this.get=this.uD;break;case 1:this.xg=new Yb(this,b[1]);this.Zh=0;this.get=this.vD;break;case 5:this.xg=new Yb(this,b[1]);this.Zh=0;this.get=this.zD;break;case 3:case 8:this.qw=b[1];this.get=this.sD;break;case 6:this.Yc=this.g.ft[b[1]];this.get=this.AD;break;case 9:this.key=b[1];
this.get=this.yD;break;case 4:this.object=this.g.X[b[1]];this.get=this.BD;this.Me.Yv(this.object);this.yf instanceof Vb?this.Me.Aq():this.Me.parent&&this.Me.parent.Aq();break;case 10:this.index=b[1];a.type.qa?(this.get=this.wD,this.Df=!0):this.get=this.xD;break;case 11:this.Tn=b[1];this.Fj=null;this.get=this.tD;break;case 2:case 12:this.Dw=b[1];this.get=this.rD;break;case 13:for(this.get=this.CD,this.ok=[],this.Sn=[],c=1,d=b.length;c<d;c++)e=new Wb(this.yf,b[c]),this.ok.push(e),this.Sn.push(0)}}function m(a,
b,c){this.sheet=a;this.parent=b;this.g=a.g;this.Ab=[];this.name=c[1];this.Sq=c[2];this.Ls=c[3];this.Pm=!!c[4];this.vp=!!c[5];this.Ra=c[6];this.g.Hl[this.Ra.toString()]=this;this.data=this.Ls;this.parent?(this.Xj=this.Pm||this.vp?-1:this.g.qF++,this.g.AB.push(this)):(this.Xj=-1,this.g.zB.push(this))}function q(a,b,c){this.sheet=a;this.parent=b;this.g=a.g;this.Ab=[];this.Hm=null;this.ID=c[1];this.sd=!0}function p(){this.$y=[];this.reset(null)}var s=[];d.prototype.toString=function(){return this.name};
d.prototype.Xw=function(a,b,c){switch(a[0]){case 0:a=new Zb(this,b,a);if(a.bg)for(c.push(a),c=0,b=a.Wc.length;c<b;c++)a.Wc[c].trigger&&this.Yw(a,c);else a.hx()?this.Yw(a,0):c.push(a);break;case 1:a=new Qb(this,b,a);c.push(a);break;case 2:a=new $b(this,b,a),c.push(a)}};d.prototype.qc=function(){var a,b;a=0;for(b=this.yi.length;a<b;a++)this.yi[a].qc(a<b-1&&this.yi[a+1].wp)};d.prototype.Mu=function(){this.as.length=0;this.Hr.length=0;this.Xv(this);this.Hr.length=0};d.prototype.Xv=function(a){var b,c,
d,e,g=a.as,f=a.Hr,m=this.Uw.kg();b=0;for(c=m.length;b<c;++b)d=m[b],e=d.Hm,!d.sd||a===e||-1<f.indexOf(e)||(f.push(e),e.Xv(a),g.push(e))};d.prototype.Bc=function(a){this.g.fH||(this.Hs=!0,a||(this.g.Ss=!0));var b,c;b=0;for(c=this.yi.length;b<c;b++){var d=this.yi[b];d.Bc();this.g.Qr(d.Ab);this.g.Di&&this.g.qd()}a||(this.g.Ss=!1)};d.prototype.Yw=function(a,b){a.bg||this.g.Pq.push(a);var c,d,e=a.Wc[b],g;g=e.type?e.type.name:"system";var f=(c=e.Bw)?this.Cw:this.iz;f[g]||(f[g]=[]);g=f[g];f=e.jd;if(c){if(e.Ka.length&&
(e=e.Ka[0],1===e.type&&2===e.xg.type)){e=e.xg.value.toLowerCase();c=0;for(d=g.length;c<d;c++)if(g[c].method==f){c=g[c].rm;c[e]?c[e].push([a,b]):c[e]=[[a,b]];return}c={};c[e]=[[a,b]];g.push({method:f,rm:c})}}else{c=0;for(d=g.length;c<d;c++)if(g[c].method==f){g[c].rm.push([a,b]);return}mc&&f===mc.prototype.N.Ak?g.unshift({method:f,rm:[[a,b]]}):g.push({method:f,rm:[[a,b]]})}};Gb=d;f.prototype.Gs=function(){return this.pb?this.type.u.length:this.u.length};f.prototype.Oe=function(){return this.pb?this.type.u:
this.u};f.prototype.zn=function(a){a&&(a.g.yd().ue.bg?(this.pb&&(this.u.length=0,Ba(this.Xa,a.type.u),this.pb=!1),a=this.Xa.indexOf(a),-1!==a&&(this.u.push(this.Xa[a]),this.Xa.splice(a,1))):(this.pb=!1,this.u.length=1,this.u[0]=a))};lb=f;window._c2hh_="8392D03657A61F873480BBF1C0324E00348073A4";k.prototype.qc=function(a){var c,d=this.parent;if(this.group)for(this.Kq=!0;d;){if(!d.group){this.Kq=!1;break}d=d.parent}this.Hu=!this.hx()&&(!this.parent||this.parent.group&&this.parent.Kq);this.Sw=!!a;this.$i=
this.Ab.slice(0);for(d=this.parent;d;){a=0;for(c=d.Ab.length;a<c;a++)this.wB(d.Ab[a]);d=d.parent}this.Ab=b(this.Ab);this.$i=b(this.$i);a=0;for(c=this.Wc.length;a<c;a++)this.Wc[a].qc();a=0;for(c=this.Kf.length;a<c;a++)this.Kf[a].qc();a=0;for(c=this.Cf.length;a<c;a++)this.Cf[a].qc(a<c-1&&this.Cf[a+1].wp)};k.prototype.lF=function(a){if(this.Ij!==!!a){this.Ij=!!a;var b;a=0;for(b=this.Ko.length;a<b;++a)this.Ko[a].oz();0<b&&this.g.sb.Ej&&this.g.sb.Ej.Mu()}};k.prototype.Yv=function(a){e(a,this.Ab)};k.prototype.wB=
function(a){e(a,this.$i)};k.prototype.Aq=function(){this.Wy=!0;this.parent&&this.parent.Aq()};k.prototype.hx=function(){return this.Wc.length?this.Wc[0].trigger:!1};k.prototype.Bc=function(){var a,b=!1,c,d=this.g,e=this.g.yd();e.ue=this;var g=this.Wc;this.wp||(e.ds=!1);if(this.bg){0===g.length&&(b=!0);e.Ic=0;for(a=g.length;e.Ic<a;e.Ic++)g[e.Ic].trigger||(c=g[e.Ic].Bc())&&(b=!0);(e.Rj=b)&&this.vq()}else{e.Ic=0;for(a=g.length;e.Ic<a;e.Ic++)if(c=g[e.Ic].Bc(),!c){e.Rj=!1;this.Hu&&d.Di&&d.qd();return}e.Rj=
!0;this.vq()}this.yC(e)};k.prototype.yC=function(a){a.Rj&&this.Sw&&(a.ds=!0);this.Hu&&this.g.Di&&this.g.qd()};k.prototype.dF=function(a){this.g.yd().ue=this;this.Wc[a].Bc()&&(this.vq(),this.g.yd().Rj=!0)};k.prototype.vq=function(){var a=this.g.yd(),b;a.oe=0;for(b=this.Kf.length;a.oe<b;a.oe++)if(this.Kf[a.oe].Bc())return;this.Hy()};k.prototype.aF=function(){var a=this.g.yd(),b;for(b=this.Kf.length;a.oe<b;a.oe++)if(this.Kf[a.oe].Bc())return;this.Hy()};k.prototype.Hy=function(){if(this.Cf.length){var a,
b,c,d,e=this.Cf.length-1;this.g.pq(this);if(this.Wy)for(a=0,b=this.Cf.length;a<b;a++)c=this.Cf[a],(d=!this.Kq||!this.group&&a<e)&&this.g.oq(c.Ab),c.Bc(),d?this.g.kk(c.Ab):this.g.Qr(c.Ab);else for(a=0,b=this.Cf.length;a<b;a++)this.Cf[a].Bc();this.g.kq()}};k.prototype.eF=function(){var a=this.g.yd();a.ue=this;var b=!1,c;a.Ic=0;for(c=this.Wc.length;a.Ic<c;a.Ic++)if(this.Wc[a.Ic].Bc())b=!0;else if(!this.bg)return!1;return this.bg?b:!0};k.prototype.bF=function(){this.g.tm++;var a=this.g.yd().Ic,b=this.g.pq(this);
if(!this.bg)for(b.Ic=a+1,a=this.Wc.length;b.Ic<a;b.Ic++)if(!this.Wc[b.Ic].Bc()){this.g.kq();return}this.vq();this.g.kq()};k.prototype.QD=function(a){var b=a.index;if(0===b)return!0;for(--b;0<=b;--b)if(this.Wc[b].type===a.type)return!1;return!0};Zb=k;g.prototype.qc=function(){var a,b,c;a=0;for(b=this.Ka.length;a<b;a++)c=this.Ka[a],c.qc(),c.Df&&(this.gm=!0)};g.prototype.gF=function(){return!0};g.prototype.ru=function(){var a,b;a=0;for(b=this.Ka.length;a<b;a++)this.cc[a]=this.Ka[a].get();return Sa(this.jd.apply(this.g.$g,
this.cc),this.Os)};g.prototype.fF=function(){var a,b;a=0;for(b=this.Ka.length;a<b;a++)this.cc[a]=this.Ka[a].get();a=this.jd.apply(this.uj?this.uj:this.type,this.cc);this.type.Nf();return a};g.prototype.qu=function(){var a,b,c,d,e,g,f,m,l=this.type,h=l.Ya(),k=this.Me.bg&&!this.trigger;b=0;var n=l.Qe,p=l.qa,q=l.yh,w=this.Of,s=-1<w,t=this.gm,K=this.Ka,M=this.cc,X=this.Os,J=this.jd,S;if(t)for(b=0,e=K.length;b<e;++b)g=K[b],g.Df||(M[b]=g.get(0));else for(b=0,e=K.length;b<e;++b)M[b]=K[b].get(0);if(h.pb){h.u.length=
0;h.Xa.length=0;S=l.u;a=0;for(d=S.length;a<d;++a){m=S[a];if(t)for(b=0,e=K.length;b<e;++b)g=K[b],g.Df&&(M[b]=g.get(a));s?(b=0,p&&(b=m.type.Mk[q]),b=J.apply(m.Ea[w+b],M)):b=J.apply(m,M);(f=Sa(b,X))?h.u.push(m):k&&h.Xa.push(m)}l.finish&&l.finish(!0);h.pb=!1;l.Nf();return h.Gs()}c=0;S=(f=k&&!this.Me.QD(this))?h.Xa:h.u;var O=!1;a=0;for(d=S.length;a<d;++a){m=S[a];if(t)for(b=0,e=K.length;b<e;++b)g=K[b],g.Df&&(M[b]=g.get(a));s?(b=0,p&&(b=m.type.Mk[q]),b=J.apply(m.Ea[w+b],M)):b=J.apply(m,M);if(Sa(b,X))if(O=
!0,f){if(h.u.push(m),n)for(b=0,e=m.siblings.length;b<e;b++)g=m.siblings[b],g.type.Ya().u.push(g)}else{S[c]=m;if(n)for(b=0,e=m.siblings.length;b<e;b++)g=m.siblings[b],g.type.Ya().u[c]=g;c++}else if(f){S[c]=m;if(n)for(b=0,e=m.siblings.length;b<e;b++)g=m.siblings[b],g.type.Ya().Xa[c]=g;c++}else if(k&&(h.Xa.push(m),n))for(b=0,e=m.siblings.length;b<e;b++)g=m.siblings[b],g.type.Ya().Xa.push(g)}S.length=c;if(n)for(p=l.te,a=0,d=p.length;a<d;a++)m=p[a].Ya(),f?m.Xa.length=c:m.u.length=c;c=O;if(f&&!O)for(a=
0,d=h.u.length;a<d;a++){m=h.u[a];if(t)for(b=0,e=K.length;b<e;b++)g=K[b],g.Df&&(M[b]=g.get(a));b=s?J.apply(m.Ea[w],M):J.apply(m,M);if(Sa(b,X)){O=!0;break}}l.finish&&l.finish(c||k);return k?O:h.Gs()};Ub=g;l.prototype.qc=function(){var a,b,c;a=0;for(b=this.Ka.length;a<b;a++)c=this.Ka[a],c.qc(),c.Df&&(this.gm=!0)};l.prototype.ru=function(){var a=this.g,b,c,d=this.Ka,e=this.cc;b=0;for(c=d.length;b<c;++b)e[b]=d[b].get();return this.jd.apply(a.$g,e)};l.prototype.qu=function(){var a=this.type,b=this.Of,c=
a.yh,d=this.gm,e=this.Ka,g=this.cc,f=this.jd,m=a.Ya().Oe(),a=a.qa,l=-1<b,h,k,n,p,q,w;if(d)for(k=0,p=e.length;k<p;++k)q=e[k],q.Df||(g[k]=q.get(0));else for(k=0,p=e.length;k<p;++k)g[k]=e[k].get(0);h=0;for(n=m.length;h<n;++h){w=m[h];if(d)for(k=0,p=e.length;k<p;++k)q=e[k],q.Df&&(g[k]=q.get(h));l?(k=0,a&&(k=w.type.Mk[c]),f.apply(w.Ea[b+k],g)):f.apply(w,g)}return!1};Vb=l;var t=[],w=-1;h.prototype.qc=function(){var a,b;if(11===this.type)this.Fj=this.g.Jw(this.Tn,this.Me.parent);else if(13===this.type)for(a=
0,b=this.ok.length;a<b;a++)this.ok[a].qc();this.xg&&this.xg.qc()};h.prototype.yE=function(a){this.Df||!a||a.Ub.Bq||(this.Df=!0)};h.prototype.Oy=function(){this.Df=!0};h.prototype.uD=function(a){this.Zh=a||0;a=n();this.xg.get(a);w--;return a.data};h.prototype.vD=function(a){this.Zh=a||0;a=n();this.xg.get(a);w--;return ja(a.data)?a.data:""};h.prototype.BD=function(){return this.object};h.prototype.sD=function(){return this.qw};h.prototype.zD=function(a){this.Zh=a||0;a=n();this.xg.get(a);w--;return a.Mc()?
this.g.Ah(a.data):this.g.Am(a.data)};h.prototype.AD=function(){return this.Yc};h.prototype.yD=function(){return this.key};h.prototype.xD=function(){return this.index};h.prototype.wD=function(a){a=a||0;var b=this.yf.type,c=null,c=b.Ya(),d=c.Oe();if(d.length)c=d[a%d.length].type;else if(c.Xa.length)c=c.Xa[a%c.Xa.length].type;else if(b.u.length)c=b.u[a%b.u.length].type;else return 0;return this.index+c.cp[b.yh]};h.prototype.tD=function(){return this.Fj};h.prototype.rD=function(){return this.Dw};h.prototype.CD=
function(){var a,b;a=0;for(b=this.ok.length;a<b;a++)this.Sn[a]=this.ok[a].get();return this.Sn};Wb=h;m.prototype.qc=function(){this.Ab=b(this.Ab)};m.prototype.nk=function(a){var b=this.g.Iw();this.parent&&!this.Pm&&b?(this.Xj>=b.length&&(b.length=this.Xj+1),b[this.Xj]=a):this.data=a};m.prototype.Cm=function(){var a=this.g.Iw();return!this.parent||this.Pm||!a||this.vp?this.data:this.Xj>=a.length||"undefined"===typeof a[this.Xj]?this.Ls:a[this.Xj]};m.prototype.Bc=function(){!this.parent||this.Pm||this.vp||
this.nk(this.Ls)};Qb=m;q.prototype.toString=function(){return"include:"+this.Hm.toString()};q.prototype.qc=function(){this.Hm=this.g.gs[this.ID];this.sheet.Uw.add(this);this.Ab=b(this.Ab);for(var a=this.parent;a;)a.group&&a.Ko.push(this),a=a.parent;this.oz()};q.prototype.Bc=function(){this.parent&&this.g.En(this.g.X);this.Hm.Hs||this.Hm.Bc(!0);this.parent&&this.g.kk(this.g.X)};q.prototype.oz=function(){for(var a=this.parent;a;){if(a.group&&!a.Ij){this.sd=!1;return}a=a.parent}this.sd=!0};$b=q;p.prototype.reset=
function(a){this.ue=a;this.oe=this.Ic=0;this.$y.length=0;this.ds=this.Rj=!1};Pb=p})();
(function(){function a(a,b){this.yf=a;this.g=a.g;this.type=b[0];this.get=[this.MC,this.IC,this.VC,this.YC,this.BC,this.WC,this.QC,this.FC,this.PC,this.UC,this.CC,this.TC,this.GC,this.RC,this.NC,this.OC,this.JC,this.KC,this.EC,this.XC,this.SC,this.LC,this.DC,this.HC][this.type];var c=null;this.Sh=this.Ka=this.cc=this.jd=this.Iq=this.cd=this.first=this.value=null;this.Of=-1;this.Ei=null;this.vz=-1;this.Fj=this.Tn=null;this.xl=!1;switch(this.type){case 0:case 1:case 2:this.value=b[1];break;case 3:this.first=
new Yb(a,b[1]);break;case 18:this.first=new Yb(a,b[1]);this.cd=new Yb(a,b[2]);this.Iq=new Yb(a,b[3]);break;case 19:this.jd=this.g.ii(b[1]);this.jd!==y.prototype.lc.random&&this.jd!==y.prototype.lc.OB||this.yf.Oy();this.cc=[];this.Ka=[];3===b.length?(c=b[2],this.cc.length=c.length+1):this.cc.length=1;break;case 20:this.Sh=this.g.X[b[1]];this.Of=-1;this.jd=this.g.ii(b[2]);this.xl=b[3];cc.Function&&this.jd===cc.Function.prototype.lc.UF&&this.yf.Oy();this.Ei=b[4]?new Yb(a,b[4]):null;this.cc=[];this.Ka=
[];6===b.length?(c=b[5],this.cc.length=c.length+1):this.cc.length=1;break;case 21:this.Sh=this.g.X[b[1]];this.xl=b[2];this.Ei=b[3]?new Yb(a,b[3]):null;this.vz=b[4];break;case 22:this.Sh=this.g.X[b[1]];this.Sh.lp(b[2]);this.Of=this.Sh.vs(b[2]);this.jd=this.g.ii(b[3]);this.xl=b[4];this.Ei=b[5]?new Yb(a,b[5]):null;this.cc=[];this.Ka=[];7===b.length?(c=b[6],this.cc.length=c.length+1):this.cc.length=1;break;case 23:this.Tn=b[1],this.Fj=null}this.yf.yE(this.Sh);4<=this.type&&17>=this.type&&(this.first=
new Yb(a,b[1]),this.cd=new Yb(a,b[2]));if(c){var d,f;d=0;for(f=c.length;d<f;d++)this.Ka.push(new Yb(a,c[d]))}}function c(){++k;f.length===k&&f.push(new Xb);return f[k]}function b(a,b,c){var d,f;d=0;for(f=a.length;d<f;++d)a[d].get(c),b[d+1]=c.data}function d(a,b){this.type=a||ac.zk;this.data=b||0;this.ik=null;this.type==ac.zk&&(this.data=Math.floor(this.data))}a.prototype.qc=function(){23===this.type&&(this.Fj=this.yf.g.Jw(this.Tn,this.yf.Me.parent));this.first&&this.first.qc();this.cd&&this.cd.qc();
this.Iq&&this.Iq.qc();this.Ei&&this.Ei.qc();if(this.Ka){var a,b;a=0;for(b=this.Ka.length;a<b;a++)this.Ka[a].qc()}};var f=[],k=-1;a.prototype.XC=function(a){var d=this.Ka,f=this.cc;f[0]=a;a=c();b(d,f,a);--k;this.jd.apply(this.g.$g,f)};a.prototype.SC=function(a){var d=this.Sh,f=this.cc,n=this.Ka,h=this.Ei,m=this.jd,q=this.yf.Zh,p=d.Ya(),s=p.Oe();if(!s.length)if(p.Xa.length)s=p.Xa;else{this.xl?a.ke(""):a.tb(0);return}f[0]=a;a.ik=d;a=c();b(n,f,a);h&&(h.get(a),a.Mc()&&(q=a.data,s=d.u));--k;d=s.length;
if(q>=d||q<=-d)q%=d;0>q&&(q+=d);m.apply(s[q],f)};a.prototype.DC=function(a){var d=this.Sh,f=this.cc,n=this.Ka,h=this.Ei,m=this.Of,q=this.jd,p=this.yf.Zh,s=d.Ya(),t=s.Oe();if(!t.length)if(s.Xa.length)t=s.Xa;else{this.xl?a.ke(""):a.tb(0);return}f[0]=a;a.ik=d;a=c();b(n,f,a);h&&(h.get(a),a.Mc()&&(p=a.data,t=d.u));--k;n=t.length;if(p>=n||p<=-n)p%=n;0>p&&(p+=n);p=t[p];t=0;d.qa&&(t=p.type.Mk[d.yh]);q.apply(p.Ea[m+t],f)};a.prototype.LC=function(a){var b=this.Ei,d=this.Sh,f=this.vz,h=this.yf.Zh,m=d.Ya(),q=
m.Oe();if(!q.length)if(m.Xa.length)q=m.Xa;else{this.xl?a.ke(""):a.tb(0);return}if(b){m=c();b.get(m);if(m.Mc()){h=m.data;d=d.u;h%=d.length;0>h&&(h+=d.length);f=d[h].Lc[f];ja(f)?a.ke(f):a.ba(f);--k;return}--k}b=q.length;if(h>=b||h<=-b)h%=b;0>h&&(h+=b);h=q[h];q=0;d.qa&&(q=h.type.cp[d.yh]);f=h.Lc[f+q];ja(f)?a.ke(f):a.ba(f)};a.prototype.MC=function(a){a.type=ac.zk;a.data=this.value};a.prototype.IC=function(a){a.type=ac.uk;a.data=this.value};a.prototype.VC=function(a){a.type=ac.String;a.data=this.value};
a.prototype.YC=function(a){this.first.get(a);a.Mc()&&(a.data=-a.data)};a.prototype.BC=function(a){this.first.get(a);var b=c();this.cd.get(b);a.Mc()&&b.Mc()&&(a.data+=b.data,b.Vk()&&a.ml());--k};a.prototype.WC=function(a){this.first.get(a);var b=c();this.cd.get(b);a.Mc()&&b.Mc()&&(a.data-=b.data,b.Vk()&&a.ml());--k};a.prototype.QC=function(a){this.first.get(a);var b=c();this.cd.get(b);a.Mc()&&b.Mc()&&(a.data*=b.data,b.Vk()&&a.ml());--k};a.prototype.FC=function(a){this.first.get(a);var b=c();this.cd.get(b);
a.Mc()&&b.Mc()&&(a.data/=b.data,a.ml());--k};a.prototype.PC=function(a){this.first.get(a);var b=c();this.cd.get(b);a.Mc()&&b.Mc()&&(a.data%=b.data,b.Vk()&&a.ml());--k};a.prototype.UC=function(a){this.first.get(a);var b=c();this.cd.get(b);a.Mc()&&b.Mc()&&(a.data=Math.pow(a.data,b.data),b.Vk()&&a.ml());--k};a.prototype.CC=function(a){this.first.get(a);var b=c();this.cd.get(b);a.Mc()?b.xp()?a.ke(a.data.toString()+b.data):a.data&&b.data?a.tb(1):a.tb(0):a.xp()&&(a.data=b.xp()?a.data+b.data:a.data+(Math.round(1E10*
b.data)/1E10).toString());--k};a.prototype.TC=function(a){this.first.get(a);var b=c();this.cd.get(b);a.Mc()&&b.Mc()&&(a.data||b.data?a.tb(1):a.tb(0));--k};a.prototype.EC=function(a){this.first.get(a);a.data?this.cd.get(a):this.Iq.get(a)};a.prototype.GC=function(a){this.first.get(a);var b=c();this.cd.get(b);a.tb(a.data===b.data?1:0);--k};a.prototype.RC=function(a){this.first.get(a);var b=c();this.cd.get(b);a.tb(a.data!==b.data?1:0);--k};a.prototype.NC=function(a){this.first.get(a);var b=c();this.cd.get(b);
a.tb(a.data<b.data?1:0);--k};a.prototype.OC=function(a){this.first.get(a);var b=c();this.cd.get(b);a.tb(a.data<=b.data?1:0);--k};a.prototype.JC=function(a){this.first.get(a);var b=c();this.cd.get(b);a.tb(a.data>b.data?1:0);--k};a.prototype.KC=function(a){this.first.get(a);var b=c();this.cd.get(b);a.tb(a.data>=b.data?1:0);--k};a.prototype.HC=function(a){var b=this.Fj.Cm();ia(b)?a.ba(b):a.ke(b)};Yb=a;d.prototype.Vk=function(){return this.type===ac.uk};d.prototype.Mc=function(){return this.type===ac.zk||
this.type===ac.uk};d.prototype.xp=function(){return this.type===ac.String};d.prototype.ml=function(){this.Vk()||(this.xp()&&(this.data=parseFloat(this.data)),this.type=ac.uk)};d.prototype.tb=function(a){this.type=ac.zk;this.data=Math.floor(a)};d.prototype.ba=function(a){this.type=ac.uk;this.data=a};d.prototype.ke=function(a){this.type=ac.String;this.data=a};d.prototype.pF=function(a){ia(a)?(this.type=ac.uk,this.data=a):ja(a)?(this.type=ac.String,this.data=a.toString()):(this.type=ac.zk,this.data=
0)};Xb=d;ac={zk:0,uk:1,String:2}})();function y(a){this.g=a;this.le=[]}
y.prototype.Ee=function(){var a={},c,b,d,f,k,e,g,l;a.waits=[];var n=a.waits,h;c=0;for(b=this.le.length;c<b;c++){e=this.le[c];h={t:e.time,st:e.Vy,s:e.xu,ev:e.Kk.Ra,sm:[],sols:{}};e.Kk.Kf[e.oe]&&(h.act=e.Kk.Kf[e.oe].Ra);d=0;for(f=e.Ab.length;d<f;d++)h.sm.push(e.Ab[d].Ra);for(k in e.Yd)if(e.Yd.hasOwnProperty(k)){g=this.g.X[parseInt(k,10)];l={sa:e.Yd[k].wq,insts:[]};d=0;for(f=e.Yd[k].Bh.length;d<f;d++)l.insts.push(e.Yd[k].Bh[d].uid);h.sols[g.Ra.toString()]=l}n.push(h)}return a};
y.prototype.rf=function(a){a=a.waits;var c,b,d,f,k,e,g,l,n,h,m;c=this.le.length=0;for(b=a.length;c<b;c++)if(e=a[c],l=this.g.iw[e.ev.toString()]){n=-1;d=0;for(f=l.Kf.length;d<f;d++)if(l.Kf[d].Ra===e.act){n=d;break}if(-1!==n){g={Yd:{},Ab:[],bs:!1};g.time=e.t;g.Vy=e.st||"";g.xu=!!e.s;g.Kk=l;g.oe=n;d=0;for(f=e.sm.length;d<f;d++)(l=this.g.np(e.sm[d]))&&g.Ab.push(l);for(k in e.sols)if(e.sols.hasOwnProperty(k)&&(l=this.g.np(parseInt(k,10)))){n=e.sols[k];h={wq:n.sa,Bh:[]};d=0;for(f=n.insts.length;d<f;d++)(m=
this.g.Bi(n.insts[d]))&&h.Bh.push(m);g.Yd[l.index.toString()]=h}this.le.push(g)}}};
(function(){function a(){}function c(){}function b(){}var d=y.prototype;a.prototype.Zz=function(){return!0};a.prototype.uv=function(){return!0};a.prototype.CA=function(){return!0};a.prototype.Qz=function(a,b,c){return bc(a,b,c)};a.prototype.nA=function(a){return a?a.visible:!1};a.prototype.Yz=function(a){var b=this.g.ws(),c=b.Y.Every_lastTime||0,d=this.g.we.kb;"undefined"===typeof b.Y.Every_seconds&&(b.Y.Every_seconds=a);var f=b.Y.Every_seconds;if(d>=c+f)return b.Y.Every_lastTime=c+f,d>=b.Y.Every_lastTime+
.04&&(b.Y.Every_lastTime=d),b.Y.Every_seconds=a,!0;d<c-.1&&(b.Y.Every_lastTime=d);return!1};a.prototype.Rz=function(a,b,c){return bc(a.Cm(),b,c)};a.prototype.kA=function(a){return(a=this.g.Fm[a.toLowerCase()])&&a.Ij};a.prototype.Xz=function(){var a=this.g.yd();return a.ds?!1:!a.Rj};a.prototype.vv=function(){return!0};a.prototype.wA=function(){return!0};a.prototype.qr=function(){return!0};a.prototype.DA=function(){return!0};a.prototype.nr=function(){return!0};a.prototype.Hz=function(a,b,c){return Na(v(a),
v(c))<=v(b)};a.prototype.jA=function(a,b){return Pa(v(a),v(b))};a.prototype.hA=function(a,b,c){a=Ka(a);b=Ka(b);c=Ka(c);return Pa(c,b)?Pa(a,b)&&!Pa(a,c):!(!Pa(a,b)&&Pa(a,c))};d.N=new a;c.prototype.fA=function(a){this.g.Yk||this.g.xj||(this.g.xj=a)};c.prototype.Vz=function(a,b,c,d){if(b&&a&&(b=this.g.uw(a,b,c,d))){this.g.Tf++;var f;this.g.trigger(Object.getPrototypeOf(a.Ub).N.lr,b);if(b.Qe)for(c=0,d=b.siblings.length;c<d;c++)f=b.siblings[c],this.g.trigger(Object.getPrototypeOf(f.type.Ub).N.lr,f);this.g.Tf--;
a=a.Ya();a.pb=!1;a.u.length=1;a.u[0]=b;if(b.Qe)for(c=0,d=b.siblings.length;c<d;c++)f=b.siblings[c],a=f.type.Ya(),a.pb=!1,a.u.length=1,a.u[0]=f}};c.prototype.OA=function(a,b){a&&a.visible!==b&&(a.visible=b,this.g.ob=!0)};c.prototype.RA=function(a,b){0===a.Sq?ia(b)?a.nk(b):a.nk(parseFloat(b)):1===a.Sq&&a.nk(b.toString())};c.prototype.Fz=function(a,b){0===a.Sq?ia(b)?a.nk(a.Cm()+b):a.nk(a.Cm()+parseFloat(b)):1===a.Sq&&a.nk(a.Cm()+b.toString())};var f=[],k=[];c.prototype.eB=function(a){if(!(0>a)){var b,
c,d,h=this.g.yd(),m;m=f.length?f.pop():{Yd:{},Ab:[]};m.bs=!1;m.time=this.g.we.kb+a;m.Vy="";m.xu=!1;m.Kk=h.ue;m.oe=h.oe+1;a=0;for(b=this.g.X.length;a<b;a++)d=this.g.X[a],c=d.Ya(),c.pb&&-1===h.ue.Ab.indexOf(d)||(m.Ab.push(d),d=void 0,d=k.length?k.pop():{Bh:[]},d.wq=!1,d.wq=c.pb,Ba(d.Bh,c.u),m.Yd[a.toString()]=d);this.le.push(m);return!0}};c.prototype.LA=function(){if(!this.g.Yk&&!this.g.xj&&this.g.sb){this.g.xj=this.g.sb;var a,b,c;a=0;for(b=this.g.ni.length;a<b;a++)c=this.g.ni[a],c.lF(c.sp)}};d.Qa=
new c;b.prototype["int"]=function(a,b){ja(b)?(a.tb(parseInt(b,10)),isNaN(a.data)&&(a.data=0)):a.tb(b)};b.prototype["float"]=function(a,b){ja(b)?(a.ba(parseFloat(b)),isNaN(a.data)&&(a.data=0)):a.ba(b)};b.prototype.random=function(a,b,c){void 0===c?a.ba(Math.random()*b):a.ba(Math.random()*(c-b)+b)};b.prototype.sqrt=function(a,b){a.ba(Math.sqrt(b))};b.prototype.abs=function(a,b){a.ba(Math.abs(b))};b.prototype.round=function(a,b){a.tb(Math.round(b))};b.prototype.floor=function(a,b){a.tb(Math.floor(b))};
b.prototype.ceil=function(a,b){a.tb(Math.ceil(b))};b.prototype.sin=function(a,b){a.ba(Math.sin(v(b)))};b.prototype.cos=function(a,b){a.ba(Math.cos(v(b)))};b.prototype.tan=function(a,b){a.ba(Math.tan(v(b)))};b.prototype.asin=function(a,b){a.ba(Fa(Math.asin(b)))};b.prototype.acos=function(a,b){a.ba(Fa(Math.acos(b)))};b.prototype.atan=function(a,b){a.ba(Fa(Math.atan(b)))};b.prototype.exp=function(a,b){a.ba(Math.exp(b))};b.prototype.log10=function(a,b){a.ba(Math.log(b)/Math.LN10)};b.prototype.max=function(a){var b=
arguments[1];"number"!==typeof b&&(b=0);var c,d,f;c=2;for(d=arguments.length;c<d;c++)f=arguments[c],"number"===typeof f&&b<f&&(b=f);a.ba(b)};b.prototype.min=function(a){var b=arguments[1];"number"!==typeof b&&(b=0);var c,d,f;c=2;for(d=arguments.length;c<d;c++)f=arguments[c],"number"===typeof f&&b>f&&(b=f);a.ba(b)};b.prototype.Ba=function(a){a.ba(this.g.Ba)};b.prototype.dj=function(a){a.ba(this.g.dj)};b.prototype.time=function(a){a.ba(this.g.we.kb)};b.prototype.$e=function(a){a.tb(this.g.$e)};b.prototype.cq=
function(a){a.tb(this.g.cq)};b.prototype.ss=function(a){a.tb(this.g.ss)};b.prototype.wh=function(a,b,c,d,f){a.ba(Ra(b,c,d,f))};b.prototype.G=function(a,b,c,d,f){a.ba(Fa(La(b,c,d,f)))};b.prototype.find=function(a,b,c){ja(b)&&ja(c)?a.tb(b.search(new RegExp($a(c),"i"))):a.tb(-1)};b.prototype.left=function(a,b,c){a.ke(ja(b)?b.substr(0,c):"")};b.prototype.right=function(a,b,c){a.ke(ja(b)?b.substr(b.length-c):"")};b.prototype.replace=function(a,b,c,d){ja(b)&&ja(c)&&ja(d)?a.ke(b.replace(new RegExp($a(c),
"gi"),d)):a.ke(ja(b)?b:"")};b.prototype.trim=function(a,b){a.ke(ja(b)?b.trim():"")};b.prototype.OB=function(a){var b=ra(Math.random()*(arguments.length-1));a.pF(arguments[b+1])};b.prototype.Wr=function(a){a.ba(this.g.Wr/1E3)};b.prototype.Np=function(a){a.ba(this.g.Np)};d.lc=new b;d.cF=function(){var a,b,c,d,h,m,q=this.g.yd();a=0;for(c=this.le.length;a<c;a++){d=this.le[a];if(-1===d.time){if(!d.xu)continue}else if(d.time>this.g.we.kb)continue;q.ue=d.Kk;q.oe=d.oe;q.Ic=0;for(b in d.Yd)d.Yd.hasOwnProperty(b)&&
(h=this.g.X[parseInt(b,10)].Ya(),m=d.Yd[b],h.pb=m.wq,Ba(h.u,m.Bh),h=m,h.Bh.length=0,k.push(h));d.Kk.aF();this.g.Qr(d.Ab);d.bs=!0}b=a=0;for(c=this.le.length;a<c;a++)d=this.le[a],this.le[b]=d,d.bs?(Ua(d.Yd),d.Ab.length=0,f.push(d)):b++;this.le.length=b}})();
(function(){kb=function(a,b){var d=a[1],f=a[3],k=a[4],e=a[5],g=a[6],l=a[7],n=a[8];b.N||(b.N={});b.Qa||(b.Qa={});b.lc||(b.lc={});var h=b.N,m=b.Qa,q=b.lc;f&&(h.ZF=function(a,b){return bc(this.x,a,b)},h.$F=function(a,b){return bc(this.y,a,b)},h.fG=function(){var a=this.M;this.lb();var b=this.tc;return!(b.right<a.gc||b.bottom<a.hc||b.left>a.Dc||b.top>a.Cc)},h.gG=function(){this.lb();var a=this.tc,b=this.g.sb;return 0>a.right||0>a.bottom||a.left>b.width||a.top>b.height},h.uG=function(a,b,c){var d=this.Ya(),
e=d.Oe();if(!e.length)return!1;var f=e[0],g=f,m=Ra(f.x,f.y,b,c),k,h,l;k=1;for(h=e.length;k<h;k++)if(f=e[k],l=Ra(f.x,f.y,b,c),0===a&&l<m||1===a&&l>m)m=l,g=f;d.zn(g);return!0},m.UA=function(a){this.x!==a&&(this.x=a,this.Gb())},m.VA=function(a){this.y!==a&&(this.y=a,this.Gb())},m.KG=function(a,b){if(this.x!==a||this.y!==b)this.x=a,this.y=b,this.Gb()},m.LG=function(a,b){var c=a.mD(this);if(c){var d;c.Ag?(d=c.Ag(b,!0),c=c.Ag(b,!1)):(d=c.x,c=c.y);if(this.x!==d||this.y!==c)this.x=d,this.y=c,this.Gb()}},
m.mG=function(a){0!==a&&(this.x+=Math.cos(this.G)*a,this.y+=Math.sin(this.G)*a,this.Gb())},m.lG=function(a,b){0!==b&&(this.x+=Math.cos(v(a))*b,this.y+=Math.sin(v(a))*b,this.Gb())},q.em=function(a){a.ba(this.x)},q.fm=function(a){a.ba(this.y)},q.Ba=function(a){a.ba(this.g.xs(this))});k&&(h.YF=function(a,b){return bc(this.width,a,b)},h.VF=function(a,b){return bc(this.height,a,b)},m.Nv=function(a){this.width!==a&&(this.width=a,this.Gb())},m.HG=function(a){this.height!==a&&(this.height=a,this.Gb())},m.MG=
function(a,b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.Gb()},q.fB=function(a){a.ba(this.width)},q.bG=function(a){a.ba(this.height)},q.RF=function(a){this.lb();a.ba(this.tc.left)},q.TF=function(a){this.lb();a.ba(this.tc.top)},q.SF=function(a){this.lb();a.ba(this.tc.right)},q.QF=function(a){this.lb();a.ba(this.tc.bottom)});e&&(h.Hz=function(a,b){return Na(this.G,v(b))<=v(a)},h.jA=function(a){return Pa(this.G,v(a))},h.hA=function(a,b){var c=Ka(a),d=Ka(b),e=Ia(this.G);return Pa(d,
c)?Pa(e,c)&&!Pa(e,d):!(!Pa(e,c)&&Pa(e,d))},m.po=function(a){a=v(Ga(a));isNaN(a)||this.G===a||(this.G=a,this.Gb())},m.AG=function(a){0===a||isNaN(a)||(this.G+=v(a),this.G=Ia(this.G),this.Gb())},m.BG=function(a){0===a||isNaN(a)||(this.G-=v(a),this.G=Ia(this.G),this.Gb())},m.CG=function(a,b){var c=Oa(this.G,v(b),v(a));isNaN(c)||this.G===c||(this.G=c,this.Gb())},m.DG=function(a,b,c){a=Oa(this.G,Math.atan2(c-this.y,b-this.x),v(a));isNaN(a)||this.G===a||(this.G=a,this.Gb())},m.QA=function(a,b){var c=Math.atan2(b-
this.y,a-this.x);isNaN(c)||this.G===c||(this.G=c,this.Gb())},q.Gz=function(a){a.ba(Ja(this.G))});d||(h.WF=function(a,b,c){return bc(this.Lc[a],b,c)},h.dG=function(a){return this.Lc[a]},h.vG=function(a,b){var c=this.Ya(),d=c.Oe();if(!d.length)return!1;var e=d[0],f=e,g=e.Lc[b],m,k,h;m=1;for(k=d.length;m<k;m++)if(e=d[m],h=e.Lc[b],0===a&&h<g||1===a&&h>g)g=h,f=e;c.zn(f);return!0},h.tG=function(a){var b,c,d,e,f;if(this.g.ws().Os){f=this.Ya();if(f.pb)for(f.pb=!1,f.u.length=0,f.Xa.length=0,d=this.u,b=0,c=
d.length;b<c;b++)e=d[b],e.uid===a?f.Xa.push(e):f.u.push(e);else{d=b=0;for(c=f.u.length;b<c;b++)e=f.u[b],f.u[d]=e,e.uid===a?f.Xa.push(e):d++;f.u.length=d}this.Nf();return!!f.u.length}e=this.g.Bi(a);if(!e)return!1;f=this.Ya();if(!f.pb&&-1===f.u.indexOf(e))return!1;if(this.qa)for(a=e.type.Qb,b=0,c=a.length;b<c;b++){if(a[b]===this)return f.zn(e),this.Nf(),!0}else if(e.type===this)return f.zn(e),this.Nf(),!0;return!1},h.lr=function(){return!0},h.tv=function(){return!0},m.IG=function(a,b){var c=this.Lc;
ia(c[a])?c[a]=ia(b)?b:parseFloat(b):ja(c[a])&&(c[a]=ja(b)?b:b.toString())},m.KF=function(a,b){var c=this.Lc;ia(c[a])?c[a]=ia(b)?c[a]+b:c[a]+parseFloat(b):ja(c[a])&&(c[a]=ja(b)?c[a]+b:c[a]+b.toString())},m.NG=function(a,b){var c=this.Lc;ia(c[a])&&(c[a]=ia(b)?c[a]-b:c[a]-parseFloat(b))},m.EG=function(a,b){this.Lc[a]=b?1:0},m.PG=function(a){this.Lc[a]=1-this.Lc[a]},m.Jd=function(){this.g.gj(this)},m.oA||(m.oA=function(a){var b,c;try{b=JSON.parse(a)}catch(d){return}this.g.Jp(this,b,!0);this.Lf&&this.Lf();
if(this.Ea)for(a=0,b=this.Ea.length;a<b;++a)c=this.Ea[a],c.Lf&&c.Lf()}),q.aG=function(a){var b=a.ik.u.length,c,d,e;c=0;for(d=this.g.Pf.length;c<d;c++)e=this.g.Pf[c],a.ik.qa?0<=e.type.Qb.indexOf(a.ik)&&b++:e.type===a.ik&&b++;a.tb(b)},q.xG=function(a){a.tb(a.ik.Ya().Oe().length)},q.QG=function(a){a.tb(this.uid)},q.cG=function(a){a.tb(this.Dm())},q.Kz||(q.Kz=function(a){a.ke(JSON.stringify(this.g.su(this,!0)))}));g&&(h.nv=function(){return this.visible},m.Mv=function(a){!a!==!this.visible&&(this.visible=
a,this.g.ob=!0)},h.XF=function(a,b){return bc(fb(100*this.opacity),a,b)},m.JG=function(a){a/=100;0>a?a=0:1<a&&(a=1);a!==this.opacity&&(this.opacity=a,this.g.ob=!0)},q.Opacity=function(a){a.ba(fb(100*this.opacity))});l&&(h.eG=function(a){return a?this.M===a:!1},h.wG=function(a){var b=this.Ya(),c=b.Oe();if(!c.length)return!1;var d=c[0],e=d,f,g;f=1;for(g=c.length;f<g;f++)if(d=c[f],0===a){if(d.M.index>e.M.index||d.M.index===e.M.index&&d.Bg()>e.Bg())e=d}else if(d.M.index<e.M.index||d.M.index===e.M.index&&
d.Bg()<e.Bg())e=d;b.zn(e);return!0},m.pG=function(){var a=this.M,b=a.u;b.length&&b[b.length-1]===this||(a.wl(this,!1),a.jm(this,!1),this.g.ob=!0)},m.nG=function(){var a=this.M,b=a.u;b.length&&b[0]===this||(a.wl(this,!1),a.SE(this),this.g.ob=!0)},m.oG=function(a){a&&a!=this.M&&(this.M.wl(this,!0),this.M=a,a.jm(this,!0),this.g.ob=!0)},m.SG=function(a,b){var c=0===a;if(b){var d=b.Kw(this);d&&d.uid!==this.uid&&(this.M.index!==d.M.index&&(this.M.wl(this,!0),this.M=d.M,d.M.jm(this,!0)),this.M.CE(this,d,
c),this.g.ob=!0)}},q.jG=function(a){a.tb(this.M.$x)},q.iG=function(a){a.ke(this.M.name)},q.RG=function(a){a.tb(this.Bg())});n&&(m.FG=function(a,b){if(this.g.Z){var c=this.type.zs(b);if(!(0>c)){var d=1===a;this.mi[c]!==d&&(this.mi[c]=d,this.ci(),this.g.ob=!0)}}},m.GG=function(a,b,c){if(this.g.Z){var d=this.type.zs(a);0>d||(a=this.type.ya[d],d=this.Wb[d],b=Math.floor(b),0>b||b>=d.length||(1===this.g.Z.qD(a.nd,b)&&(c/=100),d[b]!==c&&(d[b]=c,a.sd&&(this.g.ob=!0))))}})};Hb=function(){this.Lr=this.Jr=!0;
this.type.to=!0;this.g.ob=!0;var a,b,d=this.Kr;a=0;for(b=d.length;a<b;++a)d[a](this);this.M.ig&&this.lb()};Ib=function(a){a&&this.Kr.push(a)};Kb=function(){if(this.Jr){var a=this.tc,b=this.ub;a.set(this.x,this.y,this.x+this.width,this.y+this.height);a.offset(-this.de*this.width,-this.ee*this.height);this.G?(a.offset(-this.x,-this.y),b.Qy(a,this.G),b.offset(this.x,this.y),b.jw(a)):b.In(a);a.normalize();this.Jr=!1;this.EF()}};var a=new ua(0,0,0,0);Lb=function(){if(this.M.ig){var c=this.M.De,b=this.tc;
a.set(c.Je(b.left),c.Ke(b.top),c.Je(b.right),c.Ke(b.bottom));this.ie.$o(a)||(this.ie.right<this.ie.left?c.update(this,null,a):c.update(this,this.ie,a),this.ie.Oo(a),this.M.Wh=!0)}};Mb=function(){if(this.Lr&&this.ph){this.lb();var c=this.type.Ho,b=this.tc;a.set(c.Je(b.left),c.Ke(b.top),c.Je(b.right),c.Ke(b.bottom));this.si.$o(a)||(this.si.right<this.si.left?c.update(this,null,a):c.update(this,this.si,a),this.si.Oo(a),this.Lr=!1)}};Jb=function(a,b){return this.tc.Pd(a,b)&&this.ub.Pd(a,b)?this.Ma&&!this.Ma.Pj()?
(this.Ma.wj(this.width,this.height,this.G),this.Ma.Pd(a-this.x,b-this.y)):!0:!1};zb=function(){this.type.Qq();return this.Lj};Nb=function(){this.M.Pu();return this.lg};Ob=function(){this.bb.length=0;var a,b;a=0;for(b=this.mi.length;a<b;a++)this.mi[a]&&this.bb.push(this.type.ya[a]);this.uz=!!this.bb.length};Ab=function(){return"Inst"+this.Cy};nb=function(a){if(a&&a.Qe&&a.type!=this){var b,d,f;b=0;for(d=a.siblings.length;b<d;b++)if(f=a.siblings[b],f.type==this)return f}a=this.Ya().Oe();return a.length?
a[0]:null};ob=function(a){var b=this.Ya().Oe();return b.length?b[a.Dm()%b.length]:null};mb=function(){if(this.Cl&&!this.qa){var a,b;a=0;for(b=this.u.length;a<b;a++)this.u[a].Lj=a;var d=a,f=this.g.Pf;a=0;for(b=f.length;a<b;++a)f[a].type===this&&(f[a].Lj=d++);this.Cl=!1}};xb=function(a){if(a<this.u.length)return this.u[a];a-=this.u.length;var b=this.g.Pf,d,f;d=0;for(f=b.length;d<f;++d)if(b[d].type===this){if(0===a)return b[d];--a}return null};pb=function(){return this.aj[this.vh]};qb=function(){this.vh++;
this.vh===this.aj.length?this.aj.push(new lb(this)):this.aj[this.vh].pb=!0};rb=function(){this.vh++;this.vh===this.aj.length&&this.aj.push(new lb(this));var a=this.aj[this.vh],b=this.aj[this.vh-1];b.pb?a.pb=!0:(a.pb=!1,Ba(a.u,b.u),Ba(a.Xa,b.Xa))};sb=function(){this.vh--};tb=function(a){var b,d,f,k,e,g=0;if(!this.qa)for(b=0,d=this.Qb.length;b<d;b++)for(e=this.Qb[b],f=0,k=e.uc.length;f<k;f++){if(a===e.uc[f].name)return this.Y.lastBehIndex=g,e.uc[f];g++}b=0;for(d=this.uc.length;b<d;b++){if(a===this.uc[b].name)return this.Y.lastBehIndex=
g,this.uc[b];g++}return null};ub=function(a){return this.lp(a)?this.Y.lastBehIndex:-1};vb=function(a){var b,d;b=0;for(d=this.ya.length;b<d;b++)if(this.ya[b].name===a)return b;return-1};wb=function(){if(this.Qe&&!this.qa){var a,b,d,f,k,e,g;this.Qq();e=this.Ya();var l=e.pb,n=(a=this.g.yd())&&a.ue&&a.ue.bg;a=0;for(b=this.te.length;a<b;a++)if(k=this.te[a],k!==this&&(k.Qq(),g=k.Ya(),g.pb=l,!l)){g.u.length=e.u.length;d=0;for(f=e.u.length;d<f;d++)g.u[d]=k.Lw(e.u[d].Lj);if(n)for(g.Xa.length=e.Xa.length,d=
0,f=e.Xa.length;d<f;d++)g.Xa[d]=k.Lw(e.Xa[d].Lj)}}};yb=function(){return"Type"+this.Ra};bc=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 kc={};function nc(a){this.g=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 da.hasOwnProperty(a)&&da[a].length?da[a][0].Ne():G.destination}function b(){return G.createGain?G.createGain():G.createGainNode()}function d(a){return G.createDelay?G.createDelay(a):G.createDelayNode(a)}function f(a){a.start?a.start(0):a.noteOn(0)}function k(a,b,c){a.start?a.start(0,b):a.noteGrainOn(0,b,c-b)}function e(a){try{a.stop?a.stop(0):a.noteOff(0)}catch(b){}}function g(a,
c,d,e,f,g){this.type="filter";this.$b=[a,c,d,e,f,g];this.Ua=b();this.xa=b();this.xa.gain.value=g;this.na=b();this.na.gain.value=1-g;this.wc=G.createBiquadFilter();this.wc.type="number"===typeof this.wc.type?a:Xe[a];this.wc.frequency.value=c;this.wc.detune&&(this.wc.detune.value=d);this.wc.Q.value=e;this.wc.gain.value=f;this.Ua.connect(this.wc);this.Ua.connect(this.na);this.wc.connect(this.xa)}function l(a,c,e){this.type="delay";this.$b=[a,c,e];this.Ua=b();this.xa=b();this.xa.gain.value=e;this.na=
b();this.na.gain.value=1-e;this.qn=b();this.kf=d(a);this.kf.delayTime.value=a;this.Wo=b();this.Wo.gain.value=c;this.Ua.connect(this.qn);this.Ua.connect(this.na);this.qn.connect(this.xa);this.qn.connect(this.kf);this.kf.connect(this.Wo);this.Wo.connect(this.qn)}function n(a,c,d,e){this.type="convolve";this.$b=[c,d,e];this.Ua=b();this.xa=b();this.xa.gain.value=d;this.na=b();this.na.gain.value=1-d;this.Aj=G.createConvolver();a&&(this.Aj.normalize=c,this.Aj.buffer=a);this.Ua.connect(this.Aj);this.Ua.connect(this.na);
this.Aj.connect(this.xa)}function h(a,c,e,g,m){this.type="flanger";this.$b=[a,c,e,g,m];this.Ua=b();this.na=b();this.na.gain.value=1-m/2;this.xa=b();this.xa.gain.value=m/2;this.dp=b();this.dp.gain.value=g;this.kf=d(a+c);this.kf.delayTime.value=a;this.bd=G.createOscillator();this.bd.frequency.value=e;this.Be=b();this.Be.gain.value=c;this.Ua.connect(this.kf);this.Ua.connect(this.na);this.kf.connect(this.xa);this.kf.connect(this.dp);this.dp.connect(this.kf);this.bd.connect(this.Be);this.Be.connect(this.kf.delayTime);
f(this.bd)}function m(a,c,d,e,g,m){this.type="phaser";this.$b=[a,c,d,e,g,m];this.Ua=b();this.na=b();this.na.gain.value=1-m/2;this.xa=b();this.xa.gain.value=m/2;this.wc=G.createBiquadFilter();this.wc.type="number"===typeof this.wc.type?7:"allpass";this.wc.frequency.value=a;this.wc.detune&&(this.wc.detune.value=c);this.wc.Q.value=d;this.bd=G.createOscillator();this.bd.frequency.value=g;this.Be=b();this.Be.gain.value=e;this.Ua.connect(this.wc);this.Ua.connect(this.na);this.wc.connect(this.xa);this.bd.connect(this.Be);
this.Be.connect(this.wc.frequency);f(this.bd)}function q(a){this.type="gain";this.$b=[a];this.ab=b();this.ab.gain.value=a}function p(a,c){this.type="tremolo";this.$b=[a,c];this.ab=b();this.ab.gain.value=1-c/2;this.bd=G.createOscillator();this.bd.frequency.value=a;this.Be=b();this.Be.gain.value=c/2;this.bd.connect(this.Be);this.Be.connect(this.ab.gain);f(this.bd)}function s(a,c){this.type="ringmod";this.$b=[a,c];this.Ua=b();this.xa=b();this.xa.gain.value=c;this.na=b();this.na.gain.value=1-c;this.Fn=
b();this.Fn.gain.value=0;this.bd=G.createOscillator();this.bd.frequency.value=a;this.bd.connect(this.Fn.gain);f(this.bd);this.Ua.connect(this.Fn);this.Ua.connect(this.na);this.Fn.connect(this.xa)}function t(a,c,d,e,f){this.type="distortion";this.$b=[a,c,d,e,f];this.Ua=b();this.mq=b();this.lq=b();this.kF(d,Math.pow(10,e/20));this.xa=b();this.xa.gain.value=f;this.na=b();this.na.gain.value=1-f;this.Tq=G.createWaveShaper();this.To=new Float32Array(65536);this.eD(a,c);this.Tq.To=this.To;this.Ua.connect(this.mq);
this.Ua.connect(this.na);this.mq.connect(this.Tq);this.Tq.connect(this.lq);this.lq.connect(this.xa)}function w(a,b,c,d,e){this.type="compressor";this.$b=[a,b,c,d,e];this.ab=G.createDynamicsCompressor();try{this.ab.threshold.value=a,this.ab.knee.value=b,this.ab.ratio.value=c,this.ab.attack.value=d,this.ab.release.value=e}catch(f){}}function z(a,b){this.type="analyser";this.$b=[a,b];this.ab=G.createAnalyser();this.ab.fftSize=a;this.ab.smoothingTimeConstant=b;this.cD=new Float32Array(this.ab.frequencyBinCount);
this.Ty=new Uint8Array(a);this.yn=0}function u(){this.wa=null;this.Mp=0;this.bj=[];this.Qt=this.Bp=this.Ap=0}function A(a,c){this.src=a;this.Pa=L;this.Vf=c;this.Zv=!1;var d=this;this.Ot=this.bu=null;this.ul=[];this.xq=0;this.Vu=this.ks=this.Xy=this.gq=!1;1===L&&c&&(this.Pa=0,this.bu=b());this.tj=this.mb=null;var e;switch(this.Pa){case 0:this.mb=new Audio;this.mb.addEventListener("canplaythrough",function(){d.Vu=!0});1===L&&G.createMediaElementSource&&!/wiiu/i.test(navigator.userAgent)&&(this.Xy=!0,
this.mb.addEventListener("canplay",function(){d.Ot||(d.Ot=G.createMediaElementSource(d.mb),d.Ot.connect(d.bu))}));this.mb.autoplay=!1;this.mb.dH="auto";this.mb.src=a;break;case 1:e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";e.onload=function(){d.tj=e.response;d.TB()};e.onerror=function(){d.ks=!0};e.send();break;case 2:this.mb=!0;break;case 3:this.mb=!0}}function C(a,d){var e=this;this.tag=d;this.Ge=this.yg=!0;this.src=a.src;this.buffer=a;this.Pa=L;this.Vf=a.Vf;this.playbackRate=
1;this.Vr=!0;this.qf=this.Xh=!1;this.je=0;this.Om=this.Wk=this.Fg=!1;this.volume=1;this.Oj=1===M&&!this.Vf||2===M;this.ql=1;this.startTime=this.Oj?x.we.kb:x.fh.kb;this.pc=this.xc=null;this.Pg=!1;this.oc=null;this.my=this.ly=this.ky=this.jy=this.oy=this.ny=0;this.P=null;var f=!1;1!==this.Pa||0!==this.buffer.Pa||this.buffer.Xy||(this.Pa=0);switch(this.Pa){case 0:this.Vf?(this.P=a.mb,f=!a.Zv,a.Zv=!0):(this.P=new Audio,this.P.autoplay=!1,this.P.src=a.mb.src,f=!0);f&&this.P.addEventListener("ended",function(){N=
e.tag;e.Ge=!0;x.trigger(nc.prototype.N.mr,D)});break;case 1:this.xc=b();this.xc.connect(c(d));1===this.buffer.Pa?a.mb&&(this.P=G.createBufferSource(),this.P.buffer=a.mb,this.P.connect(this.xc)):(this.P=this.buffer.mb,this.buffer.bu.connect(this.xc));break;case 2:this.P=new window.Media(Z+this.src,null,null,function(a){a===window.Media.MEDIA_STOPPED&&(e.Vr=!0,e.Ge=!0,N=e.tag,x.trigger(nc.prototype.N.mr,D))});break;case 3:this.P=!0}}function F(a,b){da.hasOwnProperty(a)?da[a].push(b):da[a]=[b];var c,
d,e,f,g=G.destination;if(da.hasOwnProperty(a)&&(e=da[a],e.length))for(g=e[0].Ne(),c=0,d=e.length;c<d;c++)f=e[c],c+1===d?f.ff(G.destination):f.ff(e[c+1].Ne());ib.length=0;if(a.length)for(c=0,d=W.length;c<d;c++)e=W[c],gb(a,e.tag)&&ib.push(e);else aa&&!aa.Kj()&&(ib.length=1,ib[0]=aa);c=0;for(d=ib.length;c<d;c++)ib[c].XE(g);oa&&Pc===a&&(oa.disconnect(),oa.connect(g))}function H(){}function E(){}var I=nc.prototype;I.Tc=function(a){this.Ub=a;this.g=a.g};I.Tc.prototype.rb=function(){};var x=null,D=null,
N="",Z="",L=0,G=null,wa=[],W=[],aa=null,K=!1,M=0,X=!1,J=1,S=0,O=0,ya=1,T=1,Ha=10,qa=1E4,Ma=1,oa=null,Pc="",Cb=!1,Db=[],da={},Xe="lowpass highpass bandpass lowshelf highshelf peaking notch allpass".split(" ");g.prototype.ff=function(a){this.xa.disconnect();this.xa.connect(a);this.na.disconnect();this.na.connect(a)};g.prototype.remove=function(){this.Ua.disconnect();this.wc.disconnect();this.xa.disconnect();this.na.disconnect()};g.prototype.Ne=function(){return this.Ua};l.prototype.ff=function(a){this.xa.disconnect();
this.xa.connect(a);this.na.disconnect();this.na.connect(a)};l.prototype.remove=function(){this.Ua.disconnect();this.qn.disconnect();this.kf.disconnect();this.Wo.disconnect();this.xa.disconnect();this.na.disconnect()};l.prototype.Ne=function(){return this.Ua};n.prototype.ff=function(a){this.xa.disconnect();this.xa.connect(a);this.na.disconnect();this.na.connect(a)};n.prototype.remove=function(){this.Ua.disconnect();this.Aj.disconnect();this.xa.disconnect();this.na.disconnect()};n.prototype.Ne=function(){return this.Ua};
h.prototype.ff=function(a){this.na.disconnect();this.na.connect(a);this.xa.disconnect();this.xa.connect(a)};h.prototype.remove=function(){this.Ua.disconnect();this.kf.disconnect();this.bd.disconnect();this.Be.disconnect();this.na.disconnect();this.xa.disconnect();this.dp.disconnect()};h.prototype.Ne=function(){return this.Ua};m.prototype.ff=function(a){this.na.disconnect();this.na.connect(a);this.xa.disconnect();this.xa.connect(a)};m.prototype.remove=function(){this.Ua.disconnect();this.wc.disconnect();
this.bd.disconnect();this.Be.disconnect();this.na.disconnect();this.xa.disconnect()};m.prototype.Ne=function(){return this.Ua};q.prototype.ff=function(a){this.ab.disconnect();this.ab.connect(a)};q.prototype.remove=function(){this.ab.disconnect()};q.prototype.Ne=function(){return this.ab};p.prototype.ff=function(a){this.ab.disconnect();this.ab.connect(a)};p.prototype.remove=function(){this.bd.disconnect();this.Be.disconnect();this.ab.disconnect()};p.prototype.Ne=function(){return this.ab};s.prototype.ff=
function(a){this.xa.disconnect();this.xa.connect(a);this.na.disconnect();this.na.connect(a)};s.prototype.remove=function(){this.bd.disconnect();this.Fn.disconnect();this.Ua.disconnect();this.xa.disconnect();this.na.disconnect()};s.prototype.Ne=function(){return this.Ua};t.prototype.kF=function(a,b){.01>a&&(a=.01);this.mq.gain.value=a;this.lq.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.eD=
function(a,b){for(var c=Math.pow(10,a/20),d=Math.pow(10,b/20),e=0,f=0;32768>f;++f)e=f/32768,e=this.shape(e,c,d),this.To[32768+f]=e,this.To[32768-f-1]=-e};t.prototype.ff=function(a){this.xa.disconnect();this.xa.connect(a);this.na.disconnect();this.na.connect(a)};t.prototype.remove=function(){this.Ua.disconnect();this.mq.disconnect();this.Tq.disconnect();this.lq.disconnect();this.xa.disconnect();this.na.disconnect()};t.prototype.Ne=function(){return this.Ua};w.prototype.ff=function(a){this.ab.disconnect();
this.ab.connect(a)};w.prototype.remove=function(){this.ab.disconnect()};w.prototype.Ne=function(){return this.ab};z.prototype.dd=function(){this.ab.getFloatFrequencyData(this.cD);this.ab.getByteTimeDomainData(this.Ty);for(var b=this.ab.fftSize,c=0,d=this.yn=0,e=0;c<b;c++)e=(this.Ty[c]-128)/128,0>e&&(e=-e),this.yn<e&&(this.yn=e),d+=e*e;this.yn=a(this.yn);a(Math.sqrt(d/b))};z.prototype.ff=function(a){this.ab.disconnect();this.ab.connect(a)};z.prototype.remove=function(){this.ab.disconnect()};z.prototype.Ne=
function(){return this.ab};u.prototype.Gn=function(a){if(this.wa=a)this.Ap=this.wa.x,this.Bp=this.wa.y;this.bj.length=0};u.prototype.rp=function(){return!!this.wa};u.prototype.dd=function(a){this.wa&&0!==a&&(this.Qt=La(this.Ap,this.Bp,this.wa.x,this.wa.y),a=Ra(this.Ap,this.Bp,this.wa.x,this.wa.y)/a,4>this.bj.length||this.bj.shift(),this.bj.push(a),this.Ap=this.wa.x,this.Bp=this.wa.y)};u.prototype.Pw=function(){if(!this.bj.length)return 0;var a,b,c=0;a=0;for(b=this.bj.length;a<b;a++)c+=this.bj[a];
return c/this.bj.length};u.prototype.Cs=function(){return Math.cos(this.Qt)*this.Pw()};u.prototype.Ds=function(){return Math.sin(this.Qt)*this.Pw()};var me=!1;A.prototype.TB=function(){if(!this.mb&&this.tj){var a=this;if(G.decodeAudioData)G.decodeAudioData(this.tj,function(b){a.mb=b;a.tj=null;var c,d,e;if(ha(a.iq)||X)ha(a.No)||(c=a.No.Aj,c.normalize=a.Zx,c.buffer=b);else if(a.ul.length){c=0;for(d=a.ul.length;c<d;c++){b=a.ul[c];e=new C(a,b.dz);e.vu(!0);if("undefined"!==typeof b.ay&&(b.wa=x.Bi(b.ay),
!b.wa))continue;if(b.wa){var f=Qa(b.wa.x,b.wa.y,-b.wa.M.yc(),S,O,!0),g=Qa(b.wa.x,b.wa.y,-b.wa.M.yc(),S,O,!1);e.uu(f,g,Fa(b.wa.G-b.wa.M.yc()),b.Is,b.Rt,b.Ut);e.Gn(b.wa)}else e.uu(b.x,b.y,b.I,b.Is,b.Rt,b.Ut);e.play(a.pt,a.Uu,a.xq);a.gq&&e.pause();W.push(e)}a.ul.length=0}else e=new C(a,a.iq),e.play(a.pt,a.Uu,a.xq),a.gq&&e.pause(),W.push(e)},function(){a.ks=!0});else if(this.mb=G.createBuffer(this.tj,!1),this.tj=null,ha(this.iq)||X)ha(this.No)||(b=this.No.Aj,b.normalize=this.Zx,b.buffer=this.mb);else{var b=
new C(this,this.iq);b.play(this.pt,this.Uu,this.xq);this.gq&&b.pause();W.push(b)}}};A.prototype.ax=function(){switch(this.Pa){case 0:var a=4<=this.mb.readyState;a&&(this.Vu=!0);return a||this.Vu;case 1:return!!this.tj||!!this.mb;case 2:return!0;case 3:return!0}return!1};A.prototype.RD=function(){switch(this.Pa){case 0:return this.ax();case 1:return!!this.mb;case 2:return!0;case 3:return!0}return!1};A.prototype.HD=function(){switch(this.Pa){case 0:return!!this.mb.error;case 1:return this.ks}return!1};
C.prototype.Kj=function(){var a;switch(this.Pa){case 0:return this.P.ended;case 1:if(1===this.buffer.Pa){if(!this.yg&&!this.Ge&&this.P.loop||this.qf)return!1;a=this.Oj?x.we.kb:x.fh.kb;return a-this.startTime>this.buffer.mb.duration}return this.P.ended;case 2:return this.Vr;case 3:!0}return!0};C.prototype.LB=function(){return this.yg||this.Ge?!0:this.Kj()};C.prototype.vu=function(a){1===L&&(!this.Pg&&a?this.xc&&(this.pc||(this.pc=G.createPanner(),this.pc.panningModel="number"===typeof this.pc.panningModel?
ya:["equalpower","HRTF","soundfield"][ya],this.pc.distanceModel="number"===typeof this.pc.distanceModel?T:["linear","inverse","exponential"][T],this.pc.refDistance=Ha,this.pc.maxDistance=qa,this.pc.rolloffFactor=Ma),this.xc.disconnect(),this.xc.connect(this.pc),this.pc.connect(c(this.tag)),this.Pg=!0):this.Pg&&!a&&this.xc&&(this.pc.disconnect(),this.xc.disconnect(),this.xc.connect(c(this.tag)),this.Pg=!1))};C.prototype.uu=function(a,b,c,d,e,f){this.Pg&&1===L&&(this.pc.setPosition(a,b,0),this.pc.setOrientation(Math.cos(v(c)),
Math.sin(v(c)),0),this.pc.coneInnerAngle=d,this.pc.coneOuterAngle=e,this.pc.coneOuterGain=f,this.ny=a,this.oy=b,this.jy=c,this.ky=d,this.ly=e,this.my=f)};C.prototype.Gn=function(a){this.Pg&&1===L&&(this.oc||(this.oc=new u),this.oc.Gn(a))};C.prototype.dd=function(a){if(this.Pg&&1===L&&this.oc&&this.oc.rp()&&this.Tk()){this.oc.dd(a);a=this.oc.wa;var b=Qa(a.x,a.y,-a.M.yc(),S,O,!0),c=Qa(a.x,a.y,-a.M.yc(),S,O,!1);this.pc.setPosition(b,c,0);b=0;"undefined"!==typeof this.oc.wa.G&&(b=a.G-a.M.yc(),this.pc.setOrientation(Math.cos(b),
Math.sin(b),0));b=Qa(this.oc.Cs(),this.oc.Ds(),-a.M.yc(),0,0,!0);c=Qa(this.oc.Cs(),this.oc.Ds(),-a.M.yc(),0,0,!1);this.pc.setVelocity(b,c,0)}};C.prototype.play=function(a,b,c){var d=this.P;this.Fg=a;this.volume=b;c=c||0;switch(this.Pa){case 0:1!==d.playbackRate&&(d.playbackRate=1);d.volume!==b*J&&(d.volume=b*J);d.loop!==a&&(d.loop=a);d.muted&&(d.muted=!1);if(d.currentTime!==c)try{d.currentTime=c}catch(e){}if(this.Vf&&Cb&&!x.kd)Db.push(this);else try{this.P.play()}catch(g){console&&console.log&&console.log("[C2] WARNING: exception trying to play audio '"+
this.buffer.src+"': ",g)}break;case 1:this.muted=!1;this.ql=1;if(1===this.buffer.Pa)this.yg||(this.P=G.createBufferSource(),this.P.buffer=this.buffer.mb,this.P.connect(this.xc)),this.P.loop=a,this.xc.gain.value=b*J,0===c?f(this.P):k(this.P,c,this.Hj());else{1!==d.playbackRate&&(d.playbackRate=1);d.loop!==a&&(d.loop=a);this.xc.gain.value=b*J;if(d.currentTime!==c)try{d.currentTime=c}catch(m){}this.Vf&&Cb&&!x.kd?Db.push(this):d.play()}break;case 2:(!this.yg&&this.Ge||0!==c)&&d.seekTo(c);d.play();this.Vr=
!1;break;case 3:x.zd?AppMobi.context.playSound(this.src,a):AppMobi.player.playSound(this.src,a)}this.playbackRate=1;this.startTime=(this.Oj?x.we.kb:x.fh.kb)-c;this.qf=this.Ge=this.yg=!1};C.prototype.stop=function(){switch(this.Pa){case 0:this.P.paused||this.P.pause();break;case 1:1===this.buffer.Pa?e(this.P):this.P.paused||this.P.pause();break;case 2:this.P.stop();break;case 3:x.zd&&AppMobi.context.stopSound(this.src)}this.Ge=!0;this.qf=!1};C.prototype.pause=function(){if(!(this.yg||this.Ge||this.Kj()||
this.qf)){switch(this.Pa){case 0:this.P.paused||this.P.pause();break;case 1:1===this.buffer.Pa?(this.je=this.As(),this.Fg&&(this.je%=this.Hj()),e(this.P)):this.P.paused||this.P.pause();break;case 2:this.P.pause();break;case 3:x.zd&&AppMobi.context.stopSound(this.src)}this.qf=!0}};C.prototype.$E=function(){if(!(this.yg||this.Ge||this.Kj())&&this.qf){switch(this.Pa){case 0:this.P.play();break;case 1:1===this.buffer.Pa?(this.P=G.createBufferSource(),this.P.buffer=this.buffer.mb,this.P.connect(this.xc),
this.P.loop=this.Fg,this.xc.gain.value=J*this.volume*this.ql,this.startTime=(this.Oj?x.we.kb:x.fh.kb)-this.je,k(this.P,this.je,this.Hj())):this.P.play();break;case 2:this.P.play();break;case 3:x.zd&&AppMobi.context.resumeSound(this.src)}this.qf=!1}};C.prototype.seek=function(a){if(!(this.yg||this.Ge||this.Kj()))switch(this.Pa){case 0:try{this.P.currentTime=a}catch(b){}break;case 1:if(1===this.buffer.Pa)this.qf?this.je=a:(this.pause(),this.je=a,this.$E());else try{this.P.currentTime=a}catch(c){}break;
case 3:x.zd&&AppMobi.context.seekSound(this.src,a)}};C.prototype.XE=function(a){1===this.Pa&&(this.Pg?(this.pc.disconnect(),this.pc.connect(a)):(this.xc.disconnect(),this.xc.connect(a)))};C.prototype.Hj=function(){switch(this.Pa){case 0:if("undefined"!==typeof this.P.duration)return this.P.duration;break;case 1:return this.buffer.mb.duration;case 2:return this.P.getDuration();case 3:if(x.zd)return AppMobi.context.getDurationSound(this.src)}return 0};C.prototype.As=function(){var a=this.Hj(),b=0;switch(this.Pa){case 0:"undefined"!==
typeof this.P.currentTime&&(b=this.P.currentTime);break;case 1:if(1===this.buffer.Pa){if(this.qf)return this.je;b=(this.Oj?x.we.kb:x.fh.kb)-this.startTime}else"undefined"!==typeof this.P.currentTime&&(b=this.P.currentTime);break;case 3:x.zd&&(b=AppMobi.context.getPlaybackTimeSound(this.src))}!this.Fg&&b>a&&(b=a);return b};C.prototype.Tk=function(){return!this.qf&&!this.yg&&!this.Ge&&!this.Kj()};C.prototype.CF=function(){var a=this.volume*J;switch(this.Pa){case 0:this.P.volume&&this.P.volume!==a&&
(this.P.volume=a);break;case 1:this.xc.gain.value=a*this.ql}};C.prototype.Zo=function(a){switch(this.Pa){case 0:this.P.muted!==!!a&&(this.P.muted=!!a);break;case 1:this.ql=a?0:1,this.xc.gain.value=J*this.volume*this.ql}};C.prototype.mF=function(){this.Wk=!0;this.Zo(this.Wk||this.Om)};C.prototype.Ny=function(a){this.Om=!!a;this.Zo(this.Wk||this.Om)};C.prototype.rz=function(){var a=this.playbackRate;this.Oj&&(a*=x.dj);switch(this.Pa){case 0:this.P.playbackRate!==a&&(this.P.playbackRate=a);break;case 1:1===
this.buffer.Pa?this.P.playbackRate.value!==a&&(this.P.playbackRate.value=a):this.P.playbackRate!==a&&(this.P.playbackRate=a)}};C.prototype.oF=function(a){switch(this.Pa){case 0:a?this.Tk()?(this.P.pause(),this.Xh=!0):this.Xh=!1:this.Xh&&this.P.play();break;case 1:a?this.Tk()?(1===this.buffer.Pa?(this.je=this.As(),this.Fg&&(this.je%=this.Hj()),e(this.P)):this.P.pause(),this.Xh=!0):this.Xh=!1:this.Xh&&(1===this.buffer.Pa?(this.P=G.createBufferSource(),this.P.buffer=this.buffer.mb,this.P.connect(this.xc),
this.P.loop=this.Fg,this.xc.gain.value=J*this.volume*this.ql,this.startTime=(this.Oj?x.we.kb:x.fh.kb)-this.je,k(this.P,this.je,this.Hj())):this.P.play());break;case 2:a?this.Tk()?(this.P.pause(),this.Xh=!0):this.Xh=!1:this.Xh&&this.P.play()}};I.kc=function(a){this.type=a;x=this.g=a.g;D=this;this.Rd=null;this.Wm=-600;!(this.g.yp||this.g.tp&&(this.g.Km||this.g.up))||this.g.Lm||this.g.Rb||this.g.Ps||(Cb=!0);G=null;"undefined"!==typeof AudioContext?(L=1,G=new AudioContext):"undefined"!==typeof webkitAudioContext&&
(L=1,G=new webkitAudioContext);(this.g.yp&&1===L||Cb)&&document.addEventListener("touchstart",function(){var a,b,c;!me&&G&&(a=G.createBuffer(1,1,22050),b=G.createBufferSource(),b.buffer=a,b.connect(G.destination),f(b),me=!0);if(Cb){if(!X)for(a=0,b=Db.length;a<b;++a)c=Db[a],c.Ge||c.qf||c.P.play();Db.length=0}},!0);1!==L&&(this.g.pf&&"undefined"!==typeof window.Media?L=2:this.g.Sk&&(L=3));2===L&&(Z=location.href,a=Z.lastIndexOf("/"),-1<a&&(Z=Z.substr(0,a+1)),Z=Z.replace("file://",""));if(this.g.bx&&
this.g.SD&&"undefined"===typeof Audio)alert("It looks like you're using Safari for Windows without Quicktime.  Audio cannot be played until Quicktime is installed."),this.g.gj(this);else{if(this.g.zd)K=this.g.tp;else try{K=!!(new Audio).canPlayType('audio/ogg; codecs="vorbis"')}catch(b){K=!1}this.g.Fu(this)}};var za=I.kc.prototype;za.rb=function(){this.g.Ek=this;M=this.Aa[0];this.Yh=this.Aa[1];this.NE=0!==this.Aa[2];ya=this.Aa[3];T=this.Aa[4];this.Wm=-this.Aa[5];Ha=this.Aa[6];qa=this.Aa[7];Ma=this.Aa[8];
this.Rd=new u;var a=this.g.Ga||this.g.width,b=this.g.Fa||this.g.height;1===L&&(G.listener.speedOfSound=this.Aa[9],G.listener.dopplerFactor=this.Aa[10],G.listener.setPosition(a/2,b/2,this.Wm),G.listener.setOrientation(0,0,1,0,-1,0),window.c2OnAudioMicStream=function(a,b){oa&&oa.disconnect();Pc=b.toLowerCase();oa=G.createMediaStreamSource(a);oa.connect(c(Pc))});this.g.xB(function(a){D.JE(a)});var d=this;this.g.so(function(a){d.un(a)})};za.un=function(a){var b,c,d;b=0;for(c=W.length;b<c;b++)d=W[b],d.oc&&
d.oc.wa===a&&(d.oc.wa=null,d.Pg&&d.Tk()&&d.Fg&&d.stop());this.Rd.wa===a&&(this.Rd.wa=null)};za.Ee=function(){var a={silent:X,masterVolume:J,listenerZ:this.Wm,listenerUid:this.Rd.rp()?this.Rd.wa.uid:-1,playing:[],effects:{}},b=a.playing,c,d,e,f,g,m;c=0;for(d=W.length;c<d;c++)e=W[c],!e.Tk()||3===this.Yh||e.Vf&&1===this.Yh||!e.Vf&&2===this.Yh||(f=e.As(),e.Fg&&(f%=e.Hj()),f={tag:e.tag,buffersrc:e.buffer.src,is_music:e.Vf,playbackTime:f,volume:e.volume,looping:e.Fg,muted:e.Wk,playbackRate:e.playbackRate,
paused:e.qf,resume_position:e.je},e.Pg&&(f.pan={},m=f.pan,e.oc&&e.oc.rp()?m.objUid=e.oc.wa.uid:(m.x=e.ny,m.y=e.oy,m.a=e.jy),m.ia=e.ky,m.oa=e.ly,m.og=e.my),b.push(f));b=a.effects;for(g in da)if(da.hasOwnProperty(g)){e=[];c=0;for(d=da[g].length;c<d;c++)e.push({type:da[g][c].type,params:da[g][c].$b});b[g]=e}return a};var Eb=[];za.rf=function(a){var b=a.silent;J=a.masterVolume;this.Wm=a.listenerZ;this.Rd.Gn(null);var c=a.listenerUid;-1!==c&&(this.Rd.Mp=c,Eb.push(this.Rd));var c=a.playing,d,e,f,k,A,C,
E,H,D,x,I;if(3!==this.Yh)for(d=0,e=W.length;d<e;d++)D=W[d],D.Vf&&1===this.Yh||(D.Vf||2!==this.Yh)&&D.stop();for(A in da)if(da.hasOwnProperty(A))for(d=0,e=da[A].length;d<e;d++)da[A][d].remove();Ua(da);for(A in a.effects)if(a.effects.hasOwnProperty(A))for(C=a.effects[A],d=0,e=C.length;d<e;d++)switch(f=C[d].type,x=C[d].params,f){case "filter":F(A,new g(x[0],x[1],x[2],x[3],x[4],x[5]));break;case "delay":F(A,new l(x[0],x[1],x[2]));break;case "convolve":f=x[2];D=this.kp(f,!1);D.mb?f=new n(D.mb,x[0],x[1],
f):(f=new n(null,x[0],x[1],f),D.Zx=x[0],D.No=f);F(A,f);break;case "flanger":F(A,new h(x[0],x[1],x[2],x[3],x[4]));break;case "phaser":F(A,new m(x[0],x[1],x[2],x[3],x[4],x[5]));break;case "gain":F(A,new q(x[0]));break;case "tremolo":F(A,new p(x[0],x[1]));break;case "ringmod":F(A,new s(x[0],x[1]));break;case "distortion":F(A,new t(x[0],x[1],x[2],x[3],x[4]));break;case "compressor":F(A,new w(x[0],x[1],x[2],x[3],x[4]));break;case "analyser":F(A,new z(x[0],x[1]))}d=0;for(e=c.length;d<e;d++)3===this.Yh||
(a=c[d],f=a.buffersrc,k=a.is_music,A=a.tag,C=a.playbackTime,E=a.looping,H=a.volume,I=(x=a.pan)&&x.hasOwnProperty("objUid")?x.objUid:-1,k&&1===this.Yh)||!k&&2===this.Yh||((D=this.Hw(f,A,k,E,H))?(D.je=a.resume_position,D.vu(!!x),D.play(E,H,C),D.rz(),D.CF(),D.Zo(D.Wk||D.Om),a.paused&&D.pause(),a.muted&&D.mF(),D.Zo(D.Wk||D.Om),x&&(-1!==I?(D.oc=D.oc||new u,D.oc.Mp=I,Eb.push(D.oc)):D.uu(x.x,x.y,x.a,x.ia,x.oa,x.og))):(D=this.kp(f,k),D.xq=C,D.gq=a.paused,x&&(-1!==I?D.ul.push({ay:I,Is:x.ia,Rt:x.oa,Ut:x.og,
dz:A}):D.ul.push({x:x.x,y:x.y,I:x.a,Is:x.ia,Rt:x.oa,Ut:x.og,dz:A}))));if(b&&!X){d=0;for(e=W.length;d<e;d++)W[d].Ny(!0);X=!0}else if(!b&&X){d=0;for(e=W.length;d<e;d++)W[d].Ny(!1);X=!1}};za.Lf=function(){var a,b,c,d;a=0;for(b=Eb.length;a<b;a++)c=Eb[a],d=this.g.Bi(c.Mp),c.Gn(d),c.Mp=-1,d&&(S=d.x,O=d.y);Eb.length=0};za.JE=function(a){if(!this.NE){!a&&G&&G.resume&&G.resume();var b,c;b=0;for(c=W.length;b<c;b++)W[b].oF(a);a&&G&&G.suspend&&G.suspend()}};za.dd=function(){var a=this.g.Ba,b,c,d;b=0;for(c=W.length;b<
c;b++)d=W[b],d.dd(a),0===d.Pa||3===d.Pa||d.yg||d.Ge||!d.Kj()||(d.Ge=!0,N=d.tag,x.trigger(nc.prototype.N.mr,D)),0!==M&&d.rz();var e,f;for(e in da)if(da.hasOwnProperty(e))for(d=da[e],b=0,c=d.length;b<c;b++)f=d[b],f.dd&&f.dd();1===L&&this.Rd.rp()&&(this.Rd.dd(a),S=this.Rd.wa.x,O=this.Rd.wa.y,G.listener.setPosition(this.Rd.wa.x,this.Rd.wa.y,this.Wm),G.listener.setVelocity(this.Rd.Cs(),this.Rd.Ds(),0))};var Fb=[];za.nF=function(a){var b,c,d,e,f,g=0;b=0;for(c=a.length;b<c;++b)if(d=a[b],e=d[0],d=2*d[1],
(f=4<e.length&&".ogg"===e.substr(e.length-4))&&K||!f&&!K)Fb.push({filename:e,size:d,wa:null}),g+=d;return g};za.rF=function(){var a,b,c,d;a=0;for(b=Fb.length;a<b;++a)c=Fb[a],d=this.g.ls+c.filename,c.wa=this.kp(d,!1)};za.nD=function(){var a=0,b,c,d;b=0;for(c=Fb.length;b<c;++b)d=Fb[b],d.wa.RD()||d.wa.HD()||this.g.Rb||this.g.up?a+=d.size:d.wa.ax()&&(a+=Math.floor(d.size/2));return a};za.kp=function(a,b){var c,d,e,f=null;c=0;for(d=wa.length;c<d;c++)if(e=wa[c],e.src===a){f=e;break}f||(f=new A(a,b),wa.push(f));
return f};za.Hw=function(a,b,c,d,e){var f,g,m;f=0;for(g=W.length;f<g;f++)if(m=W[f],m.src===a&&(m.LB()||c))return m.tag=b,m;a=this.kp(a,c);if(!a.mb)return"<preload>"!==b&&(a.iq=b,a.pt=d,a.Uu=e),null;m=new C(a,b);W.push(m);return m};var ib=[];H.prototype.mr=function(a){return gb(N,a)};I.N=new H;E.prototype.Play=function(a,b,c,d){!X&&(c=Math.pow(10,c/20),0>c&&(c=0),1<c&&(c=1),aa=this.Hw(this.g.ls+a[0]+(K?".ogg":".m4a"),d,a[1],0!==b,c))&&(aa.vu(!1),aa.play(0!==b,c))};I.Qa=new E;I.lc=new function(){}})();
function oc(a){this.g=a}
(function(){function a(){}function c(){}var b=oc.prototype;b.Tc=function(a){this.Ub=a;this.g=a.g};b.Tc.prototype.rb=function(){};b.kc=function(a){this.type=a;this.g=a.g;this.Do=Array(4);this.gz=this.Nq=this.Dl=this.Ti=this.Si=0;this.Fs=!1};var d=b.kc.prototype;d.rb=function(){var a=this;if(!this.g.Rb){jQuery(document).mousemove(function(b){a.Xt(b)});jQuery(document).mousedown(function(b){a.Wt(b)});jQuery(document).mouseup(function(b){a.Yt(b)});jQuery(document).dblclick(function(b){a.HE(b)});var b=
function(b){a.KE(b)};document.addEventListener("mousewheel",b,!1);document.addEventListener("DOMMouseScroll",b,!1)}};var f={left:0,top:0};d.Xt=function(a){var b=this.g.Rb?f:jQuery(this.g.canvas).offset();this.Si=a.pageX-b.left;this.Ti=a.pageY-b.top};d.Ux=function(){return 0<this.g.be?!0:0<=this.Si&&0<=this.Ti&&this.Si<this.g.width&&this.Ti<this.g.height};d.Wt=function(a){this.Ux()&&(this.g.Qk&&!this.g.Uf&&a.preventDefault(),this.Do[a.which]=!0,this.g.kd=!0,this.g.trigger(oc.prototype.N.vA,this),this.Dl=
a.which-1,this.Nq=0,this.g.trigger(oc.prototype.N.sv,this),this.g.trigger(oc.prototype.N.xv,this),this.g.kd=!1)};d.Yt=function(a){this.Do[a.which]&&(this.g.Qk&&!this.g.Uf&&a.preventDefault(),this.g.Qk=!0,this.Do[a.which]=!1,this.g.kd=!0,this.Dl=a.which-1,this.g.trigger(oc.prototype.N.yv,this),this.g.kd=!1)};d.HE=function(a){this.Ux()&&(a.preventDefault(),this.g.kd=!0,this.Dl=a.which-1,this.Nq=1,this.g.trigger(oc.prototype.N.sv,this),this.g.trigger(oc.prototype.N.xv,this),this.g.kd=!1)};d.KE=function(a){this.gz=
0>(a.wheelDelta?a.wheelDelta:a.detail?-a.detail:0)?0:1;this.Fs=!1;this.g.kd=!0;this.g.trigger(oc.prototype.N.GA,this);this.g.kd=!1;this.Fs&&hb(a)&&a.preventDefault()};a.prototype.sv=function(a,b){return a===this.Dl&&b===this.Nq};a.prototype.vA=function(){return!0};a.prototype.iA=function(a){return this.Do[a+1]};a.prototype.yv=function(a){return a===this.Dl};a.prototype.xv=function(a,b,c){return a!==this.Dl||b!==this.Nq?!1:this.g.On(c,this.Si,this.Ti)};a.prototype.GA=function(a){this.Fs=!0;return a===
this.gz};b.N=new a;b.Qa=new function(){};c.prototype.em=function(a,b){var c,d,f,h,m;ha(b)?(c=this.g.Ah(0),d=c.scale,f=c.Id,h=c.ge,m=c.G,c.scale=1,c.Id=1,c.ge=1,c.G=0,a.ba(c.hd(this.Si,this.Ti,!0)),c.scale=d,c.Id=f,c.ge=h,c.G=m):(c=ia(b)?this.g.Ah(b):this.g.Am(b))?a.ba(c.hd(this.Si,this.Ti,!0)):a.ba(0)};c.prototype.fm=function(a,b){var c,d,f,h,m;ha(b)?(c=this.g.Ah(0),d=c.scale,f=c.Id,h=c.he,m=c.G,c.scale=1,c.Id=1,c.he=1,c.G=0,a.ba(c.hd(this.Si,this.Ti,!1)),c.scale=d,c.Id=f,c.he=h,c.G=m):(c=ia(b)?this.g.Ah(b):
this.g.Am(b))?a.ba(c.hd(this.Si,this.Ti,!1)):a.ba(0)};b.lc=new c})();function mc(a){this.g=a}
(function(){function a(){if(0===this.$r.length){var a=document.createElement("canvas");a.width=this.width;a.height=this.height;var b=a.getContext("2d");this.Bl?b.drawImage(this.gb,this.sl,this.tl,this.width,this.height,0,0,this.width,this.height):b.drawImage(this.gb,0,0,this.width,this.height);this.$r=a.toDataURL("image/png")}return this.$r}function c(){}function b(a){a[0]=0;a[1]=0;a[2]=0;m.push(a)}function d(a,b){return a<b?""+a+","+b:""+b+","+a}function f(a,b,c,e){b=b.uid;c=c.uid;var f=d(b,c);if(a.hasOwnProperty(f))a[f][2]=
e;else{var g=m.length?m.pop():[0,0,0];g[0]=b;g[1]=c;g[2]=e;a[f]=g}}function k(a,c,e){c=d(c.uid,e.uid);a.hasOwnProperty(c)&&(b(a[c]),delete a[c])}function e(a,b,c){b=d(b.uid,c.uid);if(a.hasOwnProperty(b))return q=a[b][2],!0;q=-2;return!1}var g=mc.prototype;g.Tc=function(a){this.Ub=a;this.g=a.g};var l=g.Tc.prototype;l.rb=function(){if(!this.qa){var b,c,d,e,f,m,g,h,k;this.Mf=[];this.Gm=!1;b=0;for(c=this.pe.length;b<c;b++){f=this.pe[b];g={};g.name=f[0];g.speed=f[1];g.loop=f[2];g.nu=f[3];g.uq=f[4];g.uy=
f[5];g.Ra=f[6];g.frames=[];d=0;for(e=f[7].length;d<e;d++)m=f[7][d],h={},h.Cu=m[0],h.Du=m[1],h.sl=m[2],h.tl=m[3],h.width=m[4],h.height=m[5],h.duration=m[6],h.de=m[7],h.ee=m[8],h.Js=m[9],h.jq=m[10],h.wy=m[11],h.Bl=0!==h.width,h.$r="",h.$G=a,k={left:0,top:0,right:1,bottom:1},h.wu=k,h.Hb=null,(k=this.g.aD(m[0]))?h.gb=k:(h.gb=new Image,h.gb.QB=m[0],h.gb.sw=m[1],h.gb.KB=null,this.g.yz(h.gb,m[0])),g.frames.push(h),this.Mf.push(h);this.pe[b]=g}}};l.qz=function(){var a,b,c;a=0;for(b=this.u.length;a<b;a++)c=
this.u[a],c.Ro=c.gf.Hb};l.dq=function(){if(!this.qa){var a,b,c;a=0;for(b=this.Mf.length;a<b;++a)c=this.Mf[a],c.gb.KB=null,c.Hb=null;this.Gm=!1;this.qz()}};l.Zt=function(){if(!this.qa&&this.u.length){var a,b,c;a=0;for(b=this.Mf.length;a<b;++a)c=this.Mf[a],c.Hb=this.g.Z.Lp(c.gb,!1,this.g.cb,c.wy);this.qz()}};l.kt=function(){if(!this.qa&&!this.Gm&&this.g.Z){var a,b,c;a=0;for(b=this.Mf.length;a<b;++a)c=this.Mf[a],c.Hb=this.g.Z.Lp(c.gb,!1,this.g.cb,c.wy);this.Gm=!0}};l.Lu=function(){if(!this.qa&&!this.u.length&&
this.Gm){var a,b,c;a=0;for(b=this.Mf.length;a<b;++a)c=this.Mf[a],this.g.Z.deleteTexture(c.Hb),c.Hb=null;this.Gm=!1}};var n=[];l.fu=function(a){var b,c,d;b=n.length=0;for(c=this.Mf.length;b<c;++b)d=this.Mf[b].gb,-1===n.indexOf(d)&&(a.drawImage(d,0,0),n.push(d))};g.kc=function(a){this.type=a;this.g=a.g;a=this.type.pe[0].frames[0].jq;this.Ce?this.Ma.Jn(a):this.Ma=new ab(a)};var h=g.kc.prototype;h.rb=function(){this.visible=0===this.Aa[0];this.ph=0!==this.Aa[3];1===this.type.pe.length&&1===this.type.pe[0].frames.length||
0===this.type.pe[0].speed||this.g.Fu(this);this.Cb=this.Gw(this.Aa[1])||this.type.pe[0];this.ca=this.Aa[2];0>this.ca&&(this.ca=0);this.ca>=this.Cb.frames.length&&(this.ca=this.Cb.frames.length-1);var a=this.Cb.frames[this.ca];this.Ma.Jn(a.jq);this.de=a.de;this.ee=a.ee;this.pm=this.Cb.speed;this.Ce?this.sg.reset():this.sg=new Za;this.zh=this.sg.kb;this.sj=!0;this.mh=0;this.rj=!0;this.Pr=this.bw="";this.MB=0;this.Or=-1;this.type.kt();var b,c,d,e,f,m,g,a=0;for(b=this.type.pe.length;a<b;a++)for(e=this.type.pe[a],
c=0,d=e.frames.length;c<d;c++)f=e.frames[c],0===f.width&&(f.width=f.gb.width,f.height=f.gb.height),f.Bl&&(g=f.gb,m=f.wu,m.left=f.sl/g.width,m.top=f.tl/g.height,m.right=(f.sl+f.width)/g.width,m.bottom=(f.tl+f.height)/g.height,0===f.sl&&0===f.tl&&f.width===g.width&&f.height===g.height&&(f.Bl=!1));this.gf=this.Cb.frames[this.ca];this.Ro=this.gf.Hb};h.Ee=function(){var a={a:this.Cb.Ra,f:this.ca,cas:this.pm,fs:this.zh,ar:this.mh,at:this.sg.kb};this.sj||(a.ap=this.sj);this.rj||(a.af=this.rj);return a};
h.rf=function(a){var b=this.fD(a.a);b&&(this.Cb=b);this.ca=a.f;0>this.ca&&(this.ca=0);this.ca>=this.Cb.frames.length&&(this.ca=this.Cb.frames.length-1);this.pm=a.cas;this.zh=a.fs;this.mh=a.ar;this.sg.reset();this.sg.kb=a.at;this.sj=a.hasOwnProperty("ap")?a.ap:!0;this.rj=a.hasOwnProperty("af")?a.af:!0;this.gf=this.Cb.frames[this.ca];this.Ro=this.gf.Hb;this.Ma.Jn(this.gf.jq);this.de=this.gf.de;this.ee=this.gf.ee};h.Ir=function(a){this.ca=a?0:this.Cb.frames.length-1;this.sj=!1;this.bw=this.Cb.name;this.g.trigger(mc.prototype.N.uA,
this);this.g.trigger(mc.prototype.N.tA,this);this.mh=0};h.bH=function(){return this.sg.kb};h.dd=function(){this.sg.add(this.g.xs(this));this.Pr.length&&this.WB();0<=this.Or&&this.XB();var a=this.sg.kb,b=this.Cb,c=b.frames[this.ca],d=c.duration/this.pm;this.sj&&a>=this.zh+d&&(this.rj?this.ca++:this.ca--,this.zh+=d,this.ca>=b.frames.length&&(b.uy?(this.rj=!1,this.ca=b.frames.length-2):b.loop?this.ca=b.uq:(this.mh++,this.mh>=b.nu?this.Ir(!1):this.ca=b.uq)),0>this.ca&&(b.uy?(this.ca=1,this.rj=!0,b.loop||
(this.mh++,this.mh>=b.nu&&this.Ir(!0))):b.loop?this.ca=b.uq:(this.mh++,this.mh>=b.nu?this.Ir(!0):this.ca=b.uq)),0>this.ca?this.ca=0:this.ca>=b.frames.length&&(this.ca=b.frames.length-1),a>this.zh+b.frames[this.ca].duration/this.pm&&(this.zh=a),a=b.frames[this.ca],this.Ak(c,a),this.g.ob=!0)};h.Gw=function(a){var b,c,d;b=0;for(c=this.type.pe.length;b<c;b++)if(d=this.type.pe[b],gb(d.name,a))return d;return null};h.fD=function(a){var b,c,d;b=0;for(c=this.type.pe.length;b<c;b++)if(d=this.type.pe[b],d.Ra===
a)return d;return null};h.WB=function(){var a=this.Cb.frames[this.ca],b=this.Gw(this.Pr);this.Pr="";!b||gb(b.name,this.Cb.name)&&this.sj||(this.Cb=b,this.pm=b.speed,0>this.ca&&(this.ca=0),this.ca>=this.Cb.frames.length&&(this.ca=this.Cb.frames.length-1),1===this.MB&&(this.ca=0),this.sj=!0,this.zh=this.sg.kb,this.rj=!0,this.Ak(a,this.Cb.frames[this.ca]),this.g.ob=!0)};h.XB=function(){var a=this.Cb.frames[this.ca],b=this.ca;this.ca=ra(this.Or);0>this.ca&&(this.ca=0);this.ca>=this.Cb.frames.length&&
(this.ca=this.Cb.frames.length-1);b!==this.ca&&(this.Ak(a,this.Cb.frames[this.ca]),this.zh=this.sg.kb,this.g.ob=!0);this.Or=-1};h.Ak=function(a,b){var c=a.width,d=a.height,e=b.width,f=b.height;c!=e&&(this.width*=e/c);d!=f&&(this.height*=f/d);this.de=b.de;this.ee=b.ee;this.Ma.Jn(b.jq);this.Gb();this.gf=b;this.Ro=b.Hb;c=0;for(d=this.Ea.length;c<d;c++)e=this.Ea[c],e.IE&&e.IE(a,b);this.g.trigger(mc.prototype.N.Ak,this)};h.vg=function(a){a.globalAlpha=this.opacity;var b=this.gf,c=b.Bl,d=b.gb,e=this.x,
f=this.y,m=this.width,g=this.height;if(0===this.G&&0<=m&&0<=g)e-=this.de*m,f-=this.ee*g,this.g.Rg&&(e=Math.round(e),f=Math.round(f)),c?a.drawImage(d,b.sl,b.tl,b.width,b.height,e,f,m,g):a.drawImage(d,e,f,m,g);else{this.g.Rg&&(e=Math.round(e),f=Math.round(f));a.save();var h=0<m?1:-1,k=0<g?1:-1;a.translate(e,f);1===h&&1===k||a.scale(h,k);a.rotate(this.G*h*k);e=0-this.de*ma(m);f=0-this.ee*ma(g);c?a.drawImage(d,b.sl,b.tl,b.width,b.height,e,f,ma(m),ma(g)):a.drawImage(d,e,f,ma(m),ma(g));a.restore()}};h.lf=
function(a){a.Fe(this.Ro);a.mk(this.opacity);var b=this.gf,c=this.ub;if(this.g.Rg){var d=Math.round(this.x)-this.x,e=Math.round(this.y)-this.y;b.Bl?a.Tg(c.ec+d,c.fc+e,c.Gd+d,c.Hd+e,c.vd+d,c.wd+e,c.td+d,c.ud+e,b.wu):a.qq(c.ec+d,c.fc+e,c.Gd+d,c.Hd+e,c.vd+d,c.wd+e,c.td+d,c.ud+e)}else b.Bl?a.Tg(c.ec,c.fc,c.Gd,c.Hd,c.vd,c.wd,c.td,c.ud,b.wu):a.qq(c.ec,c.fc,c.Gd,c.Hd,c.vd,c.wd,c.td,c.ud)};h.jD=function(a){var b=this.gf,c,d;c=0;for(d=b.Js.length;c<d;c++)if(gb(a,b.Js[c][0]))return c;return-1};h.Ag=function(a,
b){var c=this.gf,d=c.Js,e;e=ja(a)?this.jD(a):a-1;e=ra(e);if(0>e||e>=d.length)return b?this.x:this.y;var f=(d[e][1]-c.de)*this.width,d=d[e][2],d=(d-c.ee)*this.height,c=Math.cos(this.G);e=Math.sin(this.G);var m=f*c-d*e,d=d*c+f*e,f=m+this.x,d=d+this.y;return b?f:d};var m=[],q=-2,p=[];c.prototype.xA=function(a){if(!a)return!1;var c=this.g,d=c.ws(),m=d.type;d.Y.collmemory||(d.Y.collmemory={},c.so(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.Y.collmemory)));var d=d.Y.collmemory,g=m.Ya(),h=a.Ya(),g=g.Oe(),l,n,s,t,D,N,Z,L=this.g.$e,G=L-1,wa=c.yd().ue;for(n=0;n<g.length;n++){s=g[n];h.pb?(s.lb(),this.g.hD(s.M,a,s.tc,p),l=p):l=h.Oe();for(t=0;t<l.length;t++)D=l[t],c.wF(s,D)||c.NB(s,D)?(N=e(d,s,D),N=!N||q<G,f(d,s,D,L),N&&(c.oq(wa.Ab),N=m.Ya(),Z=a.Ya(),N.pb=!1,Z.pb=!1,m===a?(N.u.length=2,N.u[0]=s,N.u[1]=D,m.Nf()):(N.u.length=1,Z.u.length=1,N.u[0]=s,Z.u[0]=D,m.Nf(),a.Nf()),wa.bF(),c.kk(wa.Ab))):k(d,s,D);p.length=0}return!1};
var s=new ca,t=!1;new ua(0,0,0,0);l.finish=function(a){if(t){if(a){var b=this.g.yd().ue.bg;a=null.Ya();var c=s.kg(),d,e;if(a.pb){a.pb=!1;a.u.length=c.length;d=0;for(e=c.length;d<e;d++)a.u[d]=c[d];if(b)for(d=a.Xa.length=0,e=null.u.length;d<e;d++)c=null.u[d],s.contains(c)||a.Xa.push(c)}else if(b)for(b=a.u.length,a.u.length=b+c.length,d=0,e=c.length;d<e;d++)a.u[b+d]=c[d],Ea(a.Xa,c[d]);else Ba(a.u,c);null.Nf()}s.clear();t=!1}};c.prototype.tA=function(a){return gb(this.bw,a)};c.prototype.uA=function(){return!0};
c.prototype.Ak=function(){return!0};g.N=new c;g.Qa=new function(){};g.lc=new function(){}})();function pc(a){this.g=a}
(function(){function a(){return g.length?g.pop():{}}function c(a){var b,c;b=0;for(c=a.length;b<c;b++)g.push(a[b]);a.length=0}function b(){}function d(){}var f=pc.prototype;f.rb=function(){f.Qa.Nv=function(a){this.width!==a&&(this.width=a,this.cj=!0,this.Gb())}};f.Tc=function(a){this.Ub=a;this.g=a.g};var k=f.Tc.prototype;k.rb=function(){};k.dq=function(){if(!this.qa){var a,b,c;a=0;for(b=this.u.length;a<b;a++)c=this.u[a],c.Og=null,c.hk=null,c.Ae=null}};f.kc=function(a){this.type=a;this.g=a.g;this.Ce?
this.Ji.length=0:this.Ji=[];this.cj=!0};k=f.kc.prototype;k.rb=function(){this.text=this.Aa[0];this.visible=0===this.Aa[1];this.font=this.Aa[2];this.color=this.Aa[3];this.qp=this.Aa[4];this.Rq=this.Aa[5];this.Xu=0===this.Aa[7];this.et=this.Fp=this.width;this.Ep=this.height;this.it=this.Aa[8];this.hp=this.Lk="";this.bz=this.cz=this.Dn=0;this.LE();this.Ae=this.hk=this.Og=null;this.Xx=!1;this.Vm=this.g.$e;this.Ce?this.Xi.set(0,0,1,1):this.Xi=new ua(0,0,1,1);this.g.Z&&this.g.Fu(this)};k.LE=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.Dn=parseInt(a[b].substr(0,a[b].length-2));this.iu=Math.ceil(this.Dn/72*96)+4;0<b&&(this.hp=a[b-1]);this.Lk=a[b+1];for(b+=2;b<a.length;b++)this.Lk+=" "+a[b];break}};k.Ee=function(){return{t:this.text,f:this.font,c:this.color,ha:this.qp,va:this.Rq,wr:this.Xu,lho:this.it,fn:this.Lk,fs:this.hp,ps:this.Dn,pxh:this.iu,tw:this.cz,th:this.bz,lrt:this.Vm}};k.rf=function(a){this.text=a.t;this.font=a.f;this.color=a.c;
this.qp=a.ha;this.Rq=a.va;this.Xu=a.wr;this.it=a.lho;this.Lk=a.fn;this.hp=a.fs;this.Dn=a.ps;this.iu=a.pxh;this.cz=a.tw;this.bz=a.th;this.Vm=a.lrt;this.cj=!0;this.et=this.Fp=this.width;this.Ep=this.height};k.dd=function(){if(this.g.Z&&this.Ae&&300<=this.g.$e-this.Vm){var a=this.M;this.lb();var b=this.tc;if(b.right<a.gc||b.bottom<a.hc||b.left>a.Dc||b.top>a.Cc)this.g.Z.deleteTexture(this.Ae),this.Og=this.hk=this.Ae=null}};k.jk=function(){this.Og=this.hk=null;this.g.Z&&this.Ae&&this.g.Z.deleteTexture(this.Ae);
this.Ae=null};k.lH=function(){this.font=this.hp+" "+this.Dn.toString()+"pt "+this.Lk;this.cj=!0;this.g.ob=!0};k.vg=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.M.Pe(),a.save(),a.scale(c,c));if(this.cj||this.width!==this.et)this.type.Ub.gB(this.text,this.Ji,a,this.width,this.Xu),this.cj=!1,this.et=this.width;this.lb();var c=b?0:this.ub.ec,d=b?0:this.ub.fc;this.g.Rg&&(c=c+.5|0,d=d+.5|0);0===this.G||b||(a.save(),a.translate(c,
d),a.rotate(this.G),d=c=0);var e=d+this.height,f=this.iu,f=f+this.it,g,k;1===this.Rq?d+=Math.max(this.height/2-this.Ji.length*f/2,0):2===this.Rq&&(d+=Math.max(this.height-this.Ji.length*f-2,0));for(k=0;k<this.Ji.length&&!(g=c,1===this.qp?g=c+(this.width-this.Ji[k].width)/2:2===this.qp&&(g=c+(this.width-this.Ji[k].width)),a.fillText(this.Ji[k].text,g,d),d+=f,d>=e-f);k++);(0!==this.G||b)&&a.restore();this.Vm=this.g.$e};k.lf=function(a){if(!(1>this.width||1>this.height)){var b=this.cj||this.Xx;this.Xx=
!1;var c=this.M.Pe(),d=this.M.yc(),e=this.Xi,f=c*this.width,g=c*this.height,k=Math.ceil(f),w=Math.ceil(g),z=this.g.Ga/2,u=this.g.Fa/2;this.hk||(this.Og=document.createElement("canvas"),this.Og.width=k,this.Og.height=w,this.Fp=k,this.Ep=w,b=!0,this.hk=this.Og.getContext("2d"));if(k!==this.Fp||w!==this.Ep)this.Og.width=k,this.Og.height=w,this.Ae&&(a.deleteTexture(this.Ae),this.Ae=null),b=!0;b&&(this.hk.clearRect(0,0,k,w),this.vg(this.hk,!0),this.Ae||(this.Ae=a.qh(k,w,this.g.cb,this.g.Uf)),a.JF(this.Og,
this.Ae,this.g.Uf));this.Fp=k;this.Ep=w;a.Fe(this.Ae);a.mk(this.opacity);a.Wg();a.translate(-z,-u);a.dh();var A=this.ub,b=this.M.Sb(A.ec,A.fc,!0,!0),z=this.M.Sb(A.ec,A.fc,!1,!0),u=this.M.Sb(A.Gd,A.Hd,!0,!0),C=this.M.Sb(A.Gd,A.Hd,!1,!0),F=this.M.Sb(A.vd,A.wd,!0,!0),H=this.M.Sb(A.vd,A.wd,!1,!0),E=this.M.Sb(A.td,A.ud,!0,!0),A=this.M.Sb(A.td,A.ud,!1,!0);if(this.g.Rg||0===this.G&&0===d)var I=(b+.5|0)-b,x=(z+.5|0)-z,b=b+I,z=z+x,u=u+I,C=C+x,F=F+I,H=H+x,E=E+I,A=A+x;0===this.G&&0===d?(u=b+k,C=z,F=u,H=z+w,
E=b,A=H,e.right=1,e.bottom=1):(e.right=f/k,e.bottom=g/w);a.Tg(b,z,u,C,F,H,E,A,e);a.Wg();a.scale(c,c);a.pu(-this.M.yc());a.translate((this.M.gc+this.M.Dc)/-2,(this.M.hc+this.M.Cc)/-2);a.dh();this.Vm=this.g.$e}};var e=[];f.aB=function(a){e.length=0;for(var b="",c,d=0;d<a.length;)if(c=a.charAt(d),"\n"===c)b.length&&(e.push(b),b=""),e.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)));e.push(b);b=""}else d<a.length&&(b+=
c,d++);b.length&&e.push(b)};var g=[];f.gB=function(b,d,e,f,g){if(b&&b.length)if(2>=f)c(d);else{if(100>=b.length&&-1===b.indexOf("\n")){var k=e.measureText(b).width;if(k<=f){c(d);d.push(a());d[0].text=b;d[0].width=k;return}}this.hB(b,d,e,f,g)}else c(d)};f.hB=function(b,c,d,f,k){k&&(this.aB(b),b=e);var p="",s,t,w,z=0;for(w=0;w<b.length;w++)"\n"===b[w]?(z>=c.length&&c.push(a()),t=c[z],t.text=p,t.width=d.measureText(p).width,z++,p=""):(s=p,p+=b[w],t=d.measureText(p).width,t>=f&&(z>=c.length&&c.push(a()),
t=c[z],t.text=s,t.width=d.measureText(s).width,z++,p=b[w],k||" "!==p||(p="")));p.length&&(z>=c.length&&c.push(a()),t=c[z],t.text=p,t.width=d.measureText(p).width,z++);for(w=z;w<c.length;w++)g.push(c[w]);c.length=z};f.N=new function(){};b.prototype.PA=function(a){ia(a)&&1E9>a&&(a=Math.round(1E10*a)/1E10);a=a.toString();this.text!==a&&(this.text=a,this.cj=!0,this.g.ob=!0)};b.prototype.Iz=function(a){ia(a)&&(a=Math.round(1E10*a)/1E10);if(a=a.toString())this.text+=a,this.cj=!0,this.g.ob=!0};f.Qa=new b;
d.prototype.Text=function(a){a.ke(this.text)};f.lc=new d})();function qc(a){this.g=a}
(function(){var a=qc.prototype;a.Tc=function(a){this.Ub=a;this.g=a.g};var c=a.Tc.prototype;c.rb=function(){this.qa||(this.gb=new Image,this.gb.sw=this.Du,this.g.yz(this.gb,this.Cu),this.Hb=this.pattern=null)};c.dq=function(){this.qa||(this.Hb=null)};c.Zt=function(){if(!this.qa&&this.u.length){this.Hb||(this.Hb=this.g.Z.Lp(this.gb,!0,this.g.cb,this.Eu));var a,c;a=0;for(c=this.u.length;a<c;a++)this.u[a].Hb=this.Hb}};c.kt=function(){this.qa||this.Hb||!this.g.Z||(this.Hb=this.g.Z.Lp(this.gb,!0,this.g.cb,
this.Eu))};c.Lu=function(){this.qa||this.u.length||!this.Hb||(this.g.Z.deleteTexture(this.Hb),this.Hb=null)};c.fu=function(a){a.drawImage(this.gb,0,0)};a.kc=function(a){this.type=a;this.g=a.g};c=a.kc.prototype;c.rb=function(){this.visible=0===this.Aa[0];this.Xi=new ua(0,0,0,0);this.Tw=!1;this.gb=this.type.gb;this.g.Z?(this.type.kt(),this.Hb=this.type.Hb):(this.type.pattern||(this.type.pattern=this.g.qb.createPattern(this.type.gb,"repeat")),this.pattern=this.type.pattern)};c.Lf=function(){this.Tw=
!1;this.gb=this.type.gb};c.jk=function(){this.g.Z&&this.Tw&&this.Hb&&(this.g.Z.deleteTexture(this.Hb),this.Hb=null)};c.vg=function(a){a.globalAlpha=this.opacity;a.save();a.fillStyle=this.pattern;var c=this.x,f=this.y;this.g.Rg&&(c=Math.round(c),f=Math.round(f));var k=-(this.de*this.width),e=-(this.ee*this.height),g=k%this.gb.width,l=e%this.gb.height;0>g&&(g+=this.gb.width);0>l&&(l+=this.gb.height);a.translate(c,f);a.rotate(this.G);a.translate(g,l);a.fillRect(k-g,e-l,this.width,this.height);a.restore()};
c.lf=function(a){a.Fe(this.Hb);a.mk(this.opacity);var c=this.Xi;c.right=this.width/this.gb.width;c.bottom=this.height/this.gb.height;var f=this.ub;if(this.g.Rg){var k=Math.round(this.x)-this.x,e=Math.round(this.y)-this.y;a.Tg(f.ec+k,f.fc+e,f.Gd+k,f.Hd+e,f.vd+k,f.wd+e,f.td+k,f.ud+e,c)}else a.Tg(f.ec,f.fc,f.Gd,f.Hd,f.vd,f.wd,f.td,f.ud,c)};a.N=new function(){};a.Qa=new function(){};a.lc=new function(){}})();function rc(a){this.g=a}
(function(){function a(a){n=a.x;h=a.y;m=a.z}function c(a){q=a.x;p=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.Ln=this.id=this.y=this.x=this.Fq=this.Eq=this.dt=this.time=this.zu=0;this.Qn=this.Oq=!1}function f(){}function k(){}var e=rc.prototype;e.Tc=function(a){this.Ub=a;this.g=a.g};e.Tc.prototype.rb=function(){};e.kc=function(a){this.type=a;this.g=a.g;this.touches=[];this.Pt=!1};var g=e.kc.prototype,l={left:0,top:0};g.vm=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 n=0,h=0,m=0,q=0,p=0,s=0,t=[];d.prototype.init=function(a,b,c,d){var e=Va();this.zu=this.dt=this.time=e;this.Eq=a;this.Fq=b;this.x=a;this.y=b;this.id=c;this.Ln=d;this.Qn=this.Oq=!1};d.prototype.update=function(a,b,c){this.dt=this.time;this.time=a;this.x=b;this.y=c;!this.Qn&&15<=Ra(this.Eq,this.Fq,this.x,this.y)&&(this.Qn=!0)};d.prototype.xE=function(a,b){!this.Oq&&500<=Va()-this.zu&&!this.Qn&&15>Ra(this.Eq,this.Fq,
this.x,this.y)&&(this.Oq=!0,a.bh=this.Ln,a.El=this.id,a.Pk=b,a.g.trigger(rc.prototype.N.AA,a),a.sh=this.x,a.uh=this.y,a.g.trigger(rc.prototype.N.BA,a),a.Pk=0)};var w=-1E3,z=-1E3,u=-1E4;d.prototype.Tx=function(a,b){if(!this.Oq){var c=Va();333>=c-this.zu&&!this.Qn&&15>Ra(this.Eq,this.Fq,this.x,this.y)&&(a.bh=this.Ln,a.El=this.id,a.Pk=b,666>=c-u&&25>Ra(w,z,this.x,this.y)?(a.g.trigger(rc.prototype.N.yA,a),a.sh=this.x,a.uh=this.y,a.g.trigger(rc.prototype.N.zA,a),z=w=-1E3,u=-1E4):(a.g.trigger(rc.prototype.N.EA,
a),a.sh=this.x,a.uh=this.y,a.g.trigger(rc.prototype.N.FA,a),w=this.x,z=this.y,u=c),a.Pk=0)}};g.rb=function(){this.TD=!("undefined"===typeof window.c2isWindows8||!window.c2isWindows8);this.Pk=this.El=this.bh=this.uh=this.sh=this.Wv=this.Vv=this.Uv=this.vB=this.uB=this.tB=this.xn=this.wn=this.vn=0;this.GF=0!==this.Aa[0];var b=0<this.g.be?document:this.g.canvas,d=document;this.g.zd?d=b=window.Canvas:this.g.of&&(d=b=window);var e=this;window.navigator.pointerEnabled?(b.addEventListener("pointerdown",
function(a){e.fy(a)},!1),b.addEventListener("pointermove",function(a){e.ey(a)},!1),d.addEventListener("pointerup",function(a){e.fq(a,!1)},!1),d.addEventListener("pointercancel",function(a){e.fq(a,!0)},!1),this.g.canvas&&(this.g.canvas.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1),document.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1),this.g.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.fy(a)},!1),b.addEventListener("MSPointerMove",function(a){e.ey(a)},!1),d.addEventListener("MSPointerUp",function(a){e.fq(a,!1)},!1),d.addEventListener("MSPointerCancel",function(a){e.fq(a,!0)},!1),this.g.canvas&&(this.g.canvas.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1),document.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1))):(b.addEventListener("touchstart",
function(a){e.hy(a)},!1),b.addEventListener("touchmove",function(a){e.gy(a)},!1),d.addEventListener("touchend",function(a){e.$t(a,!1)},!1),d.addEventListener("touchcancel",function(a){e.$t(a,!0)},!1));if(this.TD){var f=function(a){a=a.reading;e.Uv=a.accelerationX;e.Vv=a.accelerationY;e.Wv=a.accelerationZ},g=function(a){a=a.reading;e.vn=a.yawDegrees;e.wn=a.pitchDegrees;e.xn=a.rollDegrees},m=Windows.Devices.Sensors.Accelerometer.getDefault();m&&(m.reportInterval=Math.max(m.minimumReportInterval,16),
m.addEventListener("readingchanged",f));var k=Windows.Devices.Sensors.Inclinometer.getDefault();k&&(k.reportInterval=Math.max(k.minimumReportInterval,16),k.addEventListener("readingchanged",g));document.addEventListener("visibilitychange",function(){document.hidden||document.msHidden?(m&&m.removeEventListener("readingchanged",f),k&&k.removeEventListener("readingchanged",g)):(m&&m.addEventListener("readingchanged",f),k&&k.addEventListener("readingchanged",g))},!1)}else window.addEventListener("deviceorientation",
function(a){e.vn=a.alpha||0;e.wn=a.beta||0;e.xn=a.gamma||0},!1),window.addEventListener("devicemotion",function(a){a.accelerationIncludingGravity&&(e.tB=a.accelerationIncludingGravity.x||0,e.uB=a.accelerationIncludingGravity.y||0,e.vB=a.accelerationIncludingGravity.z||0);a.acceleration&&(e.Uv=a.acceleration.x||0,e.Vv=a.acceleration.y||0,e.Wv=a.acceleration.z||0)},!1);this.GF&&!this.g.Rb&&(jQuery(document).mousemove(function(a){e.Xt(a)}),jQuery(document).mousedown(function(a){e.Wt(a)}),jQuery(document).mouseup(function(a){e.Yt(a)}));
this.g.Sk&&!this.g.zd&&AppMobi.accelerometer.watchAcceleration(a,{frequency:40,adjustForRotation:!0});this.g.pf&&navigator.accelerometer&&navigator.accelerometer.watchAcceleration&&navigator.accelerometer.watchAcceleration(c,null,{frequency:40});this.g.xF(this)};g.ey=function(a){if(a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType){a.preventDefault&&a.preventDefault();var b=this.vm(a.pointerId),c=Va();if(0<=b){var d=this.g.Rb?l:jQuery(this.g.canvas).offset(),b=this.touches[b];2>c-b.time||
b.update(c,a.pageX-d.left,a.pageY-d.top)}}};g.fy=function(a){if(a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType){a.preventDefault&&hb(a)&&a.preventDefault();var c=this.g.Rb?l:jQuery(this.g.canvas).offset(),d=a.pageX-c.left,c=a.pageY-c.top;Va();this.bh=this.touches.length;this.El=a.pointerId;this.touches.push(b(d,c,a.pointerId,this.bh));this.g.kd=!0;this.g.trigger(rc.prototype.N.wv,this);this.g.trigger(rc.prototype.N.Av,this);this.sh=d;this.uh=c;this.g.trigger(rc.prototype.N.rr,this);
this.g.kd=!1}};g.fq=function(a,b){if(a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType){a.preventDefault&&hb(a)&&a.preventDefault();var c=this.vm(a.pointerId);this.bh=0<=c?this.touches[c].Ln:-1;this.El=0<=c?this.touches[c].id:-1;this.g.kd=!0;this.g.trigger(rc.prototype.N.or,this);this.g.trigger(rc.prototype.N.zv,this);0<=c&&(b||this.touches[c].Tx(this,c),100>t.length&&t.push(this.touches[c]),this.touches.splice(c,1));this.g.kd=!1}};g.gy=function(a){a.preventDefault&&a.preventDefault();
var b=Va(),c,d,e,f;c=0;for(d=a.changedTouches.length;c<d;c++)if(e=a.changedTouches[c],f=this.vm(e.identifier),0<=f){var g=this.g.Rb?l:jQuery(this.g.canvas).offset();f=this.touches[f];2>b-f.time||f.update(b,e.pageX-g.left,e.pageY-g.top)}};g.hy=function(a){a.preventDefault&&hb(a)&&a.preventDefault();var c=this.g.Rb?l:jQuery(this.g.canvas).offset();Va();this.g.kd=!0;var d,e,f,g;d=0;for(e=a.changedTouches.length;d<e;d++)if(f=a.changedTouches[d],g=this.vm(f.identifier),-1===g){g=f.pageX-c.left;var m=f.pageY-
c.top;this.bh=this.touches.length;this.El=f.identifier;this.touches.push(b(g,m,f.identifier,this.bh));this.g.trigger(rc.prototype.N.wv,this);this.g.trigger(rc.prototype.N.Av,this);this.sh=g;this.uh=m;this.g.trigger(rc.prototype.N.rr,this)}this.g.kd=!1};g.$t=function(a,b){a.preventDefault&&hb(a)&&a.preventDefault();this.g.kd=!0;var c,d,e;c=0;for(d=a.changedTouches.length;c<d;c++)e=a.changedTouches[c],e=this.vm(e.identifier),0<=e&&(this.bh=this.touches[e].Ln,this.El=this.touches[e].id,this.g.trigger(rc.prototype.N.or,
this),this.g.trigger(rc.prototype.N.zv,this),b||this.touches[e].Tx(this,e),100>t.length&&t.push(this.touches[e]),this.touches.splice(e,1));this.g.kd=!1};g.XG=function(){return this.g.Sk&&0===this.vn&&0!==m?90*m:this.g.pf&&0===this.vn&&0!==s?90*s:this.vn};g.YG=function(){return this.g.Sk&&0===this.wn&&0!==h?-90*h:this.g.pf&&0===this.wn&&0!==p?90*p:this.wn};g.aH=function(){return this.g.Sk&&0===this.xn&&0!==n?90*n:this.g.pf&&0===this.xn&&0!==q?90*q:this.xn};g.Wt=function(a){a.preventDefault&&this.g.Qk&&
!this.g.Uf&&a.preventDefault();this.hy({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]});this.Pt=!0};g.Xt=function(a){this.Pt&&this.gy({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]})};g.Yt=function(a){a.preventDefault&&this.g.Qk&&!this.g.Uf&&a.preventDefault();this.g.Qk=!0;this.$t({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]});this.Pt=!1};g.Jq=function(){var a,b,c,d=Va();a=0;for(b=this.touches.length;a<b;++a)c=this.touches[a],c.time<=d-50&&(c.dt=d),c.xE(this,
a)};f.prototype.Av=function(){return!0};f.prototype.zv=function(){return!0};f.prototype.rr=function(a){return a?this.g.On(a,this.sh,this.uh):!1};f.prototype.wv=function(a){a=Math.floor(a);return a===this.bh};f.prototype.or=function(a){a=Math.floor(a);return a===this.bh};f.prototype.gA=function(a){a=Math.floor(a);return this.touches.length>=a+1};f.prototype.AA=function(){return!0};f.prototype.EA=function(){return!0};f.prototype.yA=function(){return!0};f.prototype.BA=function(a){return a?this.g.On(a,
this.sh,this.uh):!1};f.prototype.FA=function(a){return a?this.g.On(a,this.sh,this.uh):!1};f.prototype.zA=function(a){return a?this.g.On(a,this.sh,this.uh):!1};e.N=new f;k.prototype.em=function(a,b){var c=this.Pk;if(0>c||c>=this.touches.length)a.ba(0);else{var d,e,f,g,m;ha(b)?(d=this.g.Ah(0),e=d.scale,f=d.Id,g=d.ge,m=d.G,d.scale=1,d.Id=1,d.ge=1,d.G=0,a.ba(d.hd(this.touches[c].x,this.touches[c].y,!0)),d.scale=e,d.Id=f,d.ge=g,d.G=m):(d=ia(b)?this.g.Ah(b):this.g.Am(b))?a.ba(d.hd(this.touches[c].x,this.touches[c].y,
!0)):a.ba(0)}};k.prototype.fm=function(a,b){var c=this.Pk;if(0>c||c>=this.touches.length)a.ba(0);else{var d,e,f,g,m;ha(b)?(d=this.g.Ah(0),e=d.scale,f=d.Id,g=d.he,m=d.G,d.scale=1,d.Id=1,d.he=1,d.G=0,a.ba(d.hd(this.touches[c].x,this.touches[c].y,!1)),d.scale=e,d.Id=f,d.he=g,d.G=m):(d=ia(b)?this.g.Ah(b):this.g.Am(b))?a.ba(d.hd(this.touches[c].x,this.touches[c].y,!1)):a.ba(0)}};e.lc=new k})();function B(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)fa("Using CocoonJS native physics"),window.ext&&"undefined"!==typeof window.ext.IDTK_SRV_BOX2D?function(){function a(a,b,d,e){this.type=c.Ik;this.xb=new h;this.yb=new h;this.jg=null;void 0!==a&&(this.J=a);void 0!==b&&(this.K=b);void 0!==d&&this.xb.D(d);void 0!==e&&this.yb.D(e);this.pl=this.Rx=this.Qu=this.qt=this.Vg=0;this.Jk=this.Dj=!1}function c(a){this.J=a.J;this.K=a.K;this.jg=a.jg;this.type=a.type;this.next=null}function b(a,
b){this.Rp=[];this.Fb=[];this.$j=[];this.Ih=null;this.kE=[];this.Tb=window.ext.IDTK_SRV_BOX2D.makeCall("createWorld",a.x,a.y,b)}function d(){}function f(a,b,c){this.Kb=a;this.Eb=b;this.rE=c}function k(a,b){var c=a.jg;a.jg=null;this.Ja=b;this.A=new l(a.position,n.vk(a.G));this.jn=[];this.dn=a.sd;a.type===k.Le&&(a.Qf=0);this.zc=window.ext.IDTK_SRV_BOX2D.makeCall("createBody",b.Tb,a);a.jg=c}function e(a,b,c,d){this.gn=a;this.yt=c;this.Ph={};this.Ph.Td=h.q(0,0);this.Up=!1;this.Sp=d.Qf;this.At=d.zg;this.It=
d.Xg;this.Up=d.Ts}function g(){}function l(a,b){this.position=h.q(0,0);this.n=new n;void 0===a&&(a=null);void 0===b&&(b=null);a&&(this.position.D(a),this.n.Hf(b))}function n(){this.i=h.q(0,0);this.j=h.q(0,0);this.ji()}function h(a,b){void 0===a&&(a=0);void 0===b&&(b=0);this.x=a;this.y=b}P=h;h.lh=[];h.q=function(a,b){if(0<P.lh.length){var c=P.lh.pop();c.Set(a,b);return c}return new P(a,b)};h.ic=function(a){1E4>P.lh.length&&P.lh.push(a)};h.prototype.fa=function(){this.y=this.x=0};h.prototype.Set=function(a,
b){void 0===a&&(a=0);void 0===b&&(b=0);this.x=a;this.y=b};h.prototype.D=function(a){this.x=a.x;this.y=a.y};h.kG=function(a,b){void 0===a&&(a=0);void 0===b&&(b=0);return h.q(a,b)};h.prototype.sc=function(){return h.q(this.x,this.y)};h.prototype.hh=function(a){this.x+=a.x;this.y+=a.y};h.prototype.Br=function(a){this.x-=a.x;this.y-=a.y};h.prototype.Md=function(a){void 0===a&&(a=0);this.x*=a;this.y*=a};h.prototype.qg=function(){return Math.sqrt(this.x*this.x+this.y*this.y)};h.prototype.oo=function(){return this.x*
this.x+this.y*this.y};h.prototype.Nd=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};h.prototype.kr=function(){this.x=-this.x;this.y=-this.y};Q=n;n.vk=function(a){void 0===a&&(a=0);var b=new n;b.Set(a);return b};n.pg=function(a,b){var c=new n;c.yr(a,b);return c};n.prototype.Set=function(a){void 0===a&&(a=0);var b=Math.cos(a);a=Math.sin(a);this.i.x=b;this.j.x=-a;this.i.y=a;this.j.y=b};n.prototype.yr=function(a,b){this.i.D(a);
this.j.D(b)};n.prototype.sc=function(){var a=new n;a.Hf(this);return a};n.prototype.Hf=function(a){this.i.D(a.i);this.j.D(a.j)};n.prototype.Xn=function(a){this.i.x+=a.i.x;this.i.y+=a.i.y;this.j.x+=a.j.x;this.j.y+=a.j.y};n.prototype.ji=function(){this.i.x=1;this.j.x=0;this.i.y=0;this.j.y=1};n.prototype.fa=function(){this.i.x=0;this.j.x=0;this.i.y=0;this.j.y=0};n.prototype.Kd=function(){return Math.atan2(this.i.y,this.i.x)};n.prototype.br=function(a){var b=this.i.x,c=this.j.x,d=this.i.y,e=this.j.y,
f=b*e-c*d;0!==f&&(f=1/f);a.i.x=f*e;a.j.x=-f*c;a.i.y=-f*d;a.j.y=f*b;return a};n.prototype.li=function(a,b,c){void 0===b&&(b=0);void 0===c&&(c=0);var d=this.i.x,e=this.j.x,f=this.i.y,g=this.j.y,k=d*g-e*f;0!==k&&(k=1/k);a.x=k*(g*b-e*c);a.y=k*(d*c-f*b);return a};n.prototype.gh=function(){this.i.gh();this.j.gh()};sc=l;l.prototype.jc=function(a,b){this.position.D(a);this.n.Hf(b)};l.prototype.ji=function(){this.position.fa();this.n.ji()};l.prototype.Set=function(a){this.position.D(a.position);this.n.Hf(a.n)};
l.prototype.po=function(){return Math.atan2(this.n.i.y,this.n.i.x)};R=g;g.no=function(a){void 0===a&&(a=0);return isFinite(a)};g.Ib=function(a,b){return a.x*b.x+a.y*b.y};g.fj=function(a,b){return a.x*b.y-a.y*b.x};g.ih=function(a,b){void 0===b&&(b=0);return h.q(b*a.y,-b*a.x)};g.Xq=function(a,b){void 0===a&&(a=0);return h.q(-a*b.y,a*b.x)};g.Vb=function(a,b){return h.q(a.i.x*b.x+a.j.x*b.y,a.i.y*b.x+a.j.y*b.y)};g.jh=function(a,b){return h.q(g.Ib(b,a.i),g.Ib(b,a.j))};g.Fc=function(a,b){var c=g.Vb(a.n,
b);c.x+=a.position.x;c.y+=a.position.y;return c};g.ir=function(a,b){var c=g.wb(b,a.position),d=c.x*a.n.i.x+c.y*a.n.i.y;c.y=c.x*a.n.j.x+c.y*a.n.j.y;c.x=d;return c};g.Ml=function(a,b){return h.q(a.x+b.x,a.y+b.y)};g.wb=function(a,b){return h.q(a.x-b.x,a.y-b.y)};g.Wz=function(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)};g.dv=function(a,b){var c=a.x-b.x,d=a.y-b.y;return c*c+d*d};g.qA=function(a,b){void 0===a&&(a=0);return h.q(a*b.x,a*b.y)};g.Dz=function(a,b){return n.pg(g.Ml(a.i,b.i),g.Ml(a.j,
b.j))};g.rA=function(a,b){return n.pg(g.Vb(a,b.i),g.Vb(a,b.j))};g.sA=function(a,b){var c=h.q(g.Ib(a.i,b.i),g.Ib(a.j,b.i)),d=h.q(g.Ib(a.i,b.j),g.Ib(a.j,b.j));return n.pg(c,d)};g.gh=function(a){void 0===a&&(a=0);return 0<a?a:-a};g.Jl=function(a){return h.q(g.gh(a.x),g.gh(a.y))};g.Bz=function(a){return n.pg(g.Jl(a.i),g.Jl(a.j))};g.qv=function(a,b){void 0===a&&(a=0);void 0===b&&(b=0);return a<b?a:b};g.rv=function(a,b){return h.q(g.qv(a.x,b.x),g.qv(a.y,b.y))};g.ov=function(a,b){void 0===a&&(a=0);void 0===
b&&(b=0);return a>b?a:b};g.pv=function(a,b){return h.q(g.ov(a.x,b.x),g.ov(a.y,b.y))};g.Bb=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.Lz=function(a,b,c){return g.pv(b,g.rv(a,c))};g.OG=function(a,b){var c=a[0];a[0]=b[0];b[0]=c};g.yG=function(){return 2*Math.random()-1};g.zG=function(a,b){void 0===a&&(a=0);void 0===b&&(b=0);var c=Math.random();return(b-a)*c+a};g.qG=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.hG=function(a){void 0===a&&(a=0);return 0<a&&0===(a&a-1)};g.GB=new h(0,0);g.EB=n.pg(new h(1,0),new h(0,1));g.UG=new l(g.GB,g.EB);U=function(){this.position=h.q(0,0);this.jt=h.q(0,0);this.jg=null;this.G=0;this.jt.Set(0,0);this.qj=this.Tj=this.aw=0;this.ew=this.$v=!0;this.vj=this.ms=!1;this.type=k.Le;this.sd=!0;this.Vw=1};tc=e;e.prototype.Sa=function(){return this.gn};e.prototype.Ec=function(){console.log("fixture.GetShape not yet supported in CocoonJS Box2D binding");
return null};e.prototype.lj=function(){return this.Up};uc=k;k.prototype.tk=function(a){var b=a.jg;a.jg=null;var c=window.ext.IDTK_SRV_BOX2D.makeCall("createFixture",this.Ja.Tb,this.zc,a);a.jg=b;a=new e(this,0,c,a);this.Ja.$j[c]=a;this.jn.push(a);return a};k.prototype.$q=function(){return 0===this.jn.length?null:this.jn[0]};k.prototype.cv=function(a){window.ext.IDTK_SRV_BOX2D.makeCall("deleteFixture",this.Ja.Tb,a.yt);delete this.Ja.$j[a.yt]};k.prototype.am=function(a,b){window.ext.IDTK_SRV_BOX2D.makeCall("setBodyTransform",
this.Ja.Tb,this.zc,a.x,a.y,b);this.A.n.Set(b);this.A.position.D(a)};k.prototype.xr=function(a){this.am(a,this.Kd())};k.prototype.hj=function(){var a=window.ext.IDTK_SRV_BOX2D.makeCall("getLinearVelocity",this.Ja.Tb,this.zc);return h.q(a[0],a[1])};k.prototype.xk=function(){var a=window.ext.IDTK_SRV_BOX2D.makeCall("getWorldCenter",this.Ja.Tb,this.zc);return h.q(a[0],a[1])};k.prototype.ij=function(){var a=window.ext.IDTK_SRV_BOX2D.makeCall("getLocalCenter",this.Ja.Tb,this.zc);return h.q(a[0],a[1])};
k.prototype.rd=function(a){return g.ir(this.A,a)};k.prototype.wk=function(){return window.ext.IDTK_SRV_BOX2D.makeCall("getMass",this.Ja.Tb,this.zc)};k.prototype.gd=function(){return window.ext.IDTK_SRV_BOX2D.makeCall("isAwake",this.Ja.Tb,this.zc)};k.prototype.io=function(){return window.ext.IDTK_SRV_BOX2D.makeCall("getAngularVelocity",this.Ja.Tb,this.zc)};k.prototype.Gc=function(a){window.ext.IDTK_SRV_BOX2D.makeCall("setAwake",this.Ja.Tb,this.zc,a)};k.prototype.ki=function(a){window.ext.IDTK_SRV_BOX2D.makeCall("setLinearVelocity",
this.Ja.Tb,this.zc,a.x,a.y)};k.prototype.Ff=function(a,b,c){window.ext.IDTK_SRV_BOX2D.makeCall("applyForce",this.Ja.Tb,this.zc,a.x,a.y,b.x,b.y,c)};k.prototype.Yn=function(a,b){window.ext.IDTK_SRV_BOX2D.makeCall("applyTorque",this.Ja.Tb,this.zc,a,b)};k.prototype.Bk=function(a){window.ext.IDTK_SRV_BOX2D.makeCall("setAngularVelocity",this.Ja.Tb,this.zc,a)};k.prototype.kj=function(){return this.dn};k.prototype.Kd=function(){return this.A.n.Kd()};k.prototype.po=function(a){void 0===a&&(a=0);this.am(this.A.position,
a)};k.prototype.gi=function(){for(var a=window.ext.IDTK_SRV_BOX2D.makeCall("getObjectContacts",this.Ja.Tb,this.zc),b=[],c=0;c<a.length;c++)b.push(this.Ja.Rp[a[c]]);return b};uc.Le=0;uc.gw=1;uc.Hc=2;f.prototype.gr=function(){return this.rE};vc=d;d.prototype.Zn=function(){};vc.fw=new d;wc=function(){};xc=b;b.prototype.Hv=function(a){this.Ih=a};b.prototype.Gv=function(a){var b=this;window.ext.IDTK_SRV_BOX2D.makeCall("setContactFilter",this.Tb,function(c,d){return a.nj(b.$j[c],b.$j[d])})};b.prototype.Wq=
function(a){a=new k(a,this);return this.Rp[a.zc]=a};b.prototype.eo=function(a){window.ext.IDTK_SRV_BOX2D.makeCall("deleteBody",this.Tb,a.zc);delete this.Rp[a.zc];for(var b=0;b<a.jn.length;++b)delete this.$j[a.jn[b].yt]};b.prototype.co=function(a){if(a.J.zc!==a.K.zc){var b=a.J,d=a.K;a.J=b.zc;a.K=d.zc;var e="createDistanceJoint";a.type===c.Ik&&(e="createRevoluteJoint");var f=new c(a);f.jE=window.ext.IDTK_SRV_BOX2D.makeCall(e,this.Tb,a);a.J=b;a.K=d;this.kE.push(f);return f}};b.prototype.fo=function(a){window.ext.IDTK_SRV_BOX2D.makeCall("destroyJoint",
this.Tb,a.jE)};b.prototype.Iv=function(a){window.ext.IDTK_SRV_BOX2D.makeCall("setGravity",this.Tb,a.x,a.y)};b.prototype.kh=function(a,b,c){c=window.ext.IDTK_SRV_BOX2D.makeCall("step",this.Tb,a,b,c);b=c[0];for(a=1;a<=4*b;a+=4){var d=this.Rp[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.Ih)for(c=window.ext.IDTK_SRV_BOX2D.makeCall("getLastContacts",this.Tb),b=c[0],a=1;a<=3*b;a+=3){var d=c[a+2],e=this.$j[c[a+0]],g=this.$j[c[a+1]];"undefined"===typeof e||"undefined"===
typeof g?console.log("One of the fixtures in a contact DOESN'T EXIST!!"):this.Ih.Zn(new f(e,g,d))}};b.prototype.bv=function(){window.ext.IDTK_SRV_BOX2D.makeCall("clearForces",this.Tb)};yc=function(a){this.sq=a;this.type="circle"};V=function(){};V.prototype.qo=function(a,b){this.type="box";this.width=a;this.height=b};V.prototype.Ev=function(){this.type="edge"};V.prototype.$l=function(a,b){this.type="polygon";this.xz=[];for(var c=0;c<b;c++)this.xz.push(a[c].x),this.xz.push(a[c].y)};zc=function(){this.jg=
this.shape=null;this.zg=.2;this.Qf=this.Xg=0;this.Ts=!1;this.filter={Gk:1,nl:65535,Ci:0}};Y=c;c.prototype.Ql=function(){return this.J};c.prototype.Zq=function(){return this.K};c.prototype.Rc=function(){return this.type};c.cs=0;c.Ik=1;Ac=function(a,b,d,e){this.type=c.cs;this.xb=h.q(0,0);this.yb=h.q(0,0);this.jg=null;void 0!==a&&(this.J=a);void 0!==b&&(this.K=b);void 0!==d&&this.xb.D(d);void 0!==e&&this.yb.D(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.Uo=this.jp=
0};a.prototype.jc=function(a,b,c){this.J=a;this.K=b;this.xb=this.J.rd(c);this.yb=this.K.rd(c);this.Vg=this.K.Kd()-this.J.Kd()};Bc=a}():console.log("The CocoonJS binding for Box2D has been ignored because ext.IDTK_SRV_BOX2D is not available");else{var R={},Cc=2/180*Math.PI,Dc=8/180*Math.PI,Ec=.5*Math.PI,Fc=Ec*Ec,Gc=2/180*Math.PI,Hc=Number.MIN_VALUE*Number.MIN_VALUE;R.Ib=function(a,c){return a.x*c.x+a.y*c.y};R.fj=function(a,c){return a.x*c.y-a.y*c.x};R.ih=function(a,c){return P.q(c*a.y,-c*a.x)};R.Xq=
function(a,c){return P.q(-a*c.y,a*c.x)};R.Vb=function(a,c){return P.q(a.i.x*c.x+a.j.x*c.y,a.i.y*c.x+a.j.y*c.y)};R.jh=function(a,c){return P.q(R.Ib(c,a.i),R.Ib(c,a.j))};R.Fc=function(a,c){var b=R.Vb(a.n,c);b.x+=a.position.x;b.y+=a.position.y;return b};R.ir=function(a,c){var b=R.wb(c,a.position),d=b.x*a.n.i.x+b.y*a.n.i.y;b.y=b.x*a.n.j.x+b.y*a.n.j.y;b.x=d;return b};R.Ml=function(a,c){return P.q(a.x+c.x,a.y+c.y)};R.wb=function(a,c){return P.q(a.x-c.x,a.y-c.y)};R.Wz=function(a,c){return Math.sqrt(R.dv(a,
c))};R.dv=function(a,c){var b=a.x-c.x,d=a.y-c.y;return b*b+d*d};R.qA=function(a,c){return P.q(a*c.x,a*c.y)};R.Dz=function(a,c){return Q.pg(R.Ml(a.i,c.i),R.Ml(a.j,c.j))};R.rA=function(a,c){return Q.pg(R.Vb(a,c.i),R.Vb(a,c.j))};R.sA=function(a,c){var b=P.q(R.Ib(a.i,c.i),R.Ib(a.j,c.i)),d=P.q(R.Ib(a.i,c.j),R.Ib(a.j,c.j));return Q.pg(b,d)};R.Jl=function(a){return P.q(Math.abs(a.x),Math.abs(a.y))};R.Bz=function(a){return Q.pg(R.Jl(a.i),R.Jl(a.j))};R.Bb=function(a,c,b){return a<c?c:a>b?b:a};R.Lz=function(a,
c,b){return P.q(R.Bb(a.x,c.x,b.x),R.Bb(a.y,c.y,b.y))};var Q=function(){this.i=P.q(0,0);this.j=P.q(0,0);this.ji()};Q.vk=function(a){var c=new Q;c.Set(a);return c};Q.pg=function(a,c){var b=new Q;b.yr(a,c);return b};r=Q.prototype;r.Set=function(a){var c=Math.cos(a);a=Math.sin(a);this.i.Set(c,a);this.j.Set(-a,c)};r.yr=function(a,c){this.i.D(a);this.j.D(c)};r.sc=function(){var a=new Q;a.Hf(this);return a};r.Hf=function(a){this.i.D(a.i);this.j.D(a.j)};r.Xn=function(a){this.i.hh(a.i);this.j.hh(a.j)};r.ji=
function(){this.i.Set(1,0);this.j.Set(0,1)};r.fa=function(){this.i.Set(0,0);this.j.Set(0,0)};r.Kd=function(){return Math.atan2(this.i.y,this.i.x)};r.br=function(a){var c=this.i.x*this.j.y-this.j.x*this.i.y;0!==c&&(c=1/c);a.i.x=c*this.j.y;a.j.x=-c*this.j.x;a.i.y=-c*this.i.y;a.j.y=c*this.i.x;return a};r.li=function(a,c,b){var d=this.i.x*this.j.y-this.j.x*this.i.y;0!==d&&(d=1/d);a.x=d*(this.j.y*c-this.j.x*b);a.y=d*(this.i.x*b-this.i.y*c);return a};r.gh=function(){this.i.gh();this.j.gh()};var Jc=function(a,
c,b){this.i=new Ic(0,0,0);this.j=new Ic(0,0,0);this.ma=new Ic(0,0,0);a&&this.i.D(a);c&&this.j.D(c);b&&this.ma.D(b)};r=Jc.prototype;r.sc=function(){return new Jc(this.i,this.j,this.ma)};r.Hf=function(a){this.i.D(a.i);this.j.D(a.j);this.ma.D(a.ma)};r.Xn=function(a){this.i.x+=a.i.x;this.i.y+=a.i.y;this.i.z+=a.i.z;this.j.x+=a.j.x;this.j.y+=a.j.y;this.j.z+=a.j.z;this.ma.x+=a.ma.x;this.ma.y+=a.ma.y;this.ma.z+=a.ma.z};r.ji=function(){this.i.Set(1,0,0);this.j.Set(0,1,0);this.ma.Set(0,0,1)};r.fa=function(){this.i.Set(0,
0,0);this.j.Set(0,0,0);this.ma.Set(0,0,0)};r.Ck=function(a,c,b){var d=this.i.x,f=this.j.x,k=this.i.y,e=this.j.y,g=d*e-f*k;0!=g&&(g=1/g);a.x=g*(e*c-f*b);a.y=g*(d*b-k*c);return a};r.cm=function(a,c,b,d){var f=this.i.x,k=this.i.y,e=this.i.z,g=this.j.x,l=this.j.y,n=this.j.z,h=this.ma.x,m=this.ma.y,q=this.ma.z,p=f*(l*q-n*m)+k*(n*h-g*q)+e*(g*m-l*h);0!=p&&(p=1/p);a.x=p*(c*(l*q-n*m)+b*(n*h-g*q)+d*(g*m-l*h));a.y=p*(f*(b*q-d*m)+k*(d*h-c*q)+e*(c*m-b*h));a.z=p*(f*(l*d-n*b)+k*(n*c-g*d)+e*(g*b-l*c));return a};
var Kc=function(){this.L=P.q(0,0);this.Vc=P.q(0,0);this.r=P.q(0,0)};Kc.prototype.Set=function(a){this.L.D(a.L);this.Vc.D(a.Vc);this.r.D(a.r);this.ef=a.ef;this.I=a.I;this.Fd=a.Fd};Kc.prototype.sc=function(){var a=new Kc;a.L.D(this.L);a.Vc.D(this.Vc);a.r.D(this.r);a.ef=this.ef;a.I=this.I;a.Fd=this.Fd;return a};Kc.prototype.me=function(a,c){void 0===c&&(c=0);a.position.x=(1-c)*this.Vc.x+c*this.r.x;a.position.y=(1-c)*this.Vc.y+c*this.r.y;a.n.Set((1-c)*this.ef+c*this.I);var b=a.n;a.position.x-=b.i.x*this.L.x+
b.j.x*this.L.y;a.position.y-=b.i.y*this.L.x+b.j.y*this.L.y};Kc.prototype.fi=function(a){void 0===a&&(a=0);if(this.Fd<a&&1-this.Fd>Number.MIN_VALUE){var c=(a-this.Fd)/(1-this.Fd);this.Vc.x=(1-c)*this.Vc.x+c*this.r.x;this.Vc.y=(1-c)*this.Vc.y+c*this.r.y;this.ef=(1-c)*this.ef+c*this.I;this.Fd=a}};var sc=function(a,c){this.position=P.q(0,0);this.n=new Q;a&&this.position.D(a);c&&this.n.Hf(c)};sc.prototype.jc=function(a,c){this.position.D(a);this.n.Hf(c)};sc.prototype.ji=function(){this.position.fa();this.n.ji()};
sc.prototype.Set=function(a){this.position.D(a.position);this.n.Hf(a.n)};sc.prototype.Kd=function(){return Math.atan2(this.n.i.y,this.n.i.x)};var P=function(a,c){this.x=a;this.y=c};P.lh=[];P.q=function(a,c){if(0<P.lh.length){var b=P.lh.pop();b.Set(a,c);return b}return new P(a,c)};P.ic=function(a){P.lh.push(a)};r=P.prototype;r.fa=function(){this.y=this.x=0};r.Set=function(a,c){this.x=a;this.y=c};r.D=function(a){this.x=a.x;this.y=a.y};r.hi=function(){return P.q(-this.x,-this.y)};r.kr=function(){this.x=
-this.x;this.y=-this.y};r.sc=function(){return P.q(this.x,this.y)};r.hh=function(a){this.x+=a.x;this.y+=a.y};r.Br=function(a){this.x-=a.x;this.y-=a.y};r.Md=function(a){this.x*=a;this.y*=a};r.ih=function(a){var c=this.x;this.x=a*this.y;this.y=-a*c};r.Xq=function(a){var c=this.x;this.x=-a*this.y;this.y=a*c};r.rv=function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y)};r.pv=function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y)};r.gh=function(){this.x=Math.abs(this.x);this.y=
Math.abs(this.y)};r.qg=function(){return Math.sqrt(this.oo())};r.oo=function(){return this.x*this.x+this.y*this.y};r.Nd=function(){var a=this.qg();if(a<Number.MIN_VALUE)return 0;var c=1/a;this.x*=c;this.y*=c;return a};r.no=function(){return isFinite(this.x)&&isFinite(this.y)};var Ic=function(a,c,b){this.x=a;this.y=c;this.z=b};r=Ic.prototype;r.fa=function(){this.z=this.y=this.x=0};r.Set=function(a,c,b){this.x=a;this.y=c;this.z=b};r.D=function(a){this.x=a.x;this.y=a.y;this.z=a.z};r.hi=function(){return new Ic(-this.x,
-this.y,-this.z)};r.kr=function(){this.x=-this.x;this.y=-this.y;this.z=-this.z};r.sc=function(){return new Ic(this.x,this.y,this.z)};r.hh=function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z};r.Br=function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z};r.Md=function(a){this.x*=a;this.y*=a;this.z*=a};var Lc=function(){this.Va=.005};r=Lc.prototype;r.jj=function(){};r.sc=function(){};r.Set=function(a){this.Va=a.Va};r.sk=function(){};r.Nl=function(){};r.bo=function(){};r.ur=function(){};var yc=function(a){this.Va=
.005;this.Va=a;this.kl=a*a;this.hb=P.q(0,0)};B(yc,Lc);r=yc.prototype;r.jj=function(){return yc.Gf};r.sc=function(){var a=new yc(this.Va);a.Set(this);return a};r.Set=function(a){Lc.prototype.Set.call(this,a);a instanceof yc&&this.hb.D(a.hb)};r.sk=function(a,c){var b=c.n,d=c.position.x+(b.i.x*this.hb.x+b.j.x*this.hb.y),b=c.position.y+(b.i.y*this.hb.x+b.j.y*this.hb.y);a.Ca.Set(d-this.Va,b-this.Va);a.Da.Set(d+this.Va,b+this.Va)};r.Nl=function(a,c){a.Ng=c*Math.PI*this.kl;a.oh.D(this.hb);a.yk=a.Ng*(.5*
this.kl+(this.hb.x*this.hb.x+this.hb.y*this.hb.y))};r.bo=function(a,c,b,d){b=R.Fc(b,this.hb);var f=-(R.Ib(a,b)-c);if(f<-this.Va+Number.MIN_VALUE)return 0;if(f>this.Va)return d.D(b),Math.PI*this.kl;c=f*f;f=this.kl*(Math.asin(f/this.Va)+Math.PI/2)+f*Math.sqrt(this.kl-c);c=-2/3*Math.pow(this.kl-c,1.5)/f;d.x=b.x+a.x*c;d.y=b.y+a.y*c;return f};r.ur=function(a){a.H=[this.hb];a.ka=1;a.Va=this.Va};yc.Gf="b2CircleShape";var Mc=function(a,c){this.Va=.005;this.la=a;this.Ia=c;this.Zj=P.q(this.Ia.x-this.la.x,this.Ia.y-
this.la.y);this.Ct=this.Zj.Nd();this.ta=P.q(this.Zj.y,-this.Zj.x);P.q(-.04*(this.ta.x-this.Zj.x)+this.la.x,-.04*(this.ta.y-this.Zj.y)+this.la.y);P.q(-.04*(this.ta.x+this.Zj.x)+this.Ia.x,-.04*(this.ta.y+this.Zj.y)+this.Ia.y);P.q(-this.ta.x,-this.ta.y)};B(Mc,Lc);Mc.prototype.jj=function(){return"b2EdgeShape"};Mc.prototype.sk=function(a,c){var b=c.n,d=c.position.x+(b.i.x*this.la.x+b.j.x*this.la.y),f=c.position.y+(b.i.y*this.la.x+b.j.y*this.la.y),k=c.position.x+(b.i.x*this.Ia.x+b.j.x*this.Ia.y),b=c.position.y+
(b.i.y*this.Ia.x+b.j.y*this.Ia.y);d<k?(a.Ca.x=d,a.Da.x=k):(a.Ca.x=k,a.Da.x=d);f<b?(a.Ca.y=f,a.Da.y=b):(a.Ca.y=b,a.Da.y=f)};Mc.prototype.Nl=function(a){a.Ng=0;a.oh.D(this.la);a.yk=0};Mc.prototype.bo=function(a,c,b,d){void 0===c&&(c=0);var f=P.q(a.x*c,a.y*c),k=R.Fc(b,this.la);b=R.Fc(b,this.Ia);var e=R.Ib(a,k)-c;a=R.Ib(a,b)-c;if(0<e){if(0<a)return 0;k.x=-a/(e-a)*k.x+e/(e-a)*b.x;k.y=-a/(e-a)*k.y+e/(e-a)*b.y}else 0<a&&(b.x=-a/(e-a)*k.x+e/(e-a)*b.x,b.y=-a/(e-a)*k.y+e/(e-a)*b.y);d.x=(f.x+k.x+b.x)/3;d.y=
(f.y+k.y+b.y)/3;return.5*((k.x-f.x)*(b.y-f.y)-(k.y-f.y)*(b.x-f.x))};var Nc=function(){this.Ng=0;this.oh=P.q(0,0);this.yk=0},V=function(){this.Va=.005;this.Td=P.q(0,0);this.H=[];this.ua=[]};B(V,Lc);V.prototype.jj=function(){return V.Gf};V.prototype.sc=function(){var a=new V;a.Set(this);return a};V.prototype.Set=function(a){Lc.prototype.Set.call(this,a);if(a instanceof V){this.Td.D(a.Td);this.Oa=a.Oa;this.Zl(this.Oa);for(var c=0;c<this.Oa;c++)this.H[c].D(a.H[c]),this.ua[c].D(a.ua[c])}};V.prototype.$l=
function(a){this.Fv(a)};V.LF=function(a){var c=new V;c.$l(a);return c};V.prototype.Fv=function(a){var c=a.length;this.Oa=c;this.Zl(c);for(c=c=0;c<this.Oa;c++)this.H[c].D(a[c]);for(c=0;c<this.Oa;++c)a=R.wb(this.H[c+1<this.Oa?c+1:0],this.H[c]),this.ua[c].D(R.ih(a,1)),this.ua[c].Nd();this.Td=V.Tz(this.H,this.Oa)};V.PF=function(a){var c=new V;c.Fv(a);return c};V.prototype.qo=function(a,c){this.Oa=4;this.Zl(4);this.H[0].Set(-a,-c);this.H[1].Set(a,-c);this.H[2].Set(a,c);this.H[3].Set(-a,c);this.ua[0].Set(0,
-1);this.ua[1].Set(1,0);this.ua[2].Set(0,1);this.ua[3].Set(-1,0);this.Td.fa()};V.MF=function(a,c){var b=new V;b.qo(a,c);return b};V.prototype.MA=function(a,c,b,d){this.Oa=4;this.Zl(4);this.H[0].Set(-a,-c);this.H[1].Set(a,-c);this.H[2].Set(a,c);this.H[3].Set(-a,c);this.ua[0].Set(0,-1);this.ua[1].Set(1,0);this.ua[2].Set(0,1);this.ua[3].Set(-1,0);this.Td=b;a=new Q;a.Set(d);b=new sc(b,a);for(d=0;d<this.Oa;++d)this.H[d]=R.Fc(b,this.H[d]),this.ua[d]=R.Vb(b.n,this.ua[d])};V.OF=function(a,c,b,d){var f=new V;
f.MA(a,c,b,d);return f};V.prototype.Ev=function(a,c){this.Oa=2;this.Zl(2);this.H[0].D(a);this.H[1].D(c);this.Td.x=.5*(a.x+c.x);this.Td.y=.5*(a.y+c.y);this.ua[0]=R.ih(R.wb(c,a),1);this.ua[0].Nd();this.ua[1].x=-this.ua[0].x;this.ua[1].y=-this.ua[0].y};V.NF=function(a,c){var b=new V;b.Ev(a,c);return b};r=V.prototype;r.sk=function(a,c){for(var b=c.n,d=this.H[0],f=c.position.x+(b.i.x*d.x+b.j.x*d.y),k=c.position.y+(b.i.y*d.x+b.j.y*d.y),e=f,g=k,l=1;l<this.Oa;++l)var d=this.H[l],n=c.position.x+(b.i.x*d.x+
b.j.x*d.y),d=c.position.y+(b.i.y*d.x+b.j.y*d.y),f=f<n?f:n,k=k<d?k:d,e=e>n?e:n,g=g>d?g:d;a.Ca.x=f-this.Va;a.Ca.y=k-this.Va;a.Da.x=e+this.Va;a.Da.y=g+this.Va};r.Nl=function(a,c){if(2==this.Oa)a.oh.x=.5*(this.H[0].x+this.H[1].x),a.oh.y=.5*(this.H[0].y+this.H[1].y),a.Ng=0,a.yk=0;else{for(var b=0,d=0,f=0,k=0,e=1/3,g=0;g<this.Oa;++g)var l=this.H[g],n=g+1<this.Oa?this.H[g+1]:this.H[0],h=l.x-0,m=l.y-0,q=n.x-0,p=n.y-0,s=h*p-m*q,t=.5*s,f=f+t,b=b+t*e*(0+l.x+n.x),d=d+t*e*(0+l.y+n.y),l=h,k=k+s*(e*(.25*(l*l+q*
l+q*q)+(0*l+0*q))+0+(e*(.25*(m*m+p*m+p*p)+(0*m+0*p))+0));a.Ng=c*f;a.oh.Set(1/f*b,1/f*d);a.yk=c*k}};r.bo=function(a,c,b,d){var f=R.jh(b.n,a),k=c-R.Ib(a,b.position),e=[],g=0,l=-1;c=-1;var n=!1;for(a=a=0;a<this.Oa;++a){e[a]=R.Ib(f,this.H[a])-k;var h=e[a]<-Number.MIN_VALUE;0<a&&(h?n||(l=a-1,g++):n&&(c=a-1,g++));n=h}switch(g){case 0:return n?(a=new Nc,this.Nl(a,1),d.D(R.Fc(b,a.oh)),a.Ng):0;case 1:-1==l?l=this.Oa-1:c=this.Oa-1}a=(l+1)%this.Oa;f=(c+1)%this.Oa;k=(0-e[l])/(e[a]-e[l]);e=(0-e[c])/(e[f]-e[c]);
l=P.q(this.H[l].x*(1-k)+this.H[a].x*k,this.H[l].y*(1-k)+this.H[a].y*k);c=P.q(this.H[c].x*(1-e)+this.H[f].x*e,this.H[c].y*(1-e)+this.H[f].y*e);e=0;k=P.q(0,0);for(g=this.H[a];a!=f;)a=(a+1)%this.Oa,n=a==f?c:this.H[a],h=.5*((g.x-l.x)*(n.y-l.y)-(g.y-l.y)*(n.x-l.x)),e+=h,k.x+=h*(l.x+g.x+n.x)/3,k.y+=h*(l.y+g.y+n.y)/3,g=n;k.Md(1/e);d.D(R.Fc(b,k));return e};r.ur=function(a){a.H=this.H;a.ka=this.Oa;a.Va=this.Va};r.lo=function(a){for(var c=0,b=this.H[0].x*a.x+this.H[0].y*a.y,d=1;d<this.Oa;++d){var f=this.H[d].x*
a.x+this.H[d].y*a.y;f>b&&(c=d,b=f)}return c};r.Tl=function(a){for(var c=0,b=this.H[0].x*a.x+this.H[0].y*a.y,d=1;d<this.Oa;++d){var f=this.H[d].x*a.x+this.H[d].y*a.y;f>b&&(c=d,b=f)}return this.H[c]};r.Zl=function(a){this.H=[];this.ua=[];for(var c=this.H.length;c<a;c++)this.H[c]=P.q(0,0),this.ua[c]=P.q(0,0)};V.Tz=function(a,c){for(var b=P.q(0,0),d=0,f=1/3,k=0;k<c;++k){var e=a[k],g=k+1<c?a[k+1]:a[0],l=.5*((e.x-0)*(g.y-0)-(e.y-0)*(g.x-0)),d=d+l;b.x+=l*f*(0+e.x+g.x);b.y+=l*f*(0+e.y+g.y)}b.x*=1/d;b.y*=
1/d;return b};V.gH=new Q;V.Gf="b2PolygonShape";var Oc=function(){this.Er=this.Dr=this.Fr=this.Od=0};r=Oc.prototype;r.mj=function(a){this.Od=a;this.Fr=this.Od&255;this.Dr=(this.Od&65280)>>8&255;this.Er=(this.Od&16711680)>>16&255;this.Tv=(this.Od&4278190080)>>24&255};r.Set=function(a){this.mj(a.Od)};r.Lv=function(a){this.Fr=a;this.Od=this.Od&4294967040|this.Fr&255};r.Jv=function(a){this.Dr=a;this.Od=this.Od&4294902015|this.Dr<<8&65280};r.Kv=function(a){this.Er=a;this.Od=this.Od&4278255615|this.Er<<
16&16711680};r.NA=function(a){this.Tv=a;this.Od=this.Od&16777215|this.Tv<<24&4278190080};r.sc=function(){var a=new Oc;a.Set(this);return a};var Qc=function(){this.bf=P.q(0,0);this.id=new Oc};Qc.prototype.Set=function(a){this.bf.D(a.bf);this.id.Set(a.id)};var Rc=function(){this.Ca=P.q(0,0);this.Da=P.q(0,0)},Sc=[],Tc=function(){if(0<Sc.length){var a=Sc.pop();a.fa();return a}return new Rc};r=Rc.prototype;r.fa=function(){this.Ca.Set(0,0);this.Da.Set(0,0)};r.no=function(){return 0>this.Da.x-this.Ca.x||
0>this.Da.y-this.Ca.y?!1:this.Ca.no()&&this.Da.no()};r.bA=function(){return P.q((this.Ca.x+this.Da.x)/2,(this.Ca.y+this.Da.y)/2)};r.Vq=function(a){var c;return c=(c=(c=(c=this.Ca.x<=a.Ca.x)&&this.Ca.y<=a.Ca.y)&&a.Da.x<=this.Da.x)&&a.Da.y<=this.Da.y};r.dm=function(a){return 0<a.Ca.x-this.Da.x||0<a.Ca.y-this.Da.y||0<this.Ca.x-a.Da.x||0<this.Ca.y-a.Da.y?!1:!0};r.ao=function(a,c){this.Ca.x=Math.min(a.Ca.x,c.Ca.x);this.Ca.y=Math.min(a.Ca.y,c.Ca.y);this.Da.x=Math.max(a.Da.x,c.Da.x);this.Da.y=Math.max(a.Da.y,
c.Da.y)};var Uc=function(a,c,b,d){var f=0,k=c[0].bf,e=c[1].bf,g=b.x*k.x+b.y*k.y-d;b=b.x*e.x+b.y*e.y-d;0>=g&&a[f++].Set(c[0]);0>=b&&a[f++].Set(c[1]);0>g*b&&(b=g/(g-b),d=a[f].bf,d.x=k.x+b*(e.x-k.x),d.y=k.y+b*(e.y-k.y),a[f].id=0<g?c[0].id:c[1].id,f++);return f},Vc=function(a,c,b,d,f){for(var k=c.n.i.x*a.ua[b].x+c.n.j.x*a.ua[b].y,e=c.n.i.y*a.ua[b].x+c.n.j.y*a.ua[b].y,g=f.n.i.x*k+f.n.i.y*e,l=f.n.j.x*k+f.n.j.y*e,n=0,h=Number.MAX_VALUE,m=0;m<d.Oa;m++){var q=d.H[m].x*g+d.H[m].y*l;q<h&&(h=q,n=m)}return(f.position.x+
(f.n.i.x*d.H[n].x+f.n.j.x*d.H[n].y)-(c.position.x+(c.n.i.x*a.H[b].x+c.n.j.x*a.H[b].y)))*k+(f.position.y+(f.n.i.y*d.H[n].x+f.n.j.y*d.H[n].y)-(c.position.y+(c.n.i.y*a.H[b].x+c.n.j.y*a.H[b].y)))*e},Wc=function(a,c,b,d){for(var f=d.position.x+(d.n.i.x*b.Td.x+d.n.j.x*b.Td.y),k=d.position.y+(d.n.i.y*b.Td.x+d.n.j.y*b.Td.y),f=f-(c.position.x+(c.n.i.x*a.Td.x+c.n.j.x*a.Td.y)),k=k-(c.position.y+(c.n.i.y*a.Td.x+c.n.j.y*a.Td.y)),e=f*c.n.i.x+k*c.n.i.y,k=f*c.n.j.x+k*c.n.j.y,f=0,g=-Number.MAX_VALUE,l=0;l<a.Oa;++l){var n=
a.ua[l].x*e+a.ua[l].y*k;n>g&&(g=n,f=l)}e=Vc(a,c,f,b,d);k=f-1;0>k&&(k=a.Oa-1);g=Vc(a,c,k,b,d);l=f+1;l>=a.Oa&&(l=0);var n=Vc(a,c,l,b,d),h=0,m=0;if(g>e&&g>n)for(h=k,m=g;;)if(f=h-1,0>f&&(f=a.Oa-1),e=Vc(a,c,f,b,d),e>m)h=f,m=e;else break;else if(n>e)for(h=l,m=n;;)if(f=h+1,f>=a.Oa&&(f=0),e=Vc(a,c,f,b,d),e>m)h=f,m=e;else break;else h=f,m=e;return{hw:h,zq:m}},Yc=function(a,c,b){var d=new Xc;d.IA(c,b.Uh,b.Lq,b.Vh,b.Mq);for(var f=0;20>f;){for(var k=[],e=0;e<d.ka;e++)k[e]={},k[e].mc=d.H[e].mc,k[e].nc=d.H[e].nc;
2==d.ka?d.WA():3==d.ka&&d.XA();if(3==d.ka)break;e=d.dA();if(e.oo()<Hc)break;var g=e.hi();d.H[d.ka].mc=b.Uh.lo(R.jh(b.Lq.n,g));d.H[d.ka].od=R.Fc(b.Lq,b.Uh.fd(d.H[d.ka].mc));d.H[d.ka].nc=b.Vh.lo(R.jh(b.Mq.n,e));d.H[d.ka].Ef=R.Fc(b.Mq,b.Vh.fd(d.H[d.ka].nc));d.H[d.ka].ed=R.wb(d.H[d.ka].Ef,d.H[d.ka].od);P.ic(e);P.ic(g);f++;g=!1;for(e=0;e<k.length;e++)if(d.H[d.ka].mc==k[e].mc&&d.H[d.ka].nc==k[e].nc){g=!0;break}if(g)break;d.ka++}d.eA(a.cg,a.dg);a.wh=R.wb(a.cg,a.dg).qg();d.iB(c);b.tz&&(c=b.Uh.Va,b=b.Vh.Va,
a.wh>c+b&&a.wh>Number.MIN_VALUE?(a.wh-=c+b,d=R.wb(a.dg,a.cg),d.Nd(),a.cg.x+=c*d.x,a.cg.y+=c*d.y,a.dg.x-=b*d.x,a.dg.y-=b*d.y,P.ic(d)):(b=P.q(0,0),b.x=.5*(a.cg.x+a.dg.x),b.y=.5*(a.cg.y+a.dg.y),a.cg.x=a.dg.x=b.x,a.cg.y=a.dg.y=b.y,a.wh=0,P.ic(b)))},Zc=function(){},$c=function(){this.cg=P.q(0,0);this.dg=P.q(0,0);this.wh=0},ad=function(){};ad.prototype.Set=function(a){a.ur(this)};ad.prototype.lo=function(a){for(var c=0,b=this.H[0].x*a.x+this.H[0].y*a.y,d=1;d<this.ka;d++){var f=this.H[d].x*a.x+this.H[d].y*
a.y;f>b&&(c=d,b=f)}return c};ad.prototype.Tl=function(a){return this.H[this.lo(a)]};ad.prototype.fd=function(a){void 0===a&&(a=0);return this.H[a]};var bd=function(){this.Mg=null};r=bd.prototype;r.Ol=function(a,c){var b=cd(c);b.Ta.Ca.x=a.Ca.x-.1;b.Ta.Ca.y=a.Ca.y-.1;b.Ta.Da.x=a.Da.x+.1;b.Ta.Da.y=a.Da.y+.1;this.lv(b);return b};r.Pl=function(a){this.Bv(a);a.Jd()};r.hr=function(a,c,b){if(a.Ta.Vq(c))return!1;this.Bv(a);var d=.1+2*Math.abs(b.x);b=.1+2*Math.abs(b.y);a.Ta.Ca.x=c.Ca.x-d;a.Ta.Ca.y=c.Ca.y-b;
a.Ta.Da.x=c.Da.x+d;a.Ta.Da.y=c.Da.y+b;this.lv(a);return!0};r.Rl=function(a){return a.Ta};r.sr=function(a,c){if(null!==this.Mg){var b=[];for(b.push(this.Mg);0<b.length;){var d=b.pop();if(d.Ta.dm(c))if(d.mv()){if(!a(d.mf))break}else b.push(d.se),b.push(d.ug)}}};r.lv=function(a){if(null===this.Mg)this.Mg=a,this.Mg.parent=null;else{var c=this.aA(a),b=c.parent,d=cd();d.parent=b;d.Ta.ao(a.Ta,c.Ta);if(b)for(c.parent.se==c?b.se=d:b.ug=d,d.se=c,d.ug=a,c.parent=d,a.parent=d;b&&!b.Ta.Vq(d.Ta);)b.Ta.ao(b.se.Ta,
b.ug.Ta),d=b,b=b.parent;else d.se=c,d.ug=a,c.parent=d,this.Mg=a.parent=d}};r.aA=function(a){a=a.Ta.bA();for(var c=this.Mg;!c.mv();)var b=c.se,c=c.ug,d=Math.abs((b.Ta.Ca.x+b.Ta.Da.x)/2-a.x)+Math.abs((b.Ta.Ca.y+b.Ta.Da.y)/2-a.y),f=Math.abs((c.Ta.Ca.x+c.Ta.Da.x)/2-a.x)+Math.abs((c.Ta.Ca.y+c.Ta.Da.y)/2-a.y),c=d<f?b:c;P.ic(a);return c};r.Bv=function(a){if(a==this.Mg)this.Mg=null;else{var c=a.parent,b=c.parent;a=c.se==a?c.ug:c.se;if(b)for(b.se==c?b.se=a:b.ug=a,a.parent=b;b;){a=b.Ta;b.Ta.ao(b.se.Ta,b.ug.Ta);
if(a.Vq(b.Ta))break;b=b.parent}else this.Mg=a,a.parent=null;c.Jd()}};var dd=function(){this.Qh=new bd;this.Yp=[]};r=dd.prototype;r.Ol=function(a,c){var b=this.Qh.Ol(a,c);this.av(b);return b};r.Pl=function(a){this.bB(a);this.Qh.Pl(a)};r.hr=function(a,c,b){this.Qh.hr(a,c,b)&&this.av(a)};r.dm=function(a,c){return this.Qh.Rl(a).dm(this.Qh.Rl(c))};r.Rl=function(a){return this.Qh.Rl(a)};r.dB=function(a){for(var c=[];0<this.Yp.length;){var b=this.Yp.pop();this.Qh.sr(function(a){a!=b.mf&&c.push(new ed(b.mf,
a));return!0},this.Qh.Rl(b))}for(var d=0;d<c.length;){var f=c[d];a(f.wm,f.xm);for(d++;d<c.length;){var k=c[d];if(!(k.wm==f.wm&&k.xm==f.xm||k.wm==f.xm&&k.xm==f.wm))break;d++}}};r.sr=function(a,c){this.Qh.sr(a,c)};r.av=function(a){this.Yp.push(a)};r.bB=function(a){Ea(this.Yp,a)};var fd=function(a){this.Ta=Tc();this.mf=this.parent=this.ug=this.se=null;"undefined"!=typeof a&&(this.mf=a)},gd=[],cd=function(a){if(0<gd.length){var c=gd.pop();"undefined"!=typeof a&&(c.mf=a);c.Ta.fa();return c}return new fd(a)};
fd.prototype.Jd=function(){this.mf=this.parent=this.ug=this.se=null;gd.push(this)};fd.prototype.mv=function(){return null===this.se};var ed=function(a,c){this.wm=a;this.xm=c},id=function(){this.Wa=this.Yb=0;this.ja=[];for(var a=0;2>a;a++)this.ja[a]=new hd;this.Zc=P.q(0,0);this.ra=P.q(0,0)};id.prototype.Sc=function(){for(var a=0;2>a;a++)this.ja[a].Sc();this.Zc.fa();this.ra.fa();this.Yb=this.Wa=0};id.prototype.Set=function(a){this.Yb=a.Yb;for(var c=0;2>c;c++)this.ja[c].Set(a.ja[c]);this.Zc.D(a.Zc);
this.ra.D(a.ra);this.Wa=a.Wa};id.prototype.sc=function(){var a=new id;a.Set(this);return a};var hd=function(){this.ra=P.q(0,0);this.vf=new Oc;this.Sc()};hd.prototype.Sc=function(){this.ra.fa();this.fk=this.bk=0;this.vf.mj(0)};hd.prototype.Set=function(a){this.ra.D(a.ra);this.bk=a.bk;this.fk=a.fk;this.vf.Set(a.vf)};var jd=function(){this.ra=P.q(0,0);this.R=P.q(0,0)};jd.prototype.jc=function(a,c,b,d,f){this.Oi=c;this.Pi=d;var k,e,g,l=g=e=0,n=0;d=c=0;var h,m,l=0;1==a.count?(this.Wa=kd,k=this.Oi.fd(a.mc[0]),
a=this.Pi.fd(a.nc[0]),m=k,h=b.n,e=b.position.x+(h.i.x*m.x+h.j.x*m.y),g=b.position.y+(h.i.y*m.x+h.j.y*m.y),m=a,h=f.n,l=f.position.x+(h.i.x*m.x+h.j.x*m.y),n=f.position.y+(h.i.y*m.x+h.j.y*m.y),this.R.x=l-e,this.R.y=n-g,this.R.Nd()):(a.nc[0]==a.nc[1]?(this.Wa=ld,c=this.Oi.fd(a.mc[0]),d=this.Oi.fd(a.mc[1]),a=this.Pi.fd(a.nc[0]),this.ra.x=.5*(c.x+d.x),this.ra.y=.5*(c.y+d.y),this.R=R.ih(R.wb(d,c),1),this.R.Nd(),m=this.R,h=b.n,c=h.i.x*m.x+h.j.x*m.y,d=h.i.y*m.x+h.j.y*m.y,m=this.ra,h=b.n,e=b.position.x+(h.i.x*
m.x+h.j.x*m.y),g=b.position.y+(h.i.y*m.x+h.j.y*m.y),m=a,h=f.n,l=f.position.x+(h.i.x*m.x+h.j.x*m.y),n=f.position.y+(h.i.y*m.x+h.j.y*m.y),l=(l-e)*c+(n-g)*d):a.mc[0]==a.mc[0]?(this.Wa=md,e=this.Pi.fd(a.nc[0]),g=this.Pi.fd(a.nc[1]),k=this.Oi.fd(a.mc[0]),this.ra.x=.5*(e.x+g.x),this.ra.y=.5*(e.y+g.y),this.R=R.ih(R.wb(g,e),1),this.R.Nd(),m=this.R,h=f.n,c=h.i.x*m.x+h.j.x*m.y,d=h.i.y*m.x+h.j.y*m.y,m=this.ra,h=f.n,l=f.position.x+(h.i.x*m.x+h.j.x*m.y),n=f.position.y+(h.i.y*m.x+h.j.y*m.y),m=k,h=b.n,e=b.position.x+
(h.i.x*m.x+h.j.x*m.y),g=b.position.y+(h.i.y*m.x+h.j.y*m.y),l=(e-l)*c+(g-n)*d):(c=this.Oi.fd(a.mc[0]),d=this.Oi.fd(a.mc[1]),e=this.Pi.fd(a.nc[0]),g=this.Pi.fd(a.nc[1]),l=R.Vb(b.n,R.wb(d,c)),n=R.Vb(f.n,R.wb(g,e)),f=l.x*l.x+l.y*l.y,b=n.x*n.x+n.y*n.y,k=R.wb(n,l),a=l.x*k.x+l.y*k.y,k=n.x*k.x+n.y*k.y,n=l.x*n.x+l.y*n.y,h=f*b-n*n,l=0,0!=h&&(l=R.Bb((n*k-a*b)/h,0,1)),0>(n*l+k)/b&&(l=R.Bb((n-a)/f,0,1)),k=P.q(0,0),k.x=c.x+l*(d.x-c.x),k.y=c.y+l*(d.y-c.y),a=P.q(0,0),a.x=e.x+l*(g.x-e.x),a.y=e.y+l*(g.y-e.y),0==l||
1==l?(this.Wa=md,this.R=R.ih(R.wb(g,e),1),this.R.Nd(),this.ra=a):(this.Wa=ld,this.R=R.ih(R.wb(d,c),1),this.ra=k)),0>l&&this.R.kr())};jd.prototype.ng=function(a,c){var b,d,f=0;switch(this.Wa){case kd:b=R.jh(a.n,this.R);d=R.jh(c.n,this.R.hi());b=this.Oi.Tl(b);d=this.Pi.Tl(d);b=R.Fc(a,b);d=R.Fc(c,d);f=(d.x-b.x)*this.R.x+(d.y-b.y)*this.R.y;break;case ld:f=R.Vb(a.n,this.R);b=R.Fc(a,this.ra);d=R.jh(c.n,f.hi());d=this.Pi.Tl(d);d=R.Fc(c,d);f=(d.x-b.x)*f.x+(d.y-b.y)*f.y;break;case md:f=R.Vb(c.n,this.R),d=
R.Fc(c,this.ra),b=R.jh(a.n,f.hi()),b=this.Oi.Tl(b),b=R.Fc(a,b),f=(b.x-d.x)*f.x+(b.y-d.y)*f.y}return f};var kd=1,ld=2,md=4,Xc=function(){this.la=new nd;this.Ia=new nd;this.ye=new nd;this.H=[this.la,this.Ia,this.ye]};r=Xc.prototype;r.IA=function(a,c,b,d,f){var k,e;this.ka=a.count;for(var g=this.H,l=0;l<this.ka;l++){var n=g[l];n.mc=a.mc[l];n.nc=a.nc[l];k=c.fd(n.mc);e=d.fd(n.nc);n.od=R.Fc(b,k);n.Ef=R.Fc(f,e);n.ed=R.wb(n.Ef,n.od);n.I=0}1<this.ka&&(a=a.zE,k=this.kv(),k<.5*a||2*a<k||k<Number.MIN_VALUE)&&
(this.ka=0);0==this.ka&&(n=g[0],n.mc=0,n.nc=0,k=c.fd(0),e=d.fd(0),n.od=R.Fc(b,k),n.Ef=R.Fc(f,e),n.ed=R.wb(n.Ef,n.od),this.ka=1)};r.iB=function(a){a.zE=this.kv();a.count=this.ka;for(var c=this.H,b=0;b<this.ka;b++)a.mc[b]=c[b].mc,a.nc[b]=c[b].nc};r.dA=function(){if(1==this.ka)return this.la.ed.hi();if(2==this.ka){var a=R.wb(this.Ia.ed,this.la.ed);return 0<R.fj(a,this.la.ed.hi())?R.Xq(1,a):R.ih(a,1)}return P.q(0,0)};r.eA=function(a,c){1==this.ka?(a.D(this.la.od),c.D(this.la.Ef)):2==this.ka?(a.x=this.la.I*
this.la.od.x+this.Ia.I*this.Ia.od.x,a.y=this.la.I*this.la.od.y+this.Ia.I*this.Ia.od.y,c.x=this.la.I*this.la.Ef.x+this.Ia.I*this.Ia.Ef.x,c.y=this.la.I*this.la.Ef.y+this.Ia.I*this.Ia.Ef.y):3==this.ka&&(c.x=a.x=this.la.I*this.la.od.x+this.Ia.I*this.Ia.od.x+this.ye.I*this.ye.od.x,c.y=a.y=this.la.I*this.la.od.y+this.Ia.I*this.Ia.od.y+this.ye.I*this.ye.od.y)};r.kv=function(){return 1==this.ka?0:2==this.ka?R.wb(this.la.ed,this.Ia.ed).qg():3==this.ka?R.fj(R.wb(this.Ia.ed,this.la.ed),R.wb(this.ye.ed,this.la.ed)):
0};r.WA=function(){var a=this.la.ed,c=this.Ia.ed,b=R.wb(c,a),a=-(a.x*b.x+a.y*b.y);0>=a?this.ka=this.la.I=1:(c=c.x*b.x+c.y*b.y,0>=c?(this.ka=this.Ia.I=1,this.la.Set(this.Ia)):(b=1/(c+a),this.la.I=c*b,this.Ia.I=a*b,this.ka=2))};r.XA=function(){var a=this.la.ed,c=this.Ia.ed,b=this.ye.ed,d=R.wb(c,a),f=R.Ib(c,d),k=-R.Ib(a,d),e=R.wb(b,a),g=R.Ib(b,e),l=-R.Ib(a,e),n=R.wb(b,c),h=R.Ib(b,n),n=-R.Ib(c,n),e=R.fj(d,e),d=e*R.fj(c,b),b=e*R.fj(b,a),a=e*R.fj(a,c);0>=k&&0>=l?this.ka=this.la.I=1:0<f&&0<k&&0>=a?(g=1/
(f+k),this.la.I=f*g,this.Ia.I=k*g,this.ka=2):0<g&&0<l&&0>=b?(f=1/(g+l),this.la.I=g*f,this.ye.I=l*f,this.ka=2,this.Ia.Set(this.ye)):0>=f&&0>=n?(this.ka=this.Ia.I=1,this.la.Set(this.Ia)):0>=g&&0>=h?(this.ka=this.ye.I=1,this.la.Set(this.ye)):0<h&&0<n&&0>=d?(f=1/(h+n),this.Ia.I=h*f,this.ye.I=n*f,this.ka=2,this.la.Set(this.ye)):(f=1/(d+b+a),this.la.I=d*f,this.Ia.I=b*f,this.ye.I=a*f,this.ka=3)};var od=function(){this.mc=[0,0,0];this.nc=[0,0,0]},nd=function(){};nd.prototype.Set=function(a){this.od.D(a.od);
this.Ef.D(a.Ef);this.ed.D(a.ed);this.I=a.I;this.mc=a.mc;this.nc=a.nc};var pd=function(){this.Uh=new ad;this.Vh=new ad;this.Yy=new Kc;this.Zy=new Kc},qd=function(){this.ta=P.q(0,0);this.ja=[];for(var a=this.Yb=0;2>a;a++)this.ja[a]=P.q(0,0)};qd.prototype.jc=function(a,c,b,d,f){if(0!=a.Yb){var k=0,e,g,l=0,n=0,h=0,m=0,q=0;e=0;switch(a.Wa){case 1:g=c.n;e=a.ra;k=c.position.x+g.i.x*e.x+g.j.x*e.y;c=c.position.y+g.i.y*e.x+g.j.y*e.y;g=d.n;e=a.ja[0].ra;a=d.position.x+g.i.x*e.x+g.j.x*e.y;d=d.position.y+g.i.y*
e.x+g.j.y*e.y;e=a-k;g=d-c;l=e*e+g*g;l>Hc?(l=Math.sqrt(l),this.ta.x=e/l,this.ta.y=g/l):(this.ta.x=1,this.ta.y=0);e=c+b*this.ta.y;d-=f*this.ta.y;this.ja[0].x=.5*(k+b*this.ta.x+(a-f*this.ta.x));this.ja[0].y=.5*(e+d);break;case 2:g=c.n;e=a.Zc;l=g.i.x*e.x+g.j.x*e.y;n=g.i.y*e.x+g.j.y*e.y;g=c.n;e=a.ra;h=c.position.x+g.i.x*e.x+g.j.x*e.y;m=c.position.y+g.i.y*e.x+g.j.y*e.y;this.ta.x=l;this.ta.y=n;for(k=0;k<a.Yb;k++)g=d.n,e=a.ja[k].ra,q=d.position.x+g.i.x*e.x+g.j.x*e.y,e=d.position.y+g.i.y*e.x+g.j.y*e.y,this.ja[k].x=
q+.5*(b-(q-h)*l-(e-m)*n-f)*l,this.ja[k].y=e+.5*(b-(q-h)*l-(e-m)*n-f)*n;break;case 4:for(g=d.n,e=a.Zc,l=g.i.x*e.x+g.j.x*e.y,n=g.i.y*e.x+g.j.y*e.y,g=d.n,e=a.ra,h=d.position.x+g.i.x*e.x+g.j.x*e.y,m=d.position.y+g.i.y*e.x+g.j.y*e.y,this.ta.x=-l,this.ta.y=-n,k=0;k<a.Yb;k++)g=c.n,e=a.ja[k].ra,q=c.position.x+g.i.x*e.x+g.j.x*e.y,e=c.position.y+g.i.y*e.x+g.j.y*e.y,this.ja[k].x=q+.5*(f-(q-h)*l-(e-m)*n-b)*l,this.ja[k].y=e+.5*(f-(q-h)*l-(e-m)*n-b)*n}}};var uc=function(a,c){this.Ld="Body"+uc.jr++;this.A=new sc;
this.A.position.D(a.position);this.A.n.Set(a.G);this.k=new Kc;this.k.L.fa();this.k.Fd=1;this.k.ef=this.k.I=a.G;this.k.r.x=this.A.n.i.x*this.k.L.x+this.A.n.j.x*this.k.L.y;this.k.r.y=this.A.n.i.y*this.k.L.x+this.A.n.j.y*this.k.L.y;this.k.r.x+=this.A.position.x;this.k.r.y+=this.A.position.y;this.k.Vc.D(this.k.r);this.p=a.jt.sc();this.Kh=P.q(0,0);this.fl=a.vj;this.eE=a.ms;this.ut=a.$v;this.wt=a.ew;this.dn=a.sd;this.Ja=c;this.Fb=null;this.ae=new rd;this.zj=new sd;this.C=a.aw;this.lE=a.Tj;this.$D=a.qj;
this.pn=this.gk=0;this.Wa=a.type;this.S=this.Wa==U.Hc?1:0;this.F=this.Wa==U.Hc?1:0;this.O=this.tf=0;this.iE=a.Vw;this.Ok=new td;this.Wp=[]};r=uc.prototype;r.tk=function(a){a=new tc(this,this.A,a);this.dn&&a.Ol(this.Ja.Ud.el,this.A);this.Ok.Cz(a);a.gn=this;0<a.Sp&&this.Dv();this.Ja.Ht=!0;return a};r.Jd=function(){P.ic(this.p);P.ic(this.Kh)};r.cv=function(a){this.Ok.JA(a);for(var c=this.ae.La(ud);c;c=c.next)a!=c.Jc.Kb&&a!=c.Jc.Eb||this.Ja.Ud.Jd(c.Jc);this.dn&&a.Pl(this.Ja.Ud.el);a.Jd();a.gn=null;this.Dv()};
r.am=function(a,c){this.A.n.Set(c);this.A.position.D(a);var b=this.A.n,d=this.k.L;this.k.r.x=b.i.x*d.x+b.j.x*d.y;this.k.r.y=b.i.y*d.x+b.j.y*d.y;this.k.r.x+=this.A.position.x;this.k.r.y+=this.A.position.y;this.k.Vc.D(this.k.r);this.k.ef=this.k.I=c;b=this.Ja.Ud.el;for(d=this.Ok.La();d;d=d.next)d.mf.Ov(b,this.A,this.A);this.Ja.Ud.ho()};r.me=function(){return this.A};r.xr=function(a){this.am(a,this.Kd())};r.Kd=function(){return this.k.I};r.po=function(a){this.am(this.A.position,a)};r.xk=function(){return this.k.r};
r.ij=function(){return this.k.L};r.ki=function(a){this.Wa!=U.Le&&this.p.D(a)};r.hj=function(){return this.p};r.Bk=function(a){void 0===a&&(a=0);this.Wa!=U.Le&&(this.C=a)};r.io=function(){return this.C};r.Ff=function(a,c){this.Wa==U.Hc&&(this.Gc(!0),this.Kh.x+=a.x,this.Kh.y+=a.y,this.gk+=(c.x-this.k.r.x)*a.y-(c.y-this.k.r.y)*a.x)};r.Yn=function(a){void 0===a&&(a=0);this.Wa==U.Hc&&(this.Gc(!0),this.gk+=a)};r.wk=function(){return this.S};r.jv=function(a){a||(a=new Nc);a.Ng=this.S;a.yk=this.tf;a.oh.D(this.k.L);
return a};r.Dv=function(){this.O=this.tf=this.F=this.S=0;this.k.L.fa();if(this.Wa!=U.Le&&this.Wa!=U.gw){for(var a=P.q(0,0),c=this.Ok.La();c;c=c.next){var b=c.mf;0!=b.Sp&&(b=b.jv(),this.S+=b.Ng,a.x+=b.oh.x*b.Ng,a.y+=b.oh.y*b.Ng,this.tf+=b.yk)}0<this.S?(this.F=1/this.S,a.x*=this.F,a.y*=this.F):this.F=this.S=1;0<this.tf&&!this.eE?(this.tf-=this.S*(a.x*a.x+a.y*a.y),this.tf*=this.iE,this.O=1/this.tf):this.O=this.tf=0;c=this.k.r.sc();this.k.L.D(a);this.k.Vc.D(R.Fc(this.A,this.k.L));this.k.r.D(this.k.Vc);
this.p.x+=this.C*-(this.k.r.y-c.y);this.p.y+=this.C*+(this.k.r.x-c.x);P.ic(a);P.ic(c)}};r.mo=function(a){var c=this.A.n;a=P.q(c.i.x*a.x+c.j.x*a.y,c.i.y*a.x+c.j.y*a.y);a.x+=this.A.position.x;a.y+=this.A.position.y;return a};r.dr=function(a){return R.Vb(this.A.n,a)};r.rd=function(a){return R.ir(this.A,a)};r.cr=function(a){return R.jh(this.A.n,a)};r.cA=function(a){return P.q(this.p.x-this.C*(a.y-this.k.r.y),this.p.y+this.C*(a.x-this.k.r.x))};r.Rc=function(){return this.Wa};r.Gc=function(a){if(this.wt!=
a)for(this.wt=a,this.pn=0,a||(this.p.fa(),this.C=0,this.Kh.fa(),this.gk=0),a=0;a<this.Wp.length;a++)this.Wp[a].Rv(this)};r.gd=function(){return this.wt};r.kj=function(){return this.dn};r.$q=function(){return this.Ok};r.Kl=function(a){this.zj.Kl(a)};r.Yl=function(a){this.zj.Yl(a)};r.gi=function(){return this.ae};r.Pv=function(){var a=uc.hF;a.n.Set(this.k.ef);var c=a.n,b=this.k.L;a.position.x=this.k.Vc.x-(c.i.x*b.x+c.j.x*b.y);a.position.y=this.k.Vc.y-(c.i.y*b.x+c.j.y*b.y);c=this.Ja.Ud.el;for(b=this.Ok.La();b;b=
b.next)b.mf.Ov(c,a,this.A)};r.Jb=function(){this.A.n.Set(this.k.I);var a=this.A.n,c=this.k.L;this.A.position.x=this.k.r.x-(a.i.x*c.x+a.j.x*c.y);this.A.position.y=this.k.r.y-(a.i.y*c.x+a.j.y*c.y)};r.nj=function(a){if(this.Wa!=U.Hc&&a.Wa!=U.Hc)return!1;for(var c=this.Fb;c;c=c.next)if(c.Ye==a&&0==c.Fh.Kx)return!1;return!0};r.fi=function(a){this.k.fi(a);this.k.r.D(this.k.Vc);this.k.I=this.k.ef;this.Jb()};uc.jr=0;var U=function(){this.position=P.q(0,0);this.jt=P.q(0,0);this.qj=this.Tj=this.aw=this.G=0;
this.ew=this.$v=!0;this.vj=this.ms=!1;this.type=U.Le;this.sd=!0;this.Vw=1};U.Le=0;U.gw=1;U.Hc=2;var wd=function(){this.Bo=[];for(var a=0;a<=vd;a++)this.Bo[a]=null;this.Co=[];for(a=0;a<=vd;a++)this.Co[a]=null;this.Fk={}};r=wd.prototype;r.La=function(a){return this.Bo[a]};r.qk=function(a){var c=a.Ld;null==this.Fk[c]&&(this.mg(a,c,vd),this.Rv(a),a.Wp.push(this))};r.Rv=function(a){var c=a.Rc(),b=a.Ld,d=a.gd(),f=a.kj();c==U.Hc?this.mg(a,b,xd):this.rg(b,xd);c!=U.Le?this.mg(a,b,yd):this.rg(b,yd);c!=U.Le&&
f&&d?this.mg(a,b,zd):this.rg(b,zd);d?this.mg(a,b,Ad):this.rg(b,Ad);f?this.mg(a,b,Bd):this.rg(b,Bd)};r.Xl=function(a){var c=a.Ld;if(null!=this.Fk[c]){Ea(a.Wp,this);for(a=0;a<=vd;a++)this.rg(c,a);delete this.Fk[c]}};r.rg=function(a,c){var b=this.Fk[a];if(null!=b){var d=b[c];null!=d&&(b[c]=null,b=d.Af,d=d.next,null==b?this.Bo[c]=d:b.If(d),null==d?this.Co[c]=b:d.Jf(b))}};r.mg=function(a,c,b){var d=this.Fk[c];if(null==d){for(var d=[],f=0;f<=vd;f++)d[f]=null;this.Fk[c]=d}null==d[b]&&(d[b]=new Cd(a),a=this.Co[b],
null!=a?a.If(d[b]):this.Bo[b]=d[b],d[b].Jf(a),this.Co[b]=d[b])};var xd=0,yd=1,Bd=2,zd=3,Ad=4,vd=5,Cd=function(a){this.body=a;this.Af=this.next=null};Cd.prototype.If=function(a){this.next=a};Cd.prototype.Jf=function(a){this.Af=a};Cd.prototype.Sa=function(){return this.body};var wc=function(){};wc.prototype.nj=function(a,c){var b=a.iv(),d=c.iv();return b.Ci==d.Ci&&0!=b.Ci?0<b.Ci:0!=(b.nl&d.Gk)&&0!=(b.Gk&d.nl)};wc.HB=new wc;var Dd=function(){this.DE=[];this.uF=[]},vc=function(){};vc.prototype.Zn=function(){};
var Fd=function(a){this.Ja=a;this.xt=wc.HB;this.Ih=vc.fw;this.Lx=new Ed;this.el=new dd};Fd.prototype.Ez=function(a,c){var b=a.Sa(),d=c.Sa();if(b!=d&&d.nj(b)&&this.xt.nj(a,c)){for(b=d.ae.La(ud);b;b=b.next)if(d=b.Jc.Kb,d==a){if(d=b.Jc.Eb,d==c)return}else if(d==c&&(d=b.Jc.Eb,d==a))return;this.Lx.cf(a,c)}};Fd.prototype.ho=function(){var a=this;this.el.dB(function(c,b){a.Ez(c,b)})};Fd.prototype.Jd=function(a){0<a.We.Yb&&(a.Kb.Sa().Gc(!0),a.Eb.Sa().Gc(!0));a.KA();this.Lx.Jd(a)};Fd.prototype.Pz=function(){for(var a=
this.Ja.ae.La(ud);a;a=a.next){var c=a.Jc,b=c.Kb,d=c.Eb,f=b.Sa(),k=d.Sa();if(0!=f.gd()||0!=k.gd()){if(c.ep){if(0==k.nj(f)){this.Jd(c);continue}if(0==this.xt.nj(b,d)){this.Jd(c);continue}c.Oz()}0==this.el.dm(b.ck,d.ck)?this.Jd(c):c.Qv(this.Ih)}}};var Gd=function(){this.Gk=1;this.nl=65535;this.Ci=0};Gd.prototype.sc=function(){var a=new Gd;a.Gk=this.Gk;a.nl=this.nl;a.Ci=this.Ci;return a};var tc=function(a,c,b){this.Ld="Fixture"+tc.jr++;this.dE=b.filter.sc();this.Yj=Tc();this.gn=a;this.Ph=b.shape.sc();
this.Sp=b.Qf;this.At=b.zg;this.It=b.Xg;this.Up=b.Ts};r=tc.prototype;r.Ec=function(){return this.Ph};r.lj=function(){return this.Up};r.iv=function(){return this.dE.sc()};r.Sa=function(){return this.gn};r.jv=function(a){a||(a=new Nc);this.Ph.Nl(a,this.Sp);return a};r.Jd=function(){Sc.push(this.Yj)};r.Ol=function(a,c){this.Ph.sk(this.Yj,c);this.ck=a.Ol(this.Yj,this)};r.Pl=function(a){null!=this.ck&&(a.Pl(this.ck),this.ck=null)};r.Ov=function(a,c,b){if(this.ck){var d=Tc(),f=Tc();this.Ph.sk(d,c);this.Ph.sk(f,
b);this.Yj.ao(d,f);Sc.push(d);Sc.push(f);c=R.wb(b.position,c.position);a.hr(this.ck,this.Yj,c);P.ic(c)}};tc.jr=0;var zc=function(){this.filter=new Gd;this.filter.Gk=1;this.filter.nl=65535;this.filter.Ci=0;this.shape=null;this.zg=.2;this.Qf=this.Xg=0;this.Ts=!1},td=function(){this.os=this.ns=null;this.gp={}};td.prototype.La=function(){return this.ns};td.prototype.Cz=function(a){var c=a.Ld;if(null==this.gp[c]){a=new Hd(a);var b=this.os;null!=b?b.If(a):this.ns=a;a.Jf(b);this.os=a;this.gp[c]=a}};td.prototype.JA=
function(a){a=a.Ld;var c=this.gp[a];if(null!=c){var b=c.Af,c=c.next;null==b?this.ns=c:b.If(c);null==c?this.os=b:c.Jf(b);delete this.gp[a]}};var Hd=function(a){this.mf=a;this.Af=this.next=null};Hd.prototype.If=function(a){this.next=a};Hd.prototype.Jf=function(a){this.Af=a};var Id=function(a,c){this.mE=a;this.Zf=c;this.Gg=[];this.Tp=[];this.Ni=[];this.Jh=[];this.Cd=[]};r=Id.prototype;r.$n=function(){this.Gg=[];this.Tp=[];this.Ni=[];this.Jh=[];this.Cd=[]};r.li=function(a,c,b){this.mB(a,c);this.Zf.jc(a,
this.Jh,this.Jh.length);this.sB(a);this.oB(a);this.pB(a);this.Cv(this.Zf.Hg);b&&this.nB(a)};r.mB=function(a,c){for(var b=0;b<this.Tp.length;b++){var d=this.Tp[b];d.p.x+=a.Ba*(c.x+d.F*d.Kh.x);d.p.y+=a.Ba*(c.y+d.F*d.Kh.y);d.C+=a.Ba*d.O*d.gk;d.p.Md(R.Bb(1-a.Ba*d.lE,0,1));d.C*=R.Bb(1-a.Ba*d.$D,0,1)}};r.sB=function(a){this.Zf.df(a);for(var c=0;c<this.Cd.length;c++)this.Cd[c].df(a);for(c=0;c<a.Vn;c++){for(var b=0;b<this.Cd.length;b++)this.Cd[b].Ie(a);this.Zf.Ie()}for(a=0;a<this.Cd.length;a++)this.Cd[a].Yq();
this.Zf.Yq()};r.oB=function(a){for(var c=0;c<this.Ni.length;++c){var b=this.Ni[c],d=a.Ba*b.p.x,f=a.Ba*b.p.y;4<d*d+f*f&&(b.p.Nd(),b.p.x=2*b.p.x*a.Ch,b.p.y=2*b.p.y*a.Ch);d=a.Ba*b.C;d*d>Fc&&(b.C=0>b.C?-Ec*a.Ch:Ec*a.Ch);b.k.Vc.D(b.k.r);b.k.ef=b.k.I;b.k.r.x+=a.Ba*b.p.x;b.k.r.y+=a.Ba*b.p.y;b.k.I+=a.Ba*b.C;b.Jb()}};r.pB=function(a){for(var c=0;c<a.Bn;c++){for(var b=this.Zf.He(.2),d=!0,f=0;f<this.Cd.length;f++)var k=this.Cd[f].He(.2),d=d&&k;if(b&&d)break}};r.nB=function(a){for(var c=Number.MAX_VALUE,b=0;b<
this.Ni.length;b++){var d=this.Ni[b];!d.ut||Math.abs(d.C)>Gc||1E-4<R.Ib(d.p,d.p)?c=d.pn=0:(d.pn+=a.Ba,c=Math.min(c,d.pn))}if(.5<=c)for(a=0;a<this.Gg.length;a++)this.Gg[a].Gc(!1)};r.Ar=function(a){var c=0,b=0;this.Zf.jc(a,this.Jh,this.Jh.length);for(var d=this.Zf,c=0;c<this.Cd.length;++c)this.Cd[c].df(a);for(c=0;c<a.Vn;++c)for(d.Ie(),b=0;b<this.Cd.length;++b)this.Cd[b].Ie(a);for(c=0;c<this.Ni.length;++c){var b=this.Ni[c],f=a.Ba*b.p.x,k=a.Ba*b.p.y;4<f*f+k*k&&(b.p.Nd(),b.p.x=2*b.p.x*a.Ch,b.p.y=2*b.p.y*
a.Ch);f=a.Ba*b.C;f*f>Fc&&(b.C=0>b.C?-Ec*a.Ch:Ec*a.Ch);b.k.Vc.D(b.k.r);b.k.ef=b.k.I;b.k.r.x+=a.Ba*b.p.x;b.k.r.y+=a.Ba*b.p.y;b.k.I+=a.Ba*b.C;b.Jb()}for(c=0;c<a.Bn;++c){f=d.He(.75);k=!0;for(b=0;b<this.Cd.length;++b)var e=this.Cd[b].He(.2),k=k&&e;if(f&&k)break}this.Cv(d.Hg)};r.Cv=function(a){if(null!=this.mE)for(var c=0;c<this.Jh.length;++c)for(var b=a[c],d=new Dd,f=0;f<b.zf;++f)d.DE[f]=b.ac[f].Zb,d.uF[f]=b.ac[f].ah};r.qk=function(a){this.Gg.push(a);a.Rc()!=U.Le&&(this.Ni.push(a),a.Rc()==U.Hc&&this.Tp.push(a))};
r.rk=function(a){this.Jh.push(a)};r.Zu=function(a){this.Cd.push(a)};var Jd=function(a,c,b,d,f){this.Ba=a;var k=0;0<a&&(k=1/a);this.Ch=k;this.vc=c;this.Bn=b;this.Vn=d;this.di=f},xc=function(a,c){this.Ud=new Fd(this);this.Zf=new Kd;this.Ht=!1;this.Uc=new wd;this.ae=new rd;this.Fb=null;this.zj=new sd;this.Vp=0;this.bE=this.sE=!0;this.ut=c;this.Bt=a;this.Mx=0;this.hE=this.Wq(new U)};xc.pA=1-100*Number.MIN_VALUE;r=xc.prototype;r.Gv=function(a){this.Ud.xt=a};r.Hv=function(a){this.Ud.Ih=a};r.Wq=function(a){a=
new uc(a,this);this.Uc.qk(a);return a};r.eo=function(a){for(var c=a.Fb;c;){var b=c,c=c.next;this.fo(b.Fh)}for(c=a.zj.La();c;c=c.next)c.rw.Xl(a);for(c=a.ae.La(ud);c;c=c.next)this.Ud.Jd(c.Jc);for(c=a.$q().La();c;c=c.next)a.cv(c.mf);a.Jd();this.Uc.Xl(a)};r.co=function(a){var c=Y.cf(a);c.hl=null;if(c.Mi=this.Fb)this.Fb.hl=c;this.Fb=c;this.Vp++;c.Vd.Fh=c;c.Vd.Ye=c.U;c.Vd.prev=null;if(c.Vd.next=c.T.Fb)c.T.Fb.prev=c.Vd;c.T.Fb=c.Vd;c.Wd.Fh=c;c.Wd.Ye=c.T;c.Wd.prev=null;if(c.Wd.next=c.U.Fb)c.U.Fb.prev=c.Wd;
c.U.Fb=c.Wd;var b=a.J,d=a.K;if(!a.Rr)for(a=d.ae.La(ud);a;a=a.next)a.Jc.ko(d)==b&&a.Jc.gv();return c};r.fo=function(a){var c=a.Kx;a.hl&&(a.hl.Mi=a.Mi);a.Mi&&(a.Mi.hl=a.hl);a==this.Fb&&(this.Fb=a.Mi);var b=a.T,d=a.U;b.Gc(!0);d.Gc(!0);a.Vd.prev&&(a.Vd.prev.next=a.Vd.next);a.Vd.next&&(a.Vd.next.prev=a.Vd.prev);a.Vd==b.Fb&&(b.Fb=a.Vd.next);a.Vd.prev=null;a.Vd.next=null;a.Wd.prev&&(a.Wd.prev.next=a.Wd.next);a.Wd.next&&(a.Wd.next.prev=a.Wd.prev);a.Wd==d.Fb&&(d.Fb=a.Wd.next);a.Wd.prev=null;a.Wd.next=null;
this.Vp--;if(!c)for(a=d.ae.La(ud);a;a=a.next)a.Jc.ko(d)==b&&a.Jc.gv()};r.Kl=function(a){if(null!==a.Ja&&a.Ja!=this)throw Error("Controller can only be a member of one world");this.zj.Kl(a);a.Ja=this;return a};r.Yl=function(a){this.zj.Yl(a);a.Ja=null;a.$n()};r.Iv=function(a){this.Bt=a};r.kh=function(a,c,b){this.Ht&&(this.Ud.ho(),this.Ht=!1);a=new Jd(a,this.Mx*a,c,b,this.sE);this.Ud.Pz();0<a.Ba&&(this.li(a),this.bE&&this.Ar(a),this.Mx=a.Ch)};r.bv=function(){for(var a=this.Uc.La(xd);a;a=a.next)a.body.Kh.fa(),
a.body.gk=0};r.gi=function(){return this.ae};var Ld=[];xc.prototype.li=function(a){for(var c=this.zj.La();c;c=c.next)c.rw.kh(a);for(var c=new Id(this.Ud.Ih,this.Zf),b=this.Uc.La(vd);b;b=b.next)b.body.zb=!1;for(var d=this.ae.La(ud);d;d=d.next)d.Jc.zb=!1;for(b=this.Fb;b;b=b.Mi)b.zb=!1;for(b=this.Uc.La(zd);b;b=b.next)if(d=b.body,!d.zb){c.$n();Ld.length=0;var f=Ld;f.push(d);for(d.zb=!0;0<f.length;){var k=f.pop();c.qk(k);k.gd()||k.Gc(!0);if(k.Rc()!=U.Le){for(d=k.ae.La(Md);d;d=d.next){var e=d.Jc;e.zb||
(c.rk(e),e.zb=!0,e=e.ko(k),e.zb||(f.push(e),e.zb=!0))}for(d=k.Fb;d;d=d.next)!d.Fh.zb&&d.Ye.kj()&&(c.Zu(d.Fh),d.Fh.zb=!0,d.Ye.zb||(f.push(d.Ye),d.Ye.zb=!0))}}c.li(a,this.Bt,this.ut)}for(b=this.Uc.La(zd);b;b=b.next)b.body.Pv();this.Ud.ho()};xc.prototype.Ar=function(a){for(var c=new Id(this.Ud.Ih,this.Zf),b=this.Uc.La(vd);b;b=b.next){var d=b.body;d.zb=!1;d.k.Fd=0}for(var f=this.ae.La(ud);f;f=f.next)f.Jc.zb=!1,f.Jc.ll=null;for(b=this.Fb;b;b=b.Mi)b.zb=!1;for(;;){var b=this.qB(),k=b.AE,b=b.BE;if(null===
k||xc.pA<b)break;f=k.Kb.Sa();d=k.Eb.Sa();xc.Iy.Set(f.k);xc.Jy.Set(d.k);f.fi(b);d.fi(b);k.Qv(this.Ud.Ih);k.ll=null;if(k.yq||!k.enabled)f.k.Set(xc.Iy),d.k.Set(xc.Jy),f.Jb(),d.Jb();else if(k.Rn){f.Rc()!=U.Hc&&(f=d);c.$n();Ld.length=0;k=Ld;k.push(f);for(f.zb=!0;0<k.length;)if(d=k.pop(),c.qk(d),d.gd()||d.Gc(!0),d.Rc()==U.Hc){for(f=d.ae.La(Md);f&&32!=c.aE;f=f.next){var e=f.Jc;e.zb||(c.rk(e),e.zb=!0,e=e.ko(d),e.zb||(e.Rc()!=U.Le&&(e.fi(b),e.Gc(!0),k.push(e)),e.zb=!0))}for(d=d.Fb;d;d=d.next)32!=c.Vp&&!d.Fh.zb&&
d.Ye.kj()&&(c.Zu(d.Fh),d.Fh.zb=!0,d.Ye.zb||(d.Ye.Rc()!=U.Le&&(d.Ye.fi(b),d.Ye.Gc(!0),k.push(d.Ye)),d.Ye.zb=!0))}c.Ar(new Jd((1-b)*a.Ba,0,a.Vn,a.Bn,!1));for(b=0;b<c.Gg.length;b++)if(c.Gg[b].zb=!1,c.Gg[b].gd()&&c.Gg[b].Rc()==U.Hc)for(c.Gg[b].Pv(),f=c.Gg[b].ae.La(ud);f;f=f.next)f.Jc.ll=null;for(b=0;b<c.aE;b++)c.Jh[b].zb=!1,c.Jh[b].ll=null;for(b=0;b<c.Vp;b++)c.Cd[b].zb=!1;this.Ud.ho()}}};xc.prototype.qB=function(){for(var a=null,c=1,b=this.ae.La(Nd);b;b=b.next){var d=b.Jc;if(!this.rB(d)){var f=1;if(null!=
d.ll)f=d.ll;else{if(d.Rn)f=1;else{var f=d.Kb.Sa(),k=d.Eb.Sa(),e=f.k.Fd;f.k.Fd<k.k.Fd?(e=k.k.Fd,f.k.fi(e)):k.k.Fd<f.k.Fd&&(e=f.k.Fd,k.k.fi(e));f=d.Uz(f.k,k.k);0<f&&1>f&&(f=(1-f)*e+f)}d.ll=f}Number.MIN_VALUE<f&&f<c&&(a=d,c=f)}}return{AE:a,BE:c}};xc.prototype.rB=function(a){var c=a.Kb.Sa();a=a.Eb.Sa();return c.Rc()==U.Hc&&c.gd()||a.Rc()==U.Hc&&a.gd()?!1:!0};var Pd=function(a,c){this.Ld="Contact"+Od++;this.We=new id;this.nn=new id;this.Rn=!1;var b=a.Sa(),d=c.Sa();this.Sr=b.Rc()!=U.Hc||b.fl||d.Rc()!=U.Hc||
d.fl;this.yq=a.lj()||c.lj();this.ep=!1;this.Kb=a;this.Eb=c;this.enabled=!0;this.zo=b.gi();this.Ao=d.gi();this.Uq=d.Ja.gi();this.$u()};r=Pd.prototype;r.Sc=function(a,c){this.We.Sc();this.nn.Sc();this.Rn=!1;var b=a.Sa(),d=c.Sa();this.Sr=b.Rc()!=U.Hc||b.fl||d.Rc()!=U.Hc||d.fl;this.yq=a.lj()||c.lj();this.ep=!1;this.Kb=a;this.Eb=c;this.enabled=!0;this.zo=b.gi();this.Ao=d.gi();this.Uq=d.Ja.gi();this.$u()};r.$u=function(){this.zo.rk(this);this.Ao.rk(this);this.Uq.rk(this);this.Sv()};r.Sv=function(){var a=
!1,c=!1;!this.lj()&&this.er()&&(this.gr()&&(a=!0),this.Sr&&(c=!0));this.zo.Cr(this,a,c);this.Ao.Cr(this,a,c);this.Uq.Cr(this,a,c)};r.KA=function(){this.zo.tr(this);this.Ao.tr(this);this.Uq.tr(this)};r.gr=function(){return this.Rn};r.lj=function(){return this.yq};r.er=function(){return this.enabled};r.ko=function(a){var c=this.Kb.Sa();return c!=a?c:this.Eb.Sa()};r.gv=function(){this.ep=!0};r.Oz=function(){this.ep=!1};r.Qv=function(a){var c=this.nn;this.nn=this.We;this.We=c;this.enabled=!0;var b=!1,
c=this.gr(),d=this.Kb.Sa(),f=this.Eb.Sa(),k=this.Kb.Yj.dm(this.Eb.Yj);if(this.yq){if(k){var b=this.Kb.Ec(),d=d.me(),k=this.Eb.Ec(),e=f.me(),f=new Zc;f.Uh=new ad;f.Uh.Set(b);f.Vh=new ad;f.Vh.Set(k);f.Lq=d;f.Mq=e;f.tz=!0;d=new od;d.count=0;b=new $c;Yc(b,d,f);b=b.wh<10*Number.MIN_VALUE}this.We.Yb=0}else{this.Sr=d.Rc()!=U.Hc||d.fl||f.Rc()!=U.Hc||f.fl?!0:!1;if(k)for(this.ng(),b=0<this.We.Yb,k=0;k<this.We.Yb;k++){e=this.We.ja[k];e.bk=0;for(var g=e.fk=0;g<this.nn.Yb;g++){var l=this.nn.ja[g];if(l.vf.Od==
e.vf.Od){e.bk=l.bk;e.fk=l.fk;break}}}else this.We.Yb=0;b!=c&&(d.Gc(!0),f.Gc(!0))}this.Rn=b;b!=c&&this.Sv();!c&&b&&a.Zn(this)};r.ng=function(){};r.Uz=function(a,c){Qd.Uh.Set(this.Kb.Ec());Qd.Vh.Set(this.Eb.Ec());Qd.Yy=a;Qd.Zy=c;Qd.BF=.005;var b=Qd;Rd++;var d=b.Uh,f=b.Vh,k=b.Yy,e=b.Zy,g=d.Va+f.Va,b=b.BF,l=0,n=0,h=0;Sd.count=0;for(Td.tz=!1;;){k.me(Ud,l);e.me(Vd,l);Td.Uh=d;Td.Vh=f;Td.Lq=Ud;Td.Mq=Vd;Yc(Wd,Sd,Td);if(0>=Wd.wh){l=1;break}Xd.jc(Sd,d,Ud,f,Vd);var m=Xd.ng(Ud,Vd);if(0>=m){l=1;break}0==n&&(h=
m>g?Math.max(g-b,.75*g):Math.max(m-b,.02*g));if(m-h<.5*b){if(0==n){l=1;break}break}var q=l,p=l,s=1;k.me(Ud,s);e.me(Vd,s);var t=Xd.ng(Ud,Vd);if(t>=h){l=1;break}for(var w=0;;){var z=0,z=w&1?p+(h-m)*(s-p)/(t-m):.5*(p+s);k.me(Ud,z);e.me(Vd,z);var u=Xd.ng(Ud,Vd);if(Math.abs(u-h)<.025*b){q=z;break}u>h?(p=z,m=u):(s=z,t=u);w++;Yd++;if(50==w)break}Zd=Math.max(Zd,w);if(q<(1+100*Number.MIN_VALUE)*l)break;l=q;n++;$d++;if(1E3==n)break}ae=Math.max(ae,n);return l};var Qd=new pd,Od=0,be=function(a,c){Pd.call(this,
a,c)};B(be,Pd);be.prototype.Sc=function(a,c){Pd.prototype.Sc.call(this,a,c)};be.prototype.ng=function(){var a=this.We,c=this.Kb.Ec(),b=this.Kb.Sa().A,d=this.Eb.Ec(),f=this.Eb.Sa().A;a.Yb=0;var k=f.position.x+(f.n.i.x*d.hb.x+f.n.j.x*d.hb.y)-(b.position.x+(b.n.i.x*c.hb.x+b.n.j.x*c.hb.y)),b=f.position.y+(f.n.i.y*d.hb.x+f.n.j.y*d.hb.y)-(b.position.y+(b.n.i.y*c.hb.x+b.n.j.y*c.hb.y)),f=c.Va+d.Va;k*k+b*b>f*f||(a.Wa=1,a.ra.D(c.hb),a.Zc.fa(),a.Yb=1,a.ja[0].ra.D(d.hb),a.ja[0].vf.mj(0))};var de=function(){this.Eg=
P.q(0,0);this.Xb=P.q(0,0);this.Dd=P.q(0,0);this.Rh=new Q;this.ne=new Q;this.ac=[];for(var a=0;2>a;a++)this.ac[a]=new ce},ce=function(){this.Xb=P.q(0,0);this.Ob=P.q(0,0);this.Pb=P.q(0,0)};ce.prototype.Sc=function(){this.Xb.Set(0,0);this.Ob.Set(0,0);this.Pb.Set(0,0)};var Ed=function(){this.ag={};this.Lh={};this.Ll(be,yc.Gf,yc.Gf);this.Ll(ee,V.Gf,yc.Gf);this.Ll(fe,V.Gf,V.Gf);this.Ll(ge,"b2EdgeShape",yc.Gf);this.Ll(he,V.Gf,"b2EdgeShape")};Ed.prototype.Ll=function(a,c,b){this.Lh[c]=this.Lh[c]||{};this.Lh[c][b]=
this.Lh[c][b]||[];this.ag[c]=this.ag[c]||{};this.ag[c][b]=new ie;this.ag[c][b].ww=a;this.ag[c][b].zy=!0;c!=b&&(this.ag[b]=this.ag[b]||{},this.ag[b][c]=new ie,this.ag[b][c].ww=a,this.ag[b][c].zy=!1)};Ed.prototype.cf=function(a,c){var b=a.Ec().jj(),d=c.Ec().jj(),f=this.ag[b][d],k=f.ww;return null!=k?f.zy?0<this.Lh[b][d].length?(b=this.Lh[b][d].pop(),b.Sc(a,c),b):new k(a,c):0<this.Lh[d][b].length?(b=this.Lh[d][b].pop(),b.Sc(c,a),b):new k(c,a):null};Ed.prototype.Jd=function(a){var c=a.Kb.Ec().jj(),b=
a.Eb.Ec().jj();this.Lh[c][b].push(a)};var rd=function(){this.Io=[];for(var a=0;a<=ud;a++)this.Io[a]=null;this.Jo=[];for(a=0;a<=ud;a++)this.Jo[a]=null;this.yj={}};r=rd.prototype;r.La=function(a){return this.Io[a]};r.rk=function(a){var c=a.Ld;if(null==this.yj[c]){this.yj[c]=[];for(var b=0;b<=ud;b++)this.yj[c][b]=null;this.mg(a,c,ud)}};r.Cr=function(a,c,b){c?this.mg(a,a.Ld,Md):this.rg(a.Ld,Md);b?this.mg(a,a.Ld,Nd):this.rg(a.Ld,Nd)};r.tr=function(a){a=a.Ld;if(null!=this.yj[a]){for(var c=0;c<=ud;c++)this.rg(a,
c);delete this.yj[a]}};r.rg=function(a,c){var b=this.yj[a];if(null!=b){var d=b[c];if(null!=d){b[c]=null;var b=d.Af,f=d.next;null==b?this.Io[c]=f:b.If(f);null==f?this.Jo[c]=b:f.Jf(b);je.push(d)}}};r.mg=function(a,c,b){c=this.yj[c];if(null==c[b]){if(0<je.length){var d=je.pop();d.next=null;d.Af=null;d.Jc=a;a=d}else a=new ke(a);c[b]=a;a=this.Jo[b];null!=a?(a.If(c[b]),c[b].Jf(a)):this.Io[b]=c[b];this.Jo[b]=c[b]}};var Md=0,Nd=1,ud=2,ke=function(a){this.Jc=a;this.Af=this.next=null},je=[];ke.prototype.If=
function(a){this.next=a};ke.prototype.Jf=function(a){this.Af=a};var ie=function(){},le=function(){this.ta=P.q(0,0);this.$p=[];this.ja=[];for(var a=0;2>a;a++)this.ja[a]=P.q(0,0)};le.prototype.jc=function(a){switch(a.type){case 1:this.jB(a);break;case 2:this.kB(a);break;case 4:this.lB(a)}};le.prototype.jB=function(a){var c=a.J.A.n,b=a.Xb,d=a.J.A.position.x+(c.i.x*b.x+c.j.x*b.y),f=a.J.A.position.y+(c.i.y*b.x+c.j.y*b.y),c=a.K.A.n,b=a.ac[0].Xb,k=a.K.A.position.x+(c.i.x*b.x+c.j.x*b.y),c=a.K.A.position.y+
(c.i.y*b.x+c.j.y*b.y),b=k-d,e=c-f,g=b*b+e*e;g>Hc?(g=Math.sqrt(g),this.ta.x=b/g,this.ta.y=e/g):(this.ta.x=1,this.ta.y=0);this.ja[0].x=.5*(d+k);this.ja[0].y=.5*(f+c);this.$p[0]=b*this.ta.x+e*this.ta.y-a.sq};le.prototype.kB=function(a){this.ta.x=a.J.A.n.i.x*a.Eg.x+a.J.A.n.j.x*a.Eg.y;this.ta.y=a.J.A.n.i.y*a.Eg.x+a.J.A.n.j.y*a.Eg.y;for(var c=a.J.A.position.x+(a.J.A.n.i.x*a.Xb.x+a.J.A.n.j.x*a.Xb.y),b=a.J.A.position.y+(a.J.A.n.i.y*a.Xb.x+a.J.A.n.j.y*a.Xb.y),d=0;d<a.zf;d++){var f=a.K.A.position.x+(a.K.A.n.i.x*
a.ac[d].Xb.x+a.K.A.n.j.x*a.ac[d].Xb.y),k=a.K.A.position.y+(a.K.A.n.i.y*a.ac[d].Xb.x+a.K.A.n.j.y*a.ac[d].Xb.y);this.$p[d]=(f-c)*this.ta.x+(k-b)*this.ta.y-a.sq;this.ja[d].x=f;this.ja[d].y=k}};le.prototype.lB=function(a){this.ta.x=a.K.A.n.i.x*a.Eg.x+a.K.A.n.j.x*a.Eg.y;this.ta.y=a.K.A.n.i.y*a.Eg.x+a.K.A.n.j.y*a.Eg.y;for(var c=a.K.A.position.x+(a.K.A.n.i.x*a.Xb.x+a.K.A.n.j.x*a.Xb.y),b=a.K.A.position.y+(a.K.A.n.i.y*a.Xb.x+a.K.A.n.j.y*a.Xb.y),d=0;d<a.zf;d++){var f=a.J.A.position.x+(a.J.A.n.i.x*a.ac[d].Xb.x+
a.J.A.n.j.x*a.ac[d].Xb.y),k=a.J.A.position.y+(a.J.A.n.i.y*a.ac[d].Xb.x+a.J.A.n.j.y*a.ac[d].Xb.y);this.$p[d]=(f-c)*this.ta.x+(k-b)*this.ta.y-a.sq;this.ja[d].Set(f,k)}this.ta.x*=-1;this.ta.y*=-1};var Kd=function(){this.Hg=[]};r=Kd.prototype;r.jc=function(a,c,b){for(this.hn=b;this.Hg.length<this.hn;)this.Hg[this.Hg.length]=new de;for(a=0;a<b;a++){var d=c[a],f=d.Kb,k=d.Eb,e=f.Ph.Va,g=k.Ph.Va,l=f.Sa(),n=k.Sa(),h=d.We,m=Math.sqrt(f.At*k.At),q,f=f.It,k=k.It;q=f>k?f:k;var p=l.p.x,s=l.p.y,t=n.p.x,w=n.p.y,
z=l.C,u=n.C;ne.jc(h,l.A,e,n.A,g);f=ne.ta.x;d=ne.ta.y;k=this.Hg[a];k.J=l;k.K=n;k.tE=h;k.Dd.x=f;k.Dd.y=d;k.zf=h.Yb;k.zg=m;k.Xg=q;k.Eg.x=h.Zc.x;k.Eg.y=h.Zc.y;k.Xb.x=h.ra.x;k.Xb.y=h.ra.y;k.sq=e+g;k.type=h.Wa;for(e=0;e<k.zf;++e){m=h.ja[e];g=k.ac[e];g.Zb=m.bk;g.ah=m.fk;g.Xb.D(m.ra);m=g.Ob.x=ne.ja[e].x-l.k.r.x;q=g.Ob.y=ne.ja[e].y-l.k.r.y;var A=g.Pb.x=ne.ja[e].x-n.k.r.x,C=g.Pb.y=ne.ja[e].y-n.k.r.y,F=m*d-q*f,H=A*d-C*f,F=F*F,H=H*H;g.Rh=1/(l.F+n.F+l.O*F+n.O*H);var E=l.S*l.F+n.S*n.F,E=E+(l.S*l.O*F+n.S*n.O*H);
g.AC=1/E;H=d;E=-f;F=m*E-q*H;H=A*E-C*H;F*=F;H*=H;g.vF=1/(l.F+n.F+l.O*F+n.O*H);g.Un=0;m=k.Dd.x*(t+-u*C-p- -z*q)+k.Dd.y*(w+u*A-s-z*m);-1>m&&(g.Un+=-k.Xg*m)}2==k.zf&&(w=k.ac[0],t=k.ac[1],h=l.F,l=l.O,p=n.F,n=n.O,s=w.Ob.x*d-w.Ob.y*f,w=w.Pb.x*d-w.Pb.y*f,z=t.Ob.x*d-t.Ob.y*f,t=t.Pb.x*d-t.Pb.y*f,f=h+p+l*s*s+n*w*w,d=h+p+l*z*z+n*t*t,n=h+p+l*s*z+n*w*t,f*f<100*(f*d-n*n)?(k.ne.i.Set(f,n),k.ne.j.Set(n,d),k.ne.br(k.Rh)):k.zf=1)}};r.df=function(a){for(var c=0;c<this.hn;++c){var b=this.Hg[c],d=b.J,f=b.K,k=d.F,e=d.O,
g=f.F,l=f.O,n=b.Dd.x,h=b.Dd.y,m=h,q=-n,p=0,s=0;if(a.di)for(s=b.zf,p=0;p<s;++p){var t=b.ac[p];t.Zb*=a.vc;t.ah*=a.vc;var w=t.Zb*n+t.ah*m,z=t.Zb*h+t.ah*q;d.C-=e*(t.Ob.x*z-t.Ob.y*w);d.p.x-=k*w;d.p.y-=k*z;f.C+=l*(t.Pb.x*z-t.Pb.y*w);f.p.x+=g*w;f.p.y+=g*z}else for(s=b.zf,p=0;p<s;++p)d=b.ac[p],d.Zb=0,d.ah=0}};r.Ie=function(){for(var a=0;a<this.hn;a++)this.YA(this.Hg[a])};r.YA=function(a){for(var c=a.Dd.x,b=a.Dd.y,d=0;d<a.zf;d++)Kd.prototype.ZA(a,a.ac[d]);if(1==a.zf){var d=a.ac[0],f=d.Zb-d.Rh*((a.K.p.x-a.K.C*
d.Pb.y-a.J.p.x+a.J.C*d.Ob.y)*c+(a.K.p.y+a.K.C*d.Pb.x-a.J.p.y-a.J.C*d.Ob.x)*b-d.Un),f=0<f?f:0,k=f-d.Zb,e=k*c,b=k*b;a.J.p.x-=a.J.F*e;a.J.p.y-=a.J.F*b;a.J.C-=a.J.O*(d.Ob.x*b-d.Ob.y*e);a.K.p.x+=a.K.F*e;a.K.p.y+=a.K.F*b;a.K.C+=a.K.O*(d.Pb.x*b-d.Pb.y*e);d.Zb=f}else for(var d=a.ac[0],f=a.ac[1],k=d.Zb,e=f.Zb,g=(a.K.p.x-a.K.C*d.Pb.y-a.J.p.x+a.J.C*d.Ob.y)*c+(a.K.p.y+a.K.C*d.Pb.x-a.J.p.y-a.J.C*d.Ob.x)*b-d.Un,b=(a.K.p.x-a.K.C*f.Pb.y-a.J.p.x+a.J.C*f.Ob.y)*c+(a.K.p.y+a.K.C*f.Pb.x-a.J.p.y-a.J.C*f.Ob.x)*b-f.Un,g=
g-(a.ne.i.x*k+a.ne.j.x*e),b=b-(a.ne.i.y*k+a.ne.j.y*e);;){c=-(a.Rh.i.x*g+a.Rh.j.x*b);if(0<=c){var l=-(a.Rh.i.y*g+a.Rh.j.y*b);if(0<=l){this.ro(a,d,f,c-k,l-e);d.Zb=c;f.Zb=l;break}}c=-d.Rh*g;if(0<=c&&0<=a.ne.i.y*c+b){this.ro(a,d,f,c-k,-e);d.Zb=c;f.Zb=0;break}c=-f.Rh*b;if(0<=c&&0<=a.ne.j.x*c+g){this.ro(a,d,f,-k,c-e);d.Zb=0;f.Zb=c;break}if(0<=g&&0<=b){this.ro(a,d,f,-k,-e);d.Zb=0;f.Zb=0;break}break}};r.ZA=function(a,c){var b=a.Dd.y,d=-a.Dd.x,f=a.zg*c.Zb,f=R.Bb(c.ah-c.vF*((a.K.p.x-a.K.C*c.Pb.y-a.J.p.x+a.J.C*
c.Ob.y)*b+(a.K.p.y+a.K.C*c.Pb.x-a.J.p.y-a.J.C*c.Ob.x)*d),-f,f),k=f-c.ah,b=k*b,d=k*d;a.J.p.x-=a.J.F*b;a.J.p.y-=a.J.F*d;a.J.C-=a.J.O*(c.Ob.x*d-c.Ob.y*b);a.K.p.x+=a.K.F*b;a.K.p.y+=a.K.F*d;a.K.C+=a.K.O*(c.Pb.x*d-c.Pb.y*b);c.ah=f};r.ro=function(a,c,b,d,f){var k=d*a.Dd.x;d*=a.Dd.y;var e=f*a.Dd.x;f*=a.Dd.y;a.J.p.x-=a.J.F*(k+e);a.J.p.y-=a.J.F*(d+f);a.J.C-=a.J.O*(c.Ob.x*d-c.Ob.y*k+b.Ob.x*f-b.Ob.y*e);a.K.p.x+=a.K.F*(k+e);a.K.p.y+=a.K.F*(d+f);a.K.C+=a.K.O*(c.Pb.x*d-c.Pb.y*k+b.Pb.x*f-b.Pb.y*e);c.Zb=0;b.Zb=0};
r.Yq=function(){for(var a=0;a<this.hn;++a)for(var c=this.Hg[a],b=c.tE,d=0;d<c.zf;++d){var f=b.ja[d],k=c.ac[d];f.bk=k.Zb;f.fk=k.ah}};r.He=function(a){void 0===a&&(a=0);for(var c=0,b=0;b<this.hn;b++){var d=this.Hg[b],f=d.J,k=d.K,e=f.S*f.F,g=f.S*f.O,l=k.S*k.F,n=k.S*k.O;oe.jc(d);for(var h=oe.ta,m=0;m<d.zf;m++){var q=d.ac[m],p=oe.ja[m],s=oe.$p[m],t=p.x-f.k.r.x,w=p.y-f.k.r.y,z=p.x-k.k.r.x,p=p.y-k.k.r.y,c=c<s?c:s,s=-q.AC*R.Bb(a*(s+.005),-.2,0),q=s*h.x,s=s*h.y;f.k.r.x-=e*q;f.k.r.y-=e*s;f.k.I-=g*(t*s-w*q);
f.Jb();k.k.r.x+=l*q;k.k.r.y+=l*s;k.k.I+=n*(z*s-p*q);k.Jb()}}return-.0075<c};var ge=function(a,c){Pd.call(this,a,c)};B(ge,Pd);ge.prototype.Sc=function(a,c){Pd.prototype.Sc.call(this,a,c)};ge.prototype.ng=function(){this.Kb.Ec();this.Eb.Ec()};var ee=function(a,c){Pd.call(this,a,c)};B(ee,Pd);ee.prototype.Sc=function(a,c){Pd.prototype.Sc.call(this,a,c)};ee.prototype.ng=function(){a:{var a=this.We,c=this.Kb.Ec(),b=this.Kb.Sa().A,d=this.Eb.Ec(),f=this.Eb.Sa().A;a.Yb=0;for(var k=f.position.x+(f.n.i.x*d.hb.x+
f.n.j.x*d.hb.y)-b.position.x,e=f.position.y+(f.n.i.y*d.hb.x+f.n.j.y*d.hb.y)-b.position.y,f=k*b.n.i.x+e*b.n.i.y,b=k*b.n.j.x+e*b.n.j.y,k=0,e=-Number.MAX_VALUE,g=c.Va+d.Va,l=0;l<c.Oa;++l){var n=c.ua[l].x*(f-c.H[l].x)+c.ua[l].y*(b-c.H[l].y);if(n>g)break a;n>e&&(e=n,k=l)}n=k+1;n>=c.Oa&&(n=0);var l=c.H[k],h=c.H[n];e<Number.MIN_VALUE?(a.Yb=1,a.Wa=2,a.Zc.D(c.ua[k]),a.ra.x=.5*(l.x+h.x),a.ra.y=.5*(l.y+h.y),a.ja[0].ra.D(d.hb),a.ja[0].vf.mj(0)):0>=(f-l.x)*(h.x-l.x)+(b-l.y)*(h.y-l.y)?(f-l.x)*(f-l.x)+(b-l.y)*(b-
l.y)>g*g||(a.Yb=1,a.Wa=2,a.Zc.x=f-l.x,a.Zc.y=b-l.y,a.Zc.Nd(),a.ra.D(l),a.ja[0].ra.D(d.hb),a.ja[0].vf.mj(0)):0>=(f-h.x)*(l.x-h.x)+(b-h.y)*(l.y-h.y)?(f-h.x)*(f-h.x)+(b-h.y)*(b-h.y)>g*g||(a.Yb=1,a.Wa=2,a.Zc.x=f-h.x,a.Zc.y=b-h.y,a.Zc.Nd(),a.ra.D(h),a.ja[0].ra.D(d.hb),a.ja[0].vf.mj(0)):(n=.5*(l.x+h.x),l=.5*(l.y+h.y),e=(f-n)*c.ua[k].x+(b-l)*c.ua[k].y,e>g||(a.Yb=1,a.Wa=2,a.Zc.x=c.ua[k].x,a.Zc.y=c.ua[k].y,a.Zc.Nd(),a.ra.Set(n,l),a.ja[0].ra.D(d.hb),a.ja[0].vf.mj(0)))}};var he=function(a,c){Pd.call(this,a,
c)};B(he,Pd);he.prototype.Sc=function(a,c){Pd.prototype.Sc.call(this,a,c)};he.prototype.ng=function(){this.Kb.Ec();this.Eb.Ec()};var fe=function(a,c){Pd.call(this,a,c)};B(fe,Pd);fe.prototype.Sc=function(a,c){Pd.prototype.Sc.call(this,a,c)};fe.prototype.ng=function(){var a=this.We,c=this.Kb.Ec(),b=this.Kb.Sa().A,d=this.Eb.Ec(),f=this.Eb.Sa().A;a.Yb=0;var k=c.Va+d.Va,e=Wc(c,b,d,f),g=e.hw;if(!(e.zq>k)){var l=Wc(d,f,c,b);if(!(l.zq>k)){var n=c,h=d,m=b,q=f,p=0;a.Wa=2;l.zq>.98*e.zq+.001&&(n=d,h=c,m=f,q=
b,g=l.hw,a.Wa=4,p=1);c=g;b=q;d=pe;void 0===c&&(c=0);for(var f=m.n.i.x*n.ua[c].x+m.n.j.x*n.ua[c].y,e=m.n.i.y*n.ua[c].x+m.n.j.y*n.ua[c].y,l=b.n.i.x*f+b.n.i.y*e,e=b.n.j.x*f+b.n.j.y*e,f=l,l=0,s=Number.MAX_VALUE,t=0;t<h.Oa;t++){var w=f*h.ua[t].x+e*h.ua[t].y;w<s&&(s=w,l=t)}f=l+1;f>=h.Oa&&(f=0);d[0].bf.x=b.position.x+(b.n.i.x*h.H[l].x+b.n.j.x*h.H[l].y);d[0].bf.y=b.position.y+(b.n.i.y*h.H[l].x+b.n.j.y*h.H[l].y);d[0].id.Lv(c);d[0].id.Jv(l);d[0].id.Kv(0);d[1].bf.x=b.position.x+(b.n.i.x*h.H[f].x+b.n.j.x*h.H[f].y);
d[1].bf.y=b.position.y+(b.n.i.y*h.H[f].x+b.n.j.y*h.H[f].y);d[1].id.Lv(c);d[1].id.Jv(f);d[1].id.Kv(1);c=n.H[g];g=g+1<n.Oa?n.H[g+1]:n.H[0];qe.Set(g.x-c.x,g.y-c.y);qe.Nd();re.x=qe.y;re.y=-qe.x;se.Set(.5*(c.x+g.x),.5*(c.y+g.y));te.x=m.n.i.x*qe.x+m.n.j.x*qe.y;te.y=m.n.i.y*qe.x+m.n.j.y*qe.y;ue.x=-te.x;ue.y=-te.y;ve.x=te.y;ve.y=-te.x;we.x=m.position.x+(m.n.i.x*c.x+m.n.j.x*c.y);we.y=m.position.y+(m.n.i.y*c.x+m.n.j.y*c.y);xe.x=m.position.x+(m.n.i.x*g.x+m.n.j.x*g.y);xe.y=m.position.y+(m.n.i.y*g.x+m.n.j.y*g.y);
if(!(2>Uc(ye,pe,ue,-te.x*we.x-te.y*we.y+k)||2>Uc(ze,ye,te,te.x*xe.x+te.y*xe.y+k))){a.Zc.D(re);a.ra.D(se);m=ve.x*we.x+ve.y*we.y;for(n=g=0;2>n;++n)ve.x*ze[n].bf.x+ve.y*ze[n].bf.y-m<=k&&(c=ze[n].bf.x-q.position.x,h=ze[n].bf.y-q.position.y,a.ja[g].ra.x=c*q.n.i.x+h*q.n.i.y,a.ja[g].ra.y=c*q.n.j.x+h*q.n.j.y,a.ja[g].vf.Set(ze[n].id),a.ja[g].vf.NA(p),g++);a.Yb=g}}}};var Be=function(){this.Ld="Controller"+Ae++;this.Ja=null;this.Uc=new wd};Be.prototype.kh=function(){};Be.prototype.qk=function(a){this.Uc.qk(a);
a.Kl(this)};Be.prototype.Xl=function(a){this.Uc.Xl(a);a.Yl(this)};Be.prototype.$n=function(){for(var a=this.Uc.La(vd);a;a=a.next)this.Xl(a.body)};var Ae=0,Ce=function(){Be.call(this);this.Dd=P.q(0,-1);this.Qf=this.offset=0;this.wz=P.q(0,0);this.XD=2;this.BB=1;this.HF=!0;this.Qw=null};B(Ce,Be);Ce.prototype.kh=function(){this.HF&&(this.Qw=this.Ja.Bt.sc());for(var a=this.Uc.La(Ad);a;a=a.next){for(var c=a.body,b=P.q(0,0),d=P.q(0,0),f=0,k=0,e=c.$q().La();e;e=e.next){var g=P.q(0,0),l=e.mf.Ec().bo(this.Dd,
this.offset,c.me(),g),f=f+l;b.x+=l*g.x;b.y+=l*g.y;var n=0,n=1,k=k+l*n;d.x+=l*g.x*n;d.y+=l*g.y*n}f<Number.MIN_VALUE||(b.x/=f,b.y/=f,d.x/=k,d.y/=k,k=this.Qw.hi(),k.Md(this.Qf*f),c.Ff(k,d),k=c.cA(b),k.Br(this.wz),k.Md(-this.XD*f),c.Ff(k,b),c.Yn(-c.tf/c.wk()*f*c.io()*this.BB),P.ic(b),P.ic(d))}};var De=function(){Be.call(this);this.Yu=P.q(0,0)};B(De,Be);De.prototype.kh=function(a){a=P.q(this.Yu.x*a.Ba,this.Yu.y*a.Ba);for(var c=this.Uc.La(Ad);c;c=c.next){var b=c.body,d=b.hj();b.ki(P.q(d.x+a.x,d.y+a.y))}P.ic(a)};
var Ee=function(){Be.call(this);this.$z=P.q(0,0)};B(Ee,Be);Ee.prototype.kh=function(){for(var a=this.Uc.La(Ad);a;a=a.next){var c=a.body;c.Ff(this.$z,c.xk())}};var sd=function(){this.Ur=this.Tr=null;this.Lo={}};sd.prototype.La=function(){return this.Tr};sd.prototype.Kl=function(a){var c=a.Ld;if(null==this.Lo[c]){a=new Fe(a);var b=this.Ur;null!=b?b.If(a):this.Tr=a;a.Jf(b);this.Ur=a;this.Lo[c]=a}};sd.prototype.Yl=function(a){a=a.Ld;var c=this.Lo[a];if(null!=c){var b=c.Af,c=c.next;null==b?this.Tr=c:b.If(c);
null==c?this.Ur=b:c.Jf(b);delete this.Lo[a]}};var Fe=function(a){this.rw=a;this.Af=this.next=null};Fe.prototype.If=function(a){this.next=a};Fe.prototype.Jf=function(a){this.Af=a};var Ge=function(){Be.call(this);this.hv=1;this.ND=!0};B(Ge,Be);Ge.prototype.kh=function(){var a=null,c=null,b=0,d=null,f=null,k=0,e=0,g=0,k=null;if(this.ND)for(var l=this.Uc.La(vd);l;l=l.next)for(var a=l.body,c=a.xk(),b=a.wk(),n=this.Uc.La(vd);n;n=n.next){if(d=n.body,a.gd()||d.gd())f=d.xk(),k=f.x-c.x,e=f.y-c.y,g=k*k+e*e,
g<Number.MIN_VALUE||(k=P.q(k,e),k.Md(this.hv/g/Math.sqrt(g)*b*d.wk()),a.gd()&&a.Ff(k,c),k.Md(-1),d.gd()&&d.Ff(k,f),P.ic(k))}else for(l=this.Uc.La(vd);l;l=l.next)for(a=bodyNode.body,c=a.xk(),b=a.wk(),n=this.Uc.La(vd);n;n=n.next)if(d=bodyNode.body,a.gd()||d.gd())f=d.xk(),k=f.x-c.x,e=f.y-c.y,g=k*k+e*e,g<Number.MIN_VALUE||(k=P.q(k,e),k.Md(this.hv/g*b*d.wk()),a.gd()&&a.Ff(k,c),k.Md(-1),d.gd()&&d.Ff(k,f),P.ic(k))};var He=function(){Be.call(this);this.$A=new Q;this.Nt=0};B(He,Be);He.prototype.kh=function(a){a=
a.Ba;if(!(a<=Number.MIN_VALUE)){a>this.Nt&&0<this.Nt&&(a=this.Nt);for(var c=this.Uc.La(Ad);c;c=c.next){var b=c.body,d=b.dr(R.Vb(this.$A,b.cr(b.hj())));b.ki(P.q(b.hj().x+d.x*a,b.hj().y+d.y*a))}}};var Y=function(a){this.Vd=new Ie;this.Wd=new Ie;this.Kg=P.q(0,0);this.Lg=P.q(0,0);this.Wa=a.type;this.Mi=this.hl=null;this.T=a.J;this.U=a.K;this.Kx=a.Rr};Y.prototype.Rc=function(){return this.Wa};Y.prototype.Ql=function(){return this.T};Y.prototype.Zq=function(){return this.U};Y.prototype.kj=function(){return this.T.kj()&&
this.U.kj()};Y.cf=function(a){return a.cf()};Y.prototype.df=function(){};Y.prototype.Ie=function(){};Y.prototype.Yq=function(){};Y.prototype.He=function(){return!1};Y.uC=0;Y.Ik=1;Y.sC=2;Y.cs=3;Y.tC=4;Y.VG=5;Y.qC=6;Y.rC=7;Y.vC=8;Y.pC=9;Y.Qd=0;Y.wg=1;Y.Xc=2;Y.wi=3;var Je=function(){this.type=Y.uC;this.K=this.J=null;this.Rr=!1},Ie=function(){},Ke=function(a){Y.call(this,a);this.da=P.q(0,0);this.ea=P.q(0,0);this.Ac=P.q(0,0);this.da.D(a.xb);this.ea.D(a.yb);this.Ct=a.length;this.zt=a.jp;this.cE=a.Uo;this.Jx=
this.ak=this.B=0};B(Ke,Y);Ke.prototype.df=function(a){var c,b=0,d=this.T,f=this.U;c=d.A.n;var k=this.da.x-d.k.L.x,e=this.da.y-d.k.L.y,b=c.i.x*k+c.j.x*e,e=c.i.y*k+c.j.y*e,k=b;c=f.A.n;var g=this.ea.x-f.k.L.x,l=this.ea.y-f.k.L.y,b=c.i.x*g+c.j.x*l,l=c.i.y*g+c.j.y*l,g=b;this.Ac.x=f.k.r.x+g-d.k.r.x-k;this.Ac.y=f.k.r.y+l-d.k.r.y-e;b=Math.sqrt(this.Ac.x*this.Ac.x+this.Ac.y*this.Ac.y);.005<b?this.Ac.Md(1/b):this.Ac.fa();c=k*this.Ac.y-e*this.Ac.x;var n=g*this.Ac.y-l*this.Ac.x;c=d.F+d.O*c*c+f.F+f.O*n*n;this.S=
0!=c?1/c:0;if(0<this.zt){var b=b-this.Ct,n=2*Math.PI*this.zt,h=this.S*n*n;this.ak=a.Ba*(2*this.S*this.cE*n+a.Ba*h);this.ak=0!=this.ak?1/this.ak:0;this.Jx=b*a.Ba*h*this.ak;this.S=c+this.ak;this.S=0!=this.S?1/this.S:0}a.di?(this.B*=a.vc,a=this.B*this.Ac.x,c=this.B*this.Ac.y,d.p.x-=d.F*a,d.p.y-=d.F*c,d.C-=d.O*(k*c-e*a),f.p.x+=f.F*a,f.p.y+=f.F*c,f.C+=f.O*(g*c-l*a)):this.B=0};Ke.prototype.Ie=function(){var a=this.da.x-this.T.k.L.x,c=this.da.y-this.T.k.L.y,b=this.T.A.n.i.x*a+this.T.A.n.j.x*c,c=this.T.A.n.i.y*
a+this.T.A.n.j.y*c,a=b,d=this.ea.x-this.U.k.L.x,f=this.ea.y-this.U.k.L.y,b=this.U.A.n.i.x*d+this.U.A.n.j.x*f,f=this.U.A.n.i.y*d+this.U.A.n.j.y*f,d=b,k=-this.S*(this.Ac.x*(this.U.p.x-this.U.C*f-(this.T.p.x-this.T.C*c))+this.Ac.y*(this.U.p.y+this.U.C*d-(this.T.p.y+this.T.C*a))+this.Jx+this.ak*this.B);this.B+=k;b=k*this.Ac.x;k*=this.Ac.y;this.T.p.x-=this.T.F*b;this.T.p.y-=this.T.F*k;this.T.C-=this.T.O*(a*k-c*b);this.U.p.x+=this.U.F*b;this.U.p.y+=this.U.F*k;this.U.C+=this.U.O*(d*k-f*b)};Ke.prototype.He=
function(){if(0<this.zt)return!0;var a=this.da.x-this.T.k.L.x,c=this.da.y-this.T.k.L.y,b=this.T.A.n.i.x*a+this.T.A.n.j.x*c,c=this.T.A.n.i.y*a+this.T.A.n.j.y*c,a=b,d=this.ea.x-this.U.k.L.x,f=this.ea.y-this.U.k.L.y,b=this.U.A.n.i.x*d+this.U.A.n.j.x*f,f=this.U.A.n.i.y*d+this.U.A.n.j.y*f,d=b,k=this.U.k.r.x+d-this.T.k.r.x-a,e=this.U.k.r.y+f-this.T.k.r.y-c,g=Math.sqrt(k*k+e*e),b=R.Bb(g-this.Ct,-.2,.2),l=-this.S*b;this.Ac.Set(k/g,e/g);k=l*this.Ac.x;l*=this.Ac.y;this.T.k.r.x-=this.T.F*k;this.T.k.r.y-=this.T.F*
l;this.T.k.I-=this.T.O*(a*l-c*k);this.U.k.r.x+=this.U.F*k;this.U.k.r.y+=this.U.F*l;this.U.k.I+=this.U.O*(d*l-f*k);this.T.Jb();this.U.Jb();return.005>Math.abs(b)};var Ac=function(){Je.call(this);this.xb=P.q(0,0);this.yb=P.q(0,0);this.type=Y.cs;this.length=1;this.Uo=this.jp=0};B(Ac,Je);Ac.prototype.jc=function(a,c,b,d){this.J=a;this.K=c;this.xb.D(this.J.rd(b));this.yb.D(this.K.rd(d));a=d.x-b.x;b=d.y-b.y;this.length=Math.sqrt(a*a+b*b);this.Uo=this.jp=0};Ac.prototype.cf=function(){return new Ke(this)};
var Le=function(a){Y.call(this,a);this.Te=P.q(0,0);this.Ue=P.q(0,0);this.Ft=new Q;this.Se=P.q(0,0);this.Te.D(a.xb);this.Ue.D(a.yb);this.Ft.fa();this.en=0;this.Se.fa();this.Hh=0;this.nE=a.vE;this.pE=a.wE};B(Le,Y);Le.prototype.df=function(a){var c,b=0,d=this.T,f=this.U;c=d.A.n;var k=this.Te.x-d.k.L.x,e=this.Te.y-d.k.L.y,b=c.i.x*k+c.j.x*e,e=c.i.y*k+c.j.y*e,k=b;c=f.A.n;var g=this.Ue.x-f.k.L.x,l=this.Ue.y-f.k.L.y,b=c.i.x*g+c.j.x*l,l=c.i.y*g+c.j.y*l,g=b;c=d.F;var b=f.F,n=d.O,h=f.O,m=new Q;m.i.x=c+b;m.j.x=
0;m.i.y=0;m.j.y=c+b;m.i.x+=n*e*e;m.j.x+=-n*k*e;m.i.y+=-n*k*e;m.j.y+=n*k*k;m.i.x+=h*l*l;m.j.x+=-h*g*l;m.i.y+=-h*g*l;m.j.y+=h*g*g;m.br(this.Ft);this.en=n+h;0<this.en&&(this.en=1/this.en);a.di?(this.Se.x*=a.vc,this.Se.y*=a.vc,this.Hh*=a.vc,a=this.Se,d.p.x-=c*a.x,d.p.y-=c*a.y,d.C-=n*(k*a.y-e*a.x+this.Hh),f.p.x+=b*a.x,f.p.y+=b*a.y,f.C+=h*(g*a.y-l*a.x+this.Hh)):(this.Se.fa(),this.Hh=0)};Le.prototype.Ie=function(a){var c,b=0,d=this.T,f=this.U,k=d.p,e=d.C,g=f.p,l=f.C,n=d.F,h=f.F,m=d.O,q=f.O;c=d.A.n;var p=
this.Te.x-d.k.L.x,s=this.Te.y-d.k.L.y,b=c.i.x*p+c.j.x*s,s=c.i.y*p+c.j.y*s,p=b;c=f.A.n;var t=this.Ue.x-f.k.L.x,w=this.Ue.y-f.k.L.y,b=c.i.x*t+c.j.x*w,w=c.i.y*t+c.j.y*w,t=b;c=0;var b=-this.en*(l-e),z=this.Hh;c=a.Ba*this.pE;this.Hh=R.Bb(this.Hh+b,-c,c);b=this.Hh-z;e-=m*b;l+=q*b;c=R.Vb(this.Ft,P.q(-(g.x-l*w-k.x+e*s),-(g.y+l*t-k.y-e*p)));b=this.Se.sc();this.Se.hh(c);c=a.Ba*this.nE;this.Se.oo()>c*c&&(this.Se.Nd(),this.Se.Md(c));c=R.wb(this.Se,b);k.x-=n*c.x;k.y-=n*c.y;e-=m*(p*c.y-s*c.x);g.x+=h*c.x;g.y+=h*
c.y;l+=q*(t*c.y-w*c.x);d.C=e;f.C=l};Le.prototype.He=function(){return!0};var Me=function(){Je.call(this);this.xb=P.q(0,0);this.yb=P.q(0,0);this.type=Y.pC;this.wE=this.vE=0};B(Me,Je);Me.prototype.jc=function(a,c,b){this.J=a;this.K=c;this.xb.D(this.J.rd(b));this.yb.D(this.K.rd(b))};Me.prototype.cf=function(){return new Le(this)};var Oe=function(a){Y.call(this,a);this.Mh=P.q(0,0);this.Nh=P.q(0,0);this.da=P.q(0,0);this.ea=P.q(0,0);this.Db=new Ne;var c=a.$k.Wa,b=a.al.Wa;this.jl=this.ek=this.il=this.dk=
null;var d=0,f=0;this.fE=a.$k.Ql();this.T=a.$k.Zq();c==Y.Ik?(this.dk=a.$k,this.Mh.D(this.dk.da),this.da.D(this.dk.ea),d=this.dk.jo()):(this.il=a.$k,this.Mh.D(this.il.da),this.da.D(this.il.ea),d=this.il.Sl());this.gE=a.al.Ql();this.U=a.al.Zq();b==Y.Ik?(this.ek=a.al,this.Nh.D(this.ek.da),this.ea.D(this.ek.ea),f=this.ek.jo()):(this.jl=a.al,this.Nh.D(this.jl.da),this.ea.D(this.jl.ea),f=this.jl.Sl());this.Nb=a.Wi;this.gl=d+this.Nb*f;this.B=0};B(Oe,Y);Oe.prototype.df=function(a){var c=this.fE,b=this.gE,
d=this.T,f=this.U,k=0,e=0,g=0,l=0,n=g=0,h=0;this.Db.fa();this.dk?(this.Db.oj=-1,h+=d.O):(c=c.A.n,e=this.il.fe,k=c.i.x*e.x+c.j.x*e.y,e=c.i.y*e.x+c.j.y*e.y,c=d.A.n,g=this.da.x-d.k.L.x,l=this.da.y-d.k.L.y,n=c.i.x*g+c.j.x*l,l=c.i.y*g+c.j.y*l,g=n*e-l*k,this.Db.Xf.Set(-k,-e),this.Db.oj=-g,h+=d.F+d.O*g*g);this.ek?(this.Db.pj=-this.Nb,h+=this.Nb*this.Nb*f.O):(c=b.A.n,e=this.jl.fe,k=c.i.x*e.x+c.j.x*e.y,e=c.i.y*e.x+c.j.y*e.y,c=f.A.n,g=this.ea.x-f.k.L.x,l=this.ea.y-f.k.L.y,n=c.i.x*g+c.j.x*l,l=c.i.y*g+c.j.y*
l,g=n*e-l*k,this.Db.Yf.Set(-this.Nb*k,-this.Nb*e),this.Db.pj=-this.Nb*g,h+=this.Nb*this.Nb*(f.F+f.O*g*g));this.S=0<h?1/h:0;a.di?(d.p.x+=d.F*this.B*this.Db.Xf.x,d.p.y+=d.F*this.B*this.Db.Xf.y,d.C+=d.O*this.B*this.Db.oj,f.p.x+=f.F*this.B*this.Db.Yf.x,f.p.y+=f.F*this.B*this.Db.Yf.y,f.C+=f.O*this.B*this.Db.pj):this.B=0};Oe.prototype.Ie=function(){var a=this.T,c=this.U,b=-this.S*this.Db.Sz(a.p,a.C,c.p,c.C);this.B+=b;a.p.x+=a.F*b*this.Db.Xf.x;a.p.y+=a.F*b*this.Db.Xf.y;a.C+=a.O*b*this.Db.oj;c.p.x+=c.F*b*
this.Db.Yf.x;c.p.y+=c.F*b*this.Db.Yf.y;c.C+=c.O*b*this.Db.pj};Oe.prototype.He=function(){var a=this.T,c=this.U,b=0,d=0,b=this.dk?this.dk.jo():this.il.Sl(),d=this.ek?this.ek.jo():this.jl.Sl(),b=-this.S*(this.gl-(b+this.Nb*d));a.k.r.x+=a.F*b*this.Db.Xf.x;a.k.r.y+=a.F*b*this.Db.Xf.y;a.k.I+=a.O*b*this.Db.oj;c.k.r.x+=c.F*b*this.Db.Yf.x;c.k.r.y+=c.F*b*this.Db.Yf.y;c.k.I+=c.O*b*this.Db.pj;a.Jb();c.Jb();return!0};var Pe=function(){Je.call(this);this.type=Y.qC;this.al=this.$k=null;this.Wi=1};B(Pe,Je);Pe.prototype.jc=
function(a,c,b){this.$k=a;this.J=a.Ql();this.al=c;this.K=c.Ql();this.Wi=b};Pe.prototype.cf=function(){return new Oe(this)};var Ne=function(){this.Xf=P.q(0,0);this.Yf=P.q(0,0)};Ne.prototype.fa=function(){this.Xf.fa();this.oj=0;this.Yf.fa();this.pj=0};Ne.prototype.Set=function(a,c,b,d){void 0===c&&(c=0);void 0===d&&(d=0);this.Xf.D(a);this.oj=c;this.Yf.D(b);this.pj=d};Ne.prototype.Sz=function(a,c,b,d){void 0===c&&(c=0);void 0===d&&(d=0);return this.Xf.x*a.x+this.Xf.y*a.y+this.oj*c+(this.Yf.x*b.x+this.Yf.y*
b.y)+this.pj*d};var Qe=function(a){Y.call(this,a);this.da=P.q(0,0);this.ea=P.q(0,0);this.fe=P.q(0,0);this.Oh=P.q(0,0);this.R=P.q(0,0);this.ga=P.q(0,0);this.aa=new Q;this.B=P.q(0,0);this.da.D(a.xb);this.ea.D(a.yb);this.fe.D(a.Wj);this.Oh.x=-this.fe.y;this.Oh.y=this.fe.x;this.B.fa();this.Na=this.Xd=0;this.Ve=a.tt;this.Xe=a.Ru;this.Gt=a.Mt;this.mn=a.pl;this.$f=a.Dj;this.Li=a.Jk;this.za=Y.Qd;this.R.fa();this.ga.fa()};B(Qe,Y);Qe.prototype.Sl=function(){var a=this.T,c=this.U,b=a.mo(this.da),d=c.mo(this.ea),
c=d.x-b.x,b=d.y-b.y,a=a.dr(this.fe);return a.x*c+a.y*b};Qe.prototype.df=function(a){var c=this.T,b=this.U,d,f=0;this.Kg.D(c.ij());this.Lg.D(b.ij());var k=c.me();b.me();d=c.A.n;var e=this.da.x-this.Kg.x,g=this.da.y-this.Kg.y,f=d.i.x*e+d.j.x*g,g=d.i.y*e+d.j.y*g,e=f;d=b.A.n;var l=this.ea.x-this.Lg.x,n=this.ea.y-this.Lg.y,f=d.i.x*l+d.j.x*n,n=d.i.y*l+d.j.y*n,l=f;d=b.k.r.x+l-c.k.r.x-e;f=b.k.r.y+n-c.k.r.y-g;this.Lb=c.F;this.Mb=b.F;this.Ad=c.O;this.Bd=b.O;this.R.D(R.Vb(k.n,this.fe));this.Za=(d+e)*this.R.y-
(f+g)*this.R.x;this.$a=l*this.R.y-n*this.R.x;this.Xd=this.Lb+this.Mb+this.Ad*this.Za*this.Za+this.Bd*this.$a*this.$a;this.Xd=this.Xd>Number.MIN_VALUE?1/this.Xd:0;this.ga.D(R.Vb(k.n,this.Oh));this.eb=(d+e)*this.ga.y-(f+g)*this.ga.x;this.fb=l*this.ga.y-n*this.ga.x;k=this.Lb;e=this.Mb;g=this.Ad;l=this.Bd;this.aa.i.x=k+e+g*this.eb*this.eb+l*this.fb*this.fb;this.aa.i.y=g*this.eb*this.Za+l*this.fb*this.$a;this.aa.j.x=this.aa.i.y;this.aa.j.y=k+e+g*this.Za*this.Za+l*this.$a*this.$a;this.$f?(d=this.R.x*d+
this.R.y*f,.01>Math.abs(this.Xe-this.Ve)?this.za=Y.wi:d<=this.Ve?this.za!=Y.wg&&(this.za=Y.wg,this.B.y=0):d>=this.Xe?this.za!=Y.Xc&&(this.za=Y.Xc,this.B.y=0):(this.za=Y.Qd,this.B.y=0)):this.za=Y.Qd;0==this.Li&&(this.Na=0);a.di?(this.B.x*=a.vc,this.B.y*=a.vc,this.Na*=a.vc,a=this.B.x*this.ga.x+(this.Na+this.B.y)*this.R.x,d=this.B.x*this.ga.y+(this.Na+this.B.y)*this.R.y,f=this.B.x*this.eb+(this.Na+this.B.y)*this.Za,k=this.B.x*this.fb+(this.Na+this.B.y)*this.$a,c.p.x-=this.Lb*a,c.p.y-=this.Lb*d,c.C-=
this.Ad*f,b.p.x+=this.Mb*a,b.p.y+=this.Mb*d,b.C+=this.Bd*k):(this.B.fa(),this.Na=0)};Qe.prototype.Ie=function(a){var c=this.T,b=this.U,d=c.p,f=c.C,k=b.p,e=b.C,g=0,l=0,n=0,h=0;this.Li&&this.za!=Y.wi&&(h=this.Xd*(this.mn-(this.R.x*(k.x-d.x)+this.R.y*(k.y-d.y)+this.$a*e-this.Za*f)),g=this.Na,l=a.Ba*this.Gt,this.Na=R.Bb(this.Na+h,-l,l),h=this.Na-g,g=h*this.R.x,l=h*this.R.y,n=h*this.Za,h*=this.$a,d.x-=this.Lb*g,d.y-=this.Lb*l,f-=this.Ad*n,k.x+=this.Mb*g,k.y+=this.Mb*l,e+=this.Bd*h);l=this.ga.x*(k.x-d.x)+
this.ga.y*(k.y-d.y)+this.fb*e-this.eb*f;this.$f&&this.za!=Y.Qd?(n=this.R.x*(k.x-d.x)+this.R.y*(k.y-d.y)+this.$a*e-this.Za*f,g=this.B.sc(),a=this.aa.li(P.q(0,0),-l,-n),this.B.hh(a),this.za==Y.wg?this.B.y=Math.max(this.B.y,0):this.za==Y.Xc&&(this.B.y=Math.min(this.B.y,0)),l=-l-(this.B.y-g.y)*this.aa.j.x,n=0,n=0!=this.aa.i.x?l/this.aa.i.x+g.x:g.x,this.B.x=n,a.x=this.B.x-g.x,a.y=this.B.y-g.y,g=a.x*this.ga.x+a.y*this.R.x,l=a.x*this.ga.y+a.y*this.R.y,n=a.x*this.eb+a.y*this.Za,h=a.x*this.fb+a.y*this.$a):
(a=0,a=0!=this.aa.i.x?-l/this.aa.i.x:0,this.B.x+=a,g=a*this.ga.x,l=a*this.ga.y,n=a*this.eb,h=a*this.fb);d.x-=this.Lb*g;d.y-=this.Lb*l;f-=this.Ad*n;k.x+=this.Mb*g;k.y+=this.Mb*l;e+=this.Bd*h;c.p.D(d);c.C=f;b.p.D(k);b.C=e};Qe.prototype.He=function(){var a=this.T,c=this.U,b=a.k.r,d=a.k.I,f=c.k.r,k=c.k.I,e,g=0,l=0,n=0,h=0,m=e=0,q=0,l=!1,p=0,s=Q.vk(d),n=Q.vk(k);e=s;var q=this.da.x-this.Kg.x,t=this.da.y-this.Kg.y,g=e.i.x*q+e.j.x*t,t=e.i.y*q+e.j.y*t,q=g;e=n;n=this.ea.x-this.Lg.x;h=this.ea.y-this.Lg.y;g=
e.i.x*n+e.j.x*h;h=e.i.y*n+e.j.y*h;n=g;e=f.x+n-b.x-q;g=f.y+h-b.y-t;if(this.$f){this.R=R.Vb(s,this.fe);this.Za=(e+q)*this.R.y-(g+t)*this.R.x;this.$a=n*this.R.y-h*this.R.x;var w=this.R.x*e+this.R.y*g;.01>Math.abs(this.Xe-this.Ve)?(p=R.Bb(w,-.2,.2),m=Math.abs(w),l=!0):w<=this.Ve?(p=R.Bb(w-this.Ve+.005,-.2,0),m=this.Ve-w,l=!0):w>=this.Xe&&(p=R.Bb(w-this.Xe+.005,0,.2),m=w-this.Xe,l=!0)}this.ga=R.Vb(s,this.Oh);this.eb=(e+q)*this.ga.y-(g+t)*this.ga.x;this.fb=n*this.ga.y-h*this.ga.x;s=P.q(0,0);t=this.ga.x*
e+this.ga.y*g;m=Math.max(m,Math.abs(t));q=0;l?(l=this.Lb,n=this.Mb,h=this.Ad,e=this.Bd,this.aa.i.x=l+n+h*this.eb*this.eb+e*this.fb*this.fb,this.aa.i.y=h*this.eb*this.Za+e*this.fb*this.$a,this.aa.j.x=this.aa.i.y,this.aa.j.y=l+n+h*this.Za*this.Za+e*this.$a*this.$a,this.aa.li(s,-t,-p)):(l=this.Lb,n=this.Mb,h=this.Ad,e=this.Bd,p=l+n+h*this.eb*this.eb+e*this.fb*this.fb,s.x=0!=p?-t/p:0,s.y=0);p=s.x*this.ga.x+s.y*this.R.x;l=s.x*this.ga.y+s.y*this.R.y;t=s.x*this.eb+s.y*this.Za;s=s.x*this.fb+s.y*this.$a;b.x-=
this.Lb*p;b.y-=this.Lb*l;d-=this.Ad*t;f.x+=this.Mb*p;f.y+=this.Mb*l;k+=this.Bd*s;a.k.I=d;c.k.I=k;a.Jb();c.Jb();return.005>=m&&q<=Cc};var Re=function(){Je.call(this);this.xb=P.q(0,0);this.yb=P.q(0,0);this.Wj=P.q(0,0);this.type=Y.rC;this.Wj.Set(1,0);this.Dj=!1;this.Ru=this.tt=0;this.Jk=!1;this.pl=this.Mt=0};B(Re,Je);Re.prototype.jc=function(a,c,b,d){this.J=a;this.K=c;this.xb=this.J.rd(b);this.yb=this.K.rd(b);this.Wj=this.J.cr(d)};Re.prototype.cf=function(){return new Qe(this)};var Se=function(a){Y.call(this,
a);this.da=P.q(0,0);this.ea=P.q(0,0);this.fe=P.q(0,0);this.Oh=P.q(0,0);this.R=P.q(0,0);this.ga=P.q(0,0);this.aa=new Jc;this.B=new Ic(0,0,0);this.da.D(a.xb);this.ea.D(a.yb);this.fe.D(a.Wj);this.Oh.x=-this.fe.y;this.Oh.y=this.fe.x;this.qE=a.Vg;this.B.fa();this.Na=this.Xd=0;this.Ve=a.tt;this.Xe=a.Ru;this.Gt=a.Mt;this.mn=a.pl;this.$f=a.Dj;this.Li=a.Jk;this.za=Y.Qd;this.R.fa();this.ga.fa()};B(Se,Y);Se.prototype.Sl=function(){var a=this.T,c=this.U,b=a.mo(this.da),d=c.mo(this.ea),c=d.x-b.x,b=d.y-b.y,a=a.dr(this.fe);
return a.x*c+a.y*b};Se.prototype.df=function(a){var c=this.T,b=this.U,d,f=0;this.Kg.D(c.ij());this.Lg.D(b.ij());var k=c.me();b.me();d=c.A.n;var e=this.da.x-this.Kg.x,g=this.da.y-this.Kg.y,f=d.i.x*e+d.j.x*g,g=d.i.y*e+d.j.y*g,e=f;d=b.A.n;var l=this.ea.x-this.Lg.x,n=this.ea.y-this.Lg.y,f=d.i.x*l+d.j.x*n,n=d.i.y*l+d.j.y*n,l=f;d=b.k.r.x+l-c.k.r.x-e;f=b.k.r.y+n-c.k.r.y-g;this.Lb=c.F;this.Mb=b.F;this.Ad=c.O;this.Bd=b.O;this.R.D(R.Vb(k.n,this.fe));this.Za=(d+e)*this.R.y-(f+g)*this.R.x;this.$a=l*this.R.y-
n*this.R.x;this.Xd=this.Lb+this.Mb+this.Ad*this.Za*this.Za+this.Bd*this.$a*this.$a;this.Xd>Number.MIN_VALUE&&(this.Xd=1/this.Xd);this.ga.D(R.Vb(k.n,this.Oh));this.eb=(d+e)*this.ga.y-(f+g)*this.ga.x;this.fb=l*this.ga.y-n*this.ga.x;k=this.Lb;e=this.Mb;g=this.Ad;l=this.Bd;this.aa.i.x=k+e+g*this.eb*this.eb+l*this.fb*this.fb;this.aa.i.y=g*this.eb+l*this.fb;this.aa.i.z=g*this.eb*this.Za+l*this.fb*this.$a;this.aa.j.x=this.aa.i.y;this.aa.j.y=g+l;this.aa.j.z=g*this.Za+l*this.$a;this.aa.ma.x=this.aa.i.z;this.aa.ma.y=
this.aa.j.z;this.aa.ma.z=k+e+g*this.Za*this.Za+l*this.$a*this.$a;this.$f?(d=this.R.x*d+this.R.y*f,.01>Math.abs(this.Xe-this.Ve)?this.za=Y.wi:d<=this.Ve?this.za!=Y.wg&&(this.za=Y.wg,this.B.z=0):d>=this.Xe?this.za!=Y.Xc&&(this.za=Y.Xc,this.B.z=0):(this.za=Y.Qd,this.B.z=0)):this.za=Y.Qd;0==this.Li&&(this.Na=0);a.di?(this.B.x*=a.vc,this.B.y*=a.vc,this.Na*=a.vc,a=this.B.x*this.ga.x+(this.Na+this.B.z)*this.R.x,d=this.B.x*this.ga.y+(this.Na+this.B.z)*this.R.y,f=this.B.x*this.eb+this.B.y+(this.Na+this.B.z)*
this.Za,k=this.B.x*this.fb+this.B.y+(this.Na+this.B.z)*this.$a,c.p.x-=this.Lb*a,c.p.y-=this.Lb*d,c.C-=this.Ad*f,b.p.x+=this.Mb*a,b.p.y+=this.Mb*d,b.C+=this.Bd*k):(this.B.fa(),this.Na=0)};Se.prototype.Ie=function(a){var c=this.T,b=this.U,d=c.p,f=c.C,k=b.p,e=b.C,g=0,l=0,n=0,h=0;this.Li&&this.za!=Y.wi&&(h=this.Xd*(this.mn-(this.R.x*(k.x-d.x)+this.R.y*(k.y-d.y)+this.$a*e-this.Za*f)),g=this.Na,a=a.Ba*this.Gt,this.Na=R.Bb(this.Na+h,-a,a),h=this.Na-g,g=h*this.R.x,l=h*this.R.y,n=h*this.Za,h*=this.$a,d.x-=
this.Lb*g,d.y-=this.Lb*l,f-=this.Ad*n,k.x+=this.Mb*g,k.y+=this.Mb*l,e+=this.Bd*h);n=this.ga.x*(k.x-d.x)+this.ga.y*(k.y-d.y)+this.fb*e-this.eb*f;l=e-f;this.$f&&this.za!=Y.Qd?(a=this.R.x*(k.x-d.x)+this.R.y*(k.y-d.y)+this.$a*e-this.Za*f,g=this.B.sc(),a=this.aa.cm(new Ic(0,0,0),-n,-l,-a),this.B.hh(a),this.za==Y.wg?this.B.z=Math.max(this.B.z,0):this.za==Y.Xc&&(this.B.z=Math.min(this.B.z,0)),n=-n-(this.B.z-g.z)*this.aa.ma.x,l=-l-(this.B.z-g.z)*this.aa.ma.y,l=this.aa.Ck(P.q(0,0),n,l),l.x+=g.x,l.y+=g.y,this.B.x=
l.x,this.B.y=l.y,a.x=this.B.x-g.x,a.y=this.B.y-g.y,a.z=this.B.z-g.z,g=a.x*this.ga.x+a.z*this.R.x,l=a.x*this.ga.y+a.z*this.R.y,n=a.x*this.eb+a.y+a.z*this.Za,h=a.x*this.fb+a.y+a.z*this.$a):(a=this.aa.Ck(P.q(0,0),-n,-l),this.B.x+=a.x,this.B.y+=a.y,g=a.x*this.ga.x,l=a.x*this.ga.y,n=a.x*this.eb+a.y,h=a.x*this.fb+a.y);d.x-=this.Lb*g;d.y-=this.Lb*l;f-=this.Ad*n;k.x+=this.Mb*g;k.y+=this.Mb*l;e+=this.Bd*h;c.p.D(d);c.C=f;b.p.D(k);b.C=e};Se.prototype.He=function(){var a=this.T,c=this.U,b=a.k.r,d=a.k.I,f=c.k.r,
k=c.k.I,e,g=0,l=0,n=0,h=g=e=0,m=0,l=!1,q=0,p=Q.vk(d),s=Q.vk(k);e=p;var m=this.da.x-this.Kg.x,t=this.da.y-this.Kg.y,g=e.i.x*m+e.j.x*t,t=e.i.y*m+e.j.y*t,m=g;e=s;s=this.ea.x-this.Lg.x;n=this.ea.y-this.Lg.y;g=e.i.x*s+e.j.x*n;n=e.i.y*s+e.j.y*n;s=g;e=f.x+s-b.x-m;g=f.y+n-b.y-t;if(this.$f){this.R=R.Vb(p,this.fe);this.Za=(e+m)*this.R.y-(g+t)*this.R.x;this.$a=s*this.R.y-n*this.R.x;var w=this.R.x*e+this.R.y*g;.01>Math.abs(this.Xe-this.Ve)?(q=R.Bb(w,-.2,.2),h=Math.abs(w),l=!0):w<=this.Ve?(q=R.Bb(w-this.Ve+.005,
-.2,0),h=this.Ve-w,l=!0):w>=this.Xe&&(q=R.Bb(w-this.Xe+.005,0,.2),h=w-this.Xe,l=!0)}this.ga=R.Vb(p,this.Oh);this.eb=(e+m)*this.ga.y-(g+t)*this.ga.x;this.fb=s*this.ga.y-n*this.ga.x;p=new Ic(0,0,0);t=this.ga.x*e+this.ga.y*g;s=k-d-this.qE;h=Math.max(h,Math.abs(t));m=Math.abs(s);l?(l=this.Lb,n=this.Mb,e=this.Ad,g=this.Bd,this.aa.i.x=l+n+e*this.eb*this.eb+g*this.fb*this.fb,this.aa.i.y=e*this.eb+g*this.fb,this.aa.i.z=e*this.eb*this.Za+g*this.fb*this.$a,this.aa.j.x=this.aa.i.y,this.aa.j.y=e+g,this.aa.j.z=
e*this.Za+g*this.$a,this.aa.ma.x=this.aa.i.z,this.aa.ma.y=this.aa.j.z,this.aa.ma.z=l+n+e*this.Za*this.Za+g*this.$a*this.$a,this.aa.cm(p,-t,-s,-q)):(l=this.Lb,n=this.Mb,e=this.Ad,g=this.Bd,q=e*this.eb+g*this.fb,w=e+g,this.aa.i.Set(l+n+e*this.eb*this.eb+g*this.fb*this.fb,q,0),this.aa.j.Set(q,w,0),q=this.aa.Ck(P.q(0,0),-t,-s),p.x=q.x,p.y=q.y,p.z=0);q=p.x*this.ga.x+p.z*this.R.x;l=p.x*this.ga.y+p.z*this.R.y;t=p.x*this.eb+p.y+p.z*this.Za;p=p.x*this.fb+p.y+p.z*this.$a;b.x-=this.Lb*q;b.y-=this.Lb*l;d-=this.Ad*
t;f.x+=this.Mb*q;f.y+=this.Mb*l;k+=this.Bd*p;a.k.I=d;c.k.I=k;a.Jb();c.Jb();return.005>=h&&m<=Cc};var Te=function(){Je.call(this);this.xb=P.q(0,0);this.yb=P.q(0,0);this.Wj=P.q(0,0);this.type=Y.sC;this.Wj.Set(1,0);this.Vg=0;this.Dj=!1;this.Ru=this.tt=0;this.Jk=!1;this.pl=this.Mt=0};B(Te,Je);Te.prototype.jc=function(a,c,b,d){this.J=a;this.K=c;this.xb=this.J.rd(b);this.yb=this.K.rd(b);this.Wj=this.J.cr(d);this.Vg=this.K.Kd()-this.J.Kd()};Te.prototype.cf=function(){return new Se(this)};var Ve=function(a){Y.call(this,
a);this.Mh=P.q(0,0);this.Nh=P.q(0,0);this.da=P.q(0,0);this.ea=P.q(0,0);this.ib=P.q(0,0);this.jb=P.q(0,0);this.uf=this.T.Ja.hE;this.Mh.x=a.op.x-this.uf.A.position.x;this.Mh.y=a.op.y-this.uf.A.position.y;this.Nh.x=a.pp.x-this.uf.A.position.x;this.Nh.y=a.pp.y-this.uf.A.position.y;this.da.D(a.xb);this.ea.D(a.yb);this.Nb=a.Wi;this.gl=a.gt+this.Nb*a.ht;this.Nx=Math.min(a.Px,this.gl-this.Nb*Ue);this.Ox=Math.min(a.Qx,(this.gl-Ue)/this.Nb);this.Jg=this.Ig=this.B=0};B(Ve,Y);Ve.prototype.df=function(a){var c=
this.T,b=this.U,d;d=c.A.n;var f=this.da.x-c.k.L.x,k=this.da.y-c.k.L.y,e=d.i.x*f+d.j.x*k,k=d.i.y*f+d.j.y*k,f=e;d=b.A.n;var g=this.ea.x-b.k.L.x,l=this.ea.y-b.k.L.y,e=d.i.x*g+d.j.x*l,l=d.i.y*g+d.j.y*l,g=e;d=b.k.r.x+g;var e=b.k.r.y+l,n=this.uf.A.position.x+this.Nh.x,h=this.uf.A.position.y+this.Nh.y;this.ib.Set(c.k.r.x+f-(this.uf.A.position.x+this.Mh.x),c.k.r.y+k-(this.uf.A.position.y+this.Mh.y));this.jb.Set(d-n,e-h);d=this.ib.qg();e=this.jb.qg();.005<d?this.ib.Md(1/d):this.ib.fa();.005<e?this.jb.Md(1/
e):this.jb.fa();0<this.gl-d-this.Nb*e?(this.Jt=Y.Qd,this.B=0):this.Jt=Y.Xc;d<this.Nx?(this.Dt=Y.Qd,this.Ig=0):this.Dt=Y.Xc;e<this.Ox?(this.Et=Y.Qd,this.Jg=0):this.Et=Y.Xc;d=f*this.ib.y-k*this.ib.x;e=g*this.jb.y-l*this.jb.x;this.kn=c.F+c.O*d*d;this.ln=b.F+b.O*e*e;this.Zp=this.kn+this.Nb*this.Nb*this.ln;this.kn=1/this.kn;this.ln=1/this.ln;this.Zp=1/this.Zp;a.di?(this.B*=a.vc,this.Ig*=a.vc,this.Jg*=a.vc,a=(-this.B-this.Ig)*this.ib.x,d=(-this.B-this.Ig)*this.ib.y,e=(-this.Nb*this.B-this.Jg)*this.jb.x,
n=(-this.Nb*this.B-this.Jg)*this.jb.y,c.p.x+=c.F*a,c.p.y+=c.F*d,c.C+=c.O*(f*d-k*a),b.p.x+=b.F*e,b.p.y+=b.F*n,b.C+=b.O*(g*n-l*e)):this.Jg=this.Ig=this.B=0};Ve.prototype.Ie=function(){var a=this.T,c=this.U,b;b=a.A.n;var d=this.da.x-a.k.L.x,f=this.da.y-a.k.L.y,k=b.i.x*d+b.j.x*f,f=b.i.y*d+b.j.y*f,d=k;b=c.A.n;var e=this.ea.x-c.k.L.x,g=this.ea.y-c.k.L.y,k=b.i.x*e+b.j.x*g,g=b.i.y*e+b.j.y*g,e=k,l=k=b=0,n=0;b=n=b=n=l=k=b=0;this.Jt==Y.Xc&&(b=a.p.x+-a.C*f,k=a.p.y+a.C*d,l=c.p.x+-c.C*g,n=c.p.y+c.C*e,b=-(this.ib.x*
b+this.ib.y*k)-this.Nb*(this.jb.x*l+this.jb.y*n),n=this.Zp*-b,b=this.B,this.B=Math.max(0,this.B+n),n=this.B-b,b=-n*this.ib.x,k=-n*this.ib.y,l=-this.Nb*n*this.jb.x,n=-this.Nb*n*this.jb.y,a.p.x+=a.F*b,a.p.y+=a.F*k,a.C+=a.O*(d*k-f*b),c.p.x+=c.F*l,c.p.y+=c.F*n,c.C+=c.O*(e*n-g*l));this.Dt==Y.Xc&&(b=a.p.x+-a.C*f,k=a.p.y+a.C*d,b=-(this.ib.x*b+this.ib.y*k),n=-this.kn*b,b=this.Ig,this.Ig=Math.max(0,this.Ig+n),n=this.Ig-b,b=-n*this.ib.x,k=-n*this.ib.y,a.p.x+=a.F*b,a.p.y+=a.F*k,a.C+=a.O*(d*k-f*b));this.Et==
Y.Xc&&(l=c.p.x+-c.C*g,n=c.p.y+c.C*e,b=-(this.jb.x*l+this.jb.y*n),n=-this.ln*b,b=this.Jg,this.Jg=Math.max(0,this.Jg+n),n=this.Jg-b,l=-n*this.jb.x,n=-n*this.jb.y,c.p.x+=c.F*l,c.p.y+=c.F*n,c.C+=c.O*(e*n-g*l))};Ve.prototype.He=function(){var a=this.T,c=this.U,b,d=this.uf.A.position.x+this.Mh.x,f=this.uf.A.position.y+this.Mh.y,k=this.uf.A.position.x+this.Nh.x,e=this.uf.A.position.y+this.Nh.y,g=0,l=0,n=0,h=0,m=b=0,q=0,p=0,s=m=p=b=m=b=0;this.Jt==Y.Xc&&(b=a.A.n,g=this.da.x-a.k.L.x,l=this.da.y-a.k.L.y,m=b.i.x*
g+b.j.x*l,l=b.i.y*g+b.j.y*l,g=m,b=c.A.n,n=this.ea.x-c.k.L.x,h=this.ea.y-c.k.L.y,m=b.i.x*n+b.j.x*h,h=b.i.y*n+b.j.y*h,n=m,b=a.k.r.x+g,m=a.k.r.y+l,q=c.k.r.x+n,p=c.k.r.y+h,this.ib.Set(b-d,m-f),this.jb.Set(q-k,p-e),b=this.ib.qg(),m=this.jb.qg(),.005<b?this.ib.Md(1/b):this.ib.fa(),.005<m?this.jb.Md(1/m):this.jb.fa(),b=this.gl-b-this.Nb*m,s=Math.max(s,-b),b=R.Bb(b+.005,-.2,0),p=-this.Zp*b,b=-p*this.ib.x,m=-p*this.ib.y,q=-this.Nb*p*this.jb.x,p=-this.Nb*p*this.jb.y,a.k.r.x+=a.F*b,a.k.r.y+=a.F*m,a.k.I+=a.O*
(g*m-l*b),c.k.r.x+=c.F*q,c.k.r.y+=c.F*p,c.k.I+=c.O*(n*p-h*q),a.Jb(),c.Jb());this.Dt==Y.Xc&&(b=a.A.n,g=this.da.x-a.k.L.x,l=this.da.y-a.k.L.y,m=b.i.x*g+b.j.x*l,l=b.i.y*g+b.j.y*l,g=m,b=a.k.r.x+g,m=a.k.r.y+l,this.ib.Set(b-d,m-f),b=this.ib.qg(),.005<b?(this.ib.x*=1/b,this.ib.y*=1/b):this.ib.fa(),b=this.Nx-b,s=Math.max(s,-b),b=R.Bb(b+.005,-.2,0),p=-this.kn*b,b=-p*this.ib.x,m=-p*this.ib.y,a.k.r.x+=a.F*b,a.k.r.y+=a.F*m,a.k.I+=a.O*(g*m-l*b),a.Jb());this.Et==Y.Xc&&(b=c.A.n,n=this.ea.x-c.k.L.x,h=this.ea.y-c.k.L.y,
m=b.i.x*n+b.j.x*h,h=b.i.y*n+b.j.y*h,n=m,q=c.k.r.x+n,p=c.k.r.y+h,this.jb.Set(q-k,p-e),m=this.jb.qg(),.005<m?(this.jb.x*=1/m,this.jb.y*=1/m):this.jb.fa(),b=this.Ox-m,s=Math.max(s,-b),b=R.Bb(b+.005,-.2,0),p=-this.ln*b,q=-p*this.jb.x,p=-p*this.jb.y,c.k.r.x+=c.F*q,c.k.r.y+=c.F*p,c.k.I+=c.O*(n*p-h*q),c.Jb());return.005>s};var Ue=1,We=function(){Je.call(this);this.op=P.q(0,0);this.pp=P.q(0,0);this.xb=P.q(0,0);this.yb=P.q(0,0);this.type=Y.tC;this.op.Set(-1,1);this.pp.Set(1,1);this.xb.Set(-1,0);this.yb.Set(1,
0);this.Qx=this.ht=this.Px=this.gt=0;this.Wi=1;this.Rr=!0};B(We,Je);We.prototype.jc=function(a,c,b,d,f,k,e){void 0===e&&(e=0);this.J=a;this.K=c;this.op.D(b);this.pp.D(d);this.xb=this.J.rd(f);this.yb=this.K.rd(k);a=f.x-b.x;b=f.y-b.y;this.gt=Math.sqrt(a*a+b*b);b=k.x-d.x;d=k.y-d.y;this.ht=Math.sqrt(b*b+d*d);this.Wi=e;e=this.gt+this.Wi*this.ht;this.Px=e-this.Wi*Ue;this.Qx=(e-Ue)/this.Wi};We.prototype.cf=function(){return new Ve(this)};var Ye=function(a){Y.call(this,a);this.ne=new Q;this.Ul=new Q;this.Vl=
new Q;this.Wl=new Q;this.Kc=new Ic(0,0,0);this.Rf=P.q(0,0);this.Ug=P.q(0,0);this.da=P.q(0,0);this.ea=P.q(0,0);this.B=new Ic(0,0,0);this.S=new Jc;this.da.D(a.xb);this.ea.D(a.yb);this.on=a.Vg;this.B.fa();this.Na=0;this.Xp=a.qt;this.Kt=a.Qu;this.oE=a.Rx;this.mn=a.pl;this.$f=a.Dj;this.Li=a.Jk;this.za=Y.Qd};B(Ye,Y);Ye.prototype.jo=function(){return this.U.k.I-this.T.k.I-this.on};Ye.prototype.df=function(a){var c=this.T,b=this.U,d,f=0;d=c.A.n;var k=this.da.x-c.k.L.x,e=this.da.y-c.k.L.y,f=d.i.x*k+d.j.x*
e,e=d.i.y*k+d.j.y*e,k=f;d=b.A.n;var g=this.ea.x-b.k.L.x,l=this.ea.y-b.k.L.y,f=d.i.x*g+d.j.x*l,l=d.i.y*g+d.j.y*l,g=f;d=c.F;var f=b.F,n=c.O,h=b.O;this.S.i.x=d+f+e*e*n+l*l*h;this.S.j.x=-e*k*n-l*g*h;this.S.ma.x=-e*n-l*h;this.S.i.y=this.S.j.x;this.S.j.y=d+f+k*k*n+g*g*h;this.S.ma.y=k*n+g*h;this.S.i.z=this.S.ma.x;this.S.j.z=this.S.ma.y;this.S.ma.z=n+h;this.Xd=1/(n+h);this.Li||(this.Na=0);if(this.$f){var m=b.k.I-c.k.I-this.on;Math.abs(this.Kt-this.Xp)<2*Cc?this.za=Y.wi:m<=this.Xp?(this.za!=Y.wg&&(this.B.z=
0),this.za=Y.wg):m>=this.Kt?(this.za!=Y.Xc&&(this.B.z=0),this.za=Y.Xc):(this.za=Y.Qd,this.B.z=0)}else this.za=Y.Qd;a.di?(this.B.x*=a.vc,this.B.y*=a.vc,this.Na*=a.vc,a=this.B.x,m=this.B.y,c.p.x-=d*a,c.p.y-=d*m,c.C-=n*(k*m-e*a+this.Na+this.B.z),b.p.x+=f*a,b.p.y+=f*m,b.C+=h*(g*m-l*a+this.Na+this.B.z)):(this.B.fa(),this.Na=0)};Ye.prototype.Ie=function(a){var c=this.T,b=this.U,d=0,f=d=0,k=0,e=0,g=0,l=c.p,n=c.C,h=b.p,m=b.C,q=c.F,p=b.F,s=c.O,t=b.O;this.Li&&this.za!=Y.wi&&(f=this.Xd*-(m-n-this.mn),k=this.Na,
e=a.Ba*this.oE,this.Na=R.Bb(this.Na+f,-e,e),f=this.Na-k,n-=s*f,m+=t*f);if(this.$f&&this.za!=Y.Qd){a=c.A.n;f=this.da.x-c.k.L.x;k=this.da.y-c.k.L.y;d=a.i.x*f+a.j.x*k;k=a.i.y*f+a.j.y*k;f=d;a=b.A.n;e=this.ea.x-b.k.L.x;g=this.ea.y-b.k.L.y;d=a.i.x*e+a.j.x*g;g=a.i.y*e+a.j.y*g;e=d;a=h.x+-m*g-l.x- -n*k;var w=h.y+m*e-l.y-n*f;this.S.cm(this.Kc,-a,-w,-(m-n));this.za==Y.wi?this.B.hh(this.Kc):this.za==Y.wg?(d=this.B.z+this.Kc.z,0>d&&(this.S.Ck(this.Ug,-a,-w),this.Kc.x=this.Ug.x,this.Kc.y=this.Ug.y,this.Kc.z=-this.B.z,
this.B.x+=this.Ug.x,this.B.y+=this.Ug.y,this.B.z=0)):this.za==Y.Xc&&(d=this.B.z+this.Kc.z,0<d&&(this.S.Ck(this.Ug,-a,-w),this.Kc.x=this.Ug.x,this.Kc.y=this.Ug.y,this.Kc.z=-this.B.z,this.B.x+=this.Ug.x,this.B.y+=this.Ug.y,this.B.z=0));l.x-=q*this.Kc.x;l.y-=q*this.Kc.y;n-=s*(f*this.Kc.y-k*this.Kc.x+this.Kc.z);h.x+=p*this.Kc.x;h.y+=p*this.Kc.y;m+=t*(e*this.Kc.y-g*this.Kc.x+this.Kc.z)}else a=c.A.n,f=this.da.x-c.k.L.x,k=this.da.y-c.k.L.y,d=a.i.x*f+a.j.x*k,k=a.i.y*f+a.j.y*k,f=d,a=b.A.n,e=this.ea.x-b.k.L.x,
g=this.ea.y-b.k.L.y,d=a.i.x*e+a.j.x*g,g=a.i.y*e+a.j.y*g,e=d,this.S.Ck(this.Rf,-(h.x+-m*g-l.x- -n*k),-(h.y+m*e-l.y-n*f)),this.B.x+=this.Rf.x,this.B.y+=this.Rf.y,l.x-=q*this.Rf.x,l.y-=q*this.Rf.y,n-=s*(f*this.Rf.y-k*this.Rf.x),h.x+=p*this.Rf.x,h.y+=p*this.Rf.y,m+=t*(e*this.Rf.y-g*this.Rf.x);c.p.D(l);c.C=n;b.p.D(h);b.C=m};Ye.prototype.He=function(){var a=0,c,b=this.T,d=this.U,f=0,k=c=0,e=0,g=0;if(this.$f&&this.za!=Y.Qd){var a=d.k.I-b.k.I-this.on,l=0;this.za==Y.wi?(a=R.Bb(a-this.Xp,-Dc,Dc),l=-this.Xd*
a,f=Math.abs(a)):this.za==Y.wg?(a-=this.Xp,f=-a,a=R.Bb(a+Cc,-Dc,0),l=-this.Xd*a):this.za==Y.Xc&&(f=a-=this.Kt,a=R.Bb(a-Cc,0,Dc),l=-this.Xd*a);b.k.I-=b.O*l;d.k.I+=d.O*l;b.Jb();d.Jb()}c=b.A.n;l=this.da.x-b.k.L.x;a=this.da.y-b.k.L.y;k=c.i.x*l+c.j.x*a;a=c.i.y*l+c.j.y*a;l=k;c=d.A.n;var n=this.ea.x-d.k.L.x,h=this.ea.y-d.k.L.y,k=c.i.x*n+c.j.x*h,h=c.i.y*n+c.j.y*h,n=k,e=d.k.r.x+n-b.k.r.x-l,g=d.k.r.y+h-b.k.r.y-a,m=e*e+g*g;c=Math.sqrt(m);var k=b.F,q=d.F,p=b.O,s=d.O;m>.05*.05&&(m=1/(k+q),e=m*-e,g=m*-g,b.k.r.x-=
.5*k*e,b.k.r.y-=.5*k*g,d.k.r.x+=.5*q*e,d.k.r.y+=.5*q*g,e=d.k.r.x+n-b.k.r.x-l,g=d.k.r.y+h-b.k.r.y-a);this.Ul.i.x=k+q;this.Ul.j.x=0;this.Ul.i.y=0;this.Ul.j.y=k+q;this.Vl.i.x=p*a*a;this.Vl.j.x=-p*l*a;this.Vl.i.y=-p*l*a;this.Vl.j.y=p*l*l;this.Wl.i.x=s*h*h;this.Wl.j.x=-s*n*h;this.Wl.i.y=-s*n*h;this.Wl.j.y=s*n*n;this.ne.Hf(this.Ul);this.ne.Xn(this.Vl);this.ne.Xn(this.Wl);this.ne.li(Ze,-e,-g);e=Ze.x;g=Ze.y;b.k.r.x-=b.F*e;b.k.r.y-=b.F*g;b.k.I-=b.O*(l*g-a*e);d.k.r.x+=d.F*e;d.k.r.y+=d.F*g;d.k.I+=d.O*(n*g-h*
e);b.Jb();d.Jb();return.005>=c&&f<=Cc};var Ze=P.q(0,0),Bc=function(){Je.call(this);this.xb=P.q(0,0);this.yb=P.q(0,0);this.type=Y.Ik;this.xb.fa();this.yb.fa();this.pl=this.Rx=this.Qu=this.qt=this.Vg=0;this.Jk=this.Dj=!1};B(Bc,Je);Bc.prototype.jc=function(a,c,b){this.J=a;this.K=c;this.xb=this.J.rd(b);this.yb=this.K.rd(b);this.Vg=this.K.Kd()-this.J.Kd()};Bc.prototype.cf=function(){return new Ye(this)};var $e=function(a){Y.call(this,a);this.Te=P.q(0,0);this.Ue=P.q(0,0);this.B=new Ic(0,0,0);this.S=new Jc;
this.Te.D(a.xb);this.Ue.D(a.yb);this.on=a.Vg};B($e,Y);$e.prototype.df=function(a){var c,b=0,d=this.T,f=this.U;c=d.A.n;var k=this.Te.x-d.k.L.x,e=this.Te.y-d.k.L.y,b=c.i.x*k+c.j.x*e,e=c.i.y*k+c.j.y*e,k=b;c=f.A.n;var g=this.Ue.x-f.k.L.x,l=this.Ue.y-f.k.L.y,b=c.i.x*g+c.j.x*l,l=c.i.y*g+c.j.y*l,g=b;c=d.F;var b=f.F,n=d.O,h=f.O;this.S.i.x=c+b+e*e*n+l*l*h;this.S.j.x=-e*k*n-l*g*h;this.S.ma.x=-e*n-l*h;this.S.i.y=this.S.j.x;this.S.j.y=c+b+k*k*n+g*g*h;this.S.ma.y=k*n+g*h;this.S.i.z=this.S.ma.x;this.S.j.z=this.S.ma.y;
this.S.ma.z=n+h;a.di?(this.B.x*=a.vc,this.B.y*=a.vc,this.B.z*=a.vc,d.p.x-=c*this.B.x,d.p.y-=c*this.B.y,d.C-=n*(k*this.B.y-e*this.B.x+this.B.z),f.p.x+=b*this.B.x,f.p.y+=b*this.B.y,f.C+=h*(g*this.B.y-l*this.B.x+this.B.z)):this.B.fa()};$e.prototype.Ie=function(){var a,c=0,b=this.T,d=this.U,f=b.p,k=b.C,e=d.p,g=d.C,l=b.F,n=d.F,h=b.O,m=d.O;a=b.A.n;var q=this.Te.x-b.k.L.x,p=this.Te.y-b.k.L.y,c=a.i.x*q+a.j.x*p,p=a.i.y*q+a.j.y*p,q=c;a=d.A.n;var s=this.Ue.x-d.k.L.x,t=this.Ue.y-d.k.L.y,c=a.i.x*s+a.j.x*t,t=a.i.y*
s+a.j.y*t,s=c;a=new Ic(0,0,0);this.S.cm(a,-(e.x-g*t-f.x+k*p),-(e.y+g*s-f.y-k*q),-(g-k));this.B.hh(a);f.x-=l*a.x;f.y-=l*a.y;k-=h*(q*a.y-p*a.x+a.z);e.x+=n*a.x;e.y+=n*a.y;g+=m*(s*a.y-t*a.x+a.z);b.C=k;d.C=g};$e.prototype.He=function(){var a,c=0,b=this.T,d=this.U;a=b.A.n;var f=this.Te.x-b.k.L.x,k=this.Te.y-b.k.L.y,c=a.i.x*f+a.j.x*k,k=a.i.y*f+a.j.y*k,f=c;a=d.A.n;var e=this.Ue.x-d.k.L.x,g=this.Ue.y-d.k.L.y,c=a.i.x*e+a.j.x*g,g=a.i.y*e+a.j.y*g,e=c;a=b.F;var c=d.F,l=b.O,n=d.O,h=d.k.r.x+e-b.k.r.x-f,m=d.k.r.y+
g-b.k.r.y-k,q=d.k.I-b.k.I-this.on,p=Math.sqrt(h*h+m*m),s=Math.abs(q);.05<p&&(l*=1,n*=1);this.S.i.x=a+c+k*k*l+g*g*n;this.S.j.x=-k*f*l-g*e*n;this.S.ma.x=-k*l-g*n;this.S.i.y=this.S.j.x;this.S.j.y=a+c+f*f*l+e*e*n;this.S.ma.y=f*l+e*n;this.S.i.z=this.S.ma.x;this.S.j.z=this.S.ma.y;this.S.ma.z=l+n;var t=new Ic(0,0,0);this.S.cm(t,-h,-m,-q);b.k.r.x-=a*t.x;b.k.r.y-=a*t.y;b.k.I-=l*(f*t.y-k*t.x+t.z);d.k.r.x+=c*t.x;d.k.r.y+=c*t.y;d.k.I+=n*(e*t.y-g*t.x+t.z);b.Jb();d.Jb();return.005>=p&&s<=Cc};var af=function(){Je.call(this);
this.xb=P.q(0,0);this.yb=P.q(0,0);this.type=Y.vC;this.Vg=0};B(af,Je);af.prototype.jc=function(a,c,b){this.J=a;this.K=c;this.xb.D(this.J.rd(b));this.yb.D(this.K.rd(b));this.Vg=this.K.Kd()-this.J.Kd()};af.prototype.cf=function(){return new $e(this)};var pe=[new Qc,new Qc],ye=[new Qc,new Qc],ze=[new Qc,new Qc],qe=P.q(0,0),re=P.q(0,0),se=P.q(0,0),ve=P.q(0,0),te=P.q(0,0),ue=P.q(0,0),we=P.q(0,0),xe=P.q(0,0),Rd=0,$d=0,ae=0,Yd=0,Zd=0,Sd=new od,Td=new Zc,Ud=new sc,Vd=new sc,Xd=new jd,Wd=new $c;uc.hF=new sc;
vc.fw=new vc;new function(){this.position=P.q(0,0);this.wz=P.q(0,0);this.Dd=P.q(0,0);this.id=new Oc};xc.hH=new sc;xc.Iy=new Kc;xc.Jy=new Kc;var Qd=new pd,ne=new qd,oe=new le}function bf(a,c,b,d,f,k){var e;if(e=(b+.1>=a&&a>=f-.1||b-.1<=a&&a<=f+.1)&&(d+.1>=c&&c>=k-.1||d-.1<=c&&c<=k+.1))e=.1<Math.abs(f-b)?.1>Math.abs((k-d)/(f-b)*(a-b)+d-c):.1>Math.abs(a-b);return e}
function cf(a,c){var b=P,d=df(a),f=[],k,e,g,l,n,h,m,q,p;n=0;for(h=d.length;n<h;n++){e=d[n];k=[];k.length=e.length;m=p=0;for(q=e.length;m<q;m++)g=e[m],l=e[(m+1)%q],p+=g.x*l.y-g.y*l.x,k[m]=b.q(g.x,g.y);p=Math.abs(p/2);p>=.001*c&&f.push(k)}return f}
function df(a){var c=[],b=0,d=0,f=0,k=0,e=0,g=e=0,l=0,n=0,h=0,k=0,m,q,p,s,t,w=k=b=0,z=0,f=[],l=[],u=!1,A=[],C=[];for(C.push(a);C.length;){c=C[0];d=c.length;u=!0;for(b=0;b<d;b++)if(n=b,h=b<d-1?b+1:b+1-d,k=b<d-2?b+2:b+2-d,a=c[n],m=c[h],q=c[k],k=a.x,f=a.y,l=m.x,e=m.y,g=q.x,q=q.y,k=k*e+l*q+g*f-f*l-e*g-q*k,0>k){u=!1;l=1E9;for(f=0;f<d;f++)if(f!==n&&f!==h){b=f;k=f<d-1?f+1:0;p=c[b];s=c[k];g=a.x;q=a.y;var F=m.x,H=m.y,e=p.x;p=p.y;var E=s.x;s=s.y;var I=F-g,x=H-q,D=E-e,N=s-p,D=(D*(p-q)-N*(e-g))/(x*D-I*N),I=g+
D*I,x=q+D*x,g=bf(F,H,g,q,I,x),e=bf(I,x,e,p,E,s);if(q=g&&e?P.q(I,x):null)e=m.x-q.x,g=m.y-q.y,e=e*e+g*g,e<l&&(z=b,w=k,t=q,l=e)}if(1E9===l)return[];f=[];l=[];b=z;k=w;p=c[b];s=c[k];w=t.y;z=s.y;.1>Math.abs(s.x-t.x)&&.1>Math.abs(z-w)||f.push(t);w=t.y;z=p.y;.1>Math.abs(p.x-t.x)&&.1>Math.abs(z-w)||l.push(t);z=-1;for(w=n;;){if(w!==k)f.push(c[w]);else{if(0>z||z>=d)return[];bf(s.x,s.y,c[z].x,c[z].y,a.x,a.y)||f.push(c[w]);break}z=w;0>w-1?w=d-1:w--}f.reverse();z=-1;for(w=h;;){if(w!==b)l.push(c[w]);else{if(0>z||
z>=d)return[];w!==b||bf(p.x,p.y,c[z].x,c[z].y,m.x,m.y)||l.push(c[w]);break}z=w;w+1>d-1?w=0:w++}C.push(f,l);C.shift();break}u&&A.push(C.shift())}return A}
function ef(a){for(var c=0;4E3>c;c++)P.lh.push(new P(0,0));this.g=a;this.Zd=new xc(P.q(0,10),!0);this.Az=10;this.bt=-1;a=new vc;a.behavior=this;a.Zn=function(a){this.behavior.g.YE(a.Kb.Sa().tg.V,a.Eb.Sa().tg.V)};this.Zd.Hv(a);a=new wc;a.behavior=this;a.nj=function(a,c){if(this.behavior.yB)return!0;var f=a.Sa().tg.V.type,k=c.Sa().tg.V.type,e=f.Y.Physics_DisabledCollisions;return e&&e.contains(k)?!1:(e=k.Y.Physics_DisabledCollisions)&&e.contains(f)?!1:!0};this.Zd.Gv(a);this.sF=0;this.Vn=8;this.Bn=3;
this.yB=!0}
(function(){function a(){}function c(){}var b=P,d=U,f=zc,k=V,e=yc,g=Ac,l=Bc,n=ef.prototype;n.Tc=function(a){this.behavior=a;this.g=a.g};n.Tc.prototype.rb=function(){};n.kc=function(a,b){this.type=a;this.behavior=a.behavior;this.V=b;this.g=a.g;this.Zd=this.behavior.Zd};var h=n.kc.prototype;h.rb=function(){this.Ks=0!==this.Aa[0];this.pw=this.Aa[1];this.gu=0!==this.Aa[2];this.Qf=this.Aa[3];this.zg=this.Aa[4];this.Xg=this.Aa[5];this.Tj=this.Aa[6];this.qj=this.Aa[7];this.vj=0!==this.Aa[8];this.enabled=0!==
this.Aa[9];this.body=null;this.V.lb();this.Qm=this.V.x;this.Rm=this.V.y;this.Dg=this.V.G;this.$s=this.ct=0;this.Dy=this.zp=!1;this.Xs=null;this.Ys=-1;this.ze?(this.ze.length=0,this.xf.length=0,this.Eh.clear()):(this.ze=[],this.xf=[],this.Eh=new ca);var a=this;this.Ce||(this.rn=function(b){a.un(b)});this.g.so(this.rn)};h.yy=function(){this.V.lb();this.Xr();this.Xs=this.V.Cb;this.Ys=this.V.ca};h.jk=function(){this.Xo();this.xf.length=0;this.Eh.clear();this.body&&(this.Zd.eo(this.body),this.body=null);
this.g.Fy(this.rn)};h.Ee=function(){var a={e:this.enabled,im:this.Ks,pr:this.gu,d:this.Qf,fr:this.zg,re:this.Xg,ld:this.Tj,ad:this.qj,b:this.vj,mcj:this.xf};if(this.enabled){var c=b.q(0,0);c.D(this.body.hj());a.vx=c.x;a.vy=c.y;a.om=this.body.io()}return a};h.rf=function(a){this.Xo();this.xf.length=0;this.Eh.clear();this.body&&(this.Zd.eo(this.body),this.body=null);this.enabled=a.e;this.Ks=a.im;this.gu=a.pr;this.Qf=a.d;this.zg=a.fr;this.Xg=a.re;this.Tj=a.ld;this.qj=a.ad;this.vj=a.b;this.Qm=this.V.x;
this.Rm=this.V.y;this.Dg=this.V.G;this.ct=this.V.width;this.$s=this.V.height;this.enabled&&(this.Xr(),this.body.ki(b.q(a.vx,a.vy)),this.body.Bk(a.om),0===a.vx&&0===a.vy&&0===a.om||this.body.Gc(!0),this.xf=a.mcj)};h.Lf=function(){this.enabled&&this.lu();this.behavior.bt=this.g.$e-1};h.un=function(a){var b,c,d,e=a.uid;d=b=0;for(c=this.xf.length;b<c;b++)this.xf[d]=this.xf[b],d<this.ze.length&&(this.ze[d]=this.ze[b]),this.xf[b].$b[1]==e?this.Zd.fo(this.ze[b]):d++;this.xf.length=d;d<this.ze.length&&(this.ze.length=
d);this.Eh.remove(a)};h.Xo=function(){var a,b;a=0;for(b=this.ze.length;a<b;a++)this.Zd.fo(this.ze[a]);this.ze.length=0};h.lu=function(){var a,b,c;a=0;for(b=this.xf.length;a<b;a++)switch(c=this.xf[a],c.type){case 0:this.ZB(c.$b[0],c.$b[1],c.$b[2],c.$b[3],c.$b[4]);break;case 1:this.aC(c.$b[0],c.$b[1]);break;case 2:this.$B(c.$b[0],c.$b[1],c.$b[2],c.$b[3])}};h.VB=function(){this.body&&(this.Xo(),this.Zd.eo(this.body),this.body=null,this.V.Y.qe=null)};var m=[];h.Xr=function(){if(this.enabled){var a=this.V,
c=!1,g=null,h=null,l,n,u,A,C,F,H,E,I,x,D,N,Z;if(this.body){c=!0;g=b.q(0,0);g.D(this.body.hj());h=this.body.io();E=this.Eh.kg();l=0;for(n=E.length;l<n;l++)I=E[l].Y.qe.tg,I.Xo();this.VB()}I=new f;I.Qf=this.Qf;I.zg=this.zg;I.Xg=this.Xg;l=new d;l.type=this.Ks?0:2;a.lb();l.position.x=.02*a.ub.Qi();l.position.y=.02*a.ub.Ri();l.G=a.G;l.ms=this.gu;l.Tj=this.Tj;l.qj=this.qj;l.vj=this.vj;E=this.V.Ma&&!this.V.Ma.Pj();this.body=this.Zd.Wq(l);this.body.tg=this;l=this.pw;E||this.V.$h||0!==this.pw||(l=1);n=Math.max(Math.abs(a.width),
1);u=Math.max(Math.abs(a.height),1);x=0>a.width;D=0>a.height;if(0===l)if(a.$h)for(N=a.ub.Qi()-a.x,H=a.ub.Ri()-a.y,a.WG(m),E=[],l=0,n=m.length;l<n;++l){x=m[l];D=x.WE;if(x.Sg){if(!x.Sg.Mo){C=x.Sg.rc;A=x.Sg.Ze;for(u=0;u<A;++u)E.push(b.q(C[2*u],C[2*u+1]));u=x.id&3758096384;(-2147483648===u||1073741824===u||536870912===u||u&-2147483648&&u&1073741824&&u&536870912)&&E.reverse();x.Sg.Mo=cf(E,(D.right-D.left)*(D.bottom-D.top));u=0;for(A=E.length;u<A;++u)b.ic(E[u]);E.length=0}u=0;for(A=x.Sg.Mo.length;u<A;++u){Z=
x.Sg.Mo[u];C=0;for(F=Z.length;C<F;++C)E.push(b.q(.02*(D.left+Z[C].x-N),.02*(D.top+Z[C].y-H)));I.shape=new k;I.shape.$l(E,E.length);this.body.tk(I);C=0;for(F=E.length;C<F;++C)b.ic(E[C]);E.length=0}}else E.push(b.q(.02*(D.left-N),.02*(D.top-H))),E.push(b.q(.02*(D.right-N),.02*(D.top-H))),E.push(b.q(.02*(D.right-N),.02*(D.bottom-H))),E.push(b.q(.02*(D.left-N),.02*(D.bottom-H))),I.shape=new k,I.shape.$l(E,E.length),this.body.tk(I);u=0;for(A=E.length;u<A;++u)b.ic(E[u]);E.length=0}else{l=a.G;a.G=0;a.Gb();
a.lb();N=a.ub.Qi()-a.x;H=a.ub.Ri()-a.y;a.G=l;a.Gb();a.Ma.wj(x?-n:n,D?-u:u,0);C=a.Ma.rc;A=a.Ma.Ze;E=[];E.length=A;for(l=0;l<A;l++)E[l]=b.q(C[2*l]-N,C[2*l+1]-H);x!==D&&E.reverse();N=cf(E,n*u);for(l=0;l<A;l++)b.ic(E[l]);if(N.length)for(l=0,n=N.length;l<n;l++){E=N[l];u=0;for(A=E.length;u<A;u++)H=E[u],H.x*=.02,H.y*=.02;I.shape=new k;I.shape.$l(E,E.length);this.body.tk(I);u=0;for(A=E.length;u<A;u++)b.ic(E[u])}else I.shape=new k,I.shape.qo(.01*n,.01*u),this.body.tk(I)}else 1===l?(I.shape=new k,I.shape.qo(.01*
n,.01*u)):I.shape=new e(.01*Math.min(n,u)),this.body.tk(I);a.Y.qe=this.body;this.ct=a.width;this.$s=a.height;if(c)for(this.body.ki(g),this.body.Bk(h),b.ic(g),this.lu(),E=this.Eh.kg(),l=0,n=E.length;l<n;l++)I=E[l].Y.qe.tg,I.lu();m.length=0}};h.dd=function(){if(this.enabled){var a=this.V,c;0===this.behavior.sF?c=this.g.dj/60:(c=this.g.xs(this.V),c>1/30&&(c=1/30));this.g.$e>this.behavior.bt&&0<this.g.dj&&(this.Zd.kh(c,this.behavior.Vn,this.behavior.Bn),this.Zd.bv(),this.behavior.bt=this.g.$e);if(this.Dy||
a.width!==this.ct||a.height!==this.$s||a.Cb!==this.Xs||a.ca!==this.Ys||a.$h&&a.ty)this.Xr(),this.Dy=!1,this.Xs=a.Cb,this.Ys=a.ca,a.$h&&a.ty&&(a.ty=!1);c=a.G!==this.Dg;if(a.x!==this.Qm||a.y!==this.Rm){a.lb();var d=a.ub.Qi(),e=a.ub.Ri(),f=d-this.Qm,g=e-this.Rm;this.body.xr(b.q(.02*d,.02*e));this.body.ki(b.q(f,g));this.zp=!0;this.body.Gc(!0)}else this.zp&&(this.zp=!1,this.body.ki(b.q(0,0)),this.body.xr(b.q(.02*a.ub.Qi(),.02*a.ub.Ri())));c&&(this.body.po(a.G),this.body.Gc(!0));d=this.body.A.position;
c=d.x/.02;d=d.y/.02;e=this.body.Kd();if(c!==a.x||d!==a.y||e!==a.G)if(a.x=c,a.y=d,a.G=e,a.Gb(),a.lb(),c=a.ub.Qi()-a.x,d=a.ub.Ri()-a.y,0!==c||0!==d)a.x-=c,a.y-=d,a.Gb();this.Qm=a.x;this.Rm=a.y;this.Dg=a.G}};h.ym=function(a){return-1!==a&&this.V.Ag?0===a&&this.body?(this.body.A.position.x+this.body.ij().x)/.02:this.V.Ag(a,!0):this.V.x};h.zm=function(a){return-1!==a&&this.V.Ag?0===a&&this.body?(this.body.A.position.y+this.body.ij().y)/.02:this.V.Ag(a,!1):this.V.y};a.prototype.lA=function(){return this.enabled?
!this.body.gd():!1};a.prototype.er=function(){return this.enabled};n.N=new a;c.prototype.Ff=function(a,c,d){if(this.enabled){var e=this.ym(d);d=this.zm(d);this.body.Ff(b.q(a,c),b.q(.02*e,.02*d))}};c.prototype.Jz=function(a,c,d){if(this.enabled){c=v(c);var e=this.ym(d);d=this.zm(d);this.body.Ff(b.q(Math.cos(c)*a,Math.sin(c)*a),b.q(.02*e,.02*d))}};c.prototype.Yn=function(a){this.enabled&&this.body.Yn(v(a))};c.prototype.Bk=function(a){this.enabled&&(this.body.Bk(v(a)),this.body.Gc(!0))};h.ZB=function(a,
c,d,e,f){if(this.enabled&&(c=this.g.Bi(c))&&c!=this.V&&c.Y.qe){c.Y.qe.tg.Eh.add(this.V);var k=this.ym(a);a=this.zm(a);var h;c.Ag?(h=c.Ag(d,!0),d=c.Ag(d,!1)):(h=c.x,d=c.y);var l=k-h,m=a-d,n=new g;n.jc(this.body,c.Y.qe,b.q(.02*k,.02*a),b.q(.02*h,.02*d));n.length=.02*Math.sqrt(l*l+m*m);n.Uo=e;n.jp=f;this.ze.push(this.Zd.co(n))}};h.aC=function(a,c){if(this.enabled){var d=this.g.Bi(c);if(d&&d!=this.V&&d.Y.qe){d.Y.qe.tg.Eh.add(this.V);var e=this.ym(a),f=this.zm(a),g=new l;g.jc(this.body,d.Y.qe,b.q(.02*
e,.02*f));this.ze.push(this.Zd.co(g))}}};h.$B=function(a,c,d,e){if(this.enabled&&(c=this.g.Bi(c))&&c!=this.V&&c.Y.qe){c.Y.qe.tg.Eh.add(this.V);var f=this.ym(a);a=this.zm(a);var g=new l;g.jc(this.body,c.Y.qe,b.q(.02*f,.02*a));g.Dj=!0;g.qt=v(d);g.Qu=v(e);this.ze.push(this.Zd.co(g))}};c.prototype.TA=function(a){if(a!==this.behavior.Az){this.Zd.Iv(b.q(0,a));this.behavior.Az=a;var c,d=this.behavior.aq.kg();a=0;for(c=d.length;a<c;a++)d[a].Y.qe&&d[a].Y.qe.Gc(!0)}};c.prototype.SA=function(a,c){this.enabled&&
(this.body.ki(b.q(.02*a,.02*c)),this.body.Gc(!0),this.zp=!1,this.Qm=this.V.x,this.Rm=this.V.y)};n.Qa=new c;n.lc=new function(){}})();function ff(a){this.g=a}
(function(){function a(){}var c=ff.prototype;c.Tc=function(a){this.behavior=a;this.g=a.g};c.Tc.prototype.rb=function(){};c.kc=function(a,b){this.type=a;this.behavior=a.behavior;this.V=b;this.g=a.g};var b=c.kc.prototype;b.rb=function(){this.Pc=null;this.hq=-1;this.mode=this.Dg=this.Hq=this.rl=this.Th=this.An=0;var a=this;this.Ce||(this.rn=function(b){a.un(b)});this.g.so(this.rn)};b.Ee=function(){return{uid:this.Pc?this.Pc.uid:-1,pa:this.An,pd:this.Th,msa:this.rl,tsa:this.Hq,lka:this.Dg,m:this.mode}};
b.rf=function(a){this.hq=a.uid;this.An=a.pa;this.Th=a.pd;this.rl=a.msa;this.Hq=a.tsa;this.Dg=a.lka;this.mode=a.m};b.Lf=function(){this.Pc=-1===this.hq?null:this.g.Bi(this.hq);this.hq=-1};b.un=function(a){this.Pc==a&&(this.Pc=null)};b.jk=function(){this.Pc=null;this.g.Fy(this.rn)};b.dd=function(){};b.Jq=function(){if(this.Pc){this.Dg!==this.V.G&&(this.rl=Ia(this.rl+(this.V.G-this.Dg)));var a=this.V.x,b=this.V.y;if(3===this.mode||4===this.mode){var c=Ra(this.V.x,this.V.y,this.Pc.x,this.Pc.y);if(c>this.Th||
4===this.mode&&c<this.Th)b=La(this.Pc.x,this.Pc.y,this.V.x,this.V.y),a=this.Pc.x+Math.cos(b)*this.Th,b=this.Pc.y+Math.sin(b)*this.Th}else a=this.Pc.x+Math.cos(this.Pc.G+this.An)*this.Th,b=this.Pc.y+Math.sin(this.Pc.G+this.An)*this.Th;this.Dg=c=Ia(this.rl+(this.Pc.G-this.Hq));0!==this.mode&&1!==this.mode&&3!==this.mode&&4!==this.mode||this.V.x===a&&this.V.y===b||(this.V.x=a,this.V.y=b,this.V.Gb());0!==this.mode&&2!==this.mode||this.V.G===c||(this.V.G=c,this.V.Gb())}};c.N=new function(){};a.prototype.HA=
function(a,b){if(a){var c=a.Kw(this.V);c&&(this.Pc=c,this.An=La(c.x,c.y,this.V.x,this.V.y)-c.G,this.Th=Ra(c.x,c.y,this.V.x,this.V.y),this.Dg=this.rl=this.V.G,this.Hq=c.G,this.mode=b)}};a.prototype.cB=function(){this.Pc=null};c.Qa=new a;c.lc=new function(){}})();function gf(a){this.g=a}
(function(){function a(){}var c=gf.prototype;c.Tc=function(a){this.behavior=a;this.g=a.g};c.Tc.prototype.rb=function(){};c.kc=function(a,b){this.type=a;this.behavior=a.behavior;this.V=b;this.g=a.g};var b=c.kc.prototype;b.rb=function(){this.V.Y.solidEnabled=0!==this.Aa[0]};b.dd=function(){};a.prototype.er=function(){return this.V.Y.solidEnabled};c.N=new a;c.Qa=new function(){}})();
function lc(){return[nc,oc,pc,qc,mc,rc,gf,ef,ff,y.prototype.N.uv,ef.prototype.Qa.TA,ff.prototype.Qa.HA,mc.prototype.N.xA,mc.prototype.Qa.Jd,y.prototype.Qa.Fz,mc.prototype.N.tv,y.prototype.N.nA,y.prototype.Qa.eB,y.prototype.Qa.Vz,y.prototype.N.Yz,y.prototype.N.Rz,pc.prototype.Qa.PA,rc.prototype.N.rr,pc.prototype.N.nv,y.prototype.Qa.OA,nc.prototype.Qa.Play,ef.prototype.N.lA,mc.prototype.Qa.UA,mc.prototype.lc.em,mc.prototype.Qa.VA,mc.prototype.lc.fm,mc.prototype.Qa.Mv,pc.prototype.Qa.Mv,pc.prototype.Qa.Iz,
y.prototype.Qa.fA,y.prototype.Qa.LA,y.prototype.N.kA,y.prototype.N.Zz,mc.prototype.Qa.QA,oc.prototype.lc.em,oc.prototype.lc.fm,rc.prototype.N.gA,rc.prototype.lc.em,rc.prototype.lc.fm,rc.prototype.N.or,oc.prototype.N.yv,mc.prototype.N.nv,ef.prototype.Qa.Jz,mc.prototype.lc.fB,mc.prototype.lc.Gz,ff.prototype.Qa.cB,mc.prototype.Qa.Nv,ef.prototype.Qa.SA,ef.prototype.Qa.Bk,oc.prototype.N.iA,y.prototype.N.Qz,y.prototype.Qa.RA]};
