28
PairOrNotPair/appmanifest.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "PairOrNotPair-Demo",
|
||||
"short_name": "PairOrNotPair-Demo",
|
||||
"start_url": "index.html",
|
||||
"display": "fullscreen",
|
||||
"orientation": "any",
|
||||
"icons": [{
|
||||
"src": "icon-16.png",
|
||||
"sizes": "16x16",
|
||||
"type": "image/png"
|
||||
}, {
|
||||
"src": "icon-32.png",
|
||||
"sizes": "32x32",
|
||||
"type": "image/png"
|
||||
}, {
|
||||
"src": "icon-128.png",
|
||||
"sizes": "128x128",
|
||||
"type": "image/png"
|
||||
}, {
|
||||
"src": "icon-256.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png"
|
||||
}, {
|
||||
"src": "icon-256.png",
|
||||
"sizes": "256x256",
|
||||
"type": "image/png"
|
||||
}]
|
||||
}
|
||||
BIN
PairOrNotPair/bg.mp4
Normal file
455
PairOrNotPair/c2runtime.js
Normal file
@@ -0,0 +1,455 @@
|
||||
// Generated by Construct 2, the HTML5 game and app creator :: https://www.construct.net
|
||||
'use strict';var aa,ba,ea,B,fa,ia,ka,I,la,ma,na,oa,pa,qa,sa,ta,ua,va,xa,za,Aa,L,Ba,Ca,Da,Ea,Fa,V,Ga,Ia,Ja,Ka,La,Na,Oa,Pa,Qa,Ra,Sa,Ta,Ua,Xa,Ya,Za,$a,ab,bb,cb,db,eb,fb,gb,hb,ib,lb,mb,nb,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,yb,zb,Ab,Fb,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,ec,fc,gc,hc,ic={};"function"!==typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"===typeof"test".__proto__?function(f){return f.__proto__}:function(f){return f.constructor.prototype});
|
||||
(function(){function f(a,b,g,d){this.set(a,b,g,d)}function p(){this.Qc=this.Pc=this.Sc=this.Rc=this.gd=this.fd=this.Jc=this.Ic=0}function h(a,b,g,d){a<b?g<d?(v=a<g?a:g,P=b>d?b:d):(v=a<d?a:d,P=b>g?b:g):g<d?(v=b<g?b:g,P=a>d?a:d):(v=b<d?b:d,P=a>g?a:g)}function l(){this.items=this.Td=null;this.Xh=0;ga&&(this.Td=new Set);this.jh=[];this.Oe=!0}function c(a){Q[C++]=a}function q(){this.U=this.Ik=this.y=this.ll=0}function e(a){this.Wg=[];this.uo=this.wo=this.xo=this.vo=0;this.Fi(a)}function b(a,b){this.rl=
|
||||
a;this.ql=b;this.cells={}}function w(a,b){this.rl=a;this.ql=b;this.cells={}}function d(a,b,g){var d;return x.length?(d=x.pop(),d.Xl=a,d.x=b,d.y=g,d):new aa(a,b,g)}function a(a,b,g){this.Xl=a;this.x=b;this.y=g;this.wb=new ba}function g(a,b,g){var d;return z.length?(d=z.pop(),d.Xl=a,d.x=b,d.y=g,d):new ea(a,b,g)}function n(a,b,g){this.Xl=a;this.x=b;this.y=g;this.wb=[];this.Cg=!0;this.Qd=new ba;this.nh=!1}function k(a,b){return a.Cd-b.Cd}B=function(a){window.console&&window.console.log&&window.console.log(a)};
|
||||
fa=function(a){window.console&&window.console.error&&window.console.error(a)};ia=function(a){return"undefined"===typeof a};ka=function(a){return"number"===typeof a};I=function(a){return"string"===typeof a};la=function(a){return 0<a&&0===(a-1&a)};ma=function(a){--a;for(var b=1;32>b;b<<=1)a=a|a>>b;return a+1};na=function(a){return 0>a?-a:a};oa=function(a,b){return a<b?a:b};pa=Math.PI;qa=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,g,d,k,u,c,m){var e,
|
||||
n,w,t;a<g?(n=a,e=g):(n=g,e=a);k<c?(t=k,w=c):(t=c,w=k);if(e<t||n>w)return!1;b<d?(n=b,e=d):(n=d,e=b);u<m?(t=u,w=m):(t=m,w=u);if(e<t||n>w)return!1;e=k-a+c-g;n=u-b+m-d;a=g-a;b=d-b;k=c-k;u=m-u;m=na(b*k-u*a);return na(k*n-u*e)>m?!1:na(a*n-b*e)<=m};f.prototype.set=function(a,b,g,d){this.left=a;this.top=b;this.right=g;this.bottom=d};f.prototype.uh=function(a){this.left=a.left;this.top=a.top;this.right=a.right;this.bottom=a.bottom};f.prototype.width=function(){return this.right-this.left};f.prototype.height=
|
||||
function(){return this.bottom-this.top};f.prototype.offset=function(a,b){this.left+=a;this.top+=b;this.right+=a;this.bottom+=b;return this};f.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)};f.prototype.Uc=function(a,b){return a>=this.left&&a<=this.right&&b>=this.top&&b<=this.bottom};f.prototype.zh=function(a){return this.left===a.left&&this.top===a.top&&this.right===
|
||||
a.right&&this.bottom===a.bottom};ua=f;p.prototype.Dk=function(a){this.Ic=a.left;this.Jc=a.top;this.fd=a.right;this.gd=a.top;this.Rc=a.right;this.Sc=a.bottom;this.Pc=a.left;this.Qc=a.bottom};p.prototype.Wq=function(a,b){if(0===b)this.Dk(a);else{var g=Math.sin(b),d=Math.cos(b),k=a.left*g,u=a.top*g,c=a.right*g,g=a.bottom*g,m=a.left*d,e=a.top*d,n=a.right*d,d=a.bottom*d;this.Ic=m-u;this.Jc=e+k;this.fd=n-u;this.gd=e+c;this.Rc=n-g;this.Sc=d+c;this.Pc=m-g;this.Qc=d+k}};p.prototype.offset=function(a,b){this.Ic+=
|
||||
a;this.Jc+=b;this.fd+=a;this.gd+=b;this.Rc+=a;this.Sc+=b;this.Pc+=a;this.Qc+=b;return this};var v=0,P=0;p.prototype.zo=function(a){h(this.Ic,this.fd,this.Rc,this.Pc);a.left=v;a.right=P;h(this.Jc,this.gd,this.Sc,this.Qc);a.top=v;a.bottom=P};p.prototype.Uc=function(a,b){var g=this.Ic,d=this.Jc,k=this.fd-g,u=this.gd-d,c=this.Rc-g,m=this.Sc-d,e=a-g,n=b-d,w=k*k+u*u,t=k*c+u*m,u=k*e+u*n,v=c*c+m*m,r=c*e+m*n,f=1/(w*v-t*t),k=(v*u-t*r)*f,w=(w*r-t*u)*f;if(0<=k&&0<w&&1>k+w)return!0;k=this.Pc-g;u=this.Qc-d;w=k*
|
||||
k+u*u;t=k*c+u*m;u=k*e+u*n;f=1/(w*v-t*t);k=(v*u-t*r)*f;w=(w*r-t*u)*f;return 0<=k&&0<w&&1>k+w};va=p;xa=function(a,b){for(var g in b)b.hasOwnProperty(g)&&(a[g]=b[g]);return a};za=function(a,b){var g,d;b=qa(b);if(!(0>b||b>=a.length)){g=b;for(d=a.length-1;g<d;g++)a[g]=a[g+1];Aa(a,d)}};Aa=function(a,b){a.length=b};L=function(a){Aa(a,0)};Ba=function(a,b){L(a);var g,d;g=0;for(d=b.length;g<d;++g)a[g]=b[g]};Ca=function(a,b){a.push.apply(a,b)};Da=function(a,b){var g,d;g=0;for(d=a.length;g<d;++g)if(a[g]===b)return g;
|
||||
return-1};Ea=function(a,b){var g=Da(a,b);-1!==g&&za(a,g)};Fa=function(a,b,g){return a<b?b:a>g?g:a};V=function(a){return a/(180/pa)};Ga=function(a){return 180/pa*a};Ia=function(a){a%=360;0>a&&(a+=360);return a};Ja=function(a){a%=2*pa;0>a&&(a+=2*pa);return a};Ka=function(a){return Ia(Ga(a))};La=function(a){return Ja(V(a))};Na=function(a,b,g,d){return Math.atan2(d-b,g-a)};Oa=function(a,b){if(a===b)return 0;var g=Math.sin(a),d=Math.cos(a),k=Math.sin(b),u=Math.cos(b),g=g*k+d*u;return 1<=g?0:-1>=g?pa:Math.acos(g)};
|
||||
Pa=function(a,b,g){var d=Math.sin(a),k=Math.cos(a),u=Math.sin(b),c=Math.cos(b);return Math.acos(d*u+k*c)>g?0<k*u-d*c?Ja(a+g):Ja(a-g):Ja(b)};Qa=function(a,b){var g=Math.sin(a),d=Math.cos(a),k=Math.sin(b),u=Math.cos(b);return 0>=d*k-g*u};Ra=function(a,b,g,d,k,u){if(0===g)return u?a:b;var c=Math.sin(g);g=Math.cos(g);a-=d;b-=k;var m=a*c;a=a*g-b*c;b=b*g+m;return u?a+d:b+k};Sa=function(a,b,g,d){a=g-a;b=d-b;return Math.sqrt(a*a+b*b)};Ta=function(a,b){return!a!==!b};Ua=function(a){for(var b in a)if(a.hasOwnProperty(b))return!0;
|
||||
return!1};Xa=function(a){for(var b in a)a.hasOwnProperty(b)&&delete a[b]};var r=+new Date;Ya=function(){if("undefined"!==typeof window.performance){var a=window.performance;if("undefined"!==typeof a.now)return a.now();if("undefined"!==typeof a.webkitNow)return a.webkitNow();if("undefined"!==typeof a.mozNow)return a.mozNow();if("undefined"!==typeof a.msNow)return a.msNow()}return Date.now()-r};var m=!1,t=m=!1,da=!1;"undefined"!==typeof window&&(m=/chrome/i.test(navigator.userAgent)||/chromium/i.test(navigator.userAgent),
|
||||
m=!m&&/safari/i.test(navigator.userAgent),t=/(iphone|ipod|ipad)/i.test(navigator.userAgent),da=window.c2ejecta);var ga=!m&&!da&&!t&&"undefined"!==typeof Set&&"undefined"!==typeof Set.prototype.forEach;l.prototype.contains=function(a){return this.oe()?!1:ga?this.Td.has(a):this.items&&this.items.hasOwnProperty(a)};l.prototype.add=function(a){if(ga)this.Td.has(a)||(this.Td.add(a),this.Oe=!1);else{var b=a.toString(),g=this.items;g?g.hasOwnProperty(b)||(g[b]=a,this.Xh++,this.Oe=!1):(this.items={},this.items[b]=
|
||||
a,this.Xh=1,this.Oe=!1)}};l.prototype.remove=function(a){if(!this.oe())if(ga)this.Td.has(a)&&(this.Td["delete"](a),this.Oe=!1);else if(this.items){a=a.toString();var b=this.items;b.hasOwnProperty(a)&&(delete b[a],this.Xh--,this.Oe=!1)}};l.prototype.clear=function(){this.oe()||(ga?this.Td.clear():(this.items=null,this.Xh=0),L(this.jh),this.Oe=!0)};l.prototype.oe=function(){return 0===this.count()};l.prototype.count=function(){return ga?this.Td.size:this.Xh};var Q=null,C=0;l.prototype.dx=function(){if(!this.Oe){if(ga)L(this.jh),
|
||||
Q=this.jh,C=0,this.Td.forEach(c),Q=null,C=0;else{var a=this.jh;L(a);var b,g=0,d=this.items;if(d)for(b in d)d.hasOwnProperty(b)&&(a[g++]=d[b])}this.Oe=!0}};l.prototype.sf=function(){this.dx();return this.jh};ba=l;new ba;Za=function(a,b){ga?$a(a,b.Td):ab(a,b.sf())};$a=function(a,b){var g,d,k,u;d=g=0;for(k=a.length;g<k;++g)u=a[g],b.has(u)||(a[d++]=u);Aa(a,d)};ab=function(a,b){var g,d,k,u;d=g=0;for(k=a.length;g<k;++g)u=a[g],-1===Da(b,u)&&(a[d++]=u);Aa(a,d)};q.prototype.add=function(a){this.y=a-this.ll;
|
||||
this.Ik=this.U+this.y;this.ll=this.Ik-this.U-this.y;this.U=this.Ik};q.prototype.reset=function(){this.U=this.Ik=this.y=this.ll=0};bb=q;cb=function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")};e.prototype.Fi=function(a){this.Fq=a;this.rk=a.length/2;this.Wg.length=a.length;this.ml=this.nl=-1;this.Co=0};e.prototype.Pv=function(){return!this.Fq.length};e.prototype.Ga=function(){for(var a=this.Wg,b=a[0],g=b,d=a[1],k=d,u,c,m=1,e=this.rk;m<e;++m)c=2*m,u=a[c],c=a[c+1],u<b&&(b=u),u>g&&(g=u),c<d&&
|
||||
(d=c),c>k&&(k=c);this.vo=b;this.wo=g;this.xo=d;this.uo=k};e.prototype.Dk=function(a,b,g){this.Wg.length=8;this.rk=4;var d=this.Wg;d[0]=a.left-b;d[1]=a.top-g;d[2]=a.right-b;d[3]=a.top-g;d[4]=a.right-b;d[5]=a.bottom-g;d[6]=a.left-b;d[7]=a.bottom-g;this.nl=a.right-a.left;this.ml=a.bottom-a.top;this.Ga()};e.prototype.yt=function(a,b,g){if(this.nl!==a||this.ml!==b||this.Co!==g){this.nl=a;this.ml=b;this.Co=g;var d,k,u,c,m,e=0,n=1,w=this.Fq,t=this.Wg;0!==g&&(e=Math.sin(g),n=Math.cos(g));g=0;for(u=this.rk;g<
|
||||
u;g++)d=2*g,k=d+1,c=w[d]*a,m=w[k]*b,t[d]=c*n-m*e,t[k]=m*n+c*e;this.Ga()}};e.prototype.Uc=function(a,b){var g=this.Wg;if(a===g[0]&&b===g[1])return!0;var d,k,u,c=this.rk,m=this.vo-110,e=this.xo-101,n=this.wo+131,w=this.uo+120,t,v,r=0,f=0;for(d=0;d<c;d++)k=2*d,u=(d+1)%c*2,t=g[k],k=g[k+1],v=g[u],u=g[u+1],ta(m,e,a,b,t,k,v,u)&&r++,ta(n,w,a,b,t,k,v,u)&&f++;return 1===r%2||1===f%2};db=e;b.prototype.We=function(a,b,g){var k;k=this.cells[a];return k?(k=k[b])?k:g?(k=d(this,a,b),this.cells[a][b]=k):null:g?(k=
|
||||
d(this,a,b),this.cells[a]={},this.cells[a][b]=k):null};b.prototype.Yb=function(a){return qa(a/this.rl)};b.prototype.Zb=function(a){return qa(a/this.ql)};b.prototype.update=function(a,b,g){var d,k,u,c,m;if(b)for(d=b.left,k=b.right;d<=k;++d)for(u=b.top,c=b.bottom;u<=c;++u)if(!g||!g.Uc(d,u))if(m=this.We(d,u,!1))m.remove(a),m.oe()&&(m.wb.clear(),1E3>x.length&&x.push(m),this.cells[d][u]=null);if(g)for(d=g.left,k=g.right;d<=k;++d)for(u=g.top,c=g.bottom;u<=c;++u)b&&b.Uc(d,u)||this.We(d,u,!0).em(a)};b.prototype.Hq=
|
||||
function(a,b){var g,d,k,u,c,m;g=this.Yb(a.left);k=this.Zb(a.top);d=this.Yb(a.right);for(c=this.Zb(a.bottom);g<=d;++g)for(u=k;u<=c;++u)(m=this.We(g,u,!1))&&m.dump(b)};eb=b;w.prototype.We=function(a,b,d){var k;k=this.cells[a];return k?(k=k[b])?k:d?(k=g(this,a,b),this.cells[a][b]=k):null:d?(k=g(this,a,b),this.cells[a]={},this.cells[a][b]=k):null};w.prototype.Yb=function(a){return qa(a/this.rl)};w.prototype.Zb=function(a){return qa(a/this.ql)};w.prototype.update=function(a,b,g){var d,k,u,c,m;if(b)for(d=
|
||||
b.left,k=b.right;d<=k;++d)for(u=b.top,c=b.bottom;u<=c;++u)if(!g||!g.Uc(d,u))if(m=this.We(d,u,!1))m.remove(a),m.oe()&&(m.reset(),1E3>z.length&&z.push(m),this.cells[d][u]=null);if(g)for(d=g.left,k=g.right;d<=k;++d)for(u=g.top,c=g.bottom;u<=c;++u)b&&b.Uc(d,u)||this.We(d,u,!0).em(a)};w.prototype.Hq=function(a,b,g,d,k){var u,c;a=this.Yb(a);b=this.Zb(b);g=this.Yb(g);for(u=this.Zb(d);a<=g;++a)for(d=b;d<=u;++d)(c=this.We(a,d,!1))&&c.dump(k)};w.prototype.Xv=function(a){var b,g,d,k,u;b=a.left;d=a.top;g=a.right;
|
||||
for(k=a.bottom;b<=g;++b)for(a=d;a<=k;++a)if(u=this.We(b,a,!1))u.Cg=!1};fb=w;var x=[];a.prototype.oe=function(){return this.wb.oe()};a.prototype.em=function(a){this.wb.add(a)};a.prototype.remove=function(a){this.wb.remove(a)};a.prototype.dump=function(a){Ca(a,this.wb.sf())};aa=a;var z=[];n.prototype.oe=function(){if(!this.wb.length)return!0;if(this.wb.length>this.Qd.count())return!1;this.Il();return!0};n.prototype.em=function(a){this.Qd.contains(a)?(this.Qd.remove(a),this.Qd.oe()&&(this.nh=!1)):this.wb.length?
|
||||
(this.wb[this.wb.length-1].Kd()>a.Kd()&&(this.Cg=!1),this.wb.push(a)):(this.wb.push(a),this.Cg=!0)};n.prototype.remove=function(a){this.Qd.add(a);this.nh=!0;30<=this.Qd.count()&&this.Il()};n.prototype.Il=function(){this.nh&&(this.Qd.count()===this.wb.length?this.reset():(Za(this.wb,this.Qd),this.Qd.clear(),this.nh=!1))};n.prototype.mu=function(){this.Cg||(this.wb.sort(k),this.Cg=!0)};n.prototype.reset=function(){L(this.wb);this.Cg=!0;this.Qd.clear();this.nh=!1};n.prototype.dump=function(a){this.Il();
|
||||
this.mu();this.wb.length&&a.push(this.wb)};ea=n;var H="lighter xor copy destination-over source-in destination-in source-out destination-out source-atop destination-atop".split(" ");gb=function(a){return 0>=a||11<=a?"source-over":H[a-1]};hb=function(a,b,g){if(g)switch(a.Qb=g.ONE,a.Mb=g.ONE_MINUS_SRC_ALPHA,b){case 1:a.Qb=g.ONE;a.Mb=g.ONE;break;case 3:a.Qb=g.ONE;a.Mb=g.ZERO;break;case 4:a.Qb=g.ONE_MINUS_DST_ALPHA;a.Mb=g.ONE;break;case 5:a.Qb=g.DST_ALPHA;a.Mb=g.ZERO;break;case 6:a.Qb=g.ZERO;a.Mb=g.SRC_ALPHA;
|
||||
break;case 7:a.Qb=g.ONE_MINUS_DST_ALPHA;a.Mb=g.ZERO;break;case 8:a.Qb=g.ZERO;a.Mb=g.ONE_MINUS_SRC_ALPHA;break;case 9:a.Qb=g.DST_ALPHA;a.Mb=g.ONE_MINUS_SRC_ALPHA;break;case 10:a.Qb=g.ONE_MINUS_DST_ALPHA,a.Mb=g.SRC_ALPHA}};ib=function(a){return Math.round(1E6*a)/1E6};lb=function(a,b){return"string"!==typeof a||"string"!==typeof b||a.length!==b.length?!1:a===b?!0:a.toLowerCase()===b.toLowerCase()};mb=function(a){a=a.target;return!a||a===document||a===window||document&&document.body&&a===document.body||
|
||||
lb(a.tagName,"canvas")?!0:!1}})();var jc="undefined"!==typeof Float32Array?Float32Array:Array;function kc(f){var p=new jc(3);f&&(p[0]=f[0],p[1]=f[1],p[2]=f[2]);return p}function lc(f){var p=new jc(16);f&&(p[0]=f[0],p[1]=f[1],p[2]=f[2],p[3]=f[3],p[4]=f[4],p[5]=f[5],p[6]=f[6],p[7]=f[7],p[8]=f[8],p[9]=f[9],p[10]=f[10],p[11]=f[11],p[12]=f[12],p[13]=f[13],p[14]=f[14],p[15]=f[15]);return p}
|
||||
function mc(f,p){p[0]=f[0];p[1]=f[1];p[2]=f[2];p[3]=f[3];p[4]=f[4];p[5]=f[5];p[6]=f[6];p[7]=f[7];p[8]=f[8];p[9]=f[9];p[10]=f[10];p[11]=f[11];p[12]=f[12];p[13]=f[13];p[14]=f[14];p[15]=f[15]}function nc(f,p){var h=p[0],l=p[1];p=p[2];f[0]*=h;f[1]*=h;f[2]*=h;f[3]*=h;f[4]*=l;f[5]*=l;f[6]*=l;f[7]*=l;f[8]*=p;f[9]*=p;f[10]*=p;f[11]*=p}
|
||||
function oc(f,p,h,l){l||(l=lc());var c,q,e,b,w,d,a,g,n=f[0],k=f[1];f=f[2];q=h[0];e=h[1];c=h[2];h=p[1];d=p[2];n===p[0]&&k===h&&f===d?(f=l,f[0]=1,f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[5]=1,f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[10]=1,f[11]=0,f[12]=0,f[13]=0,f[14]=0,f[15]=1):(h=n-p[0],d=k-p[1],a=f-p[2],g=1/Math.sqrt(h*h+d*d+a*a),h*=g,d*=g,a*=g,p=e*a-c*d,c=c*h-q*a,q=q*d-e*h,(g=Math.sqrt(p*p+c*c+q*q))?(g=1/g,p*=g,c*=g,q*=g):q=c=p=0,e=d*q-a*c,b=a*p-h*q,w=h*c-d*p,(g=Math.sqrt(e*e+b*b+w*w))?(g=1/g,e*=g,b*=g,w*=g):w=b=e=0,
|
||||
l[0]=p,l[1]=e,l[2]=h,l[3]=0,l[4]=c,l[5]=b,l[6]=d,l[7]=0,l[8]=q,l[9]=w,l[10]=a,l[11]=0,l[12]=-(p*n+c*k+q*f),l[13]=-(e*n+b*k+w*f),l[14]=-(h*n+d*k+a*f),l[15]=1)}
|
||||
(function(){function f(b,c,d){this.pe=/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent);this.height=this.width=0;this.Ia=!!d;this.Hj=this.Oh=!1;this.yl=0;this.Yk=1;this.Nn=1E3;this.nx=(this.Nn-this.Yk)/32768;this.ol=kc([0,0,100]);this.Dp=kc([0,0,0]);this.yr=kc([0,1,0]);this.Si=kc([1,1,1]);this.No=!0;this.ak=lc();this.Fc=lc();this.tm=lc();this.xl=lc();this.F=b;this.version=0===this.F.getParameter(this.F.VERSION).indexOf("WebGL 2")?2:1;this.ip()}function p(b,c,d){this.F=b;this.Gi=
|
||||
c;this.name=d;this.Zc=b.getAttribLocation(c,"aPos");this.hf=b.getAttribLocation(c,"aTex");this.Bp=b.getUniformLocation(c,"matP");this.Xj=b.getUniformLocation(c,"matMV");this.Jg=b.getUniformLocation(c,"opacity");this.Am=b.getUniformLocation(c,"colorFill");this.Cp=b.getUniformLocation(c,"samplerFront");this.ei=b.getUniformLocation(c,"samplerBack");this.Rf=b.getUniformLocation(c,"destStart");this.Qf=b.getUniformLocation(c,"destEnd");this.gi=b.getUniformLocation(c,"seconds");this.Cm=b.getUniformLocation(c,
|
||||
"pixelWidth");this.Bm=b.getUniformLocation(c,"pixelHeight");this.di=b.getUniformLocation(c,"layerScale");this.ci=b.getUniformLocation(c,"layerAngle");this.hi=b.getUniformLocation(c,"viewOrigin");this.fi=b.getUniformLocation(c,"scrollPos");this.Bv=!!(this.Cm||this.Bm||this.gi||this.ei||this.Rf||this.Qf||this.di||this.ci||this.hi||this.fi);this.Lp=this.Mp=-999;this.$j=1;this.Hp=this.Gp=0;this.Jp=this.Fp=this.Ep=1;this.Pp=this.Op=this.Np=this.Rp=this.Qp=this.Ip=0;this.rm=[];this.Kp=lc();this.Jg&&b.uniform1f(this.Jg,
|
||||
1);this.Am&&b.uniform4f(this.Am,1,1,1,1);this.Cp&&b.uniform1i(this.Cp,0);this.ei&&b.uniform1i(this.ei,1);this.Rf&&b.uniform2f(this.Rf,0,0);this.Qf&&b.uniform2f(this.Qf,1,1);this.di&&b.uniform1f(this.di,1);this.ci&&b.uniform1f(this.ci,0);this.hi&&b.uniform2f(this.hi,0,0);this.fi&&b.uniform2f(this.fi,0,0);this.gi&&b.uniform1f(this.gi,0);this.Hf=!1}function h(b,c){return b[0]===c[0]&&b[1]===c[1]&&b[2]===c[2]&&b[3]===c[3]&&b[4]===c[4]&&b[5]===c[5]&&b[6]===c[6]&&b[7]===c[7]&&b[8]===c[8]&&b[9]===c[9]&&
|
||||
b[10]===c[10]&&b[11]===c[11]&&b[12]===c[12]&&b[13]===c[13]&&b[14]===c[14]&&b[15]===c[15]}function l(b,c){this.type=b;this.G=c;this.F=c.F;this.Ld=this.Wb=this.qq=0;this.Y=this.ed=null;this.Xq=[]}var c=lc();f.prototype.ip=function(){var b=this.F,c;this.wp=1;this.Nf=this.df=null;this.gj=1;b.clearColor(0,0,0,0);b.clear(b.COLOR_BUFFER_BIT);b.enable(b.BLEND);b.blendFunc(b.ONE,b.ONE_MINUS_SRC_ALPHA);b.disable(b.CULL_FACE);b.disable(b.STENCIL_TEST);b.disable(b.DITHER);this.Ia?(b.enable(b.DEPTH_TEST),b.depthFunc(b.LEQUAL)):
|
||||
b.disable(b.DEPTH_TEST);this.xp=b.ONE;this.vp=b.ONE_MINUS_SRC_ALPHA;this.Wk=new Float32Array(8E3*(this.Ia?3:2));this.Kk=new Float32Array(16E3);this.Aq=new Float32Array(32E3);this.Tm=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,this.Tm);b.bufferData(b.ARRAY_BUFFER,this.Aq.byteLength,b.DYNAMIC_DRAW);this.Qi=Array(4);this.Li=Array(4);for(c=0;4>c;c++)this.Qi[c]=b.createBuffer(),b.bindBuffer(b.ARRAY_BUFFER,this.Qi[c]),b.bufferData(b.ARRAY_BUFFER,this.Wk.byteLength,b.DYNAMIC_DRAW),this.Li[c]=b.createBuffer(),
|
||||
b.bindBuffer(b.ARRAY_BUFFER,this.Li[c]),b.bufferData(b.ARRAY_BUFFER,this.Kk.byteLength,b.DYNAMIC_DRAW);this.fe=0;this.Ev=b.createBuffer();b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.Ev);for(var d=new Uint16Array(12E3),a=c=0;12E3>c;)d[c++]=a,d[c++]=a+1,d[c++]=a+2,d[c++]=a,d[c++]=a+2,d[c++]=a+3,a+=4;b.bufferData(b.ELEMENT_ARRAY_BUFFER,d,b.STATIC_DRAW);this.Um=this.dh=this.Fe=0;this.Va=[];c=this.Ia?"attribute highp vec3 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, aPos.z, 1.0);\n\tvTex = aTex;\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}";d=this.vh({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}"},c,"<default>");this.Va.push(d);d=this.vh({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.Va.push(d);d=this.vh({src:"varying mediump vec2 vTex;\nuniform lowp sampler2D samplerFront;\nvoid main(void) {\n\tif (texture2D(samplerFront, vTex).a < 1.0)\n\t\tdiscard;\n}"},c,"<earlyz>");this.Va.push(d);d=this.vh({src:"uniform lowp vec4 colorFill;\nvoid main(void) {\n\tgl_FragColor = colorFill;\n}"},
|
||||
c,"<fill>");this.Va.push(d);for(var g in pc)pc.hasOwnProperty(g)&&this.Va.push(this.vh(pc[g],c,g));b.activeTexture(b.TEXTURE0);b.bindTexture(b.TEXTURE_2D,null);this.Ne=[];this.ee=0;this.Nb=!1;this.Jo=this.Zh=-1;this.pg=null;this.Gl=b.createFramebuffer();this.lj=this.tk=null;this.to=!1;this.Ia&&(this.lj=b.createRenderbuffer());this.pf=kc([0,0,0]);this.Sp=b.getParameter(b.ALIASED_POINT_SIZE_RANGE)[1];2048<this.Sp&&(this.Sp=2048);this.ic(0)};p.prototype.Cn=function(b){h(this.Kp,b)||(mc(b,this.Kp),this.F.uniformMatrix4fv(this.Xj,
|
||||
!1,b))};f.prototype.vh=function(b,c,d){var a=this.F,g=a.createShader(a.FRAGMENT_SHADER);a.shaderSource(g,b.src);a.compileShader(g);if(!a.getShaderParameter(g,a.COMPILE_STATUS))throw b=a.getShaderInfoLog(g),a.deleteShader(g),Error("error compiling fragment shader: "+b);var e=a.createShader(a.VERTEX_SHADER);a.shaderSource(e,c);a.compileShader(e);if(!a.getShaderParameter(e,a.COMPILE_STATUS))throw b=a.getShaderInfoLog(e),a.deleteShader(g),a.deleteShader(e),Error("error compiling vertex shader: "+b);c=
|
||||
a.createProgram();a.attachShader(c,g);a.attachShader(c,e);a.linkProgram(c);if(!a.getProgramParameter(c,a.LINK_STATUS))throw b=a.getProgramInfoLog(c),a.deleteShader(g),a.deleteShader(e),a.deleteProgram(c),Error("error linking shader program: "+b);a.useProgram(c);a.deleteShader(g);a.deleteShader(e);g=new p(a,c,d);g.El=b.El||0;g.Fl=b.Fl||0;g.Io=!!b.Io;g.xd=!!b.xd;g.po=!!b.po;g.aa=b.aa||[];b=0;for(e=g.aa.length;b<e;b++)g.aa[b][1]=a.getUniformLocation(c,g.aa[b][0]),g.rm.push(0),a.uniform1f(g.aa[b][1],
|
||||
0);return g};f.prototype.Vl=function(b){var c,d;c=0;for(d=this.Va.length;c<d;c++)if(this.Va[c].name===b)return c;return-1};f.prototype.Eq=function(b,c,d){var a=this.Fc,g=this.ak,e=[0,0,0,0,0,0,0,0];e[0]=a[0]*b+a[4]*c+a[12];e[1]=a[1]*b+a[5]*c+a[13];e[2]=a[2]*b+a[6]*c+a[14];e[3]=a[3]*b+a[7]*c+a[15];e[4]=g[0]*e[0]+g[4]*e[1]+g[8]*e[2]+g[12]*e[3];e[5]=g[1]*e[0]+g[5]*e[1]+g[9]*e[2]+g[13]*e[3];e[6]=g[2]*e[0]+g[6]*e[1]+g[10]*e[2]+g[14]*e[3];e[7]=-e[2];0!==e[7]&&(e[7]=1/e[7],e[4]*=e[7],e[5]*=e[7],e[6]*=e[7],
|
||||
d[0]=(.5*e[4]+.5)*this.width,d[1]=(.5*e[5]+.5)*this.height)};f.prototype.Zf=function(b,c,d){if(this.width!==b||this.height!==c||d){this.Ue();d=this.F;this.width=b;this.height=c;d.viewport(0,0,b,c);oc(this.ol,this.Dp,this.yr,this.Fc);if(this.Ia){var a=-b/2;b=b/2;var g=c/2;c=-c/2;var e=this.Yk,k=this.Nn,v=this.ak;v||(v=lc());var f=b-a,r=c-g,m=k-e;v[0]=2/f;v[1]=0;v[2]=0;v[3]=0;v[4]=0;v[5]=2/r;v[6]=0;v[7]=0;v[8]=0;v[9]=0;v[10]=-2/m;v[11]=0;v[12]=-(a+b)/f;v[13]=-(c+g)/r;v[14]=-(k+e)/m;v[15]=1;this.Si[0]=
|
||||
1;this.Si[1]=1}else c=b/c,a=this.Yk,b=this.Nn,v=this.ak,k=a*Math.tan(45*Math.PI/360),c*=k,g=-c,e=-k,v||(v=lc()),f=c-g,r=k-e,m=b-a,v[0]=2*a/f,v[1]=0,v[2]=0,v[3]=0,v[4]=0,v[5]=2*a/r,v[6]=0,v[7]=0,v[8]=(c+g)/f,v[9]=(k+e)/r,v[10]=-(b+a)/m,v[11]=-1,v[12]=0,v[13]=0,v[14]=-(b*a*2)/m,v[15]=0,a=[0,0],b=[0,0],this.Eq(0,0,a),this.Eq(1,1,b),this.Si[0]=1/(b[0]-a[0]),this.Si[1]=-1/(b[1]-a[1]);a=0;for(b=this.Va.length;a<b;a++)g=this.Va[a],g.Hf=!1,g.Bp&&(d.useProgram(g.Gi),d.uniformMatrix4fv(g.Bp,!1,this.ak));d.useProgram(this.Va[this.Zh].Gi);
|
||||
d.bindTexture(d.TEXTURE_2D,null);d.activeTexture(d.TEXTURE1);d.bindTexture(d.TEXTURE_2D,null);d.activeTexture(d.TEXTURE0);this.Nf=this.df=null;this.lj&&(d.bindFramebuffer(d.FRAMEBUFFER,this.Gl),d.bindRenderbuffer(d.RENDERBUFFER,this.lj),d.renderbufferStorage(d.RENDERBUFFER,d.DEPTH_COMPONENT16,this.width,this.height),this.to||(d.framebufferRenderbuffer(d.FRAMEBUFFER,d.DEPTH_ATTACHMENT,d.RENDERBUFFER,this.lj),this.to=!0),d.bindRenderbuffer(d.RENDERBUFFER,null),d.bindFramebuffer(d.FRAMEBUFFER,null),
|
||||
this.tk=null)}};f.prototype.ad=function(){oc(this.ol,this.Dp,this.yr,this.Fc);nc(this.Fc,this.Si)};f.prototype.translate=function(b,c){if(0!==b||0!==c){this.pf[0]=b;this.pf[1]=c;this.pf[2]=0;var d=this.Fc,a=this.pf,g=a[0],e=a[1],a=a[2];d[12]=d[0]*g+d[4]*e+d[8]*a+d[12];d[13]=d[1]*g+d[5]*e+d[9]*a+d[13];d[14]=d[2]*g+d[6]*e+d[10]*a+d[14];d[15]=d[3]*g+d[7]*e+d[11]*a+d[15]}};f.prototype.scale=function(b,c){if(1!==b||1!==c)this.pf[0]=b,this.pf[1]=c,this.pf[2]=1,nc(this.Fc,this.pf)};f.prototype.wk=function(b){if(0!==
|
||||
b){var c=this.Fc,d,a=Math.sin(b);b=Math.cos(b);var g=c[0],e=c[1],k=c[2],v=c[3],f=c[4],r=c[5],m=c[6],t=c[7];d?c!==d&&(d[8]=c[8],d[9]=c[9],d[10]=c[10],d[11]=c[11],d[12]=c[12],d[13]=c[13],d[14]=c[14],d[15]=c[15]):d=c;d[0]=g*b+f*a;d[1]=e*b+r*a;d[2]=k*b+m*a;d[3]=v*b+t*a;d[4]=g*-a+f*b;d[5]=e*-a+r*b;d[6]=k*-a+m*b;d[7]=v*-a+t*b}};f.prototype.Mc=function(){if(!h(this.tm,this.Fc)){var b=this.wc();b.type=5;b.Y?mc(this.Fc,b.Y):b.Y=lc(this.Fc);mc(this.Fc,this.tm);this.Nb=!1}};f.prototype.Ak=function(b){this.Ia&&
|
||||
(32760<b&&(b=32760),this.yl=this.ol[2]-this.Yk-b*this.nx)};l.prototype.Vt=function(){var b=this.F,c=this.G;0!==this.Wb?(b.depthMask(!0),b.colorMask(!1,!1,!1,!1),b.disable(b.BLEND),b.bindFramebuffer(b.FRAMEBUFFER,c.Gl),b.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,null,0),b.clear(b.DEPTH_BUFFER_BIT),b.bindFramebuffer(b.FRAMEBUFFER,null),c.Hj=!0):(b.depthMask(!1),b.colorMask(!0,!0,!0,!0),b.enable(b.BLEND),c.Hj=!1)};l.prototype.Zt=function(){this.F.bindTexture(this.F.TEXTURE_2D,
|
||||
this.ed)};l.prototype.$t=function(){var b=this.F;b.activeTexture(b.TEXTURE1);b.bindTexture(b.TEXTURE_2D,this.ed);b.activeTexture(b.TEXTURE0)};l.prototype.Wt=function(){var b=this.qq,c=this.G;c.gj=b;c=c.pg;c.Jg&&c.$j!==b&&(c.$j=b,this.F.uniform1f(c.Jg,b))};l.prototype.Qt=function(){this.F.drawElements(this.F.TRIANGLES,this.Ld,this.F.UNSIGNED_SHORT,this.Wb)};l.prototype.St=function(){this.F.blendFunc(this.Wb,this.Ld)};l.prototype.bu=function(){var b,c,d,a=this.G.Va,g=this.G.Jo;b=0;for(c=a.length;b<
|
||||
c;b++)d=a[b],b===g&&d.Xj?(d.Cn(this.Y),d.Hf=!0):d.Hf=!1;mc(this.Y,this.G.xl)};l.prototype.Rt=function(){var b=this.F,c=this.G;this.ed?(c.Nf===this.ed&&(b.activeTexture(b.TEXTURE1),b.bindTexture(b.TEXTURE_2D,null),c.Nf=null,b.activeTexture(b.TEXTURE0)),b.bindFramebuffer(b.FRAMEBUFFER,c.Gl),c.Hj||b.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,this.ed,0)):(c.Ia||b.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,null,0),b.bindFramebuffer(b.FRAMEBUFFER,null))};
|
||||
l.prototype.Mt=function(){var b=this.F,c=this.Wb;0===c?(b.clearColor(this.Y[0],this.Y[1],this.Y[2],this.Y[3]),b.clear(b.COLOR_BUFFER_BIT)):1===c?(b.enable(b.SCISSOR_TEST),b.scissor(this.Y[0],this.Y[1],this.Y[2],this.Y[3]),b.clearColor(0,0,0,0),b.clear(b.COLOR_BUFFER_BIT),b.disable(b.SCISSOR_TEST)):b.clear(b.DEPTH_BUFFER_BIT)};l.prototype.Ut=function(){var b=this.F;0!==this.Wb?b.enable(b.DEPTH_TEST):b.disable(b.DEPTH_TEST)};l.prototype.Pt=function(){var b=this.F,c=this.G;c.Ia&&b.disable(b.DEPTH_TEST);
|
||||
var d=c.Va[1];b.useProgram(d.Gi);!d.Hf&&d.Xj&&(d.Cn(c.xl),d.Hf=!0);b.enableVertexAttribArray(d.Zc);b.bindBuffer(b.ARRAY_BUFFER,c.Tm);b.vertexAttribPointer(d.Zc,4,b.FLOAT,!1,0,0);b.drawArrays(b.POINTS,this.Wb/4,this.Ld);d=c.pg;b.useProgram(d.Gi);0<=d.Zc&&(b.enableVertexAttribArray(d.Zc),b.bindBuffer(b.ARRAY_BUFFER,c.Qi[c.fe]),b.vertexAttribPointer(d.Zc,c.Ia?3:2,b.FLOAT,!1,0,0));0<=d.hf&&(b.enableVertexAttribArray(d.hf),b.bindBuffer(b.ARRAY_BUFFER,c.Li[c.fe]),b.vertexAttribPointer(d.hf,2,b.FLOAT,!1,
|
||||
0,0));c.Ia&&b.enable(b.DEPTH_TEST)};l.prototype.Xt=function(){var b=this.F,c=this.G,d=c.Va[this.Wb];c.Jo=this.Wb;c.pg=d;b.useProgram(d.Gi);!d.Hf&&d.Xj&&(d.Cn(c.xl),d.Hf=!0);d.Jg&&d.$j!==c.gj&&(d.$j=c.gj,b.uniform1f(d.Jg,c.gj));0<=d.Zc&&(b.enableVertexAttribArray(d.Zc),b.bindBuffer(b.ARRAY_BUFFER,c.Qi[c.fe]),b.vertexAttribPointer(d.Zc,c.Ia?3:2,b.FLOAT,!1,0,0));0<=d.hf&&(b.enableVertexAttribArray(d.hf),b.bindBuffer(b.ARRAY_BUFFER,c.Li[c.fe]),b.vertexAttribPointer(d.hf,2,b.FLOAT,!1,0,0))};l.prototype.Tt=
|
||||
function(){var b=this.Y;this.F.uniform4f(this.G.pg.Am,b[0],b[1],b[2],b[3])};l.prototype.Yt=function(){var b,c,d=this.G.pg,a=this.F;b=this.Y;d.ei&&this.G.Nf!==this.ed&&(a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,this.ed),this.G.Nf=this.ed,a.activeTexture(a.TEXTURE0));var g=b[0];d.Cm&&g!==d.Mp&&(d.Mp=g,a.uniform1f(d.Cm,g));g=b[1];d.Bm&&g!==d.Lp&&(d.Lp=g,a.uniform1f(d.Bm,g));g=b[2];c=b[3];!d.Rf||g===d.Gp&&c===d.Hp||(d.Gp=g,d.Hp=c,a.uniform2f(d.Rf,g,c));g=b[4];c=b[5];!d.Qf||g===d.Ep&&c===
|
||||
d.Fp||(d.Ep=g,d.Fp=c,a.uniform2f(d.Qf,g,c));g=b[6];d.di&&g!==d.Jp&&(d.Jp=g,a.uniform1f(d.di,g));g=b[7];d.ci&&g!==d.Ip&&(d.Ip=g,a.uniform1f(d.ci,g));g=b[8];c=b[9];!d.hi||g===d.Qp&&c===d.Rp||(d.Qp=g,d.Rp=c,a.uniform2f(d.hi,g,c));g=b[10];c=b[11];!d.fi||g===d.Np&&c===d.Op||(d.Np=g,d.Op=c,a.uniform2f(d.fi,g,c));g=b[12];d.gi&&g!==d.Pp&&(d.Pp=g,a.uniform1f(d.gi,g));if(d.aa.length)for(b=0,c=d.aa.length;b<c;b++)g=this.Xq[b],g!==d.rm[b]&&(d.rm[b]=g,a.uniform1f(d.aa[b][1],g))};f.prototype.wc=function(){this.ee===
|
||||
this.Ne.length&&this.Ne.push(new l(0,this));return this.Ne[this.ee++]};f.prototype.Ue=function(){if(0!==this.ee&&!this.F.isContextLost()){var b=this.F;0<this.Um&&(b.bindBuffer(b.ARRAY_BUFFER,this.Tm),b.bufferSubData(b.ARRAY_BUFFER,0,this.Aq.subarray(0,this.Um)),c&&0<=c.Zc&&"<point>"===c.name&&b.vertexAttribPointer(c.Zc,4,b.FLOAT,!1,0,0));if(0<this.Fe){var c=this.pg;b.bindBuffer(b.ARRAY_BUFFER,this.Qi[this.fe]);b.bufferSubData(b.ARRAY_BUFFER,0,this.Wk.subarray(0,this.Fe));c&&0<=c.Zc&&"<point>"!==c.name&&
|
||||
b.vertexAttribPointer(c.Zc,this.Ia?3:2,b.FLOAT,!1,0,0);b.bindBuffer(b.ARRAY_BUFFER,this.Li[this.fe]);b.bufferSubData(b.ARRAY_BUFFER,0,this.Kk.subarray(0,this.dh));c&&0<=c.hf&&"<point>"!==c.name&&b.vertexAttribPointer(c.hf,2,b.FLOAT,!1,0,0)}for(var d,b=0,c=this.ee;b<c;b++)switch(d=this.Ne[b],d.type){case 1:d.Qt();break;case 2:d.Zt();break;case 3:d.Wt();break;case 4:d.St();break;case 5:d.bu();break;case 6:d.Rt();break;case 7:d.Mt();break;case 8:d.Pt();break;case 9:d.Xt();break;case 10:d.Yt();break;
|
||||
case 11:d.$t();break;case 12:d.Tt();break;case 13:d.Ut();break;case 14:d.Vt()}this.Um=this.dh=this.Fe=this.ee=0;this.Hj=this.Nb=!1;this.fe++;4<=this.fe&&(this.fe=0)}};f.prototype.$g=function(b){if(b!==this.wp&&!this.Oh){var c=this.wc();c.type=3;this.wp=c.qq=b;this.Nb=!1}};f.prototype.Hc=function(b){if(b!==this.df){var c=this.wc();c.type=2;this.df=c.ed=b;this.Nb=!1}};f.prototype.nf=function(b,c){if((b!==this.xp||c!==this.vp)&&!this.Oh){var d=this.wc();d.type=4;d.Wb=b;d.Ld=c;this.xp=b;this.vp=c;this.Nb=
|
||||
!1}};f.prototype.Pq=function(){this.nf(this.F.ONE,this.F.ONE_MINUS_SRC_ALPHA)};f.prototype.Ai=function(b,c,d,a,g,e,k,v){15992<=this.Fe&&this.Ue();var f=this.Fe,r=this.dh,m=this.Wk,t=this.Kk,p=this.yl;if(this.Nb)this.Ne[this.ee-1].Ld+=6;else{var h=this.wc();h.type=1;h.Wb=this.Ia?f:f/2*3;h.Ld=6;this.Nb=!0}this.Ia?(m[f++]=b,m[f++]=c,m[f++]=p,m[f++]=d,m[f++]=a,m[f++]=p,m[f++]=g,m[f++]=e,m[f++]=p,m[f++]=k,m[f++]=v,m[f++]=p):(m[f++]=b,m[f++]=c,m[f++]=d,m[f++]=a,m[f++]=g,m[f++]=e,m[f++]=k,m[f++]=v);t[r++]=
|
||||
0;t[r++]=0;t[r++]=1;t[r++]=0;t[r++]=1;t[r++]=1;t[r++]=0;t[r++]=1;this.Fe=f;this.dh=r};f.prototype.lf=function(b,c,d,a,g,e,k,f,p){15992<=this.Fe&&this.Ue();var r=this.Fe,m=this.dh,t=this.Wk,h=this.Kk,q=this.yl;if(this.Nb)this.Ne[this.ee-1].Ld+=6;else{var l=this.wc();l.type=1;l.Wb=this.Ia?r:r/2*3;l.Ld=6;this.Nb=!0}var l=p.left,C=p.top,x=p.right;p=p.bottom;this.Ia?(t[r++]=b,t[r++]=c,t[r++]=q,t[r++]=d,t[r++]=a,t[r++]=q,t[r++]=g,t[r++]=e,t[r++]=q,t[r++]=k,t[r++]=f,t[r++]=q):(t[r++]=b,t[r++]=c,t[r++]=d,
|
||||
t[r++]=a,t[r++]=g,t[r++]=e,t[r++]=k,t[r++]=f);h[m++]=l;h[m++]=C;h[m++]=x;h[m++]=C;h[m++]=x;h[m++]=p;h[m++]=l;h[m++]=p;this.Fe=r;this.dh=m};f.prototype.ic=function(b){if(this.Zh!==b){if(!this.Va[b]){if(0===this.Zh)return;b=0}var c=this.wc();c.type=9;this.Zh=c.Wb=b;this.Nb=!1}};f.prototype.xi=function(b){b=this.Va[b];return!(!b.Rf&&!b.Qf)};f.prototype.Wm=function(b){b=this.Va[b];return!!(b.Rf||b.Qf||b.Io)};f.prototype.Vm=function(b){return this.Va[b].xd};f.prototype.vw=function(b){b=this.Va[b];return 0!==
|
||||
b.El||0!==b.Fl};f.prototype.hv=function(b){return this.Va[b].El};f.prototype.jv=function(b){return this.Va[b].Fl};f.prototype.kv=function(b,c){return this.Va[b].aa[c][2]};f.prototype.qk=function(b){return this.Va[b].po};f.prototype.ah=function(b,c,d,a,g,e,k,f,p,r,m,t,h,q,l){var C=this.Va[this.Zh],x,z;if(C.Bv||l.length){x=this.wc();x.type=10;x.Y?mc(this.Fc,x.Y):x.Y=lc();z=x.Y;z[0]=c;z[1]=d;z[2]=a;z[3]=g;z[4]=e;z[5]=k;z[6]=f;z[7]=p;z[8]=r;z[9]=m;z[10]=t;z[11]=h;z[12]=q;C.ei?x.ed=b:x.ed=null;if(l.length)for(d=
|
||||
x.Xq,d.length=l.length,b=0,c=l.length;b<c;b++)d[b]=l[b];this.Nb=!1}};f.prototype.clear=function(b,c,d,a){var g=this.wc();g.type=7;g.Wb=0;g.Y||(g.Y=lc());g.Y[0]=b;g.Y[1]=c;g.Y[2]=d;g.Y[3]=a;this.Nb=!1};f.prototype.clearRect=function(b,c,d,a){if(!(0>d||0>a)){var g=this.wc();g.type=7;g.Wb=1;g.Y||(g.Y=lc());g.Y[0]=b;g.Y[1]=c;g.Y[2]=d;g.Y[3]=a;this.Nb=!1}};f.prototype.Sq=function(b){if(this.Ia&&(b=!!b,this.Oh!==b)){var c=this.wc();c.type=14;c.Wb=b?1:0;this.Nb=!1;this.Oh=b;this.tk=null;this.Oh?this.ic(2):
|
||||
this.ic(0)}};f.prototype.Rq=function(b){if(this.Ia){var c=this.wc();c.type=13;c.Wb=b?1:0;this.Nb=!1}};f.prototype.Vo=function(){mc(this.tm,c);this.ad();this.Mc();var b=this.width/2,e=this.height/2;this.Ai(-b,e,b,e,b,-e,-b,-e);mc(c,this.Fc);this.Mc()};f.prototype.Qq=function(b,c,d){this.ic(3);var a=this.wc();a.type=12;a.Y||(a.Y=lc());a.Y[0]=b;a.Y[1]=c;a.Y[2]=d;a.Y[3]=1;this.Nb=!1};f.prototype.Qw=function(){this.ic(0)};f.prototype.Dw=function(){this.ic(2)};f.prototype.uw=function(){this.Ue();this.F.flush()};
|
||||
var q=[],e={};f.prototype.Dt=function(){L(q);e={}};f.prototype.zm=function(b,c,d){var a;a=!1;c=!!c;var g=b.src+","+a+","+c+(a?",undefined":""),n=null;if("undefined"!==typeof b.src&&e.hasOwnProperty(g))return n=e[g],n.bj++,n;this.Ue();var k=this.F,f=la(b.width)&&la(b.height),n=k.createTexture();k.bindTexture(k.TEXTURE_2D,n);k.pixelStorei(k.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);var p=k.RGBA,r=k.RGBA,m=k.UNSIGNED_BYTE;if(d&&!this.pe)switch(d){case 1:r=p=k.RGB;break;case 2:m=k.UNSIGNED_SHORT_4_4_4_4;break;
|
||||
case 3:m=k.UNSIGNED_SHORT_5_5_5_1;break;case 4:r=p=k.RGB,m=k.UNSIGNED_SHORT_5_6_5}if(1===this.version&&!f&&a){d=document.createElement("canvas");d.width=ma(b.width);d.height=ma(b.height);var t=d.getContext("2d");"undefined"!==typeof t.imageSmoothingEnabled?t.imageSmoothingEnabled=c:(t.webkitImageSmoothingEnabled=c,t.mozImageSmoothingEnabled=c,t.msImageSmoothingEnabled=c);t.drawImage(b,0,0,b.width,b.height,0,0,d.width,d.height);k.texImage2D(k.TEXTURE_2D,0,p,r,m,d)}else k.texImage2D(k.TEXTURE_2D,0,
|
||||
p,r,m,b);a?(k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_S,k.REPEAT),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_T,k.REPEAT)):(k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_S,k.CLAMP_TO_EDGE),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_T,k.CLAMP_TO_EDGE));c?(k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MAG_FILTER,k.LINEAR),(f||2<=this.version)&&this.No?(k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MIN_FILTER,k.LINEAR_MIPMAP_LINEAR),k.generateMipmap(k.TEXTURE_2D)):k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MIN_FILTER,
|
||||
k.LINEAR)):(k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MAG_FILTER,k.NEAREST),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_MIN_FILTER,k.NEAREST));k.bindTexture(k.TEXTURE_2D,null);this.df=null;n.yf=b.width;n.xf=b.height;n.bj=1;n.Bo=g;q.push(n);return e[g]=n};f.prototype.zc=function(b,c,d,a){this.Ue();var g=this.F;this.pe&&(a=!1);var e=g.createTexture();g.bindTexture(g.TEXTURE_2D,e);g.texImage2D(g.TEXTURE_2D,0,g.RGBA,b,c,0,g.RGBA,a?g.UNSIGNED_SHORT_4_4_4_4:g.UNSIGNED_BYTE,null);g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_S,
|
||||
g.CLAMP_TO_EDGE);g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_T,g.CLAMP_TO_EDGE);g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MAG_FILTER,d?g.LINEAR:g.NEAREST);g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,d?g.LINEAR:g.NEAREST);g.bindTexture(g.TEXTURE_2D,null);this.df=null;e.yf=b;e.xf=c;q.push(e);return e};f.prototype.kx=function(b,c,d){this.Ue();var a=this.F;this.pe&&(d=!1);a.bindTexture(a.TEXTURE_2D,c);a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);try{a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,
|
||||
d?a.UNSIGNED_SHORT_4_4_4_4:a.UNSIGNED_BYTE,b)}catch(g){console&&console.error&&console.error("Error updating WebGL texture: ",g)}a.bindTexture(a.TEXTURE_2D,null);this.df=null};f.prototype.deleteTexture=function(b){b&&("undefined"!==typeof b.bj&&1<b.bj?b.bj--:(this.Ue(),b===this.df&&(this.F.bindTexture(this.F.TEXTURE_2D,null),this.df=null),b===this.Nf&&(this.F.activeTexture(this.F.TEXTURE1),this.F.bindTexture(this.F.TEXTURE_2D,null),this.F.activeTexture(this.F.TEXTURE0),this.Nf=null),Ea(q,b),"undefined"!==
|
||||
typeof b.Bo&&delete e[b.Bo],this.F.deleteTexture(b)))};f.prototype.bd=function(b){if(b!==this.tk){var c=this.wc();c.type=6;this.tk=c.ed=b;this.Nb=!1}};nb=f})();
|
||||
(function(){function f(a){if(a&&(a.getContext||a.dc)&&!a.c2runtime){a.c2runtime=this;var b=this;this.Dc=(this.Ij=/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.Ob=!!a.dc;this.np="undefined"!==typeof window.AppMobi||
|
||||
this.Ob;this.Yc=!!window.c2cocoonjs;this.td=!!window.c2ejecta;this.Yc&&(CocoonJS.App.onSuspended.addEventListener(function(){b.setSuspended(!0)}),CocoonJS.App.onActivated.addEventListener(function(){b.setSuspended(!1)}));this.td&&(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.lb=this.Ob||this.Yc||this.td;this.Qh=
|
||||
/edge\//i.test(navigator.userAgent);this.pe=(/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent)||/iemobile/i.test(navigator.userAgent))&&!this.Qh;this.qp=/tizen/i.test(navigator.userAgent);this.Nh=/android/i.test(navigator.userAgent)&&!this.qp&&!this.pe&&!this.Qh;this.up=(/iphone/i.test(navigator.userAgent)||/ipod/i.test(navigator.userAgent))&&!this.pe&&!this.Qh;this.Rv=/ipad/i.test(navigator.userAgent);this.Eg=this.up||this.Rv||this.td;this.hm=(/chrome/i.test(navigator.userAgent)||
|
||||
/chromium/i.test(navigator.userAgent))&&!this.pe&&!this.Qh;this.mp=/amazonwebappplatform/i.test(navigator.userAgent);this.Iv=/firefox/i.test(navigator.userAgent);this.Lv=/safari/i.test(navigator.userAgent)&&!this.hm&&!this.pe&&!this.Qh;this.Mv=/windows/i.test(navigator.userAgent);this.km="undefined"!==typeof window.c2nodewebkit||"undefined"!==typeof window.c2nwjs||/nodewebkit/i.test(navigator.userAgent)||/nwjs/i.test(navigator.userAgent);this.sp=!("undefined"===typeof window.c2isWindows8||!window.c2isWindows8);
|
||||
this.Ov=!("undefined"===typeof window.c2isWindows8Capable||!window.c2isWindows8Capable);this.Sh=!("undefined"===typeof window.c2isWindowsPhone8||!window.c2isWindowsPhone8);this.om=!("undefined"===typeof window.c2isWindowsPhone81||!window.c2isWindowsPhone81);this.Lj=!!window.cr_windows10;this.rp=this.sp||this.Ov||this.om||this.Lj;this.Hv=!("undefined"===typeof window.c2isBlackberry10||!window.c2isBlackberry10);this.Gj=this.Nh&&!this.hm&&!this.Ij&&!this.Iv&&!this.mp&&!this.lb;this.devicePixelRatio=
|
||||
1;this.$e=this.Dc||this.Ij||this.np||this.Yc||this.Nh||this.Eg||this.Sh||this.om||this.Hv||this.qp||this.td;this.$e||(this.$e=/(blackberry|bb10|playbook|palm|symbian|nokia|windows\s+ce|phone|mobile|tablet|kindle|silk)/i.test(navigator.userAgent));this.Kj=!!(this.Eg&&this.Dc&&window.webkit);"undefined"===typeof cr_is_preview||this.km||"?nw"!==window.location.search&&!/nodewebkit/i.test(navigator.userAgent)&&!/nwjs/i.test(navigator.userAgent)||(this.km=!0);this.canvas=a;this.Do=document.getElementById("c2canvasdiv");
|
||||
this.G=this.F=null;this.Wl="(unavailable)";this.Ia=!1;this.Df=0;this.Ra=null;this.vj=!1;this.hq=this.iq=0;this.canvas.oncontextmenu=function(a){a.preventDefault&&a.preventDefault();return!1};this.canvas.onselectstart=function(a){a.preventDefault&&a.preventDefault();return!1};this.canvas.ontouchstart=function(a){a.preventDefault&&a.preventDefault();return!1};this.Ob&&(window.c2runtime=this);this.km&&(window.ondragover=function(a){a.preventDefault();return!1},window.ondrop=function(a){a.preventDefault();
|
||||
return!1},window.nwgui&&window.nwgui.App.clearCache&&window.nwgui.App.clearCache());this.Gj&&"undefined"!==typeof jQuery&&jQuery("canvas").parents("*").css("overflow","visible");this.width=a.width;this.height=a.height;this.L=this.width;this.K=this.height;this.fj=this.width;this.xh=this.height;this.Hg=window.innerWidth;this.Gg=window.innerHeight;this.V=!0;this.Rh=!1;Date.now||(Date.now=function(){return+new Date});this.plugins=[];this.types={};this.D=[];this.Qa=[];this.xm={};this.vd=[];this.Dl={};
|
||||
this.ke=[];this.lh=[];this.Qk=[];this.el=[];this.mt=[];this.Af={};this.jm=this.Ye=!1;this.ud=0;this.im=this.mm=!1;this.Gd=[];this.Ph=!1;this.Tj=this.ln="";this.ob=null;this.re="";this.Ji=this.$q=!1;this.uj=[];this.Cf=this.Bf=0;this.Vp=30;this.wl=this.ii=0;this.eh=1;this.Bb=new bb;this.Ge=new bb;this.dk=this.yj=this.pj=this.Wd=this.Pf=this.Kl=this.Oj=0;this.qh=null;this.mj=[];this.Cl=[];this.oj=-1;this.Dm=[[]];this.xn=this.Yj=0;this.Ym(null);this.Ch=this.bq=this.li=0;this.Ki=[];this.un=this.Zm=-1;
|
||||
this.Wh=!0;this.Wj=0;this.Jj=!1;this.Sw=0;this.lg=null;this.qe=this.ep=!1;this.gq=new ba;this.Jm=new ba;this.Km=new ba;this.Jq=[];new db([]);new db([]);this.kg=[];this.Dj={};this.Pe={};this.Le={};this.kh={};this.yo={};this.Ap=this.Sj=this.eb=this.nb=this.zp=this.Rj=this.Ba=null;this.ih=this.pm=!1;this.Ll=[null,null];this.vg=0;this.Hl="";this.ue={};this.Hi=this.ff=null;this.cr="";this.ck=[];this.Cw()}}function p(a,b){return 128>=b?a[3]:256>=b?a[2]:512>=b?a[1]:a[0]}function h(){try{return!!window.indexedDB}catch(a){return!1}}
|
||||
function l(a){a.target.result.createObjectStore("saves",{keyPath:"slot"})}function c(a,b,g,c){try{var d=indexedDB.open("_C2SaveStates");d.onupgradeneeded=l;d.onerror=c;d.onsuccess=function(d){d=d.target.result;d.onerror=c;d.transaction(["saves"],"readwrite").objectStore("saves").put({slot:a,data:b}).onsuccess=g}}catch(k){c(k)}}function q(a,b,g){try{var c=indexedDB.open("_C2SaveStates");c.onupgradeneeded=l;c.onerror=g;c.onsuccess=function(c){c=c.target.result;c.onerror=g;var d=c.transaction(["saves"]).objectStore("saves").get(a);
|
||||
d.onsuccess=function(){d.result?b(d.result.data):b(null)}}}catch(d){g(d)}}function e(){B("Reloading for continuous preview");window.c2cocoonjs?CocoonJS.App.reload():-1<window.location.search.indexOf("continuous")?window.location.reload(!0):window.location=window.location+"?continuous"}function b(a){var b,g={};for(b in a)!a.hasOwnProperty(b)||a[b]instanceof ba||a[b]&&"undefined"!==typeof a[b].Qy||"spriteCreatedDestroyCallback"!==b&&(g[b]=a[b]);return g}var w=window.requestAnimationFrame||window.mozRequestAnimationFrame||
|
||||
window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame;f.prototype.Cw=function(){var a=this;if(this.Kj)this.Ru(function(b){a.bi(JSON.parse(b))},function(){alert("Error fetching data.js")});else{var b;this.Sh?b=new ActiveXObject("Microsoft.XMLHTTP"):b=new XMLHttpRequest;var g="data.js";if(this.sp||this.Sh||this.om||this.Lj)g="data.json";b.open("GET",g,!0);var c=!1;if(!this.lb&&"response"in b&&"responseType"in b)try{b.responseType="json",c="json"===b.responseType}catch(d){c=
|
||||
!1}if(!c&&"responseType"in b)try{b.responseType="text"}catch(k){}if("overrideMimeType"in b)try{b.overrideMimeType("application/json; charset=utf-8")}catch(e){}this.Sh?b.onreadystatechange=function(){4===b.readyState&&a.bi(JSON.parse(b.responseText))}:(b.onload=function(){if(c)a.bi(b.response);else if(a.td){var g=b.responseText,g=g.substr(g.indexOf("{"));a.bi(JSON.parse(g))}else a.bi(JSON.parse(b.responseText))},b.onerror=function(a){fa("Error requesting "+g+":");fa(a)});b.send()}};f.prototype.Fv=
|
||||
function(){var a=this,b,g,c,d,k,e,m,t,n;this.yg=(!this.lb||this.td||this.Dc)&&this.hx&&!this.Gj;0===this.$b&&this.Eg&&(this.yg=!1);this.devicePixelRatio=this.yg?window.devicePixelRatio||window.webkitDevicePixelRatio||window.mozDevicePixelRatio||window.msDevicePixelRatio||1:1;"object"===typeof window.StatusBar&&window.StatusBar.hide();this.Ib();0<this.$b&&this.setSize(window.innerWidth,window.innerHeight,!0);this.canvas.addEventListener("webglcontextlost",function(b){b.preventDefault();a.aw();B("[Construct 2] WebGL context lost");
|
||||
window.cr_setSuspended(!0)},!1);this.canvas.addEventListener("webglcontextrestored",function(){a.G.ip();a.G.Zf(a.G.width,a.G.height,!0);a.nb=null;a.eb=null;a.Ll[0]=null;a.Ll[1]=null;a.bw();a.V=!0;B("[Construct 2] WebGL context restored");window.cr_setSuspended(!1)},!1);try{this.ku&&(this.Yc||this.td||!this.lb)&&(b={alpha:!0,depth:!1,antialias:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!0},this.Nh||(this.F=this.canvas.getContext("webgl2",b)),this.F||(this.F=this.canvas.getContext("webgl",
|
||||
b)||this.canvas.getContext("experimental-webgl",b)))}catch(f){}if(this.F){if(b=this.F.getExtension("WEBGL_debug_renderer_info"))this.Wl=this.F.getParameter(b.UNMASKED_RENDERER_WEBGL)+" ["+this.F.getParameter(b.UNMASKED_VENDOR_WEBGL)+"]";this.Ia&&(this.Wl+=" [front-to-back enabled]");this.lb||(this.Db=document.createElement("canvas"),jQuery(this.Db).appendTo(this.canvas.parentNode),this.Db.oncontextmenu=function(){return!1},this.Db.onselectstart=function(){return!1},this.Db.width=Math.round(this.fj*
|
||||
this.devicePixelRatio),this.Db.height=Math.round(this.xh*this.devicePixelRatio),jQuery(this.Db).css({width:this.fj+"px",height:this.xh+"px"}),this.Cq(),this.Rm=this.Db.getContext("2d"));this.G=new nb(this.F,this.$e,this.Ia);this.G.Zf(this.canvas.width,this.canvas.height);this.G.No=0!==this.cu;this.Ra=null;b=0;for(g=this.D.length;b<g;b++)for(k=this.D[b],c=0,d=k.P.length;c<d;c++)m=k.P[c],m.gb=this.G.Vl(m.id),m.xd=this.G.Vm(m.gb),this.ih=this.ih||this.G.xi(m.gb);b=0;for(g=this.vd.length;b<g;b++){t=this.vd[b];
|
||||
c=0;for(d=t.P.length;c<d;c++)m=t.P[c],m.gb=this.G.Vl(m.id),m.xd=this.G.Vm(m.gb);t.Bd();c=0;for(d=t.T.length;c<d;c++){n=t.T[c];k=0;for(e=n.P.length;k<e;k++)m=n.P[k],m.gb=this.G.Vl(m.id),m.xd=this.G.Vm(m.gb),this.ih=this.ih||this.G.xi(m.gb);n.Bd()}}}else{if(0<this.$b&&this.Ob){this.canvas=null;document.oncontextmenu=function(){return!1};document.onselectstart=function(){return!1};this.Ra=AppMobi.canvas.getContext("2d");try{this.Ra.samplingMode=this.Ta?"smooth":"sharp",this.Ra.globalScale=1,this.Ra.HTML5CompatibilityMode=
|
||||
!0,this.Ra.imageSmoothingEnabled=this.Ta}catch(v){}0!==this.width&&0!==this.height&&(this.Ra.width=this.width,this.Ra.height=this.height)}this.Ra||(this.Yc?(b={antialias:!!this.Ta,alpha:!0},this.Ra=this.canvas.getContext("2d",b)):(b={alpha:!0},this.Ra=this.canvas.getContext("2d",b)),this.zk(this.Ra,this.Ta));this.Rm=this.Db=null}this.mr=function(b){a.Pa(!1,b)};window==window.top||this.lb||this.rp||this.Sh||(document.addEventListener("mousedown",function(){window.focus()},!0),document.addEventListener("touchstart",
|
||||
function(){window.focus()},!0));"undefined"!==typeof cr_is_preview&&(this.Yc&&console.log("[Construct 2] In preview-over-wifi via CocoonJS mode"),-1<window.location.search.indexOf("continuous")&&(B("Reloading for continuous preview"),this.Tj="__c2_continuouspreview",this.Ji=!0),this.kw&&!this.$e&&(jQuery(window).focus(function(){a.setSuspended(!1)}),jQuery(window).blur(function(){var b=window.parent;b&&b.document.hasFocus()||a.setSuspended(!0)})));window.addEventListener("blur",function(){});this.lb||
|
||||
(b=function(a){if(mb(a)&&document.activeElement&&document.activeElement!==document.getElementsByTagName("body")[0]&&document.activeElement.blur)try{document.activeElement.blur()}catch(b){}},"undefined"!==typeof PointerEvent?document.addEventListener("pointerdown",b):window.navigator.msPointerEnabled?document.addEventListener("MSPointerDown",b):document.addEventListener("touchstart",b),document.addEventListener("mousedown",b));0===this.$b&&this.yg&&1<this.devicePixelRatio&&this.setSize(this.Xa,this.Wa,
|
||||
!0);this.rr();this.yv();this.go();this.Na={}};f.prototype.setSize=function(a,b,g){var c=0,d=0,k=0,e=0,e=0;if(this.Hg!==a||this.Gg!==b||g){this.Hg=a;this.Gg=b;var m=this.$b;if((k=(document.mozFullScreen||document.webkitIsFullScreen||!!document.msFullscreenElement||document.fullScreen||this.Jj)&&!this.Dc)||0!==this.$b||g)k&&(m=this.vg),g=this.devicePixelRatio,4<=m?(5===m&&1!==g&&(a+=1,b+=1),k=this.Xa/this.Wa,a/b>k?(k*=b,5===m?(e=k*g/this.Xa,1<e?e=Math.floor(e):1>e&&(e=1/Math.ceil(1/e)),k=this.Xa*e/
|
||||
g,e=this.Wa*e/g,c=(a-k)/2,d=(b-e)/2,a=k,b=e):(c=(a-k)/2,a=k)):(e=a/k,5===m?(e=e*g/this.Wa,1<e?e=Math.floor(e):1>e&&(e=1/Math.ceil(1/e)),k=this.Xa*e/g,e=this.Wa*e/g,c=(a-k)/2,d=(b-e)/2,a=k):d=(b-e)/2,b=e)):k&&0===m&&(c=Math.floor((a-this.Xa)/2),d=Math.floor((b-this.Wa)/2),a=this.Xa,b=this.Wa),2>m&&(this.ph=g),this.fj=Math.round(a),this.xh=Math.round(b),this.width=Math.round(a*g),this.height=Math.round(b*g),this.V=!0,this.Er?(this.L=this.width,this.K=this.height,this.Ac=!0):this.width<this.Xa&&this.height<
|
||||
this.Wa||1===m?(this.L=this.width,this.K=this.height,this.Ac=!0):(this.L=this.Xa,this.K=this.Wa,this.Ac=!1,2===m?(k=this.Xa/this.Wa,m=this.Hg/this.Gg,m<k?this.L=this.K*m:m>k&&(this.K=this.L/m)):3===m&&(k=this.Xa/this.Wa,m=this.Hg/this.Gg,m>k?this.L=this.K*m:m<k&&(this.K=this.L/m))),this.Do&&!this.lb&&(jQuery(this.Do).css({width:Math.round(a)+"px",height:Math.round(b)+"px","margin-left":Math.floor(c)+"px","margin-top":Math.floor(d)+"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*g),this.canvas.height=Math.round(b*g),this.td?(this.canvas.style.left=Math.floor(c)+"px",this.canvas.style.top=Math.floor(d)+"px",this.canvas.style.width=Math.round(a)+"px",this.canvas.style.height=Math.round(b)+"px"):this.yg&&!this.lb&&(this.canvas.style.width=Math.round(a)+"px",this.canvas.style.height=Math.round(b)+"px")),this.Db&&(this.Db.width=Math.round(a*g),this.Db.height=Math.round(b*g),this.Db.style.width=this.fj+
|
||||
"px",this.Db.style.height=this.xh+"px"),this.G&&this.G.Zf(Math.round(a*g),Math.round(b*g)),this.Ob&&this.Ra&&(this.Ra.width=Math.round(a),this.Ra.height=Math.round(b)),this.Ra&&this.zk(this.Ra,this.Ta),this.rr(),this.up&&!this.Dc&&window.scrollTo(0,0)}};f.prototype.rr=function(){if(this.qt&&0!==this.Qm){var a="portrait";2===this.Qm&&(a="landscape");try{screen.orientation&&screen.orientation.lock?screen.orientation.lock(a).catch(function(){}):screen.lockOrientation?screen.lockOrientation(a):screen.webkitLockOrientation?
|
||||
screen.webkitLockOrientation(a):screen.mozLockOrientation?screen.mozLockOrientation(a):screen.msLockOrientation&&screen.msLockOrientation(a)}catch(b){console&&console.warn&&console.warn("Failed to lock orientation: ",b)}}};f.prototype.aw=function(){this.G.Dt();this.pm=!0;var a,b,g;a=0;for(b=this.D.length;a<b;a++)g=this.D[a],g.Nm&&g.Nm()};f.prototype.bw=function(){this.pm=!1;var a,b,g;a=0;for(b=this.D.length;a<b;a++)g=this.D[a],g.mq&&g.mq()};f.prototype.Cq=function(){if(!this.lb){var a=(document.mozFullScreen||
|
||||
document.webkitIsFullScreen||document.fullScreen||document.msFullscreenElement||this.Jj)&&!this.Dc?jQuery(this.canvas).offset():jQuery(this.canvas).position();a.position="absolute";jQuery(this.Db).css(a)}};var d=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||window.oCancelAnimationFrame;f.prototype.setSuspended=function(a){var b;if(a&&!this.Rh)for(B("[Construct 2] Suspending"),this.Rh=!0,-1!==this.Zm&&d&&d(this.Zm),-1!==
|
||||
this.un&&clearTimeout(this.un),a=0,b=this.Ki.length;a<b;a++)this.Ki[a](!0);else if(!a&&this.Rh){B("[Construct 2] Resuming");this.Rh=!1;this.Oj=Ya();this.Pf=Ya();a=this.ii=this.yj=0;for(b=this.Ki.length;a<b;a++)this.Ki[a](!1);this.Pa(!1)}};f.prototype.ko=function(a){this.Ki.push(a)};f.prototype.Je=function(a){return this.ck[a]};f.prototype.bi=function(a){a&&a.project||fa("Project model unavailable");a=a.project;this.name=a[0];this.Uo=a[1];this.$b=a[12];this.Xa=a[10];this.Wa=a[11];this.xq=this.Xa/2;
|
||||
this.yq=this.Wa/2;this.lb&&!this.td&&(4<=a[12]||0===a[12])&&(B("[Construct 2] Letterbox scale fullscreen modes are not supported on this platform - falling back to 'Scale outer'"),this.$b=3);this.En=a[18];this.gf=a[19];if(0===this.gf){var b=new Image;b.crossOrigin="anonymous";this.mn(b,"loading-logo.png");this.ff={Zj:b}}else if(4===this.gf){b=new Image;b.src="";var g=new Image;g.src="";var c=new Image;c.src="";var d=new Image;d.src="";var k=new Image;k.src="";var e=new Image;e.src="";var m=new Image;
|
||||
m.src="";var t=new Image;t.src="";var n=new Image;n.src="";var f=new Image;f.src="";var v=new Image;v.src="";var r=new Image;r.src="";this.ff={Zj:[b,g,c,d],qw:[k,e,m,t],mx:[n,f,v,r]}}this.li=a[21];this.ck=qc();this.Vd=new W(this);b=0;for(g=a[2].length;b<g;b++)m=a[2][b],c=this.Je(m[0]),ob(m,c.prototype),t=new c(this),t.Ek=m[1],t.cf=m[2],t.Wy=m[5],t.Xp=m[9],t.Z&&t.Z(),this.plugins.push(t);this.ck=qc();b=0;for(g=a[3].length;b<g;b++){m=a[3][b];k=this.Je(m[1]);t=null;c=0;for(d=this.plugins.length;c<d;c++)if(this.plugins[c]instanceof
|
||||
k){t=this.plugins[c];break}n=new t.Da(t);n.name=m[0];n.ca=m[2];n.fm=m[3].slice(0);n.jx=m[3].length;n.tt=m[4];n.Vu=m[5];n.da=m[11];n.ca?(n.bk=[],n.le=this.Ch++,n.Oa=null):(n.bk=null,n.le=-1,n.Oa=[]);n.sj=null;n.tg=null;n.Oo=null;n.ac=!1;n.nc=null;m[6]?(n.jr=m[6][0],n.kr=m[6][1],n.Ww=m[6][2]):(n.jr=null,n.kr=0,n.Ww=0);m[7]?n.lc=m[7]:n.lc=null;n.index=b;n.e=[];n.jj=[];n.De=[new pb(n)];n.Hd=0;n.Vc=null;n.It=0;n.bh=!0;n.Sk=qb;n.Pl=rb;n.dv=sb;n.ya=tb;n.yi=ub;n.Xm=vb;n.Vg=wb;n.Aj=xb;n.Ml=yb;n.Ol=zb;n.Me=
|
||||
Ab;n.Rl=Fb;n.Fo=new eb(this.Xa,this.Wa);n.qo=!0;n.ro=!1;n.Na={};n.toString=Gb;n.Qa=[];c=0;for(d=m[8].length;c<d;c++){f=m[8][c];v=this.Je(f[1]);r=null;k=0;for(e=this.Qa.length;k<e;k++)if(this.Qa[k]instanceof v){r=this.Qa[k];break}r||(r=new v(this),r.Zp=[],r.Hm=new ba,r.Z&&r.Z(),this.Qa.push(r));-1===r.Zp.indexOf(n)&&r.Zp.push(n);k=new r.Da(r,n);k.name=f[0];k.da=f[2];k.Z();n.Qa.push(k)}n.global=m[9];n.lm=m[10];n.P=[];c=0;for(d=m[12].length;c<d;c++)n.P.push({id:m[12][c][0],name:m[12][c][1],gb:-1,xd:!1,
|
||||
A:!0,index:c});n.jz=m[13];this.En&&!n.ca&&!n.lm&&t.cf||n.Z();n.name&&(this.types[n.name]=n);this.D.push(n);t.Ek&&(c=new t.ua(n),c.uid=this.li++,c.Gq=this.bq++,c.Jf=0,c.Hh=Hb,c.toString=Ib,c.B=m[14],c.Z(),n.e.push(c),this.ue[c.uid.toString()]=c)}b=0;for(g=a[4].length;b<g;b++)for(k=a[4][b],e=this.D[k[0]],c=1,d=k.length;c<d;c++)m=this.D[k[c]],m.Oa.push(e),e.bk.push(m);b=0;for(g=a[28].length;b<g;b++){k=a[28][b];e=[];c=0;for(d=k.length;c<d;c++)e.push(this.D[k[c]]);c=0;for(d=e.length;c<d;c++)e[c].ac=!0,
|
||||
e[c].nc=e}if(0<this.Ch)for(b=0,g=this.D.length;b<g;b++)if(m=this.D[b],!m.ca&&m.Oa.length){m.sj=Array(this.Ch);m.tg=Array(this.Ch);m.Oo=Array(this.Ch);n=[];c=r=v=f=0;for(d=m.Oa.length;c<d;c++)for(t=m.Oa[c],m.sj[t.le]=f,f+=t.jx,m.tg[t.le]=v,v+=t.tt,m.Oo[t.le]=r,r+=t.Vu,k=0,e=t.P.length;k<e;k++)n.push(xa({},t.P[k]));m.P=n.concat(m.P);c=0;for(d=m.P.length;c<d;c++)m.P[c].index=c}b=0;for(g=a[5].length;b<g;b++)m=a[5][b],c=new Jb(this,m),this.xm[c.name]=c,this.vd.push(c);b=0;for(g=a[6].length;b<g;b++)m=a[6][b],
|
||||
c=new Kb(this,m),this.Dl[c.name]=c,this.ke.push(c);b=0;for(g=this.ke.length;b<g;b++)this.ke[b].Ya();b=0;for(g=this.ke.length;b<g;b++)this.ke[b].Bn();b=0;for(g=this.Qk.length;b<g;b++)this.Qk[b].Ya();L(this.Qk);this.pt=a[7];this.Hl=a[8];this.ze=a[9];this.ph=1;this.ku=a[13];this.Ta=a[14];this.Eo=a[15];this.hx=a[17];this.Qm=a[20];this.qt=0<this.Qm;this.kw=a[22];this.Ac=this.Er=a[23];this.cu=a[24];this.rw=a[25];this.Ia=a[27]&&!this.pe;this.Fk=Date.now();L(this.ck);this.Fv()};var a=!1,g=0,n=[];f.prototype.xw=
|
||||
function(a,b){function c(){g--;d.Tp()}var d=this;a.addEventListener("load",c);a.addEventListener("error",c);n.push([a,b]);this.Tp()};f.prototype.Tp=function(){for(var a;n.length&&100>g;)g++,a=n.shift(),this.mn(a[0],a[1])};f.prototype.lx=function(b,g){b.cocoonLazyLoad=!0;b.onerror=function(g){a=b.Ao=!0;console&&console.error&&console.error("Error loading image '"+b.src+"': ",g)};this.td?b.src=g:b.src||("undefined"!==typeof XAPKReader?XAPKReader.get(g,function(a){b.src=a},function(c){a=b.Ao=!0;console&&
|
||||
console.error&&console.error("Error extracting image '"+g+"' from expansion file: ",c)}):(b.crossOrigin="anonymous",this.xw(b,g)));this.lh.push(b)};f.prototype.Tu=function(a){var b,g;b=0;for(g=this.lh.length;b<g;b++)if(this.lh[b].Ft===a)return this.lh[b];return null};var k=0,v=!1;f.prototype.yv=function(){this.lg&&(k=this.lg.Ow(this.pt))};f.prototype.so=function(){var a=k,b=0,g=0,c=!0,d,e,g=0;for(d=this.lh.length;g<d;g++){e=this.lh[g];var m=e.Et;if(!m||0>=m)m=5E4;a+=m;e.src&&(e.complete||e.loaded)&&
|
||||
!e.Ao?b+=m:c=!1}c&&this.rw&&this.lg&&(v||(this.lg.Tw(),v=!0),g=this.lg.gv(),b+=g,g<k&&(c=!1));this.yd=0==a?1:b/a;return c};var P=!1;f.prototype.go=function(){if(this.Ra||this.G){var b=this.Ra||this.Rm;this.Db&&this.Cq();var g=window.innerWidth,c=window.innerHeight;this.Hg===g&&this.Gg===c||this.setSize(g,c);this.yd=0;this.yp=-1;var d=this;if(this.so()&&(4!==this.gf||P))this.zv();else{c=Date.now()-this.Fk;if(b){var k=this.width,e=this.height,g=this.devicePixelRatio;if(3>this.gf&&(this.Yc||500<=c&&
|
||||
this.yp!=this.yd)){b.clearRect(0,0,k,e);var c=k/2,e=e/2,k=0===this.gf&&this.ff.Zj.complete,m=40*g,n=0,t=80*g,f;if(k){var r=this.ff.Zj,t=r.width*g;f=r.height*g;m=t/2;n=f/2;b.drawImage(r,qa(c-m),qa(e-n),t,f)}1>=this.gf?(c=qa(c-m)+.5,e=qa(e+(n+(k?12*g:0)))+.5,b.fillStyle=a?"red":"DodgerBlue",b.fillRect(c,e,Math.floor(t*this.yd),6*g),b.strokeStyle="black",b.strokeRect(c,e,t,6*g),b.strokeStyle="white",b.strokeRect(c-1*g,e-1*g,t+2*g,8*g)):2===this.gf&&(b.font=this.td?"12pt ArialMT":"12pt Arial",b.fillStyle=
|
||||
a?"#f00":"#999",b.iz="middle",g=Math.round(100*this.yd)+"%",k=b.measureText?b.measureText(g):null,b.fillText(g,c-(k?k.width:0)/2,e));this.yp=this.yd}else if(4===this.gf){this.hu(b);w?w(function(){d.go()}):setTimeout(function(){d.go()},16);return}}setTimeout(function(){d.go()},this.Yc?10:100)}}};var r=-1,m="undefined"===typeof cr_is_preview?200:0,t=!0,da=!1,ga=0,Q=0,C="undefined"===typeof cr_is_preview?3E3:0,x=null,z=null,H=0;f.prototype.hu=function(b){if(!P){for(var g=Math.ceil(this.width),c=Math.ceil(this.height),
|
||||
d=this.ff.Zj,k=this.ff.qw,e=this.ff.mx,n=0;4>n;++n)if(!d[n].complete||!k[n].complete||!e[n].complete)return;0===H&&(r=Date.now());var n=Date.now(),f=!1,v=b,h,l;t||da?(b.clearRect(0,0,g,c),x&&x.width===g&&x.height===c||(x=document.createElement("canvas"),x.width=g,x.height=c,z=x.getContext("2d")),v=z,f=!0,t&&1===H&&(r=Date.now())):b.globalAlpha=1;v.fillStyle="#333333";v.fillRect(0,0,g,c);256<this.xh?(h=Fa(.22*c,105,.6*g),l=.25*h,v.drawImage(p(k,h),.5*g-h/2,.2*c-l/2,h,l),l=h=Math.min(.395*c,.95*g),
|
||||
v.drawImage(p(d,h),.5*g-h/2,.485*c-l/2,h,l),h=Fa(.22*c,105,.6*g),l=.25*h,v.drawImage(p(e,h),.5*g-h/2,.868*c-l/2,h,l),v.fillStyle="#3C3C3C",h=g,l=Math.max(.005*c,2),v.fillRect(0,.8*c-l/2,h,l),v.fillStyle=a?"red":"#E0FF65",h=g*this.yd,v.fillRect(.5*g-h/2,.8*c-l/2,h,l)):(l=h=.55*c,v.drawImage(p(d,h),.5*g-h/2,.45*c-l/2,h,l),v.fillStyle="#3C3C3C",h=g,l=Math.max(.005*c,2),v.fillRect(0,.85*c-l/2,h,l),v.fillStyle=a?"red":"#E0FF65",h=g*this.yd,v.fillRect(.5*g-h/2,.85*c-l/2,h,l));f&&(t?b.globalAlpha=0===H?
|
||||
0:Math.min((n-r)/300,1):da&&(b.globalAlpha=Math.max(1-(n-Q)/300,0)),b.drawImage(x,0,0,g,c));t&&300<=n-r&&2<=H&&(t=!1,ga=n);!t&&n-ga>=C&&!da&&1<=this.yd&&(da=!0,Q=n);if(da&&n-Q>=300+m||"undefined"!==typeof cr_is_preview&&1<=this.yd&&500>Date.now()-r)P=!0,da=t=!1,this.ff=z=x=null;++H}};f.prototype.zv=function(){this.Db&&(this.canvas.parentNode.removeChild(this.Db),this.Db=this.Rm=null);this.Fk=Date.now();this.Pf=Ya();var a,b,g;if(this.En)for(a=0,b=this.D.length;a<b;a++)g=this.D[a],g.ca||g.lm||!g.La.cf||
|
||||
g.Z();else this.Wh=!1;a=0;for(b=this.vd.length;a<b;a++)this.vd[a].Gt();2<=this.$b&&(a=this.Xa/this.Wa,b=this.width/this.height,this.ph=2!==this.$b&&b>a||2===this.$b&&b<a?this.height/this.Wa:this.width/this.Xa);this.Uo?this.xm[this.Uo].sn():this.vd[0].sn();this.En||(this.Wj=1,this.trigger(W.prototype.g.Rn,null),window.C2_RegisterSW&&window.C2_RegisterSW());navigator.splashscreen&&navigator.splashscreen.hide&&navigator.splashscreen.hide();a=0;for(b=this.D.length;a<b;a++)g=this.D[a],g.jq&&g.jq();document.hidden||
|
||||
document.webkitHidden||document.mozHidden||document.msHidden?window.cr_setSuspended(!0):this.Pa(!1);this.Ob&&AppMobi.webview.execute("onGameReady();")};f.prototype.Pa=function(a,b,g){if(this.Ba){var c=Ya();if(g||!this.Rh||a){a||(w?this.Zm=w(this.mr):this.un=setTimeout(this.mr,this.$e?1:16));b=b||c;var d=this.$b;((g=(document.mozFullScreen||document.webkitIsFullScreen||document.fullScreen||!!document.msFullscreenElement)&&!this.Dc)||this.Jj)&&0<this.vg&&(d=this.vg);if(0<d){var d=window.innerWidth,
|
||||
k=window.innerHeight;this.Hg===d&&this.Gg===k||this.setSize(d,k)}this.lb||(g?this.vj||(this.vj=!0):this.vj?(this.vj=!1,0===this.$b&&this.setSize(Math.round(this.iq/this.devicePixelRatio),Math.round(this.hq/this.devicePixelRatio),!0)):(this.iq=this.width,this.hq=this.height));this.Wh&&(g=this.so(),this.Wj=this.yd,g&&(this.Wh=!1,this.yd=1,this.trigger(W.prototype.g.Rn,null),window.C2_RegisterSW&&window.C2_RegisterSW()));this.Wv(b);!this.V&&!this.Yc||this.pm||this.Ji||a||(this.V=!1,this.G?this.Xc():
|
||||
this.je(),this.Hi&&(this.canvas&&this.canvas.toDataURL&&(this.cr=this.canvas.toDataURL(this.Hi[0],this.Hi[1]),window.cr_onSnapshot&&window.cr_onSnapshot(this.cr),this.trigger(W.prototype.g.gs,null)),this.Hi=null));this.Vy||(this.Wd++,this.pj++,this.yj++);this.ii+=Ya()-c}}};f.prototype.Wv=function(a){var b,g,c,d,k,e,m,n;1E3<=a-this.Pf&&(this.Pf+=1E3,1E3<=a-this.Pf&&(this.Pf=a),this.Kl=this.yj,this.yj=0,this.wl=this.ii,this.ii=0);b=0;0!==this.Oj&&(b=a-this.Oj,0>b&&(b=0),this.Cf=b/=1E3,.5<this.Cf?this.Cf=
|
||||
0:this.Cf>1/this.Vp&&(this.Cf=1/this.Vp));this.Oj=a;this.Bf=this.Cf*this.eh;this.Bb.add(this.Bf);this.Ge.add(b);a=(document.mozFullScreen||document.webkitIsFullScreen||document.fullScreen||!!document.msFullscreenElement||this.Jj)&&!this.Dc;2<=this.$b||a&&0<this.vg?(b=this.Xa/this.Wa,g=this.width/this.height,c=this.$b,a&&0<this.vg&&(c=this.vg),this.ph=2!==c&&g>b||2===c&&g<b?this.height/this.Wa:this.width/this.Xa,this.Ba&&(this.Ba.Nq(this.Ba.scrollX),this.Ba.Oq(this.Ba.scrollY))):this.ph=this.yg?this.devicePixelRatio:
|
||||
1;this.Ib();this.ud++;this.Vd.Fw();this.ud--;this.Ib();this.ud++;g=this.gq.sf();a=0;for(b=g.length;a<b;a++)g[a].dz();a=0;for(b=this.D.length;a<b;a++)if(e=this.D[a],!e.ca&&(e.Qa.length||e.Oa.length))for(g=0,c=e.e.length;g<c;g++)for(m=e.e[g],d=0,k=m.X.length;d<k;d++)m.X[d].Pa();a=0;for(b=this.D.length;a<b;a++)if(e=this.D[a],!e.ca&&(e.Qa.length||e.Oa.length))for(g=0,c=e.e.length;g<c;g++)for(m=e.e[g],d=0,k=m.X.length;d<k;d++)n=m.X[d],n.pw&&n.pw();g=this.Jm.sf();a=0;for(b=g.length;a<b;a++)g[a].Pa();this.ud--;
|
||||
this.Av();for(a=0;this.qh&&10>a++;)this.Mo(this.qh);a=0;for(b=this.ke.length;a<b;a++)this.ke[a].Zl=!1;this.Ba.Ef&&this.Ba.Ef.qb();L(this.Jq);this.ud++;a=0;for(b=this.D.length;a<b;a++)if(e=this.D[a],!e.ca&&(e.Qa.length||e.Oa.length))for(g=0,c=e.e.length;g<c;g++)for(m=e.e[g],d=0,k=m.X.length;d<k;d++)n=m.X[d],n.Mi&&n.Mi();g=this.Km.sf();a=0;for(b=g.length;a<b;a++)g[a].Mi();this.ud--};f.prototype.Mo=function(a){var b=this.Ba;this.Ba.Uw();var g,c,d;if(this.G)for(g=0,c=this.D.length;g<c;g++)d=this.D[g],
|
||||
d.ca||!d.xr||d.global&&0!==d.e.length||-1!==a.Mh.indexOf(d)||d.xr();b==a&&L(this.Vd.jc);L(this.Jq);this.Lq(!0);a.sn();this.Lq(!1);this.V=!0;this.Ib()};f.prototype.Lq=function(a){var b,g,c,d,k,e,m,n,t;b=0;for(g=this.Qa.length;b<g;b++)c=this.Qa[b],a?c.mi&&c.mi():c.qi&&c.qi();b=0;for(g=this.D.length;b<g;b++)if(c=this.D[b],c.global||c.La.Ek)for(d=0,k=c.e.length;d<k;d++)if(e=c.e[d],a?e.mi&&e.mi():e.qi&&e.qi(),e.X)for(m=0,n=e.X.length;m<n;m++)t=e.X[m],a?t.mi&&t.mi():t.qi&&t.qi()};f.prototype.Nk=function(a){this.Jm.add(a)};
|
||||
f.prototype.Xw=function(a){this.Km.add(a)};f.prototype.Gf=function(a){return a&&-1!==a.ki?this.Cf*a.ki:this.Bf};f.prototype.je=function(){this.Ba.je(this.Ra);this.Ob&&this.Ra.present()};f.prototype.Xc=function(){this.Ia&&(this.Df=1,this.Ba.qg(this.G));this.Ba.Xc(this.G);this.G.uw()};f.prototype.io=function(a){a&&this.mj.push(a)};f.prototype.Bw=function(a){Ea(this.mj,a)};f.prototype.Fh=function(a){a=a.toString();return this.ue.hasOwnProperty(a)?this.ue[a]:null};var G=[];f.prototype.$d=function(a){var b,
|
||||
g;b=a.type.name;var c=null;if(this.Af.hasOwnProperty(b)){if(c=this.Af[b],c.contains(a))return}else c=G.length?G.pop():new ba,this.Af[b]=c;c.add(a);this.Ye=!0;if(a.ac)for(b=0,g=a.siblings.length;b<g;b++)this.$d(a.siblings[b]);this.jm&&c.jh.push(a);this.im||(this.ud++,this.trigger(Object.getPrototypeOf(a.type.La).g.js,a),this.ud--)};f.prototype.Ib=function(){if(this.Ye){var a,b,g,c,d,k;this.jm=!0;g=0;for(d=this.Gd.length;g<d;++g)for(a=this.Gd[g],b=a.type,b.e.push(a),c=0,k=b.Oa.length;c<k;++c)b.Oa[c].e.push(a),
|
||||
b.Oa[c].bh=!0;L(this.Gd);this.$r();Xa(this.Af);this.Ye=this.jm=!1}};f.prototype.$r=function(){for(var a in this.Af)this.Af.hasOwnProperty(a)&&this.Jr(this.Af[a])};f.prototype.Jr=function(a){var b=a.sf(),g=b[0].type,c,d,k,e,m,n;Za(g.e,a);g.bh=!0;0===g.e.length&&(g.ro=!1);c=0;for(d=g.Oa.length;c<d;++c)n=g.Oa[c],Za(n.e,a),n.bh=!0;c=0;for(d=this.Vd.jc.length;c<d;++c)if(m=this.Vd.jc[c],m.Vb.hasOwnProperty(g.index)&&Za(m.Vb[g.index].ne,a),!g.ca)for(k=0,e=g.Oa.length;k<e;++k)n=g.Oa[k],m.Vb.hasOwnProperty(n.index)&&
|
||||
Za(m.Vb[n.index].ne,a);if(m=b[0].n){if(m.Nc)for(k=m.e,c=0,d=k.length;c<d;++c)e=k[c],a.contains(e)&&(e.Ga(),m.Gb.update(e,e.fc,null),e.fc.set(0,0,-1,-1));Za(m.e,a);m.Ei(0)}for(c=0;c<b.length;++c)this.Ir(b[c],g);a.clear();G.push(a);this.V=!0};f.prototype.Ir=function(a,b){var g,c,d;g=0;for(c=this.mj.length;g<c;++g)this.mj[g](a);a.Qe&&b.Fo.update(a,a.Qe,null);(g=a.n)&&g.Yg(a,!0);if(a.X)for(g=0,c=a.X.length;g<c;++g)d=a.X[g],d.oi&&d.oi(),d.behavior.Hm.remove(a);this.gq.remove(a);this.Jm.remove(a);this.Km.remove(a);
|
||||
a.oi&&a.oi();this.ue.hasOwnProperty(a.uid.toString())&&delete this.ue[a.uid.toString()];this.dk--;100>b.jj.length&&b.jj.push(a)};f.prototype.Ho=function(a,b,g,c){if(a.ca){var d=qa(Math.random()*a.bk.length);return this.Ho(a.bk[d],b,g,c)}return a.Vc?this.Re(a.Vc,b,!1,g,c,!1):null};var O=[];f.prototype.Re=function(a,b,g,c,d,k){var e,m,n,t;if(!a)return null;var f=this.D[a[1]],v=f.La.cf;if(this.Wh&&v&&!f.lm||v&&!this.G&&11===a[0][11])return null;var r=b;v||(b=null);var h;f.jj.length?(h=f.jj.pop(),h.Fb=
|
||||
!0,f.La.ua.call(h,f)):(h=new f.La.ua(f),h.Fb=!1);!g||k||this.ue.hasOwnProperty(a[2].toString())?h.uid=this.li++:h.uid=a[2];this.ue[h.uid.toString()]=h;h.Gq=this.bq++;h.Jf=f.e.length;e=0;for(m=this.Gd.length;e<m;++e)this.Gd[e].type===f&&h.Jf++;h.Hh=Hb;h.toString=Ib;n=a[3];if(h.Fb)Xa(h.Na);else{h.Na={};if("undefined"!==typeof cr_is_preview)for(h.lp=[],h.lp.length=n.length,e=0,m=n.length;e<m;e++)h.lp[e]=n[e][1];h.kb=[];h.kb.length=n.length}e=0;for(m=n.length;e<m;e++)h.kb[e]=n[e][0];if(v){var p=a[0];
|
||||
h.x=ia(c)?p[0]:c;h.y=ia(d)?p[1]:d;h.z=p[2];h.width=p[3];h.height=p[4];h.depth=p[5];h.j=p[6];h.opacity=p[7];h.qc=p[8];h.rc=p[9];h.Jb=p[10];e=p[11];!this.G&&f.P.length&&(h.Jb=e);h.sh=gb(h.Jb);this.F&&hb(h,h.Jb,this.F);if(h.Fb){e=0;for(m=p[12].length;e<m;e++)for(n=0,t=p[12][e].length;n<t;n++)h.Sa[e][n]=p[12][e][n];h.Ja.set(0,0,0,0);h.Qe.set(0,0,-1,-1);h.fc.set(0,0,-1,-1);h.wf.Dk(h.Ja);L(h.jl)}else{h.Sa=p[12].slice(0);e=0;for(m=h.Sa.length;e<m;e++)h.Sa[e]=p[12][e].slice(0);h.na=[];h.Ke=[];h.Ke.length=
|
||||
f.P.length;h.Ja=new ua(0,0,0,0);h.Qe=new ua(0,0,-1,-1);h.fc=new ua(0,0,-1,-1);h.wf=new va;h.jl=[];h.la=Lb;h.Py=Mb;h.Uc=Nb;h.Ga=Ob;h.gx=Pb;h.kz=Qb;h.Kd=Rb}h.nr=!1;h.$w=0;h.Zw=0;h.Yw=null;14===p.length&&(h.nr=!0,h.$w=p[13][0],h.Zw=p[13][1],h.Yw=p[13][2]);e=0;for(m=f.P.length;e<m;e++)h.Ke[e]=!0;h.Be=!0;h.Bd=Sb;h.Bd();h.Br=!!h.na.length;h.il=!0;h.pl=!0;f.qo=!0;h.visible=!0;h.ki=-1;h.n=b;h.Cd=b.e.length;h.Df=0;"undefined"===typeof h.Fd&&(h.Fd=null);this.V=h.rh=!0}var l;L(O);e=0;for(m=f.Oa.length;e<m;e++)O.push.apply(O,
|
||||
f.Oa[e].Qa);O.push.apply(O,f.Qa);if(h.Fb)for(e=0,m=O.length;e<m;e++){var q=O[e];l=h.X[e];l.Fb=!0;q.behavior.ua.call(l,q,h);p=a[4][e];n=0;for(t=p.length;n<t;n++)l.B[n]=p[n];l.Z();q.behavior.Hm.add(h)}else for(h.X=[],e=0,m=O.length;e<m;e++)q=O[e],l=new q.behavior.ua(q,h),l.Fb=!1,l.B=a[4][e].slice(0),l.Z(),h.X.push(l),q.behavior.Hm.add(h);p=a[5];if(h.Fb)for(e=0,m=p.length;e<m;e++)h.B[e]=p[e];else h.B=p.slice(0);this.Gd.push(h);this.Ye=!0;b&&(b.oh(h,!0),1!==b.ve||1!==b.we)&&(f.ro=!0);this.dk++;if(f.ac){if(h.ac=
|
||||
!0,h.Fb?L(h.siblings):h.siblings=[],!g&&!k){e=0;for(m=f.nc.length;e<m;e++)if(f.nc[e]!==f){if(!f.nc[e].Vc)return null;h.siblings.push(this.Re(f.nc[e].Vc,r,!1,v?h.x:c,v?h.y:d,!0))}e=0;for(m=h.siblings.length;e<m;e++)for(h.siblings[e].siblings.push(h),n=0;n<m;n++)e!==n&&h.siblings[e].siblings.push(h.siblings[n])}}else h.ac=!1,h.siblings=null;h.Z();e=0;for(m=h.X.length;e<m;e++)h.X[e].ow&&h.X[e].ow();return h};f.prototype.Sl=function(a){var b,g;b=0;for(g=this.Ba.T.length;b<g;b++){var c=this.Ba.T[b];if(lb(c.name,
|
||||
a))return c}return null};f.prototype.Eh=function(a){a=qa(a);0>a&&(a=0);a>=this.Ba.T.length&&(a=this.Ba.T.length-1);return this.Ba.T[a]};f.prototype.tl=function(a){var b,g;b=0;for(g=a.length;b<g;b++)a[b].ya().Fa=!0};f.prototype.yi=function(a){var b,g;b=0;for(g=a.length;b<g;b++)a[b].yi()};f.prototype.Xm=function(a){var b,g;b=0;for(g=a.length;b<g;b++)a[b].Xm()};f.prototype.Vg=function(a){var b,g;b=0;for(g=a.length;b<g;b++)a[b].Vg()};f.prototype.Jk=function(a,b,g){var c=a.ya(),d,e,k,m,n=this.Sb().oc.wd,
|
||||
t,f,v;if(c.Fa)for(c.Fa=!1,L(c.e),d=0,m=a.e.length;d<m;d++)k=a.e[d],k.Ga(),t=k.n.Rb(b,g,!0),f=k.n.Rb(b,g,!1),k.Uc(t,f)?c.e.push(k):n&&c.ea.push(k);else{e=0;v=n?c.ea:c.e;d=0;for(m=v.length;d<m;d++)k=v[d],k.Ga(),t=k.n.Rb(b,g,!0),f=k.n.Rb(b,g,!1),k.Uc(t,f)&&(n?c.e.push(k):(c.e[e]=c.e[d],e++));v.length=e}a.Me();return c.Yl()};new va;new ua(0,0,0,0);f.prototype.tr=function(a,b){if(!b)return!1;var g,c,d,e,k;g=0;for(c=a.Qa.length;g<c;g++)if(a.Qa[g].behavior instanceof b)return!0;if(!a.ca)for(g=0,c=a.Oa.length;g<
|
||||
c;g++)for(k=a.Oa[g],d=0,e=k.Qa.length;d<e;d++)if(k.Qa[d].behavior instanceof b)return!0;return!1};f.prototype.yn=function(a){return this.tr(a,ic.Tx)};f.prototype.zn=function(a){return this.tr(a,ic.Vx)};var ca=-1;f.prototype.trigger=function(a,b,g){if(!this.Ba)return!1;var c=this.Ba.Ef;if(!c)return!1;var d=!1,e,k,m;ca++;var n=c.zl;k=0;for(m=n.length;k<m;++k)e=this.pr(a,b,n[k],g),d=d||e;e=this.pr(a,b,c,g);ca--;return d||e};f.prototype.pr=function(a,b,g,c){var d=!1,e,k,m,n;if(b)for(m=this.wn(a,b,b.type.name,
|
||||
g,c),d=d||m,n=b.type.Oa,e=0,k=n.length;e<k;++e)m=this.wn(a,b,n[e].name,g,c),d=d||m;else m=this.wn(a,b,"system",g,c),d=d||m;return d};f.prototype.wn=function(a,b,g,c,d){var e,k=!1,m=!1,m="undefined"!==typeof d,n=(m?c.Qo:c.qr)[g];if(!n)return k;var t=null;c=0;for(e=n.length;c<e;++c)if(n[c].method==a){t=n[c].Ah;break}if(!t)return k;var f;m?f=t[d]:f=t;if(!f)return null;c=0;for(e=f.length;c<e;c++)a=f[c][0],d=f[c][1],m=this.Qu(b,g,a,d),k=k||m;return k};f.prototype.Qu=function(a,b,g,c){var d,e,k=!1;this.xn++;
|
||||
var m=this.Sb().oc;m&&this.yi(m.of);var n=1<this.xn;this.yi(g.of);n&&this.ww();var t=this.Ym(g);t.oc=g;a&&(d=this.types[b].ya(),d.Fa=!1,L(d.e),d.e[0]=a,this.types[b].Me());a=!0;if(g.parent){b=t.gr;for(d=g.parent;d;)b.push(d),d=d.parent;b.reverse();d=0;for(e=b.length;d<e;d++)if(!b[d].Hw()){a=!1;break}}a&&(this.pj++,g.wd?g.Gw(c):g.qb(),k=k||t.Of);this.Bq();n&&this.mw();this.Vg(g.of);m&&this.Vg(m.of);this.Ye&&0===this.ud&&0===ca&&!this.mm&&this.Ib();this.xn--;return k};f.prototype.Zu=function(){var a=
|
||||
this.Sb();return a.oc.Kb[a.mc]};f.prototype.ww=function(){this.Yj++;this.Yj>=this.Dm.length&&this.Dm.push([])};f.prototype.mw=function(){this.Yj--};f.prototype.Yo=function(){return this.Dm[this.Yj]};f.prototype.Ym=function(a){this.oj++;this.oj>=this.Cl.length&&this.Cl.push(new Tb);var b=this.Sb();b.reset(a);return b};f.prototype.Bq=function(){this.oj--};f.prototype.Sb=function(){return this.Cl[this.oj]};f.prototype.Zo=function(a,b){for(var g,c,d,e,k,m;b;){g=0;for(c=b.dd.length;g<c;g++)if(m=b.dd[g],
|
||||
m instanceof Ub&&lb(a,m.name))return m;b=b.parent}g=0;for(c=this.ke.length;g<c;g++)for(k=this.ke[g],d=0,e=k.Ve.length;d<e;d++)if(m=k.Ve[d],m instanceof Ub&&lb(a,m.name))return m;return null};f.prototype.$o=function(a){var b,g;b=0;for(g=this.vd.length;b<g;b++)if(this.vd[b].da===a)return this.vd[b];return null};f.prototype.Cj=function(a){var b,g;b=0;for(g=this.D.length;b<g;b++)if(this.D[b].da===a)return this.D[b];return null};f.prototype.$u=function(a){var b,g;b=0;for(g=this.kg.length;b<g;b++)if(this.kg[b].da===
|
||||
a)return this.kg[b];return null};f.prototype.Kt=function(a,b){this.Hi=[a,b];this.V=!0};f.prototype.Av=function(){var a=this,b=this.ln,g=this.re,d=this.Tj,k=!1;this.$q&&(k=!0,b="__c2_continuouspreview",this.$q=!1);if(b.length){this.Ib();g=this.Lw();if(h()&&!this.Yc)c(b,g,function(){B("Saved state to IndexedDB storage ("+g.length+" bytes)");a.re=g;a.trigger(W.prototype.g.Zk,null);g=a.re="";k&&e()},function(c){try{localStorage.setItem("__c2save_"+b,g),B("Saved state to WebStorage ("+g.length+" bytes)"),
|
||||
a.re=g,a.trigger(W.prototype.g.Zk,null),g=a.re="",k&&e()}catch(d){B("Failed to save game state: "+c+"; "+d),a.trigger(W.prototype.g.Vn,null)}});else try{localStorage.setItem("__c2save_"+b,g),B("Saved state to WebStorage ("+g.length+" bytes)"),a.re=g,this.trigger(W.prototype.g.Zk,null),g=a.re="",k&&e()}catch(m){B("Error saving to WebStorage: "+m),a.trigger(W.prototype.g.Vn,null)}this.Tj=this.ln="";this.ob=null}if(d.length){if(h()&&!this.Yc)q(d,function(b){b?(a.ob=b,B("Loaded state from IndexedDB storage ("+
|
||||
a.ob.length+" bytes)")):(a.ob=localStorage.getItem("__c2save_"+d)||"",B("Loaded state from WebStorage ("+a.ob.length+" bytes)"));a.Ji=!1;a.ob||(a.ob=null,a.trigger(W.prototype.g.Xi,null))},function(){a.ob=localStorage.getItem("__c2save_"+d)||"";B("Loaded state from WebStorage ("+a.ob.length+" bytes)");a.Ji=!1;a.ob||(a.ob=null,a.trigger(W.prototype.g.Xi,null))});else{try{this.ob=localStorage.getItem("__c2save_"+d)||"",B("Loaded state from WebStorage ("+this.ob.length+" bytes)")}catch(n){this.ob=null}this.Ji=
|
||||
!1;a.ob||(a.ob=null,a.trigger(W.prototype.g.Xi,null))}this.ln=this.Tj=""}null!==this.ob&&(this.Ib(),this.Uv(this.ob)?(this.re=this.ob,this.trigger(W.prototype.g.vs,null),this.re=""):a.trigger(W.prototype.g.Xi,null),this.ob=null)};f.prototype.Lw=function(){var a,g,c,d,e,k,m,n={c2save:!0,version:1,rt:{time:this.Bb.U,walltime:this.Ge.U,timescale:this.eh,tickcount:this.Wd,execcount:this.pj,next_uid:this.li,running_layout:this.Ba.da,start_time_offset:Date.now()-this.Fk},types:{},layouts:{},events:{groups:{},
|
||||
cnds:{},acts:{},vars:{}}};a=0;for(g=this.D.length;a<g;a++)if(e=this.D[a],!e.ca&&!this.yn(e)){k={instances:[]};Ua(e.Na)&&(k.ex=b(e.Na));c=0;for(d=e.e.length;c<d;c++)k.instances.push(this.kn(e.e[c]));n.types[e.da.toString()]=k}a=0;for(g=this.vd.length;a<g;a++)c=this.vd[a],n.layouts[c.da.toString()]=c.yb();d=n.events.groups;a=0;for(g=this.kg.length;a<g;a++)c=this.kg[a],d[c.da.toString()]=this.Dj[c.Jh].Ih;g=n.events.cnds;for(m in this.Pe)this.Pe.hasOwnProperty(m)&&(a=this.Pe[m],Ua(a.Na)&&(g[m]={ex:b(a.Na)}));
|
||||
g=n.events.acts;for(m in this.Le)this.Le.hasOwnProperty(m)&&(a=this.Le[m],Ua(a.Na)&&(g[m]={ex:b(a.Na)}));g=n.events.vars;for(m in this.kh)this.kh.hasOwnProperty(m)&&(a=this.kh[m],a.Mj||a.parent&&!a.Vh||(g[m]=a.data));n.system=this.Vd.yb();return JSON.stringify(n)};f.prototype.Iq=function(){var a,b,g,c,d,e;this.ue={};a=0;for(b=this.D.length;a<b;a++)if(g=this.D[a],!g.ca)for(c=0,d=g.e.length;c<d;c++)e=g.e[c],this.ue[e.uid.toString()]=e};f.prototype.Uv=function(a){var b;try{b=JSON.parse(a)}catch(g){return!1}if(!b.c2save||
|
||||
1<b.version)return!1;this.Ph=!0;a=b.rt;this.Bb.reset();this.Bb.U=a.time;this.Ge.reset();this.Ge.U=a.walltime||0;this.eh=a.timescale;this.Wd=a.tickcount;this.pj=a.execcount;this.Fk=Date.now()-a.start_time_offset;var c=a.running_layout;if(c!==this.Ba.da)if(c=this.$o(c))this.Mo(c);else return;var d,e,k,m,n,t,f;t=b.types;for(e in t)if(t.hasOwnProperty(e)&&(m=this.Cj(parseInt(e,10)))&&!m.ca&&!this.yn(m)){t[e].ex?m.Na=t[e].ex:Xa(m.Na);n=m.e;k=t[e].instances;c=0;for(d=oa(n.length,k.length);c<d;c++)this.Uj(n[c],
|
||||
k[c]);c=k.length;for(d=n.length;c<d;c++)this.$d(n[c]);c=n.length;for(d=k.length;c<d;c++){n=null;if(m.La.cf&&(n=this.Ba.Bj(k[c].w.l),!n))continue;n=this.Re(m.Vc,n,!1,0,0,!0);this.Uj(n,k[c])}m.bh=!0}this.Ib();this.Iq();d=b.layouts;for(e in d)d.hasOwnProperty(e)&&(c=this.$o(parseInt(e,10)))&&c.Pb(d[e]);d=b.events.groups;for(e in d)d.hasOwnProperty(e)&&(c=this.$u(parseInt(e,10)))&&this.Dj[c.Jh]&&this.Dj[c.Jh].Nw(d[e]);c=b.events.cnds;for(e in this.Pe)this.Pe.hasOwnProperty(e)&&(c.hasOwnProperty(e)?this.Pe[e].Na=
|
||||
c[e].ex:this.Pe[e].Na={});c=b.events.acts;for(e in this.Le)this.Le.hasOwnProperty(e)&&(c.hasOwnProperty(e)?this.Le[e].Na=c[e].ex:this.Le[e].Na={});c=b.events.vars;for(e in c)c.hasOwnProperty(e)&&this.kh.hasOwnProperty(e)&&(this.kh[e].data=c[e]);this.li=a.next_uid;this.Ph=!1;c=0;for(d=this.uj.length;c<d;++c)n=this.uj[c],this.trigger(Object.getPrototypeOf(n.type.La).g.Ui,n);L(this.uj);this.Vd.Pb(b.system);c=0;for(d=this.D.length;c<d;c++)if(m=this.D[c],!m.ca&&!this.yn(m))for(b=0,e=m.e.length;b<e;b++){n=
|
||||
m.e[b];if(m.ac)for(t=n.Hh(),L(n.siblings),a=0,k=m.nc.length;a<k;a++)f=m.nc[a],m!==f&&n.siblings.push(f.e[t]);n.ae&&n.ae();if(n.X)for(a=0,k=n.X.length;a<k;a++)t=n.X[a],t.ae&&t.ae()}return this.V=!0};f.prototype.kn=function(a,g){var c,d,e,k,m;k=a.type;e=k.La;var n={};g?n.c2=!0:n.uid=a.uid;Ua(a.Na)&&(n.ex=b(a.Na));if(a.kb&&a.kb.length)for(n.ivs={},c=0,d=a.kb.length;c<d;c++)n.ivs[a.type.fm[c].toString()]=a.kb[c];if(e.cf){e={x:a.x,y:a.y,w:a.width,h:a.height,l:a.n.da,zi:a.Kd()};0!==a.j&&(e.a=a.j);1!==a.opacity&&
|
||||
(e.o=a.opacity);.5!==a.qc&&(e.hX=a.qc);.5!==a.rc&&(e.hY=a.rc);0!==a.Jb&&(e.bm=a.Jb);a.visible||(e.v=a.visible);a.rh||(e.ce=a.rh);-1!==a.ki&&(e.mts=a.ki);if(k.P.length)for(e.fx=[],c=0,d=k.P.length;c<d;c++)m=k.P[c],e.fx.push({name:m.name,active:a.Ke[m.index],params:a.Sa[m.index]});n.w=e}if(a.X&&a.X.length)for(n.behs={},c=0,d=a.X.length;c<d;c++)k=a.X[c],k.yb&&(n.behs[k.type.da.toString()]=k.yb());a.yb&&(n.data=a.yb());return n};f.prototype.bv=function(a,b){var g,c;g=0;for(c=a.fm.length;g<c;g++)if(a.fm[g]===
|
||||
b)return g;return-1};f.prototype.Yu=function(a,b){var g,c;g=0;for(c=a.X.length;g<c;g++)if(a.X[g].type.da===b)return g;return-1};f.prototype.Uj=function(a,b,g){var c,d,e,k,m;m=a.type;var n=m.La;if(g){if(!b.c2)return}else a.uid=b.uid;b.ex?a.Na=b.ex:Xa(a.Na);if(d=b.ivs)for(c in d)d.hasOwnProperty(c)&&(e=this.bv(m,parseInt(c,10)),0>e||e>=a.kb.length||(k=d[c],null===k&&(k=NaN),a.kb[e]=k));if(n.cf){e=b.w;a.n.da!==e.l&&(d=a.n,a.n=this.Ba.Bj(e.l),a.n?(d.Yg(a,!0),a.n.oh(a,!0),a.la(),a.n.Ei(0)):(a.n=d,g||this.$d(a)));
|
||||
a.x=e.x;a.y=e.y;a.width=e.w;a.height=e.h;a.Cd=e.zi;a.j=e.hasOwnProperty("a")?e.a:0;a.opacity=e.hasOwnProperty("o")?e.o:1;a.qc=e.hasOwnProperty("hX")?e.hX:.5;a.rc=e.hasOwnProperty("hY")?e.hY:.5;a.visible=e.hasOwnProperty("v")?e.v:!0;a.rh=e.hasOwnProperty("ce")?e.ce:!0;a.ki=e.hasOwnProperty("mts")?e.mts:-1;a.Jb=e.hasOwnProperty("bm")?e.bm:0;a.sh=gb(a.Jb);this.F&&hb(a,a.Jb,this.F);a.la();if(e.hasOwnProperty("fx"))for(g=0,d=e.fx.length;g<d;g++)k=m.Ol(e.fx[g].name),0>k||(a.Ke[k]=e.fx[g].active,a.Sa[k]=
|
||||
e.fx[g].params);a.Bd()}if(m=b.behs)for(c in m)m.hasOwnProperty(c)&&(g=this.Yu(a,parseInt(c,10)),0>g||a.X[g].Pb(m[c]));b.data&&a.Pb(b.data)};f.prototype.Ro=function(a,b,g){window.resolveLocalFileSystemURL(cordova.file.applicationDirectory+"www/"+a,function(a){a.file(b,g)},g)};f.prototype.Ru=function(a,b){this.Ro("data.js",function(g){var c=new FileReader;c.onload=function(b){a(b.target.result)};c.onerror=b;c.readAsText(g)},b)};var U=[],R=0;f.prototype.Fm=function(){if(U.length&&!(8<=R)){R++;var a=
|
||||
U.shift();this.Ot(a.filename,a.Vw,a.nu)}};f.prototype.So=function(a,b,g){var c=this;U.push({filename:a,Vw:function(a){R--;c.Fm();b(a)},nu:function(a){R--;c.Fm();g(a)}});this.Fm()};f.prototype.Ot=function(a,b,g){this.Ro(a,function(a){var g=new FileReader;g.onload=function(a){b(a.target.result)};g.readAsArrayBuffer(a)},g)};f.prototype.Su=function(a,b,g){var c="",d=a.toLowerCase(),e=d.substr(d.length-4),d=d.substr(d.length-5);".mp4"===e?c="video/mp4":".webm"===d?c="video/webm":".m4a"===e?c="audio/mp4":
|
||||
".mp3"===e&&(c="audio/mpeg");this.So(a,function(a){a=URL.createObjectURL(new Blob([a],{type:c}));b(a)},g)};f.prototype.Gv=function(a){return/^(?:[a-z]+:)?\/\//.test(a)||"data:"===a.substr(0,5)||"blob:"===a.substr(0,5)};f.prototype.mn=function(a,b){this.Kj&&!this.Gv(b)?this.Su(b,function(b){a.src=b},function(a){alert("Failed to load image: "+a)}):a.src=b};f.prototype.zk=function(a,b){"undefined"!==typeof a.imageSmoothingEnabled?a.imageSmoothingEnabled=b:(a.webkitImageSmoothingEnabled=b,a.mozImageSmoothingEnabled=
|
||||
b,a.msImageSmoothingEnabled=b)};Vb=function(a){return new f(document.getElementById(a))};Wb=function(a,b){return new f({dc:!0,width:a,height:b})};window.cr_createRuntime=Vb;window.cr_createDCRuntime=Wb;window.createCocoonJSRuntime=function(){window.c2cocoonjs=!0;var a=document.createElement("screencanvas")||document.createElement("canvas");a.hl=!0;document.body.appendChild(a);a=new f(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 f(document.getElementById("canvas"));window.c2runtime=a;window.c2runtime.setSize(window.innerWidth,window.innerHeight);return a}})();window.cr_getC2Runtime=function(){var f=document.getElementById("c2canvas");return f?f.c2runtime:window.c2runtime?window.c2runtime:null};window.cr_getSnapshot=function(f,p){var h=window.cr_getC2Runtime();h&&h.Kt(f,p)};
|
||||
window.cr_sizeCanvas=function(f,p){if(0!==f&&0!==p){var h=window.cr_getC2Runtime();h&&h.setSize(f,p)}};window.cr_setSuspended=function(f){var p=window.cr_getC2Runtime();p&&p.setSuspended(f)};
|
||||
(function(){function f(a,b){this.b=a;this.Ef=null;this.scrollX=this.b.Xa/2;this.scrollY=this.b.Wa/2;this.scale=1;this.j=0;this.ug=!0;this.name=b[0];this.iw=b[1];this.hw=b[2];this.width=b[1];this.height=b[2];this.ur=b[3];this.Yq=b[4];this.da=b[5];var c=b[6],d,e;this.T=[];this.Mh=[];d=0;for(e=c.length;d<e;d++){var f=new Xb(this,c[d]);f.dq=d;this.T.push(f)}c=b[7];this.Ze=[];d=0;for(e=c.length;d<e;d++){var f=c[d],h=this.b.D[f[1]];h.Vc||(h.Vc=f);this.Ze.push(f);-1===this.Mh.indexOf(h)&&this.Mh.push(h)}this.P=
|
||||
[];this.na=[];this.Be=!0;this.Sa=[];d=0;for(e=b[8].length;d<e;d++)this.P.push({id:b[8][d][0],name:b[8][d][1],gb:-1,xd:!1,A:!0,index:d}),this.Sa.push(b[8][d][2].slice(0));this.Bd();this.Xg=new ua(0,0,1,1);this.$m=new ua(0,0,1,1);this.jf={}}function p(a,b){return a.Cd-b.Cd}function h(a,b){this.ub=a;this.b=a.b;this.e=[];this.scale=1;this.j=0;this.ie=!1;this.Ee=new ua(0,0,0,0);this.or=new va;this.za=this.xa=this.Aa=this.wa=0;this.fg=!1;this.He=-1;this.ul=0;this.name=b[0];this.index=b[1];this.da=b[2];
|
||||
this.visible=b[3];this.ld=b[4];this.Ad=b[5];this.ve=b[6];this.we=b[7];this.opacity=b[8];this.xj=b[9];this.Nc=b[10];this.Ie=b[11];this.Jb=b[12];this.ju=b[13];this.sh="source-over";this.Mb=this.Qb=0;this.Gb=null;this.se=l();this.zd=!0;this.Ig=new ua(0,0,-1,-1);this.zb=new ua(0,0,-1,-1);this.Nc&&(this.Gb=new fb(this.b.Xa,this.b.Wa));this.Sd=!1;var c=b[14],d,e;this.er=[];this.Cc=[];this.wh=[];d=0;for(e=c.length;d<e;d++){var f=c[d],h=this.b.D[f[1]];h.Vc||(h.Vc=f,h.It=this.index);this.Cc.push(f);-1===this.ub.Mh.indexOf(h)&&
|
||||
this.ub.Mh.push(h)}Ba(this.er,this.Cc);this.P=[];this.na=[];this.Be=!0;this.Sa=[];d=0;for(e=b[15].length;d<e;d++)this.P.push({id:b[15][d][0],name:b[15][d][1],gb:-1,xd:!1,A:!0,index:d}),this.Sa.push(b[15][d][2].slice(0));this.Bd();this.Xg=new ua(0,0,1,1);this.$m=new ua(0,0,1,1)}function l(){return b.length?b.pop():[]}function c(a){L(a);b.push(a)}f.prototype.Kw=function(a){var b=a.type.da.toString();this.jf.hasOwnProperty(b)||(this.jf[b]=[]);this.jf[b].push(this.b.kn(a))};f.prototype.fp=function(){var a=
|
||||
this.T[0];return!a.Ad&&1===a.opacity&&!a.xj&&a.visible};f.prototype.Bd=function(){L(this.na);this.Be=!0;var a,b,c;a=0;for(b=this.P.length;a<b;a++)c=this.P[a],c.A&&(this.na.push(c),c.xd||(this.Be=!1))};f.prototype.Nl=function(a){var b,c,d;b=0;for(c=this.P.length;b<c;b++)if(d=this.P[b],d.name===a)return d;return null};var q=[],e=!0;f.prototype.sn=function(){this.Yq&&(this.Ef=this.b.Dl[this.Yq],this.Ef.Bn());this.b.Ba=this;this.width=this.iw;this.height=this.hw;this.scrollX=this.b.Xa/2;this.scrollY=
|
||||
this.b.Wa/2;var a,b,c,d,f,h,r;a=0;for(c=this.b.D.length;a<c;a++)if(b=this.b.D[a],!b.ca)for(f=b.e,b=0,d=f.length;b<d;b++)if(h=f[b],h.n){var m=h.n.dq;m>=this.T.length&&(m=this.T.length-1);h.n=this.T[m];-1===h.n.e.indexOf(h)&&h.n.e.push(h);h.n.fg=!0}if(!e)for(a=0,c=this.T.length;a<c;++a)this.T[a].e.sort(p);L(q);this.ut();a=0;for(c=this.T.length;a<c;a++)h=this.T[a],h.Ht(),h.Uk();f=!1;if(!this.ug){for(r in this.jf)if(this.jf.hasOwnProperty(r)&&(b=this.b.Cj(parseInt(r,10)))&&!b.ca&&this.b.zn(b)){d=this.jf[r];
|
||||
a=0;for(c=d.length;a<c;a++){h=null;if(b.La.cf&&(h=this.Bj(d[a].w.l),!h))continue;h=this.b.Re(b.Vc,h,!1,0,0,!0);this.b.Uj(h,d[a]);f=!0;q.push(h)}L(d)}a=0;for(c=this.T.length;a<c;a++)this.T[a].e.sort(p),this.T[a].fg=!0}f&&(this.b.Ib(),this.b.Iq());for(a=0;a<q.length;a++)if(h=q[a],h.type.ac)for(c=h.Hh(),b=0,d=h.type.nc.length;b<d;b++)r=h.type.nc[b],h.type!==r&&(r.e.length>c?h.siblings.push(r.e[c]):r.Vc&&(f=this.b.Re(r.Vc,h.n,!0,h.x,h.y,!0),this.b.Ib(),r.Sk(),h.siblings.push(f),q.push(f)));a=0;for(c=
|
||||
this.Ze.length;a<c;a++)h=this.Ze[a],b=this.b.D[h[1]],b.ac||this.b.Re(this.Ze[a],null,!0);this.b.qh=null;this.b.Ib();if(this.b.Ra&&!this.b.lb)for(a=0,c=this.b.D.length;a<c;a++)r=this.b.D[a],!r.ca&&r.e.length&&r.Dq&&r.Dq(this.b.Ra);if(this.b.Ph)Ba(this.b.uj,q);else for(a=0,c=q.length;a<c;a++)h=q[a],this.b.trigger(Object.getPrototypeOf(h.type.La).g.Ui,h);L(q);this.b.Ph||this.b.trigger(W.prototype.g.Qn,null);this.ug=!1};f.prototype.Gt=function(){var a,b,c,d,e;b=a=0;for(c=this.Ze.length;a<c;a++)d=this.Ze[a],
|
||||
e=this.b.D[d[1]],e.global?e.ac||this.b.Re(d,null,!0):(this.Ze[b]=d,b++);Aa(this.Ze,b)};f.prototype.Uw=function(){this.b.Ph||this.b.trigger(W.prototype.g.us,null);this.b.im=!0;L(this.b.Vd.jc);var a,b,c,d,f,h;if(!this.ug)for(a=0,b=this.T.length;a<b;a++)for(this.T[a].Dn(),f=this.T[a].e,c=0,d=f.length;c<d;c++)h=f[c],h.type.global||this.b.zn(h.type)&&this.Kw(h);a=0;for(b=this.T.length;a<b;a++){f=this.T[a].e;c=0;for(d=f.length;c<d;c++)h=f[c],h.type.global||this.b.$d(h);this.b.Ib();L(f);this.T[a].fg=!0}a=
|
||||
0;for(b=this.b.D.length;a<b;a++)if(f=this.b.D[a],!(f.global||f.La.cf||f.La.Ek||f.ca)){c=0;for(d=f.e.length;c<d;c++)this.b.$d(f.e[c]);this.b.Ib()}e=!1;this.b.im=!1};new ua(0,0,0,0);f.prototype.je=function(a){var b,c=a,d=!1,e=!this.b.Ac;e&&(this.b.Sj||(this.b.Sj=document.createElement("canvas"),b=this.b.Sj,b.width=this.b.L,b.height=this.b.K,this.b.Ap=b.getContext("2d"),d=!0),b=this.b.Sj,c=this.b.Ap,b.width!==this.b.L&&(b.width=this.b.L,d=!0),b.height!==this.b.K&&(b.height=this.b.K,d=!0),d&&this.b.zk(c,
|
||||
this.b.Ta));c.globalAlpha=1;c.globalCompositeOperation="source-over";this.b.Eo&&!this.fp()&&c.clearRect(0,0,this.b.L,this.b.K);var f,h,d=0;for(f=this.T.length;d<f;d++)h=this.T[d],h.visible&&0<h.opacity&&11!==h.Jb&&(h.e.length||!h.Ad)?h.je(c):h.Uk();e&&a.drawImage(b,0,0,this.b.width,this.b.height)};f.prototype.qg=function(a){a.Sq(!0);this.b.eb||(this.b.eb=a.zc(this.b.L,this.b.K,this.b.Ta));if(this.b.eb.yf!==this.b.L||this.b.eb.xf!==this.b.K)a.deleteTexture(this.b.eb),this.b.eb=a.zc(this.b.L,this.b.K,
|
||||
this.b.Ta);a.bd(this.b.eb);this.b.Ac||a.Zf(this.b.L,this.b.K);var b,c;for(b=this.T.length-1;0<=b;--b)c=this.T[b],c.visible&&1===c.opacity&&c.Be&&0===c.Jb&&(c.e.length||!c.Ad)?c.qg(a):c.Uk();a.Sq(!1)};f.prototype.Xc=function(a){var b=0<this.na.length||this.b.ih||!this.b.Ac||this.b.Ia;if(b){this.b.eb||(this.b.eb=a.zc(this.b.L,this.b.K,this.b.Ta));if(this.b.eb.yf!==this.b.L||this.b.eb.xf!==this.b.K)a.deleteTexture(this.b.eb),this.b.eb=a.zc(this.b.L,this.b.K,this.b.Ta);a.bd(this.b.eb);this.b.Ac||a.Zf(this.b.L,
|
||||
this.b.K)}else this.b.eb&&(a.bd(null),a.deleteTexture(this.b.eb),this.b.eb=null);this.b.Eo&&!this.fp()&&a.clear(0,0,0,0);var c,d,e;c=0;for(d=this.T.length;c<d;c++)e=this.T[c],e.visible&&0<e.opacity&&(e.e.length||!e.Ad)?e.Xc(a):e.Uk();b&&(0===this.na.length||1===this.na.length&&this.b.Ac?(1===this.na.length?(b=this.na[0].index,a.ic(this.na[0].gb),a.ah(null,1/this.b.L,1/this.b.K,0,0,1,1,this.scale,this.j,0,0,this.b.L/2,this.b.K/2,this.b.Bb.U,this.Sa[b]),a.qk(this.na[0].gb)&&(this.b.V=!0)):a.ic(0),this.b.Ac||
|
||||
a.Zf(this.b.width,this.b.height),a.bd(null),a.Rq(!1),a.$g(1),a.Hc(this.b.eb),a.Pq(),a.ad(),a.Mc(),b=this.b.width/2,c=this.b.height/2,a.Ai(-b,c,b,c,b,-c,-b,-c),a.Hc(null),a.Rq(!0)):this.bn(a,null,null,null))};f.prototype.Gh=function(){return 0<this.na.length||this.b.ih||!this.b.Ac||this.b.Ia?this.b.eb:null};f.prototype.bp=function(){var a=this.T[0].pc(),b,c,d;b=1;for(c=this.T.length;b<c;b++)d=this.T[b],(0!==d.ve||0!==d.we)&&d.pc()<a&&(a=d.pc());return a};f.prototype.Nq=function(a){if(!this.ur){var b=
|
||||
1/this.bp()*this.b.L/2;a>this.width-b&&(a=this.width-b);a<b&&(a=b)}this.scrollX!==a&&(this.scrollX=a,this.b.V=!0)};f.prototype.Oq=function(a){if(!this.ur){var b=1/this.bp()*this.b.K/2;a>this.height-b&&(a=this.height-b);a<b&&(a=b)}this.scrollY!==a&&(this.scrollY=a,this.b.V=!0)};f.prototype.ut=function(){this.Nq(this.scrollX);this.Oq(this.scrollY)};f.prototype.bn=function(a,b,c,d){var e=c?c.na:b?b.na:this.na,f=1,h=0,m=0,t=0,p=this.b.L,l=this.b.K;c?(f=c.n.pc(),h=c.n.jb(),m=c.n.wa,t=c.n.xa,p=c.n.Aa,l=
|
||||
c.n.za):b&&(f=b.pc(),h=b.jb(),m=b.wa,t=b.xa,p=b.Aa,l=b.za);var q=this.b.Ll,w,x,z,H,G=0,O=1,ca,U,R=this.b.L,u=this.b.K,K=R/2,wa=u/2,J=b?b.Xg:this.Xg,D=b?b.$m:this.$m,E=0,y=0,F=0,A=0,M=R,ja=R,N=u,Y=u,S=z=0;H=c?c.n.jb():0;if(c){w=0;for(x=e.length;w<x;w++)z+=a.hv(e[w].gb),S+=a.jv(e[w].gb);A=c.Ja;E=b.mb(A.left,A.top,!0);F=b.mb(A.left,A.top,!1);M=b.mb(A.right,A.bottom,!0);N=b.mb(A.right,A.bottom,!1);0!==H&&(w=b.mb(A.right,A.top,!0),x=b.mb(A.right,A.top,!1),y=b.mb(A.left,A.bottom,!0),A=b.mb(A.left,A.bottom,
|
||||
!1),H=Math.min(E,M,w,y),M=Math.max(E,M,w,y),E=H,H=Math.min(F,N,x,A),N=Math.max(F,N,x,A),F=H);E-=z;F-=S;M+=z;N+=S;D.left=E/R;D.top=1-F/u;D.right=M/R;D.bottom=1-N/u;y=E=qa(E);A=F=qa(F);ja=M=sa(M);Y=N=sa(N);y-=z;A-=S;ja+=z;Y+=S;0>E&&(E=0);0>F&&(F=0);M>R&&(M=R);N>u&&(N=u);0>y&&(y=0);0>A&&(A=0);ja>R&&(ja=R);Y>u&&(Y=u);J.left=E/R;J.top=1-F/u;J.right=M/R;J.bottom=1-N/u}else J.left=D.left=0,J.top=D.top=0,J.right=D.right=1,J.bottom=D.bottom=1;S=c&&(a.xi(e[0].gb)||0!==z||0!==S||1!==c.opacity||c.type.La.Xp)||
|
||||
b&&!c&&1!==b.opacity;a.Pq();if(S){q[G]||(q[G]=a.zc(R,u,this.b.Ta));if(q[G].yf!==R||q[G].xf!==u)a.deleteTexture(q[G]),q[G]=a.zc(R,u,this.b.Ta);a.ic(0);a.bd(q[G]);U=Y-A;a.clearRect(y,u-A-U,ja-y,U);c?c.Xc(a):(a.Hc(this.b.nb),a.$g(b.opacity),a.ad(),a.translate(-K,-wa),a.Mc(),a.lf(E,N,M,N,M,F,E,F,J));D.left=D.top=0;D.right=D.bottom=1;c&&(H=J.top,J.top=J.bottom,J.bottom=H);G=1;O=0}a.$g(1);z=e.length-1;var ya=a.Wm(e[z].gb)||!b&&!c&&!this.b.Ac;w=H=0;for(x=e.length;w<x;w++){q[G]||(q[G]=a.zc(R,u,this.b.Ta));
|
||||
if(q[G].yf!==R||q[G].xf!==u)a.deleteTexture(q[G]),q[G]=a.zc(R,u,this.b.Ta);a.ic(e[w].gb);H=e[w].index;a.qk(e[w].gb)&&(this.b.V=!0);0!=w||S?(a.ah(d,1/R,1/u,D.left,D.top,D.right,D.bottom,f,h,m,t,(m+p)/2,(t+l)/2,this.b.Bb.U,c?c.Sa[H]:b?b.Sa[H]:this.Sa[H]),a.Hc(null),w!==z||ya?(a.bd(q[G]),U=Y-A,ca=u-A-U,a.clearRect(y,ca,ja-y,U)):(c?a.nf(c.Qb,c.Mb):b&&a.nf(b.Qb,b.Mb),a.bd(d)),a.Hc(q[O]),a.ad(),a.translate(-K,-wa),a.Mc(),a.lf(E,N,M,N,M,F,E,F,J),w!==z||ya||a.Hc(null)):(a.bd(q[G]),U=Y-A,ca=u-A-U,a.clearRect(y,
|
||||
ca,ja-y,U),c?(c.ab&&c.ab.hb?(ca=c.ab.hb,O=1/ca.width,ca=1/ca.height):(O=1/c.width,ca=1/c.height),a.ah(d,O,ca,D.left,D.top,D.right,D.bottom,f,h,m,t,(m+p)/2,(t+l)/2,this.b.Bb.U,c.Sa[H]),c.Xc(a)):(a.ah(d,1/R,1/u,0,0,1,1,f,h,m,t,(m+p)/2,(t+l)/2,this.b.Bb.U,b?b.Sa[H]:this.Sa[H]),a.Hc(b?this.b.nb:this.b.eb),a.ad(),a.translate(-K,-wa),a.Mc(),a.lf(E,N,M,N,M,F,E,F,J)),D.left=D.top=0,D.right=D.bottom=1,c&&!ya&&(H=N,N=F,F=H));G=0===G?1:0;O=0===G?1:0}ya&&(a.ic(0),c?a.nf(c.Qb,c.Mb):b?a.nf(b.Qb,b.Mb):this.b.Ac||
|
||||
(a.Zf(this.b.width,this.b.height),K=this.b.width/2,wa=this.b.height/2,F=E=0,M=this.b.width,N=this.b.height),a.bd(d),a.Hc(q[O]),a.ad(),a.translate(-K,-wa),a.Mc(),c&&1===e.length&&!S?a.lf(E,F,M,F,M,N,E,N,J):a.lf(E,N,M,N,M,F,E,F,J),a.Hc(null))};f.prototype.Bj=function(a){var b,c;b=0;for(c=this.T.length;b<c;b++)if(this.T[b].da===a)return this.T[b];return null};f.prototype.yb=function(){var a,b,c,d={sx:this.scrollX,sy:this.scrollY,s:this.scale,a:this.j,w:this.width,h:this.height,fv:this.ug,persist:this.jf,
|
||||
fx:[],layers:{}};a=0;for(b=this.P.length;a<b;a++)c=this.P[a],d.fx.push({name:c.name,active:c.A,params:this.Sa[c.index]});a=0;for(b=this.T.length;a<b;a++)c=this.T[a],d.layers[c.da.toString()]=c.yb();return d};f.prototype.Pb=function(a){var b,c,d,e;this.scrollX=a.sx;this.scrollY=a.sy;this.scale=a.s;this.j=a.a;this.width=a.w;this.height=a.h;this.jf=a.persist;"undefined"!==typeof a.fv&&(this.ug=a.fv);var f=a.fx;b=0;for(c=f.length;b<c;b++)if(d=this.Nl(f[b].name))d.A=f[b].active,this.Sa[d.index]=f[b].params;
|
||||
this.Bd();b=a.layers;for(e in b)b.hasOwnProperty(e)&&(a=this.Bj(parseInt(e,10)))&&a.Pb(b[e])};Jb=f;h.prototype.Bd=function(){L(this.na);this.Be=!0;var a,b,c;a=0;for(b=this.P.length;a<b;a++)c=this.P[a],c.A&&(this.na.push(c),c.xd||(this.Be=!1))};h.prototype.Nl=function(a){var b,c,d;b=0;for(c=this.P.length;b<c;b++)if(d=this.P[b],d.name===a)return d;return null};h.prototype.Ht=function(){var a,b,c,d,e,f;b=a=0;for(c=this.Cc.length;a<c;a++){d=this.Cc[a];e=this.b.D[d[1]];f=this.b.zn(e);e=!0;if(!f||this.ub.ug){d=
|
||||
this.b.Re(d,this,!0);if(!d)continue;q.push(d);d.type.global&&(e=!1,this.wh.push(d.uid))}e&&(this.Cc[b]=this.Cc[a],b++)}this.Cc.length=b;this.b.Ib();!this.b.G&&this.P.length&&(this.Jb=this.ju);this.sh=gb(this.Jb);this.b.F&&hb(this,this.Jb,this.b.F);this.zd=!0};h.prototype.Yg=function(a,b){var c=Da(this.e,a);0>c||(b&&this.Nc&&a.fc&&a.fc.right>=a.fc.left&&(a.Ga(),this.Gb.update(a,a.fc,null),a.fc.set(0,0,-1,-1)),c===this.e.length-1?this.e.pop():(za(this.e,c),this.Ei(c)),this.zd=!0)};h.prototype.oh=function(a,
|
||||
b){a.Cd=this.e.length;this.e.push(a);b&&this.Nc&&a.fc&&a.la();this.zd=!0};h.prototype.sw=function(a){this.e.unshift(a);this.Ei(0)};h.prototype.$v=function(a,b,c){var d=a.Kd();b=b.Kd();za(this.e,d);d<b&&b--;c&&b++;b===this.e.length?this.e.push(a):this.e.splice(b,0,a);this.Ei(d<b?d:b)};h.prototype.Ei=function(a){-1===this.He?this.He=a:a<this.He&&(this.He=a);this.zd=this.fg=!0};h.prototype.Dn=function(){if(this.fg){-1===this.He&&(this.He=0);var a,b,c;if(this.Nc)for(a=this.He,b=this.e.length;a<b;++a)c=
|
||||
this.e[a],c.Cd=a,this.Gb.Xv(c.fc);else for(a=this.He,b=this.e.length;a<b;++a)this.e[a].Cd=a;this.fg=!1;this.He=-1}};h.prototype.pc=function(a){return this.cv()*(this.b.Ac||a?this.b.ph:1)};h.prototype.cv=function(){return(this.scale*this.ub.scale-1)*this.Ie+1};h.prototype.jb=function(){return this.ie?0:Ja(this.ub.j+this.j)};var b=[],w=[],d=[];h.prototype.Ul=function(){this.Dn();this.Gb.Hq(this.wa,this.xa,this.Aa,this.za,d);if(!d.length)return l();if(1===d.length){var a=l();Ba(a,d[0]);L(d);return a}for(var b=
|
||||
!0;1<d.length;){for(var a=d,e=void 0,k=void 0,f=void 0,h=void 0,r=void 0,e=0,k=a.length;e<k-1;e+=2){var f=a[e],h=a[e+1],r=l(),m=f,t=h,p=r,q=0,Q=0,C=0,x=m.length,z=t.length,H=void 0,G=void 0;for(p.length=x+z;q<x&&Q<z;++C)H=m[q],G=t[Q],H.Cd<G.Cd?(p[C]=H,++q):(p[C]=G,++Q);for(;q<x;++q,++C)p[C]=m[q];for(;Q<z;++Q,++C)p[C]=t[Q];b||(c(f),c(h));w.push(r)}1===k%2&&(b?(f=l(),Ba(f,a[k-1]),w.push(f)):w.push(a[k-1]));Ba(a,w);L(w);b=!1}a=d[0];L(d);return a};h.prototype.je=function(a){this.Sd=this.xj||1!==this.opacity||
|
||||
0!==this.Jb;var b=this.b.canvas,d=a,e=!1;this.Sd&&(this.b.Rj||(this.b.Rj=document.createElement("canvas"),b=this.b.Rj,b.width=this.b.L,b.height=this.b.K,this.b.zp=b.getContext("2d"),e=!0),b=this.b.Rj,d=this.b.zp,b.width!==this.b.L&&(b.width=this.b.L,e=!0),b.height!==this.b.K&&(b.height=this.b.K,e=!0),e&&this.b.zk(d,this.b.Ta),this.Ad&&d.clearRect(0,0,this.b.L,this.b.K));d.globalAlpha=1;d.globalCompositeOperation="source-over";this.Ad||(d.fillStyle="rgb("+this.ld[0]+","+this.ld[1]+","+this.ld[2]+")",
|
||||
d.fillRect(0,0,this.b.L,this.b.K));d.save();this.ie=!0;var e=this.Rb(0,0,!0,!0),f=this.Rb(0,0,!1,!0);this.ie=!1;this.b.ze&&(e=Math.round(e),f=Math.round(f));this.vk(e,f,d);var h=this.pc();d.scale(h,h);d.translate(-e,-f);this.Nc?(this.zb.left=this.Gb.Yb(this.wa),this.zb.top=this.Gb.Zb(this.xa),this.zb.right=this.Gb.Yb(this.Aa),this.zb.bottom=this.Gb.Zb(this.za),this.zd||!this.zb.zh(this.Ig)?(c(this.se),e=this.Ul(),this.zd=!1,this.Ig.uh(this.zb)):e=this.se):e=this.e;for(var r,m=null,f=0,h=e.length;f<
|
||||
h;++f)r=e[f],r!==m&&(this.du(r,d),m=r);this.Nc&&(this.se=e);d.restore();this.Sd&&(a.globalCompositeOperation=this.sh,a.globalAlpha=this.opacity,a.drawImage(b,0,0))};h.prototype.du=function(a,b){if(a.visible&&0!==a.width&&0!==a.height){a.Ga();var c=a.Ja;c.right<this.wa||c.bottom<this.xa||c.left>this.Aa||c.top>this.za||(b.globalCompositeOperation=a.sh,a.je(b))}};h.prototype.Uk=function(){this.ie=!0;var a=this.Rb(0,0,!0,!0),b=this.Rb(0,0,!1,!0);this.ie=!1;this.b.ze&&(a=Math.round(a),b=Math.round(b));
|
||||
this.vk(a,b,null)};h.prototype.vk=function(a,b,c){var d=this.pc();this.wa=a;this.xa=b;this.Aa=a+1/d*this.b.L;this.za=b+1/d*this.b.K;this.wa>this.Aa&&(a=this.wa,this.wa=this.Aa,this.Aa=a);this.xa>this.za&&(a=this.xa,this.xa=this.za,this.za=a);a=this.jb();0!==a&&(c&&(c.translate(this.b.L/2,this.b.K/2),c.rotate(-a),c.translate(this.b.L/-2,this.b.K/-2)),this.Ee.set(this.wa,this.xa,this.Aa,this.za),this.Ee.offset((this.wa+this.Aa)/-2,(this.xa+this.za)/-2),this.or.Wq(this.Ee,a),this.or.zo(this.Ee),this.Ee.offset((this.wa+
|
||||
this.Aa)/2,(this.xa+this.za)/2),this.wa=this.Ee.left,this.xa=this.Ee.top,this.Aa=this.Ee.right,this.za=this.Ee.bottom)};h.prototype.qg=function(a){if(this.Sd=this.xj){this.b.nb||(this.b.nb=a.zc(this.b.L,this.b.K,this.b.Ta));if(this.b.nb.yf!==this.b.L||this.b.nb.xf!==this.b.K)a.deleteTexture(this.b.nb),this.b.nb=a.zc(this.b.L,this.b.K,this.b.Ta);a.bd(this.b.nb)}this.ie=!0;var b=this.Rb(0,0,!0,!0),d=this.Rb(0,0,!1,!0);this.ie=!1;this.b.ze&&(b=Math.round(b),d=Math.round(d));this.vk(b,d,null);b=this.pc();
|
||||
a.ad();a.scale(b,b);a.wk(-this.jb());a.translate((this.wa+this.Aa)/-2,(this.xa+this.za)/-2);a.Mc();this.Nc?(this.zb.left=this.Gb.Yb(this.wa),this.zb.top=this.Gb.Zb(this.xa),this.zb.right=this.Gb.Yb(this.Aa),this.zb.bottom=this.Gb.Zb(this.za),this.zd||!this.zb.zh(this.Ig)?(c(this.se),b=this.Ul(),this.zd=!1,this.Ig.uh(this.zb)):b=this.se):b=this.e;for(var e,f=null,d=b.length-1;0<=d;--d)e=b[d],e!==f&&(this.fu(b[d],a),f=e);this.Nc&&(this.se=b);this.Ad||(this.ul=this.b.Df++,a.Ak(this.ul),a.Qq(1,1,1),a.Vo(),
|
||||
a.Dw())};h.prototype.Xc=function(a){var b=0,d=0;if(this.Sd=this.xj||1!==this.opacity||0<this.na.length||0!==this.Jb){this.b.nb||(this.b.nb=a.zc(this.b.L,this.b.K,this.b.Ta));if(this.b.nb.yf!==this.b.L||this.b.nb.xf!==this.b.K)a.deleteTexture(this.b.nb),this.b.nb=a.zc(this.b.L,this.b.K,this.b.Ta);a.bd(this.b.nb);this.Ad&&a.clear(0,0,0,0)}this.Ad||(this.b.Ia?(a.Ak(this.ul),a.Qq(this.ld[0]/255,this.ld[1]/255,this.ld[2]/255),a.Vo(),a.Qw()):a.clear(this.ld[0]/255,this.ld[1]/255,this.ld[2]/255,1));this.ie=
|
||||
!0;var e=this.Rb(0,0,!0,!0),b=this.Rb(0,0,!1,!0);this.ie=!1;this.b.ze&&(e=Math.round(e),b=Math.round(b));this.vk(e,b,null);e=this.pc();a.ad();a.scale(e,e);a.wk(-this.jb());a.translate((this.wa+this.Aa)/-2,(this.xa+this.za)/-2);a.Mc();this.Nc?(this.zb.left=this.Gb.Yb(this.wa),this.zb.top=this.Gb.Zb(this.xa),this.zb.right=this.Gb.Yb(this.Aa),this.zb.bottom=this.Gb.Zb(this.za),this.zd||!this.zb.zh(this.Ig)?(c(this.se),b=this.Ul(),this.zd=!1,this.Ig.uh(this.zb)):b=this.se):b=this.e;var f,h,r=null,d=0;
|
||||
for(f=b.length;d<f;++d)h=b[d],h!==r&&(this.eu(b[d],a),r=h);this.Nc&&(this.se=b);this.Sd&&(b=this.na.length?this.na[0].gb:0,d=this.na.length?this.na[0].index:0,0===this.na.length||1===this.na.length&&!a.Wm(b)&&1===this.opacity?(1===this.na.length?(a.ic(b),a.ah(this.ub.Gh(),1/this.b.L,1/this.b.K,0,0,1,1,e,this.jb(),this.wa,this.xa,(this.wa+this.Aa)/2,(this.xa+this.za)/2,this.b.Bb.U,this.Sa[d]),a.qk(b)&&(this.b.V=!0)):a.ic(0),a.bd(this.ub.Gh()),a.$g(this.opacity),a.Hc(this.b.nb),a.nf(this.Qb,this.Mb),
|
||||
a.ad(),a.Mc(),e=this.b.L/2,b=this.b.K/2,a.Ai(-e,b,e,b,e,-b,-e,-b),a.Hc(null)):this.ub.bn(a,this,null,this.ub.Gh()))};h.prototype.eu=function(a,b){if(a.visible&&0!==a.width&&0!==a.height){a.Ga();var c=a.Ja;c.right<this.wa||c.bottom<this.xa||c.left>this.Aa||c.top>this.za||(b.Ak(a.Df),a.Br?this.gu(a,b):(b.ic(0),b.nf(a.Qb,a.Mb),a.Xc(b)))}};h.prototype.fu=function(a,b){if(a.visible&&0!==a.width&&0!==a.height){a.Ga();var c=a.Ja;c.right<this.wa||c.bottom<this.xa||c.left>this.Aa||c.top>this.za||(a.Df=this.b.Df++,
|
||||
0===a.Jb&&1===a.opacity&&a.Be&&a.qg&&(b.Ak(a.Df),a.qg(b)))}};h.prototype.gu=function(a,b){var c=a.na[0].gb,d=a.na[0].index,e=this.pc();if(1!==a.na.length||b.Wm(c)||b.vw(c)||(a.j||a.n.jb())&&b.xi(c)||1!==a.opacity||a.type.La.Xp)this.ub.bn(b,this,a,this.Sd?this.b.nb:this.ub.Gh()),b.ad(),b.scale(e,e),b.wk(-this.jb()),b.translate((this.wa+this.Aa)/-2,(this.xa+this.za)/-2),b.Mc();else{b.ic(c);b.nf(a.Qb,a.Mb);b.qk(c)&&(this.b.V=!0);var f=0,h=0,m=0,t=0;b.xi(c)&&(t=a.Ja,f=this.mb(t.left,t.top,!0),h=this.mb(t.left,
|
||||
t.top,!1),m=this.mb(t.right,t.bottom,!0),t=this.mb(t.right,t.bottom,!1),f=f/windowWidth,h=1-h/windowHeight,m=m/windowWidth,t=1-t/windowHeight);var p;a.ab&&a.ab.hb?(p=a.ab.hb,c=1/p.width,p=1/p.height):(c=1/a.width,p=1/a.height);b.ah(this.Sd?this.b.nb:this.ub.Gh(),c,p,f,h,m,t,e,this.jb(),this.wa,this.xa,(this.wa+this.Aa)/2,(this.xa+this.za)/2,this.b.Bb.U,a.Sa[d]);a.Xc(b)}};h.prototype.Rb=function(a,b,c,d){var e=this.b.devicePixelRatio;this.b.yg&&(a*=e,b*=e);var e=this.b.xq,f=this.b.yq,e=(this.ub.scrollX-
|
||||
e)*this.ve+e,f=(this.ub.scrollY-f)*this.we+f,h=e,m=f,t=1/this.pc(!d);d?(h-=this.b.L*t/2,m-=this.b.K*t/2):(h-=this.b.width*t/2,m-=this.b.height*t/2);h+=a*t;m+=b*t;b=this.jb();0!==b&&(h-=e,m-=f,a=Math.cos(b),b=Math.sin(b),d=h*a-m*b,m=m*a+h*b,h=d+e,m+=f);return c?h:m};h.prototype.mb=function(a,b,c){var d=this.b.xq,e=this.b.yq,d=(this.ub.scrollX-d)*this.ve+d,f=(this.ub.scrollY-e)*this.we+e,e=d,h=f,m=this.jb();if(0!==m){a-=d;b-=f;var t=Math.cos(-m),m=Math.sin(-m),p=a*t-b*m;b=b*t+a*m;a=p+d;b+=f}d=1/this.pc(!1);
|
||||
e-=this.b.L*d/2;h-=this.b.K*d/2;e=(a-e)/d;return c?e:(b-h)/d};h.prototype.yb=function(){var a,b,c,d={s:this.scale,a:this.j,vl:this.wa,vt:this.xa,vr:this.Aa,vb:this.za,v:this.visible,bc:this.ld,t:this.Ad,px:this.ve,py:this.we,o:this.opacity,zr:this.Ie,fx:[],cg:this.wh,instances:[]};a=0;for(b=this.P.length;a<b;a++)c=this.P[a],d.fx.push({name:c.name,active:c.A,params:this.Sa[c.index]});return d};h.prototype.Pb=function(a){var b,c,d;this.scale=a.s;this.j=a.a;this.wa=a.vl;this.xa=a.vt;this.Aa=a.vr;this.za=
|
||||
a.vb;this.visible=a.v;this.ld=a.bc;this.Ad=a.t;this.ve=a.px;this.we=a.py;this.opacity=a.o;this.Ie=a.zr;this.wh=a.cg||[];Ba(this.Cc,this.er);var e=new ba;b=0;for(d=this.wh.length;b<d;++b)e.add(this.wh[b]);c=b=0;for(d=this.Cc.length;b<d;++b)e.contains(this.Cc[b][2])||(this.Cc[c]=this.Cc[b],++c);Aa(this.Cc,c);c=a.fx;b=0;for(d=c.length;b<d;b++)if(a=this.Nl(c[b].name))a.A=c[b].active,this.Sa[a.index]=c[b].params;this.Bd();this.e.sort(p);this.fg=!0};Xb=h})();
|
||||
(function(){function f(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 p(a,b){return a.index-b.index}function h(a){var b,c,d,e;2===a.length?a[0].index>a[1].index&&(b=a[0],a[0]=a[1],a[1]=b):2<a.length&&a.sort(p);a.length>=v.length&&(v.length=a.length+1);v[a.length]||(v[a.length]=[]);e=v[a.length];b=0;for(c=e.length;b<c;b++)if(d=e[b],f(a,d))return d;e.push(a);return a}
|
||||
function l(a,b){this.b=a;this.qr={};this.Qo={};this.Zl=!1;this.hp=new ba;this.zl=[];this.fl=[];this.name=b[0];var c=b[1];this.Ve=[];var d,e;d=0;for(e=c.length;d<e;d++)this.jp(c[d],null,this.Ve)}function c(a){this.type=a;this.e=[];this.ea=[];this.Fa=!0}function q(a,b,c){this.sheet=a;this.parent=b;this.b=a.b;this.Ma=[];this.of=[];this.gp=this.Ok=this.vn=this.dm=this.group=this.dr=!1;this.Kb=[];this.jd=[];this.dd=[];this.Jh="";this.Ih=this.dm=this.group=!1;this.dj=null;c[1]&&(this.Jh=c[1][1].toLowerCase(),
|
||||
this.group=!0,this.dm=!!c[1][0],this.dj=[],this.Ih=this.dm,this.b.kg.push(this),this.b.Dj[this.Jh]=this);this.wd=c[2];this.da=c[4];this.group||(this.b.yo[this.da.toString()]=this);var d=c[5];a=0;for(b=d.length;a<b;a++){var e=new Yb(this,d[a]);e.index=a;this.Kb.push(e);this.jo(e.type)}d=c[6];a=0;for(b=d.length;a<b;a++)e=new Zb(this,d[a]),e.index=a,this.jd.push(e);if(8===c.length)for(c=c[7],a=0,b=c.length;a<b;a++)this.sheet.jp(c[a],this,this.dd);this.Nj=!1;this.Kb.length&&(this.Nj=null==this.Kb[0].type&&
|
||||
this.Kb[0].Ab==W.prototype.g.On)}function e(a,b){var c,d,e;if(a&&(-1===b.indexOf(a)&&b.push(a),a.ac))for(c=0,d=a.nc.length;c<d;c++)e=a.nc[c],a!==e&&-1===b.indexOf(e)&&b.push(e)}function b(a,b){this.yc=a;this.sheet=a.sheet;this.b=a.b;this.aa=[];this.Ua=[];this.Na={};this.index=-1;this.mh=!1;this.Ab=this.b.Je(b[1]);this.trigger=0<b[3];this.Po=2===b[3];this.Nd=b[4];this.gm=b[5];this.Sv=b[6];this.da=b[7];this.b.Pe[this.da.toString()]=this;-1===b[0]?(this.type=null,this.qb=this.jn,this.vf=null,this.md=
|
||||
-1):(this.type=this.b.D[b[0]],this.qb=this.Sv?this.Iw:this.hn,b[2]?(this.vf=this.type.Aj(b[2]),this.md=this.type.Ml(b[2])):(this.vf=null,this.md=-1),this.yc.parent&&this.yc.parent.Bk());this.Po&&(this.qb=this.Jw);if(10===b.length){var c,d,e=b[9];c=0;for(d=e.length;c<d;c++){var g=new $b(this,e[c]);this.aa.push(g)}this.Ua.length=e.length}}function w(a,b){this.yc=a;this.sheet=a.sheet;this.b=a.b;this.aa=[];this.Ua=[];this.Na={};this.index=-1;this.mh=!1;this.Ab=this.b.Je(b[1]);-1===b[0]?(this.type=null,
|
||||
this.qb=this.jn,this.vf=null,this.md=-1):(this.type=this.b.D[b[0]],this.qb=this.hn,b[2]?(this.vf=this.type.Aj(b[2]),this.md=this.type.Ml(b[2])):(this.vf=null,this.md=-1));this.da=b[3];this.b.Le[this.da.toString()]=this;if(6===b.length){var c,d,e=b[5];c=0;for(d=e.length;c<d;c++){var g=new $b(this,e[c]);this.aa.push(g)}this.Ua.length=e.length}}function d(){r++;P.length===r&&P.push(new ac);return P[r]}function a(a,b){this.$c=a;this.yc=a.yc;this.sheet=a.sheet;this.b=a.b;this.type=b[0];this.Id=null;this.Ce=
|
||||
0;this.get=null;this.Go=0;this.ub=null;this.key=0;this.object=null;this.index=0;this.Oi=this.bg=this.Oi=this.bg=this.To=this.Ff=this.Pi=null;this.hd=!1;var c,d,e;switch(b[0]){case 0:case 7:this.Id=new bc(this,b[1]);this.Ce=0;this.get=this.pv;break;case 1:this.Id=new bc(this,b[1]);this.Ce=0;this.get=this.qv;break;case 5:this.Id=new bc(this,b[1]);this.Ce=0;this.get=this.uv;break;case 3:case 8:this.Go=b[1];this.get=this.nv;break;case 6:this.ub=this.b.xm[b[1]];this.get=this.vv;break;case 9:this.key=b[1];
|
||||
this.get=this.tv;break;case 4:this.object=this.b.D[b[1]];this.get=this.wv;this.yc.jo(this.object);this.$c instanceof Zb?this.yc.Bk():this.yc.parent&&this.yc.parent.Bk();break;case 10:this.index=b[1];a.type&&a.type.ca?(this.get=this.rv,this.hd=!0):this.get=this.sv;break;case 11:this.Pi=b[1];this.Ff=null;this.get=this.ov;break;case 2:case 12:this.To=b[1];this.get=this.lv;break;case 13:for(this.get=this.xv,this.bg=[],this.Oi=[],c=1,d=b.length;c<d;c++)e=new $b(this.$c,b[c]),this.bg.push(e),this.Oi.push(0)}}
|
||||
function g(a,b,c){this.sheet=a;this.parent=b;this.b=a.b;this.Ma=[];this.name=c[1];this.Dr=c[2];this.q=c[3];this.Vh=!!c[4];this.Mj=!!c[5];this.da=c[6];this.b.kh[this.da.toString()]=this;this.data=this.q;this.parent?(this.Sf=this.Vh||this.Mj?-1:this.b.Sw++,this.b.mt.push(this)):(this.Sf=-1,this.b.el.push(this))}function n(a,b,c){this.sheet=a;this.parent=b;this.b=a.b;this.Ma=[];this.Lh=null;this.Dv=c[1];this.A=!0}function k(){this.gr=[];this.reset(null)}var v=[];l.prototype.toString=function(){return this.name};
|
||||
l.prototype.jp=function(a,b,c){switch(a[0]){case 0:a=new cc(this,b,a);if(a.wd)for(c.push(a),c=0,b=a.Kb.length;c<b;c++)a.Kb[c].trigger&&this.kp(a,c);else a.tp()?this.kp(a,0):c.push(a);break;case 1:a=new Ub(this,b,a);c.push(a);break;case 2:a=new dc(this,b,a),c.push(a)}};l.prototype.Ya=function(){var a,b;a=0;for(b=this.Ve.length;a<b;a++)this.Ve[a].Ya(a<b-1&&this.Ve[a+1].Nj)};l.prototype.Bn=function(){L(this.zl);L(this.fl);this.ho(this);L(this.fl)};l.prototype.ho=function(a){var b,c,d,e,g=a.zl,k=a.fl,
|
||||
f=this.hp.sf();b=0;for(c=f.length;b<c;++b)d=f[b],e=d.Lh,!d.A||a===e||-1<k.indexOf(e)||(k.push(e),e.ho(a),g.push(e))};l.prototype.qb=function(a){this.b.gz||(this.Zl=!0,a||(this.b.mm=!0));var b,c;b=0;for(c=this.Ve.length;b<c;b++){var d=this.Ve[b];d.qb();this.b.tl(d.Ma);this.b.Ye&&this.b.Ib()}a||(this.b.mm=!1)};l.prototype.kp=function(a,b){a.wd||this.b.Qk.push(a);var c,d,e=a.Kb[b],g;e.type?g=e.type.name:g="system";var k=(c=e.Po)?this.Qo:this.qr;k[g]||(k[g]=[]);g=k[g];k=e.Ab;if(c){if(e.aa.length&&(e=
|
||||
e.aa[0],1===e.type&&2===e.Id.type)){e=e.Id.value.toLowerCase();c=0;for(d=g.length;c<d;c++)if(g[c].method==k){c=g[c].Ah;c[e]?c[e].push([a,b]):c[e]=[[a,b]];return}c={};c[e]=[[a,b]];g.push({method:k,Ah:c})}}else{c=0;for(d=g.length;c<d;c++)if(g[c].method==k){g[c].Ah.push([a,b]);return}rc&&k===rc.prototype.g.ig?g.unshift({method:k,Ah:[[a,b]]}):g.push({method:k,Ah:[[a,b]]})}};Kb=l;c.prototype.Yl=function(){return this.Fa?this.type.e.length:this.e.length};c.prototype.qd=function(){return this.Fa?this.type.e:
|
||||
this.e};c.prototype.vi=function(a){a&&(a.b.Sb().oc.wd?(this.Fa&&(L(this.e),Ba(this.ea,a.type.e),this.Fa=!1),a=this.ea.indexOf(a),-1!==a&&(this.e.push(this.ea[a]),this.ea.splice(a,1))):(this.Fa=!1,L(this.e),this.e[0]=a))};pb=c;window._c2hh_="0764F5122709682D4499715308638A3CE8A82A1F";q.prototype.Ya=function(a){var b,c=this.parent;if(this.group)for(this.Ok=!0;c;){if(!c.group){this.Ok=!1;break}c=c.parent}this.vn=!this.tp()&&(!this.parent||this.parent.group&&this.parent.Ok);this.gp=!!a;this.of=this.Ma.slice(0);
|
||||
for(c=this.parent;c;){a=0;for(b=c.Ma.length;a<b;a++)this.kt(c.Ma[a]);c=c.parent}this.Ma=h(this.Ma);this.of=h(this.of);a=0;for(b=this.Kb.length;a<b;a++)this.Kb[a].Ya();a=0;for(b=this.jd.length;a<b;a++)this.jd[a].Ya();a=0;for(b=this.dd.length;a<b;a++)this.dd[a].Ya(a<b-1&&this.dd[a+1].Nj)};q.prototype.Nw=function(a){if(this.Ih!==!!a){this.Ih=!!a;var b;a=0;for(b=this.dj.length;a<b;++a)this.dj[a].Ar();0<b&&this.b.Ba.Ef&&this.b.Ba.Ef.Bn()}};q.prototype.jo=function(a){e(a,this.Ma)};q.prototype.kt=function(a){e(a,
|
||||
this.of)};q.prototype.Bk=function(){this.dr=!0;this.parent&&this.parent.Bk()};q.prototype.tp=function(){return this.Kb.length?this.Kb[0].trigger:!1};q.prototype.qb=function(){var a,b,c=!1,d=this.b,e=this.b.Sb();e.oc=this;var g=this.Kb;this.Nj||(e.Bl=!1);if(this.wd){0===g.length&&(c=!0);e.mc=0;for(a=g.length;e.mc<a;e.mc++)b=g[e.mc],b.trigger||(b=b.qb())&&(c=!0);(e.Of=c)&&this.gn()}else{e.mc=0;for(a=g.length;e.mc<a;e.mc++)if(b=g[e.mc].qb(),!b){e.Of=!1;this.vn&&d.Ye&&d.Ib();return}e.Of=!0;this.gn()}this.lu(e)};
|
||||
q.prototype.lu=function(a){a.Of&&this.gp&&(a.Bl=!0);this.vn&&this.b.Ye&&this.b.Ib()};q.prototype.Gw=function(a){this.b.Sb().oc=this;this.Kb[a].qb()&&(this.gn(),this.b.Sb().Of=!0)};q.prototype.gn=function(){var a=this.b.Sb(),b;a.kc=0;for(b=this.jd.length;a.kc<b;a.kc++)if(this.jd[a.kc].qb())return;this.Mq()};q.prototype.Ew=function(){var a=this.b.Sb(),b;for(b=this.jd.length;a.kc<b;a.kc++)if(this.jd[a.kc].qb())return;this.Mq()};q.prototype.Mq=function(){if(this.dd.length){var a,b,c,d,e=this.dd.length-
|
||||
1;this.b.Ym(this);if(this.dr)for(a=0,b=this.dd.length;a<b;a++)c=this.dd[a],(d=!this.Ok||!this.group&&a<e)&&this.b.Xm(c.Ma),c.qb(),d?this.b.Vg(c.Ma):this.b.tl(c.Ma);else for(a=0,b=this.dd.length;a<b;a++)this.dd[a].qb();this.b.Bq()}};q.prototype.Hw=function(){var a=this.b.Sb();a.oc=this;var b=!1,c;a.mc=0;for(c=this.Kb.length;a.mc<c;a.mc++)if(this.Kb[a.mc].qb())b=!0;else if(!this.wd)return!1;return this.wd?b:!0};q.prototype.Jv=function(a){var b=a.index;if(0===b)return!0;for(--b;0<=b;--b)if(this.Kb[b].type===
|
||||
a.type)return!1;return!0};cc=q;b.prototype.Ya=function(){var a,b,c;a=0;for(b=this.aa.length;a<b;a++)c=this.aa[a],c.Ya(),c.hd&&(this.mh=!0)};b.prototype.Jw=function(){return!0};b.prototype.jn=function(){var a,b;a=0;for(b=this.aa.length;a<b;a++)this.Ua[a]=this.aa[a].get();return Ta(this.Ab.apply(this.b.Vd,this.Ua),this.gm)};b.prototype.Iw=function(){var a,b;a=0;for(b=this.aa.length;a<b;a++)this.Ua[a]=this.aa[a].get();a=this.Ab.apply(this.vf?this.vf:this.type,this.Ua);this.type.Me();return a};b.prototype.hn=
|
||||
function(){var a,b,c,d,e,g,k,f,h=this.type,n=h.ya(),r=this.yc.wd&&!this.trigger;b=0;var p=h.ac,v=h.ca,l=h.le,q=this.md,w=-1<q,P=this.mh,J=this.aa,D=this.Ua,E=this.gm,y=this.Ab,F;if(P)for(b=0,e=J.length;b<e;++b)g=J[b],g.hd||(D[b]=g.get(0));else for(b=0,e=J.length;b<e;++b)D[b]=J[b].get(0);if(n.Fa){L(n.e);L(n.ea);F=h.e;a=0;for(d=F.length;a<d;++a){f=F[a];if(P)for(b=0,e=J.length;b<e;++b)g=J[b],g.hd&&(D[b]=g.get(a));w?(b=0,v&&(b=f.type.tg[l]),b=y.apply(f.X[q+b],D)):b=y.apply(f,D);(k=Ta(b,E))?n.e.push(f):
|
||||
r&&n.ea.push(f)}h.finish&&h.finish(!0);n.Fa=!1;h.Me();return n.Yl()}c=0;F=(k=r&&!this.yc.Jv(this))?n.ea:n.e;var A=!1;a=0;for(d=F.length;a<d;++a){f=F[a];if(P)for(b=0,e=J.length;b<e;++b)g=J[b],g.hd&&(D[b]=g.get(a));w?(b=0,v&&(b=f.type.tg[l]),b=y.apply(f.X[q+b],D)):b=y.apply(f,D);if(Ta(b,E))if(A=!0,k){if(n.e.push(f),p)for(b=0,e=f.siblings.length;b<e;b++)g=f.siblings[b],g.type.ya().e.push(g)}else{F[c]=f;if(p)for(b=0,e=f.siblings.length;b<e;b++)g=f.siblings[b],g.type.ya().e[c]=g;c++}else if(k){F[c]=f;
|
||||
if(p)for(b=0,e=f.siblings.length;b<e;b++)g=f.siblings[b],g.type.ya().ea[c]=g;c++}else if(r&&(n.ea.push(f),p))for(b=0,e=f.siblings.length;b<e;b++)g=f.siblings[b],g.type.ya().ea.push(g)}Aa(F,c);if(p)for(v=h.nc,a=0,d=v.length;a<d;a++)f=v[a].ya(),k?Aa(f.ea,c):Aa(f.e,c);c=A;if(k&&!A)for(a=0,d=n.e.length;a<d;a++){f=n.e[a];if(P)for(b=0,e=J.length;b<e;b++)g=J[b],g.hd&&(D[b]=g.get(a));b=w?y.apply(f.X[q],D):y.apply(f,D);if(Ta(b,E)){A=!0;break}}h.finish&&h.finish(c||r);return r?A:n.Yl()};Yb=b;w.prototype.Ya=
|
||||
function(){var a,b,c;a=0;for(b=this.aa.length;a<b;a++)c=this.aa[a],c.Ya(),c.hd&&(this.mh=!0)};w.prototype.jn=function(){var a=this.b,b,c,d=this.aa,e=this.Ua;b=0;for(c=d.length;b<c;++b)e[b]=d[b].get();return this.Ab.apply(a.Vd,e)};w.prototype.hn=function(){var a=this.type,b=this.md,c=a.le,d=this.mh,e=this.aa,g=this.Ua,k=this.Ab,f=a.ya().qd(),a=a.ca,h=-1<b,n,r,p,v,l,q;if(d)for(r=0,v=e.length;r<v;++r)l=e[r],l.hd||(g[r]=l.get(0));else for(r=0,v=e.length;r<v;++r)g[r]=e[r].get(0);n=0;for(p=f.length;n<p;++n){q=
|
||||
f[n];if(d)for(r=0,v=e.length;r<v;++r)l=e[r],l.hd&&(g[r]=l.get(n));h?(r=0,a&&(r=q.type.tg[c]),k.apply(q.X[b+r],g)):k.apply(q,g)}return!1};Zb=w;var P=[],r=-1;a.prototype.Ya=function(){var a,b;if(11===this.type)this.Ff=this.b.Zo(this.Pi,this.yc.parent);else if(13===this.type)for(a=0,b=this.bg.length;a<b;a++)this.bg[a].Ya();this.Id&&this.Id.Ya()};a.prototype.Zv=function(a){this.hd||!a||a.La.Ek||(this.hd=!0)};a.prototype.Vq=function(){this.hd=!0};a.prototype.pv=function(a){this.Ce=a||0;a=d();this.Id.get(a);
|
||||
r--;return a.data};a.prototype.qv=function(a){this.Ce=a||0;a=d();this.Id.get(a);r--;return I(a.data)?a.data:""};a.prototype.wv=function(){return this.object};a.prototype.nv=function(){return this.Go};a.prototype.uv=function(a){this.Ce=a||0;a=d();this.Id.get(a);r--;return a.sb()?this.b.Eh(a.data):this.b.Sl(a.data)};a.prototype.vv=function(){return this.ub};a.prototype.tv=function(){return this.key};a.prototype.sv=function(){return this.index};a.prototype.rv=function(a){a=a||0;var b=this.$c.type,c=
|
||||
null,c=b.ya(),d=c.qd();if(d.length)c=d[a%d.length].type;else if(c.ea.length)c=c.ea[a%c.ea.length].type;else if(b.e.length)c=b.e[a%b.e.length].type;else return 0;return this.index+c.sj[b.le]};a.prototype.ov=function(){return this.Ff};a.prototype.lv=function(){return this.To};a.prototype.xv=function(){var a,b;a=0;for(b=this.bg.length;a<b;a++)this.Oi[a]=this.bg[a].get();return this.Oi};$b=a;g.prototype.Ya=function(){this.Ma=h(this.Ma)};g.prototype.Ck=function(a){var b=this.b.Yo();this.parent&&!this.Vh&&
|
||||
b?(this.Sf>=b.length&&(b.length=this.Sf+1),b[this.Sf]=a):this.data=a};g.prototype.cp=function(){var a=this.b.Yo();return!this.parent||this.Vh||!a||this.Mj?this.data:this.Sf>=a.length||"undefined"===typeof a[this.Sf]?this.q:a[this.Sf]};g.prototype.qb=function(){!this.parent||this.Vh||this.Mj||this.Ck(this.q)};Ub=g;n.prototype.toString=function(){return"include:"+this.Lh.toString()};n.prototype.Ya=function(){this.Lh=this.b.Dl[this.Dv];this.sheet.hp.add(this);this.Ma=h(this.Ma);for(var a=this.parent;a;)a.group&&
|
||||
a.dj.push(this),a=a.parent;this.Ar()};n.prototype.qb=function(){this.parent&&this.b.yi(this.b.D);this.Lh.Zl||this.Lh.qb(!0);this.parent&&this.b.Vg(this.b.D)};n.prototype.Ar=function(){for(var a=this.parent;a;){if(a.group&&!a.Ih){this.A=!1;return}a=a.parent}this.A=!0};dc=n;k.prototype.reset=function(a){this.oc=a;this.kc=this.mc=0;L(this.gr);this.Bl=this.Of=!1};Tb=k})();
|
||||
(function(){function f(c,b){this.$c=c;this.b=c.b;this.type=b[0];this.get=[this.Du,this.zu,this.Mu,this.Pu,this.ou,this.Nu,this.Hu,this.wu,this.Gu,this.Lu,this.pu,this.Ku,this.xu,this.Iu,this.Eu,this.Fu,this.Au,this.Bu,this.vu,this.Ou,this.Ju,this.Cu,this.uu,this.yu][this.type];var f=null;this.te=this.aa=this.Ua=this.Ab=this.Mk=this.second=this.first=this.value=null;this.md=-1;this.sd=null;this.Cr=-1;this.Ff=this.Pi=null;this.Zg=!1;switch(this.type){case 0:case 1:case 2:this.value=b[1];break;case 3:this.first=
|
||||
new bc(c,b[1]);break;case 18:this.first=new bc(c,b[1]);this.second=new bc(c,b[2]);this.Mk=new bc(c,b[3]);break;case 19:this.Ab=this.b.Je(b[1]);this.Ab!==W.prototype.Ea.random&&this.Ab!==W.prototype.Ea.Bt||this.$c.Vq();this.Ua=[];this.aa=[];3===b.length?(f=b[2],this.Ua.length=f.length+1):this.Ua.length=1;break;case 20:this.te=this.b.D[b[1]];this.md=-1;this.Ab=this.b.Je(b[2]);this.Zg=b[3];sc&&this.Ab===sc.prototype.Ea.Hr&&this.$c.Vq();b[4]?this.sd=new bc(c,b[4]):this.sd=null;this.Ua=[];this.aa=[];6===
|
||||
b.length?(f=b[5],this.Ua.length=f.length+1):this.Ua.length=1;break;case 21:this.te=this.b.D[b[1]];this.Zg=b[2];b[3]?this.sd=new bc(c,b[3]):this.sd=null;this.Cr=b[4];break;case 22:this.te=this.b.D[b[1]];this.te.Aj(b[2]);this.md=this.te.Ml(b[2]);this.Ab=this.b.Je(b[3]);this.Zg=b[4];b[5]?this.sd=new bc(c,b[5]):this.sd=null;this.Ua=[];this.aa=[];7===b.length?(f=b[6],this.Ua.length=f.length+1):this.Ua.length=1;break;case 23:this.Pi=b[1],this.Ff=null}this.$c.Zv(this.te);4<=this.type&&17>=this.type&&(this.first=
|
||||
new bc(c,b[1]),this.second=new bc(c,b[2]));if(f){var d,a;d=0;for(a=f.length;d<a;d++)this.aa.push(new bc(c,f[d]))}}function p(){++q;c.length===q&&c.push(new ac);return c[q]}function h(c,b,f){var d,a;d=0;for(a=c.length;d<a;++d)c[d].get(f),b[d+1]=f.data}function l(c,b){this.type=c||ec.hg;this.data=b||0;this.Vf=null;this.type==ec.hg&&(this.data=Math.floor(this.data))}f.prototype.Ya=function(){23===this.type&&(this.Ff=this.$c.b.Zo(this.Pi,this.$c.yc.parent));this.first&&this.first.Ya();this.second&&this.second.Ya();
|
||||
this.Mk&&this.Mk.Ya();this.sd&&this.sd.Ya();if(this.aa){var c,b;c=0;for(b=this.aa.length;c<b;c++)this.aa[c].Ya()}};var c=[],q=-1;f.prototype.Ou=function(c){var b=this.aa,f=this.Ua;f[0]=c;c=p();h(b,f,c);--q;this.Ab.apply(this.b.Vd,f)};f.prototype.Ju=function(c){var b=this.te,f=this.Ua,d=this.aa,a=this.sd,g=this.Ab,n=this.$c.Ce,k=b.ya(),v=k.qd();if(!v.length)if(k.ea.length)v=k.ea;else{this.Zg?c.Ub(""):c.Ca(0);return}f[0]=c;c.Vf=b;c=p();h(d,f,c);a&&(a.get(c),c.sb()&&(n=c.data,v=b.e));--q;b=v.length;
|
||||
if(n>=b||n<=-b)n%=b;0>n&&(n+=b);g.apply(v[n],f)};f.prototype.uu=function(c){var b=this.te,f=this.Ua,d=this.aa,a=this.sd,g=this.md,n=this.Ab,k=this.$c.Ce,v=b.ya(),l=v.qd();if(!l.length)if(v.ea.length)l=v.ea;else{this.Zg?c.Ub(""):c.Ca(0);return}f[0]=c;c.Vf=b;c=p();h(d,f,c);a&&(a.get(c),c.sb()&&(k=c.data,l=b.e));--q;d=l.length;if(k>=d||k<=-d)k%=d;0>k&&(k+=d);k=l[k];l=0;b.ca&&(l=k.type.tg[b.le]);n.apply(k.X[g+l],f)};f.prototype.Cu=function(c){var b=this.sd,f=this.te,d=this.Cr,a=this.$c.Ce,g=f.ya(),h=
|
||||
g.qd();if(!h.length)if(g.ea.length)h=g.ea;else{this.Zg?c.Ub(""):c.Ca(0);return}if(b){g=p();b.get(g);if(g.sb()){a=g.data;h=f.e;0!==h.length&&(a%=h.length,0>a&&(a+=h.length));a=f.Rl(a);f=a.kb[d];I(f)?c.Ub(f):c.H(f);--q;return}--q}b=h.length;if(a>=b||a<=-b)a%=b;0>a&&(a+=b);a=h[a];h=0;f.ca&&(h=a.type.sj[f.le]);f=a.kb[d+h];I(f)?c.Ub(f):c.H(f)};f.prototype.Du=function(c){c.type=ec.hg;c.data=this.value};f.prototype.zu=function(c){c.type=ec.gg;c.data=this.value};f.prototype.Mu=function(c){c.type=ec.String;
|
||||
c.data=this.value};f.prototype.Pu=function(c){this.first.get(c);c.sb()&&(c.data=-c.data)};f.prototype.ou=function(c){this.first.get(c);var b=p();this.second.get(b);c.sb()&&b.sb()&&(c.data+=b.data,b.Ag()&&c.Kg());--q};f.prototype.Nu=function(c){this.first.get(c);var b=p();this.second.get(b);c.sb()&&b.sb()&&(c.data-=b.data,b.Ag()&&c.Kg());--q};f.prototype.Hu=function(c){this.first.get(c);var b=p();this.second.get(b);c.sb()&&b.sb()&&(c.data*=b.data,b.Ag()&&c.Kg());--q};f.prototype.wu=function(c){this.first.get(c);
|
||||
var b=p();this.second.get(b);c.sb()&&b.sb()&&(c.data/=b.data,c.Kg());--q};f.prototype.Gu=function(c){this.first.get(c);var b=p();this.second.get(b);c.sb()&&b.sb()&&(c.data%=b.data,b.Ag()&&c.Kg());--q};f.prototype.Lu=function(c){this.first.get(c);var b=p();this.second.get(b);c.sb()&&b.sb()&&(c.data=Math.pow(c.data,b.data),b.Ag()&&c.Kg());--q};f.prototype.pu=function(c){this.first.get(c);var b=p();this.second.get(b);b.Dg()||c.Dg()?this.ru(c,b):this.qu(c,b);--q};f.prototype.ru=function(c,b){c.Dg()&&
|
||||
b.Dg()?this.tu(c,b):this.su(c,b)};f.prototype.tu=function(c,b){c.data+=b.data};f.prototype.su=function(c,b){c.Dg()?c.data+=(Math.round(1E10*b.data)/1E10).toString():c.Ub(c.data.toString()+b.data)};f.prototype.qu=function(c,b){c.Ca(c.data&&b.data?1:0)};f.prototype.Ku=function(c){this.first.get(c);var b=p();this.second.get(b);c.sb()&&b.sb()&&(c.data||b.data?c.Ca(1):c.Ca(0));--q};f.prototype.vu=function(c){this.first.get(c);c.data?this.second.get(c):this.Mk.get(c)};f.prototype.xu=function(c){this.first.get(c);
|
||||
var b=p();this.second.get(b);c.Ca(c.data===b.data?1:0);--q};f.prototype.Iu=function(c){this.first.get(c);var b=p();this.second.get(b);c.Ca(c.data!==b.data?1:0);--q};f.prototype.Eu=function(c){this.first.get(c);var b=p();this.second.get(b);c.Ca(c.data<b.data?1:0);--q};f.prototype.Fu=function(c){this.first.get(c);var b=p();this.second.get(b);c.Ca(c.data<=b.data?1:0);--q};f.prototype.Au=function(c){this.first.get(c);var b=p();this.second.get(b);c.Ca(c.data>b.data?1:0);--q};f.prototype.Bu=function(c){this.first.get(c);
|
||||
var b=p();this.second.get(b);c.Ca(c.data>=b.data?1:0);--q};f.prototype.yu=function(c){var b=this.Ff.cp();ka(b)?c.H(b):c.Ub(b)};bc=f;l.prototype.Ag=function(){return this.type===ec.gg};l.prototype.sb=function(){return this.type===ec.hg||this.type===ec.gg};l.prototype.Dg=function(){return this.type===ec.String};l.prototype.Kg=function(){this.Ag()||(this.Dg()&&(this.data=parseFloat(this.data)),this.type=ec.gg)};l.prototype.Ca=function(c){this.type=ec.hg;this.data=Math.floor(c)};l.prototype.H=function(c){this.type=
|
||||
ec.gg;this.data=c};l.prototype.Ub=function(c){this.type=ec.String;this.data=c};l.prototype.$f=function(c){ka(c)?(this.type=ec.gg,this.data=c):I(c)?(this.type=ec.String,this.data=c.toString()):(this.type=ec.hg,this.data=0)};ac=l;ec={hg:0,gg:1,String:2}})();function W(f){this.b=f;this.jc=[]}
|
||||
W.prototype.yb=function(){var f={},p,h,l,c,q,e,b,w;f.waits=[];var d=f.waits,a;p=0;for(h=this.jc.length;p<h;p++){e=this.jc[p];a={t:e.time,st:e.br,s:e.rn,ev:e.rg.da,sm:[],sols:{}};e.rg.jd[e.kc]&&(a.act=e.rg.jd[e.kc].da);l=0;for(c=e.Ma.length;l<c;l++)a.sm.push(e.Ma[l].da);for(q in e.Vb)if(e.Vb.hasOwnProperty(q)){b=this.b.D[parseInt(q,10)];w={sa:e.Vb[q].xk,insts:[]};l=0;for(c=e.Vb[q].ne.length;l<c;l++)w.insts.push(e.Vb[q].ne[l].uid);a.sols[b.da.toString()]=w}d.push(a)}return f};
|
||||
W.prototype.Pb=function(f){f=f.waits;var p,h,l,c,q,e,b,w,d,a,g;L(this.jc);p=0;for(h=f.length;p<h;p++)if(e=f[p],w=this.b.yo[e.ev.toString()]){d=-1;l=0;for(c=w.jd.length;l<c;l++)if(w.jd[l].da===e.act){d=l;break}if(-1!==d){b={Vb:{},Ma:[],Al:!1};b.time=e.t;b.br=e.st||"";b.rn=!!e.s;b.rg=w;b.kc=d;l=0;for(c=e.sm.length;l<c;l++)(w=this.b.Cj(e.sm[l]))&&b.Ma.push(w);for(q in e.sols)if(e.sols.hasOwnProperty(q)&&(w=this.b.Cj(parseInt(q,10)))){d=e.sols[q];a={xk:d.sa,ne:[]};l=0;for(c=d.insts.length;l<c;l++)(g=
|
||||
this.b.Fh(d.insts[l]))&&a.ne.push(g);b.Vb[w.index.toString()]=a}this.jc.push(b)}}};
|
||||
(function(){function f(){}function p(){}function h(){}var l=W.prototype;f.prototype.Qn=function(){return!0};f.prototype.us=function(){return!0};f.prototype.Kr=function(c,b,f){return fc(c,b,f)};f.prototype.as=function(c){return c?c.visible:!1};f.prototype.Mr=function(c,b,f){return fc(c.cp(),b,f)};f.prototype.On=function(){var c=this.b.Sb();return c.Bl?!1:!c.Of};f.prototype.Rn=function(){return!0};f.prototype.gs=function(){return!0};f.prototype.Zk=function(){return!0};f.prototype.Vn=function(){return!0};
|
||||
f.prototype.vs=function(){return!0};f.prototype.Xi=function(){return!0};f.prototype.Fr=function(c,b,f){return Oa(V(c),V(f))<=V(b)};f.prototype.Yr=function(c,b){return Qa(V(c),V(b))};f.prototype.Xr=function(c,b,f){c=La(c);b=La(b);f=La(f);return Qa(f,b)?Qa(c,b)&&!Qa(c,f):!(!Qa(c,b)&&Qa(c,f))};l.g=new f;p.prototype.Vr=function(c){this.b.Wh||this.b.qh||(this.b.qh=c)};p.prototype.Nr=function(c,b,f,d){if(b&&c&&(b=this.b.Ho(c,b,f,d))){this.b.ud++;var a;this.b.trigger(Object.getPrototypeOf(c.La).g.Ui,b);
|
||||
if(b.ac)for(f=0,d=b.siblings.length;f<d;f++)a=b.siblings[f],this.b.trigger(Object.getPrototypeOf(a.type.La).g.Ui,a);this.b.ud--;c=c.ya();c.Fa=!1;L(c.e);c.e[0]=b;if(b.ac)for(f=0,d=b.siblings.length;f<d;f++)a=b.siblings[f],c=a.type.ya(),c.Fa=!1,L(c.e),c.e[0]=a}};p.prototype.Rs=function(c,b){c&&c.visible!==b&&(c.visible=b,this.b.V=!0)};p.prototype.Ws=function(c,b){0===c.Dr?ka(b)?c.Ck(b):c.Ck(parseFloat(b)):1===c.Dr&&c.Ck(b.toString())};var c=[],q=[];p.prototype.dt=function(e){if(!(0>e)){var b,f,d,a=
|
||||
this.b.Sb(),g;c.length?g=c.pop():g={Vb:{},Ma:[]};g.Al=!1;g.time=this.b.Bb.U+e;g.br="";g.rn=!1;g.rg=a.oc;g.kc=a.kc+1;e=0;for(b=this.b.D.length;e<b;e++)d=this.b.D[e],f=d.ya(),f.Fa&&-1===a.oc.Ma.indexOf(d)||(g.Ma.push(d),d=void 0,q.length?d=q.pop():d={ne:[]},d.xk=!1,d.xk=f.Fa,Ba(d.ne,f.e),g.Vb[e.toString()]=d);this.jc.push(g);return!0}};p.prototype.Js=function(){var c,b,f;c=0;for(b=this.b.el.length;c<b;c++)f=this.b.el[c],f.data=f.q};l.J=new p;h.prototype["int"]=function(c,b){I(b)?(c.Ca(parseInt(b,10)),
|
||||
isNaN(c.data)&&(c.data=0)):c.Ca(b)};h.prototype["float"]=function(c,b){I(b)?(c.H(parseFloat(b)),isNaN(c.data)&&(c.data=0)):c.H(b)};h.prototype.Tv=function(c,b){c.Ca(b.length||0)};h.prototype.random=function(c,b,f){void 0===f?c.H(Math.random()*b):c.H(Math.random()*(f-b)+b)};h.prototype.sqrt=function(c,b){c.H(Math.sqrt(b))};h.prototype.abs=function(c,b){c.H(Math.abs(b))};h.prototype.round=function(c,b){c.Ca(Math.round(b))};h.prototype.floor=function(c,b){c.Ca(Math.floor(b))};h.prototype.ceil=function(c,
|
||||
b){c.Ca(Math.ceil(b))};h.prototype.sin=function(c,b){c.H(Math.sin(V(b)))};h.prototype.cos=function(c,b){c.H(Math.cos(V(b)))};h.prototype.tan=function(c,b){c.H(Math.tan(V(b)))};h.prototype.asin=function(c,b){c.H(Ga(Math.asin(b)))};h.prototype.acos=function(c,b){c.H(Ga(Math.acos(b)))};h.prototype.atan=function(c,b){c.H(Ga(Math.atan(b)))};h.prototype.exp=function(c,b){c.H(Math.exp(b))};h.prototype.log10=function(c,b){c.H(Math.log(b)/Math.LN10)};h.prototype.max=function(c){var b=arguments[1];"number"!==
|
||||
typeof b&&(b=0);var f,d,a;f=2;for(d=arguments.length;f<d;f++)a=arguments[f],"number"===typeof a&&b<a&&(b=a);c.H(b)};h.prototype.min=function(c){var b=arguments[1];"number"!==typeof b&&(b=0);var f,d,a;f=2;for(d=arguments.length;f<d;f++)a=arguments[f],"number"===typeof a&&b>a&&(b=a);c.H(b)};h.prototype.Bf=function(c){c.H(this.b.Bf)};h.prototype.eh=function(c){c.H(this.b.eh)};h.prototype.time=function(c){c.H(this.b.Bb.U)};h.prototype.Wd=function(c){c.Ca(this.b.Wd)};h.prototype.dk=function(c){c.Ca(this.b.dk)};
|
||||
h.prototype.Kl=function(c){c.Ca(this.b.Kl)};h.prototype.j=function(c,b,f,d,a){c.H(Ga(Na(b,f,d,a)))};h.prototype.Ct=function(c,b,f,d){b<f?c.H(f):b>d?c.H(d):c.H(b)};h.prototype.left=function(c,b,f){c.Ub(I(b)?b.substr(0,f):"")};h.prototype.right=function(c,b,f){c.Ub(I(b)?b.substr(b.length-f):"")};h.prototype.replace=function(c,b,f,d){I(b)&&I(f)&&I(d)?c.Ub(b.replace(new RegExp(cb(f),"gi"),d)):c.Ub(I(b)?b:"")};h.prototype.trim=function(c,b){c.Ub(I(b)?b.trim():"")};h.prototype.Bt=function(c){var b=qa(Math.random()*
|
||||
(arguments.length-1));c.$f(arguments[b+1])};h.prototype.wl=function(c){c.H(this.b.wl/1E3)};h.prototype.Wj=function(c){c.H(this.b.Wj)};l.Ea=new h;l.Fw=function(){var e,b,f,d,a,g,h=this.b.Sb();e=0;for(f=this.jc.length;e<f;e++){d=this.jc[e];if(-1===d.time){if(!d.rn)continue}else if(d.time>this.b.Bb.U)continue;h.oc=d.rg;h.kc=d.kc;h.mc=0;for(b in d.Vb)d.Vb.hasOwnProperty(b)&&(a=this.b.D[parseInt(b,10)].ya(),g=d.Vb[b],a.Fa=g.xk,Ba(a.e,g.ne),a=g,L(a.ne),q.push(a));d.rg.Ew();this.b.tl(d.Ma);d.Al=!0}b=e=0;
|
||||
for(f=this.jc.length;e<f;e++)d=this.jc[e],this.jc[b]=d,d.Al?(Xa(d.Vb),L(d.Ma),c.push(d)):b++;Aa(this.jc,b)}})();
|
||||
(function(){ob=function(f,h){var l=f[1],c=f[3],q=f[4],e=f[5],b=f[6],w=f[7],d=f[8];h.g||(h.g={});h.J||(h.J={});h.Ea||(h.Ea={});var a=h.g,g=h.J,n=h.Ea;c&&(a.Bx=function(a,b){return fc(this.x,a,b)},a.Cx=function(a,b){return fc(this.y,a,b)},a.Kx=function(){var a=this.n;this.Ga();var b=this.Ja;return!(b.right<a.wa||b.bottom<a.xa||b.left>a.Aa||b.top>a.za)},a.Lx=function(){this.Ga();var a=this.Ja,b=this.b.Ba;return 0>a.right||0>a.bottom||a.left>b.width||a.top>b.height},a.Xx=function(a,b,c){var d=this.ya(),
|
||||
g=d.qd();if(!g.length)return!1;var e=g[0],f=e,h=Sa(e.x,e.y,b,c),n,p,l;n=1;for(p=g.length;n<p;n++)if(e=g[n],l=Sa(e.x,e.y,b,c),0===a&&l<h||1===a&&l>h)h=l,f=e;d.vi(f);return!0},g.Ey=function(a){this.x!==a&&(this.x=a,this.la())},g.Fy=function(a){this.y!==a&&(this.y=a,this.la())},g.vy=function(a,b){if(this.x!==a||this.y!==b)this.x=a,this.y=b,this.la()},g.wy=function(a,b){var c=a.dv(this);if(c){var d;c.Ql?(d=c.Ql(b,!0),c=c.Ql(b,!1)):(d=c.x,c=c.y);if(this.x!==d||this.y!==c)this.x=d,this.y=c,this.la()}},
|
||||
g.Px=function(a){0!==a&&(this.x+=Math.cos(this.j)*a,this.y+=Math.sin(this.j)*a,this.la())},g.Ox=function(a,b){0!==b&&(this.x+=Math.cos(V(a))*b,this.y+=Math.sin(V(a))*b,this.la())},n.$n=function(a){a.H(this.x)},n.ao=function(a){a.H(this.y)},n.Bf=function(a){a.H(this.b.Gf(this))});q&&(a.Ax=function(a,b){return fc(this.width,a,b)},a.xx=function(a,b){return fc(this.height,a,b)},g.Ys=function(a){this.width!==a&&(this.width=a,this.la())},g.ny=function(a){this.height!==a&&(this.height=a,this.la())},g.xy=
|
||||
function(a,b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.la()},n.My=function(a){a.H(this.width)},n.Fx=function(a){a.H(this.height)},n.tx=function(a){this.Ga();a.H(this.Ja.left)},n.vx=function(a){this.Ga();a.H(this.Ja.top)},n.ux=function(a){this.Ga();a.H(this.Ja.right)},n.rx=function(a){this.Ga();a.H(this.Ja.bottom)});e&&(a.Fr=function(a,b){return Oa(this.j,V(b))<=V(a)},a.Yr=function(a){return Qa(this.j,V(a))},a.Xr=function(a,b){var c=La(a),d=La(b),g=Ja(this.j);return Qa(d,
|
||||
c)?Qa(g,c)&&!Qa(g,d):!(!Qa(g,c)&&Qa(g,d))},g.iy=function(a){a=V(Ia(a));isNaN(a)||this.j===a||(this.j=a,this.la())},g.ey=function(a){0===a||isNaN(a)||(this.j+=V(a),this.j=Ja(this.j),this.la())},g.fy=function(a){0===a||isNaN(a)||(this.j-=V(a),this.j=Ja(this.j),this.la())},g.gy=function(a,b){var c=Pa(this.j,V(b),V(a));isNaN(c)||this.j===c||(this.j=c,this.la())},g.hy=function(a,b,c){a=Pa(this.j,Math.atan2(c-this.y,b-this.x),V(a));isNaN(a)||this.j===a||(this.j=a,this.la())},g.By=function(a,b){var c=Math.atan2(b-
|
||||
this.y,a-this.x);isNaN(c)||this.j===c||(this.j=c,this.la())},n.qx=function(a){a.H(Ka(this.j))});l||(a.Lr=function(a,b,c){return fc(this.kb[a],b,c)},a.Ix=function(a){return this.kb[a]},a.Yx=function(a,b){var c=this.ya(),d=c.qd();if(!d.length)return!1;var g=d[0],e=g,f=g.kb[b],h,n,p;h=1;for(n=d.length;h<n;h++)if(g=d[h],p=g.kb[b],0===a&&p<f||1===a&&p>f)f=p,e=g;c.vi(e);return!0},a.Wx=function(a){var b,c,d,g,e;if(this.b.Zu().gm){e=this.ya();if(e.Fa)for(e.Fa=!1,L(e.e),L(e.ea),d=this.e,b=0,c=d.length;b<c;b++)g=
|
||||
d[b],g.uid===a?e.ea.push(g):e.e.push(g);else{d=b=0;for(c=e.e.length;b<c;b++)g=e.e[b],e.e[d]=g,g.uid===a?e.ea.push(g):d++;Aa(e.e,d)}this.Me();return!!e.e.length}g=this.b.Fh(a);if(!g)return!1;e=this.ya();if(!e.Fa&&-1===e.e.indexOf(g))return!1;if(this.ca)for(a=g.type.Oa,b=0,c=a.length;b<c;b++){if(a[b]===this)return e.vi(g),this.Me(),!0}else if(g.type===this)return e.vi(g),this.Me(),!0;return!1},a.Ui=function(){return!0},a.js=function(){return!0},g.Qs=function(a,b){var c=this.kb;ka(c[a])?c[a]=ka(b)?b:
|
||||
parseFloat(b):I(c[a])&&(c[a]=I(b)?b:b.toString())},g.ox=function(a,b){var c=this.kb;ka(c[a])?c[a]=ka(b)?c[a]+b:c[a]+parseFloat(b):I(c[a])&&(c[a]=I(b)?c[a]+b:c[a]+b.toString())},g.Iy=function(a,b){var c=this.kb;ka(c[a])&&(c[a]=ka(b)?c[a]-b:c[a]-parseFloat(b))},g.jy=function(a,b){this.kb[a]=b?1:0},g.Ky=function(a){this.kb[a]=1-this.kb[a]},g.Or=function(){this.b.$d(this)},g.bs||(g.bs=function(a){var b,c;try{b=JSON.parse(a)}catch(d){return}this.b.Uj(this,b,!0);this.ae&&this.ae();if(this.X)for(a=0,b=this.X.length;a<
|
||||
b;++a)c=this.X[a],c.ae&&c.ae()}),n.Ex=function(a){var b=a.Vf.e.length,c,d,g;c=0;for(d=this.b.Gd.length;c<d;c++)g=this.b.Gd[c],a.Vf.ca?0<=g.type.Oa.indexOf(a.Vf)&&b++:g.type===a.Vf&&b++;a.Ca(b)},n.$x=function(a){a.Ca(a.Vf.ya().qd().length)},n.Ly=function(a){a.Ca(this.uid)},n.Gx=function(a){a.Ca(this.Hh())},n.Gr||(n.Gr=function(a){a.Ub(JSON.stringify(this.b.kn(this,!0)))}));b&&(a.Zr=function(){return this.visible},g.Zn=function(a){!a!==!this.visible&&(this.visible=!!a,this.b.V=!0)},a.yx=function(a,
|
||||
b){return fc(ib(100*this.opacity),a,b)},g.ry=function(a){a=a/100;0>a?a=0:1<a&&(a=1);a!==this.opacity&&(this.opacity=a,this.b.V=!0)},n.Opacity=function(a){a.H(ib(100*this.opacity))});w&&(a.Jx=function(a){return a?this.n===a:!1},a.Zx=function(a){var b=this.ya(),c=b.qd();if(!c.length)return!1;var d=c[0],g=d,e,f;e=1;for(f=c.length;e<f;e++)if(d=c[e],0===a){if(d.n.index>g.n.index||d.n.index===g.n.index&&d.Kd()>g.Kd())g=d}else if(d.n.index<g.n.index||d.n.index===g.n.index&&d.Kd()<g.Kd())g=d;b.vi(g);return!0},
|
||||
g.Sx=function(){var a=this.n,b=a.e;b.length&&b[b.length-1]===this||(a.Yg(this,!1),a.oh(this,!1),this.b.V=!0)},g.Qx=function(){var a=this.n,b=a.e;b.length&&b[0]===this||(a.Yg(this,!1),a.sw(this),this.b.V=!0)},g.Rx=function(a){a&&a!=this.n&&(this.n.Yg(this,!0),this.n=a,a.oh(this,!0),this.b.V=!0)},g.Oy=function(a,b){var c=0===a;if(b){var d=b.Pl(this);d&&d.uid!==this.uid&&(this.n.index!==d.n.index&&(this.n.Yg(this,!0),this.n=d.n,d.n.oh(this,!0)),this.n.$v(this,d,c),this.b.V=!0)}},n.Nx=function(a){a.Ca(this.n.dq)},
|
||||
n.Mx=function(a){a.Ub(this.n.name)},n.Ny=function(a){a.Ca(this.Kd())});d&&(g.ly=function(a,b){if(this.b.G){var c=this.type.Ol(b);if(!(0>c)){var d=1===a;this.Ke[c]!==d&&(this.Ke[c]=d,this.Bd(),this.b.V=!0)}}},g.my=function(a,b,c){if(this.b.G){var d=this.type.Ol(a);0>d||(a=this.type.P[d],d=this.Sa[d],b=Math.floor(b),0>b||b>=d.length||(1===this.b.G.kv(a.gb,b)&&(c/=100),d[b]!==c&&(d[b]=c,a.A&&(this.b.V=!0))))}})};Lb=function(){this.pl=this.il=!0;this.type.qo=!0;this.b.V=!0;var f,h,l=this.jl;f=0;for(h=
|
||||
l.length;f<h;++f)l[f](this);this.n.Nc&&this.Ga()};Mb=function(f){f&&this.jl.push(f)};Ob=function(){if(this.il){var f=this.Ja,h=this.wf;f.set(this.x,this.y,this.x+this.width,this.y+this.height);f.offset(-this.qc*this.width,-this.rc*this.height);this.j?(f.offset(-this.x,-this.y),h.Wq(f,this.j),h.offset(this.x,this.y),h.zo(f)):h.Dk(f);f.normalize();this.il=!1;this.gx()}};var f=new ua(0,0,0,0);Pb=function(){if(this.n.Nc){var p=this.n.Gb,h=this.Ja;f.set(p.Yb(h.left),p.Zb(h.top),p.Yb(h.right),p.Zb(h.bottom));
|
||||
this.fc.zh(f)||(this.fc.right<this.fc.left?p.update(this,null,f):p.update(this,this.fc,f),this.fc.uh(f),this.n.zd=!0)}};Qb=function(){if(this.pl&&this.rh){this.Ga();var p=this.type.Fo,h=this.Ja;f.set(p.Yb(h.left),p.Zb(h.top),p.Yb(h.right),p.Zb(h.bottom));this.Qe.zh(f)||(this.Qe.right<this.Qe.left?p.update(this,null,f):p.update(this,this.Qe,f),this.Qe.uh(f),this.pl=!1)}};Nb=function(f,h){return this.Ja.Uc(f,h)&&this.wf.Uc(f,h)?this.nr?this.hz(f,h):this.Fd&&!this.Fd.Pv()?(this.Fd.yt(this.width,this.height,
|
||||
this.j),this.Fd.Uc(f-this.x,h-this.y)):!0:!1};Hb=function(){this.type.Sk();return this.Jf};Rb=function(){this.n.Dn();return this.Cd};Sb=function(){L(this.na);var f,h,l,c=!0;f=0;for(h=this.Ke.length;f<h;f++)this.Ke[f]&&(l=this.type.P[f],this.na.push(l),l.xd||(c=!1));this.Br=!!this.na.length;this.Be=c};Ib=function(){return"Inst"+this.Gq};rb=function(f){if(f&&f.ac&&f.type!=this){var h,l,c;h=0;for(l=f.siblings.length;h<l;h++)if(c=f.siblings[h],c.type==this)return c}f=this.ya().qd();return f.length?f[0]:
|
||||
null};sb=function(f){var h=this.ya().qd();return h.length?h[f.Hh()%h.length]:null};qb=function(){if(this.bh&&!this.ca){var f,h;f=0;for(h=this.e.length;f<h;f++)this.e[f].Jf=f;var l=f,c=this.b.Gd;f=0;for(h=c.length;f<h;++f)c[f].type===this&&(c[f].Jf=l++);this.bh=!1}};Fb=function(f){if(f<this.e.length)return this.e[f];f-=this.e.length;var h=this.b.Gd,l,c;l=0;for(c=h.length;l<c;++l)if(h[l].type===this){if(0===f)return h[l];--f}return null};tb=function(){return this.De[this.Hd]};ub=function(){this.Hd++;
|
||||
this.Hd===this.De.length?this.De.push(new pb(this)):(this.De[this.Hd].Fa=!0,L(this.De[this.Hd].ea))};vb=function(){this.Hd++;this.Hd===this.De.length&&this.De.push(new pb(this));var f=this.De[this.Hd],h=this.De[this.Hd-1];h.Fa?f.Fa=!0:(f.Fa=!1,Ba(f.e,h.e));L(f.ea)};wb=function(){this.Hd--};xb=function(f){var h,l,c,q,e,b=0;if(!this.ca)for(h=0,l=this.Oa.length;h<l;h++)for(e=this.Oa[h],c=0,q=e.Qa.length;c<q;c++){if(f===e.Qa[c].name)return this.Na.lastBehIndex=b,e.Qa[c];b++}h=0;for(l=this.Qa.length;h<
|
||||
l;h++){if(f===this.Qa[h].name)return this.Na.lastBehIndex=b,this.Qa[h];b++}return null};yb=function(f){return this.Aj(f)?this.Na.lastBehIndex:-1};zb=function(f){var h,l;h=0;for(l=this.P.length;h<l;h++)if(this.P[h].name===f)return h;return-1};Ab=function(){if(this.ac&&!this.ca){var f,h,l,c,q,e,b;this.Sk();e=this.ya();var w=e.Fa,d=(f=this.b.Sb())&&f.oc&&f.oc.wd;f=0;for(h=this.nc.length;f<h;f++)if(q=this.nc[f],q!==this&&(q.Sk(),b=q.ya(),b.Fa=w,!w)){L(b.e);l=0;for(c=e.e.length;l<c;++l)b.e[l]=q.Rl(e.e[l].Jf);
|
||||
if(d)for(L(b.ea),l=0,c=e.ea.length;l<c;++l)b.ea[l]=q.Rl(e.ea[l].Jf)}}};Gb=function(){return"Type"+this.da};fc=function(f,h,l){if("undefined"===typeof f||"undefined"===typeof l)return!1;switch(h){case 0:return f===l;case 1:return f!==l;case 2:return f<l;case 3:return f<=l;case 4:return f>l;case 5:return f>=l;default:return!1}}})();var pc={};function tc(f){this.b=f}
|
||||
(function(){function f(a){-1===jb.indexOf(a)&&jb.push(a)}function p(a){var b=a.k,c;try{c=b.play()}catch(d){f(a);return}c?c.catch(function(){f(a)}):Bc&&!K.qe&&f(a)}function h(){var a,b,c,d;Cc||Bb||!y||(l(),"running"===y.state&&(Cc=!0));var g=jb.slice(0);L(jb);if(!Y)for(a=0,b=g.length;a<b;++a)c=g[a],c.hc||c.sc||(d=c.k.play())&&d.catch(function(){f(c)})}function l(){"suspended"===y.state&&y.resume&&y.resume();if(y.createBuffer){var a=y.createBuffer(1,220,22050),b=y.createBufferSource();b.buffer=a;b.connect(y.destination);
|
||||
w(b)}}function c(a){0>a&&(a=0);1<a&&(a=1);return Math.log(a)/Math.log(10)*20}function q(a){a=a.toLowerCase();return T.hasOwnProperty(a)&&T[a].length?T[a][0].Bc():y.destination}function e(){return y.createGain?y.createGain():y.createGainNode()}function b(a){return y.createDelay?y.createDelay(a):y.createDelayNode(a)}function w(a,b){a.start?a.start(b||0):a.noteOn(b||0)}function d(a,b,c,d){a.start?a.start(d||0,b):a.noteGrainOn(d||0,b,c-b)}function a(a){try{a.stop?a.stop(0):a.noteOff(0)}catch(b){}}function g(a,
|
||||
b,c,d,g,f){this.type="filter";this.Eb=[a,b,c,d,g,f];this.ga=e();this.O=e();this.O.gain.value=f;this.N=e();this.N.gain.value=1-f;this.bb=y.createBiquadFilter();this.bb.type="number"===typeof this.bb.type?a:Hc[a];this.bb.frequency.value=b;this.bb.detune&&(this.bb.detune.value=c);this.bb.Q.value=d;this.bb.gain.value=g;this.ga.connect(this.bb);this.ga.connect(this.N);this.bb.connect(this.O)}function n(a,c,d){this.type="delay";this.Eb=[a,c,d];this.ga=e();this.O=e();this.O.gain.value=d;this.N=e();this.N.gain.value=
|
||||
1-d;this.ji=e();this.Wc=b(a);this.Wc.delayTime.value=a;this.kj=e();this.kj.gain.value=c;this.ga.connect(this.ji);this.ga.connect(this.N);this.ji.connect(this.O);this.ji.connect(this.Wc);this.Wc.connect(this.kj);this.kj.connect(this.ji)}function k(a,b,c,d){this.type="convolve";this.Eb=[b,c,d];this.ga=e();this.O=e();this.O.gain.value=c;this.N=e();this.N.gain.value=1-c;this.zf=y.createConvolver();a&&(this.zf.normalize=b,this.zf.buffer=a);this.ga.connect(this.zf);this.ga.connect(this.N);this.zf.connect(this.O)}
|
||||
function v(a,c,d,g,f){this.type="flanger";this.Eb=[a,c,d,g,f];this.ga=e();this.N=e();this.N.gain.value=1-f/2;this.O=e();this.O.gain.value=f/2;this.tj=e();this.tj.gain.value=g;this.Wc=b(a+c);this.Wc.delayTime.value=a;this.xb=y.createOscillator();this.xb.frequency.value=d;this.vc=e();this.vc.gain.value=c;this.ga.connect(this.Wc);this.ga.connect(this.N);this.Wc.connect(this.O);this.Wc.connect(this.tj);this.tj.connect(this.Wc);this.xb.connect(this.vc);this.vc.connect(this.Wc.delayTime);w(this.xb)}function P(a,
|
||||
b,c,d,g,f){this.type="phaser";this.Eb=[a,b,c,d,g,f];this.ga=e();this.N=e();this.N.gain.value=1-f/2;this.O=e();this.O.gain.value=f/2;this.bb=y.createBiquadFilter();this.bb.type="number"===typeof this.bb.type?7:"allpass";this.bb.frequency.value=a;this.bb.detune&&(this.bb.detune.value=b);this.bb.Q.value=c;this.xb=y.createOscillator();this.xb.frequency.value=g;this.vc=e();this.vc.gain.value=d;this.ga.connect(this.bb);this.ga.connect(this.N);this.bb.connect(this.O);this.xb.connect(this.vc);this.vc.connect(this.bb.frequency);
|
||||
w(this.xb)}function r(a){this.type="gain";this.Eb=[a];this.ka=e();this.ka.gain.value=a}function m(a,b){this.type="tremolo";this.Eb=[a,b];this.ka=e();this.ka.gain.value=1-b/2;this.xb=y.createOscillator();this.xb.frequency.value=a;this.vc=e();this.vc.gain.value=b/2;this.xb.connect(this.vc);this.vc.connect(this.ka.gain);w(this.xb)}function t(a,b){this.type="ringmod";this.Eb=[a,b];this.ga=e();this.O=e();this.O.gain.value=b;this.N=e();this.N.gain.value=1-b;this.Ci=e();this.Ci.gain.value=0;this.xb=y.createOscillator();
|
||||
this.xb.frequency.value=a;this.xb.connect(this.Ci.gain);w(this.xb);this.ga.connect(this.Ci);this.ga.connect(this.N);this.Ci.connect(this.O)}function da(a,b,c,d,g){this.type="distortion";this.Eb=[a,b,c,d,g];this.ga=e();this.pk=e();this.ok=e();this.Mw(c,Math.pow(10,d/20));this.O=e();this.O.gain.value=g;this.N=e();this.N.gain.value=1-g;this.Xk=y.createWaveShaper();this.hj=new Float32Array(65536);this.Wu(a,b);this.Xk.hj=this.hj;this.ga.connect(this.pk);this.ga.connect(this.N);this.pk.connect(this.Xk);
|
||||
this.Xk.connect(this.ok);this.ok.connect(this.O)}function ga(a,b,c,d,g){this.type="compressor";this.Eb=[a,b,c,d,g];this.ka=y.createDynamicsCompressor();try{this.ka.threshold.value=a,this.ka.knee.value=b,this.ka.ratio.value=c,this.ka.attack.value=d,this.ka.release.value=g}catch(e){}}function Q(a,b){this.type="analyser";this.Eb=[a,b];this.ka=y.createAnalyser();this.ka.fftSize=a;this.ka.smoothingTimeConstant=b;this.Uu=new Float32Array(this.ka.frequencyBinCount);this.Zq=new Uint8Array(a);this.ti=0}function C(){this.ra=
|
||||
null;this.Vj=0}function x(a,b){this.src=a;this.ba=E;this.Md=b;this.aj=!1;var c=this;this.Lg=this.Tg=null;this.Ug=[];this.yk=0;this.Gn=this.rj=this.fr=this.kk=!1;1===E&&b&&!kb&&(this.ba=0,this.Tg=e());this.de=this.ja=null;var d;switch(this.ba){case 0:this.ja=new Audio;this.ja.crossOrigin="anonymous";this.ja.addEventListener("canplaythrough",function(){c.Gn=!0});1===E&&y.createMediaElementSource&&!/wiiu/i.test(navigator.userAgent)&&(this.fr=!0,this.ja.addEventListener("canplay",function(){!c.Lg&&c.ja&&
|
||||
(c.Lg=y.createMediaElementSource(c.ja),c.Lg.connect(c.Tg))}));this.ja.autoplay=!1;this.ja.cz="auto";this.ja.src=a;break;case 1:K.Kj?K.So(a,function(a){c.de=a;c.Ko()},function(){c.rj=!0}):(d=new XMLHttpRequest,d.open("GET",a,!0),d.responseType="arraybuffer",d.onload=function(){c.de=d.response;c.Ko()},d.onerror=function(){c.rj=!0},d.send());break;case 2:this.ja=!0;break;case 3:this.ja=!0}}function z(a,b){var c=this;this.tag=b;this.hc=this.Jd=!0;this.src=a.src;this.buffer=a;this.ba=E;this.Md=a.Md;this.playbackRate=
|
||||
1;this.xg=!0;this.sc=this.Gc=!1;this.gc=0;this.Uh=this.Bg=this.Nd=!1;this.volume=1;this.Pm=function(a){if(!c.sc&&!c.Gc){var b=this;b||(b=a.target);b===c.$i&&(c.xg=!0,c.hc=!0,J=c.tag,K.trigger(tc.prototype.g.Vi,wa))}};this.$i=null;this.zg=1===N&&!this.Md||2===N;this.Ng=1;this.startTime=this.zg?K.Bb.U:K.Ge.U;this.fb=this.ib=null;this.Pd=!1;this.Cb=null;this.uq=this.tq=this.sq=this.rq=this.wq=this.vq=0;this.k=null;var d=!1;1!==this.ba||0!==this.buffer.ba||this.buffer.fr||(this.ba=0);switch(this.ba){case 0:this.Md?
|
||||
(this.k=a.ja,d=!a.aj,a.aj=!0):(this.k=new Audio,this.k.crossOrigin="anonymous",this.k.autoplay=!1,this.k.src=a.ja.src,d=!0);d&&this.k.addEventListener("ended",function(){J=c.tag;c.hc=!0;K.trigger(tc.prototype.g.Vi,wa)});break;case 1:this.ib=e();this.ib.connect(q(b));1===this.buffer.ba?a.ja&&(this.k=y.createBufferSource(),this.k.buffer=a.ja,this.k.connect(this.ib)):(this.k=this.buffer.ja,this.buffer.Tg.connect(this.ib),this.buffer.aj||(this.buffer.aj=!0,this.buffer.ja.addEventListener("ended",function(){J=
|
||||
c.tag;c.hc=!0;K.trigger(tc.prototype.g.Vi,wa)})));break;case 2:this.k=new window.Media(D+this.src,null,null,function(a){a===window.Media.MEDIA_STOPPED&&(c.xg=!0,c.hc=!0,J=c.tag,K.trigger(tc.prototype.g.Vi,wa))});break;case 3:this.k=!0}}function H(a,b){var c=a.Mf()?1:0,d=b.Mf()?1:0;return c===d?0:c<d?1:-1}function G(a,b){L(ha);if(a.length){var c,d,g;c=0;for(d=A.length;c<d;c++)g=A[c],lb(a,g.tag)&&ha.push(g);b&&ha.sort(H)}else M&&!M.If()&&(L(ha),ha[0]=M)}function O(a,b){T.hasOwnProperty(a)?T[a].push(b):
|
||||
T[a]=[b];var c,d,g,e,f=y.destination;if(T.hasOwnProperty(a)&&(g=T[a],g.length))for(f=g[0].Bc(),c=0,d=g.length;c<d;c++)e=g[c],c+1===d?e.Tc(y.destination):e.Tc(g[c+1].Bc());G(a);c=0;for(d=ha.length;c<d;c++)ha[c].yw(f);Ha&&Cb===a&&(Ha.disconnect(),Ha.connect(f))}function ca(){}function U(){}function R(){}var u=tc.prototype;u.Da=function(a){this.La=a;this.b=a.b};u.Da.prototype.Z=function(){};var K=null,wa=null,J="",D="",E=0,y=null,F=[],A=[],M=null,ja=!1,N=0,Y=!1,S=1,ya=0,Ma=0,Bb=!1,Db=1,Eb=1,Dc=10,Ec=
|
||||
1E4,Fc=1,Ha=null,Cb="",Bc=!1,jb=[],kb=!1,Cc=!1;document.addEventListener("pointerup",h,!0);document.addEventListener("touchend",h,!0);document.addEventListener("click",h,!0);document.addEventListener("keydown",h,!0);document.addEventListener("gamepadconnected",h,!0);var T={},Hc="lowpass highpass bandpass lowshelf highshelf peaking notch allpass".split(" ");g.prototype.Tc=function(a){this.O.disconnect();this.O.connect(a);this.N.disconnect();this.N.connect(a)};g.prototype.remove=function(){this.ga.disconnect();
|
||||
this.bb.disconnect();this.O.disconnect();this.N.disconnect()};g.prototype.Bc=function(){return this.ga};n.prototype.Tc=function(a){this.O.disconnect();this.O.connect(a);this.N.disconnect();this.N.connect(a)};n.prototype.remove=function(){this.ga.disconnect();this.ji.disconnect();this.Wc.disconnect();this.kj.disconnect();this.O.disconnect();this.N.disconnect()};n.prototype.Bc=function(){return this.ga};k.prototype.Tc=function(a){this.O.disconnect();this.O.connect(a);this.N.disconnect();this.N.connect(a)};
|
||||
k.prototype.remove=function(){this.ga.disconnect();this.zf.disconnect();this.O.disconnect();this.N.disconnect()};k.prototype.Bc=function(){return this.ga};v.prototype.Tc=function(a){this.N.disconnect();this.N.connect(a);this.O.disconnect();this.O.connect(a)};v.prototype.remove=function(){this.ga.disconnect();this.Wc.disconnect();this.xb.disconnect();this.vc.disconnect();this.N.disconnect();this.O.disconnect();this.tj.disconnect()};v.prototype.Bc=function(){return this.ga};P.prototype.Tc=function(a){this.N.disconnect();
|
||||
this.N.connect(a);this.O.disconnect();this.O.connect(a)};P.prototype.remove=function(){this.ga.disconnect();this.bb.disconnect();this.xb.disconnect();this.vc.disconnect();this.N.disconnect();this.O.disconnect()};P.prototype.Bc=function(){return this.ga};r.prototype.Tc=function(a){this.ka.disconnect();this.ka.connect(a)};r.prototype.remove=function(){this.ka.disconnect()};r.prototype.Bc=function(){return this.ka};m.prototype.Tc=function(a){this.ka.disconnect();this.ka.connect(a)};m.prototype.remove=
|
||||
function(){this.xb.disconnect();this.vc.disconnect();this.ka.disconnect()};m.prototype.Bc=function(){return this.ka};t.prototype.Tc=function(a){this.O.disconnect();this.O.connect(a);this.N.disconnect();this.N.connect(a)};t.prototype.remove=function(){this.xb.disconnect();this.Ci.disconnect();this.ga.disconnect();this.O.disconnect();this.N.disconnect()};t.prototype.Bc=function(){return this.ga};da.prototype.Mw=function(a,b){.01>a&&(a=.01);this.pk.gain.value=a;this.ok.gain.value=Math.pow(1/a,.6)*b};
|
||||
da.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};da.prototype.Wu=function(a,b){for(var c=Math.pow(10,a/20),d=Math.pow(10,b/20),g=0,e=0;32768>e;++e)g=e/32768,g=this.shape(g,c,d),this.hj[32768+e]=g,this.hj[32768-e-1]=-g};da.prototype.Tc=function(a){this.O.disconnect();this.O.connect(a);this.N.disconnect();this.N.connect(a)};da.prototype.remove=function(){this.ga.disconnect();this.pk.disconnect();this.Xk.disconnect();this.ok.disconnect();
|
||||
this.O.disconnect();this.N.disconnect()};da.prototype.Bc=function(){return this.ga};ga.prototype.Tc=function(a){this.ka.disconnect();this.ka.connect(a)};ga.prototype.remove=function(){this.ka.disconnect()};ga.prototype.Bc=function(){return this.ka};Q.prototype.Pa=function(){this.ka.getFloatFrequencyData(this.Uu);this.ka.getByteTimeDomainData(this.Zq);for(var a=this.ka.fftSize,b=0,d=this.ti=0,g=0;b<a;b++)g=(this.Zq[b]-128)/128,0>g&&(g=-g),this.ti<g&&(this.ti=g),d+=g*g;this.ti=c(this.ti);c(Math.sqrt(d/
|
||||
a))};Q.prototype.Tc=function(a){this.ka.disconnect();this.ka.connect(a)};Q.prototype.remove=function(){this.ka.disconnect()};Q.prototype.Bc=function(){return this.ka};C.prototype.Di=function(a){this.ra=a};C.prototype.Fj=function(){return!!this.ra};C.prototype.Pa=function(){};x.prototype.zw=function(){var a,b,c,d;c=a=0;for(b=A.length;a<b;++a)d=A[a],A[c]=d,d.buffer===this?d.stop():++c;A.length=c;this.Lg&&(this.Lg.disconnect(),this.Lg=null);this.Tg&&(this.Tg.disconnect(),this.Tg=null);this.de=this.ja=
|
||||
null};x.prototype.Ko=function(){if(!this.ja&&this.de){var a=this;if(y.decodeAudioData)y.decodeAudioData(this.de,function(b){a.ja=b;a.de=null;var c,d,g;if(ia(a.mk)||Y)ia(a.ej)||(c=a.ej.zf,c.normalize=a.cq,c.buffer=b);else if(a.Ug.length){c=0;for(d=a.Ug.length;c<d;c++){b=a.Ug[c];g=new z(a,b.lr);g.pn(!0);if("undefined"!==typeof b.fq&&(b.ra=K.Fh(b.fq),!b.ra))continue;if(b.ra){var e=Ra(b.ra.x,b.ra.y,-b.ra.n.jb(),ya,Ma,!0),f=Ra(b.ra.x,b.ra.y,-b.ra.n.jb(),ya,Ma,!1);g.nn(e,f,Ga(b.ra.j-b.ra.n.jb()),b.$l,b.Im,
|
||||
b.Lm);g.Di(b.ra)}else g.nn(b.x,b.y,b.gt,b.$l,b.Im,b.Lm);g.play(a.Em,a.Fn,a.yk);a.kk&&g.pause();A.push(g)}L(a.Ug)}else g=new z(a,a.mk||""),g.play(a.Em,a.Fn,a.yk),a.kk&&g.pause(),A.push(g)},function(){a.rj=!0});else if(this.ja=y.createBuffer(this.de,!1),this.de=null,ia(this.mk)||Y)ia(this.ej)||(b=this.ej.zf,b.normalize=this.cq,b.buffer=this.ja);else{var b=new z(this,this.mk);b.play(this.Em,this.Fn,this.yk);this.kk&&b.pause();A.push(b)}}};x.prototype.op=function(){switch(this.ba){case 0:var a=4<=this.ja.readyState;
|
||||
a&&(this.Gn=!0);return a||this.Gn;case 1:return!!this.de||!!this.ja;case 2:return!0;case 3:return!0}return!1};x.prototype.Kv=function(){switch(this.ba){case 0:return this.op();case 1:return!!this.ja;case 2:return!0;case 3:return!0}return!1};x.prototype.Cv=function(){switch(this.ba){case 0:return!!this.ja.error;case 1:return this.rj}return!1};z.prototype.If=function(){switch(this.ba){case 0:return this.k.ended;case 1:return 1===this.buffer.ba?!this.Jd&&!this.hc&&this.k.loop||this.sc?!1:this.xg:this.k.ended;
|
||||
case 2:return this.xg;case 3:!0}return!0};z.prototype.zt=function(){return this.Jd||this.hc?!0:this.If()};z.prototype.pn=function(a){1===E&&(!this.Pd&&a?this.ib&&(this.fb||(this.fb=y.createPanner(),this.fb.panningModel="number"===typeof this.fb.panningModel?Db:["equalpower","HRTF","soundfield"][Db],this.fb.distanceModel="number"===typeof this.fb.distanceModel?Eb:["linear","inverse","exponential"][Eb],this.fb.refDistance=Dc,this.fb.maxDistance=Ec,this.fb.rolloffFactor=Fc),this.ib.disconnect(),this.ib.connect(this.fb),
|
||||
this.fb.connect(q(this.tag)),this.Pd=!0):this.Pd&&!a&&this.ib&&(this.fb.disconnect(),this.ib.disconnect(),this.ib.connect(q(this.tag)),this.Pd=!1))};z.prototype.nn=function(a,b,c,d,g,e){this.Pd&&1===E&&(this.fb.setPosition(a,b,0),this.fb.setOrientation(Math.cos(V(c)),Math.sin(V(c)),0),this.fb.coneInnerAngle=d,this.fb.coneOuterAngle=g,this.fb.coneOuterGain=e,this.vq=a,this.wq=b,this.rq=c,this.sq=d,this.tq=g,this.uq=e)};z.prototype.Di=function(a){this.Pd&&1===E&&(this.Cb||(this.Cb=new C),this.Cb.Di(a))};
|
||||
z.prototype.Pa=function(a){if(this.Pd&&1===E&&this.Cb&&this.Cb.Fj()&&this.Mf()){this.Cb.Pa(a);a=this.Cb.ra;var b=Ra(a.x,a.y,-a.n.jb(),ya,Ma,!0),c=Ra(a.x,a.y,-a.n.jb(),ya,Ma,!1);this.fb.setPosition(b,c,0);b=0;"undefined"!==typeof this.Cb.ra.j&&(b=a.j-a.n.jb(),this.fb.setOrientation(Math.cos(b),Math.sin(b),0))}};z.prototype.play=function(a,b,c,g){var e=this.k;this.Nd=a;this.volume=b;c=c||0;g=g||0;switch(this.ba){case 0:1!==e.playbackRate&&(e.playbackRate=1);e.volume!==b*S&&(e.volume=b*S);e.loop!==a&&
|
||||
(e.loop=a);e.muted&&(e.muted=!1);if(e.currentTime!==c)try{e.currentTime=c}catch(f){}p(this);break;case 1:this.muted=!1;this.Ng=1;if(1===this.buffer.ba)this.ib.gain.value=b*S,this.Jd||(this.k=y.createBufferSource(),this.k.buffer=this.buffer.ja,this.k.connect(this.ib)),this.k.onended=this.Pm,this.$i=this.k,this.k.loop=a,this.xg=!1,0===c?w(this.k,g):d(this.k,c,this.Xe(),g);else{1!==e.playbackRate&&(e.playbackRate=1);e.loop!==a&&(e.loop=a);e.volume=b*S;if(e.currentTime!==c)try{e.currentTime=c}catch(h){}p(this)}break;
|
||||
case 2:(!this.Jd&&this.hc||0!==c)&&e.seekTo(c);e.play();this.xg=!1;break;case 3:K.Ob?AppMobi.context.playSound(this.src,a):AppMobi.player.playSound(this.src,a)}this.playbackRate=1;this.startTime=(this.zg?K.Bb.U:K.Ge.U)-c;this.sc=this.hc=this.Jd=!1};z.prototype.stop=function(){switch(this.ba){case 0:this.k.paused||this.k.pause();break;case 1:1===this.buffer.ba?a(this.k):this.k.paused||this.k.pause();break;case 2:this.k.stop();break;case 3:K.Ob&&AppMobi.context.stopSound(this.src)}this.hc=!0;this.sc=
|
||||
!1};z.prototype.pause=function(){if(!(this.Jd||this.hc||this.If()||this.sc)){switch(this.ba){case 0:this.k.paused||this.k.pause();break;case 1:1===this.buffer.ba?(this.gc=this.Tl(!0),this.Nd&&(this.gc=this.gc%this.Xe()),this.sc=!0,a(this.k)):this.k.paused||this.k.pause();break;case 2:this.k.pause();break;case 3:K.Ob&&AppMobi.context.stopSound(this.src)}this.sc=!0}};z.prototype.Kq=function(){if(!(this.Jd||this.hc||this.If())&&this.sc){switch(this.ba){case 0:p(this);break;case 1:1===this.buffer.ba?
|
||||
(this.k=y.createBufferSource(),this.k.buffer=this.buffer.ja,this.k.connect(this.ib),this.k.onended=this.Pm,this.$i=this.k,this.k.loop=this.Nd,this.ib.gain.value=S*this.volume*this.Ng,this.Tk(),this.startTime=(this.zg?K.Bb.U:K.Ge.U)-this.gc/(this.playbackRate||.001),d(this.k,this.gc,this.Xe())):p(this);break;case 2:this.k.play();break;case 3:K.Ob&&AppMobi.context.resumeSound(this.src)}this.sc=!1}};z.prototype.seek=function(a){if(!(this.Jd||this.hc||this.If()))switch(this.ba){case 0:try{this.k.currentTime=
|
||||
a}catch(b){}break;case 1:if(1===this.buffer.ba)this.sc?this.gc=a:(this.pause(),this.gc=a,this.Kq());else try{this.k.currentTime=a}catch(c){}break;case 3:K.Ob&&AppMobi.context.seekSound(this.src,a)}};z.prototype.yw=function(a){1===this.ba&&(this.Pd?(this.fb.disconnect(),this.fb.connect(a)):(this.ib.disconnect(),this.ib.connect(a)))};z.prototype.Xe=function(){var a=0;switch(this.ba){case 0:"undefined"!==typeof this.k.duration&&(a=this.k.duration);break;case 1:a=this.buffer.ja.duration;break;case 2:a=
|
||||
this.k.getDuration();break;case 3:K.Ob&&(a=AppMobi.context.getDurationSound(this.src))}return a};z.prototype.Tl=function(a){var b=this.Xe(),c=0;switch(this.ba){case 0:"undefined"!==typeof this.k.currentTime&&(c=this.k.currentTime);break;case 1:if(1===this.buffer.ba){if(this.sc)return this.gc;c=(this.zg?K.Bb.U:K.Ge.U)-this.startTime}else"undefined"!==typeof this.k.currentTime&&(c=this.k.currentTime);break;case 3:K.Ob&&(c=AppMobi.context.getPlaybackTimeSound(this.src))}a&&(c*=this.playbackRate);!this.Nd&&
|
||||
c>b&&(c=b);return c};z.prototype.Mf=function(){return!this.sc&&!this.Jd&&!this.hc&&!this.If()};z.prototype.Rw=function(){return!this.Jd&&!this.hc&&!this.If()};z.prototype.cx=function(){var a=this.volume*S;isFinite(a)||(a=0);switch(this.ba){case 0:"undefined"!==typeof this.k.volume&&this.k.volume!==a&&(this.k.volume=a);break;case 1:1===this.buffer.ba?this.ib.gain.value=a*this.Ng:"undefined"!==typeof this.k.volume&&this.k.volume!==a&&(this.k.volume=a)}};z.prototype.nj=function(a){switch(this.ba){case 0:this.k.muted!==
|
||||
!!a&&(this.k.muted=!!a);break;case 1:1===this.buffer.ba?(this.Ng=a?0:1,this.ib.gain.value=S*this.volume*this.Ng):this.k.muted!==!!a&&(this.k.muted=!!a)}};z.prototype.Tq=function(a){this.Bg=!!a;this.nj(this.Bg||this.Uh)};z.prototype.Uq=function(a){this.Uh=!!a;this.nj(this.Bg||this.Uh)};z.prototype.Tk=function(){var a=this.playbackRate;this.zg&&(a*=K.eh);switch(this.ba){case 0:this.k.playbackRate!==a&&(this.k.playbackRate=a);break;case 1:1===this.buffer.ba?this.k.playbackRate.value!==a&&(this.k.playbackRate.value=
|
||||
a):this.k.playbackRate!==a&&(this.k.playbackRate=a)}};z.prototype.Pw=function(b){switch(this.ba){case 0:b?this.Mf()?(this.Gc=!0,this.k.pause()):this.Gc=!1:this.Gc&&(this.k.play(),this.Gc=!1);break;case 1:b?this.Mf()?(this.Gc=!0,1===this.buffer.ba?(this.gc=this.Tl(!0),this.Nd&&(this.gc=this.gc%this.Xe()),a(this.k)):this.k.pause()):this.Gc=!1:this.Gc&&(1===this.buffer.ba?(this.k=y.createBufferSource(),this.k.buffer=this.buffer.ja,this.k.connect(this.ib),this.k.onended=this.Pm,this.$i=this.k,this.k.loop=
|
||||
this.Nd,this.ib.gain.value=S*this.volume*this.Ng,this.Tk(),this.startTime=(this.zg?K.Bb.U:K.Ge.U)-this.gc/(this.playbackRate||.001),d(this.k,this.gc,this.Xe())):this.k.play(),this.Gc=!1);break;case 2:b?this.Mf()?(this.k.pause(),this.Gc=!0):this.Gc=!1:this.Gc&&(this.Gc=!1,this.k.play())}};u.ua=function(a){this.type=a;K=this.b=a.b;wa=this;this.tc=null;this.ai=-600;this.b.Kj&&(kb=!0);!(this.b.Eg||this.b.Nh&&(this.b.hm||this.b.Gj))||this.b.Ij||this.b.lb||this.b.mp||kb||(Bc=!0);y=null;"undefined"!==typeof AudioContext?
|
||||
(E=1,y=new AudioContext):"undefined"!==typeof webkitAudioContext&&(E=1,y=new webkitAudioContext);this.b.Eg&&y&&(y.close&&y.close(),"undefined"!==typeof AudioContext?y=new AudioContext:"undefined"!==typeof webkitAudioContext&&(y=new webkitAudioContext));1!==E&&(this.b.Dc&&"undefined"!==typeof window.Media?E=2:this.b.np&&(E=3));2===E&&(D=location.href,a=D.lastIndexOf("/"),-1<a&&(D=D.substr(0,a+1)),D=D.replace("file://",""));if(this.b.Lv&&this.b.Mv&&"undefined"===typeof Audio)alert("It looks like you're using Safari for Windows without Quicktime. Audio cannot be played until Quicktime is installed."),
|
||||
this.b.$d(this);else{if(this.b.Ob)ja=this.b.Nh;else try{ja=!!(new Audio).canPlayType('audio/ogg; codecs="vorbis"')&&!this.b.Lj}catch(b){ja=!1}this.b.Nk(this)}};var ra=u.ua.prototype;ra.Z=function(){this.b.lg=this;N=this.B[0];this.Ae=this.B[1];this.lw=0!==this.B[2];this.aq=0;Db=this.B[3];Eb=this.B[4];this.ai=-this.B[5];Dc=this.B[6];Ec=this.B[7];Fc=this.B[8];this.tc=new C;var a=this.b.L||this.b.width,b=this.b.K||this.b.height;1===E&&(y.listener.setPosition(a/2,b/2,this.ai),y.listener.setOrientation(0,
|
||||
0,1,0,-1,0),window.c2OnAudioMicStream=function(a,b){Ha&&Ha.disconnect();Cb=b.toLowerCase();Ha=y.createMediaStreamSource(a);Ha.connect(q(Cb))});this.b.ko(function(a){wa.gw(a)});var c=this;this.b.io(function(a){c.Mm(a)})};ra.Mm=function(a){var b,c,d;b=0;for(c=A.length;b<c;b++)d=A[b],d.Cb&&d.Cb.ra===a&&(d.Cb.ra=null,d.Pd&&d.Mf()&&d.Nd&&d.stop());this.tc.ra===a&&(this.tc.ra=null)};ra.yb=function(){var a={silent:Y,masterVolume:S,listenerZ:this.ai,listenerUid:this.tc.Fj()?this.tc.ra.uid:-1,playing:[],effects:{}},
|
||||
b=a.playing,c,d,g,e,f,h;c=0;for(d=A.length;c<d;c++)g=A[c],!g.Rw()||3===this.Ae||g.Md&&1===this.Ae||!g.Md&&2===this.Ae||(e=g.Tl(),g.Nd&&(e=e%g.Xe()),e={tag:g.tag,buffersrc:g.buffer.src,is_music:g.Md,playbackTime:e,volume:g.volume,looping:g.Nd,muted:g.Bg,playbackRate:g.playbackRate,paused:g.sc,resume_position:g.gc},g.Pd&&(e.pan={},h=e.pan,g.Cb&&g.Cb.Fj()?h.objUid=g.Cb.ra.uid:(h.x=g.vq,h.y=g.wq,h.a=g.rq),h.ia=g.sq,h.oa=g.tq,h.og=g.uq),b.push(e));b=a.effects;for(f in T)if(T.hasOwnProperty(f)){g=[];c=
|
||||
0;for(d=T[f].length;c<d;c++)g.push({type:T[f][c].type,params:T[f][c].Eb});b[f]=g}return a};var Va=[];ra.Pb=function(a){var b=a.silent;S=a.masterVolume;this.ai=a.listenerZ;this.tc.Di(null);var c=a.listenerUid;-1!==c&&(this.tc.Vj=c,Va.push(this.tc));var c=a.playing,d,e,f,h,l,q,p,w,u,x,y;if(3!==this.Ae)for(d=0,e=A.length;d<e;d++)u=A[d],u.Md&&1===this.Ae||(u.Md||2!==this.Ae)&&u.stop();for(l in T)if(T.hasOwnProperty(l))for(d=0,e=T[l].length;d<e;d++)T[l][d].remove();Xa(T);for(l in a.effects)if(a.effects.hasOwnProperty(l))for(q=
|
||||
a.effects[l],d=0,e=q.length;d<e;d++)switch(f=q[d].type,x=q[d].params,f){case "filter":O(l,new g(x[0],x[1],x[2],x[3],x[4],x[5]));break;case "delay":O(l,new n(x[0],x[1],x[2]));break;case "convolve":f=x[2];u=this.zj(f,!1);u.ja?f=new k(u.ja,x[0],x[1],f):(f=new k(null,x[0],x[1],f),u.cq=x[0],u.ej=f);O(l,f);break;case "flanger":O(l,new v(x[0],x[1],x[2],x[3],x[4]));break;case "phaser":O(l,new P(x[0],x[1],x[2],x[3],x[4],x[5]));break;case "gain":O(l,new r(x[0]));break;case "tremolo":O(l,new m(x[0],x[1]));break;
|
||||
case "ringmod":O(l,new t(x[0],x[1]));break;case "distortion":O(l,new da(x[0],x[1],x[2],x[3],x[4]));break;case "compressor":O(l,new ga(x[0],x[1],x[2],x[3],x[4]));break;case "analyser":O(l,new Q(x[0],x[1]))}d=0;for(e=c.length;d<e;d++)3===this.Ae||(a=c[d],f=a.buffersrc,h=a.is_music,l=a.tag,q=a.playbackTime,p=a.looping,w=a.volume,y=(x=a.pan)&&x.hasOwnProperty("objUid")?x.objUid:-1,h&&1===this.Ae)||!h&&2===this.Ae||((u=this.Xo(f,l,h,p,w))?(u.gc=a.resume_position,u.pn(!!x),u.play(p,w,q),u.Tk(),u.cx(),u.nj(u.Bg||
|
||||
u.Uh),a.paused&&u.pause(),a.muted&&u.Tq(!0),u.nj(u.Bg||u.Uh),x&&(-1!==y?(u.Cb=u.Cb||new C,u.Cb.Vj=y,Va.push(u.Cb)):u.nn(x.x,x.y,x.a,x.ia,x.oa,x.og))):(u=this.zj(f,h),u.yk=q,u.kk=a.paused,x&&(-1!==y?u.Ug.push({fq:y,$l:x.ia,Im:x.oa,Lm:x.og,lr:l}):u.Ug.push({x:x.x,y:x.y,gt:x.a,$l:x.ia,Im:x.oa,Lm:x.og,lr:l}))));if(b&&!Y){d=0;for(e=A.length;d<e;d++)A[d].Uq(!0);Y=!0}else if(!b&&Y){d=0;for(e=A.length;d<e;d++)A[d].Uq(!1);Y=!1}};ra.ae=function(){var a,b,c,d;a=0;for(b=Va.length;a<b;a++)c=Va[a],d=this.b.Fh(c.Vj),
|
||||
c.Di(d),c.Vj=-1,d&&(ya=d.x,Ma=d.y);L(Va)};ra.gw=function(a){if(!this.lw){!a&&y&&y.resume&&(y.resume(),Bb=!1);var b,c;b=0;for(c=A.length;b<c;b++)A[b].Pw(a);a&&y&&y.suspend&&(y.suspend(),Bb=!0)}};ra.Pa=function(){var a=this.b.Bf,b,c,d;b=0;for(c=A.length;b<c;b++)d=A[b],d.Pa(a),0!==N&&d.Tk();var g,e;for(g in T)if(T.hasOwnProperty(g))for(d=T[g],b=0,c=d.length;b<c;b++)e=d[b],e.Pa&&e.Pa();1===E&&this.tc.Fj()&&(this.tc.Pa(a),ya=this.tc.ra.x,Ma=this.tc.ra.y,y.listener.setPosition(this.tc.ra.x,this.tc.ra.y,
|
||||
this.ai))};var Wa=[];ra.Ow=function(a){var b,c,d,g,e,f=0;b=0;for(c=a.length;b<c;++b)if(d=a[b],g=d[0],d=2*d[1],(e=4<g.length&&".ogg"===g.substr(g.length-4))&&ja||!e&&!ja)Wa.push({filename:g,size:d,ra:null}),f+=d;return f};ra.Tw=function(){var a,b,c,d;a=0;for(b=Wa.length;a<b;++a)c=Wa[a],d=this.b.Hl+c.filename,c.ra=this.zj(d,!1)};ra.gv=function(){var a=0,b,c,d;b=0;for(c=Wa.length;b<c;++b)d=Wa[b],d.ra.Kv()||d.ra.Cv()||this.b.lb||this.b.Gj?a+=d.size:d.ra.op()&&(a+=Math.floor(d.size/2));return a};ra.Aw=
|
||||
function(){var a,b,c,d;c=a=0;for(b=F.length;a<b;++a)d=F[a],F[c]=d,d.Md?d.zw():++c;F.length=c};ra.zj=function(a,b){var c,d,g,e=null;c=0;for(d=F.length;c<d;c++)if(g=F[c],g.src===a){e=g;break}e||(kb&&b&&this.Aw(),e=new x(a,b),F.push(e));return e};ra.Xo=function(a,b,c,d,g){var e,f,h;e=0;for(f=A.length;e<f;e++)if(h=A[e],h.src===a&&(h.zt()||c))return h.tag=b,h;a=this.zj(a,c);if(!a.ja)return"<preload>"!==b&&(a.mk=b,a.Em=d,a.Fn=g),null;h=new z(a,b);A.push(h);return h};var ha=[];ca.prototype.Vi=function(a){return lb(J,
|
||||
a)};u.g=new ca;U.prototype.Play=function(a,b,c,d){!Y&&(c=Math.pow(10,c/20),isFinite(c)||(c=0),0>c&&(c=0),1<c&&(c=1),M=this.Xo(this.b.Hl+a[0]+(ja?".ogg":".m4a"),d,a[1],0!==b,c))&&(M.pn(!1),M.play(0!==b,c,0,this.aq),this.aq=0)};U.prototype.Ss=function(a,b){G(a);var c,d;c=0;for(d=ha.length;c<d;c++)ha[c].Tq(0===b)};U.prototype.Yi=function(a){G(a);var b;a=0;for(b=ha.length;a<b;a++)ha[a].stop()};U.prototype.$s=function(){var a,b;a=0;for(b=A.length;a<b;a++)A[a].stop()};U.prototype.Ts=function(a,b){G(a);
|
||||
var c,d;c=0;for(d=ha.length;c<d;c++)0===b?ha[c].pause():ha[c].Kq()};u.J=new U;R.prototype.Pr=function(a,b){G(b,!0);ha.length?a.H(ha[0].Xe()):a.H(0)};u.Ea=new R})();function X(f){this.b=f}
|
||||
(function(){function f(){e&&b&&window.OfflineClientInfo&&window.OfflineClientInfo.SetMessageCallback(function(b){w.fw(b)})}function p(){}function h(){}function l(){}var c=X.prototype;c.Da=function(b){this.La=b;this.b=b.b};var q=c.Da.prototype;q.Z=function(){};var e=!1,b=!1;document.addEventListener("DOMContentLoaded",function(){if(window.C2_RegisterSW&&navigator.serviceWorker){var b=document.createElement("script");b.onload=function(){e=!0;f()};b.src="offlineClient.js";document.head.appendChild(b)}});
|
||||
var w=null;q.jq=function(){b=!0;f()};c.ua=function(b){this.type=b;this.b=b.b};q=c.ua.prototype;q.Z=function(){var b=this;window.addEventListener("resize",function(){b.b.trigger(X.prototype.g.Bs,b)});w=this;"undefined"!==typeof navigator.onLine&&(window.addEventListener("online",function(){b.b.trigger(X.prototype.g.ys,b)}),window.addEventListener("offline",function(){b.b.trigger(X.prototype.g.ws,b)}));this.b.Ob||(document.addEventListener("appMobi.device.update.available",function(){b.b.trigger(X.prototype.g.al,
|
||||
b)}),document.addEventListener("backbutton",function(){b.b.trigger(X.prototype.g.Ti,b)}),document.addEventListener("menubutton",function(){b.b.trigger(X.prototype.g.Sn,b)}),document.addEventListener("searchbutton",function(){b.b.trigger(X.prototype.g.Cs,b)}),document.addEventListener("tizenhwkey",function(a){var c;switch(a.keyName){case "back":c=b.b.trigger(X.prototype.g.Ti,b);!c&&window.tizen&&window.tizen.application.getCurrentApplication().exit();break;case "menu":(c=b.b.trigger(X.prototype.g.Sn,
|
||||
b))||a.preventDefault()}}));this.b.Lj&&"undefined"!==typeof Windows?Windows.UI.Core.SystemNavigationManager.getForCurrentView().addEventListener("backrequested",function(a){b.b.trigger(X.prototype.g.Ti,b)&&(a.handled=!0)}):this.b.rp&&WinJS.Application&&(WinJS.Application.onbackclick=function(){return!!b.b.trigger(X.prototype.g.Ti,b)});this.b.ko(function(a){a?b.b.trigger(X.prototype.g.zs,b):b.b.trigger(X.prototype.g.As,b)})};q.fw=function(b){b=b.data.type;"downloading-update"===b?this.b.trigger(X.prototype.g.Hs,
|
||||
this):"update-ready"===b||"update-pending"===b?this.b.trigger(X.prototype.g.al,this):"offline-ready"===b&&this.b.trigger(X.prototype.g.xs,this)};p.prototype.ys=function(){return!0};p.prototype.ws=function(){return!0};p.prototype.al=function(){return!0};p.prototype.As=function(){return!0};p.prototype.zs=function(){return!0};p.prototype.Bs=function(){return!0};p.prototype.Ti=function(){return!0};p.prototype.Sn=function(){return!0};p.prototype.Cs=function(){return!0};p.prototype.Hs=function(){return!0};
|
||||
p.prototype.al=function(){return!0};p.prototype.xs=function(){return!0};c.g=new p;h.prototype.Rr=function(b){try{eval&&eval(b)}catch(a){console&&console.error&&console.error("Error executing Javascript: ",a)}};c.J=new h;l.prototype.Qr=function(b,a){if(eval){var c=0;try{c=eval(a)}catch(e){console&&console.error&&console.error("Error executing Javascript: ",e)}"number"===typeof c?b.$f(c):"string"===typeof c?b.$f(c):"boolean"===typeof c?b.$f(c?1:0):b.$f(0)}else b.$f(0)};c.Ea=new l})();
|
||||
function sc(f){this.b=f}
|
||||
(function(){function f(){this.name="";this.Bi=0;this.Eb=[]}function p(){b++;b===e.length&&e.push(new f);return e[b]}function h(){}function l(){}function c(){}var q=sc.prototype;q.Da=function(b){this.La=b;this.b=b.b};q.Da.prototype.Z=function(){};q.ua=function(b){this.type=b;this.b=b.b};var e=[],b=-1;q.ua.prototype.Z=function(){var c=this;window.c2_callFunction=function(d,a){var g,e,f,h=p();h.name=d.toLowerCase();h.Bi=0;if(a)for(h.Eb.length=a.length,g=0,e=a.length;g<e;++g)f=a[g],h.Eb[g]="number"===
|
||||
typeof f||"string"===typeof f?f:"boolean"===typeof f?f?1:0:0;else L(h.Eb);c.b.trigger(sc.prototype.g.Wi,c,h.name);b--;return h.Bi}};h.prototype.Wi=function(c){var d=0>b?null:e[b];return d?lb(c,d.name):!1};q.g=new h;l.prototype.CallFunction=function(c,d){var a=p();a.name=c.toLowerCase();a.Bi=0;Ba(a.Eb,d);this.b.trigger(sc.prototype.g.Wi,this,a.name);b--};q.J=new l;c.prototype.Hr=function(c,d){var a=p();a.name=d.toLowerCase();a.Bi=0;L(a.Eb);var g,e;g=2;for(e=arguments.length;g<e;g++)a.Eb.push(arguments[g]);
|
||||
this.b.trigger(sc.prototype.g.Wi,this,a.name);b--;c.$f(a.Bi)};q.Ea=new c})();function rc(f){this.b=f}
|
||||
(function(){function f(){if(0===this.ij.length){var b=document.createElement("canvas");b.width=this.width;b.height=this.height;var a=b.getContext("2d");this.ag?a.drawImage(this.hb,this.Wf,this.Xf,this.width,this.height,0,0,this.width,this.height):a.drawImage(this.hb,0,0,this.width,this.height);this.ij=b.toDataURL("image/png")}return this.ij}function p(){}function h(){}var l=rc.prototype;l.Da=function(b){this.La=b;this.b=b.b};var c=l.Da.prototype;c.Z=function(){if(!this.ca){var b,a,c,e,h,l,q,r,m;this.kd=
|
||||
[];this.Kh=!1;b=0;for(a=this.lc.length;b<a;b++){h=this.lc[b];q={};q.name=h[0];q.speed=h[1];q.loop=h[2];q.cn=h[3];q.dn=h[4];q.zq=h[5];q.da=h[6];q.frames=[];c=0;for(e=h[7].length;c<e;c++)l=h[7][c],r={},r.jr=l[0],r.kr=l[1],r.Wf=l[2],r.Xf=l[3],r.width=l[4],r.height=l[5],r.duration=l[6],r.qc=l[7],r.rc=l[8],r.am=l[9],r.nk=l[10],r.Sm=l[11],r.ag=0!==r.width,r.ij="",r.Uy=f,console.log(l),m={left:0,top:0,right:1,bottom:1},r.qn=m,r.xc=null,(m=this.b.Tu(l[0]))?r.hb=m:(r.hb=new Image,r.hb.Ft=l[0],r.hb.Et=l[1],
|
||||
r.hb.xt=null,this.b.lx(r.hb,l[0])),q.frames.push(r),this.kd.push(r);this.lc[b]=q}}};c.An=function(){var b,a,c;b=0;for(a=this.e.length;b<a;b++)c=this.e[b],c.mg=c.ab.xc};c.Nm=function(){if(!this.ca){var b,a,c;b=0;for(a=this.kd.length;b<a;++b)c=this.kd[b],c.hb.xt=null,c.xc=null;this.Kh=!1;this.An()}};c.mq=function(){if(!this.ca&&this.e.length){var b,a,c;b=0;for(a=this.kd.length;b<a;++b)c=this.kd[b],c.xc=this.b.G.zm(c.hb,this.b.Ta,c.Sm);this.An()}};c.Vv=function(){if(!this.ca&&!this.Kh&&this.b.G){var b,
|
||||
a,c;b=0;for(a=this.kd.length;b<a;++b)c=this.kd[b],c.xc=this.b.G.zm(c.hb,this.b.Ta,c.Sm);this.Kh=!0}};c.xr=function(){if(!this.ca&&!this.e.length&&this.Kh){var b,a,c;b=0;for(a=this.kd.length;b<a;++b)c=this.kd[b],this.b.G.deleteTexture(c.xc),c.xc=null;this.Kh=!1}};var q=[];c.Dq=function(b){var a,c,e;L(q);a=0;for(c=this.kd.length;a<c;++a)e=this.kd[a].hb,-1===q.indexOf(e)&&(b.drawImage(e,0,0),q.push(e))};l.ua=function(b){this.type=b;this.b=b.b;b=this.type.lc[0].frames[0].nk;this.Fb?this.Fd.Fi(b):this.Fd=
|
||||
new db(b)};var e=l.ua.prototype;e.Z=function(){this.visible=0===this.B[0];this.cm=this.nm=!1;this.rh=0!==this.B[3];this.Ka=this.Wo(this.B[1])||this.type.lc[0];this.I=this.B[2];0>this.I&&(this.I=0);this.I>=this.Ka.frames.length&&(this.I=this.Ka.frames.length-1);var b=this.Ka.frames[this.I];this.Fd.Fi(b.nk);this.qc=b.qc;this.rc=b.rc;this.ng=this.Ka.speed;this.Se=this.Ka.dn;1===this.type.lc.length&&1===this.type.lc[0].frames.length||0===this.ng||(this.b.Nk(this),this.nm=!0);this.Fb?this.Ed.reset():this.Ed=
|
||||
new bb;this.me=this.Ed.U;this.uf=!0;this.be=0;this.tf=!0;this.sl=this.oo="";this.At=0;this.cj=-1;this.type.Vv();var a,c,e,f,h,l,r,b=0;for(a=this.type.lc.length;b<a;b++)for(f=this.type.lc[b],c=0,e=f.frames.length;c<e;c++)h=f.frames[c],0===h.width&&(h.width=h.hb.width,h.height=h.hb.height),h.ag&&(r=h.hb,l=h.qn,l.left=h.Wf/r.width,l.top=h.Xf/r.height,l.right=(h.Wf+h.width)/r.width,l.bottom=(h.Xf+h.height)/r.height,0===h.Wf&&0===h.Xf&&h.width===r.width&&h.height===r.height&&(h.ag=!1));this.ab=this.Ka.frames[this.I];
|
||||
this.mg=this.ab.xc};e.yb=function(){var b={a:this.Ka.da,f:this.I,cas:this.ng,fs:this.me,ar:this.be,at:this.Ed.U,rt:this.Se};this.uf||(b.ap=this.uf);this.tf||(b.af=this.tf);return b};e.Pb=function(b){var a=this.Xu(b.a);a&&(this.Ka=a);this.I=b.f;0>this.I&&(this.I=0);this.I>=this.Ka.frames.length&&(this.I=this.Ka.frames.length-1);this.ng=b.cas;this.me=b.fs;this.be=b.ar;this.Ed.reset();this.Ed.U=b.at;this.uf=b.hasOwnProperty("ap")?b.ap:!0;this.tf=b.hasOwnProperty("af")?b.af:!0;b.hasOwnProperty("rt")?
|
||||
this.Se=b.rt:this.Se=this.Ka.dn;this.ab=this.Ka.frames[this.I];this.mg=this.ab.xc;this.Fd.Fi(this.ab.nk);this.qc=this.ab.qc;this.rc=this.ab.rc};e.gl=function(b){this.I=b?0:this.Ka.frames.length-1;this.uf=!1;this.oo=this.Ka.name;this.cm=!0;this.b.trigger(rc.prototype.g.es,this);this.b.trigger(rc.prototype.g.ds,this);this.cm=!1;this.be=0};e.hl=function(){return this.Ed.U};e.Pa=function(){this.Ed.add(this.b.Gf(this));this.sl.length&&this.Lt();0<=this.cj&&this.Lo();var b=this.Ed.U,a=this.Ka,c=a.frames[this.I],
|
||||
e=c.duration/this.ng;this.uf&&b>=this.me+e&&(this.tf?this.I++:this.I--,this.me+=e,this.I>=a.frames.length&&(a.zq?(this.tf=!1,this.I=a.frames.length-2):a.loop?this.I=this.Se:(this.be++,this.be>=a.cn?this.gl(!1):this.I=this.Se)),0>this.I&&(a.zq?(this.I=1,this.tf=!0,a.loop||(this.be++,this.be>=a.cn&&this.gl(!0))):a.loop?this.I=this.Se:(this.be++,this.be>=a.cn?this.gl(!0):this.I=this.Se)),0>this.I?this.I=0:this.I>=a.frames.length&&(this.I=a.frames.length-1),b>this.me+a.frames[this.I].duration/this.ng&&
|
||||
(this.me=b),b=a.frames[this.I],this.ig(c,b),this.b.V=!0)};e.Wo=function(b){var a,c,e;a=0;for(c=this.type.lc.length;a<c;a++)if(e=this.type.lc[a],lb(e.name,b))return e;return null};e.Xu=function(b){var a,c,e;a=0;for(c=this.type.lc.length;a<c;a++)if(e=this.type.lc[a],e.da===b)return e;return null};e.Lt=function(){var b=this.Ka.frames[this.I],a=this.Wo(this.sl);this.sl="";!a||lb(a.name,this.Ka.name)&&this.uf||(this.Ka=a,this.ng=a.speed,this.Se=a.dn,0>this.I&&(this.I=0),this.I>=this.Ka.frames.length&&
|
||||
(this.I=this.Ka.frames.length-1),1===this.At&&(this.I=0),this.uf=!0,this.me=this.Ed.U,this.tf=!0,this.ig(b,this.Ka.frames[this.I]),this.b.V=!0)};e.Lo=function(){var b=this.Ka.frames[this.I],a=this.I;this.I=qa(this.cj);0>this.I&&(this.I=0);this.I>=this.Ka.frames.length&&(this.I=this.Ka.frames.length-1);a!==this.I&&(this.ig(b,this.Ka.frames[this.I]),this.me=this.Ed.U,this.b.V=!0);this.cj=-1};e.ig=function(b,a){var c=b.width,e=b.height,f=a.width,h=a.height;c!=f&&(this.width*=f/c);e!=h&&(this.height*=
|
||||
h/e);this.qc=a.qc;this.rc=a.rc;this.Fd.Fi(a.nk);this.la();this.ab=a;this.mg=a.xc;c=0;for(e=this.X.length;c<e;c++)f=this.X[c],f.nq&&f.nq(b,a);this.b.trigger(rc.prototype.g.ig,this)};e.je=function(b){b.globalAlpha=this.opacity;var a=this.ab,c=a.ag,e=a.hb,f=this.x,h=this.y,l=this.width,r=this.height;if(0===this.j&&0<=l&&0<=r)f-=this.qc*l,h-=this.rc*r,this.b.ze&&(f=Math.round(f),h=Math.round(h)),c?b.drawImage(e,a.Wf,a.Xf,a.width,a.height,f,h,l,r):b.drawImage(e,f,h,l,r);else{this.b.ze&&(f=Math.round(f),
|
||||
h=Math.round(h));b.save();var m=0<l?1:-1,q=0<r?1:-1;b.translate(f,h);1===m&&1===q||b.scale(m,q);b.rotate(this.j*m*q);f=0-this.qc*na(l);h=0-this.rc*na(r);c?b.drawImage(e,a.Wf,a.Xf,a.width,a.height,f,h,na(l),na(r)):b.drawImage(e,f,h,na(l),na(r));b.restore()}};e.qg=function(b){this.Xc(b)};e.Xc=function(b){b.Hc(this.mg);b.$g(this.opacity);var a=this.ab,c=this.wf;if(this.b.ze){var e=Math.round(this.x)-this.x,f=Math.round(this.y)-this.y;a.ag?b.lf(c.Ic+e,c.Jc+f,c.fd+e,c.gd+f,c.Rc+e,c.Sc+f,c.Pc+e,c.Qc+f,
|
||||
a.qn):b.Ai(c.Ic+e,c.Jc+f,c.fd+e,c.gd+f,c.Rc+e,c.Sc+f,c.Pc+e,c.Qc+f)}else a.ag?b.lf(c.Ic,c.Jc,c.fd,c.gd,c.Rc,c.Sc,c.Pc,c.Qc,a.qn):b.Ai(c.Ic,c.Jc,c.fd,c.gd,c.Rc,c.Sc,c.Pc,c.Qc)};e.av=function(b){var a=this.ab,c,e;c=0;for(e=a.am.length;c<e;c++)if(lb(b,a.am[c][0]))return c;return-1};e.Ql=function(b,a){var c=this.ab,e=c.am,f;I(b)?f=this.av(b):f=b-1;f=qa(f);if(0>f||f>=e.length)return a?this.x:this.y;var h=(e[f][1]-c.qc)*this.width,e=e[f][2],e=(e-c.rc)*this.height,c=Math.cos(this.j);f=Math.sin(this.j);var l=
|
||||
h*c-e*f,e=e*c+h*f,h=l+this.x,e=e+this.y;return a?h:e};var b=new ba,w=!1;new ua(0,0,0,0);c.finish=function(c){if(w){if(c){var a=this.b.Sb().oc.wd;c=null.ya();var g=b.sf(),e,f;if(c.Fa){c.Fa=!1;L(c.e);e=0;for(f=g.length;e<f;++e)c.e[e]=g[e];if(a)for(L(c.ea),e=0,f=null.e.length;e<f;++e)g=null.e[e],b.contains(g)||c.ea.push(g)}else if(a)for(a=c.e.length,e=0,f=g.length;e<f;++e)c.e[a+e]=g[e],Ea(c.ea,g[e]);else Ba(c.e,g);null.Me()}b.clear();w=!1}};p.prototype.ds=function(b){return lb(this.oo,b)};p.prototype.es=
|
||||
function(){return!0};p.prototype.ig=function(){return!0};p.prototype.Gs=function(){return!0};l.g=new p;h.prototype.Ms=function(b){this.cj=b;this.nm||(this.b.Nk(this),this.nm=!0);this.cm||this.Lo()};h.prototype.cs=function(b,a,c){var e=new Image,f=this,h=this.ab;e.onload=function(){h.hb.src===e.src?f.b.G&&f.ab===h&&(f.mg=h.xc):(h.hb=e,h.Wf=0,h.Xf=0,h.width=e.width,h.height=e.height,h.ag=!1,h.ij="",h.Sm=0,f.b.G&&(h.xc&&f.b.G.deleteTexture(h.xc),h.xc=f.b.G.zm(e,f.b.Ta),f.ab===h&&(f.mg=h.xc),f.type.An()));
|
||||
0===a&&(f.width=e.width,f.height=e.height,f.la());f.b.V=!0;f.b.trigger(rc.prototype.g.Gs,f)};"data:"!==b.substr(0,5)&&0===c&&(e.crossOrigin="anonymous");this.b.mn(e,b)};l.J=new h;l.Ea=new function(){}})();function uc(f){this.b=f}
|
||||
(function(){function f(){return w.length?w.pop():{}}function p(b){var a,c;a=0;for(c=b.length;a<c;a++)w.push(b[a]);L(b)}function h(b){return b.length&&" "===b.charAt(b.length-1)?b.substring(0,b.length-1):b}function l(){}function c(){}var q=uc.prototype;q.Z=function(){q.J.Ys=function(b){this.width!==b&&(this.width=b,this.dg=!0,this.la())}};q.Da=function(b){this.La=b;this.b=b.b};var e=q.Da.prototype;e.Z=function(){};e.Nm=function(){if(!this.ca){var b,a,c;b=0;for(a=this.e.length;b<a;b++)c=this.e[b],c.Od=
|
||||
null,c.Uf=null,c.uc=null}};q.ua=function(b){this.type=b;this.b=b.b;this.Fb?L(this.ef):this.ef=[];this.dg=!0};e=q.ua.prototype;e.Z=function(){this.text=this.B[0];this.visible=0===this.B[1];this.font=this.B[2];this.color=this.B[3];this.Ej=this.B[4];this.Vk=this.B[5];this.In=0===this.B[7];this.wm=this.Qj=this.width;this.Pj=this.height;this.ym=this.B[8];this.wj=this.sg="";this.hr=this.ir=this.kf=0;this.jw();this.uc=this.Uf=this.Od=null;this.$p=!1;this.$h=this.b.Wd;this.Fb?this.Xg.set(0,0,1,1):this.Xg=
|
||||
new ua(0,0,1,1);this.b.G&&this.b.Nk(this)};e.jw=function(){var b=this.font.split(" "),a;for(a=0;a<b.length;a++)if("pt"===b[a].substr(b[a].length-2,2)){this.kf=parseInt(b[a].substr(0,b[a].length-2));this.sk=Math.ceil(this.kf/72*96)+4;0<a&&(this.wj=b[a-1]);this.sg=b[a+1];for(a+=2;a<b.length;a++)this.sg+=" "+b[a];break}};e.yb=function(){return{t:this.text,f:this.font,c:this.color,ha:this.Ej,va:this.Vk,wr:this.In,lho:this.ym,fn:this.sg,fs:this.wj,ps:this.kf,pxh:this.sk,tw:this.ir,th:this.hr,lrt:this.$h}};
|
||||
e.Pb=function(b){this.text=b.t;this.font=b.f;this.color=b.c;this.Ej=b.ha;this.Vk=b.va;this.In=b.wr;this.ym=b.lho;this.sg=b.fn;this.wj=b.fs;this.kf=b.ps;this.sk=b.pxh;this.ir=b.tw;this.hr=b.th;this.$h=b.lrt;this.dg=!0;this.wm=this.Qj=this.width;this.Pj=this.height};e.Pa=function(){if(this.b.G&&this.uc&&300<=this.b.Wd-this.$h){var b=this.n;this.Ga();var a=this.Ja;if(a.right<b.wa||a.bottom<b.xa||a.left>b.Aa||a.top>b.za)this.b.G.deleteTexture(this.uc),this.Od=this.Uf=this.uc=null}};e.oi=function(){this.Od=
|
||||
this.Uf=null;this.b.G&&this.uc&&this.b.G.deleteTexture(this.uc);this.uc=null};e.ax=function(){this.font=this.wj+" "+this.kf.toString()+"pt "+this.sg;this.dg=!0;this.b.V=!0};e.je=function(b,a){b.font=this.font;b.textBaseline="top";b.fillStyle=this.color;b.globalAlpha=a?1:this.opacity;var c=1;a&&(c=Math.abs(this.n.pc()),b.save(),b.scale(c,c));if(this.dg||this.width!==this.wm)this.type.La.et(this.text,this.ef,b,this.width,this.In),this.dg=!1,this.wm=this.width;this.Ga();var c=a?0:this.wf.Ic,e=a?0:this.wf.Jc;
|
||||
this.b.ze&&(c=c+.5|0,e=e+.5|0);0===this.j||a||(b.save(),b.translate(c,e),b.rotate(this.j),e=c=0);var f=e+this.height,h=this.sk,h=h+this.ym,l,r;1===this.Vk?e+=Math.max(this.height/2-this.ef.length*h/2,0):2===this.Vk&&(e+=Math.max(this.height-this.ef.length*h-2,0));for(r=0;r<this.ef.length&&!(l=c,1===this.Ej?l=c+(this.width-this.ef[r].width)/2:2===this.Ej&&(l=c+(this.width-this.ef[r].width)),b.fillText(this.ef[r].text,l,e),e+=h,e>=f-h);r++);(0!==this.j||a)&&b.restore();this.$h=this.b.Wd};e.Xc=function(b){if(!(1>
|
||||
this.width||1>this.height)){var a=this.dg||this.$p;this.$p=!1;var c=this.n.pc(),e=this.n.jb(),f=this.Xg,h=c*this.width,l=c*this.height,r=Math.ceil(h),m=Math.ceil(l),q=Math.abs(r),p=Math.abs(m),w=this.b.L/2,Q=this.b.K/2;this.Uf||(this.Od=document.createElement("canvas"),this.Od.width=q,this.Od.height=p,this.Qj=q,this.Pj=p,a=!0,this.Uf=this.Od.getContext("2d"));if(q!==this.Qj||p!==this.Pj)this.Od.width=q,this.Od.height=p,this.uc&&(b.deleteTexture(this.uc),this.uc=null),a=!0;a&&(this.Uf.clearRect(0,
|
||||
0,q,p),this.je(this.Uf,!0),this.uc||(this.uc=b.zc(q,p,this.b.Ta,this.b.$e)),b.kx(this.Od,this.uc,this.b.$e));this.Qj=q;this.Pj=p;b.Hc(this.uc);b.$g(this.opacity);b.ad();b.translate(-w,-Q);b.Mc();var C=this.wf,a=this.n.mb(C.Ic,C.Jc,!0),q=this.n.mb(C.Ic,C.Jc,!1),p=this.n.mb(C.fd,C.gd,!0),w=this.n.mb(C.fd,C.gd,!1),Q=this.n.mb(C.Rc,C.Sc,!0),x=this.n.mb(C.Rc,C.Sc,!1),z=this.n.mb(C.Pc,C.Qc,!0),C=this.n.mb(C.Pc,C.Qc,!1);if(this.b.ze||0===this.j&&0===e)var H=(a+.5|0)-a,G=(q+.5|0)-q,a=a+H,q=q+G,p=p+H,w=w+
|
||||
G,Q=Q+H,x=x+G,z=z+H,C=C+G;0===this.j&&0===e?(p=a+r,w=q,Q=p,x=q+m,z=a,C=x,f.right=1,f.bottom=1):(f.right=h/r,f.bottom=l/m);b.lf(a,q,p,w,Q,x,z,C,f);b.ad();b.scale(c,c);b.wk(-this.n.jb());b.translate((this.n.wa+this.n.Aa)/-2,(this.n.xa+this.n.za)/-2);b.Mc();this.$h=this.b.Wd}};var b=[];q.bt=function(c){L(b);for(var a="",e,f=0;f<c.length;)if(e=c.charAt(f),"\n"===e)a.length&&(b.push(a),a=""),b.push("\n"),++f;else if(" "===e||"\t"===e||"-"===e){do a+=c.charAt(f),f++;while(f<c.length&&(" "===c.charAt(f)||
|
||||
"\t"===c.charAt(f)));b.push(a);a=""}else f<c.length&&(a+=e,f++);a.length&&b.push(a)};var w=[];q.et=function(b,a,c,e,h){if(b&&b.length)if(2>=e)p(a);else{if(100>=b.length&&-1===b.indexOf("\n")){var l=c.measureText(b).width;if(l<=e){p(a);a.push(f());a[0].text=b;a[0].width=l;return}}this.ft(b,a,c,e,h)}else p(a)};q.ft=function(c,a,e,l,k){k&&(this.bt(c),c=b);var q="",p,r,m,t=0;for(m=0;m<c.length;m++)"\n"===c[m]?(t>=a.length&&a.push(f()),q=h(q),r=a[t],r.text=q,r.width=e.measureText(q).width,t++,q=""):(p=
|
||||
q,q+=c[m],r=e.measureText(q).width,r>=l&&(t>=a.length&&a.push(f()),p=h(p),r=a[t],r.text=p,r.width=e.measureText(p).width,t++,q=c[m],k||" "!==q||(q="")));q.length&&(t>=a.length&&a.push(f()),q=h(q),r=a[t],r.text=q,r.width=e.measureText(q).width,t++);for(m=t;m<a.length;m++)w.push(a[m]);a.length=t};q.g=new function(){};l.prototype.Vs=function(b){ka(b)&&1E9>b&&(b=Math.round(1E10*b)/1E10);b=b.toString();this.text!==b&&(this.text=b,this.dg=!0,this.b.V=!0)};l.prototype.Os=function(b){this.kf!==b&&(this.kf=
|
||||
b,this.sk=Math.ceil(this.kf/72*96)+4,this.ax())};q.J=new l;c.prototype.Text=function(b){b.Ub(this.text)};q.Ea=new c})();function Z(f){this.b=f}
|
||||
(function(){function f(b){d=b.x;a=b.y;g=b.z}function p(a,b,c,d){var e;e=n.length?n.pop():new h;e.init(a,b,c,d);return e}function h(){this.Ii=this.id=this.y=this.x=this.Hk=this.Gk=this.vm=this.time=this.tn=0;this.Ni=this.Pk=!1}function l(a){return a.sourceCapabilities&&a.sourceCapabilities.firesTouchEvents||a.originalEvent&&a.originalEvent.sourceCapabilities&&a.originalEvent.sourceCapabilities.firesTouchEvents}function c(){}function q(){}var e=Z.prototype;e.Da=function(a){this.La=a;this.b=a.b};e.Da.prototype.Z=
|
||||
function(){};e.ua=function(a){this.type=a;this.b=a.b;this.touches=[];this.Gm=!1};var b=e.ua.prototype,w={left:0,top:0};b.Dh=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 d=0,a=0,g=0,n=[];h.prototype.init=function(a,b,c,d){var e=Ya();this.tn=this.vm=this.time=e;this.Gk=a;this.Hk=b;this.x=a;this.y=b;this.pressure=this.height=this.width=0;this.id=c;this.Ii=d;this.Ni=this.Pk=!1};h.prototype.update=function(a,b,c,d,e,g){this.vm=this.time;this.time=
|
||||
a;this.x=b;this.y=c;this.width=d;this.height=e;this.pressure=g;!this.Ni&&15<=Sa(this.Gk,this.Hk,this.x,this.y)&&(this.Ni=!0)};h.prototype.Yv=function(a,b){!this.Pk&&500<=Ya()-this.tn&&!this.Ni&&15>Sa(this.Gk,this.Hk,this.x,this.y)&&(this.Pk=!0,a.Yd=this.Ii,a.fh=this.id,a.wg=b,a.b.trigger(Z.prototype.g.ss,a),a.ge=this.x,a.he=this.y,a.b.trigger(Z.prototype.g.ts,a),a.wg=0)};var k=-1E3,v=-1E3,P=-1E4;h.prototype.Up=function(a,b){if(!this.Pk){var c=Ya();333>=c-this.tn&&!this.Ni&&15>Sa(this.Gk,this.Hk,this.x,
|
||||
this.y)&&(a.Yd=this.Ii,a.fh=this.id,a.wg=b,666>=c-P&&25>Sa(k,v,this.x,this.y)?(a.b.trigger(Z.prototype.g.ks,a),a.ge=this.x,a.he=this.y,a.b.trigger(Z.prototype.g.ls,a),v=k=-1E3,P=-1E4):(a.b.trigger(Z.prototype.g.Es,a),a.ge=this.x,a.he=this.y,a.b.trigger(Z.prototype.g.Fs,a),k=this.x,v=this.y,P=c),a.wg=0)}};b.Z=function(){this.Nv=!("undefined"===typeof window.c2isWindows8||!window.c2isWindows8);this.wg=this.fh=this.Yd=this.he=this.ge=this.eo=this.co=this.bo=this.jt=this.it=this.ht=this.jk=this.ik=this.hk=
|
||||
0;this.ix=0!==this.B[0];var a=0<this.b.$b?document:this.b.canvas,b=document;this.b.Ob?b=a=window.Canvas:this.b.Yc&&(b=a=window);var c=this;"undefined"!==typeof PointerEvent?(a.addEventListener("pointerdown",function(a){c.lq(a)},!1),a.addEventListener("pointermove",function(a){c.kq(a)},!1),b.addEventListener("pointerup",function(a){c.fk(a,!1)},!1),b.addEventListener("pointercancel",function(a){c.fk(a,!0)},!1),this.b.canvas&&(this.b.canvas.addEventListener("MSGestureHold",function(a){a.preventDefault()},
|
||||
!1),document.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1),this.b.canvas.addEventListener("gesturehold",function(a){a.preventDefault()},!1),document.addEventListener("gesturehold",function(a){a.preventDefault()},!1))):window.navigator.msPointerEnabled?(a.addEventListener("MSPointerDown",function(a){c.lq(a)},!1),a.addEventListener("MSPointerMove",function(a){c.kq(a)},!1),b.addEventListener("MSPointerUp",function(a){c.fk(a,!1)},!1),b.addEventListener("MSPointerCancel",function(a){c.fk(a,
|
||||
!0)},!1),this.b.canvas&&(this.b.canvas.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1),document.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1))):(a.addEventListener("touchstart",function(a){c.pq(a)},!1),a.addEventListener("touchmove",function(a){c.oq(a)},!1),b.addEventListener("touchend",function(a){c.Om(a,!1)},!1),b.addEventListener("touchcancel",function(a){c.Om(a,!0)},!1));if(this.Nv){var d=function(a){a=a.reading;c.bo=a.accelerationX;c.co=a.accelerationY;
|
||||
c.eo=a.accelerationZ},e=function(a){a=a.reading;c.hk=a.yawDegrees;c.ik=a.pitchDegrees;c.jk=a.rollDegrees},g=Windows.Devices.Sensors.Accelerometer.getDefault();g&&(g.reportInterval=Math.max(g.minimumReportInterval,16),g.addEventListener("readingchanged",d));var h=Windows.Devices.Sensors.Inclinometer.getDefault();h&&(h.reportInterval=Math.max(h.minimumReportInterval,16),h.addEventListener("readingchanged",e));document.addEventListener("visibilitychange",function(){document.hidden||document.msHidden?
|
||||
(g&&g.removeEventListener("readingchanged",d),h&&h.removeEventListener("readingchanged",e)):(g&&g.addEventListener("readingchanged",d),h&&h.addEventListener("readingchanged",e))},!1)}else window.addEventListener("deviceorientation",function(a){c.hk=a.alpha||0;c.ik=a.beta||0;c.jk=a.gamma||0},!1),window.addEventListener("devicemotion",function(a){a.accelerationIncludingGravity&&(c.ht=a.accelerationIncludingGravity.x||0,c.it=a.accelerationIncludingGravity.y||0,c.jt=a.accelerationIncludingGravity.z||
|
||||
0);a.acceleration&&(c.bo=a.acceleration.x||0,c.co=a.acceleration.y||0,c.eo=a.acceleration.z||0)},!1);this.ix&&!this.b.lb&&(jQuery(document).mousemove(function(a){c.dw(a)}),jQuery(document).mousedown(function(a){c.cw(a)}),jQuery(document).mouseup(function(a){c.ew(a)}));!this.b.Eg&&this.b.Dc&&navigator.accelerometer&&navigator.accelerometer.watchAcceleration&&navigator.accelerometer.watchAcceleration(f,null,{frequency:40});this.b.Xw(this)};b.kq=function(a){if(a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&
|
||||
"mouse"!==a.pointerType){a.preventDefault&&a.preventDefault();var b=this.Dh(a.pointerId),c=Ya();if(0<=b){var d=this.b.lb?w:jQuery(this.b.canvas).offset(),b=this.touches[b];2>c-b.time||b.update(c,a.pageX-d.left,a.pageY-d.top,a.width||0,a.height||0,a.pressure||0)}}};b.lq=function(a){if(a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType){a.preventDefault&&mb(a)&&a.preventDefault();var b=this.b.lb?w:jQuery(this.b.canvas).offset(),c=a.pageX-b.left,b=a.pageY-b.top;Ya();this.Yd=this.touches.length;
|
||||
this.fh=a.pointerId;this.touches.push(p(c,b,a.pointerId,this.Yd));this.b.qe=!0;this.b.trigger(Z.prototype.g.Un,this);this.b.trigger(Z.prototype.g.Xn,this);this.ge=c;this.he=b;this.b.trigger(Z.prototype.g.$k,this);this.b.qe=!1}};b.fk=function(a,b){if(a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType){a.preventDefault&&mb(a)&&a.preventDefault();var c=this.Dh(a.pointerId);this.Yd=0<=c?this.touches[c].Ii:-1;this.fh=0<=c?this.touches[c].id:-1;this.b.qe=!0;this.b.trigger(Z.prototype.g.Tn,
|
||||
this);this.b.trigger(Z.prototype.g.Wn,this);0<=c&&(b||this.touches[c].Up(this,c),100>n.length&&n.push(this.touches[c]),this.touches.splice(c,1));this.b.qe=!1}};b.oq=function(a){a.preventDefault&&a.preventDefault();var b=Ya(),c,d,e,g;c=0;for(d=a.changedTouches.length;c<d;c++)if(e=a.changedTouches[c],g=this.Dh(e.identifier),0<=g){var f=this.b.lb?w:jQuery(this.b.canvas).offset();g=this.touches[g];2>b-g.time||g.update(b,e.pageX-f.left,e.pageY-f.top,2*(e.ez||e.mz||e.Yy||e.az||0),2*(e.fz||e.nz||e.Zy||e.bz||
|
||||
0),e.Ty||e.lz||e.Xy||e.$y||0)}};b.pq=function(a){a.preventDefault&&mb(a)&&a.preventDefault();var b=this.b.lb?w:jQuery(this.b.canvas).offset();Ya();this.b.qe=!0;var c,d,e,g;c=0;for(d=a.changedTouches.length;c<d;c++)if(e=a.changedTouches[c],g=this.Dh(e.identifier),-1===g){g=e.pageX-b.left;var f=e.pageY-b.top;this.Yd=this.touches.length;this.fh=e.identifier;this.touches.push(p(g,f,e.identifier,this.Yd));this.b.trigger(Z.prototype.g.Un,this);this.b.trigger(Z.prototype.g.Xn,this);this.ge=g;this.he=f;this.b.trigger(Z.prototype.g.$k,
|
||||
this)}this.b.qe=!1};b.Om=function(a,b){a.preventDefault&&mb(a)&&a.preventDefault();this.b.qe=!0;var c,d,e;c=0;for(d=a.changedTouches.length;c<d;c++)e=a.changedTouches[c],e=this.Dh(e.identifier),0<=e&&(this.Yd=this.touches[e].Ii,this.fh=this.touches[e].id,this.b.trigger(Z.prototype.g.Tn,this),this.b.trigger(Z.prototype.g.Wn,this),b||this.touches[e].Up(this,e),100>n.length&&n.push(this.touches[e]),this.touches.splice(e,1));this.b.qe=!1};b.hl=function(){return this.b.Dc&&0===this.hk&&0!==g?90*g:this.hk};
|
||||
b.Ry=function(){return this.b.Dc&&0===this.ik&&0!==a?90*a:this.ik};b.Sy=function(){return this.b.Dc&&0===this.jk&&0!==d?90*d:this.jk};b.cw=function(a){l(a)||(this.pq({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]}),this.Gm=!0)};b.dw=function(a){this.Gm&&!l(a)&&this.oq({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]})};b.ew=function(a){a.preventDefault&&this.b.ep&&!this.b.$e&&a.preventDefault();this.b.ep=!0;l(a)||(this.Om({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]}),
|
||||
this.Gm=!1)};b.Mi=function(){var a,b,c,d=Ya();a=0;for(b=this.touches.length;a<b;++a)c=this.touches[a],c.time<=d-50&&(c.vm=d),c.Yv(this,a)};c.prototype.Xn=function(){return!0};c.prototype.Wn=function(){return!0};c.prototype.$k=function(a){return a?this.b.Jk(a,this.ge,this.he):!1};c.prototype.Un=function(a){a=Math.floor(a);return a===this.Yd};c.prototype.Tn=function(a){a=Math.floor(a);return a===this.Yd};c.prototype.ss=function(){return!0};c.prototype.Es=function(){return!0};c.prototype.ks=function(){return!0};
|
||||
c.prototype.ts=function(a){return a?this.b.Jk(a,this.ge,this.he):!1};c.prototype.Fs=function(a){return a?this.b.Jk(a,this.ge,this.he):!1};c.prototype.ls=function(a){return a?this.b.Jk(a,this.ge,this.he):!1};e.g=new c;e.J=new function(){};q.prototype.$n=function(a,b){var c=this.wg;if(0>c||c>=this.touches.length)a.H(0);else{var d,e,g,f,h;ia(b)?(d=this.b.Eh(0),e=d.scale,g=d.Ie,f=d.ve,h=d.j,d.scale=1,d.Ie=1,d.ve=1,d.j=0,a.H(d.Rb(this.touches[c].x,this.touches[c].y,!0)),d.scale=e,d.Ie=g,d.ve=f,d.j=h):
|
||||
(d=ka(b)?this.b.Eh(b):this.b.Sl(b))?a.H(d.Rb(this.touches[c].x,this.touches[c].y,!0)):a.H(0)}};q.prototype.ao=function(a,b){var c=this.wg;if(0>c||c>=this.touches.length)a.H(0);else{var d,e,g,f,h;ia(b)?(d=this.b.Eh(0),e=d.scale,g=d.Ie,f=d.we,h=d.j,d.scale=1,d.Ie=1,d.we=1,d.j=0,a.H(d.Rb(this.touches[c].x,this.touches[c].y,!1)),d.scale=e,d.Ie=g,d.we=f,d.j=h):(d=ka(b)?this.b.Eh(b):this.b.Sl(b))?a.H(d.Rb(this.touches[c].x,this.touches[c].y,!1)):a.H(0)}};e.Ea=new q})();function vc(f){this.b=f}
|
||||
(function(){var f=vc.prototype;f.Da=function(f){this.behavior=f;this.b=f.b};f.Da.prototype.Z=function(){};f.ua=function(f,l){this.type=f;this.behavior=f.behavior;this.d=l;this.b=f.b};var p=f.ua.prototype;p.Z=function(){this.lo=this.B[0];this.no=this.B[1];this.ot=this.B[2];this.nt=this.B[3];this.d.Ga();this.Jn=this.d.Ja.left;this.Mn=this.d.Ja.top;this.Kn=this.b.Xa-this.d.Ja.left;this.Ln=this.b.Wa-this.d.Ja.top;this.an=this.b.Xa-this.d.Ja.right;this.kl=this.b.Wa-this.d.Ja.bottom;this.enabled=0!==this.B[4]};
|
||||
p.yb=function(){return{xleft:this.Jn,ytop:this.Mn,xright:this.Kn,ybottom:this.Ln,rdiff:this.an,bdiff:this.kl,enabled:this.enabled}};p.Pb=function(f){this.Jn=f.xleft;this.Mn=f.ytop;this.Kn=f.xright;this.Ln=f.ybottom;this.an=f.rdiff;this.kl=f.bdiff;this.enabled=f.enabled};p.Pa=function(){if(this.enabled){var f,l=this.d.n,c=this.d,q=this.d.Ja;0===this.lo?(c.Ga(),f=l.wa+this.Jn-q.left,0!==f&&(c.x+=f,c.la())):1===this.lo&&(c.Ga(),f=l.Aa-this.Kn-q.left,0!==f&&(c.x+=f,c.la()));0===this.no?(c.Ga(),f=l.xa+
|
||||
this.Mn-q.top,0!==f&&(c.y+=f,c.la())):1===this.no&&(c.Ga(),f=l.za-this.Ln-q.top,0!==f&&(c.y+=f,c.la()));1===this.ot&&(c.Ga(),f=l.Aa-this.an-q.right,0!==f&&(c.width+=f,0>c.width&&(c.width=0),c.la()));1===this.nt&&(c.Ga(),f=l.za-this.kl-q.bottom,0!==f&&(c.height+=f,0>c.height&&(c.height=0),c.la()))}};f.g=new function(){};f.J=new function(){};f.Ea=new function(){}})();function wc(f){this.b=f}
|
||||
(function(){function f(){}function p(){}var h=wc.prototype;h.Da=function(c){this.behavior=c;this.b=c.b};h.Da.prototype.Z=function(){};h.ua=function(c,f){this.type=c;this.behavior=c.behavior;this.d=f;this.b=c.b};var l=h.ua.prototype;l.Z=function(){this.fo=1===this.B[0];this.Bh=this.B[1];this.Ri=this.B[2];this.qj=this.B[3];this.Jt=this.B[4];this.rb=this.fo?0:3;this.Fb?this.cd.reset():this.cd=new bb;this.Tf=this.d.opacity?this.d.opacity:1;this.fo&&(0===this.Bh?(this.rb=1,0===this.Ri&&(this.rb=2)):(this.d.opacity=
|
||||
0,this.b.V=!0))};l.yb=function(){return{fit:this.Bh,wt:this.Ri,fot:this.qj,s:this.rb,st:this.cd.U,mo:this.Tf}};l.Pb=function(c){this.Bh=c.fit;this.Ri=c.wt;this.qj=c.fot;this.rb=c.s;this.cd.reset();this.cd.U=c.st;this.Tf=c.mo};l.Pa=function(){this.cd.add(this.b.Gf(this.d));0===this.rb&&(this.d.opacity=this.cd.U/this.Bh*this.Tf,this.b.V=!0,this.d.opacity>=this.Tf&&(this.d.opacity=this.Tf,this.rb=1,this.cd.reset(),this.b.trigger(wc.prototype.g.ns,this.d)));1===this.rb&&this.cd.U>=this.Ri&&(this.rb=2,
|
||||
this.cd.reset(),this.b.trigger(wc.prototype.g.bl,this.d));2===this.rb&&0!==this.qj&&(this.d.opacity=this.Tf-this.cd.U/this.qj*this.Tf,this.b.V=!0,0>this.d.opacity&&(this.d.opacity=0,this.rb=3,this.cd.reset(),this.b.trigger(wc.prototype.g.os,this.d),1===this.Jt&&this.b.$d(this.d)))};l.au=function(){this.rb=0;this.cd.reset();0===this.Bh?(this.rb=1,0===this.Ri&&(this.rb=2)):(this.d.opacity=0,this.b.V=!0)};f.prototype.os=function(){return!0};f.prototype.ns=function(){return!0};f.prototype.bl=function(){return!0};
|
||||
h.g=new f;p.prototype.Ks=function(){this.au()};h.J=new p;h.Ea=new function(){}})();function xc(f){this.b=f}
|
||||
(function(){function f(){}function p(){}var h=xc.prototype;h.Da=function(c){this.behavior=c;this.b=c.b};h.Da.prototype.Z=function(){};h.ua=function(c,f){this.type=c;this.behavior=c.behavior;this.d=f;this.b=c.b};var l=h.ua.prototype;l.Z=function(){this.Xd=this.Ud=this.rb=this.ek=this.gk=0};l.yb=function(){return{ontime:this.gk,offtime:this.ek,stage:this.rb,stagetimeleft:this.Ud,timeleft:this.Xd}};l.Pb=function(c){this.gk=c.ontime;this.ek=c.offtime;this.rb=c.stage;this.Ud=c.stagetimeleft;this.Xd=c.timeleft;
|
||||
null===this.Xd&&(this.Xd=Infinity)};l.Pa=function(){if(!(0>=this.Xd)){var c=this.b.Gf(this.d);this.Xd-=c;0>=this.Xd?(this.Xd=0,this.d.visible=!0,this.b.V=!0,this.b.trigger(xc.prototype.g.qs,this.d)):(this.Ud-=c,0>=this.Ud&&(0===this.rb?(this.d.visible=!1,this.rb=1,this.Ud+=this.ek):(this.d.visible=!0,this.rb=0,this.Ud+=this.gk),this.b.V=!0))}};f.prototype.qs=function(){return!0};h.g=new f;p.prototype.Sr=function(c,f,e){this.gk=c;this.ek=f;this.rb=1;this.Ud=f;this.Xd=e;this.d.visible=!1;this.b.V=!0};
|
||||
h.J=new p;h.Ea=new function(){}})();function yc(f){this.b=f}
|
||||
(function(){function f(){}var p=yc.prototype;p.Da=function(f){this.behavior=f;this.b=f.b};p.Da.prototype.Z=function(){};p.ua=function(f,c){this.type=f;this.behavior=f.behavior;this.d=c;this.b=f.b};var h=p.ua.prototype;h.Z=function(){this.pb=null;this.lk=-1;this.mode=this.Fg=this.Lk=this.Og=this.ye=this.wi=0;var f=this;this.Fb||(this.Yp=function(c){f.Mm(c)});this.b.io(this.Yp)};h.yb=function(){return{uid:this.pb?this.pb.uid:-1,pa:this.wi,pd:this.ye,msa:this.Og,tsa:this.Lk,lka:this.Fg,m:this.mode}};
|
||||
h.Pb=function(f){this.lk=f.uid;this.wi=f.pa;this.ye=f.pd;this.Og=f.msa;this.Lk=f.tsa;this.Fg=f.lka;this.mode=f.m};h.ae=function(){-1===this.lk?this.pb=null:this.pb=this.b.Fh(this.lk);this.lk=-1};h.Mm=function(f){this.pb==f&&(this.pb=null)};h.oi=function(){this.pb=null;this.b.Bw(this.Yp)};h.Pa=function(){};h.Mi=function(){if(this.pb){this.Fg!==this.d.j&&(this.Og=Ja(this.Og+(this.d.j-this.Fg)));var f=this.d.x,c=this.d.y;if(3===this.mode||4===this.mode){var h=Sa(this.d.x,this.d.y,this.pb.x,this.pb.y);
|
||||
if(h>this.ye||4===this.mode&&h<this.ye)c=Na(this.pb.x,this.pb.y,this.d.x,this.d.y),f=this.pb.x+Math.cos(c)*this.ye,c=this.pb.y+Math.sin(c)*this.ye}else f=this.pb.x+Math.cos(this.pb.j+this.wi)*this.ye,c=this.pb.y+Math.sin(this.pb.j+this.wi)*this.ye;this.Fg=h=Ja(this.Og+(this.pb.j-this.Lk));0!==this.mode&&1!==this.mode&&3!==this.mode&&4!==this.mode||this.d.x===f&&this.d.y===c||(this.d.x=f,this.d.y=c,this.d.la());0!==this.mode&&2!==this.mode||this.d.j===h||(this.d.j=h,this.d.la())}};p.g=new function(){};
|
||||
f.prototype.Is=function(f,c){if(f){var h=f.Pl(this.d);h&&(this.pb=h,this.wi=Na(h.x,h.y,this.d.x,this.d.y)-h.j,this.ye=Sa(h.x,h.y,this.d.x,this.d.y),this.Fg=this.Og=this.d.j,this.Lk=h.j,this.mode=c)}};p.J=new f;p.Ea=new function(){}})();function zc(f){this.b=f}
|
||||
(function(){function f(){}function p(){}var h=zc.prototype;h.Da=function(c){this.behavior=c;this.b=c.b};h.Da.prototype.Z=function(){};h.ua=function(c,f){this.type=c;this.behavior=c.behavior;this.d=f;this.b=c.b};var l=h.ua.prototype;l.Z=function(){this.enabled=1==this.B[0];this.Fb||(this.move={max:0,acc:0,dec:0});this.move.max=this.B[1];this.move.acc=this.B[2];this.move.dec=this.B[3];this.Fb||(this.target={x:0,y:0,a:0});this.bf=!1;this.Yf=this.Te=0;this.Th=!1;this.Fb||(this.Dd={x:0,y:0});this.Dd.x=
|
||||
0;this.Dd.y=0;this.Fb||(this.Oc={x:0,y:0,a:-1});this.Oc.x=0;this.Oc.y=0;this.Oc.a=-1;this.Zi=null;this.qm=!1};l.Pa=function(){this.Th&&(this.d.x==this.target.x&&this.d.y==this.target.y&&(this.qm=!0,this.b.trigger(zc.prototype.g.rs,this.d),this.qm=!1),this.Th=!1);if(this.enabled&&this.bf){var c=this.b.Gf(this.d);if(0!=c){this.Dd.x==this.d.x&&this.Dd.y==this.d.y||this.dl();var f=!1;0!=this.move.dec&&(f=this.Te,f=f*f/(2*this.move.dec)>=this.Yf);f=f?-this.move.dec:this.move.acc;0!=f&&this.jg(this.Te+
|
||||
f*c);c=this.Te*c;this.Yf-=c;0>=this.Yf||0>=this.Te?(this.bf=!1,this.d.x=this.target.x,this.d.y=this.target.y,this.jg(0),this.Wp(),this.Th=!0):(f=this.target.a,this.d.x+=c*Math.cos(f),this.d.y+=c*Math.sin(f));this.d.la();this.Dd.x=this.d.x;this.Dd.y=this.d.y}}};l.Mi=function(){this.Oc.x=this.d.x;this.Oc.y=this.d.y};l.jg=function(c){null!=c?this.Te=c>this.move.max?this.move.max:c:0==this.move.acc&&(this.Te=this.move.max)};l.dl=function(){var c=this.target.x-this.d.x,f=this.target.y-this.d.y;this.target.a=
|
||||
Math.atan2(f,c);this.Yf=Math.sqrt(c*c+f*f);this.Dd.x=this.d.x;this.Dd.y=this.d.y};l.cl=function(c,f){this.bf=!0;this.target.x=c;this.target.y=f;this.dl();this.jg(null);this.Oc.x=this.d.x;this.Oc.y=this.d.y};l.Pn=function(c,f){this.target.x=c;this.target.y=f;this.dl();this.bf=!1;this.d.x=this.target.x;this.d.y=this.target.y;this.jg(0);this.Wp();this.bf=!0};l.Qv=function(){var c=this.b.Wd,f=this.Zi!=c;this.Zi=c;return f};l.Wp=function(){if(this.Qv()){var c=this.d.x-this.Oc.x,f=this.d.y-this.Oc.y;if(0!=
|
||||
c||0!=f)this.Oc.a=Ka(Math.atan2(f,c))}};l.yb=function(){return{en:this.enabled,v:this.move,t:this.target,is_m:this.bf,c_spd:this.Te,rd:this.Yf,is_ht:this.Th,pp:this.Dd,ma:this.Oc,lt:this.Zi}};l.Pb=function(c){this.enabled=c.en;this.move=c.v;this.target=c.t;this.bf=c.is_m;this.Te=c.c_spd;this.Yf=c.rd;this.Th=c.is_ht;this.Dd=c.pp;this.Oc=c.ma;this.Zi=c.lt};h.g=new f;f.prototype.rs=function(){return this.qm};h.J=new p;p.prototype.cl=function(c,f){this.cl(c,f)};p.prototype.Pn=function(c,f){this.Pn(c,
|
||||
f)};p.prototype.jg=function(c){this.jg(c)};p.prototype.Yi=function(){this.bf=!1};h.Ea=new function(){}})();function Ac(f){this.b=f}
|
||||
(function(){function f(){}function p(){}function h(){}var l=Ac.prototype;l.Da=function(b){this.behavior=b;this.b=b.b};l.Da.prototype.Z=function(){};l.ua=function(b,c){this.type=b;this.behavior=b.behavior;this.d=c;this.b=b.b;this.u=0};var c=l.ua.prototype,q=2*Math.PI,e=Math.PI/2,b=3*Math.PI/2;c.Z=function(){this.A=1===this.B[0];this.Mg=this.B[1];this.Hn=this.B[2];this.xe=this.B[3];this.xe+=Math.random()*this.B[4];0===this.xe?this.u=0:(this.u=this.B[5]/this.xe*q,this.u+=Math.random()*this.B[6]/this.xe*
|
||||
q);this.Tb=this.B[7];this.Tb+=Math.random()*this.B[8];this.Rd=this.Kf=this.fa=0;5===this.Mg&&(this.Tb=V(this.Tb));this.init()};c.yb=function(){return{i:this.u,a:this.A,mv:this.Mg,w:this.Hn,p:this.xe,mag:this.Tb,iv:this.fa,iv2:this.Kf,r:this.Rd,lkv:this.tb,lkv2:this.Yh}};c.Pb=function(b){this.u=b.i;this.A=b.a;this.Mg=b.mv;this.Hn=b.w;this.xe=b.p;this.Tb=b.mag;this.fa=b.iv;this.Kf=b.iv2||0;this.Rd=b.r;this.tb=b.lkv;this.Yh=b.lkv2||0};c.init=function(){switch(this.Mg){case 0:this.fa=this.d.x;break;case 1:this.fa=
|
||||
this.d.y;break;case 2:this.fa=this.d.width;this.Rd=this.d.height/this.d.width;break;case 3:this.fa=this.d.width;break;case 4:this.fa=this.d.height;break;case 5:this.fa=this.d.j;break;case 6:this.fa=this.d.opacity;break;case 7:this.fa=0;break;case 8:this.fa=this.d.x,this.Kf=this.d.y}this.tb=this.fa;this.Yh=this.Kf};c.Zd=function(c){c=c%q;switch(this.Hn){case 0:return Math.sin(c);case 1:return c<=e?c/e:c<=b?1-2*(c-e)/Math.PI:(c-b)/e-1;case 2:return 2*c/q-1;case 3:return-2*c/q+1;case 4:return c<Math.PI?
|
||||
-1:1}return 0};c.Pa=function(){var b=this.b.Gf(this.d);this.A&&0!==b&&(0===this.xe?this.u=0:(this.u+=b/this.xe*q,this.u=this.u%q),this.bx())};c.bx=function(){switch(this.Mg){case 0:this.d.x!==this.tb&&(this.fa+=this.d.x-this.tb);this.d.x=this.fa+this.Zd(this.u)*this.Tb;this.tb=this.d.x;break;case 1:this.d.y!==this.tb&&(this.fa+=this.d.y-this.tb);this.d.y=this.fa+this.Zd(this.u)*this.Tb;this.tb=this.d.y;break;case 2:this.d.width=this.fa+this.Zd(this.u)*this.Tb;this.d.height=this.d.width*this.Rd;break;
|
||||
case 3:this.d.width=this.fa+this.Zd(this.u)*this.Tb;break;case 4:this.d.height=this.fa+this.Zd(this.u)*this.Tb;break;case 5:this.d.j!==this.tb&&(this.fa=Ja(this.fa+(this.d.j-this.tb)));this.d.j=Ja(this.fa+this.Zd(this.u)*this.Tb);this.tb=this.d.j;break;case 6:this.d.opacity=this.fa+this.Zd(this.u)*this.Tb/100;0>this.d.opacity?this.d.opacity=0:1<this.d.opacity&&(this.d.opacity=1);break;case 8:this.d.x!==this.tb&&(this.fa+=this.d.x-this.tb),this.d.y!==this.Yh&&(this.Kf+=this.d.y-this.Yh),this.d.x=this.fa+
|
||||
Math.cos(this.d.j)*this.Zd(this.u)*this.Tb,this.d.y=this.Kf+Math.sin(this.d.j)*this.Zd(this.u)*this.Tb,this.tb=this.d.x,this.Yh=this.d.y}this.d.la()};c.nq=function(b,c){switch(this.Mg){case 2:this.fa*=c.width/b.width;this.Rd=c.height/c.width;break;case 3:this.fa*=c.width/b.width;break;case 4:this.fa*=c.height/b.height}};f.prototype.Wr=function(){return this.A};l.g=new f;p.prototype.Yn=function(b){this.A=1===b};l.J=new p;h.prototype.ct=function(b){b.H(this.Zd(this.u)*this.Tb)};l.Ea=new h})();
|
||||
function Gc(f){this.b=f}
|
||||
(function(){function f(c,f){return(c/=f)<1/2.75?7.5625*c*c+0:c<2/2.75?1*(7.5625*(c-=1.5/2.75)*c+.75)+0:c<2.5/2.75?1*(7.5625*(c-=2.25/2.75)*c+.9375)+0:1*(7.5625*(c-=2.625/2.75)*c+.984375)+0}var p=Gc.prototype;p.Da=function(c){this.behavior=c;this.b=c.b};p.Da.prototype.Z=function(){};p.ua=function(c,f){this.type=c;this.behavior=c.behavior;this.d=f;this.b=c.b;this.u=0};var h=p.ua.prototype;h.hl=function(c){1<c&&(c=1);gc[this.group]=-1;gc[this.group]=c;gc[this.group]>=c&&(gc[this.group]=c)};h.dp=function(){""!=
|
||||
this.group&&("undefined"===typeof hc&&(hc={},gc={}),"undefined"===typeof hc[this.group]&&(hc[this.group]=[],gc[this.group]=-1),-1==hc[this.group].indexOf(this)&&hc[this.group].push(this))};h.mf=function(){this.Lc=this.d.width;this.Kc=this.d.height;this.gh=this.d.j;this.sr=this.d.opacity;this.qf=this.d.x;this.rf=this.d.y;this.Rk=this.value};h.Z=function(){this.A=1===this.B[0];this.C=this.B[1];this.yh=this.B[2];this.q=this.B[3];this.target=this.B[4];this.duration=this.B[5];this.eg=this.B[6];this.M=
|
||||
this.B[7];this.value=this.B[8];this.Lb=this.B[9];this.Jl=1===this.B[10];this.group=this.B[11];this.Xb=null;this.ec=0;5==this.M&&(this.ec=1);this.dp();this.Lf=!1;this.R=this.d.x;this.cb=this.d.y;this.S=parseFloat(this.target.split(",")[0]);this.Za=parseFloat(this.target.split(",")[1]);this.mf();this.hh=this.Hb=this.ta=this.$a=this.W=0;this.Rd=this.d.height/this.d.width;this.uk=this.reverse=!1;this.od=this.nd=!0;this.loop=!1;this.Ha=this.qa=0;this.um=this.M;this.cc=this.tb=this.W;this.Ec=this.$a;this.Jl&&
|
||||
this.init();""==this.q&&(this.q="current");this.ni=this.Pg=this.pi=this.Qg=this.si=this.Sg=this.ri=this.Rg=!1;this.A&&this.init()};h.init=function(){this.Rg=!1;""===this.q&&(this.q="current");""===this.target&&(this.target="current");var c="current"===this.q,f="current"===this.target,e="OBJ"===this.target;"OBJ"===this.target&&null!=this.Xb&&(0==this.C?this.target=1==this.Lb?this.Xb.x-this.d.x+","+(this.Xb.y-this.d.y):this.Xb.x+","+this.Xb.y:1==this.C||2==this.C||3==this.C||7==this.C?this.target=1==
|
||||
this.Lb?(2==this.C?1:this.Xb.width)+","+(3==this.C?1:this.Xb.height):(2==this.C?1:this.Xb.width/this.Lc)+","+(3==this.C?1:this.Xb.height/this.Kc):4==this.C?this.target=1==this.Lb?Ga(this.Xb.j-this.d.j)+"":Ga(this.Xb.j)+"":5==this.C&&(this.target=1==this.Lb?100*(this.Xb.opacity-this.d.opacity)+"":100*this.Xb.opacity+""));if(0==this.C)f&&(this.target=this.d.x+","+this.d.y),c?this.q=1==this.Lb?this.d.x+","+this.d.y:this.qf+","+this.rf:this.reverse||1==this.M||(this.d.x=parseFloat(this.q.split(",")[0]),
|
||||
this.d.y=parseFloat(this.q.split(",")[1])),1==this.Lb?(this.loop&&(this.d.x=this.qf,this.d.y=this.rf),this.R=this.d.x,this.cb=this.d.y,this.reverse?(this.S=-parseFloat(this.target.split(",")[0]),this.Za=-parseFloat(this.target.split(",")[1])):(this.S=parseFloat(this.target.split(",")[0]),this.Za=parseFloat(this.target.split(",")[1])),this.W=this.R,this.$a=this.cb,this.ta=this.W+this.S,this.Hb=this.$a+this.Za):(this.reverse?(this.d.x=parseFloat(this.target.split(",")[0]),this.d.y=parseFloat(this.target.split(",")[1]),
|
||||
this.S=this.qf,this.Za=this.rf):(this.d.x=this.qf,this.d.y=this.rf,this.S=parseFloat(this.target.split(",")[0]),this.Za=parseFloat(this.target.split(",")[1])),this.R=this.d.x,this.cb=this.d.y,this.W=this.R,this.$a=this.cb,this.ta=this.S,this.Hb=this.Za,-6==this.M&&(this.ta=this.qf,this.Hb=this.rf));else if(1==this.C||2==this.C||3==this.C){f&&(this.target="1,1");"current"==this.q&&(this.q="1,1");this.q=""+this.q;this.target=""+this.target;2==this.C?(-1==this.q.indexOf(",")&&(this.q=parseFloat(this.q)+
|
||||
",1"),-1==this.target.indexOf(",")&&(this.target=parseFloat(this.target)+",1")):3==this.C?(-1==this.q.indexOf(",")&&(this.q="1,"+parseFloat(this.q)),-1==this.target.indexOf(",")&&(this.target="1,"+parseFloat(this.target))):(-1==this.q.indexOf(",")&&(this.q=parseFloat(this.q)+","+parseFloat(this.q)),-1==this.target.indexOf(",")&&(this.target=parseFloat(this.target)+","+parseFloat(this.target)));var b=parseFloat(this.q.split(",")[0]),h=parseFloat(this.q.split(",")[1]);this.nd=!0;var d=parseFloat(this.target.split(",")[0]);
|
||||
if(0==d||isNaN(d))this.nd=!1;3==this.C&&(this.nd=!1);this.od=!0;var a=parseFloat(this.target.split(",")[1]);if(0==a||isNaN(a))this.od=!1;2==this.C&&(this.od=!1);1==this.Lb?(this.loop&&(this.d.width=this.Lc,this.d.height=this.Kc),c||(this.reverse?(this.d.width=this.d.width*d,this.d.height=this.d.height*a):(this.d.width=this.d.width*b,this.d.height=this.d.height*h)),this.R=this.d.width,this.cb=this.d.height,this.W=this.R,this.$a=this.cb,this.reverse?(this.S=this.R*b/d,this.Za=this.cb*h/a):(this.S=this.R*
|
||||
d,this.Za=this.cb*a)):(c||(this.reverse?(this.d.width=this.Lc*d,this.d.height=this.Kc*a):(this.d.width=this.Lc*b,this.d.height=this.Kc*h)),this.R=this.d.width,this.cb=this.d.height,this.W=this.R,this.$a=this.cb,this.reverse?(this.S=this.Lc*b,this.Za=this.Kc*h):(this.S=this.Lc*d,this.Za=this.Kc*a));this.ta=this.S;this.Hb=this.Za;-6==this.M&&(this.ta=this.Lc*b,this.Hb=this.Kc*h)}else if(4==this.C)f&&(this.target=Ga(this.d.j)),"current"==this.q||this.reverse||1==this.M||(this.d.j=V(parseFloat(this.q.split(",")[0]))),
|
||||
1==this.Lb?(this.loop&&(this.d.j=this.gh),this.R=this.d.j,this.reverse?this.S=this.d.j-V(parseFloat(this.target.split(",")[0])):this.S=this.d.j+V(parseFloat(this.target.split(",")[0]))):this.reverse?(this.d.j=V(parseFloat(this.target.split(",")[0])),this.R=this.d.j,this.S=this.gh):(this.d.j=this.gh,this.R=this.d.j,this.S=V(parseFloat(this.target.split(",")[0]))),this.W=this.R,this.ta=Ga(this.S),-6==this.M&&(this.ta=Ga(this.gh)),this.hh=V(this.ta);else if(5==this.C)"current"==this.q&&(this.q=this.d.opacity),
|
||||
f&&(this.target=""+this.d.opacity),c||this.reverse||1==this.M||(this.d.opacity=parseFloat(this.q.split(",")[0])/100),1==this.Lb?(this.loop&&(this.d.opacity=this.sr),this.W=this.R=this.d.opacity,this.S=this.reverse?-parseFloat(this.target.split(",")[0])/100:parseFloat(this.target.split(",")[0])/100,this.ta=this.W+this.S):(this.R=this.d.opacity,this.reverse?(this.W=parseFloat(this.target.split(",")[0])/100,this.S=parseFloat(this.q.split(",")[0])/100):(this.W=this.R,this.S=parseFloat(this.target.split(",")[0])/
|
||||
100),this.ta=this.S),-6==this.M&&(this.ta=this.sr);else if(6==this.C)isNaN(this.value)&&(this.value=0),"current"==this.q&&(this.q=""+this.value),f&&(this.target=""+this.value),c||this.reverse||1==this.M||(this.value=parseFloat(this.q.split(",")[0])),1==this.Lb?(this.loop&&(this.value=this.Rk),c||(this.value=this.reverse?parseFloat(this.target.split(",")[0]):parseFloat(this.q.split(",")[0])),this.R=this.value,this.reverse?this.S=this.R-parseFloat(this.target.split(",")[0]):this.S=this.R+parseFloat(this.target.split(",")[0]),
|
||||
this.W=this.R,this.ta=this.S):(c||(this.value=this.reverse?parseFloat(this.target.split(",")[0]):parseFloat(this.q.split(",")[0])),this.R=this.value,this.S=this.reverse?parseFloat(this.q.split(",")[0]):parseFloat(this.target.split(",")[0]),this.W=this.R,this.ta=this.S),-6==this.M&&(this.ta=this.Rk);else if(7==this.C){f&&(this.target=this.d.width+","+this.d.height);"current"==this.q||this.reverse||1==this.M||(this.d.width=parseFloat(this.q.split(",")[0]),this.d.height=parseFloat(this.q.split(",")[1]));
|
||||
this.nd=!0;d=parseFloat(this.target.split(",")[0]);if(0>d||isNaN(d))this.nd=!1;this.od=!0;a=parseFloat(this.target.split(",")[1]);if(0>a||isNaN(a))this.od=!1;1==this.Lb?(this.loop&&(this.d.width=this.Lc,this.d.height=this.Kc),this.R=this.d.width,this.cb=this.d.height,this.reverse?(this.S=this.R-parseFloat(this.target.split(",")[0]),this.Za=this.cb-parseFloat(this.target.split(",")[1])):(this.S=this.R+parseFloat(this.target.split(",")[0]),this.Za=this.cb+parseFloat(this.target.split(",")[1]))):(c||
|
||||
(this.reverse?(this.d.width=parseFloat(this.target.split(",")[0]),this.d.height=parseFloat(this.target.split(",")[1])):(this.d.width=this.Lc,this.d.height=this.Kc)),this.R=this.d.width,this.cb=this.d.height,this.reverse?(this.S=this.Lc,this.Za=this.Kc):(this.S=parseFloat(this.target.split(",")[0]),this.Za=parseFloat(this.target.split(",")[1])));this.W=this.R;this.$a=this.cb;this.ta=this.S;this.Hb=this.Za;-6==this.M&&(this.ta=this.Lc,this.Hb=this.Kc)}this.cc=this.tb=this.W;this.Ec=this.$a;this.qa=
|
||||
parseFloat(this.eg.split(",")[0]);this.Ha=parseFloat(this.eg.split(",")[1]);if(0>this.qa||isNaN(this.qa))this.qa=0;if(0>this.Ha||isNaN(this.Ha))this.Ha=0;c&&(this.q="current");f&&(this.target="current");e&&(this.target="OBJ")};h.iu=function(c,h){switch(this.yh){case 0:return 1*c/h+0;case 1:return 1*(c/=h)*c+0;case 2:return-1*(c/=h)*(c-2)+0;case 3:return 1>(c/=h/2)?.5*c*c+0:-.5*(--c*(c-2)-1)+0;case 4:return 1*(c/=h)*c*c+0;case 5:return 1*((c=c/h-1)*c*c+1)+0;case 6:return 1>(c/=h/2)?.5*c*c*c+0:.5*((c-=
|
||||
2)*c*c+2)+0;case 7:return 1*(c/=h)*c*c*c+0;case 8:return-1*((c=c/h-1)*c*c*c-1)+0;case 9:return 1>(c/=h/2)?.5*c*c*c*c+0:-.5*((c-=2)*c*c*c-2)+0;case 10:return 1*(c/=h)*c*c*c*c+0;case 11:return 1*((c=c/h-1)*c*c*c*c+1)+0;case 12:return 1>(c/=h/2)?.5*c*c*c*c*c+0:.5*((c-=2)*c*c*c*c+2)+0;case 13:return-1*(Math.sqrt(1-(c/=h)*c)-1)+0;case 14:return 1*Math.sqrt(1-(c=c/h-1)*c)+0;case 15:return 1>(c/=h/2)?-.5*(Math.sqrt(1-c*c)-1)+0:.5*(Math.sqrt(1-(c-=2)*c)+1)+0;case 16:var e=0;0==e&&(e=1.70158);return 1*(c/=
|
||||
h)*c*((e+1)*c-e)+0;case 17:return e=0,0==e&&(e=1.70158),1*((c=c/h-1)*c*((e+1)*c+e)+1)+0;case 18:return e=0,0==e&&(e=1.70158),1>(c/=h/2)?.5*c*c*(((e*=1.525)+1)*c-e)+0:.5*((c-=2)*c*(((e*=1.525)+1)*c+e)+2)+0;case 19:var b=0,l=0;if(0==c)break;if(1==(c/=h))return 1;0==l&&(l=.3*h);0==b||b<Math.abs(1)?(b=1,e=l/4):e=l/(2*Math.PI)*Math.asin(1/b);return-(b*Math.pow(2,10*--c)*Math.sin(2*(c*h-e)*Math.PI/l))+0;case 20:l=b=0;if(0==c)break;if(1==(c/=h))return 1;0==l&&(l=.3*h);0==b||b<Math.abs(1)?(b=1,e=l/4):e=l/
|
||||
(2*Math.PI)*Math.asin(1/b);return b*Math.pow(2,-10*c)*Math.sin(2*(c*h-e)*Math.PI/l)+1;case 21:l=b=0;if(0==c)break;if(2==(c/=h/2))return 1;0==l&&(l=.3*h*1.5);0==b||b<Math.abs(1)?(b=1,e=l/4):e=l/(2*Math.PI)*Math.asin(1/b);return 1>c?-.5*b*Math.pow(2,10*--c)*Math.sin(2*(c*h-e)*Math.PI/l)+0:b*Math.pow(2,-10*--c)*Math.sin(2*(c*h-e)*Math.PI/l)*.5+1;case 22:return 1-f(h-c,h)+0;case 23:return f(c,h);case 24:return c<h/2?.5*(1-f(h-2*c,h)+0)+0:.5*f(2*c-h,h)+.5;case 25:return e=c/h/2,2*e*e*(3-2*e);case 26:return e=
|
||||
(c/h+1)/2,2*e*e*(3-2*e)-1;case 27:return e=c/h,e*e*(3-2*e)}return 0};h.yb=function(){return{i:this.u,active:this.A,tweened:this.C,easing:this.yh,initial:this.q,target:this.target,duration:this.duration,wait:this.eg,playmode:this.M,value:this.value,coord_mode:this.Lb,forceInit:this.Jl,group:this.group,targetObject:this.Xb,pingpongCounter:this.ec,isPaused:this.Lf,initialX:this.R,initialY:this.cb,targetX:this.S,targetY:this.Za,tweenSaveWidth:this.Lc,tweenSaveHeight:this.Kc,tweenSaveAngle:this.gh,tweenSaveX:this.qf,
|
||||
tweenSaveY:this.rf,tweenSaveValue:this.Rk,tweenInitialX:this.W,tweenInitialY:this.$a,tweenTargetX:this.ta,tweenTargetY:this.Hb,tweenTargetAngle:this.hh,ratio:this.Rd,reverse:this.reverse,rewindMode:this.uk,doTweenX:this.nd,doTweenY:this.od,loop:this.loop,initiating:this.qa,cooldown:this.Ha,lastPlayMode:this.um,lastKnownValue:this.tb,lastKnownX:this.cc,lastKnownY:this.Ec,onStarted:this.Rg,onStartedDone:this.ri,onWaitEnd:this.Sg,onWaitEndDone:this.si,onEnd:this.Qg,onEndDone:this.pi,onCooldown:this.Pg,
|
||||
onCooldownDone:this.ni}};h.Pb=function(c){this.u=c.i;this.A=c.active;this.C=c.tweened;this.yh=c.easing;this.q=c.initial;this.target=c.target;this.duration=c.duration;this.eg=c.wait;this.M=c.playmode;this.value=c.value;this.Lb=c.coord_mode;this.Jl=c.forceInit;this.group=c.group;this.Xb=c.targetObject;this.ec=c.pingpongCounter;this.Lf=c.isPaused;this.R=c.initialX;this.cb=c.initialY;this.S=c.targetX;this.Za=c.targetY;this.Lc=c.tweenSaveWidth;this.Kc=c.tweenSaveHeight;this.gh=c.tweenSaveAngle;this.qf=
|
||||
c.tweenSaveX;this.rf=c.tweenSaveY;this.Rk=c.tweenSaveValue;this.W=c.tweenInitialX;this.$a=c.tweenInitialY;this.ta=c.tweenTargetX;this.Hb=c.tweenTargetY;this.hh=c.tweenTargetAngle;this.Rd=c.ratio;this.reverse=c.reverse;this.uk=c.rewindMode;this.nd=c.doTweenX;this.od=c.doTweenY;this.loop=c.loop;this.qa=c.initiating;this.Ha=c.cooldown;this.um=c.lastPlayMode;this.tb=c.lastKnownValue;this.cc=c.lastKnownX;this.Ec=c.lastKnownY;this.Rg=c.onStarted;this.ri=c.onStartedDone;this.Sg=c.onWaitEnd;this.si=c.onWaitEndDone;
|
||||
this.Qg=c.onEnd;this.pi=c.onEndDone;this.Pg=c.onCooldown;this.ni=c.onCooldownDone;this.dp()};h.Pa=function(){var c=this.b.Gf(this.d),f=-1==this.u;this.A&&0!==c&&(0!=this.u||this.Rg||(this.Rg=!0,this.ni=this.Pg=this.pi=this.Qg=this.si=this.Sg=this.ri=!1,this.b.trigger(Gc.prototype.g.Ds,this.d),this.ri=!0),this.u=-1==this.u?this.qa+this.duration+this.Ha:this.u+c,this.u<=this.qa||(0==this.Sg&&(this.Sg=!0,this.b.trigger(Gc.prototype.g.bl,this.d),this.si=!0),this.u<=this.duration+this.qa&&(c=this.iu(this.u-
|
||||
this.qa,this.duration),0==this.C?(1==this.Lb?(this.d.x!==this.cc&&(this.W+=this.d.x-this.cc,this.ta+=this.d.x-this.cc),this.d.y!==this.Ec&&(this.$a+=this.d.y-this.Ec,this.Hb+=this.d.y-this.Ec)):(this.d.x!==this.cc&&(this.W+=this.d.x-this.cc),this.d.y!==this.Ec&&(this.$a+=this.d.y-this.Ec)),this.d.x=this.W+(this.ta-this.W)*c,this.d.y=this.$a+(this.Hb-this.$a)*c,this.cc=this.d.x,this.Ec=this.d.y):1==this.C||2==this.C||3==this.C?(this.d.width!==this.cc&&(this.W=this.d.width),this.d.height!==this.Ec&&
|
||||
(this.$a=this.d.height),this.nd&&(this.d.width=this.W+(this.ta-this.W)*c),this.od?this.d.height=this.$a+(this.Hb-this.$a)*c:1==this.C&&(this.d.height=this.d.width*this.Rd),this.cc=this.d.width,this.Ec=this.d.height):4==this.C?(c=this.W+(this.hh-this.W)*c,this.u>=this.duration+this.qa&&(c=this.hh),this.d.j=Ja(c)):5==this.C?(1==this.Lb&&this.d.opacity!==this.cc&&(this.W=this.d.opacity),this.d.opacity=this.W+(this.ta-this.W)*c,this.cc=this.d.opacity):6==this.C?this.value=this.W+(this.ta-this.W)*c:7==
|
||||
this.C&&(1==this.Lb&&(this.d.width!==this.cc&&(this.W=this.d.width),this.d.height!==this.Ec&&(this.$a=this.d.height)),this.nd&&(this.d.width=this.W+(this.ta-this.W)*c),this.od&&(this.d.height=this.$a+(this.Hb-this.$a)*c),this.cc=this.d.width,this.Ec=this.d.height),this.d.la()),this.u>=this.duration+this.qa&&(this.Nt(f),this.d.la(),0==this.Qg&&(this.Qg=!0,this.b.trigger(Gc.prototype.g.ms,this.d),this.pi=!0))))};h.Nt=function(c){switch(this.C){case 0:this.d.x=this.ta;this.d.y=this.Hb;break;case 1:this.nd&&
|
||||
(this.d.width=this.ta);this.od?this.d.height=this.Hb:this.d.height=this.d.width*this.Rd;break;case 2:this.d.width=this.ta;break;case 3:this.d.height=this.Hb;break;case 4:this.d.j=Ja(this.hh);this.tb=this.d.j;break;case 5:this.d.opacity=this.ta;break;case 6:this.value=this.ta;break;case 7:this.nd&&(this.d.width=this.ta),this.od&&(this.d.height=this.Hb)}this.u>=this.duration+this.qa+this.Ha&&(0==this.M?(this.reverse=this.A=!1,this.u=this.duration+this.qa+this.Ha):1==this.M?(this.u=0,this.init(),this.A=
|
||||
!0):2==this.M?c?(this.reverse=!1,this.init()):(this.reverse=!this.reverse,this.u=0,this.init(),this.A=!0):3==this.M?this.b.$d(this.d):4==this.M?(this.loop=!0,this.u=0,this.init(),this.A=!0):5==this.M?c?(this.reverse=!1,this.init()):0>=this.ec?(this.u=this.duration+this.qa+this.Ha,this.A=!1):(this.reverse?(--this.ec,this.reverse=!1):(--this.ec,this.reverse=!0),this.u=0,this.init(),this.A=!0):-6==this.M?(this.M=this.um,this.reverse=!1,this.u=0,this.A=!1):6==this.M&&(this.reverse=!1,this.u=this.duration+
|
||||
this.qa+this.Ha,this.A=!1));0==this.Pg&&(this.Pg=!0,this.b.trigger(Gc.prototype.g.hs,this.d),this.ni=!0)};p.g={};h=p.g;h.Wr=function(){return this.A};h.wx=function(c,f){var e=[];hc[this.group].forEach(function(b){e.push(b.u/(b.duration+b.qa+b.Ha))});return fc(Math.min.apply(null,e),c,f)};h.zx=function(c,f){return fc(this.u/(this.duration+this.qa+this.Ha),c,f)};h.Ds=function(){if(!1===this.ri)return this.Rg};h.bl=function(){if(!1===this.si)return this.Sg};h.ms=function(){if(!1===this.pi)return this.Qg};
|
||||
h.hs=function(){if(!1===this.ni)return this.Pg};p.J={};var l=p.J;l.Yn=function(c){this.A=1===c};l.Gy=function(c,f){""===f&&(f=this.group);(1===c||hc[f].every(function(c){return!c.A}))&&hc[f].forEach(function(e){1===c?l.Tr.apply(e):l.Zs.apply(e)})};l.Hy=function(c,f){""===f&&(f=this.group);hc[f].forEach(function(e){l.Yi.apply(e,[c])})};l.dy=function(c,f,e){""===e&&(e=this.group);(1===c||hc[e].every(function(b){return!b.A}))&&hc[e].forEach(function(b){1===c?l.Ur.apply(b,[f]):l.Ls.apply(b,[f])})};l.Tr=
|
||||
function(){this.loop=4===this.M;5==this.M&&(this.ec=1);6==this.M||-6==this.M?this.u<this.duration+this.Ha+this.qa&&(this.reverse=!1,this.init(),this.A=!0):(this.reverse=!1,this.u=0,this.init(),this.A=!0)};l.Ur=function(c){this.uk=1==c;this.loop=4===this.M;5==this.M&&(this.ec=1);6==this.M||-6==this.M?this.u<this.duration+this.Ha+this.qa&&(this.reverse=!0,this.init(),this.A=!0):c?1==this.ec&&this.u>=this.duration+this.Ha+this.qa&&(this.reverse=!0,this.u=0,this.ec=2,this.init(),this.A=!0):(this.reverse=
|
||||
!0,this.u=0,this.init(),this.A=!0)};l.Zs=function(){this.A||(this.loop=4===this.M,5==this.M&&(this.ec=1),6==this.M||-6==this.M?this.u<this.duration+this.Ha+this.qa&&(this.reverse=!1,this.init(),this.A=!0):(this.ec=1,this.reverse=!1,this.u=0,this.init(),this.A=!0))};l.Yi=function(c){this.A&&(2==this.M||4==this.M?this.u=this.reverse?0:-1:1==c?this.mf():0==c?this.u=this.qa+this.Ha+this.duration:this.u=0,this.Pa(),this.A=!1)};l.Ux=function(){this.A&&(this.Lf=!0,this.A=!1)};l.cy=function(){this.Lf?(this.A=
|
||||
!0,this.Lf=!1):this.A||(this.reverse=!1,this.u=0,this.init(),this.A=!0)};l.Ls=function(c){this.uk=1==c;this.A||(this.loop=4===this.M,5==this.M&&(this.ec=1),6==this.M||-6==this.M?this.u<this.duration+this.Ha+this.qa&&(this.reverse=!0,this.init(),this.A=!0):c?1==this.ec&&this.u>=this.duration+this.Ha+this.qa&&(this.reverse=!0,this.u=0,this.ec=2,this.init(),this.A=!0):(this.reverse=!0,this.u=0,this.init(),this.A=!0))};l.Ns=function(c){this.duration=c};l.Xs=function(c){this.eg=c;this.qa=parseFloat(this.eg.split(",")[0]);
|
||||
this.Ha=parseFloat(this.eg.split(",")[1]);if(0>this.qa||isNaN(this.qa))this.qa=0;if(0>this.Ha||isNaN(this.Ha))this.Ha=0};l.Us=function(c){"string"==typeof c?(this.target=c,this.S=parseFloat(c.split(",")[0]),this.Za=parseFloat(c.split(",")[1])):this.S=this.target=c;this.A||this.init()};l.yy=function(c){c&&(c=c.Pl())&&(this.Xb=c,this.target="OBJ")};l.zy=function(c){2==this.C||3==this.C||4==this.C||5==this.C||6==this.C?("string"==typeof c?this.target=parseFloat(c.split(",")[0]):this.target=""+c+","+
|
||||
this.Za,this.S=this.target):(this.target=String(c)+","+this.target.split(",")[1],this.S=parseFloat(this.target.split(",")[0]),this.Za=parseFloat(this.target.split(",")[1]));this.A||(this.mf(),this.init())};l.Ay=function(c){2==this.C||3==this.C||4==this.C||5==this.C||6==this.C?this.S=this.target="string"==typeof c?parseFloat(c)+"":this.S+","+c:(this.target=this.target.split(",")[0]+","+String(c),this.S=parseFloat(this.target.split(",")[0]),this.Za=parseFloat(this.target.split(",")[1]));this.A||(this.mf(),
|
||||
this.init())};l.Ps=function(c){"string"==typeof c?(this.q=c,this.R=parseFloat(c.split(",")[0]),this.cb=parseFloat(c.split(",")[1])):(this.q=""+c,this.R=c);6==this.C&&(this.value=this.R);this.A||(this.mf(),this.init())};l.oy=function(c){2==this.C||3==this.C||4==this.C||5==this.C||6==this.C?("string"==typeof c?this.q=parseFloat(c):this.q=""+c+","+this.cb,this.R=this.q):(""==this.q&&(this.q="current"),this.q=String(c)+","+("current"==this.q?this.rf:this.q.split(",")[1]),this.R=parseFloat(this.q.split(",")[0]),
|
||||
this.cb=parseFloat(this.q.split(",")[1]));6==this.C&&(this.value=this.R);this.A||(this.mf(),this.init())};l.qy=function(c){2==this.C||3==this.C||4==this.C||5==this.C||6==this.C?("string"==typeof c?this.q=parseFloat(c):this.q=""+this.R+","+c,this.R=this.q):(""==this.q&&(this.q="current"),this.q=("current"==this.q?this.qf:this.q.split(",")[0])+","+String(c),this.R=parseFloat(this.q.split(",")[0]),this.cb=parseFloat(this.q.split(",")[1]));this.A||(this.mf(),this.init())};l.Dy=function(c){this.value=
|
||||
c};l.Cy=function(c){this.C=c};l.ky=function(c){this.yh=c};l.uy=function(c){this.M=c};l.ty=function(c,f,e,b,h,d,a,g){this.C=c;this.M=f;this.yh=e;l.Ps.apply(this,[b]);l.Us.apply(this,[h]);l.Ns.apply(this,[d]);l.Xs.apply(this,[a]);this.Lb=g;this.mf()};p.Ea={};p=p.Ea;p.ay=function(c){c.H(this.u/(this.duration+this.qa+this.Ha))};p.by=function(c){c.H(this.u)};p.Pr=function(c){c.H(this.duration)};p.Hx=function(c){c.H(this.qa)};p.Dx=function(c){c.H(this.Ha)};p.Jy=function(c){c.Ub(this.target)};p.ct=function(c){c.H(this.value)};
|
||||
p.Lf=function(c){c.Ca(this.Lf?1:0)}})();
|
||||
function qc(){return[tc,X,sc,rc,uc,Z,Ac,zc,wc,yc,xc,vc,Gc,W.prototype.g.Qn,tc.prototype.J.Play,rc.prototype.J.Or,yc.prototype.J.Is,W.prototype.J.dt,sc.prototype.J.CallFunction,X.prototype.J.Rr,uc.prototype.J.Zn,sc.prototype.g.Wi,rc.prototype.J.Qs,rc.prototype.Ea.$n,rc.prototype.Ea.ao,zc.prototype.J.cl,W.prototype.J.Ws,rc.prototype.J.Ms,rc.prototype.J.cs,X.prototype.Ea.Qr,uc.prototype.J.Vs,uc.prototype.J.Os,W.prototype.Ea.Ct,W.prototype.Ea.max,W.prototype.Ea.Tv,uc.prototype.Ea.Text,rc.prototype.J.Zn,
|
||||
wc.prototype.J.Ks,Z.prototype.g.$k,W.prototype.g.Mr,rc.prototype.g.Zr,W.prototype.g.as,W.prototype.g.Kr,W.prototype.J.Nr,W.prototype.g.On,xc.prototype.J.Sr,zc.prototype.J.Yi,tc.prototype.J.$s,Ac.prototype.J.Yn,W.prototype.J.Rs,W.prototype.J.Js,W.prototype.J.Vr,rc.prototype.g.Lr,tc.prototype.J.Ss,tc.prototype.J.Ts]};
|
||||
1
PairOrNotPair/data.js
Normal file
BIN
PairOrNotPair/icon-114.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
PairOrNotPair/icon-128.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
PairOrNotPair/icon-16.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
PairOrNotPair/icon-256.png
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
PairOrNotPair/icon-32.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
PairOrNotPair/images/answers-sheet0.png
Normal file
|
After Width: | Height: | Size: 2.3 MiB |
BIN
PairOrNotPair/images/answers-sheet1.png
Normal file
|
After Width: | Height: | Size: 535 KiB |
BIN
PairOrNotPair/images/answers-sheet2.png
Normal file
|
After Width: | Height: | Size: 573 KiB |
BIN
PairOrNotPair/images/answers-sheet3.png
Normal file
|
After Width: | Height: | Size: 543 KiB |
BIN
PairOrNotPair/images/bdfsbd-sheet0.png
Normal file
|
After Width: | Height: | Size: 89 KiB |
BIN
PairOrNotPair/images/bgm-sheet0.png
Normal file
|
After Width: | Height: | Size: 126 KiB |
BIN
PairOrNotPair/images/bgm-sheet1.png
Normal file
|
After Width: | Height: | Size: 95 KiB |
BIN
PairOrNotPair/images/board-sheet0.png
Normal file
|
After Width: | Height: | Size: 166 KiB |
BIN
PairOrNotPair/images/board-sheet1.png
Normal file
|
After Width: | Height: | Size: 79 KiB |
BIN
PairOrNotPair/images/complete-sheet0.png
Normal file
|
After Width: | Height: | Size: 472 KiB |
BIN
PairOrNotPair/images/dim-sheet0.png
Normal file
|
After Width: | Height: | Size: 168 B |
BIN
PairOrNotPair/images/khunganh-sheet0.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
PairOrNotPair/images/khungchu-sheet0.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
PairOrNotPair/images/logo-sheet0.png
Normal file
|
After Width: | Height: | Size: 259 KiB |
BIN
PairOrNotPair/images/next-sheet0.png
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
PairOrNotPair/images/notpair-sheet0.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
PairOrNotPair/images/pair-sheet0.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
PairOrNotPair/images/pic-sheet0.png
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
BIN
PairOrNotPair/images/play-sheet0.png
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
PairOrNotPair/images/question-sheet0.png
Normal file
|
After Width: | Height: | Size: 481 KiB |
BIN
PairOrNotPair/images/replay-sheet0.png
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
PairOrNotPair/images/school_khungvuong-sheet0.png
Normal file
|
After Width: | Height: | Size: 288 KiB |
BIN
PairOrNotPair/images/school_khungvuong-sheet1.png
Normal file
|
After Width: | Height: | Size: 80 KiB |
BIN
PairOrNotPair/images/sound-sheet0.png
Normal file
|
After Width: | Height: | Size: 281 KiB |
BIN
PairOrNotPair/images/sprite-sheet0.png
Normal file
|
After Width: | Height: | Size: 168 B |
BIN
PairOrNotPair/images/whitebg-sheet0.png
Normal file
|
After Width: | Height: | Size: 98 KiB |
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<title>PairOrNotPair-Demo1234566</title>
|
||||
<title>PairOrNotPair-Demo</title>
|
||||
|
||||
<!-- Standardised web app manifest -->
|
||||
<link rel="manifest" href="appmanifest.json" />
|
||||
|
||||
2
PairOrNotPair/jquery-3.4.1.min.js
vendored
Normal file
BIN
PairOrNotPair/loading-logo.png
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
PairOrNotPair/media/8-bit-gaming-background-music-358443.ogg
Normal file
BIN
PairOrNotPair/media/alert-234711.ogg
Normal file
BIN
PairOrNotPair/media/applause-383901.ogg
Normal file
BIN
PairOrNotPair/media/bubble-pop-389501.ogg
Normal file
BIN
PairOrNotPair/media/button-124476.ogg
Normal file
BIN
PairOrNotPair/media/click-234708.ogg
Normal file
BIN
PairOrNotPair/media/click.m4a
Normal file
BIN
PairOrNotPair/media/click.ogg
Normal file
BIN
PairOrNotPair/media/collect-5930.ogg
Normal file
BIN
PairOrNotPair/media/correct-156911.ogg
Normal file
BIN
PairOrNotPair/media/correct.m4a
Normal file
BIN
PairOrNotPair/media/correct.ogg
Normal file
BIN
PairOrNotPair/media/edugamery-music-20.ogg
Normal file
BIN
PairOrNotPair/media/error-010-206498.ogg
Normal file
BIN
PairOrNotPair/media/error-04-199275.ogg
Normal file
BIN
PairOrNotPair/media/error-08-206492.ogg
Normal file
BIN
PairOrNotPair/media/fail.m4a
Normal file
BIN
PairOrNotPair/media/fail.ogg
Normal file
BIN
PairOrNotPair/media/material-buy-success-394517.ogg
Normal file
BIN
PairOrNotPair/media/pop-402324-1.m4a
Normal file
BIN
PairOrNotPair/media/pop-402324.m4a
Normal file
BIN
PairOrNotPair/media/pop-402324.ogg
Normal file
BIN
PairOrNotPair/media/successed-295058.ogg
Normal file
BIN
PairOrNotPair/media/wrong-answer-129254.ogg
Normal file
68
PairOrNotPair/offline.js
Normal file
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"version": 1768985228,
|
||||
"fileList": [
|
||||
"data.js",
|
||||
"c2runtime.js",
|
||||
"jquery-3.4.1.min.js",
|
||||
"offlineClient.js",
|
||||
"images/answers-sheet0.png",
|
||||
"images/answers-sheet1.png",
|
||||
"images/answers-sheet2.png",
|
||||
"images/answers-sheet3.png",
|
||||
"images/question-sheet0.png",
|
||||
"images/pic-sheet0.png",
|
||||
"images/replay-sheet0.png",
|
||||
"images/next-sheet0.png",
|
||||
"images/sound-sheet0.png",
|
||||
"images/sprite-sheet0.png",
|
||||
"images/logo-sheet0.png",
|
||||
"images/complete-sheet0.png",
|
||||
"images/school_khungvuong-sheet0.png",
|
||||
"images/school_khungvuong-sheet1.png",
|
||||
"images/dim-sheet0.png",
|
||||
"images/bgm-sheet0.png",
|
||||
"images/bgm-sheet1.png",
|
||||
"images/whitebg-sheet0.png",
|
||||
"images/board-sheet0.png",
|
||||
"images/board-sheet1.png",
|
||||
"images/khunganh-sheet0.png",
|
||||
"images/khungchu-sheet0.png",
|
||||
"images/pair-sheet0.png",
|
||||
"images/notpair-sheet0.png",
|
||||
"images/bdfsbd-sheet0.png",
|
||||
"images/play-sheet0.png",
|
||||
"media/click.m4a",
|
||||
"media/click.ogg",
|
||||
"media/correct.m4a",
|
||||
"media/correct.ogg",
|
||||
"media/fail.m4a",
|
||||
"media/fail.ogg",
|
||||
"media/applause-383901.ogg",
|
||||
"media/correct-156911.ogg",
|
||||
"media/error-04-199275.ogg",
|
||||
"media/pop-402324-1.m4a",
|
||||
"media/pop-402324.m4a",
|
||||
"media/pop-402324.ogg",
|
||||
"media/successed-295058.ogg",
|
||||
"media/wrong-answer-129254.ogg",
|
||||
"media/alert-234711.ogg",
|
||||
"media/bubble-pop-389501.ogg",
|
||||
"media/button-124476.ogg",
|
||||
"media/collect-5930.ogg",
|
||||
"media/error-010-206498.ogg",
|
||||
"media/error-08-206492.ogg",
|
||||
"media/material-buy-success-394517.ogg",
|
||||
"media/sample_input_typing01_kofi_by_miraclei-363634.ogg",
|
||||
"media/click-234708.ogg",
|
||||
"media/8-bit-gaming-background-music-358443.ogg",
|
||||
"media/edugamery-music-20.ogg",
|
||||
"icon-16.png",
|
||||
"icon-32.png",
|
||||
"icon-114.png",
|
||||
"icon-128.png",
|
||||
"icon-256.png",
|
||||
"loading-logo.png",
|
||||
"tdv_sdk.js",
|
||||
"bg.mp4"
|
||||
]
|
||||
}
|
||||
53
PairOrNotPair/offlineClient.js
Normal file
@@ -0,0 +1,53 @@
|
||||
"use strict";
|
||||
|
||||
(function() {
|
||||
|
||||
class OfflineClient
|
||||
{
|
||||
constructor()
|
||||
{
|
||||
// Create a BroadcastChannel, if supported.
|
||||
this._broadcastChannel = (typeof BroadcastChannel === "undefined" ? null : new BroadcastChannel("offline"));
|
||||
|
||||
// Queue of messages received before a message callback is set.
|
||||
this._queuedMessages = [];
|
||||
|
||||
// The message callback.
|
||||
this._onMessageCallback = null;
|
||||
|
||||
// If BroadcastChannel is supported, listen for messages.
|
||||
if (this._broadcastChannel)
|
||||
this._broadcastChannel.onmessage = (e => this._OnBroadcastChannelMessage(e));
|
||||
}
|
||||
|
||||
_OnBroadcastChannelMessage(e)
|
||||
{
|
||||
// Have a message callback set: just forward the call.
|
||||
if (this._onMessageCallback)
|
||||
{
|
||||
this._onMessageCallback(e);
|
||||
return;
|
||||
}
|
||||
|
||||
// Otherwise the app hasn't loaded far enough to set a message callback.
|
||||
// Buffer the incoming messages to replay when the app sets a callback.
|
||||
this._queuedMessages.push(e);
|
||||
}
|
||||
|
||||
SetMessageCallback(f)
|
||||
{
|
||||
this._onMessageCallback = f;
|
||||
|
||||
// Replay any queued messages through the handler, then clear the queue.
|
||||
for (let e of this._queuedMessages)
|
||||
this._onMessageCallback(e);
|
||||
|
||||
this._queuedMessages.length = 0;
|
||||
}
|
||||
};
|
||||
|
||||
// Create the offline client ASAP so we receive and start queueing any messages the SW broadcasts.
|
||||
window.OfflineClientInfo = new OfflineClient();
|
||||
|
||||
}());
|
||||
|
||||
403
PairOrNotPair/sw.js
Normal file
@@ -0,0 +1,403 @@
|
||||
"use strict";
|
||||
|
||||
const OFFLINE_DATA_FILE = "offline.js";
|
||||
const CACHE_NAME_PREFIX = "c2offline";
|
||||
const BROADCASTCHANNEL_NAME = "offline";
|
||||
const CONSOLE_PREFIX = "[SW] ";
|
||||
const LAZYLOAD_KEYNAME = "";
|
||||
|
||||
// Create a BroadcastChannel if supported.
|
||||
const broadcastChannel = (typeof BroadcastChannel === "undefined" ? null : new BroadcastChannel(BROADCASTCHANNEL_NAME));
|
||||
|
||||
//////////////////////////////////////
|
||||
// Utility methods
|
||||
function PostBroadcastMessage(o)
|
||||
{
|
||||
if (!broadcastChannel)
|
||||
return; // not supported
|
||||
|
||||
// Impose artificial (and arbitrary!) delay of 3 seconds to make sure client is listening by the time the message is sent.
|
||||
// Note we could remove the delay on some messages, but then we create a race condition where sometimes messages can arrive
|
||||
// in the wrong order (e.g. "update ready" arrives before "started downloading update"). So to keep the consistent ordering,
|
||||
// delay all messages by the same amount.
|
||||
setTimeout(() => broadcastChannel.postMessage(o), 3000);
|
||||
};
|
||||
|
||||
function Broadcast(type)
|
||||
{
|
||||
PostBroadcastMessage({
|
||||
"type": type
|
||||
});
|
||||
};
|
||||
|
||||
function BroadcastDownloadingUpdate(version)
|
||||
{
|
||||
PostBroadcastMessage({
|
||||
"type": "downloading-update",
|
||||
"version": version
|
||||
});
|
||||
}
|
||||
|
||||
function BroadcastUpdateReady(version)
|
||||
{
|
||||
PostBroadcastMessage({
|
||||
"type": "update-ready",
|
||||
"version": version
|
||||
});
|
||||
}
|
||||
|
||||
function IsUrlInLazyLoadList(url, lazyLoadList)
|
||||
{
|
||||
if (!lazyLoadList)
|
||||
return false; // presumably lazy load list failed to load
|
||||
|
||||
try {
|
||||
for (const lazyLoadRegex of lazyLoadList)
|
||||
{
|
||||
if (new RegExp(lazyLoadRegex).test(url))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch (err)
|
||||
{
|
||||
console.error(CONSOLE_PREFIX + "Error matching in lazy-load list: ", err);
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
function WriteLazyLoadListToStorage(lazyLoadList)
|
||||
{
|
||||
if (typeof localforage === "undefined")
|
||||
return Promise.resolve(); // bypass if localforage not imported
|
||||
else
|
||||
return localforage.setItem(LAZYLOAD_KEYNAME, lazyLoadList)
|
||||
};
|
||||
|
||||
function ReadLazyLoadListFromStorage()
|
||||
{
|
||||
if (typeof localforage === "undefined")
|
||||
return Promise.resolve([]); // bypass if localforage not imported
|
||||
else
|
||||
return localforage.getItem(LAZYLOAD_KEYNAME);
|
||||
};
|
||||
|
||||
function GetCacheBaseName()
|
||||
{
|
||||
// Include the scope to avoid name collisions with any other SWs on the same origin.
|
||||
// e.g. "c2offline-https://example.com/foo/" (won't collide with anything under bar/)
|
||||
return CACHE_NAME_PREFIX + "-" + self.registration.scope;
|
||||
};
|
||||
|
||||
function GetCacheVersionName(version)
|
||||
{
|
||||
// Append the version number to the cache name.
|
||||
// e.g. "c2offline-https://example.com/foo/-v2"
|
||||
return GetCacheBaseName() + "-v" + version;
|
||||
};
|
||||
|
||||
// Return caches.keys() filtered down to just caches we're interested in (with the right base name).
|
||||
// This filters out caches from unrelated scopes.
|
||||
async function GetAvailableCacheNames()
|
||||
{
|
||||
const cacheNames = await caches.keys();
|
||||
const cacheBaseName = GetCacheBaseName();
|
||||
return cacheNames.filter(n => n.startsWith(cacheBaseName));
|
||||
};
|
||||
|
||||
// Identify if an update is pending, which is the case when we have 2 or more available caches.
|
||||
// One must be an update that is waiting, since the next navigate that does an upgrade will
|
||||
// delete all the old caches leaving just one currently-in-use cache.
|
||||
async function IsUpdatePending()
|
||||
{
|
||||
const availableCacheNames = await GetAvailableCacheNames();
|
||||
return (availableCacheNames.length >= 2);
|
||||
};
|
||||
|
||||
// Automatically deduce the main page URL (e.g. index.html or main.aspx) from the available browser windows.
|
||||
// This prevents having to hard-code an index page in the file list, implicitly caching it like AppCache did.
|
||||
async function GetMainPageUrl()
|
||||
{
|
||||
const allClients = await clients.matchAll({
|
||||
includeUncontrolled: true,
|
||||
type: "window"
|
||||
});
|
||||
|
||||
for (const c of allClients)
|
||||
{
|
||||
// Parse off the scope from the full client URL, e.g. https://example.com/index.html -> index.html
|
||||
let url = c.url;
|
||||
if (url.startsWith(self.registration.scope))
|
||||
url = url.substring(self.registration.scope.length);
|
||||
|
||||
if (url && url !== "/") // ./ is also implicitly cached so don't bother returning that
|
||||
{
|
||||
// If the URL is solely a search string, prefix it with / to ensure it caches correctly.
|
||||
// e.g. https://example.com/?foo=bar needs to cache as /?foo=bar, not just ?foo=bar.
|
||||
if (url.startsWith("?"))
|
||||
url = "/" + url;
|
||||
|
||||
return url;
|
||||
}
|
||||
}
|
||||
|
||||
return ""; // no main page URL could be identified
|
||||
};
|
||||
|
||||
// Hack to fetch optionally bypassing HTTP cache until fetch cache options are supported in Chrome (crbug.com/453190)
|
||||
function fetchWithBypass(request, bypassCache)
|
||||
{
|
||||
if (typeof request === "string")
|
||||
request = new Request(request);
|
||||
|
||||
if (bypassCache)
|
||||
{
|
||||
// bypass enabled: add a random search parameter to avoid getting a stale HTTP cache result
|
||||
const url = new URL(request.url);
|
||||
url.search += Math.floor(Math.random() * 1000000);
|
||||
|
||||
return fetch(url, {
|
||||
headers: request.headers,
|
||||
mode: request.mode,
|
||||
credentials: request.credentials,
|
||||
redirect: request.redirect,
|
||||
cache: "no-store"
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
// bypass disabled: perform normal fetch which is allowed to return from HTTP cache
|
||||
return fetch(request);
|
||||
}
|
||||
};
|
||||
|
||||
// Effectively a cache.addAll() that only creates the cache on all requests being successful (as a weak attempt at making it atomic)
|
||||
// and can optionally cache-bypass with fetchWithBypass in every request
|
||||
async function CreateCacheFromFileList(cacheName, fileList, bypassCache)
|
||||
{
|
||||
// Kick off all requests and wait for them all to complete
|
||||
const responses = await Promise.all(fileList.map(url => fetchWithBypass(url, bypassCache)));
|
||||
|
||||
// Check if any request failed. If so don't move on to opening the cache.
|
||||
// This makes sure we only open a cache if all requests succeeded.
|
||||
let allOk = true;
|
||||
|
||||
for (const response of responses)
|
||||
{
|
||||
if (!response.ok)
|
||||
{
|
||||
allOk = false;
|
||||
console.error(CONSOLE_PREFIX + "Error fetching '" + response.url + "' (" + response.status + " " + response.statusText + ")");
|
||||
}
|
||||
}
|
||||
|
||||
if (!allOk)
|
||||
throw new Error("not all resources were fetched successfully");
|
||||
|
||||
// Can now assume all responses are OK. Open a cache and write all responses there.
|
||||
// TODO: ideally we can do this transactionally to ensure a complete cache is written as one atomic operation.
|
||||
// This needs either new transactional features in the spec, or at the very least a way to rename a cache
|
||||
// (so we can write to a temporary name that won't be returned by GetAvailableCacheNames() and then rename it when ready).
|
||||
const cache = await caches.open(cacheName);
|
||||
|
||||
try {
|
||||
return await Promise.all(responses.map(
|
||||
(response, i) => cache.put(fileList[i], response)
|
||||
));
|
||||
}
|
||||
catch (err)
|
||||
{
|
||||
// Not sure why cache.put() would fail (maybe if storage quota exceeded?) but in case it does,
|
||||
// clean up the cache to try to avoid leaving behind an incomplete cache.
|
||||
console.error(CONSOLE_PREFIX + "Error writing cache entries: ", err);
|
||||
caches.delete(cacheName);
|
||||
throw err;
|
||||
}
|
||||
};
|
||||
|
||||
async function UpdateCheck(isFirst)
|
||||
{
|
||||
try {
|
||||
// Always bypass cache when requesting offline.js to make sure we find out about new versions.
|
||||
const response = await fetchWithBypass(OFFLINE_DATA_FILE, true);
|
||||
|
||||
if (!response.ok)
|
||||
throw new Error(OFFLINE_DATA_FILE + " responded with " + response.status + " " + response.statusText);
|
||||
|
||||
const data = await response.json();
|
||||
|
||||
const version = data.version;
|
||||
const fileList = data.fileList;
|
||||
const lazyLoadList = data.lazyLoad;
|
||||
const currentCacheName = GetCacheVersionName(version);
|
||||
|
||||
const cacheExists = await caches.has(currentCacheName);
|
||||
|
||||
// Don't recache if there is already a cache that exists for this version. Assume it is complete.
|
||||
if (cacheExists)
|
||||
{
|
||||
// Log whether we are up-to-date or pending an update.
|
||||
const isUpdatePending = await IsUpdatePending();
|
||||
if (isUpdatePending)
|
||||
{
|
||||
console.log(CONSOLE_PREFIX + "Update pending");
|
||||
Broadcast("update-pending");
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log(CONSOLE_PREFIX + "Up to date");
|
||||
Broadcast("up-to-date");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Implicitly add the main page URL to the file list, e.g. "index.html", so we don't have to assume a specific name.
|
||||
const mainPageUrl = await GetMainPageUrl();
|
||||
|
||||
// Prepend the main page URL to the file list if we found one and it is not already in the list.
|
||||
// Also make sure we request the base / which should serve the main page.
|
||||
fileList.unshift("./");
|
||||
|
||||
if (mainPageUrl && fileList.indexOf(mainPageUrl) === -1)
|
||||
fileList.unshift(mainPageUrl);
|
||||
|
||||
console.log(CONSOLE_PREFIX + "Caching " + fileList.length + " files for offline use");
|
||||
|
||||
if (isFirst)
|
||||
Broadcast("downloading");
|
||||
else
|
||||
BroadcastDownloadingUpdate(version);
|
||||
|
||||
// Note we don't bypass the cache on the first update check. This is because SW installation and the following
|
||||
// update check caching will race with the normal page load requests. For any normal loading fetches that have already
|
||||
// completed or are in-flight, it is pointless and wasteful to cache-bust the request for offline caching, since that
|
||||
// forces a second network request to be issued when a response from the browser HTTP cache would be fine.
|
||||
if (lazyLoadList)
|
||||
await WriteLazyLoadListToStorage(lazyLoadList); // dump lazy load list to local storage#
|
||||
|
||||
await CreateCacheFromFileList(currentCacheName, fileList, !isFirst);
|
||||
const isUpdatePending = await IsUpdatePending();
|
||||
|
||||
if (isUpdatePending)
|
||||
{
|
||||
console.log(CONSOLE_PREFIX + "All resources saved, update ready");
|
||||
BroadcastUpdateReady(version);
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log(CONSOLE_PREFIX + "All resources saved, offline support ready");
|
||||
Broadcast("offline-ready");
|
||||
}
|
||||
}
|
||||
catch (err)
|
||||
{
|
||||
// Update check fetches fail when we're offline, but in case there's any other kind of problem with it, log a warning.
|
||||
console.warn(CONSOLE_PREFIX + "Update check failed: ", err);
|
||||
}
|
||||
};
|
||||
|
||||
self.addEventListener("install", event =>
|
||||
{
|
||||
// On install kick off an update check to cache files on first use.
|
||||
// If it fails we can still complete the install event and leave the SW running, we'll just
|
||||
// retry on the next navigate.
|
||||
event.waitUntil(
|
||||
UpdateCheck(true) // first update
|
||||
.catch(() => null)
|
||||
);
|
||||
});
|
||||
|
||||
async function GetCacheNameToUse(availableCacheNames, doUpdateCheck)
|
||||
{
|
||||
// Prefer the oldest cache available. This avoids mixed-version responses by ensuring that if a new cache
|
||||
// is created and filled due to an update check while the page is running, we keep returning resources
|
||||
// from the original (oldest) cache only.
|
||||
if (availableCacheNames.length === 1 || !doUpdateCheck)
|
||||
return availableCacheNames[0];
|
||||
|
||||
// We are making a navigate request with more than one cache available. Check if we can expire any old ones.
|
||||
const allClients = await clients.matchAll();
|
||||
|
||||
// If there are other clients open, don't expire anything yet. We don't want to delete any caches they
|
||||
// might be using, which could cause mixed-version responses.
|
||||
if (allClients.length > 1)
|
||||
return availableCacheNames[0];
|
||||
|
||||
// Identify newest cache to use. Delete all the others.
|
||||
const latestCacheName = availableCacheNames[availableCacheNames.length - 1];
|
||||
console.log(CONSOLE_PREFIX + "Updating to new version");
|
||||
|
||||
await Promise.all(
|
||||
availableCacheNames.slice(0, -1)
|
||||
.map(c => caches.delete(c))
|
||||
);
|
||||
|
||||
return latestCacheName;
|
||||
};
|
||||
|
||||
async function HandleFetch(event, doUpdateCheck)
|
||||
{
|
||||
const availableCacheNames = await GetAvailableCacheNames();
|
||||
|
||||
// No caches available: go to network
|
||||
if (!availableCacheNames.length)
|
||||
return fetch(event.request);
|
||||
|
||||
const useCacheName = await GetCacheNameToUse(availableCacheNames, doUpdateCheck);
|
||||
const cache = await caches.open(useCacheName);
|
||||
const cachedResponse = await cache.match(event.request);
|
||||
|
||||
if (cachedResponse)
|
||||
return cachedResponse; // use cached response
|
||||
|
||||
// We need to check if this request is to be lazy-cached. Send the request and load the lazy-load list
|
||||
// from storage simultaneously.
|
||||
const result = await Promise.all([fetch(event.request), ReadLazyLoadListFromStorage()]);
|
||||
const fetchResponse = result[0];
|
||||
const lazyLoadList = result[1];
|
||||
|
||||
if (IsUrlInLazyLoadList(event.request.url, lazyLoadList))
|
||||
{
|
||||
// Handle failure writing to the cache. This can happen if the storage quota is exceeded, which is particularly
|
||||
// likely in Safari 11.1, which appears to have very tight storage limits. Make sure even in the event of an error
|
||||
// we continue to return the response from the fetch.
|
||||
try {
|
||||
// Note clone response since we also respond with it
|
||||
await cache.put(event.request, fetchResponse.clone());
|
||||
}
|
||||
catch (err)
|
||||
{
|
||||
console.warn(CONSOLE_PREFIX + "Error caching '" + event.request.url + "': ", err);
|
||||
}
|
||||
}
|
||||
|
||||
return fetchResponse;
|
||||
};
|
||||
|
||||
self.addEventListener("fetch", event =>
|
||||
{
|
||||
/** NOTE (iain)
|
||||
* This check is to prevent a bug with XMLHttpRequest where if its
|
||||
* proxied with "FetchEvent.prototype.respondWith" no upload progress
|
||||
* events are triggered. By returning we allow the default action to
|
||||
* occur instead. Currently all cross-origin requests fall back to default.
|
||||
*/
|
||||
if (new URL(event.request.url).origin !== location.origin)
|
||||
return;
|
||||
|
||||
// Check for an update on navigate requests
|
||||
const doUpdateCheck = (event.request.mode === "navigate");
|
||||
|
||||
const responsePromise = HandleFetch(event, doUpdateCheck);
|
||||
|
||||
if (doUpdateCheck)
|
||||
{
|
||||
// allow the main request to complete, then check for updates
|
||||
event.waitUntil(
|
||||
responsePromise
|
||||
.then(() => UpdateCheck(false)) // not first check
|
||||
);
|
||||
}
|
||||
|
||||
event.respondWith(responsePromise);
|
||||
});
|
||||
150
PairOrNotPair/tdv_sdk.js
Normal file
@@ -0,0 +1,150 @@
|
||||
var tdv_sdk = {};
|
||||
|
||||
tdv_sdk.list = [
|
||||
{
|
||||
"id": "1",
|
||||
"name": "dog",
|
||||
"image": "https://images.senaai.vn/images/dog4.jpg",
|
||||
"audio": "https://audio.senaai.vn/audio/en_female_1_dog.mp3"
|
||||
},
|
||||
{
|
||||
"id": "2",
|
||||
"name": "cat",
|
||||
"image": "https://images.senaai.vn/images/cat_1.jpg",
|
||||
"audio": "https://audio.senaai.vn/audio/en_female_1_cat.mp3"
|
||||
},
|
||||
{
|
||||
"id": "3",
|
||||
"name": "cow",
|
||||
"image": "https://images.senaai.vn/images/cow1.jpg",
|
||||
"audio": "https://audio.senaai.vn/audio/en_female_1_cow.mp3"
|
||||
},
|
||||
{
|
||||
"id": "4",
|
||||
"name": "fish",
|
||||
"image": "https://images.senaai.vn/images/blue_fish1.jpg",
|
||||
"audio": "https://audio.senaai.vn/audio/en_female_1_fish.mp3"
|
||||
},
|
||||
{
|
||||
"id": "5",
|
||||
"name": "bird",
|
||||
"image": "https://images.senaai.vn/images/brown_bird1.jpg",
|
||||
"audio": "https://audio.senaai.vn/audio/en_female_1_bird.mp3"
|
||||
},
|
||||
{
|
||||
"id": "6",
|
||||
"name": "duck",
|
||||
"image": "https://images.senaai.vn/images/duck2.jpg",
|
||||
"audio": "https://audio.senaai.vn/audio/en_female_1_duck.mp3"
|
||||
}
|
||||
];
|
||||
|
||||
tdv_sdk.max_question = 5; // CẤU HÌNH SỐ LƯỢNG CÂU HỎI TẠI ĐÂY
|
||||
|
||||
tdv_sdk.gameList = [];
|
||||
tdv_sdk.currentLevel = 0;
|
||||
tdv_sdk.score = 0;
|
||||
|
||||
tdv_sdk.shuffleArray = function(array) {
|
||||
var newArray = array.slice();
|
||||
for (let i = newArray.length - 1; i > 0; i--) {
|
||||
const j = Math.floor(Math.random() * (i + 1));
|
||||
[newArray[i], newArray[j]] = [newArray[j], newArray[i]];
|
||||
}
|
||||
return newArray;
|
||||
};
|
||||
|
||||
tdv_sdk.start = function() {
|
||||
tdv_sdk.currentLevel = 0;
|
||||
tdv_sdk.score = 0;
|
||||
tdv_sdk.gameList = [];
|
||||
|
||||
var shuffledList = tdv_sdk.shuffleArray(tdv_sdk.list);
|
||||
var selectedItems = shuffledList.slice(0, tdv_sdk.max_question);
|
||||
|
||||
selectedItems.forEach(function(item) {
|
||||
var isPair = Math.random() < 0.5;
|
||||
var questionObj = {
|
||||
image: item.image,
|
||||
audio_image: item.audio,
|
||||
is_pair: isPair
|
||||
};
|
||||
|
||||
if (isPair) {
|
||||
questionObj.text = item.name;
|
||||
questionObj.audio_text = item.audio;
|
||||
} else {
|
||||
var distractor;
|
||||
do {
|
||||
distractor = tdv_sdk.list[Math.floor(Math.random() * tdv_sdk.list.length)];
|
||||
} while (distractor.id === item.id);
|
||||
|
||||
questionObj.text = distractor.name;
|
||||
questionObj.audio_text = distractor.audio;
|
||||
}
|
||||
tdv_sdk.gameList.push(questionObj);
|
||||
});
|
||||
};
|
||||
|
||||
tdv_sdk.getCurrentLevel = function() {
|
||||
return tdv_sdk.currentLevel + 1;
|
||||
};
|
||||
|
||||
tdv_sdk.getTotalQuestion = function() {
|
||||
return tdv_sdk.max_question;
|
||||
};
|
||||
|
||||
tdv_sdk.getCurImage = function() {
|
||||
if (tdv_sdk.gameList[tdv_sdk.currentLevel]) {
|
||||
return tdv_sdk.gameList[tdv_sdk.currentLevel].image;
|
||||
}
|
||||
return "";
|
||||
};
|
||||
|
||||
tdv_sdk.getCurText = function() {
|
||||
if (tdv_sdk.gameList[tdv_sdk.currentLevel]) {
|
||||
return tdv_sdk.gameList[tdv_sdk.currentLevel].text;
|
||||
}
|
||||
return "";
|
||||
};
|
||||
|
||||
tdv_sdk.isPair = function() {
|
||||
if (tdv_sdk.gameList[tdv_sdk.currentLevel]) {
|
||||
return tdv_sdk.gameList[tdv_sdk.currentLevel].is_pair ? 1 : 0;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
|
||||
tdv_sdk.playAudio = function(url) {
|
||||
if (window.audio && !window.audio.paused) {
|
||||
window.audio.pause();
|
||||
}
|
||||
window.audio = new Audio(url);
|
||||
window.audio.play();
|
||||
};
|
||||
|
||||
tdv_sdk.playAudioImage = function() {
|
||||
if (tdv_sdk.gameList[tdv_sdk.currentLevel]) {
|
||||
tdv_sdk.playAudio(tdv_sdk.gameList[tdv_sdk.currentLevel].audio_image);
|
||||
}
|
||||
};
|
||||
|
||||
tdv_sdk.playAudioText = function() {
|
||||
if (tdv_sdk.gameList[tdv_sdk.currentLevel]) {
|
||||
tdv_sdk.playAudio(tdv_sdk.gameList[tdv_sdk.currentLevel].audio_text);
|
||||
}
|
||||
};
|
||||
|
||||
tdv_sdk.nextLevel = function() {
|
||||
if (tdv_sdk.currentLevel < tdv_sdk.max_question) {
|
||||
tdv_sdk.currentLevel++;
|
||||
}
|
||||
};
|
||||
|
||||
tdv_sdk.addScore = function() {
|
||||
tdv_sdk.score++;
|
||||
};
|
||||
|
||||
tdv_sdk.getScore = function() {
|
||||
return tdv_sdk.score;
|
||||
};
|
||||