Skip to content

Instantly share code, notes, and snippets.

@henopied
Created February 29, 2016 23:07
Show Gist options
  • Save henopied/20198257200d18ed85c8 to your computer and use it in GitHub Desktop.
Save henopied/20198257200d18ed85c8 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
(function(Ik,cd){function t(a,b){function c(){}c.prototype=a;var d=new c,e;for(e in b)d[e]=b[e];b.toString!==Object.prototype.toString&&(d.toString=b.toString);return d}function dd(a){return a instanceof Array?function(){return H.iter(a)}:"function"==typeof a.iterator?k(a,a.iterator):a.iterator}function k(a,b){if(null==b)return null;null==b.__id__&&(b.__id__=Rl++);var c;null==a.hx__closures__?a.hx__closures__={}:c=a.hx__closures__[b.__id__];null==c&&(c=function(){return c.method.apply(c.scope,arguments)},c.scope=a,c.method=b,a.hx__closures__[b.__id__]=c);return c}cd.promhx=cd.promhx||{};cd.openfl=cd.openfl||{};cd.lime=cd.lime||{};var g={},u=function(){return y.__string_rec(this,"")},Ha=function(){};g.ApplicationMain=Ha;Ha.__name__=["ApplicationMain"];Ha.config=null;Ha.preloader=null;Ha.create=function(){var a=new qg;a.create(Ha.config);var b=new Mc;Ha.preloader=new rg(b);a.setPreloader(Ha.preloader);Ha.preloader.onComplete.add(Ha.init);Ha.preloader.create(Ha.config);var b=[],c=[];b.push("core-assets/Close.png");c.push("IMAGE");b.push("core-assets/Close_disabled.png");c.push("IMAGE");b.push("core-assets/oaktree.png");c.push("IMAGE");b.push("atlas/main_shop.png");c.push("IMAGE");b.push("atlas/main_shop.xml");c.push("TEXT");b.push("img/Close.png");c.push("IMAGE");b.push("img/Close_disabled.png");c.push("IMAGE");b.push("img/Close_disabled_old.png");c.push("IMAGE");b.push("img/Close_old.png");c.push("IMAGE");b.push("img/Exp_Star.png");c.push("IMAGE");b.push("img/FB_Arrow.png");c.push("IMAGE");b.push("img/Facebook_Share_BTN.png");c.push("IMAGE");b.push("img/Facebook_Symbol.png");c.push("IMAGE");b.push("img/Login_Play.png");c.push("IMAGE");b.push("img/Twitter_Share_BTN.png");c.push("IMAGE");b.push("img/arrow.png");c.push("IMAGE");b.push("img/back_button.png");c.push("IMAGE");b.push("img/currency_icon.png");c.push("IMAGE");b.push("img/fast_play.png");c.push("IMAGE");b.push("img/giant_coin.png");c.push("IMAGE");b.push("img/hint.png");c.push("IMAGE");b.push("img/incentive_android+iphone.png");c.push("IMAGE");b.push("img/incentive_android.png");c.push("IMAGE");b.push("img/incentive_android_button.png");c.push("IMAGE");b.push("img/incentive_iphone_button.png");c.push("IMAGE");b.push("img/massboost_2x_shop.png");c.push("IMAGE");b.push("img/massboost_3x_shop.png");c.push("IMAGE");b.push("img/multiplier_stamp.png");c.push("IMAGE");b.push("img/not_for_guests.png");c.push("IMAGE");b.push("img/play.png");c.push("IMAGE");b.push("img/profilepic_guest.png");c.push("IMAGE");b.push("img/sticker.png");c.push("IMAGE");b.push("img/xpboost_2x_shop.png");c.push("IMAGE");b.push("img/xpboost_3x_shop.png");c.push("IMAGE");b.push("particle/LevelUpSlotBar-ipadhd.plist");c.push("TEXT");b.push("particle/LevelUpSlotBarParticle.png");c.push("IMAGE");if(null!=Ha.config.assetsPrefix)for(var d=0,e=b.length;d<e;){var f=d++;"FONT"!=c[f]&&(b[f]=Ha.config.assetsPrefix+b[f])}Ha.preloader.load(b,c);a.exec()};Ha.init=function(){Ha.preloader=null;Ha.start()};Ha.main=function(){Ha.config={build:"1",company:"Miniclip",file:"agario",fps:60,name:"Agario",orientation:"",packageName:"agario",version:"1.1.2",windows:[{antialiasing:0,background:0,borderless:!1,depthBuffer:!1,display:0,fullscreen:!1,hardware:!0,height:1024,parameters:"{}",resizable:!0,stencilBuffer:!0,title:"Agario",vsync:!1,width:1280,x:null,y:null}]}};Ha.start=function(){for(var a=!1,b=Qa.resolveClass("Main"),c=0,d=Qa.getClassFields(b);c<d.length;){var e=d[c];++c;if("main"==e){a=!0;break}}aa.initialize();a?G.callMethod(b,G.field(b,"main"),[]):Qa.createInstance(sg,[]);ja.current.stage.window.__fullscreen&&ja.current.stage.dispatchEvent(new pe(pe.FULL_SCREEN,!1,!1,!0,!0));ja.current.stage.dispatchEvent(new v(v.RESIZE,!1,!1))};var Jk=function(){};g["openfl.events.IEventDispatcher"]=Jk;Jk.__name__=["openfl","events","IEventDispatcher"];var ba=function(a){null!=a&&(this.__targetDispatcher=a)};g["openfl.events.EventDispatcher"]=ba;ba.__name__=["openfl","events","EventDispatcher"];ba.__interfaces__=[Jk];ba.__sortByPriority=function(a,b){return a.priority==b.priority?0:a.priority>b.priority?-1:1};ba.prototype={__dispatching:null,__targetDispatcher:null,__eventMap:null,__newEventMap:null,addEventListener:function(a,b,c,d,e){null==d&&(d=0);null==c&&(c=!1);null==this.__eventMap&&(this.__dispatching=new ka,this.__eventMap=new ka,this.__newEventMap=new ka);if(this.__eventMap.exists(a)){1==this.__dispatching.get(a)?this.__newEventMap.exists(a)?e=this.__newEventMap.get(a):(e=this.__eventMap.get(a).slice(),this.__newEventMap.set(a,e)):e=this.__eventMap.get(a);a=0;for(var f=e.length;a<f;){var n=a++;if(G.compareMethods(e[n].callback,b))return}e.push(new tg(b,c,d));e.sort(ba.__sortByPriority)}else e=[],e.push(new tg(b,c,d)),this.__eventMap.set(a,e)},dispatchEvent:function(a){a.target=null!=this.__targetDispatcher?this.__targetDispatcher:this;return this.__dispatchEvent(a)},hasEventListener:function(a){return null==this.__eventMap?!1:1==this.__dispatching.get(a)&&this.__newEventMap.exists(a)?0<this.__newEventMap.get(a).length:this.__eventMap.exists(a)},removeEventListener:function(a,b,c){null==c&&(c=!1);if(null!=this.__eventMap){var d=this.__eventMap.get(a);if(null!=d){var e=1==this.__dispatching.get(a);e&&(this.__newEventMap.exists(a)?d=this.__newEventMap.get(a):(d=this.__eventMap.get(a).slice(),this.__newEventMap.set(a,d)));for(var f=0,n=d.length;f<n;){var L=f++;if(d[L].match(b,c)){d.splice(L,1);break}}e||(0==d.length&&this.__eventMap.remove(a),this.__eventMap.iterator().hasNext()||(this.__newEventMap=this.__eventMap=null))}}},__dispatchEvent:function(a){if(null==this.__eventMap||null==a)return!1;var b=a.type,c;if(1==this.__dispatching.get(b)){c=this.__newEventMap.get(b);if(null==c)return!1;c=c.slice()}else{c=this.__eventMap.get(b);if(null==c)return!1;this.__dispatching.set(b,!0)}null==a.target&&(a.target=null!=this.__targetDispatcher?this.__targetDispatcher:this);a.currentTarget=this;for(var d=a.eventPhase==Bb.CAPTURING_PHASE,e=0,f;e<c.length;){f=c[e];if(f.useCapture==d&&(f.callback(a),a.__isCancelledNow))break;f==c[e]&&e++}null!=this.__newEventMap&&this.__newEventMap.exists(b)&&(c=this.__newEventMap.get(b),0<c.length?this.__eventMap.set(b,c):this.__eventMap.remove(b),this.__eventMap.iterator().hasNext()?this.__newEventMap.remove(b):this.__newEventMap=this.__eventMap=null);this.__dispatching.set(a.type,!1);return!0},__class__:ba};var ug=function(){};g["openfl.display.IBitmapDrawable"]=ug;ug.__name__=["openfl","display","IBitmapDrawable"];ug.prototype={__worldTransform:null,__worldColorTransform:null,__blendMode:null,__cacheAsBitmap:null,__renderCanvas:null,__renderGL:null,__updateChildren:null,__updateTransforms:null,__class__:ug};var W=function(){this.__cacheAsBitmapSmooth=!0;this.__maskCached=this.__cacheAsBitmap=!1;ba.call(this);this.__alpha=1;this.__transform=new ra;this.__visible=!0;this.__rotationSine=this.__rotation=0;this.__rotationCosine=1;this.__renderTransform=new ra;this.__offset=new Ea;this.__worldOffset=new Ea;this.__worldAlpha=1;this.__worldTransform=new ra;this.__worldColorTransform=new Cc;this.set_name("instance"+ ++W.__instanceCount)};g["openfl.display.DisplayObject"]=W;W.__name__=["openfl","display","DisplayObject"];W.__interfaces__=[ug];W.__super__=ba;W.prototype=t(ba.prototype,{blendMode:null,cacheAsBitmapBounds:null,loaderInfo:null,parent:null,shader:null,stage:null,__renderTransform:null,__worldColorTransform:null,__worldOffset:null,__worldTransform:null,__alpha:null,__blendMode:null,__children:null,__filters:null,__graphics:null,__isMask:null,__mask:null,__maskGraphics:null,__maskCached:null,__name:null,__objectTransform:null,__offset:null,__renderable:null,__renderDirty:null,__rotation:null,__rotationCosine:null,__rotationSine:null,__scrollRect:null,__shader:null,__transform:null,__transformDirty:null,__visible:null,__worldAlpha:null,__worldAlphaChanged:null,__worldClip:null,__worldClipChanged:null,__worldTransformChanged:null,__worldVisible:null,__worldVisibleChanged:null,__worldZ:null,__cacheAsBitmap:null,__cacheAsBitmapMatrix:null,__cacheAsBitmapSmooth:null,__forceCacheAsBitmap:null,__updateCachedBitmap:null,__cachedBitmap:null,__cachedBitmapBounds:null,__cachedFilterBounds:null,__updateFilters:null,__cacheGLMatrix:null,__canvas:null,__context:null,__style:null,getBounds:function(a){var b;null!=a?(b=this.__getWorldTransform().clone(),b.concat(a.__getWorldTransform().clone().invert())):(b=ra.__temp,b.identity());a=new ha;this.__getBounds(a,b);return a},globalToLocal:function(a){a=a.clone();this.__getWorldTransform().__transformInversePoint(a);return a},localToGlobal:function(a){return this.__getWorldTransform().transformPoint(a)},__broadcast:function(a,b){if(null!=this.__eventMap&&this.hasEventListener(a.type)){var c=ba.prototype.__dispatchEvent.call(this,a);return a.__isCancelled?!0:c}return!1},__dispatchEvent:function(a){var b=ba.prototype.__dispatchEvent.call(this,a);if(a.__isCancelled)return!0;a.bubbles&&null!=this.parent&&this.parent!=this&&(a.eventPhase=Bb.BUBBLING_PHASE,null==a.target&&(a.target=this),this.parent.__dispatchEvent(a));return b},__enterFrame:function(a){},__getBounds:function(a,b){null!=this.__graphics&&this.__graphics.__getBounds(a,b)},__getRenderBounds:function(a,b){if(null==this.__scrollRect)this.__getBounds(a,b);else{var c=ha.__temp;c.copyFrom(this.__scrollRect);c.__transform(c,b);a.__expand(b.tx,b.ty,c.width,c.height)}},__getCursor:function(){return null},__getInteractive:function(a){return!1},__getWorldTransform:function(){if(this.__transformDirty||0<W.__worldTransformDirty){var a=[],b=this,c=this.__transformDirty;if(null==this.parent)c&&this.__update(!0,!1);else for(;null!=b.parent;)a.push(b),b=b.parent,b.__transformDirty&&(c=!0);if(c)for(b=a.length;0<=--b;)a[b].__update(!0,!1)}return this.__worldTransform},__hitTest:function(a,b,c,d,e){if(null!=this.__graphics){if(!this.get_visible()||this.__isMask||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b))return!1;if(this.__graphics.__hitTest(a,b,c,this.__getWorldTransform()))return null==d||e||d.push(this),!0}return!1},__hitTestMask:function(a,b){return null!=this.__graphics&&this.__graphics.__hitTest(a,b,!0,this.__getWorldTransform())?!0:!1},__renderCairo:function(a){null!=this.__graphics&&Kk.render(this,a)},__renderCairoMask:function(a){null!=this.__graphics&&Fa.renderMask(this.__graphics,a)},__renderCanvas:function(a){null!=this.__graphics&&Lk.render(this,a)},__renderCanvasMask:function(a){null!=this.__graphics&&q.renderMask(this.__graphics,a)},__renderDOM:function(a){null!=this.__graphics&&Mk.render(this,a)},__renderGL:function(a){!this.__renderable||0>=this.__worldAlpha||(this.__cacheAsBitmap?this.__cacheGL(a):(null!=this.__scrollRect&&a.maskManager.pushRect(this.__scrollRect,this.__renderTransform),null!=this.__mask&&null!=this.__maskGraphics&&0<this.__maskGraphics.__commands.get_length()&&a.maskManager.pushMask(this),null!=this.__graphics&&(this.__graphics.__hardware?N.render(this,a):(q.render(this.__graphics,a),Hb.renderBitmap(this,a))),null!=this.__mask&&null!=this.__maskGraphics&&0<this.__maskGraphics.__commands.get_length()&&a.maskManager.popMask(),null!=this.__scrollRect&&a.maskManager.popRect()))},__cacheGL:function(a){var b=null!=this.__cacheAsBitmapMatrix,c=this.__cachedBitmapBounds.x,d=this.__cachedBitmapBounds.y,e=this.__cachedBitmapBounds.width,f=this.__cachedBitmapBounds.height;null==this.__cacheGLMatrix&&(this.__cacheGLMatrix=new ra);b?(b=ha.__temp,this.__cachedBitmapBounds.__transform(b,this.__cacheAsBitmapMatrix),c=b.x,d=b.y,e=b.width,f=b.height,this.__cacheGLMatrix=this.__cacheAsBitmapMatrix.clone()):this.__cacheGLMatrix.identity();if(0>=e&&0>=f)throw new m("Error creating a cached bitmap. The texture size is "+e+"x"+f);if(this.__updateCachedBitmap||this.__updateFilters)null!=this.__cachedFilterBounds&&(e+=Math.abs(this.__cachedFilterBounds.x)+
Math.abs(this.__cachedFilterBounds.width),f+=Math.abs(this.__cachedFilterBounds.y)+Math.abs(this.__cachedFilterBounds.height)),null==this.__cachedBitmap&&(this.__cachedBitmap=Ra.__asRenderTexture()),this.__cachedBitmap.__resize(Math.ceil(e),Math.ceil(f)),e=this.__cacheGLMatrix.clone(),e.translate(-c,-d),b=this.__shader,this.__shader=null,this.__cachedBitmap.__drawGL(a,this,e,null,null,null,!0,!1,!0),this.__shader=b,this.__updateCachedBitmap=!1;this.__updateFilters&&(pc.__applyFilters(this.__filters,a,this.__cachedBitmap,this.__cachedBitmap,null,null),this.__updateFilters=!1);this.__cacheGLMatrix.invert();this.__cacheGLMatrix.__translateTransformed(c,d);this.__cacheGLMatrix.concat(this.__renderTransform);this.__cacheGLMatrix.translate(this.__offset.x,this.__offset.y);a.spriteBatch.renderBitmapData(this.__cachedBitmap,this.__cacheAsBitmapSmooth,this.__cacheGLMatrix,this.__worldColorTransform,this.__worldAlpha,this.blendMode,this.__shader,$a.ALWAYS)},__setStageReference:function(a){this.stage!=a&&(null!=this.stage&&(this.stage.get_focus()==this&&this.stage.set_focus(null),this.dispatchEvent(new v(v.REMOVED_FROM_STAGE,!1,!1))),this.stage=a,null!=a&&this.dispatchEvent(new v(v.ADDED_TO_STAGE,!1,!1)))},__setRenderDirty:function(){this.__renderDirty||(this.__updateCachedBitmap=!0,this.__updateFilters=null!=this.get_filters()&&0<this.get_filters().length,this.__renderDirty=!0,W.__worldRenderDirty++)},__setTransformDirty:function(){this.__transformDirty||(this.__transformDirty=!0,W.__worldTransformDirty++)},__updateTransforms:function(a){var b=null!=a;a=b?new ra(a.a,a.b,a.c,a.d,a.tx,a.ty):this.__transform;null==this.__worldTransform&&(this.__worldTransform=new ra);b||null==this.parent?(this.__worldTransform.copyFrom(a),this.__worldOffset.setTo(0,0)):(b=this.parent.__worldTransform,this.__worldTransform.a=a.a*b.a+a.b*b.c,this.__worldTransform.b=a.a*b.b+a.b*b.d,this.__worldTransform.c=a.c*b.a+a.d*b.c,this.__worldTransform.d=a.c*b.b+a.d*b.d,this.__worldTransform.tx=a.tx*b.a+a.ty*b.c+b.tx,this.__worldTransform.ty=a.tx*b.b+a.ty*b.d+b.ty,this.__worldOffset.copyFrom(this.parent.__worldOffset));null!=this.__scrollRect?(this.__offset=this.__worldTransform.deltaTransformPoint(this.__scrollRect.get_topLeft()),this.__worldOffset.offset(this.__offset.x,this.__offset.y)):this.__offset.setTo(0,0);this.__renderTransform.copyFrom(this.__worldTransform);this.__renderTransform.translate(-this.__worldOffset.x,-this.__worldOffset.y)},__update:function(a,b,c){this.__renderable=this.get_visible()&&0!=this.get_scaleX()&&0!=this.get_scaleY()&&!this.__isMask;this.__updateTransforms();null!=this.parent&&this.__isMask&&(this.__maskCached=!1);b&&this.__transformDirty&&(this.__transformDirty=!1,W.__worldTransformDirty--);a||null==this.__mask||this.__mask.__maskCached||(null==this.__maskGraphics&&(this.__maskGraphics=new Nd),this.__maskGraphics.clear(),this.__mask.__update(!0,!0,this.__maskGraphics),this.__mask.__maskCached=!0);null!=c&&this.__updateMask(c);!a&&this.__cacheAsBitmap&&(this.__updateCachedBitmap||this.__updateFilters)&&(null==this.__cachedBitmapBounds&&(this.__cachedBitmapBounds=new ha),null!=this.cacheAsBitmapBounds?this.__cachedBitmapBounds.copyFrom(this.cacheAsBitmapBounds):(this.__cachedBitmapBounds.setEmpty(),this.__getRenderBounds(this.__cachedBitmapBounds,ra.__identity)),null!=this.__filters&&(null==this.__cachedFilterBounds&&(this.__cachedFilterBounds=new ha),this.__cachedFilterBounds.setEmpty(),pc.__expandBounds(this.__filters,this.__cachedFilterBounds,ra.__identity),this.__cachedBitmapBounds.x+=this.__cachedFilterBounds.x,this.__cachedBitmapBounds.y+=this.__cachedFilterBounds.y));if(!a){this.__worldColorTransform.__equals(this.get_transform().get_colorTransform())||(this.__worldColorTransform=this.get_transform().get_colorTransform().__clone());if(null!=this.parent){this.__worldAlpha=this.get_alpha()*this.parent.__worldAlpha;this.__worldColorTransform.__combine(this.parent.__worldColorTransform);if(null==this.blendMode||this.blendMode==S.NORMAL)this.__blendMode=this.parent.__blendMode;null==this.shader&&(this.__shader=this.parent.__shader)}else this.__worldAlpha=this.get_alpha();b&&this.__renderDirty&&(this.__renderDirty=!1)}},__updateChildren:function(a){if((this.__renderable=this.get_visible()&&0!=this.get_scaleX()&&0!=this.get_scaleY()&&!this.__isMask)||this.__isMask)this.__worldAlpha=this.get_alpha(),this.__transformDirty&&(this.__transformDirty=!1,W.__worldTransformDirty--)},__updateMask:function(a){null!=this.__graphics&&(a.__commands.overrideMatrix(this.__worldTransform),a.__commands.append(this.__graphics.__commands),a.set___dirty(!0),a.__visible=!0,null==a.__bounds&&(a.__bounds=new ha),this.__graphics.__getBounds(a.__bounds,ra.__identity))},get_alpha:function(){return this.__alpha},set_alpha:function(a){1<a&&(a=1);a==this.__alpha||this.__renderDirty||(this.__updateCachedBitmap=!0,this.__updateFilters=null!=this.get_filters()&&0<this.get_filters().length,this.__renderDirty=!0,W.__worldRenderDirty++);return this.__alpha=a},get_cacheAsBitmap:function(){return this.__cacheAsBitmap},set_cacheAsBitmap:function(a){this.__renderDirty||(this.__updateCachedBitmap=!0,this.__updateFilters=null!=this.get_filters()&&0<this.get_filters().length,this.__renderDirty=!0,W.__worldRenderDirty++);return this.__forceCacheAsBitmap?this.__cacheAsBitmap=!0:this.__cacheAsBitmap=a},get_filters:function(){return null==this.__filters?[]:this.__filters.slice()},set_filters:function(a){null!=a&&0<a.length?(this.__filters=a,this.__updateFilters=this.__cacheAsBitmap=this.__forceCacheAsBitmap=!0):(this.__filters=null,this.__updateFilters=this.__cacheAsBitmap=this.__forceCacheAsBitmap=!1);this.__renderDirty||(this.__updateCachedBitmap=!0,this.__updateFilters=null!=this.get_filters()&&0<this.get_filters().length,this.__renderDirty=!0,W.__worldRenderDirty++);return a},get_height:function(){var a=new ha;this.__getBounds(a,this.__transform);return a.height},get_mask:function(){return this.__mask},set_mask:function(a){a!=this.__mask&&(this.__transformDirty||(this.__transformDirty=!0,W.__worldTransformDirty++),this.__renderDirty||(this.__updateCachedBitmap=!0,this.__updateFilters=null!=this.get_filters()&&0<this.get_filters().length,this.__renderDirty=!0,W.__worldRenderDirty++));null!=this.__mask&&(this.__mask.__isMask=!1,this.__mask.__maskCached=!1,this.__mask.__setTransformDirty(),this.__mask.__setRenderDirty(),this.__maskGraphics=null);null!=a&&(a.__isMask=!0);return this.__mask=a},get_mouseX:function(){var a;a=null!=this.stage?this.stage.__mouseX:ja.current.stage.__mouseX;var b;b=null!=this.stage?this.stage.__mouseY:ja.current.stage.__mouseY;return this.__getWorldTransform().__transformInverseX(a,b)},get_mouseY:function(){var a;a=null!=this.stage?this.stage.__mouseX:ja.current.stage.__mouseX;var b;b=null!=this.stage?this.stage.__mouseY:ja.current.stage.__mouseY;return this.__getWorldTransform().__transformInverseY(a,b)},get_name:function(){return this.__name},set_name:function(a){return this.__name=a},set_rotation:function(a){if(a!=this.__rotation){this.__rotation=a;var b=Math.PI/180*this.__rotation;this.__rotationSine=Math.sin(b);this.__rotationCosine=Math.cos(b);var b=this.get_scaleX(),c=this.get_scaleY();this.__transform.a=this.__rotationCosine*b;this.__transform.b=this.__rotationSine*b;this.__transform.c=-this.__rotationSine*c;this.__transform.d=this.__rotationCosine*c;this.__transformDirty||(this.__transformDirty=!0,W.__worldTransformDirty++)}return a},get_scaleX:function(){return 0==this.__transform.b?this.__transform.a:Math.sqrt(this.__transform.a*this.__transform.a+this.__transform.b*this.__transform.b)},set_scaleX:function(a){if(0==this.__transform.c)a==this.__transform.a||this.__transformDirty||(this.__transformDirty=!0,W.__worldTransformDirty++),this.__transform.a=a;else{var b=this.__rotationCosine*a,c=this.__rotationSine*a;this.__transform.a==b&&this.__transform.b==c||this.__transformDirty||(this.__transformDirty=!0,W.__worldTransformDirty++);this.__transform.a=b;this.__transform.b=c}return a},get_scaleY:function(){return 0==this.__transform.c?this.__transform.d:Math.sqrt(this.__transform.c*this.__transform.c+this.__transform.d*this.__transform.d)},set_scaleY:function(a){if(0==this.__transform.c)a==this.__transform.d||this.__transformDirty||(this.__transformDirty=!0,W.__worldTransformDirty++),this.__transform.d=a;else{var b=-this.__rotationSine*a,c=this.__rotationCosine*a;this.__transform.d==c&&this.__transform.c==b||this.__transformDirty||(this.__transformDirty=!0,W.__worldTransformDirty++);this.__transform.c=b;this.__transform.d=c}return a},get_scrollRect:function(){return null==this.__scrollRect?null:this.__scrollRect.clone()},get_transform:function(){null==this.__objectTransform&&(this.__objectTransform=new Vi(this));return this.__objectTransform},get_visible:function(){return this.__visible},set_visible:function(a){a==this.__visible||this.__renderDirty||(this.__updateCachedBitmap=!0,this.__updateFilters=null!=this.get_filters()&&0<this.get_filters().length,this.__renderDirty=!0,W.__worldRenderDirty++);return this.__visible=a},get_width:function(){var a=new ha;this.__getBounds(a,this.__transform);return a.width},get_x:function(){return this.__transform.tx},set_x:function(a){a==this.__transform.tx||this.__transformDirty||(this.__transformDirty=!0,W.__worldTransformDirty++);return this.__transform.tx=a},get_y:function(){return this.__transform.ty},set_y:function(a){a==this.__transform.ty||this.__transformDirty||(this.__transformDirty=!0,W.__worldTransformDirty++);return this.__transform.ty=a},__class__:W,__properties__:{get_mouseY:"get_mouseY",get_mouseX:"get_mouseX",set_y:"set_y",get_y:"get_y",set_x:"set_x",get_x:"get_x",get_width:"get_width",set_visible:"set_visible",get_visible:"get_visible",get_transform:"get_transform",get_scrollRect:"get_scrollRect",set_scaleY:"set_scaleY",get_scaleY:"get_scaleY",set_scaleX:"set_scaleX",get_scaleX:"get_scaleX",set_rotation:"set_rotation",set_name:"set_name",get_name:"get_name",set_mask:"set_mask",get_mask:"get_mask",get_height:"get_height",set_filters:"set_filters",get_filters:"get_filters",set_cacheAsBitmap:"set_cacheAsBitmap",get_cacheAsBitmap:"get_cacheAsBitmap",set_alpha:"set_alpha",get_alpha:"get_alpha"}});var Sa=function(){W.call(this);this.doubleClickEnabled=!1;this.mouseEnabled=!0;this.__tabEnabled=this.needsSoftKeyboard=!1;this.tabIndex=-1};g["openfl.display.InteractiveObject"]=Sa;Sa.__name__=["openfl","display","InteractiveObject"];Sa.__super__=W;Sa.prototype=t(W.prototype,{doubleClickEnabled:null,mouseEnabled:null,needsSoftKeyboard:null,tabIndex:null,__tabEnabled:null,__getInteractive:function(a){null!=a&&(a.push(this),null!=this.parent&&this.parent.__getInteractive(a));return!0},__hitTest:function(a,b,c,d,e){return!this.get_visible()||this.__isMask||e&&!this.mouseEnabled?!1:W.prototype.__hitTest.call(this,a,b,c,d,e)},get_tabEnabled:function(){return this.__tabEnabled},__class__:Sa,__properties__:t(W.prototype.__properties__,{get_tabEnabled:"get_tabEnabled"})});var Qb=function(){Sa.call(this);this.mouseChildren=!0;this.__children=[];this.__removedChildren=[]};g["openfl.display.DisplayObjectContainer"]=Qb;Qb.__name__=["openfl","display","DisplayObjectContainer"];Qb.__super__=Sa;Qb.prototype=t(Sa.prototype,{mouseChildren:null,__removedChildren:null,addChild:function(a){if(null!=a){null!=a.parent&&a.parent.removeChild(a);this.__children.push(a);a.parent=this;null!=this.stage&&a.__setStageReference(this.stage);a.__transformDirty||(a.__transformDirty=!0,W.__worldTransformDirty++);a.__renderDirty||(a.__updateCachedBitmap=!0,a.__updateFilters=null!=a.get_filters()&&0<a.get_filters().length,a.__renderDirty=!0,W.__worldRenderDirty++);this.__renderDirty||(this.__updateCachedBitmap=!0,this.__updateFilters=null!=this.get_filters()&&0<this.get_filters().length,this.__renderDirty=!0,W.__worldRenderDirty++);var b=new v(v.ADDED,!0);b.target=a;a.__dispatchEvent(b)}return a},contains:function(a){for(;a!=this&&null!=a;)a=a.parent;return a==this},getChildAt:function(a){return 0<=a&&a<this.__children.length?this.__children[a]:null},removeChild:function(a){null!=a&&a.parent==this&&(a.__dispatchEvent(new v(v.REMOVED,!0)),null!=this.stage&&a.__setStageReference(null),a.parent=null,H.remove(this.__children,a),this.__removedChildren.push(a),a.__transformDirty||(a.__transformDirty=!0,W.__worldTransformDirty++),a.__renderDirty||(a.__updateCachedBitmap=!0,a.__updateFilters=null!=a.get_filters()&&0<a.get_filters().length,a.__renderDirty=!0,W.__worldRenderDirty++),this.__renderDirty||(this.__updateCachedBitmap=!0,this.__updateFilters=null!=this.get_filters()&&0<this.get_filters().length,this.__renderDirty=!0,W.__worldRenderDirty++));return a},removeChildAt:function(a){return 0<=a&&a<this.__children.length?this.removeChild(this.__children[a]):null},setChildIndex:function(a,b){0<=b&&b<=this.__children.length&&a.parent==this&&(H.remove(this.__children,a),this.__children.splice(b,0,a))},__broadcast:function(a,b){null==a.target&&(a.target=this);var c=Sa.prototype.__broadcast.call(this,a,b);if(!a.__isCancelled&&b)for(var d=0,e=this.__children;d<e.length;){var f=e[d];++d;f.__broadcast(a,!0);if(a.__isCancelled)return!0}return c},__enterFrame:function(a){for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;d.__enterFrame(a)}},__getBounds:function(a,b){Sa.prototype.__getBounds.call(this,a,b);if(0!=this.__children.length){null!=b&&(this.__updateTransforms(b),this.__updateChildren(!0));for(var c=0,d=this.__children;c<d.length;){var e=d[c];++c;0==e.get_scaleX()||0==e.get_scaleY()||e.__isMask||e.__getBounds(a,e.__worldTransform)}null!=b&&(this.__updateTransforms(),this.__updateChildren(!0))}},__getRenderBounds:function(a,b){if(null!=this.__scrollRect)Sa.prototype.__getRenderBounds.call(this,a,b);else if(Sa.prototype.__getBounds.call(this,a,b),0!=this.__children.length){null!=b&&(this.__updateTransforms(b),this.__updateChildren(!0));for(var c=0,d=this.__children;c<d.length;){var e=d[c];++c;0==e.get_scaleX()||0==e.get_scaleY()||e.__isMask||e.__getRenderBounds(a,e.__worldTransform)}null!=b&&(this.__updateTransforms(),this.__updateChildren(!0))}},__hitTest:function(a,b,c,d,e){if(!this.get_visible()||this.__isMask||e&&!this.mouseEnabled&&!this.mouseChildren||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b)||null!=this.get_scrollRect()&&!this.get_scrollRect().containsPoint(this.globalToLocal(new Ea(a,b))))return!1;var f=this.__children.length;if(e)if(null==d||!this.mouseChildren)for(;0<=--f;){if(this.__children[f].__hitTest(a,b,c,null,!0))return null!=d&&d.push(this),!0}else{if(null!=d){e=d.length;for(var n=!1,L=!1;0<=--f&&!(((n=this.__children[f].__getInteractive(null))||this.mouseEnabled&&!L)&&this.__children[f].__hitTest(a,b,c,d,!0)&&(L=!0,n)););if(L)return d.splice(e,0,this),!0}}else for(;0<=--f;)this.__children[f].__hitTest(a,b,c,d,!1);return!1},__hitTestMask:function(a,b){for(var c=this.__children.length;0<=--c;)if(this.__children[c].__hitTestMask(a,b))return!0;return!1},__renderCairo:function(a){if(this.__renderable&&!(0>=this.__worldAlpha)){Sa.prototype.__renderCairo.call(this,a);null!=this.get_scrollRect()&&a.maskManager.pushRect(this.get_scrollRect(),this.__worldTransform);null!=this.__mask&&a.maskManager.pushMask(this.__mask);for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;d.__renderCairo(a)}0<this.__removedChildren.length&&this.__removedChildren.splice(0,this.__removedChildren.length);null!=this.__mask&&a.maskManager.popMask();null!=this.get_scrollRect()&&a.maskManager.popRect()}},__renderCairoMask:function(a){null!=this.__graphics&&Fa.renderMask(this.__graphics,a);for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;d.__renderCairoMask(a)}},__renderCanvas:function(a){if(this.__renderable&&!(0>=this.__worldAlpha)){Sa.prototype.__renderCanvas.call(this,a);null!=this.get_scrollRect()&&a.maskManager.pushRect(this.get_scrollRect(),this.__worldTransform);null!=this.__mask&&a.maskManager.pushMask(this.__mask);for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;d.__renderCanvas(a)}0<this.__removedChildren.length&&this.__removedChildren.splice(0,this.__removedChildren.length);null!=this.__mask&&a.maskManager.popMask();null!=this.get_scrollRect()&&a.maskManager.popRect()}},__renderCanvasMask:function(a){null!=this.__graphics&&q.renderMask(this.__graphics,a);var b=new ha;this.__getBounds(b,this.__transform);a.context.rect(0,0,b.width,b.height)},__renderDOM:function(a){Sa.prototype.__renderDOM.call(this,a);null!=this.__mask&&a.maskManager.pushMask(this.__mask);for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;d.__renderDOM(a)}b=0;for(c=this.__removedChildren;b<c.length;)d=c[b],++b,null==d.stage&&d.__renderDOM(a);0<this.__removedChildren.length&&this.__removedChildren.splice(0,this.__removedChildren.length);null!=this.__mask&&a.maskManager.popMask()},__renderGL:function(a){if(this.__renderable&&!(0>=this.__worldAlpha))if(this.__cacheAsBitmap)this.__cacheGL(a);else{null!=this.__scrollRect&&a.maskManager.pushRect(this.__scrollRect,this.__renderTransform);null!=this.__mask&&null!=this.__maskGraphics&&0<this.__maskGraphics.__commands.get_length()&&a.maskManager.pushMask(this);null!=this.__graphics&&(this.__graphics.__hardware?N.render(this,a):(q.render(this.__graphics,a),Hb.renderBitmap(this,a)));for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;d.__renderGL(a)}null!=this.__mask&&null!=this.__maskGraphics&&0<this.__maskGraphics.__commands.get_length()&&a.maskManager.popMask();null!=this.__scrollRect&&a.maskManager.popRect();0<this.__removedChildren.length&&this.__removedChildren.splice(0,this.__removedChildren.length)}},__setStageReference:function(a){if(this.stage!=a&&(null!=this.stage&&this.__dispatchEvent(new v(v.REMOVED_FROM_STAGE,!1,!1)),this.stage=a,null!=a&&this.__dispatchEvent(new v(v.ADDED_TO_STAGE,!1,!1)),null!=this.__children))for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;d.__setStageReference(a)}},__update:function(a,b,c){Sa.prototype.__update.call(this,a,b,c);if((this.__renderable||this.__isMask)&&b){b=0;for(var d=this.__children;b<d.length;){var e=d[b];++b;e.__update(a,!0,c)}}},__updateChildren:function(a){Sa.prototype.__updateChildren.call(this,a);for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;d.__update(a,!0)}},get_numChildren:function(){return this.__children.length},__class__:Qb,__properties__:t(Sa.prototype.__properties__,{get_numChildren:"get_numChildren"})});var C=function(){Qb.call(this);this.buttonMode=!1;this.useHandCursor=!0;this.loaderInfo=ed.create(null)};g["openfl.display.Sprite"]=C;C.__name__=["openfl","display","Sprite"];C.__super__=Qb;C.prototype=t(Qb.prototype,{buttonMode:null,useHandCursor:null,__getCursor:function(){return this.buttonMode&&this.useHandCursor?ca.POINTER:null},__hitTest:function(a,b,c,d,e){return!this.get_visible()||this.__isMask||e&&!this.mouseEnabled&&!this.mouseChildren||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b)?!1:Qb.prototype.__hitTest.call(this,a,b,c,d,e)?e:e&&!this.mouseEnabled||null==this.__graphics||!this.__graphics.__hitTest(a,b,c,this.__getWorldTransform())?!1:(null!=d&&d.push(this),!0)},__hitTestMask:function(a,b){return Qb.prototype.__hitTestMask.call(this,a,b)||null!=this.__graphics&&this.__graphics.__hitTest(a,b,!0,this.__getWorldTransform())?!0:!1},get_graphics:function(){null==this.__graphics&&(this.__graphics=new Nd,this.__graphics.__owner=this);return this.__graphics},get_tabEnabled:function(){return this.__tabEnabled||this.buttonMode},__class__:C,__properties__:t(Qb.prototype.__properties__,{get_graphics:"get_graphics"})});var Od=function(a){null==a&&(a=30);C.call(this);this._targetFPS=a;this._deltaTimeMS=this._lastTimeMS=this._currentTimeMS=this._frameCount=0;this._currentDate=new Date;this._creationTime=ja.getTimer();this.addEventListener(v.ADDED_TO_STAGE,k(this,this.onAddedToStage))};g["mc.Engine"]=Od;Od.__name__=["mc","Engine"];Od.__super__=C;Od.prototype=t(C.prototype,{states:null,scenes:null,_sceneContainer:null,_targetFPS:null,_frameCount:null,_currentDate:null,_creationTime:null,_timeStepS:null,_timeStepMS:null,_currentTimeMS:null,_lastTimeMS:null,_deltaTimeMS:null,onAddedToStage:function(a){this.removeEventListener(v.ADDED_TO_STAGE,k(this,this.onAddedToStage));kb.onEngineAddedToStage(this,this.stage);this.states=new qe({name:"MainFSM"});this._sceneContainer=new C;this.addChild(this._sceneContainer);this.scenes=new Wi(this._sceneContainer);this._timeStepMS=1E3/this._targetFPS;this._timeStepS=this._timeStepMS/1E3;this._lastTimeMS=this._currentTimeMS=ja.getTimer();this.addEventListener(v.ENTER_FRAME,k(this,this.onEnterFrame));this.initialize()},onEnterFrame:function(a){this._currentTimeMS=ja.getTimer();this._deltaTimeMS+=this._currentTimeMS-this._lastTimeMS;this._lastTimeMS=this._currentTimeMS;this._deltaTimeMS>=this._timeStepMS&&(this._deltaTimeMS-=this._timeStepMS,ja.getTimer(),this.scenes.update(this._timeStepS));this._frameCount++;this.scenes.lateUpdate()},initialize:function(){},time:null,get_time:function(){return this._currentDate.getTime()+(ja.getTimer()-this._creationTime)},__class__:Od,__properties__:t(C.prototype.__properties__,{get_time:"get_time"})});var Pd=function(){Od.call(this,30);xa.init()};g.Main=Pd;Pd.__name__=["Main"];Pd.instance=null;Pd.__super__=Od;Pd.prototype=t(Od.prototype,{shopDialog:null,onEnterFrame:function(a){ic.instance.gamepadSupportActive&&xa.update();Od.prototype.onEnterFrame.call(this,a)},initialize:function(){h.init(this.stage);this.stage.addEventListener(fd.KEY_DOWN,k(this,this.handleKeyEvent));this.resize(this.stage.stageWidth,this.stage.stageHeight)},handleKeyEvent:function(a){var b=h.states.getState("state_xsolla_iframe",!0),c=h.states.getState("state_offerwall_window",!0),d=h.states.getState("state_video_window",!0);27!=a.keyCode||b.enabled||c.enabled||d.enabled||(h.views.closeTopView(),h.views.get_hasViews()||(h.services.shop.isOpen=!1,h.services.gameui.hideContainer()))},resize:function(a,b){h.views.onResize(a,b)},onStageResize:function(a){this.resize(this.stage.stageWidth,this.stage.stageHeight)},__class__:Pd});var sg=function(){ja.current.addChild(this);Pd.call(this);this.dispatchEvent(new v(v.ADDED_TO_STAGE,!1,!1))};g.DocumentClass=sg;sg.__name__=["DocumentClass"];sg.__super__=Pd;sg.prototype=t(Pd.prototype,{__class__:sg});var rd=function(a){null==a&&(a=[]);this.valueClasses=a;this.slots=Ib.NIL;this.priorityBased=!1};g["msignal.Signal"]=rd;rd.__name__=["msignal","Signal"];rd.prototype={valueClasses:null,slots:null,priorityBased:null,add:function(a){return this.registerListener(a)},addOnce:function(a){return this.registerListener(a,!0)},remove:function(a){var b=this.slots.find(a);if(null==b)return null;this.slots=this.slots.filterNot(a);return b},removeAll:function(){this.slots=Ib.NIL},registerListener:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);return this.registrationPossible(a,b)?(a=this.createSlot(a,b,c),this.priorityBased||0==c||(this.priorityBased=!0),this.slots=this.priorityBased||0!=c?this.slots.insertWithPriority(a):this.slots.prepend(a),a):this.slots.find(a)},registrationPossible:function(a,b){if(!this.slots.nonEmpty)return!0;var c=this.slots.find(a);if(null==c)return!0;if(c.once!=b)throw new m("You cannot addOnce() then add() the same listener without removing the relationship first.");return!1},createSlot:function(a,b,c){return null},__class__:rd};var Cb=function(){rd.call(this)};g["msignal.Signal0"]=Cb;Cb.__name__=["msignal","Signal0"];Cb.__super__=rd;Cb.prototype=t(rd.prototype,{dispatch:function(){for(var a=this.slots;a.nonEmpty;)a.head.execute(),a=a.tail},createSlot:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);return new vg(this,a,b,c)},__class__:Cb});var Ib=function(a,b){this.nonEmpty=!1;if(null==a&&null==b){if(null!=Ib.NIL)throw new m("Parameters head and tail are null. Use the NIL element instead.");this.nonEmpty=!1}else{if(null==a)throw new m("Parameter head cannot be null.");this.head=a;this.tail=null==b?Ib.NIL:b;this.nonEmpty=!0}};g["msignal.SlotList"]=Ib;Ib.__name__=["msignal","SlotList"];Ib.NIL=null;Ib.prototype={head:null,tail:null,nonEmpty:null,prepend:function(a){return new Ib(a,this)},insertWithPriority:function(a){if(!this.nonEmpty)return new Ib(a);var b=a.priority;if(b>=this.head.priority)return this.prepend(a);for(var c=new Ib(this.head),d=c,e=this.tail;e.nonEmpty;){if(b>e.head.priority)return d.tail=e.prepend(a),c;d=d.tail=new Ib(e.head);e=e.tail}d.tail=new Ib(a);return c},filterNot:function(a){if(!this.nonEmpty||null==a)return this;if(G.compareMethods(this.head.listener,a))return this.tail;for(var b=new Ib(this.head),c=b,d=this.tail;d.nonEmpty;){if(G.compareMethods(d.head.listener,a))return c.tail=d.tail,b;c=c.tail=new Ib(d.head);d=d.tail}return this},find:function(a){if(!this.nonEmpty)return null;for(var b=this;b.nonEmpty;){if(G.compareMethods(b.head.listener,a))return b.head;b=b.tail}return null},__class__:Ib};var h=function(){};g.Core=h;h.__name__=["Core"];h.__properties__={get_fontName:"get_fontName",get_assets:"get_assets",get_events:"get_events",get_height:"get_height",get_width:"get_width"};h.stage=null;h.width=null;h.height=null;h.events=null;h.environment=null;h.services=null;h.views=null;h.models=null;h.remoteAssets=null;h.user=null;h.states=null;h._assets=null;h.assets=null;h.fontName=null;h.fontFile=null;h.init=function(a){h.stage=a;h.environment=new wg;h.environment.initialize();h.states=new gd;na.initialize(Nk.getModelList());h._assets=new Xi(Ok.INGAME_ATLAS);h.services=new Yi;h.views=new Zi;h.models=na.getService(sd);h.remoteAssets=new $i;h.user=new re("","");h.get_assets().onInit.addOnce(h.checkIfReady);h.models.onConfigurationLoaded.addOnce(function(){h.initialized=!0;ac.updateTag();window.checkLoginStatus();h.onReady.dispatch()});h.checkIfReady()};h.checkIfReady=function(){h._assets.get_initialized()&&h.onReady.dispatch()};h.get_width=function(){return h.stage.stageWidth};h.get_height=function(){return h.stage.stageHeight};h.get_assets=function(){return h._assets};h.get_fontName=function(){return"_sans"};h.get_events=function(){return kb.events};var xg=function(){this.onChange=new db};g["lime.AssetLibrary"]=xg;xg.__name__=["lime","AssetLibrary"];xg.prototype={onChange:null,exists:function(a,b){return!1},getBytes:function(a){return null},getImage:function(a){return null},getText:function(a){a=this.getBytes(a);return null==a?null:a.readUTFBytes(a.length)},isLocal:function(a,b){return!0},unload:function(){},__class__:xg};var yg=function(){this.type=new ka;this.path=new ka;this.onChange=new db;var a;a="core-assets/Close.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="core-assets/Close_disabled.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="core-assets/oaktree.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="atlas/main_shop.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="atlas/main_shop.xml";this.path.set(a,a);this.type.set(a,"TEXT");a="img/Close.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/Close_disabled.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/Close_disabled_old.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/Close_old.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/Exp_Star.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/FB_Arrow.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/Facebook_Share_BTN.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/Facebook_Symbol.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/Login_Play.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/Twitter_Share_BTN.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/arrow.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/back_button.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/currency_icon.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/fast_play.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/giant_coin.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/hint.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/incentive_android+iphone.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/incentive_android.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/incentive_android_button.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/incentive_iphone_button.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/massboost_2x_shop.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/massboost_3x_shop.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/multiplier_stamp.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/not_for_guests.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/play.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/profilepic_guest.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/sticker.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/xpboost_2x_shop.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="img/xpboost_3x_shop.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="particle/LevelUpSlotBar-ipadhd.plist";this.path.set(a,a);this.type.set(a,"TEXT");a="particle/LevelUpSlotBarParticle.png";this.path.set(a,a);this.type.set(a,"IMAGE");a=null;null!=Ha.config&&Object.prototype.hasOwnProperty.call(Ha.config,"assetsPrefix")&&(a=Ha.config.assetsPrefix);if(null!=a)for(var b=this.path.keys();b.hasNext();){var c=b.next(),d=a+this.path.get(c);this.path.set(c,d)}};g.DefaultAssetLibrary=yg;yg.__name__=["DefaultAssetLibrary"];yg.__super__=xg;yg.prototype=t(xg.prototype,{path:null,type:null,exists:function(a,b){var c;c=null!=b?y.__cast(b,String):null;var d=this.type.get(a);return null==d||d!=c&&("SOUND"!=c&&"MUSIC"!=c||"MUSIC"!=d&&"SOUND"!=d)&&"BINARY"!=c&&null!=c&&("BINARY"!=d||"TEXT"!=c)?!1:!0},getBytes:function(a){var b=null,b=this.path.get(a),b=eb.loaders.get(b);if(null==b)return null;a=b.data;"string"==typeof a?(b=new Ta,b.writeUTFBytes(a)):b=y.__instanceof(a,Ta)?a:null;return null!=b?(b.position=0,b):null},getImage:function(a){return bc.fromImageElement(function(b){b=b.path.get(a);return eb.images.get(b)}(this))},getText:function(a){var b=null;a=this.path.get(a);a=eb.loaders.get(a);if(null==a)return null;a=a.data;if("string"==typeof a)return a;b=y.__instanceof(a,Ta)?a:null;return null!=b?(b.position=0,b.readUTFBytes(b.length)):null},isLocal:function(a,b){null!=b&&y.__cast(b,String);return!0},__class__:yg});var jc=function(a,b){b=b.split("u").join("");this.r=new RegExp(a,b)};g.EReg=jc;jc.__name__=["EReg"];jc.prototype={r:null,match:function(a){this.r.global&&(this.r.lastIndex=0);this.r.m=this.r.exec(a);this.r.s=a;return null!=this.r.m},replace:function(a,b){return a.replace(this.r,b)},__class__:jc};var H=function(){};g.HxOverrides=H;H.__name__=["HxOverrides"];H.cca=function(a,b){var c=a.charCodeAt(b);return c!=c?void 0:c};H.substr=function(a,b,c){if(null!=b&&0!=b&&null!=c&&0>c)return"";null==c&&(c=a.length);0>b?(b=a.length+b,0>b&&(b=0)):0>c&&(c=a.length+c-b);return a.substr(b,c)};H.indexOf=function(a,b,c){var d=a.length;0>c&&(c+=d,0>c&&(c=0));for(;c<d;){if(a[c]===b)return c;c++}return-1};H.remove=function(a,b){var c=H.indexOf(a,b,0);if(-1==c)return!1;a.splice(c,1);return!0};H.iter=function(a){return{cur:0,arr:a,hasNext:function(){return this.cur<this.arr.length},next:function(){return this.arr[this.cur++]}}};var Qd=function(){};g.Lambda=Qd;Qd.__name__=["Lambda"];Qd.exists=function(a,b){for(var c=dd(a)();c.hasNext();){var d=c.next();if(b(d))return!0}return!1};Qd.fold=function(a,b,c){for(a=dd(a)();a.hasNext();){var d=a.next();c=b(d,c)}return c};Qd.count=function(a,b){var c=0;if(null==b)for(var d=dd(a)();d.hasNext();)d.next(),c++;else for(d=dd(a)();d.hasNext();){var e=d.next();b(e)&&c++}return c};var lb=function(){this.length=0};g.List=lb;lb.__name__=["List"];lb.prototype={h:null,q:null,length:null,add:function(a){a=[a];null==this.h?this.h=a:this.q[1]=a;this.q=a;this.length++},push:function(a){this.h=a=[a,this.h];null==this.q&&(this.q=a);this.length++},last:function(){return null==this.q?null:this.q[0]},pop:function(){if(null==this.h)return null;var a=this.h[0];this.h=this.h[1];null==this.h&&(this.q=null);this.length--;return a},isEmpty:function(){return null==this.h},remove:function(a){for(var b=null,c=this.h;null!=c;){if(c[0]==a)return null==b?this.h=c[1]:b[1]=c[1],this.q==c&&(this.q=b),this.length--,!0;b=c;c=c[1]}return!1},iterator:function(){return new aj(this.h)},__class__:lb};var aj=function(a){this.head=a;this.val=null};g["_List.ListIterator"]=aj;aj.__name__=["_List","ListIterator"];aj.prototype={head:null,val:null,hasNext:function(){return null!=this.head},next:function(){this.val=this.head[0];this.head=this.head[1];return this.val},__class__:aj};Math.__name__=["Math"];var ic=cd.MiniclipAPI=function(a,b){null==b&&(b="");this.gamepadSupportActive=!1;ic.instance=this;this.overlay=b;this.container=a;h.onReady.addOnce(k(this,this.dispatchOnReady))};g.MiniclipAPI=ic;ic.__name__=["MiniclipAPI"];ic.instance=null;ic.prototype={onReady:null,container:null,overlay:null,shopDialog:null,gamepadSupportActive:null,serverVersion:null,_server:null,dispatchOnReady:function(){if(null!=this.onReady)this.onReady()},loadEnvironment:function(a){for(var b=G.fields(a),c=0;c<b.length;){var d=b[c];++c;Db.setProperty(d,G.getProperty(a,d))}},openShop:function(a,b){null==a&&(a="");h.services.shop.isOpen=!0;if(!h.initialized)return null;h.services.gameui.showContainer();this.shopDialog=new Dc;this.shopDialog.openCategory(a,!0,b);this.shopDialog.addEventListener(v.CLOSE,k(this,this.onShopClose));h.views.openView(this.shopDialog,{animate:!0,allowClickClose:!1})},onShopClose:function(a){h.services.shop.isOpen=!1;h.services.gameui.hideContainer()},retryConnection:function(){na.getService(td).login();h.services.gameui.disableShop()},onVideoClose:function(){h.views.enableViews();h.states.disable("state_video_window")},checkVideoAds:function(){h.get_events().dispatchEventWith("ShopEvent::checkVideos")},showProfile:function(){if(null!=h.views)if(h.services.gameui.showContainer(),null!=h.user&&h.user.isGuest)h.get_events().fire("ShopEvent::show_guest_conversion");else{var a=new zg;h.views.openView(a,{animate:!0,allowClickClose:!0});a.addEventListener(v.CLOSE,k(this,this.onShopClose))}},showLevelUp:function(a,b,c){h.services.gameui.showContainer();a=new sf(a,b,c);h.views.openView(a,{animate:!0,allowClickClose:!0});a.addEventListener(v.CLOSE,k(this,this.onShopClose))},showGuestView:function(){h.services.gameui.showContainer();h.get_events().dispatchEventWith("ShopEvent::show_guest_conversion")},showFreeCoins:function(){var a=this;h.services.gameui.showContainer();if(null==h.user.userInfo)h.get_events().dispatchEventWith("ShopEvent::show_guest_conversion");else if(h.environment.platform==ob.Facebook){var b=h.user.freeCoinTimeLeft();La.openCollectDialog(0==b,function(){a.onShopClose(null)},!1);La.triggerFreeCoins()}else b=new La,h.views.openView(b,{animate:!0,allowClickClose:!1}),b.addEventListener(v.CLOSE,k(this,this.onShopClose))},showGifting:function(){h.get_events().dispatchEventWith("shop_event::showGiftUnavailable")},isUserLoggedIn:function(){return null==h.user.userInfo?!1:!0},overlayClick:function(){h.get_events().dispatchEventWith(v.DEACTIVATE)},isShopAvailable:function(){return h.initialized?h.services.shop.isShopAvailable:!1},isConnecting:function(){return h.initialized?h.user.isConnecting:!0},doLoginWithFB:function(a,b){null==b&&(b=!1);var c=this;h.initialized?(h.environment.authenticationProvider=pb.Facebook,this.doLogin(a,b)):h.onReady.addOnce(function(){c.doLoginWithFB(a,b)})},doLoginWithGPlus:function(a,b){null==b&&(b=!1);var c=this;h.initialized?(h.environment.authenticationProvider=pb.Google,this.doLogin(a,b)):h.onReady.addOnce(function(){c.doLoginWithGPlus(a,b)})},doLogin:function(a,b){var c=na.getService(td);c.get_loggedIn()||(c.set_authToken(a),c.login(),h.user.isConnecting=!0,h.services.gameui.disableShop())},doLogout:function(){na.getService(td).logout();h.services.gameui.hideContainer();h.models.resetModels();h.services.gameui.clearTimers();null!=this.shopDialog&&this.shopDialog.destroy();this.shopDialog=null;h.services.gameui.setGuestInfo()},setProfilePicture:function(a){null!=h.user&&(h.user.avatarUrl=a)},setSocialId:function(a){null!=h.user&&h.user.set_socialId(a)},hideContainer:function(){h.services.gameui.hideContainer()},updateServerVersion:function(a){ac.SERVER_VERSION=a;ac.updateTag()},updateConfigurationID:function(a){Ik.log("[CONFIG] ID="+a);Jb.setConfigID(a)},getSkinInfo:function(a){if(!h.initialized)return null;var b=a;"skin_starball1"==b&&(b="skin_starball");b=h.models.shopSkinsModel.getItemById(b);if(null==b)return null;b={url:b.gamePlayInfo.get_gamePlayImage(),color:b.gamePlayInfo.get_cellColor()};"skin_starball1"==a&&(b.url="Starball1.png");return b},onOffwerwallClose:function(){h.states.disable("state_offerwall_window")},forwardProtoMessage:function(a){null!=a&&(a=se.arrayBufferToBytes(a),null==this._server&&(this._server=na.getService(qc)),this._server.injectPacket(a))},activateGamepadSupport:function(){this.gamepadSupportActive=!0},deactivateGamepadSupport:function(){this.gamepadSupportActive=!1},onSocketOpen:function(){na.getService(qc).onConnect.dispatch()},onSocketClosed:function(){na.getService(qc).onDisconnect.dispatch(!1)},onGamepadUpdate:function(a){na.getService(Rd).gamepadAxisUpdate=a},registerSplitFunction:function(a){na.getService(Rd).sendMitosisCallback=a},registerEjectFunction:function(a){na.getService(Rd).ejectMassCallback=a},__class__:ic};var Mc=function(){C.call(this);var a=this.getBackgroundColor(),b=0;70>.299*(a>>16&255)+.587*(a>>8&255)+.114*(a&255)&&(b=16777215);var a=this.getHeight()/2-3.5,c=this.getWidth()-60;this.outline=new C;this.outline.get_graphics().beginFill(b,
.07);this.outline.get_graphics().drawRect(0,0,c,7);this.outline.set_x(30);this.outline.set_y(a);this.addChild(this.outline);this.progress=new C;this.progress.get_graphics().beginFill(b,.35);this.progress.get_graphics().drawRect(0,0,c-4,3);this.progress.set_x(32);this.progress.set_y(a+2);this.progress.set_scaleX(0);this.addChild(this.progress)};g.NMEPreloader=Mc;Mc.__name__=["NMEPreloader"];Mc.__super__=C;Mc.prototype=t(C.prototype,{outline:null,progress:null,getBackgroundColor:function(){return 0},getHeight:function(){return 1024},getWidth:function(){return 1280},onInit:function(){},onLoaded:function(){this.dispatchEvent(new v(v.COMPLETE))},onUpdate:function(a,b){var c=a/b;1<c&&(c=1);this.progress.set_scaleX(c)},__class__:Mc});var G=function(){};g.Reflect=G;G.__name__=["Reflect"];G.hasField=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};G.field=function(a,b){try{return a[b]}catch(c){return c instanceof m&&(c=c.val),null}};G.setField=function(a,b,c){a[b]=c};G.getProperty=function(a,b){var c;return null==a?null:a.__properties__&&(c=a.__properties__["get_"+b])?a[c]():a[b]};G.setProperty=function(a,b,c){var d;if(a.__properties__&&(d=a.__properties__["set_"+b]))a[d](c);else a[b]=c};G.callMethod=function(a,b,c){return b.apply(a,c)};G.fields=function(a){var b=[];if(null!=a){var c=Object.prototype.hasOwnProperty,d;for(d in a)"__id__"!=d&&"hx__closures__"!=d&&c.call(a,d)&&b.push(d)}return b};G.isFunction=function(a){return"function"==typeof a&&!(a.__name__||a.__ename__)};G.compareMethods=function(a,b){return a==b?!0:G.isFunction(a)&&G.isFunction(b)?a.scope==b.scope&&a.method==b.method&&null!=a.method:!1};var K=function(){};g.Std=K;K.__name__=["Std"];K.is=function(a,b){return y.__instanceof(a,b)};K.string=function(a){return y.__string_rec(a,"")};K["int"]=function(a){return a|0};K.parseInt=function(a){var b=parseInt(a,10);0!=b||120!=H.cca(a,1)&&88!=H.cca(a,1)||(b=parseInt(a));return isNaN(b)?null:b};K.parseFloat=function(a){return parseFloat(a)};var Ec=function(){this.b=""};g.StringBuf=Ec;Ec.__name__=["StringBuf"];Ec.prototype={b:null,add:function(a){this.b+=K.string(a)},addSub:function(a,b,c){this.b=null==c?this.b+H.substr(a,b,null):this.b+H.substr(a,b,c)},__class__:Ec};var P=function(){};g.StringTools=P;P.__name__=["StringTools"];P.urlEncode=function(a){return encodeURIComponent(a)};P.htmlEscape=function(a,b){a=a.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;");return b?a.split('"').join("&quot;").split("'").join("&#039;"):a};P.startsWith=function(a,b){return a.length>=b.length&&H.substr(a,0,b.length)==b};P.isSpace=function(a,b){var c=H.cca(a,b);return 8<c&&14>c||32==c};P.ltrim=function(a){for(var b=a.length,c=0;c<b&&P.isSpace(a,c);)c++;return 0<c?H.substr(a,c,b-c):a};P.rtrim=function(a){for(var b=a.length,c=0;c<b&&P.isSpace(a,b-c-1);)c++;return 0<c?H.substr(a,0,b-c):a};P.trim=function(a){return P.ltrim(P.rtrim(a))};P.lpad=function(a,b,c){if(0>=b.length)return a;for(;a.length<c;)a=b+a;return a};P.replace=function(a,b,c){return a.split(b).join(c)};P.hex=function(a,b){var c="";do c="0123456789ABCDEF".charAt(a&15)+c,a>>>=4;while(0<a);if(null!=b)for(;c.length<b;)c="0"+c;return c};P.fastCodeAt=function(a,b){return a.charCodeAt(b)};var Qa=function(){};g.Type=Qa;Qa.__name__=["Type"];Qa.getClassName=function(a){a=a.__name__;return null==a?null:a.join(".")};Qa.resolveClass=function(a){a=g[a];return null!=a&&a.__name__?a:null};Qa.resolveEnum=function(a){a=g[a];return null!=a&&a.__ename__?a:null};Qa.createInstance=function(a,b){switch(b.length){case 0:return new a;case 1:return new a(b[0]);case 2:return new a(b[0],b[1]);case 3:return new a(b[0],b[1],b[2]);case 4:return new a(b[0],b[1],b[2],b[3]);case 5:return new a(b[0],b[1],b[2],b[3],b[4]);case 6:return new a(b[0],b[1],b[2],b[3],b[4],b[5]);case 7:return new a(b[0],b[1],b[2],b[3],b[4],b[5],b[6]);case 8:return new a(b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7]);default:throw new m("Too many arguments");}};Qa.getInstanceFields=function(a){var b=[],c;for(c in a.prototype)b.push(c);H.remove(b,"__class__");H.remove(b,"__properties__");return b};Qa.getClassFields=function(a){a=G.fields(a);H.remove(a,"__name__");H.remove(a,"__interfaces__");H.remove(a,"__properties__");H.remove(a,"__super__");H.remove(a,"__meta__");H.remove(a,"prototype");return a};var Ga={};g["_UInt.UInt_Impl_"]=Ga;Ga.__name__=["_UInt","UInt_Impl_"];Ga.gt=function(a,b){var c=0>a;return c!=0>b?c:a>b};Ga.gte=function(a,b){var c=0>a;return c!=0>b?c:a>=b};Ga.toFloat=function(a){return 0>a?4294967296+a:a+0};var A=function(a){this.nodeType=a;this.children=[];this.attributeMap=new ka};g.Xml=A;A.__name__=["Xml"];A.parse=function(a){return ud.parse(a)};A.createElement=function(a){var b=new A(A.Element);if(b.nodeType!=A.Element)throw new m("Bad node type, expected Element but found "+b.nodeType);b.nodeName=a;return b};A.createPCData=function(a){var b=new A(A.PCData);if(b.nodeType==A.Document||b.nodeType==A.Element)throw new m("Bad node type, unexpected "+b.nodeType);b.nodeValue=a;return b};A.createCData=function(a){var b=new A(A.CData);if(b.nodeType==A.Document||b.nodeType==A.Element)throw new m("Bad node type, unexpected "+b.nodeType);b.nodeValue=a;return b};A.createComment=function(a){var b=new A(A.Comment);if(b.nodeType==A.Document||b.nodeType==A.Element)throw new m("Bad node type, unexpected "+b.nodeType);b.nodeValue=a;return b};A.createDocType=function(a){var b=new A(A.DocType);if(b.nodeType==A.Document||b.nodeType==A.Element)throw new m("Bad node type, unexpected "+b.nodeType);b.nodeValue=a;return b};A.createProcessingInstruction=function(a){var b=new A(A.ProcessingInstruction);if(b.nodeType==A.Document||b.nodeType==A.Element)throw new m("Bad node type, unexpected "+b.nodeType);b.nodeValue=a;return b};A.createDocument=function(){return new A(A.Document)};A.prototype={nodeType:null,nodeName:null,nodeValue:null,parent:null,children:null,attributeMap:null,get_nodeName:function(){if(this.nodeType!=A.Element)throw new m("Bad node type, expected Element but found "+this.nodeType);return this.nodeName},get:function(a){if(this.nodeType!=A.Element)throw new m("Bad node type, expected Element but found "+
this.nodeType);return this.attributeMap.get(a)},set:function(a,b){if(this.nodeType!=A.Element)throw new m("Bad node type, expected Element but found "+this.nodeType);this.attributeMap.set(a,b)},exists:function(a){if(this.nodeType!=A.Element)throw new m("Bad node type, expected Element but found "+this.nodeType);return this.attributeMap.exists(a)},attributes:function(){if(this.nodeType!=A.Element)throw new m("Bad node type, expected Element but found "+this.nodeType);return this.attributeMap.keys()},iterator:function(){if(this.nodeType!=A.Document&&this.nodeType!=A.Element)throw new m("Bad node type, expected Element or Document but found "+this.nodeType);return H.iter(this.children)},elements:function(){if(this.nodeType!=A.Document&&this.nodeType!=A.Element)throw new m("Bad node type, expected Element or Document but found "+this.nodeType);for(var a=[],b=0,c=this.children;b<c.length;){var d=c[b];++b;d.nodeType==A.Element&&a.push(d)}return H.iter(a)},elementsNamed:function(a){if(this.nodeType!=A.Document&&this.nodeType!=A.Element)throw new m("Bad node type, expected Element or Document but found "+this.nodeType);for(var b=[],c=0,d=this.children;c<d.length;){var e=d[c];++c;var f;if(f=e.nodeType==A.Element){f=void 0;if(e.nodeType!=A.Element)throw new m("Bad node type, expected Element but found "+e.nodeType);f=e.nodeName;f=f==a}f&&b.push(e)}return H.iter(b)},firstElement:function(){if(this.nodeType!=A.Document&&this.nodeType!=A.Element)throw new m("Bad node type, expected Element or Document but found "+
this.nodeType);for(var a=0,b=this.children;a<b.length;){var c=b[a];++a;if(c.nodeType==A.Element)return c}return null},addChild:function(a){if(this.nodeType!=A.Document&&this.nodeType!=A.Element)throw new m("Bad node type, expected Element or Document but found "+this.nodeType);null!=a.parent&&a.parent.removeChild(a);this.children.push(a);a.parent=this},removeChild:function(a){if(this.nodeType!=A.Document&&this.nodeType!=A.Element)throw new m("Bad node type, expected Element or Document but found "+
this.nodeType);return H.remove(this.children,a)?(a.parent=null,!0):!1},__class__:A,__properties__:{get_nodeName:"get_nodeName"}};var Aa=function(){};g["agario.atlas.MainShop"]=Aa;Aa.__name__=["agario","atlas","MainShop"];var ma=function(){};g["agario.atlas.Menuscommonui"]=ma;ma.__name__=["agario","atlas","Menuscommonui"];var Ok=function(){};g["agario.config.Assets"]=Ok;Ok.__name__=["agario","config","Assets"];var Db=function(){};g["agario.config.Configs"]=Db;Db.__name__=["agario","config","Configs"];Db.setProperty=function(a,b){Db.properties.set(a,b)};Db.getProperty=function(a){return Db.properties.exists(a)?Db.properties.get(a):""};var qe=function(a){this._state_count=this.active_count=0;this.createOnGet=!1;this.name="";null!=a&&null!=a.name&&(this.name=a.name);this._states=new ka;this.active_states=[]};g["mc.system.States"]=qe;qe.__name__=["mc","system","States"];qe.prototype={name:null,createOnGet:null,_states:null,_state_count:null,active_states:null,current_state:null,active_count:null,enter:function(a,b){a.onEnter(b);this.active_states.push(a);this.active_count++;a.active=!0},leave:function(a,b){a.active=!1;H.remove(this.active_states,a);this.active_count--;a.onLeave(b)},add:function(a){this._states.set(a.name,a);this._state_count++;a.machine=this;a.onAdded();return a},remove:function(a,b){if(this._states.exists(a)){var c=this._states.get(a);null!=c&&(c.active&&(this.leave(c,b),c==this.current_state&&(this.current_state=null)),c.enabled&&this.disable(c.name),c.onRemoved(),this._states.remove(a),this._state_count--);return c}return null},kill:function(a){if(0<this._state_count&&this._states.exists(a)&&(a=this.remove(a),null!=a))a.onDestroy()},enable:function(a,b){if(this.createOnGet||0!=this._state_count){var c=this.getState(a,this.createOnGet);null!=c&&(c.onEnabled(b),c.active=!0,c.enabled=!0,this.active_states.push(c),this.active_count++,null)}},disable:function(a,b){if(this.createOnGet||0!=this._state_count){var c=this.getState(a,this.createOnGet);null!=c&&(c.onDisabled(b),c.active=!1,c.enabled=!1,H.remove(this.active_states,c),this.active_count--,null)}},set:function(a,b,c){null!=this.current_state&&(this.leave(this.current_state,c),this.current_state=null);this._states.exists(a)&&(this.current_state=this._states.get(a),this.enter(this.current_state,b))},getState:function(a,b){null==b&&(b=!1);if(this._states.exists(a))return this._states.get(a);if(b){var c=new bj({name:a});this.add(c);return c}return null},isTopState:function(a){return null!=this.getTopState()?this.getTopState().name==a:!1},getTopState:function(){return 0<this.active_count?this.active_states[this.active_count-1]:null},__class__:qe};var gd=function(){qe.call(this,{name:"game_states"});this.createOnGet=!0};g["agario.config.GameStates"]=gd;gd.__name__=["agario","config","GameStates"];gd.__super__=qe;gd.prototype=t(qe.prototype,{__class__:gd});var Nk=function(){};g["agario.config.Services"]=Nk;Nk.__name__=["agario","config","Services"];Nk.getModelList=function(){var a=[new Kb(Jb),new Kb(qc,{}),new Kb(tf,{maxReconnect:5,retryTimeout:5E3}),new Kb(uf),new Kb(te),new Kb(sd),new Kb(vf),new Kb(ue),new Kb(wf),new Kb(xf),new Kb(yf),new Kb(Rd)];h.environment.platform==ob.Facebook?a.push(new Kb(Ag,{endpoint:Db.getProperty("fb_endpoint")})):a.push(new Kb(Bg,{endpoint:Db.getProperty("xsolla_endpoint")}));return a};var Lb=function(){};g["mc.services.IService"]=Lb;Lb.__name__=["mc","services","IService"];Lb.prototype={create:null,initialize:null,__class__:Lb};var tf=function(){this.gotDisconnectMsg=!1;this.retryAttempt=0;this.retryTimeout=5E3;this.maxReconnect=5;ba.call(this,this)};g["agario.game.server.GameConnectionService"]=tf;tf.__name__=["agario","game","server","GameConnectionService"];tf.__interfaces__=[Lb];tf.__super__=ba;tf.prototype=t(ba.prototype,{_serverModel:null,maxReconnect:null,retryTimeout:null,retryAttempt:null,gotDisconnectMsg:null,create:function(){},initialize:function(){this._serverModel=na.getService(Nc);this._serverModel.register(20,k(this,this.onDisconnectMessage));this._serverModel.onDisconnect.add(k(this,this.onSocketDisconnect))},onSocketDisconnect:function(a){a||this.gotDisconnectMsg||(this.gotDisconnectMsg=!1,this.retryAttempt<=this.maxReconnect?(kc.delay(k(this,this.performRetryAttempt),this.retryTimeout),this.retryAttempt++):(this.dispatchEvent(new zf("retryAttemptsEnded")),this.retryAttempt=0))},performRetryAttempt:function(){this._serverModel.connect()},onDisconnectMessage:function(a,b){switch(b.get_reason()){case 1:this.handleReconnect(b)}this.gotDisconnectMsg=!0;null},handleReconnect:function(a){a.get_reconnectHost();if(0!=(a.hasField__0&1)){var b=a.get_reconnectTcpPort();K.string(Ga.toFloat(b))}a="wss://"+a.get_reconnectHost()+"/ws";this._serverModel.connect(a,!0)},__class__:tf});var sd=function(){this.shopLoaded=this.userInfoLoaded=this.I18nLoaded=this.shopReadyToShow=!1};g["agario.models.DataManager"]=sd;sd.__name__=["agario","models","DataManager"];sd.__interfaces__=[Lb];sd.prototype={onConfigurationLoaded:null,shopCoins:null,shopItems:null,priceMatrixModel:null,shopBoostItems:null,shopSkinsModel:null,walletProductBundlesModel:null,walletProductsModel:null,shopPurchasesModel:null,defaultSettings:null,defaultCommunicationSettings:null,xpModel:null,shopData:null,shopLoaded:null,userInfoLoaded:null,I18nLoaded:null,shopReadyToShow:null,_shopService:null,_payModel:null,create:function(){this.onConfigurationLoaded=new Cb},initialize:function(){this._shopService=na.getService(te);this._payModel=na.getService(vd);h.get_events().addEventListener(hd.USER_LOGGED,k(this,this.onUserLogged));h.get_events().addEventListener("ShopEvent::CONFIGURATION_LOADED",k(this,this.handleShopInit));h.get_events().addEventListener("payment_event::got_currency_code",k(this,this.handleReceiveCurrencyCode));E.onInit.add(k(this,this.handleLocalizationInit))},handleReceiveCurrencyCode:function(a){this.validateCurrencyCode()},handleLocalizationInit:function(){this.I18nLoaded=!0;this.checkUserItems()},onUserLogged:function(a){this.userInfoLoaded=!0;this.checkUserItems()},onUserFbId:function(a){},checkUserItems:function(){if(this.shopLoaded&&this.userInfoLoaded&&this.I18nLoaded){h.user.evaluateWallet();var a=this.shopSkinsModel.getItemById(h.user.get_selectedSkin());if(null!=a){var b=a.gamePlayInfo.get_shopImage(),b=window.ASSETS_ROOT+b;h.services.gameui.setUserSkin(b,a.gamePlayInfo.get_cellColor(),a.tab)}else h.services.gameui.setUserSkin("")}},handleShopInit:function(a){this.shopLoaded=!0;this.shopItems=new cj;null!=a.data?this.shopData=y.__cast(a.data,Sd):null;this.createDefaultSettings();this.createXPSettings();this.createPriceModel();this.createShopPurchasesModel();this.createWalletProducts();this.createWalletBundles();this.createCoinsModel();this.createBoostsModel();this.createSkinsModel();this.checkUserItems();this.onConfigurationLoaded.dispatch()},createXPSettings:function(){this.xpModel=new dj;this.xpModel.xpList=this.shopData.xpList},createDefaultSettings:function(){this.defaultSettings=new Af;this.defaultSettings.settingList=this.shopData.userSettings;this.defaultSettings.settingList=this.defaultSettings.settingList.concat(this.shopData.localizationSettings);h.user.selectedLanguage=this.defaultSettings.getSettingByKey("defaultLanguage");this.defaultCommunicationSettings=Af.createMap(this.shopData.defaultCommunicationSettings)},createShopPurchasesModel:function(){this.shopPurchasesModel=new ej;this.shopPurchasesModel.walletSoftPurchases=this.shopData.walletSoftPurchases;this.shopPurchasesModel.walletInappPurchases=this.shopData.walletInappPurchases},createWalletBundles:function(){this.walletProductBundlesModel=new fj;for(var a=0,b=this.shopData.walletProductBundles.length;a<b;){var c=a++;this.walletProductBundlesModel.add(this.shopData.walletProductBundles[c])}},createWalletProducts:function(){this.walletProductsModel=new gj;for(var a=0,b=this.shopData.walletProducts.length;a<b;){var c=a++;this.walletProductsModel.add(this.shopData.walletProducts[c])}},createSkinsModel:function(){this.shopSkinsModel=new hj;for(var a=0,b=this.shopData.shopSkins.length;a<b;){var c=a++,c=this.shopData.shopSkins[c];this.setPurchaseInfo(c);c.gamePlayInfo=this.getGameplayInfoForSkin(c.productIdToQuantify);this.shopSkinsModel.addSkin(c);this.shopItems.add(c)}a=0;for(b=this.shopData.shopSkinTabs.length;a<b;)c=a++,this.shopSkinsModel.addTab(this.shopData.shopSkinTabs[c])},createPriceModel:function(){this.priceMatrixModel=new ij;for(var a=0,b=this.shopData.shopPriceMatrix.length;a<b;){var c=a++;this.priceMatrixModel.add(this.shopData.shopPriceMatrix[c])}this.validateCurrencyCode()},createCoinsModel:function(){this.shopCoins=new jj;for(var a=0,b=this.shopData.shopCoins.length;a<b;){var c=a++,c=this.shopData.shopCoins[c];this.setPurchaseInfo(c);this.shopCoins.add(c);this.shopItems.add(c)}},createBoostsModel:function(){this.shopBoostItems=new kj;for(var a=0,b=this.shopData.shopBoostItems.length;a<b;){var c=a++,c=this.shopData.shopBoostItems[c];this.setPurchaseInfo(c);c.category=this.getBoostCategory(c.categoryShopId,c.categoryPosition);c.gameplayInfo=this.getGameplayInfoForBoost(c.purchaseId);c.name=c.category.title;c.description=1==c.gameplayInfo.duration/60/60?"menu_shop_1_hour":"menu_shop_n_hour";this.shopBoostItems.add(c);this.shopItems.add(c)}},getGameplayInfoForBoost:function(a){a=this.shopPurchasesModel.getPurchaseByPurchaseId(a).bundleId;var b=this.walletProductBundlesModel.getBundleByBundleId(a).productId;return this.shopData.gamePlayBoosts.filter(function(a){return a.productId==b})[0]},getGameplayInfoForSkin:function(a){return this.shopData.gamePlaySkins.filter(function(b){return b.productId==a})[0]},getBoostCategory:function(a,b){for(var c=0,d=this.shopData.shopBoostCategories.length;c<d;){var e=c++;if(this.shopData.shopBoostCategories[e].shopId==a&&this.shopData.shopBoostCategories[e].position==b)return this.shopData.shopBoostCategories[e]}return new Bf},setPurchaseInfo:function(a){a.type==ve.SOFT?(y.__instanceof(a,Oa)?(a.purchaseInfo=this.shopPurchasesModel.getSoftPurchaseByPurchaseId(y.__cast(a,Oa).originId),a.purchaseId=y.__cast(a,Oa).originId):a.purchaseInfo=this.shopPurchasesModel.getSoftPurchaseByPurchaseId(a.purchaseId),a.price=a.purchaseInfo.currencyAmount):a.type==ve.INAPP?(a.purchaseInfo=this.shopPurchasesModel.getInappPurchaseByPurchaseId(a.purchaseId),a.price=this.priceMatrixModel.getPriceForTier(a.purchaseInfo.priceTier,this._payModel.getCurrencyCode())):"REWARD"==a.type?(a.price=0,a.isReward=!0,y.__instanceof(a,Oa)?this.checkLevelSkins(y.__cast(a,Oa)):null):null},checkLevelSkins:function(a){a.availableAtLevel=this.xpModel.getLevelForReward(a.originId).level+1},refreshShopItems:function(){for(var a=0,b=this.shopItems.shopItemsList;a<b.length;){var c=b[a];++a;this.setPurchaseInfo(c)}},resetModels:function(){if(null!=this.shopItems)for(var a=0,b=this.shopItems.shopItemsList;a<b.length;){var c=b[a];++a;if(y.__instanceof(c,Oa)||y.__instanceof(c,Mb))c.set_inUse(!1),c.set_owned(!1)}},getBonusById:function(a){var b=this.shopData.walletBonusRewards.filter(function(b){return b.bonusId==a});return 0<b.length?b[0]:null},validateCurrencyCode:function(){null==this.priceMatrixModel||this.priceMatrixModel.hasCurrency(this._payModel.getCurrencyCode())||this._payModel.overrideCurrencyCode("USD")},__class__:sd};var ac=function(){};g["agario.models.VersionModel"]=ac;ac.__name__=["agario","models","VersionModel"];ac.getVersionPaddedAsString=function(){return P.lpad("1","0",3)+P.lpad("4","0",3)+P.lpad("5","0",3)};ac.updateTag=function(){h.initialized&&h.services.gameui.setVersionTag("("+ac.SERVER_VERSION+" - "+ac.VERSION+".65)")};var we=function(a){C.call(this);this.onClick=new Oc;this.id=a};g["mc.system.ui.controls.TabItem"]=we;we.__name__=["mc","system","ui","controls","TabItem"];we.__super__=C;we.prototype=t(C.prototype,{id:null,onVisual:null,offVisual:null,selected:null,onClick:null,reset:function(){this.set_selected(!1);this.contains(this.onVisual)&&this.removeChild(this.onVisual)},handleItemClick:function(a){this.contains(this.offVisual)&&!this.selected&&this.onClick.dispatch(this)},set_onVisual:function(a){null!=this.onVisual&&this.contains(this.onVisual)&&this.removeChild(this.onVisual);null!=a&&(this.onVisual=a,this.addChild(this.onVisual));this.set_selected(this.selected);return a},set_offVisual:function(a){null!=this.offVisual&&this.contains(this.offVisual)&&(this.offVisual.removeEventListener(F.CLICK,k(this,this.handleItemClick)),this.removeChild(this.offVisual));null!=a&&(this.offVisual=a,this.addChild(this.offVisual),this.offVisual.addEventListener(F.CLICK,k(this,this.handleItemClick)));this.set_selected(this.selected);return a},set_selected:function(a){this.selected=a;null!=this.onVisual&&this.onVisual.set_visible(this.selected);null!=this.offVisual&&this.offVisual.set_visible(!this.selected);return this.selected},__class__:we,__properties__:t(C.prototype.__properties__,{set_selected:"set_selected",set_offVisual:"set_offVisual",set_onVisual:"set_onVisual"})});var Cg=function(a,b){we.call(this,a);var c={labelUp:{text:b,fontSize:14,align:T.LEFT,color:5329233},labelOver:{text:b,fontSize:14,align:T.LEFT,color:5329233},colorUp:16777215,colorOver:16777215,colorDown:16777215,width:140,height:32,bottomRightRadius:0,bottomLeftRadius:0},d=new wd(c),e=new C,f=new Da;f.get_graphics().lineStyle(2,12566463,1);rc.drawRoundRectComplex(f.get_graphics(),0,0,142,30,4,4,0,0);d.set_y(d.set_x(1));e.addChild(f);e.addChild(d);this.set_onVisual(e);c.colorUp=5685472;c.colorOver=5685472;c.colorDown=5685472;c.height=28;c.labelUp={text:b,fontSize:13,align:T.LEFT,color:16777215};c.labelOver={text:b,fontSize:13,align:T.LEFT,color:16777215};this.set_offVisual(new wd(c))};g["agario.module.shop.components.CategoryTab"]=Cg;Cg.__name__=["agario","module","shop","components","CategoryTab"];Cg.__super__=we;Cg.prototype=t(we.prototype,{__class__:Cg});var la=function(){this.rotationAnchorX=this.rotationAnchorY=this._rotation=0;C.call(this);this.hasFocus=this.mouseChildren=!1;this.buttonMode=this.mouseEnabled=!0;this.statesContainer=new C;this.statesContainer.set_name("button_container");this.addChild(this.statesContainer);this.initializeState(this.upState);this.initializeState(this.overState);this.initializeState(this.downState);this.initializeState(this.disabledState);this.updateState();this.resize();this.addEventListener(v.ADDED_TO_STAGE,k(this,this.onAddedToStage))};g["mc.system.ui.controls.Button"]=la;la.__name__=["mc","system","ui","controls","Button"];la.__super__=C;la.prototype=t(C.prototype,{rotationAnchorX:null,rotationAnchorY:null,_rotation:null,statesContainer:null,upState:null,downState:null,overState:null,disabledState:null,data:null,_currentState:null,get_currentState:function(){return this._currentState},set_currentState:function(a){this._currentState!=a&&(null!=this._currentState&&this.statesContainer.removeChild(this._currentState),this._currentState=a,null!=a&&this.statesContainer.addChild(a));this.update_layout();return a},get_enabled:function(){return this.mouseEnabled},set_enabled:function(a){this.mouseEnabled=a;this.updateState();return a},selected:null,set_selected:function(a){this.selected=a;this.updateState();return a},hasFocus:null,mouseIsDown:null,mouseIsOver:null,upOnMouseOut:null,initializeState:function(a){null!=a&&null!=a.parent&&a!=this._currentState&&a.parent.removeChild(a)},updateState:function(){var a=null;this.get_enabled()?this.selected?a=this.downState:!this.mouseIsDown||!this.mouseIsOver&&this.upOnMouseOut?this.hasFocus&&this.mouseIsDown?a=this.overState:this.mouseIsOver&&(a=this.overState):a=this.downState:a=this.disabledState;null==a&&(a=this.upState);this.set_currentState(a)},resize:function(){this.upState!=this.get_currentState()&&this.statesContainer.addChild(this.upState);this.upState.getBounds(this);this.upState!=this.get_currentState()&&this.statesContainer.removeChild(this.upState);this.update_layout()},setRotation:function(a){this._rotation=a;C.prototype.set_rotation.call(this,0);this.statesContainer.set_rotation(a);this.update_layout();return a},set_rotation:function(a){return this.setRotation(a)},set_rotationAnchorX:function(a){this.rotationAnchorX=a;this.update_layout();return a},set_rotationAnchorY:function(a){this.rotationAnchorY=a;this.update_layout();return a},setRotationAnchor:function(a,b){this.set_rotationAnchorX(a);this.set_rotationAnchorY(b);this.update_layout()},anchorCenter:function(){this.setRotationAnchor(this.get_width()/2,this.get_height()/2)},update_layout:function(){null!=
this.upState&&(this.upState.set_x(-this.rotationAnchorX),this.upState.set_y(-this.rotationAnchorY));null!=this.overState&&(this.overState.set_x(-this.rotationAnchorX),this.overState.set_y(-this.rotationAnchorY));null!=this.downState&&(this.downState.set_x(-this.rotationAnchorX),this.downState.set_y(-this.rotationAnchorY));null!=this.disabledState&&(this.disabledState.set_x(-this.rotationAnchorX),this.disabledState.set_y(-this.rotationAnchorY));this.statesContainer.set_x(this.rotationAnchorX);this.statesContainer.set_y(this.rotationAnchorY)},onRollOver:function(a){this.mouseIsOver=!a.buttonDown||this.mouseIsDown;this.updateState()},onRollOut:function(a){this.mouseIsOver=!1;this.updateState()},onMouseDown:function(a){this.mouseIsDown=!0;this.updateState();this.stage.addEventListener(F.MOUSE_UP,k(this,this.onStageMouseUp))},onFocusIn:function(a){this.hasFocus=!0;this.updateState()},onFocusOut:function(a){this.hasFocus=!1;this.updateState()},onStageMouseUp:function(a){this.mouseIsDown=!1;this.updateState();this.stage.removeEventListener(F.MOUSE_UP,k(this,this.onStageMouseUp))},onAddedToStage:function(a){this.removeEventListener(v.ADDED_TO_STAGE,k(this,this.onAddedToStage));this.addEventListener(v.REMOVED_FROM_STAGE,k(this,this.onRemovedFromStage));this.addEventListener(F.MOUSE_OVER,k(this,this.onRollOver));this.addEventListener(F.MOUSE_OUT,k(this,this.onRollOut));this.addEventListener(F.MOUSE_DOWN,k(this,this.onMouseDown));this.addEventListener(qb.FOCUS_IN,k(this,this.onFocusIn));this.addEventListener(qb.FOCUS_OUT,k(this,this.onFocusOut));this.mouseIsDown=this.mouseIsOver=this.hasFocus=!1;this.updateState()},onRemovedFromStage:function(a){this.addEventListener(v.ADDED_TO_STAGE,k(this,this.onAddedToStage));this.removeEventListener(v.REMOVED_FROM_STAGE,k(this,this.onRemovedFromStage));this.removeEventListener(F.ROLL_OVER,k(this,this.onRollOver));this.removeEventListener(F.ROLL_OUT,k(this,this.onRollOut));this.removeEventListener(F.MOUSE_DOWN,k(this,this.onMouseDown));this.addEventListener(qb.FOCUS_IN,k(this,this.onFocusIn));this.addEventListener(qb.FOCUS_OUT,k(this,this.onFocusOut));this.stage.removeEventListener(F.MOUSE_UP,k(this,this.onStageMouseUp))},dispose:function(){this.removeEventListener(v.ADDED_TO_STAGE,k(this,this.onAddedToStage));this.removeEventListener(v.REMOVED_FROM_STAGE,k(this,this.onRemovedFromStage));this.removeEventListener(F.ROLL_OVER,k(this,this.onRollOver));this.removeEventListener(F.ROLL_OUT,k(this,this.onRollOut));this.removeEventListener(F.MOUSE_DOWN,k(this,this.onMouseDown));this.removeEventListener(qb.FOCUS_IN,k(this,this.onFocusIn));this.removeEventListener(qb.FOCUS_OUT,k(this,this.onFocusOut));null!=this.stage&&this.stage.removeEventListener(F.MOUSE_UP,k(this,this.onStageMouseUp))},delayedEnable:function(a){null==a&&(a=1);var b=this;ga.timer(a).onComplete(function(){b.set_enabled(!0)})},__class__:la,__properties__:t(C.prototype.__properties__,{set_selected:"set_selected",set_enabled:"set_enabled",get_enabled:"get_enabled",set_currentState:"set_currentState",get_currentState:"get_currentState",set_rotationAnchorY:"set_rotationAnchorY",set_rotationAnchorX:"set_rotationAnchorX"})});var Rb=function(a){a=h.get_assets().getTexture(a).get_bitmapData();var b=a.clone(),c=a.clone();c.applyFilter(c,c.rect,new Ea,new Cf([.3333333333333333,.3333333333333333,.3333333333333333,0,0,.3333333333333333,.3333333333333333,.3333333333333333,0,0,.3333333333333333,.3333333333333333,.3333333333333333,0,0,0,0,0,1,0]));this.upState=new Q(a);this.overState=new Q(b);this.downState=new Q(a);this.disabledState=new Q(c);this.upState.set_alpha(this.downState.set_alpha(.8));la.call(this)};g["agario.module.shop.components.PaginationGotoButton"]=Rb;Rb.__name__=["agario","module","shop","components","PaginationGotoButton"];Rb.__super__=la;Rb.prototype=t(la.prototype,{__class__:Rb});var Dg=function(){Rb.call(this,"fast_play")};g["agario.module.shop.components.PaginationGotoFirstButton"]=Dg;Dg.__name__=["agario","module","shop","components","PaginationGotoFirstButton"];Dg.__super__=Rb;Dg.prototype=t(Rb.prototype,{__class__:Dg});var Eg=function(){Rb.call(this,"fast_play");this.set_rotationAnchorX(this.get_width()/2);this.set_rotationAnchorY(this.get_height()/2);this.set_rotation(180)};g["agario.module.shop.components.PaginationGotoLastButton"]=Eg;Eg.__name__=["agario","module","shop","components","PaginationGotoLastButton"];Eg.__super__=Rb;Eg.prototype=t(Rb.prototype,{__class__:Eg});var Fg=function(){Rb.call(this,"play")};g["agario.module.shop.components.PaginationGotoPreviousButton"]=Fg;Fg.__name__=["agario","module","shop","components","PaginationGotoPreviousButton"];
Fg.__super__=Rb;Fg.prototype=t(Rb.prototype,{__class__:Fg});var Gg=function(){Rb.call(this,"play");this.set_rotationAnchorX(this.get_width()/2);this.set_rotationAnchorY(this.get_height()/2);this.set_rotation(180)};g["agario.module.shop.components.PaginationGotoNextButton"]=Gg;Gg.__name__=["agario","module","shop","components","PaginationGotoNextButton"];Gg.__super__=Rb;Gg.prototype=t(Rb.prototype,{__class__:Gg});var wd=function(a){null==a.labelOver&&(a.labelOver=a.labelUp);a.labelOver;null==a.labelDown&&
(a.labelDown=a.labelUp);a.labelDown;null==a.labelDown.text&&(a.labelDown.text=a.labelUp.text);a.labelDown.text;null==a.labelOver.text&&(a.labelOver.text=a.labelUp.text);a.labelOver.text;null==a.topLeftRadius&&(a.topLeftRadius=4);a.topLeftRadius;null==a.topRightRadius&&(a.topRightRadius=4);a.topRightRadius;null==a.bottomLeftRadius&&(a.bottomLeftRadius=4);a.bottomLeftRadius;null==a.bottomRightRadius&&(a.bottomRightRadius=4);a.bottomRightRadius;null==a.colorUp&&(a.colorUp=6349312);a.colorUp;null==a.colorDown&&(a.colorDown=4760069);a.colorDown;null==a.colorOver&&(a.colorOver=2446594);a.colorOver;null==a.borderWeight&&(a.borderWeight=0);a.borderWeight;null==a.borderColor&&(a.borderColor=0);a.borderColor;null==a.borderWeightOver&&(a.borderWeightOver=0);a.borderWeightOver;null==a.borderColorOver&&(a.borderColorOver=0);a.borderColorOver;null==a.borderWeightDown&&(a.borderWeightDown=0);a.borderWeightDown;null==a.borderColorDown&&(a.borderColorDown=0);a.borderColorDown;var b=new C,c=new C,d=new C;null!=a.radius&&(a.topLeftRadius=a.topRightRadius=a.bottomLeftRadius=a.bottomRightRadius=a.radius);this.labelUp=new ea(a.labelUp);this.labelOver=new ea(a.labelOver);this.labelDown=new ea(a.labelDown);this.labelUp.get_textWidth()>a.width&&this.labelUp.set_width(this.labelOver.set_width(this.labelDown.set_width(a.width)));var e=new Da;0<a.borderWeight&&e.get_graphics().lineStyle(a.borderWeight,a.borderColor,1);e.get_graphics().beginFill(a.colorUp);rc.drawRoundRectComplex(e.get_graphics(),0,0,a.width,a.height,a.topLeftRadius,a.topRightRadius,a.bottomLeftRadius,a.bottomRightRadius);e.get_graphics().endFill();b.addChild(e);b.addChild(this.labelUp);e=new Da;0<a.borderWeightOver&&e.get_graphics().lineStyle(a.borderWeightOver,a.borderColor,1);e.get_graphics().beginFill(a.colorOver);rc.drawRoundRectComplex(e.get_graphics(),0,0,a.width,a.height,a.topLeftRadius,a.topRightRadius,a.bottomLeftRadius,a.bottomRightRadius);e.get_graphics().endFill();c.addChild(e);c.addChild(this.labelOver);e=new Da;0<a.borderWeightDown&&e.get_graphics().lineStyle(a.borderWeightDown,a.borderColorDown,1);e.get_graphics().beginFill(a.colorDown);rc.drawRoundRectComplex(e.get_graphics(),0,0,a.width,a.height,a.topLeftRadius,a.topRightRadius,a.bottomLeftRadius,a.bottomRightRadius);e.get_graphics().endFill();d.addChild(e);d.addChild(this.labelDown);this.upState=this.disabledState=b;this.overState=c;this.downState=d;this.labelOver.set_y(this.labelUp.set_y(this.labelDown.set_y((a.height-this.labelUp.get_height())/2)));this.labelOver.set_x(this.labelUp.set_x(this.labelDown.set_x((a.width-
this.labelUp.get_width())/2)));la.call(this)};g["agario.views.controls.FlatButton"]=wd;wd.__name__=["agario","views","controls","FlatButton"];wd.__super__=la;wd.prototype=t(la.prototype,{labelUp:null,labelOver:null,labelDown:null,__class__:wd});var lj=function(){};g["mc.system.ui.controls.IPaginationControl"]=lj;lj.__name__=["mc","system","ui","controls","IPaginationControl"];lj.prototype={set_selected:null,selected:null,setText:null,__class__:lj,__properties__:{set_selected:"set_selected"}};var Df=
function(){wd.call(this,{labelUp:{text:"0",fontSize:12,align:T.CENTER,color:16777215},labelDown:{text:"0",fontSize:12,align:T.CENTER,color:2400453},colorUp:5685472,colorOver:2400453,colorDown:16777215,width:24,height:20,radius:5,borderWeightDown:2,borderColorDown:5685472})};g["agario.module.shop.components.PaginationPageButton"]=Df;Df.__name__=["agario","module","shop","components","PaginationPageButton"];Df.__interfaces__=[lj];Df.__super__=wd;Df.prototype=t(wd.prototype,{setText:function(a){this.labelUp.set_text(this.labelOver.set_text(this.labelDown.set_text(a)));this.labelUp.set_width(this.labelOver.set_width(this.labelDown.set_width(25)));this.labelUp.set_x(this.labelOver.set_x(this.labelDown.set_x(0)));this.labelUp.set_y(this.labelOver.set_y(this.labelDown.set_y(1)));this.labelUp.set_x(this.labelOver.set_x(this.labelDown.set_x(-1)));return a},__class__:Df});var Ef=function(){var a=h.get_assets().getTexture("arrow").get_bitmapData(),b=a.clone(),c=a.clone();c.applyFilter(c,c.rect,new Ea,new Cf([.3333333333333333,.3333333333333333,.3333333333333333,0,0,.3333333333333333,.3333333333333333,.3333333333333333,0,0,.3333333333333333,.3333333333333333,.3333333333333333,0,0,0,0,0,1,0]));this.upState=new Q(a);this.overState=new Q(b);this.downState=new Q(a);this.disabledState=new Q(c);this.upState.set_alpha(this.downState.set_alpha(.8));la.call(this)};g["agario.module.shop.components.ShopNextArrow"]=Ef;Ef.__name__=["agario","module","shop","components","ShopNextArrow"];Ef.__super__=la;Ef.prototype=t(la.prototype,{__class__:Ef});var Xa=function(a){this.updating=!1;this.minWidth=this.maxWidth=this.minHeight=this.maxHeight=0;C.call(this);this._options=a;this.onCreate=new Cb;this.onBounds=new Cb;this.set_name(function(a){null==a._options.name&&(a._options.name="control");return a._options.name}(this));this.set_minWidth(function(a){null==a._options.minWidth&&(a._options.minWidth=0);return a._options.minWidth}(this));this.set_maxWidth(function(a){null==a._options.maxWidth&&(a._options.maxWidth=0);return a._options.maxWidth}(this));this.set_minHeight(function(a){null==a._options.minHeight&&(a._options.minHeight=0);return a._options.minHeight}(this));this.set_maxHeight(function(a){null==a._options.maxHeight&&(a._options.maxHeight=0);return a._options.maxHeight}(this));this.set_x(function(a){null==a._options.x&&(a._options.x=0);return a._options.x}(this));this.set_y(function(a){null==a._options.y&&(a._options.y=0);return a._options.y}(this));this.set_w(function(a){null==a._options.w&&(a._options.w=0);return a._options.w}(this));this.set_h(function(a){null==a._options.h&&(a._options.h=0);return a._options.h}(this));this.children_bounds={x:0,y:0,right:0,bottom:0,real_x:0,real_y:0,real_w:0,real_h:0};this.onCreate.dispatch()};g["mc.system.ui.Control"]=Xa;Xa.__name__=["mc","system","ui","Control"];Xa.__super__=C;Xa.prototype=t(C.prototype,{w:null,h:null,minWidth:null,maxWidth:null,minHeight:null,maxHeight:null,children_bounds:null,updating:null,onCreate:null,onBounds:null,_options:null,set_size:function(a,b){this.updating=!0;var c=a-this.get_x(),d=b-this.h;this.set_w(a);this.set_h(b);this.updating=!1;this.bounds_changed(0,0,c,d)},get_right:function(){return this.get_x()+this.w},get_bottom:function(){return this.get_y()+this.h},set_minWidth:function(a){this.minWidth=a;this.w<this.minWidth&&this.set_w(this.minWidth);return this.minWidth},set_minHeight:function(a){this.minHeight=a;this.h<this.minHeight&&this.set_h(this.minHeight);return this.minHeight},set_maxWidth:function(a){this.maxWidth=a;this.w>this.maxWidth&&this.set_w(this.maxWidth);return this.maxWidth},set_maxHeight:function(a){this.maxHeight=a;this.h>this.maxHeight&&this.set_h(this.maxHeight);return this.maxHeight},set_w:function(a){a<this.minWidth&&(a=this.minWidth);a>this.maxWidth&&0!=this.maxWidth&&(a=this.maxWidth);var b=a-this.w;this.w=a;this.bounds_changed(0,0,b);return this.w},set_h:function(a){a<this.minHeight&&(a=this.minHeight);a>this.maxHeight&&0!=this.maxHeight&&(a=this.maxHeight);var b=a-this.h;this.h=a;this.bounds_changed(0,0,0,b);return this.h},get_children_bounds:function(){if(0==this.get_numChildren())return this.children_bounds.x=0,this.children_bounds.y=0,this.children_bounds.right=0,this.children_bounds.bottom=0,this.children_bounds.real_x=0,this.children_bounds.real_y=0,this.children_bounds.real_w=0,this.children_bounds.real_h=0,this.children_bounds;for(var a=this.getChildAt(0),b=a.get_x(),c=a.get_y(),d=a.get_x()+a.get_width(),e=a.get_y()+a.get_height(),f=a.get_x(),a=a.get_y(),n=0,L=this.get_numChildren();n<L;)var g=n++,g=this.getChildAt(g),b=Math.min(g.get_x(),b),c=Math.min(g.get_y(),c),d=Math.max(d,g.get_x()+g.get_width()),e=Math.max(e,g.get_y()+g.get_height()),f=Math.min(g.get_x(),f),a=Math.min(g.get_y(),a);this.children_bounds.x=b;this.children_bounds.y=c;this.children_bounds.right=d;this.children_bounds.bottom=e;this.children_bounds.real_x=f;this.children_bounds.real_y=a;this.children_bounds.real_w=d;this.children_bounds.real_h=e;return this.children_bounds},update_bounds:function(){var a=this.get_children_bounds();this.set_w(a.real_w);this.set_h(a.real_h)},bounds_changed:function(a,b,c,d){this.updating||this.onBounds.dispatch()},__class__:Xa,__properties__:t(C.prototype.__properties__,{get_bottom:"get_bottom",get_right:"get_right",get_children_bounds:"get_children_bounds",set_maxHeight:"set_maxHeight",set_minHeight:"set_minHeight",set_maxWidth:"set_maxWidth",set_minWidth:"set_minWidth",set_h:"set_h",set_w:"set_w"})});var Td=function(a){this.showPrice=!0;null==a.name&&(a.name="skin_element."+a.model.purchaseId);a.name;a.w=150;a.h=360;this.item=a.model;this.options=a;Xa.call(this,a);this.addEventListener(v.ADDED_TO_STAGE,k(this,this.initialize))};g["agario.module.shop.components.SkinElement"]=Td;Td.__name__=["agario","module","shop","components","SkinElement"];Td.__super__=Xa;Td.prototype=t(Xa.prototype,{showPrice:null,options:null,title:null,item:null,data:null,skinCell:null,initialize:function(a){this.removeEventListener(v.ADDED_TO_STAGE,k(this,this.initialize));this.data=this.item;a=new Da;a.set_y(2);this.options.model.get_inUse()?(a.get_graphics().lineStyle(2,12907007,1),a.get_graphics().beginFill(12907007,1)):(a.get_graphics().lineStyle(2,12566463,1),a.get_graphics().beginFill(16777215,1));a.get_graphics().drawRoundRect(0,0,this.w,this.h-80,15,15);a.get_graphics().endFill();this.addChild(a);this.title=new ea({text:this.options.model.get_title(),fontSize:14});this.addChild(this.title);this.title.set_x(.5*(this.w-this.title.get_width()));this.title.set_y(10);this.skinCell=new xd({bitmap:this.options.model.gamePlayInfo.image,w:this.options.w-20,h:this.options.w-20,borderColor:this.options.model.gamePlayInfo.get_cellColor()});this.addChild(this.skinCell);this.skinCell.set_x(.5*(this.w-this.skinCell.get_width()));this.skinCell.set_y((a.get_height()-this.skinCell.get_height())/2);var b=new Q(h.get_assets().getTexture("currency_icon").get_bitmapData()),c=[6349312,16777215,5685472],d=[5622016,16777215,4096417],e=[16777215,5685472,16777215],f=[16777215,5685472,16777215],n=0,L=K.string(this.options.model.price),g=!0,l=!1;1==this.options.model.get_owned()&&(g=!1,n=2,L=E.text("menu_shop_use"),1==this.options.model.get_inUse()&&(n=1,l=!0,L=E.text("menu_shop_cancel")));
""==this.options.model.purchaseId&&(g=!1,n=2,L=E.text("menu_shop_skins_node_placeholder"));this.showPrice?(b=new rb({color:c[n],overColor:d[n],text:L,textColorOver:f[n],textColor:e[n],icon:g?b:null,w:a.get_width()-1,h:40,fontSize:14,bold:!0,showOutline:l,outlineColor:e[n]}),b.buttonMode=!0,b.data=this.item,b.addEventListener(F.CLICK,k(this,this.onClick)),this.addChild(b),b.set_y(a.get_y()+a.get_height()+10),b.addEventListener(F.MOUSE_OVER,k(this,this.onOver)),b.addEventListener(F.MOUSE_OUT,k(this,this.onOut)),this.addChild(b)):(b=new Q(h.get_assets().getTexture("locket").get_bitmapData()),b=new yd({text:"LEVEL "+this.options.model.availableAtLevel,fontSize:16,align:T.LEFT,color:0,bold:!0},b,"left",5,-2),this.addChild(b),b.set_y(a.get_y()+a.get_height()+20),b.set_x((a.get_width()-b.get_width())/2),this.skinCell.set_alpha(.5),this.title.set_alpha(.5),this.title.set_alpha(.5));this.update_bounds()},onOver:function(a){this.skinCell.set_alpha(.8)},onOut:function(a){this.skinCell.set_alpha(1)},
onClick:function(a){var b=a.currentTarget;b.set_enabled(!1);h.user.isGuest&&b.delayedEnable();a=a.currentTarget.data;null!=a&&(1==a.get_owned()&&0==a.get_inUse()?this.dispatchEvent(new qa("ShopEvent::USE",a)):0==a.get_owned()?this.dispatchEvent(new qa("ShopEvent::BUY",a)):1==a.get_owned()&&1==a.get_inUse()&&this.dispatchEvent(new qa("ShopEvent::UNEQUIP",a)))},__class__:Td});var xd=function(a){C.call(this);null==a.borderSize&&(a.borderSize=4);a.borderSize;this.options=a;this.addEventListener(v.ADDED_TO_STAGE,k(this,this.onAddedToStage))};g["agario.module.shop.components.SkinnedCell"]=xd;xd.__name__=["agario","module","shop","components","SkinnedCell"];xd.__super__=C;xd.prototype=t(C.prototype,{options:null,container:null,cellMask:null,onAddedToStage:function(a){this.removeEventListener(v.ADDED_TO_STAGE,k(this,this.onAddedToStage));this.container=new C;this.addChild(this.container);a=new C;a.get_graphics().beginFill(16777215);a.get_graphics().drawRect(0,0,this.options.w,this.options.h);a.get_graphics().endFill();this.container.addChild(a);this.cellMask=new Da;this.cellMask.get_graphics().beginFill(16777215,1);this.cellMask.get_graphics().drawCircle(1,0,this.get_width()/2);this.cellMask.get_graphics().endFill();this.cellMask.set_x(this.options.w/2);this.cellMask.set_y(this.options.h/2);this.drawOutline(K.parseInt(this.options.borderColor),this.options.borderSize);if(null!=this.options.bitmap){a=na.getService(Jb);var b=this.options.bitmap.lastIndexOf(".png");-1!=b&&(this.options.bitmap=H.substr(this.options.bitmap,
0,b));a=a.getConfigUrl(""+this.options.bitmap+".png");a=new Hg({url:a,w:this.options.w,h:this.options.h});this.container.addChild(a);this.container.addChild(this.cellMask);this.container.set_mask(this.cellMask);a.addEventListener(v.COMPLETE,function(a){ga.tween(a.currentTarget,.6,{alpha:1})})}},drawOutline:function(a,b){var c=new Da;c.get_graphics().lineStyle(this.options.borderSize,a,1);c.get_graphics().drawCircle(1,0,this.get_width()/2);c.get_graphics().endFill();c.set_x(this.options.w/2);c.set_y(this.options.h/
2);this.addChild(c)},__class__:xd});var xe=function(a,b){this.S_slotFilled=new Oc;this.S_slotsFull=new Cb;this.paused=!1;this.slotQueue=0;this.highlightColor=16777215;this.filledColor=16507144;this.emptyColor=14079702;Xa.call(this,{w:150,h:360});this.filledArray=[];this.highlightArray=[];this.filled=b;this.totalSlots=a;this.addEventListener(v.ADDED_TO_STAGE,k(this,this.initialize))};g["agario.module.shop.components.SlotControl"]=xe;xe.__name__=["agario","module","shop","components","SlotControl"];xe.__super__=Xa;xe.prototype=t(Xa.prototype,{totalSlots:null,filled:null,emptyColor:null,filledColor:null,highlightColor:null,filledArray:null,slotQueue:null,paused:null,highlightArray:null,hasFinished:null,get_hasFinished:function(){return 0>=this.slotQueue},S_slotsFull:null,S_slotFilled:null,setSlotActive:function(){this.filledArray[this.filled].set_visible(!0);this.filledArray[this.filled].set_alpha(1);this.filled++},addSlotToQueue:function(){this.slotQueue++},pauseProcess:function(){this.paused=!0},resumeProcess:function(){this.paused=!1;this.process()},process:function(){this.paused||this.fillSlot()},initialize:function(a){this.slotQueue=0;this.removeEventListener(v.ADDED_TO_STAGE,k(this,this.initialize));this.drawEmptySlots();this.drawHighlightSlots();this.drawFilledSlots()},fillSlot:function(a){null==a&&(a=0);0<this.slotQueue&&(this.S_slotFilled.dispatch(this.filled),this.filledArray[this.filled].set_visible(!0),this.filledArray[this.filled].set_alpha(0),ga.tween(this.highlightArray[this.filled],.5,{alpha:1}).delay(a).onComplete(k(this,this.fillSlotResult)),ga.tween(this.filledArray[this.filled],.5,{alpha:1}).delay(a+.3))},drawEmptySlots:function(){for(var a=0,b=this.totalSlots;a<b;){var c=a++,d=this.createSlot(this.emptyColor);d.set_x(20*c);this.addChild(d)}},drawFilledSlots:function(){for(var a=0,b=this.totalSlots;a<b;){var c=a++,d=this.createSlot(this.filledColor);d.set_x(20*c);this.addChild(d);d.set_visible(!1);this.filledArray.push(d)}},drawHighlightSlots:function(){for(var a=0,b=this.totalSlots;a<b;){var c=a++,d=this.createSlot(this.highlightColor);d.set_x(20*c);this.addChild(d);d.set_alpha(0);this.highlightArray.push(d)}},createSlot:function(a){var b=new C;b.get_graphics().beginFill(a);b.get_graphics().drawRoundRect(0,0,13,20,4,4);b.get_graphics().endFill();return b},fillSlotResult:function(){this.paused||(this.slotQueue--,this.filled++,this.filled>this.totalSlots-1&&(this.S_slotsFull.dispatch(),this.clearAllSlots(),this.filled=0),0<this.slotQueue?this.process():this.slotQueue=0)},clearAllSlots:function(){for(var a=0,b=this.totalSlots;a<b;){var c=a++;this.filledArray[c].set_alpha(0);this.filledArray[c].set_visible(!1);this.highlightArray[c].set_alpha(0)}this.filled=0},__class__:xe,__properties__:t(Xa.prototype.__properties__,{get_hasFinished:"get_hasFinished"})});var v=function(a,b,c){null==c&&(c=!1);null==b&&(b=!1);this.type=a;this.bubbles=b;this.cancelable=c;this.eventPhase=Bb.AT_TARGET};g["openfl.events.Event"]=v;v.__name__=["openfl","events","Event"];v.prototype={bubbles:null,cancelable:null,currentTarget:null,eventPhase:null,target:null,type:null,__isCancelled:null,__isCancelledNow:null,stopImmediatePropagation:function(){this.__isCancelledNow=this.__isCancelled=!0},__class__:v};var fb=function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!1);this.data=b;v.call(this,a,c,d)};g["mc.events.GameEvent"]=fb;fb.__name__=["mc","events","GameEvent"];fb.__super__=v;fb.prototype=t(v.prototype,{data:null,__class__:fb});var lc=function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!1);fb.call(this,a,b,c,d)};g["agario.module.shop.events.HintTooltipEvent"]=lc;lc.__name__=["agario","module","shop","events","HintTooltipEvent"];lc.__super__=fb;lc.prototype=t(fb.prototype,{__class__:lc});var qa=function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!1);fb.call(this,a,b,c,d)};g["agario.module.shop.events.ShopEvent"]=qa;qa.__name__=["agario","module","shop","events","ShopEvent"];qa.__super__=fb;qa.prototype=t(fb.prototype,{__class__:qa});var ye=function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!1);fb.call(this,a,b,c,d)};g["agario.module.shop.events.WalletEvent"]=ye;ye.__name__=["agario","module","shop","events","WalletEvent"];ye.__super__=fb;ye.prototype=t(fb.prototype,{__class__:ye});var mj=function(){};g["mc.security.IUser"]=mj;mj.__name__=["mc","security","IUser"];mj.prototype={id:null,name:null,__class__:mj};var ze=function(a,b){this.id=a;this.name=b};g["mc.security.User"]=ze;ze.__name__=["mc","security","User"];ze.__interfaces__=[mj];ze.prototype={id:null,name:null,__class__:ze};var re=function(a,b){this.xpBoostAmount=this.massBoostAmount=0;this.socialId="";this.realm=pb.Guest;this.defaultSkin=this.selectedLanguage=this.currencyCode="";this.isConnecting=!1;this.isGuest=!0;this.loggedIn=!1;this.onUserDataUpdate=new Cb;ze.call(this,a,b);this._serverModel=na.getService(Nc);this._serverModel.register(62,k(this,this.onGameOver));this.avatarUrl=h.services.config.getRootUrl("mc/img/profilepic_guest.png")};g["agario.module.shop.models.GameUser"]=re;re.__name__=["agario","module","shop","models","GameUser"];re.__super__=ze;re.prototype=t(ze.prototype,{loggedIn:null,isGuest:null,isConnecting:null,stats:null,userInfo:null,serverInfo:null,userSettings:null,userWallet:null,userBoosts:null,wallet:null,facebookId:null,avatarUrl:null,defaultSkin:null,selectedLanguage:null,currencyCode:null,realm:null,socialId:null,selectedSkin:null,coins:null,onUserDataUpdate:null,xpBoostAmount:null,massBoostAmount:null,_serverModel:null,destroy:function(){null!=this._serverModel&&this._serverModel.unregister(62,k(this,this.onGameOver));this.set_realm(pb.Guest)},onGameOver:function(a,b){62==a&&(window.onPlayerDeath(),this.setUserStats(b.get_userStats()),this.handleUserUpdates(b.get_userDataUpdates()))},handleUserData:function(a){null==this.userInfo&&(this.userInfo=new Ae);this.wallet=[];this.id=a.get_userInfo().get_id();this.name=a.get_userInfo().get_displayName();this.stats=new Be(a.get_userStats());this.userInfo.setValues(a.get_userInfo());this.serverInfo=new Ff(a.get_serverInfo());this.userInfo.id=a.get_userInfo().get_id();this.userInfo.displayName=a.get_userInfo().get_displayName();this.userInfo.level=a.get_userInfo().get_level();this.userInfo.xp=a.get_userInfo().get_xp();this.userInfo.hasLoggedIntoMobile=a.get_userInfo().get_hasLoggedIntoMobile();this.userInfo.userTimedEvents=[];this.setUserStats(a.get_userStats());if(null==a.get_userTimedEvents()||0==a.get_userTimedEvents().length){this.userInfo.userTimedEvents=[];var b=new Ud;b.set_nextAvailableInSeconds(0);b.set_eventId("hourlyBonus");this.userInfo.userTimedEvents.push(new Ce(b))}for(var b=0,c=a.get_userTimedEvents();b<c.length;){var d=c[b];++b;this.userInfo.userTimedEvents.push(new Ce(d))}this.userSettings=a.get_userSettings();null!=this.userSettings&&0<this.userSettings.length&&(b=this.userSettings.filter(function(a){return 1==a.get_key()}),null!=b&&0<b.length&&this.set_selectedSkin(b[0].get_valueString()));this.userWallet=a.get_userWallet();b=0;for(c=this.userWallet.length;b<c;)d=b++,d=new Vd({productId:this.userWallet[d].get_productId(),balance:this.userWallet[d].get_quantity()}),this.wallet.push(d);this.userBoosts=a.get_userBoosts();switch(a.get_realm()){case 2:this.set_realm(pb.Facebook);break;case 3:this.set_realm(pb.Google);break;default:Ia.trace("Weird value in login response",{fileName:"GameUser.hx",lineNumber:171,className:"agario.module.shop.models.GameUser",methodName:"handleUserData"})}this.evaluateWallet();this.loggedIn=!0;this.isGuest=!1;this.onUserDataUpdate.dispatch()},checkUsingBoosts:function(){for(var a=[],b=0,c=this.userBoosts.length;b<c;){for(var d=b++,e=h.models.shopBoostItems.getItemByProductId(this.userBoosts[d].get_productId()),f=h.models.shopBoostItems.getItemsByType(e.categoryShopId),n=0,L=f.length;n<L;){var g=n++;f[g].set_inUse(!0)}Ga.gt(this.userBoosts[d].get_expiresInSeconds(),0)?(h.services.gameui.setTimerForBoost(e.categoryShopId,this.userBoosts[d].get_expiresInSeconds(),k(this,this.onBoostEnded),this.userBoosts[d].get_productId()),h.services.gameui.setIcon(e.categoryShopId,"img/"+e.category.image)):a.push(this.userBoosts[d])}b=0;for(c=a.length;b<c;)d=b++,H.remove(this.userBoosts,a[d])},getWalletItemById:function(a){return this.wallet.filter(function(b){return b.productId==a})[0]},handleUserUpdates:function(a){for(var b=0;b<a.length;){var c=a[b];++b;20==c.get_type()?this.handleProductUpdate(c.get_productField()):10==c.get_type()&&this.handleXpLevelUpdate(c.get_xpLevelField())}},handleXpLevelUpdate:function(a){null==this.userInfo&&(this.userInfo=new Ae);Ga.gt(a.get_deltaLevel(),0)&&window.MC.showLevelUp(50*a.get_deltaLevel(),this.userInfo.level,a.get_finalLevel());this.userInfo.level=a.get_finalLevel();this.userInfo.xp=a.get_finalXpForLevel();this.userInfo.level>=h.models.xpModel.xpList.length&&(this.userInfo.xp=this.userInfo.xpNeeded);h.services.gameui.setAccountData({level:this.userInfo.level,xp:this.userInfo.xp,xpNeeded:h.models.xpModel.getMaxXpForLevel(this.userInfo.level)},!0)},evaluateWallet:function(){h.models.shopLoaded&&(this.checkUserSkin(),this.checkWalletBoosts(),this.checkUsingBoosts())},setUserStats:function(a){null==this.stats&&(this.stats=new Be);this.stats.gamesPlayed=a.get_gamesPlayed();this.stats.massConsumed=a.get_massConsumed();this.stats.highestMass=a.get_highestMass();this.stats.longestTimeAlive=a.get_longestTimeAlive();this.stats.mostCellsEaten=a.get_mostCellsEaten();0==a.get_gamesPlayed()?this.stats.averageScore=0:this.stats.averageScore=Math.floor(function(b){b=a.get_allTimeScore();var c=a.get_gamesPlayed();return Ga.toFloat(b)/Ga.toFloat(c)}(this))},checkWalletBoosts:function(){for(var a=this.massBoostAmount=this.xpBoostAmount=0,b=h.models.shopBoostItems.boostList.length;a<b;)for(var c=a++,c=h.models.shopBoostItems.boostList[c],d=0,e=this.wallet.length;d<e;){var f=
d++;this.wallet[f].productId==c.productIdToQuantify&&0<this.wallet[f].get_balance()&&(2==c.gameplayInfo.multiplier&&h.services.gameui.setIcon(c.categoryShopId,"img/"+c.category.image),c.categoryShopId==sc.XP_BOOST?this.xpBoostAmount+=this.wallet[f].get_balance():c.categoryShopId==sc.MASS_BOOST&&(this.massBoostAmount+=this.wallet[f].get_balance()))}h.services.gameui.setUserXPBoost(K.string(this.xpBoostAmount));h.services.gameui.setUserMassBoost(K.string(this.massBoostAmount))},checkUserSkin:function(){if(0<this.wallet.length)for(var a=0,b=this.wallet.length;a<b;){var c=a++,c=h.models.shopSkinsModel.getItemById(this.wallet[c].productId);null!=c&&(c.set_inUse(!1),c.productIdToQuantify==this.get_selectedSkin()&&c.set_inUse(!0),c.set_owned(!0))}},handleProductUpdate:function(a){if("coin"==a.get_productId())h.user.set_coins(a.get_finalAmount()),h.get_events().dispatchEventWith(ye.WALLET_UPDATED),h.services.gameui.setUserCoins(h.user.get_coins());else{var b=h.user.getWalletItemById(a.get_productId());null==b?this.wallet.push(new Vd({productId:a.get_productId(),balance:a.get_finalAmount()})):b.set_balance(a.get_finalAmount());this.evaluateWallet()}},onBoostEnded:function(a){for(var b="",c=0,d=this.wallet.length;c<d;){var e=c++;if(this.wallet[e].productId==a){var b=h.models.shopBoostItems.getItemByProductId(a).categoryShopId,e=this.wallet[e],f=e.get_balance();e.set_balance(f-1);f}}c=0;for(d=this.userBoosts.length;c<d;)e=c++,this.userBoosts[e].get_productId()==a&&this.userBoosts[e].set_expiresInSeconds(0);a=h.models.shopBoostItems.getItemsByType(b);b=0;for(c=a.length;b<c;)d=b++,a[d].set_inUse(!1);this.checkWalletBoosts()},freeCoinTimeLeft:function(){var a=this.userInfo.getTimedEvent("hourlyBonus");return null!=a?(a=a.finalTimer-(new Date).getTime(),0>a&&(a=0),a):0},get_realm:function(){return this.realm},set_realm:function(a){this.realm=a;this.onUserDataUpdate.dispatch();return a},get_socialId:function(){return this.socialId},set_socialId:function(a){this.socialId=a;this.onUserDataUpdate.dispatch();return a},get_selectedSkin:function(){return this.selectedSkin},set_selectedSkin:function(a){return this.selectedSkin=a},get_coins:function(){if(this.isGuest)return 100;if(null==this.userWallet)return 0;for(var a=0,b=this.userWallet.length;a<b;){var c=a++;if("coin"==this.userWallet[c].get_productId())return this.userWallet[c].get_quantity()}return 0},set_coins:function(a){for(var b=0,c=this.userWallet.length;b<c;){var d=b++;"coin"==this.userWallet[d].get_productId()&&this.userWallet[d].set_quantity(a)}return a},__class__:re,__properties__:{set_coins:"set_coins",get_coins:"get_coins",set_selectedSkin:"set_selectedSkin",get_selectedSkin:"get_selectedSkin",set_socialId:"set_socialId",get_socialId:"get_socialId",set_realm:"set_realm",get_realm:"get_realm"}});var ij=function(){this.currencyList=[]};g["agario.module.shop.models.PriceMatrixModel"]=ij;ij.__name__=["agario","module","shop","models","PriceMatrixModel"];ij.prototype={currencyList:null,add:function(a){this.currencyList.push(a)},hasCurrency:function(a){return 0<this.currencyList.length?this.currencyList[0].currencies.exists(a):!1},getPriceForTier:function(a,b){null==b&&(b="USD");for(var c=0,d=this.currencyList.length;c<d;){var e=c++;if(this.currencyList[e].tier==a)return this.currencyList[e].getPriceByCurrency(b)}return 0},__class__:ij};var Af=function(){};g["agario.module.shop.models.SettingsModel"]=Af;Af.__name__=["agario","module","shop","models","SettingsModel"];Af.createMap=function(a){var b=new ka;if(null!=a)for(var c=0;c<a.length;){var d=a[c];++c;b.exists(d.key)&&null;b.set(d.key,d.value)}return b};Af.prototype={settingList:null,getSettingByKey:function(a){return this.settingList.filter(function(b){return b.key==a})[0].value},__class__:Af};var kj=function(){this.itemsByType=new ka;this.boostList=[]};g["agario.module.shop.models.ShopBoostsModel"]=kj;kj.__name__=["agario","module","shop","models","ShopBoostsModel"];kj.prototype={boostList:null,itemsByType:null,add:function(a){this.boostList.push(a);this.itemsByType.exists(a.categoryShopId)||this.itemsByType.set(a.categoryShopId,[]);this.itemsByType.get(a.categoryShopId).push(a)},getItemByPurchaseId:function(a){for(var b=0,c=this.boostList.length;b<c;){var d=b++;if(this.boostList[d].purchaseId==a)return this.boostList[d]}return null},getItemByProductId:function(a){for(var b=0,c=this.boostList.length;b<c;){var d=b++;if(this.boostList[d].productIdToQuantify==a)return this.boostList[d]}return null},getItemsByType:function(a){return this.itemsByType.exists(a)?this.itemsByType.get(a):[]},__class__:kj};var jj=function(){this.shopCoinsList=[]};g["agario.module.shop.models.ShopCoinModel"]=jj;jj.__name__=["agario","module","shop","models","ShopCoinModel"];jj.prototype={shopCoinsList:null,instance:null,add:function(a){this.shopCoinsList.push(a)},getItemById:function(a){for(var b=0,c=this.shopCoinsList.length;b<c;){var d=b++;if(this.shopCoinsList[d].purchaseId==a)return this.shopCoinsList[d]}return null},__class__:jj};var cj=function(){this.shopItemsList=[];this.itemsByType=new ka};g["agario.module.shop.models.ShopItemsCollection"]=cj;cj.__name__=["agario","module","shop","models","ShopItemsCollection"];cj.prototype={shopItemsList:null,itemsByType:null,instance:null,add:function(a){this.shopItemsList.push(a);this.itemsByType.exists(a.type)||this.itemsByType.set(a.type,[]);this.itemsByType.get(a.type).push(a)},getItemByPurchaseId:function(a){for(var b=0,c=this.shopItemsList.length;b<c;){var d=b++;if(this.shopItemsList[d].purchaseId==a)return this.shopItemsList[d]}return null},getItemsByType:function(a){return this.itemsByType.exists(a)?this.itemsByType.get(a):[]},setSkinUse:function(a){for(var b=0,c=h.models.shopSkinsModel.skinList.length;b<c;){var d=b++;h.models.shopSkinsModel.skinList[d].set_inUse(!1);h.models.shopSkinsModel.skinList[d].productIdToQuantify==a&&(h.models.shopSkinsModel.skinList[d].set_inUse(!0),h.user.set_selectedSkin(a))}},__class__:cj};var M=function(a){null!=a&&this.setValues(a)};g["mc.system.models.VO"]=M;M.__name__=["mc","system","models","VO"];M.addFieldDeclaration=function(a,b,c){if(!M.classCache.exists(a)){var d=new ka;M.classCache.set(a,d)}M.classCache.get(a).set(b,c)};M.classHasField=function(a,b){if(M.classCache.exists(a)){var c=M.classCache.get(a);if(null!=J[b]?c.existsReserved(b):c.h.hasOwnProperty(b))return!0}return!1};M.prototype={handleSpecialTypes:function(a,b){return!1},hasField:function(a){for(var b=Qa.getInstanceFields(y.getClass(this)),c=0;c<b.length;){var d=b[c];++c;if(d==a)return!0}return!1},setValues:function(a){var b=y.getClass(this),c=Qa.getClassName(b);this.loadFieldInfo(!0,c,b);for(var d=Ig.getFields(b),b=new ka,e=0,f=G.fields(d);e<f.length;){var n=f[e];++e;var L=G.field(d,n);Object.prototype.hasOwnProperty.call(L,"name")&&(L=G.field(L,"name")[0],null!=J[L]?b.setReserved(L,n):b.h[L]=n)}d=0;for(e=G.fields(a);d<e.length;){n=e[d];++d;f=n;if(null!=J[n]?b.existsReserved(n):b.h.hasOwnProperty(n))f=null!=J[n]?b.getReserved(n):b.h[n];!this.handleSpecialTypes(n,a)&&M.classHasField(c,f)&&(L=this.getDeclaredTypeOfField(c,f),n=this._parse(L,G.getProperty(a,n)),"YES"==n?n=!0:"NO"==n&&(n=!1),G.setProperty(this,f,n))}},_parse:function(a,b){switch(a[1]){case 0:return b;case 3:var c=a[2],d=this.resolveVOType(c);return this._parseArray(d,c,b);case 1:return this._parseClass(a[2],b);default:return null}},_parseClass:function(a,b){for(var c=0,d=G.fields(b);c<d.length;){var e=d[c];++c;var f=G.getProperty(b,e);null!=f&&"string"!=typeof f&&(f|0)!==f&&"number"!=typeof f&&(null!=f._value?G.setProperty(b,e,f._value):G.setProperty(b,e,f._key))}return Qa.createInstance(Qa.resolveClass(a),[b])},resolveVOType:function(a){switch(a[1]){case 0:return Qa.resolveClass(a[2]);case 1:return Qa.resolveClass(a[2]);default:return null}},_parseArray:function(a,b,c){a=[];for(var d=0,e=c.length;d<e;){var f=d++;a.push(this._parse(b,c[f]))}return a},parseRTTIFields:function(a){switch(a[1]){case 7:return this.parseFieldType(a[2],a[3]);case 2:return this.parseFieldType(a[2],a[3])}return Sb.VT_Unknown},parseFieldType:function(a,b){switch(a){case"String":case"Int":case"Float":case"Bool":case"Date":return Sb.VT_Native(a);case"Array":var c=this.parseRTTIFields(b.pop());if(null!=c)return Sb.VT_Array(c)}return Sb.VT_Class(a)},loadFieldInfo:function(a,b,c){null==a&&(a=!1);if(!a||!M.classCache.exists(b)){a=Pk.getRtti(c);c=a.fields.h;for(var d=null;null!=c;)if(d=void 0,d=c[0],c=c[1],d.isPublic){var e=d.type;switch(e[1]){case 7:M.addFieldDeclaration(b,d.name,this.parseFieldType(e[2],e[3]));break;case 2:M.addFieldDeclaration(b,d.name,this.parseFieldType(e[2],e[3]))}}null!=a.superClass&&this.loadFieldInfo(!1,b,Qa.resolveClass(a.superClass.path))}},getDeclaredTypeOfField:function(a,b){if(M.classCache.exists(a)){var c=M.classCache.get(a);if(null!=J[b]?c.existsReserved(b):c.h.hasOwnProperty(b))return null!=J[b]?c.getReserved(b):c.h[b]}return Sb.VT_Unknown},get_DEBUG:function(){return!0},__class__:M,__properties__:{get_DEBUG:"get_DEBUG"}};var Sd=function(a){M.call(this,a)};g["agario.module.shop.models.ShopModel"]=Sd;Sd.__name__=["agario","module","shop","models","ShopModel"];Sd.__super__=M;Sd.prototype=t(M.prototype,{countr_code:null,currency:null,userSettings:null,localizationSettings:null,defaultCommunicationSettings:null,shopCoins:null,shopBoostCategories:null,shopBoostItems:null,shopSkins:null,shopPriceCurrency:null,shopPriceMatrix:null,shopSkinTabs:null,walletInappPurchases:null,walletSoftPurchases:null,walletProductBundles:null,walletProducts:null,externalSocialStories:null,gamePlayBoosts:null,gamePlaySkins:null,xpList:null,walletBonusRewards:null,__class__:Sd});var ej=function(){this.walletInappPurchases=[]};g["agario.module.shop.models.ShopPurchasesModel"]=ej;ej.__name__=["agario","module","shop","models","ShopPurchasesModel"];ej.prototype={walletInappPurchases:null,walletSoftPurchases:null,getInappPurchaseByBundleId:function(a){return this.walletInappPurchases.filter(function(b){return b.bundleId==a})[0]},getSoftPurchaseByBundleId:function(a){return this.walletSoftPurchases.filter(function(b){return b.bundleId==a})[0]},getInappPurchaseByPurchaseId:function(a){return this.walletInappPurchases.filter(function(b){return b.id==a})[0]},getSoftPurchaseByPurchaseId:function(a){return this.walletSoftPurchases.filter(function(b){return b.id==a})[0]},getPurchaseByPurchaseId:function(a){var b=this.walletSoftPurchases.filter(function(b){return b.id==a}),c=this.walletInappPurchases.filter(function(b){return b.id==a});return 0<b.length?b[0]:0<c.length?c[0]:null},getPurchaseByBundleId:function(a){var b=this.walletSoftPurchases.filter(function(b){return b.bundleId==a}),c=this.walletInappPurchases.filter(function(b){return b.bundleId==a});return 0<b.length?b[0]:0<c.length?c[0]:null},__class__:ej};var hj=function(){this.skinList=[];this.skinTabs=[]};g["agario.module.shop.models.ShopSkinModel"]=hj;hj.__name__=["agario","module","shop","models","ShopSkinModel"];hj.prototype={skinList:null,skinTabs:null,getItemById:function(a){for(var b=0,c=this.skinList.length;b<c;){var d=b++;if(this.skinList[d].productIdToQuantify==a)return this.skinList[d]}return null},getLastRewardSkin:function(a){for(var b=null,c=0,d=this.skinList.length;c<d;){var e=c++;this.skinList[e].availableAtLevel<=a&&this.skinList[e].isReward&&(b=this.skinList[e])}return b},getNextRewardSkin:function(a){for(var b=0,c=this.skinList;b<c.length;){var d=c[b];++b;if(d.availableAtLevel>a)return d}return null},getTabs:function(){return this.skinTabs},addSkin:function(a){this.skinList.push(a)},addTab:function(a){this.skinTabs.push(a)},__class__:hj};var fj=function(){this.products=[]};g["agario.module.shop.models.WalletProductBundlesModel"]=fj;fj.__name__=["agario","module","shop","models","WalletProductBundlesModel"];fj.prototype={products:null,add:function(a){this.products.push(a)},getBundleByProductId:function(a){for(var b=0,c=this.products;b<c.length;){var d=c[b];++b;if(d.productId==a)return d}return null},getBundleByBundleId:function(a){for(var b=0,c=this.products;b<c.length;){var d=c[b];++b;if(d.id==a)return d}return null},__class__:fj};var gj=function(){this.walletProducts=[]};g["agario.module.shop.models.WalletProductsModel"]=gj;gj.__name__=["agario","module","shop","models","WalletProductsModel"];gj.prototype={walletProducts:null,add:function(a){this.walletProducts.push(a)},getProductById:function(a){return this.walletProducts.filter(function(b){return b.id==a})[0]},__class__:gj};var dj=function(){};g["agario.module.shop.models.XPModel"]=dj;dj.__name__=["agario","module","shop","models","XPModel"];dj.prototype={xpList:null,getMaxXpForLevel:function(a){if(a>=this.xpList.length)return this.xpList[this.xpList.length-1].xpToNextLevel;for(var b=0,c=this.xpList;b<c.length;){var d=c[b];++b;if(d.level==a)return d.xpToNextLevel}return 0},getPercentage:function(a,b){var c=this.getMaxXpForLevel(b);return a/c},getLevelForReward:function(a){return this.xpList.filter(function(b){return b.levelUpBonusId==a})[0]},__class__:dj};var sc=function(){};g["agario.module.shop.models.types.BoostType"]=sc;sc.__name__="agario module shop models types BoostType".split(" ");var ve=function(){};g["agario.module.shop.models.types.ShopItemType"]=ve;ve.__name__="agario module shop models types ShopItemType".split(" ");var Jg=function(a){M.call(this,a)};g["agario.module.shop.models.vo.BonusRewardVO"]=Jg;Jg.__name__="agario module shop models vo BonusRewardVO".split(" ");Jg.__super__=M;Jg.prototype=t(M.prototype,{bonusId:null,bonusQty:null,bonusProductId:null,productUpdateOrigin:null,__class__:Jg});var Eb=function(a){this.isReward=this.owned=this.inUse=!1;M.call(this,a)};g["agario.module.shop.models.vo.ShopItemVO"]=Eb;Eb.__name__="agario module shop models vo ShopItemVO".split(" ");Eb.__super__=M;Eb.prototype=t(M.prototype,{purchaseId:null,price:null,purchaseType:null,type:null,isReward:null,purchaseInfo:null,owned:null,get_owned:function(){return this.owned},set_owned:function(a){return this.owned=a},inUse:null,get_inUse:function(){return this.inUse},set_inUse:function(a){return this.inUse=a},name:null,description:null,__class__:Eb,__properties__:t(M.prototype.__properties__,{set_inUse:"set_inUse",get_inUse:"get_inUse",set_owned:"set_owned",get_owned:"get_owned"})});var De=function(a){Eb.call(this,a)};g["agario.module.shop.models.vo.CurrencyItemVO"]=De;De.__name__="agario module shop models vo CurrencyItemVO".split(" ");De.__super__=Eb;De.prototype=t(Eb.prototype,{preAmount:null,finalAmount:null,banner:null,visibility:null,currency_code:null,percentage:null,__class__:De});var Gf=function(a){M.call(this,a)};g["agario.module.shop.models.vo.ExchangeRateVO"]=Gf;Gf.__name__="agario module shop models vo ExchangeRateVO".split(" ");Gf.__super__=M;Gf.prototype=t(M.prototype,{currency_offset:null,usd_exchange:null,usd_exchange_inverse:null,user_currency:null,__class__:Gf});var Kg=function(a){M.call(this,a)};g["agario.module.shop.models.vo.GamePlayBoostVO"]=Kg;Kg.__name__="agario module shop models vo GamePlayBoostVO".split(" ");Kg.__super__=M;Kg.prototype=t(M.prototype,{productId:null,type:null,multiplier:null,duration:null,__class__:Kg});var Hf=function(a){M.call(this,a);this.set_shopImage(this.image)};g["agario.module.shop.models.vo.GamePlaySkinVO"]=Hf;Hf.__name__="agario module shop models vo GamePlaySkinVO".split(" ");Hf.__super__=M;Hf.prototype=t(M.prototype,{gameplayId:null,image:null,shopImage:null,get_shopImage:function(){return na.getService(Jb).getConfigUrl(this.image)},set_shopImage:function(a){return this.shopImage=a},gamePlayImage:null,get_gamePlayImage:function(){var a=this.image.substring(0,this.image.lastIndexOf(".")),b=this.image.substring(this.image.lastIndexOf("."),this.image.length),a=a+"_hi"+b;return na.getService(Jb).getConfigUrl(a)},set_gamePlayImage:function(a){return this.gamePlayImage=a},cellColor:null,get_cellColor:function(){return this.cellColor},set_cellColor:function(a){return this.cellColor=a.substring(0,8)},productId:null,__class__:Hf,__properties__:t(M.prototype.__properties__,{set_cellColor:"set_cellColor",get_cellColor:"get_cellColor",set_gamePlayImage:"set_gamePlayImage",get_gamePlayImage:"get_gamePlayImage",set_shopImage:"set_shopImage",get_shopImage:"get_shopImage"})});var Lg=function(a){M.call(this,a)};g["agario.module.shop.models.vo.PlayerInfoVO"]=Lg;Lg.__name__="agario module shop models vo PlayerInfoVO".split(" ");Lg.__super__=M;Lg.prototype=t(M.prototype,{currentSkin:null,wallet:null,coinAmount:null,getWalletItemById:function(a){return this.wallet.filter(function(b){return b.productId==a})[0]},__class__:Lg});var Mg=function(a){M.call(this,a)};g["agario.module.shop.models.vo.PriceCurrencyVO"]=Mg;Mg.__name__="agario module shop models vo PriceCurrencyVO".split(" ");Mg.__super__=M;Mg.prototype=t(M.prototype,{id:null,__class__:Mg});var Ng=function(a){M.call(this,null);this.currencies=new ka;for(var b=G.fields(a),c=0;c<b.length;){var d=b[c];++c;var e=G.getProperty(a,d);this.currencies.set(d,e)}this.tier=a.tier};g["agario.module.shop.models.vo.PriceTierVO"]=Ng;Ng.__name__="agario module shop models vo PriceTierVO".split(" ");Ng.__super__=M;Ng.prototype=t(M.prototype,{tier:null,currencies:null,getPriceByCurrency:function(a){return this.currencies.exists(a)?this.currencies.get(a):this.currencies.get("USD")},__class__:Ng});var Ff=function(a){M.call(this,a)};g["agario.module.shop.models.vo.ServerInfoVO"]=Ff;Ff.__name__="agario module shop models vo ServerInfoVO".split(" ");Ff.__super__=M;Ff.prototype=t(M.prototype,{host:null,tcpPort:null,udpPort:null,__class__:Ff});var Bf=function(a){M.call(this,a)};g["agario.module.shop.models.vo.ShopBoostCategoryVO"]=Bf;Bf.__name__="agario module shop models vo ShopBoostCategoryVO".split(" ");Bf.__super__=M;Bf.prototype=t(M.prototype,{shopId:null,position:null,title:null,description:null,image:null,spritesheet:null,__class__:Bf});var Mb=function(a){Eb.call(this,a)};g["agario.module.shop.models.vo.ShopBoostItemVO"]=Mb;Mb.__name__="agario module shop models vo ShopBoostItemVO".split(" ");Mb.__super__=Eb;Mb.prototype=t(Eb.prototype,{categoryShopId:null,title:null,bestDealSticker:null,position:null,categoryPosition:null,productIdToQuantify:null,category:null,gameplayInfo:null,__class__:Mb});var Oa=function(a){this.availableAtLevel=-1;Eb.call(this,a);this.isVisible="default"==this.visibility};g["agario.module.shop.models.vo.ShopSkinItemVO"]=Oa;Oa.__name__="agario module shop models vo ShopSkinItemVO".split(" ");Oa.__super__=Eb;Oa.prototype=t(Eb.prototype,{originId:null,productIdToQuantify:null,image:null,tab:null,title:null,get_title:function(){return E.exists(this.title)?E.text(this.title):this.title},set_title:function(a){return this.title=a},visibility:null,isVisible:null,gamePlayInfo:null,availableAtLevel:null,__class__:Oa,__properties__:t(Eb.prototype.__properties__,{set_title:"set_title",get_title:"get_title"})});var Og=function(a){Eb.call(this,a)};g["agario.module.shop.models.vo.ShopSkinTabVO"]=Og;Og.__name__="agario module shop models vo ShopSkinTabVO".split(" ");Og.__super__=Eb;Og.prototype=t(Eb.prototype,{tabName:null,isNormalSort:null,tabDescription:null,__class__:Og});var Pg=function(a){M.call(this,a)};g["agario.module.shop.models.vo.SocialStoryVO"]=Pg;Pg.__name__="agario module shop models vo SocialStoryVO".split(" ");Pg.__super__=M;Pg.prototype=t(M.prototype,{id:null,icon:null,iconURL:null,titleTag:null,subtitleTag:null,descriptionTag:null,descriptionAndroidTag:null,twitterTitleTag:null,twitterSubtitleTag:null,twitterDescriptionTag:null,twitterDescriptionAndroidTag:null,__class__:Pg});var Ce=function(a){var b=(new Date).getTime();null!=a&&(this.eventId=a.get_eventId(),this.nextAvailableInSeconds=a.get_nextAvailableInSeconds(),this.finalTimer=0==this.nextAvailableInSeconds?0:b+1E3*this.nextAvailableInSeconds)};g["agario.module.shop.models.vo.TimedEventVO"]=Ce;Ce.__name__="agario module shop models vo TimedEventVO".split(" ");Ce.prototype={eventId:null,nextAvailableInSeconds:null,finalTimer:null,__class__:Ce};var Ae=function(a){M.call(this,a)};g["agario.module.shop.models.vo.UserInfoVO"]=Ae;Ae.__name__="agario module shop models vo UserInfoVO".split(" ");Ae.__super__=M;Ae.prototype=t(M.prototype,{id:null,displayName:null,xp:null,level:null,hasLoggedIntoMobile:null,xpNeeded:null,userTimedEvents:null,setTimedEvent:function(a){0<this.userTimedEvents.length&&this.userTimedEvents.splice(0,this.userTimedEvents.length);this.userTimedEvents.push(a)},getTimedEvent:function(a){var b=this.userTimedEvents.filter(function(b){return b.eventId==a});return 0==b.length?null:b[0]},__class__:Ae});var Qg=function(a){M.call(this,a)};g["agario.module.shop.models.vo.UserSettingVO"]=Qg;Qg.__name__="agario module shop models vo UserSettingVO".split(" ");Qg.__super__=M;Qg.prototype=t(M.prototype,{key:null,value:null,__class__:Qg});var Be=function(a){M.call(this,a)};g["agario.module.shop.models.vo.UserStatsVO"]=Be;Be.__name__="agario module shop models vo UserStatsVO".split(" ");Be.__super__=M;Be.prototype=t(M.prototype,{gamesPlayed:null,massConsumed:null,averageScore:null,highestMass:null,longestTimeAlive:null,mostCellsEaten:null,__class__:Be});var Rg=function(a){M.call(this,a)};g["agario.module.shop.models.vo.WalletInappPurchaseVO"]=Rg;Rg.__name__="agario module shop models vo WalletInappPurchaseVO".split(" ");Rg.__super__=M;Rg.prototype=t(M.prototype,{bundleId:null,id:null,priceTier:null,localizedName:null,localizedDescription:null,__class__:Rg});var Vd=function(a){this.inUse=!1;M.call(this,a)};g["agario.module.shop.models.vo.WalletItemVO"]=Vd;Vd.__name__="agario module shop models vo WalletItemVO".split(" ");Vd.__super__=M;Vd.prototype=t(M.prototype,{productId:null,_balance:null,balance:null,get_balance:function(){return this._balance},set_balance:function(a){0>a&&(a=0);return this._balance=a},inUse:null,__class__:Vd,__properties__:t(M.prototype.__properties__,{set_balance:"set_balance",get_balance:"get_balance"})});var Sg=function(a){M.call(this,a)};g["agario.module.shop.models.vo.WalletProductBundleVO"]=Sg;Sg.__name__="agario module shop models vo WalletProductBundleVO".split(" ");Sg.__super__=M;Sg.prototype=t(M.prototype,{id:null,productId:null,quantity:null,__class__:Sg});var Tg=function(a){M.call(this,a)};g["agario.module.shop.models.vo.WalletProductVO"]=Tg;Tg.__name__="agario module shop models vo WalletProductVO".split(" ");Tg.__super__=M;Tg.prototype=t(M.prototype,{id:null,type:null,consumable:null,__class__:Tg});var Ug=function(a){M.call(this,a)};g["agario.module.shop.models.vo.WalletSoftPurchaseVO"]=Ug;Ug.__name__="agario module shop models vo WalletSoftPurchaseVO".split(" ");Ug.__super__=M;Ug.prototype=t(M.prototype,{bundleId:null,currencyAmount:null,currencyProductId:null,id:null,__class__:Ug});var Vg=function(a){M.call(this,a)};g["agario.module.shop.models.vo.XPItemVO"]=Vg;Vg.__name__="agario module shop models vo XPItemVO".split(" ");Vg.__super__=M;Vg.prototype=t(M.prototype,{level:null,xpToNextLevel:null,levelUpBonusId:null,__class__:Vg});var If=function(a){M.call(this,a)};g["agario.module.shop.models.vo.XsollaShopItemsVO"]=If;If.__name__="agario module shop models vo XsollaShopItemsVO".split(" ");If.__super__=M;If.prototype=t(M.prototype,{items:null,currency_code:null,__class__:If});var Wg=function(a){M.call(this,a)};g["agario.module.shop.models.vo.XsollaShopItemVO"]=Wg;Wg.__name__="agario module shop models vo XsollaShopItemVO".split(" ");Wg.__super__=M;Wg.prototype=t(M.prototype,{sku:null,description:null,price:null,__class__:Wg});var Xg=function(a){this.maxHeight=65;this.maxWidth=800;C.call(this);this.item=a;this._payModel=na.getService(vd)};g["agario.module.shop.renderers.CurrencyShopItem"]=Xg;Xg.__name__=["agario","module","shop","renderers","CurrencyShopItem"];Xg.__super__=C;Xg.prototype=t(C.prototype,{maxWidth:null,maxHeight:null,background:null,plusLabel:null,stampIcon:null,item:null,percentage:null,price:null,amountLabel:null,multiplierLabel:null,finalAmountLabel:null,equalLabel:null,buy:null,currencyIcon:null,_payModel:null,onClick:function(a){this.dispatchEvent(new qa("ShopEvent::BUY"))},render:function(){this.drawItem();this.doLayout()},drawItem:function(){var a=16768658,b=16742656,c=16775095;"none"==this.item.banner.toLowerCase()&&(a=16775095,b=16769024,c=16768658);this.background=new C;this.background.get_graphics().beginFill(a,1);this.background.get_graphics().drawRoundRect(0,0,this.maxWidth,this.maxHeight,5,5);this.background.get_graphics().endFill();this.addChild(this.background);this.amountLabel=new ea({text:K.string(this.item.preAmount),fontSize:18,align:T.LEFT});this.amountLabel.set_autoSize(ia.LEFT);this.disableTextField(this.amountLabel);this.addChild(this.amountLabel);"none"!=this.item.banner&&(this.stampIcon=new Q(h.get_assets().getTexture("multiplier_stamp").get_bitmapData()),this.addChild(this.stampIcon),this.multiplierLabel=new ea({text:E.text(this.item.banner),fontSize:14,color:16777215,wordWrap:!0,maxWidth:65}),this.addChild(this.multiplierLabel));this.plusLabel=new ea({text:"+",fontSize:16,align:T.LEFT});this.plusLabel.set_autoSize(ia.LEFT);this.disableTextField(this.plusLabel);this.addChild(this.plusLabel);a={labelOptions:{text:K.string(this.item.percentage)+"%",fontSize:16,align:T.LEFT,color:16777215},labelWidth:90,labelHeight:this.maxHeight-10,radius:5,backgroundColor:b};this.percentage=new Jf(a);this.addChild(this.percentage);this.equalLabel=new ea({text:"=",fontSize:16,align:T.LEFT,color:16742656});this.equalLabel.set_autoSize(ia.LEFT);this.disableTextField(this.equalLabel);this.addChild(this.equalLabel);this.finalAmountLabel=new ea({text:K.string(this.item.finalAmount),fontSize:18,align:T.RIGHT,color:16742656});this.finalAmountLabel.set_autoSize(ia.RIGHT);this.finalAmountLabel.set_selectable(!1);this.finalAmountLabel.mouseEnabled=!1;this.addChild(this.finalAmountLabel);a.labelOptions.fontSize=14;a.labelWidth=100;a.labelOptions.color=0;a.labelOptions.text=this._payModel.getCurrencyCode()+" "+
K.string(this.item.price);a.backgroundColor=c;this.price=new Jf(a);this.addChild(this.price);this.currencyIcon=new Q(h.get_assets().getTexture("currency_icon").get_bitmapData());this.addChild(this.currencyIcon);this.buy=new Yg(E.text("menu_shop_buy"),80,this.maxHeight);this.addChild(this.buy);this.useHandCursor=this.buttonMode=!0;this.addEventListener(F.CLICK,k(this,this.onClick));this.addEventListener(F.MOUSE_OVER,k(this,this.onRollIOverItem));this.addEventListener(F.MOUSE_OUT,k(this,this.onRollOutItem))},disableTextField:function(a){a.set_selectable(!1);a.mouseEnabled=!1},onRollOutItem:function(a){this.buy.set_currentState(this.buy.upState);this.background.set_alpha(1)},onRollIOverItem:function(a){this.buy.set_currentState(this.buy.overState);this.background.set_alpha(.5)},doLayout:function(){if(null!=this.stampIcon){for(;this.stampIcon.get_height()>this.maxHeight;)this.stampIcon.set_scaleX(function(a){a=a.stampIcon;return a.set_scaleY(a.get_scaleY()-.001)}(this));this.stampIcon.smoothing=!0;this.stampIcon.set_y((this.maxHeight-
this.stampIcon.get_height())/2);this.stampIcon.set_x(0);this.multiplierLabel.set_x((this.stampIcon.get_width()-this.multiplierLabel.get_width())/2+5);this.multiplierLabel.set_y((this.maxHeight-this.multiplierLabel.get_height())/2)}this.background.set_x(70);this.background.set_y(0);this.amountLabel.set_x(90);this.amountLabel.set_y((this.maxHeight-this.amountLabel.get_height())/2);this.percentage.set_x(this.maxWidth/3);this.percentage.set_y((this.maxHeight-this.percentage.get_height())/2);this.plusLabel.set_x(this.percentage.get_x()-
40);this.plusLabel.set_y((this.maxHeight-this.plusLabel.get_height())/2);this.equalLabel.set_x(this.percentage.get_x()+this.percentage.get_width()+20);this.equalLabel.set_y((this.maxHeight-this.equalLabel.get_height())/2);this.buy.set_x(this.background.get_x()+this.maxWidth-this.buy.get_width());this.price.set_x(this.buy.get_x()-this.price.get_width()-50);this.price.set_y((this.background.get_height()-this.price.get_height())/2);this.currencyIcon.set_x(this.price.get_x()-60);this.currencyIcon.set_y((this.maxHeight-
this.currencyIcon.get_height())/2);this.finalAmountLabel.set_x(this.currencyIcon.get_x()-this.finalAmountLabel.get_width()-5);this.finalAmountLabel.set_y((this.maxHeight-this.finalAmountLabel.get_height())/2)},__class__:Xg});var Zg=function(){};g["mc.system.IEntity"]=Zg;Zg.__name__=["mc","system","IEntity"];Zg.prototype={getId:null,onAddedToScene:null,onRemovedFromScene:null,addComponent:null,removeComponent:null,removeAllComponents:null,update:null,dispose:null,__class__:Zg};var id=function(a,b){null==
b&&(b=0);null==a&&(a=0);C.call(this);this._entity=new Ee;this.set_x(a);this.set_y(b)};g["mc.system.VisualEntity"]=id;id.__name__=["mc","system","VisualEntity"];id.__interfaces__=[Zg];id.__super__=C;id.prototype=t(C.prototype,{_entity:null,getId:function(){return this._entity.getId()},onAddedToScene:function(a){this._entity.onAddedToScene(a)},onRemovedFromScene:function(){this._entity.onRemovedFromScene()},addComponent:function(a){return this._entity.addComponent(a)},removeComponent:function(a){return this._entity.removeComponent(a)},removeAllComponents:function(){this._entity.removeAllComponents()},update:function(a){this._entity.update(a)},dispose:function(){this._entity.dispose()},__class__:id});var zd=function(){};g["mc.system.scene.IScene"]=zd;zd.__name__=["mc","system","scene","IScene"];zd.prototype={update:null,lateUpdate:null,dispose:null,onAdded:null,onRemoved:null,__class__:zd};var Wd=function(){id.call(this);this._entity.scene=this};g["mc.system.scene.Scene"]=Wd;Wd.__name__=["mc","system","scene","Scene"];Wd.__interfaces__=[zd];Wd.__super__=id;Wd.prototype=t(id.prototype,{dispose:function(){id.prototype.dispose.call(this)},update:function(a){id.prototype.update.call(this,a)},lateUpdate:function(){},onAdded:function(){},onRemoved:function(){this.dispose()},__class__:Wd});var da=function(){this.debugui=!1;this.allowDisableClose=!0;this.isLoading=!1;this.maxWidth=this.maxHeight=0;this._initialized=!1;Wd.call(this);this.addEventListener(v.ADDED_TO_STAGE,k(this,this.onAddedToStage))};g["mc.system.ui.View"]=da;da.__name__=["mc","system","ui","View"];da.__super__=Wd;da.prototype=t(Wd.prototype,{_initialized:null,caller:null,maxWidth:null,maxHeight:null,isLoading:null,allowDisableClose:null,debugui:null,disable:function(){},enable:function(){},resize:function(a,b){},open:function(a){},removeFromParent:function(){this.parent.removeChild(this)},updateView:function(){},onAddedToStage:function(a){this.removeEventListener(v.ADDED_TO_STAGE,k(this,this.onAddedToStage));this.addEventListener(v.REMOVED_FROM_STAGE,k(this,this.onRemovedFromStage));this._initialized||(this.initialize(),this._initialized=!0)},onRemovedFromStage:function(a){this.removeEventListener(v.REMOVED_FROM_STAGE,k(this,this.onRemovedFromStage));this.addEventListener(v.ADDED_TO_STAGE,k(this,this.onAddedToStage));this.deinitialize()},initialize:function(){this.debugui&&(this.get_graphics().beginFill(16711680,.5),this.get_graphics().drawRect(0,0,this.maxWidth,this.maxHeight),this.get_graphics().endFill())},deinitialize:function(){},dispose:function(){this.removeEventListener(v.REMOVED_FROM_STAGE,k(this,this.onRemovedFromStage));this.removeEventListener(v.ADDED_TO_STAGE,k(this,this.onAddedToStage))},__class__:da});var Fe=function(a){da.call(this);this.itemDataList=a;this.maxWidth=277;this.maxHeight=331;this.pricesContainerWidth=this.maxWidth-20;this.btnColors=[6349312,16742401];this.btnOverColors=[5622016,15166464];h.get_events().addEventListener("ShopEvent::DISABLE_CLOSED",k(this,this.onTooltipClose))};g["agario.module.shop.renderers.ShopBoostItem"]=Fe;Fe.__name__=["agario","module","shop","renderers","ShopBoostItem"];Fe.__super__=da;Fe.prototype=t(da.prototype,{itemIcon:null,title:null,background:null,buyOptionsContainer:null,hint:null,itemDataList:null,pricesContainerWidth:null,btnColors:null,btnOverColors:null,originalPosition:null,onTooltipClose:function(a){this.addChild(this.hint);this.hint.set_x(this.originalPosition.x);this.hint.set_y(this.originalPosition.y);this.hint.closeHint();h.get_events().dispatchEventWith("ShopEvent::ENABLE_SHOP");h.get_events().dispatchEventWith("shop_event::allow_disable_close",!1)},onRemovedFromStage:function(a){this.onTooltipClose();da.prototype.onRemovedFromStage.call(this,a);this._initialized=!1},initialize:function(){this.background=new Da;this.background.get_graphics().beginFill(16053492,1);this.background.get_graphics().drawRoundRect(0,0,this.maxWidth,this.maxHeight,5,5);this.background.get_graphics().endFill();this.addChild(this.background);this.title=new ea({text:E.text(this.itemDataList[0].category.title),fontSize:18,align:T.CENTER,bold:!0});this.addChild(this.title);this.title.set_width(this.maxWidth-20);this.title.mouseEnabled=!1;var a=E.text(this.itemDataList[0].category.description);this.hint=new $g(a,this.maxWidth-10|0,50,"left");this.addChild(this.hint);h.get_events().addEventListener("ShopEvent::SHOP_ENABLED",k(this,this.handleShopEnabled));this.hint.addEventListener(lc.CLOSED,k(this,this.onHintClosed));this.hint.addEventListener(lc.OPENED,k(this,this.onHintOpened));var a=h.get_assets().getAtlas("main_shop"),b=P.replace(this.itemDataList[0].category.image,".png","");this.itemIcon=new Q(a.getTexture(b).get_bitmapData());this.addChild(this.itemIcon);this.drawDynamicContent()},handleShopEnabled:function(a){h.get_events().dispatchEventWith("shop_event::allow_disable_close",!1);this.addChild(this.hint);this.hint.set_x(this.originalPosition.x);this.hint.set_y(this.originalPosition.y);this.hint.closeHint()},onHintOpened:function(a){h.get_events().dispatchEventWith("ShopEvent::DISABLE_SHOP");h.get_events().dispatchEventWith("shop_event::allow_disable_close",!0);a=this.localToGlobal(new Ea(this.hint.get_x(),this.hint.get_y()));this.hint.set_x(a.x);this.hint.set_y(a.y);this.stage.addChild(this.hint)},onHintClosed:function(a){this.addChild(this.hint);this.hint.set_x(this.originalPosition.x);this.hint.set_y(this.originalPosition.y);h.get_events().dispatchEventWith("ShopEvent::ENABLE_SHOP");h.get_events().dispatchEventWith("shop_event::allow_disable_close",!1)},drawDynamicContent:function(){this.buyOptionsContainer=new C;this.addChild(this.buyOptionsContainer);for(var a=0,b=0,c=0,d=this.itemDataList.length;c<d;){var e=c++,f=[this.itemDataList[e]],n=new C;this.buyOptionsContainer.addChild(n);if(0<a){var L=new Da;L.get_graphics().lineStyle(1,13421772,1);L.get_graphics().lineTo(this.pricesContainerWidth,0);n.addChild(L)}var g=new ea({text:E.text(f[0].title),align:T.CENTER});g.set_width(this.pricesContainerWidth);g.set_selectable(!1);n.addChild(g);g.set_x(.5*(this.pricesContainerWidth-g.get_width()));g.set_y(10);L=new Q(h.get_assets().getTexture("currency_icon").get_bitmapData());L=new rb({color:this.btnColors[a],overColor:this.btnOverColors[a],text:""+f[0].price,textColorOver:16777215,textColor:16777215,icon:L,w:140,h:40,fontSize:14,bold:!0});n.addChild(L);L.set_x(.5*(this.pricesContainerWidth-L.get_width()));L.set_y(g.get_y()+g.get_height()+5);L.data=h.models.shopBoostItems.getItemByPurchaseId(f[0].purchaseId);g=null;h.user.isGuest||(g=h.user.wallet.filter(function(a){return function(b){return b.productId==a[0].gameplayInfo.productId}}(f))[0]);null!=g&&0<g.get_balance()?(f=new ah(g.get_balance()),n.addChild(f),f.set_x(L.get_x()+L.get_width()),f.set_y(L.get_y()),0==this.itemDataList[e].get_inUse()?(L.hideIcon(),L.set_text(E.text("menu_shop_use")),L.addEventListener(F.CLICK,k(this,this.onUseClick))):L.addEventListener(F.CLICK,k(this,this.onClick))):L.addEventListener(F.CLICK,k(this,this.onClick));this.itemDataList[e].bestDealSticker&&(e=new bh(E.text("menu_shop_coins_best")),n.addChild(e),e.set_x(L.get_x()),e.set_y(L.get_y()));n.set_x(.5*(this.maxWidth-this.pricesContainerWidth));n.set_y(b+20*a);b+=25*a+n.get_height();a++}this.doLayout()},updateView:function(){for(da.prototype.updateView.call(this);0<this.buyOptionsContainer.get_numChildren();)this.buyOptionsContainer.removeChildAt(0);this.removeChild(this.buyOptionsContainer);this.drawDynamicContent()},onUseClick:function(a){a=a.currentTarget;a.set_enabled(!1);a=a.data;null!=a&&this.dispatchEvent(new qa("ShopEvent::USE",a))},onClick:function(a){a=a.currentTarget;a.set_enabled(!1);h.user.isGuest&&a.delayedEnable();a=a.data;null!=a&&this.dispatchEvent(new qa("ShopEvent::BUY",a))},doLayout:function(){this.hint.set_x(this.maxWidth-this.hint.get_width()-10);this.hint.set_y(10);this.originalPosition=new Ea(this.hint.get_x(),this.hint.get_y());this.title.set_x(10);this.title.set_y(10);this.itemIcon.set_x(.5*(this.maxWidth-this.itemIcon.get_width()));this.itemIcon.set_y(80);this.buyOptionsContainer.set_y(this.itemIcon.get_y()+this.itemIcon.get_height()+10)},dispose:function(){h.get_events().removeEventListener("ShopEvent::SHOP_ENABLED",k(this,this.handleShopEnabled));h.get_events().removeEventListener("ShopEvent::DISABLE_CLOSED",k(this,this.onTooltipClose));this.hint.removeEventListener(lc.CLOSED,k(this,this.onHintClosed));this.hint.removeEventListener(lc.OPENED,k(this,this.onHintOpened));da.prototype.dispose.call(this)},__class__:Fe});var ch=function(a,b,c,d){var e=new C;this.sectionFace=new Q(b);this.sectionFace.smoothing=!0;e.addChild(this.sectionFace);this.normalSubtitleArea=new Da;this.normalSubtitleArea.get_graphics().beginFill(c,.8);this.normalSubtitleArea.get_graphics().drawRoundRect(0,0,this.sectionFace.get_width(),this.sectionFace.get_height()/5,5,5);this.normalSubtitleArea.get_graphics().endFill();e.addChild(this.normalSubtitleArea);this.overSubtitleArea=new Da;this.overSubtitleArea.get_graphics().beginFill(c,1);this.overSubtitleArea.get_graphics().drawRoundRect(0,0,this.sectionFace.get_width(),this.sectionFace.get_height()/5,5,5);this.overSubtitleArea.get_graphics().endFill();e.addChild(this.overSubtitleArea);this.overSubtitleArea.set_visible(!1);
this.normalSubtitleArea.set_y(this.overSubtitleArea.set_y(this.sectionFace.get_height()-this.normalSubtitleArea.get_height()));b=new jd(h.get_fontName(),23,0,!0);b.align=T.LEFT;this.subtitleText=new Ma;this.subtitleText.set_defaultTextFormat(b);this.subtitleText.set_text(a);this.subtitleText.set_height(this.subtitleText.get_textHeight()+5);this.subtitleText.set_autoSize(ia.LEFT);this.subtitleText.set_textColor(d);this.subtitleText.set_x(.5*(this.sectionFace.get_width()-this.subtitleText.get_textWidth()));this.subtitleText.set_y(this.normalSubtitleArea.get_y()+.5*(this.normalSubtitleArea.get_height()-this.subtitleText.get_textHeight()));e.addChild(this.subtitleText);this.upState=this.downState=this.overState=e;la.call(this)};g["agario.module.shop.renderers.ShopSectionButton"]=ch;ch.__name__=["agario","module","shop","renderers","ShopSectionButton"];ch.__super__=la;ch.prototype=t(la.prototype,{sectionFace:null,subtitleText:null,normalSubtitleArea:null,overSubtitleArea:null,updateState:function(){la.prototype.updateState.call(this);this.mouseIsOver?(this.overSubtitleArea.set_visible(!0),this.normalSubtitleArea.set_visible(!1)):(this.overSubtitleArea.set_visible(!1),this.normalSubtitleArea.set_visible(!0))},__class__:ch});var dh=function(){da.call(this);this.set_name(E.text("menu_shop_coins_title"))};g["agario.module.shop.screens.ShopCoinsScreen"]=dh;dh.__name__=["agario","module","shop","screens","ShopCoinsScreen"];dh.__super__=da;dh.prototype=t(da.prototype,{initialize:function(){da.prototype.initialize.call(this);this.buildCoinShop()},sortByAmount:function(a,b){return a.finalAmount<b.finalAmount?1:a.finalAmount>b.finalAmount?-1:0},buildCoinShop:function(){var a=new da;a.set_y(30);a.set_x(15);this.addChild(a);h.models.shopCoins.shopCoinsList.sort(k(this,this.sortByAmount));for(var b=0,c=0,d=h.models.shopCoins.shopCoinsList;c<d.length;){var e=d[c];++c;"default"==e.visibility&&(e=new Xg(e),e.addEventListener("ShopEvent::BUY",k(this,this.onBuyClick)),a.addChild(e),e.maxWidth=645,e.maxHeight=60,e.set_y(70*b),e.render(),b++)}b=new Da;b.get_graphics().beginFill(16711680);rc.drawRoundRectComplex(b.get_graphics(),0,0,90,25,5,5,0,0);b.get_graphics().endFill();this.addChild(b);b.set_x(a.get_x()+215);b.set_y(a.get_y()-b.get_height());a=new ea({text:E.text("menu_shop_coins_free"),fontSize:16,align:T.CENTER,color:16777215});this.addChild(a);a.set_x(b.get_x()+(b.get_width()-a.get_width())/2);a.set_y(b.get_y())},onBuyClick:function(a){h.get_events().dispatchEventWith("ShopEvent::BUY",a.currentTarget.item.purchaseId)},__class__:dh});var kd=
function(){da.call(this)};g["agario.module.shop.screens.ShopGenericBoostScreen"]=kd;kd.__name__=["agario","module","shop","screens","ShopGenericBoostScreen"];kd.__super__=da;kd.prototype=t(da.prototype,{initialize:function(){da.prototype.initialize.call(this)},createBoostItems:function(a){for(var b=new Tb,c=0,d=a.length;c<d;){var e=c++,f=a[e].categoryPosition,n=b.h[f];null==n&&(n=[]);n.push(a[e]);b.h[f]=n}a=0;for(b=b.iterator();b.hasNext();)c=b.next(),c=new Fe(c),c.maxWidth=this.maxWidth/2-10,c.maxHeight=this.maxHeight-20,c.addEventListener("ShopEvent::BUY",k(this,this.onBuy)),c.addEventListener("ShopEvent::USE",k(this,this.onUse)),this.addChild(c),d=0,0<a&&(d=20),c.set_x(a*c.maxWidth+d),a++},onBuy:function(a){a=a.data;null!=a&&h.get_events().dispatchEventWith("ShopEvent::BUY",a.purchaseId)},onUse:function(a){a=a.data;null!=a&&h.get_events().dispatchEventWith("ShopEvent::USE",a)},updateView:function(){da.prototype.updateView.call(this);for(var a=0,b=this.get_numChildren();a<b;){var c=a++;K.is(this.getChildAt(c),Fe)&&y.__cast(this.getChildAt(c),Fe).updateView()}},onRemovedFromStage:function(a){da.prototype.onRemovedFromStage.call(this,a);this._initialized=!1},__class__:kd});var eh=function(){da.call(this);this.set_name(E.text("menu_main_shop"))};g["agario.module.shop.screens.ShopMainScreen"]=eh;eh.__name__=["agario","module","shop","screens","ShopMainScreen"];eh.__super__=da;eh.prototype=t(da.prototype,{coinsSectionBtn:null,skinsSectionBtn:null,massSectionBtn:null,xpSectionBtn:null,initialize:function(){da.prototype.initialize.call(this);var a=new C;this.addChild(a);var b=h.get_assets().getAtlas("main_shop");this.coinsSectionBtn=this.createSection(0,E.text("menu_shop_button_coins"),b.get("coins_button").get_bitmapData(),6349312,3572736);a.addChild(this.coinsSectionBtn);this.skinsSectionBtn=this.createSection(1,E.text("menu_shop_skins_title"),b.get("skins_button").get_bitmapData(),16768001,12285696);a.addChild(this.skinsSectionBtn);this.massSectionBtn=this.createSection(2,E.text("menu_shop_button_mass"),b.get("mass_button").get_bitmapData(),16742401,11286528);a.addChild(this.massSectionBtn);this.xpSectionBtn=this.createSection(3,E.text("menu_shop_button_boost"),b.get("xp_button").get_bitmapData(),57087,30889);a.addChild(this.xpSectionBtn);a.set_y(0);a.set_x(.5*(this.maxWidth-a.get_width()))},createSection:function(a,b,c,d,e){b=new ch(b,c,d,e);c=(this.maxWidth/2-20-10)/b.get_width();b.set_scaleX(b.set_scaleY(c));c=Math.floor(a/2);b.set_x(a%2*(b.get_width()+10));b.set_y(c*(b.get_height()+10));return b},dispose:function(){da.prototype.dispose.call(this)},
__class__:eh});var fh=function(){da.call(this);this.set_name(E.text("menu_shop_mass_title"))};g["agario.module.shop.screens.ShopMassScreen"]=fh;fh.__name__=["agario","module","shop","screens","ShopMassScreen"];fh.__super__=kd;fh.prototype=t(kd.prototype,{initialize:function(){kd.prototype.initialize.call(this);var a=h.models.shopBoostItems.getItemsByType(sc.MASS_BOOST);this.createBoostItems(a)},__class__:fh});var gh=function(){da.call(this);this.set_name(E.text("menu_shop_skins_title"))};g["agario.module.shop.screens.ShopSkinsScreen"]=gh;gh.__name__=["agario","module","shop","screens","ShopSkinsScreen"];gh.__super__=da;gh.prototype=t(da.prototype,{view:null,initialize:function(){this._initialized||(da.prototype.initialize.call(this),this.view=new hh,this.view.maxWidth=this.maxWidth,this.view.maxHeight=this.maxHeight,this.addChild(this.view))},updateView:function(){null!=this.view&&this.view.updateView()},showTab:function(a){null!=this.view&&(this.view.openTab(a),this.view.resetContent())},__class__:gh});var ih=function(){da.call(this);this.set_name(E.text("menu_shop_button_boost"))};g["agario.module.shop.screens.ShopXPScreen"]=ih;ih.__name__=["agario","module","shop","screens","ShopXPScreen"];ih.__super__=kd;ih.prototype=t(kd.prototype,{initialize:function(){kd.prototype.initialize.call(this);var a=h.models.shopBoostItems.getItemsByType(sc.XP_BOOST);this.createBoostItems(a)},__class__:ih});var X=function(){this.animate=!1;da.call(this);this.onClose=new Cb};g["mc.system.ui.views.GenericDialog"]=X;X.__name__=["mc","system","ui","views","GenericDialog"];X.__super__=da;X.prototype=t(da.prototype,{animate:null,disableShape:null,container:null,background:null,closeButton:null,loadingLabel:null,onClose:null,initialize:function(){this.container=new C;this.resizeBackground(this.maxWidth,this.maxHeight);this.container.addChild(this.background);this.closeButton=new jh;this.container.addChild(this.closeButton);this.closeButton.set_x(this.maxWidth-this.closeButton.get_width()-8);this.closeButton.set_y(8);this.closeButton.addEventListener(F.CLICK,k(this,this.onCloseButtonClick));this.container.set_visible(!1);da.prototype.addChild.call(this,this.container);this.disableShape=new C;this.disableShape.get_graphics().clear();this.disableShape.get_graphics().beginFill(0,.4);this.disableShape.get_graphics().drawRoundRect(0,0,this.maxWidth,this.maxHeight,20,20);this.disableShape.get_graphics().endFill();this.disableShape.addEventListener(F.CLICK,k(this,this.onDisableClick));this.disableShape.set_visible(!1);da.prototype.addChild.call(this,this.disableShape)},resizeBackground:function(a,b,c,d){null==c&&(c=!1);null==this.background&&(this.background=new C);if(c)ga.update(k(this,this.resizeLoop),.5,[this.get_width(),this.get_height()],[a,b]).onComplete(function(){null!=d&&d()});else this.background.get_graphics().clear(),this.background.get_graphics().beginFill(16777215,1),this.background.get_graphics().drawRoundRect(0,0,a,b,20,20),this.background.get_graphics().endFill(),this.resize(h.stage.stageWidth,h.stage.stageHeight),null!=d&&d()},resizeLoop:function(a,b){null==this.background&&(this.background=new C);this.background.get_graphics().clear();this.background.get_graphics().beginFill(16777215,1);this.background.get_graphics().drawRoundRect(0,0,a,b,20,20);this.background.get_graphics().endFill();this.maxWidth=this.background.get_width();this.maxHeight=this.background.get_height();this.resize(h.stage.stageWidth,h.stage.stageHeight)},dispose:function(){this.onClose.removeAll();this.closeButton.removeEventListener(F.CLICK,k(this,this.onCloseButtonClick));this.disableShape.removeEventListener(F.CLICK,k(this,this.onDisableClick));this.closeButton.dispose();da.prototype.dispose.call(this)},enable:function(){this.disableShape.set_visible(!1);da.prototype.enable.call(this)},disable:function(){this.addChild(this.closeButton);this.disableShape.set_visible(!0);da.prototype.disable.call(this)},onDisableClick:function(a){this.allowDisableClose&&(kb.events.dispatchEventWith("ShopEvent::DISABLE_CLOSED"),this.enable())},open:function(a){null==a&&(a=!1);a?(this.container.set_y(-this.container.get_height()),this.container.set_visible(!0),this.container.set_alpha(0),ga.tween(this.container,1,{y:0,alpha:1}).onComplete(k(this,this.dialogReady)),this.set_visible(!0)):(this.container.set_visible(!0),this.dialogReady());this.onShow()},dialogReady:function(){},onShow:function(){},onHide:function(){},close:function(a){this.deinitialize();this.onClose.dispatch();this.onHide();this.dispatchEvent(new fb(X.CLOSE,this))},onCloseButtonClick:function(a){h.get_events().dispatchEventWith("ShopEvent::ENABLE_SHOP");this.close()},removeChild:function(a){return this.container.contains(a)?this.container.removeChild(a):da.prototype.removeChild.call(this,a)},contains:function(a){return null!=this.container&&this.container.contains(a)?!0:da.prototype.contains.call(this,a)},addChild:function(a){return this.container.addChild(a)},showLoading:function(a){null==a&&(a="Loading...");null==this.loadingLabel&&(this.loadingLabel=new ea({text:a,fontSize:28,bold:!0}),this.loadingLabel.set_x((this.maxWidth-this.loadingLabel.get_width())/2),
this.loadingLabel.set_y((this.maxHeight-this.loadingLabel.get_height())/2),this.loadingLabel.set_alpha(0));this.loadingLabel.set_visible(!0);this.addChild(this.loadingLabel);ga.tween(this.loadingLabel,.5,{alpha:1});this.closeButton.set_visible(!1)},hideLoading:function(){var a=this;if(null!=this.loadingLabel)ga.tween(this.loadingLabel,.5,{alpha:0}).onComplete(function(){a.removeChild(a.loadingLabel)});this.closeButton.set_visible(!0)},resize:function(a,b){this.set_x(.5*(a-this.maxWidth));this.set_y(.5*
(b-this.maxHeight))},__class__:X});var Ya=function(a,b,c,d,e,f){null==e&&(e="");null==d&&(d="");null==c&&(c="");null==b&&(b="");null==a&&(a="");X.call(this);this.set_bottomText(e);this.set_titleText(a);this.set_subtitleText(d);this.itemName=b;this.itemDescription=c;this.productImage=f;this.maxWidth=420;this.maxHeight=240};g["agario.module.shop.view.ProductActionDialog"]=Ya;Ya.__name__=["agario","module","shop","view","ProductActionDialog"];Ya.__super__=X;Ya.prototype=t(X.prototype,{title:null,subtitle:null,productImage:null,productBackground:null,bottomLabel:null,productDurationLabel:null,itemName:null,itemDescription:null,subtitleText:null,get_subtitleText:function(){return this.subtitleText},set_subtitleText:function(a){null!=this.subtitle&&this.subtitle.set_text(a);return this.subtitleText=a},titleText:null,get_titleText:function(){return this.titleText},set_titleText:function(a){null!=this.title&&this.title.set_text(a);return this.titleText=a},bottomText:null,get_bottomText:function(){return this.bottomText},set_bottomText:function(a){null!=this.bottomLabel&&this.bottomLabel.set_text(a);return this.bottomText=a},draw:function(){null==this.productBackground&&(this.productBackground=new Da,this.addChild(this.productBackground));null==this.subtitle&&(this.subtitle=new ea({text:"+",fontSize:18,align:T.CENTER,bold:!0}),this.subtitle.set_autoSize(ia.CENTER),this.addChild(this.subtitle));this.subtitle.set_text(this.get_subtitleText());if(null!=this.productImage){var a=new C;a.addChild(this.productImage);this.addChild(a)}null==this.productDurationLabel&&(this.productDurationLabel=new ea({text:this.itemDescription,fontSize:16,align:T.CENTER}),this.productDurationLabel.set_autoSize(ia.CENTER),this.addChild(this.productDurationLabel));this.productDurationLabel.set_text(this.itemDescription);null==this.bottomLabel&&(this.bottomLabel=new ea({text:"+",fontSize:14,align:T.CENTER}),this.bottomLabel.set_multiline(!0),this.bottomLabel.set_height(50),this.addChild(this.bottomLabel));this.bottomLabel.set_text(this.get_bottomText());this.doLayout()},onData:function(a){this.closeButton.set_enabled(!0);this.resizeBackground(this.maxWidth,this.maxHeight,!0,k(this,this.onDataReady))},onDataReady:function(){},initialize:function(){X.prototype.initialize.call(this);this.title=new ea({text:"+",fontSize:28,align:T.CENTER,bold:!0});this.title.set_text(this.get_titleText());this.title.set_autoSize(ia.CENTER);this.addChild(this.title);this.closeButton.set_enabled(!1)},doLayout:function(){this.title.set_x((this.maxWidth-this.title.get_width())/
2);this.title.set_y(20);this.subtitle.set_x((this.maxWidth-this.subtitle.get_width())/2);this.subtitle.set_y(this.title.get_y()+this.title.get_height()+10);null!=this.productImage&&(this.productBackground.get_graphics().beginFill(16053492,1),this.productBackground.get_graphics().drawRoundRect(0,0,this.maxWidth-40,this.productImage.get_height()+70,5,5),this.productBackground.get_graphics().endFill(),this.productBackground.set_x((this.maxWidth-this.productBackground.get_width())/2),this.productBackground.set_y(this.subtitle.get_y()+
this.subtitle.get_height()+20),this.productImage.set_y(this.productBackground.get_y()+20),this.productImage.set_x((this.maxWidth-this.productImage.get_width())/2),this.productDurationLabel.set_x((this.maxWidth-this.productDurationLabel.get_width())/2),this.productDurationLabel.set_y(this.productImage.get_y()+this.productImage.get_height()+10));this.bottomLabel.set_x((this.maxWidth-this.bottomLabel.get_width())/2);this.bottomLabel.set_y(this.productBackground.get_y()+this.productBackground.get_height()+
10)},resize:function(a,b){this.set_x(.5*(a-this.maxWidth));this.set_y(.5*(b-this.maxHeight))},__class__:Ya,__properties__:t(X.prototype.__properties__,{set_bottomText:"set_bottomText",get_bottomText:"get_bottomText",set_titleText:"set_titleText",get_titleText:"get_titleText",set_subtitleText:"set_subtitleText",get_subtitleText:"get_subtitleText"})});var kh=function(a){Ya.call(this)};g["agario.module.shop.view.ProductUseDialog"]=kh;kh.__name__=["agario","module","shop","view","ProductUseDialog"];kh.__super__=Ya;kh.prototype=t(Ya.prototype,{item:null,initialize:function(){Ya.prototype.initialize.call(this);this.isLoading=!0;this.showLoading("Processing Transaction...");this.title.set_x((this.maxWidth-this.title.get_width())/2);this.title.set_y((this.maxHeight-this.title.get_height())/2);h.get_events().addEventListener("ShopEvent::useProductResponse",k(this,this.onData));h.get_events().addEventListener("ShopEvent::useProductFailed",k(this,this.onError));h.get_events().addEventListener("ShopEvent::DISABLE_CLOSED",
k(this,this.onCloseButtonClick))},onError:function(a){this.hideLoading();this.closeButton.set_enabled(!0);this.set_titleText(E.text("transaction_error"))},onData:function(a){this.maxWidth=420;this.maxHeight=400;Ya.prototype.onData.call(this,a);this.item=a.data;this.itemName=this.item.name;this.itemDescription=this.item.description;this.hideLoading()},onDataReady:function(){this.isLoading=!1;Ya.prototype.onDataReady.call(this);this.set_titleText(E.text("menu_level_up_title"));this.drawData();this.doLayout()},drawData:function(){if(y.__instanceof(this.item,Oa))this.set_subtitleText(E.text("menu_skin_activation_subtitle")),this.set_bottomText(E.text("menu_skin_activation_info")),this.productImage=new xd({bitmap:y.__cast(this.item,Oa).gamePlayInfo.image,w:140,h:140,borderColor:y.__cast(this.item,Oa).gamePlayInfo.get_cellColor()});else if(y.__instanceof(this.item,Mb)){this.set_subtitleText(E.text("menu_boost_activation_subtitle"));this.set_bottomText(E.text("menu_boost_activation_info"));var a;a=y.__cast(this.item,Mb).category.image;a=P.replace(a,".png","");this.productImage=new Q(h.get_assets().getTexture(a).get_bitmapData());a=y.__cast(this.item,Mb).gameplayInfo.duration/60/60;this.itemDescription=1>=a?E.text("menu_shop_1_hour"):E.text("menu_shop_n_hour",{hours_value:null==a?"null":""+a})}this.draw()},dispose:function(){Ya.prototype.dispose.call(this);h.get_events().removeEventListener("ShopEvent::useProductResponse",k(this,this.onData))},__class__:kh});var Kf=function(){Ya.call(this)};g["agario.module.shop.view.PurchaseCompleteDialog"]=Kf;Kf.__name__=["agario","module","shop","view","PurchaseCompleteDialog"];Kf.__super__=Ya;Kf.prototype=t(Ya.prototype,{item:null,sm:null,initialize:function(){this.sm=na.getService(ue);Ya.prototype.initialize.call(this);this.isLoading=!0;this.showLoading("Processing transaction...");this.title.set_x((this.maxWidth-this.title.get_width())/2);this.title.set_y((this.maxHeight-this.title.get_height())/2);h.get_events().addEventListener("ShopEvent::softPurchaseComplete",k(this,this.onData));h.get_events().addEventListener("ShopEvent::INAPP_PURCHASE_COMPLETE",
k(this,this.onData));h.get_events().addEventListener("shopevent::soft_purchase_failed",k(this,this.onError));h.get_events().addEventListener("ShopEvent::DISABLE_CLOSED",k(this,this.onCloseButtonClick))},onError:function(a){this.hideLoading();this.closeButton.set_enabled(!0);this.set_titleText(E.text("transaction_error"))},onData:function(a){this.maxWidth=420;this.maxHeight=400;Ya.prototype.onData.call(this,a);this.item=a.data;this.itemName=this.item.name;this.itemDescription=this.item.description;this.hideLoading()},onDataReady:function(){Ya.prototype.onDataReady.call(this);this.isLoading=!1;this.set_titleText(E.text("menu_level_up_title"));this.drawData();this.createShareButtons();this.doLayout()},drawData:function(){if(y.__instanceof(this.item,De)){this.set_subtitleText(E.text("menu_purchase_coins_awarded"));var a=h.models.shopPurchasesModel.getInappPurchaseByPurchaseId(this.item.purchaseId);this.itemName=E.text(a.localizedName);this.itemDescription=y.__cast(this.item,De).finalAmount+" "+
E.text("menu_shop_coins_title");this.productImage=new Q(h.get_assets().getTexture("giant_coin").get_bitmapData())}else y.__instanceof(this.item,Oa)?(a=this.item,this.item.name=a.get_title(),this.set_subtitleText(" "),a=P.replace(a.gamePlayInfo.image,".png",""),this.productImage=new xd({bitmap:a,w:140,h:140,borderColor:y.__cast(this.item,Oa).gamePlayInfo.get_cellColor()}),this.itemDescription=this.item.name):y.__instanceof(this.item,Mb)&&(this.set_bottomText(E.text("menu_boost_activation_info")),this.set_subtitleText(E.text("menu_purchase_coins_awarded")),a=y.__cast(this.item,Mb).category.image,a=P.replace(a,".png",""),this.productImage=new Q(h.get_assets().getTexture(a).get_bitmapData()),a=y.__cast(this.item,Mb).gameplayInfo.duration/60/60,this.itemDescription=1==a?E.text("menu_shop_1_hour"):E.text("menu_shop_n_hour",{hours_value:null==a?"null":""+a}));this.draw()},createShareButtons:function(){y.__instanceof(this.item,Oa)&&(h.environment.authenticationProvider==pb.Google?this.createGoogleButton():this.createFbButton(),this.createTwitterButton())},createTwitterButton:function(){var a=this,b=new Q(h.get_assets().getTexture("twitter_icon").get_bitmapData()),b=new rb({color:110829,overColor:110829,text:E.text("social_share_tag"),textColorOver:16777215,textColor:16777215,icon:b,iconPosition:"left",iconPadding:25,w:140,h:35,fontSize:18,bold:!0});this.addChild(b);b.addEventListener(F.CLICK,function(b){a.sm.shareTwitter("fb_skinpurchase",[a.item.name])});b.set_x(this.get_width()-b.get_width()-60);b.set_y(this.bottomLabel.get_y()+this.bottomLabel.get_height()+
10)},createGoogleButton:function(){var a=this,b=new Q(h.get_assets().getTexture("gplus_icon").get_bitmapData()),b=new rb({color:14699578,overColor:14699578,text:E.text("social_share_tag"),textColorOver:16777215,textColor:16777215,icon:b,iconPosition:"left",iconPadding:25,w:140,h:35,fontSize:18,bold:!0});this.addChild(b);b.addEventListener(F.CLICK,function(b){a.sm.shareGoogle("fb_skinpurchase",["",a.item.name])});this.sm.prepareGoogleShare("fb_skinpurchase",["",this.item.name]);b.set_x(60);b.set_y(this.bottomLabel.get_y()+
this.bottomLabel.get_height()+10)},createFbButton:function(){var a=this,b=new Q(h.get_assets().getTexture("fb_icon").get_bitmapData()),b=new rb({color:3625371,overColor:3625371,text:E.text("social_share_tag"),textColorOver:16777215,textColor:16777215,icon:b,iconPosition:"left",iconPadding:25,w:140,h:35,fontSize:18,bold:!0});this.addChild(b);b.addEventListener(F.CLICK,function(b){b=y.__cast(a.item,Oa).gamePlayInfo.get_gamePlayImage();a.sm.shareFB("fb_skinpurchase",[a.item.name],b)});b.set_x(60);b.set_y(this.bottomLabel.get_y()+
this.bottomLabel.get_height()+10)},dispose:function(){Ya.prototype.dispose.call(this);h.get_events().removeEventListener("ShopEvent::softPurchaseComplete",k(this,this.onData));h.get_events().removeEventListener("ShopEvent::INAPP_PURCHASE_COMPLETE",k(this,this.onData));h.get_events().removeEventListener("ShopEvent::DISABLE_CLOSED",k(this,this.onCloseButtonClick));h.get_events().removeEventListener("shopevent::soft_purchase_failed",k(this,this.onError))},__class__:Kf});var hh=function(){this.currentPage=0;da.call(this)};g["agario.module.shop.view.ShopSkinsView"]=hh;hh.__name__=["agario","module","shop","view","ShopSkinsView"];hh.__super__=da;hh.prototype=t(da.prototype,{categoryTabs:null,tabSelected:null,skinListContainer:null,leftButton:null,rightButton:null,paginationController:null,ownedSkins:null,allSkins:null,availableSkins:null,currentPage:null,filteredSkins:null,initialize:function(){this._initialized||(da.prototype.initialize.call(this),this.allSkins=h.models.shopSkinsModel.skinList,this.ownedSkins=this.allSkins.filter(function(a){return 1==a.get_owned()}),this.availableSkins=this.allSkins.filter(function(a){return 0==a.get_owned()}),this.categoryTabs=new lh,this.categoryTabs.set_maxWidth(this.maxWidth),this.addChild(this.categoryTabs),this.updateTabs(),this.categoryTabs.onChange.add(k(this,this.onTabChange)),this.skinListContainer=new mh({w:624,h:370}),this.addChild(this.skinListContainer),this.leftButton=new Ef,this.addChild(this.leftButton),this.rightButton=new Ef,this.rightButton.anchorCenter(),this.rightButton.set_rotation(180),this.addChild(this.rightButton),this.leftButton.addEventListener(F.CLICK,k(this,this.onLeftButtonClick)),this.rightButton.addEventListener(F.CLICK,k(this,this.onRightButtonClick)),this.paginationController=new nh,this.paginationController.gotoFirstButton=new Dg,this.paginationController.gotoPreviousButton=new Fg,this.paginationController.gotoNextButton=new Gg,this.paginationController.gotoLastButton=new Eg,this.paginationController.paginationItemClass=Df,this.addChild(this.paginationController),this.skinListContainer.S_onChange.add(k(this,this.onSkinListChange)),this.paginationController.S_onChange.add(k(this,this.onPaginationControllerChange)),this.loadContent(),this.position())},position:function(){this.categoryTabs.set_x((this.maxWidth-this.categoryTabs.w)/2);this.categoryTabs.set_y(0);this.skinListContainer.set_x(Math.round(.5*(this.maxWidth-this.skinListContainer.w)));this.skinListContainer.set_y(Math.round(this.categoryTabs.get_y()+this.categoryTabs.get_height()+30));this.leftButton.set_x(this.skinListContainer.get_x()-
this.leftButton.get_width()-10);this.rightButton.set_x(this.skinListContainer.get_x()+this.skinListContainer.w+10);this.leftButton.set_y(this.skinListContainer.get_y()+.5*(280-this.leftButton.get_height()));this.rightButton.set_y(this.leftButton.get_y());this.paginationController.set_y(Math.round(this.maxHeight-this.paginationController.get_height()-10));this.paginationController.set_x(Math.round(.5*(this.maxWidth-this.paginationController.get_width())));return this},_update:function(){this.rightButton.set_enabled(this.skinListContainer.currentPage<this.skinListContainer.totalPages-1);this.leftButton.set_enabled(0<this.skinListContainer.currentPage);this.leftButton.set_alpha(1);this.rightButton.set_alpha(1);this.rightButton.get_enabled()||this.rightButton.set_alpha(.6);this.leftButton.get_enabled()||this.leftButton.set_alpha(.6);return this},updateTabs:function(){var a=this.categoryTabs.selectedId;this.categoryTabs.clear();for(var b=h.models.shopSkinsModel.getTabs(),c=0;c<b.length;){var d=b[c];++c;var e=new Cg(d.tabDescription,E.text(d.tabName));0<this.getSkinsByCategory(d.tabDescription).length&&this.categoryTabs.addTab(e)}this.categoryTabs.setTab(a)},getSkinsByCategory:function(a){switch(a.toUpperCase()){case"OWNED":return this.ownedSkins;case"VETERAN":return this.allSkins.filter(function(b){return b.tab.toUpperCase()==a.toUpperCase()});default:return this.availableSkins.filter(function(b){return-1!=b.tab.indexOf(a.toUpperCase())&&0==b.get_owned()&&b.isVisible})}},sortSkins:function(a,b){b.sort(function(a,b){return a.isReward||b.isReward?a.availableAtLevel>b.availableAtLevel?1:-1:a.price>b.price?1:-1});"des"==a&&b.reverse();"level"==a&&b.sort(function(a,b){return a.availableAtLevel>b.availableAtLevel?1:-1})},loadContent:function(){this.ownedSkins=this.allSkins.filter(function(a){return 1==a.get_owned()});this.filteredSkins=[];var a;a=this.categoryTabs.current.id.toUpperCase();a==E.text("skins_owned_tag").toUpperCase()?(this.filteredSkins=this.ownedSkins,this.sortSkins("des",this.filteredSkins),this.applyVeteranRule()):"VETERAN"==a.toUpperCase()?(this.filteredSkins=this.allSkins.filter(function(b){return b.tab==a}),this.sortSkins("level",this.filteredSkins)):(this.filteredSkins=this.allSkins.filter(function(b){return-1!=b.tab.toUpperCase().indexOf(a.toUpperCase())&&0==b.get_owned()&&b.isVisible}),this.sortSkins("asc",this.filteredSkins));this.skinListContainer.empty();for(var b,c=0,d=this.filteredSkins;c<d.length;){var e=d[c];++c;b=new Td({model:e});e.isReward&&(h.user.isGuest||!e.get_owned()&&e.availableAtLevel>h.user.userInfo.level)&&(b.showPrice=!1);this.skinListContainer.addItem(b);b.addEventListener("ShopEvent::USE",k(this,this.onUseClick));b.addEventListener("ShopEvent::UNEQUIP",k(this,this.onUnequip));b.addEventListener("ShopEvent::BUY",k(this,this.onBuyClick))}if(a.toUpperCase()==E.text("skins_owned_tag").toUpperCase()&&(b=this.skinListContainer.items.length%this.skinListContainer.itemsPerPage,0!=b))for(;0!=b;)this.addDummyElement(),b=this.skinListContainer.items.length%this.skinListContainer.itemsPerPage;this.skinListContainer.set_page(this.currentPage);this.onSkinListChange();this.position()},applyVeteranRule:function(){var a=this.filteredSkins.filter(function(a){return 0<a.availableAtLevel}),b=this.filteredSkins.filter(function(a){return-1==a.availableAtLevel});if(0<a.length){var c=a.splice(0,1)[0],b=b.concat(a);b.unshift(c)}this.filteredSkins=b},addDummyElement:function(){var a=new Oa({});a.set_title("");a.purchaseId="";a.gamePlayInfo=new Hf;a.gamePlayInfo.set_cellColor("0x56c0e0");a=new Td({model:a});a.addEventListener("ShopEvent::BUY",k(this,this.onBuyClick));this.skinListContainer.addItem(a)},onUnequip:function(a){h.get_events().dispatchEventWith("ShopEvent::UNEQUIP")},onBuyClick:function(a){a=a.currentTarget.item;""==a.purchaseId?(this.categoryTabs.setTab(0),this.loadContent()):h.get_events().dispatchEventWith("ShopEvent::BUY",a.purchaseId)},onUseClick:function(a){h.get_events().dispatchEventWith("ShopEvent::USE",y.__cast(a.currentTarget.item,Oa))},onPaginationControllerChange:function(){this.skinListContainer.set_page(this.paginationController.currentPage);this._update()},onSkinListChange:function(){this.paginationController.set_totalPages(this.skinListContainer.totalPages);this.paginationController.set_currentPage(this.skinListContainer.currentPage);this._update()},onRightButtonClick:function(a){this.skinListContainer.next_page();this._update()},onLeftButtonClick:function(a){this.skinListContainer.previous_page();this._update()},onTabChange:function(a){this.currentPage=0;this.skinListContainer.currentPage=0;this.loadContent()},updateView:function(){this.currentPage=this.skinListContainer.currentPage;this.loadContent();this.updateTabs()},openTab:function(a){this.paginationController.set_currentPage(0);this.categoryTabs.setTabByName(a);this.loadContent();this.updateTabs()},resetContent:function(){this.paginationController.set_currentPage(0);this.currentPage=0;this.skinListContainer.set_page(0)},__class__:hh});var Lf=function(a,b){X.call(this);this.titleString=a;this.descriptionString=b;this.maxWidth=420;this.maxHeight=210};g["agario.module.shop.view.TextDialog"]=Lf;Lf.__name__=["agario","module","shop","view","TextDialog"];Lf.__super__=X;Lf.prototype=t(X.prototype,{title:null,description:null,descriptionString:null,titleString:null,initialize:function(){X.prototype.initialize.call(this);this.title=new ea({text:"+",fontSize:24,align:T.CENTER,bold:!0});this.title.set_text(this.titleString);this.title.set_width(this.maxWidth);this.title.mouseEnabled=!1;this.addChild(this.title);this.description=new ea({text:"+",fontSize:14,align:T.CENTER,bold:!0});this.description.set_text(this.descriptionString);this.description.set_width(this.maxWidth);this.addChild(this.description);this.doLayout()},doLayout:function(){this.title.set_y(15);this.description.set_y((this.maxHeight-this.description.get_height())/2)},__class__:Lf});var oh=function(a){null==a&&(a=!0);this.timeLeft=-1;this.showVideoOffers=!1;Ya.call(this);this.productImage=new Q(h.get_assets().getTexture("giant_coin").get_bitmapData(),$a.AUTO,!0);this.productImage.set_scaleX(this.productImage.set_scaleY(.8));this.set_subtitleText(" ");this.set_bottomText("");
this.showVideoOffers=a};g["agario.module.user.view.FreeCoinsCollectDialog"]=oh;oh.__name__=["agario","module","user","view","FreeCoinsCollectDialog"];oh.__super__=Ya;oh.prototype=t(Ya.prototype,{showVideoOffers:null,videoBtn:null,hasEngagement:null,timeLeft:null,centerLabel:null,leftLabel:null,rightLabel:null,initialize:function(){Ya.prototype.initialize.call(this);this.maxWidth=420;this.hasEngagement=h.services.gameui.getUserEngagement();this.resizeBackground(this.maxWidth,this.maxHeight);this.isLoading=!0;this.showLoading("Processing transaction...");h.get_events().addEventListener("ShopEvent::freeCoinsResponse",k(this,this.onData))},onData:function(a){this.timeLeft=h.user.freeCoinTimeLeft();this.maxHeight=this.calculateDialogHeight();Ya.prototype.onData.call(this,a)},calculateDialogHeight:function(){var a=450;this.showVideoOffers&&this.hasEngagement||(a=335);0>=this.timeLeft&&(this.showVideoOffers&&this.hasEngagement||(a=360));return a},onDataReady:function(){Ya.prototype.onDataReady.call(this);this.isLoading=!1;this.closeButton.set_enabled(!0);0>this.timeLeft&&(this.timeLeft=h.user.freeCoinTimeLeft());this.maxHeight!=this.calculateDialogHeight()&&(this.maxHeight=this.calculateDialogHeight(),this.resizeBackground(this.maxWidth,this.maxHeight,!0));var a=h.models.getBonusById("hourlyBonus"),b=h.models.getBonusById("genericVideoAdReward");if(null==a||null==b)null==a&&null,null==b&&null,this.close();else{if(0<this.timeLeft)this.set_titleText(E.text("menu_hourly_title")),this.set_subtitleText(" "),this.showVideoOffers&&this.hasEngagement&&this.set_bottomText(E.text("free_coins_incentivise_video",[b.bonusQty]));else{this.set_titleText(E.text("menu_hourly_title_coins"));this.set_subtitleText("Welcome back, you have earned:");var c=E.text("menu_shop_1_hour");this.set_bottomText(E.text("menu_hourly_not_ready",[c,a.bonusQty]));this.showVideoOffers&&this.hasEngagement&&this.set_bottomText(this.get_bottomText()+(",\n"+E.text("free_coins_incentivise_video",[b.bonusQty])))}this.itemDescription="20 "+
E.text("menu_shop_coins_title");this.draw();0<this.timeLeft&&(this.leftLabel=new ea({text:E.text("menu_hourly_come_back_in"),fontSize:20,color:0,bold:!0}),this.centerLabel=new ea({text:"00m 00s",fontSize:24,color:16711680,bold:!0}),this.rightLabel=new ea({text:E.text("menu_hourly_to_earn"),fontSize:20,color:0,bold:!0}),this.addChild(this.leftLabel),this.addChild(this.centerLabel),this.addChild(this.rightLabel),a=Math.round(this.timeLeft/1E3),this.centerLabel.set_text(Math.floor(a/60)+"m "+(10<=a%60?"":"0")+a%60+"s"),this.startTimedEvents(),this.reArrange());this.hideLoading();this.showVideoOffers&&this.checkVideoStatus()}},checkVideoStatus:function(){if(this.hasEngagement){var a=new Q(h.get_assets().getTexture("freecoins_video").get_bitmapData());this.videoBtn=new rb({color:5880408,overColor:4294721,text:E.text("menu_main_free_coins"),textColorOver:16777215,textColor:16777215,icon:a,iconPadding:6,w:140,h:50,fontSize:14,bold:!0});this.addChild(this.videoBtn);this.videoBtn.set_x((this.maxWidth-
this.videoBtn.get_width())/2);this.videoBtn.set_y(this.maxHeight-this.videoBtn.get_height()-20);this.videoBtn.addEventListener(F.CLICK,k(this,this.onVideoClick))}},startTimedEvents:function(){var a=this,b=new kc(1E3);b.run=function(){var c=Math.round(a.timeLeft/1E3);a.centerLabel.set_text(Math.floor(c/60)+"m "+(10<=c%60?"":"0")+c%60+"s");a.timeLeft-=1E3;0>=c&&(b.stop(),a.onTimerComplete());a.reArrange()}},onTimerComplete:function(){this.set_subtitleText("Your coins are ready to be collected!");this.removeChild(this.leftLabel);
this.removeChild(this.centerLabel);this.removeChild(this.rightLabel)},reArrange:function(){this.leftLabel.set_x((this.maxWidth-(this.leftLabel.get_width()+this.centerLabel.get_width()+this.rightLabel.get_width()))/2);this.leftLabel.set_y(this.rightLabel.set_y(this.subtitle.get_y()));this.centerLabel.set_y(this.leftLabel.get_y()-4);this.centerLabel.set_x(this.leftLabel.get_x()+this.leftLabel.get_width()+4);this.rightLabel.set_x(this.centerLabel.get_x()+this.centerLabel.get_width()+5);this.productBackground.set_y(this.centerLabel.get_y()+
this.centerLabel.get_height()+10);this.productImage.set_y(this.productBackground.get_y()+20);this.productDurationLabel.set_x((this.maxWidth-this.productDurationLabel.get_width())/2);this.productDurationLabel.set_y(this.productImage.get_y()+this.productImage.get_height()+10);this.bottomLabel.set_x((this.maxWidth-this.bottomLabel.get_width())/2);this.bottomLabel.set_y(this.productBackground.get_y()+this.productBackground.get_height()+10)},onVideoClick:function(a){this.hasEngagement&&(h.services.gameui.openVideoAd(),
this.close())},__class__:oh});var sf=function(a,b,c){this.shouldEarnSkin=!1;X.call(this);this.currentLevel=c;this.previousLevel=b;this.deltaCoins=a;this.maxWidth=420;this.maxHeight=460;this.skinCellSize=150;this.shareStoryId="fb_levelup";this.shareData=[c];5<=b%5+(c-b)&&(a=h.models.shopSkinsModel.getLastRewardSkin(c),this.shouldEarnSkin=!0,this.shareStoryId="fb_skinunlock",this.shareData=[c,a.get_title()],this.nextSkinName=a.get_title())};g["agario.module.user.view.LevelUpDialog"]=sf;sf.__name__=["agario","module","user","view","LevelUpDialog"];sf.__super__=X;sf.prototype=t(X.prototype,{title:null,subtitle:null,levelIcon:null,grayArea:null,lvlLabel:null,rewardLabel:null,sm:null,deltaCoins:null,slotControl:null,previousLevel:null,nextSkinCell:null,nextSkinLabel:null,skinCellSize:null,ps:null,renderer:null,starContainer:null,tempLevel:null,currentLevel:null,shouldEarnSkin:null,shareStoryId:null,shareData:null,nextSkinName:null,initialize:function(){X.prototype.initialize.call(this);this.tempLevel=this.previousLevel;this.sm=na.getService(ue);this.title=new ea({text:"+",fontSize:32,align:T.CENTER,bold:!0});this.title.set_text(E.text("menu_level_up_title"));this.title.set_autoSize(ia.CENTER);this.addChild(this.title);this.subtitle=new ea({text:"+",fontSize:24,align:T.CENTER,bold:!0});this.subtitle.set_text(E.text("menu_level_up_subtitle"));this.subtitle.set_autoSize(ia.CENTER);this.addChild(this.subtitle);this.grayArea=new C;this.grayArea.get_graphics().beginFill(16119285);rc.drawRoundRectComplex(this.grayArea.get_graphics(),1,1,this.maxWidth-40,230,8,0,8,0);this.grayArea.get_graphics().endFill();this.addChild(this.grayArea);this.starContainer=new C;this.addChild(this.starContainer);var a=new Q(h.get_assets().getTexture("Exp_Star").get_bitmapData(),$a.AUTO,!0);a.set_x(-a.get_width()/2);a.set_y(-a.get_height()/2);this.levelIcon=new C;this.levelIcon.addChild(a);this.starContainer.addChild(this.levelIcon);this.lvlLabel=new ea({text:""+this.tempLevel,fontSize:32,align:T.CENTER,bold:!0,width:this.maxWidth});this.addChild(this.lvlLabel);
a=new Q(h.get_assets().getTexture("currency_icon").get_bitmapData());this.rewardLabel=new yd({text:"+",fontSize:16,align:T.LEFT,bold:!0},a,"right",2);this.slotControl=new xe(5,0);this.slotControl.S_slotFilled.add(k(this,this.onSlotFilled));this.slotControl.S_slotsFull.add(k(this,this.onSkinEarn));this.addChild(this.slotControl);for(var a=0,b=this.previousLevel%5;a<b;)a++,this.slotControl.setSlotActive();a=h.models.shopSkinsModel.getNextRewardSkin(this.tempLevel);null!=a&&(this.nextSkinCell=new xd({bitmap:y.__cast(a,Oa).gamePlayInfo.image,w:this.skinCellSize,h:this.skinCellSize,borderColor:y.__cast(a,Oa).gamePlayInfo.get_cellColor(),borderSize:6}),this.addChild(this.nextSkinCell),this.nextSkinCell.set_scaleX(this.nextSkinCell.set_scaleY(.2)),this.nextSkinLabel=new ea({text:E.text("menu_level_up_next_skin",[a.availableAtLevel]),fontSize:16,align:T.LEFT,bold:!0}),this.addChild(this.nextSkinLabel));this.rewardLabel.set_text(E.text("menu_level_up_reward",[this.deltaCoins]));this.addChild(this.rewardLabel);this.doLayout();this.renderer=new Mf;this.addChild(this.renderer);this.ps=Ge.load("particle/LevelUpSlotBar-ipadhd.plist");this.renderer.addParticleSystem(this.ps)},onSlotFilled:function(a){this.explodeStar();this.ps.emit(this.slotControl.get_x()+20*a+5,this.slotControl.get_y()+15);this.tempLevel++;this.lvlLabel.set_text(""+this.tempLevel)},dialogReady:function(){this.animateDialog()},doLayout:function(){this.title.set_x((this.maxWidth-this.title.get_width())/2);this.title.set_y(10);this.subtitle.set_x((this.maxWidth-
this.subtitle.get_width())/2);this.subtitle.set_y(this.title.get_y()+this.title.get_height()+5);this.grayArea.set_x(20);this.grayArea.set_y(this.subtitle.get_y()+this.subtitle.get_height()+10);this.levelIcon.set_x(this.grayArea.get_x()+this.grayArea.get_width()/2);this.levelIcon.set_alpha(0);this.lvlLabel.set_x(this.levelIcon.get_x()-this.lvlLabel.get_width()/2);this.lvlLabel.set_y(this.levelIcon.get_y()+this.levelIcon.get_height()/2-15);this.lvlLabel.set_visible(!1);this.rewardLabel.set_y(this.grayArea.get_y()+
this.grayArea.get_height()-30);this.rewardLabel.set_x(this.grayArea.get_x()+(this.grayArea.get_width()-this.rewardLabel.get_width())/2);this.slotControl.set_x(this.grayArea.get_x()+(this.grayArea.get_width()-this.slotControl.get_width())/2);this.slotControl.set_y(this.grayArea.get_y()+this.grayArea.get_height()+15);null!=this.nextSkinCell&&(this.nextSkinCell.set_y(this.slotControl.get_y()+(this.slotControl.get_height()-this.nextSkinCell.get_height())/2),this.nextSkinCell.set_x(this.slotControl.get_x()+
this.slotControl.get_width()+5),this.nextSkinLabel.set_y(this.slotControl.get_y()+this.slotControl.get_height()+10),this.nextSkinLabel.set_x(this.grayArea.get_x()+(this.grayArea.get_width()-this.nextSkinLabel.get_width())/2))},animateDialog:function(){this.levelIcon.set_y(this.grayArea.get_y());var a=this.grayArea.get_y()+this.grayArea.get_height()/2;ga.tween(this.levelIcon,1,{alpha:1,y:a}).ease(ph.get_easeOut()).onComplete(k(this,this.onAnimationComplete));ga.tween(this.levelIcon,.5,{scaleY:.8});
ga.tween(this.levelIcon,1,{scaleY:1},!1).delay(.3).ease(ph.get_easeOut());this.lvlLabel.set_x(this.levelIcon.get_x()-this.lvlLabel.get_width()/2);this.lvlLabel.set_y(a-15)},onSkinEarn:function(){var a=this;if(null!=this.nextSkinCell){this.slotControl.pauseProcess();this.subtitle.set_text(E.text("menu_level_up_subtitle_skin"));var b=this.grayArea.get_x()+(this.grayArea.get_width()-this.skinCellSize)/2,c=this.grayArea.get_y()+(this.grayArea.get_height()-this.skinCellSize)/2,b=(new nj).bezier(b,c,b+
140,(this.nextSkinCell.get_y()-c)/2,2);ga.motionPath(this.nextSkinCell,2,{x:b.get_x(),y:b.get_y()});ga.tween(this.nextSkinCell,2,{scaleX:1,scaleY:1});if(0==this.slotControl.get_hasFinished())ga.tween(this.nextSkinCell,1,{alpha:0}).delay(3).onComplete(function(){ga.tween(a.starContainer,.5,{alpha:1});ga.tween(a.lvlLabel,.5,{alpha:1});a.slotControl.resumeProcess()});b=h.models.shopSkinsModel.getNextRewardSkin(this.tempLevel);null!=b&&(this.nextSkinCell=new xd({bitmap:y.__cast(b,Oa).gamePlayInfo.image,
w:this.skinCellSize,h:this.skinCellSize,borderColor:y.__cast(b,Oa).gamePlayInfo.get_cellColor(),borderSize:6}),this.addChild(this.nextSkinCell),this.nextSkinCell.set_scaleX(this.nextSkinCell.set_scaleY(.2)),this.nextSkinLabel.set_text(E.text("menu_level_up_next_skin",[b.availableAtLevel])),this.nextSkinCell.set_y(this.slotControl.get_y()+(this.slotControl.get_height()-this.nextSkinCell.get_height())/2),this.nextSkinCell.set_x(this.slotControl.get_x()+this.slotControl.get_width()+5));ga.tween(this.starContainer,
1,{alpha:0});ga.tween(this.lvlLabel,1,{alpha:0});h.services.shop.setSkin(h.models.shopSkinsModel.getNextRewardSkin(this.tempLevel-1).productIdToQuantify)}},onAnimationComplete:function(){this.explodeStar();for(var a=this.currentLevel-this.previousLevel,b=0;b<a;)b++,this.slotControl.addSlotToQueue();this.slotControl.process();this.lvlLabel.set_visible(!0);this.createShareButtons()},explodeStar:function(){for(var a=0;6>a;){a++;var b=new C,c=new Q(h.get_assets().getTexture("Exp_Star").get_bitmapData(),$a.AUTO,!0);c.set_x(-c.get_width()/2);c.set_y(-c.get_height()/2);b.addChild(c);b.set_alpha(.7);b.set_x(this.levelIcon.get_x());b.set_y(this.levelIcon.get_y());this.starContainer.addChild(b);c=.4*Math.random();ga.tween(b,1,{x:b.get_x()-120+200*Math.random(),y:b.get_y()-100*Math.random(),scaleX:c,scaleY:c,alpha:0})}},createShareButtons:function(){h.environment.authenticationProvider==pb.Google?this.createGoogleButton():this.createFbButton();this.createTwitterButton()},createTwitterButton:function(){var a=
this,b=new Q(h.get_assets().getTexture("twitter_icon").get_bitmapData()),b=new rb({color:110829,overColor:110829,text:E.text("social_share_tag"),textColorOver:16777215,textColor:16777215,icon:b,iconPosition:"left",iconPadding:25,w:140,h:35,fontSize:18,bold:!0});this.addChild(b);b.addEventListener(F.CLICK,function(b){a.sm.shareTwitter(a.shareStoryId,a.shareData)});b.set_x(this.maxWidth-b.get_width()-60);b.set_y(this.nextSkinLabel.get_y()+this.nextSkinLabel.get_height()+10)},createGoogleButton:function(){var a=this,b=new Q(h.get_assets().getTexture("gplus_icon").get_bitmapData()),b=new rb({color:14699578,overColor:14699578,text:E.text("social_share_tag"),textColorOver:16777215,textColor:16777215,icon:b,iconPosition:"left",iconPadding:25,w:140,h:35,fontSize:18,bold:!0});this.addChild(b);b.addEventListener(F.CLICK,function(b){a.sm.shareGoogle(a.shareStoryId,a.shareData)});this.sm.prepareGoogleShare(this.shareStoryId,this.shareData);b.set_x(60);b.set_y(this.nextSkinLabel.get_y()+this.nextSkinLabel.get_height()+
10)},createFbButton:function(){var a=this,b=new Q(h.get_assets().getTexture("fb_icon").get_bitmapData()),b=new rb({color:3625371,overColor:3625371,text:E.text("social_share_tag"),textColorOver:16777215,textColor:16777215,icon:b,iconPosition:"left",iconPadding:25,w:140,h:35,fontSize:18,bold:!0});this.addChild(b);b.addEventListener(F.CLICK,function(b){b=a.sm.getStoryById(a.shareStoryId);a.sm.directShareFB(a.shareStoryId,E.text(b.titleTag,[a.nextSkinName]),E.text(b.subtitleTag,[a.currentLevel]),E.text(b.descriptionTag))});b.set_x(60);b.set_y(this.nextSkinLabel.get_y()+this.nextSkinLabel.get_height()+10)},__class__:sf});var zg=function(){this.progressComponent=new C;this.currencyLabel=new yd({});this.profilePic=new Q;this.padding=20;this.playerName=new ea({});this.statsTitle=new ea({});X.call(this);this.maxWidth=620;this.maxHeight=420};g["agario.module.user.view.ProfileDialog"]=zg;zg.__name__=["agario","module","user","view","ProfileDialog"];zg.__super__=X;zg.prototype=t(X.prototype,{titleLabel:null,contents:null,rightColumn:null,statsTitle:null,playerName:null,padding:null,profilePic:null,currencyLabel:null,progressComponent:null,initialize:function(){X.prototype.initialize.call(this);this.contents=new C;this.addChild(this.contents);null!=h.user.userInfo&&""!=h.user.get_socialId()?this.displayUserInfo():(this.loadingLabel=new ea({text:"Loading your information...",fontSize:28,bold:!0}),this.addChild(this.loadingLabel),this.loadingLabel.set_x((this.maxWidth-this.loadingLabel.get_width())/2),this.loadingLabel.set_y((this.maxHeight-
this.loadingLabel.get_height())/2),h.user.onUserDataUpdate.add(k(this,this.displayUserInfo)))},displayUserInfo:function(){null!=h.user.userInfo&&""!=h.user.get_socialId()&&(h.user.onUserDataUpdate.remove(k(this,this.displayUserInfo)),null!=this.loadingLabel&&this.contains(this.loadingLabel)&&this.removeChild(this.loadingLabel),this.drawBackground(),this.drawTitle(),this.createUserProfile(),this.createStatsPanel(),this.doLayout())},createUserProfile:function(){var a=h.user.userInfo.displayName;if(null!=
a&&-1!=a.indexOf("_"))var b=a.lastIndexOf("_"),a=H.substr(a,0,b);this.playerName=new ea({text:a,fontSize:26,bold:!0,width:this.maxWidth/2-this.padding,align:T.CENTER,color:3421236});this.contents.addChild(this.playerName);a=Ua.formatNumber(h.user.get_coins(),"n"," ");b=new Q(h.get_assets().getTexture("currency_icon").get_bitmapData());this.currencyLabel=new yd({text:a,fontSize:16,align:T.LEFT,color:0,bold:!0},b,"right",2);this.contents.addChild(this.currencyLabel);this.progressComponent=this.getProgressBar();this.contents.addChild(this.progressComponent);Ra.fromFile(h.user.avatarUrl,k(this,this.onLoadProfilePic))},getProgressBar:function(){var a=new C,b=this.getBarProgressForXP(h.user.userInfo.xp,h.user.userInfo.level);a.addChild(b);b=new C;b.get_graphics().lineStyle(2,25606);b.get_graphics().beginFill(16777215,0);b.get_graphics().drawRoundRect(0,0,140,25,10,10);b.get_graphics().endFill();a.addChild(b);var c=new Q(h.get_assets().getTexture("Exp_Star").get_bitmapData(),$a.AUTO,!0);a.addChild(c);c.set_width(c.set_height(54));c.set_rotation(12);c.set_x(b.get_x()+b.get_width()-c.get_width()/2+4);c.set_y((b.get_height()-c.get_height())/2-8);var d=new ea({text:K.string(h.user.userInfo.level),bold:!0,color:3355443,width:46,fontSize:18,align:T.CENTER});a.addChild(d);d.set_x(c.get_x());d.set_y(-4);d.set_rotation(12);c=new ea({text:h.user.userInfo.xp+" / "+h.models.xpModel.getMaxXpForLevel(h.user.userInfo.level),fontSize:14,color:0,autoSize:ia.LEFT});a.addChild(c);c.set_x(b.get_x()+(b.get_width()-c.get_width())/2);c.set_y(b.get_y()+
b.get_height()+5);return a},createStatsPanel:function(){this.rightColumn=new C;this.statsTitle=new ea({text:E.text("menu_profile_player_stats"),fontSize:26,color:3421236});this.rightColumn.addChild(this.statsTitle);for(var a=[{key:E.text("menu_profile_total_games"),value:h.user.stats.gamesPlayed},{key:E.text("menu_profile_total_mass"),value:h.user.stats.massConsumed},{key:E.text("menu_profile_average_score"),value:h.user.stats.averageScore},{key:E.text("menu_profile_highest_score"),value:h.user.stats.highestMass},{key:E.text("menu_profile_longest_time"),value:this.formatTime(h.user.stats.longestTimeAlive)},{key:E.text("menu_profile_cells_eaten"),value:h.user.stats.mostCellsEaten}],b=0,c=a.length;b<c;){var d=b++,e=this.createRightColumnKeyValue(a[d].key,a[d].value);e.set_y(50+32*d);this.rightColumn.addChild(e)}this.contents.addChild(this.rightColumn)},formatTime:function(a){var b=a/60|0,c=b/60|0;return 0>=c?b+"m "+a%60+"s":c%60+"h "+b%60+"m "+a%60+"s"},getBarProgressForXP:function(a,b){var c=h.models.xpModel.getPercentage(a,b),d=new C,e=new Q(h.get_assets().getTexture("progress_striped").get_bitmapData());d.addChild(e);var f=new Da;f.get_graphics().lineStyle(2,25606);f.get_graphics().beginFill(26112,1);f.get_graphics().drawRoundRect(0,0,123.2*c,25,10,10);f.get_graphics().endFill();d.addChild(f);e.set_mask(f);return d},onLoadProfilePic:function(a){null!=a&&(this.profilePic=new Q(a),a=120/this.profilePic.get_width(),this.profilePic.set_scaleX(this.profilePic.set_scaleY(a)),this.profilePic.smoothing=!0,this.contents.addChild(this.profilePic),this.doLayout())},doLayout:function(){this.rightColumn.set_x(this.maxWidth/2+(this.maxWidth/2-this.padding-this.rightColumn.get_width())/2-this.padding);this.rightColumn.set_y(this.padding);this.contents.set_y(this.titleLabel.get_y()+this.titleLabel.get_height()+this.padding);this.contents.set_x((this.maxWidth-this.contents.get_width())/2);this.playerName.set_y(this.padding);this.profilePic.set_x((this.maxWidth/2-this.profilePic.get_width())/2-10);this.profilePic.set_y(this.playerName.get_y()+this.playerName.get_height()+
this.padding/2);this.currencyLabel.set_y(this.profilePic.get_y()+this.profilePic.get_height()+this.padding/2);this.currencyLabel.set_x(this.profilePic.get_x()+(this.profilePic.get_width()-this.currencyLabel.get_width())/2+5);this.progressComponent.set_x((this.maxWidth/2-this.progressComponent.get_width())/2);this.progressComponent.set_y(this.currencyLabel.get_y()+this.currencyLabel.get_height()+this.padding)},drawBackground:function(){var a=new Da;a.get_graphics().lineStyle(2,11316396,1,!0);a.get_graphics().beginFill(16777215);
a.get_graphics().drawRoundRect(0,0,this.maxWidth-2*this.padding,320,8,8);a.get_graphics().endFill();this.contents.addChild(a);var b=new C;b.get_graphics().beginFill(16119285);rc.drawRoundRectComplex(b.get_graphics(),1,1,(this.maxWidth-2*this.padding)/2,a.get_height()-4,8,0,8,0);b.get_graphics().endFill();this.contents.addChild(b)},drawTitle:function(){var a=new jd("Arial",30,0,!0);a.align=T.LEFT;this.titleLabel=new Ma;this.titleLabel.set_defaultTextFormat(a);this.titleLabel.set_text(E.text("menu_profile_title"));
this.titleLabel.set_width(this.maxWidth-this.padding);this.titleLabel.set_height(this.titleLabel.get_textHeight()+5);this.titleLabel.set_autoSize(ia.LEFT);this.titleLabel.set_selectable(!1);this.titleLabel.set_embedFonts(!1);this.titleLabel.set_textColor(5329233);this.addChild(this.titleLabel);this.titleLabel.set_x(.5*(this.maxWidth-this.titleLabel.get_textWidth()));this.titleLabel.set_y(this.padding)},createRightColumnKeyValue:function(a,b){"NaN"==(null==b?"null":""+b)&&(b="-");var c=new C,d=new ea({text:a,fontSize:12,autoSize:ia.LEFT}),e=new ea({text:null==b?"null":""+b,bold:!0,fontSize:14,autoSize:ia.LEFT});c.addChild(d);c.addChild(e);e.set_x(d.get_x()+d.get_width());e.set_y(d.get_y()-(e.get_height()-d.get_height())/2);return c},__class__:zg});var x=function(){};g["protohx.Message"]=x;x.__name__=["protohx","Message"];x.prototype={otherFields:null,mergeFrom:function(a){this.readFromSlice(new oj(new He(a,null,null)),0)},writeTo:function(a){var b=new pj;this.writeToBuffer(b);b.toNormal(a)},readFromSlice:function(a,
b){for(;a.buf.totlen-a.buf.pos>b;){var c=r.read__TYPE_UINT32(a);this.readUnknown(a,c)}},writeToBuffer:function(a){this.writeExtensionOrUnknownFields(a)},writeUnknown:function(a,b){if(0==b)throw new m(new B("Attemp to write an undefined string filed: "+K.string(Ga.toFloat(b))));l.writeUnknownPair(a,b,this.getByTag(b))},readUnknown:function(a,b){var c;switch(b&7){case 0:c=r.read__TYPE_UINT64(a);break;case 1:c=r.read__TYPE_FIXED64(a);break;case 2:c=r.read__TYPE_BYTES(a);break;case 5:c=r.read__TYPE_FIXED32(a);break;default:throw new m(new B("Invalid wire type: "+K.string(Ga.toFloat(b&7))));}var d=this.getByTag(b);null==d?this.setByTag(b,c):d instanceof Array&&null==d.__enum__?d.push(c):this.setByTag(b,[d,c])},getByTag:function(a){return null!=this.otherFields?this.otherFields.h[a]:null},setByTag:function(a,b){null==this.otherFields&&(this.otherFields=new Tb);this.otherFields.set(a,b)},defaultBytes:function(){return null},defaultUInt64:function(){return Ad.newUInt64(0,0)},writeExtensionOrUnknownFields:function(a){if(null!=this.otherFields)for(var b=this.otherFields.keys();b.hasNext();){var c=b.next();this.writeUnknown(a,c)}},__class__:x};var Ie=function(){this.set_productId("")};g["agario.proto.Activate_boost_request"]=Ie;Ie.__name__=["agario","proto","Activate_boost_request"];Ie.__super__=x;Ie.prototype=t(x.prototype,{productId:null,setProductId:function(a){this.set_productId(a);return this},set_productId:function(a){return this.productId=a},get_productId:function(){return this.productId},writeToBuffer:function(a){l.writeTag(a,2,1);l.write__TYPE_STRING(a,this.get_productId());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("productId",this.get_productId())},readFromSlice:function(a,b){for(var c=0;a.buf.totlen-a.buf.pos>b;){var d=r.read__TYPE_UINT32(a);switch(d>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Activate_boost_request.productId cannot be set twice."));++c;this.set_productId(r.read__TYPE_STRING(a));break;default:x.prototype.readUnknown.call(this,a,d)}}},__class__:Ie,__properties__:{set_productId:"set_productId",get_productId:"get_productId"}});var Je=function(){this.set_userBoostItem(new Xd);this.set_productUpdates([])};g["agario.proto.Activate_boost_response"]=Je;Je.__name__=["agario","proto","Activate_boost_response"];Je.__super__=x;Je.prototype=t(x.prototype,{userBoostItem:null,setUserBoostItem:function(a){this.set_userBoostItem(a);return this},set_userBoostItem:function(a){return this.userBoostItem=a},get_userBoostItem:function(){return this.userBoostItem},productUpdates:null,setProductUpdates:function(a){this.set_productUpdates(a);return this},set_productUpdates:function(a){return this.productUpdates=a},get_productUpdates:function(){return this.productUpdates},addProductUpdates:function(a){null==this.get_productUpdates()?this.set_productUpdates([a]):this.get_productUpdates().push(a)},writeToBuffer:function(a){l.writeTag(a,2,1);l.write__TYPE_MESSAGE(a,this.get_userBoostItem());if(null!=this.get_productUpdates())for(var b=0,c=this.get_productUpdates();b<c.length;){var d=c[b];++b;l.writeTag(a,2,2);l.write__TYPE_MESSAGE(a,d)}x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("userBoostItem",this.get_userBoostItem());null!=this.get_productUpdates()&&0<this.get_productUpdates().length&&a("productUpdates",this.get_productUpdates())},readFromSlice:function(a,b){for(var c=0;a.buf.totlen-a.buf.pos>b;){var d=r.read__TYPE_UINT32(a);switch(d>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Activate_boost_response.userBoostItem cannot be set twice."));++c;this.set_userBoostItem(new Xd);r.read__TYPE_MESSAGE(a,this.get_userBoostItem());break;case 2:null==this.get_productUpdates()&&this.set_productUpdates([]);this.get_productUpdates().push(r.read__TYPE_MESSAGE(a,new Pc));break;default:x.prototype.readUnknown.call(this,a,d)}}},__class__:Je,__properties__:{set_productUpdates:"set_productUpdates",get_productUpdates:"get_productUpdates",set_userBoostItem:"set_userBoostItem",get_userBoostItem:"get_userBoostItem"}});var Ke=function(){this.set_eventId("")};g["agario.proto.Activate_timed_event_request"]=Ke;Ke.__name__=["agario","proto","Activate_timed_event_request"];Ke.__super__=x;Ke.prototype=t(x.prototype,{eventId:null,setEventId:function(a){this.set_eventId(a);return this},set_eventId:function(a){return this.eventId=a},get_eventId:function(){return this.eventId},writeToBuffer:function(a){l.writeTag(a,2,1);l.write__TYPE_STRING(a,this.get_eventId());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("eventId",this.get_eventId())},readFromSlice:function(a,b){for(var c=0;a.buf.totlen-a.buf.pos>b;){var d=r.read__TYPE_UINT32(a);switch(d>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Activate_timed_event_request.eventId cannot be set twice."));++c;this.set_eventId(r.read__TYPE_STRING(a));break;default:x.prototype.readUnknown.call(this,a,d)}}},__class__:Ke,__properties__:{set_eventId:"set_eventId",get_eventId:"get_eventId"}});var qh=function(){this.set_userTimedEvent(new Ud);this.set_productUpdates([])};g["agario.proto.Activate_timed_event_response"]=qh;qh.__name__=["agario","proto","Activate_timed_event_response"];qh.__super__=x;qh.prototype=t(x.prototype,{userTimedEvent:null,setUserTimedEvent:function(a){this.set_userTimedEvent(a);return this},set_userTimedEvent:function(a){return this.userTimedEvent=a},get_userTimedEvent:function(){return this.userTimedEvent},productUpdates:null,setProductUpdates:function(a){this.set_productUpdates(a);return this},set_productUpdates:function(a){return this.productUpdates=a},get_productUpdates:function(){return this.productUpdates},addProductUpdates:function(a){null==this.get_productUpdates()?this.set_productUpdates([a]):this.get_productUpdates().push(a)},writeToBuffer:function(a){l.writeTag(a,2,1);l.write__TYPE_MESSAGE(a,this.get_userTimedEvent());if(null!=this.get_productUpdates())for(var b=0,c=this.get_productUpdates();b<c.length;){var d=c[b];++b;l.writeTag(a,2,2);l.write__TYPE_MESSAGE(a,d)}x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("userTimedEvent",this.get_userTimedEvent());null!=this.get_productUpdates()&&0<this.get_productUpdates().length&&a("productUpdates",this.get_productUpdates())},readFromSlice:function(a,b){for(var c=0;a.buf.totlen-a.buf.pos>b;){var d=r.read__TYPE_UINT32(a);switch(d>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Activate_timed_event_response.userTimedEvent cannot be set twice."));++c;this.set_userTimedEvent(new Ud);r.read__TYPE_MESSAGE(a,this.get_userTimedEvent());break;case 2:null==this.get_productUpdates()&&this.set_productUpdates([]);this.get_productUpdates().push(r.read__TYPE_MESSAGE(a,new Pc));break;default:x.prototype.readUnknown.call(this,a,d)}}},__class__:qh,__properties__:{set_productUpdates:"set_productUpdates",get_productUpdates:"get_productUpdates",set_userTimedEvent:"set_userTimedEvent",get_userTimedEvent:"get_userTimedEvent"}});var rh=function(){this.set_transactionId(this.defaultUInt64());this.set_receiptData("");this.set_purchaseToken("")};g["agario.proto.Apple_inapp_purchase_request"]=rh;rh.__name__=["agario","proto","Apple_inapp_purchase_request"];rh.__super__=x;rh.prototype=t(x.prototype,{transactionId:null,setTransactionId:function(a){this.set_transactionId(a);return this},set_transactionId:function(a){return this.transactionId=a},get_transactionId:function(){return this.transactionId},receiptData:null,setReceiptData:function(a){this.set_receiptData(a);return this},set_receiptData:function(a){return this.receiptData=a},get_receiptData:function(){return this.receiptData},purchaseToken:null,setPurchaseToken:function(a){this.set_purchaseToken(a);return this},set_purchaseToken:function(a){return this.purchaseToken=a},get_purchaseToken:function(){return this.purchaseToken},writeToBuffer:function(a){l.writeTag(a,0,1);l.write__TYPE_UINT64(a,this.get_transactionId());l.writeTag(a,2,2);l.write__TYPE_STRING(a,this.get_receiptData());l.writeTag(a,2,3);l.write__TYPE_STRING(a,this.get_purchaseToken());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("transactionId",this.get_transactionId());a("receiptData",this.get_receiptData());a("purchaseToken",this.get_purchaseToken())},readFromSlice:function(a,b){for(var c=0,d=0,e=0;a.buf.totlen-a.buf.pos>b;){var f=r.read__TYPE_UINT32(a);switch(f>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Apple_inapp_purchase_request.transactionId cannot be set twice."));++c;this.set_transactionId(r.read__TYPE_UINT64(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: Apple_inapp_purchase_request.receiptData cannot be set twice."));++d;this.set_receiptData(r.read__TYPE_STRING(a));break;case 3:if(0!=e)throw new m(new B("Bad data format: Apple_inapp_purchase_request.purchaseToken cannot be set twice."));++e;this.set_purchaseToken(r.read__TYPE_STRING(a));break;default:x.prototype.readUnknown.call(this,a,f)}}},__class__:rh,__properties__:{set_purchaseToken:"set_purchaseToken",get_purchaseToken:"get_purchaseToken",set_receiptData:"set_receiptData",get_receiptData:"get_receiptData",set_transactionId:"set_transactionId",get_transactionId:"get_transactionId"}});var sh=function(){this.set_orderId(0);this.set_appeared([]);this.set_changed([]);this.set_disappeared([]);this.set_died([])};g["agario.proto.Arena_state"]=sh;sh.__name__=["agario","proto","Arena_state"];sh.__super__=x;sh.prototype=t(x.prototype,{orderId:null,setOrderId:function(a){this.set_orderId(a);return this},set_orderId:function(a){return this.orderId=a},get_orderId:function(){return this.orderId},appeared:null,setAppeared:function(a){this.set_appeared(a);return this},set_appeared:function(a){return this.appeared=a},get_appeared:function(){return this.appeared},addAppeared:function(a){null==this.get_appeared()?this.set_appeared([a]):this.get_appeared().push(a)},changed:null,setChanged:function(a){this.set_changed(a);return this},set_changed:function(a){return this.changed=a},get_changed:function(){return this.changed},addChanged:function(a){null==this.get_changed()?this.set_changed([a]):this.get_changed().push(a)},disappeared:null,setDisappeared:function(a){this.set_disappeared(a);return this},set_disappeared:function(a){return this.disappeared=a},get_disappeared:function(){return this.disappeared},addDisappeared:function(a){null==this.get_disappeared()?this.set_disappeared([a]):this.get_disappeared().push(a)},died:null,setDied:function(a){this.set_died(a);return this},set_died:function(a){return this.died=a},get_died:function(){return this.died},addDied:function(a){null==this.get_died()?this.set_died([a]):this.get_died().push(a)},writeToBuffer:function(a){l.writeTag(a,0,1);l.write__TYPE_UINT32(a,this.get_orderId());if(null!=this.get_appeared())for(var b=0,c=this.get_appeared();b<c.length;){var d=c[b];++b;l.writeTag(a,2,2);l.write__TYPE_MESSAGE(a,d)}if(null!=this.get_changed())for(b=0,c=this.get_changed();b<c.length;)d=c[b],++b,l.writeTag(a,2,3),l.write__TYPE_MESSAGE(a,d);if(null!=this.get_disappeared())for(b=0,c=this.get_disappeared();b<c.length;)d=c[b],++b,l.writeTag(a,0,4),l.write__TYPE_UINT32(a,d);if(null!=this.get_died())for(b=0,c=this.get_died();b<c.length;)d=c[b],++b,l.writeTag(a,2,5),l.write__TYPE_MESSAGE(a,d);x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("orderId",this.get_orderId());null!=this.get_appeared()&&0<this.get_appeared().length&&a("appeared",this.get_appeared());null!=this.get_changed()&&0<this.get_changed().length&&a("changed",this.get_changed());null!=this.get_disappeared()&&0<this.get_disappeared().length&&a("disappeared",this.get_disappeared());null!=this.get_died()&&0<this.get_died().length&&a("died",this.get_died())},readFromSlice:function(a,b){for(var c=0;a.buf.totlen-a.buf.pos>b;){var d=r.read__TYPE_UINT32(a);switch(d>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Arena_state.orderId cannot be set twice."));++c;this.set_orderId(r.read__TYPE_UINT32(a));break;case 2:null==this.get_appeared()&&this.set_appeared([]);this.get_appeared().push(r.read__TYPE_MESSAGE(a,new Nf));break;case 3:null==this.get_changed()&&this.set_changed([]);this.get_changed().push(r.read__TYPE_MESSAGE(a,new Nf));break;case 4:null==this.get_disappeared()&&this.set_disappeared([]);var e=void 0,e=void 0,e=y.__cast(d&7,Nb);(e=2==e)?r.readPackedRepeated(a,r.read__TYPE_UINT32,this.get_disappeared()):this.get_disappeared().push(r.read__TYPE_UINT32(a));break;case 5:null==this.get_died()&&this.set_died([]);this.get_died().push(r.read__TYPE_MESSAGE(a,new th));break;default:x.prototype.readUnknown.call(this,a,d)}}},__class__:sh,__properties__:{set_died:"set_died",get_died:"get_died",set_disappeared:"set_disappeared",get_disappeared:"get_disappeared",set_changed:"set_changed",get_changed:"get_changed",set_appeared:"set_appeared",get_appeared:"get_appeared",set_orderId:"set_orderId",get_orderId:"get_orderId"}});var th=function(){this.set_id(0);this.set_killerId(0)};g["agario.proto.Cell_death"]=th;th.__name__=["agario","proto","Cell_death"];th.__super__=x;th.prototype=t(x.prototype,{id:null,setId:function(a){this.set_id(a);return this},set_id:function(a){return this.id=a},get_id:function(){return this.id},killerId:null,setKillerId:function(a){this.set_killerId(a);return this},set_killerId:function(a){return this.killerId=a},get_killerId:function(){return this.killerId},writeToBuffer:function(a){l.writeTag(a,0,1);l.write__TYPE_UINT32(a,this.get_id());l.writeTag(a,0,2);l.write__TYPE_UINT32(a,this.get_killerId());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("id",this.get_id());a("killerId",this.get_killerId())},readFromSlice:function(a,b){for(var c=0,d=0;a.buf.totlen-a.buf.pos>b;){var e=r.read__TYPE_UINT32(a);switch(e>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Cell_death.id cannot be set twice."));++c;this.set_id(r.read__TYPE_UINT32(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: Cell_death.killerId cannot be set twice."));++d;this.set_killerId(r.read__TYPE_UINT32(a));break;default:x.prototype.readUnknown.call(this,a,e)}}},__class__:th,__properties__:{set_killerId:"set_killerId",get_killerId:"get_killerId",set_id:"set_id",get_id:"get_id"}});var Nf=function(){this.hasField__0=0;this.set_type(0);this.set_id(0);this.set_x(0);this.set_y(0);this.set_radius(0)};g["agario.proto.Cell_state"]=Nf;Nf.__name__=["agario","proto","Cell_state"];Nf.__super__=x;Nf.prototype=t(x.prototype,{type:null,setType:function(a){this.set_type(a);return this},set_type:function(a){return this.type=a},get_type:function(){return this.type},id:null,setId:function(a){this.set_id(a);return this},set_id:function(a){return this.id=a},get_id:function(){return this.id},x:null,setX:function(a){this.set_x(a);return this},set_x:function(a){return this.x=a},get_x:function(){return this.x},y:null,setY:function(a){this.set_y(a);return this},set_y:function(a){return this.y=a},get_y:function(){return this.y},radius:null,setRadius:function(a){this.set_radius(a);return this},set_radius:function(a){return this.radius=a},get_radius:function(){return this.radius},name:null,setName:function(a){this.set_name(a);return this},clearName:function(){this.set_name(null)},hasName:function(){return null!=this.get_name()},set_name:function(a){return this.name=a},get_name:function(){return this.name},userLevel:null,setUserLevel:function(a){this.set_userLevel(a);return this},hasField__0:null,clearUserLevel:function(){this.hasField__0&=-2;this.set_userLevel(0)},hasUserLevel:function(){return 0!=(this.hasField__0&1)},set_userLevel:function(a){this.hasField__0|=1;return this.userLevel=a},get_userLevel:function(){return this.userLevel},skinGameplayId:null,setSkinGameplayId:function(a){this.set_skinGameplayId(a);return this},clearSkinGameplayId:function(){this.hasField__0&=-3;this.set_skinGameplayId(0)},hasSkinGameplayId:function(){return 0!=(this.hasField__0&2)},set_skinGameplayId:function(a){this.hasField__0|=2;return this.skinGameplayId=a},get_skinGameplayId:function(){return this.skinGameplayId},color:null,setColor:function(a){this.set_color(a);return this},clearColor:function(){this.hasField__0&=-5;this.set_color(0)},hasColor:function(){return 0!=(this.hasField__0&4)},set_color:function(a){this.hasField__0|=4;return this.color=a},get_color:function(){return this.color},playerOwned:null,setPlayerOwned:function(a){this.set_playerOwned(a);return this},clearPlayerOwned:function(){this.hasField__0&=-9;this.set_playerOwned(!1)},hasPlayerOwned:function(){return 0!=(this.hasField__0&8)},set_playerOwned:function(a){this.hasField__0|=8;return this.playerOwned=a},get_playerOwned:function(){return this.playerOwned},writeToBuffer:function(a){l.writeTag(a,0,1);l.write__TYPE_ENUM(a,this.get_type());l.writeTag(a,0,2);l.write__TYPE_UINT32(a,this.get_id());l.writeTag(a,5,3);l.write__TYPE_FLOAT(a,this.get_x());l.writeTag(a,5,4);l.write__TYPE_FLOAT(a,this.get_y());l.writeTag(a,5,5);l.write__TYPE_FLOAT(a,this.get_radius());null!=this.get_name()&&(l.writeTag(a,2,6),l.write__TYPE_STRING(a,this.get_name()));0!=(this.hasField__0&1)&&(l.writeTag(a,0,7),l.write__TYPE_UINT32(a,this.get_userLevel()));0!=(this.hasField__0&2)&&(l.writeTag(a,0,8),l.write__TYPE_UINT32(a,this.get_skinGameplayId()));0!=(this.hasField__0&4)&&(l.writeTag(a,0,9),l.write__TYPE_UINT32(a,this.get_color()));0!=(this.hasField__0&8)&&(l.writeTag(a,0,10),l.write__TYPE_BOOL(a,this.get_playerOwned()));x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("type",this.get_type());a("id",this.get_id());a("x",this.get_x());a("y",this.get_y());a("radius",this.get_radius());null!=this.get_name()&&a("name",this.get_name());0!=(this.hasField__0&1)&&a("userLevel",this.get_userLevel());0!=(this.hasField__0&2)&&a("skinGameplayId",this.get_skinGameplayId());0!=(this.hasField__0&4)&&a("color",this.get_color());0!=(this.hasField__0&8)&&a("playerOwned",this.get_playerOwned())},readFromSlice:function(a,b){for(var c=0,d=0,e=0,f=0,n=0,L=0,g=0,h=0,l=0,k=0;a.buf.totlen-a.buf.pos>b;){var w=r.read__TYPE_UINT32(a);switch(w>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Cell_state.type cannot be set twice."));++c;this.set_type(r.read__TYPE_ENUM(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: Cell_state.id cannot be set twice."));++d;this.set_id(r.read__TYPE_UINT32(a));break;case 3:if(0!=e)throw new m(new B("Bad data format: Cell_state.x cannot be set twice."));++e;this.set_x(r.read__TYPE_FLOAT(a));break;case 4:if(0!=f)throw new m(new B("Bad data format: Cell_state.y cannot be set twice."));++f;this.set_y(r.read__TYPE_FLOAT(a));break;case 5:if(0!=n)throw new m(new B("Bad data format: Cell_state.radius cannot be set twice."));++n;this.set_radius(r.read__TYPE_FLOAT(a));break;case 6:if(0!=L)throw new m(new B("Bad data format: Cell_state.name cannot be set twice."));++L;this.set_name(r.read__TYPE_STRING(a));break;case 7:if(0!=g)throw new m(new B("Bad data format: Cell_state.userLevel cannot be set twice."));++g;this.set_userLevel(r.read__TYPE_UINT32(a));break;case 8:if(0!=h)throw new m(new B("Bad data format: Cell_state.skinGameplayId cannot be set twice."));++h;this.set_skinGameplayId(r.read__TYPE_UINT32(a));break;case 9:if(0!=l)throw new m(new B("Bad data format: Cell_state.color cannot be set twice."));++l;this.set_color(r.read__TYPE_UINT32(a));break;case 10:if(0!=k)throw new m(new B("Bad data format: Cell_state.playerOwned cannot be set twice."));++k;this.set_playerOwned(r.read__TYPE_BOOL(a));break;default:x.prototype.readUnknown.call(this,a,w)}}},__class__:Nf,__properties__:{set_playerOwned:"set_playerOwned",get_playerOwned:"get_playerOwned",set_color:"set_color",get_color:"get_color",set_skinGameplayId:"set_skinGameplayId",get_skinGameplayId:"get_skinGameplayId",set_userLevel:"set_userLevel",get_userLevel:"get_userLevel",set_name:"set_name",get_name:"get_name",set_radius:"set_radius",get_radius:"get_radius",set_y:"set_y",get_y:"get_y",set_x:"set_x",get_x:"get_x",set_id:"set_id",get_id:"get_id",set_type:"set_type",get_type:"get_type"}});var uh=function(){this.set_giftIds([])};g["agario.proto.Claim_gifts_request"]=uh;uh.__name__=["agario","proto","Claim_gifts_request"];uh.__super__=x;uh.prototype=t(x.prototype,{giftIds:null,setGiftIds:function(a){this.set_giftIds(a);return this},set_giftIds:function(a){return this.giftIds=a},get_giftIds:function(){return this.giftIds},addGiftIds:function(a){null==this.get_giftIds()?this.set_giftIds([a]):this.get_giftIds().push(a)},writeToBuffer:function(a){if(null!=this.get_giftIds())for(var b=0,c=this.get_giftIds();b<c.length;){var d=c[b];++b;l.writeTag(a,2,1);l.write__TYPE_STRING(a,d)}x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){null!=this.get_giftIds()&&0<this.get_giftIds().length&&a("giftIds",this.get_giftIds())},readFromSlice:function(a,b){for(;a.buf.totlen-a.buf.pos>b;){var c=r.read__TYPE_UINT32(a);switch(c>>3){case 1:null==this.get_giftIds()&&this.set_giftIds([]);this.get_giftIds().push(r.read__TYPE_STRING(a));break;default:x.prototype.readUnknown.call(this,a,c)}}},__class__:uh,__properties__:{set_giftIds:"set_giftIds",get_giftIds:"get_giftIds"}});var vh=function(){this.set_userDataUpdates([])};g["agario.proto.Claim_gifts_response"]=vh;vh.__name__=["agario","proto","Claim_gifts_response"];vh.__super__=x;vh.prototype=t(x.prototype,{userDataUpdates:null,setUserDataUpdates:function(a){this.set_userDataUpdates(a);return this},set_userDataUpdates:function(a){return this.userDataUpdates=a},get_userDataUpdates:function(){return this.userDataUpdates},addUserDataUpdates:function(a){null==this.get_userDataUpdates()?this.set_userDataUpdates([a]):this.get_userDataUpdates().push(a)},writeToBuffer:function(a){if(null!=this.get_userDataUpdates())for(var b=0,c=this.get_userDataUpdates();b<c.length;){var d=c[b];++b;l.writeTag(a,2,1);l.write__TYPE_MESSAGE(a,d)}x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){null!=this.get_userDataUpdates()&&0<this.get_userDataUpdates().length&&a("userDataUpdates",this.get_userDataUpdates())},readFromSlice:function(a,b){for(;a.buf.totlen-a.buf.pos>b;){var c=r.read__TYPE_UINT32(a);switch(c>>3){case 1:null==this.get_userDataUpdates()&&this.set_userDataUpdates([]);this.get_userDataUpdates().push(r.read__TYPE_MESSAGE(a,new Pc));break;default:x.prototype.readUnknown.call(this,a,c)}}},__class__:vh,__properties__:{set_userDataUpdates:"set_userDataUpdates",get_userDataUpdates:"get_userDataUpdates"}});var Le=function(){this.set_platform(0);this.set_version("");this.set_width(0);this.set_height(0)};g["agario.proto.Device"]=Le;Le.__name__=["agario","proto","Device"];Le.__super__=x;Le.prototype=t(x.prototype,{platform:null,setPlatform:function(a){this.set_platform(a);return this},set_platform:function(a){return this.platform=a},get_platform:function(){return this.platform},version:null,setVersion:function(a){this.set_version(a);return this},set_version:function(a){return this.version=a},get_version:function(){return this.version},width:null,setWidth:function(a){this.set_width(a);return this},set_width:function(a){return this.width=a},get_width:function(){return this.width},height:null,setHeight:function(a){this.set_height(a);return this},set_height:function(a){return this.height=a},get_height:function(){return this.height},writeToBuffer:function(a){l.writeTag(a,0,1);l.write__TYPE_ENUM(a,this.get_platform());l.writeTag(a,2,2);l.write__TYPE_STRING(a,this.get_version());l.writeTag(a,0,3);l.write__TYPE_UINT32(a,this.get_width());l.writeTag(a,0,4);l.write__TYPE_UINT32(a,this.get_height());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("platform",this.get_platform());a("version",this.get_version());a("width",this.get_width());a("height",this.get_height())},readFromSlice:function(a,b){for(var c=0,d=0,e=0,f=0;a.buf.totlen-a.buf.pos>b;){var n=r.read__TYPE_UINT32(a);switch(n>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Device.platform cannot be set twice."));++c;this.set_platform(r.read__TYPE_ENUM(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: Device.version cannot be set twice."));++d;this.set_version(r.read__TYPE_STRING(a));break;case 3:if(0!=e)throw new m(new B("Bad data format: Device.width cannot be set twice."));++e;this.set_width(r.read__TYPE_UINT32(a));break;case 4:if(0!=f)throw new m(new B("Bad data format: Device.height cannot be set twice."));++f;this.set_height(r.read__TYPE_UINT32(a));break;default:x.prototype.readUnknown.call(this,a,n)}}},__class__:Le,__properties__:{set_height:"set_height",get_height:"get_height",set_width:"set_width",get_width:"get_width",set_version:"set_version",get_version:"get_version",set_platform:"set_platform",get_platform:"get_platform"}});var wh=function(){this.set_x(0);this.set_y(0)};g["agario.proto.Direction_vector"]=wh;wh.__name__=["agario","proto","Direction_vector"];wh.__super__=x;wh.prototype=t(x.prototype,{x:null,setX:function(a){this.set_x(a);return this},set_x:function(a){return this.x=a},get_x:function(){return this.x},y:null,setY:function(a){this.set_y(a);return this},set_y:function(a){return this.y=a},get_y:function(){return this.y},writeToBuffer:function(a){l.writeTag(a,5,1);l.write__TYPE_FLOAT(a,this.get_x());l.writeTag(a,5,2);l.write__TYPE_FLOAT(a,this.get_y());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("x",this.get_x());a("y",this.get_y())},readFromSlice:function(a,b){for(var c=0,d=0;a.buf.totlen-a.buf.pos>b;){var e=r.read__TYPE_UINT32(a);switch(e>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Direction_vector.x cannot be set twice."));++c;this.set_x(r.read__TYPE_FLOAT(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: Direction_vector.y cannot be set twice."));++d;this.set_y(r.read__TYPE_FLOAT(a));break;default:x.prototype.readUnknown.call(this,a,e)}}},__class__:wh,__properties__:{set_y:"set_y",get_y:"get_y",set_x:"set_x",get_x:"get_x"}});var Of=function(){this.hasField__0=0;this.set_reason(0)};g["agario.proto.Disconnect"]=Of;Of.__name__=["agario","proto","Disconnect"];Of.__super__=x;Of.prototype=t(x.prototype,{reason:null,setReason:function(a){this.set_reason(a);return this},set_reason:function(a){return this.reason=a},get_reason:function(){return this.reason},reconnectHost:null,setReconnectHost:function(a){this.set_reconnectHost(a);return this},clearReconnectHost:function(){this.set_reconnectHost(null)},hasReconnectHost:function(){return null!=this.get_reconnectHost()},set_reconnectHost:function(a){return this.reconnectHost=a},get_reconnectHost:function(){return this.reconnectHost},reconnectTcpPort:null,setReconnectTcpPort:function(a){this.set_reconnectTcpPort(a);return this},hasField__0:null,clearReconnectTcpPort:function(){this.hasField__0&=-2;this.set_reconnectTcpPort(0)},hasReconnectTcpPort:function(){return 0!=(this.hasField__0&1)},set_reconnectTcpPort:function(a){this.hasField__0|=1;return this.reconnectTcpPort=a},get_reconnectTcpPort:function(){return this.reconnectTcpPort},writeToBuffer:function(a){l.writeTag(a,0,1);l.write__TYPE_ENUM(a,this.get_reason());null!=this.get_reconnectHost()&&(l.writeTag(a,2,2),l.write__TYPE_STRING(a,this.get_reconnectHost()));0!=(this.hasField__0&1)&&(l.writeTag(a,0,3),l.write__TYPE_UINT32(a,this.get_reconnectTcpPort()));x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("reason",this.get_reason());null!=this.get_reconnectHost()&&a("reconnectHost",this.get_reconnectHost());0!=(this.hasField__0&1)&&a("reconnectTcpPort",this.get_reconnectTcpPort())},readFromSlice:function(a,b){for(var c=0,d=0,e=0;a.buf.totlen-a.buf.pos>b;){var f=r.read__TYPE_UINT32(a);switch(f>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Disconnect.reason cannot be set twice."));++c;this.set_reason(r.read__TYPE_ENUM(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: Disconnect.reconnectHost cannot be set twice."));++d;this.set_reconnectHost(r.read__TYPE_STRING(a));break;case 3:if(0!=e)throw new m(new B("Bad data format: Disconnect.reconnectTcpPort cannot be set twice."));++e;this.set_reconnectTcpPort(r.read__TYPE_UINT32(a));break;default:x.prototype.readUnknown.call(this,a,f)}}},__class__:Of,__properties__:{set_reconnectTcpPort:"set_reconnectTcpPort",get_reconnectTcpPort:"get_reconnectTcpPort",set_reconnectHost:"set_reconnectHost",get_reconnectHost:"get_reconnectHost",set_reason:"set_reason",get_reason:"get_reason"}});var xh=function(){this.set_nickname("")};g["agario.proto.Enter_game_request"]=xh;xh.__name__=["agario","proto","Enter_game_request"];xh.__super__=x;xh.prototype=t(x.prototype,{nickname:null,setNickname:function(a){this.set_nickname(a);return this},set_nickname:function(a){return this.nickname=a},get_nickname:function(){return this.nickname},writeToBuffer:function(a){l.writeTag(a,2,1);l.write__TYPE_STRING(a,this.get_nickname());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("nickname",this.get_nickname())},readFromSlice:function(a,b){for(var c=0;a.buf.totlen-a.buf.pos>b;){var d=r.read__TYPE_UINT32(a);switch(d>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Enter_game_request.nickname cannot be set twice."));++c;this.set_nickname(r.read__TYPE_STRING(a));break;default:x.prototype.readUnknown.call(this,a,d)}}},__class__:xh,__properties__:{set_nickname:"set_nickname",get_nickname:"get_nickname"}});var Pf=function(){this.hasField__0=0;this.set_type(0)};g["agario.proto.Envelope"]=Pf;Pf.__name__=["agario","proto","Envelope"];Pf.__super__=x;Pf.prototype=t(x.prototype,{type:null,setType:function(a){this.set_type(a);return this},set_type:function(a){return this.type=a},get_type:function(){return this.type},uncompressedData:null,setUncompressedData:function(a){this.set_uncompressedData(a);return this},clearUncompressedData:function(){this.set_uncompressedData(null)},hasUncompressedData:function(){return null!=this.get_uncompressedData()},set_uncompressedData:function(a){return this.uncompressedData=a},get_uncompressedData:function(){return this.uncompressedData},compressedData:null,setCompressedData:function(a){this.set_compressedData(a);return this},clearCompressedData:function(){this.set_compressedData(null)},hasCompressedData:function(){return null!=this.get_compressedData()},set_compressedData:function(a){return this.compressedData=a},get_compressedData:function(){return this.compressedData},uncompressedSize:null,setUncompressedSize:function(a){this.set_uncompressedSize(a);return this},hasField__0:null,clearUncompressedSize:function(){this.hasField__0&=-2;this.set_uncompressedSize(0)},hasUncompressedSize:function(){return 0!=(this.hasField__0&1)},set_uncompressedSize:function(a){this.hasField__0|=1;return this.uncompressedSize=a},get_uncompressedSize:function(){return this.uncompressedSize},writeToBuffer:function(a){l.writeTag(a,0,1);l.write__TYPE_ENUM(a,this.get_type());null!=this.get_uncompressedData()&&(l.writeTag(a,2,2),l.write__TYPE_MESSAGE(a,this.get_uncompressedData()));null!=this.get_compressedData()&&(l.writeTag(a,2,3),l.write__TYPE_BYTES(a,this.get_compressedData()));0!=(this.hasField__0&1)&&(l.writeTag(a,0,4),l.write__TYPE_UINT32(a,this.get_uncompressedSize()));x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("type",this.get_type());null!=this.get_uncompressedData()&&a("uncompressedData",this.get_uncompressedData());null!=this.get_compressedData()&&a("compressedData",this.get_compressedData());0!=(this.hasField__0&1)&&a("uncompressedSize",this.get_uncompressedSize())},readFromSlice:function(a,b){for(var c=0,d=0,e=0,f=0;a.buf.totlen-a.buf.pos>b;){var n=r.read__TYPE_UINT32(a);switch(n>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Envelope.type cannot be set twice."));++c;this.set_type(r.read__TYPE_ENUM(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: Envelope.uncompressedData cannot be set twice."));++d;this.set_uncompressedData(new Me);r.read__TYPE_MESSAGE(a,this.get_uncompressedData());break;case 3:if(0!=e)throw new m(new B("Bad data format: Envelope.compressedData cannot be set twice."));++e;this.set_compressedData(r.read__TYPE_BYTES(a));break;case 4:if(0!=f)throw new m(new B("Bad data format: Envelope.uncompressedSize cannot be set twice."));++f;this.set_uncompressedSize(r.read__TYPE_UINT32(a));break;default:x.prototype.readUnknown.call(this,a,n)}}},__class__:Pf,__properties__:{set_uncompressedSize:"set_uncompressedSize",get_uncompressedSize:"get_uncompressedSize",set_compressedData:"set_compressedData",get_compressedData:"get_compressedData",set_uncompressedData:"set_uncompressedData",get_uncompressedData:"get_uncompressedData",set_type:"set_type",get_type:"get_type"}});var Qf=function(){this.set_userDataUpdates([]);this.set_userStats(new Yd)};g["agario.proto.Game_over"]=Qf;Qf.__name__=["agario","proto","Game_over"];Qf.__super__=x;Qf.prototype=t(x.prototype,{userDataUpdates:null,setUserDataUpdates:function(a){this.set_userDataUpdates(a);return this},set_userDataUpdates:function(a){return this.userDataUpdates=a},get_userDataUpdates:function(){return this.userDataUpdates},addUserDataUpdates:function(a){null==this.get_userDataUpdates()?this.set_userDataUpdates([a]):this.get_userDataUpdates().push(a)},userStats:null,setUserStats:function(a){this.set_userStats(a);return this},set_userStats:function(a){return this.userStats=a},get_userStats:function(){return this.userStats},writeToBuffer:function(a){if(null!=this.get_userDataUpdates())for(var b=0,c=this.get_userDataUpdates();b<c.length;){var d=c[b];++b;l.writeTag(a,2,1);l.write__TYPE_MESSAGE(a,d)}l.writeTag(a,2,2);l.write__TYPE_MESSAGE(a,this.get_userStats());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){null!=this.get_userDataUpdates()&&0<this.get_userDataUpdates().length&&a("userDataUpdates",this.get_userDataUpdates());a("userStats",this.get_userStats())},readFromSlice:function(a,b){for(var c=0;a.buf.totlen-a.buf.pos>b;){var d=r.read__TYPE_UINT32(a);switch(d>>3){case 1:null==this.get_userDataUpdates()&&this.set_userDataUpdates([]);this.get_userDataUpdates().push(r.read__TYPE_MESSAGE(a,new Pc));break;case 2:if(0!=c)throw new m(new B("Bad data format: Game_over.userStats cannot be set twice."));++c;this.set_userStats(new Yd);r.read__TYPE_MESSAGE(a,this.get_userStats());break;default:x.prototype.readUnknown.call(this,a,d)}}},__class__:Qf,__properties__:{set_userStats:"set_userStats",get_userStats:"get_userStats",set_userDataUpdates:"set_userDataUpdates",get_userDataUpdates:"get_userDataUpdates"}});var yh=function(){this.set_transactionId(this.defaultUInt64());this.set_receiptData("");this.set_signature("")};g["agario.proto.Google_inapp_purchase_request"]=yh;yh.__name__=["agario","proto","Google_inapp_purchase_request"];yh.__super__=x;yh.prototype=t(x.prototype,{transactionId:null,setTransactionId:function(a){this.set_transactionId(a);return this},set_transactionId:function(a){return this.transactionId=a},get_transactionId:function(){return this.transactionId},receiptData:null,setReceiptData:function(a){this.set_receiptData(a);return this},set_receiptData:function(a){return this.receiptData=a},get_receiptData:function(){return this.receiptData},signature:null,setSignature:function(a){this.set_signature(a);return this},set_signature:function(a){return this.signature=a},get_signature:function(){return this.signature},writeToBuffer:function(a){l.writeTag(a,0,1);l.write__TYPE_UINT64(a,this.get_transactionId());l.writeTag(a,2,2);l.write__TYPE_STRING(a,this.get_receiptData());l.writeTag(a,2,3);l.write__TYPE_STRING(a,this.get_signature());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("transactionId",this.get_transactionId());a("receiptData",this.get_receiptData());a("signature",this.get_signature())},readFromSlice:function(a,b){for(var c=0,d=0,e=0;a.buf.totlen-a.buf.pos>b;){var f=r.read__TYPE_UINT32(a);switch(f>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Google_inapp_purchase_request.transactionId cannot be set twice."));++c;this.set_transactionId(r.read__TYPE_UINT64(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: Google_inapp_purchase_request.receiptData cannot be set twice."));++d;this.set_receiptData(r.read__TYPE_STRING(a));break;case 3:if(0!=e)throw new m(new B("Bad data format: Google_inapp_purchase_request.signature cannot be set twice."));++e;this.set_signature(r.read__TYPE_STRING(a));break;default:x.prototype.readUnknown.call(this,a,f)}}},__class__:yh,__properties__:{set_signature:"set_signature",get_signature:"get_signature",set_receiptData:"set_receiptData",get_receiptData:"get_receiptData",set_transactionId:"set_transactionId",get_transactionId:"get_transactionId"}});var zh=function(){this.set_result(0);this.set_transactionId(this.defaultUInt64());this.set_productUpdates([])};g["agario.proto.Inapp_purchase_response"]=zh;zh.__name__=["agario","proto","Inapp_purchase_response"];zh.__super__=x;zh.prototype=t(x.prototype,{result:null,setResult:function(a){this.set_result(a);return this},set_result:function(a){return this.result=a},get_result:function(){return this.result},transactionId:null,setTransactionId:function(a){this.set_transactionId(a);return this},set_transactionId:function(a){return this.transactionId=a},get_transactionId:function(){return this.transactionId},productUpdates:null,setProductUpdates:function(a){this.set_productUpdates(a);return this},set_productUpdates:function(a){return this.productUpdates=a},get_productUpdates:function(){return this.productUpdates},addProductUpdates:function(a){null==this.get_productUpdates()?this.set_productUpdates([a]):this.get_productUpdates().push(a)},writeToBuffer:function(a){l.writeTag(a,0,1);l.write__TYPE_ENUM(a,this.get_result());l.writeTag(a,0,2);l.write__TYPE_UINT64(a,this.get_transactionId());if(null!=this.get_productUpdates())for(var b=0,c=this.get_productUpdates();b<c.length;){var d=c[b];++b;l.writeTag(a,2,3);l.write__TYPE_MESSAGE(a,d)}x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("result",this.get_result());a("transactionId",this.get_transactionId());null!=this.get_productUpdates()&&0<this.get_productUpdates().length&&a("productUpdates",this.get_productUpdates())},readFromSlice:function(a,b){for(var c=0,d=0;a.buf.totlen-a.buf.pos>b;){var e=r.read__TYPE_UINT32(a);switch(e>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Inapp_purchase_response.result cannot be set twice."));++c;this.set_result(r.read__TYPE_ENUM(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: Inapp_purchase_response.transactionId cannot be set twice."));++d;this.set_transactionId(r.read__TYPE_UINT64(a));break;case 3:null==this.get_productUpdates()&&this.set_productUpdates([]);this.get_productUpdates().push(r.read__TYPE_MESSAGE(a,new Pc));break;default:x.prototype.readUnknown.call(this,a,e)}}},__class__:zh,__properties__:{set_productUpdates:"set_productUpdates",get_productUpdates:"get_productUpdates",set_transactionId:"set_transactionId",get_transactionId:"get_transactionId",set_result:"set_result",get_result:"get_result"}});var Ah=function(){this.set_names([]);this.set_playerPosition(0)};g["agario.proto.Leaderboard"]=Ah;Ah.__name__=["agario","proto","Leaderboard"];Ah.__super__=x;Ah.prototype=t(x.prototype,{names:null,setNames:function(a){this.set_names(a);return this},set_names:function(a){return this.names=a},get_names:function(){return this.names},addNames:function(a){null==this.get_names()?this.set_names([a]):this.get_names().push(a)},playerPosition:null,setPlayerPosition:function(a){this.set_playerPosition(a);return this},set_playerPosition:function(a){return this.playerPosition=a},get_playerPosition:function(){return this.playerPosition},writeToBuffer:function(a){if(null!=this.get_names())for(var b=0,c=this.get_names();b<c.length;){var d=c[b];++b;l.writeTag(a,2,1);l.write__TYPE_STRING(a,d)}l.writeTag(a,0,2);l.write__TYPE_UINT32(a,this.get_playerPosition());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){null!=this.get_names()&&0<this.get_names().length&&a("names",this.get_names());a("playerPosition",this.get_playerPosition())},readFromSlice:function(a,b){for(var c=0;a.buf.totlen-a.buf.pos>b;){var d=r.read__TYPE_UINT32(a);switch(d>>3){case 1:null==this.get_names()&&this.set_names([]);this.get_names().push(r.read__TYPE_STRING(a));break;case 2:if(0!=c)throw new m(new B("Bad data format: Leaderboard.playerPosition cannot be set twice."));++c;this.set_playerPosition(r.read__TYPE_UINT32(a));break;default:x.prototype.readUnknown.call(this,a,d)}}},__class__:Ah,__properties__:{set_playerPosition:"set_playerPosition",get_playerPosition:"get_playerPosition",set_names:"set_names",get_names:"get_names"}});var Ne=function(){this.set_device(new Le);this.set_realm(0)};g["agario.proto.Login_request"]=Ne;Ne.__name__=["agario","proto","Login_request"];Ne.__super__=x;Ne.prototype=t(x.prototype,{device:null,setDevice:function(a){this.set_device(a);return this},set_device:function(a){return this.device=a},get_device:function(){return this.device},realm:null,setRealm:function(a){this.set_realm(a);return this},set_realm:function(a){return this.realm=a},get_realm:function(){return this.realm},authToken:null,setAuthToken:function(a){this.set_authToken(a);return this},clearAuthToken:function(){this.set_authToken(null)},hasAuthToken:function(){return null!=this.get_authToken()},set_authToken:function(a){return this.authToken=a},get_authToken:function(){return this.authToken},writeToBuffer:function(a){l.writeTag(a,2,1);l.write__TYPE_MESSAGE(a,this.get_device());l.writeTag(a,0,2);l.write__TYPE_ENUM(a,this.get_realm());null!=this.get_authToken()&&(l.writeTag(a,2,3),l.write__TYPE_STRING(a,this.get_authToken()));x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("device",this.get_device());a("realm",this.get_realm());null!=this.get_authToken()&&a("authToken",this.get_authToken())},readFromSlice:function(a,b){for(var c=0,d=0,e=0;a.buf.totlen-
a.buf.pos>b;){var f=r.read__TYPE_UINT32(a);switch(f>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Login_request.device cannot be set twice."));++c;this.set_device(new Le);r.read__TYPE_MESSAGE(a,this.get_device());break;case 2:if(0!=d)throw new m(new B("Bad data format: Login_request.realm cannot be set twice."));++d;this.set_realm(r.read__TYPE_ENUM(a));break;case 3:if(0!=e)throw new m(new B("Bad data format: Login_request.authToken cannot be set twice."));++e;this.set_authToken(r.read__TYPE_STRING(a));break;default:x.prototype.readUnknown.call(this,a,f)}}},__class__:Ne,__properties__:{set_authToken:"set_authToken",get_authToken:"get_authToken",set_realm:"set_realm",get_realm:"get_realm",set_device:"set_device",get_device:"get_device"}});var Vf=function(){this.set_realm(0);this.set_currentGameState(0);this.set_latestConfiguration(0);this.set_serverInfo(new Rf);this.set_userInfo(new Sf);this.set_userStats(new Yd);this.set_userWallet([]);this.set_userSettings([]);this.set_userBoosts([]);this.set_userTimedEvents([]);this.set_userGifts(new Tf);this.set_sessionToken("");this.set_softUpgrade(new Uf)};g["agario.proto.Login_response"]=Vf;Vf.__name__=["agario","proto","Login_response"];Vf.__super__=x;Vf.prototype=t(x.prototype,{realm:null,setRealm:function(a){this.set_realm(a);return this},set_realm:function(a){return this.realm=a},get_realm:function(){return this.realm},guestAuthToken:null,setGuestAuthToken:function(a){this.set_guestAuthToken(a);return this},clearGuestAuthToken:function(){this.set_guestAuthToken(null)},hasGuestAuthToken:function(){return null!=this.get_guestAuthToken()},set_guestAuthToken:function(a){return this.guestAuthToken=a},get_guestAuthToken:function(){return this.guestAuthToken},currentGameState:null,setCurrentGameState:function(a){this.set_currentGameState(a);return this},set_currentGameState:function(a){return this.currentGameState=a},get_currentGameState:function(){return this.currentGameState},latestConfiguration:null,setLatestConfiguration:function(a){this.set_latestConfiguration(a);return this},set_latestConfiguration:function(a){return this.latestConfiguration=a},get_latestConfiguration:function(){return this.latestConfiguration},serverInfo:null,setServerInfo:function(a){this.set_serverInfo(a);return this},set_serverInfo:function(a){return this.serverInfo=a},get_serverInfo:function(){return this.serverInfo},userInfo:null,setUserInfo:function(a){this.set_userInfo(a);return this},set_userInfo:function(a){return this.userInfo=a},get_userInfo:function(){return this.userInfo},userStats:null,setUserStats:function(a){this.set_userStats(a);return this},set_userStats:function(a){return this.userStats=a},get_userStats:function(){return this.userStats},userWallet:null,setUserWallet:function(a){this.set_userWallet(a);return this},set_userWallet:function(a){return this.userWallet=a},get_userWallet:function(){return this.userWallet},addUserWallet:function(a){null==this.get_userWallet()?this.set_userWallet([a]):this.get_userWallet().push(a)},userSettings:null,setUserSettings:function(a){this.set_userSettings(a);return this},set_userSettings:function(a){return this.userSettings=a},get_userSettings:function(){return this.userSettings},addUserSettings:function(a){null==this.get_userSettings()?this.set_userSettings([a]):this.get_userSettings().push(a)},userBoosts:null,setUserBoosts:function(a){this.set_userBoosts(a);return this},set_userBoosts:function(a){return this.userBoosts=a},get_userBoosts:function(){return this.userBoosts},addUserBoosts:function(a){null==this.get_userBoosts()?this.set_userBoosts([a]):this.get_userBoosts().push(a)},userTimedEvents:null,setUserTimedEvents:function(a){this.set_userTimedEvents(a);return this},set_userTimedEvents:function(a){return this.userTimedEvents=a},get_userTimedEvents:function(){return this.userTimedEvents},addUserTimedEvents:function(a){null==this.get_userTimedEvents()?this.set_userTimedEvents([a]):this.get_userTimedEvents().push(a)},userGifts:null,setUserGifts:function(a){this.set_userGifts(a);return this},set_userGifts:function(a){return this.userGifts=a},get_userGifts:function(){return this.userGifts},sessionToken:null,setSessionToken:function(a){this.set_sessionToken(a);return this},set_sessionToken:function(a){return this.sessionToken=a},get_sessionToken:function(){return this.sessionToken},softUpgrade:null,setSoftUpgrade:function(a){this.set_softUpgrade(a);return this},set_softUpgrade:function(a){return this.softUpgrade=a},get_softUpgrade:function(){return this.softUpgrade},writeToBuffer:function(a){l.writeTag(a,0,1);l.write__TYPE_ENUM(a,this.get_realm());null!=this.get_guestAuthToken()&&(l.writeTag(a,2,2),l.write__TYPE_STRING(a,this.get_guestAuthToken()));l.writeTag(a,0,3);l.write__TYPE_ENUM(a,this.get_currentGameState());l.writeTag(a,0,4);l.write__TYPE_UINT32(a,this.get_latestConfiguration());l.writeTag(a,2,5);l.write__TYPE_MESSAGE(a,this.get_serverInfo());l.writeTag(a,2,6);l.write__TYPE_MESSAGE(a,this.get_userInfo());l.writeTag(a,2,7);l.write__TYPE_MESSAGE(a,this.get_userStats());if(null!=this.get_userWallet())for(var b=0,c=this.get_userWallet();b<c.length;){var d=c[b];++b;l.writeTag(a,2,8);l.write__TYPE_MESSAGE(a,d)}if(null!=this.get_userSettings())for(b=0,c=this.get_userSettings();b<c.length;)d=c[b],++b,l.writeTag(a,2,9),l.write__TYPE_MESSAGE(a,d);if(null!=this.get_userBoosts())for(b=0,c=this.get_userBoosts();b<c.length;)d=c[b],++b,l.writeTag(a,2,10),l.write__TYPE_MESSAGE(a,d);if(null!=this.get_userTimedEvents())for(b=0,c=this.get_userTimedEvents();b<c.length;)d=c[b],++b,l.writeTag(a,2,11),l.write__TYPE_MESSAGE(a,d);l.writeTag(a,2,12);l.write__TYPE_MESSAGE(a,this.get_userGifts());l.writeTag(a,2,13);l.write__TYPE_STRING(a,this.get_sessionToken());l.writeTag(a,2,14);l.write__TYPE_MESSAGE(a,this.get_softUpgrade());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("realm",this.get_realm());null!=this.get_guestAuthToken()&&a("guestAuthToken",this.get_guestAuthToken());a("currentGameState",this.get_currentGameState());a("latestConfiguration",this.get_latestConfiguration());a("serverInfo",this.get_serverInfo());a("userInfo",this.get_userInfo());a("userStats",this.get_userStats());null!=this.get_userWallet()&&0<this.get_userWallet().length&&a("userWallet",this.get_userWallet());null!=this.get_userSettings()&&0<this.get_userSettings().length&&a("userSettings",this.get_userSettings());null!=this.get_userBoosts()&&0<this.get_userBoosts().length&&a("userBoosts",this.get_userBoosts());null!=this.get_userTimedEvents()&&0<this.get_userTimedEvents().length&&a("userTimedEvents",this.get_userTimedEvents());a("userGifts",this.get_userGifts());a("sessionToken",this.get_sessionToken());a("softUpgrade",this.get_softUpgrade())},readFromSlice:function(a,b){for(var c=0,d=0,e=0,f=0,n=0,L=0,g=0,h=0,l=0,k=0;a.buf.totlen-a.buf.pos>b;){var w=r.read__TYPE_UINT32(a);switch(w>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Login_response.realm cannot be set twice."));++c;this.set_realm(r.read__TYPE_ENUM(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: Login_response.guestAuthToken cannot be set twice."));++d;this.set_guestAuthToken(r.read__TYPE_STRING(a));break;case 3:if(0!=e)throw new m(new B("Bad data format: Login_response.currentGameState cannot be set twice."));++e;this.set_currentGameState(r.read__TYPE_ENUM(a));break;case 4:if(0!=f)throw new m(new B("Bad data format: Login_response.latestConfiguration cannot be set twice."));++f;this.set_latestConfiguration(r.read__TYPE_UINT32(a));break;case 5:if(0!=n)throw new m(new B("Bad data format: Login_response.serverInfo cannot be set twice."));++n;this.set_serverInfo(new Rf);r.read__TYPE_MESSAGE(a,this.get_serverInfo());break;case 6:if(0!=L)throw new m(new B("Bad data format: Login_response.userInfo cannot be set twice."));++L;this.set_userInfo(new Sf);r.read__TYPE_MESSAGE(a,this.get_userInfo());break;case 7:if(0!=g)throw new m(new B("Bad data format: Login_response.userStats cannot be set twice."));++g;this.set_userStats(new Yd);r.read__TYPE_MESSAGE(a,this.get_userStats());break;case 8:null==this.get_userWallet()&&this.set_userWallet([]);this.get_userWallet().push(r.read__TYPE_MESSAGE(a,new Bh));break;case 9:null==this.get_userSettings()&&this.set_userSettings([]);this.get_userSettings().push(r.read__TYPE_MESSAGE(a,new Zd));break;case 10:null==this.get_userBoosts()&&this.set_userBoosts([]);this.get_userBoosts().push(r.read__TYPE_MESSAGE(a,new Xd));break;case 11:null==this.get_userTimedEvents()&&this.set_userTimedEvents([]);this.get_userTimedEvents().push(r.read__TYPE_MESSAGE(a,new Ud));break;case 12:if(0!=h)throw new m(new B("Bad data format: Login_response.userGifts cannot be set twice."));++h;this.set_userGifts(new Tf);r.read__TYPE_MESSAGE(a,this.get_userGifts());break;case 13:if(0!=l)throw new m(new B("Bad data format: Login_response.sessionToken cannot be set twice."));++l;this.set_sessionToken(r.read__TYPE_STRING(a));break;case 14:if(0!=k)throw new m(new B("Bad data format: Login_response.softUpgrade cannot be set twice."));++k;this.set_softUpgrade(new Uf);r.read__TYPE_MESSAGE(a,this.get_softUpgrade());break;default:x.prototype.readUnknown.call(this,a,w)}}},__class__:Vf,__properties__:{set_softUpgrade:"set_softUpgrade",get_softUpgrade:"get_softUpgrade",set_sessionToken:"set_sessionToken",get_sessionToken:"get_sessionToken",set_userGifts:"set_userGifts",get_userGifts:"get_userGifts",set_userTimedEvents:"set_userTimedEvents",get_userTimedEvents:"get_userTimedEvents",set_userBoosts:"set_userBoosts",get_userBoosts:"get_userBoosts",set_userSettings:"set_userSettings",get_userSettings:"get_userSettings",set_userWallet:"set_userWallet",get_userWallet:"get_userWallet",set_userStats:"set_userStats",get_userStats:"get_userStats",set_userInfo:"set_userInfo",get_userInfo:"get_userInfo",set_serverInfo:"set_serverInfo",get_serverInfo:"get_serverInfo",set_latestConfiguration:"set_latestConfiguration",get_latestConfiguration:"get_latestConfiguration",set_currentGameState:"set_currentGameState",get_currentGameState:"get_currentGameState",set_guestAuthToken:"set_guestAuthToken",get_guestAuthToken:"get_guestAuthToken",set_realm:"set_realm",get_realm:"get_realm"}});var Oe=function(){this.hasField__0=0;this.set_id(0)};g["agario.proto.Ping"]=Oe;Oe.__name__=["agario","proto","Ping"];Oe.__super__=x;Oe.prototype=t(x.prototype,{id:null,setId:function(a){this.set_id(a);return this},set_id:function(a){return this.id=a},get_id:function(){return this.id},previousRoundtrip:null,setPreviousRoundtrip:function(a){this.set_previousRoundtrip(a);return this},hasField__0:null,clearPreviousRoundtrip:function(){this.hasField__0&=-2;this.set_previousRoundtrip(0)},hasPreviousRoundtrip:function(){return 0!=(this.hasField__0&1)},set_previousRoundtrip:function(a){this.hasField__0|=1;return this.previousRoundtrip=a},get_previousRoundtrip:function(){return this.previousRoundtrip},writeToBuffer:function(a){l.writeTag(a,0,1);l.write__TYPE_UINT32(a,this.get_id());0!=(this.hasField__0&1)&&(l.writeTag(a,0,2),l.write__TYPE_UINT32(a,this.get_previousRoundtrip()));x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("id",this.get_id());0!=(this.hasField__0&1)&&a("previousRoundtrip",this.get_previousRoundtrip())},readFromSlice:function(a,b){for(var c=0,d=0;a.buf.totlen-a.buf.pos>b;){var e=r.read__TYPE_UINT32(a);switch(e>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Ping.id cannot be set twice."));++c;this.set_id(r.read__TYPE_UINT32(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: Ping.previousRoundtrip cannot be set twice."));++d;this.set_previousRoundtrip(r.read__TYPE_UINT32(a));break;default:x.prototype.readUnknown.call(this,a,e)}}},__class__:Oe,__properties__:{set_previousRoundtrip:"set_previousRoundtrip",get_previousRoundtrip:"get_previousRoundtrip",set_id:"set_id",get_id:"get_id"}});var Pe=function(){this.set_pingId(0)};g["agario.proto.Pong"]=Pe;Pe.__name__=["agario","proto","Pong"];Pe.__super__=x;Pe.prototype=t(x.prototype,{pingId:null,setPingId:function(a){this.set_pingId(a);return this},set_pingId:function(a){return this.pingId=a},get_pingId:function(){return this.pingId},writeToBuffer:function(a){l.writeTag(a,0,1);l.write__TYPE_UINT32(a,this.get_pingId());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("pingId",this.get_pingId())},readFromSlice:function(a,b){for(var c=0;a.buf.totlen-a.buf.pos>b;){var d=r.read__TYPE_UINT32(a);switch(d>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Pong.pingId cannot be set twice."));++c;this.set_pingId(r.read__TYPE_UINT32(a));break;default:x.prototype.readUnknown.call(this,a,d)}}},__class__:Pe,__properties__:{set_pingId:"set_pingId",get_pingId:"get_pingId"}});var Ch=function(){this.set_origin(0);this.set_productId("");this.set_finalAmount(0);this.set_deltaAmount(0);this.set_type(0)};g["agario.proto.Product_update"]=Ch;Ch.__name__=["agario","proto","Product_update"];Ch.__super__=x;Ch.prototype=t(x.prototype,{origin:null,setOrigin:function(a){this.set_origin(a);return this},set_origin:function(a){return this.origin=a},get_origin:function(){return this.origin},productId:null,setProductId:function(a){this.set_productId(a);return this},set_productId:function(a){return this.productId=a},get_productId:function(){return this.productId},finalAmount:null,setFinalAmount:function(a){this.set_finalAmount(a);return this},set_finalAmount:function(a){return this.finalAmount=a},get_finalAmount:function(){return this.finalAmount},deltaAmount:null,setDeltaAmount:function(a){this.set_deltaAmount(a);return this},set_deltaAmount:function(a){return this.deltaAmount=a},get_deltaAmount:function(){return this.deltaAmount},type:null,setType:function(a){this.set_type(a);return this},set_type:function(a){return this.type=a},get_type:function(){return this.type},writeToBuffer:function(a){l.writeTag(a,0,1);l.write__TYPE_ENUM(a,this.get_origin());l.writeTag(a,2,2);l.write__TYPE_STRING(a,this.get_productId());l.writeTag(a,0,3);l.write__TYPE_UINT32(a,this.get_finalAmount());l.writeTag(a,0,4);l.write__TYPE_INT32(a,this.get_deltaAmount());l.writeTag(a,0,5);l.write__TYPE_ENUM(a,this.get_type());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("origin",this.get_origin());a("productId",this.get_productId());a("finalAmount",this.get_finalAmount());a("deltaAmount",this.get_deltaAmount());a("type",this.get_type())},readFromSlice:function(a,b){for(var c=0,d=0,e=0,f=0,n=0;a.buf.totlen-a.buf.pos>b;){var L=r.read__TYPE_UINT32(a);switch(L>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Product_update.origin cannot be set twice."));++c;this.set_origin(r.read__TYPE_ENUM(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: Product_update.productId cannot be set twice."));++d;this.set_productId(r.read__TYPE_STRING(a));break;case 3:if(0!=e)throw new m(new B("Bad data format: Product_update.finalAmount cannot be set twice."));++e;this.set_finalAmount(r.read__TYPE_UINT32(a));break;case 4:if(0!=f)throw new m(new B("Bad data format: Product_update.deltaAmount cannot be set twice."));++f;this.set_deltaAmount(r.read__TYPE_INT32(a));break;case 5:if(0!=n)throw new m(new B("Bad data format: Product_update.type cannot be set twice."));++n;this.set_type(r.read__TYPE_ENUM(a));break;default:x.prototype.readUnknown.call(this,a,L)}}},__class__:Ch,__properties__:{set_type:"set_type",get_type:"get_type",set_deltaAmount:"set_deltaAmount",get_deltaAmount:"get_deltaAmount",set_finalAmount:"set_finalAmount",get_finalAmount:"get_finalAmount",set_productId:"set_productId",get_productId:"get_productId",set_origin:"set_origin",get_origin:"get_origin"}});var Wf=function(){this.set_purchaseId("");this.set_walletUpdates(new $d)};g["agario.proto.Purchase_wallet_updates"]=Wf;Wf.__name__=["agario","proto","Purchase_wallet_updates"];Wf.__super__=x;Wf.prototype=t(x.prototype,{purchaseId:null,setPurchaseId:function(a){this.set_purchaseId(a);return this},set_purchaseId:function(a){return this.purchaseId=a},get_purchaseId:function(){return this.purchaseId},walletUpdates:null,setWalletUpdates:function(a){this.set_walletUpdates(a);return this},set_walletUpdates:function(a){return this.walletUpdates=a},get_walletUpdates:function(){return this.walletUpdates},writeToBuffer:function(a){l.writeTag(a,2,1);l.write__TYPE_STRING(a,this.get_purchaseId());l.writeTag(a,2,2);l.write__TYPE_MESSAGE(a,this.get_walletUpdates());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("purchaseId",this.get_purchaseId());a("walletUpdates",this.get_walletUpdates())},readFromSlice:function(a,b){for(var c=0,d=0;a.buf.totlen-a.buf.pos>b;){var e=r.read__TYPE_UINT32(a);switch(e>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Purchase_wallet_updates.purchaseId cannot be set twice."));++c;this.set_purchaseId(r.read__TYPE_STRING(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: Purchase_wallet_updates.walletUpdates cannot be set twice."));++d;this.set_walletUpdates(new $d);r.read__TYPE_MESSAGE(a,this.get_walletUpdates());break;default:x.prototype.readUnknown.call(this,a,e)}}},__class__:Wf,__properties__:{set_walletUpdates:"set_walletUpdates",get_walletUpdates:"get_walletUpdates",set_purchaseId:"set_purchaseId",get_purchaseId:"get_purchaseId"}});var Dh=function(){this.set_realm(0);this.set_authToken("")};g["agario.proto.Realm_upgrade_request"]=Dh;Dh.__name__=["agario","proto","Realm_upgrade_request"];Dh.__super__=x;Dh.prototype=t(x.prototype,{realm:null,setRealm:function(a){this.set_realm(a);return this},set_realm:function(a){return this.realm=a},get_realm:function(){return this.realm},authToken:null,setAuthToken:function(a){this.set_authToken(a);return this},set_authToken:function(a){return this.authToken=a},get_authToken:function(){return this.authToken},writeToBuffer:function(a){l.writeTag(a,0,1);l.write__TYPE_ENUM(a,this.get_realm());l.writeTag(a,2,2);l.write__TYPE_STRING(a,this.get_authToken());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("realm",this.get_realm());a("authToken",this.get_authToken())},readFromSlice:function(a,b){for(var c=0,d=0;a.buf.totlen-a.buf.pos>b;){var e=r.read__TYPE_UINT32(a);switch(e>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Realm_upgrade_request.realm cannot be set twice."));++c;this.set_realm(r.read__TYPE_ENUM(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: Realm_upgrade_request.authToken cannot be set twice."));++d;this.set_authToken(r.read__TYPE_STRING(a));break;default:x.prototype.readUnknown.call(this,a,e)}}},__class__:Dh,__properties__:{set_authToken:"set_authToken",get_authToken:"get_authToken",set_realm:"set_realm",get_realm:"get_realm"}});var Eh=function(){this.set_realm(0);this.set_displayName("")};g["agario.proto.Realm_upgrade_response"]=Eh;Eh.__name__=["agario","proto","Realm_upgrade_response"];Eh.__super__=x;Eh.prototype=t(x.prototype,{realm:null,setRealm:function(a){this.set_realm(a);return this},set_realm:function(a){return this.realm=a},get_realm:function(){return this.realm},displayName:null,setDisplayName:function(a){this.set_displayName(a);return this},set_displayName:function(a){return this.displayName=a},get_displayName:function(){return this.displayName},writeToBuffer:function(a){l.writeTag(a,0,1);l.write__TYPE_ENUM(a,this.get_realm());l.writeTag(a,2,2);l.write__TYPE_STRING(a,this.get_displayName());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("realm",this.get_realm());a("displayName",this.get_displayName())},readFromSlice:function(a,b){for(var c=0,d=0;a.buf.totlen-a.buf.pos>b;){var e=r.read__TYPE_UINT32(a);switch(e>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Realm_upgrade_response.realm cannot be set twice."));++c;this.set_realm(r.read__TYPE_ENUM(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: Realm_upgrade_response.displayName cannot be set twice."));++d;this.set_displayName(r.read__TYPE_STRING(a));break;default:x.prototype.readUnknown.call(this,a,e)}}},__class__:Eh,__properties__:{set_displayName:"set_displayName",get_displayName:"get_displayName",set_realm:"set_realm",get_realm:"get_realm"}});var Me=function(){this.set_type(0)};g["agario.proto.Req"]=Me;Me.__name__=["agario","proto","Req"];Me.__super__=x;Me.prototype=t(x.prototype,{type:null,setType:function(a){this.set_type(a);return this},set_type:function(a){return this.type=a},get_type:function(){return this.type},loginRequestField:null,setLoginRequestField:function(a){this.set_loginRequestField(a);return this},clearLoginRequestField:function(){this.set_loginRequestField(null)},hasLoginRequestField:function(){return null!=this.get_loginRequestField()},set_loginRequestField:function(a){return this.loginRequestField=a},get_loginRequestField:function(){return this.loginRequestField},loginResponseField:null,setLoginResponseField:function(a){this.set_loginResponseField(a);return this},clearLoginResponseField:function(){this.set_loginResponseField(null)},hasLoginResponseField:function(){return null!=this.get_loginResponseField()},set_loginResponseField:function(a){return this.loginResponseField=a},get_loginResponseField:function(){return this.loginResponseField},realmUpgradeRequestField:null,setRealmUpgradeRequestField:function(a){this.set_realmUpgradeRequestField(a);return this},clearRealmUpgradeRequestField:function(){this.set_realmUpgradeRequestField(null)},hasRealmUpgradeRequestField:function(){return null!=this.get_realmUpgradeRequestField()},set_realmUpgradeRequestField:function(a){return this.realmUpgradeRequestField=a},get_realmUpgradeRequestField:function(){return this.realmUpgradeRequestField},realmUpgradeResponseField:null,setRealmUpgradeResponseField:function(a){this.set_realmUpgradeResponseField(a);return this},clearRealmUpgradeResponseField:function(){this.set_realmUpgradeResponseField(null)},hasRealmUpgradeResponseField:function(){return null!=this.get_realmUpgradeResponseField()},set_realmUpgradeResponseField:function(a){return this.realmUpgradeResponseField=a},get_realmUpgradeResponseField:function(){return this.realmUpgradeResponseField},disconnectField:null,setDisconnectField:function(a){this.set_disconnectField(a);return this},clearDisconnectField:function(){this.set_disconnectField(null)},hasDisconnectField:function(){return null!=this.get_disconnectField()},set_disconnectField:function(a){return this.disconnectField=a},get_disconnectField:function(){return this.disconnectField},pingField:null,setPingField:function(a){this.set_pingField(a);return this},clearPingField:function(){this.set_pingField(null)},hasPingField:function(){return null!=this.get_pingField()},set_pingField:function(a){return this.pingField=a},get_pingField:function(){return this.pingField},pongField:null,setPongField:function(a){this.set_pongField(a);return this},clearPongField:function(){this.set_pongField(null)},hasPongField:function(){return null!=this.get_pongField()},set_pongField:function(a){return this.pongField=a},get_pongField:function(){return this.pongField},udpHandshakeField:null,setUdpHandshakeField:function(a){this.set_udpHandshakeField(a);return this},clearUdpHandshakeField:function(){this.set_udpHandshakeField(null)},hasUdpHandshakeField:function(){return null!=this.get_udpHandshakeField()},set_udpHandshakeField:function(a){return this.udpHandshakeField=a},get_udpHandshakeField:function(){return this.udpHandshakeField},enterGameRequestField:null,setEnterGameRequestField:function(a){this.set_enterGameRequestField(a);return this},clearEnterGameRequestField:function(){this.set_enterGameRequestField(null)},hasEnterGameRequestField:function(){return null!=this.get_enterGameRequestField()},set_enterGameRequestField:function(a){return this.enterGameRequestField=a},get_enterGameRequestField:function(){return this.enterGameRequestField},activateBoostRequestField:null,setActivateBoostRequestField:function(a){this.set_activateBoostRequestField(a);return this},clearActivateBoostRequestField:function(){this.set_activateBoostRequestField(null)},hasActivateBoostRequestField:function(){return null!=this.get_activateBoostRequestField()},set_activateBoostRequestField:function(a){return this.activateBoostRequestField=a},get_activateBoostRequestField:function(){return this.activateBoostRequestField},activateBoostResponseField:null,setActivateBoostResponseField:function(a){this.set_activateBoostResponseField(a);return this},clearActivateBoostResponseField:function(){this.set_activateBoostResponseField(null)},hasActivateBoostResponseField:function(){return null!=this.get_activateBoostResponseField()},set_activateBoostResponseField:function(a){return this.activateBoostResponseField=a},get_activateBoostResponseField:function(){return this.activateBoostResponseField},directionVectorField:null,setDirectionVectorField:function(a){this.set_directionVectorField(a);return this},clearDirectionVectorField:function(){this.set_directionVectorField(null)},hasDirectionVectorField:function(){return null!=this.get_directionVectorField()},set_directionVectorField:function(a){return this.directionVectorField=a},get_directionVectorField:function(){return this.directionVectorField},leaderboardField:null,setLeaderboardField:function(a){this.set_leaderboardField(a);return this},clearLeaderboardField:function(){this.set_leaderboardField(null)},hasLeaderboardField:function(){return null!=this.get_leaderboardField()},set_leaderboardField:function(a){return this.leaderboardField=a},get_leaderboardField:function(){return this.leaderboardField},arenaStateField:null,setArenaStateField:function(a){this.set_arenaStateField(a);return this},clearArenaStateField:function(){this.set_arenaStateField(null)},hasArenaStateField:function(){return null!=this.get_arenaStateField()},set_arenaStateField:function(a){return this.arenaStateField=a},get_arenaStateField:function(){return this.arenaStateField},gameOverField:null,setGameOverField:function(a){this.set_gameOverField(a);return this},clearGameOverField:function(){this.set_gameOverField(null)},hasGameOverField:function(){return null!=this.get_gameOverField()},set_gameOverField:function(a){return this.gameOverField=a},get_gameOverField:function(){return this.gameOverField},softPurchaseRequestField:null,setSoftPurchaseRequestField:function(a){this.set_softPurchaseRequestField(a);return this},clearSoftPurchaseRequestField:function(){this.set_softPurchaseRequestField(null)},hasSoftPurchaseRequestField:function(){return null!=this.get_softPurchaseRequestField()},set_softPurchaseRequestField:function(a){return this.softPurchaseRequestField=a},get_softPurchaseRequestField:function(){return this.softPurchaseRequestField},softPurchaseResponseField:null,setSoftPurchaseResponseField:function(a){this.set_softPurchaseResponseField(a);return this},clearSoftPurchaseResponseField:function(){this.set_softPurchaseResponseField(null)},hasSoftPurchaseResponseField:function(){return null!=this.get_softPurchaseResponseField()},set_softPurchaseResponseField:function(a){return this.softPurchaseResponseField=a},get_softPurchaseResponseField:function(){return this.softPurchaseResponseField},appleInappPurchaseRequestField:null,setAppleInappPurchaseRequestField:function(a){this.set_appleInappPurchaseRequestField(a);return this},clearAppleInappPurchaseRequestField:function(){this.set_appleInappPurchaseRequestField(null)},hasAppleInappPurchaseRequestField:function(){return null!=this.get_appleInappPurchaseRequestField()},set_appleInappPurchaseRequestField:function(a){return this.appleInappPurchaseRequestField=a},get_appleInappPurchaseRequestField:function(){return this.appleInappPurchaseRequestField},googleInappPurchaseRequestField:null,setGoogleInappPurchaseRequestField:function(a){this.set_googleInappPurchaseRequestField(a);return this},clearGoogleInappPurchaseRequestField:function(){this.set_googleInappPurchaseRequestField(null)},hasGoogleInappPurchaseRequestField:function(){return null!=this.get_googleInappPurchaseRequestField()},set_googleInappPurchaseRequestField:function(a){return this.googleInappPurchaseRequestField=a},get_googleInappPurchaseRequestField:function(){return this.googleInappPurchaseRequestField},inappPurchaseResponseField:null,setInappPurchaseResponseField:function(a){this.set_inappPurchaseResponseField(a);return this},clearInappPurchaseResponseField:function(){this.set_inappPurchaseResponseField(null)},hasInappPurchaseResponseField:function(){return null!=this.get_inappPurchaseResponseField()},set_inappPurchaseResponseField:function(a){return this.inappPurchaseResponseField=a},get_inappPurchaseResponseField:function(){return this.inappPurchaseResponseField},activateTimedEventRequestField:null,setActivateTimedEventRequestField:function(a){this.set_activateTimedEventRequestField(a);return this},clearActivateTimedEventRequestField:function(){this.set_activateTimedEventRequestField(null)},hasActivateTimedEventRequestField:function(){return null!=this.get_activateTimedEventRequestField()},set_activateTimedEventRequestField:function(a){return this.activateTimedEventRequestField=a},get_activateTimedEventRequestField:function(){return this.activateTimedEventRequestField},activateTimedEventResponseField:null,setActivateTimedEventResponseField:function(a){this.set_activateTimedEventResponseField(a);return this},clearActivateTimedEventResponseField:function(){this.set_activateTimedEventResponseField(null)},hasActivateTimedEventResponseField:function(){return null!=this.get_activateTimedEventResponseField()},set_activateTimedEventResponseField:function(a){return this.activateTimedEventResponseField=a},get_activateTimedEventResponseField:function(){return this.activateTimedEventResponseField},walletUpdatesField:null,setWalletUpdatesField:function(a){this.set_walletUpdatesField(a);return this},clearWalletUpdatesField:function(){this.set_walletUpdatesField(null)},hasWalletUpdatesField:function(){return null!=this.get_walletUpdatesField()},set_walletUpdatesField:function(a){return this.walletUpdatesField=a},get_walletUpdatesField:function(){return this.walletUpdatesField},purchaseWalletUpdatesField:null,setPurchaseWalletUpdatesField:function(a){this.set_purchaseWalletUpdatesField(a);return this},clearPurchaseWalletUpdatesField:function(){this.set_purchaseWalletUpdatesField(null)},hasPurchaseWalletUpdatesField:function(){return null!=this.get_purchaseWalletUpdatesField()},set_purchaseWalletUpdatesField:function(a){return this.purchaseWalletUpdatesField=a},get_purchaseWalletUpdatesField:function(){return this.purchaseWalletUpdatesField},updateUserSettingsRequestField:null,setUpdateUserSettingsRequestField:function(a){this.set_updateUserSettingsRequestField(a);return this},clearUpdateUserSettingsRequestField:function(){this.set_updateUserSettingsRequestField(null)},hasUpdateUserSettingsRequestField:function(){return null!=this.get_updateUserSettingsRequestField()},set_updateUserSettingsRequestField:function(a){return this.updateUserSettingsRequestField=a},get_updateUserSettingsRequestField:function(){return this.updateUserSettingsRequestField},updateUserSettingsResponseField:null,setUpdateUserSettingsResponseField:function(a){this.set_updateUserSettingsResponseField(a);return this},clearUpdateUserSettingsResponseField:function(){this.set_updateUserSettingsResponseField(null)},hasUpdateUserSettingsResponseField:function(){return null!=this.get_updateUserSettingsResponseField()},set_updateUserSettingsResponseField:function(a){return this.updateUserSettingsResponseField=a},get_updateUserSettingsResponseField:function(){return this.updateUserSettingsResponseField},serverToServerGameOverWrapperField:null,setServerToServerGameOverWrapperField:function(a){this.set_serverToServerGameOverWrapperField(a);return this},clearServerToServerGameOverWrapperField:function(){this.set_serverToServerGameOverWrapperField(null)},hasServerToServerGameOverWrapperField:function(){return null!=this.get_serverToServerGameOverWrapperField()},set_serverToServerGameOverWrapperField:function(a){return this.serverToServerGameOverWrapperField=a},get_serverToServerGameOverWrapperField:function(){return this.serverToServerGameOverWrapperField},claimGiftsRequestField:null,setClaimGiftsRequestField:function(a){this.set_claimGiftsRequestField(a);return this},clearClaimGiftsRequestField:function(){this.set_claimGiftsRequestField(null)},hasClaimGiftsRequestField:function(){return null!=this.get_claimGiftsRequestField()},set_claimGiftsRequestField:function(a){return this.claimGiftsRequestField=a},get_claimGiftsRequestField:function(){return this.claimGiftsRequestField},claimGiftsResponseField:null,setClaimGiftsResponseField:function(a){this.set_claimGiftsResponseField(a);return this},clearClaimGiftsResponseField:function(){this.set_claimGiftsResponseField(null)},hasClaimGiftsResponseField:function(){return null!=this.get_claimGiftsResponseField()},set_claimGiftsResponseField:function(a){return this.claimGiftsResponseField=a},get_claimGiftsResponseField:function(){return this.claimGiftsResponseField},sendGiftsRequestField:null,setSendGiftsRequestField:function(a){this.set_sendGiftsRequestField(a);return this},clearSendGiftsRequestField:function(){this.set_sendGiftsRequestField(null)},hasSendGiftsRequestField:function(){return null!=this.get_sendGiftsRequestField()},set_sendGiftsRequestField:function(a){return this.sendGiftsRequestField=a},get_sendGiftsRequestField:function(){return this.sendGiftsRequestField},requestGiftsRequestField:null,setRequestGiftsRequestField:function(a){this.set_requestGiftsRequestField(a);return this},clearRequestGiftsRequestField:function(){this.set_requestGiftsRequestField(null)},hasRequestGiftsRequestField:function(){return null!=this.get_requestGiftsRequestField()},set_requestGiftsRequestField:function(a){return this.requestGiftsRequestField=a},get_requestGiftsRequestField:function(){return this.requestGiftsRequestField},writeToBuffer:function(a){l.writeTag(a,0,1);l.write__TYPE_ENUM(a,this.get_type());null!=this.get_loginRequestField()&&(l.writeTag(a,2,10),l.write__TYPE_MESSAGE(a,this.get_loginRequestField()));null!=this.get_loginResponseField()&&(l.writeTag(a,2,11),l.write__TYPE_MESSAGE(a,this.get_loginResponseField()));null!=this.get_realmUpgradeRequestField()&&(l.writeTag(a,2,12),l.write__TYPE_MESSAGE(a,this.get_realmUpgradeRequestField()));null!=this.get_realmUpgradeResponseField()&&(l.writeTag(a,2,13),l.write__TYPE_MESSAGE(a,this.get_realmUpgradeResponseField()));null!=this.get_disconnectField()&&(l.writeTag(a,2,20),l.write__TYPE_MESSAGE(a,this.get_disconnectField()));null!=this.get_pingField()&&(l.writeTag(a,2,30),l.write__TYPE_MESSAGE(a,this.get_pingField()));null!=this.get_pongField()&&(l.writeTag(a,2,31),l.write__TYPE_MESSAGE(a,this.get_pongField()));null!=this.get_udpHandshakeField()&&(l.writeTag(a,2,32),l.write__TYPE_MESSAGE(a,this.get_udpHandshakeField()));null!=this.get_enterGameRequestField()&&(l.writeTag(a,2,40),l.write__TYPE_MESSAGE(a,this.get_enterGameRequestField()));null!=this.get_activateBoostRequestField()&&(l.writeTag(a,2,42),l.write__TYPE_MESSAGE(a,this.get_activateBoostRequestField()));null!=this.get_activateBoostResponseField()&&(l.writeTag(a,2,43),l.write__TYPE_MESSAGE(a,this.get_activateBoostResponseField()));null!=this.get_directionVectorField()&&(l.writeTag(a,2,50),l.write__TYPE_MESSAGE(a,this.get_directionVectorField()));null!=this.get_leaderboardField()&&(l.writeTag(a,2,60),l.write__TYPE_MESSAGE(a,this.get_leaderboardField()));null!=this.get_arenaStateField()&&(l.writeTag(a,2,61),l.write__TYPE_MESSAGE(a,this.get_arenaStateField()));null!=this.get_gameOverField()&&(l.writeTag(a,2,62),l.write__TYPE_MESSAGE(a,this.get_gameOverField()));null!=this.get_softPurchaseRequestField()&&(l.writeTag(a,2,70),l.write__TYPE_MESSAGE(a,this.get_softPurchaseRequestField()));null!=this.get_softPurchaseResponseField()&&(l.writeTag(a,2,71),l.write__TYPE_MESSAGE(a,this.get_softPurchaseResponseField()));null!=this.get_appleInappPurchaseRequestField()&&(l.writeTag(a,2,72),l.write__TYPE_MESSAGE(a,this.get_appleInappPurchaseRequestField()));null!=this.get_googleInappPurchaseRequestField()&&(l.writeTag(a,2,73),l.write__TYPE_MESSAGE(a,this.get_googleInappPurchaseRequestField()));null!=this.get_inappPurchaseResponseField()&&(l.writeTag(a,2,74),l.write__TYPE_MESSAGE(a,this.get_inappPurchaseResponseField()));null!=this.get_activateTimedEventRequestField()&&(l.writeTag(a,2,75),l.write__TYPE_MESSAGE(a,this.get_activateTimedEventRequestField()));null!=this.get_activateTimedEventResponseField()&&(l.writeTag(a,2,76),l.write__TYPE_MESSAGE(a,this.get_activateTimedEventResponseField()));null!=this.get_walletUpdatesField()&&(l.writeTag(a,2,77),l.write__TYPE_MESSAGE(a,this.get_walletUpdatesField()));null!=this.get_purchaseWalletUpdatesField()&&(l.writeTag(a,2,78),l.write__TYPE_MESSAGE(a,this.get_purchaseWalletUpdatesField()));null!=this.get_updateUserSettingsRequestField()&&(l.writeTag(a,2,80),l.write__TYPE_MESSAGE(a,this.get_updateUserSettingsRequestField()));null!=this.get_updateUserSettingsResponseField()&&(l.writeTag(a,2,81),l.write__TYPE_MESSAGE(a,this.get_updateUserSettingsResponseField()));null!=this.get_serverToServerGameOverWrapperField()&&(l.writeTag(a,2,90),l.write__TYPE_MESSAGE(a,this.get_serverToServerGameOverWrapperField()));null!=this.get_claimGiftsRequestField()&&(l.writeTag(a,2,100),l.write__TYPE_MESSAGE(a,this.get_claimGiftsRequestField()));null!=this.get_claimGiftsResponseField()&&(l.writeTag(a,2,101),l.write__TYPE_MESSAGE(a,this.get_claimGiftsResponseField()));null!=this.get_sendGiftsRequestField()&&(l.writeTag(a,2,102),l.write__TYPE_MESSAGE(a,this.get_sendGiftsRequestField()));null!=this.get_requestGiftsRequestField()&&(l.writeTag(a,2,103),l.write__TYPE_MESSAGE(a,this.get_requestGiftsRequestField()));x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("type",this.get_type());null!=this.get_loginRequestField()&&a("loginRequestField",this.get_loginRequestField());null!=this.get_loginResponseField()&&a("loginResponseField",this.get_loginResponseField());null!=this.get_realmUpgradeRequestField()&&a("realmUpgradeRequestField",this.get_realmUpgradeRequestField());null!=this.get_realmUpgradeResponseField()&&a("realmUpgradeResponseField",this.get_realmUpgradeResponseField());null!=this.get_disconnectField()&&a("disconnectField",this.get_disconnectField());null!=this.get_pingField()&&a("pingField",this.get_pingField());null!=this.get_pongField()&&a("pongField",this.get_pongField());null!=this.get_udpHandshakeField()&&a("udpHandshakeField",this.get_udpHandshakeField());null!=this.get_enterGameRequestField()&&a("enterGameRequestField",this.get_enterGameRequestField());null!=this.get_activateBoostRequestField()&&a("activateBoostRequestField",this.get_activateBoostRequestField());null!=this.get_activateBoostResponseField()&&a("activateBoostResponseField",this.get_activateBoostResponseField());null!=this.get_directionVectorField()&&a("directionVectorField",this.get_directionVectorField());null!=this.get_leaderboardField()&&a("leaderboardField",this.get_leaderboardField());null!=this.get_arenaStateField()&&a("arenaStateField",this.get_arenaStateField());null!=this.get_gameOverField()&&a("gameOverField",this.get_gameOverField());null!=this.get_softPurchaseRequestField()&&a("softPurchaseRequestField",this.get_softPurchaseRequestField());null!=this.get_softPurchaseResponseField()&&a("softPurchaseResponseField",this.get_softPurchaseResponseField());null!=this.get_appleInappPurchaseRequestField()&&a("appleInappPurchaseRequestField",this.get_appleInappPurchaseRequestField());null!=this.get_googleInappPurchaseRequestField()&&a("googleInappPurchaseRequestField",this.get_googleInappPurchaseRequestField());null!=this.get_inappPurchaseResponseField()&&a("inappPurchaseResponseField",this.get_inappPurchaseResponseField());null!=this.get_activateTimedEventRequestField()&&a("activateTimedEventRequestField",this.get_activateTimedEventRequestField());null!=this.get_activateTimedEventResponseField()&&a("activateTimedEventResponseField",this.get_activateTimedEventResponseField());null!=this.get_walletUpdatesField()&&a("walletUpdatesField",this.get_walletUpdatesField());null!=this.get_purchaseWalletUpdatesField()&&a("purchaseWalletUpdatesField",this.get_purchaseWalletUpdatesField());null!=this.get_updateUserSettingsRequestField()&&a("updateUserSettingsRequestField",this.get_updateUserSettingsRequestField());null!=this.get_updateUserSettingsResponseField()&&a("updateUserSettingsResponseField",this.get_updateUserSettingsResponseField());null!=this.get_serverToServerGameOverWrapperField()&&a("serverToServerGameOverWrapperField",this.get_serverToServerGameOverWrapperField());null!=this.get_claimGiftsRequestField()&&a("claimGiftsRequestField",this.get_claimGiftsRequestField());null!=this.get_claimGiftsResponseField()&&a("claimGiftsResponseField",this.get_claimGiftsResponseField());null!=this.get_sendGiftsRequestField()&&a("sendGiftsRequestField",this.get_sendGiftsRequestField());null!=this.get_requestGiftsRequestField()&&a("requestGiftsRequestField",this.get_requestGiftsRequestField())},readFromSlice:function(a,b){for(var c=0,d=0,e=0,f=0,n=0,L=0,g=0,h=0,l=0,k=0,w=0,q=0,p=0,t=0,u=0,z=0,I=0,v=0,y=0,A=0,F=0,D=0,E=0,C=0,G=0,H=0,J=0,K=0,M=0,N=0,O=0,P=0;a.buf.totlen-a.buf.pos>b;){var S=r.read__TYPE_UINT32(a);switch(S>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Req.type cannot be set twice."));++c;this.set_type(r.read__TYPE_ENUM(a));break;case 10:if(0!=d)throw new m(new B("Bad data format: Req.loginRequestField cannot be set twice."));++d;this.set_loginRequestField(new Ne);r.read__TYPE_MESSAGE(a,this.get_loginRequestField());break;case 11:if(0!=e)throw new m(new B("Bad data format: Req.loginResponseField cannot be set twice."));++e;this.set_loginResponseField(new Vf);r.read__TYPE_MESSAGE(a,this.get_loginResponseField());break;case 12:if(0!=f)throw new m(new B("Bad data format: Req.realmUpgradeRequestField cannot be set twice."));++f;this.set_realmUpgradeRequestField(new Dh);r.read__TYPE_MESSAGE(a,this.get_realmUpgradeRequestField());break;case 13:if(0!=n)throw new m(new B("Bad data format: Req.realmUpgradeResponseField cannot be set twice."));++n;this.set_realmUpgradeResponseField(new Eh);r.read__TYPE_MESSAGE(a,this.get_realmUpgradeResponseField());break;case 20:if(0!=L)throw new m(new B("Bad data format: Req.disconnectField cannot be set twice."));++L;this.set_disconnectField(new Of);r.read__TYPE_MESSAGE(a,this.get_disconnectField());break;case 30:if(0!=g)throw new m(new B("Bad data format: Req.pingField cannot be set twice."));++g;this.set_pingField(new Oe);r.read__TYPE_MESSAGE(a,this.get_pingField());break;case 31:if(0!=h)throw new m(new B("Bad data format: Req.pongField cannot be set twice."));++h;this.set_pongField(new Pe);r.read__TYPE_MESSAGE(a,this.get_pongField());break;case 32:if(0!=l)throw new m(new B("Bad data format: Req.udpHandshakeField cannot be set twice."));++l;this.set_udpHandshakeField(new Fh);r.read__TYPE_MESSAGE(a,this.get_udpHandshakeField());break;case 40:if(0!=k)throw new m(new B("Bad data format: Req.enterGameRequestField cannot be set twice."));++k;this.set_enterGameRequestField(new xh);r.read__TYPE_MESSAGE(a,this.get_enterGameRequestField());break;case 42:if(0!=w)throw new m(new B("Bad data format: Req.activateBoostRequestField cannot be set twice."));++w;this.set_activateBoostRequestField(new Ie);r.read__TYPE_MESSAGE(a,this.get_activateBoostRequestField());break;case 43:if(0!=q)throw new m(new B("Bad data format: Req.activateBoostResponseField cannot be set twice."));++q;this.set_activateBoostResponseField(new Je);r.read__TYPE_MESSAGE(a,this.get_activateBoostResponseField());break;case 50:if(0!=p)throw new m(new B("Bad data format: Req.directionVectorField cannot be set twice."));++p;this.set_directionVectorField(new wh);r.read__TYPE_MESSAGE(a,this.get_directionVectorField());break;case 60:if(0!=t)throw new m(new B("Bad data format: Req.leaderboardField cannot be set twice."));++t;this.set_leaderboardField(new Ah);r.read__TYPE_MESSAGE(a,this.get_leaderboardField());break;case 61:if(0!=u)throw new m(new B("Bad data format: Req.arenaStateField cannot be set twice."));++u;this.set_arenaStateField(new sh);r.read__TYPE_MESSAGE(a,this.get_arenaStateField());break;case 62:if(0!=z)throw new m(new B("Bad data format: Req.gameOverField cannot be set twice."));++z;this.set_gameOverField(new Qf);r.read__TYPE_MESSAGE(a,this.get_gameOverField());break;case 70:if(0!=I)throw new m(new B("Bad data format: Req.softPurchaseRequestField cannot be set twice."));++I;this.set_softPurchaseRequestField(new Qe);r.read__TYPE_MESSAGE(a,this.get_softPurchaseRequestField());break;case 71:if(0!=v)throw new m(new B("Bad data format: Req.softPurchaseResponseField cannot be set twice."));++v;this.set_softPurchaseResponseField(new Xf);r.read__TYPE_MESSAGE(a,this.get_softPurchaseResponseField());break;case 72:if(0!=y)throw new m(new B("Bad data format: Req.appleInappPurchaseRequestField cannot be set twice."));++y;this.set_appleInappPurchaseRequestField(new rh);r.read__TYPE_MESSAGE(a,this.get_appleInappPurchaseRequestField());break;case 73:if(0!=A)throw new m(new B("Bad data format: Req.googleInappPurchaseRequestField cannot be set twice."));++A;this.set_googleInappPurchaseRequestField(new yh);r.read__TYPE_MESSAGE(a,this.get_googleInappPurchaseRequestField());break;case 74:if(0!=F)throw new m(new B("Bad data format: Req.inappPurchaseResponseField cannot be set twice."));++F;this.set_inappPurchaseResponseField(new zh);r.read__TYPE_MESSAGE(a,this.get_inappPurchaseResponseField());break;case 75:if(0!=D)throw new m(new B("Bad data format: Req.activateTimedEventRequestField cannot be set twice."));++D;this.set_activateTimedEventRequestField(new Ke);r.read__TYPE_MESSAGE(a,this.get_activateTimedEventRequestField());break;case 76:if(0!=E)throw new m(new B("Bad data format: Req.activateTimedEventResponseField cannot be set twice."));++E;this.set_activateTimedEventResponseField(new qh);r.read__TYPE_MESSAGE(a,this.get_activateTimedEventResponseField());break;case 77:if(0!=C)throw new m(new B("Bad data format: Req.walletUpdatesField cannot be set twice."));++C;this.set_walletUpdatesField(new $d);r.read__TYPE_MESSAGE(a,this.get_walletUpdatesField());break;case 78:if(0!=G)throw new m(new B("Bad data format: Req.purchaseWalletUpdatesField cannot be set twice."));++G;this.set_purchaseWalletUpdatesField(new Wf);r.read__TYPE_MESSAGE(a,this.get_purchaseWalletUpdatesField());break;case 80:if(0!=H)throw new m(new B("Bad data format: Req.updateUserSettingsRequestField cannot be set twice."));++H;this.set_updateUserSettingsRequestField(new Re);r.read__TYPE_MESSAGE(a,this.get_updateUserSettingsRequestField());break;case 81:if(0!=J)throw new m(new B("Bad data format: Req.updateUserSettingsResponseField cannot be set twice."));++J;this.set_updateUserSettingsResponseField(new Gh);r.read__TYPE_MESSAGE(a,this.get_updateUserSettingsResponseField());break;case 90:if(0!=K)throw new m(new B("Bad data format: Req.serverToServerGameOverWrapperField cannot be set twice."));++K;this.set_serverToServerGameOverWrapperField(new Hh);r.read__TYPE_MESSAGE(a,this.get_serverToServerGameOverWrapperField());break;case 100:if(0!=M)throw new m(new B("Bad data format: Req.claimGiftsRequestField cannot be set twice."));++M;this.set_claimGiftsRequestField(new uh);r.read__TYPE_MESSAGE(a,this.get_claimGiftsRequestField());break;case 101:if(0!=N)throw new m(new B("Bad data format: Req.claimGiftsResponseField cannot be set twice."));++N;this.set_claimGiftsResponseField(new vh);r.read__TYPE_MESSAGE(a,this.get_claimGiftsResponseField());break;case 102:if(0!=O)throw new m(new B("Bad data format: Req.sendGiftsRequestField cannot be set twice."));++O;this.set_sendGiftsRequestField(new Ih);r.read__TYPE_MESSAGE(a,this.get_sendGiftsRequestField());break;case 103:if(0!=P)throw new m(new B("Bad data format: Req.requestGiftsRequestField cannot be set twice."));++P;this.set_requestGiftsRequestField(new Jh);r.read__TYPE_MESSAGE(a,this.get_requestGiftsRequestField());break;default:x.prototype.readUnknown.call(this,a,S)}}},__class__:Me,__properties__:{set_requestGiftsRequestField:"set_requestGiftsRequestField",get_requestGiftsRequestField:"get_requestGiftsRequestField",set_sendGiftsRequestField:"set_sendGiftsRequestField",get_sendGiftsRequestField:"get_sendGiftsRequestField",set_claimGiftsResponseField:"set_claimGiftsResponseField",get_claimGiftsResponseField:"get_claimGiftsResponseField",set_claimGiftsRequestField:"set_claimGiftsRequestField",get_claimGiftsRequestField:"get_claimGiftsRequestField",set_serverToServerGameOverWrapperField:"set_serverToServerGameOverWrapperField",get_serverToServerGameOverWrapperField:"get_serverToServerGameOverWrapperField",set_updateUserSettingsResponseField:"set_updateUserSettingsResponseField",get_updateUserSettingsResponseField:"get_updateUserSettingsResponseField",set_updateUserSettingsRequestField:"set_updateUserSettingsRequestField",get_updateUserSettingsRequestField:"get_updateUserSettingsRequestField",set_purchaseWalletUpdatesField:"set_purchaseWalletUpdatesField",get_purchaseWalletUpdatesField:"get_purchaseWalletUpdatesField",set_walletUpdatesField:"set_walletUpdatesField",get_walletUpdatesField:"get_walletUpdatesField",set_activateTimedEventResponseField:"set_activateTimedEventResponseField",get_activateTimedEventResponseField:"get_activateTimedEventResponseField",set_activateTimedEventRequestField:"set_activateTimedEventRequestField",get_activateTimedEventRequestField:"get_activateTimedEventRequestField",set_inappPurchaseResponseField:"set_inappPurchaseResponseField",get_inappPurchaseResponseField:"get_inappPurchaseResponseField",set_googleInappPurchaseRequestField:"set_googleInappPurchaseRequestField",get_googleInappPurchaseRequestField:"get_googleInappPurchaseRequestField",set_appleInappPurchaseRequestField:"set_appleInappPurchaseRequestField",get_appleInappPurchaseRequestField:"get_appleInappPurchaseRequestField",set_softPurchaseResponseField:"set_softPurchaseResponseField",get_softPurchaseResponseField:"get_softPurchaseResponseField",set_softPurchaseRequestField:"set_softPurchaseRequestField",get_softPurchaseRequestField:"get_softPurchaseRequestField",set_gameOverField:"set_gameOverField",get_gameOverField:"get_gameOverField",set_arenaStateField:"set_arenaStateField",get_arenaStateField:"get_arenaStateField",set_leaderboardField:"set_leaderboardField",get_leaderboardField:"get_leaderboardField",set_directionVectorField:"set_directionVectorField",get_directionVectorField:"get_directionVectorField",set_activateBoostResponseField:"set_activateBoostResponseField",get_activateBoostResponseField:"get_activateBoostResponseField",set_activateBoostRequestField:"set_activateBoostRequestField",get_activateBoostRequestField:"get_activateBoostRequestField",set_enterGameRequestField:"set_enterGameRequestField",get_enterGameRequestField:"get_enterGameRequestField",set_udpHandshakeField:"set_udpHandshakeField",get_udpHandshakeField:"get_udpHandshakeField",set_pongField:"set_pongField",get_pongField:"get_pongField",set_pingField:"set_pingField",get_pingField:"get_pingField",set_disconnectField:"set_disconnectField",get_disconnectField:"get_disconnectField",set_realmUpgradeResponseField:"set_realmUpgradeResponseField",get_realmUpgradeResponseField:"get_realmUpgradeResponseField",set_realmUpgradeRequestField:"set_realmUpgradeRequestField",get_realmUpgradeRequestField:"get_realmUpgradeRequestField",set_loginResponseField:"set_loginResponseField",get_loginResponseField:"get_loginResponseField",set_loginRequestField:"set_loginRequestField",get_loginRequestField:"get_loginRequestField",set_type:"set_type",get_type:"get_type"}});var Jh=function(){this.set_giftRequestIds([])};g["agario.proto.Request_gifts_request"]=Jh;Jh.__name__=["agario","proto","Request_gifts_request"];Jh.__super__=x;Jh.prototype=t(x.prototype,{giftRequestIds:null,setGiftRequestIds:function(a){this.set_giftRequestIds(a);return this},set_giftRequestIds:function(a){return this.giftRequestIds=a},get_giftRequestIds:function(){return this.giftRequestIds},addGiftRequestIds:function(a){null==this.get_giftRequestIds()?this.set_giftRequestIds([a]):this.get_giftRequestIds().push(a)},writeToBuffer:function(a){if(null!=this.get_giftRequestIds())for(var b=0,c=this.get_giftRequestIds();b<c.length;){var d=c[b];++b;l.writeTag(a,2,1);l.write__TYPE_STRING(a,d)}x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){null!=this.get_giftRequestIds()&&0<this.get_giftRequestIds().length&&a("giftRequestIds",this.get_giftRequestIds())},readFromSlice:function(a,b){for(;a.buf.totlen-a.buf.pos>b;){var c=r.read__TYPE_UINT32(a);switch(c>>3){case 1:null==this.get_giftRequestIds()&&this.set_giftRequestIds([]);this.get_giftRequestIds().push(r.read__TYPE_STRING(a));break;default:x.prototype.readUnknown.call(this,a,c)}}},__class__:Jh,__properties__:{set_giftRequestIds:"set_giftRequestIds",get_giftRequestIds:"get_giftRequestIds"}});var Ih=function(){this.set_giftIds([])};g["agario.proto.Send_gifts_request"]=Ih;Ih.__name__=["agario","proto","Send_gifts_request"];Ih.__super__=x;Ih.prototype=t(x.prototype,{giftIds:null,setGiftIds:function(a){this.set_giftIds(a);return this},set_giftIds:function(a){return this.giftIds=a},get_giftIds:function(){return this.giftIds},addGiftIds:function(a){null==this.get_giftIds()?this.set_giftIds([a]):this.get_giftIds().push(a)},writeToBuffer:function(a){if(null!=this.get_giftIds())for(var b=0,c=this.get_giftIds();b<c.length;){var d=c[b];++b;l.writeTag(a,2,1);l.write__TYPE_STRING(a,d)}x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){null!=this.get_giftIds()&&0<this.get_giftIds().length&&a("giftIds",this.get_giftIds())},readFromSlice:function(a,b){for(;a.buf.totlen-a.buf.pos>b;){var c=r.read__TYPE_UINT32(a);switch(c>>3){case 1:null==this.get_giftIds()&&this.set_giftIds([]);this.get_giftIds().push(r.read__TYPE_STRING(a));break;default:x.prototype.readUnknown.call(this,a,c)}}},__class__:Ih,__properties__:{set_giftIds:"set_giftIds",get_giftIds:"get_giftIds"}});var Rf=function(){this.set_host("");this.set_tcpPort(0);this.set_udpPort(0)};g["agario.proto.Server_info"]=Rf;Rf.__name__=["agario","proto","Server_info"];Rf.__super__=x;Rf.prototype=t(x.prototype,{host:null,setHost:function(a){this.set_host(a);return this},set_host:function(a){return this.host=a},get_host:function(){return this.host},tcpPort:null,setTcpPort:function(a){this.set_tcpPort(a);return this},set_tcpPort:function(a){return this.tcpPort=a},get_tcpPort:function(){return this.tcpPort},udpPort:null,setUdpPort:function(a){this.set_udpPort(a);return this},set_udpPort:function(a){return this.udpPort=a},get_udpPort:function(){return this.udpPort},writeToBuffer:function(a){l.writeTag(a,2,1);l.write__TYPE_STRING(a,this.get_host());l.writeTag(a,0,2);l.write__TYPE_UINT32(a,this.get_tcpPort());l.writeTag(a,0,3);l.write__TYPE_UINT32(a,this.get_udpPort());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("host",this.get_host());a("tcpPort",this.get_tcpPort());a("udpPort",this.get_udpPort())},readFromSlice:function(a,b){for(var c=0,d=0,e=0;a.buf.totlen-a.buf.pos>b;){var f=r.read__TYPE_UINT32(a);switch(f>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Server_info.host cannot be set twice."));++c;this.set_host(r.read__TYPE_STRING(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: Server_info.tcpPort cannot be set twice."));++d;this.set_tcpPort(r.read__TYPE_UINT32(a));break;case 3:if(0!=e)throw new m(new B("Bad data format: Server_info.udpPort cannot be set twice."));++e;this.set_udpPort(r.read__TYPE_UINT32(a));break;default:x.prototype.readUnknown.call(this,a,f)}}},__class__:Rf,__properties__:{set_udpPort:"set_udpPort",get_udpPort:"get_udpPort",set_tcpPort:"set_tcpPort",get_tcpPort:"get_tcpPort",set_host:"set_host",get_host:"get_host"}});var Hh=function(){this.set_hashVerifier("");this.set_serverToServerGameOver(this.defaultBytes())};g["agario.proto.Server_to_server_game_over_wrapper"]=Hh;Hh.__name__=["agario","proto","Server_to_server_game_over_wrapper"];Hh.__super__=x;Hh.prototype=t(x.prototype,{hashVerifier:null,setHashVerifier:function(a){this.set_hashVerifier(a);return this},set_hashVerifier:function(a){return this.hashVerifier=a},get_hashVerifier:function(){return this.hashVerifier},serverToServerGameOver:null,setServerToServerGameOver:function(a){this.set_serverToServerGameOver(a);return this},set_serverToServerGameOver:function(a){return this.serverToServerGameOver=a},get_serverToServerGameOver:function(){return this.serverToServerGameOver},writeToBuffer:function(a){l.writeTag(a,2,1);l.write__TYPE_STRING(a,this.get_hashVerifier());l.writeTag(a,2,2);l.write__TYPE_BYTES(a,this.get_serverToServerGameOver());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("hashVerifier",this.get_hashVerifier());a("serverToServerGameOver",this.get_serverToServerGameOver())},readFromSlice:function(a,b){for(var c=0,d=0;a.buf.totlen-a.buf.pos>b;){var e=r.read__TYPE_UINT32(a);switch(e>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Server_to_server_game_over_wrapper.hashVerifier cannot be set twice."));++c;this.set_hashVerifier(r.read__TYPE_STRING(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: Server_to_server_game_over_wrapper.serverToServerGameOver cannot be set twice."));++d;this.set_serverToServerGameOver(r.read__TYPE_BYTES(a));break;default:x.prototype.readUnknown.call(this,a,e)}}},__class__:Hh,__properties__:{set_serverToServerGameOver:"set_serverToServerGameOver",get_serverToServerGameOver:"get_serverToServerGameOver",set_hashVerifier:"set_hashVerifier",get_hashVerifier:"get_hashVerifier"}});var Qe=function(){this.set_purchaseId("")};g["agario.proto.Soft_purchase_request"]=Qe;Qe.__name__=["agario","proto","Soft_purchase_request"];Qe.__super__=x;Qe.prototype=t(x.prototype,{purchaseId:null,setPurchaseId:function(a){this.set_purchaseId(a);return this},set_purchaseId:function(a){return this.purchaseId=a},get_purchaseId:function(){return this.purchaseId},writeToBuffer:function(a){l.writeTag(a,2,1);l.write__TYPE_STRING(a,this.get_purchaseId());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("purchaseId",this.get_purchaseId())},readFromSlice:function(a,b){for(var c=0;a.buf.totlen-a.buf.pos>b;){var d=r.read__TYPE_UINT32(a);switch(d>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Soft_purchase_request.purchaseId cannot be set twice."));++c;this.set_purchaseId(r.read__TYPE_STRING(a));break;default:x.prototype.readUnknown.call(this,a,d)}}},__class__:Qe,__properties__:{set_purchaseId:"set_purchaseId",get_purchaseId:"get_purchaseId"}});var Xf=function(){this.set_result(0);this.set_purchaseId("");this.set_productUpdates([])};g["agario.proto.Soft_purchase_response"]=Xf;Xf.__name__=["agario","proto","Soft_purchase_response"];Xf.__super__=x;Xf.prototype=t(x.prototype,{result:null,setResult:function(a){this.set_result(a);return this},set_result:function(a){return this.result=a},get_result:function(){return this.result},purchaseId:null,setPurchaseId:function(a){this.set_purchaseId(a);return this},set_purchaseId:function(a){return this.purchaseId=a},get_purchaseId:function(){return this.purchaseId},productUpdates:null,setProductUpdates:function(a){this.set_productUpdates(a);return this},set_productUpdates:function(a){return this.productUpdates=a},get_productUpdates:function(){return this.productUpdates},addProductUpdates:function(a){null==this.get_productUpdates()?this.set_productUpdates([a]):this.get_productUpdates().push(a)},writeToBuffer:function(a){l.writeTag(a,0,1);l.write__TYPE_ENUM(a,this.get_result());l.writeTag(a,2,2);l.write__TYPE_STRING(a,this.get_purchaseId());if(null!=this.get_productUpdates())for(var b=0,c=this.get_productUpdates();b<c.length;){var d=c[b];++b;l.writeTag(a,2,3);l.write__TYPE_MESSAGE(a,d)}x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("result",this.get_result());a("purchaseId",this.get_purchaseId());null!=this.get_productUpdates()&&0<this.get_productUpdates().length&&a("productUpdates",this.get_productUpdates())},readFromSlice:function(a,b){for(var c=0,d=0;a.buf.totlen-a.buf.pos>b;){var e=r.read__TYPE_UINT32(a);switch(e>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Soft_purchase_response.result cannot be set twice."));++c;this.set_result(r.read__TYPE_ENUM(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: Soft_purchase_response.purchaseId cannot be set twice."));++d;this.set_purchaseId(r.read__TYPE_STRING(a));break;case 3:null==this.get_productUpdates()&&this.set_productUpdates([]);this.get_productUpdates().push(r.read__TYPE_MESSAGE(a,new Pc));break;default:x.prototype.readUnknown.call(this,a,e)}}},__class__:Xf,__properties__:{set_productUpdates:"set_productUpdates",get_productUpdates:"get_productUpdates",set_purchaseId:"set_purchaseId",get_purchaseId:"get_purchaseId",set_result:"set_result",get_result:"get_result"}});var Uf=function(){this.set_isAvailable(!1);this.set_wasHandedOut(!1)};g["agario.proto.Soft_upgrade"]=Uf;Uf.__name__=["agario","proto","Soft_upgrade"];Uf.__super__=x;Uf.prototype=t(x.prototype,{isAvailable:null,setIsAvailable:function(a){this.set_isAvailable(a);return this},set_isAvailable:function(a){return this.isAvailable=a},get_isAvailable:function(){return this.isAvailable},wasHandedOut:null,setWasHandedOut:function(a){this.set_wasHandedOut(a);return this},set_wasHandedOut:function(a){return this.wasHandedOut=a},get_wasHandedOut:function(){return this.wasHandedOut},writeToBuffer:function(a){l.writeTag(a,0,1);l.write__TYPE_BOOL(a,this.get_isAvailable());l.writeTag(a,0,2);l.write__TYPE_BOOL(a,this.get_wasHandedOut());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("isAvailable",this.get_isAvailable());a("wasHandedOut",this.get_wasHandedOut())},readFromSlice:function(a,b){for(var c=0,d=0;a.buf.totlen-a.buf.pos>b;){var e=r.read__TYPE_UINT32(a);switch(e>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Soft_upgrade.isAvailable cannot be set twice."));++c;this.set_isAvailable(r.read__TYPE_BOOL(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: Soft_upgrade.wasHandedOut cannot be set twice."));++d;this.set_wasHandedOut(r.read__TYPE_BOOL(a));break;default:x.prototype.readUnknown.call(this,a,e)}}},__class__:Uf,__properties__:{set_wasHandedOut:"set_wasHandedOut",get_wasHandedOut:"get_wasHandedOut",set_isAvailable:"set_isAvailable",get_isAvailable:"get_isAvailable"}});var Fh=function(){this.set_token("")};g["agario.proto.Udp_handshake"]=Fh;Fh.__name__=["agario","proto","Udp_handshake"];Fh.__super__=x;Fh.prototype=t(x.prototype,{token:null,setToken:function(a){this.set_token(a);return this},set_token:function(a){return this.token=a},get_token:function(){return this.token},writeToBuffer:function(a){l.writeTag(a,2,1);l.write__TYPE_STRING(a,this.get_token());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("token",this.get_token())},readFromSlice:function(a,b){for(var c=0;a.buf.totlen-a.buf.pos>b;){var d=r.read__TYPE_UINT32(a);switch(d>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Udp_handshake.token cannot be set twice."));++c;this.set_token(r.read__TYPE_STRING(a));break;default:x.prototype.readUnknown.call(this,a,d)}}},__class__:Fh,__properties__:{set_token:"set_token",get_token:"get_token"}});var Re=function(){this.set_userSettingsUpdates([])};g["agario.proto.Update_user_settings_request"]=Re;Re.__name__=["agario","proto","Update_user_settings_request"];Re.__super__=x;Re.prototype=t(x.prototype,{userSettingsUpdates:null,setUserSettingsUpdates:function(a){this.set_userSettingsUpdates(a);return this},set_userSettingsUpdates:function(a){return this.userSettingsUpdates=a},get_userSettingsUpdates:function(){return this.userSettingsUpdates},addUserSettingsUpdates:function(a){null==this.get_userSettingsUpdates()?this.set_userSettingsUpdates([a]):this.get_userSettingsUpdates().push(a)},writeToBuffer:function(a){if(null!=this.get_userSettingsUpdates())for(var b=0,c=this.get_userSettingsUpdates();b<c.length;){var d=c[b];++b;l.writeTag(a,2,1);l.write__TYPE_MESSAGE(a,d)}x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){null!=this.get_userSettingsUpdates()&&0<this.get_userSettingsUpdates().length&&a("userSettingsUpdates",this.get_userSettingsUpdates())},readFromSlice:function(a,b){for(;a.buf.totlen-a.buf.pos>b;){var c=r.read__TYPE_UINT32(a);switch(c>>3){case 1:null==this.get_userSettingsUpdates()&&this.set_userSettingsUpdates([]);this.get_userSettingsUpdates().push(r.read__TYPE_MESSAGE(a,new Zd));break;default:x.prototype.readUnknown.call(this,a,c)}}},__class__:Re,__properties__:{set_userSettingsUpdates:"set_userSettingsUpdates",get_userSettingsUpdates:"get_userSettingsUpdates"}});var Gh=function(){this.set_updatedUserSettings([])};g["agario.proto.Update_user_settings_response"]=Gh;Gh.__name__=["agario","proto","Update_user_settings_response"];Gh.__super__=x;Gh.prototype=t(x.prototype,{updatedUserSettings:null,setUpdatedUserSettings:function(a){this.set_updatedUserSettings(a);return this},set_updatedUserSettings:function(a){return this.updatedUserSettings=a},get_updatedUserSettings:function(){return this.updatedUserSettings},addUpdatedUserSettings:function(a){null==this.get_updatedUserSettings()?this.set_updatedUserSettings([a]):this.get_updatedUserSettings().push(a)},writeToBuffer:function(a){if(null!=this.get_updatedUserSettings())for(var b=0,c=this.get_updatedUserSettings();b<c.length;){var d=c[b];++b;l.writeTag(a,2,1);l.write__TYPE_MESSAGE(a,d)}x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){null!=this.get_updatedUserSettings()&&0<this.get_updatedUserSettings().length&&a("updatedUserSettings",this.get_updatedUserSettings())},readFromSlice:function(a,b){for(;a.buf.totlen-a.buf.pos>b;){var c=r.read__TYPE_UINT32(a);switch(c>>3){case 1:null==this.get_updatedUserSettings()&&this.set_updatedUserSettings([]);this.get_updatedUserSettings().push(r.read__TYPE_MESSAGE(a,new Zd));break;default:x.prototype.readUnknown.call(this,a,c)}}},__class__:Gh,__properties__:{set_updatedUserSettings:"set_updatedUserSettings",get_updatedUserSettings:"get_updatedUserSettings"}});var Xd=function(){this.set_productId("");this.set_expiresInSeconds(0)};g["agario.proto.User_boost_item"]=Xd;Xd.__name__=["agario","proto","User_boost_item"];Xd.__super__=x;Xd.prototype=t(x.prototype,{productId:null,setProductId:function(a){this.set_productId(a);return this},set_productId:function(a){return this.productId=a},get_productId:function(){return this.productId},expiresInSeconds:null,setExpiresInSeconds:function(a){this.set_expiresInSeconds(a);return this},set_expiresInSeconds:function(a){return this.expiresInSeconds=a},get_expiresInSeconds:function(){return this.expiresInSeconds},writeToBuffer:function(a){l.writeTag(a,2,1);l.write__TYPE_STRING(a,this.get_productId());l.writeTag(a,0,2);l.write__TYPE_UINT32(a,this.get_expiresInSeconds());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("productId",this.get_productId());a("expiresInSeconds",this.get_expiresInSeconds())},readFromSlice:function(a,b){for(var c=0,d=0;a.buf.totlen-a.buf.pos>b;){var e=r.read__TYPE_UINT32(a);switch(e>>3){case 1:if(0!=c)throw new m(new B("Bad data format: User_boost_item.productId cannot be set twice."));++c;this.set_productId(r.read__TYPE_STRING(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: User_boost_item.expiresInSeconds cannot be set twice."));++d;this.set_expiresInSeconds(r.read__TYPE_UINT32(a));break;default:x.prototype.readUnknown.call(this,a,e)}}},__class__:Xd,__properties__:{set_expiresInSeconds:"set_expiresInSeconds",get_expiresInSeconds:"get_expiresInSeconds",set_productId:"set_productId",get_productId:"get_productId"}});var Pc=function(){this.set_type(0)};g["agario.proto.User_data_update"]=Pc;Pc.__name__=["agario","proto","User_data_update"];Pc.__super__=x;Pc.prototype=t(x.prototype,{type:null,setType:function(a){this.set_type(a);return this},set_type:function(a){return this.type=a},get_type:function(){return this.type},xpLevelField:null,setXpLevelField:function(a){this.set_xpLevelField(a);return this},clearXpLevelField:function(){this.set_xpLevelField(null)},hasXpLevelField:function(){return null!=this.get_xpLevelField()},set_xpLevelField:function(a){return this.xpLevelField=a},get_xpLevelField:function(){return this.xpLevelField},productField:null,setProductField:function(a){this.set_productField(a);return this},clearProductField:function(){this.set_productField(null)},hasProductField:function(){return null!=this.get_productField()},set_productField:function(a){return this.productField=a},get_productField:function(){return this.productField},writeToBuffer:function(a){l.writeTag(a,0,1);l.write__TYPE_ENUM(a,this.get_type());null!=this.get_xpLevelField()&&(l.writeTag(a,2,10),l.write__TYPE_MESSAGE(a,this.get_xpLevelField()));null!=this.get_productField()&&(l.writeTag(a,2,20),l.write__TYPE_MESSAGE(a,this.get_productField()));x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("type",this.get_type());null!=this.get_xpLevelField()&&a("xpLevelField",this.get_xpLevelField());null!=this.get_productField()&&a("productField",this.get_productField())},readFromSlice:function(a,b){for(var c=0,d=0,e=0;a.buf.totlen-a.buf.pos>b;){var f=r.read__TYPE_UINT32(a);switch(f>>3){case 1:if(0!=c)throw new m(new B("Bad data format: User_data_update.type cannot be set twice."));++c;this.set_type(r.read__TYPE_ENUM(a));break;case 10:if(0!=d)throw new m(new B("Bad data format: User_data_update.xpLevelField cannot be set twice."));++d;this.set_xpLevelField(new Kh);r.read__TYPE_MESSAGE(a,this.get_xpLevelField());break;case 20:if(0!=e)throw new m(new B("Bad data format: User_data_update.productField cannot be set twice."));++e;this.set_productField(new Ch);r.read__TYPE_MESSAGE(a,this.get_productField());break;default:x.prototype.readUnknown.call(this,a,f)}}},__class__:Pc,__properties__:{set_productField:"set_productField",get_productField:"get_productField",set_xpLevelField:"set_xpLevelField",get_xpLevelField:"get_xpLevelField",set_type:"set_type",get_type:"get_type"}});var Lh=function(){this.set_facebookIdFrom("");this.set_productId("");this.set_amount(0)};g["agario.proto.User_gift"]=Lh;Lh.__name__=["agario","proto","User_gift"];Lh.__super__=x;Lh.prototype=t(x.prototype,{facebookIdFrom:null,setFacebookIdFrom:function(a){this.set_facebookIdFrom(a);return this},set_facebookIdFrom:function(a){return this.facebookIdFrom=a},get_facebookIdFrom:function(){return this.facebookIdFrom},productId:null,setProductId:function(a){this.set_productId(a);return this},set_productId:function(a){return this.productId=a},get_productId:function(){return this.productId},amount:null,setAmount:function(a){this.set_amount(a);return this},set_amount:function(a){return this.amount=a},get_amount:function(){return this.amount},writeToBuffer:function(a){l.writeTag(a,2,1);l.write__TYPE_STRING(a,this.get_facebookIdFrom());l.writeTag(a,2,2);l.write__TYPE_STRING(a,this.get_productId());l.writeTag(a,0,3);l.write__TYPE_UINT32(a,this.get_amount());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("facebookIdFrom",this.get_facebookIdFrom());a("productId",this.get_productId());a("amount",this.get_amount())},readFromSlice:function(a,b){for(var c=0,d=0,e=0;a.buf.totlen-a.buf.pos>b;){var f=r.read__TYPE_UINT32(a);switch(f>>3){case 1:if(0!=c)throw new m(new B("Bad data format: User_gift.facebookIdFrom cannot be set twice."));++c;this.set_facebookIdFrom(r.read__TYPE_STRING(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: User_gift.productId cannot be set twice."));++d;this.set_productId(r.read__TYPE_STRING(a));break;case 3:if(0!=e)throw new m(new B("Bad data format: User_gift.amount cannot be set twice."));++e;this.set_amount(r.read__TYPE_UINT32(a));break;default:x.prototype.readUnknown.call(this,a,f)}}},__class__:Lh,__properties__:{set_amount:"set_amount",get_amount:"get_amount",set_productId:"set_productId",get_productId:"get_productId",set_facebookIdFrom:"set_facebookIdFrom",get_facebookIdFrom:"get_facebookIdFrom"}});var Tf=function(){this.set_claimable([]);this.set_sentTo([]);this.set_claimedFrom([]);this.set_requestedTo([]);this.set_requestedFrom([])};g["agario.proto.User_gifts"]=Tf;Tf.__name__=["agario","proto","User_gifts"];Tf.__super__=x;Tf.prototype=t(x.prototype,{claimable:null,setClaimable:function(a){this.set_claimable(a);return this},set_claimable:function(a){return this.claimable=a},get_claimable:function(){return this.claimable},addClaimable:function(a){null==this.get_claimable()?this.set_claimable([a]):this.get_claimable().push(a)},sentTo:null,setSentTo:function(a){this.set_sentTo(a);return this},set_sentTo:function(a){return this.sentTo=a},get_sentTo:function(){return this.sentTo},addSentTo:function(a){null==this.get_sentTo()?this.set_sentTo([a]):this.get_sentTo().push(a)},claimedFrom:null,setClaimedFrom:function(a){this.set_claimedFrom(a);return this},set_claimedFrom:function(a){return this.claimedFrom=a},get_claimedFrom:function(){return this.claimedFrom},addClaimedFrom:function(a){null==this.get_claimedFrom()?this.set_claimedFrom([a]):this.get_claimedFrom().push(a)},requestedTo:null,setRequestedTo:function(a){this.set_requestedTo(a);return this},set_requestedTo:function(a){return this.requestedTo=a},get_requestedTo:function(){return this.requestedTo},addRequestedTo:function(a){null==this.get_requestedTo()?this.set_requestedTo([a]):this.get_requestedTo().push(a)},requestedFrom:null,setRequestedFrom:function(a){this.set_requestedFrom(a);return this},set_requestedFrom:function(a){return this.requestedFrom=a},get_requestedFrom:function(){return this.requestedFrom},addRequestedFrom:function(a){null==this.get_requestedFrom()?this.set_requestedFrom([a]):this.get_requestedFrom().push(a)},writeToBuffer:function(a){if(null!=this.get_claimable())for(var b=0,c=this.get_claimable();b<c.length;){var d=c[b];++b;l.writeTag(a,2,1);l.write__TYPE_MESSAGE(a,d)}if(null!=this.get_sentTo())for(b=0,c=this.get_sentTo();b<c.length;)d=c[b],++b,l.writeTag(a,2,2),l.write__TYPE_STRING(a,d);if(null!=this.get_claimedFrom())for(b=0,c=this.get_claimedFrom();b<c.length;)d=c[b],++b,l.writeTag(a,2,3),l.write__TYPE_STRING(a,d);if(null!=this.get_requestedTo())for(b=0,c=this.get_requestedTo();b<c.length;)d=c[b],++b,l.writeTag(a,2,4),l.write__TYPE_STRING(a,d);if(null!=this.get_requestedFrom())for(b=0,c=this.get_requestedFrom();b<c.length;)d=c[b],++b,l.writeTag(a,2,5),l.write__TYPE_STRING(a,d);x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){null!=this.get_claimable()&&0<this.get_claimable().length&&a("claimable",this.get_claimable());null!=this.get_sentTo()&&0<this.get_sentTo().length&&a("sentTo",this.get_sentTo());null!=this.get_claimedFrom()&&0<this.get_claimedFrom().length&&a("claimedFrom",this.get_claimedFrom());null!=this.get_requestedTo()&&0<this.get_requestedTo().length&&a("requestedTo",this.get_requestedTo());null!=this.get_requestedFrom()&&0<this.get_requestedFrom().length&&a("requestedFrom",this.get_requestedFrom())},readFromSlice:function(a,b){for(;a.buf.totlen-a.buf.pos>b;){var c=r.read__TYPE_UINT32(a);switch(c>>3){case 1:null==this.get_claimable()&&this.set_claimable([]);this.get_claimable().push(r.read__TYPE_MESSAGE(a,new Lh));break;case 2:null==this.get_sentTo()&&this.set_sentTo([]);this.get_sentTo().push(r.read__TYPE_STRING(a));break;case 3:null==this.get_claimedFrom()&&this.set_claimedFrom([]);this.get_claimedFrom().push(r.read__TYPE_STRING(a));break;case 4:null==this.get_requestedTo()&&this.set_requestedTo([]);this.get_requestedTo().push(r.read__TYPE_STRING(a));break;case 5:null==this.get_requestedFrom()&&this.set_requestedFrom([]);this.get_requestedFrom().push(r.read__TYPE_STRING(a));break;default:x.prototype.readUnknown.call(this,a,c)}}},__class__:Tf,__properties__:{set_requestedFrom:"set_requestedFrom",get_requestedFrom:"get_requestedFrom",set_requestedTo:"set_requestedTo",get_requestedTo:"get_requestedTo",set_claimedFrom:"set_claimedFrom",get_claimedFrom:"get_claimedFrom",set_sentTo:"set_sentTo",get_sentTo:"get_sentTo",set_claimable:"set_claimable",get_claimable:"get_claimable"}});var Sf=function(){this.set_id("");this.set_displayName("");this.set_xp(0);this.set_level(0);this.set_isPayingUser(!1);this.set_hasLoggedIntoMobile(!1)};g["agario.proto.User_info"]=Sf;Sf.__name__=["agario","proto","User_info"];Sf.__super__=x;Sf.prototype=t(x.prototype,{id:null,setId:function(a){this.set_id(a);return this},set_id:function(a){return this.id=a},get_id:function(){return this.id},displayName:null,setDisplayName:function(a){this.set_displayName(a);return this},set_displayName:function(a){return this.displayName=a},get_displayName:function(){return this.displayName},xp:null,setXp:function(a){this.set_xp(a);return this},set_xp:function(a){return this.xp=a},get_xp:function(){return this.xp},level:null,setLevel:function(a){this.set_level(a);return this},set_level:function(a){return this.level=a},get_level:function(){return this.level},isPayingUser:null,setIsPayingUser:function(a){this.set_isPayingUser(a);return this},set_isPayingUser:function(a){return this.isPayingUser=a},get_isPayingUser:function(){return this.isPayingUser},hasLoggedIntoMobile:null,setHasLoggedIntoMobile:function(a){this.set_hasLoggedIntoMobile(a);return this},set_hasLoggedIntoMobile:function(a){return this.hasLoggedIntoMobile=a},get_hasLoggedIntoMobile:function(){return this.hasLoggedIntoMobile},writeToBuffer:function(a){l.writeTag(a,2,1);l.write__TYPE_STRING(a,this.get_id());l.writeTag(a,2,2);l.write__TYPE_STRING(a,this.get_displayName());l.writeTag(a,0,3);l.write__TYPE_UINT32(a,this.get_xp());l.writeTag(a,0,4);l.write__TYPE_UINT32(a,this.get_level());l.writeTag(a,0,5);l.write__TYPE_BOOL(a,this.get_isPayingUser());l.writeTag(a,0,6);l.write__TYPE_BOOL(a,this.get_hasLoggedIntoMobile());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("id",this.get_id());a("displayName",this.get_displayName());a("xp",this.get_xp());a("level",this.get_level());a("isPayingUser",this.get_isPayingUser());a("hasLoggedIntoMobile",this.get_hasLoggedIntoMobile())},readFromSlice:function(a,b){for(var c=0,d=0,e=0,f=0,n=0,L=0;a.buf.totlen-a.buf.pos>b;){var g=r.read__TYPE_UINT32(a);switch(g>>3){case 1:if(0!=c)throw new m(new B("Bad data format: User_info.id cannot be set twice."));++c;this.set_id(r.read__TYPE_STRING(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: User_info.displayName cannot be set twice."));++d;this.set_displayName(r.read__TYPE_STRING(a));break;case 3:if(0!=e)throw new m(new B("Bad data format: User_info.xp cannot be set twice."));++e;this.set_xp(r.read__TYPE_UINT32(a));break;case 4:if(0!=f)throw new m(new B("Bad data format: User_info.level cannot be set twice."));++f;this.set_level(r.read__TYPE_UINT32(a));break;case 5:if(0!=n)throw new m(new B("Bad data format: User_info.isPayingUser cannot be set twice."));++n;this.set_isPayingUser(r.read__TYPE_BOOL(a));break;case 6:if(0!=L)throw new m(new B("Bad data format: User_info.hasLoggedIntoMobile cannot be set twice."));++L;this.set_hasLoggedIntoMobile(r.read__TYPE_BOOL(a));break;default:x.prototype.readUnknown.call(this,a,g)}}},__class__:Sf,__properties__:{set_hasLoggedIntoMobile:"set_hasLoggedIntoMobile",get_hasLoggedIntoMobile:"get_hasLoggedIntoMobile",set_isPayingUser:"set_isPayingUser",get_isPayingUser:"get_isPayingUser",set_level:"set_level",get_level:"get_level",set_xp:"set_xp",get_xp:"get_xp",set_displayName:"set_displayName",get_displayName:"get_displayName",set_id:"set_id",get_id:"get_id"}});var Zd=function(){this.hasField__0=0;this.set_type(0);this.set_key(0)};g["agario.proto.User_setting"]=Zd;Zd.__name__=["agario","proto","User_setting"];Zd.__super__=x;Zd.prototype=t(x.prototype,{type:null,setType:function(a){this.set_type(a);return this},set_type:function(a){return this.type=a},get_type:function(){return this.type},key:null,setKey:function(a){this.set_key(a);return this},set_key:function(a){return this.key=a},get_key:function(){return this.key},valueString:null,setValueString:function(a){this.set_valueString(a);return this},clearValueString:function(){this.set_valueString(null)},hasValueString:function(){return null!=this.get_valueString()},set_valueString:function(a){return this.valueString=a},get_valueString:function(){return this.valueString},valueInt32:null,setValueInt32:function(a){this.set_valueInt32(a);return this},hasField__0:null,clearValueInt32:function(){this.hasField__0&=-2;this.set_valueInt32(0)},hasValueInt32:function(){return 0!=(this.hasField__0&1)},set_valueInt32:function(a){this.hasField__0|=1;return this.valueInt32=a},get_valueInt32:function(){return this.valueInt32},writeToBuffer:function(a){l.writeTag(a,0,1);l.write__TYPE_ENUM(a,this.get_type());l.writeTag(a,0,2);l.write__TYPE_ENUM(a,this.get_key());null!=this.get_valueString()&&(l.writeTag(a,2,3),l.write__TYPE_STRING(a,this.get_valueString()));0!=(this.hasField__0&1)&&(l.writeTag(a,0,4),l.write__TYPE_INT32(a,this.get_valueInt32()));x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("type",this.get_type());a("key",this.get_key());null!=this.get_valueString()&&a("valueString",this.get_valueString());0!=(this.hasField__0&1)&&a("valueInt32",this.get_valueInt32())},readFromSlice:function(a,b){for(var c=0,d=0,e=0,f=0;a.buf.totlen-a.buf.pos>b;){var n=r.read__TYPE_UINT32(a);switch(n>>3){case 1:if(0!=c)throw new m(new B("Bad data format: User_setting.type cannot be set twice."));++c;this.set_type(r.read__TYPE_ENUM(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: User_setting.key cannot be set twice."));++d;this.set_key(r.read__TYPE_ENUM(a));break;case 3:if(0!=e)throw new m(new B("Bad data format: User_setting.valueString cannot be set twice."));++e;this.set_valueString(r.read__TYPE_STRING(a));break;case 4:if(0!=f)throw new m(new B("Bad data format: User_setting.valueInt32 cannot be set twice."));++f;this.set_valueInt32(r.read__TYPE_INT32(a));break;default:x.prototype.readUnknown.call(this,a,n)}}},__class__:Zd,__properties__:{set_valueInt32:"set_valueInt32",get_valueInt32:"get_valueInt32",set_valueString:"set_valueString",get_valueString:"get_valueString",set_key:"set_key",get_key:"get_key",set_type:"set_type",get_type:"get_type"}});var Yd=function(){this.set_gamesPlayed(0);this.set_massConsumed(0);this.set_allTimeScore(0);this.set_highestMass(0);this.set_longestTimeAlive(0);this.set_mostCellsEaten(0)};g["agario.proto.User_stats"]=Yd;Yd.__name__=["agario","proto","User_stats"];Yd.__super__=x;Yd.prototype=t(x.prototype,{gamesPlayed:null,setGamesPlayed:function(a){this.set_gamesPlayed(a);return this},set_gamesPlayed:function(a){return this.gamesPlayed=a},get_gamesPlayed:function(){return this.gamesPlayed},massConsumed:null,setMassConsumed:function(a){this.set_massConsumed(a);return this},set_massConsumed:function(a){return this.massConsumed=a},get_massConsumed:function(){return this.massConsumed},allTimeScore:null,setAllTimeScore:function(a){this.set_allTimeScore(a);return this},set_allTimeScore:function(a){return this.allTimeScore=a},get_allTimeScore:function(){return this.allTimeScore},highestMass:null,setHighestMass:function(a){this.set_highestMass(a);return this},set_highestMass:function(a){return this.highestMass=a},get_highestMass:function(){return this.highestMass},longestTimeAlive:null,setLongestTimeAlive:function(a){this.set_longestTimeAlive(a);return this},set_longestTimeAlive:function(a){return this.longestTimeAlive=a},get_longestTimeAlive:function(){return this.longestTimeAlive},mostCellsEaten:null,setMostCellsEaten:function(a){this.set_mostCellsEaten(a);return this},set_mostCellsEaten:function(a){return this.mostCellsEaten=a},get_mostCellsEaten:function(){return this.mostCellsEaten},writeToBuffer:function(a){l.writeTag(a,0,1);l.write__TYPE_UINT32(a,this.get_gamesPlayed());l.writeTag(a,0,2);l.write__TYPE_UINT32(a,this.get_massConsumed());l.writeTag(a,0,3);l.write__TYPE_UINT32(a,this.get_allTimeScore());l.writeTag(a,0,4);l.write__TYPE_UINT32(a,this.get_highestMass());l.writeTag(a,0,5);l.write__TYPE_UINT32(a,this.get_longestTimeAlive());l.writeTag(a,0,6);l.write__TYPE_UINT32(a,this.get_mostCellsEaten());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("gamesPlayed",this.get_gamesPlayed());a("massConsumed",this.get_massConsumed());a("allTimeScore",this.get_allTimeScore());a("highestMass",this.get_highestMass());a("longestTimeAlive",this.get_longestTimeAlive());a("mostCellsEaten",this.get_mostCellsEaten())},readFromSlice:function(a,b){for(var c=0,d=0,e=0,f=0,n=0,L=0;a.buf.totlen-a.buf.pos>b;){var g=r.read__TYPE_UINT32(a);switch(g>>3){case 1:if(0!=c)throw new m(new B("Bad data format: User_stats.gamesPlayed cannot be set twice."));++c;this.set_gamesPlayed(r.read__TYPE_UINT32(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: User_stats.massConsumed cannot be set twice."));++d;this.set_massConsumed(r.read__TYPE_UINT32(a));break;case 3:if(0!=e)throw new m(new B("Bad data format: User_stats.allTimeScore cannot be set twice."));++e;this.set_allTimeScore(r.read__TYPE_UINT32(a));break;case 4:if(0!=f)throw new m(new B("Bad data format: User_stats.highestMass cannot be set twice."));++f;this.set_highestMass(r.read__TYPE_UINT32(a));break;case 5:if(0!=n)throw new m(new B("Bad data format: User_stats.longestTimeAlive cannot be set twice."));++n;this.set_longestTimeAlive(r.read__TYPE_UINT32(a));break;case 6:if(0!=L)throw new m(new B("Bad data format: User_stats.mostCellsEaten cannot be set twice."));++L;this.set_mostCellsEaten(r.read__TYPE_UINT32(a));break;default:x.prototype.readUnknown.call(this,a,g)}}},__class__:Yd,__properties__:{set_mostCellsEaten:"set_mostCellsEaten",get_mostCellsEaten:"get_mostCellsEaten",set_longestTimeAlive:"set_longestTimeAlive",get_longestTimeAlive:"get_longestTimeAlive",set_highestMass:"set_highestMass",get_highestMass:"get_highestMass",set_allTimeScore:"set_allTimeScore",get_allTimeScore:"get_allTimeScore",set_massConsumed:"set_massConsumed",get_massConsumed:"get_massConsumed",set_gamesPlayed:"set_gamesPlayed",get_gamesPlayed:"get_gamesPlayed"}});var Ud=function(){this.set_eventId("");this.set_nextAvailableInSeconds(0)};g["agario.proto.User_timed_event"]=Ud;Ud.__name__=["agario","proto","User_timed_event"];Ud.__super__=x;Ud.prototype=t(x.prototype,{eventId:null,setEventId:function(a){this.set_eventId(a);return this},set_eventId:function(a){return this.eventId=a},get_eventId:function(){return this.eventId},nextAvailableInSeconds:null,setNextAvailableInSeconds:function(a){this.set_nextAvailableInSeconds(a);return this},set_nextAvailableInSeconds:function(a){return this.nextAvailableInSeconds=a},get_nextAvailableInSeconds:function(){return this.nextAvailableInSeconds},writeToBuffer:function(a){l.writeTag(a,2,1);l.write__TYPE_STRING(a,this.get_eventId());l.writeTag(a,0,2);l.write__TYPE_UINT32(a,this.get_nextAvailableInSeconds());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("eventId",this.get_eventId());a("nextAvailableInSeconds",this.get_nextAvailableInSeconds())},readFromSlice:function(a,b){for(var c=0,d=0;a.buf.totlen-a.buf.pos>b;){var e=r.read__TYPE_UINT32(a);switch(e>>3){case 1:if(0!=c)throw new m(new B("Bad data format: User_timed_event.eventId cannot be set twice."));++c;this.set_eventId(r.read__TYPE_STRING(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: User_timed_event.nextAvailableInSeconds cannot be set twice."));++d;this.set_nextAvailableInSeconds(r.read__TYPE_UINT32(a));break;default:x.prototype.readUnknown.call(this,a,e)}}},__class__:Ud,__properties__:{set_nextAvailableInSeconds:"set_nextAvailableInSeconds",get_nextAvailableInSeconds:"get_nextAvailableInSeconds",set_eventId:"set_eventId",get_eventId:"get_eventId"}});var Bh=function(){this.set_productId("");this.set_quantity(0)};g["agario.proto.User_wallet_item"]=Bh;Bh.__name__=["agario","proto","User_wallet_item"];Bh.__super__=x;Bh.prototype=t(x.prototype,{productId:null,setProductId:function(a){this.set_productId(a);return this},set_productId:function(a){return this.productId=a},get_productId:function(){return this.productId},quantity:null,setQuantity:function(a){this.set_quantity(a);return this},set_quantity:function(a){return this.quantity=a},get_quantity:function(){return this.quantity},writeToBuffer:function(a){l.writeTag(a,2,1);l.write__TYPE_STRING(a,this.get_productId());l.writeTag(a,0,2);l.write__TYPE_UINT32(a,this.get_quantity());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("productId",this.get_productId());a("quantity",this.get_quantity())},readFromSlice:function(a,b){for(var c=0,d=0;a.buf.totlen-a.buf.pos>b;){var e=r.read__TYPE_UINT32(a);switch(e>>3){case 1:if(0!=c)throw new m(new B("Bad data format: User_wallet_item.productId cannot be set twice."));++c;this.set_productId(r.read__TYPE_STRING(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: User_wallet_item.quantity cannot be set twice."));++d;this.set_quantity(r.read__TYPE_UINT32(a));break;default:x.prototype.readUnknown.call(this,a,e)}}},__class__:Bh,__properties__:{set_quantity:"set_quantity",get_quantity:"get_quantity",set_productId:"set_productId",get_productId:"get_productId"}});var $d=function(){this.set_originPlatform("");this.set_productUpdates([])};g["agario.proto.Wallet_updates"]=$d;$d.__name__=["agario","proto","Wallet_updates"];$d.__super__=x;$d.prototype=t(x.prototype,{originPlatform:null,setOriginPlatform:function(a){this.set_originPlatform(a);return this},set_originPlatform:function(a){return this.originPlatform=a},get_originPlatform:function(){return this.originPlatform},productUpdates:null,setProductUpdates:function(a){this.set_productUpdates(a);return this},set_productUpdates:function(a){return this.productUpdates=a},get_productUpdates:function(){return this.productUpdates},addProductUpdates:function(a){null==this.get_productUpdates()?this.set_productUpdates([a]):this.get_productUpdates().push(a)},writeToBuffer:function(a){l.writeTag(a,2,1);l.write__TYPE_STRING(a,this.get_originPlatform());if(null!=this.get_productUpdates())for(var b=0,c=this.get_productUpdates();b<c.length;){var d=c[b];++b;l.writeTag(a,2,2);l.write__TYPE_MESSAGE(a,d)}x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("originPlatform",this.get_originPlatform());null!=this.get_productUpdates()&&0<this.get_productUpdates().length&&a("productUpdates",this.get_productUpdates())},readFromSlice:function(a,b){for(var c=0;a.buf.totlen-a.buf.pos>b;){var d=r.read__TYPE_UINT32(a);switch(d>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Wallet_updates.originPlatform cannot be set twice."));++c;this.set_originPlatform(r.read__TYPE_STRING(a));break;case 2:null==this.get_productUpdates()&&this.set_productUpdates([]);this.get_productUpdates().push(r.read__TYPE_MESSAGE(a,new Pc));break;default:x.prototype.readUnknown.call(this,a,d)}}},__class__:$d,__properties__:{set_productUpdates:"set_productUpdates",get_productUpdates:"get_productUpdates",set_originPlatform:"set_originPlatform",get_originPlatform:"get_originPlatform"}});var Kh=function(){this.set_finalXpForLevel(0);this.set_deltaXp(0);this.set_finalLevel(0);this.set_deltaLevel(0)};g["agario.proto.Xp_level_update"]=Kh;Kh.__name__=["agario","proto","Xp_level_update"];Kh.__super__=x;Kh.prototype=t(x.prototype,{finalXpForLevel:null,setFinalXpForLevel:function(a){this.set_finalXpForLevel(a);return this},set_finalXpForLevel:function(a){return this.finalXpForLevel=a},get_finalXpForLevel:function(){return this.finalXpForLevel},deltaXp:null,setDeltaXp:function(a){this.set_deltaXp(a);return this},set_deltaXp:function(a){return this.deltaXp=a},get_deltaXp:function(){return this.deltaXp},finalLevel:null,setFinalLevel:function(a){this.set_finalLevel(a);return this},set_finalLevel:function(a){return this.finalLevel=a},get_finalLevel:function(){return this.finalLevel},deltaLevel:null,setDeltaLevel:function(a){this.set_deltaLevel(a);return this},set_deltaLevel:function(a){return this.deltaLevel=a},get_deltaLevel:function(){return this.deltaLevel},writeToBuffer:function(a){l.writeTag(a,0,1);l.write__TYPE_UINT32(a,this.get_finalXpForLevel());l.writeTag(a,0,2);l.write__TYPE_UINT32(a,this.get_deltaXp());l.writeTag(a,0,3);l.write__TYPE_UINT32(a,this.get_finalLevel());l.writeTag(a,0,4);l.write__TYPE_UINT32(a,this.get_deltaLevel());x.prototype.writeExtensionOrUnknownFields.call(this,a)},forEachFields:function(a){a("finalXpForLevel",this.get_finalXpForLevel());a("deltaXp",this.get_deltaXp());a("finalLevel",this.get_finalLevel());a("deltaLevel",this.get_deltaLevel())},readFromSlice:function(a,b){for(var c=0,d=0,e=0,f=0;a.buf.totlen-a.buf.pos>b;){var n=r.read__TYPE_UINT32(a);switch(n>>3){case 1:if(0!=c)throw new m(new B("Bad data format: Xp_level_update.finalXpForLevel cannot be set twice."));++c;this.set_finalXpForLevel(r.read__TYPE_UINT32(a));break;case 2:if(0!=d)throw new m(new B("Bad data format: Xp_level_update.deltaXp cannot be set twice."));++d;this.set_deltaXp(r.read__TYPE_UINT32(a));break;case 3:if(0!=e)throw new m(new B("Bad data format: Xp_level_update.finalLevel cannot be set twice."));++e;this.set_finalLevel(r.read__TYPE_UINT32(a));break;case 4:if(0!=f)throw new m(new B("Bad data format: Xp_level_update.deltaLevel cannot be set twice."));++f;this.set_deltaLevel(r.read__TYPE_UINT32(a));break;default:x.prototype.readUnknown.call(this,a,n)}}},__class__:Kh,__properties__:{set_deltaLevel:"set_deltaLevel",get_deltaLevel:"get_deltaLevel",set_finalLevel:"set_finalLevel",get_finalLevel:"get_finalLevel",set_deltaXp:"set_deltaXp",get_deltaXp:"get_deltaXp",set_finalXpForLevel:"set_finalXpForLevel",get_finalXpForLevel:"get_finalXpForLevel"}});var qj=function(){};g["agario.proto.cell_state.Cell_type_enum"]=qj;qj.__name__=["agario","proto","cell_state","Cell_type_enum"];var Yf=function(){};g["agario.proto.device.Platform_enum"]=Yf;Yf.__name__=["agario","proto","device","Platform_enum"];var Mh=function(){};g["agario.proto.disconnect.Reason_enum"]=Mh;Mh.__name__=["agario","proto","disconnect","Reason_enum"];var Qk=function(){};g["agario.proto.envelope.Content_type_enum"]=Qk;Qk.__name__=["agario","proto","envelope","Content_type_enum"];var Nh=function(){};g["agario.proto.inapp_purchase_response.Result_enum"]=Nh;Nh.__name__=["agario","proto","inapp_purchase_response","Result_enum"];var rj=function(){};g["agario.proto.login_request.Realm_enum"]=rj;rj.__name__=["agario","proto","login_request","Realm_enum"];var Rk=function(){};g["agario.proto.login_response.Current_game_state_enum"]=Rk;Rk.__name__=["agario","proto","login_response","Current_game_state_enum"];var sj=function(){};g["agario.proto.login_response.Realm_enum"]=sj;sj.__name__=["agario","proto","login_response","Realm_enum"];var Fc=function(){};g["agario.proto.product_update.Origin_enum"]=Fc;Fc.__name__=["agario","proto","product_update","Origin_enum"];var tj=function(){};g["agario.proto.product_update.Type_enum"]=tj;tj.__name__=["agario","proto","product_update","Type_enum"];var Sk=function(){};g["agario.proto.realm_upgrade_request.Realm_enum"]=Sk;Sk.__name__=["agario","proto","realm_upgrade_request","Realm_enum"];var Tk=function(){};g["agario.proto.realm_upgrade_response.Realm_enum"]=Tk;Tk.__name__=["agario","proto","realm_upgrade_response","Realm_enum"];var ua=function(){};g["agario.proto.req.Type_enum"]=ua;ua.__name__=["agario","proto","req","Type_enum"];var uj=function(){};g["agario.proto.soft_purchase_response.Result_enum"]=uj;uj.__name__=["agario","proto","soft_purchase_response","Result_enum"];var Uk=function(){};g["agario.proto.user_data_update.Type_enum"]=Uk;Uk.__name__=["agario","proto","user_data_update","Type_enum"];var Bd=function(){};g["agario.proto.user_setting.Key_enum"]=Bd;Bd.__name__=["agario","proto","user_setting","Key_enum"];var Vk=function(){};g["agario.proto.user_setting.Type_enum"]=Vk;Vk.__name__=["agario","proto","user_setting","Type_enum"];var td=function(){};g["mc.security.IAuthenticationService"]=td;td.__name__=["mc","security","IAuthenticationService"];td.__interfaces__=[Jk,Lb];td.prototype={get_available:null,get_loggedIn:null,get_user:null,get_authToken:null,set_authToken:null,login:null,logout:null,__class__:td,__properties__:{set_authToken:"set_authToken",get_authToken:"get_authToken",get_user:"get_user",get_loggedIn:"get_loggedIn",get_available:"get_available"}};var uf=function(){this._loggedIn=this._usedCache=!1;ba.call(this)};g["agario.security.AuthenticationService"]=uf;uf.__name__=["agario","security","AuthenticationService"];uf.__interfaces__=[td];uf.__super__=ba;uf.prototype=t(ba.prototype,{get_available:function(){return!0},_loggedIn:null,get_loggedIn:function(){return null!=this._serverModel&&this._serverModel.status==wb.DISCONNECTED?!1:this._loggedIn},_user:null,get_user:function(){return this._user},_authToken:null,get_authToken:function(){return this._authToken},set_authToken:function(a){return this._authToken=a},_usedCache:null,_serverModel:null,create:function(){},initialize:function(){this._serverModel=na.getService(Nc);this._serverModel.register(11,k(this,this.onServerMessage));this._serverModel.register(20,k(this,this.onServerDisconnect));this._serverModel.onConnect.add(k(this,this.sendLoginMessage))},onServerDisconnect:function(a,b){this._loggedIn=!1;20==a&&4==b.get_reason()&&h.services.gameui.doLogout()},onUpdate:function(a,b){this.onServerMessage(a,b)},onServerMessage:function(a,b){switch(a){case 11:var c;c=y.__cast(b,Vf);this._loggedIn=!0;h.user.handleUserData(c);h.get_events().dispatchEventWith(hd.USER_LOGGED);break;default:null}},login:function(){this.sendLoginMessage()},logout:function(){null!=h.user&&(h.user.destroy(),h.user=null);h.user=new re("","");this._authToken=null;this._loggedIn=!1;this._serverModel.disconnect();h.services.gameui.closeShop();h.services.shop.isShopAvailable=!1},sendLoginMessage:function(){if(null!=this._authToken&&""!=this._authToken&&"undefined"!=this._authToken&&void 0!=this._authToken){var a=new Ne;a.set_authToken(this._authToken);a.set_device(new Le);h.environment.authenticationProvider==pb.Google?a.set_realm(3):a.set_realm(2);switch(h.environment.platform[1]){case 0:a.get_device().set_platform(3);break;case 1:a.get_device().set_platform(4);break;default:a.get_device().set_platform(5)}a.get_device().set_version(ac.VERSION);a.get_device().set_width(0);a.get_device().set_height(0);this._serverModel.sendMessage(10,a);null}},__class__:uf,__properties__:{set_authToken:"set_authToken",get_authToken:"get_authToken",get_user:"get_user",get_loggedIn:"get_loggedIn",get_available:"get_available"}});var Jb=function(){this._loadedConfig="";this.isInitialized=!1;this._assetsManifest=new ka};g["agario.services.ConfigurationService"]=Jb;Jb.__name__=["agario","services","ConfigurationService"];Jb.__interfaces__=[Lb];Jb.setConfigID=function(a){a!=Jb.configID&&(Jb.configID=a,h.get_events().fire("config.id_updated",a))};Jb.prototype={_assetsManifest:null,_config:null,currentConfig:null,isInitialized:null,_loadedConfig:null,create:function(){},initialize:function(){h.get_events().listen("config.id_updated",k(this,this.handleConfigurationIdUpdate))},getLocalizationFile:function(a){return this.getConfigUrl(""+a+"_text.json")},getConfigUrl:function(a){if("true"==Db.getProperty("load_local_configuration"))return this.getRootUrl("config/"+Jb.configID+"/"+a);var b=this.getAssetFromManifest(a);return null==b?Db.getProperty("config_url")+("/"+Jb.configID+"/"+a):Db.getProperty("config_url")+("/"+b)},getRootUrl:function(a){if(h.environment.get_isLocal()){var b=window.ASSETS_ROOT;void 0==b&&(b="");return""+b+"mc/"+a}return Db.getProperty("root_url")+("mc/"+a)},getAssetFromManifest:function(a){return this._assetsManifest.exists(a)?this._assetsManifest.get(a).base+"/"+this._assetsManifest.get(a).id:null},handleConfigurationIdUpdate:function(a){var b=this,c=a.data;this._loadedConfig==Jb.configID?Ia.trace("Not updating the configuration since they have the sameID",{fileName:"ConfigurationService.hx",lineNumber:124,className:"agario.services.ConfigurationService",methodName:"handleConfigurationIdUpdate"}):this.loadConfiguration().then(k(this,this.parseConfiguration)).pipe(k(this,this.loadLocalizations)).then(k(this,this.parseLocalization)).then(k(this,this.loadAssetsManifest)).then(function(a){b._loadedConfig=c}).catchError(k(this,this.handleError))},handleError:function(a){Ia.trace("Failed to load Configuration",{fileName:"ConfigurationService.hx",lineNumber:140,className:"agario.services.ConfigurationService",methodName:"handleError"});null},loadConfiguration:function(a){var b=new Ub;a=this.getConfigUrl("GameConfiguration.json");h.environment.get_isLocal();var c=new Cd(a);c.addEventListener(v.COMPLETE,function(a){b.resolve(c.data)});c.start();return b.boundPromise},parseConfiguration:function(a){var b;try{this._config=b=new Sd((new Dd(a)).parseRec().gameConfig)}catch(c){c instanceof m&&(c=c.val);if(y.__instanceof(c,String))return Ia.trace("Error parsing the configuration!",{fileName:"ConfigurationService.hx",lineNumber:176,className:"agario.services.ConfigurationService",methodName:"parseConfiguration"}),!1;throw c;}this.isInitialized=!0;h.get_events().dispatchEventWith("ShopEvent::CONFIGURATION_LOADED",this._config);return!0},loadLocalizations:function(a){var b=new Ub;a=this.getLocalizationFile(h.user.selectedLanguage);h.environment.get_isLocal();var c=new Cd(a);c.addEventListener(v.COMPLETE,function(a){b.resolve(c.data)});c.start();return b.boundPromise},parseLocalization:function(a){E.init((new Dd(a)).parseRec().texts);return!0},loadAssetsManifest:function(a){var b=this;a=this.getConfigUrl("checksums/_manifestBase.json");h.environment.get_isLocal();var c=new Cd(a);c.addEventListener(v.COMPLETE,function(a){b.loadManifest(vj.parse(c.data))});c.start();return!1},loadManifest:function(a){var b=0;for(a=(new Zf(a)).assets;b<a.length;){var c=a[b];++b;switch(c.type){case"atlas":var d=new Se({id:c.texture,base:c.base});this._assetsManifest.set(c.texture,d);d=new Se({id:c.metafile,base:c.base});this._assetsManifest.set(c.metafile,d);var d=this.getConfigUrl(c.texture),e=this.getConfigUrl(c.metafile);h.get_assets().registerExternalAtlas(c.id,d,e);null}this._assetsManifest.set(c.id,c)}},get_currentConfig:function(){return this._config},__class__:Jb,__properties__:{get_currentConfig:"get_currentConfig"}};var wg=function(){};g["agario.services.EnvironmentService"]=wg;wg.__name__=["agario","services","EnvironmentService"];wg.__interfaces__=[Lb];wg.prototype={platform:null,authenticationProvider:null,create:function(){},initialize:function(){this.checkWebPlatform()},checkWebPlatform:function(){var a=this.getQueryString();(null!=J.fb?a.existsReserved("fb"):a.h.hasOwnProperty("fb"))?this.platform=ob.Facebook:(null!=J.miniclip?a.existsReserved("miniclip"):a.h.hasOwnProperty("miniclip"))?this.platform=ob.Miniclip:this.platform=ob.Web},getQueryString:function(){var a=window.location.search;"?"==a.charAt(0)&&(a=H.substr(a,1,null));for(var a=a.split("&"),b=new ka,c=0;c<a.length;){var d=a[c];++c;d=d.split("=");b.set(d[0],d[1])}return b},environment:null,get_environment:function(){return null!=Db.getProperty("env_local")?mb.Local:null!=Db.getProperty("env_development")?mb.Development:null!=Db.getProperty("env_staging")?mb.Staging:null!=Db.getProperty("env_production")?mb.Live:mb.Local},isLocal:null,get_isLocal:function(){return this.get_environment()==mb.Local},__class__:wg,__properties__:{get_isLocal:"get_isLocal",get_environment:"get_environment"}};var ob=g["agario.services.WebPlatform"]={__ename__:!0,__constructs__:["Facebook","Miniclip","Web","NonWeb"]};ob.Facebook=["Facebook",0];ob.Facebook.toString=u;ob.Facebook.__enum__=ob;ob.Miniclip=["Miniclip",1];ob.Miniclip.toString=u;ob.Miniclip.__enum__=ob;ob.Web=["Web",2];ob.Web.toString=u;ob.Web.__enum__=ob;ob.NonWeb=["NonWeb",3];ob.NonWeb.toString=u;ob.NonWeb.__enum__=ob;var pb=g["agario.services.WebAuthProvider"]={__ename__:!0,__constructs__:["Facebook","Google","Guest"]};pb.Facebook=["Facebook",0];pb.Facebook.toString=u;pb.Facebook.__enum__=pb;pb.Google=["Google",1];pb.Google.toString=u;pb.Google.__enum__=pb;pb.Guest=["Guest",2];pb.Guest.toString=u;pb.Guest.__enum__=pb;var mb=g["agario.services.DeployEnv"]={__ename__:!0,__constructs__:["Local","Development","Staging","Live"]};mb.Local=["Local",0];mb.Local.toString=u;mb.Local.__enum__=mb;mb.Development=["Development",1];mb.Development.toString=u;mb.Development.__enum__=mb;mb.Staging=["Staging",2];mb.Staging.toString=u;mb.Staging.__enum__=mb;mb.Live=["Live",3];mb.Live.toString=u;mb.Live.__enum__=mb;var ae=function(){};g["mc.services.IConfigurable"]=ae;ae.__name__=["mc","services","IConfigurable"];ae.prototype={configure:null,__class__:ae};var vd=function(){};g["agario.services.IPayment"]=vd;vd.__name__=["agario","services","IPayment"];vd.__interfaces__=[Lb];vd.prototype={buyProduct:null,getCurrencyCode:null,overrideCurrencyCode:null,__class__:vd};var Ag=function(){this.configurationLoaded=this.loginComplete=!1;this.currency_code="USD"};g["agario.services.FBPaymentService"]=Ag;Ag.__name__=["agario","services","FBPaymentService"];Ag.__interfaces__=[ae,vd];Ag.prototype={payment_endpoint:null,exchange_rate:null,original_currency_code:null,currency_code:null,_models:null,_authModel:null,configurationLoaded:null,loginComplete:null,create:function(){},initialize:function(){this._models=na.getService(sd);this._models.onConfigurationLoaded.add(k(this,this.onConfigurationLoaded));this._authModel=na.getService(td);h.get_events().addEventListener(hd.USER_LOGGED,k(this,this.onLoginSuccess))},configure:function(a){this.payment_endpoint=a.endpoint},onConfigurationLoaded:function(){this.configurationLoaded=!0;this.fetchExchangeRate()},onLoginSuccess:function(a){this.loginComplete=!0;this.fetchExchangeRate()},getCurrencyCode:function(){return this.currency_code},overrideCurrencyCode:function(a){return this.currency_code=a},buyProduct:function(a,b,c){FB.ui({method:"pay",action:"purchaseItem",product:""+
this.payment_endpoint+"?purchase_id="+b,quantity:1},k(this,this.handleBuyProduct));h.states.enable("state_xsolla_iframe")},handleBuyProduct:function(a){h.states.disable("state_xsolla_iframe")},fetchExchangeRate:function(){if(this.configurationLoaded&&this.loginComplete){var a=k(this,this.handleExchangeResponse);FB.api("/me/?fields=currency",a)}},handleExchangeResponse:function(a){null!=a&&null!=a.currency?(a=new Gf(a.currency),this.currency_code=this.original_currency_code=a.user_currency,this.exchange_rate=a,this._models.refreshShopItems()):null;h.get_events().dispatchEventWith("payment_event::got_currency_code")},__class__:Ag};var Nc=function(){};g["mc.game.multiplayer.IServer"]=Nc;Nc.__name__=["mc","game","multiplayer","IServer"];Nc.__interfaces__=[Lb];Nc.prototype={status:null,onConnect:null,onDisconnect:null,connect:null,disconnect:null,sendMessage:null,register:null,unregister:null,__class__:Nc};var qc=function(){this.disconnectedByRequest=!1;this.pingQueueSize=10;this.pingInterval=30};g["agario.services.GameServerService"]=qc;qc.__name__=["agario","services","GameServerService"];qc.__interfaces__=[ae,Nc];qc.encapsulateMessage=function(a,b){var c=new Me;c.set_type(a);switch(c.get_type()){case 30:c.set_pingField(y.__cast(b,Oe));break;case 31:c.set_pongField(y.__cast(b,Pe));break;case 70:c.set_softPurchaseRequestField(y.__cast(b,Qe));null;break;case 20:c.set_disconnectField(y.__cast(b,Of));null;break;case 10:c.set_loginRequestField(y.__cast(b,Ne));break;case 80:c.set_updateUserSettingsRequestField(y.__cast(b,Re));break;case 42:c.set_activateBoostRequestField(y.__cast(b,Ie));break;case 62:c.set_gameOverField(y.__cast(b,Qf));break;case 75:c.set_activateTimedEventRequestField(y.__cast(b,Ke));break;default:null}return qc.packageMessage(c)};qc.packageMessage=function(a){var b=new Pf;new Ta;b.set_type(1);b.set_uncompressedData(a);return b};qc.prototype={status:null,onConnect:null,onDisconnect:null,uri:null,pingInterval:null,pingQueueSize:null,_pingModel:null,_socket:null,messageMapping:null,disconnectedByRequest:null,pingEnabled:null,set_pingEnabled:function(a){a!=this.pingEnabled&&null!=this._pingModel&&(a?this._pingModel.start():this._pingModel.stop(),this.pingEnabled=a);return a},create:function(){this.onConnect=new Cb;this.onDisconnect=new Oc;this.messageMapping=new Tb},initialize:function(){this.status=wb.DISCONNECTED;this._pingModel=new wj(this.pingInterval,this.pingQueueSize);this.onConnect.add(k(this,this.handleConnect));this.onDisconnect.add(k(this,this.handleDisconnect));na.getService(sd).onConfigurationLoaded.addOnce(k(this,this.onConfigurationLoaded))},configure:function(a){null==a.pingInterval&&(a.pingInterval=30);a.pingInterval;this.pingInterval=a.pingInterval},onConfigurationLoaded:function(){var a=h.models.defaultCommunicationSettings;null!=a&&(null!=J.tcpPingInterval?a.existsReserved("tcpPingInterval"):a.h.hasOwnProperty("tcpPingInterval"))&&(a=K.parseInt(null!=J.tcpPingInterval?a.getReserved("tcpPingInterval"):a.h.tcpPingInterval),5<a&&(this.pingInterval=a,this._pingModel.pingInterval=a))},handleDisconnect:function(a){this.set_pingEnabled(!1);this.status=wb.DISCONNECTED;this.disconnectedByRequest=!1;h.get_events().dispatchEventWith("ShopEvent::connectionLost")},handleConnect:function(){this.set_pingEnabled(!0);this.status=wb.CONNECTED},connect:function(a,b){},disconnect:function(){if(this.status==wb.CONNECTED||this.status==wb.CONNECTING)this.disconnectedByRequest=!0,this.status=wb.DISCONNECTED},sendMessage:function(a,b){var c=qc.encapsulateMessage(a,b),d=new Te;c.writeTo(d);c=Ta.fromBytes(d.getBytes());agarApp.networking.sendMessage(c)},register:function(a,b){var c;this.messageMapping.h.hasOwnProperty(a)?c=this.messageMapping.h[a]:(c=[],this.messageMapping.h[a]=c);for(var d=0;d<c.length;){var e=c[d];++d;if(e==b)return!1}c.push(b);return!0},unregister:function(a,b){return this.messageMapping.h.hasOwnProperty(a)?H.remove(this.messageMapping.h[a],b):!1},injectPacket:function(a){this.parseInboxPacket(a,!0)},handleSocketData:function(a){this.parseInboxPacket(a,!1)},parseInboxPacket:function(a,b){null==b&&(b=!1);var c=null;try{var d=new Pf;d.mergeFrom(a);if(1==d.get_type())c=d.get_uncompressedData();else{var c=new Me,e=Wk.run(d.get_compressedData());c.mergeFrom(e)}}catch(f){f instanceof m&&(f=f.val),Ia.trace("Got invalid message from server",{fileName:"GameServerService.hx",lineNumber:304,className:"agario.services.GameServerService",methodName:"parseInboxPacket"}),null}if(null!=c)if(d=this.unpackageMessage(c),b||null,e=c.get_type(),this.messageMapping.h.hasOwnProperty(e)){var e=0,n;n=c.get_type();for(n=this.messageMapping.h[n];e<n.length;){var L=n[e];++e;L(c.get_type(),d)}}else null},unpackageMessage:function(a){var b=new x;switch(a.get_type()){case 30:b=a.get_pingField();break;case 31:b=a.get_pongField();break;case 71:b=a.get_softPurchaseResponseField();break;case 74:b=a.get_inappPurchaseResponseField();break;case 20:b=a.get_disconnectField();break;case 43:b=a.get_activateBoostResponseField();break;case 11:b=a.get_loginResponseField();break;case 81:b=a.get_updateUserSettingsResponseField();break;case 76:b=a.get_activateTimedEventResponseField();break;case 78:b=a.get_purchaseWalletUpdatesField();break;case 62:b=a.get_gameOverField();break;case 77:b=a.get_walletUpdatesField();break;default:null}return b},__class__:qc,__properties__:{set_pingEnabled:"set_pingEnabled"}};var Rd=function(){};g["agario.services.GamepadControllerService"]=Rd;Rd.__name__=["agario","services","GamepadControllerService"];Rd.__interfaces__=[Lb];Rd.prototype={gamepadAxisUpdate:null,sendMitosisCallback:null,ejectMassCallback:null,create:function(){},initialize:function(){cc.onConnect.add(k(this,this.onConnect))},onConnect:function(a){Ia.trace("new gamepad connected: "+a.id,{fileName:"GamepadControllerService.hx",lineNumber:36,className:"agario.services.GamepadControllerService",methodName:"onConnect"});h.services.gameui.showGamepadConnected();a.onDisconnect.add(k(this,this.onDisconnect));a.onButtonDown.add(k(this,this.onButtonDown));a.onButtonUp.add(k(this,this.onButtonUp));a.onAxisMove.add(k(this,this.onAxisMove))},onAxisMove:function(a,b){null!=this.gamepadAxisUpdate&&this.gamepadAxisUpdate(a,b)},onButtonDown:function(a){0==a&&null!=this.sendMitosisCallback&&this.sendMitosisCallback();1==a&&null!=this.ejectMassCallback&&this.ejectMassCallback()},onButtonUp:function(a){Ia.trace("button released:"+function(b){switch(a){case 0:b="A";break;case 1:b="B";break;case 2:b="X";break;case 3:b="Y";break;case 4:b="BACK";break;case 5:b="GUIDE";break;case 6:b="START";break;case 7:b="LEFT_STICK";break;case 8:b="RIGHT_STICK";break;case 9:b="LEFT_SHOULDER";break;case 10:b="RIGHT_SHOULDER";break;case 11:b="DPAD_UP";break;case 12:b="DPAD_DOWN";break;case 13:b="DPAD_LEFT";break;case 14:b="DPAD_RIGHT";break;default:b="UNKNOWN ("+a+")"}return b}(this),{fileName:"GamepadControllerService.hx",lineNumber:68,className:"agario.services.GamepadControllerService",methodName:"onButtonUp"})},onDisconnect:function(){h.services.gameui.showGamepadDisconnected();Ia.trace("gamepad disconnected",{fileName:"GamepadControllerService.hx",lineNumber:75,className:"agario.services.GamepadControllerService",methodName:"onDisconnect"})},__class__:Rd};var nl=function(){};g["agario.services.PaymentEvent"]=nl;nl.__name__=["agario","services","PaymentEvent"];var wj=function(a,b){this.latestPing=-1;this.pingId=0;this.pingQueueSize=10;this.pingInterval=30;this.pingInterval=a;this.pingQueueSize=b;this._server=na.getService(Nc);this._server.register(31,k(this,this.onPongMessage))};g["agario.services.KeepAlive"]=wj;wj.__name__=["agario","services","KeepAlive"];wj.prototype={pingInterval:null,pingQueueSize:null,pingQueue:null,pingId:null,pingTimer:null,first:null,latestPing:null,_server:null,start:function(){this.first=!0;this.pingQueue=new Tb;this.pingTimer=new kc(1E3*this.pingInterval);this.pingTimer.run=k(this,this.doPing)},stop:function(){null!=this.pingTimer&&this.pingTimer.stop()},onPongMessage:function(a,b){if(31==a)this.onPong(y.__cast(b,Pe))},nextId:function(a){return(a+1)%this.pingQueueSize},previousId:function(a){return 0<a?a-1:this.pingQueueSize-1},getPreviousPingRoundtrip:function(){for(var a=this.pingId;;){a=0<a?a-1:this.pingQueueSize-1;if(this.pingQueue.h.hasOwnProperty(a)){var b=void 0;if(b=null!=this.pingQueue.h[a].roundtrip)return this.pingQueue.h[a].roundtrip}if(a==this.pingId)return null}},doPing:function(){var a=new Oe;a.set_id((this.pingId+1)%this.pingQueueSize);this.pingId=(this.pingId+1)%this.pingQueueSize;var b=this.getPreviousPingRoundtrip();this.first||null==b?this.first=!1:a.set_previousRoundtrip(b);var b=a.get_id(),c={id:a.get_id(),sent:ja.getTimer(),roundtrip:null};this.pingQueue.h[b]=c;this._server.sendMessage(30,a)},onPong:function(a){if(function(b){var d=a.get_pingId();return b.pingQueue.h.hasOwnProperty(d)}(this)){var b;b=ja.getTimer()-function(b){var d=a.get_pingId();return b.pingQueue.h[d]}(this).sent;(function(b){var d=a.get_pingId();return b.pingQueue.h[d]})(this).roundtrip=b}},__class__:wj};var Yi=function(){this.initialize()};g["agario.services.ServicesManager"]=Yi;Yi.__name__=["agario","services","ServicesManager"];Yi.prototype={shop:null,gameui:null,config:null,view:null,initialize:function(){this.gameui=new Oh;this.shop=na.getService(te);this.config=na.getService(Jb);this.view=na.getService(vf)},__class__:Yi};var te=function(){this.isShopAvailable=this.isOpen=!1;this.shouldShowUseInfo=!0};g["agario.services.ShopService"]=te;te.__name__=["agario","services","ShopService"];te.__interfaces__=[Lb];te.prototype={_gameServer:null,_payModel:null,shouldShowUseInfo:null,onSoftPurchaseResponse:null,onUseResponse:null,onIAPComplete:null,onLocalizationInit:null,S_notEnoughCoins:null,playerInfoData:null,isShopAvailable:null,isOpen:null,create:function(){this.onSoftPurchaseResponse=new Oc;this.onUseResponse=new Oc;this.S_notEnoughCoins=new Cb;this.onIAPComplete=new Oc;this.onLocalizationInit=new Cb;h.get_events().addEventListener("ShopEvent::BUY",k(this,this.makePurchase));h.get_events().addEventListener("ShopEvent::USE",k(this,this.useItem));h.get_events().addEventListener("ShopEvent::UNEQUIP",k(this,this.unequipSkin))},initialize:function(){this._payModel=na.getService(vd);this._gameServer=na.getService(qc);this._gameServer.register(71,k(this,this.handleMessage));this._gameServer.register(43,k(this,this.handleMessage));this._gameServer.register(78,k(this,this.handleMessage));this._gameServer.register(77,k(this,this.handleMessage));this._gameServer.onConnect.add(k(this,this.handleConnectionOpen));this._gameServer.onDisconnect.add(k(this,this.handleConnectionClosed));h.get_events().listen(hd.USER_LOGGED,k(this,this.onUserLogin));h.get_events().listen("ShopEvent::CONFIGURATION_LOADED",k(this,this.onConfigurationLoaded))},onUserLogin:function(){h.views.closeAllViews();h.user.isConnecting=!1;h.user.loggedIn&&(this.isShopAvailable=!0,null!=h.user.userSettings&&0!=h.user.userSettings.length||this.setDefaultSkin(),h.services.gameui.setUserCoins(h.user.get_coins()),h.services.gameui.setMobileUser(h.user.userInfo.hasLoggedIntoMobile),this.checkUserGifts())},checkUserGifts:function(){new xj;null!=h.environment.getQueryString().get("request_ids")&&h.get_events().dispatchEventWith("shop_event::showGiftUnavailable")},onAppRequestError:function(a){Ia.trace(a,{fileName:"ShopService.hx",lineNumber:143,className:"agario.services.ShopService",methodName:"onAppRequestError"})},onAppRequests:function(a){0<a.gifts.length&&h.get_events().dispatchEventWith("shop_event::showGiftUnavailable")},onConfigurationLoaded:function(a){h.get_events().unlisten("ShopEvent::CONFIGURATION_LOADED",k(this,this.onConfigurationLoaded));this.checkIfShopCanBeShown()},checkIfShopCanBeShown:function(){var a=h.services.config.isInitialized,b=this._gameServer.status==wb.CONNECTED,c=h.services.gameui.hasLoginIntent();a&&b&&0==c&&h.services.gameui.enableShop()},handleConnectionOpen:function(){this.checkIfShopCanBeShown()},handleConnectionClosed:function(a){this.isShopAvailable=!1;h.services.gameui.disableShop();this.isOpen&&h.get_events().dispatchEventWith("ShopEvent::connectionLost")},handleMessage:function(a,b){switch(a){case 71:this.shouldShowUseInfo=!1;this.onSoftPurchaseResponse.dispatch(y.__cast(b,Xf));break;case 43:this.handleUserBoostUpdate(y.__cast(b,Je));break;case 78:this.handlePurchaseWalletUpdates(y.__cast(b,Wf));break;case 77:this.handleWalletUpdate(y.__cast(b,$d));break;default:null}},handleWalletUpdate:function(a){h.user.handleUserUpdates(a.get_productUpdates())},handlePurchaseWalletUpdates:function(a){var b=a.get_purchaseId();a=a.get_walletUpdates().get_productUpdates();0>=a.length||(this.onIAPComplete.dispatch(b),h.user.handleUserUpdates(a))},makeInAppPurchase:function(a){this._payModel.buyProduct(h.user.id,a,this._payModel.getCurrencyCode())},activateTimedEvent:function(a){var b=new Ke;b.set_eventId(a);this._gameServer.sendMessage(75,b)},makeSoftPurchase:function(a){if(h.models.shopItems.getItemByPurchaseId(a).price>h.user.get_coins())this.S_notEnoughCoins.dispatch();else{var b=new Qe;b.set_purchaseId(a);this._gameServer.sendMessage(70,b)}},makePurchase:function(a){if(h.user.isGuest)h.get_events().fire("ShopEvent::show_guest_conversion");else{a=a.data;var b=h.models.shopItems.getItemByPurchaseId(a);b.type==ve.INAPP?this.makeInAppPurchase(a):(this.makeSoftPurchase(a),b.price>h.user.get_coins()||(a=new Kf,h.views.openView(a,{animate:!0,allowClickClose:!1,callerView:ic.instance.shopDialog}),h.get_events().dispatchEventWith("ShopEvent::DISABLE_SHOP")))}},useItem:function(a){a=a.data;if(y.__instanceof(a,Oa)){this.setSkin(y.__cast(a,Oa).productIdToQuantify);for(var b=0,c=h.models.shopSkinsModel.skinList;b<c.length;){var d=c[b];++b;d.set_inUse(!1)}a.set_inUse(!0);this.shouldShowUseInfo=!1}else y.__instanceof(a,Mb)&&(b=new Ie,b.set_productId(y.__cast(a,Mb).gameplayInfo.productId),this._gameServer.sendMessage(42,b));this.shouldShowUseInfo&&(a=new kh("0"),h.views.openView(a,{animate:!0,allowClickClose:!1,callerView:ic.instance.shopDialog}),h.get_events().dispatchEventWith("ShopEvent::DISABLE_SHOP"));this.shouldShowUseInfo=!0},unequipSkin:function(a){this.setDefaultSkin()},setDefaultSkin:function(){null!=h.models.defaultSettings.settingList&&""==h.user.defaultSkin&&(h.user.defaultSkin=h.models.defaultSettings.getSettingByKey("skinUnequippedTag"));this.setSkin(h.user.defaultSkin)},setSkin:function(a){var b=new Re,c=new Zd;c.set_valueString(a);c.set_type(1);c.set_key(1);b.get_userSettingsUpdates().push(c);this._gameServer.sendMessage(80,b);h.models.shopItems.setSkinUse(a);b=h.models.shopSkinsModel.getItemById(a);a!=h.user.defaultSkin&&null!=b?(a=b.gamePlayInfo.get_shopImage(),h.services.gameui.setUserSkin(a,b.gamePlayInfo.get_cellColor(),b.tab)):h.services.gameui.setUserSkin(h.user.defaultSkin);h.views.updateViews()},handleUserBoostUpdate:function(a){var b=!1;h.user.evaluateWallet();var c;(c=null==a.get_userBoostItem().get_productId())||(c=a.get_userBoostItem().get_expiresInSeconds(),c=Ga.gte(0,c));if(c)h.get_events().dispatchEventWith("ShopEvent::useProductFailed");else{c=new Xd;c.set_productId(a.get_userBoostItem().get_productId());c.set_expiresInSeconds(a.get_userBoostItem().get_expiresInSeconds());for(var d=h.models.shopBoostItems.getItemByProductId(c.get_productId()),e=0,f=h.user.userBoosts.length;e<f;){var n=e++;h.models.shopBoostItems.getItemByProductId(h.user.userBoosts[n].get_productId()).categoryShopId==d.categoryShopId&&(b=!0,H.remove(h.user.userBoosts,h.user.userBoosts[n]))}h.user.userBoosts.push(c);h.user.evaluateWallet();h.user.handleUserUpdates(y.__cast(a,Je).get_productUpdates());!b&&this.shouldShowUseInfo&&(this.onUseResponse.dispatch(h.models.shopBoostItems.getItemByProductId(c.get_productId())),this.shouldShowUseInfo=!0);h.views.updateViews()}},__class__:te};var vf=function(){};g["agario.services.ViewService"]=vf;vf.__name__=["agario","services","ViewService"];vf.__interfaces__=[Lb];vf.prototype={create:function(){h.get_events().addEventListener("ShopEvent::show_guest_conversion",k(this,this.showGuest));h.get_events().addEventListener("shop_event::showGiftUnavailable",k(this,this.showGiftUnavailable))},initialize:function(){},showGiftUnavailable:function(a){h.get_events().removeEventListener("shop_event::showGiftUnavailable",k(this,this.showGiftUnavailable));h.services.gameui.showContainer();a=new Ph;h.views.openView(a,{animate:!0,allowClickClose:!0});a.addEventListener(v.CLOSE,k(this,this.onGuestClose));h.get_events().dispatchEventWith("ShopEvent::DISABLE_SHOP");h.get_events().dispatchEventWith("shop_event::allow_disable_close",!1)},showGuest:function(a){a=new Qh;h.views.openView(a,{animate:!0,allowClickClose:!0});a.addEventListener(v.CLOSE,k(this,this.onGuestClose));h.get_events().dispatchEventWith("ShopEvent::DISABLE_SHOP");h.get_events().dispatchEventWith("shop_event::allow_disable_close",!1)},onGuestClose:function(a){h.states.getState("state_shop_dialog",!0).enabled?ic.instance.shopDialog.enable():h.services.gameui.hideContainer()},__class__:vf};var Bg=function(){this.currencyCode="USD"};g["agario.services.XsollaPaymentService"]=Bg;Bg.__name__=["agario","services","XsollaPaymentService"];Bg.__interfaces__=[ae,vd];Bg.prototype={payment_endpoint:null,currencyCode:null,_models:null,create:function(){},initialize:function(){this._models=na.getService(sd);this._models.onConfigurationLoaded.add(k(this,this.fetchStoreItems))},configure:function(a){this.payment_endpoint=a.endpoint},buyProduct:function(a,b,c){this.doShowPaymentModal(""+this.payment_endpoint+"/pay/"+a+"/"+b+"/"+c)},doShowPaymentModal:function(a){var b=this;$.get(a,function(a){$("#modal-payment-link").attr("href",a.iframe_url);jQuery(".xsolla_container").magnificPopup({type:"iframe",mainClass:"mfp-fade",preloader:!0,fixedContentPos:!1,callbacks:{close:function(){b.onIframeClose()}}});$("#modal-payment-link").click()});h.states.enable("state_xsolla_iframe")},onIframeClose:function(){h.states.disable("state_xsolla_iframe")},handleBuyProduct:function(a){null},getCurrencyCode:function(){return this.currencyCode},overrideCurrencyCode:function(a){return this.currencyCode=a},fetchStoreItems:function(){var a=new yj(""+this.payment_endpoint+"/shop-items");a.onData=k(this,this.handleFetchStore);a.onError=function(a){null};a.request()},handleFetchStore:function(a){var b=new If((new Dd(a)).parseRec());if(null!=b){this.currencyCode=b.currency_code;a=0;for(b=b.items;a<b.length;){var c=b[a];++a;var d=this._models.shopItems.getItemByPurchaseId(""+c.sku);null!=d&&(d.price=c.price)}h.get_events().dispatchEventWith("payment_event::got_currency_code")}},__class__:Bg};var Rh=function(){};g["agario.services.gameui.BaseGameUIService"]=Rh;Rh.__name__=["agario","services","gameui","BaseGameUIService"];Rh.prototype={enableShop:function(){null},setUserSkin:function(a,b,c){null},setUserXPBoost:function(a){null},setUserMassBoost:function(a){null},setBoostPlus:function(a){null},setBoostQuantity:function(a,b){null},showRetryOption:function(){null},setTimerForBoost:function(a,b,c,d){null},closeShop:function(){null},setIcon:function(a,b){null},setUserCoins:function(a){null},setUserName:function(a){},setUserAvatar:function(a){},getUserSocialId:function(a){a("100000415416793")},disableShop:function(){null},setVersionTag:function(a){null},setUserIdTag:function(a){null},doLogout:function(){null},setMobileUser:function(a){null},showGamepadConnected:function(){null},showGamepadDisconnected:function(){null},setAccountData:function(a,b){},setGuestInfo:function(){},clearTimers:function(){},showContainer:function(){},hideContainer:function(){},openOfferWall:function(){},closeOfferWall:function(){},openVideoAd:function(){},
closeVideoAd:function(){},getUserEngagement:function(){return!1},hasLoginIntent:function(){return 0},__class__:Rh};var Oh=function(){this.runningTimers=[];h.get_events().addEventListener(hd.USER_LOGGED,k(this,this.onUserLogged))};g["agario.services.gameui.backend.js.GameUIService"]=Oh;Oh.__name__="agario services gameui backend js GameUIService".split(" ");Oh.__super__=Rh;Oh.prototype=t(Rh.prototype,{runningTimers:null,onUserLogged:function(a){this.setUserIdTag("User id: "+h.user.userInfo.displayName);
h.user.userInfo.xpNeeded=h.models.xpModel.getMaxXpForLevel(h.user.userInfo.level);agarApp.core.trigger("user_login",[h.user]);h.user.userInfo.level>=h.models.xpModel.xpList.length&&(h.user.userInfo.xp=h.user.userInfo.xpNeeded);agarApp.account.setUserData(h.user.userInfo);this.enableShop()},setUserSkin:function(a,b,c){null==c&&(c="");null==b&&(b="");var d=$("#skinButton img");d.addClass("circle bordered");d.height("90px");if(a==h.user.defaultSkin)$("#skinLabel").fadeIn(100),d.fadeOut(100),d.attr("src",
""),$("#skinButton").addClass("circle bordered"),$("#skinButton").height("90px");else{var e=$("#skinLabel");d.attr("src",a);d.css("border","3px solid "+P.replace(b,"0x","#"));e.fadeOut(100);d.fadeIn(100);$("#skinButton").removeClass("circle bordered")}$("#skinButton").attr("data-type",c)},setMobileUser:function(a){0==a&&($(".agario-promo").fadeOut(400),$("#agario-web-incentive").delay(800).fadeIn(400))},setUserXPBoost:function(a){var b=this.getTargetHTML(sc.XP_BOOST);$(b+" div").attr("class","circle small red");
"0"==a||"+"==a?this.setBoostPlus(sc.XP_BOOST):this.setBoostQuantity(sc.XP_BOOST,a)},setUserMassBoost:function(a){var b=this.getTargetHTML(sc.MASS_BOOST);$(b+" div").attr("class","circle small red");"0"==a||"+"==a?this.setBoostPlus(sc.MASS_BOOST):this.setBoostQuantity(sc.MASS_BOOST,a)},setBoostPlus:function(a){var b=this.getTargetHTML(a);$(b+" div").attr("class","circle small green");this.setBoostQuantity(a,"+")},setBoostQuantity:function(a,b){var c=this.getTargetHTML(a);$(c+" div").children("span").text(b);
$(c+" .outlined-text").removeClass("plus-text");"+"==b&&$(c+" .outlined-text").addClass("plus-text")},enableShop:function(){$("#openShopBtn").removeAttr("disabled");$(".shop-left-container").show();$(".shop-right-container").show();$(".vertical-line").show();$(".agario-shop-panel .text-muted").html("");$(".agario-shop-panel").fadeIn(200);$("#retryBtn").hide();$(".shop-blocker").fadeOut(100)},disableShop:function(){$("#openShopBtn").attr("disabled","");$(".shop-blocker").fadeIn(100);this.setUserXPBoost("0");
this.setUserMassBoost("0");this.setUserSkin("")},showRetryOption:function(){$(".shop-left-container").hide();$(".shop-right-container").hide();$(".vertical-line").hide();$(".shop-blocker").fadeOut(100);$("#retryBtn").show();$(".agario-shop-panel .text-muted").html("");$(".agario-shop-panel .text-muted").html(E.text("shop_unavailable_message"))},setTimerForBoost:function(a,b,c,d){a=this.getTargetHTML(a);var e=$(a+" .timer");$(a+" div").attr("class","circle small gray");e.show();this.setTimer(a,b,c,
d)},setIcon:function(a,b){$(this.getTargetHTML(a)+" img").attr("src",Ha.config.assetsPrefix+b)},getTargetHTML:function(a){var b="";switch(a){case "xp_boost":b="#boostButton";break;case "mass_boost":b="#massButton"}return b},closeShop:function(){for(var a=this.runningTimers.length,b=0;b<a;){var c=b++;null!=this.runningTimers[c]&&(this.runningTimers[c].stop(),$(K.string(this.runningTimers[c].data.container)+" .timer").text(""),H.remove(this.runningTimers,this.runningTimers[c]))}this.setUserSkin("")},
setUserCoins:function(a){a=Ua.formatNumber(a,"n"," ");$(".agario-wallet-label").text(null==a?"null":""+a)},setUserName:function(a){$(".agario-profile-name").text(a)},setUserAvatar:function(a){$(".agario-profile-picture").attr("src",a)},setVersionTag:function(a){$("#version-tag").text(a)},setUserIdTag:function(a){$("#user-id-tag").text(a)},hasLoginIntent:function(){return window.storageInfo.loginIntent},getUserSocialId:function(a){FB.api("/me",function(b){b&&!b.error&&a(b.id)})},doLogout:function(){window.logout()},
showGamepadConnected:function(){"gamepad"in queryString&&$("#controller_alert_connected").fadeIn(500).delay(3E3).fadeOut(500)},showGamepadDisconnected:function(){"gamepad"in queryString&&$("#controller_alert_disconnected").fadeIn(500).delay(3E3).fadeOut(500)},setAccountData:function(a,b){agarApp.account.setAccountData(a,b)},setGuestInfo:function(){this.setAccountData({level:1,xp:0,xpNeeded:50},!1);this.setUserCoins(100);this.setUserName("Guest");this.setUserAvatar(h.services.config.getRootUrl("img/profilepic_guest.png"));
this.setUserXPBoost("0");this.setUserMassBoost("0");$("#agario-web-incentive").fadeOut(100);$(".agario-promo").delay(200).fadeIn(400)},setTimer:function(a,b,c,d){for(var e=!1,f=0,n=this.runningTimers.length;f<n;){var L=f++;this.runningTimers[L].data.productId==d&&(e=!0)}e||(e=new Sh(1E3),e.data.targetDate=(new Date).getTime()+1E3*b,e.data.container=a,e.data.productId=d,e.addEventListener(tc.TIMER,k(this,this.onTimerTick)),e.data.callBack=c,e.start(),this.runningTimers.push(e))},onTimerTick:function(a){var b=
a.currentTarget.data,c=b.targetDate-(new Date).getTime(),d=c/1E3|0,e=d/60|0,f=e/60|0,n=f%60+"h "+e%60+"m "+d%60+"s";1>f&&(n=e%60+"m "+d%60+"s");0>=c&&(c=this.runningTimers.filter(function(a){return a.data.productId==b.productId})[0],H.remove(this.runningTimers,c),a.currentTarget.stop(),c=0,n="",G.callMethod({},b.callBack,[b.productId]));$(K.string(b.container)+" .timer").text(n)},clearTimers:function(){for(var a=0,b=this.runningTimers.length;a<b;){var c=a++;null!=this.runningTimers[c]&&this.runningTimers[c].running&&
this.runningTimers[c].stop();this.runningTimers=[]}},openOfferWall:function(){window.openOfferwall();h.states.enable("state_offerwall_window")},openVideoAd:function(){window.openVideoAd();h.states.enable("state_video_window")},closeVideoAd:function(){window.closeVideoAd()},getUserEngagement:function(){return window.hasEngagement},showContainer:function(){var a=ic.instance.container,b=ic.instance.overlay;""!=b&&$("#"+b).fadeIn();$("#"+a).fadeIn()},hideContainer:function(){var a=ic.instance.container,
b=ic.instance.overlay;""!=b&&$("#"+b).fadeOut();$("#"+a).fadeOut()},__class__:Oh});var wf=function(){};g["agario.services.social.FBSocialService"]=wf;wf.__name__=["agario","services","social","FBSocialService"];wf.__interfaces__=[Lb];wf.prototype={create:function(){},initialize:function(){},share:function(a,b,c,d,e,f,n,L){FB.ui({method:"feed",display:"iframe",name:a,caption:b,description:c,link:d,picture:e,actions:{name:f,link:n}},L)},__class__:wf};var xf=function(){};g["agario.services.social.GoogleSocialService"]=
xf;xf.__name__=["agario","services","social","GoogleSocialService"];xf.__interfaces__=[Lb];xf.prototype={create:function(){},initialize:function(){},share:function(a){ol.JQuery("#externalGShare").trigger("click")},setShareText:function(a){window.fillSocialValues(a,"externalGShare")},__class__:xf};var ue=function(){};g["agario.services.social.SocialService"]=ue;ue.__name__=["agario","services","social","SocialService"];ue.__interfaces__=[Lb];ue.prototype={fbSocial:null,twitterSocial:null,googleSocial:null,
storyList:null,create:function(){},initialize:function(){this.fbSocial=na.getService(wf);this.twitterSocial=na.getService(yf);this.googleSocial=na.getService(xf)},getStoryById:function(a){this.storyList=h.services.config.get_currentConfig().externalSocialStories;return this.storyList.filter(function(b){return b.id==a})[0]},shareFB:function(a,b,c){a=this.getStoryById(a);var d=E.text(a.titleTag,b),e=a.iconURL;null!=c&&(e=c);this.fbSocial.share(d,E.text(a.subtitleTag,b),E.text(a.descriptionTag,b),"http://agar.io",
e,E.text("menu_play"),"http://agar.io",k(this,this.onShare))},directShareFB:function(a,b,c,d,e){a=this.getStoryById(a).iconURL;null!=e&&(a=e);this.fbSocial.share(b,c,d,"http://agar.io",a,E.text("menu_play"),"http://agar.io",k(this,this.onShare))},shareTwitter:function(a,b){var c=this.getStoryById(a),c=P.urlEncode(E.text(c.twitterSubtitleTag,b));this.twitterSocial.share(c)},shareGoogle:function(a,b){var c=this.getStoryById(a);this.googleSocial.share(E.text(c.titleTag,b)+" "+E.text(c.subtitleTag,b))},
prepareGoogleShare:function(a,b){var c=this.getStoryById(a);this.googleSocial.setShareText(E.text(c.titleTag,[b[1]])+" "+E.text(c.subtitleTag,[b[0]]))},onShare:function(){null},__class__:ue};var yf=function(){};g["agario.services.social.TwitterSocialService"]=yf;yf.__name__=["agario","services","social","TwitterSocialService"];yf.__interfaces__=[Lb];yf.prototype={create:function(){},initialize:function(){},share:function(a){window.open("https://twitter.com/intent/tweet?text="+a,"Agar.io","width=660,height=310,menubar=no,toolbar=no,resizable=yes,scrollbars=no,left="+
(window.screenX+window.innerWidth/2-330)+",top="+((window.innerHeight-310)/2|0))},__class__:yf};var zj=function(){X.call(this);this.maxHeight=this.maxWidth=300};g["agario.views.DebugView"]=zj;zj.__name__=["agario","views","DebugView"];zj.__super__=X;zj.prototype=t(X.prototype,{initialize:function(){var a=this;X.prototype.initialize.call(this);var b=[];b.push(h.get_assets().getAtlas("menusCommonUI").load());mc.whenAll(b).then(k(this,this.buildUI)).catchError(function(b){a.close()});this.showLoading()},
buildUI:function(a){this.hideLoading();a=new C;this.addChild(a);a.addChild(h.get_assets().getAtlas("menusCommonUI").get("tapjoy_icon").asBitmap())},__class__:zj});var La=function(){this.hasEngagement=!1;this.padding=20;X.call(this);this.maxWidth=500;this.maxHeight=160;h.get_events().addEventListener("ShopEvent::checkVideos",k(this,this.checkEngagement));h.get_events().addEventListener("ShopEvent::connectionLost",k(this,this.onConnectionLost))};g["agario.views.FreeCoinsDialog"]=La;La.__name__=["agario",
"views","FreeCoinsDialog"];La.freeCoinsBtn=null;La.onFreeCoinsResponse=function(){La.freeCoinsBtn.setTimeLeft(h.user.freeCoinTimeLeft())};La.triggerFreeCoins=function(){var a=h.user.freeCoinTimeLeft(),b=h.user.userInfo.getTimedEvent("hourlyBonus");null==b||0<a||(a=na.getService(Nc),a.unregister(76,La.onTimedEventResponse),a.register(76,La.onTimedEventResponse),h.services.shop.activateTimedEvent(b.eventId))};La.onTimedEventResponse=function(a,b){76==a&&(0==b.get_productUpdates().length&&h.user.userInfo.setTimedEvent(new Ce(b.get_userTimedEvent())),
h.get_events().dispatchEventWith("ShopEvent::freeCoinsResponse"),h.user.handleUserUpdates(b.get_productUpdates()),h.user.userInfo.setTimedEvent(new Ce(b.get_userTimedEvent())),La.onFreeCoinsResponse(),na.getService(Nc).unregister(76,La.onTimedEventResponse))};La.openCollectDialog=function(a,b,c,d){null==c&&(c=!0);c=new oh(c);null!=b&&c.onClose.addOnce(b);h.views.openView(c,{animate:!0,allowClickClose:!0,callerView:d});if(!a)c.onDataReady()};La.__super__=X;La.prototype=t(X.prototype,{titleLabel:null,
padding:null,hasEngagement:null,videoBtn:null,offerBtn:null,btnContainer:null,redLbl:null,_serverModel:null,disconnectDialog:null,initialize:function(){X.prototype.initialize.call(this);this.hasEngagement=h.services.gameui.getUserEngagement();this.drawTitle();this.drawButtons();this.startCountingTimers();this.doLayout()},onConnectionLost:function(a){h.views.closeAllViews(La);this.disable();this.disconnectDialog=new Lf("Connection Lost!","Shop not available at the moment,\n please come back later.");
h.views.openView(this.disconnectDialog,{animate:!0,allowClickClose:!1,callerView:this});h.get_events().removeEventListener("ShopEvent::connectionLost",k(this,this.onConnectionLost));this.disconnectDialog.addEventListener(v.CLOSE,k(this,this.closeDisconnect))},closeDisconnect:function(a){h.views.closeTopView()},doLayout:function(){this.titleLabel.set_x(.5*(this.maxWidth-this.titleLabel.get_textWidth()));this.titleLabel.set_y(this.padding);this.videoBtn.set_x(150);this.offerBtn.set_x(300);this.btnContainer.set_y(80);
this.btnContainer.set_x((this.maxWidth-this.btnContainer.get_width())/2);null!=this.redLbl&&(this.redLbl.set_x(this.videoBtn.get_x()),this.redLbl.set_y(this.videoBtn.get_y()+this.videoBtn.get_height()+5))},drawTitle:function(){var a=new jd("Arial",30,0,!0);a.align=T.LEFT;this.titleLabel=new Ma;this.titleLabel.set_defaultTextFormat(a);this.titleLabel.set_text(E.text("menu_main_free_coins"));this.titleLabel.set_width(this.maxWidth-this.padding);this.titleLabel.set_height(this.titleLabel.get_textHeight()+
5);this.titleLabel.set_autoSize(ia.LEFT);this.titleLabel.set_selectable(!1);this.titleLabel.set_embedFonts(!1);this.titleLabel.set_textColor(5329233);this.addChild(this.titleLabel)},drawButtons:function(){this.btnContainer=new C;La.freeCoinsBtn=new Th;La.freeCoinsBtn.addEventListener(F.CLICK,k(this,this.onFreeCoinsClick));La.freeCoinsBtn.addEventListener(v.COMPLETE,k(this,this.onFreeCoinsComplete));this.btnContainer.addChild(La.freeCoinsBtn);var a=new Q(h.get_assets().getTexture("freecoins_video").get_bitmapData());
this.videoBtn=new rb({color:5880408,overColor:4294721,text:E.text("menu_main_free_coins"),textColorOver:16777215,textColor:16777215,icon:a,iconPadding:6,w:140,h:50,fontSize:14,bold:!0});this.btnContainer.addChild(this.videoBtn);this.videoBtn.addEventListener(F.CLICK,k(this,this.onVideoClick));this.offerBtn=new rb({color:110829,overColor:621990,text:E.text("free_coins_offers"),textColorOver:16777215,textColor:16777215,w:140,h:50,fontSize:14,bold:!0});this.btnContainer.addChild(this.offerBtn);this.offerBtn.addEventListener(F.CLICK,
k(this,this.onOfferWallClick));this.addChild(this.btnContainer);this.checkVideoAvailable()},checkVideoAvailable:function(){this.hasEngagement||(this.redLbl=new ea({text:E.text("free_coins_unavailable"),fontSize:12,color:16711680,bold:!1}),this.addChild(this.redLbl),this.videoBtn.set_alpha(.6),this.videoBtn.set_enabled(!1),this.redLbl.set_x(this.videoBtn.get_x()+(this.videoBtn.get_width()-this.redLbl.get_width())/2),this.redLbl.set_y(this.videoBtn.get_y()+this.videoBtn.get_height()+5),this.btnContainer.addChild(this.redLbl))},
onFreeCoinsComplete:function(a){La.freeCoinsBtn.setTimeLeft(0)},onVideoClick:function(a){this.hasEngagement&&(this.disable(),h.services.gameui.openVideoAd())},onOfferWallClick:function(a){h.services.gameui.openOfferWall()},startCountingTimers:function(){var a=h.user.freeCoinTimeLeft();La.freeCoinsBtn.setTimeLeft(a)},onFreeCoinsClick:function(a){0==h.user.freeCoinTimeLeft()?La.openCollectDialog(!0,k(this,this.onCloseHandler),!0,this):La.openCollectDialog(!1,k(this,this.onCloseHandler),!0,this);this.disable();
La.triggerFreeCoins()},onCloseHandler:function(){this.enable();h.get_events().dispatchEventWith("ShopEvent::ENABLE_SHOP")},checkEngagement:function(a){this.hasEngagement=h.services.gameui.getUserEngagement();this.checkVideoAvailable()},deinitialize:function(){X.prototype.deinitialize.call(this);this.dispose()},dispose:function(){X.prototype.dispose.call(this);this.offerBtn.removeEventListener(F.CLICK,k(this,this.onOfferWallClick));this.videoBtn.removeEventListener(F.CLICK,k(this,this.onVideoClick));
La.freeCoinsBtn.removeEventListener(F.CLICK,k(this,this.onFreeCoinsClick));La.freeCoinsBtn.removeEventListener(v.COMPLETE,k(this,this.onFreeCoinsComplete));h.get_events().removeEventListener("ShopEvent::checkVideos",k(this,this.checkEngagement));h.get_events().removeEventListener("ShopEvent::connectionLost",k(this,this.onConnectionLost))},__class__:La});var Ph=function(){X.call(this);this.maxWidth=520;this.maxHeight=450};g["agario.views.GiftUnavailableDialog"]=Ph;Ph.__name__=["agario","views","GiftUnavailableDialog"];
Ph.__super__=X;Ph.prototype=t(X.prototype,{grayArea:null,img:null,title:null,subTitle:null,appleButton:null,androidButton:null,initialize:function(){X.prototype.initialize.call(this);this.title=new ea({text:E.text("menu_main_gifts"),bold:!0,color:0,fontSize:34,width:this.maxWidth-25,align:T.CENTER});this.title.mouseEnabled=!1;this.addChild(this.title);this.subTitle=new ea({text:E.text("gifting_unavailable_subtitle"),bold:!0,color:0,fontSize:21,width:this.maxWidth-20,align:T.CENTER});this.addChild(this.subTitle);
this.grayArea=new C;this.grayArea.get_graphics().beginFill(16119285);this.grayArea.get_graphics().drawRect(0,0,this.maxWidth-40,230);this.grayArea.get_graphics().endFill();this.addChild(this.grayArea);this.img=new Q(h.get_assets().getTexture("gifts_icon").get_bitmapData(),$a.AUTO,!0);this.addChild(this.img);this.appleButton=new $f(new Q(h.get_assets().getTexture("appstore").get_bitmapData(),$a.AUTO,!0));this.addChild(this.appleButton);this.androidButton=new $f(new Q(h.get_assets().getTexture("google_play").get_bitmapData(),
$a.AUTO,!0));this.addChild(this.androidButton);this.doLayout()},doLayout:function(){this.title.set_x(20);this.title.set_y(20);this.subTitle.set_y(this.title.get_y()+this.title.get_height());this.subTitle.set_x(20);this.grayArea.set_x(20);this.grayArea.set_y(this.subTitle.get_y()+this.subTitle.get_height()+10);this.img.set_x(this.grayArea.get_x()+(this.grayArea.get_width()-this.img.get_width())/2);this.img.set_y(this.grayArea.get_y()+20);this.appleButton.set_y(this.androidButton.set_y(this.grayArea.get_y()+
this.grayArea.get_height()+20));this.appleButton.set_x(130);this.appleButton.addEventListener(F.CLICK,k(this,this.onAppleclick));this.androidButton.set_x(this.maxWidth-this.androidButton.get_width()-130);this.androidButton.addEventListener(F.CLICK,k(this,this.onAndroidClick))},onAppleclick:function(a){ja.getURL(new be("https://itunes.apple.com/app/agar.io/id995999703?mt=8&at=1l3vajp"))},onAndroidClick:function(a){ja.getURL(new be("https://play.google.com/store/apps/details?id=com.miniclip.agar.io"))},
__class__:Ph});var Qh=function(){X.call(this);this.maxWidth=415;this.maxHeight=630};g["agario.views.GuestLoginDialog"]=Qh;Qh.__name__=["agario","views","GuestLoginDialog"];Qh.__super__=X;Qh.prototype=t(X.prototype,{grayArea:null,title:null,img:null,txtDescription:null,fbLoginBtn:null,googleBtn:null,subTitle:null,initialize:function(){X.prototype.initialize.call(this);h.get_events().addEventListener(v.DEACTIVATE,k(this,this.onDeactivate));this.title=new ea({text:E.text("menu_not_avail_title"),bold:!0,
color:0,fontSize:34,width:this.maxWidth-25,align:T.CENTER});this.title.mouseEnabled=!1;this.addChild(this.title);this.subTitle=new ea({text:E.text("menu_guest_login_subtitle"),bold:!0,color:14699578,fontSize:26,width:this.maxWidth-20,align:T.CENTER});this.addChild(this.subTitle);this.grayArea=new C;this.grayArea.get_graphics().beginFill(16119285);this.grayArea.get_graphics().drawRect(0,0,this.maxWidth-40,340);this.grayArea.get_graphics().endFill();this.addChild(this.grayArea);this.img=new Q(h.get_assets().getTexture("not_for_guests").get_bitmapData(),
$a.AUTO,!0);this.addChild(this.img);this.txtDescription=new ea({text:"\u2022 Bonus starting mass \u2022\n\u2022 Earn XP and level up \u2022\n\u2022 Earn Coins \u2022\n\u2022 Get boosts and Premium skins \u2022\n\u2022 Save your stats \u2022\n\u2022 Play on multiple devices \u2022",color:4225790,fontSize:16,width:this.grayArea.get_width(),leading:8,align:T.CENTER});this.addChild(this.txtDescription);this.createFbLogin();this.createGoogleLogin();this.doLayout()},onDeactivate:function(a){h.views.closeTopView()},
createGoogleLogin:function(){var a=new Q(h.get_assets().getTexture("gplus_icon").get_bitmapData());this.googleBtn=new rb({color:14699578,overColor:14699578,text:"Sign in with Google",textColorOver:16777215,textColor:16777215,icon:a,iconPosition:"left",iconPadding:25,w:320,h:35,fontSize:18,bold:!0});this.addChild(this.googleBtn);this.googleBtn.addEventListener(F.CLICK,function(a){$("#gplusLogin").trigger("click");h.get_events().dispatchEventWith(v.DEACTIVATE);h.get_events().dispatchEventWith("ShopEvent::ENABLE_SHOP")})},
createFbLogin:function(){var a=new Q(h.get_assets().getTexture("fb_icon").get_bitmapData());this.fbLoginBtn=new rb({color:3625371,overColor:3625371,text:"Sign in with Facebook",textColorOver:16777215,textColor:16777215,icon:a,iconPosition:"left",iconPadding:25,w:320,h:35,fontSize:18,bold:!0});this.addChild(this.fbLoginBtn);this.fbLoginBtn.addEventListener(F.CLICK,function(a){window.facebookLogin();h.get_events().dispatchEventWith(v.DEACTIVATE);h.get_events().dispatchEventWith("ShopEvent::ENABLE_SHOP")})},
dispose:function(){X.prototype.dispose.call(this);h.get_events().removeEventListener(v.DEACTIVATE,k(this,this.onDeactivate))},doLayout:function(){this.title.set_x(20);this.title.set_y(20);this.subTitle.set_x(20);this.subTitle.set_y(this.title.get_y()+this.title.get_height());this.grayArea.set_x(20);this.grayArea.set_y(this.subTitle.get_y()+this.subTitle.get_height()+10);this.img.set_x(this.grayArea.get_x()+(this.grayArea.get_width()-this.img.get_width())/2);this.img.set_y(this.grayArea.get_y()+10);
this.txtDescription.set_x(this.grayArea.get_x());this.txtDescription.set_y(this.img.get_y()+this.img.get_height()+10);this.fbLoginBtn.set_x(this.googleBtn.set_x((this.maxWidth-this.fbLoginBtn.get_width())/2));this.fbLoginBtn.set_y(this.grayArea.get_y()+this.grayArea.get_height()+20);this.googleBtn.set_y(this.fbLoginBtn.get_y()+this.fbLoginBtn.get_height()+10)},__class__:Qh});var Dc=function(){this.redirect_to="";this.initialized=!1;this.lastCategory=this.currentCategory="";X.call(this);this.maxWidth=
760;this.maxHeight=560};g["agario.views.ShopDialog"]=Dc;Dc.__name__=["agario","views","ShopDialog"];Dc.__super__=X;Dc.prototype=t(X.prototype,{lastCategory:null,currentCategory:null,initialized:null,viewContainer:null,currentView:null,backButton:null,titleLabel:null,viewMain:null,viewCoins:null,viewMass:null,viewSkins:null,viewBoosts:null,hud:null,_container:null,redirect_to:null,redirect_data:null,redirect_path:null,disconnectDialog:null,initialize:function(){X.prototype.initialize.call(this);this.showLoading();
this._container=new C;this.addChild(this._container);this._container.set_alpha(0);h.get_events().addEventListener("ShopEvent::connectionLost",k(this,this.onConnectionLost));this.onShopReady(null)},onConnectionLost:function(a){h.views.closeAllViews(Dc);this.disable();this.disconnectDialog=new Lf("Connection Lost!","Shop not available at the moment,\n please come back later.");h.views.openView(this.disconnectDialog,{animate:!0,allowClickClose:!1,callerView:this});h.get_events().removeEventListener("ShopEvent::connectionLost",
k(this,this.onConnectionLost));this.disconnectDialog.addEventListener(v.CLOSE,k(this,this.closeDisconnect))},closeDisconnect:function(a){h.views.closeTopView()},onShopReady:function(a){h.get_events().removeEventListener("ShopEvent::Ready",k(this,this.onShopReady));h.services.shop.isShopAvailable=!0;this.buildUI();ga.tween(this._container,.5,{alpha:1});this.hideLoading();""!=this.redirect_to&&(this.openCategory(this.redirect_to,this.redirect_path,this.redirect_data),this.redirect_to="")},buildUI:function(){var a=
this;this.backButton=new Uh;this._container.addChild(this.backButton);this.backButton.set_visible(!1);var b=new jd("Arial",30,0,!0);b.align=T.LEFT;this.titleLabel=new Ma;this.titleLabel.set_defaultTextFormat(b);this.titleLabel.set_text(E.text("menu_main_shop"));this.titleLabel.set_width(this.maxWidth-20);this.titleLabel.set_height(this.titleLabel.get_textHeight()+5);this.titleLabel.set_autoSize(ia.LEFT);this.titleLabel.set_selectable(!1);this.titleLabel.set_embedFonts(!1);this.titleLabel.set_textColor(5329233);
this._container.addChild(this.titleLabel);this.hud=new Vh;this._container.addChild(this.hud);this.hud.addEventListener(F.CLICK,k(this,this.onHudClick));this.hud.set_y(35);this.hud.set_x(this.maxWidth-this.hud.get_width()/2-20);this.viewContainer=new C;this._container.addChild(this.viewContainer);this.viewMain=new eh;this.viewCoins=new dh;this.viewMass=new fh;this.viewSkins=new gh;this.viewBoosts=new ih;this.setView(this.viewMain);this.viewMain.coinsSectionBtn.addEventListener(F.CLICK,k(this,this.handleCurrencySectionClick));
this.viewMain.massSectionBtn.addEventListener(F.CLICK,k(this,this.handleMassSectionClick));this.viewMain.skinsSectionBtn.addEventListener(F.CLICK,k(this,this.handleSkinsSectionClick));this.viewMain.xpSectionBtn.addEventListener(F.CLICK,k(this,this.handleBoostSectionClick));this.backButton.addEventListener(F.CLICK,k(this,this.handleBackButton));b=h.services.shop;b.onSoftPurchaseResponse.add(k(this,this.handleSoftPurchaseComplete));b.onUseResponse.add(k(this,this.handleUseResponse));b.S_notEnoughCoins.add(k(this,
this.notEnoughCoins));b.onIAPComplete.add(k(this,this.handleIAPComplete));h.get_events().addEventListener("ShopEvent::ENABLE_SHOP",k(this,this.enableShop));h.get_events().addEventListener("ShopEvent::DISABLE_SHOP",k(this,this.disableShop));h.get_events().addEventListener("shop_event::allow_disable_close",k(this,this.handleAllowDisableCloseEvent));this.addEventListener(v.CLOSE,function(b){h.get_events().dispatchEventWith("ShopEvent::SHOP_ENABLED");a.enable();a.closeButton.set_enabled(!0)},!1,0,!0);
this.initialized=!0},handleAllowDisableCloseEvent:function(a){this.allowDisableClose=a.data},enableShop:function(a){this.enable()},enable:function(){X.prototype.enable.call(this);this.closeButton.set_enabled(!0)},disableShop:function(a){this.closeButton.set_enabled(!1);this.disable()},onCloseHandler:function(){this.enableShop()},onHudClick:function(a){"shopCurrency"!=this.currentCategory&&(this.lastCategory=this.currentCategory,this.openCategory("shopCurrency"))},notEnoughCoins:function(){this.lastCategory=
this.currentCategory;this.openCategory("shopCurrency");this.setTitle(E.text("menu_not_enough_coins_title"))},getItem:function(a){return h.models.shopItems.getItemByPurchaseId(a)},handleUseResponse:function(a){null!=a&&h.get_events().dispatchEventWith("ShopEvent::useProductResponse",a,!0)},displayProductPurchaseScreen:function(a){h.views.closeAllViews(Dc);var b=new Kf;h.views.openView(b,{animate:!0,allowClickClose:!1,callerView:ic.instance.shopDialog});h.get_events().dispatchEventWith("ShopEvent::DISABLE_SHOP");
a=this.getItem(a);null!=a&&(h.get_events().dispatchEventWith("ShopEvent::INAPP_PURCHASE_COMPLETE",a),h.get_events().dispatchEventWith("ShopEvent::useProductResponse",a))},handleIAPComplete:function(a){this.displayProductPurchaseScreen(a)},handleSoftPurchaseComplete:function(a){var b=this.getItem(a.get_purchaseId());if(1==a.get_result()&&null!=b){if(y.__instanceof(b,Oa))b.set_owned(!0),h.get_events().dispatchEventWith("ShopEvent::USE",b);else if(y.__instanceof(b,Mb)){var c=h.user.getWalletItemById(y.__cast(b,
Mb).productIdToQuantify);null==c&&(c=new Vd({productId:y.__cast(b,Mb).productIdToQuantify,balance:1}),h.user.wallet.push(c));h.get_events().dispatchEventWith("ShopEvent::USE",b)}h.user.handleUserUpdates(a.get_productUpdates());this.currentView.updateView();h.get_events().dispatchEventWith("ShopEvent::softPurchaseComplete",b)}else h.get_events().dispatchEventWith("shopevent::soft_purchase_failed",b)},_update:function(){this.titleLabel.set_x(.5*(this.maxWidth-this.titleLabel.get_textWidth()));this.titleLabel.set_y(30);
this.backButton.set_x(30);this.backButton.set_y(this.titleLabel.get_y()+(this.titleLabel.get_height()-this.backButton.get_height())/2);this.currentView.set_x((this.maxWidth-this.currentView.maxWidth)/2);this.currentView.set_y(this.titleLabel.get_y()+this.titleLabel.get_height()+15);this.currentView.updateView();return this},setView:function(a,b){null!=this.currentView&&(this.viewContainer.removeChild(this.currentView),this.currentView.deinitialize(),this.currentView=null);if(!this.viewContainer.contains(a)){var c=
Math.floor(this.maxWidth-20),d=Math.floor(this.maxHeight-this.titleLabel.get_height()-50);a.maxWidth=c;a.maxHeight=d;this.viewContainer.addChild(a);null!=b&&""!=b&&a.set_name(b)}this.viewContainer.setChildIndex(a,this.viewContainer.get_numChildren()-1);a.set_visible(!0);this.currentView=a;this.titleLabel.set_text(this.currentView.get_name());this._update()},setTitle:function(a){null!=this.currentView&&this.titleLabel.set_text(a);this._update()},handleBackButton:function(a){""!=this.lastCategory&&
this.lastCategory!=this.currentCategory?(this.openCategory(this.lastCategory),this.lastCategory=this.currentCategory):(this.lastCategory="shopMain",this.openCategory("shopMain"))},handleCurrencySectionClick:function(a){this.openCategory("shopCurrency",!0)},handleMassSectionClick:function(a){this.openCategory("shopMass",!0)},handleSkinsSectionClick:function(a){this.openCategory("shopSkins",!0)},handleBoostSectionClick:function(a){this.openCategory("shopBoost",!0)},openCategory:function(a,b,c){null==
b&&(b=!1);if(""==this.lastCategory||b)this.lastCategory="shopMain";if(this.initialized){this.currentCategory=a;switch(a){case "shopCurrency":this.setView(this.viewCoins);this.backButton.set_visible(!0);break;case "shopMass":this.setView(this.viewMass);this.backButton.set_visible(!0);break;case "shopSkins":this.setView(this.viewSkins);null!=c&&this.viewSkins.showTab(c.tab);this.backButton.set_visible(!0);break;case "shopBoost":this.setView(this.viewBoosts);this.backButton.set_visible(!0);break;default:this.setView(this.viewMain),
this.backButton.set_visible(!1)}this.redirect_to="";this.redirect_data=null;this.redirect_path=!1}else null!=c&&(this.redirect_data=c),null!=b&&(this.redirect_path=b),this.redirect_to=a},updateView:function(){null!=this.currentView&&this.currentView.updateView()},destroy:function(){var a=h.services.shop;a.onSoftPurchaseResponse.removeAll();a.onUseResponse.removeAll();a.S_notEnoughCoins.removeAll();a.onIAPComplete.removeAll();h.get_events().removeEventListener("ShopEvent::ENABLE_SHOP",k(this,this.enableShop));
h.get_events().removeEventListener("ShopEvent::DISABLE_SHOP",k(this,this.disableShop));h.get_events().removeEventListener("ShopEvent::connectionLost",k(this,this.onConnectionLost));null!=this.disconnectDialog&&this.disconnectDialog.removeEventListener(v.CLOSE,k(this,this.closeDisconnect));this.viewMain.coinsSectionBtn.removeEventListener(F.CLICK,k(this,this.handleCurrencySectionClick));this.viewMain.massSectionBtn.removeEventListener(F.CLICK,k(this,this.handleMassSectionClick));this.viewMain.skinsSectionBtn.removeEventListener(F.CLICK,
k(this,this.handleSkinsSectionClick));this.viewMain.xpSectionBtn.removeEventListener(F.CLICK,k(this,this.handleBoostSectionClick))},dispose:function(){this.destroy();this.viewMain.dispose();this.viewCoins.dispose();this.viewMass.dispose();this.viewSkins.dispose();this.viewBoosts.dispose();h.get_events().removeEventListener("ShopEvent::connectionLost",k(this,this.onConnectionLost));X.prototype.dispose.call(this)},onShow:function(){h.states.enable("state_shop_dialog")},onHide:function(){h.states.disable("state_shop_dialog")},
__class__:Dc});var Zi=function(){this.openedViews=[]};g["agario.views.ViewManager"]=Zi;Zi.__name__=["agario","views","ViewManager"];Zi.prototype={openedViews:null,hasViews:null,get_hasViews:function(){return 0<this.openedViews.length},onResize:function(a,b){for(var c=0,d=this.openedViews;c<d.length;){var e=d[c];++c;e.resize(a,b)}},openView:function(a,b){null!=b.callerView&&(a.caller=b.callerView);-1!=H.indexOf(this.openedViews,a,0)&&this.closeView(a);this.openedViews.push(a);a.set_x((h.stage.stageWidth-
a.maxWidth)/2);a.set_y((h.stage.stageHeight-a.maxHeight)/2);a.allowDisableClose=b.allowClickClose;h.stage.addChild(a);a.open(b.animate);a.addEventListener(X.CLOSE,k(this,this.onCloseView))},onCloseView:function(a){y.__instanceof(a.data,da)&&this.closeView(a.data)},closeView:function(a,b){null==b&&(b=!1);-1==H.indexOf(this.openedViews,a,0)||a.isLoading&&!b||(null!=a.caller&&a.caller.enable(),H.remove(this.openedViews,a),a.dispatchEvent(new fb(v.CLOSE)),a.dispose(),a.removeFromParent())},updateViews:function(){for(var a=
0,b=this.openedViews;a<b.length;){var c=b[a];++a;c.updateView()}},getTopView:function(){return 0<this.openedViews.length?this.openedViews[this.openedViews.length-1]:null},closeTopView:function(){0<this.openedViews.length&&this.closeView(this.openedViews[this.openedViews.length-1])},closeAllViews:function(a){for(var b=0,c=this.openedViews;b<c.length;){var d=c[b];++b;if(null!=a&&Qa.getClassName(null==d?null:y.getClass(d))!=Qa.getClassName(a))this.closeView(d,!0);else if(null==a){this.closeView(d,!0);
break}}},enableViews:function(){for(var a=0,b=this.openedViews;a<b.length;){var c=b[a];++a;c.enable()}},__class__:Zi,__properties__:{get_hasViews:"get_hasViews"}};var Hg=function(a){C.call(this);null==a.w&&(a.w=-1);a.w;null==a.h&&(a.h=-1);a.h;this.options=a;this.init()};g["agario.views.components.ImageWrap"]=Hg;Hg.__name__=["agario","views","components","ImageWrap"];Hg.__super__=C;Hg.prototype=t(C.prototype,{options:null,imageMask:null,init:function(){h.remoteAssets.exists(this.options.url,"IMAGE")?
h.remoteAssets.getBitmapData(this.options.url).then(k(this,this.handleImageLoading)):(this.imageMask=new C,0<this.options.w&&(0>this.options.h&&(this.options.h=this.options.w),this.imageMask.get_graphics().beginFill(16777215,.2),this.imageMask.get_graphics().drawRect(0,0,this.options.w,this.options.h),this.imageMask.get_graphics().endFill(),this.addChild(this.imageMask)),h.remoteAssets.loadBitmap(this.options.url,this.options.url).then(k(this,this.handleImageLoading)).catchError(k(this,this.handleError)))},
handleError:function(a){null},handleImageLoading:function(a){if(null!=a){a=new Q(a);this.addChild(a);var b=this.options.w/a.get_width();a.set_scaleX(a.set_scaleY(b));a.smoothing=!0;this.dispatchEvent(new v(v.COMPLETE))}},__class__:Hg});var Ue=function(){this.line=new C;Xa.call(this,{name:"tabcontrol"});this.items=[];this.onChange=new Oc;this.addEventListener(v.ADDED_TO_STAGE,k(this,this.onAdded))};g["mc.system.ui.controls.TabControl"]=Ue;Ue.__name__=["mc","system","ui","controls","TabControl"];Ue.__super__=
Xa;Ue.prototype=t(Xa.prototype,{line:null,items:null,length:null,get_length:function(){return this.items.length},selectedId:null,current:null,onChange:null,onAdded:function(a){this.removeEventListener(v.ADDED_TO_STAGE,k(this,this.onAdded));this.line=new C;this.line.get_graphics().lineStyle(2,12566463,1);this.line.get_graphics().moveTo(10,0);this.line.get_graphics().lineTo(this.maxWidth-80,0);this.line.set_y(30);this.addChild(this.line)},setTab:function(a){this.changeTab(this.items[a],!0)},setTabByName:function(a){var b=
this.items.filter(function(b){return b.id==a})[0];null!=b?this.changeTab(b,!0):this.setTab(0)},clear:function(){for(var a=0,b=this.items;a<b.length;){var c=b[a];++a;this.removeChild(c);c.reset()}this.current=null;this.items=[]},addTab:function(a){0==this.items.length&&(a.set_selected(!0),this.current=a,this.selectedId=0);this.items.push(a);this.addChild(a);a.onClick.add(k(this,this.onItemClick));this.update_layout();return a},changeTab:function(a,b){null==b&&(b=!1);for(var c=0,d=this.items.length;c<
d;){var e=c++;this.items[e].set_selected(this.items[e]==a);this.items[e].selected&&(this.current=this.items[e],this.selectedId=e)}b||this.onChange.dispatch(a)},onItemClick:function(a){this.changeTab(a,!1)},update_layout:function(){for(var a=10,b=0,c=this.items;b<c.length;){var d=c[b];++b;d.set_x(a);a+=K["int"](d.get_width())+5}this.update_bounds()},__class__:Ue,__properties__:t(Xa.prototype.__properties__,{get_length:"get_length"})});var lh=function(){Ue.call(this)};g["agario.views.components.SkinShopTabControl"]=
lh;lh.__name__=["agario","views","components","SkinShopTabControl"];lh.__super__=Ue;lh.prototype=t(Ue.prototype,{setTabByName:function(a){var b=0<this.items.filter(function(a){return"owned"==a.id}).length,c=this.items.filter(function(b){return b.id==a}),c=0<c.length?c[0]:null;null!=c?this.changeTab(c,!0):b&&"OWNED"!=a.toUpperCase()?this.setTabByName("OWNED"):this.setTab(0)},__class__:lh});var Uh=function(){var a=h.get_assets().getTexture("back_button").get_bitmapData();this.upState=new Q(a);this.upState.set_alpha(.8);
this.downState=new Q(a);this.overState=new Q(a);la.call(this)};g["agario.views.controls.ArrowCircleButton"]=Uh;Uh.__name__=["agario","views","controls","ArrowCircleButton"];Uh.__super__=la;Uh.prototype=t(la.prototype,{__class__:Uh});var Aj=function(){var a=h.get_assets().getAtlas("main_shop").getTexture("Close").get_bitmapData(),b=h.get_assets().getAtlas("main_shop").getTexture("Close_disabled").get_bitmapData();this.upState=new Q(a);this.overState=new Q(b);this.downState=new Q(a);this.disabledState=
new Q(b);la.call(this)};g["agario.views.controls.CloseButton"]=Aj;Aj.__name__=["agario","views","controls","CloseButton"];Aj.__super__=la;Aj.prototype=t(la.prototype,{__class__:Aj});var rb=function(a){this._options=a;null==a.color&&(a.color=16711680);a.color;null==a.overColor&&(a.overColor=a.color);a.overColor;null==a.w&&(a.w=140);a.w;null==a.h&&(a.h=30);a.h;null==a.radius&&(a.radius=10);a.radius;null==a.text&&(a.text="");a.text;null==a.textColor&&(a.textColor=16777215);a.textColor;null==a.textColorOver&&
(a.textColorOver=3355443);a.textColorOver;null==a.icon&&(a.icon=null);a.icon;null==a.fontSize&&(a.fontSize=12);a.fontSize;null==a.bold&&(a.bold=!1);a.bold;null==a.showOutline&&(a.showOutline=!1);a.showOutline;null==a.outlineColor&&(a.outlineColor=0);a.outlineColor;null==a.iconPosition&&(a.iconPosition="right");a.iconPosition;null==a.iconPadding&&(a.iconPadding=0);a.iconPadding;var b=new C;this.normalBtnFace=new Da;var c=a.w;a.showOutline&&(this.normalBtnFace.get_graphics().lineStyle(2,a.outlineColor),
c=a.w-1);this.normalBtnFace.get_graphics().beginFill(a.color,1);this.normalBtnFace.get_graphics().drawRoundRect(0,0,c,a.h,a.radius,a.radius);this.normalBtnFace.get_graphics().endFill();b.addChild(this.normalBtnFace);this.overBtnFace=new Da;a.showOutline&&this.overBtnFace.get_graphics().lineStyle(2,a.outlineColor);this.overBtnFace.get_graphics().beginFill(a.overColor,1);this.overBtnFace.get_graphics().drawRoundRect(0,0,c,a.h,a.radius,a.radius);this.overBtnFace.get_graphics().endFill();b.addChild(this.overBtnFace);
this.overBtnFace.set_visible(!1);this.btnLabel=new yd({text:a.text,fontSize:a.fontSize,align:T.CENTER,color:16777215,bold:a.bold},a.icon,a.iconPosition,a.iconPadding);b.addChild(this.btnLabel);this.upState=this.downState=this.overState=b;la.call(this);this.position()};g["agario.views.controls.ColorButton"]=rb;rb.__name__=["agario","views","controls","ColorButton"];rb.__super__=la;rb.prototype=t(la.prototype,{btnLabel:null,normalBtnFace:null,overBtnFace:null,_options:null,text:null,get_text:function(){return this.text},
set_text:function(a){this.btnLabel.set_text(a);this.position();return this.text=a},position:function(){null!=this._options.icon&&this.btnLabel.get_height()<=this._options.icon.get_height()?this.btnLabel.set_y(.5*(this._options.h-this._options.icon.get_height()/2)):this.btnLabel.set_y(.5*(this._options.h-this.btnLabel.get_height()))},updateState:function(){la.prototype.updateState.call(this);this.mouseIsOver?(this.overBtnFace.set_visible(!0),this.normalBtnFace.set_visible(!1),this.btnLabel.label.set_textColor(this._options.textColorOver)):
(this.overBtnFace.set_visible(!1),this.normalBtnFace.set_visible(!0),this.btnLabel.label.set_textColor(this._options.textColor))},hideIcon:function(){this.btnLabel.set_icon(null)},__class__:rb,__properties__:t(la.prototype.__properties__,{set_text:"set_text",get_text:"get_text"})});var Th=function(){C.call(this);this.freeCoinsBtn=new rb({color:14699578,overColor:14699578,text:"Free Coins \n 20 Coins",textColorOver:16777215,textColor:16777215,icon:this.freeCoinsIcon,w:140,h:50,fontSize:14,bold:!0});
this.addChild(this.freeCoinsBtn);this.freeCoinsBtn.set_enabled(!1);this.freeCoinsBtn.set_alpha(.5);this.freeCoinsIcon=new Q(h.get_assets().getTexture("currency_icon").get_bitmapData())};g["agario.views.controls.FreeCoinsButton"]=Th;Th.__name__=["agario","views","controls","FreeCoinsButton"];Th.__super__=C;Th.prototype=t(C.prototype,{freeCoinsBtn:null,timeLeft:null,freeCoinsIcon:null,setTimeLeft:function(a){this.timeLeft=a;0<this.timeLeft?(this.freeCoinsBtn=new rb({color:14699578,overColor:14699578,
text:"Collect in: \n",textColorOver:16777215,textColor:16777215,icon:this.freeCoinsIcon,w:140,h:50,fontSize:14,bold:!0}),this.startTimedEvents()):this.freeCoinsBtn=new rb({color:5880408,overColor:4294721,textColorOver:16777215,textColor:16777215,text:"Free Coins \n 20 Coins",icon:this.freeCoinsIcon,w:140,h:50,fontSize:14,bold:!0});this.addChild(this.freeCoinsBtn);this.freeCoinsBtn.addEventListener(F.CLICK,k(this,this.onFreeCoinsClick));this.freeCoinsBtn.set_x(0)},onFreeCoinsClick:function(a){a.stopImmediatePropagation();
this.freeCoinsBtn.set_enabled(!1);this.freeCoinsBtn.delayedEnable();this.dispatchEvent(a)},startTimedEvents:function(){var a=this,b=new kc(1E3);b.run=function(){var c=Math.round(a.timeLeft/1E3);a.freeCoinsBtn.set_text("Collect in: \n"+Math.floor(c/60)+"m "+(10<=c%60?"":"0")+c%60+"s");a.timeLeft-=1E3;0>=c&&(b.stop(),a.dispatchEvent(new v(v.COMPLETE)),a.freeCoinsBtn.set_enabled(!0))}},__class__:Th});var $g=function(a,b,c,d){null==d&&(d="left");null==c&&(c=80);null==b&&(b=140);C.call(this);var e=h.get_assets().getAtlas("main_shop");
this.icon=new Q(e.get("hint").get_bitmapData());this.closeIcon=new Q(e.get("Close").get_bitmapData());this.direction=d;this.h=c;this.w=b;this.displayText=a;this.addEventListener(F.CLICK,k(this,this.onHintClick));this.addChild(this.icon);this.closeIcon.set_x((this.icon.get_width()-this.closeIcon.get_width())/2);this.closeIcon.set_y((this.icon.get_height()-this.closeIcon.get_height())/2);this.drawShape();this.createLabel();this.doLayout();this.useHandCursor=this.buttonMode=!0;this.opened=!1};g["agario.views.controls.HintTooltip"]=
$g;$g.__name__=["agario","views","controls","HintTooltip"];$g.__super__=C;$g.prototype=t(C.prototype,{icon:null,closeIcon:null,displayText:null,h:null,quadShape:null,direction:null,lbl:null,w:null,opened:null,doLayout:function(){"left"==this.direction.toLowerCase()&&(this.quadShape.set_x(-this.quadShape.get_width()+this.icon.get_width()+5),this.quadShape.set_y(-5),this.lbl.set_x(this.quadShape.get_x()+(this.quadShape.get_width()-this.lbl.get_width())/2-10),this.lbl.set_y(this.quadShape.get_y()+(this.quadShape.get_height()-
this.lbl.get_height())/2))},createLabel:function(){var a={};a.align=T.CENTER;a.text=this.displayText;a.width=this.quadShape.get_width()-40;a.color=3355443;this.lbl=new ea(a);this.lbl.set_selectable(!1);this.lbl.mouseEnabled=!1},drawShape:function(){this.quadShape=new Da;this.quadShape.get_graphics().beginFill(16777215);this.quadShape.get_graphics().drawRoundRect(0,0,this.w,this.h,5,5);this.quadShape.get_graphics().endFill()},onHintClick:function(a){this.opened?(this.closeHint(),this.dispatchEvent(new lc(lc.CLOSED))):
(this.openHint(),this.dispatchEvent(new lc(lc.OPENED)))},openHint:function(){this.addChild(this.quadShape);this.addChild(this.lbl);this.addChild(this.closeIcon);this.contains(this.icon)&&this.removeChild(this.icon);this.opened=!0},closeHint:function(){null!=this.quadShape.parent&&(this.quadShape.parent.removeChild(this.quadShape),this.lbl.parent.removeChild(this.lbl));this.contains(this.closeIcon)&&this.removeChild(this.closeIcon);this.addChild(this.icon);this.opened=!1},__class__:$g});var $f=function(a){this.upState=
this.overState=this.downState=this.disabledState=a;la.call(this)};g["agario.views.controls.ImageButton"]=$f;$f.__name__=["agario","views","controls","ImageButton"];$f.__super__=la;$f.prototype=t(la.prototype,{__class__:$f});var ah=function(a){C.call(this);this.circle=new C;this.circle.get_graphics().beginFill(15742775,1);this.circle.get_graphics().lineStyle(2,12783377);this.circle.get_graphics().drawCircle(0,0,10);this.circle.get_graphics().endFill();this.addChild(this.circle);this.quantityLabel=
new ea({text:null==a?"null":""+a,align:T.LEFT,color:16777215});this.quantityLabel.set_autoSize(ia.LEFT);this.quantityLabel.set_selectable(!1);this.addChild(this.quantityLabel);this.quantityLabel.addEventListener(v.ADDED_TO_STAGE,k(this,this.onAdded))};g["agario.views.controls.QuantityCircle"]=ah;ah.__name__=["agario","views","controls","QuantityCircle"];ah.__super__=C;ah.prototype=t(C.prototype,{quantityLabel:null,circle:null,onAdded:function(a){this.removeEventListener(v.ADDED_TO_STAGE,k(this,this.onAdded));
this.doLayout()},doLayout:function(){this.quantityLabel.set_x(-this.quantityLabel.get_width()/2);this.quantityLabel.set_y(-this.quantityLabel.get_height()/2)},__class__:ah});var Yg=function(a,b,c){null==c&&(c=65);null==b&&(b=85);var d=new C,e=new C,f=new C,n=new ea({text:a,fontSize:18,align:T.LEFT,color:16777215}),L=new ea({text:a,fontSize:18,align:T.LEFT,color:16777215});a=new ea({text:a,fontSize:18,align:T.LEFT,color:16777215});n.set_autoSize(ia.LEFT);L.set_autoSize(ia.LEFT);a.set_autoSize(ia.LEFT);
var g=new Da;g.get_graphics().beginFill(6349312);rc.drawRoundRectComplex(g.get_graphics(),0,0,b,c,0,5,0,5);g.get_graphics().endFill();d.addChild(g);d.addChild(n);g=new Da;g.get_graphics().beginFill(4760069);rc.drawRoundRectComplex(g.get_graphics(),0,0,b,c,0,5,0,5);g.get_graphics().endFill();e.addChild(g);e.addChild(L);g=new Da;g.get_graphics().beginFill(2446594);rc.drawRoundRectComplex(g.get_graphics(),0,0,b,c,0,5,0,5);g.get_graphics().endFill();f.addChild(g);f.addChild(a);this.upState=this.disabledState=
d;this.overState=e;this.downState=f;L.set_y(n.set_y(a.set_y((c-n.get_height())/2)));L.set_x(n.set_x(a.set_x(20)));la.call(this)};g["agario.views.controls.SemiRoundButton"]=Yg;Yg.__name__=["agario","views","controls","SemiRoundButton"];Yg.__super__=la;Yg.prototype=t(la.prototype,{__class__:Yg});var Vh=function(){this.amount=0;this.stateUp=new C;this.amountLabel=new ea({text:"",fontSize:16,color:3421236,align:T.RIGHT});this.amountLabel.set_backgroundColor(16711935);this.amountLabel.set_name("0");this.icon=
new Q(h.get_assets().getTexture("currency_icon").get_bitmapData());this.downState=this.overState=this.upState=this.disabledState=this.stateUp;la.call(this);this.addEventListener(v.ADDED_TO_STAGE,k(this,this.onAddedToStage))};g["agario.views.controls.ShopHUD"]=Vh;Vh.__name__=["agario","views","controls","ShopHUD"];Vh.__super__=la;Vh.prototype=t(la.prototype,{amountLabel:null,outlineShape:null,plusButton:null,stateUp:null,countDownTimer:null,icon:null,amount:null,get_amount:function(){return this.amount},
set_amount:function(a){this.updateAmount(a);return this.amount=a},onAddedToStage:function(a){la.prototype.onAddedToStage.call(this,a);this.clear();this.init();h.get_events().addEventListener(ye.WALLET_UPDATED,k(this,this.handleWalletUpdate));this.updateAmount(h.user.get_coins())},handleWalletUpdate:function(a){h.services.gameui.setUserCoins(h.user.get_coins());this.updateAmount(h.user.get_coins())},init:function(){this.plusButton=this.drawPlusBtn();this.stateUp.addChild(this.plusButton);this.plusButton.set_x(0);
this.icon.set_x(this.plusButton.get_x()-this.icon.get_width()-5);this.icon.set_y(this.plusButton.get_y()+(this.plusButton.get_height()-this.icon.get_height())/2);this.addChild(this.icon);this.addChild(this.amountLabel);this.amountLabel.set_y(this.plusButton.get_y()+(this.plusButton.get_height()-this.amountLabel.get_height())/2+2);this.outlineShape=this.drawOutline(this.amountLabel.get_textWidth());this.outlineShape.set_x(this.plusButton.get_x()-(this.outlineShape.get_width()-this.plusButton.get_width())+
1);this.outlineShape.set_y(this.plusButton.get_y()-1);this.stateUp.addChild(this.outlineShape);this.downState=this.overState=this.upState=this.disabledState=this.stateUp},drawPlusBtn:function(){var a=new C,b=new Da;b.get_graphics().beginFill(6349312);rc.drawRoundRectComplex(b.get_graphics(),0,0,30,32,0,4,0,4);b.get_graphics().endFill();a.addChild(b);var c=new ea({text:"+",fontSize:24,bold:!0,color:16777215});c.set_x((b.get_width()-c.get_width())/2);c.set_y((b.get_height()-c.get_height())/2);a.addChild(c);
return a},drawOutline:function(a){var b=new Da;b.get_graphics().lineStyle(2,5093376,1,!0,Fb.NORMAL);b.get_graphics().drawRoundRect(0,0,a+this.plusButton.get_width()+40,34,10,10);b.set_cacheAsBitmap(!0);return b},updateAmount:function(a){this.countDownTimer=new kc(1);this.countDown(this.amountLabel,a,k(this,this.onAmountUpdate))},onAmountUpdate:function(){this.clear();this.amountLabel.set_x(this.icon.get_x()-this.amountLabel.get_textWidth()-10);this.init()},countDown:function(a,b,c){var d=this,e=K.parseInt(a.get_name()),
f=Math.abs((b-e)/5);e>b?(a.set_name(K.string(e-Math.ceil(f))),this.updateHudValue(a)):e<b&&(a.set_name(K.string(e+Math.ceil(f))),this.updateHudValue(a));e!=b?this.countDownTimer.run=function(){d.countDown(a,b,c)}:(a.set_name(null==b?"null":""+b),this.updateHudValue(a),this.countDownTimer.stop());c()},updateHudValue:function(a){var b=Ua.formatNumber(K.parseInt(a.get_name()),"n"," ");a.set_text(b)},clear:function(){for(;0<this.stateUp.get_numChildren();)this.stateUp.removeChildAt(0)},__class__:Vh,__properties__:t(la.prototype.__properties__,
{set_amount:"set_amount",get_amount:"get_amount"})});var bh=function(a){C.call(this);this.txt=a;this.initialize()};g["agario.views.controls.StampSticker"]=bh;bh.__name__=["agario","views","controls","StampSticker"];bh.__super__=C;bh.prototype=t(C.prototype,{txt:null,stamp:null,stampLabel:null,initialize:function(){this.stamp=new Q(h.get_assets().getTexture("sticker").get_bitmapData());this.addChild(this.stamp);this.stampLabel=new ea({text:this.txt,fontSize:11,align:T.CENTER,color:16777215,width:60,
bold:!0});this.stampLabel.set_wordWrap(!0);this.stampLabel.set_multiline(!0);this.stampLabel.set_selectable(!1);this.stampLabel.set_cacheAsBitmap(!0);this.stampLabel.set_height(30);this.stampLabel.addEventListener(v.ADDED_TO_STAGE,k(this,this.onAdded));this.addChild(this.stampLabel);this.stamp.set_x(-this.stamp.get_width()/2);this.stamp.set_y(-this.stamp.get_height()/2)},onAdded:function(a){this.removeEventListener(v.ADDED_TO_STAGE,k(this,this.onAdded));this.stampLabel.set_x(-this.stampLabel.get_width()/
2);this.stampLabel.set_y(-this.stampLabel.get_height()/2)},__class__:bh});var Vb=function(a,b){ba.call(this);this.id=a;this.data=null;this.type=b;this.status=Na.IDLE;this.loader=new Wh;this.loader.addEventListener(v.COMPLETE,k(this,this.handleComplete));this.loader.addEventListener(dc.IO_ERROR,k(this,this.onLoadFail));this.loader.addEventListener(Ed.SECURITY_ERROR,k(this,this.onLoadFail))};g["assets.manager.loaders.BaseLoader"]=Vb;Vb.__name__=["assets","manager","loaders","BaseLoader"];Vb.__super__=
ba;Vb.prototype=t(ba.prototype,{loader:null,type:null,id:null,data:null,status:null,error:null,handleComplete:function(a){this.processData();this.status=Na.LOADED;this.dispatchEvent(new v(v.COMPLETE))},onLoadFail:function(a){this.data=null;this.error=a.toString();this.status=Na.ERROR;this.dispatchEvent(new v(v.COMPLETE))},processData:function(){this.data=this.loader.data},start:function(){this.status=Na.LOADING;this.loader.load(new be(this.id))},__class__:Vb});var Xh=function(a){Vb.call(this,a,xb.BINARY);
this.loader.set_dataFormat(Wb.BINARY)};g["assets.manager.loaders.BinaryLoader"]=Xh;Xh.__name__=["assets","manager","loaders","BinaryLoader"];Xh.__super__=Vb;Xh.prototype=t(Vb.prototype,{__class__:Xh});var Ve=function(a){Vb.call(this,a,xb.IMAGE);this.flashLoader=new Yh;this.flashLoader.contentLoaderInfo.addEventListener(v.COMPLETE,k(this,this.handleComplete));this.flashLoader.contentLoaderInfo.addEventListener(dc.IO_ERROR,k(this,this.onLoadFail));this.flashLoader.contentLoaderInfo.addEventListener(Ed.SECURITY_ERROR,
k(this,this.onLoadFail))};g["assets.manager.loaders.ImageLoader"]=Ve;Ve.__name__=["assets","manager","loaders","ImageLoader"];Ve.__super__=Vb;Ve.prototype=t(Vb.prototype,{flashLoader:null,processData:function(){this.data=y.__cast(this.flashLoader.content,Q).bitmapData},start:function(){this.status=Na.LOADING;this.flashLoader.load(new be(this.id))},__class__:Ve});var Zh=function(a){Vb.call(this,a,xb.SOUND);this.loader.set_dataFormat(Wb.BINARY)};g["assets.manager.loaders.SoundLoader"]=Zh;Zh.__name__=
["assets","manager","loaders","SoundLoader"];Zh.__super__=Vb;Zh.prototype=t(Vb.prototype,{processData:function(){var a=new Fd;a.loadCompressedDataFromByteArray(this.loader.data,this.loader.data.length);this.data=a},__class__:Zh});var Cd=function(a){Vb.call(this,a,xb.TEXT)};g["assets.manager.loaders.TextLoader"]=Cd;Cd.__name__=["assets","manager","loaders","TextLoader"];Cd.__super__=Vb;Cd.prototype=t(Vb.prototype,{processData:function(){this.data=K.string(this.loader.data)},__class__:Cd});var xb=g["assets.manager.misc.FileType"]=
{__ename__:!0,__constructs__:["IMAGE","TEXT","BINARY","SOUND"]};xb.IMAGE=["IMAGE",0];xb.IMAGE.toString=u;xb.IMAGE.__enum__=xb;xb.TEXT=["TEXT",1];xb.TEXT.toString=u;xb.TEXT.__enum__=xb;xb.BINARY=["BINARY",2];xb.BINARY.toString=u;xb.BINARY.__enum__=xb;xb.SOUND=["SOUND",3];xb.SOUND.toString=u;xb.SOUND.__enum__=xb;var Na=g["assets.manager.misc.LoaderStatus"]={__ename__:!0,__constructs__:["IDLE","READY","LOADING","LOADED","ERROR"]};Na.IDLE=["IDLE",0];Na.IDLE.toString=u;Na.IDLE.__enum__=Na;Na.READY=["READY",
1];Na.READY.toString=u;Na.READY.__enum__=Na;Na.LOADING=["LOADING",2];Na.LOADING.toString=u;Na.LOADING.__enum__=Na;Na.LOADED=["LOADED",3];Na.LOADED.toString=u;Na.LOADED.__enum__=Na;Na.ERROR=["ERROR",4];Na.ERROR.toString=u;Na.ERROR.__enum__=Na;var Bj=function(a){this.i=a};g["format.gz.Reader"]=Bj;Bj.__name__=["format","gz","Reader"];Bj.prototype={i:null,read:function(){var a=this.readHeader(),b=new Te;this.readData(b);return{file:a.fileName,data:b.getBytes()}},readHeader:function(){if(31!=this.i.readByte()||
139!=this.i.readByte())throw new m("Invalid GZ header");if(8!=this.i.readByte())throw new m("Invalid compression method");var a=this.i.readByte();this.i.read(4);this.i.readByte();this.i.readByte();var b=null,c=null,d=null;0!=(a&4)&&(d=this.i.readUInt16(),d=this.i.read(d));0!=(a&8)&&(b=this.i.readUntil(0));0!=(a&16)&&(c=this.i.readUntil(0));0!=(a&2)&&this.i.readUInt16();return{fileName:b,comments:c,extraData:d}},readData:function(a,b){null==b&&(b=65536);for(var c=gb.alloc(b),d=0,e=new sb(this.i,!1,
!1);;){var f=e.readBytes(c,0,b);a.writeFullBytes(c,0,f);if(f<b)break;d+=f}return d},__class__:Bj};var We=function(){this.a1=1;this.a2=0};g["format.tools.Adler32"]=We;We.__name__=["format","tools","Adler32"];We.read=function(a){var b=new We,c=a.readByte(),d=a.readByte(),e=a.readByte();a=a.readByte();b.a1=e<<8|a;b.a2=c<<8|d;return b};We.prototype={a1:null,a2:null,update:function(a,b,c){var d=this.a1,e=this.a2,f=b;for(b+=c;f<b;)c=f++,d=(d+a.b[c])%65521,e=(e+d)%65521;this.a1=d;this.a2=e},equals:function(a){return a.a1==
this.a1&&a.a2==this.a2},__class__:We};var Qc=g["format.tools.Huffman"]={__ename__:!0,__constructs__:["Found","NeedBit","NeedBits"]};Qc.Found=function(a){a=["Found",0,a];a.__enum__=Qc;a.toString=u;return a};Qc.NeedBit=function(a,b){var c=["NeedBit",1,a,b];c.__enum__=Qc;c.toString=u;return c};Qc.NeedBits=function(a,b){var c=["NeedBits",2,a,b];c.__enum__=Qc;c.toString=u;return c};var Cj=function(){};g["format.tools.HuffTools"]=Cj;Cj.__name__=["format","tools","HuffTools"];Cj.prototype={treeDepth:function(a){switch(a[1]){case 0:return 0;
case 2:throw new m("assert");case 1:var b=a[3];a=this.treeDepth(a[2]);b=this.treeDepth(b);return 1+(a<b?a:b)}},treeCompress:function(a){var b=this.treeDepth(a);if(0==b)return a;if(1==b)switch(a[1]){case 1:return b=a[3],Qc.NeedBit(this.treeCompress(a[2]),this.treeCompress(b));default:throw new m("assert");}for(var c=1<<b,d=[],e=0;e<c;)e++,d.push(Qc.Found(-1));this.treeWalk(d,0,0,b,a);return Qc.NeedBits(b,d)},treeWalk:function(a,b,c,d,e){switch(e[1]){case 1:var f=e[3],n=e[2];0<d?(this.treeWalk(a,b,
c+1,d-1,n),this.treeWalk(a,b|1<<c,c+1,d-1,f)):a[b]=this.treeCompress(e);break;default:a[b]=this.treeCompress(e)}},treeMake:function(a,b,c,d){if(d>b)throw new m("Invalid huffman");var e=c<<5|d;if(a.h.hasOwnProperty(e))return Qc.Found(a.h[e]);c<<=1;d+=1;return Qc.NeedBit(this.treeMake(a,b,c,d),this.treeMake(a,b,c|1,d))},make:function(a,b,c,d){var e=[],f=[];if(32<d)throw new m("Invalid huffman");for(var n=0;n<d;)n++,e.push(0),f.push(0);for(n=0;n<c;){var L=n++,L=a[L+b];if(L>=d)throw new m("Invalid huffman");
e[L]++}for(var n=0,L=1,g=d-1;L<g;){var h=L++,n=n+e[h]<<1;f[h]=n}e=new Tb;for(n=0;n<c;)L=n++,g=a[L+b],0!=g&&(h=f[g-1],f[g-1]=h+1,e.h[h<<5|g]=L);return this.treeCompress(Qc.NeedBit(this.treeMake(e,d,0,1),this.treeMake(e,d,1,1)))},__class__:Cj};var Dj=function(a){this.buffer=gb.alloc(65536);this.pos=0;a&&(this.crc=new We)};g["format.tools._InflateImpl.Window"]=Dj;Dj.__name__=["format","tools","_InflateImpl","Window"];Dj.prototype={buffer:null,pos:null,crc:null,slide:function(){null!=this.crc&&this.crc.update(this.buffer,
0,32768);var a=gb.alloc(65536);this.pos-=32768;a.blit(0,this.buffer,32768,this.pos);this.buffer=a},addBytes:function(a,b,c){65536<this.pos+c&&this.slide();this.buffer.blit(this.pos,a,b,c);this.pos+=c},addByte:function(a){65536==this.pos&&this.slide();this.buffer.b[this.pos]=a&255;this.pos++},getLastChar:function(){return this.buffer.b[this.pos-1]},available:function(){return this.pos},checksum:function(){null!=this.crc&&this.crc.update(this.buffer,0,this.pos);return this.crc},__class__:Dj};var Y=
g["format.tools._InflateImpl.State"]={__ename__:!0,__constructs__:"Head Block CData Flat Crc Dist DistOne Done".split(" ")};Y.Head=["Head",0];Y.Head.toString=u;Y.Head.__enum__=Y;Y.Block=["Block",1];Y.Block.toString=u;Y.Block.__enum__=Y;Y.CData=["CData",2];Y.CData.toString=u;Y.CData.__enum__=Y;Y.Flat=["Flat",3];Y.Flat.toString=u;Y.Flat.__enum__=Y;Y.Crc=["Crc",4];Y.Crc.toString=u;Y.Crc.__enum__=Y;Y.Dist=["Dist",5];Y.Dist.toString=u;Y.Dist.__enum__=Y;Y.DistOne=["DistOne",6];Y.DistOne.toString=u;Y.DistOne.__enum__=
Y;Y.Done=["Done",7];Y.Done.toString=u;Y.Done.__enum__=Y;var sb=function(a,b,c){null==c&&(c=!0);null==b&&(b=!0);this["final"]=!1;this.htools=new Cj;this.huffman=this.buildFixedHuffman();this.huffdist=null;this.dist=this.len=0;this.state=b?Y.Head:Y.Block;this.input=a;this.needed=this.nbits=this.bits=0;this.output=null;this.outpos=0;this.lengths=[];for(a=0;19>a;)a++,this.lengths.push(-1);this.window=new Dj(c)};g["format.tools.InflateImpl"]=sb;sb.__name__=["format","tools","InflateImpl"];sb.prototype=
{nbits:null,bits:null,state:null,"final":null,huffman:null,huffdist:null,htools:null,len:null,dist:null,needed:null,output:null,outpos:null,input:null,lengths:null,window:null,buildFixedHuffman:function(){if(null!=sb.FIXED_HUFFMAN)return sb.FIXED_HUFFMAN;for(var a=[],b=0;288>b;){var c=b++;a.push(143>=c?8:255>=c?9:279>=c?7:8)}sb.FIXED_HUFFMAN=this.htools.make(a,0,288,10);return sb.FIXED_HUFFMAN},readBytes:function(a,b,c){this.needed=c;this.outpos=b;this.output=a;if(0<c)for(;this.inflateLoop(););return c-
this.needed},getBits:function(a){for(;this.nbits<a;)this.bits|=this.input.readByte()<<this.nbits,this.nbits+=8;var b=this.bits&(1<<a)-1;this.nbits-=a;this.bits>>=a;return b},getBit:function(){0==this.nbits&&(this.nbits=8,this.bits=this.input.readByte());var a=1==(this.bits&1);this.nbits--;this.bits>>=1;return a},getRevBits:function(a){return 0==a?0:this.getBit()?1<<a-1|this.getRevBits(a-1):this.getRevBits(a-1)},resetBits:function(){this.nbits=this.bits=0},addBytes:function(a,b,c){this.window.addBytes(a,
b,c);this.output.blit(this.outpos,a,b,c);this.needed-=c;this.outpos+=c},addByte:function(a){this.window.addByte(a);this.output.b[this.outpos]=a&255;this.needed--;this.outpos++},addDistOne:function(a){for(var b=this.window.getLastChar(),c=0;c<a;)c++,this.addByte(b)},addDist:function(a,b){this.addBytes(this.window.buffer,this.window.pos-a,b)},applyHuffman:function(a){switch(a[1]){case 0:return a[2];case 1:var b=a[3];a=a[2];return this.applyHuffman(this.getBit()?b:a);case 2:return this.applyHuffman(a[3][this.getBits(a[2])])}},
inflateLengths:function(a,b){for(var c=0,d=0;c<b;){var e=this.applyHuffman(this.huffman);switch(e){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:d=e;a[c]=e;c++;break;case 16:e=c+3+this.getBits(2);if(e>b)throw new m("Invalid data");for(;c<e;)a[c]=d,c++;break;case 17:c+=3+this.getBits(3);if(c>b)throw new m("Invalid data");break;case 18:c+=11+this.getBits(7);if(c>b)throw new m("Invalid data");break;default:throw new m("Invalid data");
}}},inflateLoop:function(){switch(this.state[1]){case 0:var a=this.input.readByte();if(8!=(a&15))throw new m("Invalid data");var b=this.input.readByte(),c=0!=(b&32);if(0!=((a<<8)+b)%31)throw new m("Invalid data");if(c)throw new m("Unsupported dictionary");this.state=Y.Block;return!0;case 4:a=this.window.checksum();if(null==a)return this.state=Y.Done,!0;b=We.read(this.input);if(!a.equals(b))throw new m("Invalid CRC");this.state=Y.Done;return!0;case 7:return!1;case 1:switch(this["final"]=this.getBit(),
this.getBits(2)){case 0:this.len=this.input.readUInt16();if(this.input.readUInt16()!=65535-this.len)throw new m("Invalid data");this.state=Y.Flat;a=this.inflateLoop();this.resetBits();return a;case 1:return this.huffman=this.buildFixedHuffman(),this.huffdist=null,this.state=Y.CData,!0;case 2:for(var a=this.getBits(5)+257,b=this.getBits(5)+1,c=this.getBits(4)+4,d=0;d<c;){var e=d++;this.lengths[sb.CODE_LENGTHS_POS[e]]=this.getBits(3)}for(;19>c;)d=c++,this.lengths[sb.CODE_LENGTHS_POS[d]]=0;this.huffman=
this.htools.make(this.lengths,0,19,8);c=[];d=0;for(e=a+b;d<e;)d++,c.push(0);this.inflateLengths(c,a+b);this.huffdist=this.htools.make(c,a,b,16);this.huffman=this.htools.make(c,0,a,16);this.state=Y.CData;return!0;default:throw new m("Invalid data");}case 3:return a=this.len<this.needed?this.len:this.needed,b=this.input.read(a),this.len-=a,this.addBytes(b,0,a),0==this.len&&(this.state=this["final"]?Y.Crc:Y.Block),0<this.needed;case 6:return a=this.len<this.needed?this.len:this.needed,this.addDistOne(a),
this.len-=a,0==this.len&&(this.state=Y.CData),0<this.needed;case 5:for(;0<this.len&&0<this.needed;)a=this.len<this.dist?this.len:this.dist,a=this.needed<a?this.needed:a,this.addDist(this.dist,a),this.len-=a;0==this.len&&(this.state=Y.CData);return 0<this.needed;case 2:b=this.applyHuffman(this.huffman);if(256>b)return this.addByte(b),0<this.needed;if(256==b)this.state=this["final"]?Y.Crc:Y.Block;else{b-=257;a=sb.LEN_EXTRA_BITS_TBL[b];if(-1==a)throw new m("Invalid data");this.len=sb.LEN_BASE_VAL_TBL[b]+
this.getBits(a);b=null==this.huffdist?this.getRevBits(5):this.applyHuffman(this.huffdist);a=sb.DIST_EXTRA_BITS_TBL[b];if(-1==a)throw new m("Invalid data");this.dist=sb.DIST_BASE_VAL_TBL[b]+this.getBits(a);if(this.dist>this.window.available())throw new m("Invalid data");this.state=1==this.dist?Y.DistOne:Y.Dist}return!0}},__class__:sb};var Gd=function(){this.connected=!1;this.buttons=[];this.axes=[];this.timestamp=0};g["gamepad.LocalGamepad"]=Gd;Gd.__name__=["gamepad","LocalGamepad"];Gd.fromJSGamepad=
function(a){var b=new Gd;b.timestamp=a.timestamp;b.connected=a.connected;for(var c=0,d=a.buttons.length;c<d;){var e=c++;b.buttons.push(Gd.normalizeJSButton(a.buttons[e]))}c=0;for(d=a.axes.length;c<d;)e=c++,b.axes.push(a.axes[e]);return b};Gd.normalizeJSButton=function(a){return"pressed"in a?{pressed:a.pressed,value:a.value}:{pressed:1==a,value:a}};Gd.prototype={connected:null,buttons:null,axes:null,timestamp:null,__class__:Gd};var xa=function(){};g["gamepad.HTML5GamepadManager"]=xa;xa.__name__=["gamepad",
"HTML5GamepadManager"];xa.hasGamepadEvents=null;xa._gamepads=null;xa.init=function(){xa.hasGamepadEvents="GamepadEvent"in window;xa._gamepads=[];xa.hasGamepadEvents&&(window.addEventListener("gamepadconnected",xa.handleGamepadEvent,!1),window.addEventListener("gamepaddisconnected",xa.handleGamepadEvent,!1))};xa.update=function(){for(var a=xa.getGamepads(),b=0;b<a.length;){var c=a[b];++b;null!=c&&(xa.addGamepad(c),xa.updateGamepad(c))}};xa.updateGamepad=function(a){if(cc.devices.h.hasOwnProperty(a.index)){for(var b=
cc.devices.h[a.index],c=xa._gamepads[a.index],d=0,e=a.buttons.length;d<e;){var f=d++;xa.isButtonPressed(a.buttons[f])?c.buttons[f].pressed||b.onButtonDown.dispatch(f):c.buttons[f].pressed&&b.onButtonUp.dispatch(f);c.buttons[f]=Gd.normalizeJSButton(a.buttons[f])}d=0;for(e=a.axes.length;d<e;)f=d++,2E-5<Math.abs(a.axes[f]-c.axes[f])&&b.onAxisMove.dispatch(f,a.axes[f]),c.axes[f]=a.axes[f]}};xa.isButtonPressed=function(a){return"pressed"in a?a.pressed:1==a};xa.getGamepads=function(){return navigator.getGamepads?
navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads():[]};xa.handleGamepadEvent=function(a){switch(a.type){case "gamepadconnected":xa.addGamepad(a.gamepad);break;case "gamepaddisconnected":xa.removeGamepad(a.gamepad)}};xa.addGamepad=function(a){if(!cc.devices.h.hasOwnProperty(a.index)){var b=new cc(a.index);cc.devices.h[a.index]=b;cc.onConnect.dispatch(b);xa._gamepads[a.index]=Gd.fromJSGamepad(a)}};xa.removeGamepad=function(a){var b=cc.devices.h[a.index];null!=b&&(b.connected=
!1);cc.devices.remove(a.index);xa._gamepads[a.index]=null;null!=b&&b.onDisconnect.dispatch()};var ag=function(){};g["haxe.IMap"]=ag;ag.__name__=["haxe","IMap"];ag.prototype={get:null,set:null,__class__:ag};var yj=function(a){this.url=a;this.headers=new lb;this.params=new lb;this.async=!0};g["haxe.Http"]=yj;yj.__name__=["haxe","Http"];yj.prototype={url:null,responseData:null,async:null,postData:null,headers:null,params:null,req:null,request:function(a){var b=this;b.responseData=null;var c=this.req=
Xk.createXMLHttpRequest(),d=function(a){if(4==c.readyState){var d;try{d=c.status}catch(e){e instanceof m&&(e=e.val),d=null}null!=d&&(a=window.location.protocol.toLowerCase(),(new jc("^(?:about|app|app-storage|.+-extension|file|res|widget):$","")).match(a)&&(d=null!=c.responseText?200:404));void 0==d&&(d=null);if(null!=d)b.onStatus(d);if(null!=d&&200<=d&&400>d)b.req=null,b.onData(b.responseData=c.responseText);else if(null==d)b.req=null,b.onError("Failed to connect or resolve host");else switch(d){case 12029:b.req=
null;b.onError("Failed to connect to host");break;case 12007:b.req=null;b.onError("Unknown host");break;default:b.req=null,b.responseData=c.responseText,b.onError("Http Error #"+c.status)}}};this.async&&(c.onreadystatechange=d);var e=this.postData;if(null!=e)a=!0;else for(var f=this.params.h,n=null;null!=f;)n=f[0],f=f[1],e=null==e?"":e+"&",e+=encodeURIComponent(n.param)+"="+encodeURIComponent(n.value);try{if(a)c.open("POST",this.url,this.async);else if(null!=e){var L=1>=this.url.split("?").length;
c.open("GET",this.url+(L?"?":"&")+e,this.async);e=null}else c.open("GET",this.url,this.async)}catch(g){g instanceof m&&(g=g.val);b.req=null;this.onError(g.toString());return}!Qd.exists(this.headers,function(a){return"Content-Type"==a.header})&&a&&null==this.postData&&c.setRequestHeader("Content-Type","application/x-www-form-urlencoded");a=this.headers.h;for(f=null;null!=a;)f=a[0],a=a[1],c.setRequestHeader(f.header,f.value);c.send(e);this.async||d(null)},onData:function(a){},onError:function(a){},
onStatus:function(a){},__class__:yj};var bg=function(a,b){this.high=a;this.low=b};g["haxe._Int64.___Int64"]=bg;bg.__name__=["haxe","_Int64","___Int64"];bg.prototype={high:null,low:null,__class__:bg};var vj=function(){};g["haxe.Json"]=vj;vj.__name__=["haxe","Json"];vj.parse=function(a){return(new Dd(a)).parseRec()};var Ia=function(){};g["haxe.Log"]=Ia;Ia.__name__=["haxe","Log"];Ia.trace=function(a,b){y.__trace(a,b)};var kc=function(a){var b=this;this.id=setInterval(function(){b.run()},a)};g["haxe.Timer"]=
kc;kc.__name__=["haxe","Timer"];kc.delay=function(a,b){var c=new kc(b);c.run=function(){c.stop();a()};return c};kc.stamp=function(){return(new Date).getTime()/1E3};kc.prototype={id:null,stop:function(){null!=this.id&&(clearInterval(this.id),this.id=null)},run:function(){},__class__:kc};var Xe=function(){this.a1=1;this.a2=0};g["haxe.crypto.Adler32"]=Xe;Xe.__name__=["haxe","crypto","Adler32"];Xe.read=function(a){var b=new Xe,c=a.readByte(),d=a.readByte(),e=a.readByte();a=a.readByte();b.a1=e<<8|a;b.a2=
c<<8|d;return b};Xe.prototype={a1:null,a2:null,update:function(a,b,c){var d=this.a1,e=this.a2,f=b;for(b+=c;f<b;)c=f++,d=(d+a.b[c])%65521,e=(e+d)%65521;this.a1=d;this.a2=e},equals:function(a){return a.a1==this.a1&&a.a2==this.a2},__class__:Xe};var gb=function(a){this.length=a.byteLength;this.b=new Ob(a);this.b.bufferValue=a;a.hxBytes=this;a.bytes=this.b};g["haxe.io.Bytes"]=gb;gb.__name__=["haxe","io","Bytes"];gb.alloc=function(a){return new gb(new Ej(a))};gb.ofString=function(a){for(var b=[],c=0;c<
a.length;){var d=P.fastCodeAt(a,c++);55296<=d&&56319>=d&&(d=d-55232<<10|P.fastCodeAt(a,c++)&1023);127>=d?b.push(d):(2047>=d?b.push(192|d>>6):(65535>=d?b.push(224|d>>12):(b.push(240|d>>18),b.push(128|d>>12&63)),b.push(128|d>>6&63)),b.push(128|d&63))}return new gb((new Ob(b)).buffer)};gb.prototype={length:null,b:null,get:function(a){return this.b[a]},set:function(a,b){this.b[a]=b&255},blit:function(a,b,c,d){if(0>a||0>c||0>d||a+d>this.length||c+d>b.length)throw new m(ab.OutsideBounds);0==c&&d==b.length?
this.b.set(b.b,a):this.b.set(b.b.subarray(c,c+d),a)},getString:function(a,b){if(0>a||0>b||a+b>this.length)throw new m(ab.OutsideBounds);for(var c="",d=this.b,e=String.fromCharCode,f=a,n=a+b;f<n;){var L=d[f++];if(128>L){if(0==L)break;c+=e(L)}else if(224>L)c+=e((L&63)<<6|d[f++]&127);else if(240>L)var g=d[f++],c=c+e((L&31)<<12|(g&127)<<6|d[f++]&127);else var g=d[f++],h=d[f++],L=(L&15)<<18|(g&127)<<12|(h&127)<<6|d[f++]&127,c=c+e((L>>10)+55232),c=c+e(L&1023|56320)}return c},toString:function(){return this.getString(0,
this.length)},__class__:gb};var Ye=function(){};g["haxe.crypto.Base64"]=Ye;Ye.__name__=["haxe","crypto","Base64"];Ye.decode=function(a,b){null==b&&(b=!0);if(b)for(;61==H.cca(a,a.length-1);)a=H.substr(a,0,-1);return(new Fj(Ye.BYTES)).decodeBytes(gb.ofString(a))};var Fj=function(a){for(var b=a.length,c=1;b>1<<c;)c++;if(8<c||b!=1<<c)throw new m("BaseCode : base length must be a power of two.");this.base=a;this.nbits=c};g["haxe.crypto.BaseCode"]=Fj;Fj.__name__=["haxe","crypto","BaseCode"];Fj.prototype=
{base:null,nbits:null,tbl:null,initTable:function(){for(var a=[],b=0;256>b;){var c=b++;a[c]=-1}b=0;for(c=this.base.length;b<c;){var d=b++;a[this.base.b[d]]=d}this.tbl=a},decodeBytes:function(a){var b=this.nbits;null==this.tbl&&this.initTable();for(var c=this.tbl,d=a.length*b>>3,e=gb.alloc(d),f=0,n=0,L=0,g=0;g<d;){for(;8>n;){var n=n+b,f=f<<b,h=c[a.get(L++)];if(-1==h)throw new m("BaseCode : invalid encoded char");f|=h}n-=8;e.set(g++,f>>n&255)}return e},__class__:Fj};var ce=function(){};g["haxe.crypto.Md5"]=
ce;ce.__name__=["haxe","crypto","Md5"];ce.encode=function(a){var b=new ce;a=b.doEncode(ce.str2blks(a));return b.hex(a)};ce.str2blks=function(a){for(var b=(a.length+8>>6)+1,c=[],d=16*b,e=0;e<d;){var f=e++;c[f]=0}for(d=0;d<a.length;)c[d>>2]|=H.cca(a,d)<<(8*a.length+d)%4*8,d++;c[d>>2]|=128<<(8*a.length+d)%4*8;a=8*a.length;b=16*b-2;c[b]=a&255;c[b]|=(a>>>8&255)<<8;c[b]|=(a>>>16&255)<<16;c[b]|=(a>>>24&255)<<24;return c};ce.prototype={bitOR:function(a,b){return(a>>>1|b>>>1)<<1|a&1|b&1},bitXOR:function(a,
b){return(a>>>1^b>>>1)<<1|a&1^b&1},bitAND:function(a,b){return(a>>>1&b>>>1)<<1|a&1&b&1},addme:function(a,b){var c=(a&65535)+(b&65535);return(a>>16)+(b>>16)+(c>>16)<<16|c&65535},hex:function(a){for(var b="",c=0;c<a.length;){var d=a[c];++c;for(var e=0;4>e;)var f=e++,b=b+("0123456789abcdef".charAt(d>>8*f+4&15)+"0123456789abcdef".charAt(d>>8*f&15))}return b},rol:function(a,b){return a<<b|a>>>32-b},cmn:function(a,b,c,d,e,f){return this.addme(this.rol(this.addme(this.addme(b,a),this.addme(d,f)),e),c)},
ff:function(a,b,c,d,e,f,n){return this.cmn(this.bitOR(this.bitAND(b,c),this.bitAND(~b,d)),a,b,e,f,n)},gg:function(a,b,c,d,e,f,n){return this.cmn(this.bitOR(this.bitAND(b,d),this.bitAND(c,~d)),a,b,e,f,n)},hh:function(a,b,c,d,e,f,n){return this.cmn(this.bitXOR(this.bitXOR(b,c),d),a,b,e,f,n)},ii:function(a,b,c,d,e,f,n){return this.cmn(this.bitXOR(c,this.bitOR(b,~d)),a,b,e,f,n)},doEncode:function(a){for(var b=1732584193,c=-271733879,d=-1732584194,e=271733878,f=0;f<a.length;)var n=b,L=c,g=d,h=e,b=this.ff(b,
c,d,e,a[f],7,-680876936),e=this.ff(e,b,c,d,a[f+1],12,-389564586),d=this.ff(d,e,b,c,a[f+2],17,606105819),c=this.ff(c,d,e,b,a[f+3],22,-1044525330),b=this.ff(b,c,d,e,a[f+4],7,-176418897),e=this.ff(e,b,c,d,a[f+5],12,1200080426),d=this.ff(d,e,b,c,a[f+6],17,-1473231341),c=this.ff(c,d,e,b,a[f+7],22,-45705983),b=this.ff(b,c,d,e,a[f+8],7,1770035416),e=this.ff(e,b,c,d,a[f+9],12,-1958414417),d=this.ff(d,e,b,c,a[f+10],17,-42063),c=this.ff(c,d,e,b,a[f+11],22,-1990404162),b=this.ff(b,c,d,e,a[f+12],7,1804603682),
e=this.ff(e,b,c,d,a[f+13],12,-40341101),d=this.ff(d,e,b,c,a[f+14],17,-1502002290),c=this.ff(c,d,e,b,a[f+15],22,1236535329),b=this.gg(b,c,d,e,a[f+1],5,-165796510),e=this.gg(e,b,c,d,a[f+6],9,-1069501632),d=this.gg(d,e,b,c,a[f+11],14,643717713),c=this.gg(c,d,e,b,a[f],20,-373897302),b=this.gg(b,c,d,e,a[f+5],5,-701558691),e=this.gg(e,b,c,d,a[f+10],9,38016083),d=this.gg(d,e,b,c,a[f+15],14,-660478335),c=this.gg(c,d,e,b,a[f+4],20,-405537848),b=this.gg(b,c,d,e,a[f+9],5,568446438),e=this.gg(e,b,c,d,a[f+14],
9,-1019803690),d=this.gg(d,e,b,c,a[f+3],14,-187363961),c=this.gg(c,d,e,b,a[f+8],20,1163531501),b=this.gg(b,c,d,e,a[f+13],5,-1444681467),e=this.gg(e,b,c,d,a[f+2],9,-51403784),d=this.gg(d,e,b,c,a[f+7],14,1735328473),c=this.gg(c,d,e,b,a[f+12],20,-1926607734),b=this.hh(b,c,d,e,a[f+5],4,-378558),e=this.hh(e,b,c,d,a[f+8],11,-2022574463),d=this.hh(d,e,b,c,a[f+11],16,1839030562),c=this.hh(c,d,e,b,a[f+14],23,-35309556),b=this.hh(b,c,d,e,a[f+1],4,-1530992060),e=this.hh(e,b,c,d,a[f+4],11,1272893353),d=this.hh(d,
e,b,c,a[f+7],16,-155497632),c=this.hh(c,d,e,b,a[f+10],23,-1094730640),b=this.hh(b,c,d,e,a[f+13],4,681279174),e=this.hh(e,b,c,d,a[f],11,-358537222),d=this.hh(d,e,b,c,a[f+3],16,-722521979),c=this.hh(c,d,e,b,a[f+6],23,76029189),b=this.hh(b,c,d,e,a[f+9],4,-640364487),e=this.hh(e,b,c,d,a[f+12],11,-421815835),d=this.hh(d,e,b,c,a[f+15],16,530742520),c=this.hh(c,d,e,b,a[f+2],23,-995338651),b=this.ii(b,c,d,e,a[f],6,-198630844),e=this.ii(e,b,c,d,a[f+7],10,1126891415),d=this.ii(d,e,b,c,a[f+14],15,-1416354905),
c=this.ii(c,d,e,b,a[f+5],21,-57434055),b=this.ii(b,c,d,e,a[f+12],6,1700485571),e=this.ii(e,b,c,d,a[f+3],10,-1894986606),d=this.ii(d,e,b,c,a[f+10],15,-1051523),c=this.ii(c,d,e,b,a[f+1],21,-2054922799),b=this.ii(b,c,d,e,a[f+8],6,1873313359),e=this.ii(e,b,c,d,a[f+15],10,-30611744),d=this.ii(d,e,b,c,a[f+6],15,-1560198380),c=this.ii(c,d,e,b,a[f+13],21,1309151649),b=this.ii(b,c,d,e,a[f+4],6,-145523070),e=this.ii(e,b,c,d,a[f+11],10,-1120210379),d=this.ii(d,e,b,c,a[f+2],15,718787259),c=this.ii(c,d,e,b,a[f+
9],21,-343485551),b=this.addme(b,n),c=this.addme(c,L),d=this.addme(d,g),e=this.addme(e,h),f=f+16;return[b,c,d,e]},__class__:ce};var Tb=function(){this.h={}};g["haxe.ds.IntMap"]=Tb;Tb.__name__=["haxe","ds","IntMap"];Tb.__interfaces__=[ag];Tb.prototype={h:null,set:function(a,b){this.h[a]=b},get:function(a){return this.h[a]},remove:function(a){if(!this.h.hasOwnProperty(a))return!1;delete this.h[a];return!0},keys:function(){var a=[],b;for(b in this.h)this.h.hasOwnProperty(b)&&a.push(b|0);return H.iter(a)},
iterator:function(){return{ref:this.h,it:this.keys(),hasNext:function(){return this.it.hasNext()},next:function(){var a=this.it.next();return this.ref[a]}}},__class__:Tb};var de=function(){this.h={};this.h.__keys__={}};g["haxe.ds.ObjectMap"]=de;de.__name__=["haxe","ds","ObjectMap"];de.__interfaces__=[ag];de.prototype={h:null,set:function(a,b){var c=a.__id__||(a.__id__=++de.count);this.h[c]=b;this.h.__keys__[c]=a},get:function(a){return this.h[a.__id__]},remove:function(a){a=a.__id__;if(null==this.h.__keys__[a])return!1;
delete this.h[a];delete this.h.__keys__[a];return!0},keys:function(){var a=[],b;for(b in this.h.__keys__)this.h.hasOwnProperty(b)&&a.push(this.h.__keys__[b]);return H.iter(a)},iterator:function(){return{ref:this.h,it:this.keys(),hasNext:function(){return this.it.hasNext()},next:function(){var a=this.it.next();return this.ref[a.__id__]}}},__class__:de};var Gj=function(a,b){this.map=a;this.keys=b;this.index=0;this.count=b.length};g["haxe.ds._StringMap.StringMapIterator"]=Gj;Gj.__name__=["haxe","ds",
"_StringMap","StringMapIterator"];Gj.prototype={map:null,keys:null,index:null,count:null,hasNext:function(){return this.index<this.count},next:function(){return this.map.get(this.keys[this.index++])},__class__:Gj};var ka=function(){this.h={}};g["haxe.ds.StringMap"]=ka;ka.__name__=["haxe","ds","StringMap"];ka.__interfaces__=[ag];ka.prototype={h:null,rh:null,set:function(a,b){null!=J[a]?this.setReserved(a,b):this.h[a]=b},get:function(a){return null!=J[a]?this.getReserved(a):this.h[a]},exists:function(a){return null!=
J[a]?this.existsReserved(a):this.h.hasOwnProperty(a)},setReserved:function(a,b){null==this.rh&&(this.rh={});this.rh["$"+a]=b},getReserved:function(a){return null==this.rh?null:this.rh["$"+a]},existsReserved:function(a){return null==this.rh?!1:this.rh.hasOwnProperty("$"+a)},remove:function(a){if(null!=J[a]){a="$"+a;if(null==this.rh||!this.rh.hasOwnProperty(a))return!1;delete this.rh[a]}else{if(!this.h.hasOwnProperty(a))return!1;delete this.h[a]}return!0},keys:function(){var a=this.arrayKeys();return H.iter(a)},
arrayKeys:function(){var a=[],b;for(b in this.h)this.h.hasOwnProperty(b)&&a.push(b);if(null!=this.rh)for(b in this.rh)36==b.charCodeAt(0)&&a.push(b.substr(1));return a},iterator:function(){return new Gj(this,this.arrayKeys())},__class__:ka};var ee={};g["haxe.ds._Vector.Vector_Impl_"]=ee;ee.__name__=["haxe","ds","_Vector","Vector_Impl_"];ee.blit=function(a,b,c,d,e){for(var f=0;f<e;){var n=f++;c[d+n]=a[b+n]}};var Dd=function(a){this.str=a;this.pos=0};g["haxe.format.JsonParser"]=Dd;Dd.__name__=["haxe",
"format","JsonParser"];Dd.prototype={str:null,pos:null,parseRec:function(){for(;;){var a=P.fastCodeAt(this.str,this.pos++);switch(a){case 32:case 13:case 10:case 9:break;case 123:for(var a={},b=null,c=null;;)switch(P.fastCodeAt(this.str,this.pos++)){case 32:case 13:case 10:case 9:break;case 125:return null==b&&0!=c||this.invalidChar(),a;case 58:null==b&&this.invalidChar();G.setField(a,b,this.parseRec());b=null;c=!0;break;case 44:c?c=!1:this.invalidChar();break;case 34:c&&this.invalidChar();b=this.parseString();
break;default:this.invalidChar()}case 91:for(a=[],b=null;;)switch(P.fastCodeAt(this.str,this.pos++)){case 32:case 13:case 10:case 9:break;case 93:return 0==b&&this.invalidChar(),a;case 44:b?b=!1:this.invalidChar();break;default:b&&this.invalidChar(),this.pos--,a.push(this.parseRec()),b=!0}case 116:a=this.pos;if(114!=P.fastCodeAt(this.str,this.pos++)||117!=P.fastCodeAt(this.str,this.pos++)||101!=P.fastCodeAt(this.str,this.pos++))this.pos=a,this.invalidChar();return!0;case 102:a=this.pos;if(97!=P.fastCodeAt(this.str,
this.pos++)||108!=P.fastCodeAt(this.str,this.pos++)||115!=P.fastCodeAt(this.str,this.pos++)||101!=P.fastCodeAt(this.str,this.pos++))this.pos=a,this.invalidChar();return!1;case 110:a=this.pos;if(117!=P.fastCodeAt(this.str,this.pos++)||108!=P.fastCodeAt(this.str,this.pos++)||108!=P.fastCodeAt(this.str,this.pos++))this.pos=a,this.invalidChar();return null;case 34:return this.parseString();case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 45:return this.parseNumber(a);
default:this.invalidChar()}}},parseString:function(){for(var a=this.pos,b=null;;){var c=P.fastCodeAt(this.str,this.pos++);if(34==c)break;if(92==c){null==b&&(b=new Ec);b.addSub(this.str,a,this.pos-a-1);c=P.fastCodeAt(this.str,this.pos++);switch(c){case 114:b.b+="\r";break;case 110:b.b+="\n";break;case 116:b.b+="\t";break;case 98:b.b+="\b";break;case 102:b.b+="\f";break;case 47:case 92:case 34:b.b+=String.fromCharCode(c);break;case 117:a=K.parseInt("0x"+H.substr(this.str,this.pos,4));this.pos+=4;b.b+=
String.fromCharCode(a);break;default:throw new m("Invalid escape sequence \\"+String.fromCharCode(c)+" at position "+(this.pos-1));}a=this.pos}else if(c!=c)throw new m("Unclosed string");}if(null==b)return H.substr(this.str,a,this.pos-a-1);b.addSub(this.str,a,this.pos-a-1);return b.b},parseNumber:function(a){for(var b=this.pos-1,c=45==a,d=!c,e=48==a,f=!1,n=!1,L=!1,g=!1;;){a=P.fastCodeAt(this.str,this.pos++);switch(a){case 48:e&&!f&&this.invalidNumber(b);c&&(c=!1,e=!0);d=!0;break;case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:e&&
!f&&this.invalidNumber(b);c&&(c=!1);d=!0;e=!1;break;case 46:(c||f)&&this.invalidNumber(b);d=!1;f=!0;break;case 101:case 69:(c||e||n)&&this.invalidNumber(b);d=!1;n=!0;break;case 43:case 45:n&&!L||this.invalidNumber(b);d=!1;L=!0;break;default:d||this.invalidNumber(b),this.pos--,g=!0}if(g)break}a=K.parseFloat(H.substr(this.str,b,this.pos-b));b=a|0;return b==a?b:a},invalidChar:function(){this.pos--;throw new m("Invalid char "+this.str.charCodeAt(this.pos)+" at position "+this.pos);},invalidNumber:function(a){throw new m("Invalid number at position "+
a+": "+H.substr(this.str,a,this.pos-a));},__class__:Dd};var $h=function(){this.b=[]};g["haxe.io.BytesBuffer"]=$h;$h.__name__=["haxe","io","BytesBuffer"];$h.prototype={b:null,addBytes:function(a,b,c){if(0>b||0>c||b+c>a.length)throw new m(ab.OutsideBounds);a=a.b;var d=b;for(b+=c;d<b;)c=d++,this.b.push(a[c])},getBytes:function(){var a=new gb((new Ob(this.b)).buffer);this.b=null;return a},__class__:$h};var ai=function(){};g["haxe.io.Input"]=ai;ai.__name__=["haxe","io","Input"];ai.prototype={bigEndian:null,
readByte:function(){throw new m("Not implemented");},readBytes:function(a,b,c){var d=c,e=a.b;if(0>b||0>c||b+c>a.length)throw new m(ab.OutsideBounds);for(;0<d;)e[b]=this.readByte(),b++,d--;return c},set_bigEndian:function(a){return this.bigEndian=a},readFullBytes:function(a,b,c){for(;0<c;){var d=this.readBytes(a,b,c);b+=d;c-=d}},read:function(a){for(var b=gb.alloc(a),c=0;0<a;){var d=this.readBytes(b,c,a);if(0==d)throw new m(ab.Blocked);c+=d;a-=d}return b},readUntil:function(a){for(var b="",c;(c=this.readByte())!=
a;)b+=String.fromCharCode(c);return b},readUInt16:function(){var a=this.readByte(),b=this.readByte();return this.bigEndian?b|a<<8:a|b<<8},readInt32:function(){var a=this.readByte(),b=this.readByte(),c=this.readByte(),d=this.readByte();return this.bigEndian?d|c<<8|b<<16|a<<24:a|b<<8|c<<16|d<<24},readString:function(a){var b=gb.alloc(a);this.readFullBytes(b,0,a);return b.toString()},__class__:ai,__properties__:{set_bigEndian:"set_bigEndian"}};var He=function(a,b,c){null==b&&(b=0);null==c&&(c=a.length-
b);if(0>b||0>c||b+c>a.length)throw new m(ab.OutsideBounds);this.b=a.b;this.pos=b;this.totlen=this.len=c};g["haxe.io.BytesInput"]=He;He.__name__=["haxe","io","BytesInput"];He.__super__=ai;He.prototype=t(ai.prototype,{b:null,pos:null,len:null,totlen:null,readByte:function(){if(0==this.len)throw new m(new bi);this.len--;return this.b[this.pos++]},readBytes:function(a,b,c){if(0>b||0>c||b+c>a.length)throw new m(ab.OutsideBounds);if(0==this.len&&0<c)throw new m(new bi);this.len<c&&(c=this.len);var d=this.b;
a=a.b;for(var e=0;e<c;){var f=e++;a[b+f]=d[this.pos+f]}this.pos+=c;this.len-=c;return c},__class__:He});var ci=function(){};g["haxe.io.Output"]=ci;ci.__name__=["haxe","io","Output"];ci.prototype={bigEndian:null,writeByte:function(a){throw new m("Not implemented");},writeBytes:function(a,b,c){var d=c,e=a.b.bufferValue;if(0>b||0>c||b+c>a.length)throw new m(ab.OutsideBounds);for(;0<d;)this.writeByte(e[b]),b++,d--;return c},set_bigEndian:function(a){return this.bigEndian=a},write:function(a){for(var b=
a.length,c=0;0<b;){var d=this.writeBytes(a,c,b);if(0==d)throw new m(ab.Blocked);c+=d;b-=d}},writeFullBytes:function(a,b,c){for(;0<c;){var d=this.writeBytes(a,b,c);b+=d;c-=d}},writeInt32:function(a){this.bigEndian?(this.writeByte(a>>>24),this.writeByte(a>>16&255),this.writeByte(a>>8&255),this.writeByte(a&255)):(this.writeByte(a&255),this.writeByte(a>>8&255),this.writeByte(a>>16&255),this.writeByte(a>>>24))},__class__:ci,__properties__:{set_bigEndian:"set_bigEndian"}};var Te=function(){this.b=new $h};
g["haxe.io.BytesOutput"]=Te;Te.__name__=["haxe","io","BytesOutput"];Te.__super__=ci;Te.prototype=t(ci.prototype,{b:null,writeByte:function(a){this.b.b.push(a)},writeBytes:function(a,b,c){this.b.addBytes(a,b,c);return c},getBytes:function(){return this.b.getBytes()},__class__:Te});var bi=function(){};g["haxe.io.Eof"]=bi;bi.__name__=["haxe","io","Eof"];bi.prototype={toString:function(){return"Eof"},__class__:bi};var ab=g["haxe.io.Error"]={__ename__:!0,__constructs__:["Blocked","Overflow","OutsideBounds",
"Custom"]};ab.Blocked=["Blocked",0];ab.Blocked.toString=u;ab.Blocked.__enum__=ab;ab.Overflow=["Overflow",1];ab.Overflow.toString=u;ab.Overflow.__enum__=ab;ab.OutsideBounds=["OutsideBounds",2];ab.OutsideBounds.toString=u;ab.OutsideBounds.__enum__=ab;ab.Custom=function(a){a=["Custom",3,a];a.__enum__=ab;a.toString=u;return a};var uc=function(){};g["haxe.io.FPHelper"]=uc;uc.__name__=["haxe","io","FPHelper"];uc.i32ToFloat=function(a){var b=a>>>23&255,c=a&8388607;return 0==c&&0==b?0:(1-(a>>>31<<1))*(1+
Math.pow(2,-23)*c)*Math.pow(2,b-127)};uc.floatToI32=function(a){if(0==a)return 0;var b;b=0>a?-a:a;var c=Math.floor(Math.log(b)/.6931471805599453);-127>c?c=-127:128<c&&(c=128);b=Math.round(8388608*(b/Math.pow(2,c)-1))&8388607;return(0>a?-2147483648:0)|c+127<<23|b};uc.i64ToDouble=function(a,b){var c=(b>>20&2047)-1023,d=4294967296*(b&1048575)+2147483648*(a>>>31)+(a&2147483647);return 0==d&&-1023==c?0:(1-(b>>>31<<1))*(1+Math.pow(2,-52)*d)*Math.pow(2,c)};uc.doubleToI64=function(a){var b=uc.i64tmp;if(0==
a)b.low=0,b.high=0;else{var c;c=0>a?-a:a;var d=Math.floor(Math.log(c)/.6931471805599453);c=4503599627370496*(c/Math.pow(2,d)-1);c=Math.round(c);b.low=c|0;b.high=(0>a?-2147483648:0)|d+1023<<20|c/4294967296|0}return b};var vc=function(a){switch(a){case ".":case "..":this.dir=a;this.file="";return}var b=a.lastIndexOf("/"),c=a.lastIndexOf("\\");b<c?(this.dir=H.substr(a,0,c),a=H.substr(a,c+1,null),this.backslash=!0):c<b?(this.dir=H.substr(a,0,b),a=H.substr(a,b+1,null)):this.dir=null;b=a.lastIndexOf(".");
-1!=b?(this.ext=H.substr(a,b+1,null),this.file=H.substr(a,0,b)):(this.ext=null,this.file=a)};g["haxe.io.Path"]=vc;vc.__name__=["haxe","io","Path"];vc.withoutExtension=function(a){a=new vc(a);a.ext=null;return a.toString()};vc.directory=function(a){a=new vc(a);return null==a.dir?"":a.dir};vc.extension=function(a){a=new vc(a);return null==a.ext?"":a.ext};vc.prototype={dir:null,file:null,ext:null,backslash:null,toString:function(){return(null==this.dir?"":this.dir+(this.backslash?"\\":"/"))+this.file+
(null==this.ext?"":"."+this.ext)},__class__:vc};var Va=g["haxe.rtti.CType"]={__ename__:!0,__constructs__:"CUnknown CEnum CClass CTypedef CFunction CAnonymous CDynamic CAbstract".split(" ")};Va.CUnknown=["CUnknown",0];Va.CUnknown.toString=u;Va.CUnknown.__enum__=Va;Va.CEnum=function(a,b){var c=["CEnum",1,a,b];c.__enum__=Va;c.toString=u;return c};Va.CClass=function(a,b){var c=["CClass",2,a,b];c.__enum__=Va;c.toString=u;return c};Va.CTypedef=function(a,b){var c=["CTypedef",3,a,b];c.__enum__=Va;c.toString=
u;return c};Va.CFunction=function(a,b){var c=["CFunction",4,a,b];c.__enum__=Va;c.toString=u;return c};Va.CAnonymous=function(a){a=["CAnonymous",5,a];a.__enum__=Va;a.toString=u;return a};Va.CDynamic=function(a){a=["CDynamic",6,a];a.__enum__=Va;a.toString=u;return a};Va.CAbstract=function(a,b){var c=["CAbstract",7,a,b];c.__enum__=Va;c.toString=u;return c};var pa=g["haxe.rtti.Rights"]={__ename__:!0,__constructs__:"RNormal RNo RCall RMethod RDynamic RInline".split(" ")};pa.RNormal=["RNormal",0];pa.RNormal.toString=
u;pa.RNormal.__enum__=pa;pa.RNo=["RNo",1];pa.RNo.toString=u;pa.RNo.__enum__=pa;pa.RCall=function(a){a=["RCall",2,a];a.__enum__=pa;a.toString=u;return a};pa.RMethod=["RMethod",3];pa.RMethod.toString=u;pa.RMethod.__enum__=pa;pa.RDynamic=["RDynamic",4];pa.RDynamic.toString=u;pa.RDynamic.__enum__=pa;pa.RInline=["RInline",5];pa.RInline.toString=u;pa.RInline.__enum__=pa;var wc=g["haxe.rtti.TypeTree"]={__ename__:!0,__constructs__:["TPackage","TClassdecl","TEnumdecl","TTypedecl","TAbstractdecl"]};wc.TPackage=
function(a,b,c){a=["TPackage",0,a,b,c];a.__enum__=wc;a.toString=u;return a};wc.TClassdecl=function(a){a=["TClassdecl",1,a];a.__enum__=wc;a.toString=u;return a};wc.TEnumdecl=function(a){a=["TEnumdecl",2,a];a.__enum__=wc;a.toString=u;return a};wc.TTypedecl=function(a){a=["TTypedecl",3,a];a.__enum__=wc;a.toString=u;return a};wc.TAbstractdecl=function(a){a=["TAbstractdecl",4,a];a.__enum__=wc;a.toString=u;return a};var Ig=function(){};g["haxe.rtti.Meta"]=Ig;Ig.__name__=["haxe","rtti","Meta"];Ig.getMeta=
function(a){return a.__meta__};Ig.getFields=function(a){a=Ig.getMeta(a);return null==a||null==a.fields?{}:a.fields};var Pk=function(){};g["haxe.rtti.Rtti"]=Pk;Pk.__name__=["haxe","rtti","Rtti"];Pk.getRtti=function(a){var b=G.field(a,"__rtti");if(null==b)throw new m("Class "+Qa.getClassName(a)+" has no RTTI information, consider adding @:rtti");a=A.parse(b).firstElement();a=(new Hj).processElement(a);switch(a[1]){case 1:return a[2];default:throw new m("Enum mismatch: expected TClassDecl but found "+
K.string(a));}};var Hj=function(){this.root=[]};g["haxe.rtti.XmlParser"]=Hj;Hj.__name__=["haxe","rtti","XmlParser"];Hj.prototype={root:null,curplatform:null,mkPath:function(a){return a},mkTypeParams:function(a){a=a.split(":");return""==a[0]?[]:a},mkRights:function(a){switch(a){case "null":return pa.RNo;case "method":return pa.RMethod;case "dynamic":return pa.RDynamic;case "inline":return pa.RInline;default:return pa.RCall(a)}},xerror:function(a){throw new m("Invalid "+a.get_name());},processElement:function(a){a=
new xc(a);switch(a.get_name()){case "class":return wc.TClassdecl(this.xclass(a));case "enum":return wc.TEnumdecl(this.xenum(a));case "typedef":return wc.TTypedecl(this.xtypedef(a));case "abstract":return wc.TAbstractdecl(this.xabstract(a));default:return this.xerror(a)}},xmeta:function(a){var b=[];for(a=a.nodes.resolve("m").iterator();null!=a.head;){var c;a.val=a.head[0];a.head=a.head[1];c=a.val;for(var d=[],e=c.nodes.resolve("e").iterator();null!=e.head;)e.val=e.head[0],e.head=e.head[1],d.push(e.val.get_innerHTML());
b.push({name:c.att.resolve("n"),params:d})}return b},xoverloads:function(a){var b=new lb;for(a=a.get_elements();a.hasNext();){var c=a.next();b.add(this.xclassfield(c))}return b},xpath:function(a){var b=this.mkPath(a.att.resolve("path")),c=new lb;for(a=a.get_elements();a.hasNext();){var d=a.next();c.add(this.xtype(d))}return{path:b,params:c}},xclass:function(a){for(var b=null,c=null,d=null,e=new lb,f=new lb,n=new lb,L=[],g=a.get_elements();g.hasNext();){var h=g.next();switch(h.get_name()){case "haxe_doc":c=
h.get_innerData();break;case "extends":b=this.xpath(h);break;case "implements":e.add(this.xpath(h));break;case "haxe_dynamic":d=this.xtype(new xc(h.x.firstElement()));break;case "meta":L=this.xmeta(h);break;default:h.x.exists("static")?n.add(this.xclassfield(h)):f.add(this.xclassfield(h))}}return{file:a.has.resolve("file")?a.att.resolve("file"):null,path:this.mkPath(a.att.resolve("path")),module:a.has.resolve("module")?this.mkPath(a.att.resolve("module")):null,doc:c,isPrivate:a.x.exists("private"),
isExtern:a.x.exists("extern"),isInterface:a.x.exists("interface"),params:this.mkTypeParams(a.att.resolve("params")),superClass:b,interfaces:e,fields:f,statics:n,tdynamic:d,platforms:this.defplat(),meta:L}},xclassfield:function(a,b){null==b&&(b=!1);for(var c=a.get_elements(),d=this.xtype(c.next()),e=null,f=[],n=null;c.hasNext();){var L=c.next();switch(L.get_name()){case "haxe_doc":e=L.get_innerData();break;case "meta":f=this.xmeta(L);break;case "overloads":n=this.xoverloads(L);break;default:this.xerror(L)}}return{name:a.get_name(),
type:d,isPublic:a.x.exists("public")||b,isOverride:a.x.exists("override"),line:a.has.resolve("line")?K.parseInt(a.att.resolve("line")):null,doc:e,get:a.has.resolve("get")?this.mkRights(a.att.resolve("get")):pa.RNormal,set:a.has.resolve("set")?this.mkRights(a.att.resolve("set")):pa.RNormal,params:a.has.resolve("params")?this.mkTypeParams(a.att.resolve("params")):[],platforms:this.defplat(),meta:f,overloads:n,expr:a.has.resolve("expr")?a.att.resolve("expr"):null}},xenum:function(a){for(var b=new lb,
c=null,d=[],e=a.get_elements();e.hasNext();){var f=e.next();"haxe_doc"==f.get_name()?c=f.get_innerData():"meta"==f.get_name()?d=this.xmeta(f):b.add(this.xenumfield(f))}return{file:a.has.resolve("file")?a.att.resolve("file"):null,path:this.mkPath(a.att.resolve("path")),module:a.has.resolve("module")?this.mkPath(a.att.resolve("module")):null,doc:c,isPrivate:a.x.exists("private"),isExtern:a.x.exists("extern"),params:this.mkTypeParams(a.att.resolve("params")),constructors:b,platforms:this.defplat(),meta:d}},
xenumfield:function(a){var b=null,c=a.x.elementsNamed("haxe_doc").next(),d;d=a.hasNode.resolve("meta")?this.xmeta(a.node.resolve("meta")):[];if(a.has.resolve("a"))for(var e=a.att.resolve("a").split(":"),f=a.get_elements(),b=new lb,n=0;n<e.length;){var L=e[n];++n;var g=!1;"?"==L.charAt(0)&&(g=!0,L=H.substr(L,1,null));b.add({name:L,opt:g,t:this.xtype(f.next())})}return{name:a.get_name(),args:b,doc:null==c?null:(new xc(c)).get_innerData(),meta:d,platforms:this.defplat()}},xabstract:function(a){for(var b=
null,c=null,d=null,e=[],f=[],n=[],L=a.get_elements();L.hasNext();){var g=L.next();switch(g.get_name()){case "haxe_doc":b=g.get_innerData();break;case "meta":e=this.xmeta(g);break;case "to":for(g=g.get_elements();g.hasNext();){var h=g.next();f.push({t:this.xtype(new xc(h.x.firstElement())),field:h.has.resolve("field")?h.att.resolve("field"):null})}break;case "from":for(g=g.get_elements();g.hasNext();)h=g.next(),n.push({t:this.xtype(new xc(h.x.firstElement())),field:h.has.resolve("field")?h.att.resolve("field"):
null});break;case "impl":c=this.xclass(g.node.resolve("class"));break;case "this":d=this.xtype(new xc(g.x.firstElement()));break;default:this.xerror(g)}}return{file:a.has.resolve("file")?a.att.resolve("file"):null,path:this.mkPath(a.att.resolve("path")),module:a.has.resolve("module")?this.mkPath(a.att.resolve("module")):null,doc:b,isPrivate:a.x.exists("private"),params:this.mkTypeParams(a.att.resolve("params")),platforms:this.defplat(),meta:e,athis:d,to:f,from:n,impl:c}},xtypedef:function(a){for(var b=
null,c=null,d=[],e=a.get_elements();e.hasNext();){var f=e.next();"haxe_doc"==f.get_name()?b=f.get_innerData():"meta"==f.get_name()?d=this.xmeta(f):c=this.xtype(f)}e=new ka;null!=this.curplatform&&e.set(this.curplatform,c);return{file:a.has.resolve("file")?a.att.resolve("file"):null,path:this.mkPath(a.att.resolve("path")),module:a.has.resolve("module")?this.mkPath(a.att.resolve("module")):null,doc:b,isPrivate:a.x.exists("private"),params:this.mkTypeParams(a.att.resolve("params")),type:c,types:e,platforms:this.defplat(),
meta:d}},xtype:function(a){switch(a.get_name()){case "unknown":return Va.CUnknown;case "e":return Va.CEnum(this.mkPath(a.att.resolve("path")),this.xtypeparams(a));case "c":return Va.CClass(this.mkPath(a.att.resolve("path")),this.xtypeparams(a));case "t":return Va.CTypedef(this.mkPath(a.att.resolve("path")),this.xtypeparams(a));case "x":return Va.CAbstract(this.mkPath(a.att.resolve("path")),this.xtypeparams(a));case "f":var b=new lb,c=a.att.resolve("a").split(":"),c=H.iter(c),d;a.has.resolve("v")?
(d=a.att.resolve("v").split(":"),d=H.iter(d)):d=null;for(a=a.get_elements();a.hasNext();){var e=a.next(),f=!1,n=c.next();null==n&&(n="");"?"==n.charAt(0)&&(f=!0,n=H.substr(n,1,null));var g;g=null==d?null:d.next();b.add({name:n,opt:f,t:this.xtype(e),value:""==g?null:g})}c=b.last();b.remove(c);return Va.CFunction(b,c.t);case "a":b=new lb;for(c=a.get_elements();c.hasNext();)d=c.next(),d=this.xclassfield(d,!0),d.platforms=new lb,b.add(d);return Va.CAnonymous(b);case "d":return b=null,c=a.x.firstElement(),
null!=c&&(b=this.xtype(new xc(c))),Va.CDynamic(b);default:return this.xerror(a)}},xtypeparams:function(a){var b=new lb;for(a=a.get_elements();a.hasNext();){var c=a.next();b.add(this.xtype(c))}return b},defplat:function(){var a=new lb;null!=this.curplatform&&a.add(this.curplatform);return a},__class__:Hj};var Ij=function(a){this.__x=a};g["haxe.xml._Fast.NodeAccess"]=Ij;Ij.__name__=["haxe","xml","_Fast","NodeAccess"];Ij.prototype={__x:null,resolve:function(a){var b=this.__x.elementsNamed(a).next();
if(null==b)throw b=this.__x.nodeType==A.Document?"Document":this.__x.get_nodeName(),new m(b+" is missing element "+a);return new xc(b)},__class__:Ij};var Jj=function(a){this.__x=a};g["haxe.xml._Fast.AttribAccess"]=Jj;Jj.__name__=["haxe","xml","_Fast","AttribAccess"];Jj.prototype={__x:null,resolve:function(a){if(this.__x.nodeType==A.Document)throw new m("Cannot access document attribute "+a);var b=this.__x.get(a);if(null==b)throw new m(this.__x.get_nodeName()+" is missing attribute "+a);return b},
__class__:Jj};var Kj=function(a){this.__x=a};g["haxe.xml._Fast.HasAttribAccess"]=Kj;Kj.__name__=["haxe","xml","_Fast","HasAttribAccess"];Kj.prototype={__x:null,resolve:function(a){if(this.__x.nodeType==A.Document)throw new m("Cannot access document attribute "+a);return this.__x.exists(a)},__class__:Kj};var Lj=function(a){this.__x=a};g["haxe.xml._Fast.HasNodeAccess"]=Lj;Lj.__name__=["haxe","xml","_Fast","HasNodeAccess"];Lj.prototype={__x:null,resolve:function(a){return this.__x.elementsNamed(a).hasNext()},
__class__:Lj};var Mj=function(a){this.__x=a};g["haxe.xml._Fast.NodeListAccess"]=Mj;Mj.__name__=["haxe","xml","_Fast","NodeListAccess"];Mj.prototype={__x:null,resolve:function(a){var b=new lb;for(a=this.__x.elementsNamed(a);a.hasNext();){var c=a.next();b.add(new xc(c))}return b},__class__:Mj};var xc=function(a){if(a.nodeType!=A.Document&&a.nodeType!=A.Element)throw new m("Invalid nodeType "+a.nodeType);this.x=a;this.node=new Ij(a);this.nodes=new Mj(a);this.att=new Jj(a);this.has=new Kj(a);this.hasNode=
new Lj(a)};g["haxe.xml.Fast"]=xc;xc.__name__=["haxe","xml","Fast"];xc.prototype={x:null,node:null,nodes:null,att:null,has:null,hasNode:null,get_name:function(){return this.x.nodeType==A.Document?"Document":this.x.get_nodeName()},get_innerData:function(){var a=this.x.iterator();if(!a.hasNext())throw new m(this.get_name()+" does not have data");var b=a.next(),c=a.next();if(null!=c){if(b.nodeType==A.PCData&&c.nodeType==A.CData&&""==P.trim(function(a){if(b.nodeType==A.Document||b.nodeType==A.Element)throw new m("Bad node type, unexpected "+
b.nodeType);return b.nodeValue}(this))){var d=a.next();if(null==d||d.nodeType==A.PCData&&""==P.trim(function(a){if(d.nodeType==A.Document||d.nodeType==A.Element)throw new m("Bad node type, unexpected "+d.nodeType);return d.nodeValue}(this))&&null==a.next()){if(c.nodeType==A.Document||c.nodeType==A.Element)throw new m("Bad node type, unexpected "+c.nodeType);return c.nodeValue}}throw new m(this.get_name()+" does not only have data");}if(b.nodeType!=A.PCData&&b.nodeType!=A.CData)throw new m(this.get_name()+
" does not have data");if(b.nodeType==A.Document||b.nodeType==A.Element)throw new m("Bad node type, unexpected "+b.nodeType);return b.nodeValue},get_innerHTML:function(){for(var a=new Ec,b=this.x.iterator();b.hasNext();){var c=b.next();a.add(cg.print(c))}return a.b},get_elements:function(){var a=this.x.elements();return{hasNext:k(a,a.hasNext),next:function(){var b=a.next();return null==b?null:new xc(b)}}},__class__:xc,__properties__:{get_elements:"get_elements",get_innerHTML:"get_innerHTML",get_innerData:"get_innerData",
get_name:"get_name"}};var ud=function(){};g["haxe.xml.Parser"]=ud;ud.__name__=["haxe","xml","Parser"];ud.parse=function(a,b){null==b&&(b=!1);var c=A.createDocument();ud.doParse(a,b,0,c);return c};ud.doParse=function(a,b,c,d){null==c&&(c=0);for(var e=null,f=1,n=1,g=null,R=0,h=0,l=0,k=a.charCodeAt(c),w=new Ec,q=1,p=-1;k==k;){switch(f){case 0:switch(k){case 10:case 13:case 9:case 32:break;default:f=n;continue}break;case 1:switch(k){case 60:f=0;n=2;break;default:R=c;f=13;continue}break;case 13:60==k?
(w.addSub(a,R,c-R),n=A.createPCData(w.b),w=new Ec,d.addChild(n),h++,f=0,n=2):38==k&&(w.addSub(a,R,c-R),f=18,q=13,R=c+1);break;case 17:93==k&&93==a.charCodeAt(c+1)&&62==a.charCodeAt(c+2)&&(k=A.createCData(H.substr(a,R,c-R)),d.addChild(k),h++,c+=2,f=1);break;case 2:switch(k){case 33:if(91==a.charCodeAt(c+1)){c+=2;if("CDATA["!=H.substr(a,c,6).toUpperCase())throw new m("Expected <![CDATA[");c+=5;f=17}else if(68==a.charCodeAt(c+1)||100==a.charCodeAt(c+1)){if("OCTYPE"!=H.substr(a,c+2,6).toUpperCase())throw new m("Expected <!DOCTYPE");
c+=8;f=16}else{if(45!=a.charCodeAt(c+1)||45!=a.charCodeAt(c+2))throw new m("Expected \x3c!--");c+=2;f=15}R=c+1;break;case 63:f=14;R=c;break;case 47:if(null==d)throw new m("Expected node name");R=c+1;f=0;n=10;break;default:f=3;R=c;continue}break;case 3:if(!(97<=k&&122>=k||65<=k&&90>=k||48<=k&&57>=k||58==k||46==k||95==k||45==k)){if(c==R)throw new m("Expected node name");e=A.createElement(H.substr(a,R,c-R));d.addChild(e);h++;f=0;n=4;continue}break;case 4:switch(k){case 47:f=11;break;case 62:f=9;break;
default:f=5;R=c;continue}break;case 5:if(!(97<=k&&122>=k||65<=k&&90>=k||48<=k&&57>=k||58==k||46==k||95==k||45==k)){if(R==c)throw new m("Expected attribute name");g=H.substr(a,R,c-R);if(e.exists(g))throw new m("Duplicate attribute");f=0;n=6;continue}break;case 6:switch(k){case 61:f=0;n=7;break;default:throw new m("Expected =");}break;case 7:switch(k){case 34:case 39:w=new Ec;f=8;R=c+1;p=k;break;default:throw new m('Expected "');}break;case 8:switch(k){case 38:w.addSub(a,R,c-R);f=18;q=8;R=c+1;break;
case 62:if(b)throw new m("Invalid unescaped "+String.fromCharCode(k)+" in attribute value");k==p&&(w.addSub(a,R,c-R),n=w.b,w=new Ec,e.set(g,n),f=0,n=4);break;case 60:if(b)throw new m("Invalid unescaped "+String.fromCharCode(k)+" in attribute value");k==p&&(w.addSub(a,R,c-R),n=w.b,w=new Ec,e.set(g,n),f=0,n=4);break;default:k==p&&(w.addSub(a,R,c-R),n=w.b,w=new Ec,e.set(g,n),f=0,n=4)}break;case 9:R=c=ud.doParse(a,b,c,e);f=1;break;case 11:switch(k){case 62:f=1;break;default:throw new m("Expected >");
}break;case 12:switch(k){case 62:return 0==h&&d.addChild(A.createPCData("")),c;default:throw new m("Expected >");}case 10:if(!(97<=k&&122>=k||65<=k&&90>=k||48<=k&&57>=k||58==k||46==k||95==k||45==k)){if(R==c)throw new m("Expected node name");n=H.substr(a,R,c-R);if(d.nodeType!=A.Element)throw new m("Bad node type, expected Element but found "+d.nodeType);if(n!=d.nodeName){c=m;if(d.nodeType!=A.Element)throw"Bad node type, expected Element but found "+d.nodeType;throw new c("Expected </"+d.nodeName+">");
}f=0;n=12;continue}break;case 15:45==k&&45==a.charCodeAt(c+1)&&62==a.charCodeAt(c+2)&&(k=A.createComment(H.substr(a,R,c-R)),d.addChild(k),h++,c+=2,f=1);break;case 16:91==k?l++:93==k?l--:62==k&&0==l&&(k=A.createDocType(H.substr(a,R,c-R)),d.addChild(k),h++,f=1);break;case 14:63==k&&62==a.charCodeAt(c+1)&&(c++,k=H.substr(a,R+1,c-R-2),k=A.createProcessingInstruction(k),d.addChild(k),h++,f=1);break;case 18:if(59==k){R=H.substr(a,R,c-R);if(35==R.charCodeAt(0))R=120==R.charCodeAt(1)?K.parseInt("0"+H.substr(R,
1,R.length-1)):K.parseInt(H.substr(R,1,R.length-1)),w.b+=String.fromCharCode(R);else if(ud.escapes.exists(R))w.add(ud.escapes.get(R));else{if(b)throw new m("Undefined entity: "+R);w.b+=K.string("&"+R+";")}R=c+1;f=q}else if(!(97<=k&&122>=k||65<=k&&90>=k||48<=k&&57>=k||58==k||46==k||95==k||45==k)&&35!=k){if(b)throw new m("Invalid character in entity: "+String.fromCharCode(k));w.b+="&";w.addSub(a,R,c-R);c--;R=c+1;f=q}}k=P.fastCodeAt(a,++c)}1==f&&(R=c,f=13);if(13==f){if(c!=R||0==h)w.addSub(a,R,c-R),a=
A.createPCData(w.b),d.addChild(a);return c}if(!b&&18==f&&13==q)return w.b+="&",w.addSub(a,R,c-R),a=A.createPCData(w.b),d.addChild(a),c;throw new m("Unexpected end");};var cg=function(a){this.output=new Ec;this.pretty=a};g["haxe.xml.Printer"]=cg;cg.__name__=["haxe","xml","Printer"];cg.print=function(a,b){null==b&&(b=!1);var c=new cg(b);c.writeNode(a,"");return c.output.b};cg.prototype={output:null,pretty:null,writeNode:function(a,b){switch(a.nodeType){case 2:this.output.b+=K.string(b+"<![CDATA[");
this.write(P.trim(function(b){if(a.nodeType==A.Document||a.nodeType==A.Element)throw new m("Bad node type, unexpected "+a.nodeType);return a.nodeValue}(this)));this.output.b+="]]\x3e";this.pretty&&(this.output.b+="");break;case 3:var c;if(a.nodeType==A.Document||a.nodeType==A.Element)throw new m("Bad node type, unexpected "+a.nodeType);c=a.nodeValue;c=(new jc("[\n\r\t]+","g")).replace(c,"");this.output.b=null==b?this.output.b+"null":this.output.b+(""+b);this.write(P.trim("\x3c!--"+c+"--\x3e"));this.pretty&&
(this.output.b+="");break;case 6:if(a.nodeType!=A.Document&&a.nodeType!=A.Element)throw new m("Bad node type, expected Element or Document but found "+a.nodeType);for(c=H.iter(a.children);c.hasNext();){var d=c.next();this.writeNode(d,b)}break;case 0:this.output.b+=K.string(b+"<");this.write(function(b){if(a.nodeType!=A.Element)throw new m("Bad node type, expected Element but found "+a.nodeType);return a.nodeName}(this));for(c=a.attributes();c.hasNext();)d=c.next(),this.output.b+=K.string(" "+d+'="'),
this.write(P.htmlEscape(a.get(d),!0)),this.output.b+='"';if(this.hasChildren(a)){this.output.b+=">";this.pretty&&(this.output.b+="");if(a.nodeType!=A.Document&&a.nodeType!=A.Element)throw new m("Bad node type, expected Element or Document but found "+a.nodeType);for(c=H.iter(a.children);c.hasNext();)d=c.next(),this.writeNode(d,this.pretty?b+"\t":b);this.output.b+=K.string(b+"</");this.write(function(b){if(a.nodeType!=A.Element)throw new m("Bad node type, expected Element but found "+a.nodeType);return a.nodeName}(this));
this.output.b+=">"}else this.output.b+="/>";this.pretty&&(this.output.b+="");break;case 1:if(a.nodeType==A.Document||a.nodeType==A.Element)throw new m("Bad node type, unexpected "+a.nodeType);c=a.nodeValue;0!=c.length&&(this.write(b+P.htmlEscape(c)),this.pretty&&(this.output.b+=""));break;case 5:this.write("<?"+function(b){if(a.nodeType==A.Document||a.nodeType==A.Element)throw new m("Bad node type, unexpected "+a.nodeType);return a.nodeValue}(this)+"?>");break;case 4:this.write("<!DOCTYPE "+function(b){if(a.nodeType==
A.Document||a.nodeType==A.Element)throw new m("Bad node type, unexpected "+a.nodeType);return a.nodeValue}(this)+">")}},write:function(a){this.output.b=null==a?this.output.b+"null":this.output.b+(""+a)},hasChildren:function(a){if(a.nodeType!=A.Document&&a.nodeType!=A.Element)throw new m("Bad node type, expected Element or Document but found "+a.nodeType);for(a=H.iter(a.children);a.hasNext();){var b=a.next();switch(b.nodeType){case 0:case 1:return!0;case 2:case 3:if(0!=P.ltrim(function(a){if(b.nodeType==
A.Document||b.nodeType==A.Element)throw new m("Bad node type, unexpected "+b.nodeType);return b.nodeValue}(this)).length)return!0}}return!1},__class__:cg};var Rc=g["haxe.zip.Huffman"]={__ename__:!0,__constructs__:["Found","NeedBit","NeedBits"]};Rc.Found=function(a){a=["Found",0,a];a.__enum__=Rc;a.toString=u;return a};Rc.NeedBit=function(a,b){var c=["NeedBit",1,a,b];c.__enum__=Rc;c.toString=u;return c};Rc.NeedBits=function(a,b){var c=["NeedBits",2,a,b];c.__enum__=Rc;c.toString=u;return c};var Nj=function(){};
g["haxe.zip.HuffTools"]=Nj;Nj.__name__=["haxe","zip","HuffTools"];Nj.prototype={treeDepth:function(a){switch(a[1]){case 0:return 0;case 2:throw new m("assert");case 1:var b=a[3];a=this.treeDepth(a[2]);b=this.treeDepth(b);return 1+(a<b?a:b)}},treeCompress:function(a){var b=this.treeDepth(a);if(0==b)return a;if(1==b)switch(a[1]){case 1:return b=a[3],Rc.NeedBit(this.treeCompress(a[2]),this.treeCompress(b));default:throw new m("assert");}for(var c=1<<b,d=[],e=0;e<c;)e++,d.push(Rc.Found(-1));this.treeWalk(d,
0,0,b,a);return Rc.NeedBits(b,d)},treeWalk:function(a,b,c,d,e){switch(e[1]){case 1:var f=e[3],n=e[2];0<d?(this.treeWalk(a,b,c+1,d-1,n),this.treeWalk(a,b|1<<c,c+1,d-1,f)):a[b]=this.treeCompress(e);break;default:a[b]=this.treeCompress(e)}},treeMake:function(a,b,c,d){if(d>b)throw new m("Invalid huffman");var e=c<<5|d;if(a.h.hasOwnProperty(e))return Rc.Found(a.h[e]);c<<=1;d+=1;return Rc.NeedBit(this.treeMake(a,b,c,d),this.treeMake(a,b,c|1,d))},make:function(a,b,c,d){var e=[],f=[];if(32<d)throw new m("Invalid huffman");
for(var n=0;n<d;)n++,e.push(0),f.push(0);for(n=0;n<c;){var g=n++,g=a[g+b];if(g>=d)throw new m("Invalid huffman");e[g]++}for(var n=0,g=1,R=d-1;g<R;){var h=g++,n=n+e[h]<<1;f[h]=n}e=new Tb;for(n=0;n<c;)g=n++,R=a[g+b],0!=R&&(h=f[R-1],f[R-1]=h+1,e.h[h<<5|R]=g);return this.treeCompress(Rc.NeedBit(this.treeMake(e,d,0,1),this.treeMake(e,d,1,1)))},__class__:Nj};var Oj=function(a){this.buffer=gb.alloc(65536);this.pos=0;a&&(this.crc=new Xe)};g["haxe.zip._InflateImpl.Window"]=Oj;Oj.__name__=["haxe","zip","_InflateImpl",
"Window"];Oj.prototype={buffer:null,pos:null,crc:null,slide:function(){null!=this.crc&&this.crc.update(this.buffer,0,32768);var a=gb.alloc(65536);this.pos-=32768;a.blit(0,this.buffer,32768,this.pos);this.buffer=a},addBytes:function(a,b,c){65536<this.pos+c&&this.slide();this.buffer.blit(this.pos,a,b,c);this.pos+=c},addByte:function(a){65536==this.pos&&this.slide();this.buffer.b[this.pos]=a&255;this.pos++},getLastChar:function(){return this.buffer.b[this.pos-1]},available:function(){return this.pos},
checksum:function(){null!=this.crc&&this.crc.update(this.buffer,0,this.pos);return this.crc},__class__:Oj};var Z=g["haxe.zip._InflateImpl.State"]={__ename__:!0,__constructs__:"Head Block CData Flat Crc Dist DistOne Done".split(" ")};Z.Head=["Head",0];Z.Head.toString=u;Z.Head.__enum__=Z;Z.Block=["Block",1];Z.Block.toString=u;Z.Block.__enum__=Z;Z.CData=["CData",2];Z.CData.toString=u;Z.CData.__enum__=Z;Z.Flat=["Flat",3];Z.Flat.toString=u;Z.Flat.__enum__=Z;Z.Crc=["Crc",4];Z.Crc.toString=u;Z.Crc.__enum__=
Z;Z.Dist=["Dist",5];Z.Dist.toString=u;Z.Dist.__enum__=Z;Z.DistOne=["DistOne",6];Z.DistOne.toString=u;Z.DistOne.__enum__=Z;Z.Done=["Done",7];Z.Done.toString=u;Z.Done.__enum__=Z;var hb=function(a,b,c){null==c&&(c=!0);null==b&&(b=!0);this["final"]=!1;this.htools=new Nj;this.huffman=this.buildFixedHuffman();this.huffdist=null;this.dist=this.len=0;this.state=b?Z.Head:Z.Block;this.input=a;this.needed=this.nbits=this.bits=0;this.output=null;this.outpos=0;this.lengths=[];for(a=0;19>a;)a++,this.lengths.push(-1);
this.window=new Oj(c)};g["haxe.zip.InflateImpl"]=hb;hb.__name__=["haxe","zip","InflateImpl"];hb.run=function(a,b){null==b&&(b=65536);for(var c=gb.alloc(b),d=new $h,e=new hb(a);;){var f=e.readBytes(c,0,b);d.addBytes(c,0,f);if(f<b)break}return d.getBytes()};hb.prototype={nbits:null,bits:null,state:null,"final":null,huffman:null,huffdist:null,htools:null,len:null,dist:null,needed:null,output:null,outpos:null,input:null,lengths:null,window:null,buildFixedHuffman:function(){if(null!=hb.FIXED_HUFFMAN)return hb.FIXED_HUFFMAN;
for(var a=[],b=0;288>b;){var c=b++;a.push(143>=c?8:255>=c?9:279>=c?7:8)}hb.FIXED_HUFFMAN=this.htools.make(a,0,288,10);return hb.FIXED_HUFFMAN},readBytes:function(a,b,c){this.needed=c;this.outpos=b;this.output=a;if(0<c)for(;this.inflateLoop(););return c-this.needed},getBits:function(a){for(;this.nbits<a;)this.bits|=this.input.readByte()<<this.nbits,this.nbits+=8;var b=this.bits&(1<<a)-1;this.nbits-=a;this.bits>>=a;return b},getBit:function(){0==this.nbits&&(this.nbits=8,this.bits=this.input.readByte());
var a=1==(this.bits&1);this.nbits--;this.bits>>=1;return a},getRevBits:function(a){return 0==a?0:this.getBit()?1<<a-1|this.getRevBits(a-1):this.getRevBits(a-1)},resetBits:function(){this.nbits=this.bits=0},addBytes:function(a,b,c){this.window.addBytes(a,b,c);this.output.blit(this.outpos,a,b,c);this.needed-=c;this.outpos+=c},addByte:function(a){this.window.addByte(a);this.output.b[this.outpos]=a&255;this.needed--;this.outpos++},addDistOne:function(a){for(var b=this.window.getLastChar(),c=0;c<a;)c++,
this.addByte(b)},addDist:function(a,b){this.addBytes(this.window.buffer,this.window.pos-a,b)},applyHuffman:function(a){switch(a[1]){case 0:return a[2];case 1:var b=a[3];a=a[2];return this.applyHuffman(this.getBit()?b:a);case 2:return this.applyHuffman(a[3][this.getBits(a[2])])}},inflateLengths:function(a,b){for(var c=0,d=0;c<b;){var e=this.applyHuffman(this.huffman);switch(e){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:d=e;
a[c]=e;c++;break;case 16:e=c+3+this.getBits(2);if(e>b)throw new m("Invalid data");for(;c<e;)a[c]=d,c++;break;case 17:c+=3+this.getBits(3);if(c>b)throw new m("Invalid data");break;case 18:c+=11+this.getBits(7);if(c>b)throw new m("Invalid data");break;default:throw new m("Invalid data");}}},inflateLoop:function(){switch(this.state[1]){case 0:var a=this.input.readByte();if(8!=(a&15))throw new m("Invalid data");var b=this.input.readByte(),c=0!=(b&32);if(0!=((a<<8)+b)%31)throw new m("Invalid data");if(c)throw new m("Unsupported dictionary");
this.state=Z.Block;return!0;case 4:a=this.window.checksum();if(null==a)return this.state=Z.Done,!0;b=Xe.read(this.input);if(!a.equals(b))throw new m("Invalid CRC");this.state=Z.Done;return!0;case 7:return!1;case 1:switch(this["final"]=this.getBit(),this.getBits(2)){case 0:this.len=this.input.readUInt16();if(this.input.readUInt16()!=65535-this.len)throw new m("Invalid data");this.state=Z.Flat;a=this.inflateLoop();this.resetBits();return a;case 1:return this.huffman=this.buildFixedHuffman(),this.huffdist=
null,this.state=Z.CData,!0;case 2:for(var a=this.getBits(5)+257,b=this.getBits(5)+1,c=this.getBits(4)+4,d=0;d<c;){var e=d++;this.lengths[hb.CODE_LENGTHS_POS[e]]=this.getBits(3)}for(;19>c;)d=c++,this.lengths[hb.CODE_LENGTHS_POS[d]]=0;this.huffman=this.htools.make(this.lengths,0,19,8);c=[];d=0;for(e=a+b;d<e;)d++,c.push(0);this.inflateLengths(c,a+b);this.huffdist=this.htools.make(c,a,b,16);this.huffman=this.htools.make(c,0,a,16);this.state=Z.CData;return!0;default:throw new m("Invalid data");}case 3:return a=
this.len<this.needed?this.len:this.needed,b=this.input.read(a),this.len-=a,this.addBytes(b,0,a),0==this.len&&(this.state=this["final"]?Z.Crc:Z.Block),0<this.needed;case 6:return a=this.len<this.needed?this.len:this.needed,this.addDistOne(a),this.len-=a,0==this.len&&(this.state=Z.CData),0<this.needed;case 5:for(;0<this.len&&0<this.needed;)a=this.len<this.dist?this.len:this.dist,a=this.needed<a?this.needed:a,this.addDist(this.dist,a),this.len-=a;0==this.len&&(this.state=Z.CData);return 0<this.needed;
case 2:b=this.applyHuffman(this.huffman);if(256>b)return this.addByte(b),0<this.needed;if(256==b)this.state=this["final"]?Z.Crc:Z.Block;else{b-=257;a=hb.LEN_EXTRA_BITS_TBL[b];if(-1==a)throw new m("Invalid data");this.len=hb.LEN_BASE_VAL_TBL[b]+this.getBits(a);b=null==this.huffdist?this.getRevBits(5):this.applyHuffman(this.huffdist);a=hb.DIST_EXTRA_BITS_TBL[b];if(-1==a)throw new m("Invalid data");this.dist=hb.DIST_BASE_VAL_TBL[b]+this.getBits(a);if(this.dist>this.window.available())throw new m("Invalid data");
this.state=1==this.dist?Z.DistOne:Z.Dist}return!0}},__class__:hb};var Wk=function(){};g["haxe.zip.Uncompress"]=Wk;Wk.__name__=["haxe","zip","Uncompress"];Wk.run=function(a,b){return hb.run(new He(a),b)};var m=function(a){Error.call(this);this.val=a;Object.prototype.hasOwnProperty.call(a,"name")?this.name=G.field(a,"name"):this.name="Error";Object.prototype.hasOwnProperty.call(a,"message")?this.message=G.field(a,"message"):this.message=K.string(a);Error.captureStackTrace&&Error.captureStackTrace(this,
m)};g["js._Boot.HaxeError"]=m;m.__name__=["js","_Boot","HaxeError"];m.__super__=Error;m.prototype=t(Error.prototype,{val:null,__class__:m});var y=function(){};g["js.Boot"]=y;y.__name__=["js","Boot"];y.__unhtml=function(a){return a.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;")};y.__trace=function(a,b){var c;c=null!=b?b.fileName+":"+b.lineNumber+": ":"";c+=y.__string_rec(a,"");if(null!=b&&null!=b.customParams)for(var d=0,e=b.customParams;d<e.length;){var f=e[d];++d;c+=","+
y.__string_rec(f,"")}var n;"undefined"!=typeof document&&null!=(n=document.getElementById("haxe:trace"))?n.innerHTML+=y.__unhtml(c)+"<br/>":"undefined"!=typeof Ik&&null!=Ik.log&&Ik.log(c)};y.getClass=function(a){if(a instanceof Array&&null==a.__enum__)return Array;var b=a.__class__;if(null!=b)return b;a=y.__nativeClassName(a);return null!=a?y.__resolveNativeClass(a):null};y.__string_rec=function(a,b){if(null==a)return"null";if(5<=b.length)return"<...>";var c=typeof a;"function"==c&&(a.__name__||a.__ename__)&&
(c="object");switch(c){case "object":if(a instanceof Array){if(a.__enum__){if(2==a.length)return a[0];c=a[0]+"(";b+="\t";for(var d=2,e=a.length;d<e;)var f=d++,c=2!=f?c+(","+y.__string_rec(a[f],b)):c+y.__string_rec(a[f],b);return c+")"}c=a.length;d="[";b+="\t";for(e=0;e<c;)f=e++,d+=(0<f?",":"")+y.__string_rec(a[f],b);return d+"]"}try{d=a.toString}catch(n){return n instanceof m&&(n=n.val),"???"}if(null!=d&&d!=Object.toString&&"function"==typeof d&&(c=a.toString(),"[object Object]"!=c))return c;c=null;
d="{\n";b+="\t";e=null!=a.hasOwnProperty;for(c in a)e&&!a.hasOwnProperty(c)||"prototype"==c||"__class__"==c||"__super__"==c||"__interfaces__"==c||"__properties__"==c||(2!=d.length&&(d+=", \n"),d+=b+c+" : "+y.__string_rec(a[c],b));b=b.substring(1);return d+("\n"+b+"}");case "function":return"<function>";case "string":return a;default:return String(a)}};y.__interfLoop=function(a,b){if(null==a)return!1;if(a==b)return!0;var c=a.__interfaces__;if(null!=c)for(var d=0,e=c.length;d<e;){var f=d++,f=c[f];if(f==
b||y.__interfLoop(f,b))return!0}return y.__interfLoop(a.__super__,b)};y.__instanceof=function(a,b){if(null==b)return!1;switch(b){case Nb:return(a|0)===a;case ul:return"number"==typeof a;case vl:return"boolean"==typeof a;case String:return"string"==typeof a;case Array:return a instanceof Array&&null==a.__enum__;case Sl:return!0;default:if(null!=a)if("function"==typeof b){if(a instanceof b||y.__interfLoop(y.getClass(a),b))return!0}else{if("object"==typeof b&&y.__isNativeObj(b)&&a instanceof b)return!0}else return!1;
return b==wl&&null!=a.__name__||b==Tl&&null!=a.__ename__?!0:a.__enum__==b}};y.__cast=function(a,b){if(y.__instanceof(a,b))return a;throw new m("Cannot cast "+K.string(a)+" to "+K.string(b));};y.__nativeClassName=function(a){a=y.__toStr.call(a).slice(8,-1);return"Object"==a||"Function"==a||"Math"==a||"JSON"==a?null:a};y.__isNativeObj=function(a){return null!=y.__nativeClassName(a)};y.__resolveNativeClass=function(a){return Function("return typeof "+a+' != "undefined" ? '+a+" : null")()};var Xk=function(){};
g["js.Browser"]=Xk;Xk.__name__=["js","Browser"];Xk.createXMLHttpRequest=function(){if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!=typeof ActiveXObject)return new ActiveXObject("Microsoft.XMLHTTP");throw new m("Unable to create XMLHttpRequest object.");};var Sc=function(a){if(a instanceof Array&&null==a.__enum__)this.a=a,this.byteLength=a.length;else{this.a=[];for(var b=0;b<a;){var c=b++;this.a[c]=0}this.byteLength=a}};g["js.html.compat.ArrayBuffer"]=Sc;Sc.__name__=
["js","html","compat","ArrayBuffer"];Sc.sliceImpl=function(a,b){var c=new Ob(this,a,null==b?null:b-a),d=new Ej(c.byteLength);(new Ob(d)).set(c);return d};Sc.prototype={byteLength:null,a:null,slice:function(a,b){return new Sc(this.a.slice(a,b))},__class__:Sc};var Pj=function(a,b,c){this.buf=a;this.offset=null==b?0:b;this.length=null==c?a.byteLength-this.offset:c;if(0>this.offset||0>this.length||this.offset+this.length>a.byteLength)throw new m(ab.OutsideBounds);};g["js.html.compat.DataView"]=Pj;Pj.__name__=
["js","html","compat","DataView"];Pj.prototype={buf:null,offset:null,length:null,getInt8:function(a){a=this.buf.a[this.offset+a];return 128<=a?a-256:a},getUint8:function(a){return this.buf.a[this.offset+a]},getInt16:function(a,b){var c=this.getUint16(a,b);return 32768<=c?c-65536:c},getUint16:function(a,b){return b?this.buf.a[this.offset+a]|this.buf.a[this.offset+a+1]<<8:this.buf.a[this.offset+a]<<8|this.buf.a[this.offset+a+1]},getInt32:function(a,b){var c=this.offset+a,d=this.buf.a[c++],e=this.buf.a[c++],
f=this.buf.a[c++],c=this.buf.a[c++];return b?d|e<<8|f<<16|c<<24:c|f<<8|e<<16|d<<24},getUint32:function(a,b){var c=this.getInt32(a,b);return 0>c?c+4294967296:c},getFloat32:function(a,b){return uc.i32ToFloat(this.getInt32(a,b))},getFloat64:function(a,b){var c=this.getInt32(a,b),d=this.getInt32(a+4,b);return uc.i64ToDouble(b?c:d,b?d:c)},setInt8:function(a,b){this.buf.a[a+this.offset]=0>b?b+128&255:b&255},setUint8:function(a,b){this.buf.a[a+this.offset]=b&255},setInt16:function(a,b,c){this.setUint16(a,
0>b?b+65536:b,c)},setUint16:function(a,b,c){a+=this.offset;c?(this.buf.a[a]=b&255,this.buf.a[a++]=b>>8&255):(this.buf.a[a++]=b>>8&255,this.buf.a[a]=b&255)},setInt32:function(a,b,c){this.setUint32(a,b,c)},setUint32:function(a,b,c){a+=this.offset;c?(this.buf.a[a++]=b&255,this.buf.a[a++]=b>>8&255,this.buf.a[a++]=b>>16&255,this.buf.a[a++]=b>>>24):(this.buf.a[a++]=b>>>24,this.buf.a[a++]=b>>16&255,this.buf.a[a++]=b>>8&255,this.buf.a[a++]=b&255)},setFloat32:function(a,b,c){this.setUint32(a,uc.floatToI32(b),
c)},setFloat64:function(a,b,c){b=uc.doubleToI64(b);c?(this.setUint32(a,b.low),this.setUint32(a,b.high)):(this.setUint32(a,b.high),this.setUint32(a,b.low))},__class__:Pj};var Hd=function(){};g["js.html.compat.Uint8Array"]=Hd;Hd.__name__=["js","html","compat","Uint8Array"];Hd._new=function(a,b,c){if("number"==typeof a){c=[];for(b=0;b<a;){var d=b++;c[d]=0}c.byteLength=c.length;c.byteOffset=0;c.buffer=new Sc(c)}else if(y.__instanceof(a,Sc))null==b&&(b=0),null==c&&(c=a.byteLength-b),c=0==b?a.a:a.a.slice(b,
b+c),c.byteLength=c.length,c.byteOffset=b,c.buffer=a;else if(a instanceof Array&&null==a.__enum__)c=a.slice(),c.byteLength=c.length,c.byteOffset=0,c.buffer=new Sc(c);else throw new m("TODO "+K.string(a));c.subarray=Hd._subarray;c.set=Hd._set;return c};Hd._set=function(a,b){if(y.__instanceof(a.buffer,Sc)){if(a.byteLength+b>this.byteLength)throw new m("set() outside of range");for(var c=0,d=a.byteLength;c<d;){var e=c++;this[e+b]=a[e]}}else if(a instanceof Array&&null==a.__enum__){if(a.length+b>this.byteLength)throw new m("set() outside of range");
c=0;for(d=a.length;c<d;)e=c++,this[e+b]=a[e]}else throw new m("TODO");};Hd._subarray=function(a,b){var c=Hd._new(this.slice(a,b));c.byteOffset=a;return c};var Qj=function(){this.enabled=!0;this.audio=new ka;this.font=new ka;this.image=new ka};g["lime.AssetCache"]=Qj;Qj.__name__=["lime","AssetCache"];Qj.prototype={audio:null,enabled:null,image:null,font:null,clear:function(a){if(null==a)this.audio=new ka,this.font=new ka,this.image=new ka;else{for(var b=this.audio.keys();b.hasNext();){var c=b.next();
P.startsWith(c,a)&&this.audio.remove(c)}for(b=this.font.keys();b.hasNext();)c=b.next(),P.startsWith(c,a)&&this.font.remove(c);for(b=this.image.keys();b.hasNext();)c=b.next(),P.startsWith(c,a)&&this.image.remove(c)}},__class__:Qj};var db=function(){this.listeners=[];this.priorities=[];this.repeat=[]};g["lime.app.Event_Void_Void"]=db;db.__name__=["lime","app","Event_Void_Void"];db.prototype={repeat:null,priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.priorities.length;d<
e;){var f=d++;if(c>this.priorities[f]){this.listeners.splice(f,0,a);this.priorities.splice(f,0,c);this.repeat.splice(f,0,!b);return}}this.listeners.push(a);this.priorities.push(c);this.repeat.push(!b)},remove:function(a){for(var b=this.listeners.length;0<=--b;)G.compareMethods(this.listeners[b],a)&&(this.listeners.splice(b,1),this.priorities.splice(b,1),this.repeat.splice(b,1))},listeners:null,dispatch:function(){for(var a=this.listeners,b=this.repeat,c=0;c<a.length;)a[c](),b[c]?c++:this.remove(a[c])},
__class__:db};var aa=function(){};g["lime.Assets"]=aa;aa.__name__=["lime","Assets"];aa.exists=function(a,b){aa.initialize();null==b&&(b="BINARY");var c=a.substring(0,a.indexOf(":")),d;d=a.indexOf(":")+1;d=H.substr(a,d,null);c=aa.getLibrary(c);return null!=c?c.exists(d,b):!1};aa.getImage=function(a,b){null==b&&(b=!0);aa.initialize();if(b&&aa.cache.enabled&&aa.cache.image.exists(a)){var c=aa.cache.image.get(a);if(aa.isValidImage(c))return c}var c=a.substring(0,a.indexOf(":")),d;d=a.indexOf(":")+1;d=
H.substr(a,d,null);var e=aa.getLibrary(c);if(null!=e)if(e.exists(d,"IMAGE")){if(e.isLocal(d,"IMAGE"))return c=e.getImage(d),b&&aa.cache.enabled&&aa.cache.image.set(a,c),c;Ia.trace('[Assets] Image asset "'+a+'" exists, but only asynchronously',{fileName:"Assets.hx",lineNumber:304,className:"lime.Assets",methodName:"getImage"})}else Ia.trace('[Assets] There is no Image asset with an ID of "'+a+'"',{fileName:"Assets.hx",lineNumber:310,className:"lime.Assets",methodName:"getImage"});else Ia.trace('[Assets] There is no asset library named "'+
c+'"',{fileName:"Assets.hx",lineNumber:316,className:"lime.Assets",methodName:"getImage"});return null};aa.getLibrary=function(a){if(null==a||""==a)a="default";return aa.libraries.get(a)};aa.getText=function(a){aa.initialize();var b=a.substring(0,a.indexOf(":")),c;c=a.indexOf(":")+1;c=H.substr(a,c,null);var d=aa.getLibrary(b);if(null!=d)if(d.exists(c,"TEXT")){if(d.isLocal(c,"TEXT"))return d.getText(c);Ia.trace('[Assets] String asset "'+a+'" exists, but only asynchronously',{fileName:"Assets.hx",lineNumber:407,
className:"lime.Assets",methodName:"getText"})}else Ia.trace('[Assets] There is no String asset with an ID of "'+a+'"',{fileName:"Assets.hx",lineNumber:413,className:"lime.Assets",methodName:"getText"});else Ia.trace('[Assets] There is no asset library named "'+b+'"',{fileName:"Assets.hx",lineNumber:419,className:"lime.Assets",methodName:"getText"});return null};aa.initialize=function(){aa.initialized||(aa.registerLibrary("default",new yg),aa.initialized=!0)};aa.isValidImage=function(a){return!0};
aa.registerLibrary=function(a,b){if(aa.libraries.exists(a)){if(aa.libraries.get(a)==b)return;aa.unloadLibrary(a)}null!=b&&b.onChange.add(aa.library_onChange);aa.libraries.set(a,b)};aa.unloadLibrary=function(a){aa.initialize();var b=aa.libraries.get(a);null!=b&&(aa.cache.clear(a+":"),b.onChange.remove(aa.library_onChange),b.unload());aa.libraries.remove(a)};aa.library_onChange=function(){aa.cache.clear();aa.onChange.dispatch()};var Rj=function(a){this.parent=a;this.nextUpdate=this.lastUpdate=this.currentUpdate=
0;this.framePeriod=-1;fe.init()};g["lime._backend.html5.HTML5Application"]=Rj;Rj.__name__=["lime","_backend","html5","HTML5Application"];Rj.prototype={currentUpdate:null,deltaTime:null,framePeriod:null,lastUpdate:null,nextUpdate:null,parent:null,convertKeyCode:function(a){if(65<=a&&90>=a)return a+32;switch(a){case 16:return 1073742049;case 17:return 1073742048;case 18:return 1073742050;case 20:return 1073741881;case 144:return 1073741907;case 37:return 1073741904;case 38:return 1073741906;case 39:return 1073741903;
case 40:return 1073741905;case 45:return 1073741897;case 46:return 127;case 36:return 1073741898;case 35:return 1073741901;case 33:return 1073741899;case 34:return 1073741902;case 112:return 1073741882;case 113:return 1073741883;case 114:return 1073741884;case 115:return 1073741885;case 116:return 1073741886;case 117:return 1073741887;case 118:return 1073741888;case 119:return 1073741889;case 120:return 1073741890;case 121:return 1073741891;case 122:return 1073741892;case 123:return 1073741893;case 124:return 1073741928;
case 125:return 1073741929;case 126:return 1073741930;case 186:return 59;case 187:return 61;case 188:return 44;case 189:return 45;case 190:return 46;case 191:return 47;case 192:return 96;case 219:return 91;case 220:return 92;case 221:return 93;case 222:return 39}return a},create:function(a){},exec:function(){window.addEventListener("keydown",k(this,this.handleKeyEvent),!1);window.addEventListener("keyup",k(this,this.handleKeyEvent),!1);window.addEventListener("focus",k(this,this.handleWindowEvent),
!1);window.addEventListener("blur",k(this,this.handleWindowEvent),!1);window.addEventListener("resize",k(this,this.handleWindowEvent),!1);window.addEventListener("beforeunload",k(this,this.handleWindowEvent),!1);for(var a=0,b=["ms","moz","webkit","o"],c=0;c<b.length&&!window.requestAnimationFrame;++c)window.requestAnimationFrame=window[b[c]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[b[c]+"CancelAnimationFrame"]||window[b[c]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||
(window.requestAnimationFrame=function(b,c){var f=(new Date).getTime(),n=Math.max(0,16-(f-a)),g=window.setTimeout(function(){b(f+n)},n);a=f+n;return g});window.cancelAnimationFrame||(window.cancelAnimationFrame=function(a){clearTimeout(a)});window.requestAnimFrame=window.requestAnimationFrame;this.lastUpdate=(new Date).getTime();this.handleApplicationEvent();return 0},exit:function(){},handleApplicationEvent:function(a){this.currentUpdate=(new Date).getTime();this.currentUpdate>=this.nextUpdate&&
(this.deltaTime=this.currentUpdate-this.lastUpdate,this.parent.onUpdate.dispatch(this.deltaTime|0),null!=this.parent.renderers[0]&&(this.parent.renderers[0].onRender.dispatch(),this.parent.renderers[0].flip()),this.nextUpdate=0>this.framePeriod?this.nextUpdate=this.currentUpdate:this.currentUpdate+this.framePeriod,this.lastUpdate=this.currentUpdate);window.requestAnimationFrame(k(this,this.handleApplicationEvent))},handleKeyEvent:function(a){if(null!=this.parent.windows[0]){var b=this.convertKeyCode(null!=
a.keyCode?a.keyCode:a.which),c;c=(a.shiftKey?3:0)|(a.ctrlKey?192:0)|(a.altKey?768:0)|(a.metaKey?3072:0);"keydown"==a.type?this.parent.windows[0].onKeyDown.dispatch(b,c):this.parent.windows[0].onKeyUp.dispatch(b,c)}},handleWindowEvent:function(a){if(null!=this.parent.windows[0])switch(a.type){case "focus":this.parent.windows[0].onFocusIn.dispatch();this.parent.windows[0].onActivate.dispatch();break;case "blur":this.parent.windows[0].onFocusOut.dispatch();this.parent.windows[0].onDeactivate.dispatch();
break;case "resize":a=this.parent.windows[0].__width;var b=this.parent.windows[0].__height;this.parent.windows[0].backend.handleResize();this.parent.windows[0].__width==a&&this.parent.windows[0].__height==b||this.parent.windows[0].onResize.dispatch(this.parent.windows[0].__width,this.parent.windows[0].__height);break;case "beforeunload":this.parent.windows[0].onClose.dispatch()}},setFrameRate:function(a){this.framePeriod=60<=a?-1:0<a?1E3/a:1E3;return a},__class__:Rj};var Id=function(){};g["lime._backend.html5.HTML5Mouse"]=
Id;Id.__name__=["lime","_backend","html5","HTML5Mouse"];Id.__cursor=null;Id.__hidden=null;Id.set_cursor=function(a){if(Id.__cursor!=a){if(!Id.__hidden)for(var b=0,c=ec.current.windows;b<c.length;){var d=c[b];++b;switch(a[1]){case 0:d.backend.element.style.cursor="default";break;case 1:d.backend.element.style.cursor="crosshair";break;case 3:d.backend.element.style.cursor="move";break;case 4:d.backend.element.style.cursor="pointer";break;case 5:d.backend.element.style.cursor="nesw-resize";break;case 6:d.backend.element.style.cursor=
"ns-resize";break;case 7:d.backend.element.style.cursor="nwse-resize";break;case 8:d.backend.element.style.cursor="ew-resize";break;case 9:d.backend.element.style.cursor="text";break;case 10:d.backend.element.style.cursor="wait";break;case 11:d.backend.element.style.cursor="wait";break;default:d.backend.element.style.cursor="auto"}}Id.__cursor=a}return Id.__cursor};var Sj=function(a){this.parent=a};g["lime._backend.html5.HTML5Renderer"]=Sj;Sj.__name__=["lime","_backend","html5","HTML5Renderer"];Sj.prototype=
{parent:null,create:function(){this.createContext();switch(this.parent.context[1]){case 0:this.parent.window.backend.canvas.addEventListener("webglcontextlost",k(this,this.handleEvent),!1),this.parent.window.backend.canvas.addEventListener("webglcontextrestored",k(this,this.handleEvent),!1)}},createContext:function(){null!=this.parent.window.backend.div?(this.parent.context=yb.DOM(this.parent.window.backend.div),this.parent.type=Ja.DOM):null!=this.parent.window.backend.canvas&&(this.parent.context=
yb.CANVAS(this.parent.window.backend.canvas.getContext("2d")),this.parent.type=Ja.CANVAS)},flip:function(){},handleEvent:function(a){switch(a.type){case "webglcontextlost":a.preventDefault();this.parent.context=null;this.parent.onContextLost.dispatch();break;case "webglcontextrestored":this.createContext(),this.parent.onContextRestored.dispatch(this.parent.context)}},__class__:Sj};var sa=function(a){this.unusedTouchesPool=new lb;this.currentTouches=new Tb;this.parent=a;null!=a.config&&Object.prototype.hasOwnProperty.call(a.config,
"element")&&(this.element=a.config.element)};g["lime._backend.html5.HTML5Window"]=sa;sa.__name__=["lime","_backend","html5","HTML5Window"];sa.textInput=null;sa.prototype={canvas:null,div:null,element:null,currentTouches:null,enableTextEvents:null,parent:null,primaryTouch:null,setHeight:null,setWidth:null,unusedTouchesPool:null,close:function(){this.parent.application.removeWindow(this.parent)},create:function(a){this.setWidth=this.parent.__width;this.setHeight=this.parent.__height;this.parent.id=
sa.windowID++;y.__instanceof(this.element,HTMLCanvasElement)?this.canvas=this.element:this.canvas=window.document.createElement("canvas");null!=this.canvas?(a=this.canvas.style,a.setProperty("-webkit-transform","translateZ(0)",null),a.setProperty("transform","translateZ(0)",null)):null!=this.div&&(a=this.div.style,a.setProperty("-webkit-transform","translate3D(0,0,0)",null),a.setProperty("transform","translate3D(0,0,0)",null),a.position="relative",a.overflow="hidden",a.setProperty("-webkit-user-select",
"none",null),a.setProperty("-moz-user-select","none",null),a.setProperty("-ms-user-select","none",null),a.setProperty("-o-user-select","none",null));0==this.parent.__width&&0==this.parent.__height&&(null!=this.element?(this.parent.set_width(this.element.clientWidth),this.parent.set_height(this.element.clientHeight)):(this.parent.set_width(window.innerWidth),this.parent.set_height(window.innerHeight)),this.parent.set_fullscreen(!0));null!=this.canvas?(this.canvas.width=this.parent.__width,this.canvas.height=
this.parent.__height):(this.div.style.width=this.parent.__width+"px",this.div.style.height=this.parent.__height+"px");this.handleResize();if(null!=this.element){null!=this.canvas?this.element!=this.canvas&&this.element.appendChild(this.canvas):this.element.appendChild(this.div);a="mousedown mouseenter mouseleave mousemove mouseup wheel".split(" ");for(var b=0;b<a.length;){var c=a[b];++b;this.element.addEventListener(c,k(this,this.handleMouseEvent),!0)}window.document.addEventListener("dragstart",
function(a){return"img"==a.target.nodeName.toLowerCase()?(a.preventDefault(),!1):!0},!1);this.element.addEventListener("touchstart",k(this,this.handleTouchEvent),!0);this.element.addEventListener("touchmove",k(this,this.handleTouchEvent),!0);this.element.addEventListener("touchend",k(this,this.handleTouchEvent),!0)}},handleFocusEvent:function(a){this.enableTextEvents&&kc.delay(function(){sa.textInput.focus()},20)},handleInputEvent:function(a){""!=sa.textInput.value&&(this.parent.onTextInput.dispatch(sa.textInput.value),
sa.textInput.value="")},handleMouseEvent:function(a){var b=0,c=0;if("wheel"!=a.type)switch(null!=this.element?null!=this.canvas?(c=this.canvas.getBoundingClientRect(),b=this.parent.__width/c.width*(a.clientX-c.left),c=this.parent.__height/c.height*(a.clientY-c.top)):null!=this.div?(c=this.div.getBoundingClientRect(),b=a.clientX-c.left,c=a.clientY-c.top):(c=this.element.getBoundingClientRect(),b=this.parent.__width/c.width*(a.clientX-c.left),c=this.parent.__height/c.height*(a.clientY-c.top)):(b=a.clientX,
c=a.clientY),a.type){case "mousedown":this.parent.onMouseDown.dispatch(b,c,a.button);break;case "mouseenter":this.parent.onEnter.dispatch();break;case "mouseleave":this.parent.onLeave.dispatch();break;case "mouseup":this.parent.onMouseUp.dispatch(b,c,a.button);break;case "mousemove":this.parent.onMouseMove.dispatch(b,c)}else this.parent.onMouseWheel.dispatch(a.deltaX,-a.deltaY)},handleResize:function(){var a=this.parent.__fullscreen||0==this.setWidth&&0==this.setHeight;if(null!=this.element&&(null==
this.div||null!=this.div&&a))if(a){if(this.parent.__width!=this.element.clientWidth||this.parent.__height!=this.element.clientHeight)this.parent.set_width(this.element.clientWidth),this.parent.set_height(this.element.clientHeight),null!=this.canvas?this.element!=this.canvas&&(this.canvas.width=this.element.clientWidth,this.canvas.height=this.element.clientHeight):(this.div.style.width=this.element.clientWidth+"px",this.div.style.height=this.element.clientHeight+"px")}else a=Math.min(this.element.clientWidth/
this.setWidth,this.element.clientHeight/this.setHeight),null!=this.canvas?this.element!=this.canvas&&(this.canvas.style.width=this.setWidth*a+"px",this.canvas.style.height=this.setHeight*a+"px",this.canvas.style.marginLeft=(this.element.clientWidth-this.setWidth*a)/2+"px",this.canvas.style.marginTop=(this.element.clientHeight-this.setHeight*a)/2+"px"):(this.div.style.width=this.setWidth*a+"px",this.div.style.height=this.setHeight*a+"px",this.div.style.marginLeft=(this.element.clientWidth-this.setWidth*
a)/2+"px",this.div.style.marginTop=(this.element.clientHeight-this.setHeight*a)/2+"px")},handleTouchEvent:function(a){a.preventDefault();var b=null;null!=this.element&&(b=null!=this.canvas?this.canvas.getBoundingClientRect():null!=this.div?this.div.getBoundingClientRect():this.element.getBoundingClientRect());for(var c=0,d=a.changedTouches;c<d.length;){var e=d[c];++c;var f=0,n=0;null!=b?(f=this.parent.__width/b.width*(e.clientX-b.left),n=this.parent.__height/b.height*(e.clientY-b.top)):(f=e.clientX,
n=e.clientY);switch(a.type){case "touchstart":var g=this.unusedTouchesPool.pop();null==g?g=new yc(f/this.setWidth,n/this.setHeight,e.identifier,0,0,e.force,this.parent.id):(g.x=f/this.setWidth,g.y=n/this.setHeight,g.id=e.identifier,g.dx=0,g.dy=0,g.pressure=e.force,g.device=this.parent.id);this.currentTouches.h[e.identifier]=g;yc.onStart.dispatch(g);null==this.primaryTouch&&(this.primaryTouch=g);g==this.primaryTouch&&this.parent.onMouseDown.dispatch(f,n,0);break;case "touchend":g=this.currentTouches.h[e.identifier];
if(null!=g){var R=g.x,h=g.y;g.x=f/this.setWidth;g.y=n/this.setHeight;g.dx=g.x-R;g.dy=g.y-h;g.pressure=e.force;yc.onEnd.dispatch(g);this.currentTouches.remove(e.identifier);this.unusedTouchesPool.add(g);g==this.primaryTouch&&(this.parent.onMouseUp.dispatch(f,n,0),this.primaryTouch=null)}break;case "touchmove":g=this.currentTouches.h[e.identifier],null!=g&&(R=g.x,h=g.y,g.x=f/this.setWidth,g.y=n/this.setHeight,g.dx=g.x-R,g.dy=g.y-h,g.pressure=e.force,yc.onMove.dispatch(g),g==this.primaryTouch&&this.parent.onMouseMove.dispatch(f,
n))}}},resize:function(a,b){},setEnableTextEvents:function(a){a?(null==sa.textInput&&(sa.textInput=window.document.createElement("input"),sa.textInput.type="text",sa.textInput.style.position="absolute",sa.textInput.style.opacity="0",sa.textInput.style.color="transparent",sa.textInput.value="",sa.textInput.autocapitalize="off",sa.textInput.autocorrect="off",sa.textInput.autocomplete="off",sa.textInput.style.left="0px",sa.textInput.style.top="50%",(new jc("(iPad|iPhone|iPod).*OS 8_","gi")).match(window.navigator.userAgent)?
(sa.textInput.style.fontSize="0px",sa.textInput.style.width="0px",sa.textInput.style.height="0px"):(sa.textInput.style.width="1px",sa.textInput.style.height="1px"),sa.textInput.style.pointerEvents="none",sa.textInput.style.zIndex="-10000000",window.document.body.appendChild(sa.textInput)),this.enableTextEvents||(sa.textInput.addEventListener("input",k(this,this.handleInputEvent),!0),sa.textInput.addEventListener("blur",k(this,this.handleFocusEvent),!0)),sa.textInput.focus()):null!=sa.textInput&&(sa.textInput.removeEventListener("input",
k(this,this.handleInputEvent),!0),sa.textInput.removeEventListener("blur",k(this,this.handleFocusEvent),!0),sa.textInput.blur());return this.enableTextEvents=a},setFullscreen:function(a){return!1},__class__:sa};var di=function(){};g["lime.app.IModule"]=di;di.__name__=["lime","app","IModule"];di.prototype={onGamepadAxisMove:null,onGamepadButtonDown:null,onGamepadButtonUp:null,onGamepadConnect:null,onGamepadDisconnect:null,onJoystickAxisMove:null,onJoystickButtonDown:null,onJoystickButtonUp:null,onJoystickConnect:null,
onJoystickDisconnect:null,onJoystickHatMove:null,onJoystickTrackballMove:null,onKeyDown:null,onKeyUp:null,onModuleExit:null,onMouseDown:null,onMouseMove:null,onMouseMoveRelative:null,onMouseUp:null,onMouseWheel:null,onPreloadComplete:null,onPreloadProgress:null,onRenderContextLost:null,onRenderContextRestored:null,onTextEdit:null,onTextInput:null,onTouchEnd:null,onTouchMove:null,onTouchStart:null,onWindowActivate:null,onWindowClose:null,onWindowCreate:null,onWindowDeactivate:null,onWindowEnter:null,
onWindowFocusIn:null,onWindowFocusOut:null,onWindowFullscreen:null,onWindowLeave:null,onWindowMove:null,onWindowMinimize:null,onWindowResize:null,onWindowRestore:null,render:null,update:null,__class__:di};var dg=function(){this.onExit=new ge};g["lime.app.Module"]=dg;dg.__name__=["lime","app","Module"];dg.__interfaces__=[di];dg.prototype={onExit:null,onGamepadAxisMove:function(a,b,c){},onGamepadButtonDown:function(a,b){},onGamepadButtonUp:function(a,b){},onGamepadConnect:function(a){},onGamepadDisconnect:function(a){},
onJoystickAxisMove:function(a,b,c){},onJoystickButtonDown:function(a,b){},onJoystickButtonUp:function(a,b){},onJoystickConnect:function(a){},onJoystickDisconnect:function(a){},onJoystickHatMove:function(a,b,c){},onJoystickTrackballMove:function(a,b,c){},onKeyDown:function(a,b,c){},onKeyUp:function(a,b,c){},onModuleExit:function(a){},onMouseDown:function(a,b,c,d){},onMouseMove:function(a,b,c){},onMouseMoveRelative:function(a,b,c){},onMouseUp:function(a,b,c,d){},onMouseWheel:function(a,b,c){},onPreloadComplete:function(){},
onPreloadProgress:function(a,b){},onRenderContextLost:function(a){},onRenderContextRestored:function(a,b){},onTextEdit:function(a,b,c,d){},onTextInput:function(a,b){},onTouchEnd:function(a){},onTouchMove:function(a){},onTouchStart:function(a){},onWindowActivate:function(a){},onWindowClose:function(a){},onWindowCreate:function(a){},onWindowDeactivate:function(a){},onWindowEnter:function(a){},onWindowFocusIn:function(a){},onWindowFocusOut:function(a){},onWindowFullscreen:function(a){},onWindowLeave:function(a){},
onWindowMove:function(a,b,c){},onWindowMinimize:function(a){},onWindowResize:function(a,b,c){},onWindowRestore:function(a){},render:function(a){},update:function(a){},__class__:dg};var ec=function(){this.onUpdate=new ge;this.onExit=new ge;null==ec.current&&(ec.current=this);this.modules=[];this.renderers=[];this.windows=[];this.windowByID=new Tb;this.backend=new Rj(this);this.onExit.add(k(this,this.onModuleExit));this.onUpdate.add(k(this,this.update));cc.onConnect.add(k(this,this.onGamepadConnect));
ei.onConnect.add(k(this,this.onJoystickConnect));yc.onStart.add(k(this,this.onTouchStart));yc.onMove.add(k(this,this.onTouchMove));yc.onEnd.add(k(this,this.onTouchEnd))};g["lime.app.Application"]=ec;ec.__name__=["lime","app","Application"];ec.current=null;ec.__super__=dg;ec.prototype=t(dg.prototype,{config:null,modules:null,preloader:null,onUpdate:null,renderers:null,window:null,windows:null,backend:null,windowByID:null,addModule:function(a){this.modules.push(a);if(0<this.windows.length){for(var b=
0,c=this.windows;b<c.length;){var d=c[b];++b;a.onWindowCreate(d)}if(null==this.preloader||this.preloader.complete)a.onPreloadComplete()}},addRenderer:function(a){a.onRender.add(function(a,c){return function(){a(c)}}(k(this,this.render),a));a.onContextLost.add(function(a,c){return function(){a(c)}}(k(this,this.onRenderContextLost),a));a.onContextRestored.add(function(a,c){return function(d){a(c,d)}}(k(this,this.onRenderContextRestored),a));this.renderers.push(a)},createWindow:function(a){a.onActivate.add(function(a,
b){return function(){a(b)}}(k(this,this.onWindowActivate),a));a.onClose.add(function(a,b){return function(){a(b)}}(k(this,this.onWindowClose),a));a.onCreate.add(function(a,b){return function(){a(b)}}(k(this,this.onWindowCreate),a));a.onDeactivate.add(function(a,b){return function(){a(b)}}(k(this,this.onWindowDeactivate),a));a.onEnter.add(function(a,b){return function(){a(b)}}(k(this,this.onWindowEnter),a));a.onFocusIn.add(function(a,b){return function(){a(b)}}(k(this,this.onWindowFocusIn),a));a.onFocusOut.add(function(a,
b){return function(){a(b)}}(k(this,this.onWindowFocusOut),a));a.onFullscreen.add(function(a,b){return function(){a(b)}}(k(this,this.onWindowFullscreen),a));a.onKeyDown.add(function(a,b){return function(e,f){a(b,e,f)}}(k(this,this.onKeyDown),a));a.onKeyUp.add(function(a,b){return function(e,f){a(b,e,f)}}(k(this,this.onKeyUp),a));a.onLeave.add(function(a,b){return function(){a(b)}}(k(this,this.onWindowLeave),a));a.onMinimize.add(function(a,b){return function(){a(b)}}(k(this,this.onWindowMinimize),a));
a.onMouseDown.add(function(a,b){return function(e,f,n){a(b,e,f,n)}}(k(this,this.onMouseDown),a));a.onMouseMove.add(function(a,b){return function(e,f){a(b,e,f)}}(k(this,this.onMouseMove),a));a.onMouseMoveRelative.add(function(a,b){return function(e,f){a(b,e,f)}}(k(this,this.onMouseMoveRelative),a));a.onMouseUp.add(function(a,b){return function(e,f,n){a(b,e,f,n)}}(k(this,this.onMouseUp),a));a.onMouseWheel.add(function(a,b){return function(e,f){a(b,e,f)}}(k(this,this.onMouseWheel),a));a.onMove.add(function(a,
b){return function(e,f){a(b,e,f)}}(k(this,this.onWindowMove),a));a.onResize.add(function(a,b){return function(e,f){a(b,e,f)}}(k(this,this.onWindowResize),a));a.onRestore.add(function(a,b){return function(){a(b)}}(k(this,this.onWindowRestore),a));a.onTextEdit.add(function(a,b){return function(e,f,n){a(b,e,f,n)}}(k(this,this.onTextEdit),a));a.onTextInput.add(function(a,b){return function(e){a(b,e)}}(k(this,this.onTextInput),a));if(null==a.renderer){var b=new Tj(a);this.addRenderer(b)}a.create(this);
this.windows.push(a);this.windowByID.h[a.id]=a;a.onCreate.dispatch()},exec:function(){ec.current=this;return this.backend.exec()},onGamepadAxisMove:function(a,b,c){for(var d=0,e=this.modules;d<e.length;){var f=e[d];++d;f.onGamepadAxisMove(a,b,c)}},onGamepadButtonDown:function(a,b){for(var c=0,d=this.modules;c<d.length;){var e=d[c];++c;e.onGamepadButtonDown(a,b)}},onGamepadButtonUp:function(a,b){for(var c=0,d=this.modules;c<d.length;){var e=d[c];++c;e.onGamepadButtonUp(a,b)}},onGamepadConnect:function(a){for(var b=
0,c=this.modules;b<c.length;){var d=c[b];++b;d.onGamepadConnect(a)}a.onAxisMove.add(function(a,b){return function(c,d){a(b,c,d)}}(k(this,this.onGamepadAxisMove),a));a.onButtonDown.add(function(a,b){return function(c){a(b,c)}}(k(this,this.onGamepadButtonDown),a));a.onButtonUp.add(function(a,b){return function(c){a(b,c)}}(k(this,this.onGamepadButtonUp),a));a.onDisconnect.add(function(a,b){return function(){a(b)}}(k(this,this.onGamepadDisconnect),a))},onGamepadDisconnect:function(a){for(var b=0,c=this.modules;b<
c.length;){var d=c[b];++b;d.onGamepadDisconnect(a)}},onJoystickAxisMove:function(a,b,c){for(var d=0,e=this.modules;d<e.length;){var f=e[d];++d;f.onJoystickAxisMove(a,b,c)}},onJoystickButtonDown:function(a,b){for(var c=0,d=this.modules;c<d.length;){var e=d[c];++c;e.onJoystickButtonDown(a,b)}},onJoystickButtonUp:function(a,b){for(var c=0,d=this.modules;c<d.length;){var e=d[c];++c;e.onJoystickButtonUp(a,b)}},onJoystickConnect:function(a){for(var b=0,c=this.modules;b<c.length;){var d=c[b];++b;d.onJoystickConnect(a)}a.onAxisMove.add(function(a,
b){return function(c,d){a(b,c,d)}}(k(this,this.onJoystickAxisMove),a));a.onButtonDown.add(function(a,b){return function(c){a(b,c)}}(k(this,this.onJoystickButtonDown),a));a.onButtonUp.add(function(a,b){return function(c){a(b,c)}}(k(this,this.onJoystickButtonUp),a));a.onDisconnect.add(function(a,b){return function(){a(b)}}(k(this,this.onJoystickDisconnect),a));a.onHatMove.add(function(a,b){return function(c,d){a(b,c,d)}}(k(this,this.onJoystickHatMove),a));a.onTrackballMove.add(function(a,b){return function(c,
d){a(b,c,d)}}(k(this,this.onJoystickTrackballMove),a))},onJoystickDisconnect:function(a){for(var b=0,c=this.modules;b<c.length;){var d=c[b];++b;d.onJoystickDisconnect(a)}},onJoystickHatMove:function(a,b,c){for(var d=0,e=this.modules;d<e.length;){var f=e[d];++d;f.onJoystickHatMove(a,b,c)}},onJoystickTrackballMove:function(a,b,c){for(var d=0,e=this.modules;d<e.length;){var f=e[d];++d;f.onJoystickTrackballMove(a,b,c)}},onKeyDown:function(a,b,c){for(var d=0,e=this.modules;d<e.length;){var f=e[d];++d;
f.onKeyDown(a,b,c)}},onKeyUp:function(a,b,c){for(var d=0,e=this.modules;d<e.length;){var f=e[d];++d;f.onKeyUp(a,b,c)}},onModuleExit:function(a){for(var b=0,c=this.modules;b<c.length;){var d=c[b];++b;d.onModuleExit(a)}this.backend.exit()},onMouseDown:function(a,b,c,d){for(var e=0,f=this.modules;e<f.length;){var n=f[e];++e;n.onMouseDown(a,b,c,d)}},onMouseMove:function(a,b,c){for(var d=0,e=this.modules;d<e.length;){var f=e[d];++d;f.onMouseMove(a,b,c)}},onMouseMoveRelative:function(a,b,c){for(var d=0,
e=this.modules;d<e.length;){var f=e[d];++d;f.onMouseMoveRelative(a,b,c)}},onMouseUp:function(a,b,c,d){for(var e=0,f=this.modules;e<f.length;){var n=f[e];++e;n.onMouseUp(a,b,c,d)}},onMouseWheel:function(a,b,c){for(var d=0,e=this.modules;d<e.length;){var f=e[d];++d;f.onMouseWheel(a,b,c)}},onPreloadComplete:function(){for(var a=0,b=this.modules;a<b.length;){var c=b[a];++a;c.onPreloadComplete()}},onPreloadProgress:function(a,b){for(var c=0,d=this.modules;c<d.length;){var e=d[c];++c;e.onPreloadProgress(a,
b)}},onRenderContextLost:function(a){for(var b=0,c=this.modules;b<c.length;){var d=c[b];++b;d.onRenderContextLost(a)}},onRenderContextRestored:function(a,b){for(var c=0,d=this.modules;c<d.length;){var e=d[c];++c;e.onRenderContextRestored(a,b)}},onTextEdit:function(a,b,c,d){for(var e=0,f=this.modules;e<f.length;){var n=f[e];++e;n.onTextEdit(a,b,c,d)}},onTextInput:function(a,b){for(var c=0,d=this.modules;c<d.length;){var e=d[c];++c;e.onTextInput(a,b)}},onTouchEnd:function(a){for(var b=0,c=this.modules;b<
c.length;){var d=c[b];++b;d.onTouchEnd(a)}},onTouchMove:function(a){for(var b=0,c=this.modules;b<c.length;){var d=c[b];++b;d.onTouchMove(a)}},onTouchStart:function(a){for(var b=0,c=this.modules;b<c.length;){var d=c[b];++b;d.onTouchStart(a)}},onWindowActivate:function(a){for(var b=0,c=this.modules;b<c.length;){var d=c[b];++b;d.onWindowActivate(a)}},onWindowClose:function(a){for(var b=0,c=this.modules;b<c.length;){var d=c[b];++b;d.onWindowClose(a)}this.removeWindow(a)},onWindowCreate:function(a){for(var b=
0,c=this.modules;b<c.length;){var d=c[b];++b;d.onWindowCreate(a)}},onWindowDeactivate:function(a){for(var b=0,c=this.modules;b<c.length;){var d=c[b];++b;d.onWindowDeactivate(a)}},onWindowEnter:function(a){for(var b=0,c=this.modules;b<c.length;){var d=c[b];++b;d.onWindowEnter(a)}},onWindowFocusIn:function(a){for(var b=0,c=this.modules;b<c.length;){var d=c[b];++b;d.onWindowFocusIn(a)}},onWindowFocusOut:function(a){for(var b=0,c=this.modules;b<c.length;){var d=c[b];++b;d.onWindowFocusOut(a)}},onWindowFullscreen:function(a){for(var b=
0,c=this.modules;b<c.length;){var d=c[b];++b;d.onWindowFullscreen(a)}},onWindowLeave:function(a){for(var b=0,c=this.modules;b<c.length;){var d=c[b];++b;d.onWindowLeave(a)}},onWindowMinimize:function(a){for(var b=0,c=this.modules;b<c.length;){var d=c[b];++b;d.onWindowMinimize(a)}},onWindowMove:function(a,b,c){for(var d=0,e=this.modules;d<e.length;){var f=e[d];++d;f.onWindowMove(a,b,c)}},onWindowResize:function(a,b,c){for(var d=0,e=this.modules;d<e.length;){var f=e[d];++d;f.onWindowResize(a,b,c)}},
onWindowRestore:function(a){for(var b=0,c=this.modules;b<c.length;){var d=c[b];++b;d.onWindowRestore(a)}},removeWindow:function(a){null!=a&&this.windowByID.h.hasOwnProperty(a.id)&&(H.remove(this.windows,a),this.windowByID.remove(a.id),a.close(),this.windows[0]==a&&(this.window=null))},render:function(a){for(var b=0,c=this.modules;b<c.length;){var d=c[b];++b;d.render(a)}},setPreloader:function(a){null!=this.preloader&&(this.preloader.onProgress.remove(k(this,this.onPreloadProgress)),this.preloader.onComplete.remove(k(this,
this.onPreloadComplete)));this.preloader=a;if(a.complete)this.onPreloadComplete();else a.onProgress.add(k(this,this.onPreloadProgress)),a.onComplete.add(k(this,this.onPreloadComplete))},update:function(a){for(var b=0,c=this.modules;b<c.length;){var d=c[b];++b;d.update(a)}},__class__:ec});var eg=function(){this.listeners=[];this.priorities=[];this.repeat=[]};g["lime.app.Event_Dynamic_Void"]=eg;eg.__name__=["lime","app","Event_Dynamic_Void"];eg.prototype={repeat:null,priorities:null,add:function(a,
b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.priorities.length;d<e;){var f=d++;if(c>this.priorities[f]){this.listeners.splice(f,0,a);this.priorities.splice(f,0,c);this.repeat.splice(f,0,!b);return}}this.listeners.push(a);this.priorities.push(c);this.repeat.push(!b)},remove:function(a){for(var b=this.listeners.length;0<=--b;)G.compareMethods(this.listeners[b],a)&&(this.listeners.splice(b,1),this.priorities.splice(b,1),this.repeat.splice(b,1))},listeners:null,dispatch:function(a){for(var b=
this.listeners,c=this.repeat,d=0;d<b.length;)b[d](a),c[d]?d++:this.remove(b[d])},__class__:eg};var fi=function(){this.listeners=[];this.priorities=[];this.repeat=[]};g["lime.app.Event_Float_Float_Int_Void"]=fi;fi.__name__=["lime","app","Event_Float_Float_Int_Void"];fi.prototype={repeat:null,priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.priorities.length;d<e;){var f=d++;if(c>this.priorities[f]){this.listeners.splice(f,0,a);this.priorities.splice(f,0,c);this.repeat.splice(f,
0,!b);return}}this.listeners.push(a);this.priorities.push(c);this.repeat.push(!b)},remove:function(a){for(var b=this.listeners.length;0<=--b;)G.compareMethods(this.listeners[b],a)&&(this.listeners.splice(b,1),this.priorities.splice(b,1),this.repeat.splice(b,1))},listeners:null,dispatch:function(a,b,c){for(var d=this.listeners,e=this.repeat,f=0;f<d.length;)d[f](a,b,c),e[f]?f++:this.remove(d[f])},__class__:fi};var Ze=function(){this.listeners=[];this.priorities=[];this.repeat=[]};g["lime.app.Event_Float_Float_Void"]=
Ze;Ze.__name__=["lime","app","Event_Float_Float_Void"];Ze.prototype={repeat:null,priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.priorities.length;d<e;){var f=d++;if(c>this.priorities[f]){this.listeners.splice(f,0,a);this.priorities.splice(f,0,c);this.repeat.splice(f,0,!b);return}}this.listeners.push(a);this.priorities.push(c);this.repeat.push(!b)},remove:function(a){for(var b=this.listeners.length;0<=--b;)G.compareMethods(this.listeners[b],a)&&(this.listeners.splice(b,
1),this.priorities.splice(b,1),this.repeat.splice(b,1))},listeners:null,dispatch:function(a,b){for(var c=this.listeners,d=this.repeat,e=0;e<c.length;)c[e](a,b),d[e]?e++:this.remove(c[e])},__class__:Ze};var gi=function(){this.listeners=[];this.priorities=[];this.repeat=[]};g["lime.app.Event_Int_Float_Void"]=gi;gi.__name__=["lime","app","Event_Int_Float_Void"];gi.prototype={repeat:null,priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.priorities.length;d<e;){var f=
d++;if(c>this.priorities[f]){this.listeners.splice(f,0,a);this.priorities.splice(f,0,c);this.repeat.splice(f,0,!b);return}}this.listeners.push(a);this.priorities.push(c);this.repeat.push(!b)},listeners:null,__class__:gi};var hi=function(){this.listeners=[];this.priorities=[];this.repeat=[]};g["lime.app.Event_Int_Int_Void"]=hi;hi.__name__=["lime","app","Event_Int_Int_Void"];hi.prototype={repeat:null,priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.priorities.length;d<
e;){var f=d++;if(c>this.priorities[f]){this.listeners.splice(f,0,a);this.priorities.splice(f,0,c);this.repeat.splice(f,0,!b);return}}this.listeners.push(a);this.priorities.push(c);this.repeat.push(!b)},remove:function(a){for(var b=this.listeners.length;0<=--b;)G.compareMethods(this.listeners[b],a)&&(this.listeners.splice(b,1),this.priorities.splice(b,1),this.repeat.splice(b,1))},listeners:null,dispatch:function(a,b){for(var c=this.listeners,d=this.repeat,e=0;e<c.length;)c[e](a,b),d[e]?e++:this.remove(c[e])},
__class__:hi};var ge=function(){this.listeners=[];this.priorities=[];this.repeat=[]};g["lime.app.Event_Int_Void"]=ge;ge.__name__=["lime","app","Event_Int_Void"];ge.prototype={repeat:null,priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.priorities.length;d<e;){var f=d++;if(c>this.priorities[f]){this.listeners.splice(f,0,a);this.priorities.splice(f,0,c);this.repeat.splice(f,0,!b);return}}this.listeners.push(a);this.priorities.push(c);this.repeat.push(!b)},remove:function(a){for(var b=
this.listeners.length;0<=--b;)G.compareMethods(this.listeners[b],a)&&(this.listeners.splice(b,1),this.priorities.splice(b,1),this.repeat.splice(b,1))},listeners:null,dispatch:function(a){for(var b=this.listeners,c=this.repeat,d=0;d<b.length;)b[d](a),c[d]?d++:this.remove(b[d])},__class__:ge};var Uj=function(){this.listeners=[];this.priorities=[];this.repeat=[]};g["lime.app.Event_Int_lime_ui_JoystickHatPosition_Void"]=Uj;Uj.__name__=["lime","app","Event_Int_lime_ui_JoystickHatPosition_Void"];Uj.prototype=
{repeat:null,priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.priorities.length;d<e;){var f=d++;if(c>this.priorities[f]){this.listeners.splice(f,0,a);this.priorities.splice(f,0,c);this.repeat.splice(f,0,!b);return}}this.listeners.push(a);this.priorities.push(c);this.repeat.push(!b)},listeners:null,__class__:Uj};var Vj=function(){this.listeners=[];this.priorities=[];this.repeat=[]};g["lime.app.Event_String_Int_Int_Void"]=Vj;Vj.__name__=["lime","app","Event_String_Int_Int_Void"];
Vj.prototype={repeat:null,priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.priorities.length;d<e;){var f=d++;if(c>this.priorities[f]){this.listeners.splice(f,0,a);this.priorities.splice(f,0,c);this.repeat.splice(f,0,!b);return}}this.listeners.push(a);this.priorities.push(c);this.repeat.push(!b)},listeners:null,__class__:Vj};var Wj=function(){this.listeners=[];this.priorities=[];this.repeat=[]};g["lime.app.Event_String_Void"]=Wj;Wj.__name__=["lime","app","Event_String_Void"];
Wj.prototype={repeat:null,priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.priorities.length;d<e;){var f=d++;if(c>this.priorities[f]){this.listeners.splice(f,0,a);this.priorities.splice(f,0,c);this.repeat.splice(f,0,!b);return}}this.listeners.push(a);this.priorities.push(c);this.repeat.push(!b)},has:function(a){for(var b=0,c=this.listeners;b<c.length;){var d=c[b];++b;if(G.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.listeners.length;0<=
--b;)G.compareMethods(this.listeners[b],a)&&(this.listeners.splice(b,1),this.priorities.splice(b,1),this.repeat.splice(b,1))},listeners:null,dispatch:function(a){for(var b=this.listeners,c=this.repeat,d=0;d<b.length;)b[d](a),c[d]?d++:this.remove(b[d])},__class__:Wj};var Xj=function(){this.listeners=[];this.priorities=[];this.repeat=[]};g["lime.app.Event_lime_graphics_RenderContext_Void"]=Xj;Xj.__name__=["lime","app","Event_lime_graphics_RenderContext_Void"];Xj.prototype={repeat:null,priorities:null,
add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.priorities.length;d<e;){var f=d++;if(c>this.priorities[f]){this.listeners.splice(f,0,a);this.priorities.splice(f,0,c);this.repeat.splice(f,0,!b);return}}this.listeners.push(a);this.priorities.push(c);this.repeat.push(!b)},remove:function(a){for(var b=this.listeners.length;0<=--b;)G.compareMethods(this.listeners[b],a)&&(this.listeners.splice(b,1),this.priorities.splice(b,1),this.repeat.splice(b,1))},listeners:null,dispatch:function(a){for(var b=
this.listeners,c=this.repeat,d=0;d<b.length;)b[d](a),c[d]?d++:this.remove(b[d])},__class__:Xj};var Yj=function(){this.listeners=[];this.priorities=[];this.repeat=[]};g["lime.app.Event_lime_net_URLLoader_Int_Int_Void"]=Yj;Yj.__name__=["lime","app","Event_lime_net_URLLoader_Int_Int_Void"];Yj.prototype={repeat:null,priorities:null,remove:function(a){for(var b=this.listeners.length;0<=--b;)G.compareMethods(this.listeners[b],a)&&(this.listeners.splice(b,1),this.priorities.splice(b,1),this.repeat.splice(b,
1))},listeners:null,dispatch:function(a,b,c){for(var d=this.listeners,e=this.repeat,f=0;f<d.length;)d[f](a,b,c),e[f]?f++:this.remove(d[f])},__class__:Yj};var Zj=function(){this.listeners=[];this.priorities=[];this.repeat=[]};g["lime.app.Event_lime_net_URLLoader_Int_Void"]=Zj;Zj.__name__=["lime","app","Event_lime_net_URLLoader_Int_Void"];Zj.prototype={repeat:null,priorities:null,remove:function(a){for(var b=this.listeners.length;0<=--b;)G.compareMethods(this.listeners[b],a)&&(this.listeners.splice(b,
1),this.priorities.splice(b,1),this.repeat.splice(b,1))},listeners:null,dispatch:function(a,b){for(var c=this.listeners,d=this.repeat,e=0;e<c.length;)c[e](a,b),d[e]?e++:this.remove(c[e])},__class__:Zj};var ii=function(){this.listeners=[];this.priorities=[];this.repeat=[]};g["lime.app.Event_lime_net_URLLoader_String_Void"]=ii;ii.__name__=["lime","app","Event_lime_net_URLLoader_String_Void"];ii.prototype={repeat:null,priorities:null,remove:function(a){for(var b=this.listeners.length;0<=--b;)G.compareMethods(this.listeners[b],
a)&&(this.listeners.splice(b,1),this.priorities.splice(b,1),this.repeat.splice(b,1))},listeners:null,dispatch:function(a,b){for(var c=this.listeners,d=this.repeat,e=0;e<c.length;)c[e](a,b),d[e]?e++:this.remove(c[e])},__class__:ii};var ji=function(){this.listeners=[];this.priorities=[];this.repeat=[]};g["lime.app.Event_lime_net_URLLoader_Void"]=ji;ji.__name__=["lime","app","Event_lime_net_URLLoader_Void"];ji.prototype={repeat:null,priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);
for(var d=0,e=this.priorities.length;d<e;){var f=d++;if(c>this.priorities[f]){this.listeners.splice(f,0,a);this.priorities.splice(f,0,c);this.repeat.splice(f,0,!b);return}}this.listeners.push(a);this.priorities.push(c);this.repeat.push(!b)},remove:function(a){for(var b=this.listeners.length;0<=--b;)G.compareMethods(this.listeners[b],a)&&(this.listeners.splice(b,1),this.priorities.splice(b,1),this.repeat.splice(b,1))},listeners:null,dispatch:function(a){for(var b=this.listeners,c=this.repeat,d=0;d<
b.length;)b[d](a),c[d]?d++:this.remove(b[d])},__class__:ji};var ak=function(){this.listeners=[];this.priorities=[];this.repeat=[]};g["lime.app.Event_lime_ui_GamepadAxis_Float_Void"]=ak;ak.__name__=["lime","app","Event_lime_ui_GamepadAxis_Float_Void"];ak.prototype={repeat:null,priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.priorities.length;d<e;){var f=d++;if(c>this.priorities[f]){this.listeners.splice(f,0,a);this.priorities.splice(f,0,c);this.repeat.splice(f,
0,!b);return}}this.listeners.push(a);this.priorities.push(c);this.repeat.push(!b)},remove:function(a){for(var b=this.listeners.length;0<=--b;)G.compareMethods(this.listeners[b],a)&&(this.listeners.splice(b,1),this.priorities.splice(b,1),this.repeat.splice(b,1))},listeners:null,dispatch:function(a,b){for(var c=this.listeners,d=this.repeat,e=0;e<c.length;)c[e](a,b),d[e]?e++:this.remove(c[e])},__class__:ak};var ki=function(){this.listeners=[];this.priorities=[];this.repeat=[]};g["lime.app.Event_lime_ui_GamepadButton_Void"]=
ki;ki.__name__=["lime","app","Event_lime_ui_GamepadButton_Void"];ki.prototype={repeat:null,priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.priorities.length;d<e;){var f=d++;if(c>this.priorities[f]){this.listeners.splice(f,0,a);this.priorities.splice(f,0,c);this.repeat.splice(f,0,!b);return}}this.listeners.push(a);this.priorities.push(c);this.repeat.push(!b)},remove:function(a){for(var b=this.listeners.length;0<=--b;)G.compareMethods(this.listeners[b],a)&&(this.listeners.splice(b,
1),this.priorities.splice(b,1),this.repeat.splice(b,1))},listeners:null,dispatch:function(a){for(var b=this.listeners,c=this.repeat,d=0;d<b.length;)b[d](a),c[d]?d++:this.remove(b[d])},__class__:ki};var bk=function(){this.listeners=[];this.priorities=[];this.repeat=[]};g["lime.app.Event_lime_ui_Gamepad_Void"]=bk;bk.__name__=["lime","app","Event_lime_ui_Gamepad_Void"];bk.prototype={repeat:null,priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.priorities.length;d<
e;){var f=d++;if(c>this.priorities[f]){this.listeners.splice(f,0,a);this.priorities.splice(f,0,c);this.repeat.splice(f,0,!b);return}}this.listeners.push(a);this.priorities.push(c);this.repeat.push(!b)},remove:function(a){for(var b=this.listeners.length;0<=--b;)G.compareMethods(this.listeners[b],a)&&(this.listeners.splice(b,1),this.priorities.splice(b,1),this.repeat.splice(b,1))},listeners:null,dispatch:function(a){for(var b=this.listeners,c=this.repeat,d=0;d<b.length;)b[d](a),c[d]?d++:this.remove(b[d])},
__class__:bk};var ck=function(){this.listeners=[];this.priorities=[];this.repeat=[]};g["lime.app.Event_lime_ui_Joystick_Void"]=ck;ck.__name__=["lime","app","Event_lime_ui_Joystick_Void"];ck.prototype={repeat:null,priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.priorities.length;d<e;){var f=d++;if(c>this.priorities[f]){this.listeners.splice(f,0,a);this.priorities.splice(f,0,c);this.repeat.splice(f,0,!b);return}}this.listeners.push(a);this.priorities.push(c);this.repeat.push(!b)},
listeners:null,__class__:ck};var li=function(){this.listeners=[];this.priorities=[];this.repeat=[]};g["lime.app.Event_lime_ui_KeyCode_lime_ui_KeyModifier_Void"]=li;li.__name__=["lime","app","Event_lime_ui_KeyCode_lime_ui_KeyModifier_Void"];li.prototype={repeat:null,priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.priorities.length;d<e;){var f=d++;if(c>this.priorities[f]){this.listeners.splice(f,0,a);this.priorities.splice(f,0,c);this.repeat.splice(f,0,!b);return}}this.listeners.push(a);
this.priorities.push(c);this.repeat.push(!b)},remove:function(a){for(var b=this.listeners.length;0<=--b;)G.compareMethods(this.listeners[b],a)&&(this.listeners.splice(b,1),this.priorities.splice(b,1),this.repeat.splice(b,1))},listeners:null,dispatch:function(a,b){for(var c=this.listeners,d=this.repeat,e=0;e<c.length;)c[e](a,b),d[e]?e++:this.remove(c[e])},__class__:li};var fg=function(){this.listeners=[];this.priorities=[];this.repeat=[]};g["lime.app.Event_lime_ui_Touch_Void"]=fg;fg.__name__=["lime",
"app","Event_lime_ui_Touch_Void"];fg.prototype={repeat:null,priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.priorities.length;d<e;){var f=d++;if(c>this.priorities[f]){this.listeners.splice(f,0,a);this.priorities.splice(f,0,c);this.repeat.splice(f,0,!b);return}}this.listeners.push(a);this.priorities.push(c);this.repeat.push(!b)},remove:function(a){for(var b=this.listeners.length;0<=--b;)G.compareMethods(this.listeners[b],a)&&(this.listeners.splice(b,1),this.priorities.splice(b,
1),this.repeat.splice(b,1))},listeners:null,dispatch:function(a){for(var b=this.listeners,c=this.repeat,d=0;d<b.length;)b[d](a),c[d]?d++:this.remove(b[d])},__class__:fg};var eb=function(){this.loaded=this.total=0;this.onProgress=new hi;this.onComplete=new db;this.onProgress.add(k(this,this.update))};g["lime.app.Preloader"]=eb;eb.__name__=["lime","app","Preloader"];eb.prototype={complete:null,onComplete:null,onProgress:null,loaded:null,total:null,create:function(a){},load:function(a,b){for(var c=null,
d=0,e=a.length;d<e;){var f=d++,c=a[f];switch(b[f]){case "IMAGE":eb.images.exists(c)||(f=new Image,eb.images.set(c,f),f.onload=k(this,this.image_onLoad),f.src=c,this.total++);break;case "BINARY":eb.loaders.exists(c)||(f=new mi,f.set_dataFormat(fc.BINARY),eb.loaders.set(c,f),this.total++);break;case "TEXT":eb.loaders.exists(c)||(f=new mi,eb.loaders.set(c,f),this.total++);break;case "FONT":this.total++,this.loadFont(c)}}for(c=eb.loaders.keys();c.hasNext();)d=c.next(),e=eb.loaders.get(d),e.onComplete.add(k(this,
this.loader_onComplete)),e.load(new dk(d));0==this.total&&this.start()},loadFont:function(a){var b=this;if(window.document.fonts&&(pl=window.document.fonts,k(pl,pl.load)))window.document.fonts.load("1em '"+a+"'").then(function(a){b.loaded++;b.onProgress.dispatch(b.loaded,b.total);b.loaded==b.total&&b.start()});else{var c=window.document.createElement("span");c.innerHTML="giItT1WQy@!-/#";var d=c.style;d.position="absolute";d.left="-10000px";d.top="-10000px";d.fontSize="300px";d.fontFamily="sans-serif";
d.fontVariant="normal";d.fontStyle="normal";d.fontWeight="normal";d.letterSpacing="0";window.document.body.appendChild(c);var e=c.offsetWidth;d.fontFamily="'"+a+"', sans-serif";var f=null,n=!1;a=function(){if(c.offsetWidth!=e){if(!n)return n=!0,!1;b.loaded++;null!=f&&window.clearInterval(f);c.parentNode.removeChild(c);c=null;b.onProgress.dispatch(b.loaded,b.total);b.loaded==b.total&&b.start();return!0}return!1};a()||(f=window.setInterval(a,50))}},start:function(){this.complete=!0;this.onComplete.dispatch()},
update:function(a,b){},image_onLoad:function(a){this.loaded++;this.onProgress.dispatch(this.loaded,this.total);this.loaded==this.total&&this.start()},loader_onComplete:function(a){this.loaded++;this.onProgress.dispatch(this.loaded,this.total);this.loaded==this.total&&this.start()},__class__:eb};var xl=function(){};g["lime.audio.ALAudioContext"]=xl;xl.__name__=["lime","audio","ALAudioContext"];var yl=function(){};g["lime.audio.ALCAudioContext"]=yl;yl.__name__=["lime","audio","ALCAudioContext"];var zl=
function(){};g["lime.audio.AudioBuffer"]=zl;zl.__name__=["lime","audio","AudioBuffer"];var Tc=g["lime.audio.AudioContext"]={__ename__:!0,__constructs__:["OPENAL","HTML5","WEB","FLASH","CUSTOM"]};Tc.OPENAL=function(a,b){var c=["OPENAL",0,a,b];c.__enum__=Tc;c.toString=u;return c};Tc.HTML5=function(a){a=["HTML5",1,a];a.__enum__=Tc;a.toString=u;return a};Tc.WEB=function(a){a=["WEB",2,a];a.__enum__=Tc;a.toString=u;return a};Tc.FLASH=function(a){a=["FLASH",3,a];a.__enum__=Tc;a.toString=u;return a};Tc.CUSTOM=
function(a){a=["CUSTOM",4,a];a.__enum__=Tc;a.toString=u;return a};var fe=function(){};g["lime.audio.AudioManager"]=fe;fe.__name__=["lime","audio","AudioManager"];fe.context=null;fe.init=function(a){if(null==fe.context)if(null==a)try{window.AudioContext=window.AudioContext||window.webkitAudioContext,fe.context=Tc.WEB(new AudioContext)}catch(b){b instanceof m&&(b=b.val),fe.context=Tc.HTML5(new ek)}else fe.context=a};var Al=function(){};g["lime.audio.FlashAudioContext"]=Al;Al.__name__=["lime","audio",
"FlashAudioContext"];var ek=function(){};g["lime.audio.HTML5AudioContext"]=ek;ek.__name__=["lime","audio","HTML5AudioContext"];ek.prototype={__class__:ek};var Yk=function(){};g["lime.graphics.ConsoleRenderContext"]=Yk;Yk.__name__=["lime","graphics","ConsoleRenderContext"];Yk.prototype={__class__:Yk};var Bl=function(){};g["lime.graphics.FlashRenderContext"]=Bl;Bl.__name__=["lime","graphics","FlashRenderContext"];var bc=function(a,b,c,d,e,f,n){null==e&&(e=-1);null==d&&(d=-1);null==c&&(c=0);null==b&&
(b=0);this.offsetX=b;this.offsetY=c;this.width=d;this.height=e;if(null==n)if(null!=ec.current&&null!=ec.current.renderers[0])switch(ec.current.renderers[0].context[1]){case 2:case 1:this.type=nb.CANVAS;break;case 3:this.type=nb.FLASH;break;default:this.type=nb.DATA}else this.type=nb.DATA;else this.type=n;if(null==a){if(0<d&&0<e)switch(this.type[1]){case 0:this.buffer=new ld(null,d,e);U.createCanvas(this,d,e);null!=f&&this.fillRect(new Uc(0,0,d,e),f);break;case 1:a=d*e*4,a=null!=a?new Ob(a):null,this.buffer=
new ld(a,d,e),null!=f&&this.fillRect(new Uc(0,0,d,e),f)}}else this.__fromImageBuffer(a)};g["lime.graphics.Image"]=bc;bc.__name__=["lime","graphics","Image"];bc.fromCanvas=function(a){if(null==a)return null;var b=new ld(null,a.width,a.height);b.set_src(a);return new bc(b)};bc.fromFile=function(a,b,c){var d=new bc;d.__fromFile(a,b,c);return d};bc.fromImageElement=function(a){if(null==a)return null;var b=new ld(null,a.width,a.height);b.set_src(a);return new bc(b)};bc.prototype={buffer:null,dirty:null,
height:null,offsetX:null,offsetY:null,type:null,width:null,clone:function(){if(null!=this.buffer){this.type==nb.CANVAS&&null==this.buffer.__srcImage&&(U.convertToCanvas(this),U.sync(this,!0));var a=new bc(this.buffer.clone(),this.offsetX,this.offsetY,this.width,this.height,null,this.type);a.dirty=this.dirty;return a}return new bc(null,this.offsetX,this.offsetY,this.width,this.height,null,this.type)},colorTransform:function(a,b){a=this.__clipRect(a);if(null!=this.buffer&&null!=a)switch(this.type[1]){case 0:U.colorTransform(this,
a,b);break;case 1:U.convertToData(this);ib.colorTransform(this,a,b);break;case 2:a.offset(this.offsetX,this.offsetY),this.buffer.__srcBitmapData.colorTransform(a.__toFlashRectangle(),Vc.__toFlashColorTransform(b))}},copyChannel:function(a,b,c,d,e){b=this.__clipRect(b);if(null!=this.buffer&&null!=b&&!(e==Gb.ALPHA&&!this.get_transparent()||0>=b.width||0>=b.height))switch(b.x+b.width>a.width&&(b.width=a.width-b.x),b.y+b.height>a.height&&(b.height=a.height-b.y),this.type[1]){case 0:U.copyChannel(this,
a,b,c,d,e);break;case 1:U.convertToData(this);ib.copyChannel(this,a,b,c,d,e);break;case 2:var f;switch(d[1]){case 0:f=1;break;case 1:f=2;break;case 2:f=4;break;case 3:f=8}var n;switch(e[1]){case 0:n=1;break;case 1:n=2;break;case 2:n=4;break;case 3:n=8}b.offset(a.offsetX,a.offsetY);c.offset(this.offsetX,this.offsetY);this.buffer.__srcBitmapData.copyChannel(a.buffer.get_src(),b.__toFlashRectangle(),c.__toFlashPoint(),f,n)}},copyPixels:function(a,b,c,d,e,f){null==f&&(f=!1);if(null!=this.buffer&&null!=
a&&!(0>=b.width||0>=b.height||0>=this.width||0>=this.height))switch(b.x+b.width>a.width&&(b.width=a.width-b.x),b.y+b.height>a.height&&(b.height=a.height-b.y),0>b.x&&(b.width+=b.x,b.x=0),0>b.y&&(b.height+=b.y,b.y=0),c.x+b.width>this.width&&(b.width=this.width-c.x),c.y+b.height>this.height&&(b.height=this.height-c.y),0>c.x&&(b.width+=c.x,b.x=-c.x,c.x=0),0>c.y&&(b.height+=c.y,b.y=-c.y,c.y=0),this.type[1]){case 0:U.convertToCanvas(this);U.copyPixels(this,a,b,c,d,e,f);break;case 1:U.convertToData(this);
U.convertToData(a);ib.copyPixels(this,a,b,c,d,e,f);break;case 2:b.offset(a.offsetX,a.offsetY),c.offset(this.offsetX,this.offsetY),null!=d&&null!=e&&e.offset(d.offsetX,d.offsetY),this.buffer.__srcBitmapData.copyPixels(a.buffer.__srcBitmapData,b.__toFlashRectangle(),c.__toFlashPoint(),null!=d?d.buffer.get_src():null,null!=e?e.__toFlashPoint():null,f)}},fillRect:function(a,b,c){a=this.__clipRect(a);if(null!=this.buffer&&null!=a)switch(this.type[1]){case 0:U.fillRect(this,a,b,c);break;case 1:U.convertToData(this);
if(0==this.buffer.data.length)break;ib.fillRect(this,a,b,c);break;case 2:a.offset(this.offsetX,this.offsetY);if(null!=c)switch(c){case 1:break;case 2:b=(b&255)<<24|(b>>8&255)<<16|(b>>16&255)<<8|b>>24&255;break;default:b=(b&255)<<24|(b>>24&255)<<16|(b>>16&255)<<8|b>>8&255}else b=(b&255)<<24|(b>>24&255)<<16|(b>>16&255)<<8|b>>8&255;this.buffer.__srcBitmapData.fillRect(a.__toFlashRectangle(),b)}},resize:function(a,b){switch(this.type[1]){case 0:U.resize(this,a,b);break;case 1:ib.resize(this,a,b)}this.buffer.width=
a;this.buffer.height=b;this.offsetY=this.offsetX=0;this.width=a;this.height=b},setPixels:function(a,b,c){a=this.__clipRect(a);if(null!=this.buffer&&null!=a)switch(this.type[1]){case 0:U.setPixels(this,a,b,c);break;case 1:U.convertToData(this);ib.setPixels(this,a,b,c);break;case 2:a.offset(this.offsetX,this.offsetY);if(null!=c)switch(c){case 1:break;case 2:c=b;b=new Ta;for(var d,e=b.length/4|0,f=0;f<e;)f++,d=c.readUnsignedInt(),b.writeUnsignedInt(y.__cast(d,Nb));c.position=0;b.position=0;break;default:c=
b;b=new Ta;e=b.length/4|0;for(f=0;f<e;)f++,d=c.readUnsignedInt(),b.writeUnsignedInt(y.__cast(d,Nb));c.position=0;b.position=0}else{c=b;b=new Ta;e=b.length/4|0;for(f=0;f<e;)f++,d=c.readUnsignedInt(),b.writeUnsignedInt(y.__cast(d,Nb));c.position=0;b.position=0}this.buffer.__srcBitmapData.setPixels(a.__toFlashRectangle(),b)}},__clipRect:function(a){return null==a||0>a.x&&(a.width-=-a.x,a.x=0,0>=a.x+a.width)||0>a.y&&(a.height-=-a.y,a.y=0,0>=a.y+a.height)||a.x+a.width>=this.width&&(a.width-=a.x+a.width-
this.width,0>=a.width)||a.y+a.height>=this.height&&(a.height-=a.y+a.height-this.height,0>=a.height)?null:a},__fromFile:function(a,b,c){var d=this,e=new Image;e.onload=function(a){d.buffer=new ld(null,e.width,e.height);d.buffer.__srcImage=e;d.width=e.width;d.height=e.height;null!=b&&b(d)};e.onerror=function(a){null!=c&&c()};e.src=a},__fromImageBuffer:function(a){this.buffer=a;null!=a&&(-1==this.width&&(this.width=a.width),-1==this.height&&(this.height=a.height))},get_data:function(){null==this.buffer.data&&
0<this.buffer.width&&0<this.buffer.height&&(U.convertToCanvas(this),U.sync(this,!1),U.createImageData(this));return this.buffer.data},get_format:function(){return this.buffer.format},set_format:function(a){if(this.buffer.format!=a)switch(this.type[1]){case 1:ib.setFormat(this,a)}return this.buffer.format=a},get_powerOfTwo:function(){return 0!=this.buffer.width&&(this.buffer.width&~this.buffer.width+1)==this.buffer.width&&0!=this.buffer.height&&(this.buffer.height&~this.buffer.height+1)==this.buffer.height},
get_premultiplied:function(){return this.buffer.premultiplied},set_premultiplied:function(a){if(a&&!this.buffer.premultiplied)switch(this.type[1]){case 1:U.convertToData(this),ib.multiplyAlpha(this)}else if(!a&&this.buffer.premultiplied)switch(this.type[1]){case 1:U.convertToData(this),ib.unmultiplyAlpha(this)}return a},get_rect:function(){return new Uc(0,0,this.width,this.height)},get_src:function(){null==this.buffer.__srcCanvas&&U.convertToCanvas(this);return this.buffer.get_src()},get_transparent:function(){return null==
this.buffer?!1:this.buffer.transparent},set_transparent:function(a){return null==this.buffer?!1:this.buffer.transparent=a},__class__:bc,__properties__:{get_rect:"get_rect",set_transparent:"set_transparent",get_transparent:"get_transparent",get_src:"get_src",set_premultiplied:"set_premultiplied",get_premultiplied:"get_premultiplied",get_powerOfTwo:"get_powerOfTwo",set_format:"set_format",get_format:"get_format",get_data:"get_data"}};var ld=function(a,b,c,d,e){null==d&&(d=32);null==c&&(c=0);null==b&&
(b=0);this.data=a;this.width=b;this.height=c;this.bitsPerPixel=d;this.format=null==e?0:e;this.transparent=!0};g["lime.graphics.ImageBuffer"]=ld;ld.__name__=["lime","graphics","ImageBuffer"];ld.prototype={bitsPerPixel:null,data:null,format:null,height:null,premultiplied:null,transparent:null,width:null,__srcBitmapData:null,__srcCanvas:null,__srcContext:null,__srcImage:null,__srcImageData:null,clone:function(){var a=new ld(this.data,this.width,this.height,this.bitsPerPixel);if(null!=this.data){var b=
this.data.byteLength,b=null!=b?new Ob(b):null;a.data=b;b=this.data;b=null!=b?new Ob(b):null;a.data.set(b)}else null!=this.__srcImageData?(a.__srcCanvas=window.document.createElement("canvas"),a.__srcContext=a.__srcCanvas.getContext("2d"),a.__srcCanvas.width=this.__srcImageData.width,a.__srcCanvas.height=this.__srcImageData.height,a.__srcImageData=a.__srcContext.createImageData(this.__srcImageData.width,this.__srcImageData.height),b=new Uint8ClampedArray(this.__srcImageData.data),a.__srcImageData.data.set(b)):
null!=this.__srcCanvas?(a.__srcCanvas=window.document.createElement("canvas"),a.__srcContext=a.__srcCanvas.getContext("2d"),a.__srcCanvas.width=this.__srcCanvas.width,a.__srcCanvas.height=this.__srcCanvas.height,a.__srcContext.drawImage(this.__srcCanvas,0,0)):a.__srcImage=this.__srcImage;a.bitsPerPixel=this.bitsPerPixel;a.format=this.format;a.premultiplied=this.premultiplied;a.transparent=this.transparent;return a},get_src:function(){return null!=this.__srcImage?this.__srcImage:this.__srcCanvas},
set_src:function(a){y.__instanceof(a,Image)?this.__srcImage=a:y.__instanceof(a,HTMLCanvasElement)&&(this.__srcCanvas=a,this.__srcContext=this.__srcCanvas.getContext("2d"));return a},get_stride:function(){return 4*this.width},__class__:ld,__properties__:{get_stride:"get_stride",set_src:"set_src",get_src:"get_src"}};var Gb=g["lime.graphics.ImageChannel"]={__ename__:!0,__constructs__:["RED","GREEN","BLUE","ALPHA"]};Gb.RED=["RED",0];Gb.RED.toString=u;Gb.RED.__enum__=Gb;Gb.GREEN=["GREEN",1];Gb.GREEN.toString=
u;Gb.GREEN.__enum__=Gb;Gb.BLUE=["BLUE",2];Gb.BLUE.toString=u;Gb.BLUE.__enum__=Gb;Gb.ALPHA=["ALPHA",3];Gb.ALPHA.toString=u;Gb.ALPHA.__enum__=Gb;var nb=g["lime.graphics.ImageType"]={__ename__:!0,__constructs__:["CANVAS","DATA","FLASH","CUSTOM"]};nb.CANVAS=["CANVAS",0];nb.CANVAS.toString=u;nb.CANVAS.__enum__=nb;nb.DATA=["DATA",1];nb.DATA.toString=u;nb.DATA.__enum__=nb;nb.FLASH=["FLASH",2];nb.FLASH.toString=u;nb.FLASH.__enum__=nb;nb.CUSTOM=["CUSTOM",3];nb.CUSTOM.toString=u;nb.CUSTOM.__enum__=nb;var yb=
g["lime.graphics.RenderContext"]={__ename__:!0,__constructs__:"OPENGL CANVAS DOM FLASH CAIRO CONSOLE CUSTOM NONE".split(" ")};yb.OPENGL=function(a){a=["OPENGL",0,a];a.__enum__=yb;a.toString=u;return a};yb.CANVAS=function(a){a=["CANVAS",1,a];a.__enum__=yb;a.toString=u;return a};yb.DOM=function(a){a=["DOM",2,a];a.__enum__=yb;a.toString=u;return a};yb.FLASH=function(a){a=["FLASH",3,a];a.__enum__=yb;a.toString=u;return a};yb.CAIRO=function(a){a=["CAIRO",4,a];a.__enum__=yb;a.toString=u;return a};yb.CONSOLE=
function(a){a=["CONSOLE",5,a];a.__enum__=yb;a.toString=u;return a};yb.CUSTOM=function(a){a=["CUSTOM",6,a];a.__enum__=yb;a.toString=u;return a};yb.NONE=["NONE",7];yb.NONE.toString=u;yb.NONE.__enum__=yb;var Tj=function(a){this.onRender=new db;this.onContextRestored=new Xj;this.onContextLost=new db;this.window=a;this.backend=new Sj(this);this.window.renderer=this};g["lime.graphics.Renderer"]=Tj;Tj.__name__=["lime","graphics","Renderer"];Tj.prototype={context:null,onContextLost:null,onContextRestored:null,
onRender:null,type:null,window:null,backend:null,create:function(){this.backend.create()},flip:function(){this.backend.flip()},__class__:Tj};var Ja=g["lime.graphics.RendererType"]={__ename__:!0,__constructs__:"OPENGL CANVAS DOM FLASH CAIRO CONSOLE CUSTOM".split(" ")};Ja.OPENGL=["OPENGL",0];Ja.OPENGL.toString=u;Ja.OPENGL.__enum__=Ja;Ja.CANVAS=["CANVAS",1];Ja.CANVAS.toString=u;Ja.CANVAS.__enum__=Ja;Ja.DOM=["DOM",2];Ja.DOM.toString=u;Ja.DOM.__enum__=Ja;Ja.FLASH=["FLASH",3];Ja.FLASH.toString=u;Ja.FLASH.__enum__=
Ja;Ja.CAIRO=["CAIRO",4];Ja.CAIRO.toString=u;Ja.CAIRO.__enum__=Ja;Ja.CONSOLE=["CONSOLE",5];Ja.CONSOLE.toString=u;Ja.CONSOLE.__enum__=Ja;Ja.CUSTOM=["CUSTOM",6];Ja.CUSTOM.toString=u;Ja.CUSTOM.__enum__=Ja;var Zk=function(){};g["lime.graphics.cairo.Cairo"]=Zk;Zk.__name__=["lime","graphics","cairo","Cairo"];Zk.prototype={arc:function(a,b,c,d,e){},clip:function(){},curveTo:function(a,b,c,d,e,f){},fill:function(){},identityMatrix:function(){},lineTo:function(a,b){},moveTo:function(a,b){},newPath:function(){},
paint:function(){},paintWithAlpha:function(a){},popGroupToSource:function(){},pushGroup:function(){},rectangle:function(a,b,c,d){},restore:function(){},save:function(){},setSourceRGB:function(a,b,c){},get_currentPoint:function(){return null},get_hasCurrentPoint:function(){return!1},set_matrix:function(a){return a},set_source:function(a){return a},__class__:Zk,__properties__:{set_source:"set_source",set_matrix:"set_matrix",get_hasCurrentPoint:"get_hasCurrentPoint",get_currentPoint:"get_currentPoint"}};
var $k={};g["lime.graphics.cairo._CairoImageSurface.CairoImageSurface_Impl_"]=$k;$k.__name__=["lime","graphics","cairo","_CairoImageSurface","CairoImageSurface_Impl_"];$k.fromImage=function(a){return null};var gg={};g["lime.graphics.cairo._CairoPattern.CairoPattern_Impl_"]=gg;gg.__name__=["lime","graphics","cairo","_CairoPattern","CairoPattern_Impl_"];gg.__properties__={set_filter:"set_filter"};gg.createForSurface=function(a){return 0};gg.set_filter=function(a,b){return b};var al={};g["lime.graphics.cairo._CairoSurface.CairoSurface_Impl_"]=
al;al.__name__=["lime","graphics","cairo","_CairoSurface","CairoSurface_Impl_"];al.flush=function(a){};var ql=function(){};g["lime.graphics.opengl.GL"]=ql;ql.__name__=["lime","graphics","opengl","GL"];ql.context=null;var U=function(){};g["lime.graphics.utils.ImageCanvasUtil"]=U;U.__name__=["lime","graphics","utils","ImageCanvasUtil"];U.colorTransform=function(a,b,c){U.convertToCanvas(a);U.createImageData(a);ib.colorTransform(a,b,c)};U.convertToCanvas=function(a){var b=a.buffer;null!=b.__srcImage?
(null==b.__srcCanvas&&(U.createCanvas(a,b.__srcImage.width,b.__srcImage.height),b.__srcContext.drawImage(b.__srcImage,0,0)),b.__srcImage=null):null!=b.data&&null==b.__srcCanvas?(U.createCanvas(a,b.width,b.height),U.createImageData(a)):null==b.data&&null!=b.__srcImageData&&(b.data=b.__srcImageData.data)};U.convertToData=function(a){null==a.buffer.data&&(U.convertToCanvas(a),U.sync(a,!1),U.createImageData(a),a.buffer.__srcCanvas=null,a.buffer.__srcContext=null)};U.copyChannel=function(a,b,c,d,e,f){U.convertToCanvas(b);
U.createImageData(b);U.convertToCanvas(a);U.createImageData(a);ib.copyChannel(a,b,c,d,e,f)};U.copyPixels=function(a,b,c,d,e,f,n){null==n&&(n=!1);null==d||d.x>=a.width||d.y>=a.height||null==c||1>c.width||1>c.height||(null!=e&&e.get_transparent()&&(null==f&&(f=new he),b=a.clone(),b.copyChannel(e,new Uc(f.x,f.y,c.width,c.height),new he(c.x,c.y),Gb.ALPHA,Gb.ALPHA)),U.sync(a,!0),n||a.get_transparent()&&b.get_transparent()&&a.buffer.__srcContext.clearRect(d.x+a.offsetX,d.y+a.offsetY,c.width+a.offsetX,c.height+
a.offsetY),U.sync(b,!1),null!=b.buffer.get_src()&&a.buffer.__srcContext.drawImage(b.buffer.get_src(),c.x+b.offsetX|0,c.y+b.offsetY|0,c.width|0,c.height|0,d.x+a.offsetX|0,d.y+a.offsetY|0,c.width|0,c.height|0))};U.createCanvas=function(a,b,c){var d=a.buffer;null==d.__srcCanvas&&(d.__srcCanvas=window.document.createElement("canvas"),d.__srcCanvas.width=b,d.__srcCanvas.height=c,a.get_transparent()?d.__srcContext=d.__srcCanvas.getContext("2d"):(a.get_transparent()||d.__srcCanvas.setAttribute("moz-opaque",
"true"),d.__srcContext=d.__srcCanvas.getContext("2d",{alpha:!1})),d.__srcContext.mozImageSmoothingEnabled=!1,d.__srcContext.msImageSmoothingEnabled=!1,d.__srcContext.imageSmoothingEnabled=!1)};U.createImageData=function(a){a=a.buffer;if(null==a.__srcImageData){null==a.data?a.__srcImageData=a.__srcContext.getImageData(0,0,a.width,a.height):(a.__srcImageData=a.__srcContext.createImageData(a.width,a.height),a.__srcImageData.data.set(a.data));var b=a.__srcImageData.data.buffer,b=null!=b?new Ob(b):null;
a.data=b}};U.fillRect=function(a,b,c,d){U.convertToCanvas(a);U.sync(a,!0);if(0==b.x&&0==b.y&&b.width==a.width&&b.height==a.height&&a.get_transparent()&&0==(c&255))a.buffer.__srcCanvas.width=a.buffer.width;else{var e,f;1==d?(d=c>>16&255,e=c>>8&255,f=c&255,c=a.get_transparent()?c>>24&255:255):(d=c>>24&255,e=c>>16&255,f=c>>8&255,c=a.get_transparent()?c&255:255);a.buffer.__srcContext.fillStyle="rgba("+d+", "+e+", "+f+", "+c/255+")";a.buffer.__srcContext.fillRect(b.x+a.offsetX,b.y+a.offsetY,b.width+a.offsetX,
b.height+a.offsetY)}};U.resize=function(a,b,c){var d=a.buffer;if(null==d.__srcCanvas)U.createCanvas(a,b,c),d.__srcContext.drawImage(d.get_src(),0,0,b,c);else{U.sync(a,!0);var e=d.__srcCanvas;d.__srcCanvas=null;U.createCanvas(a,b,c);d.__srcContext.drawImage(e,0,0,b,c)}};U.setPixels=function(a,b,c,d){U.convertToCanvas(a);U.createImageData(a);ib.setPixels(a,b,c,d)};U.sync=function(a,b){a.dirty&&null!=a.buffer.__srcImageData&&a.type!=nb.DATA&&(a.buffer.__srcContext.putImageData(a.buffer.__srcImageData,
0,0),a.buffer.data=null,a.dirty=!1);b&&(a.buffer.__srcImageData=null,a.buffer.data=null)};var ib=function(){};g["lime.graphics.utils.ImageDataUtil"]=ib;ib.__name__=["lime","graphics","utils","ImageDataUtil"];ib.colorTransform=function(a,b,c){var d=a.buffer.data;if(null!=d){var e=a.buffer.format,f=a.buffer.premultiplied;b=new Wc(a,b);var n=Vc.getAlphaTable(c),g=Vc.getRedTable(c),R=Vc.getGreenTable(c);c=Vc.getBlueTable(c);for(var h,k,l,w=0,m=b.height;w<m;){h=w++;h=b.offset+b.stride*h;for(var q=0,p=
b.width;q<p;){k=q++;k=h+4*k;switch(e){case 2:l=(d[k+2]&255)<<24|(d[k+1]&255)<<16|(d[k]&255)<<8|d[k+3]&255;break;case 0:l=(d[k]&255)<<24|(d[k+1]&255)<<16|(d[k+2]&255)<<8|d[k+3]&255;break;case 1:l=(d[k+1]&255)<<24|(d[k+2]&255)<<16|(d[k+3]&255)<<8|d[k]&255}if(f&&0!=(l&255)&&255!=(l&255)){D.unmult=255/(l&255);var t;t=Math.round((l>>24&255)*D.unmult);t=D.__clamp[t];var u;u=Math.round((l>>16&255)*D.unmult);u=D.__clamp[u];var r=Math.round((l>>8&255)*D.unmult);l=(t&255)<<24|(u&255)<<16|(D.__clamp[r]&255)<<
8|l&255}l=(g[l>>24&255]&255)<<24|(R[l>>16&255]&255)<<16|(c[l>>8&255]&255)<<8|n[l&255]&255;f&&(0==(l&255)?0!=l&&(l=0):255!=(l&255)&&(D.a16=D.__alpha16[l&255],l=((l>>24&255)*D.a16>>16&255)<<24|((l>>16&255)*D.a16>>16&255)<<16|((l>>8&255)*D.a16>>16&255)<<8|l&255));switch(e){case 2:d[k]=l>>8&255;d[k+1]=l>>16&255;d[k+2]=l>>24&255;d[k+3]=l&255;break;case 0:d[k]=l>>24&255;d[k+1]=l>>16&255;d[k+2]=l>>8&255;d[k+3]=l&255;break;case 1:d[k]=l&255,d[k+1]=l>>24&255,d[k+2]=l>>16&255,d[k+3]=l>>8&255}}}a.dirty=!0}};
ib.copyChannel=function(a,b,c,d,e,f){var n;switch(f[1]){case 0:n=0;break;case 1:n=1;break;case 2:n=2;break;case 3:n=3}var g;switch(e[1]){case 0:g=0;break;case 1:g=1;break;case 2:g=2;break;case 3:g=3}e=b.buffer.data;f=a.buffer.data;if(null!=e&&null!=f){c=new Wc(b,c);d=new Wc(a,new Uc(d.x,d.y,c.width,c.height));var R=b.buffer.format,h=a.buffer.format;b=b.buffer.premultiplied;for(var k=a.buffer.premultiplied,l,w,m,q,p=0,t=0,u=d.height;t<u;){w=t++;l=c.offset+c.stride*w;w=d.offset+d.stride*w;for(var r=
0,z=d.width;r<z;){r++;switch(R){case 2:m=(e[l+2]&255)<<24|(e[l+1]&255)<<16|(e[l]&255)<<8|e[l+3]&255;break;case 0:m=(e[l]&255)<<24|(e[l+1]&255)<<16|(e[l+2]&255)<<8|e[l+3]&255;break;case 1:m=(e[l+1]&255)<<24|(e[l+2]&255)<<16|(e[l+3]&255)<<8|e[l]&255}if(b&&0!=(m&255)&&255!=(m&255)){D.unmult=255/(m&255);var x;x=Math.round((m>>24&255)*D.unmult);x=D.__clamp[x];var v;v=Math.round((m>>16&255)*D.unmult);v=D.__clamp[v];var y=Math.round((m>>8&255)*D.unmult);m=(x&255)<<24|(v&255)<<16|(D.__clamp[y]&255)<<8|m&
255}switch(h){case 2:q=(f[w+2]&255)<<24|(f[w+1]&255)<<16|(f[w]&255)<<8|f[w+3]&255;break;case 0:q=(f[w]&255)<<24|(f[w+1]&255)<<16|(f[w+2]&255)<<8|f[w+3]&255;break;case 1:q=(f[w+1]&255)<<24|(f[w+2]&255)<<16|(f[w+3]&255)<<8|f[w]&255}k&&0!=(q&255)&&255!=(q&255)&&(D.unmult=255/(q&255),x=Math.round((q>>24&255)*D.unmult),x=D.__clamp[x],v=Math.round((q>>16&255)*D.unmult),v=D.__clamp[v],y=Math.round((q>>8&255)*D.unmult),q=(x&255)<<24|(v&255)<<16|(D.__clamp[y]&255)<<8|q&255);switch(g){case 0:p=m>>24&255;break;
case 1:p=m>>16&255;break;case 2:p=m>>8&255;break;case 3:p=m&255}switch(n){case 0:q=(p&255)<<24|(q>>16&255)<<16|(q>>8&255)<<8|q&255;p;break;case 1:q=(q>>24&255)<<24|(p&255)<<16|(q>>8&255)<<8|q&255;p;break;case 2:q=(q>>24&255)<<24|(q>>16&255)<<16|(p&255)<<8|q&255;p;break;case 3:q=(q>>24&255)<<24|(q>>16&255)<<16|(q>>8&255)<<8|p&255,p}k&&(0==(q&255)?0!=q&&(q=0):255!=(q&255)&&(D.a16=D.__alpha16[q&255],q=((q>>24&255)*D.a16>>16&255)<<24|((q>>16&255)*D.a16>>16&255)<<16|((q>>8&255)*D.a16>>16&255)<<8|q&255));
switch(h){case 2:f[w]=q>>8&255;f[w+1]=q>>16&255;f[w+2]=q>>24&255;f[w+3]=q&255;break;case 0:f[w]=q>>24&255;f[w+1]=q>>16&255;f[w+2]=q>>8&255;f[w+3]=q&255;break;case 1:f[w]=q&255,f[w+1]=q>>24&255,f[w+2]=q>>16&255,f[w+3]=q>>8&255}l+=4;w+=4}}a.dirty=!0}};ib.copyPixels=function(a,b,c,d,e,f,n){null==n&&(n=!1);var g=b.buffer.data,h=a.buffer.data;if(null!=g&&null!=h){c=new Wc(b,c);d=new Wc(a,new Uc(d.x,d.y,c.width,c.height));var k=b.buffer.format,l=a.buffer.format,q=b.buffer.premultiplied,w=a.buffer.premultiplied,
m;if(n&&b.get_transparent()){var p,t,u,r,I;if(null==e){var x=0;for(b=d.height;x<b;){f=x++;e=c.offset+c.stride*f;f=d.offset+d.stride*f;n=0;for(var z=d.width;n<z;){n++;switch(k){case 2:m=(g[e+2]&255)<<24|(g[e+1]&255)<<16|(g[e]&255)<<8|g[e+3]&255;break;case 0:m=(g[e]&255)<<24|(g[e+1]&255)<<16|(g[e+2]&255)<<8|g[e+3]&255;break;case 1:m=(g[e+1]&255)<<24|(g[e+2]&255)<<16|(g[e+3]&255)<<8|g[e]&255}if(q&&0!=(m&255)&&255!=(m&255)){D.unmult=255/(m&255);var v;v=Math.round((m>>24&255)*D.unmult);v=D.__clamp[v];
var y;y=Math.round((m>>16&255)*D.unmult);y=D.__clamp[y];var B=Math.round((m>>8&255)*D.unmult);m=(v&255)<<24|(y&255)<<16|(D.__clamp[B]&255)<<8|m&255}switch(l){case 2:I=(h[f+2]&255)<<24|(h[f+1]&255)<<16|(h[f]&255)<<8|h[f+3]&255;break;case 0:I=(h[f]&255)<<24|(h[f+1]&255)<<16|(h[f+2]&255)<<8|h[f+3]&255;break;case 1:I=(h[f+1]&255)<<24|(h[f+2]&255)<<16|(h[f+3]&255)<<8|h[f]&255}w&&0!=(I&255)&&255!=(I&255)&&(D.unmult=255/(I&255),v=Math.round((I>>24&255)*D.unmult),v=D.__clamp[v],y=Math.round((I>>16&255)*D.unmult),
y=D.__clamp[y],B=Math.round((I>>8&255)*D.unmult),I=(v&255)<<24|(y&255)<<16|(D.__clamp[B]&255)<<8|I&255);p=(m&255)/255;t=(I&255)/255;u=1-p;r=p+t*u;0==r?I=0:(v=Math.round(((m>>24&255)*p+(I>>24&255)*t*u)/r),v=D.__clamp[v],I=(v&255)<<24|(I>>16&255)<<16|(I>>8&255)<<8|I&255,v,v=Math.round(((m>>16&255)*p+(I>>16&255)*t*u)/r),v=D.__clamp[v],I=(I>>24&255)<<24|(v&255)<<16|(I>>8&255)<<8|I&255,v,v=Math.round(((m>>8&255)*p+(I>>8&255)*t*u)/r),v=D.__clamp[v],I=(I>>24&255)<<24|(I>>16&255)<<16|(v&255)<<8|I&255,v,v=
Math.round(255*r),v=D.__clamp[v],I=(I>>24&255)<<24|(I>>16&255)<<16|(I>>8&255)<<8|v&255,v);w&&(0==(I&255)?0!=I&&(I=0):255!=(I&255)&&(D.a16=D.__alpha16[I&255],I=((I>>24&255)*D.a16>>16&255)<<24|((I>>16&255)*D.a16>>16&255)<<16|((I>>8&255)*D.a16>>16&255)<<8|I&255));switch(l){case 2:h[f]=I>>8&255;h[f+1]=I>>16&255;h[f+2]=I>>24&255;h[f+3]=I&255;break;case 0:h[f]=I>>24&255;h[f+1]=I>>16&255;h[f+2]=I>>8&255;h[f+3]=I&255;break;case 1:h[f]=I&255,h[f+1]=I>>24&255,h[f+2]=I>>16&255,h[f+3]=I>>8&255}e+=4;f+=4}}}else{null==
f&&(f=new he);b=e.buffer.data;n=e.buffer.format;z=e.buffer.premultiplied;v=new Wc(e,new Uc(f.x,f.y,d.width,d.height));var A;y=0;for(B=v.height;y<B;){A=y++;e=c.offset+c.stride*A;f=d.offset+d.stride*A;A=v.offset+v.stride*A;for(var F=0,E=v.width;F<E;){F++;switch(k){case 2:m=(g[e+2]&255)<<24|(g[e+1]&255)<<16|(g[e]&255)<<8|g[e+3]&255;break;case 0:m=(g[e]&255)<<24|(g[e+1]&255)<<16|(g[e+2]&255)<<8|g[e+3]&255;break;case 1:m=(g[e+1]&255)<<24|(g[e+2]&255)<<16|(g[e+3]&255)<<8|g[e]&255}q&&0!=(m&255)&&255!=(m&
255)&&(D.unmult=255/(m&255),r=Math.round((m>>24&255)*D.unmult),r=D.__clamp[r],p=Math.round((m>>16&255)*D.unmult),p=D.__clamp[p],t=Math.round((m>>8&255)*D.unmult),m=(r&255)<<24|(p&255)<<16|(D.__clamp[t]&255)<<8|m&255);switch(l){case 2:I=(h[f+2]&255)<<24|(h[f+1]&255)<<16|(h[f]&255)<<8|h[f+3]&255;break;case 0:I=(h[f]&255)<<24|(h[f+1]&255)<<16|(h[f+2]&255)<<8|h[f+3]&255;break;case 1:I=(h[f+1]&255)<<24|(h[f+2]&255)<<16|(h[f+3]&255)<<8|h[f]&255}w&&0!=(I&255)&&255!=(I&255)&&(D.unmult=255/(I&255),r=Math.round((I>>
24&255)*D.unmult),r=D.__clamp[r],p=Math.round((I>>16&255)*D.unmult),p=D.__clamp[p],t=Math.round((I>>8&255)*D.unmult),I=(r&255)<<24|(p&255)<<16|(D.__clamp[t]&255)<<8|I&255);switch(n){case 2:x=(b[A+2]&255)<<24|(b[A+1]&255)<<16|(b[A]&255)<<8|b[A+3]&255;break;case 0:x=(b[A]&255)<<24|(b[A+1]&255)<<16|(b[A+2]&255)<<8|b[A+3]&255;break;case 1:x=(b[A+1]&255)<<24|(b[A+2]&255)<<16|(b[A+3]&255)<<8|b[A]&255}z&&0!=(x&255)&&255!=(x&255)&&(D.unmult=255/(x&255),r=Math.round((x>>24&255)*D.unmult),r=D.__clamp[r],p=
Math.round((x>>16&255)*D.unmult),p=D.__clamp[p],t=Math.round((x>>8&255)*D.unmult),x=(r&255)<<24|(p&255)<<16|(D.__clamp[t]&255)<<8|x&255);p=(x&255)/255;t=(I&255)/255;u=1-p;r=p+t*u;if(0==r)I=0;else{var C;C=Math.round(((m>>24&255)*p+(I>>24&255)*t*u)/r);C=D.__clamp[C];I=(C&255)<<24|(I>>16&255)<<16|(I>>8&255)<<8|I&255;C;C=Math.round(((m>>16&255)*p+(I>>16&255)*t*u)/r);C=D.__clamp[C];I=(I>>24&255)<<24|(C&255)<<16|(I>>8&255)<<8|I&255;C;p=Math.round(((m>>8&255)*p+(I>>8&255)*t*u)/r);p=D.__clamp[p];I=(I>>24&
255)<<24|(I>>16&255)<<16|(p&255)<<8|I&255;p;r=Math.round(255*r);r=D.__clamp[r];I=(I>>24&255)<<24|(I>>16&255)<<16|(I>>8&255)<<8|r&255;r}w&&(0==(I&255)?0!=I&&(I=0):255!=(I&255)&&(D.a16=D.__alpha16[I&255],I=((I>>24&255)*D.a16>>16&255)<<24|((I>>16&255)*D.a16>>16&255)<<16|((I>>8&255)*D.a16>>16&255)<<8|I&255));switch(l){case 2:h[f]=I>>8&255;h[f+1]=I>>16&255;h[f+2]=I>>24&255;h[f+3]=I&255;break;case 0:h[f]=I>>24&255;h[f+1]=I>>16&255;h[f+2]=I>>8&255;h[f+3]=I&255;break;case 1:h[f]=I&255,h[f+1]=I>>24&255,h[f+
2]=I>>16&255,h[f+3]=I>>8&255}e+=4;f+=4}}}}else for(I=0,x=d.height;I<x;)for(f=I++,e=c.offset+c.stride*f,f=d.offset+d.stride*f,b=0,n=d.width;b<n;){b++;switch(k){case 2:m=(g[e+2]&255)<<24|(g[e+1]&255)<<16|(g[e]&255)<<8|g[e+3]&255;break;case 0:m=(g[e]&255)<<24|(g[e+1]&255)<<16|(g[e+2]&255)<<8|g[e+3]&255;break;case 1:m=(g[e+1]&255)<<24|(g[e+2]&255)<<16|(g[e+3]&255)<<8|g[e]&255}q&&0!=(m&255)&&255!=(m&255)&&(D.unmult=255/(m&255),z=Math.round((m>>24&255)*D.unmult),z=D.__clamp[z],v=Math.round((m>>16&255)*
D.unmult),v=D.__clamp[v],y=Math.round((m>>8&255)*D.unmult),m=(z&255)<<24|(v&255)<<16|(D.__clamp[y]&255)<<8|m&255);w&&(0==(m&255)?0!=m&&(m=0):255!=(m&255)&&(D.a16=D.__alpha16[m&255],m=((m>>24&255)*D.a16>>16&255)<<24|((m>>16&255)*D.a16>>16&255)<<16|((m>>8&255)*D.a16>>16&255)<<8|m&255));switch(l){case 2:h[f]=m>>8&255;h[f+1]=m>>16&255;h[f+2]=m>>24&255;h[f+3]=m&255;break;case 0:h[f]=m>>24&255;h[f+1]=m>>16&255;h[f+2]=m>>8&255;h[f+3]=m&255;break;case 1:h[f]=m&255,h[f+1]=m>>24&255,h[f+2]=m>>16&255,h[f+3]=
m>>8&255}e+=4;f+=4}a.dirty=!0}};ib.fillRect=function(a,b,c,d){switch(d){case 1:c=(c>>16&255)<<24|(c>>8&255)<<16|(c&255)<<8|c>>24&255;break;case 2:c=(c>>8&255)<<24|(c>>16&255)<<16|(c>>24&255)<<8|c&255;break}a.get_transparent()||(c=(c>>24&255)<<24|(c>>16&255)<<16|(c>>8&255)<<8|255,255);d=a.buffer.data;if(null!=d){var e=a.buffer.format,f=a.buffer.premultiplied;b=new Wc(a,b);for(var n,g=0,h=b.height;g<h;){n=g++;n=b.offset+b.stride*n;for(var k=0,l=b.width;k<l;){var m=k++,m=n+4*m;f&&(0==(c&255)?0!=c&&(c=
0):255!=(c&255)&&(D.a16=D.__alpha16[c&255],c=((c>>24&255)*D.a16>>16&255)<<24|((c>>16&255)*D.a16>>16&255)<<16|((c>>8&255)*D.a16>>16&255)<<8|c&255));switch(e){case 2:d[m]=c>>8&255;d[m+1]=c>>16&255;d[m+2]=c>>24&255;d[m+3]=c&255;break;case 0:d[m]=c>>24&255;d[m+1]=c>>16&255;d[m+2]=c>>8&255;d[m+3]=c&255;break;case 1:d[m]=c&255,d[m+1]=c>>24&255,d[m+2]=c>>16&255,d[m+3]=c>>8&255}}}a.dirty=!0}};ib.multiplyAlpha=function(a){var b=a.buffer.data;if(null!=b&&a.buffer.transparent){for(var c=a.buffer.format,d=b.length/
4|0,e,f=0;f<d;){var n=f++,g=4*n;switch(c){case 2:e=(b[g+2]&255)<<24|(b[g+1]&255)<<16|(b[g]&255)<<8|b[g+3]&255;break;case 0:e=(b[g]&255)<<24|(b[g+1]&255)<<16|(b[g+2]&255)<<8|b[g+3]&255;break;case 1:e=(b[g+1]&255)<<24|(b[g+2]&255)<<16|(b[g+3]&255)<<8|b[g]&255}n*=4;0==(e&255)?0!=e&&(e=0):255!=(e&255)&&(D.a16=D.__alpha16[e&255],e=((e>>24&255)*D.a16>>16&255)<<24|((e>>16&255)*D.a16>>16&255)<<16|((e>>8&255)*D.a16>>16&255)<<8|e&255);switch(c){case 2:b[n]=e>>8&255;b[n+1]=e>>16&255;b[n+2]=e>>24&255;b[n+3]=
e&255;break;case 0:b[n]=e>>24&255;b[n+1]=e>>16&255;b[n+2]=e>>8&255;b[n+3]=e&255;break;case 1:b[n]=e&255,b[n+1]=e>>24&255,b[n+2]=e>>16&255,b[n+3]=e>>8&255}}a.buffer.premultiplied=!0;a.dirty=!0}};ib.resize=function(a,b,c){var d=a.buffer;if(d.width!=b||d.height!=c){var e=b*c*4,e=null!=e?new Ob(e):null,e=new ld(e,b,c),f=a.width,n=a.height;a=a.get_data();for(var g=e.data,h,k,m,l,w,q,p,t,r,u=0;u<c;)for(var v=u++,x=0;x<b;){w=x++;t=(w+.5)/b*f-.5;r=(v+.5)/c*n-.5;q=t|0;p=r|0;h=4*(p*f+q);k=q<f-1?h+4:h;m=p<n-
1?h+4*f:h;l=k!=h?m+4:m;w=4*(v*b+w);q=t-q;p=r-p;r=1-q;t=1-p;var z=K["int"]((Ga.toFloat(a[h])*r+Ga.toFloat(a[k])*q)*t+(Ga.toFloat(a[m])*r+Ga.toFloat(a[l])*q)*p);g[w]=z;z=K["int"]((Ga.toFloat(a[h+1])*r+Ga.toFloat(a[k+1])*q)*t+(Ga.toFloat(a[m+1])*r+Ga.toFloat(a[l+1])*q)*p);g[w+1]=z;q=K["int"]((Ga.toFloat(a[h+2])*r+Ga.toFloat(a[k+2])*q)*t+(Ga.toFloat(a[m+2])*r+Ga.toFloat(a[l+2])*q)*p);g[w+2]=q;g[w+3]=0==a[k+3]||0==a[m+3]||0==a[l+3]?0:a[h+3]}d.data=e.data;d.width=b;d.height=c}};ib.setFormat=function(a,
b){var c=a.buffer.data;if(null!=c){var d,e=c.length/4|0,f,n,g,h,k,m,l,w,q,p,r,t;switch(a.get_format()){case 0:f=0;n=1;g=2;h=3;break;case 1:f=1;n=2;g=3;h=0;break;case 2:f=2,n=1,g=0,h=3}switch(b){case 0:k=0;m=1;l=2;w=3;break;case 1:k=1;m=2;l=3;w=0;break;case 2:k=2,m=1,l=0,w=3}for(var u=0;u<e;)d=4*u++,q=c[d+f],p=c[d+n],r=c[d+g],t=c[d+h],c[d+k]=q,c[d+m]=p,c[d+l]=r,c[d+w]=t;a.buffer.format=b;a.dirty=!0}};ib.setPixels=function(a,b,c,d){if(null!=a.buffer.data){var e=a.buffer.data,f=a.buffer.format,n=a.buffer.premultiplied;
b=new Wc(a,b);for(var g,h,k=a.get_transparent(),m=0,l=b.height;m<l;){g=m++;g=b.offset+b.stride*g;for(var w=0,q=b.width;w<q;){var p=w++;h=c.readUnsignedInt();switch(d){case 1:var r=0;h=r=(h>>16&255)<<24|(h>>8&255)<<16|(h&255)<<8|h>>24&255;break;case 2:r=0;h=r=(h>>8&255)<<24|(h>>16&255)<<16|(h>>24&255)<<8|h&255;break}k||(h=(h>>24&255)<<24|(h>>16&255)<<16|(h>>8&255)<<8|255,255);p=g+4*p;n&&(0==(h&255)?0!=h&&(h=0):255!=(h&255)&&(D.a16=D.__alpha16[h&255],h=((h>>24&255)*D.a16>>16&255)<<24|((h>>16&255)*D.a16>>
16&255)<<16|((h>>8&255)*D.a16>>16&255)<<8|h&255));switch(f){case 2:e[p]=h>>8&255;e[p+1]=h>>16&255;e[p+2]=h>>24&255;e[p+3]=h&255;break;case 0:e[p]=h>>24&255;e[p+1]=h>>16&255;e[p+2]=h>>8&255;e[p+3]=h&255;break;case 1:e[p]=h&255,e[p+1]=h>>24&255,e[p+2]=h>>16&255,e[p+3]=h>>8&255}}}a.dirty=!0}};ib.unmultiplyAlpha=function(a){var b=a.buffer.data;if(null!=b){for(var c=a.buffer.format,d=b.length/4|0,e,f=0;f<d;){var n=f++,g=4*n;switch(c){case 2:e=(b[g+2]&255)<<24|(b[g+1]&255)<<16|(b[g]&255)<<8|b[g+3]&255;
break;case 0:e=(b[g]&255)<<24|(b[g+1]&255)<<16|(b[g+2]&255)<<8|b[g+3]&255;break;case 1:e=(b[g+1]&255)<<24|(b[g+2]&255)<<16|(b[g+3]&255)<<8|b[g]&255}if(0!=(e&255)&&255!=(e&255)){D.unmult=255/(e&255);var g=Math.round((e>>24&255)*D.unmult),g=D.__clamp[g],h;h=Math.round((e>>16&255)*D.unmult);h=D.__clamp[h];var k=Math.round((e>>8&255)*D.unmult);e=(g&255)<<24|(h&255)<<16|(D.__clamp[k]&255)<<8|e&255}n*=4;switch(c){case 2:b[n]=e>>8&255;b[n+1]=e>>16&255;b[n+2]=e>>24&255;b[n+3]=e&255;break;case 0:b[n]=e>>24&
255;b[n+1]=e>>16&255;b[n+2]=e>>8&255;b[n+3]=e&255;break;case 1:b[n]=e&255,b[n+1]=e>>24&255,b[n+2]=e>>16&255,b[n+3]=e>>8&255}}a.buffer.premultiplied=!1;a.dirty=!0}};var Wc=function(a,b){this.image=a;null==b?this.rect=a.get_rect():(0>b.x&&(b.x=0),0>b.y&&(b.y=0),b.x+b.width>a.width&&(b.width=a.width-b.x),b.y+b.height>a.height&&(b.height=a.height-b.y),0>b.width&&(b.width=0),0>b.height&&(b.height=0),this.rect=b);this.stride=a.buffer.get_stride();this.x=Math.ceil(this.rect.x);this.y=Math.ceil(this.rect.y);
this.width=Math.floor(this.rect.width);this.height=Math.floor(this.rect.height);this.offset=this.stride*(this.y+a.offsetY)+4*(this.x+a.offsetX)};g["lime.graphics.utils._ImageDataUtil.ImageDataView"]=Wc;Wc.__name__=["lime","graphics","utils","_ImageDataUtil","ImageDataView"];Wc.prototype={x:null,y:null,height:null,width:null,image:null,offset:null,rect:null,stride:null,__class__:Wc};var Vc={};g["lime.math._ColorMatrix.ColorMatrix_Impl_"]=Vc;Vc.__name__=["lime","math","_ColorMatrix","ColorMatrix_Impl_"];
Vc.getAlphaTable=function(a){var b;b=new Ob(256);var c=a[18];a=255*a[19];for(var d,e=0;256>e;){var f=e++;d=Math.floor(f*c+a);255<d&&(d=255);0>d&&(d=0);b[f]=d}return b};Vc.getBlueTable=function(a){var b;b=new Ob(256);var c=a[12];a=255*a[14];for(var d,e=0;256>e;){var f=e++;d=Math.floor(f*c+a);255<d&&(d=255);0>d&&(d=0);b[f]=d}return b};Vc.getGreenTable=function(a){var b;b=new Ob(256);var c=a[6];a=255*a[9];for(var d,e=0;256>e;){var f=e++;d=Math.floor(f*c+a);255<d&&(d=255);0>d&&(d=0);b[f]=d}return b};
Vc.getRedTable=function(a){var b;b=new Ob(256);var c=a[0];a=255*a[4];for(var d,e=0;256>e;){var f=e++;d=Math.floor(f*c+a);255<d&&(d=255);0>d&&(d=0);b[f]=d}return b};Vc.__toFlashColorTransform=function(a){return null};var ni=function(a,b,c,d,e,f){null==f&&(f=0);null==e&&(e=0);null==d&&(d=1);null==c&&(c=0);null==b&&(b=0);null==a&&(a=1);this.a=a;this.b=b;this.c=c;this.d=d;this.tx=e;this.ty=f};g["lime.math.Matrix3"]=ni;ni.__name__=["lime","math","Matrix3"];ni.prototype={a:null,b:null,c:null,d:null,tx:null,
ty:null,__class__:ni};var Uc=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this.x=a;this.y=b;this.width=c;this.height=d};g["lime.math.Rectangle"]=Uc;Uc.__name__=["lime","math","Rectangle"];Uc.prototype={height:null,width:null,x:null,y:null,offset:function(a,b){this.x+=a;this.y+=b},__toFlashRectangle:function(){return null},__class__:Uc};var he=function(a,b){null==b&&(b=0);null==a&&(a=0);this.x=a;this.y=b};g["lime.math.Vector2"]=he;he.__name__=["lime","math","Vector2"];
he.prototype={x:null,y:null,offset:function(a,b){this.x+=a;this.y+=b},__toFlashPoint:function(){return null},__class__:he};var Cl=function(){};g["lime.math.Vector4"]=Cl;Cl.__name__=["lime","math","Vector4"];var D={};g["lime.math.color._RGBA.RGBA_Impl_"]=D;D.__name__=["lime","math","color","_RGBA","RGBA_Impl_"];D.__alpha16=null;D.__clamp=null;D.a16=null;D.unmult=null;var mi=function(a){this.onSecurityError=new ii;this.onProgress=new Yj;this.onOpen=new ji;this.onIOError=new ii;this.onHTTPStatus=new Zj;
this.onComplete=new ji;this.bytesTotal=this.bytesLoaded=0;this.set_dataFormat(fc.TEXT);null!=a&&this.load(a)};g["lime.net.URLLoader"]=mi;mi.__name__=["lime","net","URLLoader"];mi.prototype={bytesLoaded:null,bytesTotal:null,data:null,dataFormat:null,onComplete:null,onHTTPStatus:null,onIOError:null,onOpen:null,onProgress:null,onSecurityError:null,getData:function(){return null},load:function(a){this.requestUrl(a.url,a.method,a.data,a.formatRequestHeaders())},registerEvents:function(a){var b=this,c=
this;"undefined"!=typeof XMLHttpRequestProgressEvent&&a.addEventListener("progress",k(this,this.__onProgress),!1);a.onreadystatechange=function(){if(4==a.readyState){var d;try{d=a.status}catch(e){e instanceof m&&(e=e.val),d=null}void 0==d&&(d=null);null!=d&&c.onHTTPStatus.dispatch(b,d);null!=d&&200<=d&&400>d?c.__onData(a.response):null==d?c.onIOError.dispatch(b,"Failed to connect or resolve host"):12029==d?c.onIOError.dispatch(b,"Failed to connect to host"):12007==d?c.onIOError.dispatch(b,"Unknown host"):
0==d?(c.onIOError.dispatch(b,"Unable to make request (may be blocked due to cross-domain permissions)"),c.onSecurityError.dispatch(b,"Unable to make request (may be blocked due to cross-domain permissions)")):c.onIOError.dispatch(b,"Http Error #"+a.status)}}},requestUrl:function(a,b,c,d){var e=new XMLHttpRequest;this.registerEvents(e);var f="";if(y.__instanceof(c,Ta))switch(this.dataFormat[1]){case 0:f=c.data.buffer;break;default:f=c.readUTFBytes(c.length)}else if(y.__instanceof(c,rl))for(var n=0,
g=G.fields(c);n<g.length;){var h=g[n];++n;0!=f.length&&(f+="&");f+=encodeURIComponent(h)+"="+P.urlEncode(G.field(c,h))}else null!=c&&(f=c.toString());try{if("GET"==b&&null!=f&&""!=f){var k=1>=a.split("?").length;e.open("GET",a+(k?"?":"&")+K.string(f),!0);f=""}else e.open(y.__cast(b,String),a,!0)}catch(l){l instanceof m&&(l=l.val);this.onIOError.dispatch(this,l.toString());return}switch(this.dataFormat[1]){case 0:e.responseType="arraybuffer"}for(a=0;a<d.length;)b=d[a],++a,e.setRequestHeader(b.name,
b.value);e.send(f);this.onOpen.dispatch(this);this.getData=function(){return null!=e.response?e.response:e.responseText}},__onData:function(a){a=this.getData();switch(this.dataFormat[1]){case 0:this.data=Ta.__ofBuffer(a);break;default:this.data=K.string(a)}this.onComplete.dispatch(this)},__onProgress:function(a){this.bytesLoaded=a.loaded;this.bytesTotal=a.total;this.onProgress.dispatch(this,this.bytesLoaded,this.bytesTotal)},set_dataFormat:function(a){a!=fc.BINARY||G.hasField(window,"ArrayBuffer")?
this.dataFormat=a:this.dataFormat=fc.TEXT;return this.dataFormat},__class__:mi,__properties__:{set_dataFormat:"set_dataFormat"}};var fc=g["lime.net.URLLoaderDataFormat"]={__ename__:!0,__constructs__:["BINARY","TEXT","VARIABLES"]};fc.BINARY=["BINARY",0];fc.BINARY.toString=u;fc.BINARY.__enum__=fc;fc.TEXT=["TEXT",1];fc.TEXT.toString=u;fc.TEXT.__enum__=fc;fc.VARIABLES=["VARIABLES",2];fc.VARIABLES.toString=u;fc.VARIABLES.__enum__=fc;var dk=function(a){null!=a&&(this.url=a);this.requestHeaders=[];this.method=
"GET";this.contentType=null};g["lime.net.URLRequest"]=dk;dk.__name__=["lime","net","URLRequest"];dk.prototype={contentType:null,data:null,method:null,requestHeaders:null,url:null,formatRequestHeaders:function(){var a=this.requestHeaders;null==a&&(a=[]);if("GET"==this.method||null==this.data)return a;if("string"==typeof this.data||y.__instanceof(this.data,Ta))a=a.slice(),a.push(new fk("Content-Type",null!=this.contentType?this.contentType:"application/x-www-form-urlencoded"));return a},__class__:dk};
var fk=function(a,b){null==b&&(b="");null==a&&(a="");this.name=a;this.value=b};g["lime.net.URLRequestHeader"]=fk;fk.__name__=["lime","net","URLRequestHeader"];fk.prototype={name:null,value:null,__class__:fk};var rl=function(){};g["lime.net.URLVariables"]=rl;rl.__name__=["lime","net","URLVariables"];var gk=function(){this.onError=new eg;this.onComplete=new eg;this.doWork=new eg};g["lime.system.BackgroundWorker"]=gk;gk.__name__=["lime","system","BackgroundWorker"];gk.prototype={canceled:null,doWork:null,
onComplete:null,onError:null,__runMessage:null,run:function(a){this.canceled=!1;this.__runMessage=a;this.__doWork()},sendComplete:function(a){this.canceled||(this.canceled=!0,this.onComplete.dispatch(a))},sendError:function(a){this.canceled||(this.canceled=!0,this.onError.dispatch(a))},__doWork:function(){this.doWork.dispatch(this.__runMessage)},__class__:gk};var $e=function(){};g["lime.system.Clipboard"]=$e;$e.__name__=["lime","system","Clipboard"];$e.__properties__={set_text:"set_text",get_text:"get_text"};
$e.get_text=function(){return null};$e.set_text=function(a){return null};var oi=function(){};g["lime.system.System"]=oi;oi.__name__=["lime","system","System"];oi.embed=cd.lime.embed=function(a,b,c,d,e){var f=null,f="string"==typeof a?window.document.getElementById(y.__cast(a,String)):null==a?window.document.createElement("div"):a;a=null;null!=d&&(d=P.replace(d,"#",""),a=-1<d.indexOf("0x")?K.parseInt(d):K.parseInt("0x"+d));null==b&&(b=0);null==c&&(c=0);Ha.config.windows[0].background=a;Ha.config.windows[0].element=
f;Ha.config.windows[0].width=b;Ha.config.windows[0].height=c;Ha.config.assetsPrefix=e;Ha.create()};oi.getTimer=function(){return(new Date).getTime()};var bl=function(){};g["lime.text.Font"]=bl;bl.__name__=["lime","text","Font"];var cc=function(a){this.onDisconnect=new db;this.onButtonUp=new ki;this.onButtonDown=new ki;this.onAxisMove=new ak;this.id=a;this.connected=!0};g["lime.ui.Gamepad"]=cc;cc.__name__=["lime","ui","Gamepad"];cc.prototype={connected:null,id:null,onAxisMove:null,onButtonDown:null,
onButtonUp:null,onDisconnect:null,__class__:cc};var ei=function(){this.onTrackballMove=new gi;this.onHatMove=new Uj;this.onDisconnect=new db;this.onButtonUp=new ge;this.onButtonDown=new ge;this.onAxisMove=new gi};g["lime.ui.Joystick"]=ei;ei.__name__=["lime","ui","Joystick"];ei.prototype={onAxisMove:null,onButtonDown:null,onButtonUp:null,onDisconnect:null,onHatMove:null,onTrackballMove:null,__class__:ei};var tb={};g["lime.ui._KeyModifier.KeyModifier_Impl_"]=tb;tb.__name__=["lime","ui","_KeyModifier",
"KeyModifier_Impl_"];tb.__properties__={get_shiftKey:"get_shiftKey",get_metaKey:"get_metaKey",get_ctrlKey:"get_ctrlKey",get_altKey:"get_altKey"};tb.get_altKey=function(a){return 0<(a&256)||0<(a&512)};tb.get_ctrlKey=function(a){return 0<(a&64)||0<(a&128)};tb.get_metaKey=function(a){return 0<(a&1024)||0<(a&2048)};tb.get_shiftKey=function(a){return 0<(a&1)||0<(a&2)};var pi=function(){};g["lime.ui.Mouse"]=pi;pi.__name__=["lime","ui","Mouse"];pi.__properties__={set_cursor:"set_cursor"};pi.set_cursor=function(a){return Id.set_cursor(a)};
var ca=g["lime.ui.MouseCursor"]={__ename__:!0,__constructs__:"ARROW CROSSHAIR DEFAULT MOVE POINTER RESIZE_NESW RESIZE_NS RESIZE_NWSE RESIZE_WE TEXT WAIT WAIT_ARROW CUSTOM".split(" ")};ca.ARROW=["ARROW",0];ca.ARROW.toString=u;ca.ARROW.__enum__=ca;ca.CROSSHAIR=["CROSSHAIR",1];ca.CROSSHAIR.toString=u;ca.CROSSHAIR.__enum__=ca;ca.DEFAULT=["DEFAULT",2];ca.DEFAULT.toString=u;ca.DEFAULT.__enum__=ca;ca.MOVE=["MOVE",3];ca.MOVE.toString=u;ca.MOVE.__enum__=ca;ca.POINTER=["POINTER",4];ca.POINTER.toString=u;ca.POINTER.__enum__=
ca;ca.RESIZE_NESW=["RESIZE_NESW",5];ca.RESIZE_NESW.toString=u;ca.RESIZE_NESW.__enum__=ca;ca.RESIZE_NS=["RESIZE_NS",6];ca.RESIZE_NS.toString=u;ca.RESIZE_NS.__enum__=ca;ca.RESIZE_NWSE=["RESIZE_NWSE",7];ca.RESIZE_NWSE.toString=u;ca.RESIZE_NWSE.__enum__=ca;ca.RESIZE_WE=["RESIZE_WE",8];ca.RESIZE_WE.toString=u;ca.RESIZE_WE.__enum__=ca;ca.TEXT=["TEXT",9];ca.TEXT.toString=u;ca.TEXT.__enum__=ca;ca.WAIT=["WAIT",10];ca.WAIT.toString=u;ca.WAIT.__enum__=ca;ca.WAIT_ARROW=["WAIT_ARROW",11];ca.WAIT_ARROW.toString=
u;ca.WAIT_ARROW.__enum__=ca;ca.CUSTOM=["CUSTOM",12];ca.CUSTOM.toString=u;ca.CUSTOM.__enum__=ca;var yc=function(a,b,c,d,e,f,n){this.x=a;this.y=b;this.id=c;this.dx=d;this.dy=e;this.pressure=f;this.device=n};g["lime.ui.Touch"]=yc;yc.__name__=["lime","ui","Touch"];yc.prototype={device:null,dx:null,dy:null,id:null,pressure:null,x:null,y:null,__class__:yc};var af=function(a){this.onTextInput=new Wj;this.onTextEdit=new Vj;this.onRestore=new db;this.onResize=new hi;this.onMove=new Ze;this.onMouseWheel=new Ze;
this.onMouseUp=new fi;this.onMouseMoveRelative=new Ze;this.onMouseMove=new Ze;this.onMouseDown=new fi;this.onMinimize=new db;this.onLeave=new db;this.onKeyUp=new li;this.onKeyDown=new li;this.onFullscreen=new db;this.onFocusOut=new db;this.onFocusIn=new db;this.onEnter=new db;this.onDeactivate=new db;this.onCreate=new db;this.onClose=new db;this.onActivate=new db;this.config=a;this.__height=this.__width=0;this.__fullscreen=!1;this.__scale=1;this.__y=this.__x=0;this.__title="";this.id=-1;null!=a&&
(Object.prototype.hasOwnProperty.call(a,"width")&&(this.__width=a.width),Object.prototype.hasOwnProperty.call(a,"height")&&(this.__height=a.height),Object.prototype.hasOwnProperty.call(a,"x")&&(this.__x=a.x),Object.prototype.hasOwnProperty.call(a,"y")&&(this.__y=a.y),Object.prototype.hasOwnProperty.call(a,"fullscreen")&&(this.__fullscreen=a.fullscreen),Object.prototype.hasOwnProperty.call(a,"title")&&(this.__title=a.title));this.backend=new sa(this)};g["lime.ui.Window"]=af;af.__name__=["lime","ui",
"Window"];af.prototype={application:null,config:null,id:null,onActivate:null,onClose:null,onCreate:null,onDeactivate:null,onEnter:null,onFocusIn:null,onFocusOut:null,onFullscreen:null,onKeyDown:null,onKeyUp:null,onLeave:null,onMinimize:null,onMouseDown:null,onMouseMove:null,onMouseMoveRelative:null,onMouseUp:null,onMouseWheel:null,onMove:null,onResize:null,onRestore:null,onTextEdit:null,onTextInput:null,renderer:null,stage:null,backend:null,__fullscreen:null,__height:null,__scale:null,__title:null,
__width:null,__x:null,__y:null,close:function(){this.backend.close()},create:function(a){this.application=a;this.backend.create(a);null!=this.renderer&&this.renderer.create()},resize:function(a,b){this.backend.resize(a,b);this.__width=a;this.__height=b},set_fullscreen:function(a){return this.__fullscreen=this.backend.setFullscreen(a)},set_height:function(a){this.resize(this.__width,a);return this.__height},set_width:function(a){this.resize(a,this.__height);return this.__width},__class__:af,__properties__:{set_width:"set_width",
set_height:"set_height",set_fullscreen:"set_fullscreen"}};var Ta=function(a){null==a&&(a=0);this.littleEndian=!1;this.length=this.position=this.allocated=0;0<a&&(this.allocated=a);this.___resizeBuffer(this.allocated);this.set_length(this.allocated)};g["lime.utils.ByteArray"]=Ta;Ta.__name__=["lime","utils","ByteArray"];Ta.fromBytes=function(a){var b=new Ta;b.byteView=new Ob(a.b.bufferValue);b.set_length(b.byteView.length);b.allocated=b.length;return b};Ta.__ofBuffer=function(a){var b=new Ta;b.set_length(b.allocated=
a.byteLength);b.data=new Dl(a);b.byteView=new Ob(a);return b};Ta.prototype={length:null,position:null,allocated:null,littleEndian:null,byteView:null,data:null,readUnsignedByte:function(){return this.data.getUint8(this.position++)},readUnsignedInt:function(){var a=this.data.getUint32(this.position,this.littleEndian);this.position+=4;return a},readUTFBytes:function(a){var b="";for(a=this.position+a;this.position<a;){var c=this.data,d=c.getUint8(this.position++);if(128>d){if(0==d)break;b+=String.fromCharCode(d)}else if(224>
d)b+=String.fromCharCode((d&63)<<6|c.getUint8(this.position++)&127);else if(240>d)var e=c.getUint8(this.position++),b=b+String.fromCharCode((d&31)<<12|(e&127)<<6|c.getUint8(this.position++)&127);else var e=c.getUint8(this.position++),f=c.getUint8(this.position++),b=b+String.fromCharCode((d&15)<<18|(e&127)<<12|f<<6&127|c.getUint8(this.position++)&127)}return b},writeByte:function(a){var b=this.position+1;this.length<b&&(this.allocated<b?this.___resizeBuffer(this.allocated=K["int"](Math.max(b,2*this.allocated))):
this.allocated>2*b&&this.___resizeBuffer(this.allocated=b),this.length=b,b);this.data.setInt8(this.position,a);this.position+=1},writeUnsignedInt:function(a){var b=this.position+4;this.length<b&&(this.allocated<b?this.___resizeBuffer(this.allocated=K["int"](Math.max(b,2*this.allocated))):this.allocated>2*b&&this.___resizeBuffer(this.allocated=b),this.length=b,b);this.data.setUint32(this.position,a,this.littleEndian);this.position+=4},writeUTFBytes:function(a){for(var b=0,c=a.length;b<c;){var d=b++,
d=a.charCodeAt(d);127>=d?this.writeByte(d):(2047>=d?this.writeByte(192|d>>6):(65535>=d?this.writeByte(224|d>>12):(this.writeByte(240|d>>18),this.writeByte(128|d>>12&63)),this.writeByte(128|d>>6&63)),this.writeByte(128|d&63))}},__get:function(a){return this.data.getInt8(a)},___resizeBuffer:function(a){var b=this.byteView,c=new Ob(a);null!=b&&(b.length<=a?c.set(b):c.set(b.subarray(0,a)));this.byteView=c;this.data=new Dl(c.buffer)},__set:function(a,b){this.data.setUint8(a,b)},set_length:function(a){this.allocated<
a?this.___resizeBuffer(this.allocated=K["int"](Math.max(a,2*this.allocated))):this.allocated>2*a&&this.___resizeBuffer(this.allocated=a);return this.length=a},__class__:Ta,__properties__:{set_length:"set_length"}};var hk=function(){this.eventDispatcher=new ba};g["mc.system.Dispatcher"]=hk;hk.__name__=["mc","system","Dispatcher"];hk.prototype={eventDispatcher:null,dispatchEventWith:function(a,b,c){null==c&&(c=!1);this.eventDispatcher.dispatchEvent(new fb(a,b,c))},addEventListener:function(a,b,c,d){null==
d&&(d=0);null==c&&(c=!1);this.eventDispatcher.hasEventListener(a)&&this.eventDispatcher.removeEventListener(a,b);this.eventDispatcher.addEventListener(a,b,c,d)},removeEventListener:function(a,b){this.eventDispatcher.removeEventListener(a,b)},fire:function(a,b){this.dispatchEventWith(a,b)},listen:function(a,b){this.eventDispatcher.addEventListener(a,b)},unlisten:function(a,b){this.eventDispatcher.removeEventListener(a,b)},__class__:hk};var kb=function(){};g["mc.OakTree"]=kb;kb.__name__=["mc","OakTree"];
kb.__properties__={get_fontName:"get_fontName",get_scenes:"get_scenes"};kb.engine=null;kb.stage=null;kb.scenes=null;kb.fontName=null;kb.fontFile=null;kb.onEngineAddedToStage=function(a,b){kb._isInitialized?Ia.trace("OakTree already initialized",{fileName:"OakTree.hx",lineNumber:31,className:"mc.OakTree",methodName:"onEngineAddedToStage"}):(kb.engine=a,kb.stage=b,Xb.store("oaktree-logo",bb.getBitmapData("core-assets/oaktree.png")),Xb.store("dialog-closebutton",bb.getBitmapData("core-assets/Close.png")),
Xb.store("dialog-closebutton-disabled",bb.getBitmapData("core-assets/Close_disabled.png")),kb._isInitialized=!0)};kb.get_fontName=function(){return"_sans"};kb.get_scenes=function(){return kb.engine.scenes};var Xi=function(a){this._initialized=!1;this.onInit=new Cb;null!=a&&this.initialize(a)};g["mc.assets.AssetsManager"]=Xi;Xi.__name__=["mc","assets","AssetsManager"];Xi.prototype={onInit:null,initialized:null,_initialized:null,_textureAtlas:null,_assetHolder:null,initialize:function(a){var b=this;
this._textureAtlas=new ka;this._assetHolder=new ka;var c=[];if(null!=a)for(a=dd(a)();a.hasNext();){var d=a.next();c.push(Yb.data_flow(d,k(this,this.processTextureAtlas),k(this,this.loadTextureAtlas)))}0<c.length?mc.whenAll(c).then(function(a){b.postInit()}).catchError(function(a){Ia.trace("failed to load atlas: ",{fileName:"AssetsManager.hx",lineNumber:57,className:"mc.assets.AssetsManager",methodName:"initialize",customParams:[a]});b.postInit()}):this.postInit()},postInit:function(){this._initialized=
!0;this.onInit.dispatch()},loadTextureAtlas:function(a){var b=new Ub,c=P.replace(a.src,".json",".png"),c=P.replace(c,".xml",".png");bb.exists(a.src)&&bb.exists(c)?(c=bb.getBitmapData(c),a=bb.getText(a.src),b.resolve({config:a,image:c})):b.handleError("Failed to load "+a.src+"/"+c+": assets aren't loaded");return b.boundPromise},processTextureAtlas:function(a,b){var c=new Ub,d=new bf(Gc.fromBitmapData(b.image));if(-1!=a.src.indexOf(".json"))d.parseAtlasJSON(b.config);else if(-1!=a.src.indexOf(".xml"))d.parseAtlasXml(A.parse(b.config));
else return c.handleError("Failed to load "+a.src+": unknown format"),c.boundPromise;this._textureAtlas.set(a.id,d);c.resolve(d);return c.boundPromise},getTexture:function(a){for(var b=this._textureAtlas.iterator();b.hasNext();){var c=b.next().getTexture(a);if(null!=c)return c}return null},getAtlas:function(a){return this._textureAtlas.exists(a)?this._textureAtlas.get(a):null},registerExternalAtlas:function(a,b,c){b=new bf(null,b,c);this._textureAtlas.set(a,b)},registerAsset:function(a,b){var c=new cf(a,
b);this._assetHolder.set(a,c)},getAsset:function(a){return this._assetHolder.exists(a)?this._assetHolder.get(a):new qi(a)},get_initialized:function(){return this._initialized},__class__:Xi,__properties__:{get_initialized:"get_initialized"}};var cf=function(a,b,c){this.loaded=!1;this.id=a;this.url=b;this.loaded=!1;null==c&&null!=b&&(c=Yb.getFileTypeFromExtension(b));this.type=c};g["mc.assets.AssetHolder"]=cf;cf.__name__=["mc","assets","AssetHolder"];cf.prototype={loaded:null,id:null,url:null,type:null,
data:null,load:function(){var a=this,b=new Ub;if(this.loaded)b.resolve(this);else{var c=this;Yb.data_load(this.url).then(function(d){Xb.store(a.id,d);b.resolve(c);c.loaded=!0}).catchError(function(a){Ia.trace(a,{fileName:"AssetsManager.hx",lineNumber:255,className:"mc.assets.AssetHolder",methodName:"load"});b.resolve(c)})}return b.boundPromise},get_data:function(){return this.loaded?Xb.fetch(this.id):null},dispose:function(){Xb["delete"](this.id)},__class__:cf,__properties__:{get_data:"get_data"}};
var qi=function(a){cf.call(this,a,null)};g["mc.assets.NullAssetHolder"]=qi;qi.__name__=["mc","assets","NullAssetHolder"];qi.__super__=cf;qi.prototype=t(cf.prototype,{load:function(){var a=new Ub;this.loaded=!1;a.resolve(this);return a.boundPromise},__class__:qi});var Gc=function(){this.scale=1};g["mc.assets.Texture"]=Gc;Gc.__name__=["mc","assets","Texture"];Gc.fromBitmapData=function(a,b){null==b&&(b=1);var c=Gc.empty(Math.floor(a.width/b),Math.floor(a.height/b),b);c.get_base().uploadBitmapData(a);
return c};Gc.fromTexture=function(a,b,c,d){null==d&&(d=!1);return new ie(a,b,c,d,!1)};Gc.empty=function(a,b,c){null==c&&(c=1);a=Math.floor(a*c);c=Math.floor(b*c);b=new Ra(a,c,!0,0);return new Hc(b,a,c)};Gc.prototype={width:null,height:null,base:null,bitmapData:null,frame:null,scale:null,dispose:function(){},get_width:function(){return 0},get_height:function(){return 0},get_frame:function(){return null},get_base:function(){return null},get_bitmapData:function(){return this.get_base().get_bitmapData()},
asBitmap:function(){return new Q(this.get_bitmapData())},__class__:Gc,__properties__:{get_frame:"get_frame",get_bitmapData:"get_bitmapData",get_base:"get_base",get_height:"get_height",get_width:"get_width"}};var Ea=function(a,b){null==b&&(b=0);null==a&&(a=0);this.x=a;this.y=b};g["openfl.geom.Point"]=Ea;Ea.__name__=["openfl","geom","Point"];Ea.prototype={x:null,y:null,clone:function(){return new Ea(this.x,this.y)},copyFrom:function(a){this.x=a.x;this.y=a.y},offset:function(a,b){this.x+=a;this.y+=b},
setTo:function(a,b){this.x=a;this.y=b},__toLimeVector2:function(){return new he(this.x,this.y)},__class__:Ea};var Hc=function(a,b,c){this.scale=1;this._data=a;this._width=b;this._height=c};g["mc.assets.BaseTexture"]=Hc;Hc.__name__=["mc","assets","BaseTexture"];Hc.__super__=Gc;Hc.prototype=t(Gc.prototype,{_data:null,_width:null,_height:null,uploadBitmapData:function(a){var b;if(a.width!=this.get_width()||a.height!=this.get_height())b=new Ra(this.get_width(),this.get_height(),!0,0),b.copyPixels(a,a.rect,
Hc.sOrigin),a=b;this._data.copyPixels(a,a.rect,Hc.sOrigin)},get_width:function(){return this._width},get_height:function(){return this._height},get_base:function(){return this},get_bitmapData:function(){return this._data},__class__:Hc});var Zf=function(a){this.assets=[];M.call(this,a)};g["mc.assets.ManifestVO"]=Zf;Zf.__name__=["mc","assets","ManifestVO"];Zf.__super__=M;Zf.prototype=t(M.prototype,{build:null,assets:null,__class__:Zf});var Se=function(a){M.call(this,a)};g["mc.assets.AssetVO"]=Se;Se.__name__=
["mc","assets","AssetVO"];Se.__super__=M;Se.prototype=t(M.prototype,{id:null,src:null,type:null,base:null,texture:null,metafile:null,__class__:Se});var ra=function(a,b,c,d,e,f){null==f&&(f=0);null==e&&(e=0);null==d&&(d=1);null==c&&(c=0);null==b&&(b=0);null==a&&(a=1);this.a=a;this.b=b;this.c=c;this.d=d;this.tx=e;this.ty=f};g["openfl.geom.Matrix"]=ra;ra.__name__=["openfl","geom","Matrix"];ra.prototype={a:null,b:null,c:null,d:null,tx:null,ty:null,__array:null,clone:function(){return new ra(this.a,this.b,
this.c,this.d,this.tx,this.ty)},concat:function(a){var b=this.a*a.a+this.b*a.c;this.b=this.a*a.b+this.b*a.d;this.a=b;b=this.c*a.a+this.d*a.c;this.d=this.c*a.b+this.d*a.d;this.c=b;b=this.tx*a.a+this.ty*a.c+a.tx;this.ty=this.tx*a.b+this.ty*a.d+a.ty;this.tx=b},copyFrom:function(a){this.a=a.a;this.b=a.b;this.c=a.c;this.d=a.d;this.tx=a.tx;this.ty=a.ty},deltaTransformPoint:function(a){return new Ea(a.x*this.a+a.y*this.c,a.x*this.b+a.y*this.d)},identity:function(){this.a=1;this.c=this.b=0;this.d=1;this.ty=
this.tx=0},invert:function(){var a=this.a*this.d-this.b*this.c;if(0==a)this.a=this.b=this.c=this.d=0,this.tx=-this.tx,this.ty=-this.ty;else{var a=1/a,b=this.d*a;this.d=this.a*a;this.a=b;this.b*=-a;this.c*=-a;a=-this.a*this.tx-this.c*this.ty;this.ty=-this.b*this.tx-this.d*this.ty;this.tx=a}return this},rotate:function(a){var b=Math.cos(a);a=Math.sin(a);var c=this.a*b-this.b*a;this.b=this.a*a+this.b*b;this.a=c;c=this.c*b-this.d*a;this.d=this.c*a+this.d*b;this.c=c;c=this.tx*b-this.ty*a;this.ty=this.tx*
a+this.ty*b;this.tx=c},scale:function(a,b){this.a*=a;this.b*=b;this.c*=a;this.d*=b;this.tx*=a;this.ty*=b},to3DString:function(a){null==a&&(a=!1);return a?"matrix3d("+this.a+", "+this.b+", 0, 0, "+this.c+", "+this.d+", 0, 0, 0, 0, 1, 0, "+(this.tx|0)+", "+(this.ty|0)+", 0, 1)":"matrix3d("+this.a+", "+this.b+", 0, 0, "+this.c+", "+this.d+", 0, 0, 0, 0, 1, 0, "+this.tx+", "+this.ty+", 0, 1)"},transformPoint:function(a){return new Ea(a.x*this.a+a.y*this.c+this.tx,a.x*this.b+a.y*this.d+this.ty)},translate:function(a,
b){this.tx+=a;this.ty+=b},toArray:function(a){null==a&&(a=!1);null==this.__array&&(this.__array=new Float32Array(9));a?(this.__array[0]=this.a,this.__array[1]=this.b,this.__array[2]=0,this.__array[3]=this.c,this.__array[4]=this.d,this.__array[5]=0,this.__array[6]=this.tx,this.__array[7]=this.ty):(this.__array[0]=this.a,this.__array[1]=this.c,this.__array[2]=this.tx,this.__array[3]=this.b,this.__array[4]=this.d,this.__array[5]=this.ty,this.__array[6]=0,this.__array[7]=0);this.__array[8]=1;return this.__array},
__toMatrix3:function(){return new ni(this.a,this.b,this.c,this.d,this.tx,this.ty)},__transformInversePoint:function(a){var b=this.a*this.d-this.b*this.c;if(0==b)a.x=-this.tx,a.y=-this.ty;else{var c=1/b*(this.c*(this.ty-a.y)+this.d*(a.x-this.tx));a.y=1/b*(this.a*(a.y-this.ty)+this.b*(this.tx-a.x));a.x=c}},__transformInverseX:function(a,b){var c=this.a*this.d-this.b*this.c;return 0==c?-this.tx:1/c*(this.c*(this.ty-b)+this.d*(a-this.tx))},__transformInverseY:function(a,b){var c=this.a*this.d-this.b*
this.c;return 0==c?-this.ty:1/c*(this.a*(b-this.ty)+this.b*(this.tx-a))},__translateTransformed:function(a,b){this.tx=a*this.a+b*this.c+this.tx;this.ty=a*this.b+b*this.d+this.ty},__class__:ra};var ie=function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=!1);null==b&&(b=new ha(0,0,a.get_width(),a.get_height()));this._parent=a;this._ownsParent=e;this._rotated=d;this._width=Math.floor(this._rotated?b.height:b.width);this._height=Math.floor(this._rotated?b.width:b.height);this._frame=null!=c?c.clone():new ha(0,
0,this._width,this._height);this._transformationMatrix=new ra;d&&(this._transformationMatrix.translate(0,-1),this._transformationMatrix.rotate(Math.PI/2));this._transformationMatrix.translate(-this._frame.x,-this._frame.y);c=new Ra(this._width,this._height,!0,0);c.copyPixels(a.get_base().get_bitmapData(),b,ie._tTexCoords);a=new Ra(Math.floor(this._frame.width),Math.floor(this._frame.height),!0,0);a.draw(c,this._transformationMatrix);c.dispose();Hc.call(this,a,a.width,a.height)};g["mc.assets.SubTexture"]=
ie;ie.__name__=["mc","assets","SubTexture"];ie.__super__=Hc;ie.prototype=t(Hc.prototype,{_parent:null,_ownsParent:null,_frame:null,_rotated:null,_transformationMatrix:null,dispose:function(){this._ownsParent&&this._parent.dispose();Hc.prototype.dispose.call(this)},get_frame:function(){return this._frame},__class__:ie});var bf=function(a,b,c){null==c&&(c="");null==b&&(b="");this._loaded=!1;this._textureInfos=new ka;this._texture=a;""!=b&&""!=c&&(this._textureFile=b,this._metaFile=c)};g["mc.assets.TextureAtlas"]=
bf;bf.__name__=["mc","assets","TextureAtlas"];bf.parseBool=function(a){return null==a?!1:"true"==a.toLowerCase()};bf.prototype={_loaded:null,loaded:null,get_loaded:function(){return this._loaded},_texture:null,_textureInfos:null,_textureNames:null,_textureFile:null,_metaFile:null,dispose:function(){null!=this._texture&&this._texture.dispose()},parseAtlasJSON:function(a){if(null==this._texture)return!1;var b=this._texture.scale,c=0;for(a=(new Dd(a)).parseRec().frames;c<a.length;){var d=a[c];++c;var e=
d.filename,f=d.frame.x/b,n=d.frame.y/b,g=d.frame.w/b,h=d.frame.h/b,k=d.rotated,d=new ha(d.frame.x/b,d.frame.y/b,d.sourceSize.w/b,d.sourceSize.h/b),f=0<g&&0<h?new ha(f,n,g,h):null;this.addRegion(e,d,f,k)}return this._loaded=!0},parseAtlasXml:function(a){if(null==this._texture)return!1;var b=this._texture.scale;for(a=a.firstElement().elements();a.hasNext();){var c=a.next(),d=c.get("name"),e=K.parseFloat(c.get("x"))/b,f=K.parseFloat(c.get("y"))/b,n=K.parseFloat(c.get("width"))/b,g=K.parseFloat(c.get("height"))/
b,h=K.parseFloat(c.get("frameX"))/b,k=K.parseFloat(c.get("frameY"))/b,m=K.parseFloat(c.get("frameWidth"))/b,l=K.parseFloat(c.get("frameHeight"))/b,c=bf.parseBool(c.get("rotated")),e=new ha(e,f,n,g),h=0<m&&0<l?new ha(h,k,m,l):null;this.addRegion(d,e,h,c)}return this._loaded=!0},load:function(){var a=this,b=new Ub;if(this._loaded)b.resolve(this);else{var c=df.downloadAtlasDescriptionFile(this._metaFile),d=df.downloadAtlasImageFile(this._textureFile);(function(a){return{then:function(a){var b=new mc,
e=[c,d];mc.whenAll(e)._update.push({async:b,linkf:function(c){b.handleResolve(a(e[0]._val,e[1]._val))}});return b}}})(this).then(function(c,d){if(null==d||null==c)b.handleError("TextureAtlas is invalid");else{a._texture=Gc.fromBitmapData(d);var n=null,g=null;try{n=A.parse(c)}catch(h){h instanceof m&&(h=h.val);try{g=(new Dd(c)).parseRec()}catch(k){k instanceof m&&(k=k.val),null}}var l=!1;null!=n?l=a.parseAtlasXml(n):null!=g&&(l=a.parseAtlasJSON(c));l?b.resolve(a):b.handleError("Bad texture Atlas: "+
a._metaFile)}})}return b.boundPromise},get:function(a){return this.getTexture(a)},getTexture:function(a){return this._textureInfos.exists(a)?(a=this._textureInfos.get(a),Gc.fromTexture(this._texture,a.region,a.frame,a.rotated)):null},addRegion:function(a,b,c,d){null==d&&(d=!1);this._textureInfos.set(a,{region:b,frame:c,rotated:d})},remoteRegion:function(a){this._textureInfos.remove(a)},__class__:bf};var df=function(){};g["mc.assets.TextureUtils"]=df;df.__name__=["mc","assets","TextureUtils"];df.downloadAtlasDescriptionFile=
function(a){var b=new Ub,c=new Cd(a);c.addEventListener(v.COMPLETE,function(a){b.resolve(c.data)});c.start();return b.boundPromise};df.downloadAtlasImageFile=function(a){var b=new Ub,c=new Ve(a);c.addEventListener(v.COMPLETE,function(a){b.resolve(c.data)});c.start();return b.boundPromise};df.prototype={__class__:df};var Za=g["mc.core.FileType"]={__ename__:!0,__constructs__:["AUTO","IMAGE","TEXT","BINARY","SOUND"]};Za.AUTO=["AUTO",0];Za.AUTO.toString=u;Za.AUTO.__enum__=Za;Za.IMAGE=["IMAGE",1];Za.IMAGE.toString=
u;Za.IMAGE.__enum__=Za;Za.TEXT=["TEXT",2];Za.TEXT.toString=u;Za.TEXT.__enum__=Za;Za.BINARY=["BINARY",3];Za.BINARY.toString=u;Za.BINARY.__enum__=Za;Za.SOUND=["SOUND",4];Za.SOUND.toString=u;Za.SOUND.__enum__=Za;var ik=function(a){this.color=16711680;this.history=33;this._height=8;this._width=128;this.outerHeight=8;C.call(this);this.set_name(a);this.vertices=[];this.set_max(ef.fixed(16.666666666666668,2))};g["mc.debug.ProfilerGraph"]=ik;ik.__name__=["mc","debug","ProfilerGraph"];ik.__super__=C;ik.prototype=
t(C.prototype,{outerHeight:null,_width:null,_height:null,vertices:null,history:null,color:null,max:null,ping:null,segment:null,bg:null,graph:null,setSize:function(a,b){this._width=a;this._height=b},create:function(){this.segment=this._width/this.history;this.outerHeight=2*this._height;this.bg=new C;this.bg.get_graphics().beginFill(1052688);this.bg.get_graphics().drawRect(0,0,this._width-this.segment,this.outerHeight);this.bg.get_graphics().endFill();this.graph=new C;for(var a=0,b=this.history;a<b;){var c=
a++;this.vertices.push({x:this.segment*c,y:this.outerHeight,color:this.color})}this.updateGraph();this.addChild(this.bg);this.addChild(this.graph)},updateGraph:function(){if(null!=this.graph){this.graph.get_graphics().clear();for(var a=0,b=this.vertices;a<b.length;){var c=b[a];++a;this.graph.get_graphics().lineStyle(1,c.color,1);this.graph.get_graphics().lineTo(c.x,c.y)}}},set_max:function(a){var b=this.max;this.max=a;if(null!=this.graph){a=0;for(var c=this.vertices;a<c.length;){var d=c[a];++a;if(null!=
d){var e=1-d.y/this.outerHeight,e=e*b/this.max;d.y=this.outerHeight*(1-e)}}}this.updateGraph();return this.max},set_ping:function(a){for(var b=ef.fixed(a,4)/this.max,c=0,d=this.history;c<d;){var e=c++,f=this.vertices[e];if(e<this.history-1){var n=this.vertices[e+1];null!=n&&(f.y=Math.floor(n.y),f.color=n.color,this.vertices[e]=f)}}.001>b?b=.001:1<b&&(b=1);this.vertices[this.history-1].color=1<b?16711680:.2>b?65280:this.color;this.vertices[this.history-1].y=Math.floor(this.outerHeight*(1-b));this.updateGraph();
return this.ping=a},__class__:ik,__properties__:t(C.prototype.__properties__,{set_ping:"set_ping",set_max:"set_max"})});var zf=function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!1);fb.call(this,a,b,c,d)};g["mc.events.ConnectionEvent"]=zf;zf.__name__=["mc","events","ConnectionEvent"];zf.__super__=fb;zf.prototype=t(fb.prototype,{__class__:zf});var hd=function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!1);fb.call(this,a,b,c,d)};g["mc.events.UserEvent"]=hd;hd.__name__=["mc","events","UserEvent"];hd.__super__=
fb;hd.prototype=t(fb.prototype,{__class__:hd});var cl=function(a){this.onOpen=new Xc;this.onError=new Xc;this.onClose=new Xc;this.onSocketOpen=new Xc;this.onPong=new Xc;this.onPing=new Xc;this.onBinaryPacket=new Xc;this.onTextPacket=new Xc;this.setHost(a)};g["mc.game.multiplayer.GameSocket"]=cl;cl.__name__=["mc","game","multiplayer","GameSocket"];cl.prototype={_socket:null,onTextPacket:null,onBinaryPacket:null,onPing:null,onPong:null,onSocketOpen:null,onClose:null,onError:null,onOpen:null,uri:null,
connect:function(){var a=this;this._socket=new WebSocket(this.uri);this._socket.binaryType="arraybuffer";this._socket.onopen=function(){a.onSocketOpen.dispatch();a.onOpen.dispatch()};this._socket.onmessage=function(b){b=se.arrayBufferToBytes(b.data);a.onBinaryPacket.dispatch(b)};this._socket.onclose=function(b){a.onClose.dispatch()};this._socket.onerror=function(b){a.onError.dispatch(b.text)}},setHost:function(a){this.uri=a},close:function(){this._socket.close()},sendText:function(a){this._socket.send(a)},
sendBinary:function(a){a.littleEndian=!1;"bigEndian";this._socket.send(a.data.buffer)},__class__:cl};var Xc=function(){this.callbacks=[]};g["mc.game.multiplayer.Signal"]=Xc;Xc.__name__=["mc","game","multiplayer","Signal"];Xc.prototype={callbacks:null,dispatch:function(a){for(var b=0,c=this.callbacks;b<c.length;){var d=c[b];++b;d(a)}},add:function(a){this.callbacks.push(a);return a},remove:function(a){H.remove(this.callbacks,a)},__class__:Xc};var wb=g["mc.game.multiplayer.ServerConnectionStatus"]=
{__ename__:!0,__constructs__:["DISCONNECTED","CONNECTING","CONNECTED"]};wb.DISCONNECTED=["DISCONNECTED",0];wb.DISCONNECTED.toString=u;wb.DISCONNECTED.__enum__=wb;wb.CONNECTING=["CONNECTING",1];wb.CONNECTING.toString=u;wb.CONNECTING.__enum__=wb;wb.CONNECTED=["CONNECTED",2];wb.CONNECTED.toString=u;wb.CONNECTED.__enum__=wb;var Kb=function(a,b){this.type=a;this.properties=b};g["mc.services.ServiceConfig"]=Kb;Kb.__name__=["mc","services","ServiceConfig"];Kb.prototype={type:null,properties:null,__class__:Kb};
var na=function(){};g["mc.services.ServiceManager"]=na;na.__name__=["mc","services","ServiceManager"];na.serviceList=null;na.getService=function(a){for(var b=na.serviceList.h,c=null;null!=b;)if(c=void 0,c=b[0],b=b[1],y.__instanceof(c,a))return c;return null};na.initialize=function(a){na.serviceList=new lb;for(a=dd(a)();a.hasNext();){var b=a.next(),c=Qa.createInstance(b.type,[]);c.create();null!=b.properties&&(y.__instanceof(c,ae)?y.__cast(c,ae).configure(b.properties):je.copyProperties(b.properties,
c));na.serviceList.push(c)}a=na.serviceList.h;for(b=null;null!=a;)b=void 0,b=a[0],a=a[1],b.initialize()};var jk=function(){};g["mc.system.IEntityContainer"]=jk;jk.__name__=["mc","system","IEntityContainer"];jk.prototype={removeEntity:null,addEntity:null,__class__:jk};var Ee=function(){this.parentEntity=null;this._id=Ee._idCounter+1;this._components=[];this._entities=[];this._entitiesToAdd=[];this._entitiesToRemove=[]};g["mc.system.Entity"]=Ee;Ee.__name__=["mc","system","Entity"];Ee.__interfaces__=
[jk,Zg];Ee.prototype={_id:null,handle:null,scene:null,parentEntity:null,_components:null,_entities:null,_entitiesToAdd:null,_entitiesToRemove:null,dispose:function(){this.removeEntitiesFromQueue();this._entitiesToRemove=null;this.addEntitiesFromQueue();this._entitiesToAdd=null;for(var a=0,b=this._entities;a<b.length;){var c=b[a];++a;c.dispose()}a=0;for(b=this._components;a<b.length;)c=b[a],++a,c.dispose();this.scene=this._components=null},getId:function(){return this._id},onAddedToScene:function(a){this.scene=
a;a=0;for(var b=this._components;a<b.length;){var c=b[a];++a;c.onEntityAddedToScene(this.scene)}a=0;for(b=this._entities;a<b.length;)c=b[a],++a,c.onAddedToScene(this.scene)},onRemovedFromScene:function(){for(var a=0,b=this._components;a<b.length;){var c=b[a];++a;c.onEntityRemovedFromScene()}a=0;for(b=this._entities;a<b.length;)c=b[a],++a,c.onRemovedFromScene();this.scene=null},addComponent:function(a){this._components.push(a);this._components.sort(k(this,this.sortOnPriority));a.onAddedToEntity(this);
if(null!=this.scene)a.onEntityAddedToScene(this.scene);return a},removeComponent:function(a){if(null!=this.scene)a.onEntityRemovedFromScene();this._components.slice(kk.indexOf(this._components,a),1);a.onRemovedFromEntity();return a},removeAllComponents:function(){for(var a=0,b=this._components;a<b.length;){var c=b[a];++a;if(null!=this.scene)c.onEntityRemovedFromScene();c.onRemovedFromEntity()}this._components=[]},sortOnPriority:function(a,b){return a.priority-b.priority},addEntity:function(a,b){null==
b&&(b="");a.handle=b;this._entitiesToAdd.push(a);return a},removeEntity:function(a){this._entitiesToRemove.push(a);return a},update:function(a){var b,c;this.addEntitiesFromQueue();for(b=this._components.length;0<=--b;)c=this._components[b],c.enabled&&c.update(a);b=0;for(c=this._entities;b<c.length;){var d=c[b];++b;d.update(a)}this.removeEntitiesFromQueue()},internal_addEntity:function(a){this._entities.push(a);a.parentEntity=this;if(null!=this.scene)a.onAddedToScene(this.scene)},internal_removeEntity:function(a){this._entities.splice(kk.indexOf(this._entities,
a),1);a.onRemovedFromScene();a.dispose()},addEntitiesFromQueue:function(){if(0<this._entitiesToAdd.length){for(var a=0,b=this._entitiesToAdd;a<b.length;){var c=b[a];++a;this.internal_addEntity(c)}this._entitiesToAdd=[]}},removeEntitiesFromQueue:function(){var a=this._entitiesToRemove.length,b;if(0<a){for(;0<=--a;)b=this._entitiesToRemove[a],this.internal_removeEntity(b);this._entitiesToRemove=[]}},entities:null,get_entities:function(){return this._entities},id:null,get_id:function(){return this._id},
__class__:Ee,__properties__:{get_id:"get_id",get_entities:"get_entities"}};var E=function(){};g["mc.system.I18n"]=E;E.__name__=["mc","system","I18n"];E.instance=null;E.mapping=null;E.init=function(a){E.instance=new E;E.mapping=new ka;for(var b=G.fields(a),c=0;c<b.length;){var d=b[c];++c;if(!E.mapping.exists(d)){var e=G.field(a,d);E.mapping.set(d,e)}}E.initialized=!0;E.onInit.dispatch()};E.to_string=function(){for(var a=[],b=E.mapping.keys();b.hasNext();){var c=b.next();a.push(" "+c+': "'+E.mapping.get(c)+
'"')}return"{ "+a.join(",")+"}"};E.text=function(a,b){if(null==E.mapping||!E.mapping.exists(a))return"__miss_"+a+"__";var c=E.mapping.get(a);if(null!=b)if(b instanceof Array&&null==b.__enum__)for(var d=new jc("%@",""),e=0;e<b.length;){var f=b[e];++e;c=d.replace(c,f)}else for(d=G.fields(b),e=0;e<d.length;)f=d[e],++e,c=P.replace(c,"%"+f+"%",G.field(b,f));return c};E.exists=function(a){return E.mapping.exists(a)};E.prototype={__class__:E};var ff=function(){};g["mc.system.Log"]=ff;ff.__name__=["mc","system",
"Log"];ff._filter=null;ff._exclude=null;ff._get_spacing=function(a){var b="";a=ff._log_width-(a.length+4);if(0<a)for(var c=0;c<a;)c++,b+=" ";return b};var lk=function(){};g["mc.system.RemoteAsset"]=lk;lk.__name__=["mc","system","RemoteAsset"];lk.prototype={id:null,loader:null,data:null,defer:null,__class__:lk};var $i=function(){this.bitmapAssets=new ka};g["mc.system.RemoteAssetLibrary"]=$i;$i.__name__=["mc","system","RemoteAssetLibrary"];$i.prototype={bitmapAssets:null,exists:function(a,b){return"IMAGE"==
b?this.bitmapAssets.exists(a):!1},loadBitmap:function(a,b){var c=this,d=new lk;d.id=a;var e=new Ub,f=new Ve(b);d.loader=f;f.addEventListener(v.COMPLETE,function(b){f.status==Na.LOADED?(d.data=f.data,c.bitmapAssets.set(a,d),e.resolve(f.data)):e.boundPromise.reject(f.status)});f.start();d.defer=e;return e.boundPromise},getBitmapData:function(a){return this.exists(a,"IMAGE")?this.bitmapAssets.get(a).defer.boundPromise:null},__class__:$i};var bj=function(a){this.enabled=this.active=this.inited=!1;this.name=
"";null!=a&&null!=a.name&&(this.name=a.name)};g["mc.system.State"]=bj;bj.__name__=["mc","system","State"];bj.prototype={name:null,machine:null,enabled:null,active:null,inited:null,init:function(){},enable:function(a){this.machine.enable(this.name,a)},disable:function(a){this.machine.disable(this.name,a)},destroy:function(){this.machine.kill(this.name)},onEnter:function(a){},onLeave:function(a){},onEnabled:function(a){},onDisabled:function(a){},onAdded:function(){},onRemoved:function(){},onDestroy:function(){},
_init:function(){this.inited||(this.inited=!0,this.init())},__class__:bj};var dl=function(){this.enabled=!0;this.priority=0;this.entity=null};g["mc.system.components.Component"]=dl;dl.__name__=["mc","system","components","Component"];dl.prototype={entity:null,priority:null,enabled:null,dispose:function(){this.entity=null},onAddedToEntity:function(a){this.entity=a},onRemovedFromEntity:function(){this.entity=null},onEntityAddedToScene:function(a){},onEntityRemovedFromScene:function(){},update:function(a){},
__class__:dl};var Yb=function(){};g["mc.system.io.IO"]=Yb;Yb.__name__=["mc","system","io","IO"];Yb.addMapping=function(a,b){Yb._ftypeMapping.set(a,b)};Yb.getFileTypeFromExtension=function(a){a=a.split("?")[0].split(".");var b="";1<a.length&&(b=a[a.length-1]);switch(b){case "png":case "jpg":case "bmp":return Za.IMAGE;case "xml":case "json":case "txt":return Za.TEXT;default:return Yb._ftypeMapping.exists(b)?Yb._ftypeMapping.get(b):Za.BINARY}};Yb.data_load=function(a,b){var c=new Ub;null==b&&(b={});
null==b.filetype&&(b.filetype=Za.AUTO);b.filetype;var d;switch((b.filetype==Za.AUTO?Yb.getFileTypeFromExtension(a):b.filetype)[1]){case 1:d=new Ve(a);break;case 2:d=new Cd(a);break;case 4:d=new Zh(a);break;default:d=new Xh(a)}d.addEventListener(v.COMPLETE,function(a){d.status==Na.LOADED?c.resolve(d.data):c.handleError(d.status)});d.start();return c.boundPromise};Yb.data_flow=function(a,b,c){null==c&&(c=Yb.default_provider);var d=new ke;c(a).then(function(c){null!=b?b(a,c).then(function(a){d.resolve(a)}).errorThen(function(a){d.handleError(a)}):
d.resolve(c)}).errorThen(function(a){d.handleError(a)});return d.promise()};Yb.default_provider=function(a){return Yb.data_load(a)};var Sb=g["mc.system.models.VOTypes"]={__ename__:!0,__constructs__:["VT_Native","VT_Class","VT_Map","VT_Array","VT_Unknown"]};Sb.VT_Native=function(a){a=["VT_Native",0,a];a.__enum__=Sb;a.toString=u;return a};Sb.VT_Class=function(a){a=["VT_Class",1,a];a.__enum__=Sb;a.toString=u;return a};Sb.VT_Map=function(a,b){var c=["VT_Map",2,a,b];c.__enum__=Sb;c.toString=u;return c};
Sb.VT_Array=function(a){a=["VT_Array",3,a];a.__enum__=Sb;a.toString=u;return a};Sb.VT_Unknown=["VT_Unknown",4];Sb.VT_Unknown.toString=u;Sb.VT_Unknown.__enum__=Sb;var Wi=function(a){this._container=a;this._scenesList=[];this._scenesToRemove=[]};g["mc.system.scene.SceneManager"]=Wi;Wi.__name__=["mc","system","scene","SceneManager"];Wi.prototype={_container:null,_scenesList:null,_scenesToRemove:null,add:function(a,b){null==b&&(b=0);var c=y.__instanceof(a,zd);this._scenesList.push({scene:a,priority:b,
isIScene:c});this._scenesList.sort(k(this,this.sceneSortFunc))},remove:function(a){for(var b=0,c=this._scenesList;b<c.length;){var d=c[b];++b;if(d.scene==a){H.remove(this._scenesList,d);this._scenesToRemove.push(d);break}}},reset:function(){for(var a=0,b=this._scenesList;a<b.length;){var c=b[a];++a;this._scenesToRemove.push(c)}this._scenesList=null;this._scenesList=[]},update:function(a){for(var b=0,c=this._scenesList;b<c.length;){var d=c[b];++b;d.isIScene&&y.__cast(d.scene,zd).update(a)}},lateUpdate:function(){if(0<
this._scenesToRemove.length)for(var a=0,b=this._scenesToRemove;a<b.length;){var c=b[a];++a;if(this._container.contains(c.scene)&&(this._container.removeChild(c.scene),H.remove(this._scenesToRemove,c),c.isIScene))y.__cast(c.scene,zd).onRemoved()}b=a=0;for(c=this._scenesList;b<c.length;){var d=c[b];++b;if(this._container.contains(d.scene))this._container.setChildIndex(d.scene,a);else if(this._container.addChild(d.scene),d.isIScene)y.__cast(d.scene,zd).onAdded();a++;d.isIScene&&y.__cast(d.scene,zd).lateUpdate()}},
get_container:function(){return this._container},set_container:function(a){return this._container=a},sceneSortFunc:function(a,b){return a.priority-b.priority},__class__:Wi,__properties__:{set_container:"set_container",get_container:"get_container"}};var xj=function(){};g["mc.system.social.fb.FBService"]=xj;xj.__name__=["mc","system","social","fb","FBService"];xj.prototype={getQueryRequests:function(){return null!=h.environment.getQueryString().get("request_ids")?this.getAppRequests():null},getAppRequests:function(){var a=
this,b=new Ub;FB.api("/me/apprequests",function(c){a.onAppRequests(c,b)});return b.boundPromise},onAppRequests:function(a,b){var c=this.extractAppRequestsIds(a);b.resolve(c)},extractAppRequestsIds:function(a){var b={gifts:[],invites:[]};if(a&&!a.error){a=a.data;for(var c=0;c<a.length;){var d=a[c];++c;"gift"==d.data?(d=d.id,b.gifts.push(d.substr(0,d.indexOf("_")))):"invite"==d.data&&(d=d.id,b.invites.push(d.substr(0,d.indexOf("_"))))}}else null;return b},inviteFriends:function(a,b){this.doInvite(a.title,
a.message,a.users,b)},doInvite:function(a,b,c,d){FB.ui({method:"apprequests",title:a,message:b,to:c,data:"invite"},d)},__class__:xj};var Ma=function(){Sa.call(this);this.__caretIndex=-1;this.__graphics=new Nd;this.__textEngine=new Pa(this);this.__tabEnabled=this.__layoutDirty=!0;null==Ma.__defaultTextFormat&&(Ma.__defaultTextFormat=new jd("Times New Roman",12,0,!1,!1,!1,"","",T.LEFT,0,0,0,0),Ma.__defaultTextFormat.blockIndent=0,Ma.__defaultTextFormat.bullet=!1,Ma.__defaultTextFormat.letterSpacing=
0,Ma.__defaultTextFormat.kerning=!1);this.__textFormat=Ma.__defaultTextFormat.clone();this.__textEngine.textFormatRanges.push(new gf(this.__textFormat,0,0));this.addEventListener(F.MOUSE_DOWN,k(this,this.this_onMouseDown))};g["openfl.text.TextField"]=Ma;Ma.__name__=["openfl","text","TextField"];Ma.__defaultTextFormat=null;Ma.__super__=Sa;Ma.prototype=t(Sa.prototype,{__caretIndex:null,__cursorTimer:null,__dirty:null,__inputEnabled:null,__isHTML:null,__layoutDirty:null,__selectionIndex:null,__showCursor:null,
__textEngine:null,__textFormat:null,__div:null,getCharBoundaries:function(a){if(0>a||a>this.__textEngine.text.length-1)return null;this.__updateLayout();for(var b=0,c=this.__textEngine.layoutGroups;b<c.length;){var d=c[b];++b;if(a>=d.startIndex&&a<=d.endIndex){for(var b=d.offsetX,c=0,e=a-d.startIndex;c<e;)var f=c++,b=b+d.advances[f];return new ha(b,d.offsetY,d.advances[a-d.startIndex],d.ascent+d.descent)}}return null},replaceSelectedText:function(a){if(""!=a||this.__selectionIndex!=this.__caretIndex){var b;
b=this.__caretIndex<this.__selectionIndex?this.__caretIndex:this.__selectionIndex;this.replaceText(b,this.__caretIndex>this.__selectionIndex?this.__caretIndex:this.__selectionIndex,a);this.__selectionIndex=this.__caretIndex=b+a.length}},replaceText:function(a,b,c){if(!(b<a||0>a||b>this.__textEngine.text.length||null==c)){this.__textEngine.text=this.__textEngine.text.substring(0,a)+c+this.__textEngine.text.substring(b);c=c.length-(b-a);for(var d=0,e;d<this.__textEngine.textFormatRanges.length;)e=this.__textEngine.textFormatRanges[d],
e.start<=a&&e.end>=b?(e.end+=c,d++):e.start>=a&&e.end<=b?(this.__textEngine.textFormatRanges.splice(d,1),c-=e.end-e.start):(e.start>a&&e.start<=b&&(e.start+=c),d++);this.__layoutDirty=this.__dirty=!0}},setTextFormat:function(a,b,c){null!=a.font&&(this.__textFormat.font=a.font);null!=a.size&&(this.__textFormat.size=a.size);null!=a.color&&(this.__textFormat.color=a.color);null!=a.bold&&(this.__textFormat.bold=a.bold);null!=a.italic&&(this.__textFormat.italic=a.italic);null!=a.underline&&(this.__textFormat.underline=
a.underline);null!=a.url&&(this.__textFormat.url=a.url);null!=a.target&&(this.__textFormat.target=a.target);null!=a.align&&(this.__textFormat.align=a.align);null!=a.leftMargin&&(this.__textFormat.leftMargin=a.leftMargin);null!=a.rightMargin&&(this.__textFormat.rightMargin=a.rightMargin);null!=a.indent&&(this.__textFormat.indent=a.indent);null!=a.leading&&(this.__textFormat.leading=a.leading);null!=a.blockIndent&&(this.__textFormat.blockIndent=a.blockIndent);null!=a.bullet&&(this.__textFormat.bullet=
a.bullet);null!=a.kerning&&(this.__textFormat.kerning=a.kerning);null!=a.letterSpacing&&(this.__textFormat.letterSpacing=a.letterSpacing);null!=a.tabStops&&(this.__textFormat.tabStops=a.tabStops);this.__layoutDirty=this.__dirty=!0},__getBounds:function(a,b){this.__updateLayout();var c=ha.__temp;this.__textEngine.bounds.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height)},__getCursor:function(){return this.__textEngine.selectable?ca.TEXT:null},__getPosition:function(a,b){this.__updateLayout();a+=
this.get_scrollH();for(var c=0,d=this.get_scrollV()-1;c<d;){var e=c++;b+=this.__textEngine.lineHeights[e]}b>this.__textEngine.textHeight&&(b=this.__textEngine.textHeight);for(var d=!0,f,e=0,n=this.__textEngine.layoutGroups.length;e<n;)if(f=e++,c=this.__textEngine.layoutGroups[f],f=f<this.__textEngine.layoutGroups.length-1?this.__textEngine.layoutGroups[f+1]:null,d&&(b<c.offsetY&&(b=c.offsetY),a<c.offsetX&&(a=c.offsetX),d=!1),b>=c.offsetY&&b<=c.offsetY+c.height||null==f)if(a>=c.offsetX&&a<=c.offsetX+
c.width||null==f||f.lineIndex!=c.lineIndex){e=d=0;for(n=c.advances.length;e<n;)if(f=e++,d+=c.advances[f],a<=c.offsetX+d){if(a<=c.offsetX+(d-c.advances[f])+c.advances[f]/2)return c.startIndex+f;if(c.startIndex+f<c.endIndex)return c.startIndex+f+1;break}return c.endIndex}return this.__textEngine.text.length},__hitTest:function(a,b,c,d,e){if(!this.get_visible()||this.__isMask||e&&!this.mouseEnabled||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b))return!1;this.__getWorldTransform();this.__updateLayout();
c=this.__worldTransform.__transformInverseX(a,b);a=this.__worldTransform.__transformInverseY(a,b);return this.__textEngine.bounds.contains(c,a)?(null!=d&&d.push(this),!0):!1},__hitTestMask:function(a,b){this.__getWorldTransform();this.__updateLayout();var c=this.__worldTransform.__transformInverseX(a,b),d=this.__worldTransform.__transformInverseY(a,b);return this.__textEngine.bounds.contains(c,d)?!0:!1},__renderCairo:function(a){el.render(this,a);Sa.prototype.__renderCairo.call(this,a)},__renderCanvas:function(a){Ka.render(this,
a);if(this.__textEngine.antiAliasType==md.ADVANCED&&this.__textEngine.gridFitType==gc.PIXEL){var b=a.context.imageSmoothingEnabled;b&&(a.context.mozImageSmoothingEnabled=!1,a.context.msImageSmoothingEnabled=!1,a.context.imageSmoothingEnabled=!1);Sa.prototype.__renderCanvas.call(this,a);b&&(a.context.mozImageSmoothingEnabled=!0,a.context.msImageSmoothingEnabled=!0,a.context.imageSmoothingEnabled=!0)}else Sa.prototype.__renderCanvas.call(this,a)},__renderDOM:function(a){fl.render(this,a)},__renderGL:function(a){this.__cacheAsBitmap?
this.__cacheGL(a):(null!=this.__scrollRect&&a.maskManager.pushRect(this.__scrollRect,this.__renderTransform),null!=this.__mask&&null!=this.__maskGraphics&&0<this.__maskGraphics.__commands.get_length()&&a.maskManager.pushMask(this),Ka.render(this,a),Hb.renderBitmap(this,a,this.__textEngine.antiAliasType!=md.ADVANCED||this.__textEngine.gridFitType!=gc.PIXEL),null!=this.__mask&&null!=this.__maskGraphics&&0<this.__maskGraphics.__commands.get_length()&&a.maskManager.popMask(),null!=this.__scrollRect&&
a.maskManager.popRect())},__startCursorTimer:function(){this.__cursorTimer=kc.delay(k(this,this.__startCursorTimer),600);this.__showCursor=!this.__showCursor;this.__dirty=!0},__startTextInput:function(){0>this.__caretIndex&&(this.__selectionIndex=this.__caretIndex=this.__textEngine.text.length);null!=this.stage&&(this.stage.window.backend.setEnableTextEvents(!0),this.__inputEnabled||(this.stage.window.backend.setEnableTextEvents(!0),this.stage.window.onTextInput.has(k(this,this.window_onTextInput))||
(this.stage.window.onTextInput.add(k(this,this.window_onTextInput)),this.stage.window.onKeyDown.add(k(this,this.window_onKeyDown))),this.__inputEnabled=!0,this.__startCursorTimer()))},__stopCursorTimer:function(){null!=this.__cursorTimer&&(this.__cursorTimer.stop(),this.__cursorTimer=null);this.__showCursor&&(this.__showCursor=!1,this.__dirty=!0)},__stopTextInput:function(){this.__inputEnabled&&null!=this.stage&&(this.stage.window.backend.setEnableTextEvents(!1),this.stage.window.onTextInput.remove(k(this,
this.window_onTextInput)),this.stage.window.onKeyDown.remove(k(this,this.window_onKeyDown)),this.__inputEnabled=!1,this.__stopCursorTimer())},__updateLayout:function(){if(this.__layoutDirty){this.__textEngine.update();if(this.__textEngine.autoSize!=ia.NONE){var a=this.__textEngine.width;switch(this.__textEngine.autoSize[1]){case 1:case 3:case 0:this.__textEngine.wordWrap||(this.__textEngine.width=this.__textEngine.textWidth+4),this.__textEngine.height=this.__textEngine.textHeight+4}if(this.__textEngine.width!=
a)switch(this.__textEngine.autoSize[1]){case 3:this.set_x(this.get_x()+(a-this.__textEngine.width));break;case 0:this.set_x(this.get_x()+(a-this.__textEngine.width)/2)}this.__textEngine.getBounds()}this.__layoutDirty=!1}},set_autoSize:function(a){a!=this.__textEngine.autoSize&&(this.__layoutDirty=this.__dirty=!0);return this.__textEngine.autoSize=a},set_backgroundColor:function(a){a!=this.__textEngine.backgroundColor&&(this.__dirty=!0);return this.__textEngine.backgroundColor=a},get_defaultTextFormat:function(){return this.__textFormat.clone()},
set_defaultTextFormat:function(a){this.__textFormat.__merge(a);this.__dirty=this.__layoutDirty=!0;return a},set_embedFonts:function(a){return this.__textEngine.embedFonts=a},get_height:function(){this.__updateLayout();return this.__textEngine.height},set_height:function(a){if(1!=this.get_scaleY()||a!=this.__textEngine.height)this.__transformDirty||(this.__transformDirty=!0,W.__worldTransformDirty++),this.__layoutDirty=this.__dirty=!0;this.set_scaleY(1);return this.__textEngine.height=a},get_htmlText:function(){return this.__textEngine.text},
set_htmlText:function(a){this.__isHTML&&this.__textEngine.text==a||(this.__layoutDirty=this.__dirty=!0);this.__isHTML=!0;if(null==this.__div){a=(new jc("<br>","g")).replace(a,"\n");a=(new jc("<br/>","g")).replace(a,"\n");var b=a.split("<font");if(1==b.length)a=(new jc("<.*?>","g")).replace(a,""),1<this.__textEngine.textFormatRanges.length&&this.__textEngine.textFormatRanges.splice(1,this.__textEngine.textFormatRanges.length-1),b=this.__textEngine.textFormatRanges[0],b.format=this.__textFormat,b.start=
0,b.end=a.length;else{this.__textEngine.textFormatRanges.splice(0,this.__textEngine.textFormatRanges.length);a="";for(var c=0;c<b.length;){var d=b[c];++c;if(""!=d){var e=d.indexOf("</font>");if(-1<e){var f=d.indexOf(">")+1,n=e,g=this.__textFormat.clone(),h=d.indexOf("face="),k=d.indexOf("color="),l=d.indexOf("size=");if(-1<h&&h<f){var m=d.indexOf('"',h);g.font=H.substr(d,h+6,m)}-1<k&&k<f&&(g.color=K.parseInt("0x"+H.substr(d,k+8,6)));-1<l&&l<f&&(g.size=K.parseInt(function(a){a=d.indexOf('"',l);return H.substr(d,
l+6,a)}(this)));f=d.substring(f,n);f=(new jc("<.*?>","g")).replace(f,"");this.__textEngine.textFormatRanges.push(new gf(g,a.length,a.length+f.length));a+=f;e+7<d.length&&(f=H.substr(d,e+7,null),this.__textEngine.textFormatRanges.push(new gf(this.__textFormat,a.length,a.length+f.length)),a+=f)}else this.__textEngine.textFormatRanges.push(new gf(this.__textFormat,a.length,a.length+d.length)),a+=d}}}}return this.__textEngine.text=a},get_multiline:function(){return this.__textEngine.multiline},set_multiline:function(a){a!=
this.__textEngine.multiline&&(this.__layoutDirty=this.__dirty=!0);return this.__textEngine.multiline=a},get_scrollH:function(){return this.__textEngine.scrollH},get_scrollV:function(){return this.__textEngine.scrollV},get_selectable:function(){return this.__textEngine.selectable},set_selectable:function(a){a!=this.__textEngine.selectable&&this.get_type()==Ic.INPUT&&(null!=this.stage&&this.stage.get_focus()==this?this.__startTextInput():a||this.__stopTextInput());return this.__textEngine.selectable=
a},get_text:function(){return this.__textEngine.text},set_text:function(a){if(this.__isHTML||this.__textEngine.text!=a)this.__layoutDirty=this.__dirty=!0;else return a;1<this.__textEngine.textFormatRanges.length&&this.__textEngine.textFormatRanges.splice(1,this.__textEngine.textFormatRanges.length-1);var b=this.__textEngine.textFormatRanges[0];b.format=this.__textFormat;b.start=0;b.end=a.length;this.__isHTML=!1;return this.__textEngine.text=a},set_textColor:function(a){a!=this.__textFormat.color&&
(this.__dirty=!0);for(var b=0,c=this.__textEngine.textFormatRanges;b<c.length;){var d=c[b];++b;d.format.color=a}return this.__textFormat.color=a},get_textWidth:function(){this.__updateLayout();return this.__textEngine.textWidth},get_textHeight:function(){this.__updateLayout();return this.__textEngine.textHeight},get_type:function(){return this.__textEngine.type},get_width:function(){this.__updateLayout();return this.__textEngine.width},set_width:function(a){if(1!=this.get_scaleX()||this.__textEngine.width!=
a)this.__transformDirty||(this.__transformDirty=!0,W.__worldTransformDirty++),this.__layoutDirty=this.__dirty=!0;this.set_scaleX(1);return this.__textEngine.width=a},set_wordWrap:function(a){a!=this.__textEngine.wordWrap&&(this.__layoutDirty=this.__dirty=!0);return this.__textEngine.wordWrap=a},stage_onMouseMove:function(a){null!=this.stage&&this.__textEngine.selectable&&0<=this.__selectionIndex&&(this.__updateLayout(),a=this.__getPosition(this.get_mouseX(),this.get_mouseY()),a!=this.__caretIndex&&
(this.__caretIndex=a,this.__dirty=!0))},stage_onMouseUp:function(a){if(null!=this.stage&&(this.stage.removeEventListener(F.MOUSE_MOVE,k(this,this.stage_onMouseMove)),this.stage.removeEventListener(F.MOUSE_UP,k(this,this.stage_onMouseUp)),this.stage.get_focus()==this)){this.__getWorldTransform();this.__updateLayout();this.__worldTransform.__transformInverseX(this.get_x(),this.get_y());this.__worldTransform.__transformInverseY(this.get_x(),this.get_y());var b=this.__getPosition(this.get_mouseX(),this.get_mouseY());
a=K["int"](Math.min(this.__selectionIndex,b));b=K["int"](Math.max(this.__selectionIndex,b));this.__selectionIndex=a;this.__caretIndex=b;this.__inputEnabled&&(this.this_onFocusIn(null),this.__stopCursorTimer(),this.__startCursorTimer())}},this_onFocusIn:function(a){this.get_selectable()&&this.get_type()==Ic.INPUT&&null!=this.stage&&this.stage.get_focus()==this&&this.__startTextInput()},this_onMouseDown:function(a){this.get_selectable()&&(this.__updateLayout(),this.__selectionIndex=this.__caretIndex=
this.__getPosition(this.get_mouseX(),this.get_mouseY()),this.__dirty=!0,this.stage.addEventListener(F.MOUSE_MOVE,k(this,this.stage_onMouseMove)),this.stage.addEventListener(F.MOUSE_UP,k(this,this.stage_onMouseUp)))},window_onKeyDown:function(a,b){switch(a){case 8:this.__selectionIndex==this.__caretIndex&&0<this.__caretIndex&&(this.__selectionIndex=this.__caretIndex-1);this.__selectionIndex!=this.__caretIndex&&(this.replaceSelectedText(""),this.__selectionIndex=this.__caretIndex,this.dispatchEvent(new v(v.CHANGE,
!0)));break;case 127:this.__selectionIndex==this.__caretIndex&&this.__caretIndex<this.__textEngine.text.length&&(this.__selectionIndex=this.__caretIndex+1);this.__selectionIndex!=this.__caretIndex&&(this.replaceSelectedText(""),this.__selectionIndex=this.__caretIndex,this.dispatchEvent(new v(v.CHANGE,!0)));break;case 1073741904:tb.get_shiftKey(b)?0<this.__caretIndex&&this.__caretIndex--:(this.__selectionIndex==this.__caretIndex?0<this.__caretIndex&&this.__caretIndex--:this.__caretIndex=K["int"](Math.min(this.__caretIndex,
this.__selectionIndex)),this.__selectionIndex=this.__caretIndex);this.__stopCursorTimer();this.__startCursorTimer();break;case 1073741903:tb.get_shiftKey(b)?this.__caretIndex<this.__textEngine.text.length&&this.__caretIndex++:(this.__selectionIndex==this.__caretIndex?this.__caretIndex<this.__textEngine.text.length&&this.__caretIndex++:this.__caretIndex=K["int"](Math.max(this.__caretIndex,this.__selectionIndex)),this.__selectionIndex=this.__caretIndex);this.__stopCursorTimer();this.__startCursorTimer();
break;case 99:64!=b&&128!=b||$e.set_text(this.__textEngine.text.substring(this.__caretIndex,this.__selectionIndex));break;case 120:if(64==b||128==b)$e.set_text(this.__textEngine.text.substring(this.__caretIndex,this.__selectionIndex)),this.__caretIndex!=this.__selectionIndex&&(this.replaceSelectedText(""),this.dispatchEvent(new v(v.CHANGE,!0)));break;case 118:if(64==b||128==b){var c=$e.get_text();null!=c?this.replaceSelectedText(c):this.replaceSelectedText("");this.dispatchEvent(new v(v.CHANGE,!0))}}},
window_onTextInput:function(a){this.replaceSelectedText(a);this.dispatchEvent(new v(v.CHANGE,!0))},__class__:Ma,__properties__:t(Sa.prototype.__properties__,{get_textHeight:"get_textHeight",get_textWidth:"get_textWidth",set_wordWrap:"set_wordWrap",get_type:"get_type",set_textColor:"set_textColor",set_text:"set_text",get_text:"get_text",set_selectable:"set_selectable",get_selectable:"get_selectable",get_scrollV:"get_scrollV",get_scrollH:"get_scrollH",set_multiline:"set_multiline",get_multiline:"get_multiline",
set_htmlText:"set_htmlText",get_htmlText:"get_htmlText",set_embedFonts:"set_embedFonts",set_defaultTextFormat:"set_defaultTextFormat",get_defaultTextFormat:"get_defaultTextFormat",set_backgroundColor:"set_backgroundColor",set_autoSize:"set_autoSize"})});var ea=function(a){this._baseFontSize=-1;null==a.font&&(a.font=kb.get_fontName());a.font;null==a.text&&(a.text="");a.text;null==a.fontSize&&(a.fontSize=11);a.fontSize;null==a.color&&(a.color=0);a.color;null==a.bold&&(a.bold=!0);a.bold;null==a.align&&
(a.align=T.LEFT);a.align;null==a.wordWrap&&(a.wordWrap=!0);a.wordWrap;null==a.autoSize&&(a.autoSize=ia.NONE);a.autoSize;null==a.maxWidth&&(a.maxWidth=-1);a.maxWidth;null==a.maxHeight&&(a.maxHeight=-1);a.maxHeight;null==a.leading&&(a.leading=null);a.leading;this.options=a;Ma.call(this);this._format=new jd(a.font,a.fontSize,a.color,a.bold);this._format.align=a.align;this._format.leading=a.leading;this.set_defaultTextFormat(this._format);this.set_autoSize(a.autoSize);this.set_text(P.replace(a.text,"\\n",
"\n"));null!=a.width?(this.set_autoSize(ia.NONE),this.set_width(a.width),this.set_multiline(!0),this.set_wordWrap(this.options.wordWrap)):this.set_width(this.get_textWidth()+5);this.set_height(this.get_textHeight()+5);null!=this.options.height&&this.set_height(this.options.height);this._multiline=this.get_multiline()};g["mc.system.ui.Label"]=ea;ea.__name__=["mc","system","ui","Label"];ea.__super__=Ma;ea.prototype=t(Ma.prototype,{_format:null,options:null,_baseFontSize:null,_multiline:null,setText:function(a){Ma.prototype.set_text.call(this,
P.replace(a,"\\n","\n"));this.set_height(this.get_textHeight()+5);null!=this.options.height&&this.set_height(this.options.height);var b=this.get_defaultTextFormat();if(-1!=this.options.maxWidth||-1!=this.options.maxHeight){0>this._baseFontSize&&(this._baseFontSize=y.__cast(b.size,Nb));b.size=this._baseFontSize;this.setTextFormat(b);if(this.get_textWidth()>=this.options.maxWidth-10&&0<this.options.maxWidth){var c=0<a.indexOf(" ");if(this._multiline&&c){var c="",d=new Ma;d.set_autoSize(ia.LEFT);d.set_text(a);
d.setTextFormat(b);for(var e="",f=1;;)if(d.get_textWidth()>=this.options.maxWidth){var n=d.get_text().lastIndexOf(" ");0<n?(""==e?(e=d.get_text().substring(n+1),f++):e=d.get_text().substring(n+1)+" "+e,d.set_text(d.get_text().substring(0,n)),d.setTextFormat(b)):(b.size=y.__cast(b.size-1,Nb),d.set_text(a),d.setTextFormat(b),c=e="",f=1)}else if(0<this.options.maxHeight&&d.get_textHeight()*f>this.options.maxHeight)b.size=y.__cast(b.size-1,Nb),d.set_text(a),d.setTextFormat(b),c=e="",f=c.split("\n").length+
1;else{c=""==c?d.get_text():c+"\n"+d.get_text();if(""==e)break;d.set_text(e);d.setTextFormat(b);e=""}Ma.prototype.set_text.call(this,c);this.setTextFormat(b)}else{for(;0<this.get_textWidth()&&this.get_textWidth()>=this.options.maxWidth-10&&0<this.options.maxWidth-10;)Ma.prototype.set_text.call(this,a),b.size=y.__cast(b.size-1,Nb),this.setTextFormat(b);if(-1!=this.options.maxHeight){for(;this.get_textHeight()>this.options.maxHeight;)Ma.prototype.set_text.call(this,a),b.size=y.__cast(b.size-1,Nb),this.setTextFormat(b);
this.set_height(this.options.maxHeight)}}}else if(-1!=this.options.maxHeight)for(;this.get_textHeight()>this.options.maxHeight;)Ma.prototype.set_text.call(this,a),b.size=y.__cast(b.size-1,Nb),this.setTextFormat(b);-1!=this.options.maxHeight?this.set_height(this.options.maxHeight):this.set_height(this.get_textHeight()+5);this.set_width(this.options.maxWidth)}else this.set_height(this.get_textHeight()+5);null==this.options.width&&this.set_width(this.get_textWidth()+5);null==this.options.height&&this.set_height(this.get_textHeight()+
5);return a},set_text:function(a){return this.setText(a)},__class__:ea});var jh=function(){var a=Xb.fetch("dialog-closebutton"),b=Xb.fetch("dialog-closebutton-disabled");this.upState=new Q(a);this.overState=new Q(b);this.downState=new Q(a);this.disabledState=new Q(b);la.call(this)};g["mc.system.ui.controls.CloseButton"]=jh;jh.__name__=["mc","system","ui","controls","CloseButton"];jh.__super__=la;jh.prototype=t(la.prototype,{__class__:jh});var yd=function(a,b,c,d,e){null==e&&(e=0);null==d&&(d=0);null==
c&&(c="left");C.call(this);this.padding=d;this.paddingTop=e;this.iconPosition=c;this.set_icon(b);this.label=new ea(a);null!=b&&(this.addChild(b),b.set_y(0));this.set_text(a.text);this.set_textAlign(a.align);this.addChild(this.label);this.label.addEventListener(v.ADDED_TO_STAGE,k(this,this.onAdded));this.addEventListener(v.ADDED_TO_STAGE,k(this,this.onAdded))};g["mc.system.ui.controls.IconLabel"]=yd;yd.__name__=["mc","system","ui","controls","IconLabel"];yd.__super__=C;yd.prototype=t(C.prototype,{label:null,
icon:null,get_icon:function(){return this.icon},set_icon:function(a){null==a&&null!=this.get_icon()&&this.removeChild(this.get_icon());return this.icon=a},iconPosition:null,padding:null,paddingTop:null,text:null,get_text:function(){return this.text},set_text:function(a){this.updateLabelText(a);return this.text=a},textAlign:null,get_textAlign:function(){return this.textAlign},set_textAlign:function(a){this.label.get_defaultTextFormat().align=a;this.updateLabelText(this.get_text());return this.textAlign=
a},onAdded:function(a){this.updateLabelText(this.get_text())},updateLabelText:function(a){this.label.set_text(a);this.updatePosition()},updatePosition:function(){if(null!=this.parent){this.label.set_y(0);switch(this.get_textAlign()[1]){case 3:this.label.set_x((this.parent.get_width()-this.label.get_width())/2);break;case 1:this.label.set_x(this.parent.get_width()-this.label.get_width()-5);break;default:this.label.set_x(5)}this.positionIcon()}},positionIcon:function(){if(null!=this.get_icon()){if("right"==
this.iconPosition.toLowerCase()){var a=this.label;a.set_x(a.get_x()-this.get_icon().get_width()/2);this.get_icon().set_x(this.label.get_x()+this.label.get_width()+this.padding)}else a=this.label,a.set_x(a.get_x()+this.get_icon().get_width()/2),this.get_icon().set_x(this.label.get_x()-this.get_icon().get_width()-this.padding);this.get_icon().set_y(this.label.get_y()+(this.label.get_height()-this.get_icon().get_height())/2+this.paddingTop)}},__class__:yd,__properties__:t(C.prototype.__properties__,
{set_textAlign:"set_textAlign",get_textAlign:"get_textAlign",set_text:"set_text",get_text:"get_text",set_icon:"set_icon",get_icon:"get_icon"})});var Jf=function(a){C.call(this);null==a.labelOptions.autoSize&&(a.labelOptions.autoSize=ia.LEFT);a.labelOptions.autoSize;this.label=new ea(a.labelOptions);this.label.set_selectable(!1);this.label.mouseEnabled=!1;this.shape=new Da;this.shape.get_graphics().beginFill(a.backgroundColor,1);this.shape.get_graphics().drawRoundRect(0,0,a.labelWidth,a.labelHeight,
a.radius,a.radius);this.shape.get_graphics().endFill();this.addChild(this.shape);this.addChild(this.label);this.label.addEventListener(v.ADDED_TO_STAGE,k(this,this.onAdded))};g["mc.system.ui.controls.LabelRectangle"]=Jf;Jf.__name__=["mc","system","ui","controls","LabelRectangle"];Jf.__super__=C;Jf.prototype=t(C.prototype,{shape:null,label:null,onAdded:function(a){this.removeEventListener(v.ADDED_TO_STAGE,k(this,this.onAdded));this.doLayout()},doLayout:function(){this.label.set_x((this.shape.get_width()-
this.label.get_width())/2);this.label.set_y((this.shape.get_height()-this.label.get_height())/2)},__class__:Jf});var mh=function(a){this.currentPage=this.itemWidth=this.itemsPerPage=this.totalPages=0;this.spacing=4;null==a.name&&(a.name="paginated_control");a.name;null==a.w&&(a.w=100);a.w;null==a.h&&(a.h=100);a.h;this.options=a;this.S_onChange=new Cb;Xa.call(this,this.options);this.items=[];this.container=new Xa({name:""+this.get_name()+".container"});this.addChild(this.container);this.set_size(this.w,
this.h)};g["mc.system.ui.controls.PaginatedContainer"]=mh;mh.__name__=["mc","system","ui","controls","PaginatedContainer"];mh.__super__=Xa;mh.prototype=t(Xa.prototype,{container:null,items:null,options:null,clipMask:null,spacing:null,currentPage:null,typicalItem:null,itemWidth:null,itemsPerPage:null,totalPages:null,S_onChange:null,addItem:function(a){0==this.items.length&&null==this.typicalItem&&(this.typicalItem=a);this.items.push(a);this.update_layout();return a},empty:function(){for(;0<this.container.get_numChildren();)this.container.removeChildAt(0);
this.items=[]},update_layout:function(){this.itemWidth=this.typicalItem.w+this.spacing;this.itemsPerPage=Math.floor(this.w/this.itemWidth);this.totalPages=Math.ceil(this.items.length/this.itemsPerPage);for(var a=this.currentPage*this.itemsPerPage,b=0,c=this.itemsPerPage;b<c;){var d=b++,d=a+d;if(d>=this.items.length)break;var e=this.items[d];this.container.contains(e)||this.container.addChild(e);e.set_x(1+d*this.itemWidth);e.set_y(0)}a=Math.round(-a*this.itemWidth);ga.tween(this.container,.5,{x:a})},
next_page:function(){this.set_page(this.currentPage+1);this.S_onChange.dispatch()},previous_page:function(){this.set_page(this.currentPage-1);this.S_onChange.dispatch()},set_page:function(a){0>a||a>=this.totalPages||(this.currentPage=a,this.update_layout())},update_clip_mask:function(){if(null==this.clipMask||this.clipMask.get_width()!=this.w||this.clipMask.get_height()!=this.h)null!=this.clipMask?(this.contains(this.clipMask)&&this.removeChild(this.clipMask),this.clipMask.get_graphics().clear()):
this.clipMask=new Da,this.clipMask.get_graphics().beginFill(16711935,.3),this.clipMask.get_graphics().drawRect(0,0,this.w,this.h+1),this.clipMask.get_graphics().endFill(),this.clipMask.set_y(-1),this.addChild(this.clipMask),this.set_mask(this.clipMask)},set_size:function(a,b){Xa.prototype.set_size.call(this,a,b);this.update_clip_mask()},__class__:mh});var nh=function(){this.totalPages=1;this.visiblePages=5;this.currentPage=0;this.spacing=10;this.firstPage=0;Xa.call(this,{name:"pagination_control"});
this.itemPool=[];this.S_onChange=new Cb;this.addEventListener(v.ADDED_TO_STAGE,k(this,this.onAddedToStage))};g["mc.system.ui.controls.PaginationControl"]=nh;nh.__name__=["mc","system","ui","controls","PaginationControl"];nh.__super__=Xa;nh.prototype=t(Xa.prototype,{firstPage:null,spacing:null,currentPage:null,visiblePages:null,totalPages:null,paginationItemClass:null,itemPool:null,gotoFirstButton:null,gotoLastButton:null,gotoNextButton:null,gotoPreviousButton:null,S_onChange:null,hideArrows:function(){this.hideLeft();
this.hideRight()},hideRight:function(){this.gotoLastButton.set_enabled(!1);this.gotoLastButton.set_alpha(.6);this.gotoNextButton.set_enabled(!1);this.gotoNextButton.set_alpha(.6)},hideLeft:function(){this.gotoFirstButton.set_enabled(!1);this.gotoFirstButton.set_alpha(.6);this.gotoPreviousButton.set_enabled(!1);this.gotoPreviousButton.set_alpha(.6)},showArrows:function(){this.showLeft();this.showRight()},showRight:function(){this.gotoLastButton.set_enabled(!0);this.gotoLastButton.set_alpha(1);this.gotoNextButton.set_enabled(!0);
this.gotoNextButton.set_alpha(1)},showLeft:function(){this.gotoFirstButton.set_enabled(!0);this.gotoFirstButton.set_alpha(1);this.gotoPreviousButton.set_enabled(!0);this.gotoPreviousButton.set_alpha(1)},onAddedToStage:function(a){this.removeEventListener(v.ADDED_TO_STAGE,k(this,this.onAddedToStage));this.addEventListener(v.REMOVED_FROM_STAGE,k(this,this.onRemovedFromStage));this.update()},onRemovedFromStage:function(a){this.addEventListener(v.ADDED_TO_STAGE,k(this,this.onAddedToStage))},update:function(){if(null!=
this.stage){for(var a=Math.round(Math.max(this.firstPage,Math.ceil(this.currentPage-this.visiblePages/2))),b=Math.round(Math.min(this.totalPages,a+this.visiblePages-1)),a=Math.round(Math.max(this.firstPage,Math.min(a,b-this.visiblePages+1)));0<this.get_numChildren();)this.removeChildAt(0);null!=this.gotoFirstButton&&(this.addChild(this.gotoFirstButton),this.gotoFirstButton.set_selected(!1),this.gotoFirstButton.addEventListener(F.CLICK,k(this,this.onFirstButtonClick)));null!=this.gotoPreviousButton&&
(this.addChild(this.gotoPreviousButton),this.gotoPreviousButton.set_selected(!1),this.gotoPreviousButton.addEventListener(F.CLICK,k(this,this.onPreviousButtonClick)));for(var c=a;c<b;){var d=c++,e;d>=this.itemPool.length?(e=Qa.createInstance(this.paginationItemClass,[]),this.itemPool.push(e)):e=this.itemPool[d];e.set_name(""+d);d==b-1&&e.set_name(""+(this.totalPages-1));var f=this.addChild(e);f.set_selected(d==this.currentPage);f.setText(""+(K.parseInt(e.get_name())+1));e.addEventListener(F.CLICK,
k(this,this.handlePageClick))}null!=this.gotoNextButton&&(this.addChild(this.gotoNextButton),this.gotoNextButton.set_selected(!1),this.gotoNextButton.addEventListener(F.CLICK,k(this,this.onNextButtonClick)));null!=this.gotoLastButton&&(this.addChild(this.gotoLastButton),this.gotoLastButton.set_selected(!1),this.gotoLastButton.addEventListener(F.CLICK,k(this,this.onLastButtonClick)));this.showArrows();1==this.totalPages?(this.hideLeft(),this.hideRight()):this.currentPage==a?this.hideLeft():this.currentPage==
b-1&&this.hideRight();this.update_layout()}},onFirstButtonClick:function(a){this.set_currentPage(0);this.S_onChange.dispatch()},onLastButtonClick:function(a){this.set_currentPage(this.totalPages-1);this.S_onChange.dispatch()},onPreviousButtonClick:function(a){a=this.currentPage;this.set_currentPage(a-1);a;this.S_onChange.dispatch()},onNextButtonClick:function(a){a=this.currentPage;this.set_currentPage(a+1);a;this.S_onChange.dispatch()},handlePageClick:function(a){a=K.parseInt(a.currentTarget.get_name());
this.set_currentPage(a);this.S_onChange.dispatch()},update_layout:function(){for(var a=0,b=0,c=this.get_numChildren();b<c;)b++,a=Math.max(a,this.getChildAt(0).get_height());for(var b=0,d,c=0,e=this.get_numChildren();c<e;)d=c++,d=this.getChildAt(d),d.set_x(b),d.set_y(.5*(a-d.get_height())),b+=d.get_width()+this.spacing},set_totalPages:function(a){this.totalPages=a;this.update();return this.totalPages},set_visiblePages:function(a){this.visiblePages=a;this.update();return a},set_currentPage:function(a){if(0>
a||a>=this.totalPages)return this.currentPage;this.currentPage=a;this.update();return a},set_spacing:function(a){this.spacing=a;this.update();return a},__class__:nh,__properties__:t(Xa.prototype.__properties__,{set_totalPages:"set_totalPages",set_visiblePages:"set_visiblePages",set_currentPage:"set_currentPage",set_spacing:"set_spacing"})});var kk=function(){};g["mc.utils.ArrayUtil"]=kk;kk.__name__=["mc","utils","ArrayUtil"];kk.indexOf=function(a,b){for(var c=0,d=a.length;c<d;){var e=c++;if(a[e]==
b)return e}return-1};var se=function(){};g["mc.utils.ByteConversions"]=se;se.__name__=["mc","utils","ByteConversions"];se.byteArrayToBytes=function(a){for(var b=gb.alloc(a.length),c=0,d=a.length;c<d;){var e=c++;b.set(e,a.data.getInt8(e))}return b};se.bytesToByteArray=function(a){return Ta.fromBytes(a)};se.arrayBufferToBytes=function(a){return se.byteArrayToBytes(Ta.__ofBuffer(a))};var hf=function(a,b){null==b&&(b=0);if(isNaN(a)||0>a)throw new m(new zc("The delay specified is negative or not a finite number"));
ba.call(this);this.__delay=a;this.set_repeatCount(b);this.running=!1;this.currentCount=0};g["openfl.utils.Timer"]=hf;hf.__name__=["openfl","utils","Timer"];hf.__super__=ba;hf.prototype=t(ba.prototype,{currentCount:null,repeatCount:null,running:null,__delay:null,__timerID:null,start:function(){this.running||(this.running=!0,this.__timerID=window.setInterval(k(this,this.timer_onTimer),this.__delay|0))},stop:function(){this.running=!1;null!=this.__timerID&&(window.clearInterval(this.__timerID),this.__timerID=
null)},set_repeatCount:function(a){this.running&&0!=a&&a<=this.currentCount&&this.stop();return this.repeatCount=a},timer_onTimer:function(){this.currentCount++;0<this.repeatCount&&this.currentCount>=this.repeatCount?(this.stop(),this.dispatchEvent(new tc(tc.TIMER)),this.dispatchEvent(new tc(tc.TIMER_COMPLETE))):this.dispatchEvent(new tc(tc.TIMER))},__class__:hf,__properties__:{set_repeatCount:"set_repeatCount"}});var Sh=function(a,b){null==b&&(b=0);this.data={};hf.call(this,a,b)};g["mc.utils.DataTimer"]=
Sh;Sh.__name__=["mc","utils","DataTimer"];Sh.__super__=hf;Sh.prototype=t(hf.prototype,{data:null,__class__:Sh});var Pb=g["mc.utils.PicSize"]={__ename__:!0,__constructs__:["Small","Square","Normal","Large","Custom"]};Pb.Small=["Small",0];Pb.Small.toString=u;Pb.Small.__enum__=Pb;Pb.Square=["Square",1];Pb.Square.toString=u;Pb.Square.__enum__=Pb;Pb.Normal=["Normal",2];Pb.Normal.toString=u;Pb.Normal.__enum__=Pb;Pb.Large=["Large",3];Pb.Large.toString=u;Pb.Large.__enum__=Pb;Pb.Custom=function(a,b){var c=
["Custom",4,a,b];c.__enum__=Pb;c.toString=u;return c};var sl=function(){};g["mc.utils.FBUtils"]=sl;sl.__name__=["mc","utils","FBUtils"];sl.getFBProfilePic=function(a,b){var c,d="";switch(b[1]){case 0:c="small";break;case 2:c="normal";break;case 3:c="large";break;case 1:c="square";break;case 4:var d=b[3],e=b[2];c="normal";d="&width="+e+"&height="+d}return"https://graph.facebook.com/"+a+"/picture?type="+c+d};var rc=function(){};g["mc.utils.MCGraphics"]=rc;rc.__name__=["mc","utils","MCGraphics"];rc.drawRoundRectComplex=
function(a,b,c,d,e,f,n,g,h){a.moveTo(b+f,c);a.lineTo(b+d-n,c);a.curveTo(b+d,c,d,c+n);a.lineTo(b+d,c+e-h);a.curveTo(b+d,c+e,b+d-h,c+e);a.lineTo(b+g,c+e);a.curveTo(b,c+e,b,c+e-g);a.lineTo(b,c+f);a.curveTo(b,c,b+f,c)};var El=function(){};g["mc.utils.MacroUtils"]=El;El.__name__=["mc","utils","MacroUtils"];var ef=function(){};g["mc.utils.Maths"]=ef;ef.__name__=["mc","utils","Maths"];ef.fixed=function(a,b){var c=Math.pow(10,b);return(a*c|0)/c};ef.clamp=function(a,b,c){return a<b?b:a>c?c:a};ef.prototype=
{__class__:ef};var je=function(){};g["mc.utils.ObjectUtility"]=je;je.__name__=["mc","utils","ObjectUtility"];je.copyProperties=function(a,b,c){for(var d=0,e=G.fields(a);d<e.length;){var f=e[d];++d;null!=c&&-1!=H.indexOf(c,f,0)||G.setProperty(b,f,G.field(a,f))}};je.mergeObjects=function(a,b){var c=je.cloneObject(a);je.copyProperties(b,c);return c};je.cloneObject=function(a){var b={};je.copyProperties(a,b);return b};var Ua=function(){throw new m(new zc("StringUtility is a static class. It should not be instantiated"));
};g["mc.utils.StringUtility"]=Ua;Ua.__name__=["mc","utils","StringUtility"];Ua.compareStrings=function(a,b){if(null==a)return-1;if(null==b)return 1;a=a.toLowerCase();b=b.toLowerCase();return a<b?-1:a>b?1:0};Ua.isEmpty=function(a){return null==a||""==a};Ua.isBlank=function(a){return null==a||""==a||!(new jc("\\S","")).match(a)};Ua.formatNumber=function(a,b,c){null==c&&(c=",");if(null==b||""==b)return null==a?"null":""+a;if(null!=b)switch(b){case "n":return Ua.commaSeperateThousands(a,c);case "p":return Ua.formatPercentage(a)}c=
b.indexOf(".");return 0<=c?Ua.formatInteger(Math.floor(a),H.substr(b,0,c))+"."+Ua.formatNumberDecimal(a,H.substr(b,c+1,null)):Ua.formatInteger(Math.floor(a),b)};Ua.commaSeperateThousands=function(a,b){null==b&&(b=",");var c=K.string(Math.abs(a)),d=c.indexOf("."),e="";0<=d&&(e="."+H.substr(c,d,null),c=H.substr(c,0,d));for(var d=c.length,f=Math.floor((d-1)/3),n=0;n<f;)var g=n++,e=b+H.substr(c,d-3*(g+1),3)+e;e=H.substr(c,0,d-3*f)+e;0>a&&(e="-"+e);return e};Ua.formatInteger=function(a,b){for(var c=K.string(Math.floor(Math.abs(a))),
d=c.length-1,e="",f=0,n=b.length;f<n;){var g=f++,g=b.charAt(b.length-g-1);switch(g){case "#":0<=d&&(e=c.charAt(d)+e,d--);break;case "0":e=0<=d?c.charAt(d)+e:g+e;d--;break;default:e=g+e}}0<=d&&(e=H.substr(c,0,d+1)+e);0>a&&(e="-"+e);return e};Ua.formatNumberDecimal=function(a,b){var c;c=null==a?"null":""+a;var d=c.indexOf(".");c=0>d?"":H.substr(c,d+1,null);for(var d=c.length,e=0,f="",n=0,g=b.length;n<g;){var h=n++,h=b.charAt(h);switch(h){case "#":e<d&&(f+=c.charAt(e),e++);break;case "0":f=e<d?f+c.charAt(e):
f+h;e++;break;default:f=h+f}}return f};Ua.formatPercentage=function(a){return Math.round(100*a)+"%"};Ua.formatTime=function(a){var b=a%60;return Math.floor(a/60)+":"+(10>b?"0"+b:null==b?"null":""+b)};Ua.formatFloat=function(a,b){null==b&&(b=-1);if(0<=b){var c=K["int"](Math.pow(10,b));a=Math.round(a*c)/c}return null==a?"null":""+a};Ua.prototype={__class__:Ua};var mk=function(){this._storage=new ka};g["mc.utils.WarehouseInstance"]=mk;mk.__name__=["mc","utils","WarehouseInstance"];mk.prototype={_storage:null,
store:function(a,b){this._storage.set(a,b);return b},fetch:function(a){null==this._storage.get(a)&&Ia.trace("no object found with handle '"+a+"'",{fileName:"Warehouse.hx",lineNumber:30,className:"mc.utils.WarehouseInstance",methodName:"fetch"});return this._storage.get(a)},"delete":function(a){this._storage.remove(a)||Ia.trace("no object found with handle '"+a+"'",{fileName:"Warehouse.hx",lineNumber:42,className:"mc.utils.WarehouseInstance",methodName:"delete"})},__class__:mk};var Xb=function(){};
g["mc.utils.Warehouse"]=Xb;Xb.__name__=["mc","utils","Warehouse"];Xb.store=function(a,b){return Xb._store.store(a,b)};Xb.fetch=function(a){return Xb._store.fetch(a)};Xb["delete"]=function(a){Xb._store["delete"](a)};var ri=function(){};g["motion.actuators.IGenericActuator"]=ri;ri.__name__=["motion","actuators","IGenericActuator"];ri.prototype={stop:null,__class__:ri};var Jd=function(a,b,c){this._autoVisible=!0;this._delay=0;this._reflect=!1;this._repeat=0;this.special=this._snapping=this._smartRotation=
this._reverse=!1;this.target=a;this.properties=c;this.duration=b;this._ease=ga.defaultEase};g["motion.actuators.GenericActuator"]=Jd;Jd.__name__=["motion","actuators","GenericActuator"];Jd.__interfaces__=[ri];Jd.prototype={duration:null,id:null,properties:null,target:null,_autoVisible:null,_delay:null,_ease:null,_onComplete:null,_onCompleteParams:null,_onRepeat:null,_onRepeatParams:null,_onUpdate:null,_onUpdateParams:null,_onResume:null,_onResumeParams:null,_onPause:null,_onPauseParams:null,_reflect:null,
_repeat:null,_reverse:null,_smartRotation:null,_snapping:null,special:null,apply:function(){for(var a=0,b=G.fields(this.properties);a<b.length;){var c=b[a];++a;Object.prototype.hasOwnProperty.call(this.target,c)?G.setField(this.target,c,G.field(this.properties,c)):G.setProperty(this.target,c,G.field(this.properties,c))}},autoVisible:function(a){null==a&&(a=!0);this._autoVisible=a;return this},callMethod:function(a,b){null==b&&(b=[]);return G.callMethod(a,a,b)},change:function(){null!=this._onUpdate&&
this.callMethod(this._onUpdate,this._onUpdateParams)},complete:function(a){null==a&&(a=!0);a&&(this.change(),null!=this._onComplete&&this.callMethod(this._onComplete,this._onCompleteParams));ga.unload(this)},delay:function(a){this._delay=a;return this},ease:function(a){this._ease=a;return this},move:function(){},onComplete:function(a,b){this._onComplete=a;this._onCompleteParams=null==b?[]:b;0==this.duration&&this.complete();return this},onRepeat:function(a,b){this._onRepeat=a;this._onRepeatParams=
null==b?[]:b;return this},onUpdate:function(a,b){this._onUpdate=a;this._onUpdateParams=null==b?[]:b;return this},onPause:function(a,b){this._onPause=a;this._onPauseParams=null==b?[]:b;return this},onResume:function(a,b){this._onResume=a;this._onResumeParams=null==b?[]:b;return this},pause:function(){null!=this._onPause&&this.callMethod(this._onPause,this._onPauseParams)},reflect:function(a){null==a&&(a=!0);this._reflect=a;this.special=!0;return this},repeat:function(a){null==a&&(a=-1);this._repeat=
a;return this},resume:function(){null!=this._onResume&&this.callMethod(this._onResume,this._onResumeParams)},reverse:function(a){null==a&&(a=!0);this._reverse=a;this.special=!0;return this},smartRotation:function(a){null==a&&(a=!0);this._smartRotation=a;this.special=!0;return this},snapping:function(a){null==a&&(a=!0);this._snapping=a;this.special=!0;return this},stop:function(a,b,c){},__class__:Jd};var ya=function(a,b,c){this.active=!0;this.propertyDetails=[];this.toggleVisible=this.setVisible=this.initialized=
this.cacheVisible=this.paused=this.sendChange=!1;this.startTime=ja.getTimer()/1E3;Jd.call(this,a,b,c);ya.addedEvent||(ya.addedEvent=!0,ja.current.stage.addEventListener(v.ENTER_FRAME,ya.stage_onEnterFrame))};g["motion.actuators.SimpleActuator"]=ya;ya.__name__=["motion","actuators","SimpleActuator"];ya.stage_onEnterFrame=function(a){a=ja.getTimer()/1E3;for(var b,c=0,d=0,e=ya.actuatorsLength;d<e;)d++,b=ya.actuators[c],null!=b&&b.active?(a>=b.timeOffset&&b.update(a),c++):(ya.actuators.splice(c,1),--ya.actuatorsLength)};
ya.__super__=Jd;ya.prototype=t(Jd.prototype,{setField_openfl_geom_Transform:function(a,b,c){Object.prototype.hasOwnProperty.call(a,b)?a[b]=c:G.setProperty(a,b,c)},setField_motion_actuators_TransformActuator_T:function(a,b,c){Object.prototype.hasOwnProperty.call(a,b)?a[b]=c:G.setProperty(a,b,c)},setField_motion_actuators_MotionPathActuator_T:function(a,b,c){Object.prototype.hasOwnProperty.call(a,b)?a[b]=c:G.setProperty(a,b,c)},setField_openfl_display_DisplayObject:function(a,b,c){Object.prototype.hasOwnProperty.call(a,
b)?a[b]=c:G.setProperty(a,b,c)},setField_motion_actuators_SimpleActuator_T:function(a,b,c){Object.prototype.hasOwnProperty.call(a,b)?a[b]=c:G.setProperty(a,b,c)},timeOffset:null,active:null,cacheVisible:null,detailsLength:null,initialized:null,paused:null,pauseTime:null,propertyDetails:null,sendChange:null,setVisible:null,startTime:null,toggleVisible:null,autoVisible:function(a){null==a&&(a=!0);this._autoVisible=a;a||(this.toggleVisible=!1,this.setVisible&&this.setField_motion_actuators_SimpleActuator_T(this.target,
"visible",this.cacheVisible));return this},delay:function(a){this._delay=a;this.timeOffset=this.startTime+a;return this},getField:function(a,b){var c=null;return c=Object.prototype.hasOwnProperty.call(a,b)?G.field(a,b):G.getProperty(a,b)},initialize:function(){for(var a,b=0,c=G.fields(this.properties);b<c.length;){var d=c[b];++b;var e=!0;!Object.prototype.hasOwnProperty.call(this.target,d)||this.target.__properties__&&this.target.__properties__["set_"+d]?(e=!1,a=G.getProperty(this.target,d)):a=G.field(this.target,
d);if("number"==typeof a){var f=this.getField(this.properties,d);null==a&&(a=0);null==f&&(f=0);a=new Jc(this.target,d,a,f-a,e);this.propertyDetails.push(a)}}this.detailsLength=this.propertyDetails.length;this.initialized=!0},move:function(){(this.toggleVisible=Object.prototype.hasOwnProperty.call(this.properties,"alpha")&&y.__instanceof(this.target,W))&&0!=this.properties.alpha&&!this.getField(this.target,"visible")&&(this.setVisible=!0,this.cacheVisible=this.getField(this.target,"visible"),this.setField_motion_actuators_SimpleActuator_T(this.target,
"visible",!0));this.timeOffset=this.startTime;ya.actuators.push(this);++ya.actuatorsLength},onUpdate:function(a,b){this._onUpdate=a;this._onUpdateParams=null==b?[]:b;this.sendChange=!0;return this},pause:function(){this.paused||(this.paused=!0,Jd.prototype.pause.call(this),this.pauseTime=ja.getTimer())},resume:function(){this.paused&&(this.paused=!1,this.timeOffset+=(ja.getTimer()-this.pauseTime)/1E3,Jd.prototype.resume.call(this))},setProperty:function(a,b){a.isField?a.target[a.propertyName]=b:G.setProperty(a.target,
a.propertyName,b)},stop:function(a,b,c){if(this.active)if(null==a)this.active=!1,b&&this.apply(),this.complete(c);else{var d=0;for(a=G.fields(a);d<a.length;){var e=a[d];++d;if(Object.prototype.hasOwnProperty.call(this.properties,e)){this.active=!1;b&&this.apply();this.complete(c);break}}}},update:function(a){if(!this.paused){var b,c,d=(a-this.timeOffset)/this.duration;1<d&&(d=1);this.initialized||this.initialize();if(this.special){c=this._reverse?this._ease.calculate(1-d):this._ease.calculate(d);
for(var e,f=0,n=this.detailsLength;f<n;)b=f++,b=this.propertyDetails[b],!this._smartRotation||"rotation"!=b.propertyName&&"rotationX"!=b.propertyName&&"rotationY"!=b.propertyName&&"rotationZ"!=b.propertyName?e=b.start+b.change*c:(e=b.change%360,180<e?e-=360:-180>e&&(e+=360),e=b.start+e*c),this._snapping?this.setProperty(b,Math.round(e)):b.isField?b.target[b.propertyName]=e:G.setProperty(b.target,b.propertyName,e)}else for(c=this._ease.calculate(d),f=0,n=this.detailsLength;f<n;)b=f++,b=this.propertyDetails[b],
this.setProperty(b,b.start+b.change*c);if(1==d){if(0==this._repeat){this.active=!1;this.toggleVisible&&0==this.getField(this.target,"alpha")&&this.setField_motion_actuators_SimpleActuator_T(this.target,"visible",!1);this.complete(!0);return}null!=this._onRepeat&&this.callMethod(this._onRepeat,this._onRepeatParams);this._reflect&&(this._reverse=!this._reverse);this.startTime=a;this.timeOffset=this.startTime+this._delay;0<this._repeat&&this._repeat--}this.sendChange&&this.change()}},__class__:ya});
var nk=function(){};g["motion.easing.Expo"]=nk;nk.__name__=["motion","easing","Expo"];nk.__properties__={get_easeOut:"get_easeOut"};nk.get_easeOut=function(){return new si};var ti=function(){};g["motion.easing.IEasing"]=ti;ti.__name__=["motion","easing","IEasing"];ti.prototype={calculate:null,__class__:ti};var si=function(){};g["motion.easing.ExpoEaseOut"]=si;si.__name__=["motion","easing","ExpoEaseOut"];si.__interfaces__=[ti];si.prototype={calculate:function(a){return 1==a?1:1-Math.pow(2,-10*a)},
__class__:si};var ga=function(){};g["motion.Actuate"]=ga;ga.__name__=["motion","Actuate"];ga.apply=function(a,b,c){ga.stop(a,b);null==c&&(c=ga.defaultActuator);a=Qa.createInstance(c,[a,0,b]);a.apply();return a};ga.getLibrary=function(a,b){null==b&&(b=!0);null==ga.targetLibraries.h.__keys__[a.__id__]&&b&&ga.targetLibraries.set(a,[]);return ga.targetLibraries.h[a.__id__]};ga.motionPath=function(a,b,c,d){null==d&&(d=!0);return ga.tween(a,b,c,d,ui)};ga.stop=function(a,b,c,d){null==d&&(d=!0);null==c&&
(c=!1);if(null!=a)if(y.__instanceof(a,ri))a.stop(null,c,d);else if(a=ga.getLibrary(a,!1),null!=a){if("string"==typeof b){var e={};G.setField(e,b,null);b=e}else if(b instanceof Array&&null==b.__enum__){var e={},f=0;for(b=y.__cast(b,Array);f<b.length;){var n=b[f];++f;G.setField(e,n,null)}b=e}for(e=a.length-1;0<=e;)a[e].stop(b,c,d),e--}};ga.timer=function(a,b){return ga.tween(new vi(0),a,new vi(1),!1,b)};ga.tween=function(a,b,c,d,e){null==d&&(d=!0);if(null!=a){if(0<b){null==e&&(e=ga.defaultActuator);
a=Qa.createInstance(e,[a,b,c]);b=ga.getLibrary(a.target);if(d){for(d=b.length-1;0<=d;)b[d].stop(a.properties,!1,!1),d--;b=ga.getLibrary(a.target)}b.push(a);a.move();return a}return ga.apply(a,c,e)}return null};ga.unload=function(a){var b=a.target;null!=ga.targetLibraries.h.__keys__[b.__id__]&&(H.remove(ga.targetLibraries.h[b.__id__],a),0==ga.targetLibraries.h[b.__id__].length&&ga.targetLibraries.remove(b))};ga.update=function(a,b,c,d,e){null==e&&(e=!0);return ga.tween(a,b,{start:c,end:d},e,wi)};var vi=
function(a){this.progress=a};g["motion._Actuate.TweenTimer"]=vi;vi.__name__=["motion","_Actuate","TweenTimer"];vi.prototype={progress:null,__class__:vi};var nj=function(){this._x=new hg;this._y=new hg;this._rotation=null};g["motion.MotionPath"]=nj;nj.__name__=["motion","MotionPath"];nj.prototype={_rotation:null,_x:null,_y:null,bezier:function(a,b,c,d,e){null==e&&(e=1);this._x.addPath(new xi(a,c,e));this._y.addPath(new xi(b,d,e));return this},get_x:function(){return this._x},get_y:function(){return this._y},
__class__:nj,__properties__:{get_y:"get_y",get_x:"get_x"}};var le=function(){};g["motion.IComponentPath"]=le;le.__name__=["motion","IComponentPath"];le.prototype={get_end:null,start:null,calculate:null,__class__:le,__properties__:{get_end:"get_end"}};var hg=function(){this.paths=[];this.totalStrength=this.start=0};g["motion.ComponentPath"]=hg;hg.__name__=["motion","ComponentPath"];hg.__interfaces__=[le];hg.prototype={start:null,paths:null,totalStrength:null,addPath:function(a){this.paths.push(a);
this.totalStrength+=a.strength},calculate:function(a){if(1==this.paths.length)return this.paths[0].calculate(this.start,a);a*=this.totalStrength;for(var b=this.start,c=0,d=this.paths;c<d.length;){var e=d[c];++c;if(a>e.strength)a-=e.strength,b=e.end;else return e.calculate(b,a/e.strength)}return 0},get_end:function(){return 0<this.paths.length?this.paths[this.paths.length-1].end:this.start},__class__:hg,__properties__:{get_end:"get_end"}};var xi=function(a,b,c){this.end=a;this.control=b;this.strength=
c};g["motion.BezierPath"]=xi;xi.__name__=["motion","BezierPath"];xi.prototype={control:null,end:null,strength:null,calculate:function(a,b){return(1-b)*(1-b)*a+2*(1-b)*b*this.control+b*b*this.end},__class__:xi};var ok=function(){this.step=.01};g["motion.RotationPath"]=ok;ok.__name__=["motion","RotationPath"];ok.__interfaces__=[le];ok.prototype={offset:null,start:null,step:null,_x:null,_y:null,calculate:function(a){var b=this._x.calculate(a)-this._x.calculate(a+this.step);a=this._y.calculate(a)-this._y.calculate(a+
this.step);b=Math.atan2(a,b)*(180/Math.PI);return b=(b+this.offset)%360},get_end:function(){return this.calculate(1)},__class__:ok,__properties__:{get_end:"get_end"}};var pk=function(a,b,c){this.filterIndex=-1;ya.call(this,a,b,c);if(y.__instanceof(c.filter,wl))for(this.filterClass=c.filter,0==a.get_filters().length&&a.set_filters([Qa.createInstance(this.filterClass,[])]),b=0,a=a.get_filters();b<a.length;)c=a[b],++b,y.__instanceof(c,this.filterClass)&&(this.filter=c);else this.filterIndex=c.filter,
this.filter=a.get_filters()[this.filterIndex]};g["motion.actuators.FilterActuator"]=pk;pk.__name__=["motion","actuators","FilterActuator"];pk.__super__=ya;pk.prototype=t(ya.prototype,{filter:null,filterClass:null,filterIndex:null,apply:function(){for(var a=0,b=G.fields(this.properties);a<b.length;){var c=b[a];++a;"filter"!=c&&G.setField(this.filter,c,G.field(this.properties,c))}a=this.getField(this.target,"filters");G.setField(a,this.properties.filter,this.filter);this.setField_openfl_display_DisplayObject(this.target,
"filters",a)},initialize:function(){for(var a,b=0,c=G.fields(this.properties);b<c.length;){var d=c[b];++b;"filter"!=d&&(a=this.getField(this.filter,d),a=new Jc(this.filter,d,a,G.field(this.properties,d)-a),this.propertyDetails.push(a))}this.detailsLength=this.propertyDetails.length;this.initialized=!0},update:function(a){ya.prototype.update.call(this,a);a=this.target.get_filters();if(-1<this.filterIndex)G.setField(a,this.properties.filter,this.filter);else for(var b=0,c=a.length;b<c;){var d=b++;y.__instanceof(a[d],
this.filterClass)&&(a[d]=this.filter)}this.setField_openfl_display_DisplayObject(this.target,"filters",a)},__class__:pk});var wi=function(a,b,c){this.currentParameters=[];this.tweenProperties={};ya.call(this,a,b,c);Object.prototype.hasOwnProperty.call(c,"start")||(this.properties.start=[]);Object.prototype.hasOwnProperty.call(c,"end")||(this.properties.end=this.properties.start);a=0;for(b=this.properties.start.length;a<b;)c=a++,this.currentParameters.push(this.properties.start[c])};g["motion.actuators.MethodActuator"]=
wi;wi.__name__=["motion","actuators","MethodActuator"];wi.__super__=ya;wi.prototype=t(ya.prototype,{currentParameters:null,tweenProperties:null,apply:function(){this.callMethod(this.target,this.properties.end)},complete:function(a){null==a&&(a=!0);for(var b=0,c=this.properties.start.length;b<c;){var d=b++;this.currentParameters[d]=G.field(this.tweenProperties,"param"+d)}this.callMethod(this.target,this.currentParameters);ya.prototype.complete.call(this,a)},initialize:function(){for(var a,b,c=0,d=
this.properties.start.length;c<d;){var e=c++;a="param"+e;b=this.properties.start[e];this.tweenProperties[a]=b;if("number"==typeof b||(b|0)===b)a=new Jc(this.tweenProperties,a,b,this.properties.end[e]-b),this.propertyDetails.push(a)}this.detailsLength=this.propertyDetails.length;this.initialized=!0},update:function(a){ya.prototype.update.call(this,a);if(this.active&&!this.paused){a=0;for(var b=this.properties.start.length;a<b;){var c=a++;this.currentParameters[c]=G.field(this.tweenProperties,"param"+
c)}this.callMethod(this.target,this.currentParameters)}},__class__:wi});var ui=function(a,b,c){ya.call(this,a,b,c)};g["motion.actuators.MotionPathActuator"]=ui;ui.__name__=["motion","actuators","MotionPathActuator"];ui.__super__=ya;ui.prototype=t(ya.prototype,{apply:function(){for(var a=0,b=G.fields(this.properties);a<b.length;){var c=b[a];++a;Object.prototype.hasOwnProperty.call(this.target,c)?G.setField(this.target,c,y.__cast(G.field(this.properties,c),le).get_end()):G.setProperty(this.target,c,
y.__cast(G.field(this.properties,c),le).get_end())}},initialize:function(){for(var a,b=0,c=G.fields(this.properties);b<c.length;){var d=c[b];++b;a=y.__cast(G.field(this.properties,d),le);if(null!=a){var e=!0;Object.prototype.hasOwnProperty.call(this.target,d)?a.start=G.field(this.target,d):(e=!1,a.start=G.getProperty(this.target,d));a=new Yc(this.target,d,a,e);this.propertyDetails.push(a)}}this.detailsLength=this.propertyDetails.length;this.initialized=!0},update:function(a){if(!this.paused){var b,
c=(a-this.timeOffset)/this.duration;1<c&&(c=1);this.initialized||this.initialize();if(this.special){b=this._reverse?this._ease.calculate(1-c):this._ease.calculate(c);for(var d=0,e=this.propertyDetails;d<e.length;){var f=e[d];++d;this._snapping?f.isField?G.setField(f.target,f.propertyName,Math.round(y.__cast(f,Yc).path.calculate(b))):G.setProperty(f.target,f.propertyName,Math.round(y.__cast(f,Yc).path.calculate(b))):f.isField?G.setField(f.target,f.propertyName,y.__cast(f,Yc).path.calculate(b)):G.setProperty(f.target,
f.propertyName,y.__cast(f,Yc).path.calculate(b))}}else for(b=this._ease.calculate(c),d=0,e=this.propertyDetails;d<e.length;)f=e[d],++d,f.isField?G.setField(f.target,f.propertyName,y.__cast(f,Yc).path.calculate(b)):G.setProperty(f.target,f.propertyName,y.__cast(f,Yc).path.calculate(b));if(1==c){if(0==this._repeat){this.active=!1;this.toggleVisible&&0==this.getField(this.target,"alpha")&&this.setField_motion_actuators_MotionPathActuator_T(this.target,"visible",!1);this.complete(!0);return}null!=this._onRepeat&&
this.callMethod(this._onRepeat,this._onRepeatParams);this._reflect&&(this._reverse=!this._reverse);this.startTime=a;this.timeOffset=this.startTime+this._delay;0<this._repeat&&this._repeat--}this.sendChange&&this.change()}},__class__:ui});var Jc=function(a,b,c,d,e){null==e&&(e=!0);this.target=a;this.propertyName=b;this.start=c;this.change=d;this.isField=e};g["motion.actuators.PropertyDetails"]=Jc;Jc.__name__=["motion","actuators","PropertyDetails"];Jc.prototype={change:null,isField:null,propertyName:null,
start:null,target:null,__class__:Jc};var Yc=function(a,b,c,d){null==d&&(d=!0);Jc.call(this,a,b,0,0,d);this.path=c};g["motion.actuators.PropertyPathDetails"]=Yc;Yc.__name__=["motion","actuators","PropertyPathDetails"];Yc.__super__=Jc;Yc.prototype=t(Jc.prototype,{path:null,__class__:Yc});var qk=function(a,b,c){ya.call(this,a,b,c)};g["motion.actuators.TransformActuator"]=qk;qk.__name__=["motion","actuators","TransformActuator"];qk.__super__=ya;qk.prototype=t(ya.prototype,{endColorTransform:null,endSoundTransform:null,
tweenColorTransform:null,tweenSoundTransform:null,apply:function(){this.initialize();if(null!=this.endColorTransform){var a=this.getField(this.target,"transform");this.setField_openfl_geom_Transform(a,"colorTransform",this.endColorTransform)}null!=this.endSoundTransform&&this.setField_motion_actuators_TransformActuator_T(this.target,"soundTransform",this.endSoundTransform)},initialize:function(){Object.prototype.hasOwnProperty.call(this.properties,"colorValue")&&y.__instanceof(this.target,W)&&this.initializeColor();
(Object.prototype.hasOwnProperty.call(this.properties,"soundVolume")||Object.prototype.hasOwnProperty.call(this.properties,"soundPan"))&&this.initializeSound();this.detailsLength=this.propertyDetails.length;this.initialized=!0},initializeColor:function(){this.endColorTransform=new Cc;var a=this.properties.colorValue,b=this.properties.colorStrength;if(1>b){var c;.5>b?(c=1,b*=2):(c=1-2*(b-.5),b=1);this.endColorTransform.redMultiplier=c;this.endColorTransform.greenMultiplier=c;this.endColorTransform.blueMultiplier=
c;this.endColorTransform.redOffset=b*(a>>16&255);this.endColorTransform.greenOffset=b*(a>>8&255);this.endColorTransform.blueOffset=b*(a&255)}else this.endColorTransform.redMultiplier=0,this.endColorTransform.greenMultiplier=0,this.endColorTransform.blueMultiplier=0,this.endColorTransform.redOffset=a>>16&255,this.endColorTransform.greenOffset=a>>8&255,this.endColorTransform.blueOffset=a&255;a="redMultiplier greenMultiplier blueMultiplier redOffset greenOffset blueOffset".split(" ");Object.prototype.hasOwnProperty.call(this.properties,
"colorAlpha")?(this.endColorTransform.alphaMultiplier=this.properties.colorAlpha,a.push("alphaMultiplier")):this.endColorTransform.alphaMultiplier=this.getField(this.target,"alpha");c=this.getField(this.target,"transform");c=this.getField(c,"colorTransform");this.tweenColorTransform=new Cc;for(var d,b=0;b<a.length;){var e=a[b];++b;d=this.getField(c,e);d=new Jc(this.tweenColorTransform,e,d,this.getField(this.endColorTransform,e)-d);this.propertyDetails.push(d)}},initializeSound:function(){null==this.getField(this.target,
"soundTransform")&&this.setField_motion_actuators_TransformActuator_T(this.target,"soundTransform",new yi);var a=this.getField(this.target,"soundTransform");this.endSoundTransform=this.getField(this.target,"soundTransform");this.tweenSoundTransform=new yi;Object.prototype.hasOwnProperty.call(this.properties,"soundVolume")&&(this.endSoundTransform.volume=this.properties.soundVolume,this.propertyDetails.push(new Jc(this.tweenSoundTransform,"volume",a.volume,this.endSoundTransform.volume-a.volume)));
Object.prototype.hasOwnProperty.call(this.properties,"soundPan")&&(this.endSoundTransform.pan=this.properties.soundPan,this.propertyDetails.push(new Jc(this.tweenSoundTransform,"pan",a.pan,this.endSoundTransform.pan-a.pan)))},update:function(a){ya.prototype.update.call(this,a);null!=this.endColorTransform&&(a=this.getField(this.target,"transform"),this.setField_openfl_geom_Transform(a,"colorTransform",this.tweenColorTransform));null!=this.endSoundTransform&&this.setField_motion_actuators_TransformActuator_T(this.target,
"soundTransform",this.tweenSoundTransform)},__class__:qk});var ph=function(){};g["motion.easing.Elastic"]=ph;ph.__name__=["motion","easing","Elastic"];ph.__properties__={get_easeOut:"get_easeOut"};ph.get_easeOut=function(){return new zi(.1,.4)};var zi=function(a,b){this.a=a;this.p=b};g["motion.easing.ElasticEaseOut"]=zi;zi.__name__=["motion","easing","ElasticEaseOut"];zi.__interfaces__=[ti];zi.prototype={a:null,p:null,calculate:function(a){if(0==a)return 0;if(1==a)return 1;var b;1>this.a?(this.a=
1,b=this.p/4):b=this.p/(2*Math.PI)*Math.asin(1/this.a);return this.a*Math.pow(2,-10*a)*Math.sin(2*(a-b)*Math.PI/this.p)+1},__class__:zi};var Oc=function(a){rd.call(this,[a])};g["msignal.Signal1"]=Oc;Oc.__name__=["msignal","Signal1"];Oc.__super__=rd;Oc.prototype=t(rd.prototype,{dispatch:function(a){for(var b=this.slots;b.nonEmpty;)b.head.execute(a),b=b.tail},createSlot:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);return new Ai(this,a,b,c)},__class__:Oc});var Kd=function(a,b,c,d){null==d&&(d=0);null==
c&&(c=!1);this.signal=a;this.set_listener(b);this.once=c;this.priority=d;this.enabled=!0};g["msignal.Slot"]=Kd;Kd.__name__=["msignal","Slot"];Kd.prototype={listener:null,once:null,priority:null,enabled:null,signal:null,remove:function(){this.signal.remove(this.listener)},set_listener:function(a){if(null==a)throw new m("listener cannot be null");return this.listener=a},__class__:Kd,__properties__:{set_listener:"set_listener"}};var vg=function(a,b,c,d){null==d&&(d=0);null==c&&(c=!1);Kd.call(this,a,
b,c,d)};g["msignal.Slot0"]=vg;vg.__name__=["msignal","Slot0"];vg.__super__=Kd;vg.prototype=t(Kd.prototype,{execute:function(){this.enabled&&(this.once&&this.remove(),this.listener())},__class__:vg});var Ai=function(a,b,c,d){null==d&&(d=0);null==c&&(c=!1);Kd.call(this,a,b,c,d)};g["msignal.Slot1"]=Ai;Ai.__name__=["msignal","Slot1"];Ai.__super__=Kd;Ai.prototype=t(Kd.prototype,{param:null,execute:function(a){this.enabled&&(this.once&&this.remove(),null!=this.param&&(a=this.param),this.listener(a))},__class__:Ai});
var rk=function(){};g["openfl.IAssetCache"]=rk;rk.__name__=["openfl","IAssetCache"];rk.prototype={get_enabled:null,getBitmapData:null,hasBitmapData:null,setBitmapData:null,__class__:rk,__properties__:{get_enabled:"get_enabled"}};var Bi=function(){this.__enabled=!0;this.bitmapData=new ka;this.font=new ka;this.sound=new ka};g["openfl.AssetCache"]=Bi;Bi.__name__=["openfl","AssetCache"];Bi.__interfaces__=[rk];Bi.prototype={bitmapData:null,font:null,sound:null,__enabled:null,getBitmapData:function(a){return this.bitmapData.get(a)},
hasBitmapData:function(a){return this.bitmapData.exists(a)},setBitmapData:function(a,b){this.bitmapData.set(a,b)},get_enabled:function(){return this.__enabled},__class__:Bi,__properties__:{get_enabled:"get_enabled"}};var bb=function(){};g["openfl.Assets"]=bb;bb.__name__=["openfl","Assets"];bb.exists=function(a,b){return aa.exists(a,b)};bb.getBitmapData=function(a,b){null==b&&(b=!0);if(b&&bb.cache.get_enabled()&&bb.cache.hasBitmapData(a)){var c=bb.cache.getBitmapData(a);if(bb.isValidBitmapData(c))return c}c=
aa.getImage(a,!1);return null!=c?(c=Ra.fromImage(c),b&&bb.cache.get_enabled()&&bb.cache.setBitmapData(a,c),c):null};bb.getText=function(a){return aa.getText(a)};bb.isValidBitmapData=function(a){return null!=a&&null!=a.image};var Ci=function(){C.call(this);this.__currentFrame=0;this.__currentLabels=[];this.__totalFrames=0;this.enabled=!0};g["openfl.display.MovieClip"]=Ci;Ci.__name__=["openfl","display","MovieClip"];Ci.__super__=C;Ci.prototype=t(C.prototype,{enabled:null,__currentFrame:null,__currentLabels:null,
__totalFrames:null,__class__:Ci});var ed=function(){ba.call(this);this.applicationDomain=jf.currentDomain;this.bytesTotal=this.bytesLoaded=0;this.childAllowsParent=!0;this.parameters={}};g["openfl.display.LoaderInfo"]=ed;ed.__name__=["openfl","display","LoaderInfo"];ed.create=function(a){var b=new ed;b.uncaughtErrorEvents=new Di;null!=a?b.loader=a:b.url=ed.__rootURL;return b};ed.__super__=ba;ed.prototype=t(ba.prototype,{applicationDomain:null,bytesLoaded:null,bytesTotal:null,childAllowsParent:null,
content:null,contentType:null,loader:null,parameters:null,uncaughtErrorEvents:null,url:null,__class__:ed});var jf=function(a){this.parentDomain=null!=a?a:jf.currentDomain};g["openfl.system.ApplicationDomain"]=jf;jf.__name__=["openfl","system","ApplicationDomain"];jf.prototype={parentDomain:null,__class__:jf};var Di=function(a){ba.call(this,a)};g["openfl.events.UncaughtErrorEvents"]=Di;Di.__name__=["openfl","events","UncaughtErrorEvents"];Di.__super__=ba;Di.prototype=t(ba.prototype,{__class__:Di});
var Cc=function(a,b,c,d,e,f,n,g){null==g&&(g=0);null==n&&(n=0);null==f&&(f=0);null==e&&(e=0);null==d&&(d=1);null==c&&(c=1);null==b&&(b=1);null==a&&(a=1);this.redMultiplier=a;this.greenMultiplier=b;this.blueMultiplier=c;this.alphaMultiplier=d;this.redOffset=e;this.greenOffset=f;this.blueOffset=n;this.alphaOffset=g};g["openfl.geom.ColorTransform"]=Cc;Cc.__name__=["openfl","geom","ColorTransform"];Cc.prototype={alphaMultiplier:null,alphaOffset:null,blueMultiplier:null,blueOffset:null,greenMultiplier:null,
greenOffset:null,redMultiplier:null,redOffset:null,__clone:function(){return new Cc(this.redMultiplier,this.greenMultiplier,this.blueMultiplier,this.alphaMultiplier,this.redOffset,this.greenOffset,this.blueOffset,this.alphaOffset)},__combine:function(a){this.redMultiplier*=a.redMultiplier;this.greenMultiplier*=a.greenMultiplier;this.blueMultiplier*=a.blueMultiplier;this.alphaMultiplier*=a.alphaMultiplier;this.redOffset+=a.redOffset;this.greenOffset+=a.greenOffset;this.blueOffset+=a.blueOffset;this.alphaOffset+=
a.alphaOffset},__equals:function(a,b){null==b&&(b=!1);return null!=a&&this.redMultiplier==a.redMultiplier&&this.greenMultiplier==a.greenMultiplier&&this.blueMultiplier==a.blueMultiplier&&(b||this.alphaMultiplier==a.alphaMultiplier)&&this.redOffset==a.redOffset&&this.greenOffset==a.greenOffset&&this.blueOffset==a.blueOffset&&this.alphaOffset==a.alphaOffset},__isDefault:function(){return 1==this.redMultiplier&&1==this.greenMultiplier&&1==this.blueMultiplier&&1==this.alphaMultiplier&&0==this.redOffset&&
0==this.greenOffset&&0==this.blueOffset&&0==this.alphaOffset},__toLimeColorMatrix:function(){var a=[this.redMultiplier,0,0,0,this.redOffset/255,0,this.greenMultiplier,0,0,this.greenOffset/255,0,0,this.blueMultiplier,0,this.blueOffset/255,0,0,0,this.alphaMultiplier,this.alphaOffset/255];return null!=a?new Float32Array(a):null},__class__:Cc};var ja=function(){};g["openfl.Lib"]=ja;ja.__name__=["openfl","Lib"];ja.application=null;ja.embed=cd.openfl.embed=function(a,b,c,d,e){oi.embed(a,b,c,d,e)};ja.getTimer=
function(){return oi.getTimer()};ja.getURL=function(a,b){null==b&&(b="_blank");window.open(a.url,b)};ja.notImplemented=function(a){ja.__sentWarnings.exists(a)||(ja.__sentWarnings.set(a,!0),Ia.trace("Warning: "+a+" is not implemented",{fileName:"Lib.hx",lineNumber:113,className:"openfl.Lib",methodName:"notImplemented"}))};var kf=function(){this.length=0};g["openfl.VectorData"]=kf;kf.__name__=["openfl","VectorData"];kf.prototype={data:null,fixed:null,length:null,__class__:kf};var Zc=function(a){this.renderSession=
a};g["openfl._internal.renderer.AbstractMaskManager"]=Zc;Zc.__name__=["openfl","_internal","renderer","AbstractMaskManager"];Zc.prototype={renderSession:null,pushMask:function(a){},pushRect:function(a,b){},popMask:function(){},popRect:function(){},saveState:function(){},restoreState:function(){},__class__:Zc};var zb=function(a,b){this.width=a;this.height=b};g["openfl._internal.renderer.AbstractRenderer"]=zb;zb.__name__=["openfl","_internal","renderer","AbstractRenderer"];zb.prototype={height:null,
width:null,transparent:null,viewport:null,renderSession:null,render:function(a){},setViewport:function(a,b,c,d){},resize:function(a,b){},__class__:zb};var ig=function(){this.types=[];this.b=[];this.i=[];this.f=[];this.o=[];this.ff=[];this.ii=[];this.ts=[]};g["openfl._internal.renderer.DrawCommandBuffer"]=ig;ig.__name__=["openfl","_internal","renderer","DrawCommandBuffer"];ig.prototype={types:null,b:null,f:null,ff:null,i:null,ii:null,o:null,ts:null,append:function(a){for(var b=new nd(a),c=0,d=a.types;c<
d.length;){var e=d[c];++c;switch(e[1]){case 0:b.advance();b.prev=z.BEGIN_BITMAP_FILL;e=b;this.beginBitmapFill(e.buffer.o[e.oPos],e.buffer.o[e.oPos+1],e.buffer.b[e.bPos],e.buffer.b[e.bPos+1]);break;case 1:b.advance();b.prev=z.BEGIN_FILL;e=b;this.beginFill(e.buffer.i[e.iPos],e.buffer.f[e.fPos]);break;case 2:b.advance();b.prev=z.BEGIN_GRADIENT_FILL;e=b;this.beginGradientFill(e.buffer.o[e.oPos],e.buffer.ii[e.iiPos],e.buffer.ff[e.ffPos],e.buffer.ii[e.iiPos+1],e.buffer.o[e.oPos+1],e.buffer.o[e.oPos+2],
e.buffer.o[e.oPos+3],e.buffer.o[e.oPos+4]);break;case 3:b.advance();b.prev=z.CUBIC_CURVE_TO;e=b;this.cubicCurveTo(e.buffer.f[e.fPos],e.buffer.f[e.fPos+1],e.buffer.f[e.fPos+3],e.buffer.f[e.fPos+4],e.buffer.f[e.fPos+5],e.buffer.f[e.fPos+6]);break;case 4:b.advance();b.prev=z.CURVE_TO;e=b;this.curveTo(e.buffer.f[e.fPos],e.buffer.f[e.fPos+1],e.buffer.f[e.fPos+2],e.buffer.f[e.fPos+3]);break;case 5:b.advance();b.prev=z.DRAW_CIRCLE;e=b;this.drawCircle(e.buffer.f[e.fPos],e.buffer.f[e.fPos+1],e.buffer.f[e.fPos+
2]);break;case 6:b.advance();b.prev=z.DRAW_ELLIPSE;e=b;this.drawEllipse(e.buffer.f[e.fPos],e.buffer.f[e.fPos+1],e.buffer.f[e.fPos+2],e.buffer.f[e.fPos+3]);break;case 7:b.advance();b.prev=z.DRAW_PATH;e=b;this.drawPath(e.buffer.o[e.oPos],e.buffer.o[e.oPos+1],e.buffer.o[e.oPos+2]);break;case 8:b.advance();b.prev=z.DRAW_RECT;e=b;this.drawRect(e.buffer.f[e.fPos],e.buffer.f[e.fPos+1],e.buffer.f[e.fPos+2],e.buffer.f[e.fPos+3]);break;case 9:b.advance();b.prev=z.DRAW_ROUND_RECT;e=b;this.drawRoundRect(e.buffer.f[e.fPos],
e.buffer.f[e.fPos+1],e.buffer.f[e.fPos+2],e.buffer.f[e.fPos+3],e.buffer.f[e.fPos+4],e.buffer.f[e.fPos+5]);break;case 10:b.advance();b.prev=z.DRAW_TILES;e=b;this.drawTiles(e.buffer.ts[e.tsPos],e.buffer.ff[e.ffPos],e.buffer.b[e.bPos],e.buffer.i[e.iPos],e.buffer.o[e.oPos],e.buffer.i[e.iPos+1]);break;case 11:b.advance();b.prev=z.DRAW_TRIANGLES;e=b;this.drawTriangles(e.buffer.o[e.oPos],e.buffer.o[e.oPos+1],e.buffer.o[e.oPos+2],e.buffer.o[e.oPos+3],e.buffer.o[e.oPos+4],e.buffer.i[e.iPos]);break;case 12:b.advance();
b.prev=z.END_FILL;this.endFill();break;case 13:b.advance();b.prev=z.LINE_BITMAP_STYLE;e=b;this.lineBitmapStyle(e.buffer.o[e.oPos],e.buffer.o[e.oPos+1],e.buffer.b[e.bPos],e.buffer.b[e.bPos+1]);break;case 14:b.advance();b.prev=z.LINE_GRADIENT_STYLE;e=b;this.lineGradientStyle(e.buffer.o[e.oPos],e.buffer.ii[e.iiPos],e.buffer.ff[e.ffPos],e.buffer.ii[e.iiPos+1],e.buffer.o[e.oPos+1],e.buffer.o[e.oPos+2],e.buffer.o[e.oPos+3],e.buffer.o[e.oPos+4]);break;case 15:b.advance();b.prev=z.LINE_STYLE;e=b;this.lineStyle(e.buffer.o[e.oPos],
e.buffer.o[e.oPos+1],e.buffer.o[e.oPos+2],e.buffer.o[e.oPos+3],e.buffer.o[e.oPos+4],e.buffer.o[e.oPos+5],e.buffer.o[e.oPos+6],e.buffer.o[e.oPos+7]);break;case 16:b.advance();b.prev=z.LINE_TO;e=b;this.lineTo(e.buffer.f[e.fPos],e.buffer.f[e.fPos+1]);break;case 17:b.advance();b.prev=z.MOVE_TO;e=b;this.moveTo(e.buffer.f[e.fPos],e.buffer.f[e.fPos+1]);break;case 18:b.advance(),b.prev=z.OVERRIDE_MATRIX,e=b,this.overrideMatrix(e.buffer.o[e.oPos])}}b.destroy();return a},beginBitmapFill:function(a,b,c,d){this.types.push(z.BEGIN_BITMAP_FILL);
this.o.push(a);this.o.push(b);this.b.push(c);this.b.push(d)},beginFill:function(a,b){this.types.push(z.BEGIN_FILL);this.i.push(a);this.f.push(b)},beginGradientFill:function(a,b,c,d,e,f,n,g){this.types.push(z.BEGIN_GRADIENT_FILL);this.o.push(a);this.ii.push(b);this.ff.push(c);this.ii.push(d);this.o.push(e);this.o.push(f);this.o.push(n);this.o.push(g)},clear:function(){this.types.splice(0,this.types.length);this.b.splice(0,this.b.length);this.i.splice(0,this.i.length);this.f.splice(0,this.f.length);
this.o.splice(0,this.o.length);this.ff.splice(0,this.ff.length);this.ii.splice(0,this.ii.length);this.ts.splice(0,this.ts.length)},cubicCurveTo:function(a,b,c,d,e,f){this.types.push(z.CUBIC_CURVE_TO);this.f.push(a);this.f.push(b);this.f.push(c);this.f.push(d);this.f.push(e);this.f.push(f)},curveTo:function(a,b,c,d){this.types.push(z.CURVE_TO);this.f.push(a);this.f.push(b);this.f.push(c);this.f.push(d)},drawCircle:function(a,b,c){this.types.push(z.DRAW_CIRCLE);this.f.push(a);this.f.push(b);this.f.push(c)},
drawEllipse:function(a,b,c,d){this.types.push(z.DRAW_ELLIPSE);this.f.push(a);this.f.push(b);this.f.push(c);this.f.push(d)},drawPath:function(a,b,c){this.types.push(z.DRAW_PATH);this.o.push(a);this.o.push(b);this.o.push(c)},drawRect:function(a,b,c,d){this.types.push(z.DRAW_RECT);this.f.push(a);this.f.push(b);this.f.push(c);this.f.push(d)},drawRoundRect:function(a,b,c,d,e,f){this.types.push(z.DRAW_ROUND_RECT);this.f.push(a);this.f.push(b);this.f.push(c);this.f.push(d);this.f.push(e);this.f.push(f)},
drawTiles:function(a,b,c,d,e,f){this.types.push(z.DRAW_TILES);this.ts.push(a);this.ff.push(b);this.b.push(c);this.i.push(d);this.o.push(e);this.i.push(f)},drawTriangles:function(a,b,c,d,e,f){this.types.push(z.DRAW_TRIANGLES);this.o.push(a);this.o.push(b);this.o.push(c);this.o.push(d);this.o.push(e);this.i.push(f)},endFill:function(){this.types.push(z.END_FILL)},lineBitmapStyle:function(a,b,c,d){this.types.push(z.LINE_BITMAP_STYLE);this.o.push(a);this.o.push(b);this.b.push(c);this.b.push(d)},lineGradientStyle:function(a,
b,c,d,e,f,n,g){this.types.push(z.LINE_GRADIENT_STYLE);this.o.push(a);this.ii.push(b);this.ff.push(c);this.ii.push(d);this.o.push(e);this.o.push(f);this.o.push(n);this.o.push(g)},lineStyle:function(a,b,c,d,e,f,n,g){this.types.push(z.LINE_STYLE);this.o.push(a);this.o.push(b);this.o.push(c);this.o.push(d);this.o.push(e);this.o.push(f);this.o.push(n);this.o.push(g)},lineTo:function(a,b){this.types.push(z.LINE_TO);this.f.push(a);this.f.push(b)},moveTo:function(a,b){this.types.push(z.MOVE_TO);this.f.push(a);
this.f.push(b)},overrideMatrix:function(a){this.types.push(z.OVERRIDE_MATRIX);this.o.push(a)},get_length:function(){return this.types.length},__class__:ig,__properties__:{get_length:"get_length"}};var nd=function(a){this.buffer=a;this.bPos=this.iPos=this.fPos=this.oPos=this.ffPos=this.iiPos=this.tsPos=0;this.prev=z.UNKNOWN};g["openfl._internal.renderer.DrawCommandReader"]=nd;nd.__name__=["openfl","_internal","renderer","DrawCommandReader"];nd.prototype={buffer:null,bPos:null,iiPos:null,iPos:null,
ffPos:null,fPos:null,oPos:null,prev:null,tsPos:null,advance:function(){switch(this.prev[1]){case 0:this.oPos+=2;this.bPos+=2;break;case 1:this.iPos+=1;this.fPos+=1;break;case 2:this.oPos+=5;this.iiPos+=2;this.ffPos+=1;break;case 3:this.fPos+=6;break;case 4:this.fPos+=4;break;case 5:this.fPos+=3;break;case 6:this.fPos+=4;break;case 7:this.oPos+=3;break;case 8:this.fPos+=4;break;case 9:this.fPos+=6;break;case 10:this.tsPos+=1;this.ffPos+=1;this.bPos+=1;this.iPos+=2;this.oPos+=1;break;case 11:this.oPos+=
5;this.iPos+=1;break;case 13:this.oPos+=2;this.bPos+=2;break;case 14:this.oPos+=5;this.iiPos+=2;this.ffPos+=1;break;case 15:this.oPos+=8;break;case 16:this.fPos+=2;break;case 17:this.fPos+=2;break;case 18:this.oPos+=1}},destroy:function(){this.buffer=null;this.reset()},reset:function(){this.bPos=this.iPos=this.fPos=this.oPos=this.ffPos=this.iiPos=this.tsPos=0},__class__:nd};var z=g["openfl._internal.renderer.DrawCommandType"]={__ename__:!0,__constructs__:"BEGIN_BITMAP_FILL BEGIN_FILL BEGIN_GRADIENT_FILL CUBIC_CURVE_TO CURVE_TO DRAW_CIRCLE DRAW_ELLIPSE DRAW_PATH DRAW_RECT DRAW_ROUND_RECT DRAW_TILES DRAW_TRIANGLES END_FILL LINE_BITMAP_STYLE LINE_GRADIENT_STYLE LINE_STYLE LINE_TO MOVE_TO OVERRIDE_MATRIX UNKNOWN".split(" ")};
z.BEGIN_BITMAP_FILL=["BEGIN_BITMAP_FILL",0];z.BEGIN_BITMAP_FILL.toString=u;z.BEGIN_BITMAP_FILL.__enum__=z;z.BEGIN_FILL=["BEGIN_FILL",1];z.BEGIN_FILL.toString=u;z.BEGIN_FILL.__enum__=z;z.BEGIN_GRADIENT_FILL=["BEGIN_GRADIENT_FILL",2];z.BEGIN_GRADIENT_FILL.toString=u;z.BEGIN_GRADIENT_FILL.__enum__=z;z.CUBIC_CURVE_TO=["CUBIC_CURVE_TO",3];z.CUBIC_CURVE_TO.toString=u;z.CUBIC_CURVE_TO.__enum__=z;z.CURVE_TO=["CURVE_TO",4];z.CURVE_TO.toString=u;z.CURVE_TO.__enum__=z;z.DRAW_CIRCLE=["DRAW_CIRCLE",5];z.DRAW_CIRCLE.toString=
u;z.DRAW_CIRCLE.__enum__=z;z.DRAW_ELLIPSE=["DRAW_ELLIPSE",6];z.DRAW_ELLIPSE.toString=u;z.DRAW_ELLIPSE.__enum__=z;z.DRAW_PATH=["DRAW_PATH",7];z.DRAW_PATH.toString=u;z.DRAW_PATH.__enum__=z;z.DRAW_RECT=["DRAW_RECT",8];z.DRAW_RECT.toString=u;z.DRAW_RECT.__enum__=z;z.DRAW_ROUND_RECT=["DRAW_ROUND_RECT",9];z.DRAW_ROUND_RECT.toString=u;z.DRAW_ROUND_RECT.__enum__=z;z.DRAW_TILES=["DRAW_TILES",10];z.DRAW_TILES.toString=u;z.DRAW_TILES.__enum__=z;z.DRAW_TRIANGLES=["DRAW_TRIANGLES",11];z.DRAW_TRIANGLES.toString=
u;z.DRAW_TRIANGLES.__enum__=z;z.END_FILL=["END_FILL",12];z.END_FILL.toString=u;z.END_FILL.__enum__=z;z.LINE_BITMAP_STYLE=["LINE_BITMAP_STYLE",13];z.LINE_BITMAP_STYLE.toString=u;z.LINE_BITMAP_STYLE.__enum__=z;z.LINE_GRADIENT_STYLE=["LINE_GRADIENT_STYLE",14];z.LINE_GRADIENT_STYLE.toString=u;z.LINE_GRADIENT_STYLE.__enum__=z;z.LINE_STYLE=["LINE_STYLE",15];z.LINE_STYLE.toString=u;z.LINE_STYLE.__enum__=z;z.LINE_TO=["LINE_TO",16];z.LINE_TO.toString=u;z.LINE_TO.__enum__=z;z.MOVE_TO=["MOVE_TO",17];z.MOVE_TO.toString=
u;z.MOVE_TO.__enum__=z;z.OVERRIDE_MATRIX=["OVERRIDE_MATRIX",18];z.OVERRIDE_MATRIX.toString=u;z.OVERRIDE_MATRIX.__enum__=z;z.UNKNOWN=["UNKNOWN",19];z.UNKNOWN.toString=u;z.UNKNOWN.__enum__=z;var Wa=function(){};g["openfl._internal.renderer.GraphicsPaths"]=Wa;Wa.__name__=["openfl","_internal","renderer","GraphicsPaths"];Wa.ellipse=function(a,b,c,d,e,f){var n=2*Math.PI/f,g=0;for(f+=1;g<f;){var h=g++;a.push(b+Math.sin(n*h)*d);a.push(c+Math.cos(n*h)*e)}};Wa.cubicCurveTo=function(a,b,c,d,e,f,n){for(var g=
0,h=0,k=0,l=0,m=0,w=a[a.length-2],q=a[a.length-1],p=0,r=g=0,t=1;21>t;)r=t++/20,g=1-r,h=g*g,k=h*g,l=r*r,m=l*r,p=k*w+3*h*r*b+3*g*l*d+m*f,g=k*q+3*h*r*c+3*g*l*e+m*n,a.push(p),a.push(g)};Wa.curveTo=function(a,b,c,d,e){for(var f=0,n=0,g=a[a.length-2],h=a[a.length-1],k=n=f=0,l=1;21>l;)k=l++/20,f=g+(b-g)*k,n=h+(c-h)*k,f+=(b+(d-b)*k-f)*k,n+=(c+(e-c)*k-n)*k,a.push(f),a.push(n)};Wa.roundRectangle=function(a,b,c,d,e,f,n){d=b+d;e=c+e;var g=-f+f*Wa.SIN45,h=-f+f*Wa.TAN22,k=-n+n*Wa.SIN45,l=-n+n*Wa.TAN22;a.push(d);
a.push(e-n);Wa.curveTo(a,d,e+l,d+g,e+k);Wa.curveTo(a,d+h,e,d-f,e);a.push(b+f);a.push(e);Wa.curveTo(a,b-h,e,b-g,e+k);Wa.curveTo(a,b,e+l,b,e-n);a.push(b);a.push(c+n);Wa.curveTo(a,b,c-l,b-g,c-k);Wa.curveTo(a,b-h,c,b+f,c);a.push(d-f);a.push(c);Wa.curveTo(a,d+h,c,d+g,c-k);Wa.curveTo(a,d,c-l,d,c+n);a.push(d);a.push(e-n)};var lf=function(){};g["openfl._internal.renderer.PolyK"]=lf;lf.__name__=["openfl","_internal","renderer","PolyK"];lf.triangulate=function(a,b){var c=!0,d=b.length>>1;if(3>d)return[];var e;
e=[];for(var f=0;f<d;){var n=f++;e.push(n)}for(var f=0,n=d,g=!1;3<n;){var h=e[f%n],k=e[(f+1)%n],l=e[(f+2)%n],m=b[2*h],w=b[2*h+1],q=b[2*k],p=b[2*k+1],r=b[2*l],t=b[2*l+1],g=!1;if(lf._convex(m,w,q,p,r,t,c))for(var g=!0,u=0;u<n;){var v=u++,v=e[v];if(v!=h&&v!=k&&v!=l&&lf._PointInTriangle(b[2*v],b[2*v+1],m,w,q,p,r,t)){g=!1;break}}if(g)a.push(h),a.push(k),a.push(l),e.splice((f+1)%n,1),n--,f=0;else if(f++>3*n)if(c){a=[];c=[];for(e=0;e<d;)f=e++,c.push(f);e=c;f=0;n=d;c=!1}else return Ia.trace("Warning: shape too complex to fill",
{fileName:"PolyK.hx",lineNumber:104,className:"openfl._internal.renderer.PolyK",methodName:"triangulate"}),[]}a.push(e[0]);a.push(e[1]);a.push(e[2]);return a};lf._PointInTriangle=function(a,b,c,d,e,f,n,g){n=n-c|0;g=g-d|0;e=e-c|0;f=f-d|0;a=a-c|0;c=b-d|0;b=n*n+g*g;d=n*e+g*f;n=n*a+g*c;g=e*e+f*f;e=e*a+f*c;f=1/(b*g-d*d);g=(g*n-d*e)*f;n=(b*e-d*n)*f;return 0<=g&&0<=n&&1>g+n};lf._convex=function(a,b,c,d,e,f,n){return 0<=(b-d)*(e-c)+(c-a)*(f-d)==n};var me=function(){this.activeTextures=0};g["openfl._internal.renderer.RenderSession"]=
me;me.__name__=["openfl","_internal","renderer","RenderSession"];me.prototype={cairo:null,context:null,element:null,gl:null,renderer:null,roundPixels:null,transformProperty:null,transformOriginProperty:null,vendorPrefix:null,z:null,projectionMatrix:null,drawCount:null,currentBlendMode:null,activeTextures:null,shaderManager:null,maskManager:null,filterManager:null,blendModeManager:null,spriteBatch:null,stencilManager:null,defaultFramebuffer:null,__class__:me};var gl=function(){};g["openfl._internal.renderer.cairo.CairoBitmap"]=
gl;gl.__name__=["openfl","_internal","renderer","cairo","CairoBitmap"];gl.render=function(a,b){if(a.__renderable&&!(0>=a.__worldAlpha)){var c=b.cairo;if(null!=a.bitmapData&&a.bitmapData.__isValid){null!=a.__mask&&b.maskManager.pushMask(a.__mask);var d=a.__renderTransform,e=a.get_scrollRect();b.roundPixels?(d=d.__toMatrix3(),d.tx=Math.round(d.tx),d.ty=Math.round(d.ty),c.set_matrix(d)):c.set_matrix(d.__toMatrix3());d=a.bitmapData.getSurface();null!=d&&(d=gg.createForSurface(d),gg.set_filter(d,a.smoothing?
1:3),null!=e?(c.pushGroup(),c.set_source(d),c.newPath(),c.rectangle(e.x,e.y,e.width,e.height),c.fill(),c.popGroupToSource()):c.set_source(d),1==a.__worldAlpha?c.paint():c.paintWithAlpha(a.__worldAlpha));null!=a.__mask&&b.maskManager.popMask()}}};var Fa=function(){};g["openfl._internal.renderer.cairo.CairoGraphics"]=Fa;Fa.__name__=["openfl","_internal","renderer","cairo","CairoGraphics"];Fa.cairo=null;Fa.drawRoundRect=function(a,b,c,d,e,f){-1==f&&(f=e);e*=.5;f*=.5;e>c/2&&(e=c/2);f>d/2&&(f=d/2);c=a+
c;d=b+d;var n=-e+e*Fa.SIN45,g=-e+e*Fa.TAN22,h=-f+f*Fa.SIN45,k=-f+f*Fa.TAN22;Fa.cairo.moveTo(c,d-f);Fa.quadraticCurveTo(c,d+k,c+n,d+h);Fa.quadraticCurveTo(c+g,d,c-e,d);Fa.cairo.lineTo(a+e,d);Fa.quadraticCurveTo(a-g,d,a-n,d+h);Fa.quadraticCurveTo(a,d+k,a,d-f);Fa.cairo.lineTo(a,b+f);Fa.quadraticCurveTo(a,b-k,a-n,b-h);Fa.quadraticCurveTo(a-g,b,a+e,b);Fa.cairo.lineTo(c-e,b);Fa.quadraticCurveTo(c+g,b,c+n,b-h);Fa.quadraticCurveTo(c,b-k,c,b+f);Fa.cairo.lineTo(c,d-f)};Fa.quadraticCurveTo=function(a,b,c,d){var e=
null;Fa.cairo.get_hasCurrentPoint()?e=Fa.cairo.get_currentPoint():(Fa.cairo.moveTo(a,b),e=new he(a,b));Fa.cairo.curveTo(e.x+.6666666666666666*(a-e.x),e.y+.6666666666666666*(b-e.y),c+.6666666666666666*(a-c),d+.6666666666666666*(b-d),c,d)};Fa.renderMask=function(a,b){if(0!=a.__commands.get_length()){for(var c=b.cairo,d=new nd(a.__commands),e=0,f=a.__commands.types;e<f.length;){var n=f[e];++e;switch(n[1]){case 3:d.advance();d.prev=z.CUBIC_CURVE_TO;n=d;c.curveTo(n.buffer.f[n.fPos]-0,n.buffer.f[n.fPos+
1]-0,n.buffer.f[n.fPos+3]-0,n.buffer.f[n.fPos+4]-0,n.buffer.f[n.fPos+5]-0,n.buffer.f[n.fPos+6]-0);break;case 4:d.advance();d.prev=z.CURVE_TO;n=d;Fa.quadraticCurveTo(n.buffer.f[n.fPos]-0,n.buffer.f[n.fPos+1]-0,n.buffer.f[n.fPos+2]-0,n.buffer.f[n.fPos+3]-0);break;case 5:d.advance();d.prev=z.DRAW_CIRCLE;n=d;c.arc(n.buffer.f[n.fPos]-0,n.buffer.f[n.fPos+1]-0,n.buffer.f[n.fPos+2],0,2*Math.PI);break;case 6:var g;d.advance();d.prev=z.DRAW_ELLIPSE;g=d;var n=g.buffer.f[g.fPos],h=g.buffer.f[g.fPos+1],k=g.buffer.f[g.fPos+
2],l=g.buffer.f[g.fPos+3],n=n-0,h=h-0;g=k/2*.5522848;var m=l/2*.5522848,w=n+k,q=h+l,k=n+k/2,l=h+l/2;c.moveTo(n,l);c.curveTo(n,l-m,k-g,h,k,h);c.curveTo(k+g,h,w,l-m,w,l);c.curveTo(w,l+m,k+g,q,k,q);c.curveTo(k-g,q,n,l+m,n,l);break;case 8:d.advance();d.prev=z.DRAW_RECT;n=d;c.rectangle(n.buffer.f[n.fPos]-0,n.buffer.f[n.fPos+1]-0,n.buffer.f[n.fPos+2],n.buffer.f[n.fPos+3]);break;case 9:d.advance();d.prev=z.DRAW_ROUND_RECT;n=d;Fa.drawRoundRect(n.buffer.f[n.fPos]-0,n.buffer.f[n.fPos+1]-0,n.buffer.f[n.fPos+
2],n.buffer.f[n.fPos+3],n.buffer.f[n.fPos+4],n.buffer.f[n.fPos+5]);break;case 16:d.advance();d.prev=z.LINE_TO;n=d;c.lineTo(n.buffer.f[n.fPos]-0,n.buffer.f[n.fPos+1]-0);break;case 17:d.advance();d.prev=z.MOVE_TO;n=d;c.moveTo(n.buffer.f[n.fPos]-0,n.buffer.f[n.fPos+1]-0);break;default:d.advance(),d.prev=n}}d.destroy()}};var Ei=function(a){this.renderSession=a};g["openfl._internal.renderer.cairo.CairoMaskManager"]=Ei;Ei.__name__=["openfl","_internal","renderer","cairo","CairoMaskManager"];Ei.__super__=
Zc;Ei.prototype=t(Zc.prototype,{pushMask:function(a){var b=this.renderSession.cairo;b.save();var c=a.__getWorldTransform();b.set_matrix(c.__toMatrix3());b.newPath();a.__renderCairoMask(this.renderSession);b.clip()},pushRect:function(a,b){var c=this.renderSession.cairo;c.save();c.set_matrix(new ni(b.a,b.c,b.b,b.d,b.tx,b.ty));c.newPath();c.rectangle(a.x,a.y,a.width,a.height);c.clip()},popMask:function(){this.renderSession.cairo.restore()},popRect:function(){this.renderSession.cairo.restore()},__class__:Ei});
var jg=function(a,b,c){zb.call(this,a,b);this.cairo=c;this.renderSession=new me;this.renderSession.cairo=c;this.renderSession.roundPixels=!0;this.renderSession.renderer=this;this.renderSession.maskManager=new Ei(this.renderSession)};g["openfl._internal.renderer.cairo.CairoRenderer"]=jg;jg.__name__=["openfl","_internal","renderer","cairo","CairoRenderer"];jg.__super__=zb;jg.prototype=t(zb.prototype,{cairo:null,render:function(a){this.cairo.identityMatrix();a.__clearBeforeRender&&(this.cairo.setSourceRGB(a.__colorSplit[0],
a.__colorSplit[1],a.__colorSplit[2]),this.cairo.paint());a.__renderCairo(this.renderSession)},__class__:jg});var Kk=function(){};g["openfl._internal.renderer.cairo.CairoShape"]=Kk;Kk.__name__=["openfl","_internal","renderer","cairo","CairoShape"];Kk.render=function(a,b){};var el=function(){};g["openfl._internal.renderer.cairo.CairoTextField"]=el;el.__name__=["openfl","_internal","renderer","cairo","CairoTextField"];el.render=function(a,b){};var hl=function(){};g["openfl._internal.renderer.canvas.CanvasBitmap"]=
hl;hl.__name__=["openfl","_internal","renderer","canvas","CanvasBitmap"];hl.render=function(a,b){if(a.__renderable&&!(0>=a.__worldAlpha)){var c=b.context;if(null!=a.bitmapData&&a.bitmapData.__isValid){null!=a.__mask&&b.maskManager.pushMask(a.__mask);a.bitmapData.__sync();c.globalAlpha=a.__worldAlpha;var d=a.__renderTransform,e=a.get_scrollRect();b.roundPixels?c.setTransform(d.a,d.b,d.c,d.d,d.tx|0,d.ty|0):c.setTransform(d.a,d.b,d.c,d.d,d.tx,d.ty);a.smoothing||(c.mozImageSmoothingEnabled=!1,c.msImageSmoothingEnabled=
!1,c.imageSmoothingEnabled=!1);null==e?c.drawImage(a.bitmapData.image.get_src(),0,0):c.drawImage(a.bitmapData.image.get_src(),e.x,e.y,e.width,e.height,e.x,e.y,e.width,e.height);a.smoothing||(c.mozImageSmoothingEnabled=!0,c.msImageSmoothingEnabled=!0,c.imageSmoothingEnabled=!0);null!=a.__mask&&b.maskManager.popMask()}}};var q=function(){};g["openfl._internal.renderer.canvas.CanvasGraphics"]=q;q.__name__=["openfl","_internal","renderer","canvas","CanvasGraphics"];q.bitmapFill=null;q.bitmapRepeat=null;
q.bounds=null;q.graphics=null;q.hasFill=null;q.hasStroke=null;q.hitTesting=null;q.inversePendingMatrix=null;q.pendingMatrix=null;q.context=null;q.closePath=function(){null!=q.context.strokeStyle&&(q.context.closePath(),q.context.stroke(),q.context.beginPath())};q.createBitmapFill=function(a,b){a.__sync();return q.context.createPattern(a.image.get_src(),b?"repeat":"no-repeat")};q.createGradientPattern=function(a,b,c,d,e,f,n,g){f=null;switch(a[1]){case 0:null==e&&(e=new ra);f=e.transformPoint(new Ea(1638.4,
0));f=q.context.createRadialGradient(e.tx,e.ty,0,e.tx,e.ty,(f.x-e.tx)/2);break;case 1:e=null!=e?e:new ra,f=e.transformPoint(new Ea(-819.2,0)),e=e.transformPoint(new Ea(819.2,0)),f=q.context.createLinearGradient(f.x,f.y,e.x,e.y)}e=0;for(a=b.length;e<a;){var h=e++,k=b[h];n=c[h];g=(k&16711680)>>>16;var l=(k&65280)>>>8,k=k&255,h=d[h]/255;0>h&&(h=0);1<h&&(h=1);f.addColorStop(h,"rgba("+g+", "+l+", "+k+", "+n+")")}return f};q.createTempPatternCanvas=function(a,b,c,d){var e=window.document.createElement("canvas"),
f=e.getContext("2d");e.width=c;e.height=d;f.fillStyle=f.createPattern(a.image.get_src(),b?"repeat":"no-repeat");f.beginPath();f.moveTo(0,0);f.lineTo(0,d);f.lineTo(c,d);f.lineTo(c,0);f.lineTo(0,0);f.closePath();q.hitTesting||f.fill();return e};q.drawRoundRect=function(a,b,c,d,e,f){-1==f&&(f=e);e*=.5;f*=.5;e>c/2&&(e=c/2);f>d/2&&(f=d/2);c=a+c;d=b+d;var n=-e+e*q.SIN45,g=-e+e*q.TAN22,h=-f+f*q.SIN45,k=-f+f*q.TAN22;q.context.moveTo(c,d-f);q.context.quadraticCurveTo(c,d+k,c+n,d+h);q.context.quadraticCurveTo(c+
g,d,c-e,d);q.context.lineTo(a+e,d);q.context.quadraticCurveTo(a-g,d,a-n,d+h);q.context.quadraticCurveTo(a,d+k,a,d-f);q.context.lineTo(a,b+f);q.context.quadraticCurveTo(a,b-k,a-n,b-h);q.context.quadraticCurveTo(a-g,b,a+e,b);q.context.lineTo(c-e,b);q.context.quadraticCurveTo(c+g,b,c+n,b-h);q.context.quadraticCurveTo(c,b-k,c,b+f);q.context.lineTo(c,d-f)};q.endFill=function(){q.context.beginPath();q.playCommands(q.fillCommands,!1);q.fillCommands.clear()};q.endStroke=function(){q.context.beginPath();q.playCommands(q.strokeCommands,
!0);q.context.closePath();q.strokeCommands.clear()};q.hitTest=function(a,b,c){if(!(0==a.__commands.get_length()||null==q.bounds||0>=q.bounds.width||0>=q.bounds.height)){q.hitTesting=!0;b-=q.bounds.x;c-=q.bounds.y;null==a.__canvas&&(a.__canvas=window.document.createElement("canvas"),a.__context=a.__canvas.getContext("2d"));q.context=a.__context;q.fillCommands.clear();q.strokeCommands.clear();q.hasFill=!1;q.hasStroke=!1;q.bitmapFill=null;q.bitmapRepeat=!1;q.context.beginPath();var d=new nd(a.__commands),
e=0;for(a=a.__commands.types;e<a.length;){var f=a[e];++e;switch(f[1]){case 3:d.advance();d.prev=z.CUBIC_CURVE_TO;f=d;q.fillCommands.cubicCurveTo(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+3],f.buffer.f[f.fPos+4],f.buffer.f[f.fPos+5],f.buffer.f[f.fPos+6]);q.strokeCommands.cubicCurveTo(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+3],f.buffer.f[f.fPos+4],f.buffer.f[f.fPos+5],f.buffer.f[f.fPos+6]);break;case 4:d.advance();d.prev=z.CURVE_TO;f=d;q.fillCommands.curveTo(f.buffer.f[f.fPos],
f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+2],f.buffer.f[f.fPos+3]);q.strokeCommands.curveTo(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+2],f.buffer.f[f.fPos+3]);break;case 16:d.advance();d.prev=z.LINE_TO;f=d;q.fillCommands.lineTo(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1]);q.strokeCommands.lineTo(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1]);break;case 17:d.advance();d.prev=z.MOVE_TO;f=d;q.fillCommands.moveTo(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1]);q.strokeCommands.moveTo(f.buffer.f[f.fPos],f.buffer.f[f.fPos+
1]);break;case 14:d.advance();d.prev=z.LINE_GRADIENT_STYLE;f=d;q.strokeCommands.lineGradientStyle(f.buffer.o[f.oPos],f.buffer.ii[f.iiPos],f.buffer.ff[f.ffPos],f.buffer.ii[f.iiPos+1],f.buffer.o[f.oPos+1],f.buffer.o[f.oPos+2],f.buffer.o[f.oPos+3],f.buffer.o[f.oPos+4]);break;case 13:d.advance();d.prev=z.LINE_BITMAP_STYLE;f=d;q.strokeCommands.lineBitmapStyle(f.buffer.o[f.oPos],f.buffer.o[f.oPos+1],f.buffer.b[f.bPos],f.buffer.b[f.bPos+1]);break;case 15:d.advance();d.prev=z.LINE_STYLE;f=d;q.strokeCommands.lineStyle(f.buffer.o[f.oPos],
f.buffer.o[f.oPos+1],1,f.buffer.o[f.oPos+3],f.buffer.o[f.oPos+4],f.buffer.o[f.oPos+5],f.buffer.o[f.oPos+6],f.buffer.o[f.oPos+7]);break;case 12:d.advance();d.prev=z.END_FILL;d;q.endFill();q.endStroke();if(q.hasFill&&q.context.isPointInPath(b,c)||q.hasStroke&&q.context.isPointInStroke(b,c))return d.destroy(),!0;q.hasFill=!1;q.bitmapFill=null;break;case 0:case 1:case 2:q.endFill();q.endStroke();if(q.hasFill&&q.context.isPointInPath(b,c)||q.hasStroke&&q.context.isPointInStroke(b,c))return d.destroy(),
!0;f==z.BEGIN_BITMAP_FILL?(d.advance(),d.prev=z.BEGIN_BITMAP_FILL,f=d,q.fillCommands.beginBitmapFill(f.buffer.o[f.oPos],f.buffer.o[f.oPos+1],f.buffer.b[f.bPos],f.buffer.b[f.bPos+1]),q.strokeCommands.beginBitmapFill(f.buffer.o[f.oPos],f.buffer.o[f.oPos+1],f.buffer.b[f.bPos],f.buffer.b[f.bPos+1])):f==z.BEGIN_GRADIENT_FILL?(d.advance(),d.prev=z.BEGIN_GRADIENT_FILL,f=d,q.fillCommands.beginGradientFill(f.buffer.o[f.oPos],f.buffer.ii[f.iiPos],f.buffer.ff[f.ffPos],f.buffer.ii[f.iiPos+1],f.buffer.o[f.oPos+
1],f.buffer.o[f.oPos+2],f.buffer.o[f.oPos+3],f.buffer.o[f.oPos+4]),q.strokeCommands.beginGradientFill(f.buffer.o[f.oPos],f.buffer.ii[f.iiPos],f.buffer.ff[f.ffPos],f.buffer.ii[f.iiPos+1],f.buffer.o[f.oPos+1],f.buffer.o[f.oPos+2],f.buffer.o[f.oPos+3],f.buffer.o[f.oPos+4])):(d.advance(),d.prev=z.BEGIN_FILL,f=d,q.fillCommands.beginFill(f.buffer.i[f.iPos],1),q.strokeCommands.beginFill(f.buffer.i[f.iPos],1));break;case 5:d.advance();d.prev=z.DRAW_CIRCLE;f=d;q.fillCommands.drawCircle(f.buffer.f[f.fPos],
f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+2]);q.strokeCommands.drawCircle(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+2]);break;case 6:d.advance();d.prev=z.DRAW_ELLIPSE;f=d;q.fillCommands.drawEllipse(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+2],f.buffer.f[f.fPos+3]);q.strokeCommands.drawEllipse(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+2],f.buffer.f[f.fPos+3]);break;case 8:d.advance();d.prev=z.DRAW_RECT;f=d;q.fillCommands.drawRect(f.buffer.f[f.fPos],f.buffer.f[f.fPos+
1],f.buffer.f[f.fPos+2],f.buffer.f[f.fPos+3]);q.strokeCommands.drawRect(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+2],f.buffer.f[f.fPos+3]);break;case 9:d.advance();d.prev=z.DRAW_ROUND_RECT;f=d;q.fillCommands.drawRoundRect(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+2],f.buffer.f[f.fPos+3],f.buffer.f[f.fPos+4],f.buffer.f[f.fPos+5]);q.strokeCommands.drawRoundRect(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+2],f.buffer.f[f.fPos+3],f.buffer.f[f.fPos+4],f.buffer.f[f.fPos+
5]);break;default:d.advance(),d.prev=f}}0<q.fillCommands.get_length()&&q.endFill();0<q.strokeCommands.get_length()&&q.endStroke();d.destroy();if(q.hasFill&&q.context.isPointInPath(b,c)||q.hasStroke&&q.context.isPointInStroke(b,c))return!0}return!1};q.normalizeUVT=function(a,b){null==b&&(b=!1);for(var c=-Infinity,d=-Infinity,e=a.length,f=1,n=e+1;f<n;)d=f++,b&&0==d%3||(d=a.data[d-1],c<d&&(c=d));f=new kf;f.data=[];f.length=0;f.fixed=!1;n=1;for(e+=1;n<e;)if(d=n++,!b||0!=d%3){if(!f.fixed){f.length++;if(f.data.length<
f.length){var g;g=Array(f.data.length+10);ee.blit(f.data,0,g,0,f.data.length);f.data=g}f.data[f.length-1]=a.data[d-1]/c}f.length}return{max:c,uvt:f}};q.playCommands=function(a,b){null==b&&(b=!1);q.bounds=q.graphics.__bounds;for(var c=q.bounds.x,d=q.bounds.y,e=0,f=0,n=!1,g=0,h=0,k=new nd(a),l=0,m=a.types;l<m.length;){var w=m[l];++l;switch(w[1]){case 3:k.advance();k.prev=z.CUBIC_CURVE_TO;w=k;q.context.bezierCurveTo(w.buffer.f[w.fPos]-c,w.buffer.f[w.fPos+1]-d,w.buffer.f[w.fPos+3]-c,w.buffer.f[w.fPos+
4]-d,w.buffer.f[w.fPos+5]-c,w.buffer.f[w.fPos+6]-d);break;case 4:k.advance();k.prev=z.CURVE_TO;w=k;q.context.quadraticCurveTo(w.buffer.f[w.fPos]-c,w.buffer.f[w.fPos+1]-d,w.buffer.f[w.fPos+2]-c,w.buffer.f[w.fPos+3]-d);break;case 5:k.advance();k.prev=z.DRAW_CIRCLE;w=k;q.context.moveTo(w.buffer.f[w.fPos]-c+w.buffer.f[w.fPos+2],w.buffer.f[w.fPos+1]-d);q.context.arc(w.buffer.f[w.fPos]-c,w.buffer.f[w.fPos+1]-d,w.buffer.f[w.fPos+2],0,2*Math.PI,!0);break;case 6:var p;k.advance();k.prev=z.DRAW_ELLIPSE;p=k;
var w=p.buffer.f[p.fPos],r=p.buffer.f[p.fPos+1],t=p.buffer.f[p.fPos+2],u=p.buffer.f[p.fPos+3],w=w-c,r=r-d;p=t/2*.5522848;var v=u/2*.5522848,x=w+t,y=r+u,t=w+t/2,u=r+u/2;q.context.moveTo(w,u);q.context.bezierCurveTo(w,u-v,t-p,r,t,r);q.context.bezierCurveTo(t+p,r,x,u-v,x,u);q.context.bezierCurveTo(x,u+v,t+p,y,t,y);q.context.bezierCurveTo(t-p,y,w,u+v,w,u);break;case 9:k.advance();k.prev=z.DRAW_ROUND_RECT;w=k;q.drawRoundRect(w.buffer.f[w.fPos]-c,w.buffer.f[w.fPos+1]-d,w.buffer.f[w.fPos+2],w.buffer.f[w.fPos+
3],w.buffer.f[w.fPos+4],w.buffer.f[w.fPos+5]);break;case 16:k.advance();k.prev=z.LINE_TO;f=k;q.context.lineTo(f.buffer.f[f.fPos]-c,f.buffer.f[f.fPos+1]-d);e=f.buffer.f[f.fPos];f=f.buffer.f[f.fPos+1];break;case 17:k.advance();k.prev=z.MOVE_TO;h=k;q.context.moveTo(h.buffer.f[h.fPos]-c,h.buffer.f[h.fPos+1]-d);e=h.buffer.f[h.fPos];f=h.buffer.f[h.fPos+1];n=!0;g=h.buffer.f[h.fPos];h=h.buffer.f[h.fPos+1];break;case 15:k.advance();k.prev=z.LINE_STYLE;w=k;b&&q.hasStroke&&(q.context.closePath(),q.hitTesting||
q.context.stroke(),q.context.beginPath());q.context.moveTo(e-c,f-d);if(null==w.buffer.o[w.oPos])q.hasStroke=!1;else{q.context.lineWidth=0<w.buffer.o[w.oPos]?w.buffer.o[w.oPos]:1;q.context.lineJoin=null==w.buffer.o[w.oPos+6]?"round":K.string(w.buffer.o[w.oPos+6]).toLowerCase();if(null==w.buffer.o[w.oPos+5])q.context.lineCap="round";else switch(w.buffer.o[w.oPos+5][1]){case 0:q.context.lineCap="butt";break;default:q.context.lineCap=K.string(w.buffer.o[w.oPos+5]).toLowerCase()}q.context.miterLimit=null==
w.buffer.o[w.oPos+7]?3:w.buffer.o[w.oPos+7];1==w.buffer.o[w.oPos+2]||null==w.buffer.o[w.oPos+2]?q.context.strokeStyle=null==w.buffer.o[w.oPos+1]?"#000000":"#"+P.hex(w.buffer.o[w.oPos+1]&16777215,6):(r=(w.buffer.o[w.oPos+1]&16711680)>>>16,p=(w.buffer.o[w.oPos+1]&65280)>>>8,v=w.buffer.o[w.oPos+1]&255,q.context.strokeStyle=null==w.buffer.o[w.oPos+1]?"#000000":"rgba("+r+", "+p+", "+v+", "+w.buffer.o[w.oPos+2]+")");q.hasStroke=!0}break;case 14:k.advance();k.prev=z.LINE_GRADIENT_STYLE;w=k;b&&q.hasStroke&&
q.closePath();q.context.moveTo(e-c,f-d);q.context.strokeStyle=q.createGradientPattern(w.buffer.o[w.oPos],w.buffer.ii[w.iiPos],w.buffer.ff[w.ffPos],w.buffer.ii[w.iiPos+1],w.buffer.o[w.oPos+1],w.buffer.o[w.oPos+2],w.buffer.o[w.oPos+3],w.buffer.o[w.oPos+4]);q.hasStroke=!0;break;case 13:k.advance();k.prev=z.LINE_BITMAP_STYLE;w=k;b&&q.hasStroke&&q.closePath();q.context.moveTo(e-c,f-d);q.context.strokeStyle=q.createBitmapFill(w.buffer.o[w.oPos],w.buffer.b[w.bPos]);q.hasStroke=!0;break;case 0:k.advance();
k.prev=z.BEGIN_BITMAP_FILL;w=k;q.context.fillStyle=q.createBitmapFill(w.buffer.o[w.oPos],!0);q.hasFill=!0;null!=w.buffer.o[w.oPos+1]?(q.pendingMatrix=w.buffer.o[w.oPos+1],q.inversePendingMatrix=w.buffer.o[w.oPos+1].clone(),q.inversePendingMatrix.invert()):(q.pendingMatrix=null,q.inversePendingMatrix=null);break;case 1:k.advance();k.prev=z.BEGIN_FILL;w=k;.005>w.buffer.f[w.fPos]?q.hasFill=!1:(q.context.fillStyle=1==w.buffer.f[w.fPos]?"#"+P.hex(w.buffer.i[w.iPos],6):"rgba("+((w.buffer.i[w.iPos]&16711680)>>>
16)+", "+((w.buffer.i[w.iPos]&65280)>>>8)+", "+(w.buffer.i[w.iPos]&255)+", "+w.buffer.f[w.fPos]+")",q.bitmapFill=null,q.hasFill=!0);break;case 2:k.advance();k.prev=z.BEGIN_GRADIENT_FILL;w=k;q.context.fillStyle=q.createGradientPattern(w.buffer.o[w.oPos],w.buffer.ii[w.iiPos],w.buffer.ff[w.ffPos],w.buffer.ii[w.iiPos+1],w.buffer.o[w.oPos+1],w.buffer.o[w.oPos+2],w.buffer.o[w.oPos+3],w.buffer.o[w.oPos+4]);q.bitmapFill=null;q.hasFill=!0;break;case 8:k.advance();k.prev=z.DRAW_RECT;w=k;r=!1;null!=q.bitmapFill&&
(y=x=t=p=0,v=!0,null!=q.pendingMatrix?0!=q.pendingMatrix.b||0!=q.pendingMatrix.c?v=!1:(x=q.inversePendingMatrix.transformPoint(new Ea(w.buffer.f[w.fPos],w.buffer.f[w.fPos+1])),t=q.inversePendingMatrix.transformPoint(new Ea(w.buffer.f[w.fPos]+w.buffer.f[w.fPos+2],w.buffer.f[w.fPos+1]+w.buffer.f[w.fPos+3])),p=x.y,y=x.x,x=t.y,t=t.x):(p=w.buffer.f[w.fPos+1],y=w.buffer.f[w.fPos],x=w.buffer.f[w.fPos+1]+w.buffer.f[w.fPos+3],t=w.buffer.f[w.fPos]+w.buffer.f[w.fPos+2]),v&&0<=p&&0<=y&&t<=q.bitmapFill.width&&
x<=q.bitmapFill.height&&(r=!0,q.hitTesting||q.context.drawImage(q.bitmapFill.image.get_src(),y,p,t-y,x-p,w.buffer.f[w.fPos]-c,w.buffer.f[w.fPos+1]-d,w.buffer.f[w.fPos+2],w.buffer.f[w.fPos+3])));r||q.context.rect(w.buffer.f[w.fPos]-c,w.buffer.f[w.fPos+1]-d,w.buffer.f[w.fPos+2],w.buffer.f[w.fPos+3]);break;default:k.advance(),k.prev=w}}k.destroy();b&&q.hasStroke&&(q.hasFill&&n?q.context.lineTo(g-c,h-d):n&&e==g&&f==h&&q.context.closePath(),q.hitTesting||q.context.stroke());b||!q.hasFill&&null==q.bitmapFill||
(q.context.translate(-q.bounds.x,-q.bounds.y),null!=q.pendingMatrix?(q.context.transform(q.pendingMatrix.a,q.pendingMatrix.b,q.pendingMatrix.c,q.pendingMatrix.d,q.pendingMatrix.tx,q.pendingMatrix.ty),q.hitTesting||q.context.fill(),q.context.transform(q.inversePendingMatrix.a,q.inversePendingMatrix.b,q.inversePendingMatrix.c,q.inversePendingMatrix.d,q.inversePendingMatrix.tx,q.inversePendingMatrix.ty)):q.hitTesting||q.context.fill(),q.context.translate(q.bounds.x,q.bounds.y),q.context.closePath())};
q.render=function(a,b){if(a.__dirty){q.hitTesting=!1;q.graphics=a;q.bounds=a.__bounds;if(!a.__visible||0==a.__commands.get_length()||null==q.bounds||0>=q.bounds.width||0>=q.bounds.height)a.__canvas=null,a.__context=null,a.__bitmap=null;else{null==a.__canvas&&(a.__canvas=window.document.createElement("canvas"),a.__context=a.__canvas.getContext("2d"));q.context=a.__context;a.__canvas.width=Math.ceil(q.bounds.width);a.__canvas.height=Math.ceil(q.bounds.height);q.fillCommands.clear();q.strokeCommands.clear();
q.hasFill=!1;q.hasStroke=!1;q.bitmapFill=null;q.bitmapRepeat=!1;var c=new nd(a.__commands),d=0,e=a.__commands.types;try{for(;d<e.length;){var f=e[d];++d;switch(f[1]){case 3:var n;c.advance();c.prev=z.CUBIC_CURVE_TO;n=c;q.fillCommands.cubicCurveTo(n.buffer.f[n.fPos],n.buffer.f[n.fPos+1],n.buffer.f[n.fPos+3],n.buffer.f[n.fPos+4],n.buffer.f[n.fPos+5],n.buffer.f[n.fPos+6]);q.strokeCommands.cubicCurveTo(n.buffer.f[n.fPos],n.buffer.f[n.fPos+1],n.buffer.f[n.fPos+3],n.buffer.f[n.fPos+4],n.buffer.f[n.fPos+
5],n.buffer.f[n.fPos+6]);break;case 4:var g;c.advance();c.prev=z.CURVE_TO;g=c;q.fillCommands.curveTo(g.buffer.f[g.fPos],g.buffer.f[g.fPos+1],g.buffer.f[g.fPos+2],g.buffer.f[g.fPos+3]);q.strokeCommands.curveTo(g.buffer.f[g.fPos],g.buffer.f[g.fPos+1],g.buffer.f[g.fPos+2],g.buffer.f[g.fPos+3]);break;case 16:var h;c.advance();c.prev=z.LINE_TO;h=c;q.fillCommands.lineTo(h.buffer.f[h.fPos],h.buffer.f[h.fPos+1]);q.strokeCommands.lineTo(h.buffer.f[h.fPos],h.buffer.f[h.fPos+1]);break;case 17:var k;c.advance();
c.prev=z.MOVE_TO;k=c;q.fillCommands.moveTo(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1]);q.strokeCommands.moveTo(k.buffer.f[k.fPos],k.buffer.f[k.fPos+1]);break;case 12:c.advance();c.prev=z.END_FILL;c;q.endFill();q.endStroke();q.hasFill=!1;q.bitmapFill=null;break;case 15:var l;c.advance();c.prev=z.LINE_STYLE;l=c;q.strokeCommands.lineStyle(l.buffer.o[l.oPos],l.buffer.o[l.oPos+1],l.buffer.o[l.oPos+2],l.buffer.o[l.oPos+3],l.buffer.o[l.oPos+4],l.buffer.o[l.oPos+5],l.buffer.o[l.oPos+6],l.buffer.o[l.oPos+7]);
break;case 14:var m;c.advance();c.prev=z.LINE_GRADIENT_STYLE;m=c;q.strokeCommands.lineGradientStyle(m.buffer.o[m.oPos],m.buffer.ii[m.iiPos],m.buffer.ff[m.ffPos],m.buffer.ii[m.iiPos+1],m.buffer.o[m.oPos+1],m.buffer.o[m.oPos+2],m.buffer.o[m.oPos+3],m.buffer.o[m.oPos+4]);break;case 13:var p;c.advance();c.prev=z.LINE_BITMAP_STYLE;p=c;q.strokeCommands.lineBitmapStyle(p.buffer.o[p.oPos],p.buffer.o[p.oPos+1],p.buffer.b[p.bPos],p.buffer.b[p.bPos+1]);break;case 0:case 1:case 2:q.endFill();q.endStroke();if(f==
z.BEGIN_BITMAP_FILL){var r;c.advance();c.prev=z.BEGIN_BITMAP_FILL;r=c;q.fillCommands.beginBitmapFill(r.buffer.o[r.oPos],r.buffer.o[r.oPos+1],r.buffer.b[r.bPos],r.buffer.b[r.bPos+1]);q.strokeCommands.beginBitmapFill(r.buffer.o[r.oPos],r.buffer.o[r.oPos+1],r.buffer.b[r.bPos],r.buffer.b[r.bPos+1])}else if(f==z.BEGIN_GRADIENT_FILL){var t;c.advance();c.prev=z.BEGIN_GRADIENT_FILL;t=c;q.fillCommands.beginGradientFill(t.buffer.o[t.oPos],t.buffer.ii[t.iiPos],t.buffer.ff[t.ffPos],t.buffer.ii[t.iiPos+1],t.buffer.o[t.oPos+
1],t.buffer.o[t.oPos+2],t.buffer.o[t.oPos+3],t.buffer.o[t.oPos+4]);q.strokeCommands.beginGradientFill(t.buffer.o[t.oPos],t.buffer.ii[t.iiPos],t.buffer.ff[t.ffPos],t.buffer.ii[t.iiPos+1],t.buffer.o[t.oPos+1],t.buffer.o[t.oPos+2],t.buffer.o[t.oPos+3],t.buffer.o[t.oPos+4])}else{var u;c.advance();c.prev=z.BEGIN_FILL;u=c;q.fillCommands.beginFill(u.buffer.i[u.iPos],u.buffer.f[u.fPos]);q.strokeCommands.beginFill(u.buffer.i[u.iPos],u.buffer.f[u.fPos])}break;case 5:var v;c.advance();c.prev=z.DRAW_CIRCLE;v=
c;q.fillCommands.drawCircle(v.buffer.f[v.fPos],v.buffer.f[v.fPos+1],v.buffer.f[v.fPos+2]);q.strokeCommands.drawCircle(v.buffer.f[v.fPos],v.buffer.f[v.fPos+1],v.buffer.f[v.fPos+2]);break;case 6:var x;c.advance();c.prev=z.DRAW_ELLIPSE;x=c;q.fillCommands.drawEllipse(x.buffer.f[x.fPos],x.buffer.f[x.fPos+1],x.buffer.f[x.fPos+2],x.buffer.f[x.fPos+3]);q.strokeCommands.drawEllipse(x.buffer.f[x.fPos],x.buffer.f[x.fPos+1],x.buffer.f[x.fPos+2],x.buffer.f[x.fPos+3]);break;case 8:var I;c.advance();c.prev=z.DRAW_RECT;
I=c;q.fillCommands.drawRect(I.buffer.f[I.fPos],I.buffer.f[I.fPos+1],I.buffer.f[I.fPos+2],I.buffer.f[I.fPos+3]);q.strokeCommands.drawRect(I.buffer.f[I.fPos],I.buffer.f[I.fPos+1],I.buffer.f[I.fPos+2],I.buffer.f[I.fPos+3]);break;case 9:var y;c.advance();c.prev=z.DRAW_ROUND_RECT;y=c;q.fillCommands.drawRoundRect(y.buffer.f[y.fPos],y.buffer.f[y.fPos+1],y.buffer.f[y.fPos+2],y.buffer.f[y.fPos+3],y.buffer.f[y.fPos+4],y.buffer.f[y.fPos+5]);q.strokeCommands.drawRoundRect(y.buffer.f[y.fPos],y.buffer.f[y.fPos+
1],y.buffer.f[y.fPos+2],y.buffer.f[y.fPos+3],y.buffer.f[y.fPos+4],y.buffer.f[y.fPos+5]);break;case 11:q.endFill();q.endStroke();var B;c.advance();c.prev=z.DRAW_TRIANGLES;B=c;var A=B.buffer.o[B.oPos],F=B.buffer.o[B.oPos+1],C=B.buffer.o[B.oPos+2],D=null,E=null==q.bitmapFill;if(E&&null!=C)throw"__break__";if(!E){if(null==C){var G;G=new kf;G.data=[];G.length=0;G.fixed=!1;for(var C=G,H=0,J=A.length/2|0;H<J;){var K=H++;if(!C.fixed){C.length++;if(C.data.length<C.length){var M;M=Array(C.data.length+10);ee.blit(C.data,
0,M,0,C.data.length);C.data=M}C.data[C.length-1]=A.data[2*K]/q.bitmapFill.width}C.length;if(!C.fixed){C.length++;if(C.data.length<C.length){var N;N=Array(C.data.length+10);ee.blit(C.data,0,N,0,C.data.length);C.data=N}C.data[C.length-1]=A.data[2*K+1]/q.bitmapFill.height}C.length}}var O=q.normalizeUVT(C,C.length!=A.length),P=O.max,C=O.uvt,D=1<P?q.createTempPatternCanvas(q.bitmapFill,q.bitmapRepeat,q.bounds.width|0,q.bounds.height|0):q.createTempPatternCanvas(q.bitmapFill,q.bitmapRepeat,q.bitmapFill.width,
q.bitmapFill.height)}for(var H=0,S=F.length,Q,T,U,W,ea,ca,fa,ga,ka,X,da,Y,Z,aa,ba,ma,na,ha,ia,ja,la,oa,ra,sa,ua,va,wa,ya;H<S;){Q=H;T=H+1;U=H+2;W=2*F.data[Q];ea=2*F.data[Q]+1;ca=2*F.data[T];fa=2*F.data[T]+1;ga=2*F.data[U];ka=2*F.data[U]+1;X=A.data[W];da=A.data[ea];Y=A.data[ca];Z=A.data[fa];aa=A.data[ga];ba=A.data[ka];switch(B.buffer.o[B.oPos+3][1]){case 2:if(!(0>(Y-X)*(ba-da)-(Z-da)*(aa-X))){H+=3;continue}break;case 0:if(0>(Y-X)*(ba-da)-(Z-da)*(aa-X)){H+=3;continue}}E?(q.context.beginPath(),q.context.moveTo(X,
da),q.context.lineTo(Y,Z),q.context.lineTo(aa,ba),q.context.closePath(),q.hitTesting||q.context.fill()):(q.context.save(),q.context.beginPath(),q.context.moveTo(X,da),q.context.lineTo(Y,Z),q.context.lineTo(aa,ba),q.context.closePath(),q.context.clip(),ma=C.data[W]*D.width,ha=C.data[ca]*D.width,ja=C.data[ga]*D.width,na=C.data[ea]*D.height,ia=C.data[fa]*D.height,la=C.data[ka]*D.height,oa=ma*(la-ia)-ha*la+ja*ia+(ha-ja)*na,0!=oa&&(ra=-(na*(aa-Y)-ia*aa+la*Y+(ia-la)*X)/oa,sa=(ia*ba+na*(Z-ba)-la*Z+(la-ia)*
da)/oa,ua=(ma*(aa-Y)-ha*aa+ja*Y+(ha-ja)*X)/oa,va=-(ha*ba+ma*(Z-ba)-ja*Z+(ja-ha)*da)/oa,wa=(ma*(la*Y-ia*aa)+na*(ha*aa-ja*Y)+(ja*ia-ha*la)*X)/oa,ya=(ma*(la*Z-ia*ba)+na*(ha*ba-ja*Z)+(ja*ia-ha*la)*da)/oa,q.context.transform(ra,sa,ua,va,wa,ya),q.context.drawImage(D,0,0),q.context.restore()));H+=3}break;case 10:var V;c.advance();c.prev=z.DRAW_TILES;V=c;var za=0<(V.buffer.i[V.iPos]&1),Ea=q.bounds.x,Fa=q.bounds.y,Aa=0<(V.buffer.i[V.iPos]&2),Ca=0<(V.buffer.i[V.iPos]&16),Ha=0<(V.buffer.i[V.iPos]&4),Ga=0<(V.buffer.i[V.iPos]&
8),Ba=0<(V.buffer.i[V.iPos]&32),Ia=0<(V.buffer.i[V.iPos]&64),Ka=0<(V.buffer.i[V.iPos]&65536);Ca&&(Aa=za=!1);var La=H=D=0,Da=0,qa=3;Ba&&(qa=Ia?8:6);za&&(D=qa,qa++);Aa&&(H=qa,qa++);Ca&&(Da=qa,qa+=4);Ha&&(qa+=3);Ga&&(La=qa,qa++);var Ja=V.buffer.ff[V.ffPos].length;0<=V.buffer.i[V.iPos+1]&&Ja>V.buffer.i[V.iPos+1]&&(Ja=V.buffer.i[V.iPos+1]);var pa=0,ta=null,xa=null,Oa=-1,Pa;V.buffer.ts[V.tsPos].__bitmap.__sync();Pa=V.buffer.ts[V.tsPos].__bitmap.image.get_src();Ka&&(q.context.globalCompositeOperation="lighter");
for(;pa<Ja;){var Ma;Ma=Ba?-1:V.buffer.ff[V.ffPos][pa+2]|0;Ba||Ma==Oa?Ba&&(ta=V.buffer.ts[V.tsPos].__rectTile,ta.setTo(V.buffer.ff[V.ffPos][pa+2],V.buffer.ff[V.ffPos][pa+3],V.buffer.ff[V.ffPos][pa+4],V.buffer.ff[V.ffPos][pa+5]),xa=V.buffer.ts[V.tsPos].__point,Ia?(xa.x=V.buffer.ff[V.ffPos][pa+6],xa.y=V.buffer.ff[V.ffPos][pa+7]):(xa.x=0,xa.y=0)):(ta=V.buffer.ts[V.tsPos].__tileRects[Ma],xa=V.buffer.ts[V.tsPos].__centerPoints[Ma],Oa=Ma);if(null!=ta&&0<ta.width&&0<ta.height&&null!=xa){q.context.save();
q.context.translate(V.buffer.ff[V.ffPos][pa]-Ea,V.buffer.ff[V.ffPos][pa+1]-Fa);Aa&&q.context.rotate(V.buffer.ff[V.ffPos][pa+H]);var Na=1;za&&(Na=V.buffer.ff[V.ffPos][pa+D]);Ca&&q.context.transform(V.buffer.ff[V.ffPos][pa+Da],V.buffer.ff[V.ffPos][pa+Da+1],V.buffer.ff[V.ffPos][pa+Da+2],V.buffer.ff[V.ffPos][pa+Da+3],0,0);Ga&&(q.context.globalAlpha=V.buffer.ff[V.ffPos][pa+La]);q.context.imageSmoothingEnabled=V.buffer.b[V.bPos];q.context.drawImage(Pa,ta.x,ta.y,ta.width,ta.height,-xa.x*Na,-xa.y*Na,ta.width*
Na,ta.height*Na);q.context.restore()}pa+=qa}Ka&&(q.context.globalCompositeOperation="source-over");break;default:c.advance(),c.prev=f}}}catch(Qa){if("__break__"!=Qa)throw Qa;}0<q.fillCommands.get_length()&&q.endFill();0<q.strokeCommands.get_length()&&q.endStroke();c.destroy();a.__bitmap=Ra.fromCanvas(a.__canvas)}a.set___dirty(!1)}};q.renderMask=function(a,b){if(0!=a.__commands.get_length()){q.context=b.context;for(var c=new nd(a.__commands),d=0,e=a.__commands.types;d<e.length;){var f=e[d];++d;switch(f[1]){case 3:c.advance();
c.prev=z.CUBIC_CURVE_TO;f=c;q.context.bezierCurveTo(f.buffer.f[f.fPos]-0,f.buffer.f[f.fPos+1]-0,f.buffer.f[f.fPos+3]-0,f.buffer.f[f.fPos+4]-0,f.buffer.f[f.fPos+5]-0,f.buffer.f[f.fPos+6]-0);break;case 4:c.advance();c.prev=z.CURVE_TO;f=c;q.context.quadraticCurveTo(f.buffer.f[f.fPos]-0,f.buffer.f[f.fPos+1]-0,f.buffer.f[f.fPos+2]-0,f.buffer.f[f.fPos+3]-0);break;case 5:c.advance();c.prev=z.DRAW_CIRCLE;f=c;q.context.arc(f.buffer.f[f.fPos]-0,f.buffer.f[f.fPos+1]-0,f.buffer.f[f.fPos+2],0,2*Math.PI,!0);break;
case 6:var n;c.advance();c.prev=z.DRAW_ELLIPSE;n=c;var f=n.buffer.f[n.fPos],g=n.buffer.f[n.fPos+1],h=n.buffer.f[n.fPos+2],k=n.buffer.f[n.fPos+3],f=f-0,g=g-0;n=h/2*.5522848;var l=k/2*.5522848,m=f+h,p=g+k,h=f+h/2,k=g+k/2;q.context.moveTo(f,k);q.context.bezierCurveTo(f,k-l,h-n,g,h,g);q.context.bezierCurveTo(h+n,g,m,k-l,m,k);q.context.bezierCurveTo(m,k+l,h+n,p,h,p);q.context.bezierCurveTo(h-n,p,f,k+l,f,k);break;case 8:c.advance();c.prev=z.DRAW_RECT;f=c;q.context.rect(f.buffer.f[f.fPos]-0,f.buffer.f[f.fPos+
1]-0,f.buffer.f[f.fPos+2],f.buffer.f[f.fPos+3]);break;case 9:c.advance();c.prev=z.DRAW_ROUND_RECT;f=c;q.drawRoundRect(f.buffer.f[f.fPos]-0,f.buffer.f[f.fPos+1]-0,f.buffer.f[f.fPos+2],f.buffer.f[f.fPos+3],f.buffer.f[f.fPos+4],f.buffer.f[f.fPos+5]);break;case 16:c.advance();c.prev=z.LINE_TO;f=c;q.context.lineTo(f.buffer.f[f.fPos]-0,f.buffer.f[f.fPos+1]-0);break;case 17:c.advance();c.prev=z.MOVE_TO;f=c;q.context.moveTo(f.buffer.f[f.fPos]-0,f.buffer.f[f.fPos+1]-0);break;default:c.advance(),c.prev=f}}c.destroy()}};
var kg=function(a){this.renderSession=a};g["openfl._internal.renderer.canvas.CanvasMaskManager"]=kg;kg.__name__=["openfl","_internal","renderer","canvas","CanvasMaskManager"];kg.__super__=Zc;kg.prototype=t(Zc.prototype,{pushMask:function(a){var b=this.renderSession.context;b.save();var c=a.__getWorldTransform();b.setTransform(c.a,c.b,c.c,c.d,c.tx,c.ty);b.beginPath();a.__renderCanvasMask(this.renderSession);b.clip()},pushRect:function(a,b){var c=this.renderSession.context;c.save();c.setTransform(b.a,
b.b,b.c,b.d,b.tx,b.ty);c.beginPath();c.rect(a.x,a.y,a.width,a.height);c.clip()},popMask:function(){this.renderSession.context.restore()},popRect:function(){this.renderSession.context.restore()},__class__:kg});var Fi=function(a,b,c){zb.call(this,a,b);this.context=c;this.renderSession=new me;this.renderSession.context=c;this.renderSession.roundPixels=!0;this.renderSession.renderer=this;this.renderSession.maskManager=new kg(this.renderSession)};g["openfl._internal.renderer.canvas.CanvasRenderer"]=Fi;
Fi.__name__=["openfl","_internal","renderer","canvas","CanvasRenderer"];Fi.__super__=zb;Fi.prototype=t(zb.prototype,{context:null,render:function(a){this.context.setTransform(1,0,0,1,0,0);this.context.globalAlpha=1;!a.__transparent&&a.__clearBeforeRender?(this.context.fillStyle=a.__colorString,this.context.fillRect(0,0,a.stageWidth,a.stageHeight)):a.__transparent&&a.__clearBeforeRender&&this.context.clearRect(0,0,a.stageWidth,a.stageHeight);a.__renderCanvas(this.renderSession)},__class__:Fi});var Lk=
function(){};g["openfl._internal.renderer.canvas.CanvasShape"]=Lk;Lk.__name__=["openfl","_internal","renderer","canvas","CanvasShape"];Lk.render=function(a,b){if(a.__renderable&&!(0>=a.__worldAlpha)){var c=a.__graphics;if(null!=c&&(q.render(c,b),null!=c.__canvas)){var d=b.context,e=a.get_scrollRect();if(0<c.__bounds.width&&0<c.__bounds.height&&(null==e||0<e.width&&0<e.height)){null!=a.__mask&&b.maskManager.pushMask(a.__mask);d.globalAlpha=a.__worldAlpha;var f=a.__renderTransform;b.roundPixels?d.setTransform(f.a,
f.b,f.c,f.d,f.tx|0,f.ty|0):d.setTransform(f.a,f.b,f.c,f.d,f.tx,f.ty);null==e?d.drawImage(c.__canvas,c.__bounds.x,c.__bounds.y):d.drawImage(c.__canvas,Math.ceil(c.__bounds.x+e.x),Math.ceil(c.__bounds.y+e.y),e.width,e.height,Math.ceil(c.__bounds.x+e.x),Math.ceil(c.__bounds.y+e.y),e.width,e.height);null!=a.__mask&&b.maskManager.popMask()}}}};var Ka=function(){};g["openfl._internal.renderer.canvas.CanvasTextField"]=Ka;Ka.__name__=["openfl","_internal","renderer","canvas","CanvasTextField"];Ka.context=
null;Ka.render=function(a,b){if(a.__dirty){var c=a.__textEngine;a.__updateLayout();if(!(null!=c.text&&""!=c.text||c.background||c.border||c.__hasFocus)||(0>=c.width||0>=c.height)&&c.autoSize!=ia.NONE)a.__graphics.__canvas=null,a.__graphics.__context=null,a.__graphics.set___dirty(!1),a.__dirty=!1;else{var d=c.bounds;if(null==a.__graphics||null==a.__graphics.__canvas)null==a.__graphics&&(a.__graphics=new Nd),a.__graphics.__canvas=window.document.createElement("canvas"),a.__graphics.__context=a.__graphics.__canvas.getContext("2d"),
a.__graphics.__bounds=new ha(0,0,d.width,d.height);var e=a.__graphics;Ka.context=e.__context;if(null!=c.text&&""!=c.text||c.__hasFocus){var f=c.text;if(c.displayAsPassword){for(var f=f.length,n="",g=0;g<f;)g++,n+="*";f=n}e.__canvas.width=Math.ceil(d.width);e.__canvas.height=Math.ceil(d.height);c.antiAliasType!=md.ADVANCED||c.gridFitType!=gc.PIXEL?(e.__context.mozImageSmoothingEnabled=!0,e.__context.msImageSmoothingEnabled=!0,e.__context.imageSmoothingEnabled=!0):(e.__context.mozImageSmoothingEnabled=
!1,e.__context.msImageSmoothingEnabled=!1,e.__context.imageSmoothingEnabled=!1);if(c.border||c.background)Ka.context.rect(.5,.5,d.width-1,d.height-1),c.background&&(Ka.context.fillStyle="#"+P.hex(c.backgroundColor,6),Ka.context.fill()),c.border&&(Ka.context.lineWidth=1,Ka.context.strokeStyle="#"+P.hex(c.borderColor,6),Ka.context.stroke());Ka.context.textBaseline="top";Ka.context.textAlign="start";for(var d=-a.get_scrollH(),g=n=0,h=a.get_scrollV()-1;g<h;)var k=g++,n=n-c.lineHeights[k];for(var l,g=
0,h=(new jc("(iPad|iPhone|iPod|Firefox)","g")).match(window.navigator.userAgent),k=0,m=c.layoutGroups;k<m.length;){var p=m[k];++k;if(!(p.lineIndex<a.get_scrollV()-1)){if(p.lineIndex>a.get_scrollV()+c.bottomScrollV-2)break;Ka.context.font=Pa.getFont(p.format);Ka.context.fillStyle="#"+P.hex(p.format.color,6);h&&(g=.185*p.format.size);Ka.context.fillText(f.substring(p.startIndex,p.endIndex),p.offsetX+d,p.offsetY+g+n);if(-1<a.__caretIndex&&c.selectable)if(a.__selectionIndex==a.__caretIndex){if(a.__showCursor&&
p.startIndex<=a.__caretIndex&&p.endIndex>=a.__caretIndex){for(var q=l=0,t=a.__caretIndex-p.startIndex;q<t;){var r=q++;if(p.advances.length<=r)break;l+=p.advances[r]}Ka.context.fillRect(p.offsetX+l,p.offsetY,1,p.height)}}else if(p.startIndex<=a.__caretIndex&&p.endIndex>=a.__caretIndex||p.startIndex<=a.__selectionIndex&&p.endIndex>=a.__selectionIndex)l=K["int"](Math.min(a.__selectionIndex,a.__caretIndex)),q=K["int"](Math.max(a.__selectionIndex,a.__caretIndex)),p.startIndex>l&&(l=p.startIndex),p.endIndex<
q&&(q=p.endIndex),t=a.getCharBoundaries(l),q>=c.text.length?(r=a.getCharBoundaries(c.text.length-1),r.x+=r.width+2):r=a.getCharBoundaries(q),null!=t&&null!=r&&(Ka.context.fillStyle="#000000",Ka.context.fillRect(t.x,t.y,r.x-t.x,p.height),Ka.context.fillStyle="#FFFFFF",Ka.context.fillText(f.substring(l,q),d+t.x,p.offsetY+g+n))}}}else if(e.__canvas.width=Math.ceil(d.width),e.__canvas.height=Math.ceil(d.height),c.border||c.background)c.border?Ka.context.rect(.5,.5,d.width-1,d.height-1):Ka.context.rect(0,
0,d.width,d.height),c.background&&(Ka.context.fillStyle="#"+P.hex(c.backgroundColor,6),Ka.context.fill()),c.border&&(Ka.context.lineWidth=1,Ka.context.lineCap="square",Ka.context.strokeStyle="#"+P.hex(c.borderColor,6),Ka.context.stroke());e.__bitmap=Ra.fromCanvas(a.__graphics.__canvas);a.__dirty=!1;e.set___dirty(!1)}}};var Gi=function(a,b,c){zb.call(this,a,b);throw new m("ConsoleRenderer not supported");};g["openfl._internal.renderer.console.ConsoleRenderer"]=Gi;Gi.__name__=["openfl","_internal",
"renderer","console","ConsoleRenderer"];Gi.__super__=zb;Gi.prototype=t(zb.prototype,{render:function(a){},__class__:Gi});var Hi=function(){};g["openfl._internal.renderer.dom.DOMBitmap"]=Hi;Hi.__name__=["openfl","_internal","renderer","dom","DOMBitmap"];Hi.renderCanvas=function(a,b){null!=a.__image&&(b.element.removeChild(a.__image),a.__image=null);null==a.__canvas&&(a.__canvas=window.document.createElement("canvas"),a.__context=a.__canvas.getContext("2d"),a.smoothing||(a.__context.mozImageSmoothingEnabled=
!1,a.__context.msImageSmoothingEnabled=!1,a.__context.imageSmoothingEnabled=!1),hc.initializeElement(a,a.__canvas,b));a.bitmapData.__sync();a.__canvas.width=a.bitmapData.width;a.__canvas.height=a.bitmapData.height;a.__context.globalAlpha=a.__worldAlpha;a.__context.drawImage(a.bitmapData.image.buffer.__srcCanvas,0,0);hc.applyStyle(a,b,!0,!1,!0)};Hi.renderImage=function(a,b){null!=a.__canvas&&(b.element.removeChild(a.__canvas),a.__canvas=null);null==a.__image&&(a.__image=window.document.createElement("img"),
a.__image.src=a.bitmapData.image.buffer.__srcImage.src,hc.initializeElement(a,a.__image,b));hc.applyStyle(a,b,!0,!0,!0)};var Ii=function(a){this.renderSession=a};g["openfl._internal.renderer.dom.DOMMaskManager"]=Ii;Ii.__name__=["openfl","_internal","renderer","dom","DOMMaskManager"];Ii.__super__=Zc;Ii.prototype=t(Zc.prototype,{pushMask:function(a){},pushRect:function(a,b){},popMask:function(){},__class__:Ii});var hc=function(a,b,c){zb.call(this,a,b);this.element=c;this.renderSession=new me;this.renderSession.element=
c;this.renderSession.roundPixels=!0;a=window.getComputedStyle(document.documentElement,"");a=(Array.prototype.slice.call(a).join("").match(/-(moz|webkit|ms)-/)||""===a.OLink&&["","o"])[1];"WebKit|Moz|MS|O".match(new RegExp("("+a+")","i"));a[0].toUpperCase();a.substr(1);this.renderSession.vendorPrefix=a;this.renderSession.transformProperty="webkit"==a?"-webkit-transform":"transform";this.renderSession.transformOriginProperty="webkit"==a?"-webkit-transform-origin":"transform-origin";this.renderSession.maskManager=
new Ii(this.renderSession);this.renderSession.renderer=this};g["openfl._internal.renderer.dom.DOMRenderer"]=hc;hc.__name__=["openfl","_internal","renderer","dom","DOMRenderer"];hc.applyStyle=function(a,b,c,d,e){var f=a.__style;c&&a.__worldTransformChanged&&f.setProperty(b.transformProperty,a.__worldTransform.to3DString(b.roundPixels),null);a.__worldZ!=++b.z&&(a.__worldZ=b.z,f.setProperty("z-index",null==a.__worldZ?"null":""+a.__worldZ,null));d&&a.__worldAlphaChanged&&(1>a.__worldAlpha?f.setProperty("opacity",
null==a.__worldAlpha?"null":""+a.__worldAlpha,null):f.removeProperty("opacity"));e&&a.__worldClipChanged&&(null==a.__worldClip?f.removeProperty("clip"):(b=ha.__temp,c=ra.__temp,c.copyFrom(a.__worldTransform),c.invert(),a.__worldClip.__transform(b,c),f.setProperty("clip","rect("+b.y+"px, "+b.get_right()+"px, "+b.get_bottom()+"px, "+b.x+"px)",null)))};hc.initializeElement=function(a,b,c){var d=a.__style=b.style;d.setProperty("position","absolute",null);d.setProperty("top","0",null);d.setProperty("left",
"0",null);d.setProperty(c.transformOriginProperty,"0 0 0",null);c.element.appendChild(b);a.__worldAlphaChanged=!0;a.__worldClipChanged=!0;a.__worldTransformChanged=!0;a.__worldVisibleChanged=!0;a.__worldZ=-1};hc.__super__=zb;hc.prototype=t(zb.prototype,{element:null,render:function(a){this.element.style.background=a.__colorString;this.renderSession.z=1;a.__renderDOM(this.renderSession)},__class__:hc});var Mk=function(){};g["openfl._internal.renderer.dom.DOMShape"]=Mk;Mk.__name__=["openfl","_internal",
"renderer","dom","DOMShape"];Mk.render=function(a,b){var c=a.__graphics;if(null!=a.stage&&a.__worldVisible&&a.__renderable&&null!=c){if(c.__dirty||a.__worldAlphaChanged||null==a.__canvas&&null!=c.__canvas)q.render(c,b),null!=c.__canvas?(null==a.__canvas&&(a.__canvas=window.document.createElement("canvas"),a.__context=a.__canvas.getContext("2d"),hc.initializeElement(a,a.__canvas,b)),a.__canvas.width=c.__canvas.width,a.__canvas.height=c.__canvas.height,a.__context.globalAlpha=a.__worldAlpha,a.__context.drawImage(c.__canvas,
0,0)):null!=a.__canvas&&(b.element.removeChild(a.__canvas),a.__canvas=null,a.__style=null);if(null!=a.__canvas){if(a.__worldTransformChanged||c.__transformDirty){c.__transformDirty=!1;var d=ra.__temp;d.identity();d.translate(c.__bounds.x,c.__bounds.y);d.concat(a.__worldTransform);a.__style.setProperty(b.transformProperty,b.roundPixels?"matrix3d("+d.a+", "+d.b+", 0, 0, "+d.c+", "+d.d+", 0, 0, 0, 0, 1, 0, "+(d.tx|0)+", "+(d.ty|0)+", 0, 1)":"matrix3d("+d.a+", "+d.b+", 0, 0, "+d.c+", "+d.d+", 0, 0, 0, 0, 1, 0, "+
d.tx+", "+d.ty+", 0, 1)",null)}hc.applyStyle(a,b,!1,!1,!0)}}else null!=a.__canvas&&(b.element.removeChild(a.__canvas),a.__canvas=null,a.__style=null)};var fl=function(){};g["openfl._internal.renderer.dom.DOMTextField"]=fl;fl.__name__=["openfl","_internal","renderer","dom","DOMTextField"];fl.render=function(a,b){var c=a.__textEngine;if(null!=a.stage&&a.__worldVisible&&a.__renderable){if(a.__dirty||null==a.__div)if(""!=c.text||c.background||c.border||c.type==Ic.INPUT){null==a.__div&&(a.__div=window.document.createElement("div"),
hc.initializeElement(a,a.__div,b),a.__style.setProperty("outline","none",null),a.__div.addEventListener("input",function(b){b.preventDefault();a.get_htmlText()!=a.__div.innerHTML&&(a.set_htmlText(a.__div.innerHTML),a.__dirty=!1)},!0));c.selectable?a.__style.setProperty("cursor","text",null):a.__style.setProperty("cursor","inherit",null);a.__div.contentEditable=c.type==Ic.INPUT;var d=a.__style;a.__div.innerHTML=c.text;c.background?d.setProperty("background-color","#"+P.hex(c.backgroundColor,6),null):
d.removeProperty("background-color");c.border?d.setProperty("border","solid 1px #"+P.hex(c.borderColor,6),null):d.removeProperty("border");d.setProperty("font",Pa.getFont(a.__textFormat),null);d.setProperty("color","#"+P.hex(a.__textFormat.color,6),null);c.autoSize!=ia.NONE?d.setProperty("width","auto",null):d.setProperty("width",c.width+"px",null);d.setProperty("height",c.height+"px",null);switch(a.__textFormat.align[1]){case 3:d.setProperty("text-align","center",null);break;case 1:d.setProperty("text-align",
"right",null);break;default:d.setProperty("text-align","left",null)}a.__dirty=!1}else null!=a.__div&&(b.element.removeChild(a.__div),a.__div=null);null!=a.__div&&hc.applyStyle(a,b,!0,!0,!1)}else null!=a.__div&&(b.element.removeChild(a.__div),a.__div=null,a.__style=null)};var ub=function(){};g["openfl._internal.renderer.opengl.GLBitmap"]=ub;ub.__name__=["openfl","_internal","renderer","opengl","GLBitmap"];ub.pushFramebuffer=function(a,b,c,d,e,f,n){null==n&&(n=!0);null==f&&(f=!1);null==e&&(e=!0);var g=
a.gl;if(null==g)return null;var h=a.renderer,k=c.x|0,l=c.y|0,m=c.width|0,p=c.height|0;a.spriteBatch.finish();0>=ub.fbData.length&&ub.fbData.push({texture:null,viewPort:null,transparent:h.transparent});null==b&&(b=new sk(g,m,p,d,n));b.resize(m,p);h.transparent=e;a.maskManager.saveState();g.bindFramebuffer(g.FRAMEBUFFER,(b.__swapped?b.__texture1:b.__texture0).frameBuffer);h.setViewport(k,l,m,p);g.colorMask(!0,!0,!0,!0);a.blendModeManager.setBlendMode(S.NORMAL);f&&(b.__swapped?b.__texture1:b.__texture0).clear(0,
0,0,0,null);ub.fbData.push({texture:b,viewPort:c,transparent:e});return b};ub.drawBitmapDrawable=function(a,b,c,d,e,f,n){var g=ub.fbData[ub.fbData.length-1];if(null==g)throw new m("No data to draw to");var h=a.gl;if(null!=h){var g=g.viewPort,k=a.spriteBatch,l=null!=b;n=null==n?new ha(g.x,g.y,g.width,g.height):n.clone();k.begin(a,l?null:n);l&&(b.__worldTransform.identity(),ub.flipMatrix(b.__worldTransform,g.height),b.__renderGL(a),k.stop(),null!=b.__texture&&h.deleteTexture(b.__texture),b.__texture=
null,k.start(n));b=c.__worldColorTransform;h=c.__blendMode;n=c.__cacheAsBitmap;d=null!=d?new ra(d.a,d.b,d.c,d.d,d.tx,d.ty):new ra;ub.flipMatrix(d,g.height);c.__worldColorTransform=null!=e?e:new Cc;c.__blendMode=f;W.__cacheAsBitmapMode=!0;c.__updateTransforms(d);c.__updateChildren(!1);c.__cacheAsBitmap=!1;c.__renderGL(a);c.__cacheAsBitmap=n;c.__worldColorTransform=b;c.__blendMode=h;W.__cacheAsBitmapMode=!1;c.__updateTransforms();c.__updateChildren(!1)}};ub.popFramebuffer=function(a,b){var c=a.gl;if(null!=
c){a.spriteBatch.finish();ub.fbData.pop();var d=ub.fbData[ub.fbData.length-1];if(null==d)throw new m("oh");var e,f,n,g;null==d.viewPort?(e=f=0,n=a.renderer.width,g=a.renderer.height):(e=Math.floor(d.viewPort.x),f=Math.floor(d.viewPort.y),n=Math.ceil(d.viewPort.width),g=Math.ceil(d.viewPort.height));null!=b&&(b.width==n&&b.height==g||b.resize(n,g),c.readPixels(e,f,n,g,c.RGBA,c.UNSIGNED_BYTE,b.buffer.data),b.dirty=!1,b.set_premultiplied(!0));c.bindFramebuffer(c.FRAMEBUFFER,null==d.texture?a.defaultFramebuffer:
d.texture.get_framebuffer());a.renderer.setViewport(e,f,n,g);a.renderer.transparent=d.transparent;a.maskManager.restoreState()}};ub.flipMatrix=function(a,b){var c=a.tx,d=a.ty;a.tx=0;a.ty=0;a.scale(1,-1);a.translate(0,b);a.tx+=c;a.ty-=d};var Hb=function(a,b,c,d,e,f){null==f&&(f=!1);null==e&&(e=!1);null==d&&(d=!1);null==b&&(b=600);null==a&&(a=800);this.vpX=this.vpY=this.vpWidth=this.vpHeight=0;zb.call(this,a,b);this.transparent=d;this.preserveDrawingBuffer=f;this.width=a;this.height=b;this.viewport=
new ha;this.options={alpha:d,antialias:e,premultipliedAlpha:d,stencil:!0,preserveDrawingBuffer:f};this._glContextId=Hb.glContextId++;this.gl=c;this.defaultFramebuffer=null;Hb.glContexts[this._glContextId]=c;this.projectionMatrix=new ra;this.projection=new Ea;this.projection.x=this.width/2;this.projection.y=-this.height/2;this.offset=new Ea(0,0);this.resize(this.width,this.height);this.contextLost=!1;this.shaderManager=new lg(c);this.spriteBatch=new tk(c);this.filterManager=new uk(c,this.transparent);
this.stencilManager=new vk(c);this.blendModeManager=new wk(c);this.renderSession=new me;this.renderSession.gl=this.gl;this.renderSession.drawCount=0;this.renderSession.shaderManager=this.shaderManager;this.renderSession.filterManager=this.filterManager;this.renderSession.blendModeManager=this.blendModeManager;this.renderSession.spriteBatch=this.spriteBatch;this.renderSession.stencilManager=this.stencilManager;this.renderSession.renderer=this;this.renderSession.defaultFramebuffer=this.defaultFramebuffer;
this.renderSession.projectionMatrix=this.projectionMatrix;this.maskManager=new Ji(this.renderSession);this.renderSession.maskManager=this.maskManager;this.shaderManager.setShader(this.shaderManager.defaultShader);c.disable(c.DEPTH_TEST);c.disable(c.CULL_FACE);c.enable(c.BLEND);c.colorMask(!0,!0,!0,this.transparent)};g["openfl._internal.renderer.opengl.GLRenderer"]=Hb;Hb.__name__=["openfl","_internal","renderer","opengl","GLRenderer"];Hb.renderBitmap=function(a,b,c){null==c&&(c=!0);if(a.__renderable&&
!(0>=a.__worldAlpha)&&null!=a.__graphics&&null!=a.__graphics.__bitmap){var d=ha.__temp,e=ra.__temp;d.setEmpty();e.identity();a.__getBounds(d,e);d=a.__graphics.__bitmap;e.translate(a.__graphics.__bounds.x,a.__graphics.__bounds.y);e.concat(a.__renderTransform);b.spriteBatch.renderBitmapData(d,c,e,a.__worldColorTransform,a.__worldAlpha,a.__blendMode,null,$a.ALWAYS)}};Hb.__super__=zb;Hb.prototype=t(zb.prototype,{blendModeManager:null,contextLost:null,defaultFramebuffer:null,filterManager:null,gl:null,
_glContextId:null,maskManager:null,offset:null,options:null,preserveDrawingBuffer:null,projection:null,shaderManager:null,spriteBatch:null,stencilManager:null,projectionMatrix:null,vpX:null,vpY:null,vpWidth:null,vpHeight:null,setViewport:function(a,b,c,d){if(this.vpX!=a||this.vpY!=b||this.vpWidth!=c||this.vpHeight!=d)this.vpX=a,this.vpY=b,this.vpWidth=c,this.vpHeight=d,this.gl.viewport(a,b,c,d),this.setOrtho(a,b,c,d),this.viewport.setTo(a,b,c,d)},setOrtho:function(a,b,c,d){var e=this.projectionMatrix;
e.identity();e.a=1/c*2;e.d=-1/d*2;e.tx=-1-a*e.a;e.ty=1-b*e.d},render:function(a){if(!this.contextLost){var b=this.gl;this.setViewport(0,0,this.width,this.height);b.bindFramebuffer(b.FRAMEBUFFER,this.defaultFramebuffer);this.transparent?b.clearColor(0,0,0,0):b.clearColor(a.__colorSplit[0],a.__colorSplit[1],a.__colorSplit[2],1);b.clear(b.COLOR_BUFFER_BIT);this.renderDisplayObject(a,this.projection)}},renderDisplayObject:function(a,b,c){this.renderSession.blendModeManager.setBlendMode(S.NORMAL);this.renderSession.drawCount=
0;this.renderSession.currentBlendMode=null;this.spriteBatch.begin(this.renderSession);this.filterManager.begin(this.renderSession,c);a.__renderGL(this.renderSession);this.spriteBatch.finish()},resize:function(a,b){this.width=a;this.height=b;zb.prototype.resize.call(this,a,b);this.setViewport(0,0,a,b);this.projection.x=a/2;this.projection.y=-b/2},__class__:Hb});var Ba=function(a){this.wrapS=this.wrapT=33071;this.compiled=!1;this.uniforms=new ka;this.attributes=new ka;this.ID=Ba.UID++;this.gl=a;this.program=
null};g["openfl._internal.renderer.opengl.shaders2.Shader"]=Ba;Ba.__name__="openfl _internal renderer opengl shaders2 Shader".split(" ");Ba.compileProgram=function(a,b,c){var d=lg.compiledShadersCache,e=ce.encode(b+c);if(null!=J[e]?d.existsReserved(e):d.h.hasOwnProperty(e))return null!=J[e]?d.getReserved(e):d.h[e];var f=Ba.compileShader(a,b,a.VERTEX_SHADER),n=Ba.compileShader(a,c,a.FRAGMENT_SHADER),g=a.createProgram();if(null!=f&&null!=n&&(a.attachShader(g,f),a.attachShader(g,n),a.linkProgram(g),
a.deleteShader(f),a.deleteShader(n),0==a.getProgramParameter(g,a.LINK_STATUS)))return Ia.trace("Could not compile the program:\n\t"+a.getProgramInfoLog(g),{fileName:"Shader.hx",lineNumber:226,className:"openfl._internal.renderer.opengl.shaders2.Shader",methodName:"compileProgram"}),Ia.trace("VERTEX:\n"+b+"\nFRAGMENT:\n"+c,{fileName:"Shader.hx",lineNumber:227,className:"openfl._internal.renderer.opengl.shaders2.Shader",methodName:"compileProgram"}),null;null!=J[e]?d.setReserved(e,g):d.h[e]=g;return g};
Ba.compileShader=function(a,b,c){c=a.createShader(c);a.shaderSource(c,b);a.compileShader(c);return 0==a.getShaderParameter(c,a.COMPILE_STATUS)?(Ia.trace("Could not compile the shader:\n\t"+a.getShaderInfoLog(c),{fileName:"Shader.hx",lineNumber:244,className:"openfl._internal.renderer.opengl.shaders2.Shader",methodName:"compileShader"}),Ia.trace(b,{fileName:"Shader.hx",lineNumber:245,className:"openfl._internal.renderer.opengl.shaders2.Shader",methodName:"compileShader"}),null):c};Ba.prototype={gl:null,
vertexSrc:null,fragmentSrc:null,attributes:null,uniforms:null,compiled:null,ID:null,program:null,wrapS:null,wrapT:null,smooth:null,blendMode:null,vertexString:null,fragmentString:null,init:function(a){null==a&&(a=!1);if(!this.compiled||a){null!=this.vertexSrc&&(this.vertexString=this.vertexSrc.join("\n"));null!=this.fragmentSrc&&(this.fragmentString=this.fragmentSrc.join("\n"));if(null==this.vertexString||null==this.fragmentString)throw new m("No vertex or fragment source provided");this.program=
Ba.compileProgram(this.gl,this.vertexString,this.fragmentString);null!=this.program&&(this.compiled=!0)}},destroy:function(){null!=this.program&&this.gl.deleteProgram(this.program);this.compiled=!1;this.attributes=null},applyData:function(a,b){if(null!=a)for(var c,d,e,f,g=a.keys();g.hasNext();)if(e=g.next(),d=this.getUniformLocation(e),c=null!=J[e]?a.getReserved(e):a.h[e],null!=c&&(e=c.value,f=c.bitmap,null!=e||null!=f))switch(c.internalType){case 1:switch(c.size){case 1:this.gl.uniform1i(d,e[0]|
0);break;case 2:this.gl.uniform2i(d,e[0]|0,e[1]|0);break;case 3:this.gl.uniform3i(d,e[0]|0,e[1]|0,e[2]|0);break;case 4:this.gl.uniform4i(d,e[0]|0,e[1]|0,e[2]|0,e[3]|0)}break;case 2:switch(c.size){case 1:this.gl.uniform1f(d,e[0]);break;case 2:this.gl.uniform2f(d,e[0],e[1]);break;case 3:this.gl.uniform3f(d,e[0],e[1],e[2]);break;case 4:this.gl.uniform4f(d,e[0],e[1],e[2],e[3])}break;case 3:switch(c.size){case 2:this.gl.uniformMatrix2fv(d,c.transpose,function(a){a=c.value;return null!=a?new Float32Array(a):
null}(this));break;case 3:this.gl.uniformMatrix3fv(d,c.transpose,function(a){a=c.value;return null!=a?new Float32Array(a):null}(this));break;case 4:this.gl.uniformMatrix4fv(d,c.transpose,function(a){a=c.value;return null!=a?new Float32Array(a):null}(this))}break;case 4:if(null==f||!f.__isValid)continue;this.gl.activeTexture(this.gl.TEXTURE0+b.activeTextures);this.gl.bindTexture(this.gl.TEXTURE_2D,f.getTexture(this.gl));this.gl.uniform1i(d,b.activeTextures);this.gl.texParameteri(this.gl.TEXTURE_2D,
this.gl.TEXTURE_MAG_FILTER,c.smooth?this.gl.LINEAR:this.gl.NEAREST);this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,c.smooth?this.gl.LINEAR:this.gl.NEAREST);this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,c.repeatX);this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,c.repeatY);b.activeTextures++}},getAttribLocation:function(a){if(null==this.program)throw new m("Shader isn't initialized");if(this.attributes.exists(a))return this.attributes.get(a);var b=
this.gl.getAttribLocation(this.program,a);this.attributes.set(a,b);return b},getUniformLocation:function(a){if(null==this.program)throw new m("Shader isn't initialized");if(this.uniforms.exists(a))return this.uniforms.get(a);var b=this.gl.getUniformLocation(this.program,a);this.uniforms.set(a,b);return b},enableVertexAttribute:function(a,b,c){var d=this.getAttribLocation(a.name);this.gl.enableVertexAttribArray(d);this.gl.vertexAttribPointer(d,a.components,a.type,a.normalized,b,4*c)},disableVertexAttribute:function(a,
b){null==b&&(b=!0);var c=this.getAttribLocation(a.name);this.gl.disableVertexAttribArray(c);if(b)switch(a.components){case 1:this.gl.vertexAttrib1fv(c,a.defaultValue.subarray(0,1));break;case 2:this.gl.vertexAttrib2fv(c,a.defaultValue.subarray(0,2));break;case 3:this.gl.vertexAttrib3fv(c,a.defaultValue.subarray(0,3));break;default:this.gl.vertexAttrib4fv(c,a.defaultValue.subarray(0,4))}},bindVertexArray:function(a){var b=0,c=a.get_stride(),d=0;for(a=a.attributes;d<a.length;){var e=a[d];++d;e.enabled?
(this.enableVertexAttribute(e,c,b),b+=Math.floor(e.components*e.getElementsBytes()/4)):this.disableVertexAttribute(e,!0)}},__class__:Ba};var ne=function(a){Ba.call(this,a);this.vertexSrc=ne.VERTEX_SRC;this.fragmentSrc=["#ifdef GL_ES","precision lowp float;","#endif","uniform sampler2D openfl_uSampler0;","uniform vec4 openfl_uColorMultiplier;","uniform vec4 openfl_uColorOffset;","uniform bool openfl_uUseColorTransform;","varying vec2 openfl_vTexCoord;","varying vec4 openfl_vColor;","vec4 colorTransform(const vec4 color, const vec4 tint, const vec4 multiplier, const vec4 offset) {",
"\tif(!openfl_uUseColorTransform) {","\t\treturn color * tint;","\t}","\tvec4 unmultiply;","\tif (color.a == 0.0) {","\t\tunmultiply = vec4(0.0, 0.0, 0.0, 0.0);","\t} else {"," \tunmultiply = vec4(color.rgb / color.a, color.a);","\t}"," vec4 result = unmultiply * tint * multiplier;"," result = result + offset;"," result = clamp(result, 0., 1.);"," result = vec4(result.rgb * result.a, result.a);"," return result;","}","void main(void) {"," vec4 tc = texture2D(openfl_uSampler0, openfl_vTexCoord);",
" gl_FragColor = colorTransform(tc, openfl_vColor, openfl_uColorMultiplier, openfl_uColorOffset);","}"];this.init()};g["openfl._internal.renderer.opengl.shaders2.DefaultShader"]=ne;ne.__name__="openfl _internal renderer opengl shaders2 DefaultShader".split(" ");ne.__super__=Ba;ne.prototype=t(Ba.prototype,{init:function(a){null==a&&(a=!1);Ba.prototype.init.call(this,a);this.getAttribLocation("openfl_aPosition");this.getAttribLocation("openfl_aTexCoord0");this.getAttribLocation("openfl_aColor");this.getUniformLocation("openfl_uProjectionMatrix");
this.getUniformLocation("openfl_uSampler0");this.getUniformLocation("openfl_uColorMultiplier");this.getUniformLocation("openfl_uColorOffset");this.getUniformLocation("openfl_uUseColorTransform")},__class__:ne});var Ki=function(a){Ba.call(this,a);this.vertexSrc=["attribute vec2 openfl_aPosition;","attribute vec2 openfl_aTexCoord0;","attribute vec4 openfl_aColor;","uniform mat3 openfl_uProjectionMatrix;","varying vec2 vTexCoord;","varying vec4 vColor;","void main(void) {"," gl_Position = vec4((openfl_uProjectionMatrix * vec3(openfl_aPosition, 1.0)).xy, 0.0, 1.0);",
" vTexCoord = openfl_aTexCoord0;"," vColor = openfl_aColor.bgra;","}"];this.fragmentSrc=["#ifdef GL_ES","precision lowp float;","#endif","uniform sampler2D openfl_uSampler0;","uniform vec3 openfl_uColor;","uniform bool openfl_uUseTexture;","uniform float openfl_uAlpha;","uniform vec4 openfl_uColorMultiplier;","uniform vec4 openfl_uColorOffset;","varying vec2 vTexCoord;","varying vec4 vColor;","vec4 tmp;","vec4 colorTransform(const vec4 color, const vec4 tint, const vec4 multiplier, const vec4 offset) {",
" vec4 unmultiply = vec4(color.rgb / color.a, color.a);"," vec4 result = unmultiply * tint * multiplier;"," result = result + offset;"," result = clamp(result, 0., 1.);"," result = vec4(result.rgb * result.a, result.a);"," return result;","}","void main(void) {"," if(openfl_uUseTexture) {"," tmp = texture2D(openfl_uSampler0, vTexCoord);"," } else {"," tmp = vec4(openfl_uColor, 1.);"," }"," gl_FragColor = colorTransform(tmp, vColor, openfl_uColorMultiplier, openfl_uColorOffset);",
"}"];this.init()};g["openfl._internal.renderer.opengl.shaders2.DrawTrianglesShader"]=Ki;Ki.__name__="openfl _internal renderer opengl shaders2 DrawTrianglesShader".split(" ");Ki.__super__=Ba;Ki.prototype=t(Ba.prototype,{init:function(a){null==a&&(a=!1);Ba.prototype.init.call(this,a);this.getAttribLocation("openfl_aPosition");this.getAttribLocation("openfl_aTexCoord0");this.getAttribLocation("openfl_aColor");this.getUniformLocation("openfl_uSampler0");this.getUniformLocation("openfl_uProjectionMatrix");
this.getUniformLocation("openfl_uColor");this.getUniformLocation("openfl_uAlpha");this.getUniformLocation("openfl_uUseTexture");this.getUniformLocation("openfl_uColorMultiplier");this.getUniformLocation("openfl_uColorOffset")},__class__:Ki});var Li=function(a){Ba.call(this,a);this.vertexSrc=["attribute vec2 openfl_aPosition;","uniform mat3 openfl_uTranslationMatrix;","uniform mat3 openfl_uProjectionMatrix;","uniform vec4 openfl_uColor;","uniform float openfl_uAlpha;","uniform vec4 openfl_uColorMultiplier;",
"uniform vec4 openfl_uColorOffset;","varying vec4 vColor;","vec4 colorTransform(const vec4 color, const float alpha, const vec4 multiplier, const vec4 offset) {"," vec4 result = color * multiplier;"," result.a *= alpha;"," result = result + offset;"," result = clamp(result, 0., 1.);"," result = vec4(result.rgb * result.a, result.a);"," return result;","}","void main(void) {"," gl_Position = vec4((openfl_uProjectionMatrix * openfl_uTranslationMatrix * vec3(openfl_aPosition, 1.0)).xy, 0.0, 1.0);",
" vColor = colorTransform(openfl_uColor, openfl_uAlpha, openfl_uColorMultiplier, openfl_uColorOffset);","}"];this.fragmentSrc="#ifdef GL_ES,precision lowp float;,#endif,varying vec4 vColor;,void main(void) {, gl_FragColor = vColor;,}".split(",");this.init()};g["openfl._internal.renderer.opengl.shaders2.FillShader"]=Li;Li.__name__="openfl _internal renderer opengl shaders2 FillShader".split(" ");Li.__super__=Ba;Li.prototype=t(Ba.prototype,{init:function(a){null==a&&(a=!1);Ba.prototype.init.call(this,
a);this.getAttribLocation("openfl_aPosition");this.getUniformLocation("openfl_uTranslationMatrix");this.getUniformLocation("openfl_uProjectionMatrix");this.getUniformLocation("openfl_uColor");this.getUniformLocation("openfl_uColorMultiplier");this.getUniformLocation("openfl_uColorOffset")},__class__:Li});var Mi=function(a){Ba.call(this,a);this.vertexSrc=["attribute vec2 openfl_aPosition;","uniform mat3 openfl_uTranslationMatrix;","uniform mat3 openfl_uProjectionMatrix;","uniform mat3 openfl_uPatternMatrix;",
"varying vec2 vPosition;","void main(void) {"," gl_Position = vec4((openfl_uProjectionMatrix * openfl_uTranslationMatrix * vec3(openfl_aPosition, 1.0)).xy, 0.0, 1.0);"," vPosition = (openfl_uPatternMatrix * vec3(openfl_aPosition, 1)).xy;","}"];this.fragmentSrc=["#ifdef GL_ES","precision lowp float;","#endif","uniform float openfl_uAlpha;","uniform vec2 openfl_uPatternTL;","uniform vec2 openfl_uPatternBR;","uniform sampler2D openfl_uSampler0;","uniform vec4 openfl_uColorMultiplier;","uniform vec4 openfl_uColorOffset;",
"varying vec2 vPosition;","vec4 colorTransform(const vec4 color, const float alpha, const vec4 multiplier, const vec4 offset) {"," vec4 unmultiply = vec4(color.rgb / color.a, color.a);"," vec4 result = unmultiply * multiplier;"," result.a *= alpha;"," result = result + offset;"," result = clamp(result, 0., 1.);"," result = vec4(result.rgb * result.a, result.a);"," return result;","}","void main(void) {"," vec2 pos = mix(openfl_uPatternTL, openfl_uPatternBR, vPosition);"," vec4 tcol = texture2D(openfl_uSampler0, pos);",
" gl_FragColor = colorTransform(tcol, openfl_uAlpha, openfl_uColorMultiplier, openfl_uColorOffset);","}"];this.init()};g["openfl._internal.renderer.opengl.shaders2.PatternFillShader"]=Mi;Mi.__name__="openfl _internal renderer opengl shaders2 PatternFillShader".split(" ");Mi.__super__=Ba;Mi.prototype=t(Ba.prototype,{init:function(a){null==a&&(a=!1);Ba.prototype.init.call(this,a);this.getAttribLocation("openfl_aPosition");this.getUniformLocation("openfl_uTranslationMatrix");this.getUniformLocation("openfl_uPatternMatrix");
this.getUniformLocation("openfl_uProjectionMatrix");this.getUniformLocation("openfl_uSampler0");this.getUniformLocation("openfl_uPatternTL");this.getUniformLocation("openfl_uPatternBR");this.getUniformLocation("openfl_uAlpha");this.getUniformLocation("openfl_uColorMultiplier");this.getUniformLocation("openfl_uColorOffset")},__class__:Mi});var Ni=function(a){Ba.call(this,a);this.vertexSrc=["attribute vec2 openfl_aPosition;","attribute vec4 openfl_aColor;","uniform mat3 openfl_uTranslationMatrix;",
"uniform mat3 openfl_uProjectionMatrix;","uniform vec4 openfl_uColorMultiplier;","uniform vec4 openfl_uColorOffset;","uniform float openfl_uAlpha;","varying vec4 vColor;","vec4 colorTransform(const vec4 color, const float alpha, const vec4 multiplier, const vec4 offset) {"," vec4 result = color * multiplier;"," result.a *= alpha;"," result = result + offset;"," result = clamp(result, 0., 1.);"," result = vec4(result.rgb * result.a, result.a);"," return result;","}","void main(void) {",
" gl_Position = vec4((openfl_uProjectionMatrix * openfl_uTranslationMatrix * vec3(openfl_aPosition, 1.0)).xy, 0.0, 1.0);"," vColor = colorTransform(openfl_aColor, openfl_uAlpha, openfl_uColorMultiplier, openfl_uColorOffset);","}"];this.fragmentSrc="#ifdef GL_ES,precision lowp float;,#endif,varying vec4 vColor;,void main(void) {, gl_FragColor = vColor;,}".split(",");this.init()};g["openfl._internal.renderer.opengl.shaders2.PrimitiveShader"]=Ni;Ni.__name__="openfl _internal renderer opengl shaders2 PrimitiveShader".split(" ");
Ni.__super__=Ba;Ni.prototype=t(Ba.prototype,{init:function(a){null==a&&(a=!1);Ba.prototype.init.call(this,a);this.getAttribLocation("openfl_aPosition");this.getAttribLocation("openfl_aColor");this.getUniformLocation("openfl_uTranslationMatrix");this.getUniformLocation("openfl_uProjectionMatrix");this.getUniformLocation("openfl_uAlpha");this.getUniformLocation("openfl_uColorMultiplier");this.getUniformLocation("openfl_uColorOffset")},__class__:Ni});var wk=function(a){this.gl=a;this.currentBlendMode=
null};g["openfl._internal.renderer.opengl.utils.BlendModeManager"]=wk;wk.__name__="openfl _internal renderer opengl utils BlendModeManager".split(" ");wk.prototype={currentBlendMode:null,gl:null,setBlendMode:function(a,b){null==b&&(b=!1);null==a&&(a=S.NORMAL,b=!0);if(!b&&this.currentBlendMode==a)return!1;this.currentBlendMode=a;switch(a[1]){case 0:this.gl.blendEquation(32774);this.gl.blendFunc(1,1);break;case 9:this.gl.blendEquation(32774);this.gl.blendFunc(774,771);break;case 12:this.gl.blendEquation(32774);
this.gl.blendFunc(1,769);break;case 13:this.gl.blendEquation(32779);this.gl.blendFunc(1,1);break;default:this.gl.blendEquation(32774),this.gl.blendFunc(1,771)}return!0},__class__:wk};var cb=function(a){null==a&&(a=!0);this.type=oa.Polygon;this.points=null;this.winding=0;this.isRemovable=!0;this.fillIndex=0;this.line=new mg;this.fill=Ab.None;a&&(this.points=[])};g["openfl._internal.renderer.opengl.utils.DrawPath"]=cb;cb.__name__="openfl _internal renderer opengl utils DrawPath".split(" ");cb.getStack=
function(a,b){return p.build(a,b)};cb.prototype={line:null,fill:null,fillIndex:null,isRemovable:null,winding:null,points:null,type:null,update:function(a,b,c,d){this.updateLine(a);this.fill=b;this.fillIndex=c;this.winding=d},updateLine:function(a){this.line.width=a.width;this.line.color=a.color;this.line.alpha=null==a.alpha?1:a.alpha;this.line.scaleMode=null==a.scaleMode?Fb.NORMAL:a.scaleMode;this.line.caps=null==a.caps?Ac.ROUND:a.caps;this.line.joints=null==a.joints?nc.ROUND:a.joints;this.line.miterLimit=
a.miterLimit},__class__:cb};var p=function(){};g["openfl._internal.renderer.opengl.utils.PathBuiler"]=p;p.__name__="openfl _internal renderer opengl utils PathBuiler".split(" ");p.__currentPath=null;p.__drawPaths=null;p.__line=null;p.__fill=null;p.closePath=function(){var a;a=null==p.__currentPath.points?0:p.__currentPath.points.length;if(!(0>=a)&&p.__currentPath.type==oa.Polygon&&p.__currentPath.fill!=Ab.None){var b=p.__currentPath.points[0],c=p.__currentPath.points[1],d=p.__currentPath.points[a-
1];b==p.__currentPath.points[a-2]&&c==d||p.lineTo(b,c)}};p.endFill=function(){p.__fill=Ab.None;p.__fillIndex++};p.lineTo=function(a,b){var c=p.__currentPath.points,d=!0;if(1<c.length){var e=c[c.length-1];c[c.length-2]==a&&e==b&&(d=!1)}1==d&&(p.__currentPath.points.push(a),p.__currentPath.points.push(b))};p.build=function(a,b){var c=null,d=a.__bounds;p.__drawPaths=[];p.__currentPath=new cb;p.__line=new mg;p.__fill=Ab.None;p.__fillIndex=0;c=a.__glStack[Hb.glContextId];null==c&&(c=a.__glStack[Hb.glContextId]=
new xk(b));if(a.__visible&&0!=a.__commands.get_length()&&null!=d&&0!=d.width&&0!=d.height){for(var d=new nd(a.__commands),e=0,f=a.__commands.types;e<f.length;){var g=f[e];++e;switch(g[1]){case 0:d.advance();d.prev=z.BEGIN_BITMAP_FILL;g=d;p.endFill();p.__fill=null!=g.buffer.o[g.oPos]?Ab.Texture(g.buffer.o[g.oPos],g.buffer.o[g.oPos+1],g.buffer.b[g.bPos],g.buffer.b[g.bPos+1]):Ab.None;if(null==p.__currentPath.points||0==p.__currentPath.points.length)!p.__currentPath.isRemovable||null!=p.__currentPath.points&&
0!=p.__currentPath.points.length?p.closePath():p.__drawPaths.pop(),p.__currentPath=new cb,p.__currentPath.update(p.__line,p.__fill,p.__fillIndex,p.__currentWinding),p.__currentPath.points=[],p.__currentPath.type=oa.Polygon,p.__drawPaths.push(p.__currentPath);break;case 1:d.advance();d.prev=z.BEGIN_FILL;g=d;p.endFill();p.__fill=0<g.buffer.f[g.fPos]?Ab.Color(g.buffer.i[g.iPos]&16777215,g.buffer.f[g.fPos]):Ab.None;if(null==p.__currentPath.points||0==p.__currentPath.points.length)!p.__currentPath.isRemovable||
null!=p.__currentPath.points&&0!=p.__currentPath.points.length?p.closePath():p.__drawPaths.pop(),p.__currentPath=new cb,p.__currentPath.update(p.__line,p.__fill,p.__fillIndex,p.__currentWinding),p.__currentPath.points=[],p.__currentPath.type=oa.Polygon,p.__drawPaths.push(p.__currentPath);break;case 3:d.advance();d.prev=z.CUBIC_CURVE_TO;g=d;if(null==p.__currentPath.points||0==p.__currentPath.points.length)!p.__currentPath.isRemovable||null!=p.__currentPath.points&&0!=p.__currentPath.points.length?
p.closePath():p.__drawPaths.pop(),p.__currentPath=new cb,p.__currentPath.update(p.__line,p.__fill,p.__fillIndex,p.__currentWinding),p.__currentPath.type=oa.Polygon,p.__currentPath.points.push(0),p.__currentPath.points.push(0),p.__drawPaths.push(p.__currentPath);Wa.cubicCurveTo(p.__currentPath.points,g.buffer.f[g.fPos],g.buffer.f[g.fPos+1],g.buffer.f[g.fPos+3],g.buffer.f[g.fPos+4],g.buffer.f[g.fPos+5],g.buffer.f[g.fPos+6]);break;case 4:d.advance();d.prev=z.CURVE_TO;g=d;if(null==p.__currentPath.points||
0==p.__currentPath.points.length)!p.__currentPath.isRemovable||null!=p.__currentPath.points&&0!=p.__currentPath.points.length?p.closePath():p.__drawPaths.pop(),p.__currentPath=new cb,p.__currentPath.update(p.__line,p.__fill,p.__fillIndex,p.__currentWinding),p.__currentPath.type=oa.Polygon,p.__currentPath.points.push(0),p.__currentPath.points.push(0),p.__drawPaths.push(p.__currentPath);Wa.curveTo(p.__currentPath.points,g.buffer.f[g.fPos],g.buffer.f[g.fPos+1],g.buffer.f[g.fPos+2],g.buffer.f[g.fPos+
3]);break;case 5:d.advance();d.prev=z.DRAW_CIRCLE;g=d;!p.__currentPath.isRemovable||null!=p.__currentPath.points&&0!=p.__currentPath.points.length?p.closePath():p.__drawPaths.pop();p.__currentPath=new cb;p.__currentPath.update(p.__line,p.__fill,p.__fillIndex,p.__currentWinding);p.__currentPath.type=oa.Circle;p.__currentPath.points=[g.buffer.f[g.fPos],g.buffer.f[g.fPos+1],g.buffer.f[g.fPos+2]];p.__drawPaths.push(p.__currentPath);break;case 6:d.advance();d.prev=z.DRAW_ELLIPSE;g=d;!p.__currentPath.isRemovable||
null!=p.__currentPath.points&&0!=p.__currentPath.points.length?p.closePath():p.__drawPaths.pop();p.__currentPath=new cb;p.__currentPath.update(p.__line,p.__fill,p.__fillIndex,p.__currentWinding);p.__currentPath.type=oa.Ellipse;p.__currentPath.points=[g.buffer.f[g.fPos],g.buffer.f[g.fPos+1],g.buffer.f[g.fPos+2],g.buffer.f[g.fPos+3]];p.__drawPaths.push(p.__currentPath);break;case 8:d.advance();d.prev=z.DRAW_RECT;g=d;!p.__currentPath.isRemovable||null!=p.__currentPath.points&&0!=p.__currentPath.points.length?
p.closePath():p.__drawPaths.pop();p.__currentPath=new cb;p.__currentPath.update(p.__line,p.__fill,p.__fillIndex,p.__currentWinding);p.__currentPath.type=oa.Rectangle(!1);p.__currentPath.points=[g.buffer.f[g.fPos],g.buffer.f[g.fPos+1],g.buffer.f[g.fPos+2],g.buffer.f[g.fPos+3]];p.__drawPaths.push(p.__currentPath);break;case 9:var h;d.advance();d.prev=z.DRAW_ROUND_RECT;h=d;var g=h.buffer.f[h.fPos],k=h.buffer.f[h.fPos+1],l=h.buffer.f[h.fPos+2],m=h.buffer.f[h.fPos+3],q=h.buffer.f[h.fPos+4];h=h.buffer.f[h.fPos+
5];-1==h&&(h=q);q*=.5;h*=.5;q>l/2&&(q=l/2);h>m/2&&(h=m/2);!p.__currentPath.isRemovable||null!=p.__currentPath.points&&0!=p.__currentPath.points.length?p.closePath():p.__drawPaths.pop();p.__currentPath=new cb;p.__currentPath.update(p.__line,p.__fill,p.__fillIndex,p.__currentWinding);p.__currentPath.type=oa.Rectangle(!0);p.__currentPath.points=[g,k,l,m,q,h];p.__drawPaths.push(p.__currentPath);break;case 12:d.advance();d.prev=z.END_FILL;p.endFill();break;case 15:d.advance();d.prev=z.LINE_STYLE;g=d;p.__line=
new mg;null==g.buffer.o[g.oPos]||isNaN(g.buffer.o[g.oPos])||0>g.buffer.o[g.oPos]?p.__line.width=0:p.__line.width=0==g.buffer.o[g.oPos]?1:g.buffer.o[g.oPos];!p.__currentPath.isRemovable||null!=p.__currentPath.points&&0!=p.__currentPath.points.length?p.closePath():p.__drawPaths.pop();p.__line.color=null==g.buffer.o[g.oPos+1]?0:g.buffer.o[g.oPos+1];p.__line.alpha=null==g.buffer.o[g.oPos+2]?1:g.buffer.o[g.oPos+2];p.__line.scaleMode=g.buffer.o[g.oPos+4];p.__line.caps=g.buffer.o[g.oPos+5];p.__line.joints=
g.buffer.o[g.oPos+6];p.__line.miterLimit=g.buffer.o[g.oPos+7];p.__currentPath=new cb;p.__currentPath.update(p.__line,p.__fill,p.__fillIndex,p.__currentWinding);p.__currentPath.points=[];p.__currentPath.type=oa.Polygon;p.__drawPaths.push(p.__currentPath);break;case 16:d.advance();d.prev=z.LINE_TO;g=d;p.lineTo(g.buffer.f[g.fPos],g.buffer.f[g.fPos+1]);break;case 17:d.advance();d.prev=z.MOVE_TO;g=d;!p.__currentPath.isRemovable||null!=p.__currentPath.points&&0!=p.__currentPath.points.length?p.closePath():
p.__drawPaths.pop();p.__currentPath=new cb;p.__currentPath.update(p.__line,p.__fill,p.__fillIndex,p.__currentWinding);p.__currentPath.type=oa.Polygon;p.__currentPath.points.push(g.buffer.f[g.fPos]);p.__currentPath.points.push(g.buffer.f[g.fPos+1]);p.__drawPaths.push(p.__currentPath);break;case 11:d.advance();d.prev=z.DRAW_TRIANGLES;h=d;q=h.buffer.o[h.oPos+2];g=h.buffer.o[h.oPos];k=h.buffer.o[h.oPos+1];l=h.buffer.o[h.oPos+3];m=h.buffer.o[h.oPos+4];h=h.buffer.i[h.iPos];var w;switch(p.__fill[1]){case 1:w=
!0;break;default:w=!1}if(w&&null!=q)continue;!p.__currentPath.isRemovable||null!=p.__currentPath.points&&0!=p.__currentPath.points.length?p.closePath():p.__drawPaths.pop();p.__currentPath=new cb;p.__currentPath.update(p.__line,p.__fill,p.__fillIndex,p.__currentWinding);if(null==q)switch(q=new kf,q.data=[],q.length=0,q.fixed=!1,w=p.__fill,w[1]){case 2:w=w[2];for(var t=0,r=g.length/2|0;t<r;){var u=t++;if(!q.fixed){q.length++;if(q.data.length<q.length){var v;v=Array(q.data.length+10);ee.blit(q.data,
0,v,0,q.data.length);q.data=v}q.data[q.length-1]=g.data[2*u]/w.width}q.length;q.fixed||(q.length++,q.data.length<q.length&&(v=Array(q.data.length+10),ee.blit(q.data,0,v,0,q.data.length),q.data=v),q.data[q.length-1]=g.data[2*u+1]/w.height);q.length}}p.__currentPath.type=oa.DrawTriangles(g,k,q,l,m,h);p.__currentPath.isRemovable=!1;p.__drawPaths.push(p.__currentPath);break;case 10:d.advance();d.prev=z.DRAW_TILES;g=d;!p.__currentPath.isRemovable||null!=p.__currentPath.points&&0!=p.__currentPath.points.length?
p.closePath():p.__drawPaths.pop();p.__fillIndex++;p.__currentPath=new cb(!1);p.__currentPath.update(p.__line,p.__fill,p.__fillIndex,p.__currentWinding);p.__currentPath.type=oa.DrawTiles(g.buffer.ts[g.tsPos],g.buffer.ff[g.ffPos],g.buffer.b[g.bPos],g.buffer.i[g.iPos],g.buffer.o[g.oPos],g.buffer.i[g.iPos+1]);p.__currentPath.isRemovable=!1;p.__drawPaths.push(p.__currentPath);break;case 7:d.advance();d.prev=z.DRAW_PATH;g=d;!p.__currentPath.isRemovable||null!=p.__currentPath.points&&0!=p.__currentPath.points.length?
p.closePath():p.__drawPaths.pop();switch(g.buffer.o[g.oPos+2]){case Ld.EVEN_ODD:p.__currentWinding=0;break;case Ld.NON_ZERO:p.__currentWinding=1;break;default:p.__currentWinding=0}l=k=0;for(m=g.buffer.o[g.oPos].length;l<m;)switch(q=l++,q=g.buffer.o[g.oPos].data[q],q){case 1:r=g.buffer.o[g.oPos+1].data[k];u=g.buffer.o[g.oPos+1].data[k+1];k+=2;!p.__currentPath.isRemovable||null!=p.__currentPath.points&&0!=p.__currentPath.points.length?p.closePath():p.__drawPaths.pop();p.__currentPath=new cb;p.__currentPath.update(p.__line,
p.__fill,p.__fillIndex,p.__currentWinding);p.__currentPath.type=oa.Polygon;p.__currentPath.points.push(r);p.__currentPath.points.push(u);p.__drawPaths.push(p.__currentPath);break;case 4:r=g.buffer.o[g.oPos+1].data[k+2];u=g.buffer.o[g.oPos+1].data[k+3];k+=4;!p.__currentPath.isRemovable||null!=p.__currentPath.points&&0!=p.__currentPath.points.length?p.closePath():p.__drawPaths.pop();p.__currentPath=new cb;p.__currentPath.update(p.__line,p.__fill,p.__fillIndex,p.__currentWinding);p.__currentPath.type=
oa.Polygon;p.__currentPath.points.push(r);p.__currentPath.points.push(u);p.__drawPaths.push(p.__currentPath);break;case 2:r=g.buffer.o[g.oPos+1].data[k];u=g.buffer.o[g.oPos+1].data[k+1];k+=2;p.lineTo(r,u);break;case 5:r=g.buffer.o[g.oPos+1].data[k+2];u=g.buffer.o[g.oPos+1].data[k+3];k+=4;p.lineTo(r,u);break;case 3:q=g.buffer.o[g.oPos+1].data[k];h=g.buffer.o[g.oPos+1].data[k+1];r=g.buffer.o[g.oPos+1].data[k+2];u=g.buffer.o[g.oPos+1].data[k+3];k+=4;if(null==p.__currentPath.points||0==p.__currentPath.points.length)!p.__currentPath.isRemovable||
null!=p.__currentPath.points&&0!=p.__currentPath.points.length?p.closePath():p.__drawPaths.pop(),p.__currentPath=new cb,p.__currentPath.update(p.__line,p.__fill,p.__fillIndex,p.__currentWinding),p.__currentPath.type=oa.Polygon,p.__currentPath.points.push(0),p.__currentPath.points.push(0),p.__drawPaths.push(p.__currentPath);Wa.curveTo(p.__currentPath.points,q,h,r,u);break;case 6:q=g.buffer.o[g.oPos+1].data[k];h=g.buffer.o[g.oPos+1].data[k+1];w=g.buffer.o[g.oPos+1].data[k+2];t=g.buffer.o[g.oPos+1].data[k+
3];r=g.buffer.o[g.oPos+1].data[k+4];u=g.buffer.o[g.oPos+1].data[k+5];k+=6;if(null==p.__currentPath.points||0==p.__currentPath.points.length)!p.__currentPath.isRemovable||null!=p.__currentPath.points&&0!=p.__currentPath.points.length?p.closePath():p.__drawPaths.pop(),p.__currentPath=new cb,p.__currentPath.update(p.__line,p.__fill,p.__fillIndex,p.__currentWinding),p.__currentPath.type=oa.Polygon,p.__currentPath.points.push(0),p.__currentPath.points.push(0),p.__drawPaths.push(p.__currentPath);Wa.cubicCurveTo(p.__currentPath.points,
q,h,w,t,r,u)}p.__currentWinding=0;break;case 18:d.advance();d.prev=z.OVERRIDE_MATRIX;g=d;!p.__currentPath.isRemovable||null!=p.__currentPath.points&&0!=p.__currentPath.points.length?p.closePath():p.__drawPaths.pop();p.__currentPath=new cb;p.__currentPath.update(p.__line,p.__fill,p.__fillIndex,p.__currentWinding);p.__currentPath.type=oa.OverrideMatrix(g.buffer.o[g.oPos]);p.__currentPath.isRemovable=!1;p.__drawPaths.push(p.__currentPath);break;default:d.advance(),d.prev=g}}p.closePath();d.destroy()}a.__drawPaths=
p.__drawPaths;return c};var mg=function(){this.color=this.width=0;this.alpha=1;this.scaleMode=Fb.NORMAL;this.caps=Ac.ROUND;this.joints=nc.ROUND;this.miterLimit=3};g["openfl._internal.renderer.opengl.utils.LineStyle"]=mg;mg.__name__="openfl _internal renderer opengl utils LineStyle".split(" ");mg.prototype={width:null,color:null,alpha:null,scaleMode:null,caps:null,joints:null,miterLimit:null,__class__:mg};var Ab=g["openfl._internal.renderer.opengl.utils.FillType"]={__ename__:!0,__constructs__:["None",
"Color","Texture","Gradient"]};Ab.None=["None",0];Ab.None.toString=u;Ab.None.__enum__=Ab;Ab.Color=function(a,b){var c=["Color",1,a,b];c.__enum__=Ab;c.toString=u;return c};Ab.Texture=function(a,b,c,d){a=["Texture",2,a,b,c,d];a.__enum__=Ab;a.toString=u;return a};Ab.Gradient=["Gradient",3];Ab.Gradient.toString=u;Ab.Gradient.__enum__=Ab;var uk=function(a,b){this.transparent=b;this.filterStack=[];this.offsetY=this.offsetX=0;this.setContext(a)};g["openfl._internal.renderer.opengl.utils.FilterManager"]=
uk;uk.__name__="openfl _internal renderer opengl utils FilterManager".split(" ");uk.prototype={buffer:null,colorArray:null,colorBuffer:null,defaultShader:null,filterStack:null,gl:null,height:null,indexBuffer:null,offsetX:null,offsetY:null,renderSession:null,texturePool:null,transparent:null,uvArray:null,uvBuffer:null,vertexArray:null,vertexBuffer:null,width:null,begin:function(a,b){this.renderSession=a;this.defaultShader=a.shaderManager.defaultShader;this.height=this.width=0;this.buffer=b},initShaderBuffers:function(){var a=
this.gl;this.vertexBuffer=a.createBuffer();this.uvBuffer=a.createBuffer();this.colorBuffer=a.createBuffer();this.indexBuffer=a.createBuffer();var b=[0,0,1,0,0,1,1,1];this.vertexArray=null!=b?new Float32Array(b):null;a.bindBuffer(a.ARRAY_BUFFER,this.vertexBuffer);a.bufferData(a.ARRAY_BUFFER,this.vertexArray,a.STATIC_DRAW);b=[0,0,1,0,0,1,1,1];this.uvArray=null!=b?new Float32Array(b):null;a.bindBuffer(a.ARRAY_BUFFER,this.uvBuffer);a.bufferData(a.ARRAY_BUFFER,this.uvArray,a.STATIC_DRAW);b=[1,16777215,
1,16777215,1,16777215,1,16777215];this.colorArray=null!=b?new Float32Array(b):null;a.bindBuffer(a.ARRAY_BUFFER,this.colorBuffer);a.bufferData(a.ARRAY_BUFFER,this.colorArray,a.STATIC_DRAW);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.indexBuffer);a.bufferData(a.ELEMENT_ARRAY_BUFFER,function(a){a=[0,1,2,1,3,2];return null!=a?new Uint16Array(a):null}(this),a.STATIC_DRAW)},setContext:function(a){this.gl=a;this.texturePool=[];this.initShaderBuffers()},__class__:uk};var Ji=function(a){this.renderSession=a;
this.setContext(a.gl);this.clips=[]};g["openfl._internal.renderer.opengl.utils.GLMaskManager"]=Ji;Ji.__name__="openfl _internal renderer opengl utils GLMaskManager".split(" ");Ji.__super__=Zc;Ji.prototype=t(Zc.prototype,{gl:null,clips:null,currentClip:null,savedClip:null,pushRect:function(a,b){if(null!=a){var c=new ra(b.a,b.b,b.c,b.d,b.tx,b.ty);ub.flipMatrix(c,this.renderSession.renderer.viewport.height);var d=a.clone();d.__transform(d,c);null!=this.currentClip&&(d=this.currentClip.intersection(d));
c=null==this.currentClip||d.isEmpty()||this.currentClip.containsRect(d);this.clips.push(d);this.currentClip=d;c&&(this.renderSession.spriteBatch.stop(),this.renderSession.spriteBatch.start(this.currentClip))}},pushMask:function(a){this.renderSession.spriteBatch.stop();this.renderSession.stencilManager.pushMask(a,this.renderSession);this.renderSession.spriteBatch.start(this.currentClip)},popMask:function(){this.renderSession.spriteBatch.stop();this.renderSession.stencilManager.popMask(null,this.renderSession);
this.renderSession.spriteBatch.start(this.currentClip)},popRect:function(){this.renderSession.spriteBatch.stop();this.clips.pop();this.currentClip=this.clips[this.clips.length-1];this.renderSession.spriteBatch.start(this.currentClip)},saveState:function(){this.savedClip=this.currentClip;this.currentClip=null},restoreState:function(){this.currentClip=this.savedClip;this.savedClip=null},setContext:function(a){null!=this.renderSession&&(this.renderSession.gl=a);this.gl=a},__class__:Ji});var Bc=function(a,
b,c,d,e){null==c&&(c=!1);this.enabled=!0;this.normalized=!1;this.components=a;this.type=b;this.normalized=c;this.name=d;this.defaultValue=null==e?null!=a?new Float32Array(a):null:e};g["openfl._internal.renderer.opengl.utils.VertexAttribute"]=Bc;Bc.__name__="openfl _internal renderer opengl utils VertexAttribute".split(" ");Bc.prototype={components:null,normalized:null,type:null,name:null,enabled:null,defaultValue:null,copy:function(){return new Bc(this.components,this.type,this.normalized,this.name,
this.defaultValue)},getElementsBytes:function(){switch(this.type){case 5120:case 5121:return 1;case 5122:case 5123:return 2;default:return 4}},__class__:Bc};var ha=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this.x=a;this.y=b;this.width=c;this.height=d};g["openfl.geom.Rectangle"]=ha;ha.__name__=["openfl","geom","Rectangle"];ha.prototype={height:null,width:null,x:null,y:null,clone:function(){return new ha(this.x,this.y,this.width,this.height)},contains:function(a,
b){return a>=this.x&&b>=this.y&&a<this.get_right()&&b<this.get_bottom()},containsPoint:function(a){return this.contains(a.x,a.y)},containsRect:function(a){return 0>=a.width||0>=a.height?a.x>this.x&&a.y>this.y&&a.get_right()<this.get_right()&&a.get_bottom()<this.get_bottom():a.x>=this.x&&a.y>=this.y&&a.get_right()<=this.get_right()&&a.get_bottom()<=this.get_bottom()},copyFrom:function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height},intersection:function(a){var b;b=this.x<a.x?a.x:
this.x;var c;c=this.get_right()>a.get_right()?a.get_right():this.get_right();if(c<=b)return new ha;var d;d=this.y<a.y?a.y:this.y;a=this.get_bottom()>a.get_bottom()?a.get_bottom():this.get_bottom();return a<=d?new ha:new ha(b,d,c-b,a-d)},isEmpty:function(){return 0>=this.width||0>=this.height},setEmpty:function(){this.x=this.y=this.width=this.height=0},setTo:function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d},__expand:function(a,b,c,d){if(0==this.width&&0==this.height)this.x=a,this.y=b,
this.width=c,this.height=d;else{var e=this.get_right(),f=this.get_bottom();this.x>a&&(this.x=a,this.width=e-a);this.y>b&&(this.y=b,this.height=f-b);e<a+c&&(this.width=a+c-this.x);f<b+d&&(this.height=b+d-this.y)}},__toLimeRectangle:function(){return new Uc(this.x,this.y,this.width,this.height)},__transform:function(a,b){var c=b.a*this.x+b.c*this.y,d=c,e=b.b*this.x+b.d*this.y,f=e,g=b.a*(this.x+this.width)+b.c*this.y,h=b.b*(this.x+this.width)+b.d*this.y;g<c&&(c=g);h<e&&(e=h);g>d&&(d=g);h>f&&(f=h);g=
b.a*(this.x+this.width)+b.c*(this.y+this.height);h=b.b*(this.x+this.width)+b.d*(this.y+this.height);g<c&&(c=g);h<e&&(e=h);g>d&&(d=g);h>f&&(f=h);g=b.a*this.x+b.c*(this.y+this.height);h=b.b*this.x+b.d*(this.y+this.height);g<c&&(c=g);h<e&&(e=h);g>d&&(d=g);h>f&&(f=h);a.setTo(c+b.tx,e+b.ty,d-c,f-e)},get_bottom:function(){return this.y+this.height},get_left:function(){return this.x},get_right:function(){return this.x+this.width},get_top:function(){return this.y},get_topLeft:function(){return new Ea(this.x,
this.y)},__class__:ha,__properties__:{get_topLeft:"get_topLeft",get_top:"get_top",get_right:"get_right",get_left:"get_left",get_bottom:"get_bottom"}};var N=function(){};g["openfl._internal.renderer.opengl.utils.GraphicsRenderer"]=N;N.__name__="openfl _internal renderer opengl utils GraphicsRenderer".split(" ");N.overrideMatrix=null;N.buildCircle=function(a,b,c){null==c&&(c=!1);var d=a.points,e=d[0],f=d[1],g=d[2],d=3==d.length?g:d[3];a.type==oa.Ellipse&&(g/=2,d/=2,e+=g,f+=d);c&&(e-=N.objectBounds.x,
f-=N.objectBounds.y);c=2*Math.PI/40;b=N.prepareBucket(a,b);var h=b.getData(oc.Fill);if(null!=h){var k=h.verts,h=h.indices,l=k.length/2|0;h.push(l);for(var m=0;41>m;){var p=m++;k.push(e);k.push(f);k.push(e+Math.sin(c*p)*g);k.push(f+Math.cos(c*p)*d);h.push(l++);h.push(l++)}h.push(l-1)}0<a.line.width&&(c=a.points,a.points=[],Wa.ellipse(a.points,e,f,g,d,40),N.buildLine(a,b),a.points=c)};N.buildComplexPoly=function(a,b,c){null==c&&(c=!1);var d=null;if(6<=a.points.length){var e=a.points.slice();if(c)for(var d=
0,f=e.length/2|0;d<f;){var g=d++;e[2*g]-=N.objectBounds.x;e[2*g+1]-=N.objectBounds.y}d=N.prepareBucket(a,b);f=d.getData(oc.Fill);f.drawMode=b.gl.TRIANGLE_FAN;f.verts=e;f=f.indices;e=e.length/2|0;for(g=0;g<e;){var h=g++;f.push(h)}}0<a.line.width&&(null==d&&(d=N.prepareBucket(a,b)),N.buildLine(a,d,c))};N.buildLine=function(a,b,c){null==c&&(c=!1);var d=a.points;if(0!=d.length){b=b.getData(oc.Line);if(c){c=0;for(var e=d.length/2|0;c<e;){var f=c++;d[2*f]-=N.objectBounds.x;d[2*f+1]-=N.objectBounds.y}}e=
new Ea(d[0],d[1]);f=new Ea(d[d.length-2|0],d[d.length-1|0]);e.x==f.x&&e.y==f.y&&(d=d.slice(),d.pop(),d.pop(),f=new Ea(d[d.length-2|0],d[d.length-1|0]),c=f.x+.5*(e.x-f.x),e=f.y+.5*(e.y-f.y),d.unshift(e),d.unshift(c),d.push(c),d.push(e));c=b.verts;b=b.indices;var g=d.length/2|0,e=d.length,f=c.length/6|0,h=a.line.width/2,k=N.hex2rgb(a.line.color);a=a.line.alpha;var l=k[0],m=k[1],k=k[2],p,q,r,t,u,v,x,z,y,B,C,A,F,D;r=d[0];t=d[1];u=d[2];v=d[3];z=-(t-v);y=r-u;q=Math.sqrt(Math.abs(z*z+y*y));z=z/q*h;y=y/q*
h;c.push(r-z);c.push(t-y);c.push(l);c.push(m);c.push(k);c.push(a);c.push(r+z);c.push(t+y);c.push(l);c.push(m);c.push(k);c.push(a);for(var E=1,G=g-1;E<G;)y=E++,r=d[2*(y-1)],t=d[2*(y-1)+1],u=d[2*y],v=d[2*y+1],p=d[2*(y+1)],x=d[2*(y+1)+1],z=-(t-v),y=r-u,q=Math.sqrt(Math.abs(z*z+y*y)),z/=q,y/=q,z*=h,y*=h,B=-(v-x),C=u-p,q=Math.sqrt(Math.abs(B*B+C*C)),B/=q,C/=q,B*=h,C*=h,q=-y+t-(-y+v),A=-z+u-(-z+r),r=(-z+r)*(-y+v)-(-z+u)*(-y+t),t=-C+x-(-C+v),F=-B+u-(-B+p),x=(-B+p)*(-C+v)-(-B+u)*(-C+x),D=q*F-t*A,.1>Math.abs(D)?
(c.push(u-z),c.push(v-y),c.push(l),c.push(m),c.push(k),c.push(a),c.push(u+z),c.push(v+y),c.push(l),c.push(m),c.push(k),c.push(a)):(p=(A*x-F*r)/D,q=(t*r-q*x)/D,A=(p-u)*(p-u)+(q-v)+(q-v),19600<A?(z-=B,y-=C,q=Math.sqrt(Math.abs(z*z+y*y)),z/=q,y/=q,z*=h,y*=h,c.push(u-z),c.push(v-y),c.push(l),c.push(m),c.push(k),c.push(a),c.push(u+z),c.push(v+y),c.push(l),c.push(m),c.push(k),c.push(a),c.push(u-z),c.push(v-y),c.push(l),c.push(m),c.push(k),c.push(a),e++):(c.push(p),c.push(q),c.push(l),c.push(m),c.push(k),
c.push(a),c.push(u-(p-u)),c.push(v-(q-v)),c.push(l),c.push(m),c.push(k),c.push(a)));r=d[2*(g-2)];t=d[2*(g-2)+1];u=d[2*(g-1)];v=d[2*(g-1)+1];z=-(t-v);y=r-u;q=Math.sqrt(Math.abs(z*z+y*y));isFinite(q)||Ia.trace(z*z+y*y,{fileName:"GraphicsRenderer.hx",lineNumber:407,className:"openfl._internal.renderer.opengl.utils.GraphicsRenderer",methodName:"buildLine"});z/=q;y/=q;z*=h;y*=h;c.push(u-z);c.push(v-y);c.push(l);c.push(m);c.push(k);c.push(a);c.push(u+z);c.push(v+y);c.push(l);c.push(m);c.push(k);c.push(a);
b.push(f);for(d=0;d<e;)d++,b.push(f++);b.push(f-1)}};N.buildRectangle=function(a,b,c){null==c&&(c=!1);var d=a.points,e=d[0],f=d[1],g=d[2],d=d[3];c&&(e-=N.objectBounds.x,f-=N.objectBounds.y);b=N.prepareBucket(a,b);var h=b.getData(oc.Fill);if(null!=h){c=h.verts;var h=h.indices,k=c.length/2|0;c.push(e);c.push(f);c.push(e+g);c.push(f);c.push(e);c.push(f+d);c.push(e+g);c.push(f+d);h.push(k);h.push(k);h.push(k+1);h.push(k+2);h.push(k+3);h.push(k+3)}0<a.line.width&&(c=a.points,a.points=[e,f,e+g,f,e+g,f+
d,e,f+d,e,f],N.buildLine(a,b),a.points=c)};N.buildRoundedRectangle=function(a,b,c){null==c&&(c=!1);var d=a.points.slice(),e=d[0],f=d[1],g=d[2],h=d[3],k=d[4],d=d[5];c&&(e-=N.objectBounds.x,f-=N.objectBounds.y);c=[];Wa.roundRectangle(c,e,f,g,h,k,d);b=N.prepareBucket(a,b);f=b.getData(oc.Fill);if(null!=f){e=f.verts;f=f.indices;g=e.length/2;h=[];lf.triangulate(h,c);for(k=0;k<h.length;)f.push(h[k]+g|0),f.push(h[k]+g|0),f.push(h[k+1]+g|0),f.push(h[k+2]+g|0),f.push(h[k+2]+g|0),k+=3;for(k=0;k<c.length;)e.push(c[k]),
e.push(c[++k]),k++}0<a.line.width&&(e=a.points,a.points=c,N.buildLine(a,b),a.points=e)};N.buildDrawTriangles=function(a,b,c,d){null==d&&(d=!1);var e=a.type.slice(2),f=e[0],g=e[1],h=e[2],k=e[3],e=e[4],l,m,q,p,r;d?(l=1,q=m=0,p=1,b=r=0):(l=b.__worldTransform.a,m=b.__worldTransform.b,q=b.__worldTransform.c,p=b.__worldTransform.d,r=b.__worldTransform.tx,b=b.__worldTransform.ty);var t=null!=e&&0<e.length;c=N.prepareBucket(a,c).getData(oc.Fill);a=c.vertexArray.attributes[2];a.enabled=t;var u=[1,1,1,1],u=
null!=u?new Float32Array(u):null;a.defaultValue=u;c.rawVerts=!0;c.glLength=g.length;c.stride=K["int"](c.vertexArray.get_stride()/4);a=c.glLength*c.stride;null==c.glVerts||c.glVerts.length<a?(a=null!=a?new Float32Array(a):null,c.glVerts=a):a=c.glVerts;c=a.buffer;c=null!=c?new Uint32Array(c,0):null;for(var v=0,x=0,y=0,z=0,B=0,C=0,A=0,F=0,D=0,E=0,G=0,H=0,J=u=0,M=g.length/3|0;J<M;){C=J++;z=g.data[3*C];B=g.data[3*C+1];C=g.data[3*C+2];v=2*z;x=2*B;y=2*C;A=f.data[v];F=f.data[v+1];D=f.data[x];E=f.data[x+1];
G=f.data[y];H=f.data[y+1];d&&(A-=N.objectBounds.x,F-=N.objectBounds.y,D-=N.objectBounds.x,E-=N.objectBounds.y,G-=N.objectBounds.x,H-=N.objectBounds.y);switch(k[1]){case 2:if(!(0>(D-A)*(H-F)-(E-F)*(G-A)))continue;break;case 0:if(0>(D-A)*(H-F)-(E-F)*(G-A))continue}var O=u++;a[O]=l*A+q*F+r;O=u++;a[O]=m*A+p*F+b;A=u++;a[A]=h.data[v];A=u++;a[A]=h.data[v+1];t&&(v=u++,c[v]=e.data[z]);z=u++;a[z]=l*D+q*E+r;z=u++;a[z]=m*D+p*E+b;D=u++;a[D]=h.data[x];D=u++;a[D]=h.data[x+1];t&&(x=u++,c[x]=e.data[B]);B=u++;a[B]=
l*G+q*H+r;B=u++;a[B]=m*G+p*H+b;G=u++;a[G]=h.data[y];G=u++;a[G]=h.data[y+1];t&&(y=u++,c[y]=e.data[C])}};N.render=function(a,b){var c=a.__graphics,d=c.__bounds,e=c.__dirty;c.__visible&&0!=c.__commands.get_length()&&null!=d&&0!=d.width&&0!=d.height?(e&&N.updateGraphics(a,a.__graphics,b.gl,a.get_cacheAsBitmap()),N.renderGraphics(a,b,!1)):c.__glStack.splice(0,c.__glStack.length)};N.renderGraphics=function(a,b,c){null==c&&(c=!1);var d=b.gl,e=a.__graphics.__glStack[Hb.glContextId];if(null!=e){var f,g;g=
c?ra.__identity:a.__worldTransform;for(var h=b.spriteBatch.clipRect,k=b.spriteBatch.drawing,l=0,m=e.buckets.length;l<m;){f=l++;(k=b.spriteBatch.drawing)&&!c&&b.spriteBatch.finish();b.blendModeManager.setBlendMode(a.__blendMode);null!=h&&(d.enable(d.SCISSOR_TEST),d.scissor(Math.floor(h.x),Math.floor(h.y),Math.floor(h.width),Math.floor(h.height)));f=e.buckets[f];switch(f.mode[1]){case 1:case 2:b.stencilManager.pushBucket(f,b,g.toArray(!0));k=N.prepareShader(f,b,a,g.toArray(!0));N.renderFill(f,k,b);
b.stencilManager.popBucket(a,f,b);break;case 5:k=N.prepareShader(f,b,a,null);N.renderDrawTriangles(f,k,b);break;case 6:k||b.spriteBatch.begin(b,h),k=f.graphicType.slice(2),b.spriteBatch.renderTiles(a,k[0],k[1],k[2],k[3],k[4],k[5]),b.spriteBatch.finish()}var k=a.__worldColorTransform,q=0;for(f=f.lines;q<f.length;){var p=f[q];++q;if(null!=p&&0<p.verts.length){var r=b.shaderManager.primitiveShader;b.shaderManager.setShader(r);d.uniformMatrix3fv(r.getUniformLocation("openfl_uTranslationMatrix"),!1,g.toArray(!0));
d.uniformMatrix3fv(r.getUniformLocation("openfl_uProjectionMatrix"),!1,b.projectionMatrix.toArray(!0));d.uniform1f(r.getUniformLocation("openfl_uAlpha"),1);d.uniform4f(r.getUniformLocation("openfl_uColorMultiplier"),k.redMultiplier,k.greenMultiplier,k.blueMultiplier,k.alphaMultiplier);d.uniform4f(r.getUniformLocation("openfl_uColorOffset"),k.redOffset/255,k.greenOffset/255,k.blueOffset/255,k.alphaOffset/255);p.vertexArray.bind();r.bindVertexArray(p.vertexArray);d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,
p.indexBuffer);d.drawElements(d.TRIANGLE_STRIP,p.indices.length,d.UNSIGNED_SHORT,0)}}null!=h&&d.disable(d.SCISSOR_TEST);(k=b.spriteBatch.drawing)||c||b.spriteBatch.begin(b,h)}}};N.updateGraphics=function(a,b,c,d){null==d&&(d=!1);N.objectPosition.setTo(a.get_x(),a.get_y());null==b.__bounds?N.objectBounds=new ha:N.objectBounds.copyFrom(b.__bounds);var e=null;b.__dirty&&(e=cb.getStack(b,c));b.set___dirty(!1);c=0;for(var f=e.buckets;c<f.length;){var g=f[c];++c;g.reset();N.bucketPool.push(g)}e.reset();
c=e.lastIndex;for(f=b.__drawPaths.length;c<f;){var g=c++,g=b.__drawPaths[g],h=g.type;switch(h[1]){case 0:N.buildComplexPoly(g,e,d);break;case 1:h[2]?N.buildRoundedRectangle(g,e,d):N.buildRectangle(g,e,d);break;case 2:case 3:N.buildCircle(g,e,d);break;case 4:N.buildDrawTriangles(g,a,e,d);break;case 5:N.prepareBucket(g,e);break;case 6:N.overrideMatrix=h[2]}e.lastIndex++}a=0;for(b=e.buckets;a<b.length;)d=b[a],++a,d.uploadTileBuffer&&d.uploadTile(Math.ceil(N.objectBounds.get_left()),Math.ceil(N.objectBounds.get_top()),
Math.floor(N.objectBounds.get_right()),Math.floor(N.objectBounds.get_bottom())),d.optimize();e.upload()};N.prepareBucket=function(a,b){var c=null,c=a.fill;switch(c[1]){case 1:var d=c[3],e=c[2],c=N.switchBucket(a.fillIndex,b,va.Fill);c.color=null==e?[1,1,1]:[(e>>16&255)/255,(e>>8&255)/255,(e&255)/255];c.color[3]=d;c.uploadTileBuffer=!0;break;case 2:var d=c[5],e=c[4],f=c[3],g=c[2],c=N.switchBucket(a.fillIndex,b,va.PatternFill);c.bitmap=g;c.textureRepeat=e;c.textureSmooth=d;c.texture=g.getTexture(b.gl);
c.uploadTileBuffer=!0;d=null==f?new ra:new ra(f.a,f.b,f.c,f.d,f.tx,f.ty);d.invert();d.scale(1/g.width,1/g.height);e=d.tx;f=d.ty;d.tx=0;d.ty=0;c.textureTL.x=e;c.textureTL.y=f;c.textureBR.x=e+1;c.textureBR.y=f+1;c.textureMatrix=d;break;default:c=N.switchBucket(a.fillIndex,b,va.Line),c.uploadTileBuffer=!1}switch(a.type[1]){case 4:c.mode=va.DrawTriangles;c.uploadTileBuffer=!1;break;case 5:c.mode=va.DrawTiles,c.uploadTileBuffer=!1}c.graphicType=a.type;c.overrideMatrix=N.overrideMatrix;return c};N.getBucket=
function(a,b){var c=N.bucketPool.pop();null==c&&(c=new yk(a.gl));c.mode=b;a.buckets.push(c);return c};N.switchBucket=function(a,b,c){for(var d=null,e=0,f=b.buckets;e<f.length;){var g=f[e];++e;if(g.fillIndex==a){d=g;break}}null==d&&(d=N.getBucket(b,c));d.dirty=!0;d.fillIndex=a;return d};N.prepareShader=function(a,b,c,d){var e=b.gl,f=null;switch(a.mode[1]){case 1:f=b.shaderManager.fillShader;break;case 2:f=b.shaderManager.patternFillShader;break;case 5:f=b.shaderManager.drawTrianglesShader;break;default:f=
null}if(null==f)return null;b.shaderManager.setShader(f);e.uniform1f(f.getUniformLocation("openfl_uAlpha"),c.__worldAlpha);e.uniformMatrix3fv(f.getUniformLocation("openfl_uProjectionMatrix"),!1,b.projectionMatrix.toArray(!0));b=c.__worldColorTransform;e.uniform4f(f.getUniformLocation("openfl_uColorMultiplier"),b.redMultiplier,b.greenMultiplier,b.blueMultiplier,b.alphaMultiplier);e.uniform4f(f.getUniformLocation("openfl_uColorOffset"),b.redOffset/255,b.greenOffset/255,b.blueOffset/255,b.alphaOffset/
255);switch(a.mode[1]){case 1:e.uniformMatrix3fv(f.getUniformLocation("openfl_uTranslationMatrix"),!1,d);e.uniform4fv(f.getUniformLocation("openfl_uColor"),function(b){b=a.color;return null!=b?new Float32Array(b):null}(this));break;case 2:e.uniformMatrix3fv(f.getUniformLocation("openfl_uTranslationMatrix"),!1,d);e.uniform2f(f.getUniformLocation("openfl_uPatternTL"),a.textureTL.x,a.textureTL.y);e.uniform2f(f.getUniformLocation("openfl_uPatternBR"),a.textureBR.x,a.textureBR.y);e.uniformMatrix3fv(f.getUniformLocation("openfl_uPatternMatrix"),
!1,a.textureMatrix.toArray(!0));break;case 5:null!=a.texture?e.uniform1i(f.getUniformLocation("openfl_uUseTexture"),1):(e.uniform1i(f.getUniformLocation("openfl_uUseTexture"),0),e.uniform4fv(f.getUniformLocation("openfl_uColor"),function(b){b=a.color;return null!=b?new Float32Array(b):null}(this)))}return f};N.renderFill=function(a,b,c){c=c.gl;a.mode==va.PatternFill&&null!=a.texture&&N.bindTexture(c,a);c.bindBuffer(c.ARRAY_BUFFER,a.tileBuffer);c.vertexAttribPointer(b.getAttribLocation("openfl_aPosition"),
4,c.SHORT,!1,0,0);c.drawArrays(c.TRIANGLE_STRIP,0,4)};N.renderDrawTriangles=function(a,b,c){c=c.gl;for(var d=0,e=a.fills;d<e.length;){var f=e[d];++d;f.available||(N.bindTexture(c,a),f.vertexArray.bind(),b.bindVertexArray(f.vertexArray),c.drawArrays(c.TRIANGLES,f.glStart,f.glLength))}};N.bindTexture=function(a,b){a.bindTexture(a.TEXTURE_2D,b.texture);b.textureRepeat&&b.bitmap.image.get_powerOfTwo()?(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.REPEAT),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,
a.REPEAT)):(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE));b.textureSmooth?(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR)):(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.NEAREST),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.NEAREST))};N.hex2rgb=function(a){return null==a?[1,1,1]:[(a>>16&255)/255,(a>>8&255)/255,(a&255)/255]};var xk=function(a){this.lastIndex=
0;this.gl=a;this.buckets=[];this.lastIndex=0};g["openfl._internal.renderer.opengl.utils.GLStack"]=xk;xk.__name__="openfl _internal renderer opengl utils GLStack".split(" ");xk.prototype={lastIndex:null,buckets:null,gl:null,reset:function(){this.buckets=[];this.lastIndex=0},upload:function(){for(var a=0,b=this.buckets;a<b.length;){var c=b[a];++a;c.dirty&&c.upload()}},__class__:xk};var yk=function(a){this.textureSmooth=this.uploadTileBuffer=!0;this.textureRepeat=!1;this.lines=[];this.fills=[];this.fillIndex=
-1;this.gl=a;this.color=[0,0,0];this.lastIndex=0;this.alpha=1;this.dirty=!0;this.mode=va.Fill;this.textureMatrix=new ra;this.textureTL=new Ea;this.textureBR=new Ea(1,1)};g["openfl._internal.renderer.opengl.utils.GLBucket"]=yk;yk.__name__="openfl _internal renderer opengl utils GLBucket".split(" ");yk.prototype={gl:null,color:null,alpha:null,dirty:null,graphicType:null,lastIndex:null,fillIndex:null,mode:null,fills:null,lines:null,bitmap:null,texture:null,textureMatrix:null,textureRepeat:null,textureSmooth:null,
textureTL:null,textureBR:null,overrideMatrix:null,tileBuffer:null,glTile:null,tile:null,uploadTileBuffer:null,getData:function(a){var b;switch(a[1]){case 1:b=this.fills;break;default:b=this.lines}for(var c=null,d=!1,e=0;e<b.length;){var f=b[e];++e;if(f.available){c=f;d=!0;break}}null==c&&(c=new zk(this.gl));c.available=!1;c.parent=this;c.type=a;d&&H.remove(b,c);b.push(c);switch(a[1]){case 1:switch(this.mode[1]){case 1:case 2:c.vertexArray.attributes=N.fillVertexAttributes;break;case 5:c.vertexArray.attributes=
N.drawTrianglesVertexAttributes.slice(),c.vertexArray.attributes[2]=c.vertexArray.attributes[2].copy()}break;case 0:c.vertexArray.attributes=N.primitiveVertexAttributes}return c},optimize:function(){var a=this.lines;if(1<a.length){for(var b=[],c=null,d=null,e=0,f=0,g=0,h=0;h<a.length;){var k=a[h];++h;if(k.available||k.rawVerts||k.rawIndices)null!=c&&(b.push(c),c=null),b.push(k);else if(null==d||d.drawMode==k.drawMode){if(null==c)c=k;else{for(var f=c.verts.length,g=c.indices.length,d=0,l=k.verts.length;d<
l;){var m=d++;c.verts[m+f]=k.verts[m]}f=0;for(d=k.indices.length;f<d;)l=f++,c.indices[l+g]=k.indices[l]+e}e=c.indices[c.indices.length-1]+1}else null!=c&&(b.push(c),c=null),b.push(k);d=k}0==b.length&&null!=c&&b.push(c);if(0<b.length)switch(oc.Line[1]){case 1:this.fills=b;break;default:this.lines=b}}},reset:function(){for(var a=0,b=this.fills;a<b.length;){var c=b[a];++a;c.reset()}a=0;for(b=this.lines;a<b.length;)c=b[a],++a,c.reset();this.fillIndex=-1;this.uploadTileBuffer=!0;this.graphicType=oa.Polygon},
uploadTile:function(a,b,c,d){null==this.tileBuffer&&(this.tileBuffer=this.gl.createBuffer());a=this.tile=[a,b,0,0,c,b,1,0,a,d,0,1,c,d,1,1];this.glTile=null!=a?new Int16Array(a):null;this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.tileBuffer);this.gl.bufferData(this.gl.ARRAY_BUFFER,this.glTile,this.gl.STATIC_DRAW)},upload:function(){if(this.mode!=va.Line)for(var a=0,b=this.fills;a<b.length;){var c=b[a];++a;c.available||c.upload()}a=0;for(b=this.lines;a<b.length;)c=b[a],++a,c.available||c.upload();this.dirty=
!1},__class__:yk};var zk=function(a){this.rawIndices=this.available=!1;this.stride=0;this.rawVerts=!1;this.glLength=this.glStart=this.lastVertsSize=0;this.gl=a;this.drawMode=a.TRIANGLE_STRIP;this.verts=[];this.indices=[];this.vertexArray=new Oi([])};g["openfl._internal.renderer.opengl.utils.GLBucketData"]=zk;zk.__name__="openfl _internal renderer opengl utils GLBucketData".split(" ");zk.prototype={type:null,gl:null,drawMode:null,glLength:null,glStart:null,vertexArray:null,glVerts:null,lastVertsSize:null,
verts:null,rawVerts:null,stride:null,indexBuffer:null,glIndices:null,indices:null,rawIndices:null,available:null,parent:null,reset:function(){this.available=!0;this.verts=[];this.indices=[];this.stride=this.glStart=this.glLength=0;this.rawIndices=this.rawVerts=!1;this.drawMode=this.gl.TRIANGLE_STRIP},upload:function(){if(this.rawVerts&&null!=this.glVerts&&0<this.glVerts.length||0<this.verts.length){if(!this.rawVerts){var a=this.verts;this.glVerts=null!=a?new Float32Array(a):null}this.vertexArray.buffer=
this.glVerts.buffer;this.glVerts.length<=this.lastVertsSize?(this.vertexArray.bind(),a=this.glLength*this.stride,0<this.glLength&&this.lastVertsSize>a?(a=this.glVerts.subarray(0,a),this.vertexArray.upload(a)):this.vertexArray.upload(this.glVerts)):(this.vertexArray.setContext(this.gl,this.glVerts),this.lastVertsSize=this.glVerts.length)}0==this.glLength&&(this.rawIndices&&null!=this.glIndices&&0<this.glIndices.length||0<this.indices.length)&&(null==this.indexBuffer&&(this.indexBuffer=this.gl.createBuffer()),
this.rawIndices||(a=this.indices,this.glIndices=null!=a?new Uint16Array(a):null),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.indexBuffer),this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER,this.glIndices,this.gl.STREAM_DRAW))},__class__:zk};var va=g["openfl._internal.renderer.opengl.utils.BucketMode"]={__ename__:!0,__constructs__:"None Fill PatternFill Line PatternLine DrawTriangles DrawTiles".split(" ")};va.None=["None",0];va.None.toString=u;va.None.__enum__=va;va.Fill=["Fill",1];va.Fill.toString=
u;va.Fill.__enum__=va;va.PatternFill=["PatternFill",2];va.PatternFill.toString=u;va.PatternFill.__enum__=va;va.Line=["Line",3];va.Line.toString=u;va.Line.__enum__=va;va.PatternLine=["PatternLine",4];va.PatternLine.toString=u;va.PatternLine.__enum__=va;va.DrawTriangles=["DrawTriangles",5];va.DrawTriangles.toString=u;va.DrawTriangles.__enum__=va;va.DrawTiles=["DrawTiles",6];va.DrawTiles.toString=u;va.DrawTiles.__enum__=va;var oc=g["openfl._internal.renderer.opengl.utils.BucketDataType"]={__ename__:!0,
__constructs__:["Line","Fill"]};oc.Line=["Line",0];oc.Line.toString=u;oc.Line.__enum__=oc;oc.Fill=["Fill",1];oc.Fill.toString=u;oc.Fill.__enum__=oc;var Fl=function(){};g["openfl._internal.renderer.opengl.utils.GLGraphicsData"]=Fl;Fl.__name__="openfl _internal renderer opengl utils GLGraphicsData".split(" ");var oa=g["openfl._internal.renderer.opengl.utils.GraphicType"]={__ename__:!0,__constructs__:"Polygon Rectangle Circle Ellipse DrawTriangles DrawTiles OverrideMatrix".split(" ")};oa.Polygon=["Polygon",
0];oa.Polygon.toString=u;oa.Polygon.__enum__=oa;oa.Rectangle=function(a){a=["Rectangle",1,a];a.__enum__=oa;a.toString=u;return a};oa.Circle=["Circle",2];oa.Circle.toString=u;oa.Circle.__enum__=oa;oa.Ellipse=["Ellipse",3];oa.Ellipse.toString=u;oa.Ellipse.__enum__=oa;oa.DrawTriangles=function(a,b,c,d,e,f){a=["DrawTriangles",4,a,b,c,d,e,f];a.__enum__=oa;a.toString=u;return a};oa.DrawTiles=function(a,b,c,d,e,f){a=["DrawTiles",5,a,b,c,d,e,f];a.__enum__=oa;a.toString=u;return a};oa.OverrideMatrix=function(a){a=
["OverrideMatrix",6,a];a.__enum__=oa;a.toString=u;return a};var sk=function(a,b,c,d,e){null==e&&(e=!0);null==d&&(d=!0);this.__swapped=!1;this.powerOfTwo=!0;this.useOldTexture=!1;this.gl=a;this.width=b;this.height=c;this.smoothing=d;this.powerOfTwo=e;this.set_renderTexture(new Pi(a,b,c,d,e))};g["openfl._internal.renderer.opengl.utils.PingPongTexture"]=sk;sk.__name__="openfl _internal renderer opengl utils PingPongTexture".split(" ");sk.prototype={gl:null,width:null,height:null,smoothing:null,useOldTexture:null,
powerOfTwo:null,__swapped:null,__texture0:null,__texture1:null,swap:function(){this.__swapped=!this.__swapped;null==(this.__swapped?this.__texture1:this.__texture0)&&this.set_renderTexture(new Pi(this.gl,this.width,this.height,this.smoothing,this.powerOfTwo))},resize:function(a,b){this.width=a;this.height=b;(this.__swapped?this.__texture1:this.__texture0).resize(a,b)},destroy:function(){null!=this.__texture0&&(this.__texture0.destroy(),this.__texture0=null);null!=this.__texture1&&(this.__texture1.destroy(),
this.__texture1=null);this.__swapped=!1},get_renderTexture:function(){return this.__swapped?this.__texture1:this.__texture0},set_renderTexture:function(a){return this.__swapped?this.__texture1=a:this.__texture0=a},get_oldRenderTexture:function(){return this.__swapped?this.__texture0:this.__texture1},set_oldRenderTexture:function(a){return this.__swapped?this.__texture0=a:this.__texture1=a},get_framebuffer:function(){return(this.__swapped?this.__texture1:this.__texture0).frameBuffer},get_texture:function(){return this.useOldTexture?
(this.__swapped?this.__texture0:this.__texture1).texture:(this.__swapped?this.__texture1:this.__texture0).texture},__class__:sk,__properties__:{get_texture:"get_texture",get_framebuffer:"get_framebuffer",set_oldRenderTexture:"set_oldRenderTexture",get_oldRenderTexture:"get_oldRenderTexture",set_renderTexture:"set_renderTexture",get_renderTexture:"get_renderTexture"}};var Pi=function(a,b,c,d,e){null==e&&(e=!0);null==d&&(d=!0);this.powerOfTwo=!0;this.gl=a;this.powerOfTwo=e;this.frameBuffer=a.createFramebuffer();
this.texture=a.createTexture();a.bindTexture(a.TEXTURE_2D,this.texture);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,d?a.LINEAR:a.NEAREST);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,d?a.LINEAR:a.NEAREST);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE);a.bindFramebuffer(a.FRAMEBUFFER,this.frameBuffer);a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,this.texture,0);this.renderBuffer=a.createRenderbuffer();
a.bindRenderbuffer(a.RENDERBUFFER,this.renderBuffer);a.framebufferRenderbuffer(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.RENDERBUFFER,this.renderBuffer);this.resize(b,c)};g["openfl._internal.renderer.opengl.utils.RenderTexture"]=Pi;Pi.__name__="openfl _internal renderer opengl utils RenderTexture".split(" ");Pi.prototype={gl:null,frameBuffer:null,renderBuffer:null,texture:null,width:null,height:null,powerOfTwo:null,__width:null,__height:null,__uvData:null,clear:function(a,b,c,d,e){null==d&&(d=0);
null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this.gl.clearColor(a,b,c,d);this.gl.clear(null==e?this.gl.COLOR_BUFFER_BIT:e)},destroy:function(){null!=this.frameBuffer&&this.gl.deleteFramebuffer(this.frameBuffer);null!=this.texture&&this.gl.deleteTexture(this.texture);this.texture=this.frameBuffer=null},resize:function(a,b){if(this.width!=a||this.height!=b){this.width=a;this.height=b;var c=a,d=b;this.powerOfTwo&&(c=this.powOfTwo(a),d=this.powOfTwo(b));var e=this.__width,f=this.__height;this.__width=
c;this.__height=d;this.createUVs();if(e!=c||f!=d)this.gl.bindTexture(this.gl.TEXTURE_2D,this.texture),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.__width,this.__height,0,this.gl.RGBA,this.gl.UNSIGNED_BYTE,null),this.gl.bindRenderbuffer(this.gl.RENDERBUFFER,this.renderBuffer),this.gl.renderbufferStorage(this.gl.RENDERBUFFER,this.gl.DEPTH_STENCIL,this.__width,this.__height)}},createUVs:function(){null==this.__uvData&&(this.__uvData=new Qi);var a=this.width/this.__width,b=this.height/this.__height;
this.__uvData.x0=0;this.__uvData.y0=0;this.__uvData.x1=a;this.__uvData.y1=0;this.__uvData.x2=a;this.__uvData.y2=b;this.__uvData.x3=0;this.__uvData.y3=b},powOfTwo:function(a){for(var b=1;b<a;)b<<=1;return b},__class__:Pi};var lg=function(a){this.setContext(a)};g["openfl._internal.renderer.opengl.utils.ShaderManager"]=lg;lg.__name__="openfl _internal renderer opengl utils ShaderManager".split(" ");lg.prototype={gl:null,currentShader:null,defaultShader:null,fillShader:null,patternFillShader:null,drawTrianglesShader:null,
primitiveShader:null,setContext:function(a){this.gl=a;this.defaultShader=new ne(a);this.fillShader=new Li(a);this.patternFillShader=new Mi(a);this.drawTrianglesShader=new Ki(a);this.primitiveShader=new Ni(a);this.setShader(this.defaultShader,!0)},setShader:function(a,b){null==b&&(b=!1);if(null==a)return this.currentShader=null,this.gl.useProgram(null),!0;if(null!=this.currentShader&&!b&&this.currentShader.ID==a.ID)return!1;this.currentShader=a;this.gl.useProgram(a.program);return!0},__class__:lg};
var tk=function(a,b){null==b&&(b=2E3);this.enableColor=this.lastEnableColor=!0;this.attributes=[];this.writtenVertexBytes=0;this.drawing=!1;this.dirty=!0;this.states=[];this.maxSprites=b;this.attributes.push(new Bc(2,5126,!1,"openfl_aPosition"));this.attributes.push(new Bc(2,5126,!1,"openfl_aTexCoord0"));this.attributes.push(new Bc(4,5121,!0,"openfl_aColor"));var c=[1,1,1,1],c=null!=c?new Float32Array(c):null;this.attributes[2].defaultValue=c;for(var c=this.maxElementsPerVertex=0,d=this.attributes;c<
d.length;){var e=d[c];++c;this.maxElementsPerVertex+=Math.floor(e.components*e.getElementsBytes()/4)}this.vertexArraySize=b*this.maxElementsPerVertex*16;this.indexArraySize=6*b;this.vertexArray=new Oi(this.attributes,this.vertexArraySize,!1);c=this.vertexArray.buffer;this.positions=null!=c?new Float32Array(c,0):null;c=this.vertexArray.buffer;this.colors=null!=c?new Uint32Array(c,0):null;c=this.indexArraySize;this.indices=null!=c?new Uint16Array(c):null;for(d=c=0;c<this.indexArraySize;)this.indices[c]=
d,this.indices[c+1]=d+1,this.indices[c+2]=d+2,this.indices[c+3]=d,this.indices[c+4]=d+2,this.indices[c+5]=d+3,c+=6,d+=4;this.currentState=new Ri;this.dirty=!0;this.drawing=!1;this.batchedSprites=0;this.setContext(a)};g["openfl._internal.renderer.opengl.utils.SpriteBatch"]=tk;tk.__name__="openfl _internal renderer opengl utils SpriteBatch".split(" ");tk.prototype={gl:null,renderSession:null,states:null,currentState:null,vertexArray:null,positions:null,colors:null,indexBuffer:null,indices:null,dirty:null,
drawing:null,clipRect:null,maxSprites:null,batchedSprites:null,vertexArraySize:null,indexArraySize:null,maxElementsPerVertex:null,elementsPerVertex:null,writtenVertexBytes:null,shader:null,attributes:null,enableColor:null,lastEnableColor:null,begin:function(a,b){this.renderSession=a;this.shader=a.shaderManager.defaultShader;this.drawing=!0;this.start(b)},finish:function(){this.stop();this.clipRect=null;this.drawing=!1},start:function(a){this.drawing||this.stop();this.dirty=!0;this.clipRect=a},stop:function(){this.flush()},
renderBitmapData:function(a,b,c,d,e,f,g,h,k){null==e&&(e=1);if(null!=a){k=a.getTexture(this.gl);this.batchedSprites>=this.maxSprites&&this.flush();var l=a.__uvData;null!=l&&(this.prepareShader(g,a),e=((255*e|0)&255)<<24|16777215,this.enableColor=!0,this.enableColor!=this.lastEnableColor&&(this.flush(),this.lastEnableColor=this.enableColor),this.attributes[2].enabled=this.lastEnableColor,this.elementsPerVertex=this.getElementsPerVertex(),this.fillVertices(4*this.batchedSprites*this.elementsPerVertex,
a.width,a.height,c,l,e,h),this.setState(this.batchedSprites,k,b,f,d,g,!0),this.batchedSprites++)}},renderTiles:function(a,b,c,d,e,f,g){null==g&&(g=-1);null==e&&(e=0);null==d&&(d=!1);var h=b.__bitmap.getTexture(this.gl);if(null!=h){var k=0<(e&1),l=0<(e&2),m=0<(e&16),q=0<(e&4),p=0<(e&8),r=0<(e&32),t=0<(e&64);switch(e&983040){case 65536:e=S.ADD;break;case 131072:e=S.MULTIPLY;break;case 262144:e=S.SCREEN;break;case 524288:e=S.SUBTRACT;break;default:switch(e&15728640){case 1048576:e=S.DARKEN;break;case 2097152:e=
S.LIGHTEN;break;case 4194304:e=S.OVERLAY;break;case 8388608:e=S.HARDLIGHT;break;default:switch(e&251658240){case 16777216:e=S.DIFFERENCE;break;case 33554432:e=S.INVERT;break;default:e=S.NORMAL}}}m&&(l=k=!1);var u=0,v=0,x=0,y=0,z=0,B=3;r&&(B=t?8:6);k&&(u=B,B++);l&&(v=B,B++);m&&(z=B,B+=4);q&&(x=B,B+=3);p&&(y=B,B++);var C=c.length;0<=g&&C>g&&(C=g);Math.ceil(C/B);g=0;var A=-1,D=b.__rectTile,A=b.__rectUV,F=b.__point,E=0,G=0,A=1,H=16777215,J=1,K=0,M=1,N=M=K=0,O=E=K=J=0,P=0,O=0,Q=a.__worldTransform,E=0,
G=1,N=M=0,J=1,O=K=0,T=Q.a,U=Q.b,W=Q.c,X=Q.d,ea=Q.tx,Q=Q.ty,Y=0,Z=0,aa=0,ba=0,ca=0,da=0;this.enableColor=!0;this.enableColor!=this.lastEnableColor&&(this.flush(),this.lastEnableColor=this.enableColor);this.attributes[2].enabled=this.lastEnableColor;this.elementsPerVertex=this.getElementsPerVertex();for(this.prepareShader(f,null);g<C;)this.batchedSprites>=this.maxSprites&&this.flush(),E=c[g],G=c[g+1],r?(D.x=c[g+2],D.y=c[g+3],D.width=c[g+4],D.height=c[g+5],t?(F.x=c[g+6],F.y=c[g+7]):(F.x=0,F.y=0),Y=D.width,
Z=D.height,aa=D.get_left()/b.__bitmap.width,ba=D.get_top()/b.__bitmap.height,ca=D.get_right()/b.__bitmap.width,da=D.get_bottom()/b.__bitmap.height):(A=(null==c[g+2]?0:c[g+2])|0,D=b.__tileRects[A],F=b.__centerPoints[A],A=b.__tileUVs[A],null!=D&&(Y=D.width,Z=D.height,aa=A.x,ba=A.y,ca=A.width,da=A.height)),null!=D&&0<D.width&&0<D.height&&null!=F&&(H=16777215,M=J=1,K=0,A=p?c[g+y]*a.__worldAlpha:a.__worldAlpha,q&&(H=(255*c[g+x]|0)<<16|(255*c[g+x+1]|0)<<8|255*c[g+x+2]|0),k&&(J=c[g+u]),l&&(K=c[g+v],M=Math.cos(K),
K=Math.sin(K)),m?(M=c[g+z],N=c[g+z+1],J=c[g+z+2],K=c[g+z+3]):(M*=J,N=J*K,J=-N,K=M),P=F.x*M+F.y*J,O=F.x*N+F.y*K,E-=P,O=G-O,G=(M*T+N*W)*Y,M=(M*U+N*X)*Y,N=(J*T+K*W)*Z,J=(J*U+K*X)*Z,K=E*T+O*W+ea,O=E*U+O*X+Q,E=4*this.batchedSprites*this.elementsPerVertex,this.positions[E]=K,this.positions[E+1]=O,this.positions[E+5]=G+K,this.positions[E+6]=M+O,this.positions[E+10]=G+N+K,this.positions[E+11]=J+M+O,this.positions[E+15]=N+K,this.positions[E+16]=J+O,A=this.colors[E+19]=((255*A|0)&255)<<24|H,A=this.colors[E+
14]=A,A=this.colors[E+9]=A,this.colors[E+4]=A,this.positions[E+2]=aa,this.positions[E+3]=ba,this.positions[E+7]=ca,this.positions[E+8]=ba,this.positions[E+12]=ca,this.positions[E+13]=da,this.positions[E+17]=aa,this.positions[E+18]=da,this.writtenVertexBytes=E+20,this.setState(this.batchedSprites,h,d,e,a.__worldColorTransform,f,!1),this.batchedSprites++),g+=B}},fillVertices:function(a,b,c,d,e,f,g){null==f&&(f=-1);var h=d.a,k=d.b,l=d.c,m=d.d,q=d.tx;d=d.ty;null==g||g==$a.NEVER?(this.positions[a]=q,this.positions[a+
1]=d,this.positions[a+5]=h*b+q,this.positions[a+6]=k*b+d,this.positions[a+10]=h*b+l*c+q,this.positions[a+11]=m*c+k*b+d,this.positions[a+15]=l*c+q,this.positions[a+16]=m*c+d):(g=Math.round(q),this.positions[a]=g,g=Math.round(d),this.positions[a+1]=g,g=Math.round(h*b+q),this.positions[a+5]=g,g=Math.round(k*b+d),this.positions[a+6]=g,h=Math.round(h*b+l*c+q),this.positions[a+10]=h,b=Math.round(m*c+k*b+d),this.positions[a+11]=b,l=Math.round(l*c+q),this.positions[a+15]=l,c=Math.round(m*c+d),this.positions[a+
16]=c);this.enableColor&&(f=this.colors[a+19]=f,f=this.colors[a+14]=f,f=this.colors[a+9]=f,this.colors[a+4]=f);this.positions[a+2]=e.x0;this.positions[a+3]=e.y0;this.positions[a+7]=e.x1;this.positions[a+8]=e.y1;this.positions[a+12]=e.x2;this.positions[a+13]=e.y2;this.positions[a+17]=e.x3;this.positions[a+18]=e.y3;this.writtenVertexBytes=a+20},flush:function(){if(0!=this.batchedSprites){null!=this.clipRect&&(this.gl.enable(this.gl.SCISSOR_TEST),this.gl.scissor(Math.floor(this.clipRect.x),Math.floor(this.clipRect.y),
Math.ceil(this.clipRect.width),Math.ceil(this.clipRect.height)));this.dirty&&(this.dirty=!1,this.renderSession.activeTextures=1,this.vertexArray.bind(),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.indexBuffer));if(this.writtenVertexBytes>.5*this.vertexArraySize)this.vertexArray.upload(this.positions);else{var a=this.positions.subarray(0,this.writtenVertexBytes);this.vertexArray.upload(a)}var b=0,c=0;this.currentState.shader=null;this.currentState.shaderData=null;this.currentState.texture=
null;this.currentState.textureSmooth=!1;this.currentState.blendMode=this.renderSession.blendModeManager.currentBlendMode;this.currentState.colorTransform=null;this.currentState.skipColorTransformAlpha=!1;for(var d=0,e=this.batchedSprites;d<e;){var f=d++,a=this.states[f];this.currentState.skipColorTransformAlpha=a.skipColorTransformAlpha;a.equals(this.currentState)||(this.renderBatch(this.currentState,b,c),c=f,b=0,this.currentState.shader=a.shader,this.currentState.shaderData=a.shaderData,this.currentState.texture=
a.texture,this.currentState.textureSmooth=a.textureSmooth,this.currentState.blendMode=a.blendMode,this.currentState.colorTransform=a.colorTransform);b++}this.renderBatch(this.currentState,b,c);this.writtenVertexBytes=this.batchedSprites=0;null!=this.clipRect&&this.gl.disable(this.gl.SCISSOR_TEST)}},renderBatch:function(a,b,c){if(0!=b&&null!=a.texture){var d;d=null==a.shader?this.renderSession.shaderManager.defaultShader:a.shader;this.renderSession.shaderManager.setShader(d);d.bindVertexArray(this.vertexArray);
this.renderSession.blendModeManager.setBlendMode(null!=d.blendMode?d.blendMode:a.blendMode);this.gl.uniformMatrix3fv(d.getUniformLocation("openfl_uProjectionMatrix"),!1,this.renderSession.projectionMatrix.toArray(!0));if(null!=a.colorTransform){this.gl.uniform1i(d.getUniformLocation("openfl_uUseColorTransform"),1);var e=a.colorTransform;this.gl.uniform4f(d.getUniformLocation("openfl_uColorMultiplier"),e.redMultiplier,e.greenMultiplier,e.blueMultiplier,a.skipColorTransformAlpha?1:e.alphaMultiplier);
this.gl.uniform4f(d.getUniformLocation("openfl_uColorOffset"),e.redOffset/255,e.greenOffset/255,e.blueOffset/255,e.alphaOffset/255)}else this.gl.uniform1i(d.getUniformLocation("openfl_uUseColorTransform"),0),this.gl.uniform4f(d.getUniformLocation("openfl_uColorMultiplier"),1,1,1,1),this.gl.uniform4f(d.getUniformLocation("openfl_uColorOffset"),0,0,0,0);this.gl.activeTexture(this.gl.TEXTURE0);this.gl.bindTexture(this.gl.TEXTURE_2D,a.texture);this.gl.uniform1i(d.getUniformLocation("openfl_uSampler0"),
0);null!=d.smooth&&d.smooth||a.textureSmooth?(this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR)):(this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.NEAREST),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.NEAREST));this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,d.wrapS);this.gl.texParameteri(this.gl.TEXTURE_2D,
this.gl.TEXTURE_WRAP_T,d.wrapT);d.applyData(a.shaderData,this.renderSession);this.gl.drawElements(this.gl.TRIANGLES,6*b,this.gl.UNSIGNED_SHORT,12*c);this.renderSession.drawCount++}},setState:function(a,b,c,d,e,f,g){null==g&&(g=!1);null==c&&(c=!1);var h=this.states[a];null==h&&(h=this.states[a]=new Ri);h.texture=b;h.textureSmooth=c;h.blendMode=d;null!=e&&e.__isDefault()?h.colorTransform=null:h.colorTransform=e;h.skipColorTransformAlpha=g;null==f?(h.shader=null,h.shaderData=null):(h.shader=f.__shader,
h.shaderData=f.data)},setContext:function(a){this.gl=a;this.vertexArray.setContext(a,this.positions);this.indexBuffer=a.createBuffer();a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.indexBuffer);a.bufferData(a.ELEMENT_ARRAY_BUFFER,this.indices,a.STATIC_DRAW)},prepareShader:function(a,b){if(null!=a){a.__init(this.gl);a.__shader.wrapS=a.repeatX;a.__shader.wrapT=a.repeatY;a.__shader.smooth=a.smooth;a.__shader.blendMode=a.blendMode;var c=a.data.get(ta.uObjectSize),d=a.data.get(ta.uTextureSize);null!=b?(c.value[0]=
b.width,c.value[1]=b.height,null!=b.__pingPongTexture?(d.value[0]=b.__pingPongTexture.get_renderTexture().__width,d.value[1]=b.__pingPongTexture.get_renderTexture().__height):(d.value[0]=b.width,d.value[1]=b.height)):(c.value[0]=0,c.value[1]=0,d.value[0]=0,d.value[1]=0)}},getElementsPerVertex:function(){for(var a=0,b=0,c=this.attributes;b<c.length;){var d=c[b];++b;d.enabled&&(a+=Math.floor(d.components*d.getElementsBytes()/4))}return a},__class__:tk};var Ri=function(){this.skipColorTransformAlpha=
!1;this.textureSmooth=!0};g["openfl._internal.renderer.opengl.utils._SpriteBatch.State"]=Ri;Ri.__name__="openfl _internal renderer opengl utils _SpriteBatch State".split(" ");Ri.prototype={texture:null,textureSmooth:null,blendMode:null,colorTransform:null,skipColorTransformAlpha:null,shader:null,shaderData:null,equals:function(a){return(null==this.shader&&null==a.shader||null!=this.shader&&null!=a.shader&&this.shader.ID==a.shader.ID)&&this.texture==a.texture&&this.textureSmooth==a.textureSmooth&&
this.blendMode==a.blendMode&&(null==this.colorTransform&&null==a.colorTransform||null!=this.colorTransform&&null!=a.colorTransform&&this.colorTransform.__equals(a.colorTransform,this.skipColorTransformAlpha))},__class__:Ri};var vk=function(a){this.stencilMask=0;this.stencilStack=[];this.setContext(a);this.reverse=!0;this.count=0};g["openfl._internal.renderer.opengl.utils.StencilManager"]=vk;vk.__name__="openfl _internal renderer opengl utils StencilManager".split(" ");vk.prototype={count:null,gl:null,
reverse:null,stencilStack:null,stencilMask:null,prepareGraphics:function(a,b,c){var d=b.shaderManager.fillShader;b.shaderManager.setShader(d);this.gl.uniformMatrix3fv(d.getUniformLocation("openfl_uTranslationMatrix"),!1,c);this.gl.uniformMatrix3fv(d.getUniformLocation("openfl_uProjectionMatrix"),!1,b.projectionMatrix.toArray(!0));a.vertexArray.bind();d.bindVertexArray(a.vertexArray);this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,a.indexBuffer)},pushBucket:function(a,b,c,d){null==d&&(d=!1);d||(this.gl.enable(this.gl.STENCIL_TEST),
this.gl.clear(this.gl.STENCIL_BUFFER_BIT),this.gl.stencilMask(255),this.gl.colorMask(!1,!1,!1,!1),this.gl.stencilFunc(this.gl.NEVER,1,255),this.gl.stencilOp(this.gl.INVERT,this.gl.KEEP,this.gl.KEEP),this.gl.clear(this.gl.STENCIL_BUFFER_BIT));var e=0;for(a=a.fills;e<a.length;){var f=a[e];++e;f.available||(this.prepareGraphics(f,b,c),this.gl.drawElements(f.drawMode,f.glIndices.length,this.gl.UNSIGNED_SHORT,0))}d||(this.gl.colorMask(!0,!0,!0,b.renderer.transparent),this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,
this.gl.KEEP),this.gl.stencilFunc(this.gl.EQUAL,255,255))},popBucket:function(a,b,c){this.gl.disable(this.gl.STENCIL_TEST)},pushMask:function(a,b){var c=a.__maskGraphics;if(!(null==c||0>=c.__commands.get_length())){0==this.stencilMask&&(this.gl.enable(this.gl.STENCIL_TEST),this.gl.clear(this.gl.STENCIL_BUFFER_BIT));this.stencilMask++;c.__dirty&&N.updateGraphics(a,c,b.gl);var d;d=1==this.stencilMask?this.gl.NEVER:this.gl.EQUAL;var e=this.stencilMask,f=255-this.stencilMask;this.gl.stencilMask(255);
this.gl.colorMask(!1,!1,!1,!1);this.gl.stencilFunc(d,e,f);this.gl.stencilOp(this.gl.REPLACE,this.gl.KEEP,this.gl.KEEP);var c=c.__glStack[Hb.glContextId],g=a.__worldTransform;d=0;for(e=c.buckets.length;d<e;)switch(f=d++,f=c.buckets[f],g=null!=f.overrideMatrix?f.overrideMatrix:a.__worldTransform,f.mode[1]){case 1:case 2:this.pushBucket(f,b,g.toArray(!0),!0)}this.gl.colorMask(!0,!0,!0,b.renderer.transparent);this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.KEEP);this.gl.stencilFunc(this.gl.EQUAL,
this.stencilMask,255)}},popMask:function(a,b){this.stencilMask--;0>=this.stencilMask&&(this.gl.disable(this.gl.STENCIL_TEST),this.stencilMask=0)},setContext:function(a){this.gl=a},__class__:vk};var Oi=function(a,b,c){null==c&&(c=!1);null==b&&(b=0);this.isStatic=!1;this.size=0;this.attributes=[];this.size=b;this.attributes=a;0<b&&(this.buffer=new Ej(b));this.isStatic=c};g["openfl._internal.renderer.opengl.utils.VertexArray"]=Oi;Oi.__name__="openfl _internal renderer opengl utils VertexArray".split(" ");
Oi.prototype={gl:null,glBuffer:null,attributes:null,buffer:null,size:null,isStatic:null,bind:function(){this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.glBuffer)},upload:function(a){this.gl.bufferSubData(this.gl.ARRAY_BUFFER,0,a)},setContext:function(a,b){this.gl=a;this.glBuffer=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,this.glBuffer);a.bufferData(a.ARRAY_BUFFER,b,this.isStatic?a.STATIC_DRAW:a.DYNAMIC_DRAW)},get_stride:function(){for(var a=0,b=0,c=this.attributes;b<c.length;){var d=c[b];++b;d.enabled&&
(a+=4*Math.floor(d.components*d.getElementsBytes()/4))}return a},__class__:Oi,__properties__:{get_stride:"get_stride"}};var Pa=function(a){this.textField=a;this.height=this.width=100;this.text="";this.bounds=new ha(0,0,0,0);this.type=Ic.DYNAMIC;this.autoSize=ia.NONE;this.embedFonts=this.displayAsPassword=!1;this.selectable=!0;this.borderColor=0;this.border=!1;this.backgroundColor=16777215;this.background=!1;this.gridFitType=gc.PIXEL;this.maxChars=0;this.multiline=!1;this.scrollH=this.sharpness=0;
this.scrollV=1;this.wordWrap=!1;this.lineAscents=[];this.lineBreaks=[];this.lineDescents=[];this.lineLeadings=[];this.lineHeights=[];this.lineWidths=[];this.layoutGroups=[];this.textFormatRanges=[];Pa.__canvas=window.document.createElement("canvas");Pa.__context=Pa.__canvas.getContext("2d")};g["openfl._internal.text.TextEngine"]=Pa;Pa.__name__=["openfl","_internal","text","TextEngine"];Pa.__canvas=null;Pa.__context=null;Pa.getFont=function(a){var b;b=a.italic?"italic ":"normal ";b+="normal ";b=a.bold?
b+"bold ":b+"normal ";b+=a.size+"px";b+="/"+(a.size+a.leading+6)+"px ";switch(a.font){case "_sans":a="sans-serif";break;case "_serif":a="serif";break;case "_typewriter":a="monospace";break;default:a="'"+a.font+"'"}return b+=""+a};Pa.prototype={antiAliasType:null,autoSize:null,background:null,backgroundColor:null,border:null,borderColor:null,bottomScrollV:null,bounds:null,displayAsPassword:null,embedFonts:null,gridFitType:null,height:null,layoutGroups:null,lineAscents:null,lineBreaks:null,lineDescents:null,
lineLeadings:null,lineHeights:null,lineWidths:null,maxChars:null,maxScrollH:null,maxScrollV:null,multiline:null,numLines:null,scrollH:null,scrollV:null,selectable:null,sharpness:null,text:null,textHeight:null,textFormatRanges:null,textWidth:null,type:null,width:null,wordWrap:null,textField:null,__hasFocus:null,getBounds:function(){var a;a=this.border?1:0;this.bounds.width=this.width+a;this.bounds.height=this.height+a},getLineMeasurements:function(){this.lineAscents.splice(0,this.lineAscents.length);
this.lineDescents.splice(0,this.lineDescents.length);this.lineLeadings.splice(0,this.lineLeadings.length);this.lineHeights.splice(0,this.lineHeights.length);this.lineWidths.splice(0,this.lineWidths.length);var a=0,b=0,c=null,d=0,e=0;this.textHeight=this.textWidth=0;this.numLines=1;for(var f=this.maxScrollH=this.bottomScrollV=0,g=this.layoutGroups;f<g.length;){var h=g[f];for(++f;h.lineIndex>this.numLines-1;)this.lineAscents.push(a),this.lineDescents.push(b),this.lineLeadings.push(null!=c?c:0),this.lineHeights.push(d),
this.lineWidths.push(e),b=a=0,c=null,e=d=0,this.numLines++,this.textHeight<=this.height-2&&this.bottomScrollV++;a=Math.max(a,h.ascent);b=Math.max(b,h.descent);c=null==c?h.leading:K["int"](Math.max(c,h.leading));d=Math.max(d,h.height);e=h.offsetX-2+h.width;e>this.textWidth&&(this.textWidth=e);this.textHeight=h.offsetY-2+h.ascent+h.descent}this.lineAscents.push(a);this.lineDescents.push(b);this.lineLeadings.push(null!=c?c:0);this.lineHeights.push(d);this.lineWidths.push(e);1==this.numLines?(this.bottomScrollV=
1,0<c&&(this.textHeight+=c)):this.textHeight<=this.height-2&&this.bottomScrollV++;this.maxScrollH=this.textWidth>this.width-4?this.textWidth-this.width+4|0:0;this.maxScrollV=this.numLines-this.bottomScrollV+1},getLayoutGroups:function(){this.layoutGroups.splice(0,this.layoutGroups.length);var a=-1,b=null,c=Ma.__defaultTextFormat.clone(),d=0,e=0,f=0,g,h,k,l=0,m=0,q=0,p=this.text.indexOf(" "),r=this.text.indexOf("\n"),t=0,u=2,v=2,x=0,y=0,z=null;a<this.textFormatRanges.length-1&&(a++,b=this.textFormatRanges[a],
c.__merge(b.format),Pa.__context.font=Pa.getFont(c),e=c.size,f=.185*c.size,d=c.leading,l=e+f+d,-1<p&&(m=Pa.__context.measureText(" ").width));for(var z=b.format,A;x<this.text.length;)if(-1<r&&(-1==p||r<p)&&b.end>=r){g=new mf(b.format,x,r);h=this.text;for(A=[];x<r;)k=x++,A.push(Pa.__context.measureText(h.charAt(k)).width);g.advances=A;g.offsetX=u;g.ascent=e;g.descent=f;g.leading=d;g.lineIndex=y;g.offsetY=v;u=g.advances;for(h=x=0;h<u.length;)A=u[h],++h,x+=A;g.width=x;g.height=l;this.layoutGroups.push(g);
v+=l;u=2;this.wordWrap&&g.offsetX+g.width>this.width-2&&(g.offsetY=v,g.offsetX=u,v+=l,y++);x=r+1;r=this.text.indexOf("\n",x);y++;b.end==r&&(a<this.textFormatRanges.length-1&&(a++,b=this.textFormatRanges[a],c.__merge(b.format),Pa.__context.font=Pa.getFont(c),e=c.size,f=.185*c.size,d=c.leading,l=e+f+d,-1<p&&(m=Pa.__context.measureText(" ").width)),z=b.format)}else if(b.end>=p&&-1<p)for(g=null,A=!1;;){-1==p&&(p=b.end);h=this.text;k=[];for(var B=x;B<p;){var C=B++;k.push(Pa.__context.measureText(h.charAt(C)).width)}h=
k;for(B=k=0;B<h.length;)C=h[B],++B,k+=C;this.wordWrap&&u+k>this.width-2&&(A=!0);if(A){v+=l;u=this.layoutGroups.length-1;for(t=0;;){g=this.layoutGroups[u];if(0<u&&g.startIndex>q)t++;else break;u--}y++;u=2;if(0<t)for(q=this.layoutGroups[this.layoutGroups.length-t].offsetX,t=this.layoutGroups.length-t,A=this.layoutGroups.length;t<A;)g=t++,g=this.layoutGroups[g],g.offsetX-=q,g.offsetY=v,g.lineIndex=y,u+=g.width;g=new mf(b.format,x,p);g.advances=h;g.offsetX=u;g.ascent=e;g.descent=f;g.leading=d;g.lineIndex=
y;g.offsetY=v;g.width=k;g.height=l;this.layoutGroups.push(g);u=k+m;t=m;A=!1}else null!=g&&x==p?(b.format.align!=T.JUSTIFY&&(g.endIndex=p),g.advances.push(m),t+=m):(null==g||z.align==T.JUSTIFY?(g=new mf(b.format,x,p),g.advances=h,g.offsetX=u,g.ascent=e,g.descent=f,g.leading=d,g.lineIndex=y,g.offsetY=v,g.width=k,g.height=l,this.layoutGroups.push(g)):(g.endIndex=p,g.advances=g.advances.concat(h),g.width+=t+k),g.advances.push(m),t=m),u+=k+m;x=p+1;q=p;p=this.text.indexOf(" ",q+1);b.end<=q&&(g=null,a<this.textFormatRanges.length-
1&&(a++,b=this.textFormatRanges[a],c.__merge(b.format),Pa.__context.font=Pa.getFont(c),e=c.size,f=.185*c.size,d=c.leading,l=e+f+d,-1<p&&(m=Pa.__context.measureText(" ").width)));if(p>r&&-1<r||x>this.text.length||p>b.end||-1==p&&-1<r)break}else{if(x>=b.end)break;g=new mf(b.format,x,b.end);h=this.text;for(A=[];x<b.end;)k=x++,A.push(Pa.__context.measureText(h.charAt(k)).width);g.advances=A;g.offsetX=u;g.ascent=e;g.descent=f;g.leading=d;g.lineIndex=y;g.offsetY=v;x=g.advances;for(A=h=0;A<x.length;)k=x[A],
++A,h+=k;g.width=h;g.height=l;this.layoutGroups.push(g);u+=g.width;x=b.end;a<this.textFormatRanges.length-1&&(a++,b=this.textFormatRanges[a],c.__merge(b.format),Pa.__context.font=Pa.getFont(c),e=c.size,f=.185*c.size,d=c.leading,l=e+f+d,-1<p&&(m=Pa.__context.measureText(" ").width))}},setTextAlignment:function(){for(var a=-1,b=0,c,d,e=0,f=this.layoutGroups.length;e<f;){var g=e++;c=this.layoutGroups[g];if(c.lineIndex!=a)switch(a=c.lineIndex,c.format.align[1]){case 3:b=this.lineWidths[a]<this.width-
4?Math.round((this.width-4-this.lineWidths[a])/2):0;break;case 1:b=this.lineWidths[a]<this.width-4?Math.round(this.width-4-this.lineWidths[a]):0;break;case 2:if(this.lineWidths[a]<this.width-4){d=1;for(var b=g+1,h=this.layoutGroups.length;b<h;){var k=b++;if(this.layoutGroups[k].lineIndex==a)d++;else break}if(1<d&&(c=this.layoutGroups[g+d-1],c.endIndex<this.text.length&&"\n"!=this.text.charAt(c.endIndex)))for(b=(this.width-4-this.lineWidths[a])/(d-1),h=1;h<d;)k=h++,this.layoutGroups[g+k].offsetX+=
b*k}b=0;break;default:b=0}0<b&&(c.offsetX+=b)}},update:function(){null==this.text||""==P.trim(this.text)||0==this.textFormatRanges.length?(this.lineAscents.splice(0,this.lineAscents.length),this.lineBreaks.splice(0,this.lineBreaks.length),this.lineDescents.splice(0,this.lineDescents.length),this.lineLeadings.splice(0,this.lineLeadings.length),this.lineHeights.splice(0,this.lineHeights.length),this.lineWidths.splice(0,this.lineWidths.length),this.layoutGroups.splice(0,this.layoutGroups.length),this.textHeight=
this.textWidth=0,this.numLines=1,this.maxScrollH=0,this.bottomScrollV=this.maxScrollV=1):(this.getLayoutGroups(),this.getLineMeasurements(),this.setTextAlignment());this.getBounds()},__class__:Pa};var gf=function(a,b,c){this.format=a;this.start=b;this.end=c};g["openfl._internal.text.TextFormatRange"]=gf;gf.__name__=["openfl","_internal","text","TextFormatRange"];gf.prototype={end:null,format:null,start:null,__class__:gf};var mf=function(a,b,c){this.format=a;this.startIndex=b;this.endIndex=c};g["openfl._internal.text.TextLayoutGroup"]=
mf;mf.__name__=["openfl","_internal","text","TextLayoutGroup"];mf.prototype={advances:null,ascent:null,descent:null,endIndex:null,format:null,height:null,leading:null,lineIndex:null,offsetX:null,offsetY:null,startIndex:null,width:null,__class__:mf};var qg=function(){ec.call(this);null==ja.application&&(ja.application=this)};g["openfl.display.Application"]=qg;qg.__name__=["openfl","display","Application"];qg.__super__=ec;qg.prototype=t(ec.prototype,{create:function(a){this.config=a;this.backend.create(a);
if(null!=a){Object.prototype.hasOwnProperty.call(a,"fps")&&this.backend.setFrameRate(a.fps);if(Object.prototype.hasOwnProperty.call(a,"windows"))for(a=a.windows;0<a.length;){a=new Si(a[0]);this.createWindow(a);break}if(null==this.preloader||this.preloader.complete)this.onPreloadComplete()}},__class__:qg});var Q=function(a,b,c){null==c&&(c=!1);W.call(this);this.bitmapData=a;this.pixelSnapping=b;this.smoothing=c;null==b&&(this.pixelSnapping=$a.AUTO)};g["openfl.display.Bitmap"]=Q;Q.__name__=["openfl",
"display","Bitmap"];Q.__super__=W;Q.prototype=t(W.prototype,{bitmapData:null,pixelSnapping:null,smoothing:null,__image:null,__getBounds:function(a,b){if(null!=this.bitmapData){var c=ha.__temp;c.setTo(0,0,this.bitmapData.width,this.bitmapData.height);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height)}},__hitTest:function(a,b,c,d,e){if(!this.get_visible()||this.__isMask||null==this.bitmapData||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b))return!1;this.__getWorldTransform();c=this.__worldTransform.__transformInverseX(a,
b);a=this.__worldTransform.__transformInverseY(a,b);return 0<c&&0<a&&c<=this.bitmapData.width&&a<=this.bitmapData.height?(null==d||e||d.push(this),!0):!1},__hitTestMask:function(a,b){if(null==this.bitmapData)return!1;this.__getWorldTransform();var c=this.__worldTransform.__transformInverseX(a,b),d=this.__worldTransform.__transformInverseY(a,b);return 0<c&&0<d&&c<=this.bitmapData.width&&d<=this.bitmapData.height?!0:!1},__renderCairo:function(a){gl.render(this,a)},__renderCairoMask:function(a){a.cairo.rectangle(0,
0,this.get_width(),this.get_height())},__renderCanvas:function(a){hl.render(this,a)},__renderCanvasMask:function(a){a.context.rect(0,0,this.get_width(),this.get_height())},__renderDOM:function(a){null!=this.stage&&this.__worldVisible&&this.__renderable&&null!=this.bitmapData&&this.bitmapData.__isValid?null!=this.bitmapData.image.buffer.__srcImage?Hi.renderImage(this,a):Hi.renderCanvas(this,a):(null!=this.__image&&(a.element.removeChild(this.__image),this.__style=this.__image=null),null!=this.__canvas&&
(a.element.removeChild(this.__canvas),this.__style=this.__canvas=null))},__renderGL:function(a){this.__cacheAsBitmap?this.__cacheGL(a):(null!=this.__scrollRect&&a.maskManager.pushRect(this.__scrollRect,this.__renderTransform),null!=this.__mask&&null!=this.__maskGraphics&&0<this.__maskGraphics.__commands.get_length()&&a.maskManager.pushMask(this),!this.__renderable||0>=this.__worldAlpha||null==this.bitmapData||!this.bitmapData.__isValid?null:a.spriteBatch.renderBitmapData(this.bitmapData,this.smoothing,
this.__renderTransform,this.__worldColorTransform,this.__worldAlpha,this.__blendMode,this.__shader,this.pixelSnapping),null!=this.__mask&&null!=this.__maskGraphics&&0<this.__maskGraphics.__commands.get_length()&&a.maskManager.popMask(),null!=this.__scrollRect&&a.maskManager.popRect())},__updateMask:function(a){a.__commands.overrideMatrix(this.__worldTransform);a.beginFill(0);a.drawRect(0,0,this.bitmapData.width,this.bitmapData.height);null==a.__bounds&&(a.__bounds=new ha);this.__getBounds(a.__bounds,
ra.__identity);W.prototype.__updateMask.call(this,a)},get_height:function(){return null!=this.bitmapData?this.bitmapData.height*this.get_scaleY():0},set_height:function(a){return null!=this.bitmapData?(a!=this.bitmapData.height&&this.set_scaleY(a/this.bitmapData.height),a):0},get_width:function(){return null!=this.bitmapData?this.bitmapData.width*this.get_scaleX():0},set_width:function(a){return null!=this.bitmapData?(a!=this.bitmapData.width&&this.set_scaleX(a/this.bitmapData.width),a):0},__class__:Q});
var Ra=function(a,b,c,d){null==d&&(d=-1);null==c&&(c=!0);this.__usingPingPongTexture=!1;this.transparent=c;null==a&&(a=0);null==b&&(b=0);0>a&&(a=0);0>b&&(b=0);this.width=a;this.height=b;this.rect=new ha(0,0,a,b);0<a&&0<b&&(c?0==(d&-16777216)&&(d=0):d=-16777216|d&16777215,this.image=new bc(null,0,0,a,b,d<<8|d>>24&255),this.image.set_transparent(c),this.__isValid=!0);this.__createUVs();this.__worldTransform=new ra;this.__worldColorTransform=new Cc};g["openfl.display.BitmapData"]=Ra;Ra.__name__=["openfl",
"display","BitmapData"];Ra.__interfaces__=[ug];Ra.fromCanvas=function(a,b){null==b&&(b=!0);if(null==a)return null;var c=new Ra(0,0,b);c.__fromImage(bc.fromCanvas(a));c.image.set_transparent(b);return c};Ra.fromFile=function(a,b,c){var d=new Ra(0,0,!0);d.__fromFile(a,b,c);return d};Ra.fromImage=function(a,b){null==b&&(b=!0);if(null==a||null==a.buffer)return null;var c=new Ra(0,0,b);c.__fromImage(a);c.image.set_transparent(b);return c};Ra.__asRenderTexture=function(a,b){null==b&&(b=0);null==a&&(a=0);
var c=new Ra(0,0);c.__resize(a,b);return c};Ra.prototype={height:null,image:null,rect:null,transparent:null,width:null,__worldTransform:null,__worldColorTransform:null,__cacheAsBitmap:null,__blendMode:null,__shader:null,__isValid:null,__surface:null,__texture:null,__pingPongTexture:null,__usingPingPongTexture:null,__uvData:null,applyFilter:function(a,b,c,d){this.__isValid&&null!=a&&a.__isValid&&(U.convertToCanvas(this.image),U.createImageData(this.image),U.convertToCanvas(a.image),U.createImageData(a.image),
d.__applyFilter(this.image.buffer.__srcImageData,a.image.buffer.__srcImageData,b,c),this.image.dirty=!0)},clone:function(){return this.__isValid?Ra.fromImage(this.image.clone(),this.transparent):new Ra(this.width,this.height,this.transparent)},colorTransform:function(a,b){this.__isValid&&(this.image.colorTransform(a.__toLimeRectangle(),b.__toLimeColorMatrix()),this.__usingPingPongTexture=!1)},copyPixels:function(a,b,c,d,e,f){null==f&&(f=!1);this.__isValid&&null!=a&&(this.image.copyPixels(a.image,
b.__toLimeRectangle(),c.__toLimeVector2(),null!=d?d.image:null,null!=e?e.__toLimeVector2():null,f),this.__usingPingPongTexture=!1)},dispose:function(){this.image=null;this.height=this.width=0;this.rect=null;this.__isValid=!1;if(null!=this.__texture){var a=ja.current.stage.__renderer;null!=a&&(a=a.renderSession.gl,null!=a&&(a.deleteTexture(this.__texture),this.__texture=null))}null!=this.__pingPongTexture&&(this.__pingPongTexture.destroy(),this.__pingPongTexture=null)},draw:function(a,b,c,d,e,f){null==
f&&(f=!1);if(this.__isValid){null!=c&&(d=new Ra(G.getProperty(a,"width"),G.getProperty(a,"height"),!0,0),d.draw(a),d.colorTransform(d.rect,c),a=d);U.convertToCanvas(this.image);U.sync(this.image,!0);c=this.image.buffer;d=new me;d.context=c.__srcContext;d.roundPixels=!0;d.maskManager=new kg(d);f||(c.__srcContext.mozImageSmoothingEnabled=!1,c.__srcContext.msImageSmoothingEnabled=!1,c.__srcContext.imageSmoothingEnabled=!1);null!=e&&d.maskManager.pushRect(e,new ra);var g=a.__worldTransform;a.__updateTransforms(null!=
b?b:new ra);a.__updateChildren(!1);a.__renderCanvas(d);a.__updateTransforms(g);a.__updateChildren(!0);f||(c.__srcContext.mozImageSmoothingEnabled=!0,c.__srcContext.msImageSmoothingEnabled=!0,c.__srcContext.imageSmoothingEnabled=!0);null!=e&&d.maskManager.popMask();c.__srcContext.setTransform(1,0,0,1,0,0);c.__srcImageData=null;c.data=null}},getSurface:function(){if(!this.__isValid)return null;null==this.__surface&&(this.__surface=$k.fromImage(this.image));return this.__surface},getTexture:function(a){if(!this.__isValid)return null;
if(this.__usingPingPongTexture&&null!=this.__pingPongTexture)return this.__pingPongTexture.get_texture();null==this.__texture&&(this.__texture=a.createTexture(),a.bindTexture(a.TEXTURE_2D,this.__texture),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.NEAREST),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.NEAREST),this.image.dirty=!0);if(null!=this.image&&this.image.dirty){var b,
c;null!=this.__surface&&al.flush(this.__surface);c=1==this.image.buffer.bitsPerPixel?b=a.ALPHA:b=a.RGBA;a.bindTexture(a.TEXTURE_2D,this.__texture);var d=this.image;if(!d.get_premultiplied()&&d.get_transparent()||0!=d.get_format())d=d.clone(),d.set_format(0),d.set_premultiplied(!0);a.texImage2D(a.TEXTURE_2D,0,b,this.width,this.height,0,c,a.UNSIGNED_BYTE,d.get_data());a.bindTexture(a.TEXTURE_2D,null);this.image.dirty=!1}return this.__texture},setPixels:function(a,b){this.__isValid&&null!=a&&(this.image.setPixels(a.__toLimeRectangle(),
b,1),this.__usingPingPongTexture=!1)},__createUVs:function(a,b,c,d,e,f,g,h){null==h&&(h=1);null==g&&(g=0);null==f&&(f=1);null==e&&(e=1);null==d&&(d=0);null==c&&(c=1);null==b&&(b=0);null==a&&(a=0);null==this.__uvData&&(this.__uvData=new Qi);this.__uvData.x0=a;this.__uvData.y0=b;this.__uvData.x1=c;this.__uvData.y1=d;this.__uvData.x2=e;this.__uvData.y2=f;this.__uvData.x3=g;this.__uvData.y3=h},__drawGL:function(a,b,c,d,e,f,g,h,k,l,m){null==m&&(m=!0);null==l&&(l=!1);null==k&&(k=!1);null==h&&(h=!1);null==
g&&(g=!1);this.__pingPongTexture=ub.pushFramebuffer(a,this.__pingPongTexture,this.rect,g,this.transparent,k,m);ub.drawBitmapDrawable(a,h?this:null,b,c,d,e,f);ub.popFramebuffer(a,l?this.image:null);a=this.__pingPongTexture.get_renderTexture().__uvData;this.__createUVs(a.x0,a.y0,a.x1,a.y1,a.x2,a.y2,a.x3,a.y3);this.__usingPingPongTexture=this.__isValid=!0},__fromFile:function(a,b,c){var d=this;bc.fromFile(a,function(a){d.__fromImage(a);null!=b&&b(d)},c)},__fromImage:function(a){null!=a&&null!=a.buffer&&
(this.image=a,this.width=a.width,this.height=a.height,this.rect=new ha(0,0,a.width,a.height),this.__isValid=!0)},__renderCanvas:function(a){if(this.__isValid){U.sync(this.image,!1);var b=a.context;null==this.__worldTransform&&(this.__worldTransform=new ra);b.globalAlpha=1;var c=this.__worldTransform;a.roundPixels?b.setTransform(c.a,c.b,c.c,c.d,c.tx|0,c.ty|0):b.setTransform(c.a,c.b,c.c,c.d,c.tx,c.ty);b.drawImage(this.image.get_src(),0,0)}},__renderGL:function(a){a.spriteBatch.renderBitmapData(this,
!1,this.__worldTransform,this.__worldColorTransform,this.__worldColorTransform.alphaMultiplier,this.__blendMode,this.__shader)},__updateTransforms:function(a){null==a?this.__worldTransform.identity():this.__worldTransform=a},__sync:function(){U.sync(this.image,!1)},__updateChildren:function(a){},__resize:function(a,b){this.width=a;this.height=b;this.rect.width=a;this.rect.height=b},__class__:Ra};var Qi=function(){this.x0=this.x1=this.x2=this.x3=this.y0=this.y1=this.y2=this.y3=0};g["openfl.display.TextureUvs"]=
Qi;Qi.__name__=["openfl","display","TextureUvs"];Qi.prototype={x0:null,x1:null,x2:null,x3:null,y0:null,y1:null,y2:null,y3:null,__class__:Qi};var S=g["openfl.display.BlendMode"]={__ename__:!0,__constructs__:"ADD ALPHA DARKEN DIFFERENCE ERASE HARDLIGHT INVERT LAYER LIGHTEN MULTIPLY NORMAL OVERLAY SCREEN SUBTRACT".split(" ")};S.ADD=["ADD",0];S.ADD.toString=u;S.ADD.__enum__=S;S.ALPHA=["ALPHA",1];S.ALPHA.toString=u;S.ALPHA.__enum__=S;S.DARKEN=["DARKEN",2];S.DARKEN.toString=u;S.DARKEN.__enum__=S;S.DIFFERENCE=
["DIFFERENCE",3];S.DIFFERENCE.toString=u;S.DIFFERENCE.__enum__=S;S.ERASE=["ERASE",4];S.ERASE.toString=u;S.ERASE.__enum__=S;S.HARDLIGHT=["HARDLIGHT",5];S.HARDLIGHT.toString=u;S.HARDLIGHT.__enum__=S;S.INVERT=["INVERT",6];S.INVERT.toString=u;S.INVERT.__enum__=S;S.LAYER=["LAYER",7];S.LAYER.toString=u;S.LAYER.__enum__=S;S.LIGHTEN=["LIGHTEN",8];S.LIGHTEN.toString=u;S.LIGHTEN.__enum__=S;S.MULTIPLY=["MULTIPLY",9];S.MULTIPLY.toString=u;S.MULTIPLY.__enum__=S;S.NORMAL=["NORMAL",10];S.NORMAL.toString=u;S.NORMAL.__enum__=
S;S.OVERLAY=["OVERLAY",11];S.OVERLAY.toString=u;S.OVERLAY.__enum__=S;S.SCREEN=["SCREEN",12];S.SCREEN.toString=u;S.SCREEN.__enum__=S;S.SUBTRACT=["SUBTRACT",13];S.SUBTRACT.toString=u;S.SUBTRACT.__enum__=S;var Ac=g["openfl.display.CapsStyle"]={__ename__:!0,__constructs__:["NONE","ROUND","SQUARE"]};Ac.NONE=["NONE",0];Ac.NONE.toString=u;Ac.NONE.__enum__=Ac;Ac.ROUND=["ROUND",1];Ac.ROUND.toString=u;Ac.ROUND.__enum__=Ac;Ac.SQUARE=["SQUARE",2];Ac.SQUARE.toString=u;Ac.SQUARE.__enum__=Ac;var Ak=function(){};
g["openfl.display.FrameLabel"]=Ak;Ak.__name__=["openfl","display","FrameLabel"];Ak.__super__=ba;Ak.prototype=t(ba.prototype,{__class__:Ak});var nf=g["openfl.display.GradientType"]={__ename__:!0,__constructs__:["RADIAL","LINEAR"]};nf.RADIAL=["RADIAL",0];nf.RADIAL.toString=u;nf.RADIAL.__enum__=nf;nf.LINEAR=["LINEAR",1];nf.LINEAR.toString=u;nf.LINEAR.__enum__=nf;var Nd=function(){this.__glStack=[];this.__dirty=!0;this.__commands=new ig;this.__positionY=this.__positionX=this.__strokePadding=0;this.__hardware=
!0;this.moveTo(0,0)};g["openfl.display.Graphics"]=Nd;Nd.__name__=["openfl","display","Graphics"];Nd.prototype={__hardware:null,__bounds:null,__commands:null,__dirty:null,__glStack:null,__drawPaths:null,__positionX:null,__positionY:null,__strokePadding:null,__transformDirty:null,__visible:null,__owner:null,__canvas:null,__context:null,__bitmap:null,beginFill:function(a,b){null==b&&(b=1);null==a&&(a=0);this.__commands.beginFill(a&16777215,b);0<b&&(this.__visible=!0)},clear:function(){this.__commands.clear();
this.__strokePadding=0;null!=this.__bounds&&(this.set___dirty(!0),this.__transformDirty=!0,this.__bounds=null);this.__visible=!1;this.__hardware=!0;this.moveTo(0,0)},curveTo:function(a,b,c,d){this.__inflateBounds(this.__positionX-this.__strokePadding,this.__positionY-this.__strokePadding);this.__inflateBounds(this.__positionX+this.__strokePadding,this.__positionY+this.__strokePadding);var e,f;e=a<c&&a>this.__positionX||a>c&&a<this.__positionX?c:this.__calculateBezierQuadPoint((this.__positionX-a)/
(this.__positionX-2*a+c),this.__positionX,a,c);f=b<d&&b>this.__positionY||b>d&&b<this.__positionY?d:this.__calculateBezierQuadPoint((this.__positionY-b)/(this.__positionY-2*b+d),this.__positionY,b,d);this.__inflateBounds(e-this.__strokePadding,f-this.__strokePadding);this.__inflateBounds(e+this.__strokePadding,f+this.__strokePadding);this.__positionX=c;this.__positionY=d;this.__commands.curveTo(a,b,c,d);this.__hardware=!1;this.set___dirty(!0)},drawCircle:function(a,b,c){0>=c||(this.__inflateBounds(a-
c-this.__strokePadding,b-c-this.__strokePadding),this.__inflateBounds(a+c+this.__strokePadding,b+c+this.__strokePadding),this.__commands.drawCircle(a,b,c),this.__hardware=!1,this.set___dirty(!0))},drawRect:function(a,b,c,d){0>=c||0>=d||(this.__inflateBounds(a-this.__strokePadding,b-this.__strokePadding),this.__inflateBounds(a+c+this.__strokePadding,b+d+this.__strokePadding),this.__commands.drawRect(a,b,c,d),this.set___dirty(!0))},drawRoundRect:function(a,b,c,d,e,f){null==f&&(f=-1);0>=c||0>=d||(this.__inflateBounds(a-
this.__strokePadding,b-this.__strokePadding),this.__inflateBounds(a+c+this.__strokePadding,b+d+this.__strokePadding),this.__commands.drawRoundRect(a,b,c,d,e,f),this.__hardware=!1,this.set___dirty(!0))},endFill:function(){this.__commands.endFill()},lineStyle:function(a,b,c,d,e,f,g,h){null!=a&&(g==nc.MITER?a>this.__strokePadding&&(this.__strokePadding=a):a/2>this.__strokePadding&&(this.__strokePadding=a/2));this.__commands.lineStyle(a,b,c,d,e,f,g,h);null!=a&&(this.__visible=!0)},lineTo:function(a,b){this.__inflateBounds(this.__positionX-
this.__strokePadding,this.__positionY-this.__strokePadding);this.__inflateBounds(this.__positionX+this.__strokePadding,this.__positionY+this.__strokePadding);this.__positionX=a;this.__positionY=b;this.__inflateBounds(this.__positionX-this.__strokePadding,this.__positionY-this.__strokePadding);this.__inflateBounds(this.__positionX+2*this.__strokePadding,this.__positionY+this.__strokePadding);this.__commands.lineTo(a,b);this.__hardware=!1;this.set___dirty(!0)},moveTo:function(a,b){this.__positionX=
a;this.__positionY=b;this.__commands.moveTo(a,b)},__calculateBezierQuadPoint:function(a,b,c,d){var e=1-a;return e*e*b+2*e*a*c+a*a*d},__getBounds:function(a,b){if(null!=this.__bounds){var c=ha.__temp;this.__bounds.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height)}},__hitTest:function(a,b,c,d){if(null==this.__bounds)return!1;var e=d.__transformInverseX(a,b);a=d.__transformInverseY(a,b);return e>this.__bounds.x&&a>this.__bounds.y&&this.__bounds.contains(e,a)?c?q.hitTest(this,e,a):!0:!1},__inflateBounds:function(a,
b){null==this.__bounds?(this.__bounds=new ha(a,b,0,0),this.__transformDirty=!0):(a<this.__bounds.x&&(this.__bounds.width+=this.__bounds.x-a,this.__bounds.x=a,this.__transformDirty=!0),b<this.__bounds.y&&(this.__bounds.height+=this.__bounds.y-b,this.__bounds.y=b,this.__transformDirty=!0),a>this.__bounds.x+this.__bounds.width&&(this.__bounds.width=a-this.__bounds.x),b>this.__bounds.y+this.__bounds.height&&(this.__bounds.height=b-this.__bounds.y))},set___dirty:function(a){a&&null!=this.__owner&&this.__owner.__setRenderDirty();
return this.__dirty=a},__class__:Nd,__properties__:{set___dirty:"set___dirty"}};var Ld=g["openfl.display.GraphicsPathWinding"]={__ename__:!0,__constructs__:["EVEN_ODD","NON_ZERO"]};Ld.EVEN_ODD=["EVEN_ODD",0];Ld.EVEN_ODD.toString=u;Ld.EVEN_ODD.__enum__=Ld;Ld.NON_ZERO=["NON_ZERO",1];Ld.NON_ZERO.toString=u;Ld.NON_ZERO.__enum__=Ld;var of=g["openfl.display.InterpolationMethod"]={__ename__:!0,__constructs__:["RGB","LINEAR_RGB"]};of.RGB=["RGB",0];of.RGB.toString=u;of.RGB.__enum__=of;of.LINEAR_RGB=["LINEAR_RGB",
1];of.LINEAR_RGB.toString=u;of.LINEAR_RGB.__enum__=of;var nc=g["openfl.display.JointStyle"]={__ename__:!0,__constructs__:["MITER","ROUND","BEVEL"]};nc.MITER=["MITER",0];nc.MITER.toString=u;nc.MITER.__enum__=nc;nc.ROUND=["ROUND",1];nc.ROUND.toString=u;nc.ROUND.__enum__=nc;nc.BEVEL=["BEVEL",2];nc.BEVEL.toString=u;nc.BEVEL.__enum__=nc;var Fb=g["openfl.display.LineScaleMode"]={__ename__:!0,__constructs__:["HORIZONTAL","NONE","NORMAL","VERTICAL"]};Fb.HORIZONTAL=["HORIZONTAL",0];Fb.HORIZONTAL.toString=
u;Fb.HORIZONTAL.__enum__=Fb;Fb.NONE=["NONE",1];Fb.NONE.toString=u;Fb.NONE.__enum__=Fb;Fb.NORMAL=["NORMAL",2];Fb.NORMAL.toString=u;Fb.NORMAL.__enum__=Fb;Fb.VERTICAL=["VERTICAL",3];Fb.VERTICAL.toString=u;Fb.VERTICAL.__enum__=Fb;var Yh=function(){C.call(this);this.contentLoaderInfo=ed.create(this)};g["openfl.display.Loader"]=Yh;Yh.__name__=["openfl","display","Loader"];Yh.__super__=C;Yh.prototype=t(C.prototype,{content:null,contentLoaderInfo:null,load:function(a,b){var c="",d=a.url.split(".");0<d.length&&
(c=d[d.length-1].toLowerCase());-1!=c.indexOf("?")&&(c=c.split("?")[0]);this.contentLoaderInfo.url=a.url;if(null==a.contentType&&""!=a.contentType)switch(c){case "swf":this.contentLoaderInfo.contentType="application/x-shockwave-flash";break;case "jpg":case "jpeg":this.contentLoaderInfo.contentType="image/jpeg";break;case "png":this.contentLoaderInfo.contentType="image/png";break;case "gif":this.contentLoaderInfo.contentType="image/gif";break;default:this.contentLoaderInfo.contentType="application/x-www-form-urlencoded"}else this.contentLoaderInfo.contentType=
a.contentType;var e=new gk;e.doWork.add(function(b){Ra.fromFile(a.url,function(a){e.sendComplete(a)},function(){e.sendError(dc.IO_ERROR)})});e.onError.add(k(this,this.BitmapData_onError));e.onComplete.add(k(this,this.BitmapData_onLoad));e.run()},BitmapData_onLoad:function(a){this.contentLoaderInfo.content=new Q(a);this.content=this.contentLoaderInfo.content;this.addChild(this.contentLoaderInfo.content);a=new v(v.COMPLETE);a.target=this.contentLoaderInfo;a.currentTarget=this.contentLoaderInfo;this.contentLoaderInfo.dispatchEvent(a)},
BitmapData_onError:function(a){a=new dc(dc.IO_ERROR);a.target=this.contentLoaderInfo;a.currentTarget=this.contentLoaderInfo;this.contentLoaderInfo.dispatchEvent(a)},__class__:Yh});var $a=g["openfl.display.PixelSnapping"]={__ename__:!0,__constructs__:["NEVER","AUTO","ALWAYS"]};$a.NEVER=["NEVER",0];$a.NEVER.toString=u;$a.NEVER.__enum__=$a;$a.AUTO=["AUTO",1];$a.AUTO.toString=u;$a.AUTO.__enum__=$a;$a.ALWAYS=["ALWAYS",2];$a.ALWAYS.toString=u;$a.ALWAYS.__enum__=$a;var rg=function(a){eb.call(this);if(null!=
a&&(this.display=a,ja.current.addChild(a),y.__instanceof(a,Mc)))y.__cast(a,Mc).onInit()};g["openfl.display.Preloader"]=rg;rg.__name__=["openfl","display","Preloader"];rg.__super__=eb;rg.prototype=t(eb.prototype,{display:null,load:function(a,b){for(var c=[],d=null,e=0,f=a.length;e<f;){var g=e++,d=a[g];switch(b[g]){case "MUSIC":case "SOUND":d=vc.withoutExtension(d),H.remove(c,d)||this.total++,c.push(d)}}for(e=0;e<c.length;)f=c[e],++e,d=new Fd,d.addEventListener(v.COMPLETE,k(this,this.sound_onComplete)),
d.addEventListener(dc.IO_ERROR,k(this,this.sound_onIOError)),d.load(new be(f+".ogg"));eb.prototype.load.call(this,a,b)},start:function(){null!=this.display&&y.__instanceof(this.display,Mc)?(this.display.addEventListener(v.COMPLETE,k(this,this.display_onComplete)),y.__cast(this.display,Mc).onLoaded()):eb.prototype.start.call(this)},update:function(a,b){if(null!=this.display&&y.__instanceof(this.display,Mc))y.__cast(this.display,Mc).onUpdate(a,b)},display_onComplete:function(a){this.display.removeEventListener(v.COMPLETE,
k(this,this.display_onComplete));ja.current.removeChild(this.display);ja.current.stage.set_focus(null);this.display=null;eb.prototype.start.call(this)},sound_onComplete:function(a){this.loaded++;this.onProgress.dispatch(this.loaded,this.total);this.loaded==this.total&&this.start()},sound_onIOError:function(a){this.loaded++;this.onProgress.dispatch(this.loaded,this.total);this.loaded==this.total&&this.start()},__class__:rg});var ta=function(a){null==a&&(a=1);this.__dirty=!0;this.repeatX=this.repeatY=
33071;this.precision=1;this.precision=a;this.data=new ka;a=new pf("vec2");this.data.set(ta.uObjectSize,a);a=new pf("vec2");this.data.set(ta.uTextureSize,a)};g["openfl.display.Shader"]=ta;ta.__name__=["openfl","display","Shader"];ta.prototype={precision:null,data:null,repeatX:null,repeatY:null,smooth:null,blendMode:null,__dirty:null,__fragmentCode:null,__vertexCode:null,__shader:null,__init:function(a){var b=this.__dirty;b&&(null!=this.__shader&&this.__shader.destroy(),this.__shader=new Ba(a),this.__shader.vertexString=
null!=this.__vertexCode?this.__vertexCode:ne.VERTEX_SRC.join("\n"),this.__shader.fragmentString=this.__fragmentCode,this.__dirty=!1);this.__shader.init(b)},__buildFragmentCode:function(a){var b=[];b.push("#ifdef GL_ES");b.push(function(a){switch(a.precision){case 2:a="precision highp float;";break;case 1:a="precision mediump float;";break;default:a="precision lowp float;"}return a}(this));b.push("#endif");b=b.concat(ta.fragmentHeader);b.push(a);this.__fragmentCode=b.join("\n")},__class__:ta};var pf=
function(a,b){this.internalType=0;this.transpose=!1;this.repeatX=this.repeatY=33071;this.smooth=!1;this.size=this.arraySize=0;this.type=a;this.arraySize=null==b?0:b;this.__init()};g["openfl.display.GLShaderParameter"]=pf;pf.__name__=["openfl","display","GLShaderParameter"];pf.prototype={type:null,size:null,arraySize:null,value:null,bitmap:null,smooth:null,repeatX:null,repeatY:null,transpose:null,internalType:null,__init:function(){var a=this.type;switch(a){case "bool":this.size=this.internalType=
1;if(4==this.internalType)throw new m("This parameter doesn't accept a value, use bitmap instead");this.value=[0];break;case "int":this.size=this.internalType=1;if(4==this.internalType)throw new m("This parameter doesn't accept a value, use bitmap instead");this.value=[0];break;case "float":this.internalType=2;this.size=1;if(4==this.internalType)throw new m("This parameter doesn't accept a value, use bitmap instead");this.value=[0];break;case "sampler2D":if(-1<a.indexOf("vec"))P.startsWith(this.type,
"b")||P.startsWith(this.type,"i")?this.internalType=1:this.internalType=2,this.size=K.parseInt(this.type.charAt(this.type.length-1)),this.set_value(function(a){var c=[],d=0;for(a=a.size;d<a;)d++,c.push(0);return c}(this));else if(-1<a.indexOf("mat")){this.internalType=3;this.size=K.parseInt(this.type.charAt(this.type.length-1));if(4==this.internalType)throw new m("This parameter doesn't accept a value, use bitmap instead");switch(this.size){case 2:this.value=[1,0,1,0];break;case 3:this.value=[1,0,
0,0,1,0,0,0,1];break;case 4:this.value=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];break;default:this.value=[0]}}else this.internalType=4,this.size=0;break;case "samplerCube":if(-1<a.indexOf("vec"))P.startsWith(this.type,"b")||P.startsWith(this.type,"i")?this.internalType=1:this.internalType=2,this.size=K.parseInt(this.type.charAt(this.type.length-1)),this.set_value(function(a){var c=[],d=0;for(a=a.size;d<a;)d++,c.push(0);return c}(this));else if(-1<a.indexOf("mat")){this.internalType=3;this.size=K.parseInt(this.type.charAt(this.type.length-
1));if(4==this.internalType)throw new m("This parameter doesn't accept a value, use bitmap instead");switch(this.size){case 2:this.value=[1,0,1,0];break;case 3:this.value=[1,0,0,0,1,0,0,0,1];break;case 4:this.value=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];break;default:this.value=[0]}}else this.internalType=4,this.size=0;break;default:if(-1<a.indexOf("vec"))P.startsWith(this.type,"b")||P.startsWith(this.type,"i")?this.internalType=1:this.internalType=2,this.size=K.parseInt(this.type.charAt(this.type.length-
1)),this.set_value(function(a){var c=[],d=0;for(a=a.size;d<a;)d++,c.push(0);return c}(this));else if(-1<a.indexOf("mat")){this.internalType=3;this.size=K.parseInt(this.type.charAt(this.type.length-1));if(4==this.internalType)throw new m("This parameter doesn't accept a value, use bitmap instead");switch(this.size){case 2:this.value=[1,0,1,0];break;case 3:this.value=[1,0,0,0,1,0,0,0,1];break;case 4:this.value=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];break;default:this.value=[0]}}else this.internalType=0,
Ia.trace("Can't initialize value for type "+this.type,{fileName:"Shader.hx",lineNumber:307,className:"openfl.display.GLShaderParameter",methodName:"__init"})}},set_value:function(a){if(4==this.internalType)throw new m("This parameter doesn't accept a value, use bitmap instead");return this.value=a},__class__:pf,__properties__:{set_value:"set_value"}};var Da=function(){W.call(this)};g["openfl.display.Shape"]=Da;Da.__name__=["openfl","display","Shape"];Da.__super__=W;Da.prototype=t(W.prototype,{get_graphics:function(){null==
this.__graphics&&(this.__graphics=new Nd,this.__graphics.__owner=this);return this.__graphics},__class__:Da,__properties__:t(W.prototype.__properties__,{get_graphics:"get_graphics"})});var $c=g["openfl.display.SpreadMethod"]={__ename__:!0,__constructs__:["REPEAT","REFLECT","PAD"]};$c.REPEAT=["REPEAT",0];$c.REPEAT.toString=u;$c.REPEAT.__enum__=$c;$c.REFLECT=["REFLECT",1];$c.REFLECT.toString=u;$c.REFLECT.__enum__=$c;$c.PAD=["PAD",2];$c.PAD.toString=u;$c.PAD.__enum__=$c;var ng=function(a,b){Qb.call(this);
this.application=a.application;this.window=a;null==b?(this.__transparent=!0,this.set_color(0)):this.set_color(b);this.set_name(null);this.__deltaTime=0;this.__displayState=Kc.NORMAL;this.__lastClickTime=this.__mouseY=this.__mouseX=0;this.stageWidth=a.__width*a.__scale|0;this.stageHeight=a.__height*a.__scale|0;this.stage=this;this.align=Ca.TOP_LEFT;this.allowsFullScreenInteractive=this.allowsFullScreen=!1;this.quality=Zb.HIGH;this.scaleMode=$b.NO_SCALE;this.stageFocusRect=!0;this.__macKeyboard=/AppleWebKit/.test(navigator.userAgent)&&
/Mobile\/\w+/.test(navigator.userAgent)||/Mac/.test(navigator.platform);this.__clearBeforeRender=!0;this.__stack=[];this.__mouseOutStack=[];var c;c=new kf;c.data=[];c.length=0;c.fixed=!1;c=this.stage3Ds=c;var d=new Ti;if(!c.fixed){c.length++;if(c.data.length<c.length){var e;e=Array(c.data.length+10);ee.blit(c.data,0,e,0,c.data.length);c.data=e}c.data[c.length-1]=d}c.length;null==ja.current.stage&&this.stage.addChild(ja.current)};g["openfl.display.Stage"]=ng;ng.__name__=["openfl","display","Stage"];
ng.__interfaces__=[di];ng.__super__=Qb;ng.prototype=t(Qb.prototype,{align:null,allowsFullScreen:null,allowsFullScreenInteractive:null,application:null,quality:null,scaleMode:null,stage3Ds:null,stageFocusRect:null,stageHeight:null,stageWidth:null,window:null,__clearBeforeRender:null,__color:null,__colorSplit:null,__colorString:null,__deltaTime:null,__dirty:null,__displayState:null,__dragBounds:null,__dragObject:null,__dragOffsetX:null,__dragOffsetY:null,__focus:null,__invalidated:null,__lastClickTime:null,
__macKeyboard:null,__mouseOutStack:null,__mouseX:null,__mouseY:null,__renderer:null,__rendering:null,__stack:null,__transparent:null,globalToLocal:function(a){return a.clone()},localToGlobal:function(a){return a.clone()},onGamepadAxisMove:function(a,b,c){za.__onGamepadAxisMove(a,b,c)},onGamepadButtonDown:function(a,b){za.__onGamepadButtonDown(a,b)},onGamepadButtonUp:function(a,b){za.__onGamepadButtonUp(a,b)},onGamepadConnect:function(a){za.__onGamepadConnect(a)},onGamepadDisconnect:function(a){za.__onGamepadDisconnect(a)},
onJoystickAxisMove:function(a,b,c){},onJoystickButtonDown:function(a,b){},onJoystickButtonUp:function(a,b){},onJoystickConnect:function(a){},onJoystickDisconnect:function(a){},onJoystickHatMove:function(a,b,c){},onJoystickTrackballMove:function(a,b,c){},onKeyDown:function(a,b,c){null!=this.window&&this.window==a&&this.__onKey(fd.KEY_DOWN,b,c)},onKeyUp:function(a,b,c){null!=this.window&&this.window==a&&this.__onKey(fd.KEY_UP,b,c)},onModuleExit:function(a){null!=this.window&&(a=new v(v.DEACTIVATE),
this.__broadcast(a,!0))},onMouseDown:function(a,b,c,d){if(null!=this.window&&this.window==a){var e;switch(d){case 1:e=F.MIDDLE_MOUSE_DOWN;break;case 2:e=F.RIGHT_MOUSE_DOWN;break;default:e=F.MOUSE_DOWN}this.__onMouse(e,b*a.__scale|0,c*a.__scale|0,d)}},onMouseMove:function(a,b,c){null!=this.window&&this.window==a&&this.__onMouse(F.MOUSE_MOVE,b*a.__scale|0,c*a.__scale|0,0)},onMouseMoveRelative:function(a,b,c){},onMouseUp:function(a,b,c,d){if(null!=this.window&&this.window==a){var e;switch(d){case 1:e=
F.MIDDLE_MOUSE_UP;break;case 2:e=F.RIGHT_MOUSE_UP;break;default:e=F.MOUSE_UP}this.__onMouse(e,b*a.__scale|0,c*a.__scale|0,d)}},onMouseWheel:function(a,b,c){null!=this.window&&this.window==a&&this.__onMouseWheel(b*a.__scale|0,c*a.__scale|0)},onPreloadComplete:function(){},onPreloadProgress:function(a,b){},onRenderContextLost:function(a){},onRenderContextRestored:function(a,b){},onTextEdit:function(a,b,c,d){},onTextInput:function(a,b){if(null!=this.window&&this.window==a){var c=[];null==this.__focus?
this.__getInteractive(c):this.__focus.__getInteractive(c);var d=new od(od.TEXT_INPUT,!0,!1,b);0<c.length?(c.reverse(),this.__fireEvent(d,c)):this.__broadcast(d,!0)}},onTouchMove:function(a){this.__onTouch("touchMove",a)},onTouchEnd:function(a){this.__onTouch("touchEnd",a)},onTouchStart:function(a){this.__onTouch("touchBegin",a)},onWindowActivate:function(a){null!=this.window&&this.window==a&&(a=new v(v.ACTIVATE),this.__broadcast(a,!0))},onWindowClose:function(a){this.window==a&&(this.window=null)},
onWindowCreate:function(a){if(null!=this.window&&this.window==a&&null!=a.renderer)switch(a=a.renderer.context,a[1]){case 0:this.__renderer=new Hb(this.stageWidth,this.stageHeight,a[2]);break;case 1:this.__renderer=new Fi(this.stageWidth,this.stageHeight,a[2]);break;case 2:this.__renderer=new hc(this.stageWidth,this.stageHeight,a[2]);break;case 4:this.__renderer=new jg(this.stageWidth,this.stageHeight,a[2]);break;case 5:this.__renderer=new Gi(this.stageWidth,this.stageHeight,a[2])}},onWindowDeactivate:function(a){null!=
this.window&&this.window==a&&(a=new v(v.DEACTIVATE),this.__broadcast(a,!0))},onWindowEnter:function(a){},onWindowFocusIn:function(a){null!=this.window&&this.window==a&&(a=new qb(qb.FOCUS_IN,!0,!1,null,!1,0),this.__broadcast(a,!0))},onWindowFocusOut:function(a){null!=this.window&&this.window==a&&(a=new qb(qb.FOCUS_OUT,!0,!1,null,!1,0),this.__broadcast(a,!0))},onWindowFullscreen:function(a){},onWindowLeave:function(a){null!=this.window&&this.window==a&&this.__dispatchEvent(new v(v.MOUSE_LEAVE))},onWindowMinimize:function(a){},
onWindowMove:function(a,b,c){},onWindowResize:function(a,b,c){null!=this.window&&this.window==a&&(this.stageWidth=b*a.__scale|0,this.stageHeight=c*a.__scale|0,null!=this.__renderer&&this.__renderer.resize(this.stageWidth,this.stageHeight),a=new v(v.RESIZE),this.__broadcast(a,!1))},onWindowRestore:function(a){},render:function(a){if(null!=a.window&&a.window==this.window&&(null!=this.application&&0<this.application.windows.length&&(this.__transformDirty||(this.__transformDirty=!0,W.__worldTransformDirty++),
this.__renderDirty||(this.__updateCachedBitmap=!0,this.__updateFilters=null!=this.get_filters()&&0<this.get_filters().length,this.__renderDirty=!0,W.__worldRenderDirty++)),!this.__rendering)){this.__rendering=!0;this.__broadcast(new v(v.ENTER_FRAME),!0);this.__invalidated&&(this.__invalidated=!1,this.__broadcast(new v(v.RENDER),!0));this.__renderable=!0;this.__enterFrame(this.__deltaTime);this.__deltaTime=0;this.__update(!1,!0);if(null!=this.__renderer){a=a.context;switch(a[1]){case 4:a=a[2],y.__cast(this.__renderer,
jg).cairo=a,this.__renderer.renderSession.cairo=a}this.__renderer.render(this)}this.__rendering=!1}},update:function(a){this.__deltaTime=a},__drag:function(a){var b=this.__dragObject.parent;null!=b&&(a=b.globalToLocal(a));b=a.x+this.__dragOffsetX;a=a.y+this.__dragOffsetY;null!=this.__dragBounds&&(b<this.__dragBounds.x?b=this.__dragBounds.x:b>this.__dragBounds.get_right()&&(b=this.__dragBounds.get_right()),a<this.__dragBounds.y?a=this.__dragBounds.y:a>this.__dragBounds.get_bottom()&&(a=this.__dragBounds.get_bottom()));
this.__dragObject.set_x(b);this.__dragObject.set_y(a)},__fireEvent:function(a,b){var c=b.length;if(0==c)a.eventPhase=Bb.AT_TARGET,a.target.__broadcast(a,!1);else{a.eventPhase=Bb.CAPTURING_PHASE;a.target=b[b.length-1];for(var d=0,e=c-1;d<e;){var f=d++;b[f].__broadcast(a,!1);if(a.__isCancelled)return}a.eventPhase=Bb.AT_TARGET;a.target.__broadcast(a,!1);if(!a.__isCancelled&&a.bubbles)for(a.eventPhase=Bb.BUBBLING_PHASE,c-=2;0<=c;){b[c].__broadcast(a,!1);if(a.__isCancelled)break;c--}}},__getInteractive:function(a){null!=
a&&a.push(this);return!0},__onKey:function(a,b,c){F.__altKey=tb.get_altKey(c);F.__commandKey=tb.get_metaKey(c);F.__ctrlKey=tb.get_ctrlKey(c);F.__shiftKey=tb.get_shiftKey(c);var d=[];null==this.__focus?this.__getInteractive(d):this.__focus.__getInteractive(d);if(0<d.length){var e;switch(b){case 1073742048:case 1073742049:case 1073742050:case 1073742051:e=1;break;case 1073742052:case 1073742053:case 1073742054:case 1073742055:e=2;break;case 1073741908:case 1073741909:case 1073741910:case 1073741911:case 1073741912:case 1073741913:case 1073741914:case 1073741915:case 1073741916:case 1073741917:case 1073741918:case 1073741919:case 1073741920:case 1073741921:case 1073741922:case 1073741923:case 1073742044:e=
3;break;default:e=0}switch(b){case 8:b=8;break;case 9:b=9;break;case 13:b=13;break;case 27:b=27;break;case 32:b=32;break;case 33:b=49;break;case 34:b=222;break;case 35:b=51;break;case 36:b=52;break;case 37:b=53;break;case 38:b=55;break;case 39:b=222;break;case 40:b=57;break;case 41:b=48;break;case 42:b=56;break;case 44:b=188;break;case 45:b=189;break;case 46:b=190;break;case 47:b=191;break;case 48:b=48;break;case 49:b=49;break;case 50:b=50;break;case 51:b=51;break;case 52:b=52;break;case 53:b=53;
break;case 54:b=54;break;case 55:b=55;break;case 56:b=56;break;case 57:b=57;break;case 58:b=186;break;case 59:b=186;break;case 60:b=60;break;case 61:b=187;break;case 62:b=190;break;case 63:b=191;break;case 64:b=50;break;case 91:b=219;break;case 92:b=220;break;case 93:b=221;break;case 94:b=54;break;case 95:b=189;break;case 96:b=192;break;case 97:b=65;break;case 98:b=66;break;case 99:b=67;break;case 100:b=68;break;case 101:b=69;break;case 102:b=70;break;case 103:b=71;break;case 104:b=72;break;case 105:b=
73;break;case 106:b=74;break;case 107:b=75;break;case 108:b=76;break;case 109:b=77;break;case 110:b=78;break;case 111:b=79;break;case 112:b=80;break;case 113:b=81;break;case 114:b=82;break;case 115:b=83;break;case 116:b=84;break;case 117:b=85;break;case 118:b=86;break;case 119:b=87;break;case 120:b=88;break;case 121:b=89;break;case 122:b=90;break;case 127:b=46;break;case 1073741881:b=20;break;case 1073741882:b=112;break;case 1073741883:b=113;break;case 1073741884:b=114;break;case 1073741885:b=115;
break;case 1073741886:b=116;break;case 1073741887:b=117;break;case 1073741888:b=118;break;case 1073741889:b=119;break;case 1073741890:b=120;break;case 1073741891:b=121;break;case 1073741892:b=122;break;case 1073741893:b=123;break;case 1073741894:b=301;break;case 1073741895:b=145;break;case 1073741896:b=19;break;case 1073741897:b=45;break;case 1073741898:b=36;break;case 1073741899:b=33;break;case 1073741901:b=35;break;case 1073741902:b=34;break;case 1073741903:b=39;break;case 1073741904:b=37;break;
case 1073741905:b=40;break;case 1073741906:b=38;break;case 1073741907:b=144;break;case 1073741908:b=111;break;case 1073741909:b=106;break;case 1073741910:b=109;break;case 1073741911:b=107;break;case 1073741912:b=108;break;case 1073741913:b=97;break;case 1073741914:b=98;break;case 1073741915:b=99;break;case 1073741916:b=100;break;case 1073741917:b=101;break;case 1073741918:b=102;break;case 1073741919:b=103;break;case 1073741920:b=104;break;case 1073741921:b=105;break;case 1073741922:b=96;break;case 1073741923:b=
110;break;case 1073741925:b=302;break;case 1073741928:b=124;break;case 1073741929:b=125;break;case 1073741930:b=126;break;case 1073741982:b=13;break;case 1073742044:b=110;break;case 1073742048:b=17;break;case 1073742049:b=16;break;case 1073742050:b=18;break;case 1073742051:b=15;break;case 1073742052:b=17;break;case 1073742053:b=16;break;case 1073742054:b=18;break;case 1073742055:b=15;break}var f=il.__getCharCode(b,tb.get_shiftKey(c));a=new fd(a,!0,!1,f,b,e,this.__macKeyboard?tb.get_ctrlKey(c)||tb.get_metaKey(c):
tb.get_ctrlKey(c),tb.get_altKey(c),tb.get_shiftKey(c),tb.get_ctrlKey(c),tb.get_metaKey(c));d.reverse();this.__fireEvent(a,d)}},__onMouse:function(a,b,c,d){if(!(2<d)){this.__mouseX=b;this.__mouseY=c;var e=[],f=null,g=new Ea(b,c);this.__hitTest(b,c,!0,e,!0)?f=e[e.length-1]:(f=this,e=[this]);null==f&&(f=this);a==F.MOUSE_DOWN&&(f.get_tabEnabled()?this.set_focus(f):this.set_focus(null));this.__fireEvent(F.__create(a,d,this.__mouseX,this.__mouseY,f==this?g:f.globalToLocal(g),f),e);switch(a){case "mouseUp":b=
F.CLICK;break;case "middleMouseUp":b=F.MIDDLE_CLICK;break;case "rightMouseUp":b=F.RIGHT_CLICK;break;default:b=null}null!=b&&(this.__fireEvent(F.__create(b,d,this.__mouseX,this.__mouseY,f==this?g:f.globalToLocal(g),f),e),a==F.MOUSE_UP&&y.__cast(f,Sa).doubleClickEnabled&&(a=ja.getTimer(),500>a-this.__lastClickTime?(this.__fireEvent(F.__create(F.DOUBLE_CLICK,d,this.__mouseX,this.__mouseY,f==this?g:f.globalToLocal(g),f),e),this.__lastClickTime=0):this.__lastClickTime=a));f=null;for(d=0;d<e.length;)if(f=
e[d],++d,f=f.__getCursor(),null!=f){pi.set_cursor(f);break}null==f&&pi.set_cursor(ca.ARROW);d=0;for(f=this.__mouseOutStack;d<f.length;)a=f[d],++d,-1==H.indexOf(e,a,0)&&(H.remove(this.__mouseOutStack,a),b=a.globalToLocal(g),a.__dispatchEvent(new F(F.MOUSE_OUT,!1,!1,b.x,b.y,a)));for(d=0;d<e.length;)f=e[d],++d,-1==H.indexOf(this.__mouseOutStack,f,0)&&(f.hasEventListener(F.MOUSE_OVER)&&(a=f.globalToLocal(g),f.__dispatchEvent(new F(F.MOUSE_OVER,!1,!1,a.x,a.y,f))),f.hasEventListener(F.MOUSE_OUT)&&this.__mouseOutStack.push(f));
null!=this.__dragObject&&this.__drag(g)}},__onMouseWheel:function(a,b){var c=this.__mouseX,d=this.__mouseY,e=[];this.__hitTest(c,d,!1,e,!0)||(e=[this]);var f=e[e.length-1],c=new Ea(c,d),d=b|0;this.__fireEvent(F.__create(F.MOUSE_WHEEL,0,this.__mouseX,this.__mouseY,f==this?c:f.globalToLocal(c),f,d),e)},__onTouch:function(a,b){var c=new Ea(b.x*this.stageWidth,b.y*this.stageHeight);this.__mouseX=c.x;this.__mouseY=c.y;var d=[];if(this.__hitTest(b.x,b.y,!1,d,!0)){var e=d[d.length-1];null==e&&(e=this);c=
e.globalToLocal(c);e=oe.__create(a,null,this.__mouseX,this.__mouseY,c,e);e.touchPointID=b.id;e.isPrimaryTouchPoint=!0;this.__fireEvent(e,d)}else d=oe.__create(a,null,this.__mouseX,this.__mouseY,c,this),d.touchPointID=b.id,d.isPrimaryTouchPoint=!0,this.__fireEvent(d,[this.stage])},__update:function(a,b,c){if(a)0<W.__worldTransformDirty&&(Qb.prototype.__update.call(this,!0,b,c),b&&(W.__worldTransformDirty=0,this.__dirty=!0));else if(0<W.__worldTransformDirty||this.__dirty||0<W.__worldRenderDirty)Qb.prototype.__update.call(this,
!1,b,c),b&&(W.__worldTransformDirty=0,W.__worldRenderDirty=0,this.__dirty=!1)},get_mouseX:function(){return this.__mouseX},get_mouseY:function(){return this.__mouseY},set_color:function(a){this.__colorSplit=[((a&16711680)>>>16)/255,((a&65280)>>>8)/255,(a&255)/255];this.__colorString="#"+P.hex(a,6);return this.__color=a},get_focus:function(){return this.__focus},set_focus:function(a){if(a!=this.__focus){var b=this.__focus;this.__focus=a;if(null!=b){var c=new qb(qb.FOCUS_OUT,!0,!1,this.__focus,!1,0);
this.__stack=[];b.__getInteractive(this.__stack);this.__stack.reverse();this.__fireEvent(c,this.__stack)}null!=this.__focus&&(b=new qb(qb.FOCUS_IN,!0,!1,b,!1,0),this.__stack=[],a.__getInteractive(this.__stack),this.__stack.reverse(),this.__fireEvent(b,this.__stack))}return this.__focus},__class__:ng,__properties__:t(Qb.prototype.__properties__,{set_focus:"set_focus",get_focus:"get_focus",set_color:"set_color"})});var Ti=function(){ba.call(this)};g["openfl.display.Stage3D"]=Ti;Ti.__name__=["openfl",
"display","Stage3D"];Ti.__super__=ba;Ti.prototype=t(ba.prototype,{__class__:Ti});var Ca=g["openfl.display.StageAlign"]={__ename__:!0,__constructs__:"TOP_RIGHT TOP_LEFT TOP RIGHT LEFT BOTTOM_RIGHT BOTTOM_LEFT BOTTOM".split(" ")};Ca.TOP_RIGHT=["TOP_RIGHT",0];Ca.TOP_RIGHT.toString=u;Ca.TOP_RIGHT.__enum__=Ca;Ca.TOP_LEFT=["TOP_LEFT",1];Ca.TOP_LEFT.toString=u;Ca.TOP_LEFT.__enum__=Ca;Ca.TOP=["TOP",2];Ca.TOP.toString=u;Ca.TOP.__enum__=Ca;Ca.RIGHT=["RIGHT",3];Ca.RIGHT.toString=u;Ca.RIGHT.__enum__=Ca;Ca.LEFT=
["LEFT",4];Ca.LEFT.toString=u;Ca.LEFT.__enum__=Ca;Ca.BOTTOM_RIGHT=["BOTTOM_RIGHT",5];Ca.BOTTOM_RIGHT.toString=u;Ca.BOTTOM_RIGHT.__enum__=Ca;Ca.BOTTOM_LEFT=["BOTTOM_LEFT",6];Ca.BOTTOM_LEFT.toString=u;Ca.BOTTOM_LEFT.__enum__=Ca;Ca.BOTTOM=["BOTTOM",7];Ca.BOTTOM.toString=u;Ca.BOTTOM.__enum__=Ca;var Kc=g["openfl.display.StageDisplayState"]={__ename__:!0,__constructs__:["NORMAL","FULL_SCREEN","FULL_SCREEN_INTERACTIVE"]};Kc.NORMAL=["NORMAL",0];Kc.NORMAL.toString=u;Kc.NORMAL.__enum__=Kc;Kc.FULL_SCREEN=["FULL_SCREEN",
1];Kc.FULL_SCREEN.toString=u;Kc.FULL_SCREEN.__enum__=Kc;Kc.FULL_SCREEN_INTERACTIVE=["FULL_SCREEN_INTERACTIVE",2];Kc.FULL_SCREEN_INTERACTIVE.toString=u;Kc.FULL_SCREEN_INTERACTIVE.__enum__=Kc;var Zb=g["openfl.display.StageQuality"]={__ename__:!0,__constructs__:["BEST","HIGH","MEDIUM","LOW"]};Zb.BEST=["BEST",0];Zb.BEST.toString=u;Zb.BEST.__enum__=Zb;Zb.HIGH=["HIGH",1];Zb.HIGH.toString=u;Zb.HIGH.__enum__=Zb;Zb.MEDIUM=["MEDIUM",2];Zb.MEDIUM.toString=u;Zb.MEDIUM.__enum__=Zb;Zb.LOW=["LOW",3];Zb.LOW.toString=
u;Zb.LOW.__enum__=Zb;var $b=g["openfl.display.StageScaleMode"]={__ename__:!0,__constructs__:["SHOW_ALL","NO_SCALE","NO_BORDER","EXACT_FIT"]};$b.SHOW_ALL=["SHOW_ALL",0];$b.SHOW_ALL.toString=u;$b.SHOW_ALL.__enum__=$b;$b.NO_SCALE=["NO_SCALE",1];$b.NO_SCALE.toString=u;$b.NO_SCALE.__enum__=$b;$b.NO_BORDER=["NO_BORDER",2];$b.NO_BORDER.toString=u;$b.NO_BORDER.__enum__=$b;$b.EXACT_FIT=["EXACT_FIT",3];$b.EXACT_FIT.toString=u;$b.EXACT_FIT.__enum__=$b;var jl=function(){};g["openfl.display.Tilesheet"]=jl;jl.__name__=
["openfl","display","Tilesheet"];jl.prototype={__bitmap:null,__centerPoints:null,__tileRects:null,__tileUVs:null,__rectTile:null,__rectUV:null,__point:null,__class__:jl};var ad=g["openfl.display.TriangleCulling"]={__ename__:!0,__constructs__:["NEGATIVE","NONE","POSITIVE"]};ad.NEGATIVE=["NEGATIVE",0];ad.NEGATIVE.toString=u;ad.NEGATIVE.__enum__=ad;ad.NONE=["NONE",1];ad.NONE.toString=u;ad.NONE.__enum__=ad;ad.POSITIVE=["POSITIVE",2];ad.POSITIVE.toString=u;ad.POSITIVE.__enum__=ad;var Si=function(a){af.call(this,
a)};g["openfl.display.Window"]=Si;Si.__name__=["openfl","display","Window"];Si.__super__=af;Si.prototype=t(af.prototype,{create:function(a){af.prototype.create.call(this,a);this.stage=new ng(this,Object.prototype.hasOwnProperty.call(this.config,"background")?this.config.background:16777215);a.addModule(this.stage)},__class__:Si});var zc=function(a,b){null==b&&(b=0);null==a&&(a="");this.message=a;this.errorID=b;this.name="Error"};g["openfl.errors.Error"]=zc;zc.__name__=["openfl","errors","Error"];
zc.prototype={errorID:null,message:null,name:null,toString:function(){return null!=this.message?this.message:"Error"},__class__:zc};var od=function(a,b,c,d){null==d&&(d="");null==c&&(c=!1);null==b&&(b=!1);v.call(this,a,b,c);this.text=d};g["openfl.events.TextEvent"]=od;od.__name__=["openfl","events","TextEvent"];od.__super__=v;od.prototype=t(v.prototype,{text:null,__class__:od});var pd=function(a,b,c,d,e){null==e&&(e=0);null==d&&(d="");null==c&&(c=!1);null==b&&(b=!1);od.call(this,a,b,c,d);this.errorID=
e};g["openfl.events.ErrorEvent"]=pd;pd.__name__=["openfl","events","ErrorEvent"];pd.__super__=od;pd.prototype=t(od.prototype,{errorID:null,toString:function(){return'[ErrorEvent type="'+this.type+'" bubbles='+K.string(this.bubbles)+" cancelable="+K.string(this.cancelable)+" text="+this.text+" errorID="+this.errorID+"]"},__class__:pd});var tg=function(a,b,c){this.callback=a;this.useCapture=b;this.priority=c};g["openfl.events._EventDispatcher.Listener"]=tg;tg.__name__=["openfl","events","_EventDispatcher",
"Listener"];tg.prototype={callback:null,priority:null,useCapture:null,match:function(a,b){return G.compareMethods(this.callback,a)&&this.useCapture==b},__class__:tg};var Bb=g["openfl.events.EventPhase"]={__ename__:!0,__constructs__:["CAPTURING_PHASE","AT_TARGET","BUBBLING_PHASE"]};Bb.CAPTURING_PHASE=["CAPTURING_PHASE",0];Bb.CAPTURING_PHASE.toString=u;Bb.CAPTURING_PHASE.__enum__=Bb;Bb.AT_TARGET=["AT_TARGET",1];Bb.AT_TARGET.toString=u;Bb.AT_TARGET.__enum__=Bb;Bb.BUBBLING_PHASE=["BUBBLING_PHASE",2];
Bb.BUBBLING_PHASE.toString=u;Bb.BUBBLING_PHASE.__enum__=Bb;var qb=function(a,b,c,d,e,f){null==f&&(f=0);null==e&&(e=!1);null==c&&(c=!1);null==b&&(b=!1);v.call(this,a,b,c);this.keyCode=f;this.shiftKey=e;this.relatedObject=d};g["openfl.events.FocusEvent"]=qb;qb.__name__=["openfl","events","FocusEvent"];qb.__super__=v;qb.prototype=t(v.prototype,{keyCode:null,relatedObject:null,shiftKey:null,__class__:qb});var pe=function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=!1);null==c&&(c=!1);null==b&&(b=!1);v.call(this,
a,b,c);this.fullScreen=d;this.interactive=e};g["openfl.events.FullScreenEvent"]=pe;pe.__name__=["openfl","events","FullScreenEvent"];pe.__super__=v;pe.prototype=t(v.prototype,{fullScreen:null,interactive:null,__class__:pe});var qd=function(a,b,c,d){null==c&&(c=!1);null==b&&(b=!0);v.call(this,a,b,c);this.device=d};g["openfl.events.GameInputEvent"]=qd;qd.__name__=["openfl","events","GameInputEvent"];qd.__super__=v;qd.prototype=t(v.prototype,{device:null,__class__:qd});var qf=function(a,b,c,d){null==
d&&(d=0);null==c&&(c=!1);null==b&&(b=!1);this.status=d;v.call(this,a,b,c)};g["openfl.events.HTTPStatusEvent"]=qf;qf.__name__=["openfl","events","HTTPStatusEvent"];qf.__super__=v;qf.prototype=t(v.prototype,{status:null,__class__:qf});var dc=function(a,b,c,d,e){null==e&&(e=0);null==d&&(d="");null==c&&(c=!1);null==b&&(b=!0);pd.call(this,a,b,c,d,e)};g["openfl.events.IOErrorEvent"]=dc;dc.__name__=["openfl","events","IOErrorEvent"];dc.__super__=pd;dc.prototype=t(pd.prototype,{toString:function(){return'[IOErrorEvent type="'+
this.type+'" bubbles='+K.string(this.bubbles)+" cancelable="+K.string(this.cancelable)+" text="+this.text+" errorID="+this.errorID+"]"},__class__:dc});var fd=function(a,b,c,d,e,f,g,h,k,l,m){null==m&&(m=!1);null==l&&(l=!1);null==k&&(k=!1);null==h&&(h=!1);null==g&&(g=!1);null==e&&(e=0);null==d&&(d=0);null==c&&(c=!1);null==b&&(b=!1);v.call(this,a,b,c);this.charCode=d;this.keyCode=e;this.keyLocation=null!=f?f:0;this.ctrlKey=g;this.altKey=h;this.shiftKey=k;this.controlKey=l;this.commandKey=m};g["openfl.events.KeyboardEvent"]=
fd;fd.__name__=["openfl","events","KeyboardEvent"];fd.__super__=v;fd.prototype=t(v.prototype,{altKey:null,charCode:null,ctrlKey:null,commandKey:null,controlKey:null,keyCode:null,keyLocation:null,shiftKey:null,__class__:fd});var F=function(a,b,c,d,e,f,g,h,k,l,m,p,q){null==q&&(q=0);null==p&&(p=!1);null==m&&(m=0);null==l&&(l=!1);null==k&&(k=!1);null==h&&(h=!1);null==g&&(g=!1);null==e&&(e=0);null==d&&(d=0);null==c&&(c=!1);null==b&&(b=!0);v.call(this,a,b,c);this.shiftKey=k;this.altKey=h;this.ctrlKey=g;
this.bubbles=b;this.relatedObject=f;this.delta=m;this.localX=d;this.localY=e;this.buttonDown=l;this.commandKey=p;this.clickCount=q};g["openfl.events.MouseEvent"]=F;F.__name__=["openfl","events","MouseEvent"];F.__altKey=null;F.__buttonDown=null;F.__commandKey=null;F.__ctrlKey=null;F.__shiftKey=null;F.__create=function(a,b,c,d,e,f,g){null==g&&(g=0);switch(a){case "mouseDown":F.__buttonDown=!0;break;case "mouseUp":F.__buttonDown=!1}a=new F(a,!0,!1,e.x,e.y,null,F.__ctrlKey,F.__altKey,F.__shiftKey,F.__buttonDown,
g,F.__commandKey);a.stageX=c;a.stageY=d;a.target=f;return a};F.__super__=v;F.prototype=t(v.prototype,{altKey:null,buttonDown:null,commandKey:null,clickCount:null,ctrlKey:null,delta:null,localX:null,localY:null,relatedObject:null,shiftKey:null,stageX:null,stageY:null,__class__:F});var rf=function(a,b,c,d,e){null==e&&(e=0);null==d&&(d=0);null==c&&(c=!1);null==b&&(b=!1);v.call(this,a,b,c);this.bytesLoaded=d;this.bytesTotal=e};g["openfl.events.ProgressEvent"]=rf;rf.__name__=["openfl","events","ProgressEvent"];
rf.__super__=v;rf.prototype=t(v.prototype,{bytesLoaded:null,bytesTotal:null,__class__:rf});var Ed=function(a,b,c,d,e){null==e&&(e=0);null==d&&(d="");null==c&&(c=!1);null==b&&(b=!1);pd.call(this,a,b,c,d,e)};g["openfl.events.SecurityErrorEvent"]=Ed;Ed.__name__=["openfl","events","SecurityErrorEvent"];Ed.__super__=pd;Ed.prototype=t(pd.prototype,{toString:function(){return'[SecurityErrorEvent type="'+this.type+'" bubbles='+K.string(this.bubbles)+" cancelable="+K.string(this.cancelable)+" text="+this.text+
" errorID="+this.errorID+"]"},__class__:Ed});var tc=function(a,b,c){null==c&&(c=!1);null==b&&(b=!1);v.call(this,a,b,c)};g["openfl.events.TimerEvent"]=tc;tc.__name__=["openfl","events","TimerEvent"];tc.__super__=v;tc.prototype=t(v.prototype,{__class__:tc});var oe=function(a,b,c,d,e,f,g,h,k,l,m,p,q,r,t){null==r&&(r=!1);null==q&&(q=0);null==p&&(p=!1);null==m&&(m=!1);null==l&&(l=!1);null==k&&(k=!1);null==g&&(g=1);null==f&&(f=1);null==e&&(e=0);null==d&&(d=0);null==c&&(c=!1);null==b&&(b=!0);v.call(this,
a,b,c);this.shiftKey=m;this.altKey=l;this.ctrlKey=k;this.bubbles=b;this.relatedObject=h;this.delta=q;this.localX=d;this.localY=e;this.sizeX=f;this.sizeY=g;this.buttonDown=p;this.commandKey=r;this.pressure=1;this.touchPointID=0;this.isPrimaryTouchPoint=!0};g["openfl.events.TouchEvent"]=oe;oe.__name__=["openfl","events","TouchEvent"];oe.__create=function(a,b,c,d,e,f){a=new oe(a,!0,!1,e.x,e.y,1,1,null,!1,!1,!1,!1,0,!1,0);a.stageX=c;a.stageY=d;a.target=f;return a};oe.__super__=v;oe.prototype=t(v.prototype,
{altKey:null,buttonDown:null,commandKey:null,ctrlKey:null,delta:null,isPrimaryTouchPoint:null,localX:null,localY:null,pressure:null,relatedObject:null,shiftKey:null,sizeX:null,sizeY:null,stageX:null,stageY:null,touchPointID:null,__class__:oe});var pc=function(){this.__saveLastFilter=!1;this.__passes=0};g["openfl.filters.BitmapFilter"]=pc;pc.__name__=["openfl","filters","BitmapFilter"];pc.__tmpRenderTexture=null;pc.__expandBounds=function(a,b,c){var d=ha.__temp;d.setEmpty();for(var e=0;e<a.length;){var f=
a[e];++e;f.__growBounds(d)}d.__transform(d,c);b.__expand(d.x,d.y,d.width,d.height)};pc.__applyFilters=function(a,b,c,d,e,f){if(f=d==c&&d.__usingPingPongTexture)d.__pingPongTexture.useOldTexture=!0;null==e&&(e=c.rect);for(var g=null,h=!1,k=c.__shader,l=0;l<a.length;){var m=a[l];++l;m.__saveLastFilter&&(d.__pingPongTexture.swap(),d.__drawGL(b,c,null,null,null,e,!0,!d.__usingPingPongTexture,!0),g=d.__pingPongTexture.get_oldRenderTexture(),d.__pingPongTexture.set_oldRenderTexture(pc.__tmpRenderTexture));
for(var p=0,q=m.__passes;p<q;){var r=p++,h=m.__saveLastFilter&&m.__useLastFilter(r);f&&!h&&d.__pingPongTexture.swap();h&&(pc.__tmpRenderTexture=d.__pingPongTexture.get_oldRenderTexture(),d.__pingPongTexture.set_oldRenderTexture(g));c.__shader=m.__preparePass(r);d.__drawGL(b,c,null,null,null,e,!0,!d.__usingPingPongTexture,!h)}}c.__shader=k;f&&(d.__pingPongTexture.useOldTexture=!1)};pc.prototype={__passes:null,__saveLastFilter:null,__applyFilter:function(a,b,c,d){},__growBounds:function(a){},__preparePass:function(a){return null},
__useLastFilter:function(a){return!1},__class__:pc};var Cf=function(a){pc.call(this);this.__colorMatrixShader=new Ui;this.__passes=1;this.set_matrix(a)};g["openfl.filters.ColorMatrixFilter"]=Cf;Cf.__name__=["openfl","filters","ColorMatrixFilter"];Cf.__super__=pc;Cf.prototype=t(pc.prototype,{matrix:null,__colorMatrixShader:null,__applyFilter:function(a,b,c,d){var e=a.data,f=b.data,g=d.x-c.x|0;d=d.y-c.y|0;a=4*a.width;b=4*b.width;for(var h,k,l=c.y|0,m=c.height|0;l<m;)for(var p=l++,q=c.x|0,r=c.width|
0;q<r;){k=q++;h=p*a+4*k;k=(p+g)*b+4*(k+d);var t=e[h],u=e[h+1],v=e[h+2];h=e[h+3];f[k]=this.matrix[0]*t+this.matrix[1]*u+this.matrix[2]*v+this.matrix[3]*h+this.matrix[4]|0;f[k+1]=this.matrix[5]*t+this.matrix[6]*u+this.matrix[7]*v+this.matrix[8]*h+this.matrix[9]|0;f[k+2]=this.matrix[10]*t+this.matrix[11]*u+this.matrix[12]*v+this.matrix[13]*h+this.matrix[14]|0;f[k+3]=this.matrix[15]*t+this.matrix[16]*u+this.matrix[17]*v+this.matrix[18]*h+this.matrix[19]|0}},__preparePass:function(a){return this.__colorMatrixShader},
set_matrix:function(a){null==a&&(a=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]);this.__colorMatrixShader.__uMultipliers.set_value([a[0],a[1],a[2],a[3],a[5],a[6],a[7],a[8],a[10],a[11],a[12],a[13],a[15],a[16],a[17],a[18]]);this.__colorMatrixShader.__uOffsets.set_value([a[4]/255,a[9]/255,a[14]/255,a[19]/255]);return this.matrix=a},__class__:Cf,__properties__:{set_matrix:"set_matrix"}});var Ui=function(){this.__uOffsets=new pf("vec4",0);this.__uMultipliers=new pf("mat4",0);ta.call(this);this.data.set("uMultipliers",
this.__uMultipliers);this.data.set("uOffsets",this.__uOffsets);this.__buildFragmentCode("uniform mat4 uMultipliers;\nuniform vec4 uOffsets;\nvoid main(void) {\n\tvec4 color = texture2D("+ta.uSampler+", "+ta.vTexCoord+");\n\tcolor = vec4(color.rgb / color.a, color.a);\n\tcolor = uOffsets + color * uMultipliers;\n\tcolor = vec4(color.rgb * color.a, color.a);\n\tgl_FragColor = color;\n}")};g["openfl.filters._ColorMatrixFilter.ColorMatrixShader"]=Ui;Ui.__name__=["openfl","filters","_ColorMatrixFilter",
"ColorMatrixShader"];Ui.__super__=ta;Ui.prototype=t(ta.prototype,{__uMultipliers:null,__uOffsets:null,__class__:Ui});var kl=function(){};g["openfl.geom.Matrix3D"]=kl;kl.__name__=["openfl","geom","Matrix3D"];kl.prototype={__class__:kl};var Vi=function(a){this.__colorTransform=new Cc;this.concatenatedColorTransform=new Cc;this.pixelBounds=new ha;this.__displayObject=a;this.__hasMatrix=!0};g["openfl.geom.Transform"]=Vi;Vi.__name__=["openfl","geom","Transform"];Vi.prototype={concatenatedColorTransform:null,
pixelBounds:null,__colorTransform:null,__displayObject:null,__hasMatrix:null,get_colorTransform:function(){return this.__colorTransform},set_colorTransform:function(a){this.__colorTransform.__equals(a)||(this.__colorTransform=a,null!=a&&this.__displayObject.set_alpha(a.alphaMultiplier),this.__displayObject.__setRenderDirty());return this.__colorTransform},__class__:Vi,__properties__:{set_colorTransform:"set_colorTransform",get_colorTransform:"get_colorTransform"}};var Gl=function(){};g["openfl.geom.Vector3D"]=
Gl;Gl.__name__=["openfl","geom","Vector3D"];var Hl=function(){};g["openfl.media.ID3Info"]=Hl;Hl.__name__=["openfl","media","ID3Info"];var Fd=function(a,b){ba.call(this,this);this.bytesTotal=this.bytesLoaded=0;this.id3=null;this.isBuffering=!1;this.url=null;null!=a&&this.load(a,b)};g["openfl.media.Sound"]=Fd;Fd.__name__=["openfl","media","Sound"];Fd.__super__=ba;Fd.prototype=t(ba.prototype,{bytesLoaded:null,bytesTotal:null,id3:null,isBuffering:null,url:null,__soundID:null,load:function(a,b){this.url=
a.url;this.__soundID=vc.withoutExtension(a.url);Fd.__registeredSounds.exists(this.__soundID)?this.dispatchEvent(new v(v.COMPLETE)):(Fd.__registeredSounds.set(this.__soundID,!0),createjs.Sound.addEventListener("fileload",k(this,this.SoundJS_onFileLoad)),createjs.Sound.addEventListener("fileerror",k(this,this.SoundJS_onFileError)),createjs.Sound.registerSound(this.url,this.__soundID))},loadCompressedDataFromByteArray:function(a,b,c){ja.notImplemented("Sound.loadCompressedDataFromByteArray")},SoundJS_onFileLoad:function(a){a.id==
this.__soundID&&(createjs.Sound.removeEventListener("fileload",k(this,this.SoundJS_onFileLoad)),createjs.Sound.removeEventListener("fileerror",k(this,this.SoundJS_onFileError)),this.dispatchEvent(new v(v.COMPLETE)))},SoundJS_onFileError:function(a){a.id==this.__soundID&&(createjs.Sound.removeEventListener("fileload",k(this,this.SoundJS_onFileLoad)),createjs.Sound.removeEventListener("fileerror",k(this,this.SoundJS_onFileError)),this.dispatchEvent(new dc(dc.IO_ERROR)))},__class__:Fd});var Il=function(){};
g["openfl.media.SoundLoaderContext"]=Il;Il.__name__=["openfl","media","SoundLoaderContext"];var yi=function(a,b){null==b&&(b=0);null==a&&(a=1);this.volume=a;this.pan=b;this.rightToRight=this.rightToLeft=this.leftToRight=this.leftToLeft=0};g["openfl.media.SoundTransform"]=yi;yi.__name__=["openfl","media","SoundTransform"];yi.prototype={leftToLeft:null,leftToRight:null,pan:null,rightToLeft:null,rightToRight:null,volume:null,__class__:yi};var Wh=function(a){ba.call(this);this.bytesTotal=this.bytesLoaded=
0;this.set_dataFormat(Wb.TEXT);null!=a&&this.load(a)};g["openfl.net.URLLoader"]=Wh;Wh.__name__=["openfl","net","URLLoader"];Wh.__super__=ba;Wh.prototype=t(ba.prototype,{bytesLoaded:null,bytesTotal:null,data:null,dataFormat:null,getData:function(){return null},load:function(a){this.requestUrl(a.url,a.method,a.data,a.formatRequestHeaders())},registerEvents:function(a){var b=this;"undefined"!=typeof XMLHttpRequestProgressEvent&&a.addEventListener("progress",k(this,this.onProgress),!1);a.onreadystatechange=
function(){if(4==a.readyState){var c;try{c=a.status}catch(d){d instanceof m&&(d=d.val),c=null}void 0==c&&(c=null);if(null!=c)b.onStatus(c);if(null!=c&&200<=c&&400>c)b.onData(a.response);else if(null==c)b.onError("Failed to connect or resolve host");else if(12029==c)b.onError("Failed to connect to host");else if(12007==c)b.onError("Unknown host");else if(0==c)b.onError("Unable to make request (may be blocked due to cross-domain permissions)"),b.onSecurityError("Unable to make request (may be blocked due to cross-domain permissions)");
else b.onError("Http Error #"+a.status)}}},requestUrl:function(a,b,c,d){var e=new XMLHttpRequest;this.registerEvents(e);var f="";if(y.__instanceof(c,Ta))switch(this.dataFormat[1]){case 0:f=c.data.buffer;break;default:f=c.readUTFBytes(c.length)}else if(y.__instanceof(c,tl))for(var g=0,h=G.fields(c);g<h.length;){var k=h[g];++g;0!=f.length&&(f+="&");f+=encodeURIComponent(k)+"="+P.urlEncode(G.field(c,k))}else null!=c&&(f=c.toString());try{if("GET"==b&&null!=f&&""!=f){var l=1>=a.split("?").length;e.open(b,
a+(l?"?":"&")+K.string(f),!0);f=""}else e.open(b,a,!0)}catch(p){p instanceof m&&(p=p.val);this.onError(p.toString());return}switch(this.dataFormat[1]){case 0:e.responseType="arraybuffer"}for(a=0;a<d.length;)b=d[a],++a,e.setRequestHeader(b.name,b.value);e.send(f);this.onOpen();this.getData=function(){return null!=e.response?e.response:e.responseText}},onData:function(a){a=this.getData();switch(this.dataFormat[1]){case 0:this.data=Ta.__ofBuffer(a);break;default:this.data=K.string(a)}a=new v(v.COMPLETE);
a.currentTarget=this;this.dispatchEvent(a)},onError:function(a){var b=new dc(dc.IO_ERROR);b.text=a;b.currentTarget=this;this.dispatchEvent(b)},onOpen:function(){var a=new v(v.OPEN);a.currentTarget=this;this.dispatchEvent(a)},onProgress:function(a){var b=new rf(rf.PROGRESS);b.currentTarget=this;b.bytesLoaded=a.loaded;b.bytesTotal=a.total;this.dispatchEvent(b)},onSecurityError:function(a){var b=new Ed(Ed.SECURITY_ERROR);b.text=a;b.currentTarget=this;this.dispatchEvent(b)},onStatus:function(a){a=new qf(qf.HTTP_STATUS,
!1,!1,a);a.currentTarget=this;this.dispatchEvent(a)},set_dataFormat:function(a){a!=Wb.BINARY||G.hasField(window,"ArrayBuffer")?this.dataFormat=a:this.dataFormat=Wb.TEXT;return this.dataFormat},__class__:Wh,__properties__:{set_dataFormat:"set_dataFormat"}});var Wb=g["openfl.net.URLLoaderDataFormat"]={__ename__:!0,__constructs__:["BINARY","TEXT","VARIABLES"]};Wb.BINARY=["BINARY",0];Wb.BINARY.toString=u;Wb.BINARY.__enum__=Wb;Wb.TEXT=["TEXT",1];Wb.TEXT.toString=u;Wb.TEXT.__enum__=Wb;Wb.VARIABLES=["VARIABLES",
2];Wb.VARIABLES.toString=u;Wb.VARIABLES.__enum__=Wb;var be=function(a){null!=a&&(this.url=a);this.requestHeaders=[];this.method="GET";this.contentType=null};g["openfl.net.URLRequest"]=be;be.__name__=["openfl","net","URLRequest"];be.prototype={contentType:null,data:null,method:null,requestHeaders:null,url:null,formatRequestHeaders:function(){var a=this.requestHeaders;null==a&&(a=[]);if("GET"==this.method||null==this.data)return a;if("string"==typeof this.data||y.__instanceof(this.data,Ta))a=a.slice(),
a.push(new Bk("Content-Type",null!=this.contentType?this.contentType:"application/x-www-form-urlencoded"));return a},__class__:be};var Bk=function(a,b){null==b&&(b="");null==a&&(a="");this.name=a;this.value=b};g["openfl.net.URLRequestHeader"]=Bk;Bk.__name__=["openfl","net","URLRequestHeader"];Bk.prototype={name:null,value:null,__class__:Bk};var tl=function(){};g["openfl.net.URLVariables"]=tl;tl.__name__=["openfl","net","URLVariables"];var Jl=function(){};g["openfl.system.LoaderContext"]=Jl;Jl.__name__=
["openfl","system","LoaderContext"];var md=g["openfl.text.AntiAliasType"]={__ename__:!0,__constructs__:["ADVANCED","NORMAL"]};md.ADVANCED=["ADVANCED",0];md.ADVANCED.toString=u;md.ADVANCED.__enum__=md;md.NORMAL=["NORMAL",1];md.NORMAL.toString=u;md.NORMAL.__enum__=md;var Ck=function(){};g["openfl.text.Font"]=Ck;Ck.__name__=["openfl","text","Font"];Ck.__super__=bl;Ck.prototype=t(bl.prototype,{__class__:Ck});var gc=g["openfl.text.GridFitType"]={__ename__:!0,__constructs__:["NONE","PIXEL","SUBPIXEL"]};
gc.NONE=["NONE",0];gc.NONE.toString=u;gc.NONE.__enum__=gc;gc.PIXEL=["PIXEL",1];gc.PIXEL.toString=u;gc.PIXEL.__enum__=gc;gc.SUBPIXEL=["SUBPIXEL",2];gc.SUBPIXEL.toString=u;gc.SUBPIXEL.__enum__=gc;var ia=g["openfl.text.TextFieldAutoSize"]={__ename__:!0,__constructs__:["CENTER","LEFT","NONE","RIGHT"]};ia.CENTER=["CENTER",0];ia.CENTER.toString=u;ia.CENTER.__enum__=ia;ia.LEFT=["LEFT",1];ia.LEFT.toString=u;ia.LEFT.__enum__=ia;ia.NONE=["NONE",2];ia.NONE.toString=u;ia.NONE.__enum__=ia;ia.RIGHT=["RIGHT",3];
ia.RIGHT.toString=u;ia.RIGHT.__enum__=ia;var Ic=g["openfl.text.TextFieldType"]={__ename__:!0,__constructs__:["DYNAMIC","INPUT"]};Ic.DYNAMIC=["DYNAMIC",0];Ic.DYNAMIC.toString=u;Ic.DYNAMIC.__enum__=Ic;Ic.INPUT=["INPUT",1];Ic.INPUT.toString=u;Ic.INPUT.__enum__=Ic;var jd=function(a,b,c,d,e,f,g,h,k,l,m,p,q){this.font=a;this.size=b;this.color=c;this.bold=d;this.italic=e;this.underline=f;this.url=g;this.target=h;this.align=k;this.leftMargin=l;this.rightMargin=m;this.indent=p;this.leading=q};g["openfl.text.TextFormat"]=
jd;jd.__name__=["openfl","text","TextFormat"];jd.prototype={align:null,blockIndent:null,bold:null,bullet:null,color:null,font:null,indent:null,italic:null,kerning:null,leading:null,leftMargin:null,letterSpacing:null,rightMargin:null,size:null,tabStops:null,target:null,underline:null,url:null,clone:function(){var a=new jd(this.font,this.size,this.color,this.bold,this.italic,this.underline,this.url,this.target);a.align=this.align;a.leftMargin=this.leftMargin;a.rightMargin=this.rightMargin;a.indent=
this.indent;a.leading=this.leading;a.blockIndent=this.blockIndent;a.bullet=this.bullet;a.kerning=this.kerning;a.letterSpacing=this.letterSpacing;a.tabStops=this.tabStops;return a},__merge:function(a){null!=a.font&&(this.font=a.font);null!=a.size&&(this.size=a.size);null!=a.color&&(this.color=a.color);null!=a.bold&&(this.bold=a.bold);null!=a.italic&&(this.italic=a.italic);null!=a.underline&&(this.underline=a.underline);null!=a.url&&(this.url=a.url);null!=a.target&&(this.target=a.target);null!=a.align&&
(this.align=a.align);null!=a.leftMargin&&(this.leftMargin=a.leftMargin);null!=a.rightMargin&&(this.rightMargin=a.rightMargin);null!=a.indent&&(this.indent=a.indent);null!=a.leading&&(this.leading=a.leading);null!=a.blockIndent&&(this.blockIndent=a.blockIndent);null!=a.bullet&&(this.bullet=a.bullet);null!=a.kerning&&(this.kerning=a.kerning);null!=a.letterSpacing&&(this.letterSpacing=a.letterSpacing);null!=a.tabStops&&(this.tabStops=a.tabStops)},__class__:jd};var T=g["openfl.text.TextFormatAlign"]=
{__ename__:!0,__constructs__:["LEFT","RIGHT","JUSTIFY","CENTER"]};T.LEFT=["LEFT",0];T.LEFT.toString=u;T.LEFT.__enum__=T;T.RIGHT=["RIGHT",1];T.RIGHT.toString=u;T.RIGHT.__enum__=T;T.JUSTIFY=["JUSTIFY",2];T.JUSTIFY.toString=u;T.JUSTIFY.__enum__=T;T.CENTER=["CENTER",3];T.CENTER.toString=u;T.CENTER.__enum__=T;var za=function(){};g["openfl.ui.GameInput"]=za;za.__name__=["openfl","ui","GameInput"];za.__getDevice=function(a){if(null==a)return null;if(null==za.__devices.h.__keys__[a.__id__]){var b=new Dk(null==
a.id?"null":""+a.id,null);za.__devices.set(a,b);za.numDevices=Qd.count(za.__devices)}return za.__devices.h[a.__id__]};za.__onGamepadAxisMove=function(a,b,c){a=za.__getDevice(a);if(null!=a&&a.enabled){if(!a.__axis.h.hasOwnProperty(b)){var d;switch(b){case 0:d="LEFT_X";break;case 1:d="LEFT_Y";break;case 2:d="RIGHT_X";break;case 3:d="RIGHT_Y";break;case 4:d="TRIGGER_LEFT";break;case 5:d="TRIGGER_RIGHT";break;default:d="UNKNOWN ("+b+")"}d=new Md(a,"AXIS_"+d,-1,1);a.__axis.h[b]=d;a.__controls.push(d)}b=
a.__axis.h[b];b.value=c;b.dispatchEvent(new v(v.CHANGE))}};za.__onGamepadButtonDown=function(a,b){var c=za.__getDevice(a);if(null!=c&&c.enabled){if(!c.__button.h.hasOwnProperty(b)){var d;switch(b){case 0:d="A";break;case 1:d="B";break;case 2:d="X";break;case 3:d="Y";break;case 4:d="BACK";break;case 5:d="GUIDE";break;case 6:d="START";break;case 7:d="LEFT_STICK";break;case 8:d="RIGHT_STICK";break;case 9:d="LEFT_SHOULDER";break;case 10:d="RIGHT_SHOULDER";break;case 11:d="DPAD_UP";break;case 12:d="DPAD_DOWN";
break;case 13:d="DPAD_LEFT";break;case 14:d="DPAD_RIGHT";break;default:d="UNKNOWN ("+b+")"}d=new Md(c,"BUTTON_"+d,0,1);c.__button.h[b]=d;c.__controls.push(d)}c=c.__button.h[b];c.value=1;c.dispatchEvent(new v(v.CHANGE))}};za.__onGamepadButtonUp=function(a,b){var c=za.__getDevice(a);if(null!=c&&c.enabled){if(!c.__button.h.hasOwnProperty(b)){var d;switch(b){case 0:d="A";break;case 1:d="B";break;case 2:d="X";break;case 3:d="Y";break;case 4:d="BACK";break;case 5:d="GUIDE";break;case 6:d="START";break;
case 7:d="LEFT_STICK";break;case 8:d="RIGHT_STICK";break;case 9:d="LEFT_SHOULDER";break;case 10:d="RIGHT_SHOULDER";break;case 11:d="DPAD_UP";break;case 12:d="DPAD_DOWN";break;case 13:d="DPAD_LEFT";break;case 14:d="DPAD_RIGHT";break;default:d="UNKNOWN ("+b+")"}d=new Md(c,"BUTTON_"+d,0,1);c.__button.h[b]=d;c.__controls.push(d)}c=c.__button.h[b];c.value=0;c.dispatchEvent(new v(v.CHANGE))}};za.__onGamepadConnect=function(a){a=za.__getDevice(a);if(null!=a)for(var b=0,c=za.__instances;b<c.length;){var d=
c[b];++b;d.dispatchEvent(new qd(qd.DEVICE_ADDED,null,null,a))}};za.__onGamepadDisconnect=function(a){var b=za.__devices.h[a.__id__];if(null!=b){za.__devices.remove(a);za.numDevices=Qd.count(za.__devices);a=0;for(var c=za.__instances;a<c.length;){var d=c[a];++a;d.dispatchEvent(new qd(qd.DEVICE_REMOVED,null,null,b))}}};za.__super__=ba;za.prototype=t(ba.prototype,{__class__:za});var Md=function(a,b,c,d,e){null==e&&(e=0);ba.call(this);this.device=a;this.id=b;this.minValue=c;this.maxValue=d;this.value=
e};g["openfl.ui.GameInputControl"]=Md;Md.__name__=["openfl","ui","GameInputControl"];Md.__super__=ba;Md.prototype=t(ba.prototype,{device:null,id:null,maxValue:null,minValue:null,value:null,__class__:Md});var Dk=function(a,b){this.__controls=[];this.__button=new Tb;this.__axis=new Tb;this.id=a;this.name=b;for(var c,d=0;6>d;){var e=d++;c=new Md(this,"AXIS_"+e,-1,1);this.__axis.h[e]=c;this.__controls.push(c)}for(d=0;15>d;)e=d++,c=new Md(this,"BUTTON_"+e,0,1),this.__button.h[e]=c,this.__controls.push(c)};
g["openfl.ui.GameInputDevice"]=Dk;Dk.__name__=["openfl","ui","GameInputDevice"];Dk.prototype={enabled:null,id:null,name:null,__axis:null,__button:null,__controls:null,__class__:Dk};var il=function(){};g["openfl.ui.Keyboard"]=il;il.__name__=["openfl","ui","Keyboard"];il.__getCharCode=function(a,b){null==b&&(b=!1);if(b){switch(a){case 48:return 41;case 49:return 33;case 50:return 64;case 51:return 35;case 52:return 36;case 53:return 37;case 54:return 94;case 55:return 38;case 56:return 42;case 57:return 40;
case 186:return 58;case 187:return 43;case 188:return 60;case 189:return 95;case 190:return 62;case 191:return 63;case 192:return 126;case 219:return 123;case 220:return 124;case 221:return 125;case 222:return 34}if(65<=a&&90>=a)return a-65+65}else{switch(a){case 8:return 8;case 9:return 9;case 13:return 13;case 27:return 27;case 32:return 32;case 186:return 59;case 187:return 61;case 188:return 44;case 189:return 45;case 190:return 46;case 191:return 47;case 192:return 96;case 219:return 91;case 220:return 92;
case 221:return 93;case 222:return 39}if(48<=a&&57>=a)return a-48+48;if(65<=a&&90>=a)return a-65+97}if(96<=a&&105>=a)return a-96+48;switch(a){case 106:return 42;case 107:return 43;case 108:return 44;case 110:return 45;case 111:return 46;case 46:return 127;case 13:return 13;case 8:return 8}return 0};var ll=function(){};g["haxe.lang.Iterator"]=ll;ll.__name__=["haxe","lang","Iterator"];ll.prototype={hasNext:null,next:null,__class__:ll};var ml=function(){};g["haxe.lang.Iterable"]=ml;ml.__name__=["haxe",
"lang","Iterable"];ml.prototype={iterator:null,__class__:ml};var Ek=function(){this.position={x:0,y:0};this.direction={x:0,y:0};this.startPos={x:0,y:0};this.color={r:0,g:0,b:0,a:0};this.colorDelta={r:0,g:0,b:0,a:0}};g["org.zamedev.particles.Particle"]=Ek;Ek.__name__=["org","zamedev","particles","Particle"];Ek.prototype={startPos:null,position:null,direction:null,color:null,colorDelta:null,rotation:null,rotationDelta:null,radius:null,radiusDelta:null,angle:null,angleDelta:null,particleSize:null,particleSizeDelta:null,
radialAcceleration:null,tangentialAcceleration:null,timeToLive:null,update:function(a,b){this.timeToLive-=b;if(0>=this.timeToLive)return!1;if(1==a.emitterType)this.angle+=this.angleDelta*b,this.radius+=this.radiusDelta*b,this.position.x=this.startPos.x-Math.cos(this.angle)*this.radius,this.position.y=this.startPos.y-Math.sin(this.angle)*this.radius*a.yCoordMultiplier;else{var c=0,d=0;this.position.x-=this.startPos.x;this.position.y=(this.position.y-this.startPos.y)*a.yCoordMultiplier;if(0!=this.position.x||
0!=this.position.y)d=Math.sqrt(this.position.x*this.position.x+this.position.y*this.position.y),c=this.position.x/d,d=this.position.y/d;var e=-d,f=c,c=c*this.radialAcceleration,d=d*this.radialAcceleration,e=e*this.tangentialAcceleration,f=f*this.tangentialAcceleration;this.direction.x+=(c+e+a.gravity.x)*b;this.direction.y+=(d+f+a.gravity.y)*b;this.position.x+=this.direction.x*b+this.startPos.x;this.position.y=(this.position.y+this.direction.y*b)*a.yCoordMultiplier+this.startPos.y}this.color.r+=this.colorDelta.r*
b;this.color.g+=this.colorDelta.g*b;this.color.b+=this.colorDelta.b*b;this.color.a+=this.colorDelta.a*b;this.particleSize+=this.particleSizeDelta*b;this.particleSize=Math.max(0,this.particleSize);this.rotation+=this.rotationDelta*b;return!0},__class__:Ek};var og=function(){this.restart=this.active=!1;this.particleScaleSize=this.particleScaleY=this.particleScaleX=1};g["org.zamedev.particles.ParticleSystem"]=og;og.__name__=["org","zamedev","particles","ParticleSystem"];og.prototype={emitterType:null,
maxParticles:null,positionType:null,duration:null,gravity:null,particleLifespan:null,particleLifespanVariance:null,speed:null,speedVariance:null,sourcePosition:null,sourcePositionVariance:null,angle:null,angleVariance:null,startParticleSize:null,startParticleSizeVariance:null,finishParticleSize:null,finishParticleSizeVariance:null,startColor:null,startColorVariance:null,finishColor:null,finishColorVariance:null,minRadius:null,minRadiusVariance:null,maxRadius:null,maxRadiusVariance:null,rotationStart:null,
rotationStartVariance:null,rotationEnd:null,rotationEndVariance:null,radialAcceleration:null,radialAccelerationVariance:null,tangentialAcceleration:null,tangentialAccelerationVariance:null,rotatePerSecond:null,rotatePerSecondVariance:null,blendFuncSource:null,blendFuncDestination:null,textureBitmapData:null,active:null,restart:null,particleScaleX:null,particleScaleY:null,particleScaleSize:null,yCoordMultiplier:null,prevTime:null,emissionRate:null,emitCounter:null,elapsedTime:null,__particleList:null,
__particleCount:null,__initialize:function(){772==this.blendFuncSource&&(this.blendFuncSource=1);772==this.blendFuncDestination&&(this.blendFuncDestination=1);this.prevTime=-1;this.emissionRate=this.maxParticles/Math.max(1E-4,this.particleLifespan);this.elapsedTime=this.emitCounter=0;this.__particleList=[];for(var a=this.__particleCount=0,b=this.maxParticles;a<b;){var c=a++;this.__particleList[c]=new Ek}return this},__update:function(){var a=kc.stamp();if(0>this.prevTime)return this.prevTime=a,!1;
var b=a-this.prevTime;if(1E-4>b)return!1;this.prevTime=a;if(this.active&&0<this.emissionRate){a=1/this.emissionRate;for(this.emitCounter+=b;this.__particleCount<this.maxParticles&&this.emitCounter>a;)this.initParticle(this.__particleList[this.__particleCount]),this.__particleCount++,this.emitCounter-=a;this.emitCounter>a&&(this.emitCounter%=a);this.elapsedTime+=b;0<=this.duration&&this.duration<this.elapsedTime&&this.stop()}a=!1;0<this.__particleCount&&(a=!0);for(var c=0;c<this.__particleCount;)if(this.__particleList[c].update(this,
b))c++;else{if(c!=this.__particleCount-1){var d=this.__particleList[c];this.__particleList[c]=this.__particleList[this.__particleCount-1];this.__particleList[this.__particleCount-1]=d}this.__particleCount--}0<this.__particleCount?a=!0:this.restart&&(this.active=!0);return a},initParticle:function(a){a.timeToLive=Math.max(1E-4,this.particleLifespan+this.particleLifespanVariance*(2*Math.random()-1));a.startPos.x=this.sourcePosition.x/this.particleScaleX;a.startPos.y=this.sourcePosition.y/this.particleScaleY;
a.color={r:wa.clamp(this.startColor.r+this.startColorVariance.r*(2*Math.random()-1)),g:wa.clamp(this.startColor.g+this.startColorVariance.g*(2*Math.random()-1)),b:wa.clamp(this.startColor.b+this.startColorVariance.b*(2*Math.random()-1)),a:wa.clamp(this.startColor.a+this.startColorVariance.a*(2*Math.random()-1))};a.colorDelta={r:(wa.clamp(this.finishColor.r+this.finishColorVariance.r*(2*Math.random()-1))-a.color.r)/a.timeToLive,g:(wa.clamp(this.finishColor.g+this.finishColorVariance.g*(2*Math.random()-
1))-a.color.g)/a.timeToLive,b:(wa.clamp(this.finishColor.b+this.finishColorVariance.b*(2*Math.random()-1))-a.color.b)/a.timeToLive,a:(wa.clamp(this.finishColor.a+this.finishColorVariance.a*(2*Math.random()-1))-a.color.a)/a.timeToLive};a.particleSize=Math.max(0,this.startParticleSize+this.startParticleSizeVariance*(2*Math.random()-1));a.particleSizeDelta=(Math.max(0,this.finishParticleSize+this.finishParticleSizeVariance*(2*Math.random()-1))-a.particleSize)/a.timeToLive;a.rotation=this.rotationStart+
this.rotationStartVariance*(2*Math.random()-1);a.rotationDelta=(this.rotationEnd+this.rotationEndVariance*(2*Math.random()-1)-a.rotation)/a.timeToLive;var b=this.angle+this.angleVariance*(2*Math.random()-1),c=this.speed+this.speedVariance*(2*Math.random()-1);a.position.x=a.startPos.x+this.sourcePositionVariance.x*(2*Math.random()-1);a.position.y=a.startPos.y+this.sourcePositionVariance.y*(2*Math.random()-1);a.direction.x=Math.cos(b)*c;a.direction.y=Math.sin(b)*c;a.radialAcceleration=this.radialAcceleration+
this.radialAccelerationVariance*(2*Math.random()-1);a.tangentialAcceleration=this.tangentialAcceleration+this.tangentialAccelerationVariance*(2*Math.random()-1);a.angle=b;a.angleDelta=(this.rotatePerSecond+this.rotatePerSecondVariance*(2*Math.random()-1))/a.timeToLive;a.radius=this.maxRadius+this.maxRadiusVariance*(2*Math.random()-1);a.radiusDelta=(this.minRadius+this.minRadiusVariance*(2*Math.random()-1)-a.radius)/a.timeToLive},emit:function(a,b){null!=a&&(this.sourcePosition.x=a);null!=b&&(this.sourcePosition.y=
b);this.active=!0},stop:function(){this.active=!1;this.emitCounter=this.elapsedTime=0},__class__:og};var pg=function(a){if(8>a.length)throw new m("invalid header: size");this.data=a;if(77==a.b[0]&&77==a.b[1])this.isBigEndian=!0;else if(73==a.b[0]&&73==a.b[1])this.isBigEndian=!1;else throw new m("invalid header: Identifier");if(42!=this.getUShort(2))throw new m("invalid header: Version");this.ifdOffset=this.getULong(4);if(this.ifdOffset>=a.length)throw new m("invalid header: IFDOffset");};g["org.zamedev.particles.internal.tiff.TiffDecoder"]=
pg;pg.__name__="org zamedev particles internal tiff TiffDecoder".split(" ");pg.decode=function(a){return(new pg(a)).run()};pg.prototype={data:null,isBigEndian:null,ifdOffset:null,run:function(){return this.parseIfd(this.ifdOffset)},parseIfd:function(a){var b=this.getUShort(a);a+=2;for(var c=new Tb,d=0;d<b;)d++,this.parseTag(a,c),a+=12;return this.parseImage(c)},parseImage:function(a){if(!(a.h.hasOwnProperty(256)&&a.h.hasOwnProperty(257)&&a.h.hasOwnProperty(262)&&a.h.hasOwnProperty(273)&&a.h.hasOwnProperty(279)))throw new m("required tags are missing: ImageWidth | ImageLength | PhotometricInterpretation | StripOffsets | StripByteCounts");
if(2!=a.h[262][0])throw new m("PhotometricInterpretation must be = RGB");if(1!=this.getOrDefault(a,259,[1])[0])throw new m("Compression must be = Uncompressed");if(1!=this.getOrDefault(a,274,[1])[0])throw new m("Orientation must be = 1");if(1!=this.getOrDefault(a,284,[1])[0])throw new m("PlanarConfiguration must be = Chunky");var b=a.h[257][0],c=this.getOrDefault(a,278,[-1])[0],c=(b+c-1)/c|0;if(4!=this.getOrDefault(a,277,[1])[0])throw new m("SamplesPerPixel must be = 4");if(!this.compareArray(this.getOrDefault(a,
258,[1,1,1,1]),[8,8,8,8]))throw new m("BitsPerSample must be = [8, 8, 8, 8]");for(var d=this.getOrDefault(a,339,[1,1,1,1]),e=0,f=d.length;e<f;){var g=e++;4==d[g]&&(d[g]=1)}if(!this.compareArray(d,[1,1,1,1]))throw new m("unsupported SampleFormat value");d=this.getOrDefault(a,338,[]);if(1!=d.length)throw new m("ExtraSamples.length must be = 1");d=d[0];if(1!=d&&2!=d)throw new m("unsupported ExtraSamples value");d=a.h[273];if(d.length!=c)throw new m("invalid StripOffsets length");e=a.h[279];if(d.length!=
c)throw new m("invalid StripByteCounts length");a=a.h[256][0];f=Qd.fold(e,function(a,b){return a+b},0);if(a*b*4!=f)throw new m("invalid StripByteCounts value");for(g=0;g<e.length;){var h=e[g];++g;if(0!=h%4)throw new m("each StripByteCounts element must be dividable by 4");}f=new Ta(f);f.position=0;g=Ta.fromBytes(this.data);for(h=0;h<c;){var k=h++;g.position=d[k];for(var k=e[k]/4|0,l=0;l<k;){l++;var p=g.readUnsignedByte(),q=g.readUnsignedByte(),r=g.readUnsignedByte(),t=g.readUnsignedByte();f.writeByte(t);
f.writeByte(p);f.writeByte(q);f.writeByte(r)}}f.position=0;return{width:a,height:b,pixels:f}},getOrDefault:function(a,b,c){return a.h.hasOwnProperty(b)?a.h[b]:c},compareArray:function(a,b){if(a.length!=b.length)return!1;for(var c=0,d=a.length;c<d;){var e=c++;if(a[e]!=b[e])return!1}return!0},parseTag:function(a,b){var c=this.getUShort(a);switch(c){case 256:case 257:case 258:case 259:case 262:case 273:case 274:case 277:case 278:case 279:case 284:case 338:case 339:var d=this.parseTagData(a);b.h[c]=d;
d}},parseTagData:function(a){var b=this.getUShort(a+2),c=this.getULong(a+4);if(0==c)throw new m("data count is zero");var d;switch(b){case 1:case 2:case 6:case 7:d=1;break;case 3:case 8:d=2;break;case 4:case 9:d=4;break;case 11:throw new m("unsupported data type: FLOAT");case 5:case 10:case 12:throw new m("unsupported data type: RATIONAL | SRATIONAL | DOUBLE");}a=4>=c*d?a+8:this.getULong(a+8);d=[];for(var e=0;e<c;)switch(e++,b){case 1:case 2:case 7:d.push(this.data.b[a]);a++;break;case 6:d.push(this.getSByte(a));
a++;break;case 3:d.push(this.getUShort(a));a+=2;break;case 8:d.push(this.getSShort(a));a+=2;break;case 4:d.push(this.getULong(a));a+=4;break;case 9:d.push(this.getSLong(a)),a+=4}return d},getSByte:function(a){a=this.data.b[a];return 127>=a?a:a-256},getUShort:function(a){return this.isBigEndian?this.data.b[a]<<8|this.data.b[a+1]:this.data.b[a]|this.data.b[a+1]<<8},getSShort:function(a){a=this.getUShort(a);return 32767>=a?a:a-65536},getULong:function(a){return this.isBigEndian?this.data.b[a]<<24|this.data.b[a+
1]<<16|this.data.b[a+2]<<8|this.data.b[a+3]:this.data.b[a]|this.data.b[a+1]<<8|this.data.b[a+2]<<16|this.data.b[a+3]<<24},getSLong:function(a){a=this.getULong(a);return 2147483647>=a?a:a-2147483647-2147483647-2},__class__:pg};var bd=function(){};g["org.zamedev.particles.loaders.JsonParticleLoader"]=bd;bd.__name__=["org","zamedev","particles","loaders","JsonParticleLoader"];bd.load=function(a){var b=vj.parse(bb.getText(a)),c=new og;c.emitterType=O.asInt(b.emitterType);c.maxParticles=O.asInt(b.maxParticles);
c.positionType=0;c.duration=O.asFloat(b.duration);c.gravity=bd.asVector(b,"gravity");c.particleLifespan=O.asFloat(b.particleLifespan);c.particleLifespanVariance=O.asFloat(b.particleLifespanVariance);c.speed=O.asFloat(b.speed);c.speedVariance=O.asFloat(b.speedVariance);c.sourcePosition={x:0,y:0};c.sourcePositionVariance=bd.asVector(b,"sourcePositionVariance");c.angle=wa.deg2rad(O.asFloat(b.angle));c.angleVariance=wa.deg2rad(O.asFloat(b.angleVariance));c.startParticleSize=O.asFloat(b.startParticleSize);
c.startParticleSizeVariance=O.asFloat(b.startParticleSizeVariance);c.finishParticleSize=O.asFloat(b.finishParticleSize);c.finishParticleSizeVariance=O.asFloat(b.finishParticleSizeVariance);c.startColor=bd.asColor(b,"startColor");c.startColorVariance=bd.asColor(b,"startColorVariance");c.finishColor=bd.asColor(b,"finishColor");c.finishColorVariance=bd.asColor(b,"finishColorVariance");c.minRadius=O.asFloat(b.minRadius);c.minRadiusVariance=O.asFloat(b.minRadiusVariance);c.maxRadius=O.asFloat(b.maxRadius);
c.maxRadiusVariance=O.asFloat(b.maxRadiusVariance);c.rotationStart=wa.deg2rad(O.asFloat(b.rotationStart));c.rotationStartVariance=wa.deg2rad(O.asFloat(b.rotationStartVariance));c.rotationEnd=wa.deg2rad(O.asFloat(b.rotationEnd));c.rotationEndVariance=wa.deg2rad(O.asFloat(b.rotationEndVariance));c.rotatePerSecond=wa.deg2rad(O.asFloat(b.rotatePerSecond));c.rotatePerSecondVariance=wa.deg2rad(O.asFloat(b.rotatePerSecondVariance));c.radialAcceleration=O.asFloat(b.radialAcceleration);c.radialAccelerationVariance=
O.asFloat(b.radialAccelVariance);c.tangentialAcceleration=O.asFloat(b.tangentialAcceleration);c.tangentialAccelerationVariance=O.asFloat(b.tangentialAccelVariance);c.blendFuncSource=O.asInt(b.blendFuncSource);c.blendFuncDestination=O.asInt(b.blendFuncDestination);c.textureBitmapData=Ge.loadTexture(O.asString(b.textureImageData),O.asString(b.textureFileName),a);1==O.asInt(b.yCoordFlipped)?c.yCoordMultiplier=-1:c.yCoordMultiplier=1;return c};bd.asVector=function(a,b){return{x:O.asFloat(a[""+b+"x"]),
y:O.asFloat(a[""+b+"y"])}};bd.asColor=function(a,b){return{r:O.asFloat(a[""+b+"Red"]),g:O.asFloat(a[""+b+"Green"]),b:O.asFloat(a[""+b+"Blue"]),a:O.asFloat(a[""+b+"Alpha"])}};var Ge=function(){};g["org.zamedev.particles.loaders.ParticleLoader"]=Ge;Ge.__name__=["org","zamedev","particles","loaders","ParticleLoader"];Ge.load=function(a){var b=vc.extension(a).toLowerCase();switch(b){case "plist":return Lc.load(a);case "json":return bd.load(a);case "pex":case "lap":return fa.load(a);default:throw new m(new zc('Unsupported extension "'+
b+'"'));}};Ge.loadTexture=function(a,b,c){if(null==a||0==a.length)return bb.getBitmapData(vc.directory(c)+"/"+b);a=Ye.decode(a);31==a.b[0]&&139==a.b[1]&&(a=(new Bj(new He(a))).read().data);a=pg.decode(a);b=new Ra(a.width,a.height,!0,0);b.setPixels(new ha(0,0,a.width,a.height),a.pixels);return b};var fa=function(){};g["org.zamedev.particles.loaders.PexLapParticleLoader"]=fa;fa.__name__=["org","zamedev","particles","loaders","PexLapParticleLoader"];fa.load=function(a){var b=A.parse(bb.getText(a)).firstElement();
if(b.nodeType!=A.Element)throw new m("Bad node type, expected Element but found "+b.nodeType);var c;if(c="particleEmitterConfig"!=b.nodeName){if(b.nodeType!=A.Element)throw new m("Bad node type, expected Element but found "+b.nodeType);c="lanicaAnimoParticles"!=b.nodeName}if(c){a=m;if(b.nodeType!=A.Element)throw"Bad node type, expected Element but found "+b.nodeType;throw new a(new zc('Expecting "particleEmitterConfig" or "lanicaAnimoParticles", but "'+b.nodeName+'" found'));}c=new ka;for(b=b.elements();b.hasNext();){var d=
b.next(),e;if(d.nodeType!=A.Element)throw new m("Bad node type, expected Element but found "+d.nodeType);e=d.nodeName;null!=J[e]?c.setReserved(e,d):c.h[e]=d;d}b=new og;b.emitterType=fa.parseIntNode(null!=J.emitterType?c.getReserved("emitterType"):c.h.emitterType);b.maxParticles=fa.parseIntNode(null!=J.maxParticles?c.getReserved("maxParticles"):c.h.maxParticles);b.positionType=0;b.duration=fa.parseFloatNode(null!=J.duration?c.getReserved("duration"):c.h.duration);b.gravity=fa.parseVectorNode(null!=
J.gravity?c.getReserved("gravity"):c.h.gravity);b.particleLifespan=fa.parseFloatNode(null!=J.particleLifeSpan?c.getReserved("particleLifeSpan"):c.h.particleLifeSpan);b.particleLifespanVariance=fa.parseFloatNode(null!=J.particleLifespanVariance?c.getReserved("particleLifespanVariance"):c.h.particleLifespanVariance);b.speed=fa.parseFloatNode(null!=J.speed?c.getReserved("speed"):c.h.speed);b.speedVariance=fa.parseFloatNode(null!=J.speedVariance?c.getReserved("speedVariance"):c.h.speedVariance);b.sourcePosition=
fa.parseVectorNode(null!=J.sourcePosition?c.getReserved("sourcePosition"):c.h.sourcePosition);b.sourcePositionVariance=fa.parseVectorNode(null!=J.sourcePositionVariance?c.getReserved("sourcePositionVariance"):c.h.sourcePositionVariance);b.angle=wa.deg2rad(fa.parseFloatNode(null!=J.angle?c.getReserved("angle"):c.h.angle));b.angleVariance=wa.deg2rad(fa.parseFloatNode(null!=J.angleVariance?c.getReserved("angleVariance"):c.h.angleVariance));b.startParticleSize=fa.parseFloatNode(null!=J.startParticleSize?
c.getReserved("startParticleSize"):c.h.startParticleSize);b.startParticleSizeVariance=fa.parseFloatNode(null!=J.startParticleSizeVariance?c.getReserved("startParticleSizeVariance"):c.h.startParticleSizeVariance);b.finishParticleSize=fa.parseFloatNode(null!=J.finishParticleSize?c.getReserved("finishParticleSize"):c.h.finishParticleSize);b.finishParticleSizeVariance=fa.parseFloatNode(null!=J.finishParticleSizeVariance?c.getReserved("finishParticleSizeVariance"):c.h.finishParticleSizeVariance);b.startColor=
fa.parseColorNode(null!=J.startColor?c.getReserved("startColor"):c.h.startColor);b.startColorVariance=fa.parseColorNode(null!=J.startColorVariance?c.getReserved("startColorVariance"):c.h.startColorVariance);b.finishColor=fa.parseColorNode(null!=J.finishColor?c.getReserved("finishColor"):c.h.finishColor);b.finishColorVariance=fa.parseColorNode(null!=J.finishColorVariance?c.getReserved("finishColorVariance"):c.h.finishColorVariance);b.minRadius=fa.parseFloatNode(null!=J.minRadius?c.getReserved("minRadius"):
c.h.minRadius);b.minRadiusVariance=fa.parseFloatNode(null!=J.minRadiusVariance?c.getReserved("minRadiusVariance"):c.h.minRadiusVariance);b.maxRadius=fa.parseFloatNode(null!=J.maxRadius?c.getReserved("maxRadius"):c.h.maxRadius);b.maxRadiusVariance=fa.parseFloatNode(null!=J.maxRadiusVariance?c.getReserved("maxRadiusVariance"):c.h.maxRadiusVariance);b.rotationStart=wa.deg2rad(fa.parseFloatNode(null!=J.rotationStart?c.getReserved("rotationStart"):c.h.rotationStart));b.rotationStartVariance=wa.deg2rad(fa.parseFloatNode(null!=
J.rotationStartVariance?c.getReserved("rotationStartVariance"):c.h.rotationStartVariance));b.rotationEnd=wa.deg2rad(fa.parseFloatNode(null!=J.rotationEnd?c.getReserved("rotationEnd"):c.h.rotationEnd));b.rotationEndVariance=wa.deg2rad(fa.parseFloatNode(null!=J.rotationEndVariance?c.getReserved("rotationEndVariance"):c.h.rotationEndVariance));b.rotatePerSecond=wa.deg2rad(fa.parseFloatNode(null!=J.rotatePerSecond?c.getReserved("rotatePerSecond"):c.h.rotatePerSecond));b.rotatePerSecondVariance=wa.deg2rad(fa.parseFloatNode(null!=
J.rotatePerSecondVariance?c.getReserved("rotatePerSecondVariance"):c.h.rotatePerSecondVariance));b.radialAcceleration=fa.parseFloatNode(null!=J.radialAcceleration?c.getReserved("radialAcceleration"):c.h.radialAcceleration);b.radialAccelerationVariance=fa.parseFloatNode(null!=J.radialAccelVariance?c.getReserved("radialAccelVariance"):c.h.radialAccelVariance);b.tangentialAcceleration=fa.parseFloatNode(null!=J.tangentialAcceleration?c.getReserved("tangentialAcceleration"):c.h.tangentialAcceleration);
b.tangentialAccelerationVariance=fa.parseFloatNode(null!=J.tangentialAccelVariance?c.getReserved("tangentialAccelVariance"):c.h.tangentialAccelVariance);b.blendFuncSource=fa.parseIntNode(null!=J.blendFuncSource?c.getReserved("blendFuncSource"):c.h.blendFuncSource);b.blendFuncDestination=fa.parseIntNode(null!=J.blendFuncDestination?c.getReserved("blendFuncDestination"):c.h.blendFuncDestination);b.textureBitmapData=Ge.loadTexture((null!=J.texture?c.getReserved("texture"):c.h.texture).get("data"),(null!=
J.texture?c.getReserved("texture"):c.h.texture).get("name"),a);1==fa.parseIntNode(null!=J.yCoordFlipped?c.getReserved("yCoordFlipped"):c.h.yCoordFlipped)?b.yCoordMultiplier=-1:b.yCoordMultiplier=1;return b};fa.parseIntNode=function(a){return null==a?0:fa.parseIntString(a.get("value"))};fa.parseFloatNode=function(a){return null==a?0:fa.parseFloatString(a.get("value"))};fa.parseVectorNode=function(a){return null==a?{x:0,y:0}:{x:fa.parseFloatString(a.get("x")),y:fa.parseFloatString(a.get("y"))}};fa.parseColorNode=
function(a){return null==a?{r:0,g:0,b:0,a:0}:{r:fa.parseFloatString(a.get("red")),g:fa.parseFloatString(a.get("green")),b:fa.parseFloatString(a.get("blue")),a:fa.parseFloatString(a.get("alpha"))}};fa.parseIntString=function(a){if(null==a)return 0;a=K.parseInt(a);return null==a?0:a};fa.parseFloatString=function(a){if(null==a)return 0;a=parseFloat(a);return isNaN(a)?0:a};var Lc=function(){};g["org.zamedev.particles.loaders.PlistParticleLoader"]=Lc;Lc.__name__=["org","zamedev","particles","loaders",
"PlistParticleLoader"];Lc.load=function(a){var b=A.parse(bb.getText(a)).firstElement().firstElement();if(b.nodeType!=A.Element)throw new m("Bad node type, expected Element but found "+b.nodeType);if("dict"!=b.nodeName){a=m;if(b.nodeType!=A.Element)throw"Bad node type, expected Element but found "+b.nodeType;throw new a(new zc('Expecting "dict", but "'+b.nodeName+'" found'));}for(var c=null,d=new ka,b=b.elements();b.hasNext();){var e=b.next();if(null==c){if(e.nodeType!=A.Element)throw new m("Bad node type, expected Element but found "+
e.nodeType);if("key"==e.nodeName){c=Fk.innerText(e);if(""==c)throw new m(new zc("Empty key is not supported"));continue}a=m;if(e.nodeType!=A.Element)throw"Bad node type, expected Element but found "+e.nodeType;throw new a(new zc('Expecting element "key", but "'+e.nodeName+'" found'));}var f=Fk.innerText(e);if(e.nodeType!=A.Element)throw new m("Bad node type, expected Element but found "+e.nodeType);switch(e.nodeName){case "false":null!=J[c]?d.setReserved(c,!1):d.h[c]=!1;!1;break;case "true":null!=
J[c]?d.setReserved(c,!0):d.h[c]=!0;!0;break;case "real":e=parseFloat(f);if(isNaN(e))throw new m(new zc('Could not parse "'+f+'" as real (for key "'+c+'")'));null!=J[c]?d.setReserved(c,e):d.h[c]=e;e;break;case "integer":e=K.parseInt(f);if(null==e)throw new m(new zc('Could not parse "'+f+'" as integer (for key "'+c+'")'));null!=J[c]?d.setReserved(c,e):d.h[c]=e;e;break;case "string":null!=J[c]?d.setReserved(c,f):d.h[c]=f;f;break;default:a=m;if(e.nodeType!=A.Element)throw"Bad node type, expected Element but found "+
e.nodeType;throw new a(new zc('Unsupported element "'+e.nodeName+'"'));}c=null}c=new og;c.emitterType=O.asInt(null!=J.emitterType?d.getReserved("emitterType"):d.h.emitterType);c.maxParticles=O.asInt(null!=J.maxParticles?d.getReserved("maxParticles"):d.h.maxParticles);c.positionType=O.asInt(null!=J.positionType?d.getReserved("positionType"):d.h.positionType);c.duration=O.asFloat(null!=J.duration?d.getReserved("duration"):d.h.duration);c.gravity=Lc.asVector(d,"gravity");c.particleLifespan=O.asFloat(null!=
J.particleLifespan?d.getReserved("particleLifespan"):d.h.particleLifespan);c.particleLifespanVariance=O.asFloat(null!=J.particleLifespanVariance?d.getReserved("particleLifespanVariance"):d.h.particleLifespanVariance);c.speed=O.asFloat(null!=J.speed?d.getReserved("speed"):d.h.speed);c.speedVariance=O.asFloat(null!=J.speedVariance?d.getReserved("speedVariance"):d.h.speedVariance);c.sourcePosition=Lc.asVector(d,"sourcePosition");c.sourcePositionVariance=Lc.asVector(d,"sourcePositionVariance");c.angle=
wa.deg2rad(O.asFloat(null!=J.angle?d.getReserved("angle"):d.h.angle));c.angleVariance=wa.deg2rad(O.asFloat(null!=J.angleVariance?d.getReserved("angleVariance"):d.h.angleVariance));c.startParticleSize=O.asFloat(null!=J.startParticleSize?d.getReserved("startParticleSize"):d.h.startParticleSize);c.startParticleSizeVariance=O.asFloat(null!=J.startParticleSizeVariance?d.getReserved("startParticleSizeVariance"):d.h.startParticleSizeVariance);c.finishParticleSize=O.asFloat(null!=J.finishParticleSize?d.getReserved("finishParticleSize"):
d.h.finishParticleSize);c.finishParticleSizeVariance=O.asFloat(null!=J.finishParticleSizeVariance?d.getReserved("finishParticleSizeVariance"):d.h.finishParticleSizeVariance);c.startColor=Lc.asColor(d,"startColor");c.startColorVariance=Lc.asColor(d,"startColorVariance");c.finishColor=Lc.asColor(d,"finishColor");c.finishColorVariance=Lc.asColor(d,"finishColorVariance");c.minRadius=O.asFloat(null!=J.minRadius?d.getReserved("minRadius"):d.h.minRadius);c.minRadiusVariance=O.asFloat(null!=J.minRadiusVariance?
d.getReserved("minRadiusVariance"):d.h.minRadiusVariance);c.maxRadius=O.asFloat(null!=J.maxRadius?d.getReserved("maxRadius"):d.h.maxRadius);c.maxRadiusVariance=O.asFloat(null!=J.maxRadiusVariance?d.getReserved("maxRadiusVariance"):d.h.maxRadiusVariance);c.rotationStart=wa.deg2rad(O.asFloat(null!=J.rotationStart?d.getReserved("rotationStart"):d.h.rotationStart));c.rotationStartVariance=wa.deg2rad(O.asFloat(null!=J.rotationStartVariance?d.getReserved("rotationStartVariance"):d.h.rotationStartVariance));
c.rotationEnd=wa.deg2rad(O.asFloat(null!=J.rotationEnd?d.getReserved("rotationEnd"):d.h.rotationEnd));c.rotationEndVariance=wa.deg2rad(O.asFloat(null!=J.rotationEndVariance?d.getReserved("rotationEndVariance"):d.h.rotationEndVariance));c.rotatePerSecond=wa.deg2rad(O.asFloat(null!=J.rotatePerSecond?d.getReserved("rotatePerSecond"):d.h.rotatePerSecond));c.rotatePerSecondVariance=wa.deg2rad(O.asFloat(null!=J.rotatePerSecondVariance?d.getReserved("rotatePerSecondVariance"):d.h.rotatePerSecondVariance));
c.radialAcceleration=O.asFloat(null!=J.radialAcceleration?d.getReserved("radialAcceleration"):d.h.radialAcceleration);c.radialAccelerationVariance=O.asFloat(null!=J.radialAccelVariance?d.getReserved("radialAccelVariance"):d.h.radialAccelVariance);c.tangentialAcceleration=O.asFloat(null!=J.tangentialAcceleration?d.getReserved("tangentialAcceleration"):d.h.tangentialAcceleration);c.tangentialAccelerationVariance=O.asFloat(null!=J.tangentialAccelVariance?d.getReserved("tangentialAccelVariance"):d.h.tangentialAccelVariance);
c.blendFuncSource=O.asInt(null!=J.blendFuncSource?d.getReserved("blendFuncSource"):d.h.blendFuncSource);c.blendFuncDestination=O.asInt(null!=J.blendFuncDestination?d.getReserved("blendFuncDestination"):d.h.blendFuncDestination);c.textureBitmapData=Ge.loadTexture(O.asString(null!=J.textureImageData?d.getReserved("textureImageData"):d.h.textureImageData),O.asString(null!=J.textureFileName?d.getReserved("textureFileName"):d.h.textureFileName),a);1==O.asInt(null!=J.yCoordFlipped?d.getReserved("yCoordFlipped"):
d.h.yCoordFlipped)?c.yCoordMultiplier=-1:c.yCoordMultiplier=1;return c};Lc.asVector=function(a,b){return{x:O.asFloat(a.get(""+b+"x")),y:O.asFloat(a.get(""+b+"y"))}};Lc.asColor=function(a,b){return{r:O.asFloat(a.get(""+b+"Red")),g:O.asFloat(a.get(""+b+"Green")),b:O.asFloat(a.get(""+b+"Blue")),a:O.asFloat(a.get(""+b+"Alpha"))}};var Gk=function(){};g["org.zamedev.particles.renderers.ParticleSystemRenderer"]=Gk;Gk.__name__=["org","zamedev","particles","renderers","ParticleSystemRenderer"];Gk.prototype=
{addParticleSystem:null,__class__:Gk};var Mf=function(){this.dataList=[];C.call(this)};g["org.zamedev.particles.renderers.SpritesParticleRenderer"]=Mf;Mf.__name__=["org","zamedev","particles","renderers","SpritesParticleRenderer"];Mf.__interfaces__=[Gk];Mf.__super__=C;Mf.prototype=t(C.prototype,{dataList:null,addParticleSystem:function(a){0==this.dataList.length&&this.addEventListener(v.ENTER_FRAME,k(this,this.onEnterFrame));a.__initialize();for(var b=[],c=0,d=a.maxParticles;c<d;){c++;var e=new C;
e.set_visible(!1);var f=new Q(a.textureBitmapData);f.set_x(-a.textureBitmapData.width/2);f.set_y(-a.textureBitmapData.height/2);e.addChild(f);b.push({sprite:e,colorTransform:new Cc,visible:!1});this.addChild(e)}this.dataList.push({ps:a,spriteList:b,updated:!1});return this},onEnterFrame:function(a){a=!1;for(var b=0,c=this.dataList;b<c.length;){var d=c[b];++b;if(d.updated=d.ps.__update())a=!0}if(a)for(a=0,b=this.dataList;a<b.length;)if(c=b[a],++a,c.updated){for(var d=c.ps,c=c.spriteList,e=d.textureBitmapData.width,
f=0,g=d.__particleCount;f<g;){var h=f++,k=d.__particleList[h],h=c[h],l=h.sprite;l.set_x(k.position.x*d.particleScaleX);l.set_y(k.position.y*d.particleScaleY);var m=k.particleSize/e*d.particleScaleSize;l.set_scaleX(m);l.set_scaleY(m);l.set_rotation(180*k.rotation/Math.PI);m=h.colorTransform;m.redMultiplier=k.color.r;m.greenMultiplier=k.color.g;m.blueMultiplier=k.color.b;m.alphaMultiplier=k.color.a;l.get_transform().set_colorTransform(m);h.visible||(h.visible=!0,l.set_visible(!0))}d=d.__particleCount;
for(e=c.length;d<e;)f=d++,f=c[f],f.visible&&(f.visible=!1,f.sprite.set_visible(!1))}},__class__:Mf});var O=function(){};g["org.zamedev.particles.util.DynamicTools"]=O;O.__name__=["org","zamedev","particles","util","DynamicTools"];O.asInt=function(a,b){null==b&&(b=0);return(a|0)===a?a:"number"==typeof a?K["int"](a):b};O.asFloat=function(a,b){null==b&&(b=0);return"number"==typeof a||(a|0)===a?a:b};O.asString=function(a,b){null==b&&(b="");return null==a?b:K.string(a)};var wa=function(){};g["org.zamedev.particles.util.MathHelper"]=
wa;wa.__name__=["org","zamedev","particles","util","MathHelper"];wa.deg2rad=function(a){return a/180*Math.PI};wa.clamp=function(a){return 0>a?0:1>a?a:1};var Fk=function(){};g["org.zamedev.particles.util.XmlExt"]=Fk;Fk.__name__=["org","zamedev","particles","util","XmlExt"];Fk.innerText=function(a,b){null==b&&(b="");var c;if(a.nodeType!=A.Document&&a.nodeType!=A.Element)throw new m("Bad node type, expected Element or Document but found "+a.nodeType);c=a.children[0];if(null!=c&&(c.nodeType==A.PCData||
c.nodeType==A.CData)){if(c.nodeType==A.Document||c.nodeType==A.Element)throw new m("Bad node type, unexpected "+c.nodeType);return c.nodeValue}return b};var jb=function(a){this._fulfilled=this._errorPending=this._pending=this._resolved=!1;this._update=[];this._error=[];this._errored=!1;null!=a&&jb.link(a,this,function(a){return a})};g["promhx.base.AsyncBase"]=jb;jb.__name__=["promhx","base","AsyncBase"];jb.link=function(a,b,c){a._update.push({async:b,linkf:function(a){b.handleResolve(c(a))}});jb.immediateLinkUpdate(a,
b,c)};jb.immediateLinkUpdate=function(a,b,c){!a._errored||a._errorPending||0<a._error.length||b.handleError(a._errorVal);if(a._resolved&&!a._pending)try{b.handleResolve(c(a._val))}catch(d){d instanceof m&&(d=d.val),b.handleError(d)}};jb.linkAll=function(a,b){for(var c=function(c,d,e){if(0==c.length||jb.allFulfilled(c)){c=[];for(var g=dd(a)();g.hasNext();){var h=g.next();c.push(h==d?e:h._val)}b.handleResolve(c)}null},d=dd(a)();d.hasNext();){var e=d.next();e._update.push({async:b,linkf:function(a,b,
c){return function(d){a(b,c,d)}}(c,function(b){b=[];for(var c=dd(a)();c.hasNext();){var d=c.next();d!=e&&b.push(d)}return b}(this),e)})}jb.allFulfilled(a)&&b.handleResolve(function(b){b=[];for(var c=dd(a)();c.hasNext();){var d=c.next();b.push(d._val)}return b}(this))};jb.pipeLink=function(a,b,c){var d=!1,e=function(a){d||(d=!0,a=c(a),a._update.push({async:b,linkf:k(b,b.handleResolve)}),jb.immediateLinkUpdate(a,b,function(a){return a}))};a._update.push({async:b,linkf:e});if(a._resolved&&!a._pending)try{e(a._val)}catch(f){f instanceof
m&&(f=f.val),b.handleError(f)}};jb.allFulfilled=function(a){for(a=dd(a)();a.hasNext();)if(!a.next()._fulfilled)return!1;return!0};jb.prototype={_val:null,_resolved:null,_fulfilled:null,_pending:null,_update:null,_error:null,_errored:null,_errorMap:null,_errorVal:null,_errorPending:null,catchError:function(a){this._error.push(a);return this},errorThen:function(a){this._errorMap=a;return this},handleResolve:function(a){this._resolve(a)},_resolve:function(a){var b=this;this._pending?vb.enqueue(function(a,
b){return function(){a(b)}}(k(this,this._resolve),a)):(this._pending=this._resolved=!0,vb.queue.add(function(){b._val=a;for(var c=0,d=b._update;c<d.length;){var e=d[c];++c;try{e.linkf(a)}catch(f){f instanceof m&&(f=f.val),e.async.handleError(f)}}b._fulfilled=!0;b._pending=!1}),vb.continueOnNextLoop())},handleError:function(a){this._handleError(a)},_handleError:function(a){var b=this,c=function(a){if(0<b._error.length)for(var c=0,f=b._error;c<f.length;){var g=f[c];++c;g(a)}else if(0<b._update.length)for(c=
0,f=b._update;c<f.length;)g=f[c],++c,g.async.handleError(a);else throw new m(a);b._errorPending=!1};this._errorPending||(this._errored=this._errorPending=!0,this._errorVal=a,vb.queue.add(function(){if(null!=b._errorMap)try{b._resolve(b._errorMap(a))}catch(d){d instanceof m&&(d=d.val),c(d)}else c(a)}),vb.continueOnNextLoop())},__class__:jb};var ke=cd.promhx.Deferred=function(){jb.call(this)};g["promhx.Deferred"]=ke;ke.__name__=["promhx","Deferred"];ke.__super__=jb;ke.prototype=t(jb.prototype,{resolve:function(a){this.handleResolve(a)},
promise:function(){return new mc(this)},__class__:ke});var mc=cd.promhx.Promise=function(a){jb.call(this,a);this._rejected=!1};g["promhx.Promise"]=mc;mc.__name__=["promhx","Promise"];mc.whenAll=function(a){var b=new mc;jb.linkAll(a,b);return b};mc.__super__=jb;mc.prototype=t(jb.prototype,{_rejected:null,reject:function(a){this._rejected=!0;this.handleError(a)},handleResolve:function(a){if(this._resolved)throw new m(Hk.AlreadyResolved("Promise has already been resolved"));this._resolve(a)},then:function(a){var b=
new mc;jb.link(this,b,a);return b},handleError:function(a){this._rejected=!0;this._handleError(a)},pipe:function(a){var b=new mc;jb.pipeLink(this,b,a);return b},__class__:mc});var vb=function(){};g["promhx.base.EventLoop"]=vb;vb.__name__=["promhx","base","EventLoop"];vb.nextLoop=null;vb.enqueue=function(a){vb.queue.add(a);vb.continueOnNextLoop()};vb.f=function(){var a=vb.queue.pop();null!=a&&a();vb.queue.isEmpty()||vb.continueOnNextLoop()};vb.continueOnNextLoop=function(){null!=vb.nextLoop?vb.nextLoop(vb.f):
("function"===typeof setImmediate?setImmediate:setTimeout)(vb.f)};var Ub=function(){ke.call(this);this.boundPromise=new mc(this)};g["promhx.deferred.DeferredPromise"]=Ub;Ub.__name__=["promhx","deferred","DeferredPromise"];Ub.__super__=ke;Ub.prototype=t(ke.prototype,{boundPromise:null,__class__:Ub});var Hk=g["promhx.error.PromiseError"]={__ename__:!0,__constructs__:["AlreadyResolved","DownstreamNotFullfilled"]};Hk.AlreadyResolved=function(a){a=["AlreadyResolved",0,a];a.__enum__=Hk;a.toString=u;return a};
Hk.DownstreamNotFullfilled=function(a){a=["DownstreamNotFullfilled",1,a];a.__enum__=Hk;a.toString=u;return a};var B=function(a){this.msg=a};g["protohx.CommonError"]=B;B.__name__=["protohx","CommonError"];B.prototype={msg:null,__class__:B};var Ad=function(){};g["protohx.Protohx"]=Ad;Ad.__name__=["protohx","Protohx"];Ad.newInt64=function(a,b){return new bg(a,b)};Ad.newUInt64=function(a,b){return new bg(a,b)};var r=function(){};g["protohx.ReadUtils"]=r;r.__name__=["protohx","ReadUtils"];r.read__TYPE_FLOAT=
function(a){return uc.i32ToFloat(a.buf.readInt32())};r.read__TYPE_INT64=function(a){for(var b=0,c=0,d=0,e=0;;){d=a.buf.readByte();if(28==e)break;else if(128<=d)b|=(d&127)<<e;else return b|=d<<e,Ad.newInt64(c,b);e+=7}if(128<=d)d&=127,b|=d<<e,c=d>>>4;else return Ad.newInt64(d>>>4,b|d<<e);for(e=3;;){d=a.buf.readByte();if(32>e)if(128<=d)c|=(d&127)<<e;else{c|=d<<e;break}e+=7}return Ad.newInt64(c,b)};r.read__TYPE_UINT64=function(a){a=r.read__TYPE_INT64(a);return Ad.newUInt64(y.__cast(a.high,Nb),y.__cast(a.low,
Nb))};r.read__TYPE_INT32=function(a){return r.read__TYPE_UINT32(a)};r.read__TYPE_FIXED64=function(a){var b=a.buf.readInt32();a=a.buf.readInt32();return Ad.newUInt64(a,b)};r.read__TYPE_FIXED32=function(a){return y.__cast(a.buf.readInt32(),Nb)};r.read__TYPE_BOOL=function(a){return 0!=r.read__TYPE_UINT32(a)};r.read__TYPE_STRING=function(a){var b=r.read__TYPE_UINT32(a);return a.buf.readString(b)};r.read__TYPE_BYTES=function(a){var b=null,c=r.read__TYPE_UINT32(a);Ga.gt(c,0)&&(b=a.readBytes(c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment