-
Notifications
You must be signed in to change notification settings - Fork 0
/
c2runtime.js
386 lines (386 loc) · 185 KB
/
c2runtime.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
// Generated by Construct 2, the HTML5 game and app creator :: http://www.scirra.com
'use strict';var aa,ba,M,ca,da,ea,N,fa,ha,ia,ja,la,ma,Q,na,oa,pa,qa,ra,sa,ta,ua,va,wa,T,xa,ya,za,Ba,Da,Ea,Fa,Ga,Ha,Ia,Ja,Ka,Pa,Qa,Ra,Sa,Ta,Ua,Va,Wa,Xa,Ya,Za,$a,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,nb,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,yb,zb,Ab,Bb,Cb,Db,Eb,Fb,Gb,Hb,Ib,Jb,Kb,Lb,Mb,Nb,Ob,Pb,Qb,Rb,Sb,U,Tb,Ub={},Vb={};"function"!==typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"===typeof"test".__proto__?function(l){return l.__proto__}:function(l){return l.constructor.prototype});
(function(){function l(t,f,a,c){this.set(t,f,a,c)}function h(){this.sb=this.rb=this.wb=this.ub=this.Bb=this.Ab=this.La=this.Ka=0}function b(t,f,a,c){t<f?a<c?(u=t<a?t:a,s=f>c?f:c):(u=t<c?t:c,s=f>a?f:a):a<c?(u=f<a?f:a,s=t>c?t:c):(u=f<c?f:c,s=t>a?t:a)}function d(){this.items=this.Zc=null;this.Cf=0;n&&(this.Zc=new Set);this.$f=[];this.Vd=!0}function k(t){m[v++]=t}function a(){this.Y=this.Ej=this.y=this.jk=0}function c(t){this.Za=[];this.Dh=this.Fh=this.Gh=this.Eh=0;this.lh(t)}function g(t,f){this.dr=
t;this.cr=f;this.cells={}}function e(t,a,c){var q;return f.length?(q=f.pop(),q.Ws=t,q.x=a,q.y=c,q):new aa(t,a,c)}function p(t,f,a){this.Ws=t;this.x=f;this.y=a;this.$g=new ba}M=function(t){window.console&&window.console.log&&window.console.log(t)};ca=function(t){window.console&&window.console.error&&window.console.error(t)};da=function(t){return"undefined"===typeof t};ea=function(t){return"number"===typeof t};N=function(t){return"string"===typeof t};fa=function(t){return 0<t&&0===(t-1&t)};ha=function(t){--t;
for(var f=1;32>f;f<<=1)t|=t>>f;return t+1};ia=function(t){return 0>t?-t:t};ja=function(t,f){return t>f?t:f};la=function(t,f){return t<f?t:f};ma=Math.PI;Q=function(t){return 0<=t?t|0:(t|0)-1};na=function(t){var f=t|0;return f===t?f:f+1};oa=function(t,f,a,c,q,g,b,e){var m,p,n,d;t<a?(p=t,m=a):(p=a,m=t);q<b?(d=q,n=b):(d=b,n=q);if(m<d||p>n)return!1;f<c?(p=f,m=c):(p=c,m=f);g<e?(d=g,n=e):(d=e,n=g);if(m<d||p>n)return!1;m=q-t+b-a;p=g-f+e-c;t=a-t;f=c-f;q=b-q;g=e-g;e=ia(f*q-g*t);return ia(q*p-g*m)>e?!1:ia(t*
p-f*m)<=e};l.prototype.set=function(f,a,c,q){this.left=f;this.top=a;this.right=c;this.bottom=q};l.prototype.jr=function(f){this.left=f.left;this.top=f.top;this.right=f.right;this.bottom=f.bottom};l.prototype.width=function(){return this.right-this.left};l.prototype.height=function(){return this.bottom-this.top};l.prototype.offset=function(f,a){this.left+=f;this.top+=a;this.right+=f;this.bottom+=a;return this};l.prototype.normalize=function(){var f=0;this.left>this.right&&(f=this.left,this.left=this.right,
this.right=f);this.top>this.bottom&&(f=this.top,this.top=this.bottom,this.bottom=f)};l.prototype.gt=function(f){return!(f.right<this.left||f.bottom<this.top||f.left>this.right||f.top>this.bottom)};l.prototype.ht=function(f,a,c){return!(f.right+a<this.left||f.bottom+c<this.top||f.left+a>this.right||f.top+c>this.bottom)};l.prototype.Wb=function(f,a){return f>=this.left&&f<=this.right&&a>=this.top&&a<=this.bottom};l.prototype.Nr=function(f){return this.left===f.left&&this.top===f.top&&this.right===f.right&&
this.bottom===f.bottom};pa=l;h.prototype.Uf=function(f){this.Ka=f.left;this.La=f.top;this.Ab=f.right;this.Bb=f.top;this.ub=f.right;this.wb=f.bottom;this.rb=f.left;this.sb=f.bottom};h.prototype.mp=function(f,a){if(0===a)this.Uf(f);else{var c=Math.sin(a),q=Math.cos(a),g=f.left*c,e=f.top*c,b=f.right*c,c=f.bottom*c,m=f.left*q,p=f.top*q,n=f.right*q,q=f.bottom*q;this.Ka=m-e;this.La=p+g;this.Ab=n-e;this.Bb=p+b;this.ub=n-c;this.wb=q+b;this.rb=m-c;this.sb=q+g}};h.prototype.offset=function(f,a){this.Ka+=f;
this.La+=a;this.Ab+=f;this.Bb+=a;this.ub+=f;this.wb+=a;this.rb+=f;this.sb+=a;return this};var u=0,s=0;h.prototype.Wm=function(f){b(this.Ka,this.Ab,this.ub,this.rb);f.left=u;f.right=s;b(this.La,this.Bb,this.wb,this.sb);f.top=u;f.bottom=s};h.prototype.Wb=function(f,a){var c=this.Ab-this.Ka,q=this.Bb-this.La,g=this.ub-this.Ka,e=this.wb-this.La,b=f-this.Ka,m=a-this.La,p=c*c+q*q,n=c*g+q*e,q=c*b+q*m,d=g*g+e*e,v=g*b+e*m,u=1/(p*d-n*n),c=(d*q-n*v)*u,p=(p*v-n*q)*u;if(0<=c&&0<p&&1>c+p)return!0;c=this.rb-this.Ka;
q=this.sb-this.La;p=c*c+q*q;n=c*g+q*e;q=c*b+q*m;u=1/(p*d-n*n);c=(d*q-n*v)*u;p=(p*v-n*q)*u;return 0<=c&&0<p&&1>c+p};h.prototype.Td=function(f,a){if(a)switch(f){case 0:return this.Ka;case 1:return this.Ab;case 2:return this.ub;case 3:return this.rb;case 4:return this.Ka;default:return this.Ka}else switch(f){case 0:return this.La;case 1:return this.Bb;case 2:return this.wb;case 3:return this.sb;case 4:return this.La;default:return this.La}};h.prototype.zo=function(){return(this.Ka+this.Ab+this.ub+this.rb)/
4};h.prototype.Ao=function(){return(this.La+this.Bb+this.wb+this.sb)/4};h.prototype.Hn=function(f){var a=f.zo(),c=f.Ao();if(this.Wb(a,c))return!0;a=this.zo();c=this.Ao();if(f.Wb(a,c))return!0;var q,g,e,b,m,p,n,d;for(n=0;4>n;n++)for(d=0;4>d;d++)if(a=this.Td(n,!0),c=this.Td(n,!1),q=this.Td(n+1,!0),g=this.Td(n+1,!1),e=f.Td(d,!0),b=f.Td(d,!1),m=f.Td(d+1,!0),p=f.Td(d+1,!1),oa(a,c,q,g,e,b,m,p))return!0;return!1};qa=h;ra=function(f,a){for(var c in a)a.hasOwnProperty(c)&&(f[c]=a[c]);return f};sa=function(f,
a){var c,q;a=Q(a);if(!(0>a||a>=f.length)){c=a;for(q=f.length-1;c<q;c++)f[c]=f[c+1];f.length=q}};ta=function(f,a){f.length=a.length;var c,q;c=0;for(q=a.length;c<q;c++)f[c]=a[c]};ua=function(f,a){f.push.apply(f,a)};va=function(f,a){var c,q;c=0;for(q=f.length;c<q;++c)if(f[c]===a)return c;return-1};wa=function(f,a){var c=va(f,a);-1!==c&&sa(f,c)};T=function(f){return f/(180/ma)};xa=function(f){return 180/ma*f};ya=function(f){f%=360;0>f&&(f+=360);return f};za=function(f){f%=2*ma;0>f&&(f+=2*ma);return f};
Ba=function(f){return ya(xa(f))};Da=function(f){return za(T(f))};Ea=function(f,a,c,q){return Math.atan2(q-a,c-f)};Fa=function(f,a){if(f===a)return 0;var c=Math.sin(f),q=Math.cos(f),g=Math.sin(a),e=Math.cos(a),c=c*g+q*e;return 1<=c?0:-1>=c?ma:Math.acos(c)};Ga=function(f,a,c){var q=Math.sin(f),g=Math.cos(f),e=Math.sin(a),b=Math.cos(a);return Math.acos(q*e+g*b)>c?0<g*e-q*b?za(f+c):za(f-c):za(a)};Ha=function(f,a){var c=Math.sin(f),q=Math.cos(f),g=Math.sin(a),e=Math.cos(a);return 0>=q*g-c*e};Ia=function(f,
a,c,q,g,e){if(0===c)return e?f:a;var b=Math.sin(c);c=Math.cos(c);f-=q;a-=g;var m=f*b;f=f*c-a*b;a=a*c+m;return e?f+q:a+g};Ja=function(f,a,c,q){f=c-f;a=q-a;return Math.sqrt(f*f+a*a)};Ka=function(f,a){return!f!==!a};Pa=function(f){for(var a in f)if(f.hasOwnProperty(a))return!0;return!1};Qa=function(f){for(var a in f)f.hasOwnProperty(a)&&delete f[a]};var z=+new Date;Ra=function(){if("undefined"!==typeof window.performance){var f=window.performance;if("undefined"!==typeof f.now)return f.now();if("undefined"!==
typeof f.webkitNow)return f.webkitNow();if("undefined"!==typeof f.mozNow)return f.mozNow();if("undefined"!==typeof f.msNow)return f.msNow()}return Date.now()-z};var r=!1,y=r=!1,x=!1;"undefined"!==typeof window&&(r=/chrome/i.test(navigator.userAgent)||/chromium/i.test(navigator.userAgent),r=!r&&/safari/i.test(navigator.userAgent),y=/(iphone|ipod|ipad)/i.test(navigator.userAgent),x=window.c2ejecta);var n=!r&&!x&&!y&&"undefined"!==typeof Set&&"undefined"!==typeof Set.prototype.forEach;d.prototype.contains=
function(f){return this.wf()?!1:n?this.Zc.has(f):this.items&&this.items.hasOwnProperty(f)};d.prototype.add=function(f){if(n)this.Zc.has(f)||(this.Zc.add(f),this.Vd=!1);else{var a=f.toString(),c=this.items;c?c.hasOwnProperty(a)||(c[a]=f,this.Cf++,this.Vd=!1):(this.items={},this.items[a]=f,this.Cf=1,this.Vd=!1)}};d.prototype.remove=function(f){if(!this.wf())if(n)this.Zc.has(f)&&(this.Zc["delete"](f),this.Vd=!1);else if(this.items){f=f.toString();var a=this.items;a.hasOwnProperty(f)&&(delete a[f],this.Cf--,
this.Vd=!1)}};d.prototype.clear=function(){this.wf()||(n?this.Zc.clear():(this.items=null,this.Cf=0),this.$f.length=0,this.Vd=!0)};d.prototype.wf=function(){return 0===this.count()};d.prototype.count=function(){return n?this.Zc.size:this.Cf};var m=null,v=0;d.prototype.zu=function(){if(!this.Vd){if(n)this.$f.length=this.Zc.size,m=this.$f,v=0,this.Zc.forEach(k),m=null,v=0;else{var f=this.$f;f.length=this.Cf;var a,c=0,q=this.items;if(q)for(a in q)q.hasOwnProperty(a)&&(f[c++]=q[a])}this.Vd=!0}};d.prototype.Pd=
function(){this.zu();return this.$f};ba=d;new ba;Ua=function(f,a){n?Sa(f,a.Zc):Ta(f,a.Pd())};Sa=function(f,a){var c,q,g,e;q=c=0;for(g=f.length;c<g;++c)e=f[c],a.has(e)||(f[q++]=e);f.length=q};Ta=function(f,a){var c,q,g,e;q=c=0;for(g=f.length;c<g;++c)e=f[c],-1===va(a,e)&&(f[q++]=e);f.length=q};a.prototype.add=function(f){this.y=f-this.jk;this.Ej=this.Y+this.y;this.jk=this.Ej-this.Y-this.y;this.Y=this.Ej};a.prototype.reset=function(){this.Y=this.Ej=this.y=this.jk=0};Va=a;Wa=function(f){return f.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,
"\\$&")};c.prototype.lh=function(f){this.bp=f;this.Yc=f.length/2;this.Za.length=f.length;this.Jh=this.Kh=-1;this.Zm=0};c.prototype.zf=function(){return!this.bp.length};c.prototype.Ea=function(){for(var f=this.Za,a=f[0],c=a,q=f[1],g=q,e,b,m=1,p=this.Yc;m<p;++m)b=2*m,e=f[b],b=f[b+1],e<a&&(a=e),e>c&&(c=e),b<q&&(q=b),b>g&&(g=b);this.Eh=a;this.Fh=c;this.Gh=q;this.Dh=g};c.prototype.Uf=function(f,a,c){this.Za.length=8;this.Yc=4;var q=this.Za;q[0]=f.left-a;q[1]=f.top-c;q[2]=f.right-a;q[3]=f.top-c;q[4]=f.right-
a;q[5]=f.bottom-c;q[6]=f.left-a;q[7]=f.bottom-c;this.Kh=f.right-f.left;this.Jh=f.bottom-f.top;this.Ea()};c.prototype.Tf=function(f,a,c,q,g){this.Za.length=8;this.Yc=4;var e=this.Za;e[0]=f.Ka-a;e[1]=f.La-c;e[2]=f.Ab-a;e[3]=f.Bb-c;e[4]=f.ub-a;e[5]=f.wb-c;e[6]=f.rb-a;e[7]=f.sb-c;this.Kh=q;this.Jh=g;this.Ea()};c.prototype.lp=function(f){this.Yc=f.Yc;ta(this.Za,f.Za);this.Eh=f.Eh;this.Gh-f.Gh;this.Fh=f.Fh;this.Dh=f.Dh};c.prototype.nf=function(f,a,c){if(this.Kh!==f||this.Jh!==a||this.Zm!==c){this.Kh=f;
this.Jh=a;this.Zm=c;var q,g,e,b,m,p=0,n=1,d=this.bp,v=this.Za;0!==c&&(p=Math.sin(c),n=Math.cos(c));c=0;for(e=this.Yc;c<e;c++)q=2*c,g=q+1,b=d[q]*f,m=d[g]*a,v[q]=b*n-m*p,v[g]=m*n+b*p;this.Ea()}};c.prototype.Wb=function(f,a){var c=this.Za;if(f===c[0]&&a===c[1])return!0;var q,g,e,b=this.Yc,m=this.Eh-110,p=this.Gh-101,n=this.Fh+131,d=this.Dh+120,v,u,k=0,l=0;for(q=0;q<b;q++)g=2*q,e=(q+1)%b*2,v=c[g],g=c[g+1],u=c[e],e=c[e+1],oa(m,p,f,a,v,g,u,e)&&k++,oa(n,d,f,a,v,g,u,e)&&l++;return 1===k%2||1===l%2};c.prototype.Bg=
function(f,a,c){var q=f.Za,g=this.Za;if(this.Wb(q[0]+a,q[1]+c)||f.Wb(g[0]-a,g[1]-c))return!0;var e,b,m,p,n,d,v,u,k,l,r,h;e=0;for(p=this.Yc;e<p;e++)for(b=2*e,m=(e+1)%p*2,u=g[b],b=g[b+1],k=g[m],l=g[m+1],m=0,v=f.Yc;m<v;m++)if(n=2*m,d=(m+1)%v*2,r=q[n]+a,n=q[n+1]+c,h=q[d]+a,d=q[d+1]+c,oa(u,b,k,l,r,n,h,d))return!0;return!1};Xa=c;g.prototype.Kk=function(f,a,c){var q;q=this.cells[f];return q?(q=q[a])?q:c?(q=e(this,f,a),this.cells[f][a]=q):null:c?(q=e(this,f,a),this.cells[f]={},this.cells[f][a]=q):null};g.prototype.zh=
function(f){return Q(f/this.dr)};g.prototype.Ah=function(f){return Q(f/this.cr)};g.prototype.update=function(a,c,q){var g,e,b,m,p;if(c)for(g=c.left,e=c.right;g<=e;++g)for(b=c.top,m=c.bottom;b<=m;++b)if(!q||!q.Wb(g,b))if(p=this.Kk(g,b,!1))p.remove(a),p.wf()&&(p.$g.clear(),1E3>f.length&&f.push(p),this.cells[g][b]=null);if(q)for(g=q.left,e=q.right;g<=e;++g)for(b=q.top,m=q.bottom;b<=m;++b)c&&c.Wb(g,b)||this.Kk(g,b,!0).et(a)};g.prototype.ep=function(f,a){var c,q,g,e,b,m;c=this.zh(f.left);g=this.Ah(f.top);
q=this.zh(f.right);for(b=this.Ah(f.bottom);c<=q;++c)for(e=g;e<=b;++e)(m=this.Kk(c,e,!1))&&m.dump(a)};Ya=g;var f=[];p.prototype.wf=function(){return this.$g.wf()};p.prototype.et=function(f){this.$g.add(f)};p.prototype.remove=function(f){this.$g.remove(f)};p.prototype.dump=function(f){ua(f,this.$g.Pd())};aa=p;var q="lighter xor copy destination-over source-in destination-in source-out destination-out source-atop destination-atop".split(" ");Za=function(f){return 0>=f||11<=f?"source-over":q[f-1]};$a=
function(f,a,c){if(c)switch(f.zb=c.ONE,f.xb=c.ONE_MINUS_SRC_ALPHA,a){case 1:f.zb=c.ONE;f.xb=c.ONE;break;case 3:f.zb=c.ONE;f.xb=c.ZERO;break;case 4:f.zb=c.ONE_MINUS_DST_ALPHA;f.xb=c.ONE;break;case 5:f.zb=c.DST_ALPHA;f.xb=c.ZERO;break;case 6:f.zb=c.ZERO;f.xb=c.SRC_ALPHA;break;case 7:f.zb=c.ONE_MINUS_DST_ALPHA;f.xb=c.ZERO;break;case 8:f.zb=c.ZERO;f.xb=c.ONE_MINUS_SRC_ALPHA;break;case 9:f.zb=c.DST_ALPHA;f.xb=c.ONE_MINUS_SRC_ALPHA;break;case 10:f.zb=c.ONE_MINUS_DST_ALPHA,f.xb=c.SRC_ALPHA}};ab=function(f){return Math.round(1E6*
f)/1E6};bb=function(f,a){return"string"!==typeof f||"string"!==typeof a||f.length!==a.length?!1:f===a?!0:f.toLowerCase()===a.toLowerCase()};cb=function(f){f=f.target;return!f||f===document||f===window||document&&document.body&&f===document.body||bb(f.tagName,"canvas")?!0:!1}})();var Wb="undefined"!==typeof Float32Array?Float32Array:Array;function Xb(l){var h=new Wb(3);l&&(h[0]=l[0],h[1]=l[1],h[2]=l[2]);return h}
function Yb(l){var h=new Wb(16);l&&(h[0]=l[0],h[1]=l[1],h[2]=l[2],h[3]=l[3],h[4]=l[4],h[5]=l[5],h[6]=l[6],h[7]=l[7],h[8]=l[8],h[9]=l[9],h[10]=l[10],h[11]=l[11],h[12]=l[12],h[13]=l[13],h[14]=l[14],h[15]=l[15]);return h}function Zb(l,h){h[0]=l[0];h[1]=l[1];h[2]=l[2];h[3]=l[3];h[4]=l[4];h[5]=l[5];h[6]=l[6];h[7]=l[7];h[8]=l[8];h[9]=l[9];h[10]=l[10];h[11]=l[11];h[12]=l[12];h[13]=l[13];h[14]=l[14];h[15]=l[15]}
function $b(l,h){var b=h[0],d=h[1];h=h[2];l[0]*=b;l[1]*=b;l[2]*=b;l[3]*=b;l[4]*=d;l[5]*=d;l[6]*=d;l[7]*=d;l[8]*=h;l[9]*=h;l[10]*=h;l[11]*=h}
function ac(l,h,b,d){d||(d=Yb());var k,a,c,g,e,p,u,s,z=l[0],r=l[1];l=l[2];a=b[0];c=b[1];k=b[2];b=h[1];p=h[2];z===h[0]&&r===b&&l===p?(l=d,l[0]=1,l[1]=0,l[2]=0,l[3]=0,l[4]=0,l[5]=1,l[6]=0,l[7]=0,l[8]=0,l[9]=0,l[10]=1,l[11]=0,l[12]=0,l[13]=0,l[14]=0,l[15]=1):(b=z-h[0],p=r-h[1],u=l-h[2],s=1/Math.sqrt(b*b+p*p+u*u),b*=s,p*=s,u*=s,h=c*u-k*p,k=k*b-a*u,a=a*p-c*b,(s=Math.sqrt(h*h+k*k+a*a))?(s=1/s,h*=s,k*=s,a*=s):a=k=h=0,c=p*a-u*k,g=u*h-b*a,e=b*k-p*h,(s=Math.sqrt(c*c+g*g+e*e))?(s=1/s,c*=s,g*=s,e*=s):e=g=c=0,
d[0]=h,d[1]=c,d[2]=b,d[3]=0,d[4]=k,d[5]=g,d[6]=p,d[7]=0,d[8]=a,d[9]=e,d[10]=u,d[11]=0,d[12]=-(h*z+k*r+a*l),d[13]=-(c*z+g*r+e*l),d[14]=-(b*z+p*r+u*l),d[15]=1)}
(function(){function l(a){this.Me=/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent);this.height=this.width=0;this.$m=Xb([0,0,100]);this.ho=Xb([0,0,0]);this.Hp=Xb([0,1,0]);this.Im=Xb([1,1,1]);this.hn=!0;this.Cl=Yb();this.Gc=Yb();this.Un=Yb();this.tk=Yb();this.u=a;this.Dn()}function h(a,c,g){this.u=a;this.mh=c;this.name=g;this.Fc=a.getAttribLocation(c,"aPos");this.fe=a.getAttribLocation(c,"aTex");this.eo=a.getUniformLocation(c,"matP");this.Pi=a.getUniformLocation(c,"matMV");this.If=
a.getUniformLocation(c,"opacity");this.fo=a.getUniformLocation(c,"samplerFront");this.Sg=a.getUniformLocation(c,"samplerBack");this.Se=a.getUniformLocation(c,"destStart");this.Re=a.getUniformLocation(c,"destEnd");this.zl=a.getUniformLocation(c,"seconds");this.yl=a.getUniformLocation(c,"pixelWidth");this.xl=a.getUniformLocation(c,"pixelHeight");this.Rg=a.getUniformLocation(c,"layerScale");this.Qg=a.getUniformLocation(c,"layerAngle");this.Ug=a.getUniformLocation(c,"viewOrigin");this.Tg=a.getUniformLocation(c,
"scrollPos");this.Zs=!!(this.yl||this.xl||this.zl||this.Sg||this.Se||this.Re||this.Rg||this.Qg||this.Ug||this.Tg);this.ro=this.so=-999;this.Ri=1;this.no=this.lo=0;this.po=this.ko=this.jo=1;this.vo=this.uo=this.xo=this.wo=this.oo=0;this.ml=[];this.qo=Yb();this.If&&a.uniform1f(this.If,1);this.fo&&a.uniform1i(this.fo,0);this.Sg&&a.uniform1i(this.Sg,1);this.Se&&a.uniform2f(this.Se,0,0);this.Re&&a.uniform2f(this.Re,1,1);this.Rg&&a.uniform1f(this.Rg,1);this.Qg&&a.uniform1f(this.Qg,0);this.Ug&&a.uniform2f(this.Ug,
0,0);this.Tg&&a.uniform2f(this.Tg,0,0);this.He=!1}function b(a,c){this.type=a;this.A=c;this.u=c.u;this.Dc=this.tc=this.Mo=0;this.qa=this.bd=null;this.np=[]}l.prototype.Dn=function(){var a=this.u,c;this.Vn=1;this.Pe=this.de=null;this.Sh=1;a.clearColor(0,0,0,0);a.clear(a.COLOR_BUFFER_BIT);a.enable(a.BLEND);a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA);a.disable(a.CULL_FACE);a.disable(a.DEPTH_TEST);this.Xn=a.ONE;this.Sn=a.ONE_MINUS_SRC_ALPHA;this.Pl=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,this.Pl);this.xh=
Array(4);this.qh=Array(4);for(c=0;4>c;c++)this.xh[c]=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,this.xh[c]),this.qh[c]=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,this.qh[c]);this.Bd=0;this.ct=a.createBuffer();a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.ct);this.Dm=new Float32Array(16E3);this.rm=new Float32Array(16E3);this.Yo=new Float32Array(32E3);for(var g=new Uint16Array(12E3),e=c=0;12E3>c;)g[c++]=e,g[c++]=e+1,g[c++]=e+2,g[c++]=e,g[c++]=e+2,g[c++]=e+3,e+=4;a.bufferData(a.ELEMENT_ARRAY_BUFFER,g,
a.STATIC_DRAW);this.Pf=this.ud=0;this.ab=[];c=this.sk({src:"varying mediump vec2 vTex;\nuniform lowp float opacity;\nuniform lowp sampler2D samplerFront;\nvoid main(void) {\n\tgl_FragColor = texture2D(samplerFront, vTex);\n\tgl_FragColor *= opacity;\n}"},"attribute highp vec2 aPos;\nattribute mediump vec2 aTex;\nvarying mediump vec2 vTex;\nuniform highp mat4 matP;\nuniform highp mat4 matMV;\nvoid main(void) {\n\tgl_Position = matP * matMV * vec4(aPos.x, aPos.y, 0.0, 1.0);\n\tvTex = aTex;\n}","<default>");
this.ab.push(c);c=this.sk({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.ab.push(c);for(var b in bc)bc.hasOwnProperty(b)&&this.ab.push(this.sk(bc[b],
"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}",b));a.activeTexture(a.TEXTURE0);a.bindTexture(a.TEXTURE_2D,null);this.yd=[];this.fd=0;this.Yb=this.Lb=!1;this.dn=this.Hg=-1;this.jg=null;this.ms=a.createFramebuffer();this.gp=null;this.te=Xb([0,0,0]);a=a.getParameter(a.ALIASED_POINT_SIZE_RANGE);this.zt=a[0];this.Dl=
a[1];2048<this.Dl&&(this.Dl=2048);this.rd(0)};h.prototype.ym=function(a){var c=this.qo;if(c[0]!==a[0]||c[1]!==a[1]||c[2]!==a[2]||c[3]!==a[3]||c[4]!==a[4]||c[5]!==a[5]||c[6]!==a[6]||c[7]!==a[7]||c[8]!==a[8]||c[9]!==a[9]||c[10]!==a[10]||c[11]!==a[11]||c[12]!==a[12]||c[13]!==a[13]||c[14]!==a[14]||c[15]!==a[15])Zb(a,this.qo),this.u.uniformMatrix4fv(this.Pi,!1,a)};l.prototype.sk=function(a,c,g){var e=this.u,b=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(b,a.src);e.compileShader(b);if(!e.getShaderParameter(b,
e.COMPILE_STATUS))return e.deleteShader(b),null;var d=e.createShader(e.VERTEX_SHADER);e.shaderSource(d,c);e.compileShader(d);if(!e.getShaderParameter(d,e.COMPILE_STATUS))return e.deleteShader(b),e.deleteShader(d),null;c=e.createProgram();e.attachShader(c,b);e.attachShader(c,d);e.linkProgram(c);if(!e.getProgramParameter(c,e.LINK_STATUS))return e.deleteShader(b),e.deleteShader(d),e.deleteProgram(c),null;e.useProgram(c);e.deleteShader(b);e.deleteShader(d);g=new h(e,c,g);g.Bk=a.Bk||0;g.Ck=a.Ck||0;g.cn=
!!a.cn;g.Tm=!!a.Tm;g.S=a.S||[];a=0;for(b=g.S.length;a<b;a++)g.S[a][1]=e.getUniformLocation(c,g.S[a][0]),g.ml.push(0),e.uniform1f(g.S[a][1],0);return g};l.prototype.Qk=function(a){var c,g;c=0;for(g=this.ab.length;c<g;c++)if(this.ab[c].name===a)return c;return-1};l.prototype.$o=function(a,c,g){var e=this.Gc,b=this.Cl,d=[0,0,0,0,0,0,0,0];d[0]=e[0]*a+e[4]*c+e[12];d[1]=e[1]*a+e[5]*c+e[13];d[2]=e[2]*a+e[6]*c+e[14];d[3]=e[3]*a+e[7]*c+e[15];d[4]=b[0]*d[0]+b[4]*d[1]+b[8]*d[2]+b[12]*d[3];d[5]=b[1]*d[0]+b[5]*
d[1]+b[9]*d[2]+b[13]*d[3];d[6]=b[2]*d[0]+b[6]*d[1]+b[10]*d[2]+b[14]*d[3];d[7]=-d[2];0!==d[7]&&(d[7]=1/d[7],d[4]*=d[7],d[5]*=d[7],d[6]*=d[7],g[0]=(.5*d[4]+.5)*this.width,g[1]=(.5*d[5]+.5)*this.height)};l.prototype.Sf=function(a,c,g){if(this.width!==a||this.height!==c||g){this.Ed();this.width=a;this.height=c;this.u.viewport(0,0,a,c);c=a/c;var b=this.Cl,p;p=1*Math.tan(45*Math.PI/360);c*=p;a=-c;g=-p;b||(b=Yb());var d=c-a,k=p-g;b[0]=2/d;b[1]=0;b[2]=0;b[3]=0;b[4]=0;b[5]=2/k;b[6]=0;b[7]=0;b[8]=(c+a)/d;b[9]=
(p+g)/k;b[10]=-1001/999;b[11]=-1;b[12]=0;b[13]=0;b[14]=-2E3/999;b[15]=0;ac(this.$m,this.ho,this.Hp,this.Gc);a=[0,0];c=[0,0];this.$o(0,0,a);this.$o(1,1,c);this.Im[0]=1/(c[0]-a[0]);this.Im[1]=-1/(c[1]-a[1]);a=0;for(c=this.ab.length;a<c;a++)g=this.ab[a],g.He=!1,g.eo&&(this.u.useProgram(g.mh),this.u.uniformMatrix4fv(g.eo,!1,this.Cl));this.u.useProgram(this.ab[this.Hg].mh);this.u.bindTexture(this.u.TEXTURE_2D,null);this.u.activeTexture(this.u.TEXTURE1);this.u.bindTexture(this.u.TEXTURE_2D,null);this.u.activeTexture(this.u.TEXTURE0);
this.Pe=this.de=null}};l.prototype.pd=function(){ac(this.$m,this.ho,this.Hp,this.Gc);$b(this.Gc,this.Im)};l.prototype.translate=function(a,c){if(0!==a||0!==c){this.te[0]=a;this.te[1]=c;this.te[2]=0;var g=this.Gc,b=this.te,d=b[0],k=b[1],b=b[2];g[12]=g[0]*d+g[4]*k+g[8]*b+g[12];g[13]=g[1]*d+g[5]*k+g[9]*b+g[13];g[14]=g[2]*d+g[6]*k+g[10]*b+g[14];g[15]=g[3]*d+g[7]*k+g[11]*b+g[15]}};l.prototype.scale=function(a,c){if(1!==a||1!==c)this.te[0]=a,this.te[1]=c,this.te[2]=1,$b(this.Gc,this.te)};l.prototype.Yl=
function(a){if(0!==a){var c=this.Gc,g,b=Math.sin(a);a=Math.cos(a);var d=c[0],k=c[1],l=c[2],h=c[3],r=c[4],y=c[5],x=c[6],n=c[7];g?c!==g&&(g[8]=c[8],g[9]=c[9],g[10]=c[10],g[11]=c[11],g[12]=c[12],g[13]=c[13],g[14]=c[14],g[15]=c[15]):g=c;g[0]=d*a+r*b;g[1]=k*a+y*b;g[2]=l*a+x*b;g[3]=h*a+n*b;g[4]=d*-b+r*a;g[5]=k*-b+y*a;g[6]=l*-b+x*a;g[7]=h*-b+n*a}};l.prototype.td=function(){for(var a=!1,c=0;16>c;c++)if(this.Un[c]!==this.Gc[c]){a=!0;break}a&&(a=this.Kc(),a.type=5,a.qa?Zb(this.Gc,a.qa):a.qa=Yb(this.Gc),Zb(this.Gc,
this.Un),this.Yb=this.Lb=!1)};b.prototype.Gr=function(){this.u.bindTexture(this.u.TEXTURE_2D,this.bd)};b.prototype.Hr=function(){var a=this.u;a.activeTexture(a.TEXTURE1);a.bindTexture(a.TEXTURE_2D,this.bd);a.activeTexture(a.TEXTURE0)};b.prototype.Dr=function(){var a=this.Mo,c=this.A;c.Sh=a;c=c.jg;c.If&&c.Ri!==a&&(c.Ri=a,this.u.uniform1f(c.If,a))};b.prototype.Ar=function(){this.u.drawElements(this.u.TRIANGLES,this.Dc,this.u.UNSIGNED_SHORT,2*this.tc)};b.prototype.Cr=function(){this.u.blendFunc(this.tc,
this.Dc)};b.prototype.Ir=function(){var a,c,g,b=this.A.ab,d=this.A.dn;a=0;for(c=b.length;a<c;a++)g=b[a],a===d&&g.Pi?(g.ym(this.qa),g.He=!0):g.He=!1;Zb(this.qa,this.A.tk)};b.prototype.Br=function(){var a=this.u,c=this.A;this.bd?(c.Pe===this.bd&&(a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,null),c.Pe=null,a.activeTexture(a.TEXTURE0)),a.bindFramebuffer(a.FRAMEBUFFER,c.ms),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,this.bd,0)):(a.framebufferTexture2D(a.FRAMEBUFFER,
a.COLOR_ATTACHMENT0,a.TEXTURE_2D,null,0),a.bindFramebuffer(a.FRAMEBUFFER,null))};b.prototype.tr=function(){var a=this.u;0===this.tc?(a.clearColor(this.qa[0],this.qa[1],this.qa[2],this.qa[3]),a.clear(a.COLOR_BUFFER_BIT)):(a.enable(a.SCISSOR_TEST),a.scissor(this.qa[0],this.qa[1],this.qa[2],this.qa[3]),a.clearColor(0,0,0,0),a.clear(this.u.COLOR_BUFFER_BIT),a.disable(a.SCISSOR_TEST))};b.prototype.ur=function(){var a=this.u,c=this.A,g=c.ab[1];a.useProgram(g.mh);!g.He&&g.Pi&&(g.ym(c.tk),g.He=!0);a.enableVertexAttribArray(g.Fc);
a.bindBuffer(a.ARRAY_BUFFER,c.Pl);a.vertexAttribPointer(g.Fc,4,a.FLOAT,!1,0,0);a.drawArrays(a.POINTS,this.tc/4,this.Dc);g=c.jg;a.useProgram(g.mh);0<=g.Fc&&(a.enableVertexAttribArray(g.Fc),a.bindBuffer(a.ARRAY_BUFFER,c.xh[c.Bd]),a.vertexAttribPointer(g.Fc,2,a.FLOAT,!1,0,0));0<=g.fe&&(a.enableVertexAttribArray(g.fe),a.bindBuffer(a.ARRAY_BUFFER,c.qh[c.Bd]),a.vertexAttribPointer(g.fe,2,a.FLOAT,!1,0,0))};b.prototype.Er=function(){var a=this.u,c=this.A,g=c.ab[this.tc];c.dn=this.tc;c.jg=g;a.useProgram(g.mh);
!g.He&&g.Pi&&(g.ym(c.tk),g.He=!0);g.If&&g.Ri!==c.Sh&&(g.Ri=c.Sh,a.uniform1f(g.If,c.Sh));0<=g.Fc&&(a.enableVertexAttribArray(g.Fc),a.bindBuffer(a.ARRAY_BUFFER,c.xh[c.Bd]),a.vertexAttribPointer(g.Fc,2,a.FLOAT,!1,0,0));0<=g.fe&&(a.enableVertexAttribArray(g.fe),a.bindBuffer(a.ARRAY_BUFFER,c.qh[c.Bd]),a.vertexAttribPointer(g.fe,2,a.FLOAT,!1,0,0))};b.prototype.Fr=function(){var a,c,g=this.A.jg,b=this.u;a=this.qa;g.Sg&&this.A.Pe!==this.bd&&(b.activeTexture(b.TEXTURE1),b.bindTexture(b.TEXTURE_2D,this.bd),
this.A.Pe=this.bd,b.activeTexture(b.TEXTURE0));var d=a[0];g.yl&&d!==g.so&&(g.so=d,b.uniform1f(g.yl,d));d=a[1];g.xl&&d!==g.ro&&(g.ro=d,b.uniform1f(g.xl,d));d=a[2];c=a[3];!g.Se||d===g.lo&&c===g.no||(g.lo=d,g.no=c,b.uniform2f(g.Se,d,c));d=a[4];c=a[5];!g.Re||d===g.jo&&c===g.ko||(g.jo=d,g.ko=d,b.uniform2f(g.Re,d,c));d=a[6];g.Rg&&d!==g.po&&(g.po=d,b.uniform1f(g.Rg,d));d=a[7];g.Qg&&d!==g.oo&&(g.oo=d,b.uniform1f(g.Qg,d));d=a[8];c=a[9];!g.Ug||d===g.wo&&c===g.xo||(g.wo=d,g.xo=c,b.uniform2f(g.Ug,d,c));d=a[10];
c=a[11];!g.Tg||d===g.uo&&c===g.vo||(g.uo=d,g.vo=c,b.uniform2f(g.Tg,d,c));g.zl&&b.uniform1f(g.zl,Ra()/1E3);if(g.S.length)for(a=0,c=g.S.length;a<c;a++)d=this.np[a],d!==g.ml[a]&&(g.ml[a]=d,b.uniform1f(g.S[a][1],d))};l.prototype.Kc=function(){this.fd===this.yd.length&&this.yd.push(new b(0,this));return this.yd[this.fd++]};l.prototype.Ed=function(){if(0!==this.fd&&!this.u.isContextLost()){var a=this.u;0<this.Pf&&(a.bindBuffer(a.ARRAY_BUFFER,this.Pl),a.bufferData(a.ARRAY_BUFFER,this.Yo.subarray(0,this.Pf),
a.STREAM_DRAW),c&&0<=c.Fc&&"<point>"===c.name&&a.vertexAttribPointer(c.Fc,4,a.FLOAT,!1,0,0));if(0<this.ud){var c=this.jg;a.bindBuffer(a.ARRAY_BUFFER,this.xh[this.Bd]);a.bufferData(a.ARRAY_BUFFER,this.Dm.subarray(0,this.ud),a.STREAM_DRAW);c&&0<=c.Fc&&"<point>"!==c.name&&a.vertexAttribPointer(c.Fc,2,a.FLOAT,!1,0,0);a.bindBuffer(a.ARRAY_BUFFER,this.qh[this.Bd]);a.bufferData(a.ARRAY_BUFFER,this.rm.subarray(0,this.ud),a.STREAM_DRAW);c&&0<=c.fe&&"<point>"!==c.name&&a.vertexAttribPointer(c.fe,2,a.FLOAT,
!1,0,0)}for(var g,a=0,c=this.fd;a<c;a++)switch(g=this.yd[a],g.type){case 1:g.Ar();break;case 2:g.Gr();break;case 3:g.Dr();break;case 4:g.Cr();break;case 5:g.Ir();break;case 6:g.Br();break;case 7:g.tr();break;case 8:g.ur();break;case 9:g.Er();break;case 10:g.Fr();break;case 11:g.Hr()}this.Pf=this.ud=this.fd=0;this.Yb=this.Lb=!1;this.Bd++;4<=this.Bd&&(this.Bd=0)}};l.prototype.ne=function(a){if(a!==this.Vn){var c=this.Kc();c.type=3;this.Vn=c.Mo=a;this.Yb=this.Lb=!1}};l.prototype.Sb=function(a){if(a!==
this.de){var c=this.Kc();c.type=2;this.de=c.bd=a;this.Yb=this.Lb=!1}};l.prototype.me=function(a,c){if(a!==this.Xn||c!==this.Sn){var g=this.Kc();g.type=4;g.tc=a;g.Dc=c;this.Xn=a;this.Sn=c;this.Yb=this.Lb=!1}};l.prototype.jp=function(){this.me(this.u.ONE,this.u.ONE_MINUS_SRC_ALPHA)};l.prototype.hh=function(a,c,g,b,d,k,l,h){15992<=this.ud&&this.Ed();var r=this.ud,y=this.Dm,x=this.rm;if(this.Lb)this.yd[this.fd-1].Dc+=6;else{var n=this.Kc();n.type=1;n.tc=r/4*3;n.Dc=6;this.Lb=!0;this.Yb=!1}y[r]=a;x[r++]=
0;y[r]=c;x[r++]=0;y[r]=g;x[r++]=1;y[r]=b;x[r++]=0;y[r]=d;x[r++]=1;y[r]=k;x[r++]=1;y[r]=l;x[r++]=0;y[r]=h;x[r++]=1;this.ud=r};l.prototype.od=function(a,c,g,b,d,k,l,h,r){15992<=this.ud&&this.Ed();var y=this.ud,x=this.Dm,n=this.rm;if(this.Lb)this.yd[this.fd-1].Dc+=6;else{var m=this.Kc();m.type=1;m.tc=y/4*3;m.Dc=6;this.Lb=!0;this.Yb=!1}var m=r.left,v=r.top,f=r.right;r=r.bottom;x[y]=a;n[y++]=m;x[y]=c;n[y++]=v;x[y]=g;n[y++]=f;x[y]=b;n[y++]=v;x[y]=d;n[y++]=f;x[y]=k;n[y++]=r;x[y]=l;n[y++]=m;x[y]=h;n[y++]=
r;this.ud=y};l.prototype.Ot=function(a,c,g,b){7996<=this.Pf&&this.Ed();var d=this.Pf,k=this.Yo;if(this.Yb)this.yd[this.fd-1].Dc++;else{var l=this.Kc();l.type=8;l.tc=d;l.Dc=1;this.Yb=!0;this.Lb=!1}k[d++]=a;k[d++]=c;k[d++]=g;k[d++]=b;this.Pf=d};l.prototype.rd=function(a){if(this.Hg!==a){if(!this.ab[a]){if(0===this.Hg)return;a=0}var c=this.Kc();c.type=9;this.Hg=c.tc=a;this.Yb=this.Lb=!1}};l.prototype.eh=function(a){a=this.ab[a];return!(!a.Se&&!a.Re)};l.prototype.Rl=function(a){a=this.ab[a];return!!(a.Se||
a.Re||a.cn)};l.prototype.Ut=function(a){a=this.ab[a];return 0!==a.Bk||0!==a.Ck};l.prototype.Ds=function(a){return this.ab[a].Bk};l.prototype.Es=function(a){return this.ab[a].Ck};l.prototype.Fs=function(a,c){return this.ab[a].S[c][2]};l.prototype.ij=function(a){return this.ab[a].Tm};l.prototype.Rf=function(a,c,g,b,d,k,l,h,r,y,x,n,m,v){var f=this.ab[this.Hg],q,t;if(f.Zs||v.length){q=this.Kc();q.type=10;q.qa?Zb(this.Gc,q.qa):q.qa=Yb();t=q.qa;t[0]=c;t[1]=g;t[2]=b;t[3]=d;t[4]=k;t[5]=l;t[6]=h;t[7]=r;t[8]=
y;t[9]=x;t[10]=n;t[11]=m;q.bd=f.Sg?a:null;if(v.length)for(g=q.np,g.length=v.length,a=0,c=v.length;a<c;a++)g[a]=v[a];this.Yb=this.Lb=!1}};l.prototype.clear=function(a,c,g,b){var d=this.Kc();d.type=7;d.tc=0;d.qa||(d.qa=Yb());d.qa[0]=a;d.qa[1]=c;d.qa[2]=g;d.qa[3]=b;this.Yb=this.Lb=!1};l.prototype.clearRect=function(a,c,g,b){if(!(0>g||0>b)){var d=this.Kc();d.type=7;d.tc=1;d.qa||(d.qa=Yb());d.qa[0]=a;d.qa[1]=c;d.qa[2]=g;d.qa[3]=b;this.Yb=this.Lb=!1}};l.prototype.Tt=function(){this.Ed();this.u.flush()};
var d=[],k={};l.prototype.ir=function(){d.length=0;k={}};l.prototype.Gf=function(a,c,g,b){c=!!c;g=!!g;var p=a.src+","+c+","+g+(c?",undefined":""),l=null;if("undefined"!==typeof a.src&&k.hasOwnProperty(p))return l=k[p],l.Ih++,l;this.Ed();var h=this.u,z=fa(a.width)&&fa(a.height),l=h.createTexture();h.bindTexture(h.TEXTURE_2D,l);h.pixelStorei(h.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);var r=h.RGBA,y=h.RGBA,x=h.UNSIGNED_BYTE;if(b&&!this.Me)switch(b){case 1:y=r=h.RGB;break;case 2:x=h.UNSIGNED_SHORT_4_4_4_4;
break;case 3:x=h.UNSIGNED_SHORT_5_5_5_1;break;case 4:y=r=h.RGB,x=h.UNSIGNED_SHORT_5_6_5}if(!z&&c){b=document.createElement("canvas");b.width=ha(a.width);b.height=ha(a.height);var n=b.getContext("2d");n.webkitImageSmoothingEnabled=g;n.mozImageSmoothingEnabled=g;n.msImageSmoothingEnabled=g;n.imageSmoothingEnabled=g;n.drawImage(a,0,0,a.width,a.height,0,0,b.width,b.height);h.texImage2D(h.TEXTURE_2D,0,r,y,x,b)}else h.texImage2D(h.TEXTURE_2D,0,r,y,x,a);c?(h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_S,h.REPEAT),
h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_T,h.REPEAT)):(h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_S,h.CLAMP_TO_EDGE),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_T,h.CLAMP_TO_EDGE));g?(h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MAG_FILTER,h.LINEAR),z&&this.hn?(h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MIN_FILTER,h.LINEAR_MIPMAP_LINEAR),h.generateMipmap(h.TEXTURE_2D)):h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MIN_FILTER,h.LINEAR)):(h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MAG_FILTER,h.NEAREST),h.texParameteri(h.TEXTURE_2D,
h.TEXTURE_MIN_FILTER,h.NEAREST));h.bindTexture(h.TEXTURE_2D,null);this.de=null;l.gg=a.width;l.fg=a.height;l.Ih=1;l.Ym=p;d.push(l);return k[p]=l};l.prototype.Ad=function(a,c,g,b){this.Ed();var p=this.u;this.Me&&(b=!1);var h=p.createTexture();p.bindTexture(p.TEXTURE_2D,h);p.texImage2D(p.TEXTURE_2D,0,p.RGBA,a,c,0,p.RGBA,b?p.UNSIGNED_SHORT_4_4_4_4:p.UNSIGNED_BYTE,null);p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,p.CLAMP_TO_EDGE);p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,p.CLAMP_TO_EDGE);p.texParameteri(p.TEXTURE_2D,
p.TEXTURE_MAG_FILTER,g?p.LINEAR:p.NEAREST);p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,g?p.LINEAR:p.NEAREST);p.bindTexture(p.TEXTURE_2D,null);this.de=null;h.gg=a;h.fg=c;d.push(h);return h};l.prototype.Cu=function(a,c,b){this.Ed();var e=this.u;this.Me&&(b=!1);e.bindTexture(e.TEXTURE_2D,c);e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);try{e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,b?e.UNSIGNED_SHORT_4_4_4_4:e.UNSIGNED_BYTE,a)}catch(d){console&&console.error&&console.error("Error updating WebGL texture: ",
d)}e.bindTexture(e.TEXTURE_2D,null);this.de=null};l.prototype.deleteTexture=function(a){a&&("undefined"!==typeof a.Ih&&1<a.Ih?a.Ih--:(this.Ed(),a===this.de&&(this.u.bindTexture(this.u.TEXTURE_2D,null),this.de=null),a===this.Pe&&(this.u.activeTexture(this.u.TEXTURE1),this.u.bindTexture(this.u.TEXTURE_2D,null),this.u.activeTexture(this.u.TEXTURE0),this.Pe=null),wa(d,a),"undefined"!==typeof a.Ym&&delete k[a.Ym],this.u.deleteTexture(a)))};l.prototype.qd=function(a){if(a!==this.gp){var c=this.Kc();c.type=
6;this.gp=c.bd=a;this.Yb=this.Lb=!1}};db=l})();
(function(){function l(){return"undefined"!==typeof jQuery?jQuery(window).width():window.innerWidth}function h(){return"undefined"!==typeof jQuery?jQuery(window).height():window.innerHeight}function b(f){if(f&&(f.getContext||f.dc)&&!f.c2runtime){f.c2runtime=this;var a=this;this.ae=(this.Dg=/crosswalk/i.test(navigator.userAgent)||/xwalk/i.test(navigator.userAgent)||!("undefined"===typeof window.c2isCrosswalk||!window.c2isCrosswalk))||"undefined"!==typeof window.device&&("undefined"!==typeof window.device.cordova||
"undefined"!==typeof window.device.phonegap)||"undefined"!==typeof window.c2isphonegap&&window.c2isphonegap;this.Ob=!!f.dc;this.Jn="undefined"!==typeof window.AppMobi||this.Ob;this.Sc=!!window.c2cocoonjs;this.Tc=!!window.c2ejecta;this.Sc&&(CocoonJS.App.onSuspended.addEventListener(function(){a.setSuspended(!0)}),CocoonJS.App.onActivated.addEventListener(function(){a.setSuspended(!1)}));this.Tc&&(document.addEventListener("pagehide",function(){a.setSuspended(!0)}),document.addEventListener("pageshow",
function(){a.setSuspended(!1)}),document.addEventListener("resize",function(){a.setSize(window.innerWidth,window.innerHeight)}));this.Ca=this.Ob||this.Sc||this.Tc;this.Me=/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent)||/iemobile/i.test(navigator.userAgent);this.Mn=/tizen/i.test(navigator.userAgent);this.ri=/android/i.test(navigator.userAgent)&&!this.Mn&&!this.Me;this.kl=(/iphone/i.test(navigator.userAgent)||/ipod/i.test(navigator.userAgent))&&!this.Me;this.Qn=/ipad/i.test(navigator.userAgent);
this.yi=this.kl||this.Qn||this.Tc;this.qt=this.kl&&/os\s6/i.test(navigator.userAgent);this.Cg=/chrome/i.test(navigator.userAgent)||/chromium/i.test(navigator.userAgent);this.In=/amazonwebappplatform/i.test(navigator.userAgent);this.kt=/firefox/i.test(navigator.userAgent);this.Ln=/safari/i.test(navigator.userAgent)&&!this.Cg&&!this.Me;this.nt=/windows/i.test(navigator.userAgent);this.$d="undefined"!==typeof window.c2nodewebkit||/nodewebkit/i.test(navigator.userAgent);this.ot=!("undefined"===typeof window.c2isWindows8||
!window.c2isWindows8);this.pt=!("undefined"===typeof window.c2isWindows8Capable||!window.c2isWindows8Capable);this.ti=!("undefined"===typeof window.c2isWindowsPhone8||!window.c2isWindowsPhone8);this.On=!("undefined"===typeof window.c2isWindowsPhone81||!window.c2isWindowsPhone81);this.Nn=this.ot||this.pt||this.On;this.it=!("undefined"===typeof window.c2isBlackberry10||!window.c2isBlackberry10);this.si=this.ri&&!this.Cg&&!this.Dg&&!this.kt&&!this.In&&!this.Ca;this.devicePixelRatio=1;this.kd=this.ae||
this.Dg||this.Jn||this.Sc||this.ri||this.yi||this.ti||this.On||this.it||this.Mn||this.Tc;this.kd||(this.kd=/(blackberry|bb10|playbook|palm|symbian|nokia|windows\s+ce|phone|mobile|tablet|kindle|silk)/i.test(navigator.userAgent));"undefined"===typeof cr_is_preview||this.$d||"?nw"!==window.location.search&&!/nodewebkit/i.test(navigator.userAgent)||(this.$d=!0);this.jt="undefined"!==typeof cr_is_preview&&-1<window.location.search.indexOf("debug");this.canvas=f;this.Lh=document.getElementById("c2canvasdiv");
this.ua=this.A=this.u=null;this.Gk="";this.ci=!1;this.Ko=this.Lo=0;this.canvas.oncontextmenu=function(f){f.preventDefault&&f.preventDefault();return!1};this.canvas.onselectstart=function(f){f.preventDefault&&f.preventDefault();return!1};this.Ob&&(window.c2runtime=this);this.$d&&(window.ondragover=function(f){f.preventDefault();return!1},window.ondrop=function(f){f.preventDefault();return!1},require("nw.gui").App.clearCache());this.si&&"undefined"!==typeof jQuery&&jQuery("canvas").parents("*").css("overflow",
"visible");this.width=f.width;this.height=f.height;this.V=this.width;this.U=this.height;this.Qh=this.width;this.Ph=this.height;this.Ff=window.innerWidth;this.Ef=window.innerHeight;this.os=!1;this.fa=!0;this.Eg=!1;Date.now||(Date.now=function(){return+new Date});this.plugins=[];this.types={};this.B=[];this.Ra=[];this.tl={};this.Vc=[];this.Ak={};this.Fd=[];this.bg=[];this.Oj=[];this.Sq=[];this.Tq=[];this.tp=null;this.Ae={};this.gl=this.Zd=!1;this.pc=0;this.il=!1;this.Rc=[];this.Jd=this.Gb=this.Li=this.cm=
"";this.oh=this.rp=!1;this.pk=this.Vg=this.Dd=this.Ce=0;this.ef=1;this.$b=new Va;this.vd=new Va;this.Di=0;this.yo=!0;this.Vi=this.fi=this.qf=this.Nc=this.Ig=this.Fk=0;this.nk=null;this.wk=[];this.zk=[];this.Yh=-1;this.Al=[[]];this.wm=this.Qi=0;this.kj(null);this.pg=this.Eo=this.Zg=0;this.ph=[];this.Kj=this.lj=-1;this.Ai=!0;this.Oi=0;this.xf=!1;this.qu=0;this.mf=null;this.Xs=!1;this.nl=0;this.Zb=this.Uk=this.Tl=!1;this.Io=new ba;this.Hl=new ba;this.Jo=new ba;this.nj=[];this.$c=new Xa([]);this.qm=new Xa([]);
this.lf=[];this.li={};this.of={};this.kf={};this.ag={};this.Vm={};this.co=this.Ji=this.ac=this.qc=this.bo=this.Ii=this.Da=null;this.Zf=this.jl=!1;this.Hk=[null,null];this.Fe=0;this.bi="";this.ie={};this.Aj=this.Hf=null;this.Ui=[];this.Zt()}}function d(f){f.target.result.createObjectStore("saves",{keyPath:"slot"})}function k(f,a,c,b){var g=indexedDB.open("_C2SaveStates");g.onupgradeneeded=d;g.onerror=b;g.onsuccess=function(g){g=g.target.result;g.onerror=b;g.transaction(["saves"],"readwrite").objectStore("saves").put({slot:f,
data:a}).onsuccess=c}}function a(f,a,c){var b=indexedDB.open("_C2SaveStates");b.onupgradeneeded=d;b.onerror=c;b.onsuccess=function(b){b=b.target.result;b.onerror=c;var g=b.transaction(["saves"]).objectStore("saves").get(f);g.onsuccess=function(){g.result?a(g.result.data):a(null)}}}function c(){M("Reloading for continuous preview");window.c2cocoonjs?CocoonJS.App.reload():-1<window.location.search.indexOf("continuous")?window.location.reload(!0):window.location+="?continuous"}function g(f){var a,c=
{};for(a in f)!f.hasOwnProperty(a)||f[a]instanceof ba||f[a]&&"undefined"!==typeof f[a].Dv||(c[a]=f[a]);return c}b.prototype.Zt=function(){var f=this,a;a=this.ti?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest;a.open("GET","data.js",!0);var c=!1;if(!this.Ca&&"response"in a&&"responseType"in a)try{a.responseType="json",c="json"===a.responseType}catch(b){c=!1}if(!c&&"responseType"in a)try{a.responseType="text"}catch(g){}if("overrideMimeType"in a)try{a.overrideMimeType("application/json; charset=utf-8")}catch(e){}a.onload=
function(){if(c)f.wl(a.response);else if(f.Tc){var b=a.responseText,b=b.substr(b.indexOf("{"));f.wl(JSON.parse(b))}else f.wl(JSON.parse(a.responseText))};a.onerror=function(f){ca("Error requesting data.js:");ca(f)};a.send()};b.prototype.dt=function(){var f=this,a,c,b,g,e,d,m,n,p;this.devicePixelRatio=(this.Ne=(!this.Ca||this.Tc)&&this.Au&&!this.si)?window.devicePixelRatio||window.webkitDevicePixelRatio||window.mozDevicePixelRatio||window.msDevicePixelRatio||1:1;this.qb();c=!(!this.os&&(!this.dk||
this.$d||this.Nn||this.ti||this.Dg||this.ae||this.In));0<this.Jb&&this.setSize(l(),h(),!0);try{this.Lr&&(this.Sc||this.Tc||!this.Ca)&&(a={alpha:c,depth:!1,antialias:!1,failIfMajorPerformanceCaveat:!0},this.u=this.canvas.getContext("webgl",a)||this.canvas.getContext("experimental-webgl",a))}catch(v){}if(this.u){this.Ca||(this.nb=document.createElement("canvas"),jQuery(this.nb).appendTo(this.canvas.parentNode),this.nb.oncontextmenu=function(){return!1},this.nb.onselectstart=function(){return!1},this.nb.width=
this.Qh,this.nb.height=this.Ph,jQuery(this.nb).css({width:this.Qh+"px",height:this.Ph+"px"}),this.Zo(),this.Nl=this.nb.getContext("2d"));this.A=new db(this.u,this.kd);this.A.Sf(this.canvas.width,this.canvas.height);this.A.hn=0!==this.Jr;this.ua=null;this.canvas.addEventListener("webglcontextlost",function(a){a.preventDefault();f.Bt();M("[Construct 2] WebGL context lost");window.cr_setSuspended(!0)},!1);this.canvas.addEventListener("webglcontextrestored",function(){f.A.Dn();f.A.Sf(f.A.width,f.A.height,
!0);f.qc=null;f.ac=null;f.Hk[0]=null;f.Hk[1]=null;f.Ct();f.fa=!0;M("[Construct 2] WebGL context restored");window.cr_setSuspended(!1)},!1);a=0;for(c=this.B.length;a<c;a++)for(e=this.B[a],b=0,g=e.M.length;b<g;b++)m=e.M[b],m.pb=this.A.Qk(m.id),this.Zf=this.Zf||this.A.eh(m.pb);a=0;for(c=this.Vc.length;a<c;a++){n=this.Vc[a];b=0;for(g=n.M.length;b<g;b++)m=n.M[b],m.pb=this.A.Qk(m.id);b=0;for(g=n.W.length;b<g;b++)for(p=n.W[b],e=0,d=p.M.length;e<d;e++)m=p.M[e],m.pb=this.A.Qk(m.id),this.Zf=this.Zf||this.A.eh(m.pb)}}else{if(0<
this.Jb&&this.Ob){this.canvas=null;document.oncontextmenu=function(){return!1};document.onselectstart=function(){return!1};this.ua=AppMobi.canvas.getContext("2d");try{this.ua.samplingMode=this.ca?"smooth":"sharp",this.ua.globalScale=1,this.ua.HTML5CompatibilityMode=!0,this.ua.imageSmoothingEnabled=this.ca}catch(k){}0!==this.width&&0!==this.height&&(this.ua.width=this.width,this.ua.height=this.height)}this.ua||(a=this.Sc?{antialias:!!this.ca,alpha:c}:{alpha:c},this.ua=this.canvas.getContext("2d",a),
this.ua.webkitImageSmoothingEnabled=this.ca,this.ua.mozImageSmoothingEnabled=this.ca,this.ua.msImageSmoothingEnabled=this.ca,this.ua.imageSmoothingEnabled=this.ca);this.Nl=this.nb=null}this.Jj=function(){f.Aa(!1)};window==window.top||this.Ca||this.Nn||this.ti||(document.addEventListener("mousedown",function(){window.focus()},!0),document.addEventListener("touchstart",function(){window.focus()},!0));"undefined"!==typeof cr_is_preview&&(this.Sc&&console.log("[Construct 2] In preview-over-wifi via CocoonJS mode"),
-1<window.location.search.indexOf("continuous")&&(M("Reloading for continuous preview"),this.Li="__c2_continuouspreview",this.oh=!0),this.Mt&&!this.kd&&(jQuery(window).focus(function(){f.setSuspended(!1)}),jQuery(window).blur(function(){f.setSuspended(!0)})));this.Ca||(a=function(f){cb(f)&&document.activeElement&&document.activeElement!==document.getElementsByTagName("body")[0]&&document.activeElement.blur&&document.activeElement.blur()},window.navigator.pointerEnabled?document.addEventListener("pointerdown",
a):window.navigator.msPointerEnabled?document.addEventListener("MSPointerDown",a):document.addEventListener("touchstart",a),document.addEventListener("mousedown",a));0===this.Jb&&this.Ne&&1<this.devicePixelRatio&&this.setSize(this.jb,this.ib,!0);this.Dp();this.Us();this.go();this.P={}};b.prototype.setSize=function(f,a,c){var b=0,g=0,e=0,d=0,d=0,m=this.qt&&this.Ln&&!navigator.standalone&&!this.Ca&&!this.ae;m&&(a+=60);if(this.Ff!==f||this.Ef!==a||c){this.Ff=f;this.Ef=a;var n=this.Jb,p=(document.mozFullScreen||
document.webkitIsFullScreen||!!document.msFullscreenElement||document.fullScreen||this.xf)&&!this.ae;if(p||0!==this.Jb||c)p&&0<this.Fe&&(n=this.Fe),c=this.devicePixelRatio,4<=n?(e=this.jb/this.ib,f/a>e?(e*=a,5===n?(d=e*c/this.jb,1<d?d=Math.floor(d):1>d&&(d=1/Math.ceil(1/d)),e=this.jb*d/c,d=this.ib*d/c,b=(f-e)/2,g=(a-d)/2,f=e,a=d):(b=(f-e)/2,f=e)):(d=f/e,5===n?(d=d*c/this.ib,1<d?d=Math.floor(d):1>d&&(d=1/Math.ceil(1/d)),e=this.jb*d/c,d=this.ib*d/c,b=(f-e)/2,g=(a-d)/2,f=e):g=(a-d)/2,a=d),p&&!this.$d&&
(g=b=0)):this.$d&&this.xf&&0===this.pn&&(b=Math.floor((f-this.jb)/2),g=Math.floor((a-this.ib)/2),f=this.jb,a=this.ib),2>n&&(this.eg=c),this.Ne&&this.Qn&&1<c&&(1024<=f&&(f=1023),1024<=a&&(a=1023)),this.Qh=Math.round(f),this.Ph=Math.round(a),this.width=Math.round(f*c),this.height=Math.round(a*c),this.fa=!0,this.Gm?(this.V=this.width,this.U=this.height,this.Ac=!0):this.width<this.jb&&this.height<this.ib||1===n?(this.V=this.width,this.U=this.height,this.Ac=!0):(this.V=this.jb,this.U=this.ib,this.Ac=!1,
2===n?(e=this.jb/this.ib,n=this.Ff/this.Ef,n<e?this.V=this.U*n:n>e&&(this.U=this.V/n)):3===n&&(e=this.jb/this.ib,n=this.Ff/this.Ef,n>e?this.V=this.U*n:n<e&&(this.U=this.V/n))),this.Lh&&!this.Ca&&(jQuery(this.Lh).css({width:Math.round(f)+"px",height:Math.round(a)+"px","margin-left":Math.floor(b)+"px","margin-top":Math.floor(g)+"px"}),"undefined"!==typeof cr_is_preview&&jQuery("#borderwrap").css({width:Math.round(f)+"px",height:Math.round(a)+"px"})),this.canvas&&(this.canvas.width=Math.round(f*c),this.canvas.height=
Math.round(a*c),this.Tc?(this.canvas.style.left=Math.floor(b)+"px",this.canvas.style.top=Math.floor(g)+"px",this.canvas.style.width=Math.round(f)+"px",this.canvas.style.height=Math.round(a)+"px"):this.Ne&&!this.Ca&&jQuery(this.canvas).css({width:Math.round(f)+"px",height:Math.round(a)+"px"})),this.nb&&(this.nb.width=Math.round(f),this.nb.height=Math.round(a),jQuery(this.nb).css({width:Math.round(f)+"px",height:Math.round(a)+"px"})),this.A&&this.A.Sf(Math.round(f*c),Math.round(a*c)),this.Ob&&this.ua&&
(this.ua.width=Math.round(f),this.ua.height=Math.round(a)),this.ua&&(this.ua.webkitImageSmoothingEnabled=this.ca,this.ua.mozImageSmoothingEnabled=this.ca,this.ua.msImageSmoothingEnabled=this.ca,this.ua.imageSmoothingEnabled=this.ca),this.Dp(),this.Ca||!m&&!this.kl||window.setTimeout(function(){window.scrollTo(0,1)},100)}};b.prototype.Dp=function(){if(this.Vq&&0!==this.Ll){var f="portrait";2===this.Ll&&(f="landscape");screen.orientation&&screen.orientation.lock?screen.orientation.lock(f):screen.lockOrientation?
screen.lockOrientation(f):screen.webkitLockOrientation?screen.webkitLockOrientation(f):screen.mozLockOrientation?screen.mozLockOrientation(f):screen.msLockOrientation&&screen.msLockOrientation(f)}};b.prototype.Bt=function(){this.A.ir();this.jl=!0;var f,a,c;f=0;for(a=this.B.length;f<a;f++)c=this.B[f],c.ah&&c.ah()};b.prototype.Ct=function(){this.jl=!1;var f,a,c;f=0;for(a=this.B.length;f<a;f++)c=this.B[f],c.Xi&&c.Xi()};b.prototype.Zo=function(){if(!this.Ca){var f=(document.mozFullScreen||document.webkitIsFullScreen||
document.fullScreen||document.msFullscreenElement||this.xf)&&!this.ae?jQuery(this.canvas).offset():jQuery(this.canvas).position();f.position="absolute";jQuery(this.nb).css(f)}};var e=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||window.oCancelAnimationFrame;b.prototype.setSuspended=function(f){var a;if(f&&!this.Eg)for(M("[Construct 2] Suspending"),this.Eg=!0,-1!==this.lj&&e&&e(this.lj),-1!==this.Kj&&clearTimeout(this.Kj),
f=0,a=this.ph.length;f<a;f++)this.ph[f](!0);else if(!f&&this.Eg){M("[Construct 2] Resuming");this.Eg=!1;this.Di=Ra();this.Ig=Ra();f=this.Vg=this.fi=0;for(a=this.ph.length;f<a;f++)this.ph[f](!1);this.Aa(!1)}};b.prototype.Qq=function(f){this.ph.push(f)};b.prototype.Qd=function(f){return this.Ui[f]};b.prototype.wl=function(f){f&&f.project||ca("Project model unavailable");f=f.project;this.name=f[0];this.on=f[1];this.Jb=f[12];this.pn=f[12];this.jb=f[10];this.ib=f[11];this.To=this.jb/2;this.Uo=this.ib/
2;this.Ca&&!this.Tc&&(4<=f[12]||0===f[12])&&(M("[Construct 2] Letterbox scale fullscreen modes are not supported on this platform - falling back to 'Scale outer'"),this.pn=this.Jb=3);this.Bm=f[18];this.Pg=f[19];0===this.Pg&&(this.Hf=new Image,this.Hf.src="loading-logo.png");this.Zg=f[21];this.Ui=cc();this.sd=new V(this);var a,c,b,g,e,d,m,n,p;a=0;for(c=f[2].length;a<c;a++)m=f[2][a],b=this.Qd(m[0]),eb(m,b.prototype),p=new b(this),p.yj=m[1],p.be=m[2],p.Co=m[9],p.R&&p.R(),this.plugins.push(p);this.Ui=
cc();a=0;for(c=f[3].length;a<c;a++){m=f[3][a];e=this.Qd(m[1]);p=null;b=0;for(g=this.plugins.length;b<g;b++)if(this.plugins[b]instanceof e){p=this.plugins[b];break}var h=new p.ta(p);h.name=m[0];h.G=m[2];h.el=m[3].slice(0);h.Bu=m[3].length;h.Wq=m[4];h.rs=m[5];h.aa=m[11];h.G?(h.Kf=[],h.Gd=this.pg++,h.Fa=null):(h.Kf=null,h.Gd=-1,h.Fa=[]);h.$h=null;h.sf=null;h.kn=null;h.Pb=!1;h.Vb=null;m[6]?(h.Fj=m[6][0],h.Gj=m[6][1],h.rh=m[6][2]):(h.Fj=null,h.Gj=0,h.rh=0);h.Tb=m[7]?m[7]:null;h.index=a;h.d=[];h.Uh=[];
h.qe=[new fb(h)];h.Cd=0;h.yc=null;h.pr=0;h.Xf=!0;h.Qj=gb;h.un=hb;h.Bs=ib;h.da=jb;h.gh=nb;h.jj=ob;h.Ze=pb;h.gi=qb;h.Jk=rb;h.Nk=sb;h.Qc=tb;h.vn=ub;h.Nh=new Ya(this.jb,this.ib);h.Bh=!0;h.Ch=!1;h.P={};h.toString=vb;h.Ra=[];b=0;for(g=m[8].length;b<g;b++){n=m[8][b];var l=this.Qd(n[1]),v=null;e=0;for(d=this.Ra.length;e<d;e++)if(this.Ra[e]instanceof l){v=this.Ra[e];break}v||(v=new l(this),v.Gl=[],v.Si=new ba,v.R&&v.R(),this.Ra.push(v),Vb.pu&&v instanceof Vb.pu&&(this.tp=v));-1===v.Gl.indexOf(h)&&v.Gl.push(h);
e=new v.ta(v,h);e.name=n[0];e.aa=n[2];e.R();h.Ra.push(e)}h.global=m[9];h.hl=m[10];h.M=[];b=0;for(g=m[12].length;b<g;b++)h.M.push({id:m[12][b][0],name:m[12][b][1],pb:-1,fb:!0,index:b});h.Pv=m[13];this.Bm&&!h.G&&!h.hl&&p.be||h.R();h.name&&(this.types[h.name]=h);this.B.push(h);p.yj&&(b=new p.ga(h),b.uid=this.Zg++,b.cp=this.Eo++,b.Je=0,b.wg=wb,b.toString=xb,b.C=m[14],b.R(),h.d.push(b),this.ie[b.uid.toString()]=b)}a=0;for(c=f[4].length;a<c;a++)for(e=f[4][a],d=this.B[e[0]],b=1,g=e.length;b<g;b++)m=this.B[e[b]],
m.Fa.push(d),d.Kf.push(m);a=0;for(c=f[27].length;a<c;a++){e=f[27][a];d=[];b=0;for(g=e.length;b<g;b++)d.push(this.B[e[b]]);b=0;for(g=d.length;b<g;b++)d[b].Pb=!0,d[b].Vb=d}if(0<this.pg)for(a=0,c=this.B.length;a<c;a++)if(m=this.B[a],!m.G&&m.Fa.length){m.$h=Array(this.pg);m.sf=Array(this.pg);m.kn=Array(this.pg);h=[];b=v=l=n=0;for(g=m.Fa.length;b<g;b++)for(p=m.Fa[b],m.$h[p.Gd]=n,n+=p.Bu,m.sf[p.Gd]=l,l+=p.Wq,m.kn[p.Gd]=v,v+=p.rs,e=0,d=p.M.length;e<d;e++)h.push(ra({},p.M[e]));m.M=h.concat(m.M);b=0;for(g=
m.M.length;b<g;b++)m.M[b].index=b}a=0;for(c=f[5].length;a<c;a++)m=f[5][a],b=new yb(this,m),this.tl[b.name]=b,this.Vc.push(b);a=0;for(c=f[6].length;a<c;a++)m=f[6][a],b=new zb(this,m),this.Ak[b.name]=b,this.Fd.push(b);a=0;for(c=this.Fd.length;a<c;a++)this.Fd[a].Oa();a=0;for(c=this.Fd.length;a<c;a++)this.Fd[a].Kp();a=0;for(c=this.Oj.length;a<c;a++)this.Oj[a].Oa();this.Oj.length=0;this.Uq=f[7];this.bi=f[8];this.Jc=f[9];this.eg=1;this.Lr=f[13];this.ca=f[14];this.dk=f[15];this.Au=f[17];this.Ll=f[20];this.Vq=
0<this.Ll;this.Mt=f[22];this.Ac=this.Gm=f[23];this.Jr=f[24];this.St=f[25];this.Dj=Date.now();this.Ui.length=0;this.dt()};var p=!1;b.prototype.Fm=function(f,a){f.cocoonLazyLoad=!0;f.onerror=function(a){p=f.Xm=!0;console&&console.error&&console.error("Error loading image '"+f.src+"': ",a)};this.Tc?f.src=a:f.src||("undefined"!==typeof XAPKReader?XAPKReader.get(a,function(a){f.src=a},function(c){p=f.Xm=!0;console&&console.error&&console.error("Error extracting image '"+a+"' from expansion file: ",c)}):
f.src=a);this.bg.push(f)};b.prototype.ns=function(f){var a,c;a=0;for(c=this.bg.length;a<c;a++)if(this.bg[a].kr===f)return this.bg[a];return null};var u=0,s=!1;b.prototype.Us=function(){this.mf&&(u=this.mf.lu(this.Uq))};b.prototype.Um=function(){var f=u,a=0,c=0,b=!0,g,e,c=0;for(g=this.bg.length;c<g;c++){e=this.bg[c];var d=e.qk;if(!d||0>=d)d=5E4;f+=d;e.src&&(e.complete||e.loaded)&&!e.Xm?a+=d:b=!1}b&&this.St&&this.mf&&(s||(this.mf.ru(),s=!0),c=this.mf.Cs(),a+=c,c<u&&(b=!1));this.$e=0==f?0:a/f;return b};
b.prototype.go=function(){if(this.ua||this.A){var f=this.ua||this.Nl;this.nb&&this.Zo();this.$e=0;this.ao=-1;if(this.Um())this.Vs();else{var a=Date.now()-this.Dj;if(f){var c=this.width,b=this.height,g=this.devicePixelRatio;this.nb&&(c=this.Qh,b=this.Ph,g=1);if(3!==this.Pg&&(this.Sc||500<=a&&this.ao!=this.$e)){f.clearRect(0,0,c,b);var a=c/2,b=b/2,c=0===this.Pg&&this.Hf.complete,e=40*g,d=0,m=80*g,n;c&&(m=this.Hf.width*g,n=this.Hf.height*g,e=m/2,d=n/2,f.drawImage(this.Hf,Q(a-e),Q(b-d),m,n));1>=this.Pg?
(a=Q(a-e)+.5,b=Q(b+(d+(c?12*g:0)))+.5,f.fillStyle=p?"red":"DodgerBlue",f.fillRect(a,b,Math.floor(m*this.$e),6*g),f.strokeStyle="black",f.strokeRect(a,b,m,6*g),f.strokeStyle="white",f.strokeRect(a-1*g,b-1*g,m+2*g,8*g)):2===this.Pg&&(f.font=this.Tc?"12pt ArialMT":"12pt Arial",f.fillStyle=p?"#f00":"#999",f.Ov="middle",g=Math.round(100*this.$e)+"%",c=f.measureText?f.measureText(g):null,f.fillText(g,a-(c?c.width:0)/2,b))}this.ao=this.$e}setTimeout(function(f){return function(){f.go()}}(this),this.Sc?10:
100)}}};b.prototype.Vs=function(){this.nb&&(this.canvas.parentNode.removeChild(this.nb),this.nb=this.Nl=null);this.Dj=Date.now();this.Ig=Ra();var f,a,c;if(this.Bm)for(f=0,a=this.B.length;f<a;f++)c=this.B[f],c.G||c.hl||!c.xa.be||c.R();else this.Ai=!1;f=0;for(a=this.Vc.length;f<a;f++)this.Vc[f].lr();2<=this.Jb&&(f=this.jb/this.ib,a=this.width/this.height,this.eg=2!==this.Jb&&a>f||2===this.Jb&&a<f?this.height/this.ib:this.width/this.jb);this.on?this.tl[this.on].pm():this.Vc[0].pm();this.Bm||(this.Oi=
1,this.trigger(V.prototype.n.Lm,null));navigator.splashscreen&&navigator.splashscreen.hide&&navigator.splashscreen.hide();f=0;for(a=this.B.length;f<a;f++)c=this.B[f],c.At&&c.At();this.Aa(!1);this.Ob&&AppMobi.webview.execute("onGameReady();")};var z=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame;b.prototype.Aa=function(f){if(this.Da){var a=Ra();if(this.Xs&&this.Tl&&29>a-this.nl)this.Tl=
!1,this.nl=a,z?this.lj=z(this.Jj,this.canvas):this.Kj=setTimeout(this.Jj,this.kd?1:16);else{this.Tl=!0;this.nl=a;var c=this.Jb,b=(document.mozFullScreen||document.webkitIsFullScreen||document.fullScreen||!!document.msFullscreenElement)&&!this.ae;(b||this.xf)&&0<this.Fe&&(c=this.Fe);0<c&&(!this.yi||window.self!==window.top)&&(c=window.innerHeight,this.Ff===window.innerWidth&&this.Ef===c||this.setSize(l(),h()));this.Ca||(b?(this.ci||(this.Gk=jQuery(this.canvas).css("margin")||"0",this.ci=!0),this.Cg||
this.$d||jQuery(this.canvas).css({"margin-left":""+Math.floor((screen.width-this.width/this.devicePixelRatio)/2)+"px","margin-top":""+Math.floor((screen.height-this.height/this.devicePixelRatio)/2)+"px"})):this.ci?(this.Cg||this.$d||jQuery(this.canvas).css("margin",this.Gk),this.Gk="",this.ci=!1,0===this.Jb&&this.setSize(Math.round(this.Lo/this.devicePixelRatio),Math.round(this.Ko/this.devicePixelRatio),!0)):(this.Lo=this.width,this.Ko=this.height));this.Ai&&(b=this.Um(),this.Oi=this.$e,b&&(this.Ai=
!1,this.$e=1,this.trigger(V.prototype.n.Lm,null)));this.xt();!this.fa&&!this.Sc||this.jl||this.oh||f||(this.fa=!1,this.A?this.Cb():this.Xb(),this.Aj&&(this.canvas&&this.canvas.toDataURL&&(this.canvas.toDataURL(this.Aj[0],this.Aj[1]),this.trigger(V.prototype.n.mq,null)),this.Aj=null));this.Iv||(this.Nc++,this.qf++,this.fi++);this.Vg+=Ra()-a;this.Eg||f||(z?this.lj=z(this.Jj,this.canvas):this.Kj=setTimeout(this.Jj,this.kd?1:16))}}};b.prototype.xt=function(){var f,a,c,b,g,e,d,m,n;f=Ra();1E3<=f-this.Ig&&
(this.Ig+=1E3,this.Fk=this.fi,this.fi=0,this.pk=this.Vg,this.Vg=0);this.yo&&(0!==this.Di&&(a=f-this.Di,0!==a||this.jt?(this.Dd=a/1E3,.5<this.Dd?this.Dd=0:.1<this.Dd&&(this.Dd=.1)):(10<=this.Rv&&(this.yo=!1),this.Dd=1/60)),this.Di=f);this.Ce=this.Dd*this.ef;this.$b.add(this.Ce);this.vd.add(this.Dd);f=(document.mozFullScreen||document.webkitIsFullScreen||document.fullScreen||!!document.msFullscreenElement||this.xf)&&!this.ae;2<=this.Jb||f&&0<this.Fe?(a=this.jb/this.ib,c=this.width/this.height,b=this.Jb,
f&&0<this.Fe&&(b=this.Fe),this.eg=2!==b&&c>a||2===b&&c<a?this.height/this.ib:this.width/this.jb,this.Da&&(this.Da.em(this.Da.scrollX),this.Da.fm(this.Da.scrollY))):this.eg=this.Ne?this.devicePixelRatio:1;this.qb();this.pc++;this.sd.cu();this.pc--;this.qb();this.pc++;c=this.Io.Pd();f=0;for(a=c.length;f<a;f++)c[f].Kv();f=0;for(a=this.B.length;f<a;f++)if(d=this.B[f],!d.G&&(d.Ra.length||d.Fa.length))for(c=0,b=d.d.length;c<b;c++)for(m=d.d[c],g=0,e=m.O.length;g<e;g++)m.O[g].Aa();f=0;for(a=this.B.length;f<
a;f++)if(d=this.B[f],!d.G&&(d.Ra.length||d.Fa.length))for(c=0,b=d.d.length;c<b;c++)for(m=d.d[c],g=0,e=m.O.length;g<e;g++)n=m.O[g],n.Rt&&n.Rt();c=this.Hl.Pd();f=0;for(a=c.length;f<a;f++)c[f].Aa();this.pc--;this.Ys();for(f=0;this.nk&&10>f++;)this.gn(this.nk);f=0;for(a=this.Fd.length;f<a;f++)this.Fd[f].Xk=!1;this.Da.lg&&this.Da.lg.Wa();this.nj.length=0;this.pc++;f=0;for(a=this.B.length;f<a;f++)if(d=this.B[f],!d.G&&(d.Ra.length||d.Fa.length))for(c=0,b=d.d.length;c<b;c++)for(m=d.d[c],g=0,e=m.O.length;g<
e;g++)n=m.O[g],n.Ij&&n.Ij();c=this.Jo.Pd();f=0;for(a=c.length;f<a;f++)c[f].Ij();this.pc--};b.prototype.gn=function(f){var a=this.Da;this.Da.su();var c,b,g,e,d,m,n;if(this.A)for(c=0,b=this.B.length;c<b;c++)d=this.B[c],d.G||!d.Pj||d.global&&0!==d.d.length||-1!==f.Ag.indexOf(d)||d.Pj();a==f&&(this.sd.jc.length=0);f.pm();c=0;for(b=this.B.length;c<b;c++)if(d=this.B[c],d.global||d.xa.yj)for(f=0,a=d.d.length;f<a;f++)if(m=d.d[f],m.Kl&&m.Kl(),m.O)for(g=0,e=m.O.length;g<e;g++)n=m.O[g],n.Kl&&n.Kl();this.fa=
!0;this.qb()};b.prototype.sh=function(f){this.Hl.add(f)};b.prototype.tf=function(f){return f&&-1!==f.Yg?this.Dd*f.Yg:this.Ce};b.prototype.Xb=function(){this.Da.Xb(this.ua);this.Ob&&this.ua.present()};b.prototype.Cb=function(){this.Da.Cb(this.A);this.A.Tt()};b.prototype.Pm=function(f){f&&this.wk.push(f)};b.prototype.ii=function(f){f=f.toString();return this.ie.hasOwnProperty(f)?this.ie[f]:null};var r=[];b.prototype.dd=function(f){var a,c;a=f.type.name;var b=null;if(this.Ae.hasOwnProperty(a)){if(b=
this.Ae[a],b.contains(f))return}else b=r.length?r.pop():new ba,this.Ae[a]=b;b.add(f);this.Zd=!0;if(f.Pb)for(a=0,c=f.siblings.length;a<c;a++)this.dd(f.siblings[a]);this.gl&&b.$f.push(f);this.pc++;this.trigger(Object.getPrototypeOf(f.type.xa).n.pq,f);this.pc--};b.prototype.qb=function(){if(this.Zd){var f,a,c,b,g,d;this.gl=!0;c=0;for(g=this.Rc.length;c<g;++c)for(f=this.Rc[c],a=f.type,a.d.push(f),b=0,d=a.Fa.length;b<d;++b)a.Fa[b].d.push(f),a.Fa[b].Xf=!0;this.Rc.length=0;this.fq();Qa(this.Ae);this.Zd=
this.gl=!1}};b.prototype.fq=function(){for(var f in this.Ae)this.Ae.hasOwnProperty(f)&&this.Up(this.Ae[f])};b.prototype.Up=function(f){var a=f.Pd(),c=a[0].type,b,g,d,e,m,n;Ua(c.d,f);c.Xf=!0;0===c.d.length&&(c.Ch=!1);b=0;for(g=c.Fa.length;b<g;++b)n=c.Fa[b],Ua(n.d,f),n.Xf=!0;b=0;for(g=this.sd.jc.length;b<g;++b)if(m=this.sd.jc[b],m.hc.hasOwnProperty(c.index)&&Ua(m.hc[c.index].Le,f),!c.G)for(d=0,e=c.Fa.length;d<e;++d)n=c.Fa[d],m.hc.hasOwnProperty(n.index)&&Ua(m.hc[n.index].Le,f);(b=a[0].i)&&Ua(b.d,f);
for(b=0;b<a.length;++b)this.Tp(a[b],c);f.clear();r.push(f);this.fa=!0};b.prototype.Tp=function(f,a){var c,b,g;c=0;for(b=this.wk.length;c<b;++c)this.wk[c](f);f.Mh&&a.Nh.update(f,f.Mh,null);if(c=f.i)wa(c.d,f),c.kc=!0;if(f.O)for(c=0,b=f.O.length;c<b;++c)g=f.O[c],g.We&&g.We(),g.behavior.Si.remove(f);this.Io.remove(f);this.Hl.remove(f);this.Jo.remove(f);f.We&&f.We();this.ie.hasOwnProperty(f.uid.toString())&&delete this.ie[f.uid.toString()];this.Vi--;100>a.Uh.length&&a.Uh.push(f)};b.prototype.rk=function(f,
a,c,b){if(f.G){var g=Q(Math.random()*f.Kf.length);return this.rk(f.Kf[g],a,c,b)}return f.yc?this.Wd(f.yc,a,!1,c,b,!1):null};var y=[];b.prototype.Wd=function(f,a,c,b,g,d){var e,m,n,h;if(!f)return null;var p=this.B[f[1]],v=p.xa.be;if(this.Ai&&v&&!p.hl||v&&!this.A&&11===f[0][11])return null;var l=a;v||(a=null);var k;p.Uh.length?(k=p.Uh.pop(),k.fc=!0,p.xa.ga.call(k,p)):(k=new p.xa.ga(p),k.fc=!1);k.uid=c&&!d?f[2]:this.Zg++;this.ie[k.uid.toString()]=k;k.cp=this.Eo++;k.Je=p.d.length;e=0;for(m=this.Rc.length;e<
m;++e)this.Rc[e].type===p&&k.Je++;k.wg=wb;n=f[3];if(k.fc)Qa(k.P);else{k.P={};if("undefined"!==typeof cr_is_preview)for(k.Gn=[],k.Gn.length=n.length,e=0,m=n.length;e<m;e++)k.Gn[e]=n[e][1];k.Ya=[];k.Ya.length=n.length}e=0;for(m=n.length;e<m;e++)k.Ya[e]=n[e][0];if(v){var r=f[0];k.x=da(b)?r[0]:b;k.y=da(g)?r[1]:g;k.z=r[2];k.width=r[3];k.height=r[4];k.depth=r[5];k.k=r[6];k.opacity=r[7];k.Mb=r[8];k.Nb=r[9];k.Ib=r[10];e=r[11];!this.A&&p.M.length&&(k.Ib=e);k.hg=Za(k.Ib);this.u&&$a(k,k.Ib,this.u);if(k.fc){e=
0;for(m=r[12].length;e<m;e++)for(n=0,h=r[12][e].length;n<h;n++)k.Ja[e][n]=r[12][e][n];k.Ba.set(0,0,0,0);k.Mh.set(0,0,-1,-1);k.tb.Uf(k.Ba);k.hk.length=0}else{k.Ja=r[12].slice(0);e=0;for(m=k.Ja.length;e<m;e++)k.Ja[e]=r[12][e].slice(0);k.ja=[];k.Rd=[];k.Rd.length=p.M.length;k.Ba=new pa(0,0,0,0);k.Mh=new pa(0,0,-1,-1);k.tb=new qa;k.hk=[];k.N=Ab;k.Rq=Bb;k.Wb=Cb;k.Ea=Db;k.Am=Eb;k.Cc=Fb}k.uh=!1;k.wu=0;k.vu=0;k.uu=null;14===r.length&&(k.uh=!0,k.wu=r[13][0],k.vu=r[13][1],k.uu=r[13][2]);e=0;for(m=p.M.length;e<
m;e++)k.Rd[e]=!0;k.Od=Gb;k.Od();k.Op=!!k.ja.length;k.Hh=!0;k.kk=!0;p.Bh=!0;k.visible=!0;k.Yg=-1;k.i=a;k.ff=a.d.length;"undefined"===typeof k.la&&(k.la=null);this.fa=k.zd=!0}k.toString=xb;var u;e=y.length=0;for(m=p.Fa.length;e<m;e++)y.push.apply(y,p.Fa[e].Ra);y.push.apply(y,p.Ra);if(k.fc)for(e=0,m=y.length;e<m;e++){var s=y[e];u=k.O[e];u.fc=!0;s.behavior.ga.call(u,s,k);r=f[4][e];n=0;for(h=r.length;n<h;n++)u.C[n]=r[n];u.R();s.behavior.Si.add(k)}else for(k.O=[],e=0,m=y.length;e<m;e++)s=y[e],u=new s.behavior.ga(s,
k),u.fc=!1,u.C=f[4][e].slice(0),u.R(),k.O.push(u),s.behavior.Si.add(k);r=f[5];if(k.fc)for(e=0,m=r.length;e<m;e++)k.C[e]=r[e];else k.C=r.slice(0);this.Rc.push(k);this.Zd=!0;a&&(a.d.push(k),1!==a.Hc||1!==a.Ic)&&(p.Ch=!0);this.Vi++;if(p.Pb){if(k.Pb=!0,k.fc?k.siblings.length=0:k.siblings=[],!c&&!d){e=0;for(m=p.Vb.length;e<m;e++)if(p.Vb[e]!==p){if(!p.Vb[e].yc)return null;k.siblings.push(this.Wd(p.Vb[e].yc,l,!1,v?k.x:b,v?k.y:g,!0))}e=0;for(m=k.siblings.length;e<m;e++)for(k.siblings[e].siblings.push(k),
n=0;n<m;n++)e!==n&&k.siblings[e].siblings.push(k.siblings[n])}}else k.Pb=!1,k.siblings=null;k.R();e=0;for(m=k.O.length;e<m;e++)k.O[e].Qt&&k.O[e].Qt();return k};b.prototype.Ok=function(f){var a,c;a=0;for(c=this.Da.W.length;a<c;a++){var b=this.Da.W[a];if(bb(b.name,f))return b}return null};b.prototype.tg=function(a){a=Q(a);0>a&&(a=0);a>=this.Da.W.length&&(a=this.Da.W.length-1);return this.Da.W[a]};b.prototype.ok=function(a){var c,b;c=0;for(b=a.length;c<b;c++)a[c].da().ra=!0};b.prototype.gh=function(a){var c,
b;c=0;for(b=a.length;c<b;c++)a[c].gh()};b.prototype.jj=function(a){var c,b;c=0;for(b=a.length;c<b;c++)a[c].jj()};b.prototype.Ze=function(a){var c,b;c=0;for(b=a.length;c<b;c++)a[c].Ze()};b.prototype.Ip=function(a){if(a.Bh){var c,b,g=a.d;c=0;for(b=g.length;c<b;++c)g[c].Am();g=this.Rc;c=0;for(b=g.length;c<b;++c)g[c].type===a&&g[c].Am();a.Bh=!1}};b.prototype.rn=function(a,c,b,g){var e,d,m=a?1!==a.Hc||1!==a.Ic:!1;if(c.G)for(a=0,e=c.Kf.length;a<e;++a)d=c.Kf[a],m||d.Ch?ua(g,d.d):(this.Ip(d),d.Nh.ep(b,g));
else m||c.Ch?ua(g,c.d):(this.Ip(c),c.Nh.ep(b,g))};b.prototype.Hs=function(a,c,b,g){var e,d;e=0;for(d=c.length;e<d;++e)this.rn(a,c[e],b,g)};b.prototype.Gs=function(a,c,b){var g=this.tp;g&&this.Hs(a,g.Gl,c,b)};b.prototype.tu=function(a,c,b){var g=a.da(),e,d,m,n,k,p;if(g.ra)for(g.ra=!1,e=g.d.length=0,n=a.d.length;e<n;e++)m=a.d[e],m.Ea(),k=m.i.Ub(c,b,!0),p=m.i.Ub(c,b,!1),m.Wb(k,p)&&g.d.push(m);else{e=d=0;for(n=g.d.length;e<n;e++)m=g.d[e],m.Ea(),k=m.i.Ub(c,b,!0),p=m.i.Ub(c,b,!1),m.Wb(k,p)&&(g.d[d]=g.d[e],
d++);g.d.length=d}a.Qc();return g.Wk()};b.prototype.cf=function(a,c){if(!(a&&c&&a!==c&&a.zd&&c.zd))return!1;a.Ea();c.Ea();var b=a.i,g=c.i,e,d,m,n,k,p,h,v;if(b===g||b.Hc===g.Hc&&g.Ic===g.Ic&&b.scale===g.scale&&b.k===g.k&&b.cd===g.cd){if(!a.Ba.gt(c.Ba)||!a.tb.Hn(c.tb)||a.uh&&c.uh)return!1;if(a.uh)return this.wp(a,c);if(c.uh)return this.wp(c,a);h=a.la&&!a.la.zf();e=c.la&&!c.la.zf();if(!h&&!e)return!0;h?(a.la.nf(a.width,a.height,a.k),h=a.la):(this.$c.Tf(a.tb,a.x,a.y,a.width,a.height),h=this.$c);e?(c.la.nf(c.width,
c.height,c.k),v=c.la):(this.$c.Tf(c.tb,c.x,c.y,c.width,c.height),v=this.$c);return h.Bg(v,c.x-a.x,c.y-a.y)}h=a.la&&!a.la.zf();e=c.la&&!c.la.zf();h?(a.la.nf(a.width,a.height,a.k),this.$c.lp(a.la)):this.$c.Tf(a.tb,a.x,a.y,a.width,a.height);h=this.$c;e?(c.la.nf(c.width,c.height,c.k),this.qm.lp(c.la)):this.qm.Tf(c.tb,c.x,c.y,c.width,c.height);v=this.qm;e=0;for(d=h.Yc;e<d;e++)m=2*e,n=m+1,k=h.Za[m],p=h.Za[n],h.Za[m]=b.wa(k+a.x,p+a.y,!0),h.Za[n]=b.wa(k+a.x,p+a.y,!1);h.Ea();e=0;for(d=v.Yc;e<d;e++)m=2*e,n=
m+1,k=v.Za[m],p=v.Za[n],v.Za[m]=g.wa(k+c.x,p+c.y,!0),v.Za[n]=g.wa(k+c.x,p+c.y,!1);v.Ea();return h.Bg(v,0,0)};var x=new qa;new pa(0,0,0,0);var n=[];b.prototype.wp=function(a,c){var b,g,e,m,d=c.Ba,k=a.x,p=a.y;a.Fv(d,n);var h=c.la&&!c.la.zf();b=0;for(g=n.length;b<g;++b)if(e=n[b],m=e.Lv,d.ht(m,k,p)&&(x.Uf(m),x.offset(k,p),x.Hn(c.tb)))if(h)if(c.la.nf(c.width,c.height,c.k),e.Ql){if(e.Ql.Bg(c.la,c.x-(k+m.left),c.y-(p+m.top)))return n.length=0,!0}else{if(this.$c.Tf(x,0,0,m.right-m.left,m.bottom-m.top),this.$c.Bg(c.la,
c.x,c.y))return n.length=0,!0}else if(e.Ql){if(this.$c.Tf(c.tb,0,0,c.width,c.height),e.Ql.Bg(this.$c,-(k+m.left),-(p+m.top)))return n.length=0,!0}else return n.length=0,!0;n.length=0;return!1};b.prototype.Ep=function(a,c){if(!c)return!1;var b,g,e,m,d;b=0;for(g=a.Ra.length;b<g;b++)if(a.Ra[b].behavior instanceof c)return!0;if(!a.G)for(b=0,g=a.Fa.length;b<g;b++)for(d=a.Fa[b],e=0,m=d.Ra.length;e<m;e++)if(d.Ra[e].behavior instanceof c)return!0;return!1};b.prototype.Fp=function(a){return this.Ep(a,Vb.cv)};
b.prototype.xm=function(a){return this.Ep(a,Vb.dv)};var m=[];b.prototype.ad=function(a){var c,b,g;a.Ea();this.Gs(a.i,a.Ba,m);c=0;for(b=m.length;c<b;++c)if(g=m[c],g.P.solidEnabled&&this.cf(a,g))return m.length=0,g;m.length=0;return null};b.prototype.Xt=function(a,c,b,g){g=g||50;var e=a.x,m=a.y,d,n=null,k=null;for(d=0;d<g;d++)if(a.x=e+c*d,a.y=m+b*d,a.N(),!this.cf(a,n)&&((n=this.ad(a))&&(k=n),!n&&!n))return k&&this.Vt(a,c,b,k),!0;a.x=e;a.y=m;a.N();return!1};b.prototype.Vt=function(a,c,b,g){var e=2,m,
d=!1;m=!1;for(var n=a.x,k=a.y;16>=e;)m=1/e,e*=2,a.x+=c*m*(d?1:-1),a.y+=b*m*(d?1:-1),a.N(),this.cf(a,g)?m=d=!0:(m=d=!1,n=a.x,k=a.y);m&&(a.x=n,a.y=k,a.N())};b.prototype.dp=function(a,c){var b=da(c)?100:c,g=0,e=a.x,m=a.y,d=0,n=0,k=0,p=this.ad(a);if(!p)return!0;for(;g<=b;){switch(d){case 0:n=0;k=-1;g++;break;case 1:n=1;k=-1;break;case 2:n=1;k=0;break;case 3:k=n=1;break;case 4:n=0;k=1;break;case 5:n=-1;k=1;break;case 6:n=-1;k=0;break;case 7:k=n=-1}d=(d+1)%8;a.x=Q(e+n*g);a.y=Q(m+k*g);a.N();if(!this.cf(a,
p)&&(p=this.ad(a),!p))return!0}a.x=e;a.y=m;a.N();return!1};b.prototype.ih=function(a,c){a.zd&&c.zd&&this.nj.push([a,c])};b.prototype.fr=function(a,c){var b,g,e;b=0;for(g=this.nj.length;b<g;b++)if(e=this.nj[b],e[0]==a&&e[1]==c||e[0]==c&&e[1]==a)return!0;return!1};b.prototype.$q=function(a,c,b){var g=a.x,e=a.y,m=ja(10,Ja(c,b,g,e)),d=Ea(c,b,g,e),n=this.ad(a);if(!n)return za(d+ma);var k=n,p,h,v,l,r=T(5);for(p=1;36>p;p++)if(h=d-p*r,a.x=c+Math.cos(h)*m,a.y=b+Math.sin(h)*m,a.N(),!this.cf(a,k)&&(k=this.ad(a),
!k)){v=h;break}36===p&&(v=za(d+ma));k=n;for(p=1;36>p;p++)if(h=d+p*r,a.x=c+Math.cos(h)*m,a.y=b+Math.sin(h)*m,a.N(),!this.cf(a,k)&&(k=this.ad(a),!k)){l=h;break}36===p&&(l=za(d+ma));a.x=g;a.y=e;a.N();if(l===v)return l;a=Fa(l,v)/2;a=Ha(l,v)?za(v+a+ma):za(l+a);v=Math.cos(d);d=Math.sin(d);l=Math.cos(a);a=Math.sin(a);c=v*l+d*a;return Ea(0,0,v-2*c*l,d-2*c*a)};var v=-1;b.prototype.trigger=function(a,c,b){if(!this.Da)return!1;var g=this.Da.lg;if(!g)return!1;var e=!1,m,d,n;v++;var k=g.vk;d=0;for(n=k.length;d<
n;++d)m=this.Bp(a,c,k[d],b),e=e||m;m=this.Bp(a,c,g,b);v--;return e||m};b.prototype.Bp=function(a,c,b,g){var e=!1,m,d,n,k;if(c)for(n=this.vm(a,c,c.type.name,b,g),e=e||n,k=c.type.Fa,m=0,d=k.length;m<d;++m)n=this.vm(a,c,k[m].name,b,g),e=e||n;else n=this.vm(a,c,"system",b,g),e=e||n;return e};b.prototype.vm=function(a,c,b,g,e){var m,d=!1,n=!1,n="undefined"!==typeof e,k=(n?g.mn:g.Cp)[b];if(!k)return d;var p=null;g=0;for(m=k.length;g<m;++g)if(k[g].method==a){p=k[g].mg;break}if(!p)return d;a=n?p[e]:p;if(!a)return null;
g=0;for(m=a.length;g<m;g++)e=a[g][0],n=a[g][1],n=this.ls(c,b,e,n),d=d||n;return d};b.prototype.ls=function(a,c,b,g){var e,m,d=!1;this.wm++;var n=this.yb().nc;n&&this.gh(n.oe);var k=1<this.wm;this.gh(b.oe);k&&this.Wt();var p=this.kj(b);p.nc=b;a&&(e=this.types[c].da(),e.ra=!1,e.d.length=1,e.d[0]=a,this.types[c].Qc());a=!0;if(b.parent){c=p.vp;for(e=b.parent;e;)c.push(e),e=e.parent;c.reverse();e=0;for(m=c.length;e<m;e++)if(!c[e].eu()){a=!1;break}}a&&(this.qf++,b.Wc?b.du(g):b.Wa(),d=d||p.Qe);this.ej();
k&&this.Pt();this.Ze(b.oe);n&&this.Ze(n.oe);this.Zd&&0===this.pc&&0===v&&!this.il&&this.qb();this.wm--;return d};b.prototype.Lk=function(){var a=this.yb();return a.nc.gb[a.Xa]};b.prototype.ws=function(){var a=this.yb();return a.nc.uc[a.lc]};b.prototype.Wt=function(){this.Qi++;this.Qi>=this.Al.length&&this.Al.push([])};b.prototype.Pt=function(){this.Qi--};b.prototype.sn=function(){return this.Al[this.Qi]};b.prototype.kj=function(a){this.Yh++;this.Yh>=this.zk.length&&this.zk.push(new Hb);var c=this.yb();
c.reset(a);return c};b.prototype.ej=function(){this.Yh--};b.prototype.yb=function(){return this.zk[this.Yh]};b.prototype.tn=function(a,c){for(var b,g,e,m,d,n;c;){b=0;for(g=c.Mc.length;b<g;b++)if(n=c.Mc[b],n instanceof Ib&&bb(a,n.name))return n;c=c.parent}b=0;for(g=this.Fd.length;b<g;b++)for(d=this.Fd[b],e=0,m=d.Xd.length;e<m;e++)if(n=d.Xd[e],n instanceof Ib&&bb(a,n.name))return n;return null};b.prototype.wn=function(a){var c,b;c=0;for(b=this.Vc.length;c<b;c++)if(this.Vc[c].aa===a)return this.Vc[c];
return null};b.prototype.ji=function(a){var c,b;c=0;for(b=this.B.length;c<b;c++)if(this.B[c].aa===a)return this.B[c];return null};b.prototype.xs=function(a){var c,b;c=0;for(b=this.lf.length;c<b;c++)if(this.lf[c].aa===a)return this.lf[c];return null};b.prototype.Ys=function(){var f=this,b=this.cm,g=this.Jd,e=this.Li,m=!1;this.rp&&(m=!0,b="__c2_continuouspreview",this.rp=!1);if(b.length){this.qb();g=this.iu();if(window.indexedDB&&!this.Sc)k(b,g,function(){M("Saved state to IndexedDB storage ("+g.length+
" bytes)");f.Jd=g;f.trigger(V.prototype.n.$j,null);f.Jd="";m&&c()},function(a){try{localStorage.setItem("__c2save_"+b,g),M("Saved state to WebStorage ("+g.length+" bytes)"),f.Jd=g,f.trigger(V.prototype.n.$j,null),f.Jd="",m&&c()}catch(e){M("Failed to save game state: "+a+"; "+e)}});else try{localStorage.setItem("__c2save_"+b,g),M("Saved state to WebStorage ("+g.length+" bytes)"),f.Jd=g,this.trigger(V.prototype.n.$j,null),f.Jd="",m&&c()}catch(d){M("Error saving to WebStorage: "+d)}this.Gb=this.Li=this.cm=
""}e.length&&(window.indexedDB&&!this.Sc?a(e,function(a){a?(f.Gb=a,M("Loaded state from IndexedDB storage ("+f.Gb.length+" bytes)")):(f.Gb=localStorage.getItem("__c2save_"+e)||"",M("Loaded state from WebStorage ("+f.Gb.length+" bytes)"));f.oh=!1;f.Gb.length||f.trigger(V.prototype.n.Zj,null)},function(){f.Gb=localStorage.getItem("__c2save_"+e)||"";M("Loaded state from WebStorage ("+f.Gb.length+" bytes)");f.oh=!1;f.Gb.length||f.trigger(V.prototype.n.Zj,null)}):(this.Gb=localStorage.getItem("__c2save_"+
e)||"",M("Loaded state from WebStorage ("+this.Gb.length+" bytes)"),this.oh=!1,f.Gb.length||f.trigger(V.prototype.n.Zj,null)),this.cm=this.Li="");this.Gb.length&&(this.qb(),this.ut(this.Gb),this.Jd=this.Gb,this.trigger(V.prototype.n.wq,null),this.Gb=this.Jd="")};b.prototype.iu=function(){var a,c,b,e,m,d,n,k={c2save:!0,version:1,rt:{time:this.$b.Y,walltime:this.vd.Y,timescale:this.ef,tickcount:this.Nc,execcount:this.qf,next_uid:this.Zg,running_layout:this.Da.aa,start_time_offset:Date.now()-this.Dj},
types:{},layouts:{},events:{groups:{},cnds:{},acts:{},vars:{}}};a=0;for(c=this.B.length;a<c;a++)if(m=this.B[a],!m.G&&!this.Fp(m)){d={instances:[]};Pa(m.P)&&(d.ex=g(m.P));b=0;for(e=m.d.length;b<e;b++)d.instances.push(this.am(m.d[b]));k.types[m.aa.toString()]=d}a=0;for(c=this.Vc.length;a<c;a++)b=this.Vc[a],k.layouts[b.aa.toString()]=b.ob();e=k.events.groups;a=0;for(c=this.lf.length;a<c;a++)b=this.lf[a],e[b.aa.toString()]=this.li[b.xg].ki;c=k.events.cnds;for(n in this.of)this.of.hasOwnProperty(n)&&(a=
this.of[n],Pa(a.P)&&(c[n]={ex:g(a.P)}));c=k.events.acts;for(n in this.kf)this.kf.hasOwnProperty(n)&&(a=this.kf[n],Pa(a.P)&&(c[n]={ex:a.P}));c=k.events.vars;for(n in this.ag)this.ag.hasOwnProperty(n)&&(a=this.ag[n],a.vi||a.parent&&!a.Gg||(c[n]=a.data));k.system=this.sd.ob();return JSON.stringify(k)};b.prototype.fp=function(){var a,c,b,g,e,m;this.ie={};a=0;for(c=this.B.length;a<c;a++)if(b=this.B[a],!b.G)for(g=0,e=b.d.length;g<e;g++)m=b.d[g],this.ie[m.uid.toString()]=m};b.prototype.ut=function(a){a=
JSON.parse(a);if(a.c2save&&!(1<a.version)){var c=a.rt;this.$b.reset();this.$b.Y=c.time;this.vd.reset();this.vd.Y=c.walltime||0;this.ef=c.timescale;this.Nc=c.tickcount;this.Dj=Date.now()-c.start_time_offset;var b=c.running_layout;if(b!==this.Da.aa)if(b=this.wn(b))this.gn(b);else return;var g,e,m,d,n,k,p;k=a.types;for(e in k)if(k.hasOwnProperty(e)&&(d=this.ji(parseInt(e,10)))&&!d.G&&!this.Fp(d)){k[e].ex?d.P=k[e].ex:Qa(d.P);n=d.d;m=k[e].instances;b=0;for(g=la(n.length,m.length);b<g;b++)this.Mi(n[b],
m[b]);b=m.length;for(g=n.length;b<g;b++)this.dd(n[b]);b=n.length;for(g=m.length;b<g;b++){n=null;if(d.xa.be&&(n=this.Da.hi(m[b].w.l),!n))continue;n=this.Wd(d.yc,n,!1,0,0,!0);this.Mi(n,m[b])}d.Xf=!0}this.qb();this.fp();g=a.layouts;for(e in g)g.hasOwnProperty(e)&&(b=this.wn(parseInt(e,10)))&&b.Fb(g[e]);g=a.events.groups;for(e in g)g.hasOwnProperty(e)&&(b=this.xs(parseInt(e,10)))&&this.li[b.xg]&&(this.li[b.xg].ki=g[e]);b=a.events.cnds;for(e in b)b.hasOwnProperty(e)&&this.of.hasOwnProperty(e)&&(this.of[e].P=
b[e].ex);b=a.events.acts;for(e in b)b.hasOwnProperty(e)&&this.kf.hasOwnProperty(e)&&(this.kf[e].P=b[e].ex);b=a.events.vars;for(e in b)b.hasOwnProperty(e)&&this.ag.hasOwnProperty(e)&&(this.ag[e].data=b[e]);this.Zg=c.next_uid;this.sd.Fb(a.system);b=0;for(g=this.B.length;b<g;b++)if(d=this.B[b],!d.G)for(e=0,a=d.d.length;e<a;e++){n=d.d[e];if(d.Pb)for(k=n.wg(),c=n.siblings.length=0,m=d.Vb.length;c<m;c++)p=d.Vb[c],d!==p&&n.siblings.push(p.d[k]);n.wd&&n.wd();if(n.O)for(c=0,m=n.O.length;c<m;c++)k=n.O[c],k.wd&&
k.wd()}this.fa=!0}};b.prototype.am=function(a,c){var b,e,m,d,n;d=a.type;m=d.xa;var k={};c?k.c2=!0:k.uid=a.uid;Pa(a.P)&&(k.ex=g(a.P));if(a.Ya&&a.Ya.length)for(k.ivs={},b=0,e=a.Ya.length;b<e;b++)k.ivs[a.type.el[b].toString()]=a.Ya[b];if(m.be){m={x:a.x,y:a.y,w:a.width,h:a.height,l:a.i.aa,zi:a.Cc()};0!==a.k&&(m.a=a.k);1!==a.opacity&&(m.o=a.opacity);.5!==a.Mb&&(m.hX=a.Mb);.5!==a.Nb&&(m.hY=a.Nb);0!==a.Ib&&(m.bm=a.Ib);a.visible||(m.v=a.visible);a.zd||(m.ce=a.zd);-1!==a.Yg&&(m.mts=a.Yg);if(d.M.length)for(m.fx=
[],b=0,e=d.M.length;b<e;b++)n=d.M[b],m.fx.push({name:n.name,active:a.Rd[n.index],params:a.Ja[n.index]});k.w=m}if(a.O&&a.O.length)for(k.behs={},b=0,e=a.O.length;b<e;b++)d=a.O[b],d.ob&&(k.behs[d.type.aa.toString()]=d.ob());a.ob&&(k.data=a.ob());return k};b.prototype.zs=function(a,c){var b,g;b=0;for(g=a.el.length;b<g;b++)if(a.el[b]===c)return b;return-1};b.prototype.vs=function(a,c){var b,g;b=0;for(g=a.O.length;b<g;b++)if(a.O[b].type.aa===c)return b;return-1};b.prototype.Mi=function(a,c,b){var g,e,m,
d,n;n=a.type;m=n.xa;if(b){if(!c.c2)return}else a.uid=c.uid;c.ex?a.P=c.ex:Qa(a.P);if(e=c.ivs)for(g in e)e.hasOwnProperty(g)&&(b=this.zs(n,parseInt(g,10)),0>b||b>=a.Ya.length||(a.Ya[b]=e[g]));if(m.be){m=c.w;a.i.aa!==m.l&&(b=a.i,a.i=this.Da.hi(m.l),a.i?(a.i.d.push(a),a.i.kc=!0,wa(b.d,a),b.kc=!0):(a.i=b,this.dd(a)));a.x=m.x;a.y=m.y;a.width=m.w;a.height=m.h;a.ff=m.zi;a.k=m.hasOwnProperty("a")?m.a:0;a.opacity=m.hasOwnProperty("o")?m.o:1;a.Mb=m.hasOwnProperty("hX")?m.hX:.5;a.Nb=m.hasOwnProperty("hY")?m.hY:
.5;a.visible=m.hasOwnProperty("v")?m.v:!0;a.zd=m.hasOwnProperty("ce")?m.ce:!0;a.Yg=m.hasOwnProperty("mts")?m.mts:-1;a.Ib=m.hasOwnProperty("bm")?m.bm:0;a.hg=Za(a.Ib);this.u&&$a(a,a.Ib,this.u);a.N();if(m.hasOwnProperty("fx"))for(b=0,e=m.fx.length;b<e;b++)d=n.Nk(m.fx[b].name),0>d||(a.Rd[d]=m.fx[b].active,a.Ja[d]=m.fx[b].params);a.Od()}if(n=c.behs)for(g in n)n.hasOwnProperty(g)&&(m=this.vs(a,parseInt(g,10)),0>m||a.O[m].Fb(n[g]));c.data&&a.Fb(c.data)};Jb=function(a){return new b(document.getElementById(a))};
Kb=function(a,c){return new b({dc:!0,width:a,height:c})};window.cr_createRuntime=Jb;window.cr_createDCRuntime=Kb;window.createCocoonJSRuntime=function(){window.c2cocoonjs=!0;var a=document.createElement("screencanvas")||document.createElement("canvas");a.Nv=!0;document.body.appendChild(a);a=new b(a);window.c2runtime=a;window.addEventListener("orientationchange",function(){window.c2runtime.setSize(window.innerWidth,window.innerHeight)});window.c2runtime.setSize(window.innerWidth,window.innerHeight);
return a};window.createEjectaRuntime=function(){var a=new b(document.getElementById("canvas"));window.c2runtime=a;window.c2runtime.setSize(window.innerWidth,window.innerHeight);return a}})();window.cr_getC2Runtime=function(){var l=document.getElementById("c2canvas");return l?l.c2runtime:window.c2runtime?window.c2runtime:null};window.cr_sizeCanvas=function(l,h){if(0!==l&&0!==h){var b=window.cr_getC2Runtime();b&&b.setSize(l,h)}};window.cr_setSuspended=function(l){var h=window.cr_getC2Runtime();h&&h.setSuspended(l)};
(function(){function l(a,c){this.b=a;this.lg=null;this.scrollX=this.b.jb/2;this.scrollY=this.b.ib/2;this.scale=1;this.k=0;this.qg=!0;this.name=c[0];this.width=c[1];this.height=c[2];this.Gp=c[3];this.op=c[4];this.aa=c[5];var b=c[6],e,d;this.W=[];this.Ag=[];e=0;for(d=b.length;e<d;e++){var k=new Lb(this,b[e]);k.Go=e;this.W.push(k)}b=c[7];this.Ke=[];e=0;for(d=b.length;e<d;e++){var k=b[e],h=this.b.B[k[1]];h.yc||(h.yc=k);this.Ke.push(k);-1===this.Ag.indexOf(h)&&this.Ag.push(h)}this.M=[];this.ja=[];this.Ja=
[];e=0;for(d=c[8].length;e<d;e++)this.M.push({id:c[8][e][0],name:c[8][e][1],pb:-1,fb:!0,index:e}),this.Ja.push(c[8][e][2].slice(0));this.Od();this.ke=new pa(0,0,1,1);this.Ul=new pa(0,0,1,1);this.je={}}function h(a,c){return a.ff-c.ff}function b(a,c){this.pa=a;this.b=a.b;this.d=[];this.scale=1;this.k=0;this.Be=!1;this.Md=new pa(0,0,0,0);this.zp=new qa;this.bb=this.Qa=this.cb=this.Pa=0;this.kc=!1;this.name=c[0];this.index=c[1];this.aa=c[2];this.visible=c[3];this.Ud=c[4];this.Nd=c[5];this.Hc=c[6];this.Ic=
c[7];this.opacity=c[8];this.Ek=c[9];this.cd=c[10];this.Ib=c[11];this.Kr=c[12];this.hg="source-over";this.xb=this.zb=0;this.le=!1;var b=c[13],e,d;this.vf=[];e=0;for(d=b.length;e<d;e++){var k=b[e],h=this.b.B[k[1]];h.yc||(h.yc=k,h.pr=this.index);this.vf.push(k);-1===this.pa.Ag.indexOf(h)&&this.pa.Ag.push(h)}this.M=[];this.ja=[];this.Ja=[];e=0;for(d=c[14].length;e<d;e++)this.M.push({id:c[14][e][0],name:c[14][e][1],pb:-1,fb:!0,index:e}),this.Ja.push(c[14][e][2].slice(0));this.Od();this.ke=new pa(0,0,1,
1);this.Ul=new pa(0,0,1,1)}l.prototype.hu=function(a){var c=a.type.aa.toString();this.je.hasOwnProperty(c)||(this.je[c]=[]);this.je[c].push(this.b.am(a))};l.prototype.zn=function(){var a=this.W[0];return!a.Nd&&1===a.opacity&&!a.Ek&&a.visible};l.prototype.Od=function(){this.ja.length=0;var a,c,b;a=0;for(c=this.M.length;a<c;a++)b=this.M[a],b.fb&&this.ja.push(b)};l.prototype.Mk=function(a){var c,b,e;c=0;for(b=this.M.length;c<b;c++)if(e=this.M[c],e.name===a)return e;return null};var d=[],k=!0;l.prototype.pm=
function(){this.op&&(this.lg=this.b.Ak[this.op],this.lg.Kp());this.b.Da=this;this.scrollX=this.b.jb/2;this.scrollY=this.b.ib/2;var a,c,b,e,p,l,s;a=0;for(b=this.b.B.length;a<b;a++)if(c=this.b.B[a],!c.G)for(p=c.d,c=0,e=p.length;c<e;c++)if(l=p[c],l.i){var z=l.i.Go;z>=this.W.length&&(z=this.W.length-1);l.i=this.W[z];-1===l.i.d.indexOf(l)&&l.i.d.push(l);l.i.kc=!0}if(!k)for(a=0,b=this.W.length;a<b;++a)this.W[a].d.sort(h);d.length=0;this.Yq();a=0;for(b=this.W.length;a<b;a++)l=this.W[a],l.mr(),l.zm();p=!1;
if(!this.qg){for(s in this.je)if(this.je.hasOwnProperty(s)&&(c=this.b.ji(parseInt(s,10)))&&!c.G&&this.b.xm(c)){e=this.je[s];a=0;for(b=e.length;a<b;a++){l=null;if(c.xa.be&&(l=this.hi(e[a].w.l),!l))continue;l=this.b.Wd(c.yc,l,!1,0,0,!0);this.b.Mi(l,e[a]);p=!0;d.push(l)}e.length=0}a=0;for(b=this.W.length;a<b;a++)this.W[a].d.sort(h),this.W[a].kc=!0}p&&(this.b.qb(),this.b.fp());for(a=0;a<d.length;a++)if(l=d[a],l.type.Pb)for(b=l.wg(),c=0,e=l.type.Vb.length;c<e;c++)s=l.type.Vb[c],l.type!==s&&(s.d.length>
b?l.siblings.push(s.d[b]):s.yc&&(p=this.b.Wd(s.yc,l.i,!0,l.x,l.y,!0),this.b.qb(),s.Qj(),l.siblings.push(p),d.push(p)));a=0;for(b=this.Ke.length;a<b;a++)this.b.Wd(this.Ke[a],null,!0);this.b.nk=null;this.b.qb();if(this.b.ua&&!this.b.Ca)for(a=0,b=this.b.B.length;a<b;a++)s=this.b.B[a],!s.G&&s.d.length&&s.hj&&s.hj(this.b.ua);a=0;for(b=d.length;a<b;a++)l=d[a],this.b.trigger(Object.getPrototypeOf(l.type.xa).n.cg,l);d.length=0;this.b.trigger(V.prototype.n.Km,null);this.qg=!1};l.prototype.lr=function(){var a,
c,b,e,d;c=a=0;for(b=this.Ke.length;a<b;a++)e=this.Ke[a],d=this.b.B[e[1]],d.global?this.b.Wd(e,null,!0):(this.Ke[c]=e,c++);this.Ke.length=c};l.prototype.su=function(){this.b.trigger(V.prototype.n.vq,null);this.b.sd.jc.length=0;var a,c,b,e,d,h;a=0;for(c=this.W.length;a<c;a++)for(this.W[a].Np(),d=this.W[a].d,b=0,e=d.length;b<e;b++)h=d[b],h.type.global||this.b.xm(h.type)&&this.hu(h);a=0;for(c=this.W.length;a<c;a++){d=this.W[a].d;b=0;for(e=d.length;b<e;b++)h=d[b],h.type.global||this.b.dd(h);this.b.qb();
d.length=0;this.W[a].kc=!0}a=0;for(c=this.b.B.length;a<c;a++)if(d=this.b.B[a],!(d.global||d.xa.be||d.xa.yj||d.G)){b=0;for(e=d.d.length;b<e;b++)this.b.dd(d.d[b]);this.b.qb()}k=!1};l.prototype.Xb=function(a){var c,b=a,e=!1,d=!this.b.Ac;d&&(this.b.Ji||(this.b.Ji=document.createElement("canvas"),c=this.b.Ji,c.width=this.b.V,c.height=this.b.U,this.b.co=c.getContext("2d"),e=!0),c=this.b.Ji,b=this.b.co,c.width!==this.b.V&&(c.width=this.b.V,e=!0),c.height!==this.b.U&&(c.height=this.b.U,e=!0),e&&(b.webkitImageSmoothingEnabled=
this.b.ca,b.mozImageSmoothingEnabled=this.b.ca,b.msImageSmoothingEnabled=this.b.ca,b.imageSmoothingEnabled=this.b.ca));b.globalAlpha=1;b.globalCompositeOperation="source-over";this.b.dk&&!this.zn()&&b.clearRect(0,0,this.b.V,this.b.U);var k,h,e=0;for(k=this.W.length;e<k;e++)h=this.W[e],h.visible&&0<h.opacity&&11!==h.Ib&&(h.d.length||!h.Nd)?h.Xb(b):h.zm();d&&a.drawImage(c,0,0,this.b.width,this.b.height)};l.prototype.Cb=function(a){var c=0<this.ja.length||this.b.Zf||!this.b.Ac;if(c){this.b.ac||(this.b.ac=
a.Ad(this.b.V,this.b.U,this.b.ca));if(this.b.ac.gg!==this.b.V||this.b.ac.fg!==this.b.U)a.deleteTexture(this.b.ac),this.b.ac=a.Ad(this.b.V,this.b.U,this.b.ca);a.qd(this.b.ac);this.b.Ac||a.Sf(this.b.V,this.b.U)}else this.b.ac&&(a.qd(null),a.deleteTexture(this.b.ac),this.b.ac=null);this.b.dk&&!this.zn()&&a.clear(0,0,0,0);var b,e,d;b=0;for(e=this.W.length;b<e;b++)d=this.W[b],d.visible&&0<d.opacity&&(d.d.length||!d.Nd)?d.Cb(a):d.zm();c&&(0===this.ja.length||1===this.ja.length&&this.b.Ac?(1===this.ja.length?
(c=this.ja[0].index,a.rd(this.ja[0].pb),a.Rf(null,1/this.b.V,1/this.b.U,0,0,1,1,this.scale,this.k,0,0,this.b.V/2,this.b.U/2,this.Ja[c]),a.ij(this.ja[0].pb)&&(this.b.fa=!0)):a.rd(0),this.b.Ac||a.Sf(this.b.width,this.b.height),a.qd(null),a.ne(1),a.Sb(this.b.ac),a.jp(),a.pd(),a.td(),c=this.b.width/2,b=this.b.height/2,a.hh(-c,b,c,b,c,-b,-c,-b),a.Sb(null)):this.Vl(a,null,null,null))};l.prototype.ug=function(){return 0<this.ja.length||this.b.Zf||!this.b.Ac?this.b.ac:null};l.prototype.xn=function(){var a=
this.W[0].Kb(),c,b,e;c=1;for(b=this.W.length;c<b;c++)e=this.W[c],(0!==e.Hc||0!==e.Ic)&&e.Kb()<a&&(a=e.Kb());return a};l.prototype.em=function(a){if(!this.Gp){var c=1/this.xn()*this.b.V/2;a>this.width-c&&(a=this.width-c);a<c&&(a=c)}this.scrollX!==a&&(this.scrollX=a,this.b.fa=!0)};l.prototype.fm=function(a){if(!this.Gp){var c=1/this.xn()*this.b.U/2;a>this.height-c&&(a=this.height-c);a<c&&(a=c)}this.scrollY!==a&&(this.scrollY=a,this.b.fa=!0)};l.prototype.Yq=function(){this.em(this.scrollX);this.fm(this.scrollY)};
l.prototype.Vl=function(a,c,b,e){var d=b?b.ja:c?c.ja:this.ja,k=1,h=0,l=0,r=0,y=this.b.V,x=this.b.U;b?(k=b.i.Kb(),h=b.i.Ga(),l=b.i.Pa,r=b.i.Qa,y=b.i.cb,x=b.i.bb):c&&(k=c.Kb(),h=c.Ga(),l=c.Pa,r=c.Qa,y=c.cb,x=c.bb);var n=this.b.Hk,m,v,f,q,t=0,O=1,X,J=this.b.V,E=this.b.U,K=J/2,ka=E/2,P=c?c.ke:this.ke,G=c?c.Ul:this.Ul,D=0,w=0,F=0,B=0,C=J,S=J,H=E,I=E,L=f=0,Y=b?b.i.Ga():0;if(b){m=0;for(v=d.length;m<v;m++)f+=a.Ds(d[m].pb),L+=a.Es(d[m].pb);q=b.Ba;D=c.wa(q.left,q.top,!0,!0);F=c.wa(q.left,q.top,!1,!0);C=c.wa(q.right,
q.bottom,!0,!0);H=c.wa(q.right,q.bottom,!1,!0);0!==Y&&(m=c.wa(q.right,q.top,!0,!0),v=c.wa(q.right,q.top,!1,!0),w=c.wa(q.left,q.bottom,!0,!0),B=c.wa(q.left,q.bottom,!1,!0),q=Math.min(D,C,m,w),C=Math.max(D,C,m,w),D=q,q=Math.min(F,H,v,B),H=Math.max(F,H,v,B),F=q);D-=f;F-=L;C+=f;H+=L;G.left=D/J;G.top=1-F/E;G.right=C/J;G.bottom=1-H/E;w=D=Q(D);B=F=Q(F);S=C=na(C);I=H=na(H);w-=f;B-=L;S+=f;I+=L;0>D&&(D=0);0>F&&(F=0);C>J&&(C=J);H>E&&(H=E);0>w&&(w=0);0>B&&(B=0);S>J&&(S=J);I>E&&(I=E);P.left=D/J;P.top=1-F/E;P.right=
C/J;P.bottom=1-H/E}else P.left=G.left=0,P.top=G.top=0,P.right=G.right=1,P.bottom=G.bottom=1;L=b&&((b.k||Y)&&a.eh(d[0].pb)||0!==f||0!==L||1!==b.opacity||b.type.xa.Co)||c&&!b&&1!==c.opacity;a.jp();if(L){n[t]||(n[t]=a.Ad(J,E,this.b.ca));if(n[t].gg!==J||n[t].fg!==E)a.deleteTexture(n[t]),n[t]=a.Ad(J,E,this.b.ca);a.rd(0);a.qd(n[t]);X=I-B;a.clearRect(w,E-B-X,S-w,X);b?b.Cb(a):(a.Sb(this.b.qc),a.ne(c.opacity),a.pd(),a.translate(-K,-ka),a.td(),a.od(D,H,C,H,C,F,D,F,P));G.left=G.top=0;G.right=G.bottom=1;b&&(q=
P.top,P.top=P.bottom,P.bottom=q);t=1;O=0}a.ne(1);f=d.length-1;var Y=a.Rl(d[f].pb)||!c&&!b&&!this.b.Ac,Z=0;m=0;for(v=d.length;m<v;m++){n[t]||(n[t]=a.Ad(J,E,this.b.ca));if(n[t].gg!==J||n[t].fg!==E)a.deleteTexture(n[t]),n[t]=a.Ad(J,E,this.b.ca);a.rd(d[m].pb);Z=d[m].index;a.ij(d[m].pb)&&(this.b.fa=!0);0!=m||L?(a.Rf(e,1/J,1/E,G.left,G.top,G.right,G.bottom,k,h,l,r,(l+y)/2,(r+x)/2,b?b.Ja[Z]:c?c.Ja[Z]:this.Ja[Z]),a.Sb(null),m!==f||Y?(a.qd(n[t]),X=I-B,q=E-B-X,a.clearRect(w,q,S-w,X)):(b?a.me(b.zb,b.xb):c&&
a.me(c.zb,c.xb),a.qd(e)),a.Sb(n[O]),a.pd(),a.translate(-K,-ka),a.td(),a.od(D,H,C,H,C,F,D,F,P),m!==f||Y||a.Sb(null)):(a.qd(n[t]),X=I-B,q=E-B-X,a.clearRect(w,q,S-w,X),b?(a.Rf(e,1/b.width,1/b.height,G.left,G.top,G.right,G.bottom,k,h,l,r,(l+y)/2,(r+x)/2,b.Ja[Z]),b.Cb(a)):(a.Rf(e,1/J,1/E,0,0,1,1,k,h,l,r,(l+y)/2,(r+x)/2,c?c.Ja[Z]:this.Ja[Z]),a.Sb(c?this.b.qc:this.b.ac),a.pd(),a.translate(-K,-ka),a.td(),a.od(D,H,C,H,C,F,D,F,P)),G.left=G.top=0,G.right=G.bottom=1,b&&!Y&&(q=H,H=F,F=q));t=0===t?1:0;O=0===t?
1:0}Y&&(a.rd(0),b?a.me(b.zb,b.xb):c?a.me(c.zb,c.xb):this.b.Ac||(a.Sf(this.b.width,this.b.height),K=this.b.width/2,ka=this.b.height/2,F=D=0,C=this.b.width,H=this.b.height),a.qd(e),a.Sb(n[O]),a.pd(),a.translate(-K,-ka),a.td(),b&&1===d.length&&!L?a.od(D,F,C,F,C,H,D,H,P):a.od(D,H,C,H,C,F,D,F,P),a.Sb(null))};l.prototype.hi=function(a){var c,b;c=0;for(b=this.W.length;c<b;c++)if(this.W[c].aa===a)return this.W[c];return null};l.prototype.ob=function(){var a,c,b,e={sx:this.scrollX,sy:this.scrollY,s:this.scale,
a:this.k,w:this.width,h:this.height,fv:this.qg,persist:this.je,fx:[],layers:{}};a=0;for(c=this.M.length;a<c;a++)b=this.M[a],e.fx.push({name:b.name,active:b.fb,params:this.Ja[b.index]});a=0;for(c=this.W.length;a<c;a++)b=this.W[a],e.layers[b.aa.toString()]=b.ob();return e};l.prototype.Fb=function(a){var c,b,e,d;this.scrollX=a.sx;this.scrollY=a.sy;this.scale=a.s;this.k=a.a;this.width=a.w;this.height=a.h;this.je=a.persist;"undefined"!==typeof a.fv&&(this.qg=a.fv);var k=a.fx;c=0;for(b=k.length;c<b;c++)if(e=
this.Mk(k[c].name))e.fb=k[c].active,this.Ja[e.index]=k[c].params;this.Od();c=a.layers;for(d in c)c.hasOwnProperty(d)&&(a=this.hi(parseInt(d,10)))&&a.Fb(c[d])};yb=l;b.prototype.Od=function(){this.ja.length=0;var a,c,b;a=0;for(c=this.M.length;a<c;a++)b=this.M[a],b.fb&&this.ja.push(b)};b.prototype.Mk=function(a){var c,b,e;c=0;for(b=this.M.length;c<b;c++)if(e=this.M[c],e.name===a)return e;return null};b.prototype.mr=function(){var a,c,b,e,k,h;c=a=0;for(b=this.vf.length;a<b;a++){e=this.vf[a];k=this.b.B[e[1]];
h=this.b.xm(k);k=!0;if(!h||this.pa.qg)e=this.b.Wd(e,this,!0),d.push(e),e.type.global&&(k=!1);k&&(this.vf[c]=this.vf[a],c++)}this.vf.length=c;this.b.qb();!this.b.A&&this.M.length&&(this.Ib=this.Kr);this.hg=Za(this.Ib);this.b.u&&$a(this,this.Ib,this.b.u)};b.prototype.Np=function(){if(this.kc){var a,c;a=0;for(c=this.d.length;a<c;a++)this.d[a].ff=a;this.kc=!1}};b.prototype.Kb=function(a){return this.As()*(this.b.Ac||a?this.b.eg:1)};b.prototype.As=function(){return(this.scale*this.pa.scale-1)*this.cd+
1};b.prototype.Ga=function(){return this.Be?0:za(this.pa.k+this.k)};b.prototype.Xb=function(a){this.le=this.Ek||1!==this.opacity||0!==this.Ib;var c=this.b.canvas,b=a,e=!1;this.le&&(this.b.Ii||(this.b.Ii=document.createElement("canvas"),c=this.b.Ii,c.width=this.b.V,c.height=this.b.U,this.b.bo=c.getContext("2d"),e=!0),c=this.b.Ii,b=this.b.bo,c.width!==this.b.V&&(c.width=this.b.V,e=!0),c.height!==this.b.U&&(c.height=this.b.U,e=!0),e&&(b.webkitImageSmoothingEnabled=this.b.ca,b.mozImageSmoothingEnabled=
this.b.ca,b.msImageSmoothingEnabled=this.b.ca,b.imageSmoothingEnabled=this.b.ca),this.Nd&&b.clearRect(0,0,this.b.V,this.b.U));b.globalAlpha=1;b.globalCompositeOperation="source-over";this.Nd||(b.fillStyle="rgb("+this.Ud[0]+","+this.Ud[1]+","+this.Ud[2]+")",b.fillRect(0,0,this.b.V,this.b.U));b.save();this.Be=!0;var e=this.Ub(0,0,!0,!0),d=this.Ub(0,0,!1,!0);this.Be=!1;this.b.Jc&&(e=Math.round(e),d=Math.round(d));this.Xl(e,d,b);var k=this.Kb();b.scale(k,k);b.translate(-e,-d);for(var h,e=0,d=this.d.length;e<
d;e++)k=this.d[e],k.visible&&0!==k.width&&0!==k.height&&(k.Ea(),h=k.Ba,h.right<this.Pa||h.bottom<this.Qa||h.left>this.cb||h.top>this.bb||(b.globalCompositeOperation=k.hg,k.Xb(b)));b.restore();this.le&&(a.globalCompositeOperation=this.hg,a.globalAlpha=this.opacity,a.drawImage(c,0,0))};b.prototype.zm=function(){this.Be=!0;var a=this.Ub(0,0,!0,!0),c=this.Ub(0,0,!1,!0);this.Be=!1;this.b.Jc&&(a=Math.round(a),c=Math.round(c));this.Xl(a,c,null)};b.prototype.Xl=function(a,c,b){var e=this.Kb();this.Pa=a;this.Qa=
c;this.cb=a+1/e*this.b.V;this.bb=c+1/e*this.b.U;a=this.Ga();0!==a&&(b&&(b.translate(this.b.V/2,this.b.U/2),b.rotate(-a),b.translate(this.b.V/-2,this.b.U/-2)),this.Md.set(this.Pa,this.Qa,this.cb,this.bb),this.Md.offset((this.Pa+this.cb)/-2,(this.Qa+this.bb)/-2),this.zp.mp(this.Md,a),this.zp.Wm(this.Md),this.Md.offset((this.Pa+this.cb)/2,(this.Qa+this.bb)/2),this.Pa=this.Md.left,this.Qa=this.Md.top,this.cb=this.Md.right,this.bb=this.Md.bottom)};b.prototype.Cb=function(a){var c=this.b.V,b=this.b.U,e=
0,d=0;if(this.le=this.Ek||1!==this.opacity||0<this.ja.length||0!==this.Ib){this.b.qc||(this.b.qc=a.Ad(this.b.V,this.b.U,this.b.ca));if(this.b.qc.gg!==this.b.V||this.b.qc.fg!==this.b.U)a.deleteTexture(this.b.qc),this.b.qc=a.Ad(this.b.V,this.b.U,this.b.ca);a.qd(this.b.qc);this.Nd&&a.clear(0,0,0,0)}this.Nd||a.clear(this.Ud[0]/255,this.Ud[1]/255,this.Ud[2]/255,1);this.Be=!0;var d=this.Ub(0,0,!0,!0),k=this.Ub(0,0,!1,!0);this.Be=!1;this.b.Jc&&(d=Math.round(d),k=Math.round(k));this.Xl(d,k,null);k=this.Kb();
a.pd();a.scale(k,k);a.Yl(-this.Ga());a.translate((this.Pa+this.cb)/-2,(this.Qa+this.bb)/-2);a.td();var h,l,r;h=0;for(l=this.d.length;h<l;h++)if(r=this.d[h],r.visible&&0!==r.width&&0!==r.height&&(r.Ea(),e=r.Ba,!(e.right<this.Pa||e.bottom<this.Qa||e.left>this.cb||e.top>this.bb)))if(r.Op)if(e=r.ja[0].pb,d=r.ja[0].index,1!==r.ja.length||a.Rl(e)||a.Ut(e)||(r.k||r.i.Ga())&&a.eh(e)||1!==r.opacity||r.type.xa.Co)this.pa.Vl(a,this,r,this.le?this.b.qc:this.pa.ug()),a.pd(),a.scale(k,k),a.Yl(-this.Ga()),a.translate((this.Pa+
this.cb)/-2,(this.Qa+this.bb)/-2),a.td();else{a.rd(e);a.me(r.zb,r.xb);a.ij(e)&&(this.b.fa=!0);var y=0,x=0,n=0,m=0;a.eh(e)&&(e=r.Ba,y=this.wa(e.left,e.top,!0,!0),x=this.wa(e.left,e.top,!1,!0),n=this.wa(e.right,e.bottom,!0,!0),e=this.wa(e.right,e.bottom,!1,!0),y/=c,x=1-x/b,n/=c,m=1-e/b);a.Rf(this.le?this.b.qc:this.pa.ug(),1/r.width,1/r.height,y,x,n,m,this.Kb(),this.Ga(),this.Pa,this.Qa,(this.Pa+this.cb)/2,(this.Qa+this.bb)/2,r.Ja[d]);r.Cb(a)}else a.rd(0),a.me(r.zb,r.xb),r.Cb(a);this.le&&(e=this.ja.length?
this.ja[0].pb:0,d=this.ja.length?this.ja[0].index:0,0===this.ja.length||1===this.ja.length&&!a.Rl(e)&&1===this.opacity?(1===this.ja.length?(a.rd(e),a.Rf(this.pa.ug(),1/this.b.V,1/this.b.U,0,0,1,1,this.Kb(),this.Ga(),this.Pa,this.Qa,(this.Pa+this.cb)/2,(this.Qa+this.bb)/2,this.Ja[d]),a.ij(e)&&(this.b.fa=!0)):a.rd(0),a.qd(this.pa.ug()),a.ne(this.opacity),a.Sb(this.b.qc),a.me(this.zb,this.xb),a.pd(),a.td(),c=this.b.V/2,b=this.b.U/2,a.hh(-c,b,c,b,c,-b,-c,-b),a.Sb(null)):this.pa.Vl(a,this,null,this.pa.ug()))};
b.prototype.Ub=function(a,c,b,e){var d=this.b.devicePixelRatio;this.b.Ne&&(a*=d,c*=d);var d=this.b.To,k=this.b.Uo,d=(this.pa.scrollX-d)*this.Hc+d,k=(this.pa.scrollY-k)*this.Ic+k,h=1/this.Kb(!e);e?(d-=this.b.V*h/2,k-=this.b.U*h/2):(d-=this.b.width*h/2,k-=this.b.height*h/2);d+=a*h;k+=c*h;c=this.Ga();0!==c&&(d-=this.pa.scrollX,k-=this.pa.scrollY,a=Math.cos(c),c=Math.sin(c),e=d*a-k*c,k=k*a+d*c,d=e+this.pa.scrollX,k+=this.pa.scrollY);return b?d:k};b.prototype.wa=function(a,c,b,e){var d=this.Ga();if(0!==
d){a-=this.pa.scrollX;c-=this.pa.scrollY;var k=Math.cos(-d),d=Math.sin(-d),h=a*k-c*d;c=c*k+a*d;a=h+this.pa.scrollX;c+=this.pa.scrollY}k=this.b.To;d=this.b.Uo;k=(this.pa.scrollX-k)*this.Hc+k;d=(this.pa.scrollY-d)*this.Ic+d;h=1/this.Kb(!e);e?(k-=this.b.V*h/2,d-=this.b.U*h/2):(k-=this.b.width*h/2,d-=this.b.height*h/2);k=(a-k)/h;d=(c-d)/h;a=this.b.devicePixelRatio;this.b.Ne&&!e&&(k/=a,d/=a);return b?k:d};b.prototype.ob=function(){var a,c,b,d={s:this.scale,a:this.k,vl:this.Pa,vt:this.Qa,vr:this.cb,vb:this.bb,
v:this.visible,bc:this.Ud,t:this.Nd,px:this.Hc,py:this.Ic,o:this.opacity,zr:this.cd,fx:[],instances:[]};a=0;for(c=this.M.length;a<c;a++)b=this.M[a],d.fx.push({name:b.name,active:b.fb,params:this.Ja[b.index]});return d};b.prototype.Fb=function(a){var c,b;this.scale=a.s;this.k=a.a;this.Pa=a.vl;this.Qa=a.vt;this.cb=a.vr;this.bb=a.vb;this.visible=a.v;this.Ud=a.bc;this.Nd=a.t;this.Hc=a.px;this.Ic=a.py;this.opacity=a.o;this.cd=a.zr;var d=a.fx;a=0;for(c=d.length;a<c;a++)if(b=this.Mk(d[a].name))b.fb=d[a].active,
this.Ja[b.index]=d[a].params;this.Od();this.d.sort(h);this.kc=!0};Lb=b})();
(function(){function l(a,c){var b,f=a.length;switch(f){case 0:return!0;case 1:return a[0]===c[0];case 2:return a[0]===c[0]&&a[1]===c[1];default:for(b=0;b<f;b++)if(a[b]!==c[b])return!1;return!0}}function h(a,c){return a.index-c.index}function b(a){var c,b,f,d;2===a.length?a[0].index>a[1].index&&(c=a[0],a[0]=a[1],a[1]=c):2<a.length&&a.sort(h);a.length>=r.length&&(r.length=a.length+1);r[a.length]||(r[a.length]=[]);d=r[a.length];c=0;for(b=d.length;c<b;c++)if(f=d[c],l(a,f))return f;d.push(a);return a}
function d(a,c){this.b=a;this.Cp={};this.mn={};this.Xk=!1;this.Cn=new ba;this.vk=[];this.ek=[];this.name=c[0];var b=c[1];this.Xd=[];var f,d;f=0;for(d=b.length;f<d;f++)this.En(b[f],null,this.Xd)}function k(a){this.type=a;this.d=[];this.ma=[];this.ra=!0}function a(a,c,b){this.sheet=a;this.parent=c;this.b=a.b;this.Ha=[];this.oe=[];this.An=this.Lj=this.um=this.al=this.group=this.sp=!1;this.gb=[];this.uc=[];this.Mc=[];this.xg="";this.ki=this.al=this.group=!1;this.bn=null;b[1]&&(this.xg=b[1][1].toLowerCase(),
this.group=!0,this.al=!!b[1][0],this.bn=[],this.ki=this.al,this.b.lf.push(this),this.b.li[this.xg]=this);this.Wc=b[2];this.aa=b[4];this.group||(this.b.Vm[this.aa.toString()]=this);var f=b[5];a=0;for(c=f.length;a<c;a++){var d=new Mb(this,f[a]);d.index=a;this.gb.push(d);this.Qm(d.type)}f=b[6];a=0;for(c=f.length;a<c;a++)d=new Nb(this,f[a]),d.index=a,this.uc.push(d);if(8===b.length)for(b=b[7],a=0,c=b.length;a<c;a++)this.sheet.En(b[a],this,this.Mc);this.wi=!1;this.gb.length&&(this.wi=null==this.gb[0].type&&
this.gb[0].mb==V.prototype.n.Zp)}function c(a,c){var b,f,d;if(a&&(-1===c.indexOf(a)&&c.push(a),a.Pb))for(b=0,f=a.Vb.length;b<f;b++)d=a.Vb[b],a!==d&&-1===c.indexOf(d)&&c.push(d)}function g(a,c){this.mc=a;this.sheet=a.sheet;this.b=a.b;this.S=[];this.ya=[];this.P={};this.index=-1;this.dg=!1;this.mb=this.b.Qd(c[1]);this.trigger=0<c[3];this.ln=2===c[3];this.ld=c[4];this.fl=c[5];this.tt=c[6];this.aa=c[7];this.b.of[this.aa.toString()]=this;-1===c[0]?(this.type=null,this.Wa=this.$l,this.ye=null,this.vc=-1):
(this.type=this.b.B[c[0]],this.Wa=this.tt?this.fu:this.Zl,c[2]?(this.ye=this.type.gi(c[2]),this.vc=this.type.Jk(c[2])):(this.ye=null,this.vc=-1),this.mc.parent&&this.mc.parent.vj());this.ln&&(this.Wa=this.gu);if(10===c.length){var b,f,d=c[9];b=0;for(f=d.length;b<f;b++){var e=new Ob(this,d[b]);this.S.push(e)}this.ya.length=d.length}}function e(a,c){this.mc=a;this.sheet=a.sheet;this.b=a.b;this.S=[];this.ya=[];this.P={};this.index=-1;this.dg=!1;this.mb=this.b.Qd(c[1]);-1===c[0]?(this.type=null,this.Wa=
this.$l,this.ye=null,this.vc=-1):(this.type=this.b.B[c[0]],this.Wa=this.Zl,c[2]?(this.ye=this.type.gi(c[2]),this.vc=this.type.Jk(c[2])):(this.ye=null,this.vc=-1));this.aa=c[3];this.b.kf[this.aa.toString()]=this;if(6===c.length){var b,f,d=c[5];b=0;for(f=d.length;b<f;b++){var e=new Ob(this,d[b]);this.S.push(e)}this.ya.length=d.length}}function p(a,c){this.q=a;this.mc=a.mc;this.sheet=a.sheet;this.b=a.b;this.type=c[0];this.hd=null;this.pe=0;this.get=null;this.an=0;this.pa=null;this.key=0;this.object=
null;this.index=0;this.vh=this.bf=this.vh=this.bf=this.nn=this.Ee=this.wh=null;this.Oc=!1;var b,f,d;switch(c[0]){case 0:case 7:this.hd=new Pb(this,c[1]);this.pe=0;this.get=this.Ls;break;case 1:this.hd=new Pb(this,c[1]);this.pe=0;this.get=this.Ms;break;case 5:this.hd=new Pb(this,c[1]);this.pe=0;this.get=this.Qs;break;case 3:case 8:this.an=c[1];this.get=this.Js;break;case 6:this.pa=this.b.tl[c[1]];this.get=this.Rs;break;case 9:this.key=c[1];this.get=this.Ps;break;case 4:this.object=this.b.B[c[1]];this.get=
this.Ss;this.mc.Qm(this.object);this.q instanceof Nb?this.mc.vj():this.mc.parent&&this.mc.parent.vj();break;case 10:this.index=c[1];a.type.G?(this.get=this.Ns,this.Oc=!0):this.get=this.Os;break;case 11:this.wh=c[1];this.Ee=null;this.get=this.Ks;break;case 2:case 12:this.nn=c[1];this.get=this.Is;break;case 13:for(this.get=this.Ts,this.bf=[],this.vh=[],b=1,f=c.length;b<f;b++)d=new Ob(this.q,c[b]),this.bf.push(d),this.vh.push(0)}}function u(a,c,b){this.sheet=a;this.parent=c;this.b=a.b;this.Ha=[];this.name=
b[1];this.Pp=b[2];this.$k=b[3];this.Gg=!!b[4];this.vi=!!b[5];this.aa=b[6];this.b.ag[this.aa.toString()]=this;this.data=this.$k;this.parent?(this.Te=this.Gg||this.vi?-1:this.b.qu++,this.b.Tq.push(this)):(this.Te=-1,this.b.Sq.push(this))}function s(a,c,b){this.sheet=a;this.parent=c;this.b=a.b;this.Ha=[];this.zg=null;this.bt=b[1];this.fb=!0}function z(){this.vp=[];this.reset(null)}var r=[];d.prototype.toString=function(){return this.name};d.prototype.En=function(a,c,b){switch(a[0]){case 0:a=new Qb(this,
c,a);if(a.Wc)for(b.push(a),b=0,c=a.gb.length;b<c;b++)a.gb[b].trigger&&this.Fn(a,b);else a.Pn()?this.Fn(a,0):b.push(a);break;case 1:a=new Ib(this,c,a);b.push(a);break;case 2:a=new Rb(this,c,a),b.push(a)}};d.prototype.Oa=function(){var a,c;a=0;for(c=this.Xd.length;a<c;a++)this.Xd[a].Oa(a<c-1&&this.Xd[a+1].wi)};d.prototype.Kp=function(){this.vk.length=0;this.ek.length=0;this.Om(this);this.ek.length=0};d.prototype.Om=function(a){var c,b,f,d,e=a.vk,g=a.ek,k=this.Cn.Pd();c=0;for(b=k.length;c<b;++c)f=k[c],
d=f.zg,!f.fb||a===d||-1<g.indexOf(d)||(g.push(d),d.Om(a),e.push(d))};d.prototype.Wa=function(a){this.b.Mv||(this.Xk=!0,a||(this.b.il=!0));var c,b;c=0;for(b=this.Xd.length;c<b;c++){var f=this.Xd[c];f.Wa();this.b.ok(f.Ha);this.b.Zd&&this.b.qb()}a||(this.b.il=!1)};d.prototype.Fn=function(a,c){a.Wc||this.b.Oj.push(a);var b,f,d=a.gb[c],e;e=d.type?d.type.name:"system";var g=(b=d.ln)?this.mn:this.Cp;g[e]||(g[e]=[]);e=g[e];g=d.mb;if(b){if(d.S.length&&(d=d.S[0],1===d.type&&2===d.hd.type)){d=d.hd.value.toLowerCase();
b=0;for(f=e.length;b<f;b++)if(e[b].method==g){b=e[b].mg;b[d]?b[d].push([a,c]):b[d]=[[a,c]];return}b={};b[d]=[[a,c]];e.push({method:g,mg:b})}}else{b=0;for(f=e.length;b<f;b++)if(e[b].method==g){e[b].mg.push([a,c]);return}W&&g===W.prototype.n.jf?e.unshift({method:g,mg:[[a,c]]}):e.push({method:g,mg:[[a,c]]})}};zb=d;k.prototype.Wk=function(){return this.ra?this.type.d.length:this.d.length};k.prototype.Bc=function(){return this.ra?this.type.d:this.d};k.prototype.dh=function(a){a&&(a.b.yb().nc.Wc?(this.ra&&
(this.d.length=0,ta(this.ma,a.type.d),this.ra=!1),a=this.ma.indexOf(a),-1!==a&&(this.d.push(this.ma[a]),this.ma.splice(a,1))):(this.ra=!1,this.d.length=1,this.d[0]=a))};fb=k;window._c2hh_="";a.prototype.Oa=function(a){var c,d=this.parent;if(this.group)for(this.Lj=!0;d;){if(!d.group){this.Lj=!1;break}d=d.parent}this.um=!this.Pn()&&(!this.parent||this.parent.group&&this.parent.Lj);this.An=!!a;this.oe=this.Ha.slice(0);for(d=this.parent;d;){a=0;for(c=d.Ha.length;a<c;a++)this.Pq(d.Ha[a]);d=d.parent}this.Ha=
b(this.Ha);this.oe=b(this.oe);a=0;for(c=this.gb.length;a<c;a++)this.gb[a].Oa();a=0;for(c=this.uc.length;a<c;a++)this.uc[a].Oa();a=0;for(c=this.Mc.length;a<c;a++)this.Mc[a].Oa(a<c-1&&this.Mc[a+1].wi)};a.prototype.Qm=function(a){c(a,this.Ha)};a.prototype.Pq=function(a){c(a,this.oe)};a.prototype.vj=function(){this.sp=!0;this.parent&&this.parent.vj()};a.prototype.Pn=function(){return this.gb.length?this.gb[0].trigger:!1};a.prototype.Wa=function(){var a,c=!1,b,d=this.b,e=this.b.yb();e.nc=this;var g=this.gb;
this.wi||(e.yk=!1);if(this.Wc){0===g.length&&(c=!0);e.Xa=0;for(a=g.length;e.Xa<a;e.Xa++)g[e.Xa].trigger||(b=g[e.Xa].Wa())&&(c=!0);(e.Qe=c)&&this.qj()}else{e.Xa=0;for(a=g.length;e.Xa<a;e.Xa++)if(b=g[e.Xa].Wa(),!b){e.Qe=!1;this.um&&d.Zd&&d.qb();return}e.Qe=!0;this.qj()}this.Mr(e)};a.prototype.Mr=function(a){a.Qe&&this.An&&(a.yk=!0);this.um&&this.b.Zd&&this.b.qb()};a.prototype.du=function(a){this.b.yb().nc=this;this.gb[a].Wa()&&(this.qj(),this.b.yb().Qe=!0)};a.prototype.qj=function(){var a=this.b.yb(),
c;a.lc=0;for(c=this.uc.length;a.lc<c;a.lc++)if(this.uc[a.lc].Wa())return;this.hp()};a.prototype.au=function(){var a=this.b.yb(),c;for(c=this.uc.length;a.lc<c;a.lc++)if(this.uc[a.lc].Wa())return;this.hp()};a.prototype.hp=function(){if(this.Mc.length){var a,c,b,d,e=this.Mc.length-1;this.b.kj(this);if(this.sp)for(a=0,c=this.Mc.length;a<c;a++)b=this.Mc[a],(d=!this.Lj||!this.group&&a<e)&&this.b.jj(b.Ha),b.Wa(),d?this.b.Ze(b.Ha):this.b.ok(b.Ha);else for(a=0,c=this.Mc.length;a<c;a++)this.Mc[a].Wa();this.b.ej()}};
a.prototype.eu=function(){var a=this.b.yb();a.nc=this;var c=!1,b;a.Xa=0;for(b=this.gb.length;a.Xa<b;a.Xa++)if(this.gb[a.Xa].Wa())c=!0;else if(!this.Wc)return!1;return this.Wc?c:!0};a.prototype.bu=function(){this.b.qf++;var a=this.b.yb().Xa,c=this.b.kj(this);if(!this.Wc)for(c.Xa=a+1,a=this.gb.length;c.Xa<a;c.Xa++)if(!this.gb[c.Xa].Wa()){this.b.ej();return}this.qj();this.b.ej()};a.prototype.lt=function(a){var c=a.index;if(0===c)return!0;for(--c;0<=c;--c)if(this.gb[c].type===a.type)return!1;return!0};
Qb=a;g.prototype.Oa=function(){var a,c,b;a=0;for(c=this.S.length;a<c;a++)b=this.S[a],b.Oa(),b.Oc&&(this.dg=!0)};g.prototype.gu=function(){return!0};g.prototype.$l=function(){var a,c;a=0;for(c=this.S.length;a<c;a++)this.ya[a]=this.S[a].get();return Ka(this.mb.apply(this.b.sd,this.ya),this.fl)};g.prototype.fu=function(){var a,c;a=0;for(c=this.S.length;a<c;a++)this.ya[a]=this.S[a].get();a=this.mb.apply(this.ye?this.ye:this.type,this.ya);this.type.Qc();return a};g.prototype.Zl=function(){var a,c,b,d,
e,g,k,h,l=this.type,p=l.da(),r=this.mc.Wc&&!this.trigger;c=0;var y=l.Pb,u=l.G,x=l.Gd,s=this.vc,z=-1<s,F=this.dg,B=this.S,C=this.ya,S=this.fl,H=this.mb,I;if(F)for(c=0,e=B.length;c<e;++c)g=B[c],g.Oc||(C[c]=g.get(0));else for(c=0,e=B.length;c<e;++c)C[c]=B[c].get(0);if(p.ra){p.d.length=0;p.ma.length=0;I=l.d;a=0;for(d=I.length;a<d;++a){h=I[a];if(F)for(c=0,e=B.length;c<e;++c)g=B[c],g.Oc&&(C[c]=g.get(a));z?(c=0,u&&(c=h.type.sf[x]),c=H.apply(h.O[s+c],C)):c=H.apply(h,C);(k=Ka(c,S))?p.d.push(h):r&&p.ma.push(h)}l.finish&&
l.finish(!0);p.ra=!1;l.Qc();return p.Wk()}b=0;I=(k=r&&!this.mc.lt(this))?p.ma:p.d;var L=!1;a=0;for(d=I.length;a<d;++a){h=I[a];if(F)for(c=0,e=B.length;c<e;++c)g=B[c],g.Oc&&(C[c]=g.get(a));z?(c=0,u&&(c=h.type.sf[x]),c=H.apply(h.O[s+c],C)):c=H.apply(h,C);if(Ka(c,S))if(L=!0,k){if(p.d.push(h),y)for(c=0,e=h.siblings.length;c<e;c++)g=h.siblings[c],g.type.da().d.push(g)}else{I[b]=h;if(y)for(c=0,e=h.siblings.length;c<e;c++)g=h.siblings[c],g.type.da().d[b]=g;b++}else if(k){I[b]=h;if(y)for(c=0,e=h.siblings.length;c<
e;c++)g=h.siblings[c],g.type.da().ma[b]=g;b++}else if(r&&(p.ma.push(h),y))for(c=0,e=h.siblings.length;c<e;c++)g=h.siblings[c],g.type.da().ma.push(g)}I.length=b;if(y)for(u=l.Vb,a=0,d=u.length;a<d;a++)h=u[a].da(),k?h.ma.length=b:h.d.length=b;b=L;if(k&&!L)for(a=0,d=p.d.length;a<d;a++){h=p.d[a];if(F)for(c=0,e=B.length;c<e;c++)g=B[c],g.Oc&&(C[c]=g.get(a));c=z?H.apply(h.O[s],C):H.apply(h,C);if(Ka(c,S)){L=!0;break}}l.finish&&l.finish(b||r);return r?L:p.Wk()};Mb=g;e.prototype.Oa=function(){var a,c,b;a=0;
for(c=this.S.length;a<c;a++)b=this.S[a],b.Oa(),b.Oc&&(this.dg=!0)};e.prototype.$l=function(){var a,c;a=0;for(c=this.S.length;a<c;a++)this.ya[a]=this.S[a].get();return this.mb.apply(this.b.sd,this.ya)};e.prototype.Zl=function(){var a=this.type.da().Bc(),c=this.type.G,b=this.type.Gd,d=this.vc,e=-1<d,g=this.dg,k=this.S,h=this.ya,l=this.mb,p,r,y,u,x,s;if(g)for(r=0,u=k.length;r<u;++r)x=k[r],x.Oc||(h[r]=x.get(0));else for(r=0,u=k.length;r<u;++r)h[r]=k[r].get(0);p=0;for(y=a.length;p<y;++p){s=a[p];if(g)for(r=
0,u=k.length;r<u;++r)x=k[r],x.Oc&&(h[r]=x.get(p));e?(r=0,c&&(r=s.type.sf[b]),l.apply(s.O[d+r],h)):l.apply(s,h)}return!1};Nb=e;var y=[],x=-1;p.prototype.Oa=function(){var a,c;if(11===this.type)this.Ee=this.b.tn(this.wh,this.mc.parent);else if(13===this.type)for(a=0,c=this.bf.length;a<c;a++)this.bf[a].Oa();this.hd&&this.hd.Oa()};p.prototype.yt=function(a){this.Oc||!a||a.xa.yj||(this.Oc=!0)};p.prototype.kp=function(){this.Oc=!0};p.prototype.$a=function(){x++;y.length===x&&y.push(new Sb);return y[x]};
p.prototype.Va=function(){x--};p.prototype.Ls=function(a){this.pe=a||0;a=this.$a();this.hd.get(a);this.Va();return a.data};p.prototype.Ms=function(a){this.pe=a||0;a=this.$a();this.hd.get(a);this.Va();return N(a.data)?a.data:""};p.prototype.Ss=function(){return this.object};p.prototype.Js=function(){return this.an};p.prototype.Qs=function(a){this.pe=a||0;a=this.$a();this.hd.get(a);this.Va();return a.hb()?this.b.tg(a.data):this.b.Ok(a.data)};p.prototype.Rs=function(){return this.pa};p.prototype.Ps=
function(){return this.key};p.prototype.Os=function(){return this.index};p.prototype.Ns=function(a){a=a||0;var c=this.q.type,b=null,b=c.da(),d=b.Bc();if(d.length)b=d[a%d.length].type;else if(b.ma.length)b=b.ma[a%b.ma.length].type;else if(c.d.length)b=c.d[a%c.d.length].type;else return 0;return this.index+b.$h[c.Gd]};p.prototype.Ks=function(){return this.Ee};p.prototype.Is=function(){return this.nn};p.prototype.Ts=function(){var a,c;a=0;for(c=this.bf.length;a<c;a++)this.vh[a]=this.bf[a].get();return this.vh};
Ob=p;u.prototype.Oa=function(){this.Ha=b(this.Ha)};u.prototype.wj=function(a){var c=this.b.sn();this.parent&&!this.Gg&&c?(this.Te>=c.length&&(c.length=this.Te+1),c[this.Te]=a):this.data=a};u.prototype.vg=function(){var a=this.b.sn();return!this.parent||this.Gg||!a||this.vi?this.data:this.Te>=a.length||"undefined"===typeof a[this.Te]?this.$k:a[this.Te]};u.prototype.Wa=function(){!this.parent||this.Gg||this.vi||this.wj(this.$k)};Ib=u;s.prototype.toString=function(){return"include:"+this.zg.toString()};
s.prototype.Oa=function(){this.zg=this.b.Ak[this.bt];this.sheet.Cn.add(this);this.Ha=b(this.Ha);for(var a=this.parent;a;)a.group&&a.bn.push(this),a=a.parent;this.xu()};s.prototype.Wa=function(){this.parent&&this.b.gh(this.b.B);this.zg.Xk||this.zg.Wa(!0);this.parent&&this.b.Ze(this.b.B)};s.prototype.xu=function(){for(var a=this.parent;a;){if(a.group&&!a.ki){this.fb=!1;return}a=a.parent}this.fb=!0};Rb=s;z.prototype.reset=function(a){this.nc=a;this.lc=this.Xa=0;this.vp.length=0;this.yk=this.Qe=!1};Hb=
z})();
(function(){function l(b,d){this.q=b;this.b=b.b;this.type=d[0];this.get=[this.Yr,this.Ur,this.gs,this.ks,this.Or,this.hs,this.bs,this.Rr,this.as,this.es,this.Pr,this.ds,this.Sr,this.cs,this.Zr,this.$r,this.Vr,this.Wr,this.Qr,this.js,this.jn,this.Xr,this.jn,this.Tr][this.type];var k=null;this.Qb=this.S=this.ya=this.mb=this.Hj=this.lb=this.first=this.value=null;this.vc=-1;this.Id=null;this.Cm=-1;this.Ee=this.wh=null;this.jh=!1;switch(this.type){case 0:case 1:case 2:this.value=d[1];break;case 3:this.first=new Pb(b,
d[1]);break;case 18:this.first=new Pb(b,d[1]);this.lb=new Pb(b,d[2]);this.Hj=new Pb(b,d[3]);break;case 19:this.mb=this.b.Qd(d[1]);this.mb!==V.prototype.Sa.random&&this.mb!==V.prototype.Sa.hr||this.q.kp();this.ya=[];this.S=[];3===d.length?(k=d[2],this.ya.length=k.length+1):this.ya.length=1;break;case 20:this.Qb=this.b.B[d[1]];this.vc=-1;this.mb=this.b.Qd(d[2]);this.jh=d[3];Ub.Function&&this.mb===Ub.Function.prototype.Sa.Ju&&this.q.kp();this.Id=d[4]?new Pb(b,d[4]):null;this.ya=[];this.S=[];6===d.length?
(k=d[5],this.ya.length=k.length+1):this.ya.length=1;break;case 21:this.Qb=this.b.B[d[1]];this.jh=d[2];this.Id=d[3]?new Pb(b,d[3]):null;this.Cm=d[4];break;case 22:this.Qb=this.b.B[d[1]];this.Qb.gi(d[2]);this.vc=this.Qb.Jk(d[2]);this.mb=this.b.Qd(d[3]);this.jh=d[4];this.Id=d[5]?new Pb(b,d[5]):null;this.ya=[];this.S=[];7===d.length?(k=d[6],this.ya.length=k.length+1):this.ya.length=1;break;case 23:this.wh=d[1],this.Ee=null}this.q.yt(this.Qb);4<=this.type&&17>=this.type&&(this.first=new Pb(b,d[1]),this.lb=
new Pb(b,d[2]));if(k){var a,c;a=0;for(c=k.length;a<c;a++)this.S.push(new Pb(b,k[a]))}}function h(b,d){this.type=b||U.hf;this.data=d||0;this.Mf=null;this.type==U.hf&&(this.data=Math.floor(this.data))}l.prototype.Oa=function(){23===this.type&&(this.Ee=this.q.b.tn(this.wh,this.q.mc.parent));this.first&&this.first.Oa();this.lb&&this.lb.Oa();this.Hj&&this.Hj.Oa();this.Id&&this.Id.Oa();if(this.S){var b,d;b=0;for(d=this.S.length;b<d;b++)this.S[b].Oa()}};l.prototype.js=function(b){this.ya[0]=b;b=this.q.$a();
var d,k;d=0;for(k=this.S.length;d<k;d++)this.S[d].get(b),this.ya[d+1]=b.data;this.q.Va();this.mb.apply(this.b.sd,this.ya)};l.prototype.jn=function(b){var d=this.Qb.da(),k=d.Bc();if(!k.length)if(d.ma.length)k=d.ma;else{this.jh?b.gc(""):b.za(0);return}this.ya[0]=b;b.Mf=this.Qb;b=this.q.$a();var a,d=0;for(a=this.S.length;d<a;d++)this.S[d].get(b),this.ya[d+1]=b.data;d=this.q.pe;this.Id&&(this.Id.get(b),b.hb()&&(d=b.data,k=this.Qb.d));this.q.Va();d%=k.length;0>d&&(d+=k.length);k=k[d];-1<this.vc?(b=0,this.Qb.G&&
(b=k.type.sf[this.Qb.Gd]),this.mb.apply(k.O[this.vc+b],this.ya)):this.mb.apply(k,this.ya)};l.prototype.Xr=function(b){var d=this.Qb.da(),k=d.Bc();if(!k.length)if(d.ma.length)k=d.ma;else{this.jh?b.gc(""):b.za(0);return}d=this.q.pe;if(this.Id){var a=this.q.$a();this.Id.get(a);if(a.hb()){d=a.data;k=this.Qb.d;d%=k.length;0>d&&(d+=k.length);k=k[d].Ya[this.Cm];N(k)?b.gc(k):b.J(k);this.q.Va();return}this.q.Va()}d%=k.length;0>d&&(d+=k.length);k=k[d];d=0;this.Qb.G&&(d=k.type.$h[this.Qb.Gd]);k=k.Ya[this.Cm+
d];N(k)?b.gc(k):b.J(k)};l.prototype.Yr=function(b){b.type=U.hf;b.data=this.value};l.prototype.Ur=function(b){b.type=U.gf;b.data=this.value};l.prototype.gs=function(b){b.type=U.String;b.data=this.value};l.prototype.ks=function(b){this.first.get(b);b.hb()&&(b.data=-b.data)};l.prototype.Or=function(b){this.first.get(b);var d=this.q.$a();this.lb.get(d);b.hb()&&d.hb()&&(b.data+=d.data,d.Af()&&b.Jf());this.q.Va()};l.prototype.hs=function(b){this.first.get(b);var d=this.q.$a();this.lb.get(d);b.hb()&&d.hb()&&
(b.data-=d.data,d.Af()&&b.Jf());this.q.Va()};l.prototype.bs=function(b){this.first.get(b);var d=this.q.$a();this.lb.get(d);b.hb()&&d.hb()&&(b.data*=d.data,d.Af()&&b.Jf());this.q.Va()};l.prototype.Rr=function(b){this.first.get(b);var d=this.q.$a();this.lb.get(d);b.hb()&&d.hb()&&(b.data/=d.data,b.Jf());this.q.Va()};l.prototype.as=function(b){this.first.get(b);var d=this.q.$a();this.lb.get(d);b.hb()&&d.hb()&&(b.data%=d.data,d.Af()&&b.Jf());this.q.Va()};l.prototype.es=function(b){this.first.get(b);var d=
this.q.$a();this.lb.get(d);b.hb()&&d.hb()&&(b.data=Math.pow(b.data,d.data),d.Af()&&b.Jf());this.q.Va()};l.prototype.Pr=function(b){this.first.get(b);var d=this.q.$a();this.lb.get(d);b.hb()?d.xi()?b.gc(b.data.toString()+d.data):b.data&&d.data?b.za(1):b.za(0):b.xi()&&(b.data=d.xi()?b.data+d.data:b.data+(Math.round(1E10*d.data)/1E10).toString());this.q.Va()};l.prototype.ds=function(b){this.first.get(b);var d=this.q.$a();this.lb.get(d);b.hb()&&d.hb()&&(b.data||d.data?b.za(1):b.za(0));this.q.Va()};l.prototype.Qr=
function(b){this.first.get(b);b.data?this.lb.get(b):this.Hj.get(b)};l.prototype.Sr=function(b){this.first.get(b);var d=this.q.$a();this.lb.get(d);b.za(b.data===d.data?1:0);this.q.Va()};l.prototype.cs=function(b){this.first.get(b);var d=this.q.$a();this.lb.get(d);b.za(b.data!==d.data?1:0);this.q.Va()};l.prototype.Zr=function(b){this.first.get(b);var d=this.q.$a();this.lb.get(d);b.za(b.data<d.data?1:0);this.q.Va()};l.prototype.$r=function(b){this.first.get(b);var d=this.q.$a();this.lb.get(d);b.za(b.data<=
d.data?1:0);this.q.Va()};l.prototype.Vr=function(b){this.first.get(b);var d=this.q.$a();this.lb.get(d);b.za(b.data>d.data?1:0);this.q.Va()};l.prototype.Wr=function(b){this.first.get(b);var d=this.q.$a();this.lb.get(d);b.za(b.data>=d.data?1:0);this.q.Va()};l.prototype.Tr=function(b){var d=this.Ee.vg();ea(d)?b.J(d):b.gc(d)};Pb=l;h.prototype.Af=function(){return this.type===U.gf};h.prototype.hb=function(){return this.type===U.hf||this.type===U.gf};h.prototype.xi=function(){return this.type===U.String};
h.prototype.Jf=function(){this.Af()||(this.xi()&&(this.data=parseFloat(this.data)),this.type=U.gf)};h.prototype.za=function(b){this.type=U.hf;this.data=Math.floor(b)};h.prototype.J=function(b){this.type=U.gf;this.data=b};h.prototype.gc=function(b){this.type=U.String;this.data=b};h.prototype.nu=function(b){ea(b)?(this.type=U.gf,this.data=b):N(b)?(this.type=U.String,this.data=b.toString()):(this.type=U.hf,this.data=0)};Sb=h;U={hf:0,gf:1,String:2}})();function V(l){this.b=l;this.jc=[]}
V.prototype.ob=function(){var l={},h,b,d,k,a,c,g,e;l.waits=[];var p=l.waits,u;h=0;for(b=this.jc.length;h<b;h++){c=this.jc[h];u={t:c.time,st:c.ou,s:c.qp,ev:c.kg.aa,sm:[],sols:{}};c.kg.uc[c.lc]&&(u.act=c.kg.uc[c.lc].aa);d=0;for(k=c.Ha.length;d<k;d++)u.sm.push(c.Ha[d].aa);for(a in c.hc)if(c.hc.hasOwnProperty(a)){g=this.b.B[parseInt(a,10)];e={sa:c.hc[a].ip,insts:[]};d=0;for(k=c.hc[a].Le.length;d<k;d++)e.insts.push(c.hc[a].Le[d].uid);u.sols[g.aa.toString()]=e}p.push(u)}return l};
V.prototype.Fb=function(l){l=l.waits;var h,b,d,k,a,c,g,e,p,u,s;h=this.jc.length=0;for(b=l.length;h<b;h++)if(c=l[h],e=this.b.Vm[c.ev.toString()]){p=-1;d=0;for(k=e.uc.length;d<k;d++)if(e.uc[d].aa===c.act){p=d;break}if(-1!==p){g={hc:{},Ha:[],en:!1};g.time=c.t;g.ou=c.st||"";g.qp=!!c.s;g.kg=e;g.lc=p;d=0;for(k=c.sm.length;d<k;d++)(e=this.b.ji(c.sm[d]))&&g.Ha.push(e);for(a in c.sols)if(c.sols.hasOwnProperty(a)&&(e=this.b.ji(parseInt(a,10)))){p=c.sols[a];u={ip:p.sa,Le:[]};d=0;for(k=p.insts.length;d<k;d++)(s=
this.b.ii(p.insts[d]))&&u.Le.push(s);g.hc[e.index.toString()]=u}this.jc.push(g)}}};
(function(){function l(){}function h(){}function b(){}var d=V.prototype;l.prototype.aq=function(){return!0};l.prototype.Km=function(){return!0};l.prototype.vq=function(){return!0};l.prototype.$p=function(a){var b=this.b.Lk(),d=b.P.Every_lastTime||0,k=this.b.$b.Y;"undefined"===typeof b.P.Every_seconds&&(b.P.Every_seconds=a);var h=b.P.Every_seconds;if(k>=d+h)return b.P.Every_lastTime=d+h,k>=b.P.Every_lastTime+.04&&(b.P.Every_lastTime=k),b.P.Every_seconds=a,!0;k<d-.1&&(b.P.Every_lastTime=k);return!1};
l.prototype.Wp=function(a,b,d){return Tb(a.vg(),b,d)};l.prototype.Zp=function(){var a=this.b.yb();return a.yk?!1:!a.Qe};l.prototype.Lm=function(){return!0};l.prototype.mq=function(){return!0};l.prototype.$j=function(){return!0};l.prototype.wq=function(){return!0};l.prototype.Zj=function(){return!0};l.prototype.Rp=function(a,b,d){return Fa(T(a),T(d))<=T(b)};l.prototype.cq=function(a,b){return Ha(T(a),T(b))};l.prototype.bq=function(a,b,d){a=Da(a);b=Da(b);d=Da(d);return Ha(d,b)?Ha(a,b)&&!Ha(a,d):!(!Ha(a,
b)&&Ha(a,d))};d.n=new l;h.prototype.Xp=function(a,b,d,k){if(b&&a&&(b=this.b.rk(a,b,d,k))){this.b.pc++;var h;this.b.trigger(Object.getPrototypeOf(a.xa).n.cg,b);if(b.Pb)for(d=0,k=b.siblings.length;d<k;d++)h=b.siblings[d],this.b.trigger(Object.getPrototypeOf(h.type.xa).n.cg,h);this.b.pc--;a=a.da();a.ra=!1;a.d.length=1;a.d[0]=b;if(b.Pb)for(d=0,k=b.siblings.length;d<k;d++)h=b.siblings[d],a=h.type.da(),a.ra=!1,a.d.length=1,a.d[0]=h}};h.prototype.Qp=function(a,b){0===a.Pp?ea(b)?a.wj(a.vg()+b):a.wj(a.vg()+
parseFloat(b)):1===a.Pp&&a.wj(a.vg()+b.toString())};var k=[],a=[];h.prototype.Cq=function(a){if(document.mozFullScreen||document.webkitIsFullScreen||document.msFullscreenElement||document.fullScreen||this.xf||0!==this.b.Jb)this.b.Gm=0!==a,this.b.setSize(this.b.Ff,this.b.Ef,!0)};d.ka=new h;b.prototype["int"]=function(a,b){N(b)?(a.za(parseInt(b,10)),isNaN(a.data)&&(a.data=0)):a.za(b)};b.prototype["float"]=function(a,b){N(b)?(a.J(parseFloat(b)),isNaN(a.data)&&(a.data=0)):a.J(b)};b.prototype.random=function(a,
b,d){void 0===d?a.J(Math.random()*b):a.J(Math.random()*(d-b)+b)};b.prototype.sqrt=function(a,b){a.J(Math.sqrt(b))};b.prototype.abs=function(a,b){a.J(Math.abs(b))};b.prototype.round=function(a,b){a.za(Math.round(b))};b.prototype.floor=function(a,b){a.za(Math.floor(b))};b.prototype.ceil=function(a,b){a.za(Math.ceil(b))};b.prototype.sin=function(a,b){a.J(Math.sin(T(b)))};b.prototype.cos=function(a,b){a.J(Math.cos(T(b)))};b.prototype.tan=function(a,b){a.J(Math.tan(T(b)))};b.prototype.asin=function(a,
b){a.J(xa(Math.asin(b)))};b.prototype.acos=function(a,b){a.J(xa(Math.acos(b)))};b.prototype.atan=function(a,b){a.J(xa(Math.atan(b)))};b.prototype.exp=function(a,b){a.J(Math.exp(b))};b.prototype.log10=function(a,b){a.J(Math.log(b)/Math.LN10)};b.prototype.max=function(a){var b=arguments[1];"number"!==typeof b&&(b=0);var d,k,h;d=2;for(k=arguments.length;d<k;d++)h=arguments[d],"number"===typeof h&&b<h&&(b=h);a.J(b)};b.prototype.min=function(a){var b=arguments[1];"number"!==typeof b&&(b=0);var d,k,h;d=
2;for(k=arguments.length;d<k;d++)h=arguments[d],"number"===typeof h&&b>h&&(b=h);a.J(b)};b.prototype.Ce=function(a){a.J(this.b.Ce)};b.prototype.ef=function(a){a.J(this.b.ef)};b.prototype.time=function(a){a.J(this.b.$b.Y)};b.prototype.Nc=function(a){a.za(this.b.Nc)};b.prototype.Vi=function(a){a.za(this.b.Vi)};b.prototype.Fk=function(a){a.za(this.b.Fk)};b.prototype.k=function(a,b,d,k,h){a.J(xa(Ea(b,d,k,h)))};b.prototype.find=function(a,b,d){N(b)&&N(d)?a.za(b.search(new RegExp(Wa(d),"i"))):a.za(-1)};
b.prototype.left=function(a,b,d){a.gc(N(b)?b.substr(0,d):"")};b.prototype.right=function(a,b,d){a.gc(N(b)?b.substr(b.length-d):"")};b.prototype.replace=function(a,b,d,k){N(b)&&N(d)&&N(k)?a.gc(b.replace(new RegExp(Wa(d),"gi"),k)):a.gc(N(b)?b:"")};b.prototype.trim=function(a,b){a.gc(N(b)?b.trim():"")};b.prototype.hr=function(a){var b=Q(Math.random()*(arguments.length-1));a.nu(arguments[b+1])};b.prototype.pk=function(a){a.J(this.b.pk/1E3)};b.prototype.Oi=function(a){a.J(this.b.Oi)};d.Sa=new b;d.cu=function(){var b,
d,e,h,l,s,z=this.b.yb();b=0;for(e=this.jc.length;b<e;b++){h=this.jc[b];if(-1===h.time){if(!h.qp)continue}else if(h.time>this.b.$b.Y)continue;z.nc=h.kg;z.lc=h.lc;z.Xa=0;for(d in h.hc)h.hc.hasOwnProperty(d)&&(l=this.b.B[parseInt(d,10)].da(),s=h.hc[d],l.ra=s.ip,ta(l.d,s.Le),l=s,l.Le.length=0,a.push(l));h.kg.au();this.b.ok(h.Ha);h.en=!0}d=b=0;for(e=this.jc.length;b<e;b++)h=this.jc[b],this.jc[d]=h,h.en?(Qa(h.hc),h.Ha.length=0,k.push(h)):d++;this.jc.length=d}})();
(function(){eb=function(h,b){var d=h[1],k=h[3],a=h[4],c=h[5],g=h[6],e=h[7],l=h[8];b.n||(b.n={});b.ka||(b.ka={});b.Sa||(b.Sa={});var u=b.n,s=b.ka,z=b.Sa;k&&(u.Nu=function(a,b){return Tb(this.x,a,b)},u.Ou=function(a,b){return Tb(this.y,a,b)},u.Uu=function(){var a=this.i;this.Ea();var b=this.Ba;return!(b.right<a.Pa||b.bottom<a.Qa||b.left>a.cb||b.top>a.bb)},u.dq=function(){this.Ea();var a=this.Ba,b=this.b.Da;return 0>a.right||0>a.bottom||a.left>b.width||a.top>b.height},u.hv=function(a,b,c){var d=this.da(),
e=d.Bc();if(!e.length)return!1;var g=e[0],f=g,k=Ja(g.x,g.y,b,c),h,l,p;h=1;for(l=e.length;h<l;h++)if(g=e[h],p=Ja(g.x,g.y,b,c),0===a&&p<k||1===a&&p>k)k=p,f=g;d.dh(f);return!0},s.wv=function(a){this.x!==a&&(this.x=a,this.N())},s.xv=function(a){this.y!==a&&(this.y=a,this.N())},s.uv=function(a,b){if(this.x!==a||this.y!==b)this.x=a,this.y=b,this.N()},s.vv=function(a,b){var c=a.Bs(this);if(c){var d;c.sg?(d=c.sg(b,!0),c=c.sg(b,!1)):(d=c.x,c=c.y);if(this.x!==d||this.y!==c)this.x=d,this.y=c,this.N()}},s.Zu=
function(a){0!==a&&(this.x+=Math.cos(this.k)*a,this.y+=Math.sin(this.k)*a,this.N())},s.Yu=function(a,b){0!==b&&(this.x+=Math.cos(T(a))*b,this.y+=Math.sin(T(a))*b,this.N())},z.ak=function(a){a.J(this.x)},z.bk=function(a){a.J(this.y)},z.Ce=function(a){a.J(this.b.tf(this))});a&&(u.Mu=function(a,b){return Tb(this.width,a,b)},u.Ku=function(a,b){return Tb(this.height,a,b)},s.Iq=function(a){this.width!==a&&(this.width=a,this.N())},s.sv=function(a){this.height!==a&&(this.height=a,this.N())},s.Fq=function(a,
b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.N()},z.Av=function(a){a.J(this.width)},z.Qu=function(a){a.J(this.height)},z.Gu=function(a){this.Ea();a.J(this.Ba.left)},z.Iu=function(a){this.Ea();a.J(this.Ba.top)},z.Hu=function(a){this.Ea();a.J(this.Ba.right)},z.Fu=function(a){this.Ea();a.J(this.Ba.bottom)});c&&(u.Rp=function(a,b){return Fa(this.k,T(b))<=T(a)},u.cq=function(a){return Ha(this.k,T(a))},u.bq=function(a,b){var c=Da(a),d=Da(b),e=za(this.k);return Ha(d,c)?Ha(e,c)&&
!Ha(e,d):!(!Ha(e,c)&&Ha(e,d))},s.Aq=function(a){a=T(ya(a));isNaN(a)||this.k===a||(this.k=a,this.N())},s.lv=function(a){0===a||isNaN(a)||(this.k+=T(a),this.k=za(this.k),this.N())},s.mv=function(a){0===a||isNaN(a)||(this.k-=T(a),this.k=za(this.k),this.N())},s.nv=function(a,b){var c=Ga(this.k,T(b),T(a));isNaN(c)||this.k===c||(this.k=c,this.N())},s.ov=function(a,b,c){a=Ga(this.k,Math.atan2(c-this.y,b-this.x),T(a));isNaN(a)||this.k===a||(this.k=a,this.N())},s.Hq=function(a,b){var c=Math.atan2(b-this.y,
a-this.x);isNaN(c)||this.k===c||(this.k=c,this.N())},z.Eu=function(a){a.J(Ba(this.k))});d||(u.Vp=function(a,b,c){return Tb(this.Ya[a],b,c)},u.Su=function(a){return this.Ya[a]},u.iv=function(a,b){var c=this.da(),d=c.Bc();if(!d.length)return!1;var e=d[0],g=e,f=e.Ya[b],k,h,l;k=1;for(h=d.length;k<h;k++)if(e=d[k],l=e.Ya[b],0===a&&l<f||1===a&&l>f)f=l,g=e;c.dh(g);return!0},u.gv=function(a){var b,c,d,e,g;if(this.b.Lk().fl){g=this.da();if(g.ra)for(g.ra=!1,g.d.length=0,g.ma.length=0,d=this.d,b=0,c=d.length;b<
c;b++)e=d[b],e.uid===a?g.ma.push(e):g.d.push(e);else{d=b=0;for(c=g.d.length;b<c;b++)e=g.d[b],g.d[d]=e,e.uid===a?g.ma.push(e):d++;g.d.length=d}this.Qc();return!!g.d.length}e=this.b.ii(a);if(!e)return!1;g=this.da();if(!g.ra&&-1===g.d.indexOf(e))return!1;if(this.G)for(a=e.type.Fa,b=0,c=a.length;b<c;b++){if(a[b]===this)return g.dh(e),this.Qc(),!0}else if(e.type===this)return g.dh(e),this.Qc(),!0;return!1},u.cg=function(){return!0},u.pq=function(){return!0},s.tv=function(a,b){var c=this.Ya;ea(c[a])?c[a]=
ea(b)?b:parseFloat(b):N(c[a])&&(c[a]=N(b)?b:b.toString())},s.Du=function(a,b){var c=this.Ya;ea(c[a])?c[a]=ea(b)?c[a]+b:c[a]+parseFloat(b):N(c[a])&&(c[a]=N(b)?c[a]+b:c[a]+b.toString())},s.Kq=function(a,b){var c=this.Ya;ea(c[a])&&(c[a]=ea(b)?c[a]-b:c[a]-parseFloat(b))},s.pv=function(a,b){this.Ya[a]=b?1:0},s.yv=function(a){this.Ya[a]=1-this.Ya[a]},s.Yp=function(){this.b.dd(this)},s.gq||(s.gq=function(a){var b,c;try{b=JSON.parse(a)}catch(d){return}this.b.Mi(this,b,!0);this.wd&&this.wd();if(this.O)for(a=
0,b=this.O.length;a<b;++a)c=this.O[a],c.wd&&c.wd()}),z.Pu=function(a){var b=a.Mf.d.length,c,d,e;c=0;for(d=this.b.Rc.length;c<d;c++)e=this.b.Rc[c],a.Mf.G?0<=e.type.Fa.indexOf(a.Mf)&&b++:e.type===a.Mf&&b++;a.za(b)},z.kv=function(a){a.za(a.Mf.da().Bc().length)},z.zv=function(a){a.za(this.uid)},z.Ru=function(a){a.za(this.wg())},z.Sp||(z.Sp=function(a){a.gc(JSON.stringify(this.b.am(this,!0)))}));g&&(u.Vu=function(){return this.visible},s.Nm=function(a){!a!==!this.visible&&(this.visible=a,this.b.fa=!0)},
u.Lu=function(a,b){return Tb(ab(100*this.opacity),a,b)},s.Dq=function(a){a/=100;0>a?a=0:1<a&&(a=1);a!==this.opacity&&(this.opacity=a,this.b.fa=!0)},z.Opacity=function(a){a.J(ab(100*this.opacity))});e&&(u.Tu=function(a){return a?this.i===a:!1},u.jv=function(a){var b=this.da(),c=b.Bc();if(!c.length)return!1;var d=c[0],e=d,g,f;g=1;for(f=c.length;g<f;g++)if(d=c[g],0===a){if(d.i.index>e.i.index||d.i.index===e.i.index&&d.Cc()>e.Cc())e=d}else if(d.i.index<e.i.index||d.i.index===e.i.index&&d.Cc()<e.Cc())e=
d;b.dh(e);return!0},s.bv=function(){var a=this.Cc();a!==this.i.d.length-1&&(sa(this.i.d,a),this.i.d.push(this),this.b.fa=!0,this.i.kc=!0)},s.$u=function(){var a=this.Cc();0!==a&&(sa(this.i.d,a),this.i.d.unshift(this),this.b.fa=!0,this.i.kc=!0)},s.av=function(a){a&&a!=this.i&&(sa(this.i.d,this.Cc()),this.i.kc=!0,this.i=a,this.ff=a.d.length,a.d.push(this),this.b.fa=!0)},s.Cv=function(a,b){var c=0===a;if(b){var d=b.un(this);if(d&&d.uid!==this.uid){this.i.index!==d.i.index&&(sa(this.i.d,this.Cc()),this.i.kc=
!0,this.i=d.i,this.ff=d.i.d.length,d.i.d.push(this));var e=this.Cc(),d=d.Cc();sa(this.i.d,e);e<d&&d--;c&&d++;d===this.i.d.length?this.i.d.push(this):this.i.d.splice(d,0,this);this.i.kc=!0;this.b.fa=!0}}},z.Xu=function(a){a.za(this.i.Go)},z.Wu=function(a){a.gc(this.i.name)},z.Bv=function(a){a.za(this.Cc())});l&&(s.qv=function(a,b){if(this.b.A){var c=this.type.Nk(b);if(!(0>c)){var d=1===a;this.Rd[c]!==d&&(this.Rd[c]=d,this.Od(),this.b.fa=!0)}}},s.rv=function(a,b,c){if(this.b.A){var d=this.type.Nk(a);
0>d||(a=this.type.M[d],d=this.Ja[d],b=Math.floor(b),0>b||b>=d.length||(1===this.b.A.Fs(a.pb,b)&&(c/=100),d[b]!==c&&(d[b]=c,a.fb&&(this.b.fa=!0))))}})};Ab=function(){this.kk=this.Hh=!0;this.type.Bh=!0;this.b.fa=!0;var h,b,d=this.hk;h=0;for(b=d.length;h<b;++h)d[h](this)};Bb=function(h){h&&this.hk.push(h)};Db=function(){if(this.Hh){var h=this.Ba,b=this.tb;h.set(this.x,this.y,this.x+this.width,this.y+this.height);h.offset(-this.Mb*this.width,-this.Nb*this.height);this.k?(h.offset(-this.x,-this.y),b.mp(h,
this.k),b.offset(this.x,this.y),b.Wm(h)):b.Uf(h);h.normalize();this.Hh=!1}};var l=new pa(0,0,0,0);Eb=function(){if(this.kk&&this.zd){this.Ea();var h=this.type.Nh,b=this.Mh,d=this.Ba;l.set(h.zh(d.left),h.Ah(d.top),h.zh(d.right),h.Ah(d.bottom));b.Nr(l)||(b.right<b.left?h.update(this,null,l):h.update(this,b,l),b.jr(l),this.kk=!1)}};Cb=function(h,b){return this.Ba.Wb(h,b)&&this.tb.Wb(h,b)?this.la&&!this.la.zf()?(this.la.nf(this.width,this.height,this.k),this.la.Wb(h-this.x,b-this.y)):!0:!1};wb=function(){this.type.Qj();
return this.Je};Fb=function(){this.i.Np();return this.ff};Gb=function(){this.ja.length=0;var h,b;h=0;for(b=this.Rd.length;h<b;h++)this.Rd[h]&&this.ja.push(this.type.M[h]);this.Op=!!this.ja.length};xb=function(){return"Inst"+this.cp};hb=function(h){if(h&&h.Pb&&h.type!=this){var b,d,k;b=0;for(d=h.siblings.length;b<d;b++)if(k=h.siblings[b],k.type==this)return k}h=this.da().Bc();return h.length?h[0]:null};ib=function(h){var b=this.da().Bc();return b.length?b[h.wg()%b.length]:null};gb=function(){if(this.Xf&&
!this.G){var h,b;h=0;for(b=this.d.length;h<b;h++)this.d[h].Je=h;var d=h,k=this.b.Rc;h=0;for(b=k.length;h<b;++h)k[h].type===this&&(k[h].Je=d++);this.Xf=!1}};ub=function(h){if(h<this.d.length)return this.d[h];h-=this.d.length;var b=this.b.Rc,d,k;d=0;for(k=b.length;d<k;++d)if(b[d].type===this){if(0===h)return b[d];--h}return null};jb=function(){return this.qe[this.Cd]};nb=function(){this.Cd++;this.Cd===this.qe.length?this.qe.push(new fb(this)):this.qe[this.Cd].ra=!0};ob=function(){this.Cd++;this.Cd===
this.qe.length&&this.qe.push(new fb(this));var h=this.qe[this.Cd],b=this.qe[this.Cd-1];b.ra?h.ra=!0:(h.ra=!1,ta(h.d,b.d),ta(h.ma,b.ma))};pb=function(){this.Cd--};qb=function(h){var b,d,k,a,c,g=0;if(!this.G)for(b=0,d=this.Fa.length;b<d;b++)for(c=this.Fa[b],k=0,a=c.Ra.length;k<a;k++){if(h===c.Ra[k].name)return this.P.lastBehIndex=g,c.Ra[k];g++}b=0;for(d=this.Ra.length;b<d;b++){if(h===this.Ra[b].name)return this.P.lastBehIndex=g,this.Ra[b];g++}return null};rb=function(h){return this.gi(h)?this.P.lastBehIndex:
-1};sb=function(h){var b,d;b=0;for(d=this.M.length;b<d;b++)if(this.M[b].name===h)return b;return-1};tb=function(){if(this.Pb&&!this.G){var h,b,d,k,a,c,g;this.Qj();c=this.da();var e=c.ra,l=(h=this.b.yb())&&h.nc&&h.nc.Wc;h=0;for(b=this.Vb.length;h<b;h++)if(a=this.Vb[h],a!==this&&(a.Qj(),g=a.da(),g.ra=e,!e)){g.d.length=c.d.length;d=0;for(k=c.d.length;d<k;d++)g.d[d]=a.vn(c.d[d].Je);if(l)for(g.ma.length=c.ma.length,d=0,k=c.ma.length;d<k;d++)g.ma[d]=a.vn(c.ma[d].Je)}}};vb=function(){return"Type"+this.aa};
Tb=function(h,b,d){if("undefined"===typeof h||"undefined"===typeof d)return!1;switch(b){case 0:return h===d;case 1:return h!==d;case 2:return h<d;case 3:return h<=d;case 4:return h>d;case 5:return h>=d;default:return!1}}})();var bc={};function dc(l){this.b=l}
(function(){function l(a){a=Math.pow(10,a/20);0>a&&(a=0);1<a&&(a=1);return a}function h(a){0>a&&(a=0);1<a&&(a=1);return Math.log(a)/Math.log(10)*20}function b(a){a=a.toLowerCase();return R.hasOwnProperty(a)&&R[a].length?R[a][0].oc():w.destination}function d(){return w.createGain?w.createGain():w.createGainNode()}function k(a){return w.createDelay?w.createDelay(a):w.createDelayNode(a)}function a(a){a.start?a.start(0):a.noteOn(0)}function c(a,b,c){a.start?a.start(0,b):a.noteGrainOn(0,b,c-b)}function g(a){try{a.stop?
a.stop(0):a.noteOff(0)}catch(b){}}function e(a,b,c,e,f,g){this.type="filter";this.Xc=[a,b,c,e,f,g];this.ba=d();this.L=d();this.L.gain.value=g;this.K=d();this.K.gain.value=1-g;this.Ta=w.createBiquadFilter();this.Ta.type="number"===typeof this.Ta.type?a:uc[a];this.Ta.frequency.value=b;this.Ta.detune&&(this.Ta.detune.value=c);this.Ta.Q.value=e;this.Ta.gain.value=f;this.ba.connect(this.Ta);this.ba.connect(this.K);this.Ta.connect(this.L)}function p(a,b,c){this.type="delay";this.Xc=[a,b,c];this.ba=d();
this.L=d();this.L.gain.value=c;this.K=d();this.K.gain.value=1-c;this.Wg=d();this.zc=k(a);this.zc.delayTime.value=a;this.Vh=d();this.Vh.gain.value=b;this.ba.connect(this.Wg);this.ba.connect(this.K);this.Wg.connect(this.L);this.Wg.connect(this.zc);this.zc.connect(this.Vh);this.Vh.connect(this.Wg)}function u(a,b,c,e){this.type="convolve";this.Xc=[b,c,e];this.ba=d();this.L=d();this.L.gain.value=c;this.K=d();this.K.gain.value=1-c;this.ze=w.createConvolver();a&&(this.ze.normalize=b,this.ze.buffer=a);this.ba.connect(this.ze);
this.ba.connect(this.K);this.ze.connect(this.L)}function s(b,c,e,f,g){this.type="flanger";this.Xc=[b,c,e,f,g];this.ba=d();this.K=d();this.K.gain.value=1-g/2;this.L=d();this.L.gain.value=g/2;this.ai=d();this.ai.gain.value=f;this.zc=k(b+c);this.zc.delayTime.value=b;this.kb=w.createOscillator();this.kb.frequency.value=e;this.ec=d();this.ec.gain.value=c;this.ba.connect(this.zc);this.ba.connect(this.K);this.zc.connect(this.L);this.zc.connect(this.ai);this.ai.connect(this.zc);this.kb.connect(this.ec);this.ec.connect(this.zc.delayTime);
a(this.kb)}function z(b,c,e,f,g,k){this.type="phaser";this.Xc=[b,c,e,f,g,k];this.ba=d();this.K=d();this.K.gain.value=1-k/2;this.L=d();this.L.gain.value=k/2;this.Ta=w.createBiquadFilter();this.Ta.type="number"===typeof this.Ta.type?7:"allpass";this.Ta.frequency.value=b;this.Ta.detune&&(this.Ta.detune.value=c);this.Ta.Q.value=e;this.kb=w.createOscillator();this.kb.frequency.value=g;this.ec=d();this.ec.gain.value=f;this.ba.connect(this.Ta);this.ba.connect(this.K);this.Ta.connect(this.L);this.kb.connect(this.ec);
this.ec.connect(this.Ta.frequency);a(this.kb)}function r(a){this.type="gain";this.Xc=[a];this.ea=d();this.ea.gain.value=a}function y(b,c){this.type="tremolo";this.Xc=[b,c];this.ea=d();this.ea.gain.value=1-c/2;this.kb=w.createOscillator();this.kb.frequency.value=b;this.ec=d();this.ec.gain.value=c/2;this.kb.connect(this.ec);this.ec.connect(this.ea.gain);a(this.kb)}function x(b,c){this.type="ringmod";this.Xc=[b,c];this.ba=d();this.L=d();this.L.gain.value=c;this.K=d();this.K.gain.value=1-c;this.kh=d();
this.kh.gain.value=0;this.kb=w.createOscillator();this.kb.frequency.value=b;this.kb.connect(this.kh.gain);a(this.kb);this.ba.connect(this.kh);this.ba.connect(this.K);this.kh.connect(this.L)}function n(a,b,c,e,f){this.type="distortion";this.Xc=[a,b,c,e,f];this.ba=d();this.gj=d();this.fj=d();this.ju(c,Math.pow(10,e/20));this.L=d();this.L.gain.value=f;this.K=d();this.K.gain.value=1-f;this.Uj=w.createWaveShaper();this.Th=new Float32Array(65536);this.ts(a,b);this.Uj.Th=this.Th;this.ba.connect(this.gj);
this.ba.connect(this.K);this.gj.connect(this.Uj);this.Uj.connect(this.fj);this.fj.connect(this.L)}function m(a,b,c,d,e){this.type="compressor";this.Xc=[a,b,c,d,e];this.ea=w.createDynamicsCompressor();try{this.ea.threshold.value=a,this.ea.knee.value=b,this.ea.ratio.value=c,this.ea.attack.value=d,this.ea.release.value=e}catch(f){}}function v(a,b){this.type="analyser";this.Xc=[a,b];this.ea=w.createAnalyser();this.ea.fftSize=a;this.ea.smoothingTimeConstant=b;this.qs=new Float32Array(this.ea.frequencyBinCount);
this.pp=new Uint8Array(a);this.bh=0}function f(){this.I=null;this.Ni=0;this.re=[];this.Fl=this.Ci=this.Bi=0}function q(a,b){this.src=a;this.X=D;this.Uc=b;this.Rm=!1;var c=this;this.El=this.Ml=null;this.Xe=[];this.rj=0;this.Hm=this.Dk=this.up=this.bj=!1;1===D&&b&&(this.X=0,this.Ml=d());this.xe=this.na=null;var e;switch(this.X){case 0:this.na=new Audio;this.na.addEventListener("canplaythrough",function(){c.Hm=!0});1===D&&w.createMediaElementSource&&!/wiiu/i.test(navigator.userAgent)&&(this.up=!0,this.na.addEventListener("canplay",
function(){c.El||(c.El=w.createMediaElementSource(c.na),c.El.connect(c.Ml))}));this.na.autoplay=!1;this.na.Jv="auto";this.na.src=a;break;case 1:e=new XMLHttpRequest;e.open("GET",a,!0);e.responseType="arraybuffer";e.onload=function(){c.xe=e.response;c.nr()};e.onerror=function(){c.Dk=!0};e.send();break;case 2:this.na=!0;break;case 3:this.na=!0}}function t(a,c){var e=this;this.tag=c;this.ic=this.jd=!0;this.src=a.src;this.buffer=a;this.X=D;this.Uc=a.Uc;this.playbackRate=1;this.Ol=!0;this.Ec=this.Kd=!1;
this.Rb=0;this.Fg=this.Bf=this.ld=!1;this.volume=1;this.Oe=1===H&&!this.Uc||2===H;this.Lf=1;this.startTime=this.Oe?K.$b.Y:K.vd.Y;this.Na=this.Ua=null;this.nd=!1;this.Ma=null;this.Qo=this.Po=this.Oo=this.No=this.So=this.Ro=0;this.m=null;var f=!1;1!==this.X||0!==this.buffer.X||this.buffer.up||(this.X=0);switch(this.X){case 0:this.Uc?(this.m=a.na,f=!a.Rm,a.Rm=!0):(this.m=new Audio,this.m.autoplay=!1,this.m.src=a.na.src,f=!0);f&&this.m.addEventListener("ended",function(){P=e.tag;e.ic=!0;K.trigger(dc.prototype.n.Yj,
ka)});break;case 1:this.Ua=d();this.Ua.connect(b(c));1===this.buffer.X?a.na&&(this.m=w.createBufferSource(),this.m.buffer=a.na,this.m.connect(this.Ua)):(this.m=this.buffer.na,this.buffer.Ml.connect(this.Ua));break;case 2:this.m=new window.Media(G+this.src,null,null,function(a){a===window.Media.MEDIA_STOPPED&&(e.Ol=!0,e.ic=!0,P=e.tag,K.trigger(dc.prototype.n.Yj,ka))});break;case 3:this.m=!0}}function O(a,b){R.hasOwnProperty(a)?R[a].push(b):R[a]=[b];var c,d,e,f,g=w.destination;if(R.hasOwnProperty(a)&&
(e=R[a],e.length))for(g=e[0].oc(),c=0,d=e.length;c<d;c++)f=e[c],c+1===d?f.wc(w.destination):f.wc(e[c+1].oc());Ca.length=0;if(a.length)for(c=0,d=B.length;c<d;c++)e=B[c],bb(a,e.tag)&&Ca.push(e);else C&&!C.Ie()&&(Ca.length=1,Ca[0]=C);c=0;for(d=Ca.length;c<d;c++)Ca[c].Yt(g);Aa&&kb===a&&(Aa.disconnect(),Aa.connect(g))}function X(){}function J(){}var E=dc.prototype;E.ta=function(a){this.xa=a;this.b=a.b};E.ta.prototype.R=function(){};var K=null,ka=null,P="",G="",D=0,w=null,F=[],B=[],C=null,S=!1,H=0,I=!1,
L=1,Y=0,Z=0,lb=1,mb=1,kc=10,lc=1E4,mc=1,Aa=null,kb="",La=!1,Ma=[],R={},uc="lowpass highpass bandpass lowshelf highshelf peaking notch allpass".split(" ");e.prototype.wc=function(a){this.L.disconnect();this.L.connect(a);this.K.disconnect();this.K.connect(a)};e.prototype.remove=function(){this.ba.disconnect();this.Ta.disconnect();this.L.disconnect();this.K.disconnect()};e.prototype.oc=function(){return this.ba};p.prototype.wc=function(a){this.L.disconnect();this.L.connect(a);this.K.disconnect();this.K.connect(a)};
p.prototype.remove=function(){this.ba.disconnect();this.Wg.disconnect();this.zc.disconnect();this.Vh.disconnect();this.L.disconnect();this.K.disconnect()};p.prototype.oc=function(){return this.ba};u.prototype.wc=function(a){this.L.disconnect();this.L.connect(a);this.K.disconnect();this.K.connect(a)};u.prototype.remove=function(){this.ba.disconnect();this.ze.disconnect();this.L.disconnect();this.K.disconnect()};u.prototype.oc=function(){return this.ba};s.prototype.wc=function(a){this.K.disconnect();
this.K.connect(a);this.L.disconnect();this.L.connect(a)};s.prototype.remove=function(){this.ba.disconnect();this.zc.disconnect();this.kb.disconnect();this.ec.disconnect();this.K.disconnect();this.L.disconnect();this.ai.disconnect()};s.prototype.oc=function(){return this.ba};z.prototype.wc=function(a){this.K.disconnect();this.K.connect(a);this.L.disconnect();this.L.connect(a)};z.prototype.remove=function(){this.ba.disconnect();this.Ta.disconnect();this.kb.disconnect();this.ec.disconnect();this.K.disconnect();
this.L.disconnect()};z.prototype.oc=function(){return this.ba};r.prototype.wc=function(a){this.ea.disconnect();this.ea.connect(a)};r.prototype.remove=function(){this.ea.disconnect()};r.prototype.oc=function(){return this.ea};y.prototype.wc=function(a){this.ea.disconnect();this.ea.connect(a)};y.prototype.remove=function(){this.kb.disconnect();this.ec.disconnect();this.ea.disconnect()};y.prototype.oc=function(){return this.ea};x.prototype.wc=function(a){this.L.disconnect();this.L.connect(a);this.K.disconnect();
this.K.connect(a)};x.prototype.remove=function(){this.kb.disconnect();this.kh.disconnect();this.ba.disconnect();this.L.disconnect();this.K.disconnect()};x.prototype.oc=function(){return this.ba};n.prototype.ju=function(a,b){.01>a&&(a=.01);this.gj.gain.value=a;this.fj.gain.value=Math.pow(1/a,.6)*b};n.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};n.prototype.ts=function(a,b){for(var c=Math.pow(10,a/20),d=Math.pow(10,b/20),e=
0,f=0;32768>f;++f)e=f/32768,e=this.shape(e,c,d),this.Th[32768+f]=e,this.Th[32768-f-1]=-e};n.prototype.wc=function(a){this.L.disconnect();this.L.connect(a);this.K.disconnect();this.K.connect(a)};n.prototype.remove=function(){this.ba.disconnect();this.gj.disconnect();this.Uj.disconnect();this.fj.disconnect();this.L.disconnect();this.K.disconnect()};n.prototype.oc=function(){return this.ba};m.prototype.wc=function(a){this.ea.disconnect();this.ea.connect(a)};m.prototype.remove=function(){this.ea.disconnect()};
m.prototype.oc=function(){return this.ea};v.prototype.Aa=function(){this.ea.getFloatFrequencyData(this.qs);this.ea.getByteTimeDomainData(this.pp);for(var a=this.ea.fftSize,b=0,c=this.bh=0,d=0;b<a;b++)d=(this.pp[b]-128)/128,0>d&&(d=-d),this.bh<d&&(this.bh=d),c+=d*d;this.bh=h(this.bh);h(Math.sqrt(c/a))};v.prototype.wc=function(a){this.ea.disconnect();this.ea.connect(a)};v.prototype.remove=function(){this.ea.disconnect()};v.prototype.oc=function(){return this.ea};f.prototype.Qf=function(a){if(this.I=
a)this.Bi=this.I.x,this.Ci=this.I.y;this.re.length=0};f.prototype.pi=function(){return!!this.I};f.prototype.Aa=function(a){this.I&&0!==a&&(this.Fl=Ea(this.Bi,this.Ci,this.I.x,this.I.y),a=Ja(this.Bi,this.Ci,this.I.x,this.I.y)/a,4>this.re.length||this.re.shift(),this.re.push(a),this.Bi=this.I.x,this.Ci=this.I.y)};f.prototype.yn=function(){if(!this.re.length)return 0;var a,b,c=0;a=0;for(b=this.re.length;a<b;a++)c+=this.re[a];return c/this.re.length};f.prototype.Rk=function(){return Math.cos(this.Fl)*
this.yn()};f.prototype.Sk=function(){return Math.sin(this.Fl)*this.yn()};var nc=!1;q.prototype.nr=function(){if(!this.na&&this.xe){var a=this;if(w.decodeAudioData)w.decodeAudioData(this.xe,function(b){a.na=b;a.xe=null;var c,d,e;if(da(a.cj)||I)da(a.Oh)||(c=a.Oh.ze,c.normalize=a.Fo,c.buffer=b);else if(a.Xe.length){c=0;for(d=a.Xe.length;c<d;c++){b=a.Xe[c];e=new t(a,b.tm);e.tj(!0);if("undefined"!==typeof b.Ho&&(b.I=K.ii(b.Ho),!b.I))continue;if(b.I){var f=Ia(b.I.x,b.I.y,-b.I.i.Ga(),Y,Z,!0),g=Ia(b.I.x,
b.I.y,-b.I.i.Ga(),Y,Z,!1);e.sj(f,g,xa(b.I.k-b.I.i.Ga()),b.qi,b.Ti,b.Wi);e.Qf(b.I)}else e.sj(b.x,b.y,b.Oq,b.qi,b.Ti,b.Wi);e.play(a.Bl,a.Em,a.rj);a.bj&&e.pause();B.push(e)}a.Xe.length=0}else e=new t(a,a.cj),e.play(a.Bl,a.Em,a.rj),a.bj&&e.pause(),B.push(e)},function(){a.Dk=!0});else if(this.na=w.createBuffer(this.xe,!1),this.xe=null,da(this.cj)||I)da(this.Oh)||(b=this.Oh.ze,b.normalize=this.Fo,b.buffer=this.na);else{var b=new t(this,this.cj);b.play(this.Bl,this.Em,this.rj);this.bj&&b.pause();B.push(b)}}};
q.prototype.Kn=function(){switch(this.X){case 0:var a=4<=this.na.readyState;a&&(this.Hm=!0);return a||this.Hm;case 1:return!!this.xe||!!this.na;case 2:return!0;case 3:return!0}return!1};q.prototype.mt=function(){switch(this.X){case 0:return this.Kn();case 1:return!!this.na;case 2:return!0;case 3:return!0}return!1};q.prototype.$s=function(){switch(this.X){case 0:return!!this.na.error;case 1:return this.Dk}return!1};t.prototype.Ie=function(){var a;switch(this.X){case 0:return this.m.ended;case 1:if(1===
this.buffer.X){if(!this.jd&&!this.ic&&this.m.loop||this.Ec)return!1;a=this.Oe?K.$b.Y:K.vd.Y;return a-this.startTime>this.buffer.na.duration}return this.m.ended;case 2:return this.Ol;case 3:!0}return!0};t.prototype.br=function(){return this.jd||this.ic?!0:this.Ie()};t.prototype.tj=function(a){1===D&&(!this.nd&&a?this.Ua&&(this.Na||(this.Na=w.createPanner(),this.Na.panningModel="number"===typeof this.Na.panningModel?lb:["equalpower","HRTF","soundfield"][lb],this.Na.distanceModel="number"===typeof this.Na.distanceModel?
mb:["linear","inverse","exponential"][mb],this.Na.refDistance=kc,this.Na.maxDistance=lc,this.Na.rolloffFactor=mc),this.Ua.disconnect(),this.Ua.connect(this.Na),this.Na.connect(b(this.tag)),this.nd=!0):this.nd&&!a&&this.Ua&&(this.Na.disconnect(),this.Ua.disconnect(),this.Ua.connect(b(this.tag)),this.nd=!1))};t.prototype.sj=function(a,b,c,d,e,f){this.nd&&1===D&&(this.Na.setPosition(a,b,0),this.Na.setOrientation(Math.cos(T(c)),Math.sin(T(c)),0),this.Na.coneInnerAngle=d,this.Na.coneOuterAngle=e,this.Na.coneOuterGain=
f,this.Ro=a,this.So=b,this.No=c,this.Oo=d,this.Po=e,this.Qo=f)};t.prototype.Qf=function(a){this.nd&&1===D&&(this.Ma||(this.Ma=new f),this.Ma.Qf(a))};t.prototype.Aa=function(a){if(this.nd&&1===D&&this.Ma&&this.Ma.pi()&&this.yf()){this.Ma.Aa(a);a=this.Ma.I;var b=Ia(a.x,a.y,-a.i.Ga(),Y,Z,!0),c=Ia(a.x,a.y,-a.i.Ga(),Y,Z,!1);this.Na.setPosition(b,c,0);b=0;"undefined"!==typeof this.Ma.I.k&&(b=a.k-a.i.Ga(),this.Na.setOrientation(Math.cos(b),Math.sin(b),0));b=Ia(this.Ma.Rk(),this.Ma.Sk(),-a.i.Ga(),0,0,!0);
c=Ia(this.Ma.Rk(),this.Ma.Sk(),-a.i.Ga(),0,0,!1);this.Na.setVelocity(b,c,0)}};t.prototype.play=function(b,d,e){var f=this.m;this.ld=b;this.volume=d;e=e||0;switch(this.X){case 0:1!==f.playbackRate&&(f.playbackRate=1);f.volume!==d*L&&(f.volume=d*L);f.loop!==b&&(f.loop=b);f.muted&&(f.muted=!1);if(f.currentTime!==e)try{f.currentTime=e}catch(g){}if(this.Uc&&La&&!K.Zb)Ma.push(this);else try{this.m.play()}catch(k){console&&console.log&&console.log("[C2] WARNING: exception trying to play audio '"+this.buffer.src+
"': ",k)}break;case 1:this.muted=!1;this.Lf=1;if(1===this.buffer.X)this.jd||(this.m=w.createBufferSource(),this.m.buffer=this.buffer.na,this.m.connect(this.Ua)),this.m.loop=b,this.Ua.gain.value=d*L,0===e?a(this.m):c(this.m,e,this.Ge());else{1!==f.playbackRate&&(f.playbackRate=1);f.loop!==b&&(f.loop=b);this.Ua.gain.value=d*L;if(f.currentTime!==e)try{f.currentTime=e}catch(h){}this.Uc&&La&&!K.Zb?Ma.push(this):f.play()}break;case 2:(!this.jd&&this.ic||0!==e)&&f.seekTo(e);f.play();this.Ol=!1;break;case 3:K.Ob?
AppMobi.context.playSound(this.src,b):AppMobi.player.playSound(this.src,b)}this.playbackRate=1;this.startTime=(this.Oe?K.$b.Y:K.vd.Y)-e;this.Ec=this.ic=this.jd=!1};t.prototype.stop=function(){switch(this.X){case 0:this.m.paused||this.m.pause();break;case 1:1===this.buffer.X?g(this.m):this.m.paused||this.m.pause();break;case 2:this.m.stop();break;case 3:K.Ob&&AppMobi.context.stopSound(this.src)}this.ic=!0;this.Ec=!1};t.prototype.pause=function(){if(!(this.jd||this.ic||this.Ie()||this.Ec)){switch(this.X){case 0:this.m.paused||
this.m.pause();break;case 1:1===this.buffer.X?(this.Rb=this.Pk(),this.ld&&(this.Rb%=this.Ge()),g(this.m)):this.m.paused||this.m.pause();break;case 2:this.m.pause();break;case 3:K.Ob&&AppMobi.context.stopSound(this.src)}this.Ec=!0}};t.prototype.$t=function(){if(!(this.jd||this.ic||this.Ie())&&this.Ec){switch(this.X){case 0:this.m.play();break;case 1:1===this.buffer.X?(this.m=w.createBufferSource(),this.m.buffer=this.buffer.na,this.m.connect(this.Ua),this.m.loop=this.ld,this.Ua.gain.value=L*this.volume*
this.Lf,this.startTime=(this.Oe?K.$b.Y:K.vd.Y)-this.Rb,c(this.m,this.Rb,this.Ge())):this.m.play();break;case 2:this.m.play();break;case 3:K.Ob&&AppMobi.context.resumeSound(this.src)}this.Ec=!1}};t.prototype.seek=function(a){if(!(this.jd||this.ic||this.Ie()))switch(this.X){case 0:try{this.m.currentTime=a}catch(b){}break;case 1:if(1===this.buffer.X)this.Ec?this.Rb=a:(this.pause(),this.Rb=a,this.$t());else try{this.m.currentTime=a}catch(c){}break;case 3:K.Ob&&AppMobi.context.seekSound(this.src,a)}};
t.prototype.Yt=function(a){1===this.X&&(this.nd?(this.Na.disconnect(),this.Na.connect(a)):(this.Ua.disconnect(),this.Ua.connect(a)))};t.prototype.Ge=function(){switch(this.X){case 0:if("undefined"!==typeof this.m.duration)return this.m.duration;break;case 1:return this.buffer.na.duration;case 2:return this.m.getDuration();case 3:if(K.Ob)return AppMobi.context.getDurationSound(this.src)}return 0};t.prototype.Pk=function(){var a=this.Ge(),b=0;switch(this.X){case 0:"undefined"!==typeof this.m.currentTime&&
(b=this.m.currentTime);break;case 1:if(1===this.buffer.X){if(this.Ec)return this.Rb;b=(this.Oe?K.$b.Y:K.vd.Y)-this.startTime}else"undefined"!==typeof this.m.currentTime&&(b=this.m.currentTime);break;case 3:K.Ob&&(b=AppMobi.context.getPlaybackTimeSound(this.src))}!this.ld&&b>a&&(b=a);return b};t.prototype.yf=function(){return!this.Ec&&!this.jd&&!this.ic&&!this.Ie()};t.prototype.yu=function(){var a=this.volume*L;switch(this.X){case 0:this.m.volume&&this.m.volume!==a&&(this.m.volume=a);break;case 1:this.Ua.gain.value=
a*this.Lf}};t.prototype.Wh=function(a){switch(this.X){case 0:this.m.muted!==!!a&&(this.m.muted=!!a);break;case 1:this.Lf=a?0:1,this.Ua.gain.value=L*this.volume*this.Lf}};t.prototype.ku=function(){this.Bf=!0;this.Wh(this.Bf||this.Fg)};t.prototype.uj=function(a){this.Fg=!!a;this.Wh(this.Bf||this.Fg)};t.prototype.Lp=function(){var a=this.playbackRate;this.Oe&&(a*=K.ef);switch(this.X){case 0:this.m.playbackRate!==a&&(this.m.playbackRate=a);break;case 1:1===this.buffer.X?this.m.playbackRate.value!==a&&
(this.m.playbackRate.value=a):this.m.playbackRate!==a&&(this.m.playbackRate=a)}};t.prototype.mu=function(a){switch(this.X){case 0:a?this.yf()?(this.m.pause(),this.Kd=!0):this.Kd=!1:this.Kd&&this.m.play();break;case 1:a?this.yf()?(1===this.buffer.X?(this.Rb=this.Pk(),this.ld&&(this.Rb%=this.Ge()),g(this.m)):this.m.pause(),this.Kd=!0):this.Kd=!1:this.Kd&&(1===this.buffer.X?(this.m=w.createBufferSource(),this.m.buffer=this.buffer.na,this.m.connect(this.Ua),this.m.loop=this.ld,this.Ua.gain.value=L*this.volume*
this.Lf,this.startTime=(this.Oe?K.$b.Y:K.vd.Y)-this.Rb,c(this.m,this.Rb,this.Ge())):this.m.play());break;case 2:a?this.yf()?(this.m.pause(),this.Kd=!0):this.Kd=!1:this.Kd&&this.m.play()}};E.ga=function(b){this.type=b;K=this.b=b.b;ka=this;this.Eb=null;this.Ng=-600;!(this.b.yi||this.b.ri&&(this.b.Cg||this.b.si))||this.b.Dg||this.b.Ca||(La=!0);w=null;"undefined"!==typeof AudioContext?(D=1,w=new AudioContext):"undefined"!==typeof webkitAudioContext&&(D=1,w=new webkitAudioContext);(this.b.yi&&1===D||La)&&
document.addEventListener("touchstart",function(){var b,c,d;!nc&&w&&(b=w.createBuffer(1,1,22050),c=w.createBufferSource(),c.buffer=b,c.connect(w.destination),a(c),nc=!0);if(La){if(!I)for(b=0,c=Ma.length;b<c;++b)d=Ma[b],d.ic||d.Ec||d.m.play();Ma.length=0}},!0);1!==D&&(this.b.ae&&"undefined"!==typeof window.Media?D=2:this.b.Jn&&(D=3));2===D&&(G=location.href,b=G.lastIndexOf("/"),-1<b&&(G=G.substr(0,b+1)),G=G.replace("file://",""));if(this.b.Ln&&this.b.nt&&"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.dd(this);else{if(this.b.Ob)S=this.b.ri;else try{S=!!(new Audio).canPlayType('audio/ogg; codecs="vorbis"')}catch(c){S=!1}this.b.sh(this)}};var ga=E.ga.prototype;ga.R=function(){this.b.mf=this;H=this.C[0];this.Ld=this.C[1];this.Nt=0!==this.C[2];lb=this.C[3];mb=this.C[4];this.Ng=-this.C[5];kc=this.C[6];lc=this.C[7];mc=this.C[8];this.Eb=new f;var a=this.b.V||this.b.width,c=this.b.U||this.b.height;1===D&&(w.listener.speedOfSound=this.C[9],w.listener.dopplerFactor=this.C[10],w.listener.setPosition(a/
2,c/2,this.Ng),w.listener.setOrientation(0,0,1,0,-1,0),window.c2OnAudioMicStream=function(a,c){Aa&&Aa.disconnect();kb=c.toLowerCase();Aa=w.createMediaStreamSource(a);Aa.connect(b(kb))});this.b.Qq(function(a){ka.Jt(a)});var d=this;this.b.Pm(function(a){d.Et(a)})};ga.Et=function(a){var b,c,d;b=0;for(c=B.length;b<c;b++)d=B[b],d.Ma&&d.Ma.I===a&&(d.Ma.I=null,d.nd&&d.yf()&&d.ld&&d.stop());this.Eb.I===a&&(this.Eb.I=null)};ga.ob=function(){var a={silent:I,masterVolume:L,listenerZ:this.Ng,listenerUid:this.Eb.pi()?
this.Eb.I.uid:-1,playing:[],effects:{}},b=a.playing,c,d,e,f,g,k;c=0;for(d=B.length;c<d;c++)e=B[c],!e.yf()||3===this.Ld||e.Uc&&1===this.Ld||!e.Uc&&2===this.Ld||(f=e.Pk(),e.ld&&(f%=e.Ge()),f={tag:e.tag,buffersrc:e.buffer.src,is_music:e.Uc,playbackTime:f,volume:e.volume,looping:e.ld,muted:e.Bf,playbackRate:e.playbackRate,paused:e.Ec,resume_position:e.Rb},e.nd&&(f.pan={},k=f.pan,e.Ma&&e.Ma.pi()?k.objUid=e.Ma.I.uid:(k.x=e.Ro,k.y=e.So,k.a=e.No),k.ia=e.Oo,k.oa=e.Po,k.og=e.Qo),b.push(f));b=a.effects;for(g in R)if(R.hasOwnProperty(g)){e=
[];c=0;for(d=R[g].length;c<d;c++)e.push({type:R[g][c].type,params:R[g][c].Xc});b[g]=e}return a};var Na=[];ga.Fb=function(a){var b=a.silent;L=a.masterVolume;this.Ng=a.listenerZ;this.Eb.Qf(null);var c=a.listenerUid;-1!==c&&(this.Eb.Ni=c,Na.push(this.Eb));var c=a.playing,d,g,k,h,l,q,t,J,w,A,E;if(3!==this.Ld)for(d=0,g=B.length;d<g;d++)w=B[d],w.Uc&&1===this.Ld||(w.Uc||2!==this.Ld)&&w.stop();for(l in R)if(R.hasOwnProperty(l))for(d=0,g=R[l].length;d<g;d++)R[l][d].remove();Qa(R);for(l in a.effects)if(a.effects.hasOwnProperty(l))for(q=
a.effects[l],d=0,g=q.length;d<g;d++)switch(k=q[d].type,A=q[d].params,k){case "filter":O(l,new e(A[0],A[1],A[2],A[3],A[4],A[5]));break;case "delay":O(l,new p(A[0],A[1],A[2]));break;case "convolve":k=A[2];w=this.rg(k,!1);w.na?k=new u(w.na,A[0],A[1],k):(k=new u(null,A[0],A[1],k),w.Fo=A[0],w.Oh=k);O(l,k);break;case "flanger":O(l,new s(A[0],A[1],A[2],A[3],A[4]));break;case "phaser":O(l,new z(A[0],A[1],A[2],A[3],A[4],A[5]));break;case "gain":O(l,new r(A[0]));break;case "tremolo":O(l,new y(A[0],A[1]));break;
case "ringmod":O(l,new x(A[0],A[1]));break;case "distortion":O(l,new n(A[0],A[1],A[2],A[3],A[4]));break;case "compressor":O(l,new m(A[0],A[1],A[2],A[3],A[4]));break;case "analyser":O(l,new v(A[0],A[1]))}d=0;for(g=c.length;d<g;d++)3===this.Ld||(a=c[d],k=a.buffersrc,h=a.is_music,l=a.tag,q=a.playbackTime,t=a.looping,J=a.volume,E=(A=a.pan)&&A.hasOwnProperty("objUid")?A.objUid:-1,h&&1===this.Ld)||!h&&2===this.Ld||((w=this.Ik(k,l,h,t,J))?(w.Rb=a.resume_position,w.tj(!!A),w.play(t,J,q),w.Lp(),w.yu(),w.Wh(w.Bf||
w.Fg),a.paused&&w.pause(),a.muted&&w.ku(),w.Wh(w.Bf||w.Fg),A&&(-1!==E?(w.Ma=w.Ma||new f,w.Ma.Ni=E,Na.push(w.Ma)):w.sj(A.x,A.y,A.a,A.ia,A.oa,A.og))):(w=this.rg(k,h),w.rj=q,w.bj=a.paused,A&&(-1!==E?w.Xe.push({Ho:E,qi:A.ia,Ti:A.oa,Wi:A.og,tm:l}):w.Xe.push({x:A.x,y:A.y,Oq:A.a,qi:A.ia,Ti:A.oa,Wi:A.og,tm:l}))));if(b&&!I){d=0;for(g=B.length;d<g;d++)B[d].uj(!0);I=!0}else if(!b&&I){d=0;for(g=B.length;d<g;d++)B[d].uj(!1);I=!1}};ga.wd=function(){var a,b,c,d;a=0;for(b=Na.length;a<b;a++)c=Na[a],d=this.b.ii(c.Ni),
c.Qf(d),c.Ni=-1,d&&(Y=d.x,Z=d.y);Na.length=0};ga.Jt=function(a){if(!this.Nt){!a&&w&&w.resume&&w.resume();var b,c;b=0;for(c=B.length;b<c;b++)B[b].mu(a);a&&w&&w.suspend&&w.suspend()}};ga.Aa=function(){var a=this.b.Ce,b,c,d;b=0;for(c=B.length;b<c;b++)d=B[b],d.Aa(a),0===d.X||3===d.X||d.jd||d.ic||!d.Ie()||(d.ic=!0,P=d.tag,K.trigger(dc.prototype.n.Yj,ka)),0!==H&&d.Lp();var e,f;for(e in R)if(R.hasOwnProperty(e))for(d=R[e],b=0,c=d.length;b<c;b++)f=d[b],f.Aa&&f.Aa();1===D&&this.Eb.pi()&&(this.Eb.Aa(a),Y=this.Eb.I.x,
Z=this.Eb.I.y,w.listener.setPosition(this.Eb.I.x,this.Eb.I.y,this.Ng),w.listener.setVelocity(this.Eb.Rk(),this.Eb.Sk(),0))};var Oa=[];ga.lu=function(a){var b,c,d,e,f,g=0;b=0;for(c=a.length;b<c;++b)if(d=a[b],e=d[0],d=2*d[1],(f=4<e.length&&".ogg"===e.substr(e.length-4))&&S||!f&&!S)Oa.push({filename:e,size:d,I:null}),g+=d;return g};ga.ru=function(){var a,b,c,d;a=0;for(b=Oa.length;a<b;++a)c=Oa[a],d=this.b.bi+c.filename,c.I=this.rg(d,!1)};ga.Cs=function(){var a=0,b,c,d;b=0;for(c=Oa.length;b<c;++b)d=Oa[b],
d.I.mt()||d.I.$s()||this.b.Ca||this.b.si?a+=d.size:d.I.Kn()&&(a+=Math.floor(d.size/2));return a};ga.rg=function(a,b){var c,d,e,f=null;c=0;for(d=F.length;c<d;c++)if(e=F[c],e.src===a){f=e;break}f||(f=new q(a,b),F.push(f));return f};ga.Ik=function(a,b,c,d,e){var f,g,k;f=0;for(g=B.length;f<g;f++)if(k=B[f],k.src===a&&(k.br()||c))return k.tag=b,k;a=this.rg(a,c);if(!a.na)return"<preload>"!==b&&(a.cj=b,a.Bl=d,a.Em=e),null;k=new t(a,b);B.push(k);return k};var Ca=[];X.prototype.Yj=function(a){return bb(P,a)};
E.n=new X;J.prototype.Play=function(a,b,c,d){!I&&(c=l(c),C=this.Ik(this.b.bi+a[0]+(S?".ogg":".m4a"),d,a[1],0!==b,c))&&(C.tj(!1),C.play(0!==b,c))};J.prototype.zq=function(a,b,c,d,e,f,g,k){if(!I&&d&&(d=d.un())){c=l(c);var h=a[1];a=this.b.bi+a[0]+(S?".ogg":".m4a");(C=this.Ik(a,k,h,0!==b,c))?(C.tj(!0),k=Ia(d.x,d.y,-d.i.Ga(),Y,Z,!0),a=Ia(d.x,d.y,-d.i.Ga(),Y,Z,!1),C.sj(k,a,xa(d.k-d.i.Ga()),e,f,l(g)),C.Qf(d),C.play(0!==b,c)):this.rg(a,h).Xe.push({I:d,qi:e,Ti:f,Wi:l(g),tm:k})}};J.prototype.Eq=function(a){var b;
2===a&&(a=I?1:0);if(0===a&&!I){a=0;for(b=B.length;a<b;a++)B[a].uj(!0);I=!0}else if(1===a&&I){a=0;for(b=B.length;a<b;a++)B[a].uj(!1);I=!1}};E.ka=new J;E.Sa=new function(){}})();function ec(l){this.b=l}
(function(){function l(){}var h=ec.prototype;h.ta=function(b){this.xa=b;this.b=b.b};h.ta.prototype.R=function(){};h.ga=function(b){this.type=b;this.b=b.b;this.ll=Array(256);this.Sj=Array(256);this.ue=0};var b=h.ga.prototype;b.R=function(){var b=this;this.b.Ca||(jQuery(document).keydown(function(a){b.Il(a)}),jQuery(document).keyup(function(a){b.Jl(a)}))};var d=[32,33,34,35,36,37,38,39,40,44];b.Il=function(b){var a=!1;window!=window.top&&-1<d.indexOf(b.which)&&(b.preventDefault(),a=!0,b.stopPropagation());
if(this.ll[b.which])this.Sj[b.which]&&!a&&b.preventDefault();else{this.ll[b.which]=!0;this.ue=b.which;this.b.Zb=!0;this.b.trigger(ec.prototype.n.kq,this);var c=this.b.trigger(ec.prototype.n.rq,this),g=this.b.trigger(ec.prototype.n.sq,this);this.b.Zb=!1;if(c||g)this.Sj[b.which]=!0,a||b.preventDefault()}};b.Jl=function(b){this.ll[b.which]=!1;this.ue=b.which;this.b.Zb=!0;this.b.trigger(ec.prototype.n.lq,this);var a=this.b.trigger(ec.prototype.n.uq,this),c=this.b.trigger(ec.prototype.n.tq,this);this.b.Zb=
!1;if(a||c||this.Sj[b.which])this.Sj[b.which]=!0,b.preventDefault()};b.ob=function(){return{triggerKey:this.ue}};b.Fb=function(b){this.ue=b.triggerKey};l.prototype.rq=function(b){return b===this.ue};l.prototype.kq=function(){return!0};l.prototype.lq=function(){return!0};l.prototype.uq=function(b){return b===this.ue};l.prototype.sq=function(b){return b===this.ue};l.prototype.tq=function(b){return b===this.ue};h.n=new l;h.ka=new function(){};h.Sa=new function(){}})();function fc(l){this.b=l}
(function(){function l(){}function h(){}function b(){}var d=fc.prototype;d.ta=function(a){this.xa=a;this.b=a.b};d.ta.prototype.R=function(){};d.ga=function(a){this.type=a;this.b=a.b;this.ik=Array(4);this.Ap=this.Nj=this.Yf=this.he=this.ge=0;this.Vk=!1};var k=d.ga.prototype;k.R=function(){var a=this;if(!this.b.Ca){jQuery(document).mousemove(function(b){a.Gt(b)});jQuery(document).mousedown(function(b){a.Ft(b)});jQuery(document).mouseup(function(b){a.Ht(b)});jQuery(document).dblclick(function(b){a.Dt(b)});
var b=function(b){a.Kt(b)};document.addEventListener("mousewheel",b,!1);document.addEventListener("DOMMouseScroll",b,!1)}};var a={left:0,top:0};k.Gt=function(b){var d=this.b.Ca?a:jQuery(this.b.canvas).offset();this.ge=b.pageX-d.left;this.he=b.pageY-d.top};k.Bo=function(){return 0<this.b.Jb?!0:0<=this.ge&&0<=this.he&&this.ge<this.b.width&&this.he<this.b.height};k.Ft=function(a){this.Bo()&&(this.b.Uk&&!this.b.kd&&a.preventDefault(),this.ik[a.which]=!0,this.b.Zb=!0,this.b.trigger(fc.prototype.n.jq,this),
this.Yf=a.which-1,this.Nj=0,this.b.trigger(fc.prototype.n.Xj,this),this.b.trigger(fc.prototype.n.Mm,this),this.b.Zb=!1)};k.Ht=function(a){this.ik[a.which]&&(this.b.Uk&&!this.b.kd&&a.preventDefault(),this.b.Uk=!0,this.ik[a.which]=!1,this.b.Zb=!0,this.Yf=a.which-1,this.b.trigger(fc.prototype.n.xq,this),this.b.Zb=!1)};k.Dt=function(a){this.Bo()&&(a.preventDefault(),this.b.Zb=!0,this.Yf=a.which-1,this.Nj=1,this.b.trigger(fc.prototype.n.Xj,this),this.b.trigger(fc.prototype.n.Mm,this),this.b.Zb=!1)};k.Kt=
function(a){this.Ap=0>(a.wheelDelta?a.wheelDelta:a.detail?-a.detail:0)?0:1;this.Vk=!1;this.b.Zb=!0;this.b.trigger(fc.prototype.n.yq,this);this.b.Zb=!1;this.Vk&&a.preventDefault()};l.prototype.Xj=function(a,b){return a===this.Yf&&b===this.Nj};l.prototype.jq=function(){return!0};l.prototype.xq=function(a){return a===this.Yf};l.prototype.Mm=function(a,b,d){return a!==this.Yf||b!==this.Nj?!1:this.b.tu(d,this.ge,this.he)};l.prototype.yq=function(a){this.Vk=!0;return a===this.Ap};d.n=new l;h.prototype.Bq=
function(a){a="auto pointer text crosshair move help wait none".split(" ")[a];this.b.canvas&&this.b.canvas.style&&(this.b.canvas.style.cursor=a)};d.ka=new h;b.prototype.ak=function(a,b){var d,k,h,l,z;da(b)?(d=this.b.tg(0),k=d.scale,h=d.cd,l=d.Hc,z=d.k,d.scale=1,d.cd=1,d.Hc=1,d.k=0,a.J(d.Ub(this.ge,this.he,!0)),d.scale=k,d.cd=h,d.Hc=l,d.k=z):(d=ea(b)?this.b.tg(b):this.b.Ok(b))?a.J(d.Ub(this.ge,this.he,!0)):a.J(0)};b.prototype.bk=function(a,b){var d,k,h,l,z;da(b)?(d=this.b.tg(0),k=d.scale,h=d.cd,l=
d.Ic,z=d.k,d.scale=1,d.cd=1,d.Ic=1,d.k=0,a.J(d.Ub(this.ge,this.he,!1)),d.scale=k,d.cd=h,d.Ic=l,d.k=z):(d=ea(b)?this.b.tg(b):this.b.Ok(b))?a.J(d.Ub(this.ge,this.he,!1)):a.J(0)};d.Sa=new b})();function gc(l){this.b=l}
(function(){function l(b){this.q=b;this.fb=!1;this.k=this.speed=this.y=this.x=0;this.opacity=1;this.Sd=this.uf=this.size=this.mi=0}var h=gc.prototype;h.ta=function(b){this.xa=b;this.b=b.b};var b=h.ta.prototype;b.R=function(){this.G||(this.T=new Image,this.T.qk=this.Gj,this.Z=null,this.b.Fm(this.T,this.Fj))};b.ah=function(){this.G||(this.Z=null)};b.Xi=function(){this.G||!this.d.length||this.Z||(this.Z=this.b.A.Gf(this.T,!0,this.b.ca,this.rh))};b.Og=function(){this.G||this.Z||!this.b.A||(this.Z=this.b.A.Gf(this.T,
!0,this.b.ca,this.rh))};b.Pj=function(){this.G||this.d.length||!this.Z||(this.b.A.deleteTexture(this.Z),this.Z=null)};b.hj=function(b){b.drawImage(this.T,0,0)};l.prototype.init=function(){var b=this.q;this.x=b.x-b.Vj/2+Math.random()*b.Vj;this.y=b.y-b.Wj/2+Math.random()*b.Wj;this.speed=b.dl-b.Bj/2+Math.random()*b.Bj;this.k=b.k-b.Cj/2+Math.random()*b.Cj;this.opacity=b.bl;this.size=b.cl-b.zj/2+Math.random()*b.zj;this.mi=b.Tk-b.ni/2+Math.random()*b.ni;this.Sd=this.uf=0};l.prototype.Aa=function(b){var a=
this.q;this.x+=Math.cos(this.k)*this.speed*b;this.y+=Math.sin(this.k)*this.speed*b;this.y+=this.uf*b;this.speed+=a.eb*b;this.size+=this.mi*b;this.uf+=a.Yd*b;this.Sd+=b;1>this.size?this.fb=!1:(0!==a.Kg&&(this.k+=Math.random()*a.Kg*b-a.Kg*b/2),0!==a.Mg&&(this.speed+=Math.random()*a.Mg*b-a.Mg*b/2),0!==a.Lg&&(this.opacity+=Math.random()*a.Lg*b-a.Lg*b/2,0>this.opacity?this.opacity=0:1<this.opacity&&(this.opacity=1)),1>=a.pf&&this.Sd>=a.timeout&&(this.fb=!1),2===a.pf&&0>=this.speed&&(this.fb=!1))};l.prototype.Xb=
function(b){var a=this.q.opacity*this.opacity;if(0!==a){0===this.q.pf&&(a*=1-this.Sd/this.q.timeout);b.globalAlpha=a;var a=this.x-this.size/2,c=this.y-this.size/2;this.q.b.Jc&&(a=a+.5|0,c=c+.5|0);b.drawImage(this.q.type.T,a,c,this.size,this.size)}};l.prototype.Cb=function(b){var a=this.q.opacity*this.opacity;0===this.q.pf&&(a*=1-this.Sd/this.q.timeout);var c=this.size,d=c*this.q.Vo,e=this.x-c/2,h=this.y-c/2;this.q.b.Jc&&(e=e+.5|0,h=h+.5|0);1>d||0===a||(d<b.zt||d>b.Dl?(b.ne(a),b.hh(e,h,e+c,h,e+c,h+
c,e,h+c)):b.Ot(this.x,this.y,d,a))};l.prototype.left=function(){return this.x-this.size/2};l.prototype.right=function(){return this.x+this.size/2};l.prototype.top=function(){return this.y-this.size/2};l.prototype.bottom=function(){return this.y+this.size/2};h.ga=function(b){this.type=b;this.b=b.b};var b=h.ga.prototype,d=[];b.R=function(){var b=this.C;this.mj=b[0];this.Cj=T(b[1]);this.Vf=b[2];this.om=!0;this.dl=b[3];this.cl=b[4];this.bl=b[5]/100;this.Tk=b[6];this.Vj=b[7];this.Wj=b[8];this.Bj=b[9];
this.zj=b[10];this.ni=b[11];this.eb=b[12];this.Yd=b[13];this.Kg=b[14];this.Mg=b[15];this.Lg=b[16];this.pf=b[17];this.timeout=b[18];this.Ye=0;this.Vo=1;this.Zi=this.x;this.aj=this.y;this.$i=this.x;this.Yi=this.y;this.Rq(function(a){a.Ba.set(a.Zi,a.aj,a.$i,a.Yi);a.tb.Uf(a.Ba);a.Hh=!1;a.Am()});this.fc||(this.Hb=[]);this.b.sh(this);this.type.Og();if(1===this.Vf)for(b=0;b<this.mj;b++)this.ck().opacity=0;this.di=!0};b.ob=function(){var b={r:this.mj,sc:this.Cj,st:this.Vf,s:this.om,isp:this.dl,isz:this.cl,
io:this.bl,gr:this.Tk,xr:this.Vj,yr:this.Wj,spr:this.Bj,szr:this.zj,grnd:this.ni,acc:this.eb,g:this.Yd,lar:this.Kg,lsr:this.Mg,lor:this.Lg,dm:this.pf,to:this.timeout,pcc:this.Ye,ft:this.di,p:[]},a,c,d,e=b.p;a=0;for(c=this.Hb.length;a<c;a++)d=this.Hb[a],e.push([d.x,d.y,d.speed,d.k,d.opacity,d.mi,d.size,d.uf,d.Sd]);return b};b.Fb=function(b){this.mj=b.r;this.Cj=b.sc;this.Vf=b.st;this.om=b.s;this.dl=b.isp;this.cl=b.isz;this.bl=b.io;this.Tk=b.gr;this.Vj=b.xr;this.Wj=b.yr;this.Bj=b.spr;this.zj=b.szr;this.ni=
b.grnd;this.eb=b.acc;this.Yd=b.g;this.Kg=b.lar;this.Mg=b.lsr;this.Lg=b.lor;this.pf=b.dm;this.timeout=b.to;this.Ye=b.pcc;this.di=b.ft;d.push.apply(d,this.Hb);this.Hb.length=0;var a,c,g,e=b.p;b=0;for(a=e.length;b<a;b++)c=this.ck(),g=e[b],c.x=g[0],c.y=g[1],c.speed=g[2],c.k=g[3],c.opacity=g[4],c.mi=g[5],c.size=g[6],c.uf=g[7],c.Sd=g[8]};b.We=function(){d.push.apply(d,this.Hb);this.Hb.length=0};b.ck=function(){var b;d.length?(b=d.pop(),b.q=this):b=new l(this);this.Hb.push(b);b.fb=!0;return b};b.Aa=function(){var b=
this.b.tf(this),a,c,g,e;if(0===this.Vf&&this.om)for(this.Ye+=b*this.mj,c=Q(this.Ye),this.Ye-=c,a=0;a<c;a++)g=this.ck(),g.init();this.Zi=this.x;this.aj=this.y;this.$i=this.x;this.Yi=this.y;e=a=0;for(c=this.Hb.length;a<c;a++)g=this.Hb[a],this.Hb[e]=g,this.b.fa=!0,1===this.Vf&&this.di&&g.init(),g.Aa(b),g.fb?(g.left()<this.Zi&&(this.Zi=g.left()),g.right()>this.$i&&(this.$i=g.right()),g.top()<this.aj&&(this.aj=g.top()),g.bottom()>this.Yi&&(this.Yi=g.bottom()),e++):d.push(g);this.Hb.length=e;this.N();this.di=
!1;1===this.Vf&&0===this.Hb.length&&this.b.dd(this)};b.Xb=function(b){var a,c,d,e=this.i;a=0;for(c=this.Hb.length;a<c;a++)d=this.Hb[a],d.right()>=e.Pa&&d.bottom()>=e.Qa&&d.left()<=e.cb&&d.top()<=e.bb&&d.Xb(b)};b.Cb=function(b){this.Vo=this.i.Kb();b.Sb(this.type.Z);var a,c,d,e=this.i;a=0;for(c=this.Hb.length;a<c;a++)d=this.Hb[a],d.right()>=e.Pa&&d.bottom()>=e.Qa&&d.left()<=e.cb&&d.top()<=e.bb&&d.Cb(b)};h.n=new function(){};h.ka=new function(){};h.Sa=new function(){}})();function W(l){this.b=l}
(function(){function l(){if(0===this.uk.length){var a=document.createElement("canvas");a.width=this.width;a.height=this.height;var b=a.getContext("2d");this.Wf?b.drawImage(this.T,this.Nf,this.Of,this.width,this.height,0,0,this.width,this.height):b.drawImage(this.T,0,0,this.width,this.height);this.uk=a.toDataURL("image/png")}return this.uk}function h(){}function b(a){a[0]=0;a[1]=0;a[2]=0;z.push(a)}function d(a,b){return a<b?""+a+","+b:""+b+","+a}function k(a,b,c,e){b=b.uid;c=c.uid;var g=d(b,c);if(a.hasOwnProperty(g))a[g][2]=
e;else{var h=z.length?z.pop():[0,0,0];h[0]=b;h[1]=c;h[2]=e;a[g]=h}}function a(a,c,e){c=d(c.uid,e.uid);a.hasOwnProperty(c)&&(b(a[c]),delete a[c])}function c(a,b,c){b=d(b.uid,c.uid);if(a.hasOwnProperty(b))return r=a[b][2],!0;r=-2;return!1}function g(){}var e=W.prototype;e.ta=function(a){this.xa=a;this.b=a.b};var p=e.ta.prototype;p.R=function(){if(!this.G){var a,b,c,d,e,g,h,k,p;this.Pc=[];this.yg=!1;a=0;for(b=this.Tb.length;a<b;a++){e=this.Tb[a];h={};h.name=e[0];h.speed=e[1];h.loop=e[2];h.Wl=e[3];h.oj=
e[4];h.Wo=e[5];h.aa=e[6];h.frames=[];c=0;for(d=e[7].length;c<d;c++)g=e[7][c],k={},k.Fj=g[0],k.Gj=g[1],k.Nf=g[2],k.Of=g[3],k.width=g[4],k.height=g[5],k.duration=g[6],k.Mb=g[7],k.Nb=g[8],k.Zk=g[9],k.dj=g[10],k.Xo=g[11],k.Wf=0!==k.width,k.uk="",k.Gv=l,p={left:0,top:0,right:1,bottom:1},k.jm=p,k.Z=null,(p=this.b.ns(g[0]))?k.T=p:(k.T=new Image,k.T.kr=g[0],k.T.qk=g[1],k.T.Zq=null,this.b.Fm(k.T,g[0])),h.frames.push(k),this.Pc.push(k);this.Tb[a]=h}}};p.Jp=function(){var a,b,c;a=0;for(b=this.d.length;a<b;a++)c=
this.d[a],c.Rh=c.xc.Z};p.ah=function(){if(!this.G){var a,b,c;a=0;for(b=this.Pc.length;a<b;++a)c=this.Pc[a],c.T.Zq=null,c.Z=null;this.yg=!1;this.Jp()}};p.Xi=function(){if(!this.G&&this.d.length){var a,b,c;a=0;for(b=this.Pc.length;a<b;++a)c=this.Pc[a],c.Z=this.b.A.Gf(c.T,!1,this.b.ca,c.Xo);this.Jp()}};p.Og=function(){if(!this.G&&!this.yg&&this.b.A){var a,b,c;a=0;for(b=this.Pc.length;a<b;++a)c=this.Pc[a],c.Z=this.b.A.Gf(c.T,!1,this.b.ca,c.Xo);this.yg=!0}};p.Pj=function(){if(!this.G&&!this.d.length&&
this.yg){var a,b,c;a=0;for(b=this.Pc.length;a<b;++a)c=this.Pc[a],this.b.A.deleteTexture(c.Z),c.Z=null;this.yg=!1}};var u=[];p.hj=function(a){var b,c,d;b=u.length=0;for(c=this.Pc.length;b<c;++b)d=this.Pc[b].T,-1===u.indexOf(d)&&(a.drawImage(d,0,0),u.push(d))};e.ga=function(a){this.type=a;this.b=a.b;a=this.type.Tb[0].frames[0].dj;this.fc?this.la.lh(a):this.la=new Xa(a)};var s=e.ga.prototype;s.R=function(){this.visible=0===this.C[0];this.zd=0!==this.C[3];1===this.type.Tb.length&&1===this.type.Tb[0].frames.length||
0===this.type.Tb[0].speed||this.b.sh(this);this.Ia=this.qn(this.C[1])||this.type.Tb[0];this.D=this.C[2];0>this.D&&(this.D=0);this.D>=this.Ia.frames.length&&(this.D=this.Ia.frames.length-1);var a=this.Ia.frames[this.D];this.la.lh(a.dj);this.Mb=a.Mb;this.Nb=a.Nb;this.ig=this.Ia.speed;this.fc?this.ed.reset():this.ed=new Va;this.Hd=this.ed.Y;this.we=!0;this.xd=0;this.ve=!0;this.mk=this.Sm="";this.er=0;this.lk=-1;this.type.Og();var b,c,d,e,g,h,k,a=0;for(b=this.type.Tb.length;a<b;a++)for(e=this.type.Tb[a],
c=0,d=e.frames.length;c<d;c++)g=e.frames[c],0===g.width&&(g.width=g.T.width,g.height=g.T.height),g.Wf&&(k=g.T,h=g.jm,h.left=g.Nf/k.width,h.top=g.Of/k.height,h.right=(g.Nf+g.width)/k.width,h.bottom=(g.Of+g.height)/k.height,0===g.Nf&&0===g.Of&&g.width===k.width&&g.height===k.height&&(g.Wf=!1));this.xc=this.Ia.frames[this.D];this.Rh=this.xc.Z};s.ob=function(){var a={a:this.Ia.aa,f:this.D,cas:this.ig,fs:this.Hd,ar:this.xd,at:this.ed.Y};this.we||(a.ap=this.we);this.ve||(a.af=this.ve);return a};s.Fb=function(a){var b=
this.us(a.a);b&&(this.Ia=b);this.D=a.f;0>this.D&&(this.D=0);this.D>=this.Ia.frames.length&&(this.D=this.Ia.frames.length-1);this.ig=a.cas;this.Hd=a.fs;this.xd=a.ar;this.ed.reset();this.ed.Y=a.at;this.we=a.hasOwnProperty("ap")?a.ap:!0;this.ve=a.hasOwnProperty("af")?a.af:!0;this.xc=this.Ia.frames[this.D];this.Rh=this.xc.Z;this.la.lh(this.xc.dj);this.Mb=this.xc.Mb;this.Nb=this.xc.Nb};s.gk=function(a){this.D=a?0:this.Ia.frames.length-1;this.we=!1;this.Sm=this.Ia.name;this.b.trigger(W.prototype.n.iq,this);
this.b.trigger(W.prototype.n.hq,this);this.xd=0};s.Hv=function(){return this.ed.Y};s.Aa=function(){this.ed.add(this.b.tf(this));this.mk.length&&this.rr();0<=this.lk&&this.sr();var a=this.ed.Y,b=this.Ia,c=b.frames[this.D],d=c.duration/this.ig;this.we&&a>=this.Hd+d&&(this.ve?this.D++:this.D--,this.Hd+=d,this.D>=b.frames.length&&(b.Wo?(this.ve=!1,this.D=b.frames.length-2):b.loop?this.D=b.oj:(this.xd++,this.xd>=b.Wl?this.gk(!1):this.D=b.oj)),0>this.D&&(b.Wo?(this.D=1,this.ve=!0,b.loop||(this.xd++,this.xd>=
b.Wl&&this.gk(!0))):b.loop?this.D=b.oj:(this.xd++,this.xd>=b.Wl?this.gk(!0):this.D=b.oj)),0>this.D?this.D=0:this.D>=b.frames.length&&(this.D=b.frames.length-1),a>this.Hd+b.frames[this.D].duration/this.ig&&(this.Hd=a),a=b.frames[this.D],this.jf(c,a),this.b.fa=!0)};s.qn=function(a){var b,c,d;b=0;for(c=this.type.Tb.length;b<c;b++)if(d=this.type.Tb[b],bb(d.name,a))return d;return null};s.us=function(a){var b,c,d;b=0;for(c=this.type.Tb.length;b<c;b++)if(d=this.type.Tb[b],d.aa===a)return d;return null};
s.rr=function(){var a=this.Ia.frames[this.D],b=this.qn(this.mk);this.mk="";!b||bb(b.name,this.Ia.name)&&this.we||(this.Ia=b,this.ig=b.speed,0>this.D&&(this.D=0),this.D>=this.Ia.frames.length&&(this.D=this.Ia.frames.length-1),1===this.er&&(this.D=0),this.we=!0,this.Hd=this.ed.Y,this.ve=!0,this.jf(a,this.Ia.frames[this.D]),this.b.fa=!0)};s.sr=function(){var a=this.Ia.frames[this.D],b=this.D;this.D=Q(this.lk);0>this.D&&(this.D=0);this.D>=this.Ia.frames.length&&(this.D=this.Ia.frames.length-1);b!==this.D&&
(this.jf(a,this.Ia.frames[this.D]),this.Hd=this.ed.Y,this.b.fa=!0);this.lk=-1};s.jf=function(a,b){var c=a.width,d=a.height,e=b.width,g=b.height;c!=e&&(this.width*=e/c);d!=g&&(this.height*=g/d);this.Mb=b.Mb;this.Nb=b.Nb;this.la.lh(b.dj);this.N();this.xc=b;this.Rh=b.Z;c=0;for(d=this.O.length;c<d;c++)e=this.O[c],e.It&&e.It(a,b);this.b.trigger(W.prototype.n.jf,this)};s.Xb=function(a){a.globalAlpha=this.opacity;var b=this.xc,c=b.Wf,d=b.T,e=this.x,g=this.y,h=this.width,k=this.height;if(0===this.k&&0<=h&&
0<=k)e-=this.Mb*h,g-=this.Nb*k,this.b.Jc&&(e=Math.round(e),g=Math.round(g)),c?a.drawImage(d,b.Nf,b.Of,b.width,b.height,e,g,h,k):a.drawImage(d,e,g,h,k);else{this.b.Jc&&(e=Math.round(e),g=Math.round(g));a.save();var l=0<h?1:-1,p=0<k?1:-1;a.translate(e,g);1===l&&1===p||a.scale(l,p);a.rotate(this.k*l*p);e=0-this.Mb*ia(h);g=0-this.Nb*ia(k);c?a.drawImage(d,b.Nf,b.Of,b.width,b.height,e,g,ia(h),ia(k)):a.drawImage(d,e,g,ia(h),ia(k));a.restore()}};s.Cb=function(a){a.Sb(this.Rh);a.ne(this.opacity);var b=this.xc,
c=this.tb;if(this.b.Jc){var d=Math.round(this.x)-this.x,e=Math.round(this.y)-this.y;b.Wf?a.od(c.Ka+d,c.La+e,c.Ab+d,c.Bb+e,c.ub+d,c.wb+e,c.rb+d,c.sb+e,b.jm):a.hh(c.Ka+d,c.La+e,c.Ab+d,c.Bb+e,c.ub+d,c.wb+e,c.rb+d,c.sb+e)}else b.Wf?a.od(c.Ka,c.La,c.Ab,c.Bb,c.ub,c.wb,c.rb,c.sb,b.jm):a.hh(c.Ka,c.La,c.Ab,c.Bb,c.ub,c.wb,c.rb,c.sb)};s.ys=function(a){var b=this.xc,c,d;c=0;for(d=b.Zk.length;c<d;c++)if(bb(a,b.Zk[c][0]))return c;return-1};s.sg=function(a,b){var c=this.xc,d=c.Zk,e;e=N(a)?this.ys(a):a-1;e=Q(e);
if(0>e||e>=d.length)return b?this.x:this.y;var g=(d[e][1]-c.Mb)*this.width,d=d[e][2],d=(d-c.Nb)*this.height,c=Math.cos(this.k);e=Math.sin(this.k);var h=g*c-d*e,d=d*c+g*e,g=h+this.x,d=d+this.y;return b?g:d};var z=[],r=-2,y=[];h.prototype.oq=function(d){if(!d)return!1;var e=this.b,f=e.Lk(),g=f.type;f.P.collmemory||(f.P.collmemory={},e.Pm(function(a){return function(c){c=c.uid;var d,e;for(d in a)a.hasOwnProperty(d)&&(e=a[d],e[0]===c||e[1]===c)&&(b(a[d]),delete a[d])}}(f.P.collmemory)));var f=f.P.collmemory,
h=g.da(),l=d.da(),h=h.Bc(),p,n,s,u,x,z,G,D=this.b.Nc,w=D-1,F=e.yb().nc;for(n=0;n<h.length;n++){s=h[n];l.ra?(s.Ea(),this.b.rn(s.i,d,s.Ba,y),p=y):p=l.Bc();for(u=0;u<p.length;u++)x=p[u],e.cf(s,x)||e.fr(s,x)?(z=c(f,s,x),z=!z||r<w,k(f,s,x,D),z&&(e.jj(F.Ha),z=g.da(),G=d.da(),z.ra=!1,G.ra=!1,g===d?(z.d.length=2,z.d[0]=s,z.d[1]=x,g.Qc()):(z.d.length=1,G.d.length=1,z.d[0]=s,G.d[0]=x,g.Qc(),d.Qc()),F.bu(),e.Ze(F.Ha))):a(f,s,x);y.length=0}return!1};var x=new ba,n=!1;p.finish=function(a){if(n){if(a){var b=this.b.yb().nc.Wc;
a=null.da();var c=x.Pd(),d,e;if(a.ra){a.ra=!1;a.d.length=c.length;d=0;for(e=c.length;d<e;d++)a.d[d]=c[d];if(b)for(d=a.ma.length=0,e=null.d.length;d<e;d++)c=null.d[d],x.contains(c)||a.ma.push(c)}else if(b)for(b=a.d.length,a.d.length=b+c.length,d=0,e=c.length;d<e;d++)a.d[b+d]=c[d],wa(a.ma,c[d]);else ta(a.d,c);null.Qc()}x.clear();n=!1}};h.prototype.hq=function(a){return bb(this.Sm,a)};h.prototype.iq=function(){return!0};h.prototype.jf=function(){return!0};e.n=new h;g.prototype.Jq=function(a,b,c){if(a&&
b&&(b=this.b.rk(a,b,this.sg(c,!0),this.sg(c,!1)))){"undefined"!==typeof b.k&&(b.k=this.k,b.N());this.b.pc++;var d,e,g;this.b.trigger(Object.getPrototypeOf(a.xa).n.cg,b);if(b.Pb)for(d=0,e=b.siblings.length;d<e;d++)g=b.siblings[d],this.b.trigger(Object.getPrototypeOf(g.type.xa).n.cg,g);this.b.pc--;d=this.b.ws();c=!1;if(da(d.P.Spawn_LastExec)||d.P.Spawn_LastExec<this.b.qf)c=!0,d.P.Spawn_LastExec=this.b.qf;if(a!=this.type&&(a=a.da(),a.ra=!1,c?(a.d.length=1,a.d[0]=b):a.d.push(b),b.Pb))for(d=0,e=b.siblings.length;d<
e;d++)g=b.siblings[d],a=g.type.da(),a.ra=!1,c?(a.d.length=1,a.d[0]=g):a.d.push(g)}};e.ka=new g;e.Sa=new function(){}})();function hc(l){this.b=l}
(function(){function l(){return g.length?g.pop():{}}function h(a){var b,c;b=0;for(c=a.length;b<c;b++)g.push(a[b]);a.length=0}function b(){}function d(){}var k=hc.prototype;k.R=function(){k.ka.Iq=function(a){this.width!==a&&(this.width=a,this.df=!0,this.N())}};k.ta=function(a){this.xa=a;this.b=a.b};var a=k.ta.prototype;a.R=function(){};a.ah=function(){if(!this.G){var a,b,c;a=0;for(b=this.d.length;a<b;a++)c=this.d[a],c.md=null,c.Ve=null,c.cc=null}};k.ga=function(a){this.type=a;this.b=a.b;this.fc?this.ee.length=
0:this.ee=[];this.df=!0};a=k.ga.prototype;a.R=function(){this.text=this.C[0];this.visible=0===this.C[1];this.font=this.C[2];this.color=this.C[3];this.oi=this.C[4];this.Tj=this.C[5];this.Jm=0===this.C[7];this.sl=this.Fi=this.width;this.Ei=this.height;this.ul=this.C[8];this.ei=this.rf="";this.xp=this.yp=this.fh=0;this.Lt();this.cc=this.Ve=this.md=null;this.Do=!1;this.Jg=this.b.Nc;this.fc?this.ke.set(0,0,1,1):this.ke=new pa(0,0,1,1);this.b.A&&this.b.sh(this)};a.Lt=function(){var a=this.font.split(" "),
b;for(b=0;b<a.length;b++)if("pt"===a[b].substr(a[b].length-2,2)){this.fh=parseInt(a[b].substr(0,a[b].length-2));this.Sl=Math.ceil(this.fh/72*96)+4;0<b&&(this.ei=a[b-1]);this.rf=a[b+1];for(b+=2;b<a.length;b++)this.rf+=" "+a[b];break}};a.ob=function(){return{t:this.text,f:this.font,c:this.color,ha:this.oi,va:this.Tj,wr:this.Jm,lho:this.ul,fn:this.rf,fs:this.ei,ps:this.fh,pxh:this.Sl,tw:this.yp,th:this.xp,lrt:this.Jg}};a.Fb=function(a){this.text=a.t;this.font=a.f;this.color=a.c;this.oi=a.ha;this.Tj=
a.va;this.Jm=a.wr;this.ul=a.lho;this.rf=a.fn;this.ei=a.fs;this.fh=a.ps;this.Sl=a.pxh;this.yp=a.tw;this.xp=a.th;this.Jg=a.lrt;this.df=!0;this.sl=this.Fi=this.width;this.Ei=this.height};a.Aa=function(){if(this.b.A&&this.cc&&300<=this.b.Nc-this.Jg){var a=this.i;this.Ea();var b=this.Ba;if(b.right<a.Pa||b.bottom<a.Qa||b.left>a.cb||b.top>a.bb)this.b.A.deleteTexture(this.cc),this.md=this.Ve=this.cc=null}};a.We=function(){this.md=this.Ve=null;this.b.A&&this.cc&&this.b.A.deleteTexture(this.cc);this.cc=null};
a.Qv=function(){this.font=this.ei+" "+this.fh.toString()+"pt "+this.rf;this.df=!0;this.b.fa=!0};a.Xb=function(a,b){a.font=this.font;a.textBaseline="top";a.fillStyle=this.color;a.globalAlpha=b?1:this.opacity;var c=1;b&&(c=this.i.Kb(),a.save(),a.scale(c,c));if(this.df||this.width!==this.sl)this.type.xa.Mq(this.text,this.ee,a,this.width,this.Jm),this.df=!1,this.sl=this.width;this.Ea();var c=b?0:this.tb.Ka,d=b?0:this.tb.La;this.b.Jc&&(c=c+.5|0,d=d+.5|0);0===this.k||b||(a.save(),a.translate(c,d),a.rotate(this.k),
d=c=0);var g=d+this.height,h=this.Sl,h=h+this.ul,k,l;1===this.Tj?d+=Math.max(this.height/2-this.ee.length*h/2,0):2===this.Tj&&(d+=Math.max(this.height-this.ee.length*h-2,0));for(l=0;l<this.ee.length&&!(k=c,1===this.oi?k=c+(this.width-this.ee[l].width)/2:2===this.oi&&(k=c+(this.width-this.ee[l].width)),a.fillText(this.ee[l].text,k,d),d+=h,d>=g-h);l++);(0!==this.k||b)&&a.restore();this.Jg=this.b.Nc};a.Cb=function(a){if(!(1>this.width||1>this.height)){var b=this.df||this.Do;this.Do=!1;var c=this.i.Kb(),
d=this.i.Ga(),g=this.ke,h=c*this.width,k=c*this.height,l=Math.ceil(h),n=Math.ceil(k),m=this.b.V/2,v=this.b.U/2;this.Ve||(this.md=document.createElement("canvas"),this.md.width=l,this.md.height=n,this.Fi=l,this.Ei=n,b=!0,this.Ve=this.md.getContext("2d"));if(l!==this.Fi||n!==this.Ei)this.md.width=l,this.md.height=n,this.cc&&(a.deleteTexture(this.cc),this.cc=null),b=!0;b&&(this.Ve.clearRect(0,0,l,n),this.Xb(this.Ve,!0),this.cc||(this.cc=a.Ad(l,n,this.b.ca,this.b.kd)),a.Cu(this.md,this.cc,this.b.kd));
this.Fi=l;this.Ei=n;a.Sb(this.cc);a.ne(this.opacity);a.pd();a.translate(-m,-v);a.td();var f=this.tb,b=this.i.wa(f.Ka,f.La,!0,!0),m=this.i.wa(f.Ka,f.La,!1,!0),v=this.i.wa(f.Ab,f.Bb,!0,!0),q=this.i.wa(f.Ab,f.Bb,!1,!0),t=this.i.wa(f.ub,f.wb,!0,!0),O=this.i.wa(f.ub,f.wb,!1,!0),X=this.i.wa(f.rb,f.sb,!0,!0),f=this.i.wa(f.rb,f.sb,!1,!0);if(this.b.Jc||0===this.k&&0===d)var J=(b+.5|0)-b,E=(m+.5|0)-m,b=b+J,m=m+E,v=v+J,q=q+E,t=t+J,O=O+E,X=X+J,f=f+E;0===this.k&&0===d?(v=b+l,q=m,t=v,O=m+n,X=b,f=O,g.right=1,g.bottom=
1):(g.right=h/l,g.bottom=k/n);a.od(b,m,v,q,t,O,X,f,g);a.pd();a.scale(c,c);a.Yl(-this.i.Ga());a.translate((this.i.Pa+this.i.cb)/-2,(this.i.Qa+this.i.bb)/-2);a.td();this.Jg=this.b.Nc}};var c=[];k.Lq=function(a){c.length=0;for(var b="",d,g=0;g<a.length;)if(d=a.charAt(g),"\n"===d)b.length&&(c.push(b),b=""),c.push("\n"),++g;else if(" "===d||"\t"===d||"-"===d){do b+=a.charAt(g),g++;while(g<a.length&&(" "===a.charAt(g)||"\t"===a.charAt(g)));c.push(b);b=""}else g<a.length&&(b+=d,g++);b.length&&c.push(b)};
var g=[];k.Mq=function(a,b,c,d,g){if(a&&a.length)if(2>=d)h(b);else{if(100>=a.length&&-1===a.indexOf("\n")){var k=c.measureText(a).width;if(k<=d){h(b);b.push(l());b[0].text=a;b[0].width=k;return}}this.Nq(a,b,c,d,g)}else h(b)};k.Nq=function(a,b,d,h,k){k&&(this.Lq(a),a=c);var r="",y,x,n,m=0;for(n=0;n<a.length;n++)"\n"===a[n]?(m>=b.length&&b.push(l()),x=b[m],x.text=r,x.width=d.measureText(r).width,m++,r=""):(y=r,r+=a[n],x=d.measureText(r).width,x>=h&&(m>=b.length&&b.push(l()),x=b[m],x.text=y,x.width=
d.measureText(y).width,m++,r=a[n],k||" "!==r||(r="")));r.length&&(m>=b.length&&b.push(l()),x=b[m],x.text=r,x.width=d.measureText(r).width,m++);for(n=m;n<b.length;n++)g.push(b[n]);b.length=m};k.n=new function(){};b.prototype.Gq=function(a){ea(a)&&1E9>a&&(a=Math.round(1E10*a)/1E10);a=a.toString();this.text!==a&&(this.text=a,this.df=!0,this.b.fa=!0)};k.ka=new b;d.prototype.Text=function(a){a.gc(this.text)};k.Sa=new d})();function ic(l){this.b=l}
(function(){var l=ic.prototype;l.ta=function(b){this.xa=b;this.b=b.b};var h=l.ta.prototype;h.R=function(){this.G||(this.T=new Image,this.T.qk=this.Gj,this.b.Fm(this.T,this.Fj),this.Z=this.pattern=null)};h.ah=function(){this.G||(this.Z=null)};h.Xi=function(){if(!this.G&&this.d.length){this.Z||(this.Z=this.b.A.Gf(this.T,!0,this.b.ca,this.rh));var b,d;b=0;for(d=this.d.length;b<d;b++)this.d[b].Z=this.Z}};h.Og=function(){this.G||this.Z||!this.b.A||(this.Z=this.b.A.Gf(this.T,!0,this.b.ca,this.rh))};h.Pj=
function(){this.G||this.d.length||!this.Z||(this.b.A.deleteTexture(this.Z),this.Z=null)};h.hj=function(b){b.drawImage(this.T,0,0)};l.ga=function(b){this.type=b;this.b=b.b};h=l.ga.prototype;h.R=function(){this.visible=0===this.C[0];this.ke=new pa(0,0,0,0);this.Bn=!1;this.T=this.type.T;this.b.A?(this.type.Og(),this.Z=this.type.Z):(this.type.pattern||(this.type.pattern=this.b.ua.createPattern(this.type.T,"repeat")),this.pattern=this.type.pattern)};h.wd=function(){this.Bn=!1;this.T=this.type.T};h.We=
function(){this.b.A&&this.Bn&&this.Z&&(this.b.A.deleteTexture(this.Z),this.Z=null)};h.Xb=function(b){b.globalAlpha=this.opacity;b.save();b.fillStyle=this.pattern;var d=this.x,h=this.y;this.b.Jc&&(d=Math.round(d),h=Math.round(h));var a=-(this.Mb*this.width),c=-(this.Nb*this.height),g=a%this.T.width,e=c%this.T.height;0>g&&(g+=this.T.width);0>e&&(e+=this.T.height);b.translate(d,h);b.rotate(this.k);b.translate(g,e);b.fillRect(a-g,c-e,this.width,this.height);b.restore()};h.Cb=function(b){b.Sb(this.Z);
b.ne(this.opacity);var d=this.ke;d.right=this.width/this.T.width;d.bottom=this.height/this.T.height;var h=this.tb;if(this.b.Jc){var a=Math.round(this.x)-this.x,c=Math.round(this.y)-this.y;b.od(h.Ka+a,h.La+c,h.Ab+a,h.Bb+c,h.ub+a,h.wb+c,h.rb+a,h.sb+c,d)}else b.od(h.Ka,h.La,h.Ab,h.Bb,h.ub,h.wb,h.rb,h.sb,d)};l.n=new function(){};l.ka=new function(){};l.Sa=new function(){}})();function jc(l){this.b=l}
(function(){function l(){}function h(){}var b=jc.prototype;b.ta=function(b){this.xa=b;this.b=b.b};b.ta.prototype.R=function(){};b.ga=function(b){this.type=b;this.b=b.b};var d=b.ga.prototype;d.R=function(){if(this.b.Ca)M("[Construct 2] File Chooser plugin not supported on this platform - the object will not be created");else{this.Db=document.createElement("input");this.Db.type="file";this.Db.setAttribute("accept",this.C[0]);0!==this.C[1]&&this.Db.setAttribute("multiple","");this.Db.id=this.C[3];jQuery(this.Db).appendTo(this.b.Lh?
this.b.Lh:"body");this.De=!1;0===this.C[2]&&(jQuery(this.Db).hide(),this.visible=!1,this.De=!0);var b=this;this.Db.onchange=function(){b.b.trigger(jc.prototype.n.nq,b)};this.Zn=this.$n=this.Rn=this.Wn=this.Yn=this.Tn=0;this.Mp(!0);this.b.sh(this)}};d.We=function(){this.b.Ca||(jQuery(this.Db).remove(),this.Db=null)};d.Aa=function(){this.Mp()};d.Mp=function(b){if(!this.b.Ca){var a=this.i.wa(this.x,this.y,!0),c=this.i.wa(this.x,this.y,!1),d=this.i.wa(this.x+this.width,this.y+this.height,!0),e=this.i.wa(this.x+
this.width,this.y+this.height,!1),h=this.b.width/this.b.devicePixelRatio,l=this.b.height/this.b.devicePixelRatio;!this.visible||!this.i.visible||0>=d||0>=e||a>=h||c>=l?(this.De||jQuery(this.Db).hide(),this.De=!0):(1>a&&(a=1),1>c&&(c=1),d>=h&&(d=h-1),e>=l&&(e=l-1),h=window.innerWidth,l=window.innerHeight,b||this.Tn!==a||this.Yn!==c||this.Wn!==d||this.Rn!==e||this.$n!==h||this.Zn!==l?(this.Tn=a,this.Yn=c,this.Wn=d,this.Rn=e,this.$n=h,this.Zn=l,this.De&&(jQuery(this.Db).show(),this.De=!1),b=Math.round(a)+
jQuery(this.b.canvas).offset().left,h=Math.round(c)+jQuery(this.b.canvas).offset().top,jQuery(this.Db).css("position","absolute"),jQuery(this.Db).offset({left:b,top:h}),jQuery(this.Db).width(Math.round(d-a)),jQuery(this.Db).height(Math.round(e-c))):this.De&&(jQuery(this.Db).show(),this.De=!1))}};d.Xb=function(){};d.Cb=function(){};l.prototype.nq=function(){return!0};b.n=new l;h.prototype.Nm=function(b){this.b.Ca||(this.visible=0!==b)};b.ka=new h;b.Sa=new function(){}})();function oc(l){this.b=l}
(function(){var l=oc.prototype;l.ta=function(b){this.behavior=b;this.b=b.b};l.ta.prototype.R=function(){};l.ga=function(b,d){this.type=b;this.behavior=b.behavior;this.j=d;this.b=b.b};var h=l.ga.prototype;h.R=function(){var b=this.C[0];this.eb=this.C[1];this.Yd=this.C[2];this.Xq=0!==this.C[3];this.gm=0!==this.C[4];this.H=Math.cos(this.j.k)*b;this.F=Math.sin(this.j.k)*b;this.Gi=this.j.x;this.Hi=this.j.y;this.Df=this.j.k;this.Mj=0;this.enabled=0!==this.C[5]};h.ob=function(){return{acc:this.eb,g:this.Yd,
dx:this.H,dy:this.F,lx:this.Gi,ly:this.Hi,lka:this.Df,t:this.Mj,e:this.enabled}};h.Fb=function(b){this.eb=b.acc;this.Yd=b.g;this.H=b.dx;this.F=b.dy;this.Gi=b.lx;this.Hi=b.ly;this.Df=b.lka;this.Mj=b.t;this.enabled=b.e};h.Aa=function(){if(this.enabled){var b=this.b.tf(this.j),d,h;this.j.k!==this.Df&&(this.gm&&(d=Ja(0,0,this.H,this.F),this.H=Math.cos(this.j.k)*d,this.F=Math.sin(this.j.k)*d),this.Df=this.j.k);0!==this.eb&&(d=Ja(0,0,this.H,this.F),h=0===this.H&&0===this.F?this.j.k:Ea(0,0,this.H,this.F),
d+=this.eb*b,0>d&&(d=0),this.H=Math.cos(h)*d,this.F=Math.sin(h)*d);0!==this.Yd&&(this.F+=this.Yd*b);this.Gi=this.j.x;this.Hi=this.j.y;if(0!==this.H||0!==this.F)if(this.j.x+=this.H*b,this.j.y+=this.F*b,this.Mj+=Ja(0,0,this.H*b,this.F*b),this.gm&&(this.j.k=Ea(0,0,this.H,this.F),this.j.N(),this.Df=this.j.k),this.j.N(),this.Xq&&(d=this.b.ad(this.j)))this.b.ih(this.j,d),d=Ja(0,0,this.H,this.F),h=this.b.$q(this.j,this.Gi,this.Hi),this.H=Math.cos(h)*d,this.F=Math.sin(h)*d,this.j.x+=this.H*b,this.j.y+=this.F*
b,this.j.N(),this.gm&&(this.Df=this.j.k=h,this.j.N()),this.b.Xt(this.j,this.H/d,this.F/d,Math.max(2.5*d*b,30))||this.b.dp(this.j,100)}};l.n=new function(){};l.ka=new function(){};l.Sa=new function(){}})();function pc(l){this.b=l}
(function(){var l=pc.prototype;l.ta=function(b){this.behavior=b;this.b=b.b};l.ta.prototype.R=function(){};l.ga=function(b,d){this.type=b;this.behavior=b.behavior;this.j=d;this.b=b.b;this.mm=this.lm=this.km=this.nm=this.Yk=this.pj=this.Ki=this.Xh=this.Rj=!1;this.ql=this.pl=this.ol=this.rl=-1;this.F=this.H=0};var h=l.ga.prototype;h.R=function(){this.Xg=this.C[0];this.eb=this.C[1];this.gd=this.C[2];this.xk=this.C[3];this.fk=this.C[4];this.or=1===this.C[5];this.enabled=0!==this.C[6];this.or&&!this.b.Ca&&
(jQuery(document).keydown(function(b){return function(d){b.Il(d)}}(this)),jQuery(document).keyup(function(b){return function(d){b.Jl(d)}}(this)))};h.ob=function(){return{dx:this.H,dy:this.F,enabled:this.enabled,maxspeed:this.Xg,acc:this.eb,dec:this.gd,ignoreInput:this.Yk}};h.Fb=function(b){this.H=b.dx;this.F=b.dy;this.enabled=b.enabled;this.Xg=b.maxspeed;this.eb=b.acc;this.gd=b.dec;this.Yk=b.ignoreInput;this.mm=this.lm=this.km=this.nm=this.pj=this.Ki=this.Xh=this.Rj=!1;this.ql=this.pl=this.ol=this.rl=
-1};h.Il=function(b){var d=this.b.Nc;switch(b.which){case 37:b.preventDefault();this.pl<d&&(this.Ki=!0);break;case 38:b.preventDefault();this.rl<d&&(this.Rj=!0);break;case 39:b.preventDefault();this.ql<d&&(this.pj=!0);break;case 40:b.preventDefault(),this.ol<d&&(this.Xh=!0)}};h.Jl=function(b){var d=this.b.Nc;switch(b.which){case 37:b.preventDefault();this.Ki=!1;this.pl=d;break;case 38:b.preventDefault();this.Rj=!1;this.rl=d;break;case 39:b.preventDefault();this.pj=!1;this.ql=d;break;case 40:b.preventDefault(),
this.Xh=!1,this.ol=d}};h.Aa=function(){var b=this.b.tf(this.j),d=this.Ki||this.lm,h=this.pj||this.mm,a=this.Rj||this.nm,c=this.Xh||this.km;this.km=this.nm=this.mm=this.lm=!1;if(this.enabled){var g=this.b.ad(this.j);if(g&&(this.b.ih(this.j,g),!this.b.dp(this.j)))return;this.Yk&&(c=a=h=d=!1);0===this.xk?h=d=!1:1===this.xk&&(c=a=!1);2===this.xk&&(a||c)&&(h=d=!1);d==h&&(0>this.H?(this.H+=this.gd*b,0<this.H&&(this.H=0)):0<this.H&&(this.H-=this.gd*b,0>this.H&&(this.H=0)));a==c&&(0>this.F?(this.F+=this.gd*
b,0<this.F&&(this.F=0)):0<this.F&&(this.F-=this.gd*b,0>this.F&&(this.F=0)));d&&!h&&(this.H=0<this.H?this.H-(this.eb+this.gd)*b:this.H-this.eb*b);h&&!d&&(this.H=0>this.H?this.H+(this.eb+this.gd)*b:this.H+this.eb*b);a&&!c&&(this.F=0<this.F?this.F-(this.eb+this.gd)*b:this.F-this.eb*b);c&&!a&&(this.F=0>this.F?this.F+(this.eb+this.gd)*b:this.F+this.eb*b);if(0!==this.H||0!==this.F){Math.sqrt(this.H*this.H+this.F*this.F)>this.Xg&&(g=Math.atan2(this.F,this.H),this.H=this.Xg*Math.cos(g),this.F=this.Xg*Math.sin(g));
h=this.j.x;a=this.j.y;d=this.j.k;this.j.x+=this.H*b;this.j.N();if(g=this.b.ad(this.j))this.j.x=h,this.H=0,this.j.N(),this.b.ih(this.j,g);this.j.y+=this.F*b;this.j.N();if(g=this.b.ad(this.j))this.j.y=a,this.F=0,this.j.N(),this.b.ih(this.j,g);b=ab(this.H);g=ab(this.F);if(0!==b||0!==g)1===this.fk?this.j.k=Da(90*Math.round(xa(Math.atan2(g,b))/90)):2===this.fk?this.j.k=Da(45*Math.round(xa(Math.atan2(g,b))/45)):3===this.fk&&(this.j.k=Math.atan2(g,b));this.j.N();this.j.k!=d&&(g=this.b.ad(this.j))&&(this.j.k=
d,this.j.N(),this.b.ih(this.j,g))}}};l.n=new function(){};l.ka=new function(){};l.Sa=new function(){}})();function qc(l){this.b=l}
(function(){function l(){}var h=qc.prototype;h.ta=function(b){this.behavior=b;this.b=b.b};h.ta.prototype.R=function(){};h.ga=function(b,h){this.type=b;this.behavior=b.behavior;this.j=h;this.b=b.b};var b=h.ga.prototype;b.R=function(){var b=1===this.C[0];this.ng=this.C[1];this.yh=this.C[2];this.Zh=this.C[3];this.qr=this.C[4];this.rc=b?0:3;this.fc?this.Lc.reset():this.Lc=new Va;this.Ue=this.j.opacity?this.j.opacity:1;b&&(0===this.ng?(this.rc=1,0===this.yh&&(this.rc=2)):(this.j.opacity=0,this.b.fa=!0))};
b.ob=function(){return{fit:this.ng,wt:this.yh,fot:this.Zh,s:this.rc,st:this.Lc.Y,mo:this.Ue}};b.Fb=function(b){this.ng=b.fit;this.yh=b.wt;this.Zh=b.fot;this.rc=b.s;this.Lc.reset();this.Lc.Y=b.st;this.Ue=b.mo};b.Aa=function(){this.Lc.add(this.b.tf(this.j));0===this.rc&&(this.j.opacity=this.Lc.Y/this.ng*this.Ue,this.b.fa=!0,this.j.opacity>=this.Ue&&(this.j.opacity=this.Ue,this.rc=1,this.Lc.reset()));1===this.rc&&this.Lc.Y>=this.yh&&(this.rc=2,this.Lc.reset());2===this.rc&&0!==this.Zh&&(this.j.opacity=
this.Ue-this.Lc.Y/this.Zh*this.Ue,this.b.fa=!0,0>this.j.opacity&&(this.j.opacity=0,this.rc=3,this.Lc.reset(),this.b.trigger(qc.prototype.n.qq,this.j),1===this.qr&&this.b.dd(this.j)))};b.Ev=function(){this.rc=0;this.Lc.reset();0===this.ng?(this.rc=1,0===this.yh&&(this.rc=2)):(this.j.opacity=0,this.b.fa=!0)};l.prototype.qq=function(){return!0};h.n=new l;h.ka=new function(){}})();function rc(l){this.b=l}
(function(){var l=rc.prototype;l.ta=function(h){this.behavior=h;this.b=h.b};l.ta.prototype.R=function(){};l.ga=function(h,b){this.type=h;this.behavior=h.behavior;this.j=b;this.b=h.b;this.mode=0};l=l.ga.prototype;l.R=function(){this.mode=this.C[0]};l.Aa=function(){};l.Ij=function(){this.j.Ea();var h=this.j.Ba,b=this.j.i.pa,d=!1;0===this.mode?(0>this.j.x&&(this.j.x=0,d=!0),0>this.j.y&&(this.j.y=0,d=!0),this.j.x>b.width&&(this.j.x=b.width,d=!0),this.j.y>b.height&&(this.j.y=b.height,d=!0)):(0>h.left&&
(this.j.x-=h.left,d=!0),0>h.top&&(this.j.y-=h.top,d=!0),h.right>b.width&&(this.j.x-=h.right-b.width,d=!0),h.bottom>b.height&&(this.j.y-=h.bottom-b.height,d=!0));d&&this.j.N()}})();function sc(l){this.b=l}
(function(){var l=sc.prototype;l.ta=function(h){this.behavior=h;this.b=h.b};l.ta.prototype.R=function(){};l.ga=function(h,b){this.type=h;this.behavior=h.behavior;this.j=b;this.b=h.b};l=l.ga.prototype;l.R=function(){};l.Aa=function(){this.j.Ea();var h=this.j.Ba,b=this.j.i.pa;(0>h.right||0>h.bottom||h.left>b.width||h.top>b.height)&&this.b.dd(this.j)}})();function tc(l){this.b=l;this.im=this.xj=this.nh=this.hm=0}
(function(){var l=tc.prototype;l.ta=function(b){this.behavior=b;this.b=b.b};l.ta.prototype.R=function(){};l.ga=function(b,d){this.type=b;this.behavior=b.behavior;this.j=d;this.b=b.b};var h=l.ga.prototype;h.R=function(){this.enabled=0!==this.C[0]};h.ob=function(){return{smg:this.behavior.hm,ss:this.behavior.nh,se:this.behavior.xj,smd:this.behavior.im}};h.Fb=function(b){this.behavior.hm=b.smg;this.behavior.nh=b.ss;this.behavior.xj=b.se;this.behavior.im=b.smd};h.Aa=function(){};h.Ij=function(){if(this.enabled){var b=
this.behavior.Si.Pd(),d=0,h=0,a,c,g,e=0;a=0;for(c=b.length;a<c;a++){a:{g=b[a];for(var l=void 0,u=void 0,s=void 0,l=0,u=g.O.length;l<u;++l)if(s=g.O[l],s.behavior instanceof tc){g=s;break a}g=null}g&&g.enabled&&(d+=b[a].x,h+=b[a].y,++e)}b=this.j.i.pa;c=this.b.$b.Y;g=a=0;c>=this.behavior.nh&&c<this.behavior.xj&&(a=this.behavior.hm*Math.min(this.b.ef,1),0===this.behavior.im&&(a*=1-(c-this.behavior.nh)/(this.behavior.xj-this.behavior.nh)),c=Math.random()*Math.PI*2,g=Math.random()*a,a=Math.cos(c)*g,g*=
Math.sin(c));b.em(d/e+a);b.fm(h/e+g)}};l.ka=new function(){}})();
function cc(){return[dc,jc,ec,fc,gc,W,ic,hc,qc,oc,sc,pc,tc,rc,V.prototype.n.aq,W.prototype.ka.Hq,fc.prototype.Sa.ak,fc.prototype.Sa.bk,hc.prototype.ka.Gq,V.prototype.ka.Cq,W.prototype.Sa.ak,W.prototype.Sa.bk,fc.prototype.ka.Bq,fc.prototype.n.Xj,W.prototype.ka.Jq,W.prototype.n.oq,W.prototype.ka.Kq,W.prototype.ka.Yp,dc.prototype.ka.Play,V.prototype.n.Km,W.prototype.ka.Aq,V.prototype.Sa.random,W.prototype.n.dq,W.prototype.n.Vp,V.prototype.ka.Qp,V.prototype.n.$p,V.prototype.n.Wp,V.prototype.ka.Xp,dc.prototype.ka.Eq,
W.prototype.ka.Fq,W.prototype.ka.Dq,W.prototype.ka.Nm,dc.prototype.ka.zq]};