(function(Cn,ci){function L(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 Dn(a){return a instanceof Array?function(){return P.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__=Un++);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}ci.openfl=ci.openfl||{};ci.lime=ci.lime||{};var n={},J=function(){return q.__string_rec(this,"")},Qb=function(){};n.ApplicationMain=Qb;Qb.__name__=["ApplicationMain"];Qb.config=null;Qb.preloader=null;Qb.create=function(){var a=new di;a.create(Qb.config);var b=new ei;Qb.preloader=new fi(b);a.setPreloader(Qb.preloader);Qb.preloader.onComplete.add(Qb.init);Qb.preloader.create(Qb.config);var b=[],c=[];b.push("assets/graphics/1.5x/background-19-0.png");
c.push("IMAGE");b.push("assets/graphics/1.5x/background-21-0.png");c.push("IMAGE");b.push("assets/graphics/1.5x/background-22-0.png");c.push("IMAGE");b.push("assets/graphics/1.5x/background-23-0.png");c.push("IMAGE");b.push("assets/graphics/1.5x/background-24-0.png");c.push("IMAGE");b.push("assets/graphics/1.5x/background-25-0.png");c.push("IMAGE");b.push("assets/graphics/1.5x/background-28-0.png");c.push("IMAGE");b.push("assets/graphics/1.5x/background-29-0.png");c.push("IMAGE");b.push("assets/graphics/1.5x/sprite-1-0.png");
c.push("IMAGE");b.push("assets/graphics/1.5x/sprite-11-0.png");c.push("IMAGE");b.push("assets/graphics/1.5x/sprite-13-2.png");c.push("IMAGE");b.push("assets/graphics/1.5x/sprite-13-3.png");c.push("IMAGE");b.push("assets/graphics/1.5x/sprite-13-4.png");c.push("IMAGE");b.push("assets/graphics/1.5x/sprite-16-0.png");c.push("IMAGE");b.push("assets/graphics/1.5x/sprite-16-1.png");c.push("IMAGE");b.push("assets/graphics/1.5x/sprite-18-0.png");c.push("IMAGE");b.push("assets/graphics/1.5x/sprite-18-1.png");
c.push("IMAGE");b.push("assets/graphics/1.5x/sprite-3-0.png");c.push("IMAGE");b.push("assets/graphics/1.5x/sprite-31-0.png");c.push("IMAGE");b.push("assets/graphics/1.5x/sprite-31-1.png");c.push("IMAGE");b.push("assets/graphics/1.5x/sprite-33-0.png");c.push("IMAGE");b.push("assets/graphics/1.5x/sprite-5-0.png");c.push("IMAGE");b.push("assets/graphics/1.5x/sprite-7-0.png");c.push("IMAGE");b.push("assets/graphics/1.5x/sprite-7-1.png");c.push("IMAGE");b.push("assets/graphics/1.5x/sprite-7-2.png");c.push("IMAGE");
b.push("assets/graphics/1.5x/sprite-7-3.png");c.push("IMAGE");b.push("assets/graphics/1.5x/sprite-9-10.png");c.push("IMAGE");b.push("assets/graphics/1.5x/sprite-9-4.png");c.push("IMAGE");b.push("assets/graphics/1.5x/sprite-9-6.png");c.push("IMAGE");b.push("assets/graphics/1.5x/sprite-9-9.png");c.push("IMAGE");b.push("assets/graphics/1.5x/tileset-14.png");c.push("IMAGE");b.push("assets/graphics/1.5x/tileset-20.png");c.push("IMAGE");b.push("assets/graphics/1x/background-19-0.png");c.push("IMAGE");b.push("assets/graphics/1x/background-21-0.png");
c.push("IMAGE");b.push("assets/graphics/1x/background-22-0.png");c.push("IMAGE");b.push("assets/graphics/1x/background-23-0.png");c.push("IMAGE");b.push("assets/graphics/1x/background-24-0.png");c.push("IMAGE");b.push("assets/graphics/1x/background-25-0.png");c.push("IMAGE");b.push("assets/graphics/1x/background-28-0.png");c.push("IMAGE");b.push("assets/graphics/1x/background-29-0.png");c.push("IMAGE");b.push("assets/graphics/1x/sprite-1-0.png");c.push("IMAGE");b.push("assets/graphics/1x/sprite-11-0.png");
c.push("IMAGE");b.push("assets/graphics/1x/sprite-13-2.png");c.push("IMAGE");b.push("assets/graphics/1x/sprite-13-3.png");c.push("IMAGE");b.push("assets/graphics/1x/sprite-13-4.png");c.push("IMAGE");b.push("assets/graphics/1x/sprite-16-0.png");c.push("IMAGE");b.push("assets/graphics/1x/sprite-16-1.png");c.push("IMAGE");b.push("assets/graphics/1x/sprite-18-0.png");c.push("IMAGE");b.push("assets/graphics/1x/sprite-18-1.png");c.push("IMAGE");b.push("assets/graphics/1x/sprite-3-0.png");c.push("IMAGE");
b.push("assets/graphics/1x/sprite-31-0.png");c.push("IMAGE");b.push("assets/graphics/1x/sprite-31-1.png");c.push("IMAGE");b.push("assets/graphics/1x/sprite-33-0.png");c.push("IMAGE");b.push("assets/graphics/1x/sprite-5-0.png");c.push("IMAGE");b.push("assets/graphics/1x/sprite-7-0.png");c.push("IMAGE");b.push("assets/graphics/1x/sprite-7-1.png");c.push("IMAGE");b.push("assets/graphics/1x/sprite-7-2.png");c.push("IMAGE");b.push("assets/graphics/1x/sprite-7-3.png");c.push("IMAGE");b.push("assets/graphics/1x/sprite-9-10.png");
c.push("IMAGE");b.push("assets/graphics/1x/sprite-9-4.png");c.push("IMAGE");b.push("assets/graphics/1x/sprite-9-6.png");c.push("IMAGE");b.push("assets/graphics/1x/sprite-9-9.png");c.push("IMAGE");b.push("assets/graphics/1x/tileset-14.png");c.push("IMAGE");b.push("assets/graphics/1x/tileset-20.png");c.push("IMAGE");b.push("assets/graphics/2x/background-19-0.png");c.push("IMAGE");b.push("assets/graphics/2x/background-21-0.png");c.push("IMAGE");b.push("assets/graphics/2x/background-22-0.png");c.push("IMAGE");
b.push("assets/graphics/2x/background-23-0.png");c.push("IMAGE");b.push("assets/graphics/2x/background-24-0.png");c.push("IMAGE");b.push("assets/graphics/2x/background-25-0.png");c.push("IMAGE");b.push("assets/graphics/2x/background-28-0.png");c.push("IMAGE");b.push("assets/graphics/2x/background-29-0.png");c.push("IMAGE");b.push("assets/graphics/2x/sprite-1-0.png");c.push("IMAGE");b.push("assets/graphics/2x/sprite-11-0.png");c.push("IMAGE");b.push("assets/graphics/2x/sprite-13-2.png");c.push("IMAGE");
b.push("assets/graphics/2x/sprite-13-3.png");c.push("IMAGE");b.push("assets/graphics/2x/sprite-13-4.png");c.push("IMAGE");b.push("assets/graphics/2x/sprite-16-0.png");c.push("IMAGE");b.push("assets/graphics/2x/sprite-16-1.png");c.push("IMAGE");b.push("assets/graphics/2x/sprite-18-0.png");c.push("IMAGE");b.push("assets/graphics/2x/sprite-18-1.png");c.push("IMAGE");b.push("assets/graphics/2x/sprite-3-0.png");c.push("IMAGE");b.push("assets/graphics/2x/sprite-31-0.png");c.push("IMAGE");b.push("assets/graphics/2x/sprite-31-1.png");
c.push("IMAGE");b.push("assets/graphics/2x/sprite-33-0.png");c.push("IMAGE");b.push("assets/graphics/2x/sprite-5-0.png");c.push("IMAGE");b.push("assets/graphics/2x/sprite-7-0.png");c.push("IMAGE");b.push("assets/graphics/2x/sprite-7-1.png");c.push("IMAGE");b.push("assets/graphics/2x/sprite-7-2.png");c.push("IMAGE");b.push("assets/graphics/2x/sprite-7-3.png");c.push("IMAGE");b.push("assets/graphics/2x/sprite-9-10.png");c.push("IMAGE");b.push("assets/graphics/2x/sprite-9-4.png");c.push("IMAGE");b.push("assets/graphics/2x/sprite-9-6.png");
c.push("IMAGE");b.push("assets/graphics/2x/sprite-9-9.png");c.push("IMAGE");b.push("assets/graphics/2x/tileset-14.png");c.push("IMAGE");b.push("assets/graphics/2x/tileset-20.png");c.push("IMAGE");b.push("assets/graphics/3x/background-19-0.png");c.push("IMAGE");b.push("assets/graphics/3x/background-21-0.png");c.push("IMAGE");b.push("assets/graphics/3x/background-22-0.png");c.push("IMAGE");b.push("assets/graphics/3x/background-23-0.png");c.push("IMAGE");b.push("assets/graphics/3x/background-24-0.png");
c.push("IMAGE");b.push("assets/graphics/3x/background-25-0.png");c.push("IMAGE");b.push("assets/graphics/3x/background-28-0.png");c.push("IMAGE");b.push("assets/graphics/3x/background-29-0.png");c.push("IMAGE");b.push("assets/graphics/3x/sprite-1-0.png");c.push("IMAGE");b.push("assets/graphics/3x/sprite-11-0.png");c.push("IMAGE");b.push("assets/graphics/3x/sprite-13-2.png");c.push("IMAGE");b.push("assets/graphics/3x/sprite-13-3.png");c.push("IMAGE");b.push("assets/graphics/3x/sprite-13-4.png");c.push("IMAGE");
b.push("assets/graphics/3x/sprite-16-0.png");c.push("IMAGE");b.push("assets/graphics/3x/sprite-16-1.png");c.push("IMAGE");b.push("assets/graphics/3x/sprite-18-0.png");c.push("IMAGE");b.push("assets/graphics/3x/sprite-18-1.png");c.push("IMAGE");b.push("assets/graphics/3x/sprite-3-0.png");c.push("IMAGE");b.push("assets/graphics/3x/sprite-31-0.png");c.push("IMAGE");b.push("assets/graphics/3x/sprite-31-1.png");c.push("IMAGE");b.push("assets/graphics/3x/sprite-33-0.png");c.push("IMAGE");b.push("assets/graphics/3x/sprite-5-0.png");
c.push("IMAGE");b.push("assets/graphics/3x/sprite-7-0.png");c.push("IMAGE");b.push("assets/graphics/3x/sprite-7-1.png");c.push("IMAGE");b.push("assets/graphics/3x/sprite-7-2.png");c.push("IMAGE");b.push("assets/graphics/3x/sprite-7-3.png");c.push("IMAGE");b.push("assets/graphics/3x/sprite-9-10.png");c.push("IMAGE");b.push("assets/graphics/3x/sprite-9-4.png");c.push("IMAGE");b.push("assets/graphics/3x/sprite-9-6.png");c.push("IMAGE");b.push("assets/graphics/3x/sprite-9-9.png");c.push("IMAGE");b.push("assets/graphics/3x/tileset-14.png");
c.push("IMAGE");b.push("assets/graphics/3x/tileset-20.png");c.push("IMAGE");b.push("assets/graphics/4x/background-19-0.png");c.push("IMAGE");b.push("assets/graphics/4x/background-21-0.png");c.push("IMAGE");b.push("assets/graphics/4x/background-22-0.png");c.push("IMAGE");b.push("assets/graphics/4x/background-23-0.png");c.push("IMAGE");b.push("assets/graphics/4x/background-24-0.png");c.push("IMAGE");b.push("assets/graphics/4x/background-25-0.png");c.push("IMAGE");b.push("assets/graphics/4x/background-28-0.png");
c.push("IMAGE");b.push("assets/graphics/4x/background-29-0.png");c.push("IMAGE");b.push("assets/graphics/4x/sprite-1-0.png");c.push("IMAGE");b.push("assets/graphics/4x/sprite-11-0.png");c.push("IMAGE");b.push("assets/graphics/4x/sprite-13-2.png");c.push("IMAGE");b.push("assets/graphics/4x/sprite-13-3.png");c.push("IMAGE");b.push("assets/graphics/4x/sprite-13-4.png");c.push("IMAGE");b.push("assets/graphics/4x/sprite-16-0.png");c.push("IMAGE");b.push("assets/graphics/4x/sprite-16-1.png");c.push("IMAGE");
b.push("assets/graphics/4x/sprite-18-0.png");c.push("IMAGE");b.push("assets/graphics/4x/sprite-18-1.png");c.push("IMAGE");b.push("assets/graphics/4x/sprite-3-0.png");c.push("IMAGE");b.push("assets/graphics/4x/sprite-31-0.png");c.push("IMAGE");b.push("assets/graphics/4x/sprite-31-1.png");c.push("IMAGE");b.push("assets/graphics/4x/sprite-33-0.png");c.push("IMAGE");b.push("assets/graphics/4x/sprite-5-0.png");c.push("IMAGE");b.push("assets/graphics/4x/sprite-7-0.png");c.push("IMAGE");b.push("assets/graphics/4x/sprite-7-1.png");
c.push("IMAGE");b.push("assets/graphics/4x/sprite-7-2.png");c.push("IMAGE");b.push("assets/graphics/4x/sprite-7-3.png");c.push("IMAGE");b.push("assets/graphics/4x/sprite-9-10.png");c.push("IMAGE");b.push("assets/graphics/4x/sprite-9-4.png");c.push("IMAGE");b.push("assets/graphics/4x/sprite-9-6.png");c.push("IMAGE");b.push("assets/graphics/4x/sprite-9-9.png");c.push("IMAGE");b.push("assets/graphics/4x/tileset-14.png");c.push("IMAGE");b.push("assets/graphics/4x/tileset-20.png");c.push("IMAGE");b.push("assets/graphics/default-font.fnt");
c.push("TEXT");b.push("assets/graphics/default-font.png");c.push("IMAGE");b.push("assets/graphics/preloader-badge.png");c.push("IMAGE");b.push("assets/graphics/preloader-bg.png");c.push("IMAGE");b.push("assets/graphics/preloader-bg.txt");c.push("TEXT");b.push("assets/graphics/preloader-bg@1.5x.png");c.push("IMAGE");b.push("assets/graphics/preloader-bg@2x.png");c.push("IMAGE");b.push("assets/graphics/preloader-bg@3x.png");c.push("IMAGE");b.push("assets/graphics/preloader-bg@4x.png");c.push("IMAGE");
b.push("assets/sfx/sound-15.ogg");c.push("SOUND");b.push("assets/sfx/sound-26.ogg");c.push("SOUND");b.push("assets/sfx/sound-27.ogg");c.push("SOUND");b.push("assets/data/behaviors.xml");c.push("TEXT");b.push("assets/data/game.xml");c.push("TEXT");b.push("assets/data/inner-joystick.png");c.push("IMAGE");b.push("assets/data/inner-joystick@1.5x.png");c.push("IMAGE");b.push("assets/data/inner-joystick@2x.png");c.push("IMAGE");b.push("assets/data/inner-joystick@3x.png");c.push("IMAGE");b.push("assets/data/inner-joystick@4x.png");
c.push("IMAGE");b.push("assets/data/outer-joystick.png");c.push("IMAGE");b.push("assets/data/outer-joystick@1.5x.png");c.push("IMAGE");b.push("assets/data/outer-joystick@2x.png");c.push("IMAGE");b.push("assets/data/outer-joystick@3x.png");c.push("IMAGE");b.push("assets/data/outer-joystick@4x.png");c.push("IMAGE");b.push("assets/data/resources.xml");c.push("TEXT");b.push("assets/data/scene-0.txt");c.push("TEXT");b.push("assets/data/scene-0.xml");c.push("TEXT");b.push("assets/data/scene-1.txt");c.push("TEXT");
b.push("assets/data/scene-1.xml");c.push("TEXT");b.push("assets/data/scene-2.txt");c.push("TEXT");b.push("assets/data/scene-2.xml");c.push("TEXT");b.push("assets/data/scene-3.txt");c.push("TEXT");b.push("assets/data/scene-3.xml");c.push("TEXT");b.push("assets/data/scene-4.txt");c.push("TEXT");b.push("assets/data/scene-4.xml");c.push("TEXT");b.push("assets/data/scene-5.txt");c.push("TEXT");b.push("assets/data/scene-5.xml");c.push("TEXT");b.push("assets/data/scene-6.txt");c.push("TEXT");b.push("assets/data/scene-6.xml");
c.push("TEXT");b.push("assets/data/scenes.xml");c.push("TEXT");if(null!=Qb.config.assetsPrefix)for(var d=0,e=b.length;d<e;){var f=d++;"FONT"!=c[f]&&(b[f]=Qb.config.assetsPrefix+b[f])}Qb.preloader.load(b,c);a.exec()};Qb.init=function(){Qb.preloader=null;Qb.start()};Qb.main=function(){Qb.config={build:"1",company:"Stencyl",file:"Patient Zero",fps:65,name:"Patient Zero",orientation:"portrait",packageName:"com.yourcompany.gamename",version:"1.0",windows:[{antialiasing:0,background:0,borderless:!1,depthBuffer:!1,
display:0,fullscreen:!1,hardware:!1,height:682,parameters:"{}",resizable:!1,stencilBuffer:!0,title:"Patient Zero",vsync:!0,width:1024,x:null,y:null}]}};Qb.start=function(){for(var a=!1,b=ua.resolveClass("Universal"),c=0,d=ua.getClassFields(b);c<d.length;){var e=d[c];++c;if("main"==e){a=!0;break}}N.initialize();a?O.callMethod(b,O.field(b,"main"),[]):ua.createInstance(gi,[]);ka.current.stage.window.__fullscreen&&ka.current.stage.dispatchEvent(new Qe("fullScreen",!1,!1,!0,!0));ka.current.stage.dispatchEvent(new fa("resize",
!1,!1))};var Hk=function(){};n["openfl.events.IEventDispatcher"]=Hk;Hk.__name__=["openfl","events","IEventDispatcher"];Hk.prototype={__class__:Hk};var Va=function(a){null!=a&&(this.__targetDispatcher=a)};n["openfl.events.EventDispatcher"]=Va;Va.__name__=["openfl","events","EventDispatcher"];Va.__interfaces__=[Hk];Va.__sortByPriority=function(a,b){return a.priority==b.priority?0:a.priority>b.priority?-1:1};Va.prototype={addEventListener:function(a,b,c,d,e){null==d&&(d=0);null==c&&(c=!1);null==this.__eventMap&&
(this.__dispatching=new ma,this.__eventMap=new ma,this.__newEventMap=new ma);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 g=a++;if(O.compareMethods(e[g].callback,b))return}e.push(new hi(b,c,d));e.sort(Va.__sortByPriority)}else e=[],e.push(new hi(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,g=d.length;f<g;){var k=f++;if(d[k].match(b,c)){d.splice(k,1);break}}e||(0==d.length&&this.__eventMap.remove(a),this.__eventMap.iterator().hasNext()||(this.__newEventMap=this.__eventMap=null))}}},toString:function(){return"[object "+ua.getClassName(q.getClass(this)).split(".").pop()+"]"},willTrigger:function(a){return this.hasEventListener(a)},__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=1==a.eventPhase,e=0,f;e<c.length;){f=c[e];if(f.useCapture==d&&(f.callback(a),a.__isCanceledNow))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__:Va};var ii=function(){};n["openfl.display.IBitmapDrawable"]=ii;ii.__name__=["openfl","display","IBitmapDrawable"];ii.prototype={__class__:ii};var wa=function(){this.__cacheAsBitmapSmooth=!0;this.__maskCached=this.__cacheAsBitmap=!1;Va.call(this);this.__alpha=1;this.__transform=new Oa;this.__visible=!0;this.__rotationSine=this.__rotation=0;
this.__rotationCosine=1;this.__renderTransform=new Oa;this.__offset=new W;this.__worldOffset=new W;this.__worldAlpha=1;this.__worldTransform=new Oa;this.__worldColorTransform=new yd;this.set_name("instance"+ ++wa.__instanceCount)};n["openfl.display.DisplayObject"]=wa;wa.__name__=["openfl","display","DisplayObject"];wa.__interfaces__=[ii];wa.__super__=Va;wa.prototype=L(Va.prototype,{getBounds:function(a){var b;null!=a?(b=this.__getWorldTransform().clone(),b.concat(a.__getWorldTransform().clone().invert())):
(b=Oa.__temp,b.identity());a=new ha;this.__getBounds(a,b);return a},getRect:function(a){return this.getBounds(a)},globalToLocal:function(a){a=a.clone();this.__getWorldTransform().__transformInversePoint(a);return a},hitTestObject:function(a){if(null!=a&&null!=a.parent&&null!=this.parent){var b=this.getBounds(this);a=a.getBounds(this);return b.intersects(a)}return!1},hitTestPoint:function(a,b,c){return null!=this.parent?(c=new ha,this.__getBounds(c,this.__getWorldTransform()),c.containsPoint(new W(a,
b))):!1},localToGlobal:function(a){return this.__getWorldTransform().transformPoint(a)},__broadcast:function(a,b){if(null!=this.__eventMap&&this.hasEventListener(a.type)){var c=Va.prototype.__dispatchEvent.call(this,a);return a.__isCanceled?!0:c}return!1},__dispatchEvent:function(a){var b=Va.prototype.__dispatchEvent.call(this,a);if(a.__isCanceled)return!0;a.bubbles&&null!=this.parent&&this.parent!=this&&(a.eventPhase=3,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)},__getCursor:function(){return null},__getInteractive:function(a){return!1},__getLocalBounds:function(a){this.__getBounds(a,this.__transform)},__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)}},__getWorldTransform:function(){if(this.__transformDirty||0<wa.__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,f){if(null!=this.__graphics){if(!f.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(f),!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&&Um.render(this,a)},__renderCairoMask:function(a){null!=this.__graphics&&E.renderMask(this.__graphics,a)},__renderCanvas:function(a){null!=this.__graphics&&Vm.render(this,a)},__renderCanvasMask:function(a){null!=this.__graphics&&v.renderMask(this.__graphics,a)},__renderDOM:function(a){null!=this.__graphics&&Wm.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?Q.render(this,a):(v.render(this.__graphics,a),Pc.renderBitmap(this,a))),null!=this.__mask&&null!=this.__maskGraphics&&0<this.__maskGraphics.__commands.get_length()&&a.maskManager.popMask(),
null!=this.__scrollRect&&a.maskManager.popRect()))},__drawGraphicsGL:function(a){null!=this.__graphics&&(this.__graphics.__hardware?Q.render(this,a):(v.render(this.__graphics,a),Pc.renderBitmap(this,a)))},__preRenderGL:function(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)},__postRenderGL:function(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 Oa);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)){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=Ba.__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&&(Nd.__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,0)}},__setStageReference:function(a){this.stage!=a&&(null!=this.stage&&(this.stage.get_focus()==this&&this.stage.set_focus(null),this.dispatchEvent(new fa("removedFromStage",!1,!1))),this.stage=a,null!=a&&this.dispatchEvent(new fa("addedToStage",!1,!1)))},__setRenderDirty:function(){this.__renderDirty||(this.__updateCachedBitmap=!0,this.__updateFilters=null!=this.get_filters()&&
0<this.get_filters().length,this.__renderDirty=!0,wa.__worldRenderDirty++)},__setTransformDirty:function(){this.__transformDirty||(this.__transformDirty=!0,wa.__worldTransformDirty++)},__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,wa.__worldTransformDirty--);a||null==this.__mask||this.__mask.__maskCached||
(null==this.__maskGraphics&&(this.__maskGraphics=new jc),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,
Oa.__identity)),null!=this.__filters&&(null==this.__cachedFilterBounds&&(this.__cachedFilterBounds=new ha),this.__cachedFilterBounds.setEmpty(),Nd.__expandBounds(this.__filters,this.__cachedFilterBounds,Oa.__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||10==this.blendMode)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,wa.__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,Oa.__identity))},__updateTransforms:function(a){var b=null!=a;a=b?a.clone():this.__transform;null==this.__worldTransform&&
(this.__worldTransform=new Oa);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)},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,wa.__worldRenderDirty++);return this.__alpha=a},set_blendMode:function(a){return this.blendMode=this.__blendMode=a},set_shader:function(a){return this.shader=this.__shader=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,wa.__worldRenderDirty++);return this.__forceCacheAsBitmap?this.__cacheAsBitmap=
!0:this.__cacheAsBitmap=a},get_cacheAsBitmapMatrix:function(){return this.__cacheAsBitmapMatrix},set_cacheAsBitmapMatrix:function(a){this.__renderDirty||(this.__updateCachedBitmap=!0,this.__updateFilters=null!=this.get_filters()&&0<this.get_filters().length,this.__renderDirty=!0,wa.__worldRenderDirty++);return this.__cacheAsBitmapMatrix=a.clone()},get_cacheAsBitmapSmooth:function(){return this.__cacheAsBitmapSmooth},set_cacheAsBitmapSmooth:function(a){return this.__cacheAsBitmapSmooth=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,wa.__worldRenderDirty++);return a},get_height:function(){var a=new ha;this.__getBounds(a,
this.__transform);return a.height},set_height:function(a){var b=new ha,c=Oa.__temp;c.identity();this.__getBounds(b,c);a!=b.height?this.set_scaleY(a/b.height):this.set_scaleY(1);return a},get_mask:function(){return this.__mask},set_mask:function(a){a!=this.__mask&&(this.__transformDirty||(this.__transformDirty=!0,wa.__worldTransformDirty++),this.__renderDirty||(this.__updateCachedBitmap=!0,this.__updateFilters=null!=this.get_filters()&&0<this.get_filters().length,this.__renderDirty=!0,wa.__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:ka.current.stage.__mouseX;var b;b=null!=this.stage?this.stage.__mouseY:ka.current.stage.__mouseY;return this.__getWorldTransform().__transformInverseX(a,b)},get_mouseY:function(){var a;a=null!=this.stage?this.stage.__mouseX:
ka.current.stage.__mouseX;var b;b=null!=this.stage?this.stage.__mouseY:ka.current.stage.__mouseY;return this.__getWorldTransform().__transformInverseY(a,b)},get_name:function(){return this.__name},set_name:function(a){return this.__name=a},get_root:function(){return null!=this.stage?ka.current:null},get_rotation:function(){return this.__rotation},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,wa.__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,wa.__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,wa.__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,wa.__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,wa.__worldTransformDirty++);this.__transform.c=b;this.__transform.d=c}return a},get_scrollRect:function(){return null==this.__scrollRect?null:this.__scrollRect.clone()},set_scrollRect:function(a){a==
this.__scrollRect||this.__transformDirty||(this.__transformDirty=!0,wa.__worldTransformDirty++);return this.__scrollRect=a},get_transform:function(){null==this.__objectTransform&&(this.__objectTransform=new ji(this));return this.__objectTransform},set_transform:function(a){if(null==a)throw new F(new ki("Parameter transform must be non-null."));null==this.__objectTransform&&(this.__objectTransform=new ji(this));this.__transformDirty||(this.__transformDirty=!0,wa.__worldTransformDirty++);this.__objectTransform.set_matrix(a.get_matrix());
this.__objectTransform.set_colorTransform(a.get_colorTransform().__clone());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,wa.__worldRenderDirty++);return this.__visible=a},get_width:function(){var a=new ha;this.__getBounds(a,this.__transform);return a.width},set_width:function(a){var b=
new ha,c=Oa.__temp;c.identity();this.__getBounds(b,c);a!=b.width?this.set_scaleX(a/b.width):this.set_scaleX(1);return a},get_x:function(){return this.__transform.tx},set_x:function(a){a==this.__transform.tx||this.__transformDirty||(this.__transformDirty=!0,wa.__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,wa.__worldTransformDirty++);return this.__transform.ty=
a},__class__:wa,__properties__:{set_y:"set_y",get_y:"get_y",set_x:"set_x",get_x:"get_x",set_width:"set_width",get_width:"get_width",set_visible:"set_visible",get_visible:"get_visible",set_transform:"set_transform",get_transform:"get_transform",set_shader:"set_shader",set_scrollRect:"set_scrollRect",get_scrollRect:"get_scrollRect",set_scaleY:"set_scaleY",get_scaleY:"get_scaleY",set_scaleX:"set_scaleX",get_scaleX:"get_scaleX",set_rotation:"set_rotation",get_rotation:"get_rotation",get_root:"get_root",
set_name:"set_name",get_name:"get_name",get_mouseY:"get_mouseY",get_mouseX:"get_mouseX",set_mask:"set_mask",get_mask:"get_mask",set_height:"set_height",get_height:"get_height",set_filters:"set_filters",get_filters:"get_filters",set_cacheAsBitmapSmooth:"set_cacheAsBitmapSmooth",get_cacheAsBitmapSmooth:"get_cacheAsBitmapSmooth",set_cacheAsBitmapMatrix:"set_cacheAsBitmapMatrix",get_cacheAsBitmapMatrix:"get_cacheAsBitmapMatrix",set_cacheAsBitmap:"set_cacheAsBitmap",get_cacheAsBitmap:"get_cacheAsBitmap",
set_blendMode:"set_blendMode",set_alpha:"set_alpha",get_alpha:"get_alpha"}});var mc=function(){wa.call(this);this.doubleClickEnabled=!1;this.mouseEnabled=!0;this.__tabEnabled=this.needsSoftKeyboard=!1;this.tabIndex=-1};n["openfl.display.InteractiveObject"]=mc;mc.__name__=["openfl","display","InteractiveObject"];mc.__super__=wa;mc.prototype=L(wa.prototype,{requestSoftKeyboard:function(){ka.notImplemented("InteractiveObject.requestSoftKeyboard");return!1},__getInteractive:function(a){null!=a&&(a.push(this),
null!=this.parent&&this.parent.__getInteractive(a));return!0},__hitTest:function(a,b,c,d,e,f){return!f.get_visible()||this.__isMask||e&&!this.mouseEnabled?!1:wa.prototype.__hitTest.call(this,a,b,c,d,e,f)},get_tabEnabled:function(){return this.__tabEnabled},set_tabEnabled:function(a){return this.__tabEnabled=a},__class__:mc,__properties__:L(wa.prototype.__properties__,{set_tabEnabled:"set_tabEnabled",get_tabEnabled:"get_tabEnabled"})});var xc=function(){mc.call(this);this.mouseChildren=!0;this.__children=
[];this.__removedChildren=[]};n["openfl.display.DisplayObjectContainer"]=xc;xc.__name__=["openfl","display","DisplayObjectContainer"];xc.__super__=mc;xc.prototype=L(mc.prototype,{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,wa.__worldTransformDirty++);a.__renderDirty||(a.__updateCachedBitmap=!0,a.__updateFilters=null!=a.get_filters()&&0<a.get_filters().length,
a.__renderDirty=!0,wa.__worldRenderDirty++);this.__renderDirty||(this.__updateCachedBitmap=!0,this.__updateFilters=null!=this.get_filters()&&0<this.get_filters().length,this.__renderDirty=!0,wa.__worldRenderDirty++);var b=new fa("added",!0);b.target=a;a.__dispatchEvent(b)}return a},addChildAt:function(a,b){if(b>this.__children.length||0>b)throw new F("Invalid index position "+b);if(a.parent==this)P.remove(this.__children,a);else{null!=a.parent&&a.parent.removeChild(a);a.parent=this;null!=this.stage&&
a.__setStageReference(this.stage);a.__transformDirty||(a.__transformDirty=!0,wa.__worldTransformDirty++);a.__renderDirty||(a.__updateCachedBitmap=!0,a.__updateFilters=null!=a.get_filters()&&0<a.get_filters().length,a.__renderDirty=!0,wa.__worldRenderDirty++);this.__renderDirty||(this.__updateCachedBitmap=!0,this.__updateFilters=null!=this.get_filters()&&0<this.get_filters().length,this.__renderDirty=!0,wa.__worldRenderDirty++);var c=new fa("added",!0);c.target=a;a.__dispatchEvent(c)}this.__children.splice(b,
0,a);return a},areInaccessibleObjectsUnderPoint:function(a){return!1},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},getChildByName:function(a){for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;if(d.get_name()==a)return d}return null},getChildIndex:function(a){for(var b=0,c=this.__children.length;b<c;){var d=b++;if(this.__children[d]==a)return d}return-1},getObjectsUnderPoint:function(a){var b=
[];this.__hitTest(a.x,a.y,!1,b,!1,this);b.reverse();return b},removeChild:function(a){null!=a&&a.parent==this&&(a.__dispatchEvent(new fa("removed",!0)),null!=this.stage&&a.__setStageReference(null),a.parent=null,P.remove(this.__children,a),this.__removedChildren.push(a),a.__transformDirty||(a.__transformDirty=!0,wa.__worldTransformDirty++),a.__renderDirty||(a.__updateCachedBitmap=!0,a.__updateFilters=null!=a.get_filters()&&0<a.get_filters().length,a.__renderDirty=!0,wa.__worldRenderDirty++),this.__renderDirty||
(this.__updateCachedBitmap=!0,this.__updateFilters=null!=this.get_filters()&&0<this.get_filters().length,this.__renderDirty=!0,wa.__worldRenderDirty++));return a},removeChildAt:function(a){return 0<=a&&a<this.__children.length?this.removeChild(this.__children[a]):null},removeChildren:function(a,b){null==b&&(b=2147483647);null==a&&(a=0);if(2147483647==b&&(b=this.__children.length-1,0>b))return;if(!(a>this.__children.length-1)){if(b<a||0>a||b>this.__children.length)throw new F(new li("The supplied index is out of bounds."));
for(var c=b-a;0<=c;)this.removeChildAt(a),c--}},resolve:function(a){if(null==this.__children)return null;for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;if(d.get_name()==a)return d}return null},setChildIndex:function(a,b){0<=b&&b<=this.__children.length&&a.parent==this&&(P.remove(this.__children,a),this.__children.splice(b,0,a))},swapChildren:function(a,b){if(a.parent==this&&b.parent==this){var c=P.indexOf(this.__children,a,0),d=P.indexOf(this.__children,b,0);this.__children[c]=b;this.__children[d]=
a}},swapChildrenAt:function(a,b){var c=this.__children[a];this.__children[a]=this.__children[b];this.__children[b]=c},__broadcast:function(a,b){null==a.target&&(a.target=this);var c=mc.prototype.__broadcast.call(this,a,b);if(!a.__isCanceled&&b)for(var d=0,e=this.__children;d<e.length;){var f=e[d];++d;f.__broadcast(a,!0);if(a.__isCanceled)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){mc.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.__getBounds(a,e.__worldTransform)}null!=b&&(this.__updateTransforms(),this.__updateChildren(!0))}},__getRenderBounds:function(a,b){if(null!=this.__scrollRect)mc.prototype.__getRenderBounds.call(this,a,b);else if(mc.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,f){if(!f.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 W(a,
b))))return!1;var g=this.__children.length;if(e)if(null==d||!this.mouseChildren)for(;0<=--g;){if(this.__children[g].__hitTest(a,b,c,null,!0,this.__children[g]))return null!=d&&d.push(f),!0}else{if(null!=d){e=d.length;for(var k=!1,p=!1;0<=--g&&!(((k=this.__children[g].__getInteractive(null))||this.mouseEnabled&&!p)&&this.__children[g].__hitTest(a,b,c,d,!0,this.__children[g])&&(p=!0,k)););if(p)return d.splice(e,0,f),!0}}else for(;0<=--g;)this.__children[g].__hitTest(a,b,c,d,!1,this.__children[g]);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)){mc.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&&E.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)){mc.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&&v.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){mc.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?Q.render(this,a):(v.render(this.__graphics,a),Pc.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 fa("removedFromStage",!1,!1)),this.stage=a,null!=a&&this.__dispatchEvent(new fa("addedToStage",!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){mc.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){mc.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__:xc,__properties__:L(mc.prototype.__properties__,{get_numChildren:"get_numChildren"})});var ga=function(){xc.call(this);this.buttonMode=!1;this.useHandCursor=
!0;this.loaderInfo=Re.create(null)};n["openfl.display.Sprite"]=ga;ga.__name__=["openfl","display","Sprite"];ga.__super__=xc;ga.prototype=L(xc.prototype,{startDrag:function(a,b){null==a&&(a=!1);null!=this.stage&&this.stage.__startDrag(this,a,b)},stopDrag:function(){null!=this.stage&&this.stage.__stopDrag(this)},__getCursor:function(){return this.buttonMode&&this.useHandCursor?Ha.POINTER:null},__hitTest:function(a,b,c,d,e,f){if(null!=this.hitArea){if(!this.hitArea.mouseEnabled)return this.hitArea.mouseEnabled=
!0,a=this.hitArea.__hitTest(a,b,c,null,!0,f),this.hitArea.mouseEnabled=!1,a&&(d[d.length]=f),a}else{if(!f.get_visible()||this.__isMask||e&&!this.mouseEnabled&&!this.mouseChildren||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b))return!1;if(xc.prototype.__hitTest.call(this,a,b,c,d,e,f))return e;if((!e||this.mouseEnabled)&&null!=this.__graphics&&this.__graphics.__hitTest(a,b,c,this.__getWorldTransform()))return null!=d&&d.push(f),!0}return!1},__hitTestMask:function(a,b){return xc.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 jc,this.__graphics.__owner=this);return this.__graphics},get_tabEnabled:function(){return this.__tabEnabled||this.buttonMode},__class__:ga,__properties__:L(xc.prototype.__properties__,{get_graphics:"get_graphics"})});var zd=function(){ga.call(this);this.addEventListener("addedToStage",K(this,this.onAdded))};n.Universal=zd;zd.__name__=
["Universal"];zd.main=function(){var a=ka.current.stage;a.align=6;a.scaleMode=2;ka.current.addChild(new zd)};zd.__super__=ga;zd.prototype=L(ga.prototype,{onAdded:function(a){this.init()},init:function(){this.initServices();this.removeEventListener("addedToStage",K(this,this.onAdded));ra.startInFullScreen?(this.stage.set_displayState(1),this.initScreen(!0),this.stage.addEventListener("keyDown",K(this,this.onKeyDown),!1,2)):this.initScreen();new h(this)},onKeyDown:function(a){},initServices:function(){},
initScreen:function(a){null==a&&(a=!1);ka.current.set_x(0);ka.current.set_y(0);ka.current.set_scaleX(1);ka.current.set_scaleY(1);h.stage=this.stage;var b=[],c=ba.parse(R.getText("assets/data/game.xml")),c=new Qd(c.firstElement());c.node.resolve("projectScales");for(c=c.node.resolve("webScales").nodes.resolve("scale").iterator();null!=c.head;){var d=void 0;c.val=c.head[0];c.head=c.head[1];d=c.val;b.push("true"==d.att.resolve("enabled"))}a||(h.SCALE=ra.gameScale,h.IMG_BASE=ra.gameImageBase);a=ra.stageWidth;
b=ra.stageHeight;ra.stageWidth=ra.stageWidth*ra.gameScale*h.SCALE|0;ra.stageHeight=ra.stageHeight*ra.gameScale*h.SCALE|0;this.set_scrollRect(new ha(0,0,ra.stageWidth,ra.stageHeight));ra.stageWidth=a;ra.stageHeight=b;null},__class__:zd});var gi=function(){ka.current.addChild(this);zd.call(this);this.dispatchEvent(new fa("addedToStage",!1,!1))};n.DocumentClass=gi;gi.__name__=["DocumentClass"];gi.__super__=zd;gi.prototype=L(zd.prototype,{__class__:gi});var fg=function(){this.onChange=new rc};n["lime.AssetLibrary"]=
fg;fg.__name__=["lime","AssetLibrary"];fg.prototype={exists:function(a,b){return!1},getAudioBuffer:function(a){return null},getBytes:function(a){return null},getFont:function(a){return null},getImage:function(a){return null},getPath:function(a){return null},getText:function(a){a=this.getBytes(a);return null==a?null:a.getString(0,a.length)},isLocal:function(a,b){return!0},list:function(a){return null},load:function(){var a=this;return new Rb(function(){return a})},loadAudioBuffer:function(a){var b=
this;return new Rb(function(){return b.getAudioBuffer(a)})},loadBytes:function(a){var b=this;return new Rb(function(){return b.getBytes(a)})},loadFont:function(a){var b=this;return new Rb(function(){return b.getFont(a)})},loadImage:function(a){var b=this;return new Rb(function(){return b.getImage(a)})},loadText:function(a){return this.loadBytes(a).then(function(a){return new Rb(function(){return null==a?null:a.getString(0,a.length)})})},unload:function(){},__class__:fg};var mi=function(){this.type=
new ma;this.path=new ma;this.className=new ma;this.onChange=new rc;var a;a="assets/graphics/1.5x/background-19-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/background-21-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/background-22-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/background-23-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/background-24-0.png";this.path.set(a,a);this.type.set(a,
"IMAGE");a="assets/graphics/1.5x/background-25-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/background-28-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/background-29-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/sprite-1-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/sprite-11-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/sprite-13-2.png";this.path.set(a,
a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/sprite-13-3.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/sprite-13-4.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/sprite-16-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/sprite-16-1.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/sprite-18-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/sprite-18-1.png";this.path.set(a,
a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/sprite-3-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/sprite-31-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/sprite-31-1.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/sprite-33-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/sprite-5-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/sprite-7-0.png";this.path.set(a,
a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/sprite-7-1.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/sprite-7-2.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/sprite-7-3.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/sprite-9-10.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/sprite-9-4.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/sprite-9-6.png";this.path.set(a,
a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/sprite-9-9.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/tileset-14.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1.5x/tileset-20.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/background-19-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/background-21-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/background-22-0.png";this.path.set(a,
a);this.type.set(a,"IMAGE");a="assets/graphics/1x/background-23-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/background-24-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/background-25-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/background-28-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/background-29-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/sprite-1-0.png";
this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/sprite-11-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/sprite-13-2.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/sprite-13-3.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/sprite-13-4.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/sprite-16-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/sprite-16-1.png";this.path.set(a,
a);this.type.set(a,"IMAGE");a="assets/graphics/1x/sprite-18-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/sprite-18-1.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/sprite-3-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/sprite-31-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/sprite-31-1.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/sprite-33-0.png";this.path.set(a,a);this.type.set(a,
"IMAGE");a="assets/graphics/1x/sprite-5-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/sprite-7-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/sprite-7-1.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/sprite-7-2.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/sprite-7-3.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/sprite-9-10.png";this.path.set(a,a);this.type.set(a,"IMAGE");
a="assets/graphics/1x/sprite-9-4.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/sprite-9-6.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/sprite-9-9.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/tileset-14.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/1x/tileset-20.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/background-19-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/background-21-0.png";
this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/background-22-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/background-23-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/background-24-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/background-25-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/background-28-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/background-29-0.png";
this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/sprite-1-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/sprite-11-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/sprite-13-2.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/sprite-13-3.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/sprite-13-4.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/sprite-16-0.png";this.path.set(a,
a);this.type.set(a,"IMAGE");a="assets/graphics/2x/sprite-16-1.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/sprite-18-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/sprite-18-1.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/sprite-3-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/sprite-31-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/sprite-31-1.png";this.path.set(a,a);this.type.set(a,
"IMAGE");a="assets/graphics/2x/sprite-33-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/sprite-5-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/sprite-7-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/sprite-7-1.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/sprite-7-2.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/sprite-7-3.png";this.path.set(a,a);this.type.set(a,"IMAGE");
a="assets/graphics/2x/sprite-9-10.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/sprite-9-4.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/sprite-9-6.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/sprite-9-9.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/tileset-14.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/2x/tileset-20.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/background-19-0.png";
this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/background-21-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/background-22-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/background-23-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/background-24-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/background-25-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/background-28-0.png";
this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/background-29-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/sprite-1-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/sprite-11-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/sprite-13-2.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/sprite-13-3.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/sprite-13-4.png";
this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/sprite-16-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/sprite-16-1.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/sprite-18-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/sprite-18-1.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/sprite-3-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/sprite-31-0.png";this.path.set(a,
a);this.type.set(a,"IMAGE");a="assets/graphics/3x/sprite-31-1.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/sprite-33-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/sprite-5-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/sprite-7-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/sprite-7-1.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/sprite-7-2.png";this.path.set(a,a);this.type.set(a,
"IMAGE");a="assets/graphics/3x/sprite-7-3.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/sprite-9-10.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/sprite-9-4.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/sprite-9-6.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/sprite-9-9.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/3x/tileset-14.png";this.path.set(a,a);this.type.set(a,"IMAGE");
a="assets/graphics/3x/tileset-20.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/background-19-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/background-21-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/background-22-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/background-23-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/background-24-0.png";this.path.set(a,a);this.type.set(a,
"IMAGE");a="assets/graphics/4x/background-25-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/background-28-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/background-29-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/sprite-1-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/sprite-11-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/sprite-13-2.png";this.path.set(a,a);this.type.set(a,
"IMAGE");a="assets/graphics/4x/sprite-13-3.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/sprite-13-4.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/sprite-16-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/sprite-16-1.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/sprite-18-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/sprite-18-1.png";this.path.set(a,a);this.type.set(a,"IMAGE");
a="assets/graphics/4x/sprite-3-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/sprite-31-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/sprite-31-1.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/sprite-33-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/sprite-5-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/sprite-7-0.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/sprite-7-1.png";
this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/sprite-7-2.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/sprite-7-3.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/sprite-9-10.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/sprite-9-4.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/sprite-9-6.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/sprite-9-9.png";this.path.set(a,
a);this.type.set(a,"IMAGE");a="assets/graphics/4x/tileset-14.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/4x/tileset-20.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/default-font.fnt";this.path.set(a,a);this.type.set(a,"TEXT");a="assets/graphics/default-font.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/preloader-badge.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/preloader-bg.png";this.path.set(a,a);this.type.set(a,
"IMAGE");a="assets/graphics/preloader-bg.txt";this.path.set(a,a);this.type.set(a,"TEXT");a="assets/graphics/preloader-bg@1.5x.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/preloader-bg@2x.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/preloader-bg@3x.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/graphics/preloader-bg@4x.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/sfx/sound-15.ogg";this.path.set(a,a);this.type.set(a,"SOUND");a=
"assets/sfx/sound-26.ogg";this.path.set(a,a);this.type.set(a,"SOUND");a="assets/sfx/sound-27.ogg";this.path.set(a,a);this.type.set(a,"SOUND");a="assets/data/behaviors.xml";this.path.set(a,a);this.type.set(a,"TEXT");a="assets/data/game.xml";this.path.set(a,a);this.type.set(a,"TEXT");a="assets/data/inner-joystick.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/data/inner-joystick@1.5x.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/data/inner-joystick@2x.png";this.path.set(a,a);
this.type.set(a,"IMAGE");a="assets/data/inner-joystick@3x.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/data/inner-joystick@4x.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/data/outer-joystick.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/data/outer-joystick@1.5x.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/data/outer-joystick@2x.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/data/outer-joystick@3x.png";this.path.set(a,a);this.type.set(a,
"IMAGE");a="assets/data/outer-joystick@4x.png";this.path.set(a,a);this.type.set(a,"IMAGE");a="assets/data/resources.xml";this.path.set(a,a);this.type.set(a,"TEXT");a="assets/data/scene-0.txt";this.path.set(a,a);this.type.set(a,"TEXT");a="assets/data/scene-0.xml";this.path.set(a,a);this.type.set(a,"TEXT");a="assets/data/scene-1.txt";this.path.set(a,a);this.type.set(a,"TEXT");a="assets/data/scene-1.xml";this.path.set(a,a);this.type.set(a,"TEXT");a="assets/data/scene-2.txt";this.path.set(a,a);this.type.set(a,
"TEXT");a="assets/data/scene-2.xml";this.path.set(a,a);this.type.set(a,"TEXT");a="assets/data/scene-3.txt";this.path.set(a,a);this.type.set(a,"TEXT");a="assets/data/scene-3.xml";this.path.set(a,a);this.type.set(a,"TEXT");a="assets/data/scene-4.txt";this.path.set(a,a);this.type.set(a,"TEXT");a="assets/data/scene-4.xml";this.path.set(a,a);this.type.set(a,"TEXT");a="assets/data/scene-5.txt";this.path.set(a,a);this.type.set(a,"TEXT");a="assets/data/scene-5.xml";this.path.set(a,a);this.type.set(a,"TEXT");
a="assets/data/scene-6.txt";this.path.set(a,a);this.type.set(a,"TEXT");a="assets/data/scene-6.xml";this.path.set(a,a);this.type.set(a,"TEXT");a="assets/data/scenes.xml";this.path.set(a,a);this.type.set(a,"TEXT");a=null;null!=Qb.config&&Object.prototype.hasOwnProperty.call(Qb.config,"assetsPrefix")&&(a=Qb.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)}};n.DefaultAssetLibrary=mi;mi.__name__=["DefaultAssetLibrary"];mi.__super__=
fg;mi.prototype=L(fg.prototype,{exists:function(a,b){var c;c=null!=b?q.__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},getAudioBuffer:function(a){return null},getBytes:function(a){a=this.path.get(a);a=Ac.loaders.get(a);if(null==a)return null;a=a.bytes;return null!=a?a:null},getFont:function(a){return q.__cast(ua.createInstance(this.className.get(a),[]),ie)},getImage:function(a){return pb.fromImageElement(function(b){b=
b.path.get(a);return Ac.images.get(b)}(this))},getPath:function(a){return this.path.get(a)},getText:function(a){a=this.path.get(a);a=Ac.loaders.get(a);if(null==a)return null;a=a.bytes;return null!=a?a.getString(0,a.length):null},isLocal:function(a,b){null!=b&&q.__cast(b,String);return!0},list:function(a){var b;b=null!=a?q.__cast(a,String):null;for(var c=[],d=this.type.keys();d.hasNext();){var e=d.next();(null==b||this.exists(e,a))&&c.push(e)}return c},loadAudioBuffer:function(a){var b=this,c=new Jc;
c.completeWith(new Rb(function(){return b.getAudioBuffer(a)}));return c.future},loadBytes:function(a){var b=new Jc;if(this.path.exists(a)){var c=new gg;b.completeWith(c.load(this.path.get(a)+"?"+N.cache.version))}else b.complete(this.getBytes(a));return b.future},loadImage:function(a){var b=new Jc;if(this.path.exists(a)){var c=new Image;c.onload=function(a){b.complete(pb.fromImageElement(c))};c.onerror=K(b,b.error);c.src=this.path.get(a)+"?"+N.cache.version}else b.complete(this.getImage(a));return b.future},
loadText:function(a){var b=new Jc;this.path.exists(a)?(a=(new gg).load(this.path.get(a)+"?"+N.cache.version),a.onProgress(function(a){b.progress(a)}),a.onError(function(a){b.error(a)}),a.onComplete(function(a){b.complete(a.getString(0,a.length))})):b.complete(this.getText(a));return b.future},__class__:mi});var Rd=function(a,b){b=b.split("u").join("");this.r=new RegExp(a,b)};n.EReg=Rd;Rd.__name__=["EReg"];Rd.prototype={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},matched:function(a){if(null!=this.r.m&&0<=a&&a<this.r.m.length)return this.r.m[a];throw new F("EReg::matched");},replace:function(a,b){return a.replace(this.r,b)},__class__:Rd};var P=function(){};n.HxOverrides=P;P.__name__=["HxOverrides"];P.strDate=function(a){switch(a.length){case 8:a=a.split(":");var b=new Date;b.setTime(0);b.setUTCHours(a[0]);b.setUTCMinutes(a[1]);b.setUTCSeconds(a[2]);return b;case 10:return a=a.split("-"),new Date(a[0],a[1]-1,a[2],0,0,0);case 19:return b=
a.split(" "),a=b[0].split("-"),b=b[1].split(":"),new Date(a[0],a[1]-1,a[2],b[0],b[1],b[2]);default:throw new F("Invalid date format : "+a);}};P.cca=function(a,b){var c=a.charCodeAt(b);return c!=c?void 0:c};P.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)};P.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};P.remove=function(a,b){var c=
P.indexOf(a,b,0);if(-1==c)return!1;a.splice(c,1);return!0};P.iter=function(a){return{cur:0,arr:a,hasNext:function(){return this.cur<this.arr.length},next:function(){return this.arr[this.cur++]}}};var Wg=function(){};n.Lambda=Wg;Wg.__name__=["Lambda"];Wg.count=function(a,b){var c=0;if(null==b)for(var d=Dn(a)();d.hasNext();)d.next(),c++;else for(d=Dn(a)();d.hasNext();){var e=d.next();b(e)&&c++}return c};Wg.indexOf=function(a,b){for(var c=0,d=Dn(a)();d.hasNext();){var e=d.next();if(b==e)return c;c++}return-1};
var Af=function(){this.length=0};n.List=Af;Af.__name__=["List"];Af.prototype={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++},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},clear:function(){this.q=this.h=null;this.length=0},iterator:function(){return new Ik(this.h)},__class__:Af};var Ik=function(a){this.head=a;
this.val=null};n["_List.ListIterator"]=Ik;Ik.__name__=["_List","ListIterator"];Ik.prototype={hasNext:function(){return null!=this.head},next:function(){this.val=this.head[0];this.head=this.head[1];return this.val},__class__:Ik};Math.__name__=["Math"];var Sd=function(){ga.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 ga;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 ga;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)};n.NMEPreloader=Sd;Sd.__name__=["NMEPreloader"];Sd.__super__=ga;Sd.prototype=L(ga.prototype,{getBackgroundColor:function(){return 0},getHeight:function(){return 682},getWidth:function(){return 1024},
onInit:function(){},onLoaded:function(){this.dispatchEvent(new fa("complete"))},onUpdate:function(a,b){var c=a/b;1<c&&(c=1);this.progress.set_scaleX(c)},__class__:Sd});var O=function(){};n.Reflect=O;O.__name__=["Reflect"];O.hasField=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};O.field=function(a,b){try{return a[b]}catch(c){return Ia.lastException=c,c instanceof F&&(c=c.val),null}};O.setField=function(a,b,c){a[b]=c};O.getProperty=function(a,b){var c;return null==a?null:a.__properties__&&
(c=a.__properties__["get_"+b])?a[c]():a[b]};O.setProperty=function(a,b,c){var d;if(a.__properties__&&(d=a.__properties__["set_"+b]))a[d](c);else a[b]=c};O.callMethod=function(a,b,c){return b.apply(a,c)};O.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};O.isFunction=function(a){return"function"==typeof a&&!(a.__name__||a.__ename__)};O.compareMethods=function(a,b){return a==b?!0:O.isFunction(a)&&
O.isFunction(b)?a.scope==b.scope&&a.method==b.method&&null!=a.method:!1};O.deleteField=function(a,b){if(!Object.prototype.hasOwnProperty.call(a,b))return!1;delete a[b];return!0};O.makeVarArgs=function(a){return function(){var b=Array.prototype.slice.call(arguments);return a(b)}};var Aa=function(a,b){null==b&&(b=2);this.swipeTimeout=.1;this.longPressDelay=1;var c=this;Aa.init();this.owner=a;this.mode=b;var d=Ec.get_supportsTouchEvents();this.owner.mouseEnabled=!0;this.listenEvents=1==this.mode?d?Aa.touchEvents:
Aa.mouseEvents:d?Aa.geTouchEvents:Aa.geMouseEvents;this.handler=1==this.mode?d?K(this,this.convertTouch):K(this,this.convertMouse):d?K(this,this.onTouch):K(this,this.onMouse);for(var d=0,e=this.listenEvents;d<e.length;){var f=e[d];++d;this.owner.addEventListener(f,this.handler)}3==this.mode&&ka.current.stage.addEventListener("resize",function(a){c.overlay=null});this.touchList=new Af;this.setReady()};n.RoxGestureAgent=Aa;Aa.__name__=["RoxGestureAgent"];Aa.__properties__={get_multitouchSupported:"get_multitouchSupported"};
Aa.multitouchSupported=null;Aa.init=function(){if(!Aa.initialized){Aa.initialized=!0;var a=ka.current.stage;Aa.moveToleSqr=.008*(new W(a.stageWidth,a.stageHeight)).get_length();Aa.moveToleSqr*=Aa.moveToleSqr;Ec.get_supportsTouchEvents()&&Ec.set_inputMode(2)}};Aa.localOffset=function(a,b){var c=a.parent.localToGlobal(new W(a.get_x(),a.get_y()));c.offset(b.x,b.y);c=a.parent.globalToLocal(c);c.offset(-a.get_x(),-a.get_y());return c};Aa.get_multitouchSupported=function(){return Ec.get_supportsTouchEvents()&&
1<Ec.maxTouchPoints};Aa.initTypeMap=function(){for(var a=new ma,b=0,c=Aa.MAP.length>>1;b<c;){var d=b++;a.set(Aa.MAP[d<<1],Aa.MAP[(d<<1)+1])}return a};Aa.prototype={detach:function(){null!=this.tweener&&(ea.stop(this.tweener,null,!1,!1),this.tweener=null);this.setReady();for(var a=0,b=this.listenEvents;a<b.length;){var c=b[a];++a;this.owner.removeEventListener(c,this.handler)}this.overlay=this.owner=null},getHandler:function(a){null==a&&(a=3);return function(a,c){return function(d){a(c,d)}}(K(this,
this.handleEvent),a)},startTween:function(a,b,c){this.tweener=ea.tween(a,b,c,!1)},stopTween:function(){null!=this.tweener&&(ea.stop(this.tweener,null,!1,!1),this.tweener=null)},handleEvent:function(a,b){var c=b.target;if(c==this.owner)switch(b.type){case "rox_gesture_pan":var d=Aa.localOffset(c,b.extra);0!=(a&1)&&c.set_x(c.get_x()+d.x);0!=(a&2)&&c.set_y(c.get_y()+d.y);break;case "rox_gesture_swipe":d=Aa.localOffset(c,new W(2*b.extra.x,2*b.extra.y));this.startTween(c,2,{x:c.get_x()+d.x,y:c.get_y()+
d.y});break;case "rox_gesture_pinch":var d=b.extra,e=c.parent.localToGlobal(new W(c.get_x(),c.get_y())),f=e.x-b.stageX,g=e.y-b.stageY,e=Math.atan2(g,f),f=(new W(f,g)).get_length()*d,f=W.polar(f,e);f.offset(b.stageX,b.stageY);f=c.parent.globalToLocal(f);c.set_scaleX(c.get_scaleX()*d);c.set_scaleY(c.get_scaleY()*d);c.set_x(f.x);c.set_y(f.y);break;case "rox_gesture_rotation":d=b.extra,e=c.parent.localToGlobal(new W(c.get_x(),c.get_y())),f=e.x-b.stageX,g=e.y-b.stageY,e=Math.atan2(g,f),f=(new W(f,g)).get_length(),
f=W.polar(f,e+d),f.offset(b.stageX,b.stageY),f=c.parent.globalToLocal(f),c.set_rotation(c.get_rotation()+Aa.R2D*d),c.set_x(f.x),c.set_y(f.y)}},convertTouch:function(a){this.owner.dispatchEvent(new Eb(Aa.typeMap.get(a.type),a.bubbles,a.cancelable,a.localX,a.localY,a.stageX,a.stageY,a.touchPointID,this))},convertMouse:function(a){var b=a.type;("mouseDown"==b||"mouseUp"==b||"click"==b||a.buttonDown)&&this.owner.dispatchEvent(new Eb(Aa.typeMap.get(b),a.bubbles,a.cancelable,a.localX,a.localY,a.stageX,
a.stageY,0,this))},onTouch:function(a){var b=a.touchPointID,c=null==this.touch0||this.touch0.tid==b;(c||null!=this.touch1&&this.touch1.tid==b||null!=this.touch0&&null==this.touch1&&this.touch0.tid!=b)&&this.handleTouch(Aa.typeMap.get(a.type),a,c,b)},onMouse:function(a){var b=a.type;("mouseDown"==b||"mouseUp"==b||a.buttonDown)&&this.handleTouch(Aa.typeMap.get(b),a,!0,0)},handleTouch:function(a,b,c,d){var e=new Jk(this.owner,b,d);d=c?this.touch0:this.touch1;if("rox_touch_move"==a&&null!=d&&e.distSqr(d)<
Aa.moveToleSqr)return!1;d=!0;switch(this.state){case 0:if(c&&"rox_touch_begin"==a){if(this.state=1,this.touch0=e,this.longPressTimer=ea.timer(this.longPressDelay).onComplete(K(this,this.sendLongPress),[e]),null!=this.tweener&&(ea.stop(this.tweener,null,!1,!1),this.tweener=null),3==this.mode)for(e=ka.current.stage,null==this.overlay&&(this.overlay=new ga,this.overlay.set_name("overlay"),this.overlay.get_graphics().beginFill(16777215,.00392156862745098),this.overlay.get_graphics().drawRect(0,0,e.stageWidth,
e.stageHeight)),e.addChild(this.overlay),e=0,c=this.listenEvents;e<c.length;)a=c[e],++e,this.overlay.addEventListener(a,this.handler)}else d=!1;break;case 1:c&&"rox_touch_end"==a?(this.owner.dispatchEvent(new Eb("rox_gesture_tap",null,null,e.lx,e.ly,e.sx,e.sy,null,this)),this.setReady()):c&&"rox_touch_move"==a?(c=new W(e.sx-this.touch0.sx,e.sy-this.touch0.sy),this.owner.dispatchEvent(new Eb("rox_gesture_pan",null,null,e.lx,e.ly,e.sx,e.sy,null,this,c)),this.state=4,null!=this.touch0&&this.touchList.push(this.touch0),
this.touch0=e,null!=this.longPressTimer&&(ea.stop(this.longPressTimer,null,!1,!1),this.longPressTimer=null)):c||"rox_touch_begin"!=a?d=!1:(this.state=2,this.touch1=e,null!=this.longPressTimer&&(ea.stop(this.longPressTimer,null,!1,!1),this.longPressTimer=null));break;case 4:if(c&&"rox_touch_move"==a)c=new W(e.sx-this.touch0.sx,e.sy-this.touch0.sy),this.owner.dispatchEvent(new Eb("rox_gesture_pan",null,null,e.lx,e.ly,e.sx,e.sy,null,this,c)),this.state=4,null!=this.touch0&&this.touchList.push(this.touch0),
this.touch0=e,null!=this.longPressTimer&&(ea.stop(this.longPressTimer,null,!1,!1),this.longPressTimer=null);else if(c&&("rox_touch_end"==a||3!=this.mode&&"rox_touch_out"==a&&b.target==this.owner)){if(0>=this.swipeTimeout||e.time-this.touch0.time<this.swipeTimeout){c=this.touchList.pop();a=null;b=this.touchList.h;for(var f=null;null!=b;){f=void 0;f=b[0];b=b[1];if(.2<c.time-f.time)break;a=f}if(null!=a){var g=Math.atan2(f=c.sy-a.sy,b=c.sx-a.sx);c=W.polar((new W(b,f)).get_length()/(c.time-a.time)*.25,
g);this.owner.dispatchEvent(new Eb("rox_gesture_swipe",null,null,e.lx,e.ly,e.sx,e.sy,null,this,c))}}this.setReady()}else c||"rox_touch_begin"!=a?d=!1:(this.owner.dispatchEvent(new Eb("rox_gesture_begin",null,null,e.lx,e.ly,e.sx,e.sy,null,this)),this.state=2,this.touch1=e,null!=this.longPressTimer&&(ea.stop(this.longPressTimer,null,!1,!1),this.longPressTimer=null));break;case 2:"rox_touch_end"==a?(this.owner.dispatchEvent(new Eb("rox_gesture_end",null,null,e.lx,e.ly,e.sx,e.sy,null,this)),this.setReady()):
"rox_touch_move"==a?(f=c?this.touch1:this.touch0,g=c?this.touch0:this.touch1,a=W.distance(e.spt,f.spt)/W.distance(g.spt,f.spt),b=Math.atan2(e.sy-f.sy,e.sx-f.sx)-Math.atan2(g.sy-f.sy,g.sx-f.sx),f=W.interpolate(f.lpt,g.lpt,.5),g=this.owner.localToGlobal(f),1!=a&&this.owner.dispatchEvent(new Eb("rox_gesture_pinch",null,null,f.x,f.y,g.x,g.y,null,this,a)),0!=b&&this.owner.dispatchEvent(new Eb("rox_gesture_rotation",null,null,f.x,f.y,g.x,g.y,null,this,b)),c?this.touch0=e:this.touch1=e):d=!1}return d},sendLongPress:function(a){this.owner.dispatchEvent(new Eb("rox_gesture_long_press",
null,null,a.lx,a.ly,a.sx,a.sy,null,this));this.setReady()},setReady:function(){this.state=0;this.touch0=this.touch1=null;this.touchList.clear();null!=this.longPressTimer&&(ea.stop(this.longPressTimer,null,!1,!1),this.longPressTimer=null);if(null!=this.overlay&&3==this.mode){for(var a=0,b=this.listenEvents;a<b.length;){var c=b[a];++a;this.overlay.removeEventListener(c,this.handler)}ka.current.stage.removeChild(this.overlay)}},setMove:function(a){this.state=4;null!=this.touch0&&this.touchList.push(this.touch0);
this.touch0=a;null!=this.longPressTimer&&(ea.stop(this.longPressTimer,null,!1,!1),this.longPressTimer=null)},setTwoFingerMove:function(a){this.state=2;this.touch1=a;null!=this.longPressTimer&&(ea.stop(this.longPressTimer,null,!1,!1),this.longPressTimer=null)},cancelLongPress:function(){null!=this.longPressTimer&&(ea.stop(this.longPressTimer,null,!1,!1),this.longPressTimer=null)},__class__:Aa};var Jk=function(a,b,c){this.tid=c;this.sx=b.stageX;this.sy=b.stageY;this.spt=new W(this.sx,this.sy);this.lpt=
a.globalToLocal(this.spt);this.lx=this.lpt.x;this.ly=this.lpt.y;this.time=Ad.stamp()};n["_RoxGestureAgent.TouchPoint"]=Jk;Jk.__name__=["_RoxGestureAgent","TouchPoint"];Jk.prototype={distSqr:function(a){var b=a.sx-this.sx;a=a.sy-this.sy;return b*b+a*a},__class__:Jk};var fa=function(a,b,c){null==c&&(c=!1);null==b&&(b=!1);this.type=a;this.bubbles=b;this.cancelable=c;this.eventPhase=2};n["openfl.events.Event"]=fa;fa.__name__=["openfl","events","Event"];fa.prototype={clone:function(){var a=new fa(this.type,
this.bubbles,this.cancelable);a.eventPhase=this.eventPhase;a.target=this.target;a.currentTarget=this.currentTarget;return a},formatToString:function(a,b,c,d,e,f){var g=[];null!=b&&g.push(b);null!=c&&g.push(c);null!=d&&g.push(d);null!=e&&g.push(e);null!=f&&g.push(f);return K(this,this.__formatToString).apply(this,[a,g])},isDefaultPrevented:function(){return this.__preventDefault},preventDefault:function(){this.cancelable&&(this.__preventDefault=!0)},stopImmediatePropagation:function(){this.__isCanceledNow=
this.__isCanceled=!0},stopPropagation:function(){this.__isCanceled=!0},toString:function(){return this.__formatToString("Event",["type","bubbles","cancelable"])},__formatToString:function(a,b){for(var c="["+a,d=null,e=0;e<b.length;){var f=b[e];++e;d=O.field(this,f);c="string"==typeof d?c+(" "+f+'="'+u.string(d)+'"'):c+(" "+f+"="+u.string(d))}return c+"]"},__class__:fa};var Eb=function(a,b,c,d,e,f,g,k,p,w){null==k&&(k=0);null==c&&(c=!1);null==b&&(b=!0);fa.call(this,a,b,c);this.localX=d;this.localY=
e;this.stageX=f;this.stageY=g;this.touchPointID=k;this.agent=p;this.extra=w};n.RoxGestureEvent=Eb;Eb.__name__=["RoxGestureEvent"];Eb.__super__=fa;Eb.prototype=L(fa.prototype,{toString:function(){return this.type+"("+this.touchPointID+"): local=("+this.localX+","+this.localY+"), stage=("+this.stageX+","+this.stageY+"), extra="+(q.__instanceof(this.extra,W)?"Point("+u.string(this.extra.x)+","+u.string(this.extra.y)+")":this.extra)},__class__:Eb});var u=function(){};n.Std=u;u.__name__=["Std"];u.is=function(a,
b){return q.__instanceof(a,b)};u.string=function(a){return q.__string_rec(a,"")};u["int"]=function(a){return a|0};u.parseInt=function(a){var b=parseInt(a,10);0!=b||120!=P.cca(a,1)&&88!=P.cca(a,1)||(b=parseInt(a));return isNaN(b)?null:b};u.parseFloat=function(a){return parseFloat(a)};var je=function(){this.b=""};n.StringBuf=je;je.__name__=["StringBuf"];je.prototype={add:function(a){this.b+=u.string(a)},addSub:function(a,b,c){this.b=null==c?this.b+P.substr(a,b,null):this.b+P.substr(a,b,c)},__class__:je};
var Ca=function(){};n.StringTools=Ca;Ca.__name__=["StringTools"];Ca.urlEncode=function(a){return encodeURIComponent(a)};Ca.urlDecode=function(a){return decodeURIComponent(a.split("+").join(" "))};Ca.startsWith=function(a,b){return a.length>=b.length&&P.substr(a,0,b.length)==b};Ca.isSpace=function(a,b){var c=P.cca(a,b);return 8<c&&14>c||32==c};Ca.ltrim=function(a){for(var b=a.length,c=0;c<b&&Ca.isSpace(a,c);)c++;return 0<c?P.substr(a,c,b-c):a};Ca.rtrim=function(a){for(var b=a.length,c=0;c<b&&Ca.isSpace(a,
b-c-1);)c++;return 0<c?P.substr(a,0,b-c):a};Ca.trim=function(a){return Ca.ltrim(Ca.rtrim(a))};Ca.replace=function(a,b,c){return a.split(b).join(c)};Ca.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};Ca.fastCodeAt=function(a,b){return a.charCodeAt(b)};var bb=n.ValueType={__ename__:["ValueType"],__constructs__:"TNull TInt TFloat TBool TObject TFunction TClass TEnum TUnknown".split(" ")};bb.TNull=["TNull",0];bb.TNull.toString=
J;bb.TNull.__enum__=bb;bb.TInt=["TInt",1];bb.TInt.toString=J;bb.TInt.__enum__=bb;bb.TFloat=["TFloat",2];bb.TFloat.toString=J;bb.TFloat.__enum__=bb;bb.TBool=["TBool",3];bb.TBool.toString=J;bb.TBool.__enum__=bb;bb.TObject=["TObject",4];bb.TObject.toString=J;bb.TObject.__enum__=bb;bb.TFunction=["TFunction",5];bb.TFunction.toString=J;bb.TFunction.__enum__=bb;bb.TClass=function(a){a=["TClass",6,a];a.__enum__=bb;a.toString=J;return a};bb.TEnum=function(a){a=["TEnum",7,a];a.__enum__=bb;a.toString=J;return a};
bb.TUnknown=["TUnknown",8];bb.TUnknown.toString=J;bb.TUnknown.__enum__=bb;var ua=function(){};n.Type=ua;ua.__name__=["Type"];ua.getSuperClass=function(a){return a.__super__};ua.getClassName=function(a){a=a.__name__;return null==a?null:a.join(".")};ua.getEnumName=function(a){return a.__ename__.join(".")};ua.resolveClass=function(a){a=n[a];return null!=a&&a.__name__?a:null};ua.resolveEnum=function(a){a=n[a];return null!=a&&a.__ename__?a:null};ua.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 F("Too many arguments");}};ua.createEmptyInstance=function(a){function b(){}b.prototype=a.prototype;return new b};ua.createEnum=function(a,
b,c){var d=O.field(a,b);if(null==d)throw new F("No such constructor "+b);if(O.isFunction(d)){if(null==c)throw new F("Constructor "+b+" need parameters");return O.callMethod(a,d,c)}if(null!=c&&0!=c.length)throw new F("Constructor "+b+" does not need parameters");return d};ua.getClassFields=function(a){a=O.fields(a);P.remove(a,"__name__");P.remove(a,"__interfaces__");P.remove(a,"__properties__");P.remove(a,"__super__");P.remove(a,"__meta__");P.remove(a,"prototype");return a};ua.getEnumConstructs=function(a){return a.__constructs__.slice()};
ua["typeof"]=function(a){switch(typeof a){case "boolean":return bb.TBool;case "string":return bb.TClass(String);case "number":return Math.ceil(a)==a%2147483648?bb.TInt:bb.TFloat;case "object":if(null==a)return bb.TNull;var b=a.__enum__;if(null!=b)return bb.TEnum(b);a=q.getClass(a);return null!=a?bb.TClass(a):bb.TObject;case "function":return a.__name__||a.__ename__?bb.TObject:bb.TFunction;case "undefined":return bb.TNull;default:return bb.TUnknown}};ua.enumEq=function(a,b){if(a==b)return!0;try{if(a[0]!=
b[0])return!1;for(var c=2,d=a.length;c<d;){var e=c++;if(!ua.enumEq(a[e],b[e]))return!1}var f=a.__enum__;if(f!=b.__enum__||null==f)return!1}catch(g){return Ia.lastException=g,g instanceof F&&(g=g.val),!1}return!0};var va={};n["_UInt.UInt_Impl_"]=va;va.__name__=["_UInt","UInt_Impl_"];va.gt=function(a,b){var c=0>a;return c!=0>b?c:a>b};va.toFloat=function(a){return 0>a?4294967296+a:a+0};var ba=function(a){this.nodeType=a;this.children=[];this.attributeMap=new ma};n.Xml=ba;ba.__name__=["Xml"];ba.parse=
function(a){return cf.parse(a)};ba.createElement=function(a){var b=new ba(ba.Element);if(b.nodeType!=ba.Element)throw new F("Bad node type, expected Element but found "+b.nodeType);b.nodeName=a;return b};ba.createPCData=function(a){var b=new ba(ba.PCData);if(b.nodeType==ba.Document||b.nodeType==ba.Element)throw new F("Bad node type, unexpected "+b.nodeType);b.nodeValue=a;return b};ba.createCData=function(a){var b=new ba(ba.CData);if(b.nodeType==ba.Document||b.nodeType==ba.Element)throw new F("Bad node type, unexpected "+
b.nodeType);b.nodeValue=a;return b};ba.createComment=function(a){var b=new ba(ba.Comment);if(b.nodeType==ba.Document||b.nodeType==ba.Element)throw new F("Bad node type, unexpected "+b.nodeType);b.nodeValue=a;return b};ba.createDocType=function(a){var b=new ba(ba.DocType);if(b.nodeType==ba.Document||b.nodeType==ba.Element)throw new F("Bad node type, unexpected "+b.nodeType);b.nodeValue=a;return b};ba.createProcessingInstruction=function(a){var b=new ba(ba.ProcessingInstruction);if(b.nodeType==ba.Document||
b.nodeType==ba.Element)throw new F("Bad node type, unexpected "+b.nodeType);b.nodeValue=a;return b};ba.createDocument=function(){return new ba(ba.Document)};ba.prototype={get_nodeName:function(){if(this.nodeType!=ba.Element)throw new F("Bad node type, expected Element but found "+this.nodeType);return this.nodeName},get:function(a){if(this.nodeType!=ba.Element)throw new F("Bad node type, expected Element but found "+this.nodeType);return this.attributeMap.get(a)},set:function(a,b){if(this.nodeType!=
ba.Element)throw new F("Bad node type, expected Element but found "+this.nodeType);this.attributeMap.set(a,b)},exists:function(a){if(this.nodeType!=ba.Element)throw new F("Bad node type, expected Element but found "+this.nodeType);return this.attributeMap.exists(a)},iterator:function(){if(this.nodeType!=ba.Document&&this.nodeType!=ba.Element)throw new F("Bad node type, expected Element or Document but found "+this.nodeType);return P.iter(this.children)},elements:function(){if(this.nodeType!=ba.Document&&
this.nodeType!=ba.Element)throw new F("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==ba.Element&&a.push(d)}return P.iter(a)},elementsNamed:function(a){if(this.nodeType!=ba.Document&&this.nodeType!=ba.Element)throw new F("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==ba.Element){f=void 0;if(e.nodeType!=
ba.Element)throw new F("Bad node type, expected Element but found "+e.nodeType);f=e.nodeName;f=f==a}f&&b.push(e)}return P.iter(b)},firstElement:function(){if(this.nodeType!=ba.Document&&this.nodeType!=ba.Element)throw new F("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==ba.Element)return c}return null},addChild:function(a){if(this.nodeType!=ba.Document&&this.nodeType!=ba.Element)throw new F("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!=ba.Document&&this.nodeType!=ba.Element)throw new F("Bad node type, expected Element or Document but found "+this.nodeType);return P.remove(this.children,a)?(a.parent=null,!0):!1},__class__:ba,__properties__:{get_nodeName:"get_nodeName"}};var fd=function(){this.lowerBound=new y;this.upperBound=new y};n["box2D.collision.B2AABB"]=fd;fd.__name__=["box2D","collision","B2AABB"];
fd.prototype={isValid:function(){var a=this.upperBound.y-this.lowerBound.y;return a=(a=0<=this.upperBound.x-this.lowerBound.x&&0<=a)&&this.lowerBound.isValid()&&this.upperBound.isValid()},getCenter:function(){return new y((this.lowerBound.x+this.upperBound.x)/2,(this.lowerBound.y+this.upperBound.y)/2)},getExtents:function(){return new y((this.upperBound.x-this.lowerBound.x)/2,(this.upperBound.y-this.lowerBound.y)/2)},contains:function(a){var b;return b=(b=(b=(b=this.lowerBound.x<=a.lowerBound.x)&&
this.lowerBound.y<=a.lowerBound.y)&&a.upperBound.x<=this.upperBound.x)&&a.upperBound.y<=this.upperBound.y},rayCast:function(a,b){var c=-Number.MAX_VALUE,d=Number.MAX_VALUE,e=b.p1.x,f=b.p1.y,g=b.p2.x-b.p1.x,k=b.p2.y-b.p1.y,p=Math.abs(g),w=Math.abs(k),h=a.normal;if(p<Number.MIN_VALUE){if(e<this.lowerBound.x||this.upperBound.x<e)return!1}else if(p=1/g,g=(this.lowerBound.x-e)*p,e=(this.upperBound.x-e)*p,p=-1,g>e&&(p=g,g=e,e=p,p=1),g>c&&(h.x=p,h.y=0,c=g),d=Math.min(d,e),c>d)return!1;if(w<Number.MIN_VALUE){if(f<
this.lowerBound.y||this.upperBound.y<f)return!1}else if(p=1/k,g=(this.lowerBound.y-f)*p,e=(this.upperBound.y-f)*p,p=-1,g>e&&(p=g,g=e,e=p,p=1),g>c&&(h.y=p,h.x=0,c=g),d=Math.min(d,e),c>d)return!1;a.fraction=c;return!0},testOverlap:function(a){var b=a.lowerBound.y-this.upperBound.y,c=this.lowerBound.y-a.upperBound.y;return 0<a.lowerBound.x-this.upperBound.x||0<b||0<this.lowerBound.x-a.upperBound.x||0<c?!1:!0},combine:function(a,b){this.lowerBound.x=Math.min(a.lowerBound.x,b.lowerBound.x);this.lowerBound.y=
Math.min(a.lowerBound.y,b.lowerBound.y);this.upperBound.x=Math.max(a.upperBound.x,b.upperBound.x);this.upperBound.y=Math.max(a.upperBound.y,b.upperBound.y)},__class__:fd};var y=function(a,b){null==b&&(b=0);null==a&&(a=0);this.x=a;this.y=b};n["box2D.common.math.B2Vec2"]=y;y.__name__=["box2D","common","math","B2Vec2"];y.make=function(a,b){return new y(a,b)};y.freePool=function(){y.pooli=0};y.getFromPool=function(){500<y.pooli&&(y.pooli=0);if(y.pooli<y.pool.length){var a=y.pool[y.pooli];a.x=0;a.y=0;
y.pooli++;return a}a=new y;y.pool.push(a);y.pooli++;return a};y.prototype={setZero:function(){this.y=this.x=0},set:function(a,b){null==b&&(b=0);null==a&&(a=0);this.x=a;this.y=b},setV:function(a){this.x=a.x;this.y=a.y},getNegative:function(){return new y(-this.x,-this.y)},getNegativePooled:function(){var a=y.getFromPool();a.x=-this.x;a.y=-this.y;return a},negativeSelf:function(){this.x=-this.x;this.y=-this.y},copy:function(a){null==a&&(a=!1);a?(a=y.getFromPool(),a.x=this.x,a.y=this.y):a=new y(this.x,
this.y);return a},add:function(a){this.x+=a.x;this.y+=a.y},subtract:function(a){this.x-=a.x;this.y-=a.y},multiply:function(a){this.x*=a;this.y*=a},mulM:function(a){var b=this.x;this.x=a.col1.x*b+a.col2.x*this.y;this.y=a.col1.y*b+a.col2.y*this.y},mulTM:function(a){var b=x.dot(this,a.col1);this.y=x.dot(this,a.col2);this.x=b},crossVF:function(a){var b=this.x;this.x=a*this.y;this.y=-a*b},crossFV:function(a){var b=this.x;this.x=-a*this.y;this.y=a*b},minV:function(a){this.x=this.x<a.x?this.x:a.x;this.y=
this.y<a.y?this.y:a.y},maxV:function(a){this.x=this.x>a.x?this.x:a.x;this.y=this.y>a.y?this.y:a.y},abs:function(){0>this.x&&(this.x=-this.x);0>this.y&&(this.y=-this.y)},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},lengthSquared:function(){return this.x*this.x+this.y*this.y},normalize:function(){var a=Math.sqrt(this.x*this.x+this.y*this.y);if(a<Number.MIN_VALUE)return 0;var b=1/a;this.x*=b;this.y*=b;return a},perpDot:function(a){return-this.y*a.x+this.x*a.y},winding:function(a,
b){var c=a.copy();c.subtract(this);var d=b.copy();d.subtract(a);return c.perpDot(d)},isValid:function(){return x.isValid(this.x)&&x.isValid(this.y)},reset:function(){this.y=this.x=0},__class__:y};var ni=function(){this.v=new y;this.id=new kc};n["box2D.collision.ClipVertex"]=ni;ni.__name__=["box2D","collision","ClipVertex"];ni.prototype={set:function(a){this.v.setV(a.v);this.id.set(a.id)},__class__:ni};var kc=function(){this.features=new Kk;this.features._m_id=this};n["box2D.collision.B2ContactID"]=
kc;kc.__name__=["box2D","collision","B2ContactID"];kc.prototype={set:function(a){this.set_key(a._key)},copy:function(){var a=new kc;a.set_key(this.get_key());return a},get_key:function(){return this._key},set_key:function(a){this._key=a;this.features._referenceEdge=this._key&255;this.features._incidentEdge=(this._key&65280)>>8&255;this.features._incidentVertex=(this._key&16711680)>>16&255;this.features._flip=(this._key&-16777216)>>24&255;return this._key},__class__:kc,__properties__:{set_key:"set_key",
get_key:"get_key"}};var Kk=function(){};n["box2D.collision.Features"]=Kk;Kk.__name__=["box2D","collision","Features"];Kk.prototype={get_referenceEdge:function(){return this._referenceEdge},set_referenceEdge:function(a){this._referenceEdge=a;this._m_id._key=this._m_id._key&-256|this._referenceEdge&255;return a},get_incidentEdge:function(){return this._incidentEdge},set_incidentEdge:function(a){this._incidentEdge=a;this._m_id._key=this._m_id._key&-65281|this._incidentEdge<<8&65280;return a},get_incidentVertex:function(){return this._incidentVertex},
set_incidentVertex:function(a){this._incidentVertex=a;this._m_id._key=this._m_id._key&-16711681|this._incidentVertex<<16&16711680;return a},get_flip:function(){return this._flip},set_flip:function(a){this._flip=a;this._m_id._key=this._m_id._key&16777215|this._flip<<24&-16777216;return a},__class__:Kk,__properties__:{set_flip:"set_flip",get_flip:"get_flip",set_incidentVertex:"set_incidentVertex",get_incidentVertex:"get_incidentVertex",set_incidentEdge:"set_incidentEdge",get_incidentEdge:"get_incidentEdge",
set_referenceEdge:"set_referenceEdge",get_referenceEdge:"get_referenceEdge"}};var Ja=function(){};n["box2D.collision.B2Collision"]=Ja;Ja.__name__=["box2D","collision","B2Collision"];Ja.clipSegmentToLine=function(a,b,c,d){var e,f=0;e=b[0];var g=e.v;e=b[1];var k=e.v,p=c.x*g.x+c.y*g.y-d;e=c.x*k.x+c.y*k.y-d;0>=p&&a[f++].set(b[0]);0>=e&&a[f++].set(b[1]);0>p*e&&(c=p/(p-e),e=a[f],e=e.v,e.x=g.x+c*(k.x-g.x),e.y=g.y+c*(k.y-g.y),e=a[f],e.id=(0<p?b[0]:b[1]).id,++f);return f};Ja.edgeSeparation=function(a,b,c,
d,e){var f=a.m_vertices;a=a.m_normals;var g=d.m_vertexCount,k=d.m_vertices,p,w;p=b.R;w=a[c];a=p.col1.x*w.x+p.col2.x*w.y;d=p.col1.y*w.x+p.col2.y*w.y;p=e.R;var h=p.col1.x*a+p.col1.y*d;p=p.col2.x*a+p.col2.y*d;for(var l=0,m=Number.MAX_VALUE,n=0;n<g;){var D=n++;w=k[D];w=w.x*h+w.y*p;w<m&&(m=w,l=D)}w=f[c];p=b.R;c=b.position.x+(p.col1.x*w.x+p.col2.x*w.y);b=b.position.y+(p.col1.y*w.x+p.col2.y*w.y);w=k[l];p=e.R;f=e.position.x+(p.col1.x*w.x+p.col2.x*w.y);e=e.position.y+(p.col1.y*w.x+p.col2.y*w.y);return(f-c)*
a+(e-b)*d};Ja.findMaxSeparation=function(a,b,c,d,e){var f=b.m_vertexCount,g=b.m_normals,k,p;p=e.R;k=d.m_centroid;var w=e.position.x+(p.col1.x*k.x+p.col2.x*k.y),h=e.position.y+(p.col1.y*k.x+p.col2.y*k.y);p=c.R;k=b.m_centroid;w-=c.position.x+(p.col1.x*k.x+p.col2.x*k.y);h-=c.position.y+(p.col1.y*k.x+p.col2.y*k.y);p=w*c.R.col1.x+h*c.R.col1.y;for(var h=w*c.R.col2.x+h*c.R.col2.y,w=0,l=-Number.MAX_VALUE,m=0;m<f;){var n=m++;k=g[n];k=k.x*p+k.y*h;k>l&&(l=k,w=n)}g=Ja.edgeSeparation(b,c,w,d,e);l=0<=w-1?w-1:f-
1;p=Ja.edgeSeparation(b,c,l,d,e);m=w+1<f?w+1:0;h=Ja.edgeSeparation(b,c,m,d,e);if(p>g&&p>h)k=-1;else if(h>g)k=1,l=m,p=h;else return a[0]=w,g;for(;;)if(w=-1==k?0<=l-1?l-1:f-1:l+1<f?l+1:0,g=Ja.edgeSeparation(b,c,w,d,e),g>p)l=w,p=g;else break;a[0]=l;return p};Ja.findIncidentEdge=function(a,b,c,d,e,f){var g=b.m_normals,k=e.m_vertexCount;b=e.m_vertices;e=e.m_normals;var p;p=c.R;c=g[d];var g=p.col1.x*c.x+p.col2.x*c.y,w=p.col1.y*c.x+p.col2.y*c.y;p=f.R;c=p.col1.x*g+p.col1.y*w;w=p.col2.x*g+p.col2.y*w;g=c;p=
0;for(var h=Number.MAX_VALUE,l=0;l<k;){var m=l++;c=e[m];c=g*c.x+w*c.y;c<h&&(h=c,p=m)}e=p;g=e+1<k?e+1:0;k=a[0];c=b[e];p=f.R;k.v.x=f.position.x+(p.col1.x*c.x+p.col2.x*c.y);k.v.y=f.position.y+(p.col1.y*c.x+p.col2.y*c.y);k.id.features.set_referenceEdge(d);k.id.features.set_incidentEdge(e);k.id.features.set_incidentVertex(0);k=a[1];c=b[g];p=f.R;k.v.x=f.position.x+(p.col1.x*c.x+p.col2.x*c.y);k.v.y=f.position.y+(p.col1.y*c.x+p.col2.y*c.y);k.id.features.set_referenceEdge(d);k.id.features.set_incidentEdge(g);
k.id.features.set_incidentVertex(1)};Ja.makeClipPointVector=function(){var a=[];a[0]=new ni;a[1]=new ni;return a};Ja.collidePolygons=function(a,b,c,d,e){var f;a.m_pointCount=0;var g=b.m_radius+d.m_radius,k;Ja.s_edgeAO[0]=0;var p=Ja.findMaxSeparation(Ja.s_edgeAO,b,c,d,e);k=Ja.s_edgeAO[0];if(!(p>g)){var w;Ja.s_edgeBO[0]=0;var h=Ja.findMaxSeparation(Ja.s_edgeBO,d,e,b,c);w=Ja.s_edgeBO[0];if(!(h>g)){h>.98*p+.001?(p=d,d=b,b=e,a.m_type=Fc.e_faceB,k=1):(p=b,b=c,c=e,w=k,a.m_type=Fc.e_faceA,k=0);e=Ja.s_incidentEdge;
Ja.findIncidentEdge(e,p,b,w,d,c);h=p.m_vertices;d=h[w];var l;l=w+1<p.m_vertexCount?h[w+1|0]:h[0];p=Ja.s_localTangent;p.x=l.x-d.x;p.y=l.y-d.y;p.normalize();h=Ja.s_localNormal;h.x=p.y;h.y=-p.x;var m=Ja.s_planePoint;m.x=.5*(d.x+l.x);m.y=.5*(d.y+l.y);f=Ja.s_tangent;w=b.R;f.x=w.col1.x*p.x+w.col2.x*p.y;f.y=w.col1.y*p.x+w.col2.y*p.y;var n=Ja.s_tangent2;n.x=-f.x;n.y=-f.y;p=Ja.s_normal;p.x=f.y;p.y=-f.x;var D=Ja.s_v11,zb=Ja.s_v12;D.x=b.position.x+(w.col1.x*d.x+w.col2.x*d.y);D.y=b.position.y+(w.col1.y*d.x+w.col2.y*
d.y);zb.x=b.position.x+(w.col1.x*l.x+w.col2.x*l.y);zb.y=b.position.y+(w.col1.y*l.x+w.col2.y*l.y);b=p.x*D.x+p.y*D.y;w=f.x*zb.x+f.y*zb.y+g;l=Ja.s_clipPoints1;d=Ja.s_clipPoints2;e=Ja.clipSegmentToLine(l,e,n,-f.x*D.x-f.y*D.y+g);if(!(2>e||(e=Ja.clipSegmentToLine(d,l,f,w),2>e))){a.m_localPlaneNormal.setV(h);a.m_localPoint.setV(m);h=e=0;for(m=M.b2_maxManifoldPoints;h<m;)w=h++,f=d[w],p.x*f.v.x+p.y*f.v.y-b<=g&&(n=a.m_points[e],w=c.R,D=f.v.x-c.position.x,l=f.v.y-c.position.y,n.m_localPoint.x=D*w.col1.x+l*w.col1.y,
n.m_localPoint.y=D*w.col2.x+l*w.col2.y,n.m_id.set(f.id),n.m_id.features.set_flip(k),++e);a.m_pointCount=e}}}};Ja.collideCircles=function(a,b,c,d,e){a.m_pointCount=0;var f,g;f=c.R;g=b.m_p;var k=c.position.x+(f.col1.x*g.x+f.col2.x*g.y);c=c.position.y+(f.col1.y*g.x+f.col2.y*g.y);f=e.R;g=d.m_p;k=e.position.x+(f.col1.x*g.x+f.col2.x*g.y)-k;e=e.position.y+(f.col1.y*g.x+f.col2.y*g.y)-c;f=b.m_radius+d.m_radius;k*k+e*e>f*f||(a.m_type=Fc.e_circles,a.m_localPoint.setV(b.m_p),a.m_localPlaneNormal.setZero(),a.m_pointCount=
1,a.m_points[0].m_localPoint.setV(d.m_p),a.m_points[0].m_id.set_key(0))};Ja.collidePolygonAndCircle=function(a,b,c,d,e){a.m_pointCount=0;var f,g,k,p;p=e.R;k=d.m_p;var w=e.position.y+(p.col1.y*k.x+p.col2.y*k.y);f=e.position.x+(p.col1.x*k.x+p.col2.x*k.y)-c.position.x;g=w-c.position.y;p=c.R;c=f*p.col1.x+g*p.col1.y;p=f*p.col2.x+g*p.col2.y;var h=0;e=-Number.MAX_VALUE;var w=b.m_radius+d.m_radius,l=b.m_vertexCount,m=b.m_vertices;b=b.m_normals;for(var n=0;n<l;){var D=n++;k=m[D];f=c-k.x;g=p-k.y;k=b[D];k=k.x*
f+k.y*g;if(k>w)return;k>e&&(e=k,h=D)}k=h;f=m[k];l=m[k+1<l?k+1:0];e<Number.MIN_VALUE?(a.m_pointCount=1,a.m_type=Fc.e_faceA,a.m_localPlaneNormal.setV(b[h]),a.m_localPoint.x=.5*(f.x+l.x),a.m_localPoint.y=.5*(f.y+l.y),a.m_points[0].m_localPoint.setV(d.m_p),a.m_points[0].m_id.set_key(0)):(e=(c-l.x)*(f.x-l.x)+(p-l.y)*(f.y-l.y),0>=(c-f.x)*(l.x-f.x)+(p-f.y)*(l.y-f.y)?(c-f.x)*(c-f.x)+(p-f.y)*(p-f.y)>w*w||(a.m_pointCount=1,a.m_type=Fc.e_faceA,a.m_localPlaneNormal.x=c-f.x,a.m_localPlaneNormal.y=p-f.y,a.m_localPlaneNormal.normalize(),
a.m_localPoint.setV(f),a.m_points[0].m_localPoint.setV(d.m_p),a.m_points[0].m_id.set_key(0)):0>=e?(c-l.x)*(c-l.x)+(p-l.y)*(p-l.y)>w*w||(a.m_pointCount=1,a.m_type=Fc.e_faceA,a.m_localPlaneNormal.x=c-l.x,a.m_localPlaneNormal.y=p-l.y,a.m_localPlaneNormal.normalize(),a.m_localPoint.setV(l),a.m_points[0].m_localPoint.setV(d.m_p),a.m_points[0].m_id.set_key(0)):(h=.5*(f.x+l.x),f=.5*(f.y+l.y),e=(c-h)*b[k].x+(p-f)*b[k].y,e>w||(a.m_pointCount=1,a.m_type=Fc.e_faceA,a.m_localPlaneNormal.x=b[k].x,a.m_localPlaneNormal.y=
b[k].y,a.m_localPlaneNormal.normalize(),a.m_localPoint.set(h,f),a.m_points[0].m_localPoint.setV(d.m_p),a.m_points[0].m_id.set_key(0))))};Ja.testOverlap=function(a,b){var c=b.lowerBound,d=a.upperBound,e=c.x-d.x,f=c.y-d.y,c=a.lowerBound,d=b.upperBound,g=c.y-d.y;return 0<e||0<f||0<c.x-d.x||0<g?!1:!0};var Lk=function(){this.position=new y;this.velocity=new y;this.normal=new y;this.id=new kc};n["box2D.collision.B2ContactPoint"]=Lk;Lk.__name__=["box2D","collision","B2ContactPoint"];Lk.prototype={__class__:Lk};
var Mk=function(){this.m_v1=new Xg;this.m_v2=new Xg;this.m_v3=new Xg;this.m_vertices=[];this.m_vertices[0]=this.m_v1;this.m_vertices[1]=this.m_v2;this.m_vertices[2]=this.m_v3};n["box2D.collision.B2Simplex"]=Mk;Mk.__name__=["box2D","collision","B2Simplex"];Mk.prototype={readCache:function(a,b,c,d,e){M.b2Assert(0<=a.count&&3>=a.count);var f,g;this.m_count=a.count;for(var k=this.m_vertices,p,w=0,h=this.m_count;w<h;)f=w++,p=k[f],p.indexA=a.indexA[f],p.indexB=a.indexB[f],f=b.getVertex(p.indexA),g=d.getVertex(p.indexB),
p.wA=x.mulX(c,f,!0),p.wB=x.mulX(e,g,!0),p.w=x.subtractVVPooled(p.wB,p.wA),p.a=0;1<this.m_count&&(a=a.metric,p=this.getMetric(),p<.5*a||2*a<p||p<Number.MIN_VALUE)&&(this.m_count=0);0==this.m_count&&(p=k[0],p.indexA=0,p.indexB=0,f=b.getVertex(0),g=d.getVertex(0),p.wA=x.mulX(c,f,!0),p.wB=x.mulX(e,g,!0),p.w=x.subtractVVPooled(p.wB,p.wA),this.m_count=1)},writeCache:function(a){a.metric=this.getMetric();a.count=this.m_count|0;for(var b=this.m_vertices,c=0,d=this.m_count;c<d;){var e=c++;a.indexA[e]=b[e].indexA|
0;a.indexB[e]=b[e].indexB|0}},getSearchDirection:function(){switch(this.m_count){case 1:return this.m_v1.w.getNegativePooled();case 2:var a=x.subtractVVPooled(this.m_v2.w,this.m_v1.w);return 0<x.crossVV(a,this.m_v1.w.getNegative())?x.crossFV(1,a,!0):x.crossVF(a,1,!0);default:return M.b2Assert(!1),y.getFromPool()}},getClosestPoint:function(){switch(this.m_count){case 0:return M.b2Assert(!1),y.getFromPool();case 1:return this.m_v1.w;case 2:var a=y.getFromPool();a.x=this.m_v1.a*this.m_v1.w.x+this.m_v2.a*
this.m_v2.w.x;a.y=this.m_v1.a*this.m_v1.w.y+this.m_v2.a*this.m_v2.w.y;return a;default:return M.b2Assert(!1),y.getFromPool()}},getWitnessPoints:function(a,b){switch(this.m_count){case 0:M.b2Assert(!1);break;case 1:a.setV(this.m_v1.wA);b.setV(this.m_v1.wB);break;case 2:a.x=this.m_v1.a*this.m_v1.wA.x+this.m_v2.a*this.m_v2.wA.x;a.y=this.m_v1.a*this.m_v1.wA.y+this.m_v2.a*this.m_v2.wA.y;b.x=this.m_v1.a*this.m_v1.wB.x+this.m_v2.a*this.m_v2.wB.x;b.y=this.m_v1.a*this.m_v1.wB.y+this.m_v2.a*this.m_v2.wB.y;
break;case 3:b.x=a.x=this.m_v1.a*this.m_v1.wA.x+this.m_v2.a*this.m_v2.wA.x+this.m_v3.a*this.m_v3.wA.x;b.y=a.y=this.m_v1.a*this.m_v1.wA.y+this.m_v2.a*this.m_v2.wA.y+this.m_v3.a*this.m_v3.wA.y;break;default:M.b2Assert(!1)}},getMetric:function(){switch(this.m_count){case 0:return M.b2Assert(!1),0;case 1:return 0;case 2:return x.subtractVVPooled(this.m_v1.w,this.m_v2.w).length();case 3:return x.crossVV(x.subtractVVPooled(this.m_v2.w,this.m_v1.w),x.subtractVVPooled(this.m_v3.w,this.m_v1.w));default:return M.b2Assert(!1),
0}},solve2:function(){var a=this.m_v1.w,b=this.m_v2.w,c=x.subtractVVPooled(b,a),a=-(a.x*c.x+a.y*c.y);0>=a?this.m_count=this.m_v1.a=1:(b=b.x*c.x+b.y*c.y,0>=b?(this.m_count=this.m_v2.a=1,this.m_v1.set(this.m_v2)):(c=1/(b+a),this.m_v1.a=b*c,this.m_v2.a=a*c,this.m_count=2))},solve3:function(){var a=this.m_v1.w,b=this.m_v2.w,c=this.m_v3.w,d=x.subtractVVPooled(b,a),e=x.dot(a,d),f=x.dot(b,d),e=-e,g=x.subtractVVPooled(c,a),k=x.dot(a,g),p=x.dot(c,g),k=-k,w=x.subtractVVPooled(c,b),h=x.dot(b,w),w=x.dot(c,w),
h=-h,g=x.crossVV(d,g),d=g*x.crossVV(b,c),c=g*x.crossVV(c,a),a=g*x.crossVV(a,b);0>=e&&0>=k?this.m_count=this.m_v1.a=1:0<f&&0<e&&0>=a?(p=1/(f+e),this.m_v1.a=f*p,this.m_v2.a=e*p,this.m_count=2):0<p&&0<k&&0>=c?(f=1/(p+k),this.m_v1.a=p*f,this.m_v3.a=k*f,this.m_count=2,this.m_v2.set(this.m_v3)):0>=f&&0>=h?(this.m_count=this.m_v2.a=1,this.m_v1.set(this.m_v2)):0>=p&&0>=w?(this.m_count=this.m_v3.a=1,this.m_v1.set(this.m_v3)):0<w&&0<h&&0>=d?(f=1/(w+h),this.m_v2.a=w*f,this.m_v3.a=h*f,this.m_count=2,this.m_v1.set(this.m_v3)):
(f=1/(d+c+a),this.m_v1.a=d*f,this.m_v2.a=c*f,this.m_v3.a=a*f,this.m_count=3)},__class__:Mk};var Xg=function(){};n["box2D.collision.B2SimplexVertex"]=Xg;Xg.__name__=["box2D","collision","B2SimplexVertex"];Xg.prototype={set:function(a){this.wA.setV(a.wA);this.wB.setV(a.wB);this.w.setV(a.w);this.a=a.a;this.indexA=a.indexA;this.indexB=a.indexB},__class__:Xg};var gd=function(){};n["box2D.collision.B2Distance"]=gd;gd.__name__=["box2D","collision","B2Distance"];gd.b2_gjkCalls=null;gd.b2_gjkIters=null;gd.b2_gjkMaxIters=
null;gd.distance=function(a,b,c){++gd.b2_gjkCalls;var d=c.proxyA,e=c.proxyB,f=c.transformA,g=c.transformB,k=gd.s_simplex;k.readCache(b,d,f,e,g);var p=k.m_vertices,w=gd.s_saveA,h=gd.s_saveB,l=0;k.getClosestPoint().lengthSquared();for(var m,n=0;20>n;){l=k.m_count;for(m=0;m<l;){var D=m++;w[D]=p[D].indexA;h[D]=p[D].indexB}switch(k.m_count){case 1:break;case 2:k.solve2();break;case 3:k.solve3();break;default:M.b2Assert(!1)}if(3==k.m_count)break;m=k.getClosestPoint();m.lengthSquared();D=k.getSearchDirection();
if(D.lengthSquared()<Number.MIN_VALUE*Number.MIN_VALUE)break;m=p[k.m_count];m.indexA=u["int"](d.getSupport(x.mulTMV(f.R,D.getNegativePooled(),!0)));m.wA=x.mulX(f,d.getVertex(m.indexA),!0);m.indexB=u["int"](e.getSupport(x.mulTMV(g.R,D,!0)));m.wB=x.mulX(g,e.getVertex(m.indexB),!0);m.w=x.subtractVVPooled(m.wB,m.wA);++n;++gd.b2_gjkIters;for(var D=!1,zb=0;zb<l;){var La=zb++;if(m.indexA==w[La]&&m.indexB==h[La]){D=!0;break}}if(D)break;++k.m_count}gd.b2_gjkMaxIters=u["int"](x.max(gd.b2_gjkMaxIters,n));k.getWitnessPoints(a.pointA,
a.pointB);a.distance=x.subtractVVPooled(a.pointA,a.pointB).length();a.iterations=n;k.writeCache(b);c.useRadii&&(b=d.m_radius,e=e.m_radius,a.distance>b+e&&a.distance>Number.MIN_VALUE?(a.distance-=b+e,c=x.subtractVVPooled(a.pointB,a.pointA),c.normalize(),a.pointA.x+=b*c.x,a.pointA.y+=b*c.y,a.pointB.x-=e*c.x,a.pointB.y-=e*c.y):(m=y.getFromPool(),m.x=.5*(a.pointA.x+a.pointB.x),m.y=.5*(a.pointA.y+a.pointB.y),a.pointA.x=a.pointB.x=m.x,a.pointA.y=a.pointB.y=m.y,a.distance=0))};var Yg=function(){};n["box2D.collision.B2DistanceInput"]=
Yg;Yg.__name__=["box2D","collision","B2DistanceInput"];Yg.prototype={__class__:Yg};var Zg=function(){this.pointA=new y;this.pointB=new y};n["box2D.collision.B2DistanceOutput"]=Zg;Zg.__name__=["box2D","collision","B2DistanceOutput"];Zg.prototype={__class__:Zg};var df=function(){this.m_vertices=[]};n["box2D.collision.B2DistanceProxy"]=df;df.__name__=["box2D","collision","B2DistanceProxy"];df.prototype={set:function(a){switch(a.getType()){case 0:a=q.__cast(a,hb);this.m_vertices=[];this.m_vertices[0]=
a.m_p;this.m_count=1;this.m_radius=a.m_radius;break;case 1:a=q.__cast(a,za);this.m_vertices=a.m_vertices;this.m_count=a.m_vertexCount;this.m_radius=a.m_radius;break;case 2:a=q.__cast(a,te);this.m_vertices=[];this.m_vertices[0]=a.m_v1;this.m_vertices[1]=a.m_v2;this.m_count=2;this.m_radius=a.m_radius;break;default:M.b2Assert(!1)}},getSupport:function(a){for(var b=0,c=this.m_vertices[0].x*a.x+this.m_vertices[0].y*a.y,d=1,e=this.m_count;d<e;){var f=d++,g=this.m_vertices[f].x*a.x+this.m_vertices[f].y*
a.y;g>c&&(b=f,c=g)}return b},getSupportVertex:function(a){for(var b=0,c=this.m_vertices[0].x*a.x+this.m_vertices[0].y*a.y,d=1,e=this.m_count;d<e;){var f=d++,g=this.m_vertices[f].x*a.x+this.m_vertices[f].y*a.y;g>c&&(b=f,c=g)}return this.m_vertices[b]},getVertexCount:function(){return this.m_count},getVertex:function(a){M.b2Assert(0<=a&&a<this.m_count);return this.m_vertices[a]},__class__:df};var Nk=function(){this.m_freeList=this.m_root=null;this.m_insertionCount=this.m_path=0};n["box2D.collision.B2DynamicTree"]=
Nk;Nk.__name__=["box2D","collision","B2DynamicTree"];Nk.prototype={createProxy:function(a,b){var c=this.allocateNode(),d=M.b2_aabbExtension,e=M.b2_aabbExtension;c.aabb.lowerBound.x=a.lowerBound.x-d;c.aabb.lowerBound.y=a.lowerBound.y-e;c.aabb.upperBound.x=a.upperBound.x+d;c.aabb.upperBound.y=a.upperBound.y+e;c.userData=b;this.insertLeaf(c);return c},destroyProxy:function(a){this.removeLeaf(a);this.freeNode(a)},moveProxy:function(a,b,c){M.b2Assert(a.isLeaf());if(a.aabb.contains(b))return!1;this.removeLeaf(a);
var d;d=M.b2_aabbExtension+M.b2_aabbMultiplier*(0<c.x?c.x:-c.x);c=M.b2_aabbExtension+M.b2_aabbMultiplier*(0<c.y?c.y:-c.y);a.aabb.lowerBound.x=b.lowerBound.x-d;a.aabb.lowerBound.y=b.lowerBound.y-c;a.aabb.upperBound.x=b.upperBound.x+d;a.aabb.upperBound.y=b.upperBound.y+c;this.insertLeaf(a);return!0},rebalance:function(a){if(null!=this.m_root)for(var b=0;b<a;){b++;for(var c=this.m_root,d=0;0==c.isLeaf();)c=0!=(this.m_path>>d&1)?c.child2:c.child1,d=d+1&31;++this.m_path;this.removeLeaf(c);this.insertLeaf(c)}},
getFatAABB:function(a){return a.aabb},getUserData:function(a){return a.userData},query:function(a,b){if(null!=this.m_root){var c=[],d=0;for(c[d++]=this.m_root;0<d;){var e=c[--d];if(e.aabb.testOverlap(b))if(e.isLeaf()){if(!a(e))break}else c[d++]=e.child1,c[d++]=e.child2}}},rayCast:function(a,b){if(null!=this.m_root){var c=b.p1,d=b.p2,e=x.subtractVVPooled(c,d);e.normalize();var e=x.crossFV(1,e),f=x.absV(e),g=b.maxFraction,k=new fd,p;p=c.x+g*(d.x-c.x);g=c.y+g*(d.y-c.y);k.lowerBound.x=Math.min(c.x,p);
k.lowerBound.y=Math.min(c.y,g);k.upperBound.x=Math.max(c.x,p);k.upperBound.y=Math.max(c.y,g);var w=[],h=0;for(w[h++]=this.m_root;0<h;)if(p=w[--h],0!=p.aabb.testOverlap(k)){var g=p.aabb.getCenter(),l=p.aabb.getExtents();if(!(0<Math.abs(e.x*(c.x-g.x)+e.y*(c.y-g.y))-f.x*l.x-f.y*l.y))if(p.isLeaf()){g=new oi;g.p1=b.p1;g.p2=b.p2;g.maxFraction=b.maxFraction;g=a(g,p);if(0==g)break;p=c.x+g*(d.x-c.x);g=c.y+g*(d.y-c.y);k.lowerBound.x=Math.min(c.x,p);k.lowerBound.y=Math.min(c.y,g);k.upperBound.x=Math.max(c.x,
p);k.upperBound.y=Math.max(c.y,g)}else w[h++]=p.child1,w[h++]=p.child2}}},allocateNode:function(){if(null!=this.m_freeList){var a=this.m_freeList;this.m_freeList=a.parent;a.parent=null;a.child1=null;a.child2=null;return a}return new $g},freeNode:function(a){a.parent=this.m_freeList;this.m_freeList=a},insertLeaf:function(a){++this.m_insertionCount;if(null==this.m_root)this.m_root=a,this.m_root.parent=null;else{var b=a.aabb.getCenter(),c=this.m_root;if(0==c.isLeaf()){do var d=c.child1,c=c.child2,e=
Math.abs((d.aabb.lowerBound.x+d.aabb.upperBound.x)/2-b.x)+Math.abs((d.aabb.lowerBound.y+d.aabb.upperBound.y)/2-b.y),f=Math.abs((c.aabb.lowerBound.x+c.aabb.upperBound.x)/2-b.x)+Math.abs((c.aabb.lowerBound.y+c.aabb.upperBound.y)/2-b.y),c=e<f?d:c;while(0==c.isLeaf())}b=c.parent;d=this.allocateNode();d.parent=b;d.userData=null;d.aabb.combine(a.aabb,c.aabb);if(null!=b){c.parent.child1==c?b.child1=d:b.child2=d;d.child1=c;d.child2=a;c.parent=d;a.parent=d;do{if(b.aabb.contains(d.aabb))break;b.aabb.combine(b.child1.aabb,
b.child2.aabb);d=b;b=b.parent}while(null!=b)}else d.child1=c,d.child2=a,c.parent=d,this.m_root=a.parent=d}},removeLeaf:function(a){if(a==this.m_root)this.m_root=null;else{var b=a.parent,c=b.parent;a=b.child1==a?b.child2:b.child1;if(null!=c)for(c.child1==b?c.child1=a:c.child2=a,a.parent=c,this.freeNode(b);null!=c;){b=c.aabb;c.aabb=new fd;c.aabb.combine(c.child1.aabb,c.child2.aabb);if(b.contains(c.aabb))break;c=c.parent}else this.m_root=a,a.parent=null,this.freeNode(b)}},__class__:Nk};var Ok=function(){};
n["box2D.collision.IBroadPhase"]=Ok;Ok.__name__=["box2D","collision","IBroadPhase"];Ok.prototype={__class__:Ok};var pi=function(){this.m_tree=new Nk;this.m_moveBuffer=[];this.m_pairBuffer=[];this.m_proxyCount=this.m_pairCount=0};n["box2D.collision.B2DynamicTreeBroadPhase"]=pi;pi.__name__=["box2D","collision","B2DynamicTreeBroadPhase"];pi.__interfaces__=[Ok];pi.prototype={createProxy:function(a,b){var c=this.m_tree.createProxy(a,b);++this.m_proxyCount;this.bufferMove(c);return c},destroyProxy:function(a){this.unBufferMove(a);
--this.m_proxyCount;this.m_tree.destroyProxy(a)},moveProxy:function(a,b,c){this.m_tree.moveProxy(a,b,c)&&this.bufferMove(a)},testOverlap:function(a,b){var c=this.m_tree.getFatAABB(a),d=this.m_tree.getFatAABB(b);return c.testOverlap(d)},getUserData:function(a){return this.m_tree.getUserData(a)},getFatAABB:function(a){return this.m_tree.getFatAABB(a)},getProxyCount:function(){return this.m_proxyCount},updatePairs:function(a){for(var b=this,c=this.m_pairCount=0,d=this.m_moveBuffer;c<d.length;){var e=
[d[c]];++c;var f=function(a){return function(c){if(c==a[0])return!0;b.m_pairCount==b.m_pairBuffer.length&&(b.m_pairBuffer[b.m_pairCount]=new Pk);var d=b.m_pairBuffer[b.m_pairCount];c.id<a[0].id?(d.proxyA=c,d.proxyB=a[0]):(d.proxyA=a[0],d.proxyB=c);++b.m_pairCount;return!0}}(e),e=this.m_tree.getFatAABB(e[0]);this.m_tree.query(f,e)}this.m_moveBuffer=[];c=!0;for(d=0;c;)if(d>=this.m_pairCount)c=!1;else{var f=this.m_pairBuffer[d],e=this.m_tree.getUserData(f.proxyA),g=this.m_tree.getUserData(f.proxyB);
a(e,g);for(++d;d<this.m_pairCount;){e=this.m_pairBuffer[d];if(e.proxyA!=f.proxyA||e.proxyB!=f.proxyB)break;++d}}},query:function(a,b){this.m_tree.query(a,b)},rayCast:function(a,b){this.m_tree.rayCast(a,b)},validate:function(){},rebalance:function(a){this.m_tree.rebalance(a)},bufferMove:function(a){this.m_moveBuffer[this.m_moveBuffer.length]=a},unBufferMove:function(a){P.remove(this.m_moveBuffer,a)},comparePairs:function(a,b){return 0},__class__:pi};var $g=function(){this.aabb=new fd;this.id=$g.currentID++};
n["box2D.collision.B2DynamicTreeNode"]=$g;$g.__name__=["box2D","collision","B2DynamicTreeNode"];$g.prototype={isLeaf:function(){return null==this.child1},__class__:$g};var Pk=function(){};n["box2D.collision.B2DynamicTreePair"]=Pk;Pk.__name__=["box2D","collision","B2DynamicTreePair"];Pk.prototype={__class__:Pk};var Fc=function(){this.m_pointCount=0;this.m_points=[];for(var a=0,b=M.b2_maxManifoldPoints;a<b;){var c=a++;this.m_points[c]=new Qk}this.m_localPlaneNormal=new y;this.m_localPoint=new y};n["box2D.collision.B2Manifold"]=
Fc;Fc.__name__=["box2D","collision","B2Manifold"];Fc.prototype={reset:function(){for(var a=0,b=M.b2_maxManifoldPoints;a<b;){var c=a++;this.m_points[c].reset()}this.m_localPlaneNormal.setZero();this.m_localPoint.setZero();this.m_pointCount=this.m_type=0},set:function(a){this.m_pointCount=a.m_pointCount;for(var b=0,c=M.b2_maxManifoldPoints;b<c;){var d=b++;this.m_points[d].set(a.m_points[d])}this.m_localPlaneNormal.setV(a.m_localPlaneNormal);this.m_localPoint.setV(a.m_localPoint);this.m_type=a.m_type},
copy:function(){var a=new Fc;a.set(this);return a},__class__:Fc};var Qk=function(){this.m_localPoint=new y;this.m_id=new kc;this.reset()};n["box2D.collision.B2ManifoldPoint"]=Qk;Qk.__name__=["box2D","collision","B2ManifoldPoint"];Qk.prototype={reset:function(){this.m_localPoint.setZero();this.m_tangentImpulse=this.m_normalImpulse=0;this.m_id.set_key(0)},set:function(a){this.m_localPoint.setV(a.m_localPoint);this.m_normalImpulse=a.m_normalImpulse;this.m_tangentImpulse=a.m_tangentImpulse;this.m_id.set(a.m_id)},
__class__:Qk};var Xm=function(){this.R=new tb;this.center=new y;this.extents=new y};n["box2D.collision.B2OBB"]=Xm;Xm.__name__=["box2D","collision","B2OBB"];Xm.prototype={__class__:Xm};var oi=function(a,b,c){null==c&&(c=1);this.p1=new y;this.p2=new y;null!=a&&this.p1.setV(a);null!=b&&this.p2.setV(b);this.maxFraction=c};n["box2D.collision.B2RayCastInput"]=oi;oi.__name__=["box2D","collision","B2RayCastInput"];oi.prototype={__class__:oi};var Rk=function(){this.normal=new y};n["box2D.collision.B2RayCastOutput"]=
Rk;Rk.__name__=["box2D","collision","B2RayCastOutput"];Rk.prototype={__class__:Rk};var Bd=function(){this.m_localPoint=new y;this.m_axis=new y};n["box2D.collision.B2SeparationFunction"]=Bd;Bd.__name__=["box2D","collision","B2SeparationFunction"];Bd.prototype={initialize:function(a,b,c,d,e){this.m_proxyA=b;this.m_proxyB=d;b=a.count;M.b2Assert(0<b&&3>b);var f=new y,g=new y,k,p;if(1==b)this.m_type=Bd.e_points,f=this.m_proxyA.getVertex(a.indexA[0]),g=this.m_proxyB.getVertex(a.indexB[0]),p=f,k=c.R,f=c.position.x+
(k.col1.x*p.x+k.col2.x*p.y),c=c.position.y+(k.col1.y*p.x+k.col2.y*p.y),p=g,k=e.R,g=e.position.x+(k.col1.x*p.x+k.col2.x*p.y),e=e.position.y+(k.col1.y*p.x+k.col2.y*p.y),this.m_axis.x=g-f,this.m_axis.y=e-c,this.m_axis.normalize();else{if(a.indexB[0]==a.indexB[1])this.m_type=Bd.e_faceA,b=this.m_proxyA.getVertex(a.indexA[0]),d=this.m_proxyA.getVertex(a.indexA[1]),g=this.m_proxyB.getVertex(a.indexB[0]),this.m_localPoint.x=.5*(b.x+d.x),this.m_localPoint.y=.5*(b.y+d.y),this.m_axis=x.crossVF(x.subtractVV(d,
b),1),this.m_axis.normalize(),p=this.m_axis,k=c.R,b=k.col1.x*p.x+k.col2.x*p.y,d=k.col1.y*p.x+k.col2.y*p.y,p=this.m_localPoint,k=c.R,f=c.position.x+(k.col1.x*p.x+k.col2.x*p.y),c=c.position.y+(k.col1.y*p.x+k.col2.y*p.y),p=g,k=e.R,g=e.position.x+(k.col1.x*p.x+k.col2.x*p.y),e=e.position.y+(k.col1.y*p.x+k.col2.y*p.y),a=(g-f)*b+(e-c)*d;else if(a.indexA[0]==a.indexA[0])this.m_type=Bd.e_faceB,k=this.m_proxyB.getVertex(a.indexB[0]),p=this.m_proxyB.getVertex(a.indexB[1]),f=this.m_proxyA.getVertex(a.indexA[0]),
this.m_localPoint.x=.5*(k.x+p.x),this.m_localPoint.y=.5*(k.y+p.y),this.m_axis=x.crossVF(x.subtractVV(p,k),1),this.m_axis.normalize(),p=this.m_axis,k=e.R,b=k.col1.x*p.x+k.col2.x*p.y,d=k.col1.y*p.x+k.col2.y*p.y,p=this.m_localPoint,k=e.R,g=e.position.x+(k.col1.x*p.x+k.col2.x*p.y),e=e.position.y+(k.col1.y*p.x+k.col2.y*p.y),p=f,k=c.R,f=c.position.x+(k.col1.x*p.x+k.col2.x*p.y),c=c.position.y+(k.col1.y*p.x+k.col2.y*p.y),a=(f-g)*b+(c-e)*d;else{b=this.m_proxyA.getVertex(a.indexA[0]);d=this.m_proxyA.getVertex(a.indexA[1]);
k=this.m_proxyB.getVertex(a.indexB[0]);p=this.m_proxyB.getVertex(a.indexB[1]);x.mulX(c,f,!0);f=x.mulMV(c.R,x.subtractVVPooled(d,b),!0);x.mulX(e,g,!0);a=x.mulMV(e.R,x.subtractVVPooled(p,k),!0);e=f.x*f.x+f.y*f.y;c=a.x*a.x+a.y*a.y;var w=x.subtractVVPooled(a,f),g=f.x*w.x+f.y*w.y,w=a.x*w.x+a.y*w.y,f=f.x*a.x+f.y*a.y,h=e*c-f*f;a=0;0!=h&&(a=x.clamp((f*w-g*c)/h,0,1));0>(f*a+w)/c&&(a=x.clamp((f-g)/e,0,1));f=new y;f.x=b.x+a*(d.x-b.x);f.y=b.y+a*(d.y-b.y);g=new y;g.x=k.x+a*(p.x-k.x);g.y=k.y+a*(p.y-k.y);0==a||
1==a?(this.m_type=Bd.e_faceB,this.m_axis=x.crossVF(x.subtractVV(p,k),1),this.m_axis.normalize(),this.m_localPoint=g):(this.m_type=Bd.e_faceA,this.m_axis=x.crossVF(x.subtractVV(d,b),1),this.m_localPoint=f)}0>a&&this.m_axis.negativeSelf()}},evaluate:function(a,b){var c,d,e;if(this.m_type==Bd.e_points)return c=x.mulTMV(a.R,this.m_axis),d=x.mulTMV(b.R,this.m_axis.getNegative()),c=this.m_proxyA.getSupportVertex(c),d=this.m_proxyB.getSupportVertex(d),c=x.mulX(a,c,!0),d=x.mulX(b,d,!0),e=(d.x-c.x)*this.m_axis.x+
(d.y-c.y)*this.m_axis.y;if(this.m_type==Bd.e_faceA)return e=x.mulMV(a.R,this.m_axis),c=x.mulX(a,this.m_localPoint,!0),d=x.mulTMV(b.R,e.getNegative()),d=this.m_proxyB.getSupportVertex(d),d=x.mulX(b,d,!0),e=(d.x-c.x)*e.x+(d.y-c.y)*e.y;if(this.m_type==Bd.e_faceB)return e=x.mulMV(b.R,this.m_axis),d=x.mulX(b,this.m_localPoint,!0),c=x.mulTMV(a.R,e.getNegative()),c=this.m_proxyA.getSupportVertex(c),c=x.mulX(a,c,!0),e=(c.x-d.x)*e.x+(c.y-d.y)*e.y;M.b2Assert(!1);return 0},__class__:Bd};var ah=function(){this.indexA=
[];this.indexB=[]};n["box2D.collision.B2SimplexCache"]=ah;ah.__name__=["box2D","collision","B2SimplexCache"];ah.prototype={__class__:ah};var Sk=function(){this.proxyA=new df;this.proxyB=new df;this.sweepA=new ef;this.sweepB=new ef};n["box2D.collision.B2TOIInput"]=Sk;Sk.__name__=["box2D","collision","B2TOIInput"];Sk.prototype={__class__:Sk};var hd=function(a,b){this.position=new y;this.R=new tb;null!=a&&(this.position.setV(a),this.R.setM(b))};n["box2D.common.math.B2Transform"]=hd;hd.__name__=["box2D",
"common","math","B2Transform"];hd.prototype={initialize:function(a,b){this.position.setV(a);this.R.setM(b)},setIdentity:function(){this.position.setZero();this.R.setIdentity()},set:function(a){this.position.setV(a.position);this.R.setM(a.R)},getAngle:function(){return Math.atan2(this.R.col1.y,this.R.col1.x)},multiply:function(a){a=this.R.multiplyV(a);a.add(this.position);return a},__class__:hd};var tb=function(){this.col1=new y(0,1);this.col2=new y(0,1)};n["box2D.common.math.B2Mat22"]=tb;tb.__name__=
["box2D","common","math","B2Mat22"];tb.fromAngle=function(a){var b=new tb;b.set(a);return b};tb.fromVV=function(a,b){var c=new tb;c.setVV(a,b);return c};tb.prototype={set:function(a){var b=Math.cos(a);a=Math.sin(a);this.col1.x=b;this.col2.x=-a;this.col1.y=a;this.col2.y=b},setVV:function(a,b){this.col1.setV(a);this.col2.setV(b)},copy:function(){var a=new tb;a.setM(this);return a},setM:function(a){this.col1.setV(a.col1);this.col2.setV(a.col2)},addM:function(a){this.col1.x+=a.col1.x;this.col1.y+=a.col1.y;
this.col2.x+=a.col2.x;this.col2.y+=a.col2.y},multiplyV:function(a){return new y(this.col1.x*a.x+this.col2.x*a.y,this.col1.y*a.x+this.col2.y*a.y)},setIdentity:function(){this.col1.x=1;this.col2.x=0;this.col1.y=0;this.col2.y=1},setZero:function(){this.col1.x=0;this.col2.x=0;this.col1.y=0;this.col2.y=0},setAngle:function(a){this.col1.x=Math.cos(a);this.col1.y=Math.sin(a);this.col2.x=-this.col1.y;this.col2.y=this.col1.x},getAngle:function(){return Math.atan2(this.col1.y,this.col1.x)},getInverse:function(a){var b=
this.col1.x,c=this.col2.x,d=this.col1.y,e=this.col2.y,f=b*e-c*d;0!=f&&(f=1/f);a.col1.x=f*e;a.col2.x=-f*c;a.col1.y=-f*d;a.col2.y=f*b;return a},solve:function(a,b,c){var d=this.col1.x,e=this.col2.x,f=this.col1.y,g=this.col2.y,k=d*g-e*f;0!=k&&(k=1/k);a.x=k*(g*b-e*c);a.y=k*(d*c-f*b);return a},abs:function(){this.col1.abs();this.col2.abs()},__class__:tb};var Ra=function(){};n["box2D.collision.B2TimeOfImpact"]=Ra;Ra.__name__=["box2D","collision","B2TimeOfImpact"];Ra.timeOfImpact=function(a){++Ra.b2_toiCalls;
var b=a.proxyA,c=a.proxyB,d=a.sweepA,e=a.sweepB;M.b2Assert(d.t0==e.t0);M.b2Assert(1-d.t0>Number.MIN_VALUE);var f=b.m_radius+c.m_radius;a=a.tolerance;var g=0,k=0,p=0;Ra.s_cache.count=0;for(Ra.s_distanceInput.useRadii=!1;;){d.getTransform(Ra.s_xfA,g);e.getTransform(Ra.s_xfB,g);Ra.s_distanceInput.proxyA=b;Ra.s_distanceInput.proxyB=c;Ra.s_distanceInput.transformA=Ra.s_xfA;Ra.s_distanceInput.transformB=Ra.s_xfB;gd.distance(Ra.s_distanceOutput,Ra.s_cache,Ra.s_distanceInput);if(0>=Ra.s_distanceOutput.distance){g=
1;break}Ra.s_fcn.initialize(Ra.s_cache,b,Ra.s_xfA,c,Ra.s_xfB);var w=Ra.s_fcn.evaluate(Ra.s_xfA,Ra.s_xfB);if(0>=w){g=1;break}0==k&&(p=w>f?x.max(f-a,.75*f):x.max(w-a,.02*f));if(w-p<.5*a){if(0==k){g=1;break}break}var h=g,l=g,m=1;d.getTransform(Ra.s_xfA,m);e.getTransform(Ra.s_xfB,m);var n=Ra.s_fcn.evaluate(Ra.s_xfA,Ra.s_xfB);if(n>=p){g=1;break}for(var D=0;;){var zb;zb=0!=(D&1)?l+(p-w)*(m-l)/(n-w):.5*(l+m);d.getTransform(Ra.s_xfA,zb);e.getTransform(Ra.s_xfB,zb);var La=Ra.s_fcn.evaluate(Ra.s_xfA,Ra.s_xfB);
if(x.abs(La-p)<.025*a){h=zb;break}La>p?(l=zb,w=La):(m=zb,n=La);++D;++Ra.b2_toiRootIters;if(50==D)break}Ra.b2_toiMaxRootIters=u["int"](x.max(Ra.b2_toiMaxRootIters,D));if(h<(1+100*Number.MIN_VALUE)*g)break;g=h;k++;++Ra.b2_toiIters;if(1E3==k)break}Ra.b2_toiMaxIters=u["int"](x.max(Ra.b2_toiMaxIters,k));return g};var qi=function(){this.m_normal=new y;this.m_points=[];for(var a=0,b=M.b2_maxManifoldPoints;a<b;){var c=a++;this.m_points[c]=new y}};n["box2D.collision.B2WorldManifold"]=qi;qi.__name__=["box2D",
"collision","B2WorldManifold"];qi.prototype={reset:function(){this.m_normal=new y;this.m_points=[];for(var a=0,b=M.b2_maxManifoldPoints;a<b;){var c=a++;this.m_points[c]=new y}},initialize:function(a,b,c,d,e){if(0!=a.m_pointCount){this.reset();var f,g,k,p,w,h,l;switch(a.m_type){case 1:g=b.R;f=a.m_localPoint;k=b.position.x+g.col1.x*f.x+g.col2.x*f.y;p=b.position.y+g.col1.y*f.x+g.col2.y*f.y;g=d.R;f=a.m_points[0].m_localPoint;a=d.position.x+g.col1.x*f.x+g.col2.x*f.y;f=d.position.y+g.col1.y*f.x+g.col2.y*
f.y;g=a-k;d=f-p;w=g*g+d*d;w>Number.MIN_VALUE*Number.MIN_VALUE?(w=Math.sqrt(w),this.m_normal.x=g/w,this.m_normal.y=d/w):(this.m_normal.x=1,this.m_normal.y=0);g=p+c*this.m_normal.y;f-=e*this.m_normal.y;this.m_points[0].x=.5*(k+c*this.m_normal.x+(a-e*this.m_normal.x));this.m_points[0].y=.5*(g+f);break;case 2:g=b.R;f=a.m_localPlaneNormal;k=g.col1.x*f.x+g.col2.x*f.y;p=g.col1.y*f.x+g.col2.y*f.y;g=b.R;f=a.m_localPoint;w=b.position.x+g.col1.x*f.x+g.col2.x*f.y;h=b.position.y+g.col1.y*f.x+g.col2.y*f.y;this.m_normal.x=
k;this.m_normal.y=p;b=0;for(var m=a.m_pointCount;b<m;){var n=b++;g=d.R;f=a.m_points[n].m_localPoint;l=d.position.x+g.col1.x*f.x+g.col2.x*f.y;f=d.position.y+g.col1.y*f.x+g.col2.y*f.y;this.m_points[n].x=l+.5*(c-(l-w)*k-(f-h)*p-e)*k;this.m_points[n].y=f+.5*(c-(l-w)*k-(f-h)*p-e)*p}break;case 4:for(g=d.R,f=a.m_localPlaneNormal,k=g.col1.x*f.x+g.col2.x*f.y,p=g.col1.y*f.x+g.col2.y*f.y,g=d.R,f=a.m_localPoint,w=d.position.x+g.col1.x*f.x+g.col2.x*f.y,h=d.position.y+g.col1.y*f.x+g.col2.y*f.y,this.m_normal.x=
-k,this.m_normal.y=-p,d=0,m=a.m_pointCount;d<m;)n=d++,g=b.R,f=a.m_points[n].m_localPoint,l=b.position.x+g.col1.x*f.x+g.col2.x*f.y,f=b.position.y+g.col1.y*f.x+g.col2.y*f.y,this.m_points[n].x=l+.5*(e-(l-w)*k-(f-h)*p-c)*k,this.m_points[n].y=f+.5*(e-(l-w)*k-(f-h)*p-c)*p}}},getPoint:function(){return 0==this.m_points.length?null:1==this.m_points.length?this.m_points[0]:new y((this.m_points[0].x+this.m_points[1].x)/2,(this.m_points[0].y+this.m_points[1].y)/2)},__class__:qi};var Ta=function(){this.m_type=
Ta.e_unknownShape;this.m_radius=M.b2_linearSlop};n["box2D.collision.shapes.B2Shape"]=Ta;Ta.__name__=["box2D","collision","shapes","B2Shape"];Ta.testOverlap=function(a,b,c,d){var e=new Yg;e.proxyA=new df;e.proxyA.set(a);e.proxyB=new df;e.proxyB.set(c);e.transformA=b;e.transformB=d;e.useRadii=!0;a=new ah;a.count=0;b=new Zg;gd.distance(b,a,e);return b.distance<10*Number.MIN_VALUE};Ta.prototype={copy:function(){return null},set:function(a){this.m_radius=a.m_radius},getType:function(){return this.m_type},
testPoint:function(a,b){return!1},rayCast:function(a,b,c){return!1},computeAABB:function(a,b){},computeMass:function(a,b){},computeSubmergedArea:function(a,b,c,d){return 0},__class__:Ta};var hb=function(a){null==a&&(a=0);Ta.call(this);this.m_p=new y;this.m_type=Ta.e_circleShape;this.m_radius=a};n["box2D.collision.shapes.B2CircleShape"]=hb;hb.__name__=["box2D","collision","shapes","B2CircleShape"];hb.__super__=Ta;hb.prototype=L(Ta.prototype,{copy:function(){var a=new hb;a.set(this);return a},set:function(a){Ta.prototype.set.call(this,
a);q.__instanceof(a,hb)&&(a=q.__cast(a,hb),this.m_p.setV(a.m_p))},testPoint:function(a,b){var c=a.R,d=a.position.x+(c.col1.x*this.m_p.x+c.col2.x*this.m_p.y),c=a.position.y+(c.col1.y*this.m_p.x+c.col2.y*this.m_p.y),d=b.x-d,c=b.y-c;return d*d+c*c<=this.m_radius*this.m_radius},rayCast:function(a,b,c){var d=c.R,e=b.p1.x-(c.position.x+(d.col1.x*this.m_p.x+d.col2.x*this.m_p.y));c=b.p1.y-(c.position.y+(d.col1.y*this.m_p.x+d.col2.y*this.m_p.y));var d=b.p2.x-b.p1.x,f=b.p2.y-b.p1.y,g=e*d+c*f,k=d*d+f*f,p=g*
g-k*(e*e+c*c-this.m_radius*this.m_radius);if(0>p||k<Number.MIN_VALUE)return!1;g=-(g+Math.sqrt(p));return 0<=g&&g<=b.maxFraction*k?(g/=k,a.fraction=g,a.normal.x=e+g*d,a.normal.y=c+g*f,a.normal.normalize(),!0):!1},computeAABB:function(a,b){var c=b.R,d=b.position.x+(c.col1.x*this.m_p.x+c.col2.x*this.m_p.y),c=b.position.y+(c.col1.y*this.m_p.x+c.col2.y*this.m_p.y);a.lowerBound.set(d-this.m_radius,c-this.m_radius);a.upperBound.set(d+this.m_radius,c+this.m_radius)},computeMass:function(a,b){a.mass=b*M.b2_pi*
this.m_radius*this.m_radius;a.center.setV(this.m_p);a.I=a.mass*(.5*this.m_radius*this.m_radius+(this.m_p.x*this.m_p.x+this.m_p.y*this.m_p.y))},computeSubmergedArea:function(a,b,c,d){c=x.mulX(c,this.m_p,!0);var e=-(x.dot(a,c)-b);if(e<-this.m_radius+Number.MIN_VALUE)return 0;if(e>this.m_radius)return d.x=c.x,d.y=c.y,Math.PI*this.m_radius*this.m_radius;b=this.m_radius*this.m_radius;var f=e*e,e=b*(Math.asin(e/this.m_radius)+Math.PI/2)+e*Math.sqrt(b-f);b=-.6666666666666666*Math.pow(b-f,1.5)/e;d.x=c.x+
a.x*b;d.y=c.y+a.y*b;return e},getLocalPosition:function(){return this.m_p},setLocalPosition:function(a){this.m_p.setV(a)},getRadius:function(){return this.m_radius},setRadius:function(a){this.m_radius=a},__class__:hb});var te=function(a,b){Ta.call(this);this.s_supportVec=new y;this.m_v1=new y;this.m_v2=new y;this.m_v0=new y;this.m_v3=new y;this.m_hasVertex3=this.m_hasVertex0=!1;this.m_coreV1=new y;this.m_coreV2=new y;this.m_normal=new y;this.m_direction=new y;this.m_cornerDir1=new y;this.m_cornerDir2=
new y;this.m_type=Ta.e_edgeShape;this.m_nextEdge=this.m_prevEdge=null;this.m_v1=a;this.m_v2=b;this.m_direction.set(this.m_v2.x-this.m_v1.x,this.m_v2.y-this.m_v1.y);this.m_length=this.m_direction.normalize();this.m_normal.set(this.m_direction.y,-this.m_direction.x);this.m_coreV1.set(-M.b2_toiSlop*(this.m_normal.x-this.m_direction.x)+this.m_v1.x,-M.b2_toiSlop*(this.m_normal.y-this.m_direction.y)+this.m_v1.y);this.m_coreV2.set(-M.b2_toiSlop*(this.m_normal.x+this.m_direction.x)+this.m_v2.x,-M.b2_toiSlop*
(this.m_normal.y+this.m_direction.y)+this.m_v2.y);this.m_cornerDir1=this.m_normal;this.m_cornerDir2.set(-this.m_normal.x,-this.m_normal.y)};n["box2D.collision.shapes.B2EdgeShape"]=te;te.__name__=["box2D","collision","shapes","B2EdgeShape"];te.__super__=Ta;te.prototype=L(Ta.prototype,{testPoint:function(a,b){return!1},rayCast:function(a,b,c){var d,e=b.p2.x-b.p1.x,f=b.p2.y-b.p1.y;d=c.R;var g=c.position.x+(d.col1.x*this.m_v1.x+d.col2.x*this.m_v1.y),k=c.position.y+(d.col1.y*this.m_v1.x+d.col2.y*this.m_v1.y),
p=c.position.y+(d.col1.y*this.m_v2.x+d.col2.y*this.m_v2.y)-k;c=-(c.position.x+(d.col1.x*this.m_v2.x+d.col2.x*this.m_v2.y)-g);d=100*Number.MIN_VALUE;var w=-(e*p+f*c);if(w>d){var g=b.p1.x-g,h=b.p1.y-k,k=g*p+h*c;if(0<=k&&k<=b.maxFraction*w&&(b=-e*h+f*g,-d*w<=b&&b<=w*(1+d)))return a.fraction=k/w,b=Math.sqrt(p*p+c*c),a.normal.x=p/b,a.normal.y=c/b,!0}return!1},computeAABB:function(a,b){var c=b.R,d=b.position.x+(c.col1.x*this.m_v1.x+c.col2.x*this.m_v1.y),e=b.position.y+(c.col1.y*this.m_v1.x+c.col2.y*this.m_v1.y),
f=b.position.x+(c.col1.x*this.m_v2.x+c.col2.x*this.m_v2.y),c=b.position.y+(c.col1.y*this.m_v2.x+c.col2.y*this.m_v2.y);d<f?(a.lowerBound.x=d,a.upperBound.x=f):(a.lowerBound.x=f,a.upperBound.x=d);e<c?(a.lowerBound.y=e,a.upperBound.y=c):(a.lowerBound.y=c,a.upperBound.y=e)},computeMass:function(a,b){a.mass=0;a.center.setV(this.m_v1);a.I=0},computeSubmergedArea:function(a,b,c,d){var e=new y(a.x*b,a.y*b),f=x.mulX(c,this.m_v1,!0);c=x.mulX(c,this.m_v2,!0);var g=x.dot(a,f)-b;a=x.dot(a,c)-b;if(0<g){if(0<a)return 0;
f.x=-a/(g-a)*f.x+g/(g-a)*c.x;f.y=-a/(g-a)*f.y+g/(g-a)*c.y}else 0<a&&(c.x=-a/(g-a)*f.x+g/(g-a)*c.x,c.y=-a/(g-a)*f.y+g/(g-a)*c.y);d.x=(e.x+f.x+c.x)/3;d.y=(e.y+f.y+c.y)/3;return.5*((f.x-e.x)*(c.y-e.y)-(f.y-e.y)*(c.x-e.x))},getLength:function(){return this.m_length},getVertex1:function(){return this.m_v1},getVertex2:function(){return this.m_v2},getCoreVertex1:function(){return this.m_coreV1},getCoreVertex2:function(){return this.m_coreV2},getNormalVector:function(){return this.m_normal},getDirectionVector:function(){return this.m_direction},
getCorner1Vector:function(){return this.m_cornerDir1},getCorner2Vector:function(){return this.m_cornerDir2},corner1IsConvex:function(){return this.m_cornerConvex1},corner2IsConvex:function(){return this.m_cornerConvex2},getFirstVertex:function(a){var b=a.R;return new y(a.position.x+(b.col1.x*this.m_coreV1.x+b.col2.x*this.m_coreV1.y),a.position.y+(b.col1.y*this.m_coreV1.x+b.col2.y*this.m_coreV1.y))},getNextEdge:function(){return this.m_nextEdge},getPrevEdge:function(){return this.m_prevEdge},support:function(a,
b,c){var d=a.R,e=a.position.x+(d.col1.x*this.m_coreV1.x+d.col2.x*this.m_coreV1.y),f=a.position.y+(d.col1.y*this.m_coreV1.x+d.col2.y*this.m_coreV1.y),g=a.position.x+(d.col1.x*this.m_coreV2.x+d.col2.x*this.m_coreV2.y);a=a.position.y+(d.col1.y*this.m_coreV2.x+d.col2.y*this.m_coreV2.y);e*b+f*c>g*b+a*c?(this.s_supportVec.x=e,this.s_supportVec.y=f):(this.s_supportVec.x=g,this.s_supportVec.y=a);return this.s_supportVec},copy:function(){var a=new te(this.m_v1,this.m_v2);a.set(this);var b;b=q.__cast(a,te);
b.m_v0.setV(this.m_v0);b.m_v3.setV(this.m_v3);b.m_hasVertex0=this.m_hasVertex0;b.m_hasVertex3=this.m_hasVertex3;return a},setPrevEdge:function(a,b,c,d){this.m_prevEdge=a;this.m_coreV1=b;this.m_cornerDir1=c;this.m_cornerConvex1=d},setNextEdge:function(a,b,c,d){this.m_nextEdge=a;this.m_coreV2=b;this.m_cornerDir2=c;this.m_cornerConvex2=d},__class__:te});var bh=function(){this.mass=0;this.center=new y(0,0);this.I=0};n["box2D.collision.shapes.B2MassData"]=bh;bh.__name__=["box2D","collision","shapes","B2MassData"];
bh.prototype={__class__:bh};var za=function(){Ta.call(this);this.m_type=Ta.e_polygonShape;this.m_centroid=new y;this.m_vertices=[];this.m_normals=[]};n["box2D.collision.shapes.B2PolygonShape"]=za;za.__name__=["box2D","collision","shapes","B2PolygonShape"];za.asArray=function(a,b){var c=new za;c.setAsArray(a,b);return c};za.asVector=function(a,b){var c=new za;c.setAsVector(a,b);return c};za.asBox=function(a,b){var c=new za;c.setAsBox(a,b);return c};za.asOrientedBox=function(a,b,c,d){null==d&&(d=0);
var e=new za;e.setAsOrientedBox(a,b,c,d);return e};za.asEdge=function(a,b){var c=new za;c.setAsEdge(a,b);return c};za.computeCentroid=function(a,b){for(var c=new y,d=0,e=0;e<b;){var f=e++,g=a[f],f=f+1<b?a[f+1|0]:a[0],k=.5*((g.x-0)*(f.y-0)-(g.y-0)*(f.x-0)),d=d+k;c.x+=.3333333333333333*k*(0+g.x+f.x);c.y+=.3333333333333333*k*(0+g.y+f.y)}c.x*=1/d;c.y*=1/d;return c};za.computeOBB=function(a,b,c){for(var d=[],e=0;e<c;){var f=e++;d[f]=b[f]}d[c]=d[0];b=Number.MAX_VALUE;e=1;for(f=c+1;e<f;){for(var g=e++,k=
d[g-1|0],p=d[g].x-k.x,w=d[g].y-k.y,g=Math.sqrt(p*p+w*w),p=p/g,w=w/g,h=-w,l=p,m=g=Number.MAX_VALUE,n=-Number.MAX_VALUE,D=-Number.MAX_VALUE,zb=0;zb<c;){var La=zb++,q=d[La].x-k.x,z=d[La].y-k.y,La=p*q+w*z,q=h*q+l*z;La<g&&(g=La);q<m&&(m=q);La>n&&(n=La);q>D&&(D=q)}zb=(n-g)*(D-m);zb<.95*b&&(b=zb,a.R.col1.x=p,a.R.col1.y=w,a.R.col2.x=h,a.R.col2.y=l,p=.5*(g+n),w=.5*(m+D),h=a.R,a.center.x=k.x+(h.col1.x*p+h.col2.x*w),a.center.y=k.y+(h.col1.y*p+h.col2.y*w),a.extents.x=.5*(n-g),a.extents.y=.5*(D-m))}};za.__super__=
Ta;za.prototype=L(Ta.prototype,{copy:function(){var a=new za;a.set(this);return a},set:function(a){Ta.prototype.set.call(this,a);if(q.__instanceof(a,za)){a=q.__cast(a,za);this.m_centroid.setV(a.m_centroid);this.m_vertexCount=a.m_vertexCount;this.reserve(this.m_vertexCount);for(var b=0,c=this.m_vertexCount;b<c;){var d=b++;this.m_vertices[d].setV(a.m_vertices[d]);this.m_normals[d].setV(a.m_normals[d])}}},setAsArray:function(a,b){null==b&&(b=0);for(var c=[],d=0;d<a.length;){var e=a[d];++d;c.push(e)}this.setAsVector(c,
b)},setAsVector:function(a,b){null==b&&(b=0);0==b&&(b=a.length);M.b2Assert(2<=b);this.m_vertexCount=b|0;this.reserve(b|0);for(var c=0,d=this.m_vertexCount;c<d;){var e=c++;this.m_vertices[e].setV(a[e])}c=0;for(d=this.m_vertexCount;c<d;){var e=c++,f=x.subtractVVPooled(this.m_vertices[e+1<this.m_vertexCount?e+1:0],this.m_vertices[e]);M.b2Assert(f.lengthSquared()>Number.MIN_VALUE);this.m_normals[e].setV(x.crossVF(f,1));this.m_normals[e].normalize()}this.m_centroid=za.computeCentroid(this.m_vertices,this.m_vertexCount)},
setAsBox:function(a,b){this.m_vertexCount=4;this.reserve(4);this.m_vertices[0].set(-a,-b);this.m_vertices[1].set(a,-b);this.m_vertices[2].set(a,b);this.m_vertices[3].set(-a,b);this.m_normals[0].set(0,-1);this.m_normals[1].set(1,0);this.m_normals[2].set(0,1);this.m_normals[3].set(-1,0);this.m_centroid.setZero()},setAsOrientedBox:function(a,b,c,d){null==d&&(d=0);this.m_vertexCount=4;this.reserve(4);this.m_vertices[0].set(-a,-b);this.m_vertices[1].set(a,-b);this.m_vertices[2].set(a,b);this.m_vertices[3].set(-a,
b);this.m_normals[0].set(0,-1);this.m_normals[1].set(1,0);this.m_normals[2].set(0,1);this.m_normals[3].set(-1,0);this.m_centroid=c;a=new hd;a.position=c;a.R.set(d);c=0;for(d=this.m_vertexCount;c<d;)b=c++,this.m_vertices[b]=x.mulX(a,this.m_vertices[b]),this.m_normals[b]=x.mulMV(a.R,this.m_normals[b])},setAsEdge:function(a,b){this.m_vertexCount=2;this.reserve(2);this.m_vertices[0].setV(a);this.m_vertices[1].setV(b);this.m_centroid.x=.5*(a.x+b.x);this.m_centroid.y=.5*(a.y+b.y);this.m_normals[0]=x.crossVF(x.subtractVV(b,
a),1);this.m_normals[0].normalize();this.m_normals[1].x=-this.m_normals[0].x;this.m_normals[1].y=-this.m_normals[0].y},testPoint:function(a,b){var c;c=a.R;for(var d=b.x-a.position.x,e=b.y-a.position.y,f=d*c.col1.x+e*c.col1.y,g=d*c.col2.x+e*c.col2.y,k=0,p=this.m_vertexCount;k<p;){var w=k++;c=this.m_vertices[w];d=f-c.x;e=g-c.y;c=this.m_normals[w];if(0<c.x*d+c.y*e)return!1}return!0},rayCast:function(a,b,c){var d=0,e=b.maxFraction,f,g,k,p;f=b.p1.x-c.position.x;g=b.p1.y-c.position.y;k=c.R;var w=f*k.col1.x+
g*k.col1.y,h=f*k.col2.x+g*k.col2.y;f=b.p2.x-c.position.x;g=b.p2.y-c.position.y;k=c.R;b=f*k.col1.x+g*k.col1.y-w;k=f*k.col2.x+g*k.col2.y-h;for(var l=-1,m=0,n=this.m_vertexCount;m<n;){var D=m++;p=this.m_vertices[D];f=p.x-w;g=p.y-h;p=this.m_normals[D];f=p.x*f+p.y*g;g=p.x*b+p.y*k;if(0==g){if(0>f)return!1}else 0>g&&f<d*g?(d=f/g,l=D):0<g&&f<e*g&&(e=f/g);if(e<d-Number.MIN_VALUE)return!1}return 0<=l?(a.fraction=d,k=c.R,p=this.m_normals[l],a.normal.x=k.col1.x*p.x+k.col2.x*p.y,a.normal.y=k.col1.y*p.x+k.col2.y*
p.y,!0):!1},computeAABB:function(a,b){for(var c=b.R,d=this.m_vertices[0],e=b.position.x+(c.col1.x*d.x+c.col2.x*d.y),f=b.position.y+(c.col1.y*d.x+c.col2.y*d.y),g=e,k=f,p=1,w=this.m_vertexCount;p<w;){var h=p++,d=this.m_vertices[h],h=b.position.x+(c.col1.x*d.x+c.col2.x*d.y),d=b.position.y+(c.col1.y*d.x+c.col2.y*d.y);e<h||(e=h);f<d||(f=d);g>h||(g=h);k>d||(k=d)}a.lowerBound.x=e-this.m_radius;a.lowerBound.y=f-this.m_radius;a.upperBound.x=g+this.m_radius;a.upperBound.y=k+this.m_radius},computeMass:function(a,
b){if(2==this.m_vertexCount)a.center.x=.5*(this.m_vertices[0].x+this.m_vertices[1].x),a.center.y=.5*(this.m_vertices[0].y+this.m_vertices[1].y),a.mass=0,a.I=0;else{for(var c=0,d=0,e=0,f=0,g=0,k=this.m_vertexCount;g<k;){var p=g++,w=this.m_vertices[p],h;h=p+1<this.m_vertexCount?this.m_vertices[p+1|0]:this.m_vertices[0];var l=w.x-0,m=w.y-0,n=h.x-0,D=h.y-0,p=l*D-m*n,zb=.5*p,e=e+zb,c=c+.3333333333333333*zb*(0+w.x+h.x),d=d+.3333333333333333*zb*(0+w.y+h.y),w=l,f=f+p*(.3333333333333333*(.25*(w*w+n*w+n*n)+
(0*w+0*n))+0+(.3333333333333333*(.25*(m*m+D*m+D*D)+(0*m+0*D))+0))}a.mass=b*e;a.center.set(1/e*c,1/e*d);a.I=b*f}},computeSubmergedArea:function(a,b,c,d){var e=x.mulTMV(c.R,a,!0),f=b-x.dot(a,c.position),g=[],k=0;a=b=-1;for(var p=!1,w=0,h=this.m_vertexCount;w<h;){var l=w++;g[l]=x.dot(e,this.m_vertices[l])-f;var m=g[l]<-Number.MIN_VALUE;0<l&&(m?p||(b=l-1,k++):p&&(a=l-1,k++));p=m}switch(k){case 0:return p?(a=new bh,this.computeMass(a,1),d.setV(x.mulX(c,a.center)),a.mass):0;case 1:-1==b?b=this.m_vertexCount-
1:a=this.m_vertexCount-1}f=(b+1)%this.m_vertexCount;e=(a+1)%this.m_vertexCount;k=(0-g[b])/(g[f]-g[b]);g=(0-g[a])/(g[e]-g[a]);b=new y(this.m_vertices[b].x*(1-k)+this.m_vertices[f].x*k,this.m_vertices[b].y*(1-k)+this.m_vertices[f].y*k);a=new y(this.m_vertices[a].x*(1-g)+this.m_vertices[e].x*g,this.m_vertices[a].y*(1-g)+this.m_vertices[e].y*g);g=0;k=new y;for(p=this.m_vertices[f];f!=e;)f=(f+1)%this.m_vertexCount,w=f==e?a:this.m_vertices[f],h=.5*((p.x-b.x)*(w.y-b.y)-(p.y-b.y)*(w.x-b.x)),g+=h,k.x+=h*(b.x+
p.x+w.x)/3,k.y+=h*(b.y+p.y+w.y)/3,p=w;k.multiply(1/g);d.setV(x.mulX(c,k));return g},getVertexCount:function(){return this.m_vertexCount},getVertices:function(){return this.m_vertices},getNormals:function(){return this.m_normals},getSupport:function(a){for(var b=0,c=this.m_vertices[0].x*a.x+this.m_vertices[0].y*a.y,d=1,e=this.m_vertexCount;d<e;){var f=d++,g=this.m_vertices[f].x*a.x+this.m_vertices[f].y*a.y;g>c&&(b=f,c=g)}return b},getSupportVertex:function(a){for(var b=0,c=this.m_vertices[0].x*a.x+
this.m_vertices[0].y*a.y,d=1,e=this.m_vertexCount;d<e;){var f=d++,g=this.m_vertices[f].x*a.x+this.m_vertices[f].y*a.y;g>c&&(b=f,c=g)}return this.m_vertices[b]},validate:function(){return!1},reserve:function(a){for(var b=this.m_vertices.length;b<a;){var c=b++;this.m_vertices[c]=new y;this.m_normals[c]=new y}},__class__:za});var ri=function(a,b,c){this._r=u["int"](255*x.clamp(a,0,1));this._g=u["int"](255*x.clamp(b,0,1));this._b=u["int"](255*x.clamp(c,0,1))};n["box2D.common.B2Color"]=ri;ri.__name__=
["box2D","common","B2Color"];ri.prototype={set:function(a,b,c){this._r=u["int"](255*x.clamp(a,0,1));this._g=u["int"](255*x.clamp(b,0,1));this._b=u["int"](255*x.clamp(c,0,1))},set_r:function(a){return this._r=u["int"](255*x.clamp(a,0,1))},set_g:function(a){return this._g=u["int"](255*x.clamp(a,0,1))},set_b:function(a){return this._b=u["int"](255*x.clamp(a,0,1))},get_color:function(){return this._r<<16|this._g<<8|this._b},__class__:ri,__properties__:{get_color:"get_color",set_b:"set_b",set_g:"set_g",
set_r:"set_r"}};var M=function(){};n["box2D.common.B2Settings"]=M;M.__name__=["box2D","common","B2Settings"];M.b2MixFriction=function(a,b){return Math.sqrt(a*b)};M.b2MixRestitution=function(a,b){return a>b?a:b};M.b2Assert=function(a){if(!a)throw new F("Assertion Failed");};var Bf=function(a,b,c){this.col1=new qd;this.col2=new qd;this.col3=new qd;null==a&&null==b&&null==c?(this.col1.setZero(),this.col2.setZero(),this.col3.setZero()):(this.col1.setV(a),this.col2.setV(b),this.col3.setV(c))};n["box2D.common.math.B2Mat33"]=
Bf;Bf.__name__=["box2D","common","math","B2Mat33"];Bf.prototype={setVVV:function(a,b,c){this.col1.setV(a);this.col2.setV(b);this.col3.setV(c)},copy:function(){return new Bf(this.col1,this.col2,this.col3)},setM:function(a){this.col1.setV(a.col1);this.col2.setV(a.col2);this.col3.setV(a.col3)},addM:function(a){this.col1.x+=a.col1.x;this.col1.y+=a.col1.y;this.col1.z+=a.col1.z;this.col2.x+=a.col2.x;this.col2.y+=a.col2.y;this.col2.z+=a.col2.z;this.col3.x+=a.col3.x;this.col3.y+=a.col3.y;this.col3.z+=a.col3.z},
setIdentity:function(){this.col1.x=1;this.col2.x=0;this.col3.x=0;this.col1.y=0;this.col2.y=1;this.col3.y=0;this.col1.z=0;this.col2.z=0;this.col3.z=1},setZero:function(){this.col1.x=0;this.col2.x=0;this.col3.x=0;this.col1.y=0;this.col2.y=0;this.col3.y=0;this.col1.z=0;this.col2.z=0;this.col3.z=0},solve22:function(a,b,c){var d=this.col1.x,e=this.col2.x,f=this.col1.y,g=this.col2.y,k=d*g-e*f;0!=k&&(k=1/k);a.x=k*(g*b-e*c);a.y=k*(d*c-f*b);return a},solve33:function(a,b,c,d){var e=this.col1.x,f=this.col1.y,
g=this.col1.z,k=this.col2.x,p=this.col2.y,w=this.col2.z,h=this.col3.x,l=this.col3.y,m=this.col3.z,n=e*(p*m-w*l)+f*(w*h-k*m)+g*(k*l-p*h);0!=n&&(n=1/n);a.x=n*(b*(p*m-w*l)+c*(w*h-k*m)+d*(k*l-p*h));a.y=n*(e*(c*m-d*l)+f*(d*h-b*m)+g*(b*l-c*h));a.z=n*(e*(p*d-w*c)+f*(w*b-k*d)+g*(k*c-p*b));return a},__class__:Bf};var x=function(){};n["box2D.common.math.B2Math"]=x;x.__name__=["box2D","common","math","B2Math"];x.__properties__={get_MIN_VALUE:"get_MIN_VALUE",get_MAX_VALUE:"get_MAX_VALUE"};x.isValid=function(a){return isNaN(a)||
-Infinity==a||Infinity==a?!1:!0};x.dot=function(a,b){return a.x*b.x+a.y*b.y};x.crossVV=function(a,b){return a.x*b.y-a.y*b.x};x.crossVF=function(a,b,c){null==c&&(c=!1);c?(c=y.getFromPool(),c.x=b*a.y,c.y=-b*a.x):c=new y(b*a.y,-b*a.x);return c};x.crossFV=function(a,b,c){null==c&&(c=!1);c?(c=y.getFromPool(),c.x=-a*b.y,c.y=a*b.x):c=new y(-a*b.y,a*b.x);return c};x.mulMV=function(a,b,c){null==c&&(c=!1);c?(c=y.getFromPool(),c.x=a.col1.x*b.x+a.col2.x*b.y,c.y=a.col1.y*b.x+a.col2.y*b.y):c=new y(a.col1.x*b.x+
a.col2.x*b.y,a.col1.y*b.x+a.col2.y*b.y);return c};x.mulTMV=function(a,b,c){null==c&&(c=!1);c?(c=y.getFromPool(),c.set(x.dot(b,a.col1),x.dot(b,a.col2))):c=new y(x.dot(b,a.col1),x.dot(b,a.col2));return c};x.mulX=function(a,b,c){null==c&&(c=!1);b=x.mulMV(a.R,b,c);b.x+=a.position.x;b.y+=a.position.y;return b};x.mulXT=function(a,b,c){b=x.subtractVVPooled(b,a.position);c=b.x*a.R.col1.x+b.y*a.R.col1.y;b.y=b.x*a.R.col2.x+b.y*a.R.col2.y;b.x=c;return b};x.addVV=function(a,b){return new y(a.x+b.x,a.y+b.y)};
x.subtractVV=function(a,b){return new y(a.x-b.x,a.y-b.y)};x.subtractVVPooled=function(a,b){var c=y.getFromPool();c.x=a.x-b.x;c.y=a.y-b.y;return c};x.distance=function(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)};x.distanceSquared=function(a,b){var c=a.x-b.x,d=a.y-b.y;return c*c+d*d};x.mulFV=function(a,b){return new y(a*b.x,a*b.y)};x.addMM=function(a,b){return tb.fromVV(x.addVV(a.col1,b.col1),x.addVV(a.col2,b.col2))};x.mulMM=function(a,b){return tb.fromVV(x.mulMV(a,b.col1),x.mulMV(a,b.col2))};
x.mulTMM=function(a,b){var c=new y(x.dot(a.col1,b.col1),x.dot(a.col2,b.col1)),d=new y(x.dot(a.col1,b.col2),x.dot(a.col2,b.col2));return tb.fromVV(c,d)};x.abs=function(a){return 0<a?a:-a};x.absV=function(a){return new y(x.abs(a.x),x.abs(a.y))};x.absM=function(a){return tb.fromVV(x.absV(a.col1),x.absV(a.col2))};x.min=function(a,b){return a<b?a:b};x.minV=function(a,b){return new y(x.min(a.x,b.x),x.min(a.y,b.y))};x.max=function(a,b){return a>b?a:b};x.maxV=function(a,b){return new y(x.max(a.x,b.x),x.max(a.y,
b.y))};x.clamp=function(a,b,c){return a<b?b:a>c?c:a};x.clampV=function(a,b,c){return x.maxV(b,x.minV(a,c))};x.swap=function(a,b){var c=a[0];a[0]=b[0];b[0]=c};x.random=function(){return 2*Math.random()-1};x.randomRange=function(a,b){var c=Math.random();return(b-a)*c+a};x.nextPowerOfTwo=function(a){a|=a>>1&2147483647;a|=a>>2&1073741823;a|=a>>4&268435455;a|=a>>8&16777215;return(a|a>>16&65535)+1};x.isPowerOfTwo=function(a){return 0<a&&0==(a&a-1)};x.get_MAX_VALUE=function(){return Number.MAX_VALUE};x.get_MIN_VALUE=
function(){return Number.MIN_VALUE};var ef=function(){this.localCenter=new y;this.c0=new y;this.c=new y};n["box2D.common.math.B2Sweep"]=ef;ef.__name__=["box2D","common","math","B2Sweep"];ef.prototype={set:function(a){this.localCenter.setV(a.localCenter);this.c0.setV(a.c0);this.c.setV(a.c);this.a0=a.a0;this.a=a.a;this.t0=a.t0},copy:function(){var a=new ef;a.localCenter.setV(this.localCenter);a.c0.setV(this.c0);a.c.setV(this.c);a.a0=this.a0;a.a=this.a;a.t0=this.t0;return a},getTransform:function(a,
b){a.position.x=(1-b)*this.c0.x+b*this.c.x;a.position.y=(1-b)*this.c0.y+b*this.c.y;a.R.set((1-b)*this.a0+b*this.a);var c=a.R;a.position.x-=c.col1.x*this.localCenter.x+c.col2.x*this.localCenter.y;a.position.y-=c.col1.y*this.localCenter.x+c.col2.y*this.localCenter.y},advance:function(a){if(this.t0<a&&1-this.t0>Number.MIN_VALUE){var b=(a-this.t0)/(1-this.t0);this.c0.x=(1-b)*this.c0.x+b*this.c.x;this.c0.y=(1-b)*this.c0.y+b*this.c.y;this.a0=(1-b)*this.a0+b*this.a;this.t0=a}},__class__:ef};var qd=function(a,
b,c){null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this.x=a;this.y=b;this.z=c};n["box2D.common.math.B2Vec3"]=qd;qd.__name__=["box2D","common","math","B2Vec3"];qd.prototype={setZero:function(){this.x=this.y=this.z=0},set:function(a,b,c){this.x=a;this.y=b;this.z=c},setV:function(a){this.x=a.x;this.y=a.y;this.z=a.z},getNegative:function(){return new qd(-this.x,-this.y,-this.z)},negativeSelf:function(){this.x=-this.x;this.y=-this.y;this.z=-this.z},copy:function(){return new qd(this.x,this.y,this.z)},add:function(a){this.x+=
a.x;this.y+=a.y;this.z+=a.z},subtract:function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z},multiply:function(a){this.x*=a;this.y*=a;this.z*=a},__class__:qd};var S=function(a,b){this.m_xf=new hd;this.m_sweep=new ef;this.m_linearVelocity=new y;this.m_force=new y;this.m_flags=0;a.bullet&&(this.m_flags|=S.e_bulletFlag);a.fixedRotation&&(this.m_flags|=S.e_fixedRotationFlag);a.allowSleep&&(this.m_flags|=S.e_allowSleepFlag);a.awake&&(this.m_flags|=S.e_awakeFlag);a.active&&(this.m_flags|=S.e_activeFlag);a.ignoreGravity&&
(this.m_flags|=S.e_ignoreGravityFlag);this.m_world=b;this.m_xf.position.setV(a.position);this.m_xf.R.set(a.angle);this.m_sweep.localCenter.setZero();this.m_sweep.t0=1;this.m_sweep.a0=this.m_sweep.a=a.angle;var c=this.m_xf.R,d=this.m_sweep.localCenter;this.m_sweep.c.x=c.col1.x*d.x+c.col2.x*d.y;this.m_sweep.c.y=c.col1.y*d.x+c.col2.y*d.y;this.m_sweep.c.x+=this.m_xf.position.x;this.m_sweep.c.y+=this.m_xf.position.y;this.m_sweep.c0.setV(this.m_sweep.c);this.m_contactList=this.m_controllerList=this.m_jointList=
null;this.m_controllerCount=0;this.m_next=this.m_prev=null;this.m_linearVelocity.setV(a.linearVelocity);this.m_angularVelocity=a.angularVelocity;this.m_linearDamping=a.linearDamping;this.m_angularDamping=a.angularDamping;this.m_force.set(0,0);this.m_sleepTime=this.m_torque=0;this.m_type=a.type;this.m_invMass=this.m_type==S.b2_dynamicBody?this.m_mass=1:this.m_mass=0;this.m_invI=this.m_I=0;this.m_inertiaScale=a.inertiaScale;this.m_userData=a.userData;this.m_fixtureList=null;this.m_fixtureCount=0;this.groupID=
a.groupID;this.origin=new y;this.size=new y};n["box2D.dynamics.B2Body"]=S;S.__name__=["box2D","dynamics","B2Body"];S.prototype={connectEdges:function(a,b,c){var d=Math.atan2(b.getDirectionVector().y,b.getDirectionVector().x);c=Math.tan(.5*(d-c));c=x.mulFV(c,b.getDirectionVector());c=x.subtractVV(c,b.getNormalVector());c=x.mulFV(M.b2_toiSlop,c);c=x.addVV(c,b.getVertex1());var e=x.addVV(a.getDirectionVector(),b.getDirectionVector());e.normalize();var f=0<x.dot(a.getDirectionVector(),b.getNormalVector());
a.setNextEdge(b,c,e,f);b.setPrevEdge(a,c,e,f);return d},createFixture:function(a){if(1==this.m_world.isLocked())return null;var b=new id;b.create(this,this.m_xf,a);0!=(this.m_flags&S.e_activeFlag)&&b.createProxy(this.m_world.m_contactManager.m_broadPhase,this.m_xf);b.m_next=this.m_fixtureList;this.m_fixtureList=b;++this.m_fixtureCount;b.m_body=this;0<b.m_density&&this.resetMassData();this.m_world.m_flags|=eb.e_newFixture;return b},createFixture2:function(a,b){null==b&&(b=0);var c=new ke;c.shape=a;
c.density=b;return this.createFixture(c)},DestroyFixture:function(a){if(1!=this.m_world.isLocked()){for(var b=this.m_fixtureList,c=null;null!=b;){if(b==a){null!=c?c.m_next=a.m_next:this.m_fixtureList=a.m_next;break}c=b;b=b.m_next}for(b=this.m_contactList;null!=b;){var c=b.contact,b=b.next,d=c.getFixtureA(),e=c.getFixtureB();a!=d&&a!=e||this.m_world.m_contactManager.destroy(c)}0!=(this.m_flags&S.e_activeFlag)&&a.destroyProxy(this.m_world.m_contactManager.m_broadPhase);a.destroy();a.m_body=null;a.m_next=
null;--this.m_fixtureCount;this.resetMassData()}},setPositionAndAngle:function(a,b){var c;if(1!=this.m_world.isLocked()){this.m_xf.R.set(b);this.m_xf.position.setV(a);c=this.m_xf.R;var d=this.m_sweep.localCenter;this.m_sweep.c.x=c.col1.x*d.x+c.col2.x*d.y;this.m_sweep.c.y=c.col1.y*d.x+c.col2.y*d.y;this.m_sweep.c.x+=this.m_xf.position.x;this.m_sweep.c.y+=this.m_xf.position.y;this.m_sweep.c0.setV(this.m_sweep.c);this.m_sweep.a0=this.m_sweep.a=b;d=this.m_world.m_contactManager.m_broadPhase;for(c=this.m_fixtureList;null!=
c;)c.synchronize(d,this.m_xf,this.m_xf),c=c.m_next;this.m_world.m_contactManager.findNewContacts()}},setPositionFast:function(a){if(1!=this.m_world.isLocked()){this.m_xf.position.setV(a);a=this.m_xf.R;var b=this.m_sweep.localCenter;this.m_sweep.c.x=a.col1.x*b.x+a.col2.x*b.y;this.m_sweep.c.y=a.col1.y*b.x+a.col2.y*b.y;this.m_sweep.c.x+=this.m_xf.position.x;this.m_sweep.c.y+=this.m_xf.position.y;this.m_sweep.c0.setV(this.m_sweep.c)}},setTransform:function(a){this.setPositionAndAngle(a.position,a.getAngle())},
getTransform:function(){return this.m_xf},getPosition:function(){return this.m_xf.position},setPosition:function(a){this.setPositionAndAngle(a,this.getAngle())},getAngle:function(){return this.m_sweep.a},setAngle:function(a){this.setPositionAndAngle(this.getPosition(),a)},getWorldCenter:function(){return this.m_sweep.c},getLocalCenter:function(){return this.m_sweep.localCenter},setLinearVelocity:function(a){this.m_type!=S.b2_staticBody&&this.m_linearVelocity.setV(a)},getLinearVelocity:function(){return this.m_linearVelocity},
setAngularVelocity:function(a){this.m_type!=S.b2_staticBody&&(this.m_angularVelocity=a)},getAngularVelocity:function(){return this.m_angularVelocity},getDefinition:function(){var a=new hg;a.type=this.getType();a.allowSleep=(this.m_flags&S.e_allowSleepFlag)==S.e_allowSleepFlag;a.angle=this.getAngle();a.angularDamping=this.m_angularDamping;a.angularVelocity=this.m_angularVelocity;a.fixedRotation=(this.m_flags&S.e_fixedRotationFlag)==S.e_fixedRotationFlag;a.bullet=(this.m_flags&S.e_bulletFlag)==S.e_bulletFlag;
a.awake=(this.m_flags&S.e_awakeFlag)==S.e_awakeFlag;a.linearDamping=this.m_linearDamping;a.linearVelocity.setV(this.getLinearVelocity());a.position=this.getPosition();a.userData=this.getUserData();return a},applyForce:function(a,b){this.m_type==S.b2_dynamicBody&&(0==this.isAwake()&&this.setAwake(!0),this.m_force.x+=a.x,this.m_force.y+=a.y,this.m_torque+=(b.x-this.m_sweep.c.x)*a.y-(b.y-this.m_sweep.c.y)*a.x)},applyTorque:function(a){this.m_type==S.b2_dynamicBody&&(0==this.isAwake()&&this.setAwake(!0),
this.m_torque+=a)},applyImpulse:function(a,b){this.m_type==S.b2_dynamicBody&&(0==this.isAwake()&&this.setAwake(!0),this.m_linearVelocity.x+=this.m_invMass*a.x,this.m_linearVelocity.y+=this.m_invMass*a.y,this.m_angularVelocity+=this.m_invI*((b.x-this.m_sweep.c.x)*a.y-(b.y-this.m_sweep.c.y)*a.x))},split:function(a){for(var b=this.getLinearVelocity().copy(),c=this.getAngularVelocity(),d=this.getWorldCenter(),e=this.m_world.createBody(this.getDefinition()),f=null,g=this.m_fixtureList;null!=g;)if(a(g)){var k=
g.m_next;null!=f?f.m_next=k:this.m_fixtureList=k;this.m_fixtureCount--;g.m_next=e.m_fixtureList;e.m_fixtureList=g;e.m_fixtureCount++;g.m_body=e;g=k}else f=g,g=g.m_next;this.resetMassData();e.resetMassData();f=this.getWorldCenter();a=e.getWorldCenter();f=x.addVV(b,x.crossFV(c,x.subtractVV(f,d)));b=x.addVV(b,x.crossFV(c,x.subtractVV(a,d)));this.setLinearVelocity(f);e.setLinearVelocity(b);this.setAngularVelocity(c);e.setAngularVelocity(c);this.synchronizeFixtures();e.synchronizeFixtures();return e},
merge:function(a){var b;for(b=a.m_fixtureList;null!=b;){var c=b.m_next;a.m_fixtureCount--;b.m_next=this.m_fixtureList;this.m_fixtureList=b;this.m_fixtureCount++;b.m_body=a;b=c}this.m_fixtureCount=0;this.getWorldCenter();a.getWorldCenter();this.getLinearVelocity().copy();a.getLinearVelocity().copy();this.getAngularVelocity();a.getAngularVelocity();this.resetMassData();this.synchronizeFixtures()},getMass:function(){return this.m_mass},getInertia:function(){return this.m_I},getMassData:function(a){a.mass=
this.m_mass;a.I=this.m_I;a.center.setV(this.m_sweep.localCenter)},setMassData:function(a){M.b2Assert(0==this.m_world.isLocked());if(1!=this.m_world.isLocked()&&this.m_type==S.b2_dynamicBody){this.m_invI=this.m_I=this.m_invMass=0;this.m_mass=a.mass;0>=this.m_mass&&(this.m_mass=1);this.m_invMass=1/this.m_mass;0<a.I&&0==(this.m_flags&S.e_fixedRotationFlag)&&(this.m_I=a.I-this.m_mass*(a.center.x*a.center.x+a.center.y*a.center.y),this.m_invI=1/this.m_I);var b=this.m_sweep.c.copy();this.m_sweep.localCenter.setV(a.center);
this.m_sweep.c0.setV(x.mulX(this.m_xf,this.m_sweep.localCenter));this.m_sweep.c.setV(this.m_sweep.c0);this.m_linearVelocity.x+=this.m_angularVelocity*-(this.m_sweep.c.y-b.y);this.m_linearVelocity.y+=this.m_angularVelocity*(this.m_sweep.c.x-b.x)}},resetMassData:function(){this.m_invI=this.m_I=this.m_invMass=this.m_mass=0;this.m_sweep.localCenter.setZero();if(this.m_type!=S.b2_staticBody&&this.m_type!=S.b2_kinematicBody){for(var a=y.make(0,0),b=this.m_fixtureList;null!=b;)if(0!=b.m_density){var c=b.getMassData();
this.m_mass+=c.mass;a.x+=c.center.x*c.mass;a.y+=c.center.y*c.mass;this.m_I+=c.I;b=b.m_next}0<this.m_mass?(this.m_invMass=1/this.m_mass,a.x*=this.m_invMass,a.y*=this.m_invMass):this.m_invMass=this.m_mass=1;0<this.m_I&&0==(this.m_flags&S.e_fixedRotationFlag)?(this.m_I-=this.m_mass*(a.x*a.x+a.y*a.y),this.m_I*=this.m_inertiaScale,M.b2Assert(0<this.m_I),this.m_invI=1/this.m_I):this.m_invI=this.m_I=0;b=this.m_sweep.c.copy();this.m_sweep.localCenter.setV(a);this.m_sweep.c0.setV(x.mulX(this.m_xf,this.m_sweep.localCenter));
this.m_sweep.c.setV(this.m_sweep.c0);this.m_linearVelocity.x+=this.m_angularVelocity*-(this.m_sweep.c.y-b.y);this.m_linearVelocity.y+=this.m_angularVelocity*(this.m_sweep.c.x-b.x)}},getWorldPoint:function(a){var b=this.m_xf.R;a=new y(b.col1.x*a.x+b.col2.x*a.y,b.col1.y*a.x+b.col2.y*a.y);a.x+=this.m_xf.position.x;a.y+=this.m_xf.position.y;return a},getWorldVector:function(a){return x.mulMV(this.m_xf.R,a)},getLocalPoint:function(a){return x.mulXT(this.m_xf,a)},getLocalVector:function(a){return x.mulTMV(this.m_xf.R,
a)},getLinearVelocityFromWorldPoint:function(a){return new y(this.m_linearVelocity.x-this.m_angularVelocity*(a.y-this.m_sweep.c.y),this.m_linearVelocity.y+this.m_angularVelocity*(a.x-this.m_sweep.c.x))},getLinearVelocityFromLocalPoint:function(a){var b=this.m_xf.R;a=new y(b.col1.x*a.x+b.col2.x*a.y,b.col1.y*a.x+b.col2.y*a.y);a.x+=this.m_xf.position.x;a.y+=this.m_xf.position.y;return new y(this.m_linearVelocity.x-this.m_angularVelocity*(a.y-this.m_sweep.c.y),this.m_linearVelocity.y+this.m_angularVelocity*
(a.x-this.m_sweep.c.x))},getLinearDamping:function(){return this.m_linearDamping},setLinearDamping:function(a){this.m_linearDamping=a},getAngularDamping:function(){return this.m_angularDamping},setAngularDamping:function(a){this.m_angularDamping=a},setType:function(a){if(this.m_type!=a)for(this.m_type=a,this.resetMassData(),this.m_type==S.b2_staticBody&&(this.m_linearVelocity.setZero(),this.m_angularVelocity=0),this.setAwake(!0),this.m_force.setZero(),this.m_torque=0,a=this.m_contactList;null!=a;)a.contact.flagForFiltering(),
a=a.next},getType:function(){return this.m_type},setBullet:function(a){this.m_flags=a?this.m_flags|S.e_bulletFlag:this.m_flags&~S.e_bulletFlag},isBullet:function(){return(this.m_flags&S.e_bulletFlag)==S.e_bulletFlag},setSleepingAllowed:function(a){a?this.m_flags|=S.e_allowSleepFlag:(this.m_flags&=~S.e_allowSleepFlag,this.setAwake(!0))},setAwake:function(a){a?(this.m_flags|=S.e_awakeFlag,this.m_sleepTime=0):(this.m_flags&=~S.e_awakeFlag,this.m_sleepTime=0,this.m_linearVelocity.setZero(),this.m_angularVelocity=
0,this.m_force.setZero(),this.m_torque=0)},isAwake:function(){return(this.m_flags&S.e_awakeFlag)==S.e_awakeFlag},setFixedRotation:function(a){this.m_flags=a?this.m_flags|S.e_fixedRotationFlag:this.m_flags&~S.e_fixedRotationFlag;this.resetMassData()},isFixedRotation:function(){return(this.m_flags&S.e_fixedRotationFlag)==S.e_fixedRotationFlag},setActive:function(a){if(a!=this.isActive()){var b;if(a)for(this.m_flags|=S.e_activeFlag,a=this.m_world.m_contactManager.m_broadPhase,b=this.m_fixtureList;null!=
b;)b.createProxy(a,this.m_xf),b=b.m_next;else{this.m_flags&=~S.e_activeFlag;a=this.m_world.m_contactManager.m_broadPhase;for(b=this.m_fixtureList;null!=b;)b.destroyProxy(a),b=b.m_next;for(a=this.m_contactList;null!=a;)b=a,a=a.next,this.m_world.m_contactManager.destroy(b.contact);this.m_contactList=null}}},isActive:function(){return(this.m_flags&S.e_activeFlag)==S.e_activeFlag},isSleepingAllowed:function(){return(this.m_flags&S.e_allowSleepFlag)==S.e_allowSleepFlag},getFixtureList:function(){return this.m_fixtureList},
getJointList:function(){return this.m_jointList},getControllerList:function(){return this.m_controllerList},getContactList:function(){return this.m_contactList},getNext:function(){return this.m_next},getUserData:function(){return this.m_userData},setUserData:function(a){this.m_userData=a},getWorld:function(){return this.m_world},setFriction:function(a){for(var b=this.m_fixtureList;null!=b;)b.m_friction=a,b=b.m_next},setBounciness:function(a){for(var b=this.m_fixtureList;null!=b;)b.m_restitution=a,
b=b.m_next},setPaused:function(a){this.m_flags=a?this.m_flags|S.e_pausedFlag:this.m_flags&~S.e_pausedFlag},isPaused:function(){return(this.m_flags&S.e_pausedFlag)==S.e_pausedFlag},setIgnoreGravity:function(a){this.m_flags=a?this.m_flags|S.e_ignoreGravityFlag:this.m_flags&~S.e_ignoreGravityFlag},isIgnoringGravity:function(){return(this.m_flags&S.e_ignoreGravityFlag)==S.e_ignoreGravityFlag},setAlwaysActive:function(a){this.m_flags=a?this.m_flags|S.e_alwaysActiveFlag:this.m_flags&~S.e_alwaysActiveFlag},
isAlwaysActive:function(){return(this.m_flags&S.e_alwaysActiveFlag)==S.e_alwaysActiveFlag},synchronizeFixtures:function(){var a=S.s_xf1;a.R.set(this.m_sweep.a0);var b=a.R,c=this.m_sweep.localCenter;a.position.x=this.m_sweep.c0.x-(b.col1.x*c.x+b.col2.x*c.y);a.position.y=this.m_sweep.c0.y-(b.col1.y*c.x+b.col2.y*c.y);c=this.m_world.m_contactManager.m_broadPhase;for(b=this.m_fixtureList;null!=b;)b.synchronize(c,a,this.m_xf),b=b.m_next},synchronizeTransform:function(){this.m_xf.R.set(this.m_sweep.a);var a=
this.m_xf.R,b=this.m_sweep.localCenter;this.m_xf.position.x=this.m_sweep.c.x-(a.col1.x*b.x+a.col2.x*b.y);this.m_xf.position.y=this.m_sweep.c.y-(a.col1.y*b.x+a.col2.y*b.y)},shouldCollide:function(a){if(this.m_type!=S.b2_dynamicBody&&a.m_type!=S.b2_dynamicBody)return!1;for(var b=this.m_jointList;null!=b;){if(b.other==a&&0==b.joint.m_collideConnected)return!1;b=b.next}return!0},advance:function(a){this.m_sweep.advance(a);this.m_sweep.c.setV(this.m_sweep.c0);this.m_sweep.a=this.m_sweep.a0;this.synchronizeTransform()},
__class__:S};var hg=function(){this.position=new y;this.linearVelocity=new y;this.userData=null;this.angularDamping=this.linearDamping=this.angularVelocity=this.angle=0;this.awake=this.allowSleep=!0;this.bullet=this.fixedRotation=!1;this.type=S.b2_staticBody;this.active=!0;this.inertiaScale=1;this.groupID=3};n["box2D.dynamics.B2BodyDef"]=hg;hg.__name__=["box2D","dynamics","B2BodyDef"];hg.prototype={__class__:hg};var ch=function(){};n["box2D.dynamics.B2ContactFilter"]=ch;ch.__name__=["box2D","dynamics",
"B2ContactFilter"];ch.prototype={shouldCollide:function(a,b){var c=a.m_body.groupID,d=b.m_body.groupID,e=a.groupID,f=b.groupID;-1E3!=e&&(c=e);-1E3!=f&&(d=f);return-1==c||-1==d?!1:-2==c||-2==d?1==c||1==d?!1:!0:na.collisionMap[c][d]},rayCollide:function(a,b){return null==a?!0:this.shouldCollide(q.__cast(a,id),b)},__class__:ch};var Tk=function(){this.normalImpulses=[];this.tangentImpulses=[]};n["box2D.dynamics.B2ContactImpulse"]=Tk;Tk.__name__=["box2D","dynamics","B2ContactImpulse"];Tk.prototype={__class__:Tk};
var Se=function(){};n["box2D.dynamics.B2ContactListener"]=Se;Se.__name__=["box2D","dynamics","B2ContactListener"];Se.prototype={beginContact:function(a){5E3<Se.KEY_LOCK&&(Se.KEY_LOCK=0);a.key=Se.KEY_LOCK++;var b;b=q.__cast(a.getFixtureA().getUserData(),Da);var c;c=q.__cast(a.getFixtureB().getUserData(),Da);var d=q.__instanceof(b,$b),e=q.__instanceof(c,$b);!d||e||q.__instanceof(c,Te)?!e||d||q.__instanceof(b,Te)?(null!=b.contacts&&(b.contacts.set(a.key,a),b.contactCount++,b.collisions.clr(a.key)&&b.collisionsCount--),
null!=c.contacts&&(c.contacts.set(a.key,a),c.contactCount++,c.collisions.clr(a.key)&&c.collisionsCount--)):(q.__cast(c,$b).addActor(b),null!=b.regionContacts&&b.regionContacts.set(a.key,a)):(q.__cast(b,$b).addActor(c),null!=c.regionContacts&&c.regionContacts.set(a.key,a))},endContact:function(a){var b;b=q.__cast(a.getFixtureA().getUserData(),Da);var c;c=q.__cast(a.getFixtureB().getUserData(),Da);var d=q.__instanceof(b,$b),e=q.__instanceof(c,$b);if(d&&!e){d=!1;null!=c.regionContacts&&c.regionContacts.clr(a.key);
for(a=c.regionContacts.iterator();a.hasNext();){e=a.next();if(u.is(e.getFixtureA().getUserData(),$b)&&e.getFixtureA().getUserData()==b){d=!0;break}if(u.is(e.getFixtureB().getUserData(),$b)&&e.getFixtureB().getUserData()==b){d=!0;break}}d&&!c.recycled||q.__cast(b,$b).removeActor(c)}else if(e&&!d){d=!1;null!=b.regionContacts&&b.regionContacts.clr(a.key);for(a=b.regionContacts.iterator();a.hasNext();){e=a.next();if(u.is(e.getFixtureA().getUserData(),$b)&&e.getFixtureA().getUserData()==c){d=!0;break}if(u.is(e.getFixtureB().getUserData(),
$b)&&e.getFixtureB().getUserData()==c){d=!0;break}}d&&!b.recycled||q.__cast(c,$b).removeActor(b)}else null!=b.collisions&&b.collisions.clr(a.key)&&b.collisionsCount--,null!=b.contacts&&b.contacts.clr(a.key)&&b.contactCount--,null!=c.collisions&&c.collisions.clr(a.key)&&c.collisionsCount--,null!=c.contacts&&c.contacts.clr(a.key)&&c.contactCount--},preSolve:function(a,b){},postSolve:function(a,b){},__class__:Se};var si=function(){this.m_world=null;this.m_contactCount=0;this.m_contactFilter=ch.b2_defaultFilter;
this.m_contactListener=Se.b2_defaultListener;this.m_contactFactory=new Uk(this.m_allocator);this.m_broadPhase=new pi};n["box2D.dynamics.B2ContactManager"]=si;si.__name__=["box2D","dynamics","B2ContactManager"];si.prototype={addPair:function(a,b){var c;c=q.__cast(a,id);var d;d=q.__cast(b,id);var e=c.getBody(),f=d.getBody();if(e!=f){for(var g=f.getContactList();null!=g;){if(g.other==e){var k=g.contact.getFixtureA(),p=g.contact.getFixtureB();if(k==c&&p==d||k==d&&p==c)return}g=g.next}0!=f.shouldCollide(e)&&
0!=this.m_contactFilter.shouldCollide(c,d)&&(g=this.m_contactFactory.create(c,d),c=g.getFixtureA(),d=g.getFixtureB(),e=c.m_body,f=d.m_body,g.m_prev=null,g.m_next=this.m_world.m_contactList,null!=this.m_world.m_contactList&&(this.m_world.m_contactList.m_prev=g),this.m_world.m_contactList=g,g.m_nodeA.contact=g,g.m_nodeA.other=f,g.m_nodeA.prev=null,g.m_nodeA.next=e.m_contactList,null!=e.m_contactList&&(e.m_contactList.prev=g.m_nodeA),e.m_contactList=g.m_nodeA,g.m_nodeB.contact=g,g.m_nodeB.other=e,g.m_nodeB.prev=
null,g.m_nodeB.next=f.m_contactList,null!=f.m_contactList&&(f.m_contactList.prev=g.m_nodeB),f.m_contactList=g.m_nodeB,++this.m_world.m_contactCount)}},findNewContacts:function(){this.m_broadPhase.updatePairs(K(this,this.addPair))},destroy:function(a){var b=a.getFixtureA(),c=a.getFixtureB(),b=b.getBody(),c=c.getBody();a.isTouching()&&this.m_contactListener.endContact(a);null!=a.m_prev&&(a.m_prev.m_next=a.m_next);null!=a.m_next&&(a.m_next.m_prev=a.m_prev);a==this.m_world.m_contactList&&(this.m_world.m_contactList=
a.m_next);null!=a.m_nodeA.prev&&(a.m_nodeA.prev.next=a.m_nodeA.next);null!=a.m_nodeA.next&&(a.m_nodeA.next.prev=a.m_nodeA.prev);a.m_nodeA==b.m_contactList&&(b.m_contactList=a.m_nodeA.next);null!=a.m_nodeB.prev&&(a.m_nodeB.prev.next=a.m_nodeB.next);null!=a.m_nodeB.next&&(a.m_nodeB.next.prev=a.m_nodeB.prev);a.m_nodeB==c.m_contactList&&(c.m_contactList=a.m_nodeB.next);this.m_contactFactory.destroy(a);--this.m_contactCount},collide:function(){for(var a=this.m_world.m_contactList;null!=a;){var b=a.getFixtureA(),
c=a.getFixtureB(),d=b.getBody(),e=c.getBody();if(0==d.isAwake()&&0==e.isAwake())a=a.getNext();else{if(0!=(a.m_flags&sa.e_filterFlag)){if(0==e.shouldCollide(d)){b=a;a=b.getNext();this.destroy(b);continue}if(0==this.m_contactFilter.shouldCollide(b,c)){b=a;a=b.getNext();this.destroy(b);continue}a.m_flags&=~sa.e_filterFlag}0==this.m_broadPhase.testOverlap(b.m_proxy,c.m_proxy)?(b=a,a=b.getNext(),this.destroy(b)):(a.update(this.m_contactListener),a=a.getNext())}}},__class__:si};var ad=function(){this.m_xformScale=
this.m_fillAlpha=this.m_alpha=this.m_lineThickness=this.m_drawScale=1;this.m_drawFlags=0};n["box2D.dynamics.B2DebugDraw"]=ad;ad.__name__=["box2D","dynamics","B2DebugDraw"];ad.prototype={setFlags:function(a){this.m_drawFlags=a},getFlags:function(){return this.m_drawFlags},appendFlags:function(a){this.m_drawFlags|=a},clearFlags:function(a){this.m_drawFlags&=~a},setSprite:function(a){this.m_sprite=a},getSprite:function(){return this.m_sprite},setDrawScale:function(a){this.m_drawScale=a},getDrawScale:function(){return this.m_drawScale},
setLineThickness:function(a){this.m_lineThickness=a},getLineThickness:function(){return this.m_lineThickness},setAlpha:function(a){this.m_alpha=a},getAlpha:function(){return this.m_alpha},setFillAlpha:function(a){this.m_fillAlpha=a},getFillAlpha:function(){return this.m_fillAlpha},setXFormScale:function(a){this.m_xformScale=a},getXFormScale:function(){return this.m_xformScale},drawPolygon:function(a,b,c){this.m_sprite.get_graphics().lineStyle(this.m_lineThickness,c.get_color(),this.m_alpha);this.m_sprite.get_graphics().moveTo(a[0].x*
this.m_drawScale,a[0].y*this.m_drawScale);for(c=1;c<b;){var d=c++;this.m_sprite.get_graphics().lineTo(a[d].x*this.m_drawScale,a[d].y*this.m_drawScale)}this.m_sprite.get_graphics().lineTo(a[0].x*this.m_drawScale,a[0].y*this.m_drawScale)},drawSolidPolygon:function(a,b,c){this.m_sprite.get_graphics().lineStyle(this.m_lineThickness,c.get_color(),this.m_alpha);this.m_sprite.get_graphics().moveTo(a[0].x*this.m_drawScale,a[0].y*this.m_drawScale);this.m_sprite.get_graphics().beginFill(c.get_color(),this.m_fillAlpha);
for(c=1;c<b;){var d=c++;this.m_sprite.get_graphics().lineTo(a[d].x*this.m_drawScale,a[d].y*this.m_drawScale)}this.m_sprite.get_graphics().lineTo(a[0].x*this.m_drawScale,a[0].y*this.m_drawScale);this.m_sprite.get_graphics().endFill()},drawCircle:function(a,b,c){this.m_sprite.get_graphics().lineStyle(this.m_lineThickness,c.get_color(),this.m_alpha);this.m_sprite.get_graphics().drawCircle(a.x*this.m_drawScale,a.y*this.m_drawScale,b*this.m_drawScale)},drawSolidCircle:function(a,b,c,d){this.m_sprite.get_graphics().lineStyle(this.m_lineThickness,
d.get_color(),this.m_alpha);this.m_sprite.get_graphics().moveTo(0,0);this.m_sprite.get_graphics().beginFill(d.get_color(),this.m_fillAlpha);this.m_sprite.get_graphics().drawCircle(a.x*this.m_drawScale,a.y*this.m_drawScale,b*this.m_drawScale);this.m_sprite.get_graphics().endFill();this.m_sprite.get_graphics().moveTo(a.x*this.m_drawScale,a.y*this.m_drawScale);this.m_sprite.get_graphics().lineTo((a.x+c.x*b)*this.m_drawScale,(a.y+c.y*b)*this.m_drawScale)},drawSegment:function(a,b,c){this.m_sprite.get_graphics().lineStyle(this.m_lineThickness,
c.get_color(),this.m_alpha);this.m_sprite.get_graphics().moveTo(a.x*this.m_drawScale,a.y*this.m_drawScale);this.m_sprite.get_graphics().lineTo(b.x*this.m_drawScale,b.y*this.m_drawScale)},drawTransform:function(a){this.m_sprite.get_graphics().lineStyle(this.m_lineThickness,16711680,this.m_alpha);this.m_sprite.get_graphics().moveTo(a.position.x*this.m_drawScale,a.position.y*this.m_drawScale);this.m_sprite.get_graphics().lineTo((a.position.x+this.m_xformScale*a.R.col1.x)*this.m_drawScale,(a.position.y+
this.m_xformScale*a.R.col1.y)*this.m_drawScale);this.m_sprite.get_graphics().lineStyle(this.m_lineThickness,65280,this.m_alpha);this.m_sprite.get_graphics().moveTo(a.position.x*this.m_drawScale,a.position.y*this.m_drawScale);this.m_sprite.get_graphics().lineTo((a.position.x+this.m_xformScale*a.R.col2.x)*this.m_drawScale,(a.position.y+this.m_xformScale*a.R.col2.y)*this.m_drawScale)},__class__:ad};var Ym=function(){};n["box2D.dynamics.B2DestructionListener"]=Ym;Ym.__name__=["box2D","dynamics","B2DestructionListener"];
Ym.prototype={sayGoodbyeJoint:function(a){},sayGoodbyeFixture:function(a){},__class__:Ym};var dh=function(){this.categoryBits=1;this.maskBits=65535;this.groupIndex=0};n["box2D.dynamics.B2FilterData"]=dh;dh.__name__=["box2D","dynamics","B2FilterData"];dh.prototype={copy:function(){var a=new dh;a.categoryBits=this.categoryBits;a.maskBits=this.maskBits;a.groupIndex=this.groupIndex;return a},__class__:dh};var id=function(){this.m_filter=new dh;this.m_aabb=new fd;this.m_shape=this.m_next=this.m_body=this.m_userData=
null;this.m_restitution=this.m_friction=this.m_density=0;this.groupID=3};n["box2D.dynamics.B2Fixture"]=id;id.__name__=["box2D","dynamics","B2Fixture"];id.prototype={getType:function(){return this.m_shape.getType()},getShape:function(){return this.m_shape},setSensor:function(a){if(this.m_isSensor!=a&&(this.m_isSensor=a,null!=this.m_body))for(a=this.m_body.getContactList();null!=a;){var b=a.contact,c=b.getFixtureA(),d=b.getFixtureB();c!=this&&d!=this||b.setSensor(c.isSensor()||d.isSensor());a=a.next}},
isSensor:function(){return this.m_isSensor},setFilterData:function(a){this.m_filter=a.copy();if(null==this.m_body)for(a=this.m_body.getContactList();null!=a;){var b=a.contact,c=b.getFixtureA(),d=b.getFixtureB();c!=this&&d!=this||b.flagForFiltering();a=a.next}},getFilterData:function(){return this.m_filter.copy()},getBody:function(){return this.m_body},getNext:function(){return this.m_next},getUserData:function(){return this.m_userData},SetUserData:function(a){this.m_userData=a},testPoint:function(a){return this.m_shape.testPoint(this.m_body.getTransform(),
a)},rayCast:function(a,b){return this.m_shape.rayCast(a,b,this.m_body.getTransform())},getMassData:function(a){null==a&&(a=new bh);this.m_shape.computeMass(a,this.m_density);return a},setDensity:function(a){this.m_density=a},getDensity:function(){return this.m_density},getFriction:function(){return this.m_friction},setFriction:function(a){this.m_friction=a},getRestitution:function(){return this.m_restitution},setRestitution:function(a){this.m_restitution=a},getAABB:function(){return this.m_aabb},
create:function(a,b,c){this.m_userData=c.userData;this.m_friction=c.friction;this.m_restitution=c.restitution;this.m_body=a;this.m_next=null;this.m_filter=c.filter.copy();this.m_isSensor=c.isSensor;this.m_shape=c.shape.copy();this.m_density=c.density;this.groupID=c.groupID},destroy:function(){this.m_shape=null},createProxy:function(a,b){this.m_shape.computeAABB(this.m_aabb,b);this.m_proxy=a.createProxy(this.m_aabb,this)},destroyProxy:function(a){null!=this.m_proxy&&(a.destroyProxy(this.m_proxy),this.m_proxy=
null)},synchronize:function(a,b,c){null!=this.m_proxy&&(this.m_shape.computeAABB(id.tempAABB1,b),this.m_shape.computeAABB(id.tempAABB2,c),this.m_aabb.combine(id.tempAABB1,id.tempAABB2),b=x.subtractVVPooled(c.position,b.position),a.moveProxy(this.m_proxy,this.m_aabb,b))},__class__:id};var ke=function(){this.filter=new dh;this.userData=this.shape=null;this.friction=.2;this.density=this.restitution=0;this.filter.categoryBits=1;this.filter.maskBits=65535;this.filter.groupIndex=0;this.isSensor=!1;this.groupID=
3};n["box2D.dynamics.B2FixtureDef"]=ke;ke.__name__=["box2D","dynamics","B2FixtureDef"];ke.prototype={__class__:ke};var Cf=function(){this.m_bodies=[];this.m_contacts=[];this.m_joints=[]};n["box2D.dynamics.B2Island"]=Cf;Cf.__name__=["box2D","dynamics","B2Island"];Cf.prototype={initialize:function(a,b,c,d,e,f){this.m_bodyCapacity=a;this.m_contactCapacity=b;this.m_jointCapacity=c;this.m_jointCount=this.m_contactCount=this.m_bodyCount=0;this.m_allocator=d;this.m_listener=e;this.m_contactSolver=f;for(d=
this.m_bodies.length;d<a;)e=d++,this.m_bodies[e]=null;for(a=this.m_contacts.length;a<b;)d=a++,this.m_contacts[d]=null;for(b=this.m_joints.length;b<c;)a=b++,this.m_joints[a]=null},clear:function(){this.m_jointCount=this.m_contactCount=this.m_bodyCount=0},solve:function(a,b,c){for(var d,e=0,f=this.m_bodyCount;e<f;)d=e++,d=this.m_bodies[d],d.getType()==S.b2_dynamicBody&&(d.isIgnoringGravity()?(d.m_linearVelocity.x+=a.dt*d.m_invMass*d.m_force.x,d.m_linearVelocity.y+=a.dt*d.m_invMass*d.m_force.y):(d.m_linearVelocity.x+=
a.dt*(b.x+d.m_invMass*d.m_force.x),d.m_linearVelocity.y+=a.dt*(b.y+d.m_invMass*d.m_force.y)),d.m_angularVelocity+=a.dt*d.m_invI*d.m_torque,d.m_linearVelocity.multiply(x.clamp(1-a.dt*d.m_linearDamping,0,1)),d.m_angularVelocity*=x.clamp(1-a.dt*d.m_angularDamping,0,1));this.m_contactSolver.initialize(a,this.m_contacts,this.m_contactCount,this.m_allocator);b=this.m_contactSolver;b.initVelocityConstraints(a);e=0;for(f=this.m_jointCount;e<f;)d=e++,d=this.m_joints[d],d.initVelocityConstraints(a);e=0;for(f=
a.velocityIterations;e<f;){e++;for(var g=0,k=this.m_jointCount;g<k;)d=g++,d=this.m_joints[d],d.solveVelocityConstraints(a);b.solveVelocityConstraints()}e=0;for(f=this.m_jointCount;e<f;)d=e++,d=this.m_joints[d],d.finalizeVelocityConstraints();b.finalizeVelocityConstraints();e=0;for(f=this.m_bodyCount;e<f;)d=e++,d=this.m_bodies[d],d.getType()!=S.b2_staticBody&&(g=a.dt*d.m_linearVelocity.x,k=a.dt*d.m_linearVelocity.y,g*g+k*k>M.b2_maxTranslationSquared&&(d.m_linearVelocity.normalize(),d.m_linearVelocity.x=
d.m_linearVelocity.x*M.b2_maxTranslation*a.inv_dt,d.m_linearVelocity.y=d.m_linearVelocity.y*M.b2_maxTranslation*a.inv_dt),g=a.dt*d.m_angularVelocity,g*g>M.b2_maxRotationSquared&&(d.m_angularVelocity=0>d.m_angularVelocity?-M.b2_maxRotation*a.inv_dt:M.b2_maxRotation*a.inv_dt),d.m_sweep.c0.setV(d.m_sweep.c),d.m_sweep.a0=d.m_sweep.a,d.m_sweep.c.x+=a.dt*d.m_linearVelocity.x,d.m_sweep.c.y+=a.dt*d.m_linearVelocity.y,d.m_sweep.a+=a.dt*d.m_angularVelocity,d.synchronizeTransform());e=0;for(f=a.positionIterations;e<
f;){e++;for(var g=b.solvePositionConstraints(M.b2_contactBaumgarte),k=!0,p=0,w=this.m_jointCount;p<w;)d=p++,d=this.m_joints[d],d=d.solvePositionConstraints(M.b2_contactBaumgarte),k=k&&d;if(g&&k)break}this.report(b.m_constraints);if(c){c=Number.MAX_VALUE;b=M.b2_linearSleepTolerance*M.b2_linearSleepTolerance;e=M.b2_angularSleepTolerance*M.b2_angularSleepTolerance;f=0;for(g=this.m_bodyCount;f<g;)d=f++,d=this.m_bodies[d],d.getType()!=S.b2_staticBody&&(0==(d.m_flags&S.e_allowSleepFlag)&&(c=d.m_sleepTime=
0),0==(d.m_flags&S.e_allowSleepFlag)||d.m_angularVelocity*d.m_angularVelocity>e||x.dot(d.m_linearVelocity,d.m_linearVelocity)>b?c=d.m_sleepTime=0:(d.m_sleepTime+=a.dt,c=x.min(c,d.m_sleepTime)));if(c>=M.b2_timeToSleep)for(a=0,c=this.m_bodyCount;a<c;)b=a++,d=this.m_bodies[b],d.setAwake(!1)}},solveTOI:function(a){this.m_contactSolver.initialize(a,this.m_contacts,this.m_contactCount,this.m_allocator);for(var b=this.m_contactSolver,c=0,d=this.m_jointCount;c<d;){var e=c++;this.m_joints[e].initVelocityConstraints(a)}c=
0;for(d=a.velocityIterations;c<d;){c++;b.solveVelocityConstraints();for(var e=0,f=this.m_jointCount;e<f;){var g=e++;this.m_joints[g].solveVelocityConstraints(a)}}c=0;for(d=this.m_bodyCount;c<d;)e=c++,e=this.m_bodies[e],e.getType()!=S.b2_staticBody&&(f=a.dt*e.m_linearVelocity.x,g=a.dt*e.m_linearVelocity.y,f*f+g*g>M.b2_maxTranslationSquared&&(e.m_linearVelocity.normalize(),e.m_linearVelocity.x=e.m_linearVelocity.x*M.b2_maxTranslation*a.inv_dt,e.m_linearVelocity.y=e.m_linearVelocity.y*M.b2_maxTranslation*
a.inv_dt),f=a.dt*e.m_angularVelocity,f*f>M.b2_maxRotationSquared&&(e.m_angularVelocity=0>e.m_angularVelocity?-M.b2_maxRotation*a.inv_dt:M.b2_maxRotation*a.inv_dt),e.m_sweep.c0.setV(e.m_sweep.c),e.m_sweep.a0=e.m_sweep.a,e.m_sweep.c.x+=a.dt*e.m_linearVelocity.x,e.m_sweep.c.y+=a.dt*e.m_linearVelocity.y,e.m_sweep.a+=a.dt*e.m_angularVelocity,e.synchronizeTransform());c=0;for(a=a.positionIterations;c<a;){c++;d=b.solvePositionConstraints(.75);e=!0;f=0;for(g=this.m_jointCount;f<g;)var k=f++,k=this.m_joints[k].solvePositionConstraints(M.b2_contactBaumgarte),
e=e&&k;if(d&&e)break}this.report(b.m_constraints)},report:function(a){if(null!=this.m_listener)for(var b=0,c=this.m_contactCount;b<c;){for(var d=b++,e=this.m_contacts[d],d=a[d],f=0,g=d.pointCount;f<g;){var k=f++;Cf.s_impulse.normalImpulses[k]=d.points[k].normalImpulse;Cf.s_impulse.tangentImpulses[k]=d.points[k].tangentImpulse}this.m_listener.postSolve(e,Cf.s_impulse)}},addBody:function(a){a.m_islandIndex=this.m_bodyCount;this.m_bodies[this.m_bodyCount++]=a},addContact:function(a){this.m_contacts[this.m_contactCount++]=
a},addJoint:function(a){this.m_joints[this.m_jointCount++]=a},__class__:Cf};var eh=function(){};n["box2D.dynamics.B2TimeStep"]=eh;eh.__name__=["box2D","dynamics","B2TimeStep"];eh.prototype={set:function(a){this.dt=a.dt;this.inv_dt=a.inv_dt;this.positionIterations=a.positionIterations;this.velocityIterations=a.velocityIterations;this.warmStarting=a.warmStarting},__class__:eh};var eb=function(a,b){this.s_stack=[];this.m_contactManager=new si;this.m_contactSolver=new bd;this.m_island=new Cf;this.m_controllerList=
this.m_jointList=this.m_contactList=this.m_bodyList=this.m_debugDraw=this.m_destructionListener=null;this.m_controllerCount=this.m_jointCount=this.m_contactCount=this.m_bodyCount=0;eb.m_warmStarting=!0;eb.m_continuousPhysics=!1;this.m_allowSleep=b;this.m_gravity=a;this.m_flags=this.m_inv_dt0=0;this.m_contactManager.m_world=this;var c=new hg;this.m_groundBody=this.createBody(c)};n["box2D.dynamics.B2World"]=eb;eb.__name__=["box2D","dynamics","B2World"];eb.prototype={setDestructionListener:function(a){this.m_destructionListener=
a},setContactFilter:function(a){this.m_contactManager.m_contactFilter=a},setContactListener:function(a){this.m_contactManager.m_contactListener=a},setDebugDraw:function(a){this.m_debugDraw=a},setBroadPhase:function(a){var b=this.m_contactManager.m_broadPhase;this.m_contactManager.m_broadPhase=a;for(var c=this.m_bodyList;null!=c;){for(var d=c.m_fixtureList;null!=d;)d.m_proxy=a.createProxy(b.getFatAABB(d.m_proxy),d),d=d.m_next;c=c.m_next}},validate:function(){this.m_contactManager.m_broadPhase.validate()},
getProxyCount:function(){return this.m_contactManager.m_broadPhase.getProxyCount()},createBody:function(a){if(1==this.isLocked())return null;a=new S(a,this);a.m_prev=null;a.m_next=this.m_bodyList;null!=this.m_bodyList&&(this.m_bodyList.m_prev=a);this.m_bodyList=a;++this.m_bodyCount;return a},destroyBody:function(a){if(1!=this.isLocked()){for(var b=a.m_jointList;null!=b;){var c=b,b=b.next;null!=this.m_destructionListener&&this.m_destructionListener.sayGoodbyeJoint(c.joint);this.destroyJoint(c.joint)}for(b=
a.m_controllerList;null!=b;)c=b,b=b.nextController,c.controller.removeBody(a);for(b=a.m_contactList;null!=b;)c=b,b=b.next,this.m_contactManager.destroy(c.contact);a.m_contactList=null;for(b=a.m_fixtureList;null!=b;)c=b,b=b.m_next,null!=this.m_destructionListener&&this.m_destructionListener.sayGoodbyeFixture(c),c.destroyProxy(this.m_contactManager.m_broadPhase),c.destroy();a.m_fixtureList=null;a.m_fixtureCount=0;null!=a.m_prev&&(a.m_prev.m_next=a.m_next);null!=a.m_next&&(a.m_next.m_prev=a.m_prev);
a==this.m_bodyList&&(this.m_bodyList=a.m_next);--this.m_bodyCount}},createJoint:function(a){var b=T.create(a,null);b.m_prev=null;b.m_next=this.m_jointList;null!=this.m_jointList&&(this.m_jointList.m_prev=b);this.m_jointList=b;++this.m_jointCount;b.m_edgeA.joint=b;b.m_edgeA.other=b.m_bodyB;b.m_edgeA.prev=null;b.m_edgeA.next=b.m_bodyA.m_jointList;null!=b.m_bodyA.m_jointList&&(b.m_bodyA.m_jointList.prev=b.m_edgeA);b.m_bodyA.m_jointList=b.m_edgeA;b.m_edgeB.joint=b;b.m_edgeB.other=b.m_bodyA;b.m_edgeB.prev=
null;b.m_edgeB.next=b.m_bodyB.m_jointList;null!=b.m_bodyB.m_jointList&&(b.m_bodyB.m_jointList.prev=b.m_edgeB);b.m_bodyB.m_jointList=b.m_edgeB;var c=a.bodyA,d=a.bodyB;if(0==a.collideConnected)for(a=d.getContactList();null!=a;)a.other==c&&a.contact.flagForFiltering(),a=a.next;return b},destroyJoint:function(a){var b=a.m_collideConnected;null!=a.m_prev&&(a.m_prev.m_next=a.m_next);null!=a.m_next&&(a.m_next.m_prev=a.m_prev);a==this.m_jointList&&(this.m_jointList=a.m_next);var c=a.m_bodyA,d=a.m_bodyB;c.setAwake(!0);
d.setAwake(!0);null!=a.m_edgeA.prev&&(a.m_edgeA.prev.next=a.m_edgeA.next);null!=a.m_edgeA.next&&(a.m_edgeA.next.prev=a.m_edgeA.prev);a.m_edgeA==c.m_jointList&&(c.m_jointList=a.m_edgeA.next);a.m_edgeA.prev=null;a.m_edgeA.next=null;null!=a.m_edgeB.prev&&(a.m_edgeB.prev.next=a.m_edgeB.next);null!=a.m_edgeB.next&&(a.m_edgeB.next.prev=a.m_edgeB.prev);a.m_edgeB==d.m_jointList&&(d.m_jointList=a.m_edgeB.next);a.m_edgeB.prev=null;a.m_edgeB.next=null;T.destroy(a,null);--this.m_jointCount;if(0==b)for(a=d.getContactList();null!=
a;)a.other==c&&a.contact.flagForFiltering(),a=a.next},addController:function(a){a.m_next=this.m_controllerList;a.m_prev=null;this.m_controllerList=a;a.m_world=this;this.m_controllerCount++;return a},removeController:function(a){null!=a.m_prev&&(a.m_prev.m_next=a.m_next);null!=a.m_next&&(a.m_next.m_prev=a.m_prev);this.m_controllerList==a&&(this.m_controllerList=a.m_next);this.m_controllerCount--},createController:function(a){if(a.m_world!=this)throw new F("Controller can only be a member of one world");
a.m_next=this.m_controllerList;a.m_prev=null;null!=this.m_controllerList&&(this.m_controllerList.m_prev=a);this.m_controllerList=a;++this.m_controllerCount;a.m_world=this;return a},destroyController:function(a){a.clear();null!=a.m_next&&(a.m_next.m_prev=a.m_prev);null!=a.m_prev&&(a.m_prev.m_next=a.m_next);a==this.m_controllerList&&(this.m_controllerList=a.m_next);--this.m_controllerCount},setWarmStarting:function(a){eb.m_warmStarting=a},setContinuousPhysics:function(a){eb.m_continuousPhysics=a},getBodyCount:function(){return this.m_bodyCount},
getJointCount:function(){return this.m_jointCount},getContactCount:function(){return this.m_contactCount},setGravity:function(a){this.m_gravity=a},getGravity:function(){return this.m_gravity},getGroundBody:function(){return this.m_groundBody},step:function(a,b,c){y.freePool();0!=(this.m_flags&eb.e_newFixture)&&(this.m_contactManager.findNewContacts(),this.m_flags&=~eb.e_newFixture);this.m_flags|=eb.e_locked;var d=eb.s_timestep2;d.dt=a;d.velocityIterations=b;d.positionIterations=c;d.inv_dt=0<a?1/a:
0;d.dtRatio=this.m_inv_dt0*a;d.warmStarting=eb.m_warmStarting;this.m_contactManager.collide();0<d.dt&&this.solve(d);eb.m_continuousPhysics&&0<d.dt&&this.solveTOI(d);0<d.dt&&(this.m_inv_dt0=d.inv_dt);this.m_flags&=~eb.e_locked},clearForces:function(){for(var a=this.m_bodyList;null!=a;)a.m_force.setZero(),a.m_torque=0,a=a.m_next},drawDebugData:function(){if(null!=this.m_debugDraw){this.m_debugDraw.m_sprite.get_graphics().clear();var a=this.m_debugDraw.getFlags(),b,c,d;new y;new y;new y;var e;new fd;
new fd;e=[new y,new y,new y,new y];var f=new ri(0,0,0);if(0!=(a&ad.e_shapeBit))for(b=this.m_bodyList;null!=b;){e=b.m_xf;for(c=b.getFixtureList();null!=c;)d=c.getShape(),0==b.isActive()?f.set(.5,.5,.3):b.getType()==S.b2_staticBody?f.set(.5,.9,.5):b.getType()==S.b2_kinematicBody?f.set(.5,.5,.9):0==b.isAwake()?f.set(.6,.6,.6):f.set(.9,.7,.7),this.drawShape(d,e,f),c=c.m_next;b=b.m_next}if(0!=(a&ad.e_jointBit))for(b=this.m_jointList;null!=b;)this.drawJoint(b),b=b.m_next;if(0!=(a&ad.e_controllerBit))for(b=
this.m_controllerList;null!=b;)b.draw(this.m_debugDraw),b=b.m_next;if(0!=(a&ad.e_pairBit))for(f.set(.3,.9,.9),b=this.m_contactManager.m_contactList;null!=b;)d=b.getFixtureA(),c=b.getFixtureB(),d=d.getAABB().getCenter(),c=c.getAABB().getCenter(),this.m_debugDraw.drawSegment(d,c,f),b=b.getNext();if(0!=(a&ad.e_aabbBit))for(d=this.m_contactManager.m_broadPhase,e=[new y,new y,new y,new y],b=this.m_bodyList;null!=b;){if(0!=b.isActive())for(c=b.getFixtureList();null!=c;){var g=d.getFatAABB(c.m_proxy);e[0].set(g.lowerBound.x,
g.lowerBound.y);e[1].set(g.upperBound.x,g.lowerBound.y);e[2].set(g.upperBound.x,g.upperBound.y);e[3].set(g.lowerBound.x,g.upperBound.y);this.m_debugDraw.drawPolygon(e,4,f);c=c.getNext()}b=b.getNext()}if(0!=(a&ad.e_centerOfMassBit))for(b=this.m_bodyList;null!=b;)e=eb.s_xf,e.R=b.m_xf.R,e.position=b.getWorldCenter(),this.m_debugDraw.drawTransform(e),b=b.m_next}},queryAABB:function(a,b){var c=this.m_contactManager.m_broadPhase;c.query(function(b){return a(c.getUserData(b))},b)},queryShape:function(a,
b,c){null==c&&(c=new hd,c.setIdentity());var d=this.m_contactManager.m_broadPhase,e=new fd;b.computeAABB(e,c);d.query(function(e){e=q.__cast(d.getUserData(e),id);return Ta.testOverlap(b,c,e.getShape(),e.getBody().getTransform())?a(e):!0},e)},queryPoint:function(a,b){var c=this.m_contactManager.m_broadPhase,d=new fd;d.lowerBound.set(b.x-M.b2_linearSlop,b.y-M.b2_linearSlop);d.upperBound.set(b.x+M.b2_linearSlop,b.y+M.b2_linearSlop);c.query(function(d){d=q.__cast(c.getUserData(d),id);return d.testPoint(b)?
a(d):!0},d)},rayCast:function(a,b,c){var d=this.m_contactManager.m_broadPhase,e=new Rk,f=new oi(b,c);d.rayCast(function(f,k){var p=d.getUserData(k),p=q.__cast(p,id);if(p.rayCast(e,f)){var w=e.fraction,h=new y((1-w)*b.x+w*c.x,(1-w)*b.y+w*c.y);return a(p,h,e.normal,w)}return f.maxFraction},f)},rayCastOne:function(a,b){var c;this.rayCast(function(a,b,f,g){c=a;return g},a,b);return c},rayCastAll:function(a,b){var c=[];this.rayCast(function(a,b,f,g){c[c.length]=a;return 1},a,b);return c},getBodyList:function(){return this.m_bodyList},
getJointList:function(){return this.m_jointList},getContactList:function(){return this.m_contactList},isLocked:function(){return 0<(this.m_flags&eb.e_locked)},solve:function(a){for(var b,c=this.m_controllerList;null!=c;)c.step(a),c=c.m_next;var d=this.m_island;d.initialize(this.m_bodyCount,this.m_contactCount,this.m_jointCount,null,this.m_contactManager.m_contactListener,this.m_contactSolver);for(b=this.m_bodyList;null!=b;)b.m_flags&=~S.e_islandFlag,b=b.m_next;for(c=this.m_contactList;null!=c;)c.m_flags&=
~sa.e_islandFlag,c=c.m_next;for(c=this.m_jointList;null!=c;)c.m_islandFlag=!1,c=c.m_next;for(var c=this.s_stack,e=this.m_bodyList;null!=e;){if(0==(e.m_flags&S.e_islandFlag)&&(e.isActive()||e.isAlwaysActive()||!(e.m_xf.position.x+e.origin.x+e.size.x>=this.m_aabb.lowerBound.x||e.m_xf.position.y+e.origin.y+e.size.y>=this.m_aabb.lowerBound.y||e.m_xf.position.x+e.origin.x<=this.m_aabb.upperBound.x||e.m_xf.position.y+e.origin.y<=this.m_aabb.upperBound.y)||(e.setActive(!0),e.setAwake(!0)),0!=e.isAwake()&&
0!=e.isActive()&&!e.isPaused()&&e.getType()!=S.b2_staticBody))if(e.isActive()&&!e.isAlwaysActive()&&(e.m_xf.position.x+e.origin.x+e.size.x<=this.m_aabb.lowerBound.x||e.m_xf.position.y+e.origin.y+e.size.y<=this.m_aabb.lowerBound.y||e.m_xf.position.x+e.origin.x>=this.m_aabb.upperBound.x||e.m_xf.position.y+e.origin.y>=this.m_aabb.upperBound.y))e.setAwake(!1),e.setActive(!1);else{d.clear();var f=0;c[f++]=e;for(e.m_flags|=S.e_islandFlag;0<f;)if(b=c[--f],d.addBody(b),0==b.isAwake()&&b.setAwake(!0),b.getType()!=
S.b2_staticBody){for(var g,k=b.m_contactList;null!=k;)0==(k.contact.m_flags&sa.e_islandFlag)&&1!=k.contact.isSensor()&&0!=k.contact.isEnabled()&&0!=k.contact.isTouching()&&(d.addContact(k.contact),k.contact.m_flags|=sa.e_islandFlag,g=k.other,0==(g.m_flags&S.e_islandFlag)&&(c[f++]=g,g.m_flags|=S.e_islandFlag)),k=k.next;for(b=b.m_jointList;null!=b;)1!=b.joint.m_islandFlag&&(g=b.other,0!=g.isActive()&&(d.addJoint(b.joint),b.joint.m_islandFlag=!0,0==(g.m_flags&S.e_islandFlag)&&(c[f++]=g,g.m_flags|=S.e_islandFlag))),
b=b.next}d.solve(a,this.m_gravity,this.m_allowSleep);f=0;for(g=d.m_bodyCount;f<g;)b=f++,b=d.m_bodies[b],b.getType()==S.b2_staticBody&&(b.m_flags&=~S.e_islandFlag)}e=e.m_next}a=0;for(d=c.length;a<d;){e=a++;if(null==c[e])break;c[e]=null}for(b=this.m_bodyList;null!=b;)0!=b.isAwake()&&0!=b.isActive()&&b.getType()!=S.b2_staticBody&&b.synchronizeFixtures(),b=b.m_next;this.m_contactManager.findNewContacts()},solveTOI:function(a){var b,c,d,e,f=this.m_island;f.initialize(this.m_bodyCount,M.b2_maxTOIContactsPerIsland,
M.b2_maxTOIJointsPerIsland,null,this.m_contactManager.m_contactListener,this.m_contactSolver);var g=eb.s_queue;for(b=this.m_bodyList;null!=b;)b.m_flags&=~S.e_islandFlag,b.m_sweep.t0=0,b=b.m_next;for(b=this.m_contactList;null!=b;)b.m_flags&=~(sa.e_toiFlag|sa.e_islandFlag),b=b.m_next;for(e=this.m_jointList;null!=e;)e.m_islandFlag=!1,e=e.m_next;for(;;){e=null;var k=1;for(b=this.m_contactList;null!=b;){if(1!=b.isSensor()&&0!=b.isEnabled()&&0!=b.isContinuous()){c=1;if(0!=(b.m_flags&sa.e_toiFlag))c=b.m_toi;
else{c=b.m_fixtureA;d=b.m_fixtureB;c=c.m_body;d=d.m_body;if(!(c.getType()==S.b2_dynamicBody&&0!=c.isAwake()||d.getType()==S.b2_dynamicBody&&0!=d.isAwake())){b=b.m_next;continue}var p=c.m_sweep.t0;c.m_sweep.t0<d.m_sweep.t0?(p=d.m_sweep.t0,c.m_sweep.advance(p)):d.m_sweep.t0<c.m_sweep.t0&&(p=c.m_sweep.t0,d.m_sweep.advance(p));c=b.computeTOI(c.m_sweep,d.m_sweep);M.b2Assert(0<=c&&1>=c);0<c&&1>c&&(c=(1-c)*p+c,1<c&&(c=1));b.m_toi=c;b.m_flags|=sa.e_toiFlag}Number.MIN_VALUE<c&&c<k&&(e=b,k=c)}b=b.m_next}if(null==
e||1-100*Number.MIN_VALUE<k)break;c=e.m_fixtureA;d=e.m_fixtureB;c=c.m_body;d=d.m_body;eb.s_backupA.set(c.m_sweep);eb.s_backupB.set(d.m_sweep);c.advance(k);d.advance(k);e.update(this.m_contactManager.m_contactListener);e.m_flags&=~sa.e_toiFlag;if(1==e.isSensor()||0==e.isEnabled())c.m_sweep.set(eb.s_backupA),d.m_sweep.set(eb.s_backupB),c.synchronizeTransform(),d.synchronizeTransform();else if(0!=e.isTouching()){b=c;b.getType()!=S.b2_dynamicBody&&(b=d);f.clear();d=c=0;g[c+d++]=b;for(b.m_flags|=S.e_islandFlag;0<
d;)if(b=g[c++],--d,f.addBody(b),0==b.isAwake()&&b.setAwake(!0),b.getType()==S.b2_dynamicBody){for(e=b.m_contactList;null!=e&&f.m_contactCount!=f.m_contactCapacity;)0==(e.contact.m_flags&sa.e_islandFlag)&&1!=e.contact.isSensor()&&0!=e.contact.isEnabled()&&0!=e.contact.isTouching()&&(f.addContact(e.contact),e.contact.m_flags|=sa.e_islandFlag,p=e.other,0==(p.m_flags&S.e_islandFlag)&&(p.getType()!=S.b2_staticBody&&(p.advance(k),p.setAwake(!0)),g[c+d]=p,++d,p.m_flags|=S.e_islandFlag)),e=e.next;for(b=b.m_jointList;null!=
b;)f.m_jointCount!=f.m_jointCapacity&&1!=b.joint.m_islandFlag&&(p=b.other,0!=p.isActive()&&(f.addJoint(b.joint),b.joint.m_islandFlag=!0,0==(p.m_flags&S.e_islandFlag)&&(p.getType()!=S.b2_staticBody&&(p.advance(k),p.setAwake(!0)),g[c+d]=p,++d,p.m_flags|=S.e_islandFlag))),b=b.next}b=eb.s_timestep;b.warmStarting=!1;b.dt=(1-k)*a.dt;b.inv_dt=1/b.dt;b.dtRatio=0;b.velocityIterations=a.velocityIterations;b.positionIterations=a.positionIterations;f.solveTOI(b);k=0;for(c=f.m_bodyCount;k<c;)if(b=k++,b=f.m_bodies[b],
b.m_flags&=~S.e_islandFlag,0!=b.isAwake()&&b.getType()==S.b2_dynamicBody)for(b.synchronizeFixtures(),e=b.m_contactList;null!=e;)e.contact.m_flags&=~sa.e_toiFlag,e=e.next;k=0;for(e=f.m_contactCount;k<e;)b=k++,b=f.m_contacts[b],b.m_flags&=~(sa.e_toiFlag|sa.e_islandFlag);k=0;for(b=f.m_jointCount;k<b;)e=k++,e=f.m_joints[e],e.m_islandFlag=!1;this.m_contactManager.findNewContacts()}}},drawJoint:function(a){var b=a.getBodyA(),c=a.getBodyB(),d=b.m_xf.position,e=c.m_xf.position,f=a.getAnchorA(),g=a.getAnchorB(),
k=eb.s_jointColor;switch(a.m_type){case 3:this.m_debugDraw.drawSegment(f,g,k);break;case 4:b=q.__cast(a,ue);a=b.getGroundAnchorA();b=b.getGroundAnchorB();this.m_debugDraw.drawSegment(a,f,k);this.m_debugDraw.drawSegment(b,g,k);this.m_debugDraw.drawSegment(a,b,k);break;case 5:this.m_debugDraw.drawSegment(f,g,k);break;default:b!=this.m_groundBody&&this.m_debugDraw.drawSegment(d,f,k),this.m_debugDraw.drawSegment(f,g,k),c!=this.m_groundBody&&this.m_debugDraw.drawSegment(e,g,k)}},drawShape:function(a,b,
c){switch(a.m_type){case 0:a=q.__cast(a,hb);var d=x.mulX(b,a.m_p);this.m_debugDraw.drawSolidCircle(d,a.m_radius,b.R.col1,c);break;case 1:d=q.__cast(a,za);a=d.getVertexCount();for(var d=d.getVertices(),e=[],f=0;f<a;){var g=f++;e[g]=x.mulX(b,d[g])}this.m_debugDraw.drawSolidPolygon(e,a,c);break;case 2:a=q.__cast(a,te),this.m_debugDraw.drawSegment(x.mulX(b,a.getVertex1()),x.mulX(b,a.getVertex2()),c)}},setScreenBounds:function(a){this.m_aabb=a},getScreenBounds:function(){return this.m_aabb},__class__:eb};
var sa=function(){this.m_nodeA=new ti;this.m_nodeB=new ti;this.m_manifold=new Fc;this.m_oldManifold=new Fc};n["box2D.dynamics.contacts.B2Contact"]=sa;sa.__name__=["box2D","dynamics","contacts","B2Contact"];sa.prototype={getManifold:function(){return this.m_manifold},getWorldManifold:function(a){var b=this.m_fixtureA.getBody(),c=this.m_fixtureB.getBody(),d=this.m_fixtureA.getShape(),e=this.m_fixtureB.getShape();a.initialize(this.m_manifold,b.getTransform(),d.m_radius,c.getTransform(),e.m_radius)},
isTouching:function(){return(this.m_flags&sa.e_touchingFlag)==sa.e_touchingFlag},isContinuous:function(){return(this.m_flags&sa.e_continuousFlag)==sa.e_continuousFlag},setSensor:function(a){this.m_flags=a?this.m_flags|sa.e_sensorFlag:this.m_flags&~sa.e_sensorFlag},isSensor:function(){return(this.m_flags&sa.e_sensorFlag)==sa.e_sensorFlag},setEnabled:function(a){this.m_flags=a?this.m_flags|sa.e_enabledFlag:this.m_flags&~sa.e_enabledFlag},isEnabled:function(){return(this.m_flags&sa.e_enabledFlag)==sa.e_enabledFlag},
getNext:function(){return this.m_next},getFixtureA:function(){return this.m_fixtureA},getFixtureB:function(){return this.m_fixtureB},flagForFiltering:function(){this.m_flags|=sa.e_filterFlag},reset:function(a,b){this.m_flags=sa.e_enabledFlag;if(null==a||null==b)this.m_fixtureB=this.m_fixtureA=null;else{if(a.isSensor()||b.isSensor())this.m_flags|=sa.e_sensorFlag;var c=a.getBody(),d=b.getBody();if(c.getType()!=S.b2_dynamicBody||c.isBullet()||d.getType()!=S.b2_dynamicBody||d.isBullet())this.m_flags|=
sa.e_continuousFlag;this.m_fixtureA=a;this.m_fixtureB=b;this.m_manifold.m_pointCount=0;this.m_next=this.m_prev=null;this.m_nodeA.contact=null;this.m_nodeA.prev=null;this.m_nodeA.next=null;this.m_nodeA.other=null;this.m_nodeB.contact=null;this.m_nodeB.prev=null;this.m_nodeB.next=null;this.m_nodeB.other=null}},update:function(a){var b=this.m_oldManifold;this.m_oldManifold=this.m_manifold;this.m_manifold=b;this.m_flags|=sa.e_enabledFlag;var c=!1,b=(this.m_flags&sa.e_touchingFlag)==sa.e_touchingFlag,
d=this.m_fixtureA.m_body,e=this.m_fixtureB.m_body,f=this.m_fixtureA.m_aabb.testOverlap(this.m_fixtureB.m_aabb);if(0!=(this.m_flags&sa.e_sensorFlag))f&&(c=this.m_fixtureA.getShape(),f=this.m_fixtureB.getShape(),d=d.getTransform(),e=e.getTransform(),c=Ta.testOverlap(c,d,f,e)),this.m_manifold.m_pointCount=0;else{d.getType()!=S.b2_dynamicBody||d.isBullet()||e.getType()!=S.b2_dynamicBody||e.isBullet()?this.m_flags|=sa.e_continuousFlag:this.m_flags&=~sa.e_continuousFlag;if(f){this.evaluate();for(var c=
0<this.m_manifold.m_pointCount,f=0,g=this.m_manifold.m_pointCount;f<g;){var k=f++,k=this.m_manifold.m_points[k];k.m_normalImpulse=0;k.m_tangentImpulse=0;for(var p=k.m_id,w=0,h=this.m_oldManifold.m_pointCount;w<h;){var l=w++,l=this.m_oldManifold.m_points[l];if(l.m_id.get_key()==p.get_key()){k.m_normalImpulse=l.m_normalImpulse;k.m_tangentImpulse=l.m_tangentImpulse;break}}}}else this.m_manifold.m_pointCount=0;c!=b&&(d.setAwake(!0),e.setAwake(!0))}this.m_flags=c?this.m_flags|sa.e_touchingFlag:this.m_flags&
~sa.e_touchingFlag;0==b&&1==c&&a.beginContact(this);1==b&&0==c&&a.endContact(this);0==(this.m_flags&sa.e_sensorFlag)&&a.preSolve(this,this.m_oldManifold)},evaluate:function(){},computeTOI:function(a,b){sa.s_input.proxyA.set(this.m_fixtureA.getShape());sa.s_input.proxyB.set(this.m_fixtureB.getShape());sa.s_input.sweepA=a;sa.s_input.sweepB=b;sa.s_input.tolerance=M.b2_linearSlop;return Ra.timeOfImpact(sa.s_input)},__class__:sa};var ff=function(){sa.call(this)};n["box2D.dynamics.contacts.B2CircleContact"]=
ff;ff.__name__=["box2D","dynamics","contacts","B2CircleContact"];ff.create=function(a){return new ff};ff.destroy=function(a,b){};ff.__super__=sa;ff.prototype=L(sa.prototype,{reset:function(a,b){sa.prototype.reset.call(this,a,b)},evaluate:function(){var a=this.m_fixtureA.getBody(),b=this.m_fixtureB.getBody();Ja.collideCircles(this.m_manifold,q.__cast(this.m_fixtureA.getShape(),hb),a.m_xf,q.__cast(this.m_fixtureB.getShape(),hb),b.m_xf)},__class__:ff});var Wk=function(){this.localPlaneNormal=new y;this.localPoint=
new y;this.normal=new y;this.normalMass=new tb;this.K=new tb;this.points=[];for(var a=0,b=M.b2_maxManifoldPoints;a<b;){var c=a++;this.points[c]=new Vk}};n["box2D.dynamics.contacts.B2ContactConstraint"]=Wk;Wk.__name__=["box2D","dynamics","contacts","B2ContactConstraint"];Wk.prototype={__class__:Wk};var Vk=function(){this.localPoint=new y;this.rA=new y;this.rB=new y};n["box2D.dynamics.contacts.B2ContactConstraintPoint"]=Vk;Vk.__name__=["box2D","dynamics","contacts","B2ContactConstraintPoint"];Vk.prototype=
{__class__:Vk};var ti=function(){};n["box2D.dynamics.contacts.B2ContactEdge"]=ti;ti.__name__=["box2D","dynamics","contacts","B2ContactEdge"];ti.prototype={__class__:ti};var Uk=function(a){this.m_allocator=a;this.initializeRegisters()};n["box2D.dynamics.contacts.B2ContactFactory"]=Uk;Uk.__name__=["box2D","dynamics","contacts","B2ContactFactory"];Uk.prototype={addType:function(a,b,c,d){this.m_registers[c][d].createFcn=a;this.m_registers[c][d].destroyFcn=b;this.m_registers[c][d].primary=c},initializeRegisters:function(){this.m_registers=
[];for(var a=0,b=Ta.e_shapeTypeCount;a<b;){var c=a++;this.m_registers[c]=[];for(var d=0,e=Ta.e_shapeTypeCount;d<e;){var f=d++;this.m_registers[c][f]=null}}a=0;for(b=Ta.e_shapeTypeCount;a<b;)for(c=a++,d=0,e=Ta.e_shapeTypeCount;d<e;)f=d++,null==this.m_registers[c][f]&&(this.m_registers[c][f]=new Xk,c!=f&&(this.m_registers[f][c]=this.m_registers[c][f]));this.addType(ff.create,ff.destroy,Ta.e_circleShape,Ta.e_circleShape);this.addType(gf.create,gf.destroy,Ta.e_polygonShape,Ta.e_circleShape);this.addType(hf.create,
hf.destroy,Ta.e_polygonShape,Ta.e_polygonShape);this.addType(oa.create,oa.destroy,Ta.e_edgeShape,Ta.e_circleShape);this.addType(r.create,r.destroy,Ta.e_polygonShape,Ta.e_edgeShape)},create:function(a,b){var c=a.getType(),d=b.getType(),d=this.m_registers[c][d],e;if(null!=d.pool)return e=d.pool,d.pool=e.m_next,d.poolCount--,d.primary==c?e.reset(a,b):e.reset(b,a),e;e=d.createFcn;return null!=e?(d.primary==c?(e=e(this.m_allocator),e.reset(a,b)):(e=e(this.m_allocator),e.reset(b,a)),e):null},destroy:function(a){0<
a.m_manifold.m_pointCount&&(a.m_fixtureA.m_body.setAwake(!0),a.m_fixtureB.m_body.setAwake(!0));var b=a.m_fixtureA.getType(),c=a.m_fixtureB.getType(),b=this.m_registers[b][c];b.poolCount++;a.m_next=b.pool;b.pool=a;b=b.destroyFcn;b(a,this.m_allocator)},__class__:Uk};var Xk=function(){};n["box2D.dynamics.contacts.B2ContactRegister"]=Xk;Xk.__name__=["box2D","dynamics","contacts","B2ContactRegister"];Xk.prototype={__class__:Xk};var fh=function(){this.m_normal=new y;this.m_separations=[];this.m_points=
[];for(var a=0,b=M.b2_maxManifoldPoints;a<b;){var c=a++;this.m_points[c]=new y}};n["box2D.dynamics.contacts.B2PositionSolverManifold"]=fh;fh.__name__=["box2D","dynamics","contacts","B2PositionSolverManifold"];fh.prototype={initialize:function(a){M.b2Assert(0<a.pointCount);var b,c,d,e,f;switch(a.type){case 1:d=a.bodyA.m_xf.R;c=a.localPoint;b=a.bodyA.m_xf.position.x+(d.col1.x*c.x+d.col2.x*c.y);e=a.bodyA.m_xf.position.y+(d.col1.y*c.x+d.col2.y*c.y);d=a.bodyB.m_xf.R;c=a.points[0].localPoint;f=a.bodyB.m_xf.position.x+
(d.col1.x*c.x+d.col2.x*c.y);d=a.bodyB.m_xf.position.y+(d.col1.y*c.x+d.col2.y*c.y);c=f-b;var g=d-e,k=c*c+g*g;k>Number.MIN_VALUE*Number.MIN_VALUE?(k=Math.sqrt(k),this.m_normal.x=c/k,this.m_normal.y=g/k):(this.m_normal.x=1,this.m_normal.y=0);this.m_points[0].x=.5*(b+f);this.m_points[0].y=.5*(e+d);this.m_separations[0]=c*this.m_normal.x+g*this.m_normal.y-a.radius;break;case 2:d=a.bodyA.m_xf.R;c=a.localPlaneNormal;this.m_normal.x=d.col1.x*c.x+d.col2.x*c.y;this.m_normal.y=d.col1.y*c.x+d.col2.y*c.y;d=a.bodyA.m_xf.R;
c=a.localPoint;e=a.bodyA.m_xf.position.x+(d.col1.x*c.x+d.col2.x*c.y);f=a.bodyA.m_xf.position.y+(d.col1.y*c.x+d.col2.y*c.y);d=a.bodyB.m_xf.R;g=0;for(k=a.pointCount;g<k;){var p=g++;c=a.points[p].localPoint;b=a.bodyB.m_xf.position.x+(d.col1.x*c.x+d.col2.x*c.y);c=a.bodyB.m_xf.position.y+(d.col1.y*c.x+d.col2.y*c.y);this.m_separations[p]=(b-e)*this.m_normal.x+(c-f)*this.m_normal.y-a.radius;this.m_points[p].x=b;this.m_points[p].y=c}break;case 4:d=a.bodyB.m_xf.R;c=a.localPlaneNormal;this.m_normal.x=d.col1.x*
c.x+d.col2.x*c.y;this.m_normal.y=d.col1.y*c.x+d.col2.y*c.y;d=a.bodyB.m_xf.R;c=a.localPoint;e=a.bodyB.m_xf.position.x+(d.col1.x*c.x+d.col2.x*c.y);f=a.bodyB.m_xf.position.y+(d.col1.y*c.x+d.col2.y*c.y);d=a.bodyA.m_xf.R;g=0;for(k=a.pointCount;g<k;)p=g++,c=a.points[p].localPoint,b=a.bodyA.m_xf.position.x+(d.col1.x*c.x+d.col2.x*c.y),c=a.bodyA.m_xf.position.y+(d.col1.y*c.x+d.col2.y*c.y),this.m_separations[p]=(b-e)*this.m_normal.x+(c-f)*this.m_normal.y-a.radius,this.m_points[p].set(b,c);this.m_normal.x*=
-1;this.m_normal.y*=-1}},__class__:fh};var bd=function(){this.m_step=new eh;this.m_constraints=[]};n["box2D.dynamics.contacts.B2ContactSolver"]=bd;bd.__name__=["box2D","dynamics","contacts","B2ContactSolver"];bd.prototype={initialize:function(a,b,c,d){var e;this.m_step.set(a);this.m_allocator=d;for(this.m_constraintCount=c;this.m_constraints.length<this.m_constraintCount;)this.m_constraints[this.m_constraints.length]=new Wk;for(a=0;a<c;){d=a++;e=b[d];var f=e.m_fixtureA,g=e.m_fixtureB,k=f.m_shape.m_radius,
p=g.m_shape.m_radius,w=f.m_body,h=g.m_body;e=e.getManifold();var l=M.b2MixFriction(f.getFriction(),g.getFriction()),m=M.b2MixRestitution(f.getRestitution(),g.getRestitution()),n=w.m_linearVelocity.x,D=w.m_linearVelocity.y,zb=h.m_linearVelocity.x,q=h.m_linearVelocity.y,u=w.m_angularVelocity,z=h.m_angularVelocity;M.b2Assert(0<e.m_pointCount);bd.s_worldManifold.initialize(e,w.m_xf,k,h.m_xf,p);f=bd.s_worldManifold.m_normal.x;g=bd.s_worldManifold.m_normal.y;d=this.m_constraints[d];d.bodyA=w;d.bodyB=h;
d.manifold=e;d.normal.x=f;d.normal.y=g;d.pointCount=e.m_pointCount;d.friction=l;d.restitution=m;d.localPlaneNormal.x=e.m_localPlaneNormal.x;d.localPlaneNormal.y=e.m_localPlaneNormal.y;d.localPoint.x=e.m_localPoint.x;d.localPoint.y=e.m_localPoint.y;d.radius=k+p;d.type=e.m_type;k=0;for(p=d.pointCount;k<p;){var r=k++,m=e.m_points[r],l=d.points[r];l.normalImpulse=m.m_normalImpulse;l.tangentImpulse=m.m_tangentImpulse;l.localPoint.setV(m.m_localPoint);var m=l.rA.x=bd.s_worldManifold.m_points[r].x-w.m_sweep.c.x,
t=l.rA.y=bd.s_worldManifold.m_points[r].y-w.m_sweep.c.y,v=l.rB.x=bd.s_worldManifold.m_points[r].x-h.m_sweep.c.x,r=l.rB.y=bd.s_worldManifold.m_points[r].y-h.m_sweep.c.y,y=m*g-t*f,x=v*g-r*f,y=y*y,x=x*x;l.normalMass=1/(w.m_invMass+h.m_invMass+w.m_invI*y+h.m_invI*x);var A=w.m_mass*w.m_invMass+h.m_mass*h.m_invMass,A=A+(w.m_mass*w.m_invI*y+h.m_mass*h.m_invI*x);l.equalizedMass=1/A;x=g;A=-f;y=m*A-t*x;x=v*A-r*x;y*=y;x*=x;l.tangentMass=1/(w.m_invMass+h.m_invMass+w.m_invI*y+h.m_invI*x);l.velocityBias=0;m=d.normal.x*
(zb+-z*r-n- -u*t)+d.normal.y*(q+z*v-D-u*m);m<-M.b2_velocityThreshold&&(l.velocityBias+=-d.restitution*m)}2==d.pointCount&&(q=d.points[0],zb=d.points[1],e=w.m_invMass,w=w.m_invI,n=h.m_invMass,h=h.m_invI,D=q.rA.x*g-q.rA.y*f,q=q.rB.x*g-q.rB.y*f,u=zb.rA.x*g-zb.rA.y*f,zb=zb.rB.x*g-zb.rB.y*f,f=e+n+w*D*D+h*q*q,g=e+n+w*u*u+h*zb*zb,h=e+n+w*D*u+h*q*zb,f*f<100*(f*g-h*h)?(d.K.col1.set(f,h),d.K.col2.set(h,g),d.K.getInverse(d.normalMass)):d.pointCount=1)}},initVelocityConstraints:function(a){for(var b=0,c=this.m_constraintCount;b<
c;){var d=b++,d=this.m_constraints[d],e=d.bodyA,f=d.bodyB,g=e.m_invMass,k=e.m_invI,p=f.m_invMass,w=f.m_invI,h=d.normal.x,l=d.normal.y,m=l,n=-h,D;if(a.warmStarting){D=d.pointCount;for(var zb=0;zb<D;){var q=zb++,q=d.points[q];q.normalImpulse*=a.dtRatio;q.tangentImpulse*=a.dtRatio;var u=q.normalImpulse*h+q.tangentImpulse*m,z=q.normalImpulse*l+q.tangentImpulse*n;e.m_angularVelocity-=k*(q.rA.x*z-q.rA.y*u);e.m_linearVelocity.x-=g*u;e.m_linearVelocity.y-=g*z;f.m_angularVelocity+=w*(q.rB.x*z-q.rB.y*u);f.m_linearVelocity.x+=
p*u;f.m_linearVelocity.y+=p*z}}else for(D=d.pointCount,e=0;e<D;)f=e++,f=d.points[f],f.normalImpulse=0,f.tangentImpulse=0}},solveVelocityConstraints:function(){for(var a,b,c,d,e,f,g,k,p,w,h=0,l=this.m_constraintCount;h<l;){var m=h++;d=this.m_constraints[m];var m=d.bodyA,n=d.bodyB,D=m.m_angularVelocity,q=n.m_angularVelocity,La=m.m_linearVelocity,u=n.m_linearVelocity,z=m.m_invMass,r=m.m_invI,t=n.m_invMass,v=n.m_invI;k=d.normal.x;var y=p=d.normal.y,A=-k;w=d.friction;g=0;for(f=d.pointCount;g<f;)a=g++,
a=d.points[a],b=u.x-q*a.rB.y-La.x+D*a.rA.y,c=u.y+q*a.rB.x-La.y-D*a.rA.x,b=b*y+c*A,b=a.tangentMass*-b,c=w*a.normalImpulse,c=x.clamp(a.tangentImpulse+b,-c,c),b=c-a.tangentImpulse,e=b*y,b*=A,La.x-=z*e,La.y-=z*b,D-=r*(a.rA.x*b-a.rA.y*e),u.x+=t*e,u.y+=t*b,q+=v*(a.rB.x*b-a.rB.y*e),a.tangentImpulse=c;if(1==d.pointCount)a=d.points[0],b=u.x+-q*a.rB.y-La.x- -D*a.rA.y,c=u.y+q*a.rB.x-La.y-D*a.rA.x,d=b*k+c*p,b=-a.normalMass*(d-a.velocityBias),c=a.normalImpulse+b,0<c||(c=0),b=c-a.normalImpulse,e=b*k,b*=p,La.x-=
z*e,La.y-=z*b,D-=r*(a.rA.x*b-a.rA.y*e),u.x+=t*e,u.y+=t*b,q+=v*(a.rB.x*b-a.rB.y*e),a.normalImpulse=c;else{a=d.points[0];y=d.points[1];f=a.normalImpulse;g=y.normalImpulse;e=(u.x-q*a.rB.y-La.x+D*a.rA.y)*k+(u.y+q*a.rB.x-La.y-D*a.rA.x)*p;var B=(u.x-q*y.rB.y-La.x+D*y.rA.y)*k+(u.y+q*y.rB.x-La.y-D*y.rA.x)*p;b=e-a.velocityBias;c=B-y.velocityBias;w=d.K;b-=w.col1.x*f+w.col2.x*g;for(c-=w.col1.y*f+w.col2.y*g;;){w=d.normalMass;A=-(w.col1.x*b+w.col2.x*c);w=-(w.col1.y*b+w.col2.y*c);if(0<=A&&0<=w){f=A-f;g=w-g;d=f*
k;f*=p;k*=g;p*=g;La.x-=z*(d+k);La.y-=z*(f+p);D-=r*(a.rA.x*f-a.rA.y*d+y.rA.x*p-y.rA.y*k);u.x+=t*(d+k);u.y+=t*(f+p);q+=v*(a.rB.x*f-a.rB.y*d+y.rB.x*p-y.rB.y*k);a.normalImpulse=A;y.normalImpulse=w;break}A=-a.normalMass*b;w=0;B=d.K.col1.y*A+c;if(0<=A&&0<=B){f=A-f;g=w-g;d=f*k;f*=p;k*=g;p*=g;La.x-=z*(d+k);La.y-=z*(f+p);D-=r*(a.rA.x*f-a.rA.y*d+y.rA.x*p-y.rA.y*k);u.x+=t*(d+k);u.y+=t*(f+p);q+=v*(a.rB.x*f-a.rB.y*d+y.rB.x*p-y.rB.y*k);a.normalImpulse=A;y.normalImpulse=w;break}A=0;w=-y.normalMass*c;e=d.K.col2.x*
w+b;if(0<=w&&0<=e){f=A-f;g=w-g;d=f*k;f*=p;k*=g;p*=g;La.x-=z*(d+k);La.y-=z*(f+p);D-=r*(a.rA.x*f-a.rA.y*d+y.rA.x*p-y.rA.y*k);u.x+=t*(d+k);u.y+=t*(f+p);q+=v*(a.rB.x*f-a.rB.y*d+y.rB.x*p-y.rB.y*k);a.normalImpulse=A;y.normalImpulse=w;break}w=A=0;e=b;B=c;if(0<=e&&0<=B){f=A-f;g=w-g;d=f*k;f*=p;k*=g;p*=g;La.x-=z*(d+k);La.y-=z*(f+p);D-=r*(a.rA.x*f-a.rA.y*d+y.rA.x*p-y.rA.y*k);u.x+=t*(d+k);u.y+=t*(f+p);q+=v*(a.rB.x*f-a.rB.y*d+y.rB.x*p-y.rB.y*k);a.normalImpulse=A;y.normalImpulse=w;break}break}}m.m_angularVelocity=
D;n.m_angularVelocity=q}},finalizeVelocityConstraints:function(){for(var a=0,b=this.m_constraintCount;a<b;)for(var c=a++,c=this.m_constraints[c],d=c.manifold,e=0,f=c.pointCount;e<f;){var g=e++,k=d.m_points[g],g=c.points[g];k.m_normalImpulse=g.normalImpulse;k.m_tangentImpulse=g.tangentImpulse}},solvePositionConstraints:function(a){for(var b=0,c=0,d=this.m_constraintCount;c<d;){var e=c++,e=this.m_constraints[e],f=e.bodyA,g=e.bodyB,k=f.m_mass*f.m_invMass,p=f.m_mass*f.m_invI,w=g.m_mass*g.m_invMass,h=
g.m_mass*g.m_invI;bd.s_psm.initialize(e);for(var l=bd.s_psm.m_normal,m=0,n=e.pointCount;m<n;){var D=m++,q=e.points[D],u=bd.s_psm.m_points[D],r=bd.s_psm.m_separations[D],D=u.x-f.m_sweep.c.x,z=u.y-f.m_sweep.c.y,t=u.x-g.m_sweep.c.x,u=u.y-g.m_sweep.c.y;b<r||(b=r);r=x.clamp(a*(r+M.b2_linearSlop),-M.b2_maxLinearCorrection,0);r*=-q.equalizedMass;q=r*l.x;r*=l.y;f.m_sweep.c.x-=k*q;f.m_sweep.c.y-=k*r;f.m_sweep.a-=p*(D*r-z*q);f.synchronizeTransform();g.m_sweep.c.x+=w*q;g.m_sweep.c.y+=w*r;g.m_sweep.a+=h*(t*r-
u*q);g.synchronizeTransform()}}return b>-1.5*M.b2_linearSlop},__class__:bd};var oa=function(){sa.call(this)};n["box2D.dynamics.contacts.B2EdgeAndCircleContact"]=oa;oa.__name__=["box2D","dynamics","contacts","B2EdgeAndCircleContact"];oa.create=function(a){return new oa};oa.destroy=function(a,b){};oa.__super__=sa;oa.prototype=L(sa.prototype,{reset:function(a,b){sa.prototype.reset.call(this,a,b)},evaluate:function(){var a=this.m_fixtureA.getBody(),b=this.m_fixtureB.getBody();this.b2CollideEdgeAndCircle(this.m_manifold,
q.__cast(this.m_fixtureA.getShape(),te),a.m_xf,q.__cast(this.m_fixtureB.getShape(),hb),b.m_xf)},b2CollideEdgeAndCircle:function(a,b,c,d,e){a.m_pointCount=0;this.multiplyTransformVector(e,d.m_p,oa.temp1);oa.q.setV(x.mulXT(c,oa.temp1));this.m_v0=b.m_v0;this.m_v1=b.m_v1;this.m_v2=b.m_v2;this.m_v3=b.m_v3;oa.e.set(this.m_v2.x-this.m_v1.x,this.m_v2.y-this.m_v1.y);oa.temp1.set(this.m_v2.x-oa.q.x,this.m_v2.y-oa.q.y);c=x.dot(oa.e,oa.temp1);oa.temp1.set(oa.q.x-this.m_v1.x,oa.q.y-this.m_v1.y);e=x.dot(oa.e,oa.temp1);
var f=b.m_radius+d.m_radius;if(0>=e){if(oa.p.setV(this.m_v1),oa.temp1.set(oa.q.x-oa.p.x,oa.q.y-oa.p.y),!(x.dot(oa.temp1,oa.temp1)>f*f)){if(b.m_hasVertex0&&(oa.temp1.set(this.m_v1.x-this.m_v0.x,this.m_v1.y-this.m_v0.y),oa.temp2.set(this.m_v1.x-oa.q.x,this.m_v1.y-oa.q.y),0<x.dot(oa.temp1,oa.temp2)))return;a.m_pointCount=1;a.m_type=Fc.e_circles;a.m_localPlaneNormal.setZero();a.m_localPoint.setV(oa.p);a.m_points[0].m_id.set_key(0);a.m_points[0].m_id.indexA=0;a.m_points[0].m_id.indexB=0;a.m_points[0].m_id.typeA=
kc.VERTEX;a.m_points[0].m_id.typeB=kc.VERTEX;a.m_points[0].m_localPoint.setV(d.m_p)}}else if(0>=c){if(oa.p.setV(this.m_v2),oa.temp1.set(oa.q.x-oa.p.x,oa.q.y-oa.p.y),!(x.dot(oa.temp1,oa.temp1)>f*f)){if(b.m_hasVertex3&&(oa.temp1.set(this.m_v3.x-this.m_v2.x,this.m_v3.y-this.m_v2.y),oa.temp2.set(oa.q.x-this.m_v2.x,oa.q.y-this.m_v2.y),0<x.dot(oa.temp1,oa.temp2)))return;a.m_pointCount=1;a.m_type=Fc.e_circles;a.m_localPlaneNormal.setZero();a.m_localPoint.setV(oa.p);a.m_points[0].m_id.set_key(0);a.m_points[0].m_id.indexA=
1;a.m_points[0].m_id.indexB=0;a.m_points[0].m_id.typeA=kc.VERTEX;a.m_points[0].m_id.typeB=kc.VERTEX;a.m_points[0].m_localPoint.setV(d.m_p)}}else b=x.dot(oa.e,oa.e),M.b2Assert(0<b),oa.p.x=1/b*(this.m_v1.x*c+this.m_v2.x*e),oa.p.y=1/b*(this.m_v1.y*c+this.m_v2.y*e),oa.temp1.x=oa.q.x-oa.p.x,oa.temp1.y=oa.q.y-oa.p.y,x.dot(oa.temp1,oa.temp1)>f*f||(oa.temp1.set(-oa.e.y,oa.e.x),oa.temp2.set(oa.q.x-this.m_v1.x,oa.q.y-this.m_v1.y),0>x.dot(oa.temp1,oa.temp2)&&oa.temp1.negativeSelf(),oa.temp1.normalize(),a.m_pointCount=
1,a.m_type=Fc.e_faceA,a.m_localPlaneNormal.setV(oa.temp1),a.m_localPoint.setV(this.m_v1),a.m_points[0].m_id.set_key(0),a.m_points[0].m_id.indexA=0,a.m_points[0].m_id.indexB=0,a.m_points[0].m_id.typeA=kc.FACE,a.m_points[0].m_id.typeB=kc.VERTEX,a.m_points[0].m_localPoint.setV(d.m_p))},multiplyTransformsInverse:function(a,b,c){this.multiplyRotationsInverse(a.R,b.R,oa.mat);oa.temp2.setV(b.position);oa.temp2.subtract(a.position);this.multiplyRotationVectorInverse(a.R,oa.temp2,c.position);c.R.col1.setV(oa.mat.col1);
c.R.col2.setV(oa.mat.col2)},multiplyRotationsInverse:function(a,b,c){c.col1.x=a.col1.x*b.col1.x+a.col1.y*b.col1.y;c.col1.y=a.col2.x*b.col1.x+a.col2.y*b.col1.y;c.col2.x=a.col1.x*b.col2.x+a.col1.y*b.col2.y;c.col2.y=a.col2.x*b.col2.x+a.col2.y*b.col2.y},multiplyRotationVector:function(a,b,c){c.x=a.col1.x*b.x+a.col2.x*b.y;c.y=a.col1.y*b.x+a.col2.y*b.y},multiplyRotationVectorInverse:function(a,b,c){c.x=a.col1.x*b.x+a.col1.y*b.y;c.y=a.col2.x*b.x+a.col2.y*b.y},multiplyTransformVector:function(a,b,c){c.x=
a.R.col1.x*b.x+a.R.col2.x*b.y+a.position.x;c.y=a.R.col1.y*b.x+a.R.col2.y*b.y+a.position.y},__class__:oa});var gf=function(){sa.call(this)};n["box2D.dynamics.contacts.B2PolyAndCircleContact"]=gf;gf.__name__=["box2D","dynamics","contacts","B2PolyAndCircleContact"];gf.create=function(a){return new gf};gf.destroy=function(a,b){};gf.__super__=sa;gf.prototype=L(sa.prototype,{reset:function(a,b){sa.prototype.reset.call(this,a,b);M.b2Assert(a.getType()==Ta.e_polygonShape);M.b2Assert(b.getType()==Ta.e_circleShape)},
evaluate:function(){var a=this.m_fixtureA.m_body,b=this.m_fixtureB.m_body;Ja.collidePolygonAndCircle(this.m_manifold,q.__cast(this.m_fixtureA.getShape(),za),a.m_xf,q.__cast(this.m_fixtureB.getShape(),hb),b.m_xf)},__class__:gf});var jf=function(){this.v=new y;this.id=new kc};n["box2D.dynamics.contacts.ClipVertex"]=jf;jf.__name__=["box2D","dynamics","contacts","ClipVertex"];jf.prototype={set:function(a){this.v.setV(a.v);this.id.set(a.id)},__class__:jf};var ui=function(){};n["box2D.dynamics.contacts.EPAxis"]=
ui;ui.__name__=["box2D","dynamics","contacts","EPAxis"];ui.prototype={__class__:ui};var Yk=function(){this.vertices=[];this.normals=[];for(var a=0;32>a;)a++,this.vertices.push(new y),this.normals.push(new y)};n["box2D.dynamics.contacts.TempPolygon"]=Yk;Yk.__name__=["box2D","dynamics","contacts","TempPolygon"];Yk.prototype={__class__:Yk};var Zk=function(){this.v1=new y;this.v2=new y;this.normal=new y;this.sideNormal1=new y;this.sideNormal2=new y};n["box2D.dynamics.contacts.ReferenceFace"]=Zk;Zk.__name__=
["box2D","dynamics","contacts","ReferenceFace"];Zk.prototype={__class__:Zk};var r=function(){sa.call(this)};n["box2D.dynamics.contacts.B2PolyAndEdgeContact"]=r;r.__name__=["box2D","dynamics","contacts","B2PolyAndEdgeContact"];r.create=function(a){return new r};r.destroy=function(a,b){};r.clipSegmentToLine=function(a,b,c,d,e){var f=0,g=x.dot(c,b[0].v)-d;c=x.dot(c,b[1].v)-d;0>=g&&a[f++].set(b[0]);0>=c&&a[f++].set(b[1]);0>g*c&&(g/=g-c,a[f].v.setV(b[1].v),a[f].v.subtract(b[0].v),a[f].v.multiply(g),a[f].v.add(b[0].v),
a[f].id.indexA=e,a[f].id.indexB=b[0].id.indexB,a[f].id.typeA=kc.VERTEX,a[f].id.typeB=kc.FACE,f++);return f};r.__super__=sa;r.prototype=L(sa.prototype,{reset:function(a,b){u.is(a.getShape(),za)?(sa.prototype.reset.call(this,b,a),M.b2Assert(a.getType()==Ta.e_polygonShape),M.b2Assert(b.getType()==Ta.e_edgeShape)):(sa.prototype.reset.call(this,a,b),M.b2Assert(a.getType()==Ta.e_edgeShape),M.b2Assert(b.getType()==Ta.e_polygonShape))},evaluate:function(){var a=this.m_fixtureA.getBody(),b=this.m_fixtureB.getBody();
this.b2CollidePolyAndEdge(this.m_manifold,q.__cast(this.m_fixtureA.getShape(),te),a.m_xf,q.__cast(this.m_fixtureB.getShape(),za),b.m_xf)},b2CollidePolyAndEdge:function(a,b,c,d,e){this.multiplyTransformsInverse(c,e,r.m_xf);this.multiplyTransformVector(r.m_xf,d.m_centroid,r.temp);r.m_centroidB.setV(r.temp);this.m_v0=b.m_v0;this.m_v1=b.m_v1;this.m_v2=b.m_v2;this.m_v3=b.m_v3;c=b.m_hasVertex0;b=b.m_hasVertex3;r.edge1.setV(this.m_v2);r.edge1.subtract(this.m_v1);r.edge1.normalize();r.m_normal1.set(r.edge1.y,
-r.edge1.x);r.temp.setV(r.m_centroidB);r.temp.subtract(this.m_v1);e=x.dot(r.m_normal1,r.temp);var f=0,g=0,k=!1,p=!1;c&&(r.edge0.setV(this.m_v1),r.edge0.subtract(this.m_v0),r.edge0.normalize(),r.m_normal0.set(r.edge0.y,-r.edge0.x),k=0<=x.crossVV(r.edge0,r.edge1),r.temp.setV(r.m_centroidB),r.temp.subtract(this.m_v0),f=x.dot(r.m_normal0,r.temp));b&&(r.edge2.setV(this.m_v3),r.edge2.subtract(this.m_v2),r.edge2.normalize(),r.m_normal2.set(r.edge2.y,-r.edge2.x),p=0<x.crossVV(r.edge1,r.edge2),r.temp.setV(r.m_centroidB),
r.temp.subtract(this.m_v2),g=x.dot(r.m_normal2,r.temp));c&&b?k&&p?(this.m_front=0<=f||0<=e||0<=g)?(r.m_normal.setV(r.m_normal1),r.m_lowerLimit.setV(r.m_normal0),r.m_upperLimit.setV(r.m_normal2)):(r.m_normal.setV(r.m_normal1),r.m_normal.negativeSelf(),r.m_lowerLimit.setV(r.m_normal1),r.m_lowerLimit.negativeSelf(),r.m_upperLimit.setV(r.m_normal1),r.m_upperLimit.negativeSelf()):k?(this.m_front=0<=f||0<=e&&0<=g)?(r.m_normal.setV(r.m_normal1),r.m_lowerLimit.setV(r.m_normal0),r.m_upperLimit.setV(r.m_normal1)):
(r.m_normal.setV(r.m_normal1),r.m_normal.negativeSelf(),r.m_lowerLimit.setV(r.m_normal2),r.m_lowerLimit.negativeSelf(),r.m_upperLimit.setV(r.m_normal1),r.m_upperLimit.negativeSelf()):p?(this.m_front=0<=g||0<=f&&0<=e)?(r.m_normal.setV(r.m_normal1),r.m_lowerLimit.setV(r.m_normal1),r.m_upperLimit.setV(r.m_normal2)):(r.m_normal.setV(r.m_normal1),r.m_normal.negativeSelf(),r.m_lowerLimit.setV(r.m_normal1),r.m_lowerLimit.negativeSelf(),r.m_upperLimit.setV(r.m_normal0),r.m_upperLimit.negativeSelf()):(this.m_front=
0<=f&&0<=e&&0<=g)?(r.m_normal.setV(r.m_normal1),r.m_lowerLimit.setV(r.m_normal1),r.m_upperLimit.setV(r.m_normal1)):(r.m_normal.setV(r.m_normal1),r.m_normal.negativeSelf(),r.m_lowerLimit.setV(r.m_normal2),r.m_lowerLimit.negativeSelf(),r.m_upperLimit.setV(r.m_normal0),r.m_upperLimit.negativeSelf()):c?(k?((this.m_front=0<=f||0<=e)?(r.m_normal.setV(r.m_normal1),r.m_lowerLimit.setV(r.m_normal0)):(r.m_normal.setV(r.m_normal1),r.m_normal.negativeSelf(),r.m_lowerLimit.setV(r.m_normal1)),r.m_upperLimit.setV(r.m_normal1)):
(this.m_front=0<=f&&0<=e)?(r.m_normal.setV(r.m_normal1),r.m_lowerLimit.setV(r.m_normal1),r.m_upperLimit.setV(r.m_normal1)):(r.m_normal.setV(r.m_normal1),r.m_normal.negativeSelf(),r.m_lowerLimit.setV(r.m_normal1),r.m_upperLimit.setV(r.m_normal0)),r.m_upperLimit.negativeSelf()):b?p?(this.m_front=0<=e||0<=g)?(r.m_normal.setV(r.m_normal1),r.m_lowerLimit.setV(r.m_normal1),r.m_lowerLimit.negativeSelf(),r.m_upperLimit.setV(r.m_normal2)):(r.m_normal.setV(r.m_normal1),r.m_normal.negativeSelf(),r.m_lowerLimit.setV(r.m_normal1),
r.m_lowerLimit.negativeSelf(),r.m_upperLimit.setV(r.m_normal1)):((this.m_front=0<=e&&0<=g)?(r.m_normal.setV(r.m_normal1),r.m_lowerLimit.setV(r.m_normal1)):(r.m_normal.setV(r.m_normal1),r.m_normal.negativeSelf(),r.m_lowerLimit.setV(r.m_normal2)),r.m_lowerLimit.negativeSelf(),r.m_upperLimit.setV(r.m_normal1)):(this.m_front=0<=e)?(r.m_normal.setV(r.m_normal1),r.m_lowerLimit.setV(r.m_normal1),r.m_lowerLimit.negativeSelf(),r.m_upperLimit.setV(r.m_normal1),r.m_upperLimit.negativeSelf()):(r.m_normal.setV(r.m_normal1),
r.m_normal.negativeSelf(),r.m_lowerLimit.setV(r.m_normal1),r.m_upperLimit.setV(r.m_normal1));r.m_polygonB.count=d.m_vertexCount;c=0;for(b=d.m_vertexCount;c<b;)e=c++,this.multiplyTransformVector(r.m_xf,d.m_vertices[e],r.temp),r.m_polygonB.vertices[e].setV(r.temp),this.multiplyRotationVector(r.m_xf.R,d.m_normals[e],r.temp),r.m_polygonB.normals[e].setV(r.temp);this.m_radius=2*M.b2_polygonRadius;a.m_pointCount=0;this.computeEdgeSeparation(r.edgeAxis);if(!(r.edgeAxis.type==Gc.UNKNOWN||r.edgeAxis.separation>
this.m_radius||(this.computePolygonSeparation(r.polygonAxis),r.polygonAxis.type!=Gc.UNKNOWN&&r.polygonAxis.separation>this.m_radius))){c=r.polygonAxis.type==Gc.UNKNOWN?r.edgeAxis:r.polygonAxis.separation>.98*r.edgeAxis.separation+.001?r.polygonAxis:r.edgeAxis;if(c.type==Gc.EDGE_A){a.m_type=Fc.e_faceA;b=0;e=x.dot(r.m_normal,r.m_polygonB.normals[0]);f=1;for(g=r.m_polygonB.count;f<g;)k=f++,p=x.dot(r.m_normal,r.m_polygonB.normals[k]),p<e&&(e=p,b=k);e=b+1<r.m_polygonB.count?b+1:0;r.ie[0].v.setV(r.m_polygonB.vertices[b]);
r.ie[0].id.indexA=0;r.ie[0].id.indexB=b;r.ie[0].id.typeA=kc.FACE;r.ie[0].id.typeB=kc.VERTEX;r.ie[1].v.setV(r.m_polygonB.vertices[e]);r.ie[1].id.indexA=0;r.ie[1].id.indexB=e;r.ie[1].id.typeA=kc.FACE;r.ie[1].id.typeB=kc.VERTEX;this.m_front?(r.rf.i1=0,r.rf.i2=1,r.rf.v1.setV(this.m_v1),r.rf.v2.setV(this.m_v2),r.rf.normal.setV(r.m_normal1)):(r.rf.i1=1,r.rf.i2=0,r.rf.v1.setV(this.m_v2),r.rf.v2.setV(this.m_v1),r.rf.normal.setV(r.m_normal1),r.rf.normal.negativeSelf())}else a.m_type=Fc.e_faceB,r.ie[0].v.setV(this.m_v1),
r.ie[0].id.indexA=0,r.ie[0].id.indexB=c.index,r.ie[0].id.typeA=kc.VERTEX,r.ie[0].id.typeB=kc.FACE,r.ie[1].v.setV(this.m_v2),r.ie[1].id.indexA=0,r.ie[1].id.indexB=c.index,r.ie[1].id.typeA=kc.VERTEX,r.ie[1].id.typeB=kc.FACE,r.rf.i1=c.index,r.rf.i2=r.rf.i1+1<r.m_polygonB.count?r.rf.i1+1:0,r.rf.v1.setV(r.m_polygonB.vertices[r.rf.i1]),r.rf.v2.setV(r.m_polygonB.vertices[r.rf.i2]),r.rf.normal.setV(r.m_polygonB.normals[r.rf.i1]);r.rf.sideNormal1.set(r.rf.normal.y,-r.rf.normal.x);r.rf.sideNormal2.setV(r.rf.sideNormal1);
r.rf.sideNormal2.negativeSelf();r.rf.sideOffset1=x.dot(r.rf.sideNormal1,r.rf.v1);r.rf.sideOffset2=x.dot(r.rf.sideNormal2,r.rf.v2);b=r.clipSegmentToLine(r.clipPoints1,r.ie,r.rf.sideNormal1,r.rf.sideOffset1,r.rf.i1);if(!(b<M.b2_maxManifoldPoints||(b=r.clipSegmentToLine(r.clipPoints2,r.clipPoints1,r.rf.sideNormal2,r.rf.sideOffset2,r.rf.i2),b<M.b2_maxManifoldPoints))){c.type==Gc.EDGE_A?(a.m_localPlaneNormal.setV(r.rf.normal),a.m_localPoint.setV(r.rf.v1)):(a.m_localPlaneNormal.setV(d.m_normals[r.rf.i1]),
a.m_localPoint.setV(d.m_vertices[r.rf.i1]));b=d=0;for(e=M.b2_maxManifoldPoints;b<e;)f=b++,r.temp.setV(r.clipPoints2[f].v),r.temp.subtract(r.rf.v1),x.dot(r.rf.normal,r.temp)<=this.m_radius&&(g=a.m_points[d],c.type==Gc.EDGE_A?(g.m_localPoint.setV(x.mulXT(r.m_xf,r.clipPoints2[f].v)),g.m_id.set(r.clipPoints2[f].id)):(g.m_localPoint.setV(r.clipPoints2[f].v),g.m_id.typeA=r.clipPoints2[f].id.typeB,g.m_id.typeB=r.clipPoints2[f].id.typeA,g.m_id.indexA=r.clipPoints2[f].id.indexB,g.m_id.indexB=r.clipPoints2[f].id.indexA),
d++);a.m_pointCount=d}}},computeEdgeSeparation:function(a){a.type=Gc.EDGE_A;a.index=this.m_front?0:1;a.separation=Number.MAX_VALUE;for(var b=0,c=r.m_polygonB.count;b<c;){var d=b++;r.temp.setV(r.m_polygonB.vertices[d]);r.temp.subtract(this.m_v1);d=x.dot(r.m_normal,r.temp);d<a.separation&&(a.separation=d)}},computePolygonSeparation:function(a){a.type=Gc.UNKNOWN;a.index=-1;a.separation=-Number.MAX_VALUE;r.perp.set(-r.m_normal.y,r.m_normal.x);for(var b=0,c=r.m_polygonB.count;b<c;){var d=b++;r.n.setV(r.m_polygonB.normals[d]);
r.n.negativeSelf();r.temp.setV(r.m_polygonB.vertices[d]);r.temp.subtract(this.m_v1);var e=x.dot(r.n,r.temp);r.temp.setV(r.m_polygonB.vertices[d]);r.temp.subtract(this.m_v2);var f=x.dot(r.n,r.temp),e=Math.min(e,f);if(e>this.m_radius){a.type=Gc.EDGE_B;a.index=d;a.separation=e;break}0<=x.dot(r.n,r.perp)?(r.temp.setV(r.n),r.temp.subtract(r.m_upperLimit)):(r.temp.setV(r.n),r.temp.subtract(r.m_lowerLimit));!(x.dot(r.temp,r.m_normal)<-M.b2_angularSlop)&&e>a.separation&&(a.type=Gc.EDGE_B,a.index=d,a.separation=
e)}},multiplyTransformsInverse:function(a,b,c){this.multiplyRotationsInverse(a.R,b.R,r.mat);r.temp2.setV(b.position);r.temp2.subtract(a.position);this.multiplyRotationVectorInverse(a.R,r.temp2,c.position);c.R.col1.setV(r.mat.col1);c.R.col2.setV(r.mat.col2)},multiplyRotationsInverse:function(a,b,c){c.col1.x=a.col1.x*b.col1.x+a.col1.y*b.col1.y;c.col1.y=a.col2.x*b.col1.x+a.col2.y*b.col1.y;c.col2.x=a.col1.x*b.col2.x+a.col1.y*b.col2.y;c.col2.y=a.col2.x*b.col2.x+a.col2.y*b.col2.y},multiplyRotationVector:function(a,
b,c){c.x=a.col1.x*b.x+a.col2.x*b.y;c.y=a.col1.y*b.x+a.col2.y*b.y},multiplyRotationVectorInverse:function(a,b,c){c.x=a.col1.x*b.x+a.col1.y*b.y;c.y=a.col2.x*b.x+a.col2.y*b.y},multiplyTransformVector:function(a,b,c){c.x=a.R.col1.x*b.x+a.R.col2.x*b.y+a.position.x;c.y=a.R.col1.y*b.x+a.R.col2.y*b.y+a.position.y},__class__:r});var Gc=n["box2D.dynamics.contacts.Type"]={__ename__:["box2D","dynamics","contacts","Type"],__constructs__:["UNKNOWN","EDGE_A","EDGE_B"]};Gc.UNKNOWN=["UNKNOWN",0];Gc.UNKNOWN.toString=
J;Gc.UNKNOWN.__enum__=Gc;Gc.EDGE_A=["EDGE_A",1];Gc.EDGE_A.toString=J;Gc.EDGE_A.__enum__=Gc;Gc.EDGE_B=["EDGE_B",2];Gc.EDGE_B.toString=J;Gc.EDGE_B.__enum__=Gc;var hf=function(){sa.call(this)};n["box2D.dynamics.contacts.B2PolygonContact"]=hf;hf.__name__=["box2D","dynamics","contacts","B2PolygonContact"];hf.create=function(a){return new hf};hf.destroy=function(a,b){};hf.__super__=sa;hf.prototype=L(sa.prototype,{reset:function(a,b){sa.prototype.reset.call(this,a,b)},evaluate:function(){var a=this.m_fixtureA.getBody(),
b=this.m_fixtureB.getBody();Ja.collidePolygons(this.m_manifold,q.__cast(this.m_fixtureA.getShape(),za),a.m_xf,q.__cast(this.m_fixtureB.getShape(),za),b.m_xf)},__class__:hf});var Zm=function(){};n["box2D.dynamics.controllers.B2Controller"]=Zm;Zm.__name__=["box2D","dynamics","controllers","B2Controller"];Zm.prototype={step:function(a){},draw:function(a){},addBody:function(a){var b=new $k;b.controller=this;b.body=a;b.nextBody=this.m_bodyList;b.prevBody=null;this.m_bodyList=b;null!=b.nextBody&&(b.nextBody.prevBody=
b);this.m_bodyCount++;b.nextController=a.m_controllerList;b.prevController=null;a.m_controllerList=b;null!=b.nextController&&(b.nextController.prevController=b);a.m_controllerCount++},removeBody:function(a){for(var b=a.m_controllerList;null!=b&&b.controller!=this;)b=b.nextController;null!=b.prevBody&&(b.prevBody.nextBody=b.nextBody);null!=b.nextBody&&(b.nextBody.prevBody=b.prevBody);null!=b.nextController&&(b.nextController.prevController=b.prevController);null!=b.prevController&&(b.prevController.nextController=
b.nextController);this.m_bodyList==b&&(this.m_bodyList=b.nextBody);a.m_controllerList==b&&(a.m_controllerList=b.nextController);a.m_controllerCount--;this.m_bodyCount--},clear:function(){for(;null!=this.m_bodyList;)this.removeBody(this.m_bodyList.body)},getNext:function(){return this.m_next},getWorld:function(){return this.m_world},getBodyList:function(){return this.m_bodyList},__class__:Zm};var $k=function(){};n["box2D.dynamics.controllers.B2ControllerEdge"]=$k;$k.__name__=["box2D","dynamics","controllers",
"B2ControllerEdge"];$k.prototype={__class__:$k};var T=function(a){this.m_edgeA=new vi;this.m_edgeB=new vi;this.m_localCenterA=new y;this.m_localCenterB=new y;M.b2Assert(a.bodyA!=a.bodyB);this.m_type=a.type;this.m_next=this.m_prev=null;this.m_bodyA=a.bodyA;this.m_bodyB=a.bodyB;this.m_collideConnected=a.collideConnected;this.m_islandFlag=!1;this.m_userData=a.userData};n["box2D.dynamics.joints.B2Joint"]=T;T.__name__=["box2D","dynamics","joints","B2Joint"];T.create=function(a,b){var c=null;a.type==T.e_distanceJoint?
c=new ig(q.__cast(a,Df)):a.type==T.e_mouseJoint?c=new wi(q.__cast(a,xi)):a.type==T.e_prismaticJoint?c=new jg(q.__cast(a,yi)):a.type==T.e_revoluteJoint?c=new le(q.__cast(a,Ef)):a.type==T.e_pulleyJoint?c=new ue(q.__cast(a,zi)):a.type==T.e_gearJoint?c=new Ai(q.__cast(a,Bi)):a.type==T.e_lineJoint?c=new gh(q.__cast(a,Ff)):a.type==T.e_weldJoint?c=new Ci(q.__cast(a,Di)):a.type==T.e_frictionJoint&&(c=new Ei(q.__cast(a,Fi)));return c};T.destroy=function(a,b){};T.prototype={getType:function(){return this.m_type},
getAnchorA:function(){return null},getAnchorB:function(){return null},getReactionForce:function(a){return null},getReactionTorque:function(a){return 0},getBodyA:function(){return this.m_bodyA},getBodyB:function(){return this.m_bodyB},getNext:function(){return this.m_next},getUserData:function(){return this.m_userData},setUserData:function(a){this.m_userData=a},isActive:function(){return this.m_bodyA.isActive()&&this.m_bodyB.isActive()},initVelocityConstraints:function(a){},solveVelocityConstraints:function(a){},
finalizeVelocityConstraints:function(){},solvePositionConstraints:function(a){return!1},__class__:T};var ig=function(a){T.call(this,a);this.m_localAnchor1=new y;this.m_localAnchor2=new y;this.m_u=new y;this.m_localAnchor1.setV(a.localAnchorA);this.m_localAnchor2.setV(a.localAnchorB);this.m_length=a.length;this.m_frequencyHz=a.frequencyHz;this.m_dampingRatio=a.dampingRatio;this.m_bias=this.m_gamma=this.m_impulse=0};n["box2D.dynamics.joints.B2DistanceJoint"]=ig;ig.__name__=["box2D","dynamics","joints",
"B2DistanceJoint"];ig.__super__=T;ig.prototype=L(T.prototype,{getAnchorA:function(){return this.m_bodyA.getWorldPoint(this.m_localAnchor1)},getAnchorB:function(){return this.m_bodyB.getWorldPoint(this.m_localAnchor2)},getReactionForce:function(a){return new y(a*this.m_impulse*this.m_u.x,a*this.m_impulse*this.m_u.y)},getReactionTorque:function(a){return 0},getLength:function(){return this.m_length},setLength:function(a){this.m_length=a},getFrequency:function(){return this.m_frequencyHz},setFrequency:function(a){this.m_frequencyHz=
a},getDampingRatio:function(){return this.m_dampingRatio},setDampingRatio:function(a){this.m_dampingRatio=a},initVelocityConstraints:function(a){var b,c,d=this.m_bodyA,e=this.m_bodyB;b=d.m_xf.R;var f=this.m_localAnchor1.x-d.m_sweep.localCenter.x,g=this.m_localAnchor1.y-d.m_sweep.localCenter.y;c=b.col1.x*f+b.col2.x*g;g=b.col1.y*f+b.col2.y*g;f=c;b=e.m_xf.R;var k=this.m_localAnchor2.x-e.m_sweep.localCenter.x,p=this.m_localAnchor2.y-e.m_sweep.localCenter.y;c=b.col1.x*k+b.col2.x*p;p=b.col1.y*k+b.col2.y*
p;k=c;this.m_u.x=e.m_sweep.c.x+k-d.m_sweep.c.x-f;this.m_u.y=e.m_sweep.c.y+p-d.m_sweep.c.y-g;c=Math.sqrt(this.m_u.x*this.m_u.x+this.m_u.y*this.m_u.y);c>M.b2_linearSlop?this.m_u.multiply(1/c):this.m_u.setZero();b=f*this.m_u.y-g*this.m_u.x;var w=k*this.m_u.y-p*this.m_u.x;b=d.m_invMass+d.m_invI*b*b+e.m_invMass+e.m_invI*w*w;this.m_mass=0!=b?1/b:0;if(0<this.m_frequencyHz){c-=this.m_length;var w=2*Math.PI*this.m_frequencyHz,h=this.m_mass*w*w;this.m_gamma=a.dt*(2*this.m_mass*this.m_dampingRatio*w+a.dt*h);
this.m_gamma=0!=this.m_gamma?1/this.m_gamma:0;this.m_bias=c*a.dt*h*this.m_gamma;this.m_mass=b+this.m_gamma;this.m_mass=0!=this.m_mass?1/this.m_mass:0}a.warmStarting?(this.m_impulse*=a.dtRatio,a=this.m_impulse*this.m_u.x,b=this.m_impulse*this.m_u.y,d.m_linearVelocity.x-=d.m_invMass*a,d.m_linearVelocity.y-=d.m_invMass*b,d.m_angularVelocity-=d.m_invI*(f*b-g*a),e.m_linearVelocity.x+=e.m_invMass*a,e.m_linearVelocity.y+=e.m_invMass*b,e.m_angularVelocity+=e.m_invI*(k*b-p*a)):this.m_impulse=0},solveVelocityConstraints:function(a){var b;
a=this.m_bodyA;var c=this.m_bodyB;b=a.m_xf.R;var d=this.m_localAnchor1.x-a.m_sweep.localCenter.x,e=this.m_localAnchor1.y-a.m_sweep.localCenter.y,f=b.col1.x*d+b.col2.x*e,e=b.col1.y*d+b.col2.y*e,d=f;b=c.m_xf.R;var g=this.m_localAnchor2.x-c.m_sweep.localCenter.x,k=this.m_localAnchor2.y-c.m_sweep.localCenter.y,f=b.col1.x*g+b.col2.x*k,k=b.col1.y*g+b.col2.y*k,g=f,f=-this.m_mass*(this.m_u.x*(c.m_linearVelocity.x+-c.m_angularVelocity*k-(a.m_linearVelocity.x+-a.m_angularVelocity*e))+this.m_u.y*(c.m_linearVelocity.y+
c.m_angularVelocity*g-(a.m_linearVelocity.y+a.m_angularVelocity*d))+this.m_bias+this.m_gamma*this.m_impulse);this.m_impulse+=f;b=f*this.m_u.x;f*=this.m_u.y;a.m_linearVelocity.x-=a.m_invMass*b;a.m_linearVelocity.y-=a.m_invMass*f;a.m_angularVelocity-=a.m_invI*(d*f-e*b);c.m_linearVelocity.x+=c.m_invMass*b;c.m_linearVelocity.y+=c.m_invMass*f;c.m_angularVelocity+=c.m_invI*(g*f-k*b)},solvePositionConstraints:function(a){var b;if(0<this.m_frequencyHz)return!0;a=this.m_bodyA;var c=this.m_bodyB;b=a.m_xf.R;
var d=this.m_localAnchor1.x-a.m_sweep.localCenter.x,e=this.m_localAnchor1.y-a.m_sweep.localCenter.y,f=b.col1.x*d+b.col2.x*e,e=b.col1.y*d+b.col2.y*e,d=f;b=c.m_xf.R;var g=this.m_localAnchor2.x-c.m_sweep.localCenter.x,k=this.m_localAnchor2.y-c.m_sweep.localCenter.y,f=b.col1.x*g+b.col2.x*k,k=b.col1.y*g+b.col2.y*k,g=f,f=c.m_sweep.c.x+g-a.m_sweep.c.x-d,p=c.m_sweep.c.y+k-a.m_sweep.c.y-e;b=Math.sqrt(f*f+p*p);f/=b;p/=b;b-=this.m_length;b=x.clamp(b,-M.b2_maxLinearCorrection,M.b2_maxLinearCorrection);var w=
-this.m_mass*b;this.m_u.set(f,p);f=w*this.m_u.x;p=w*this.m_u.y;a.m_sweep.c.x-=a.m_invMass*f;a.m_sweep.c.y-=a.m_invMass*p;a.m_sweep.a-=a.m_invI*(d*p-e*f);c.m_sweep.c.x+=c.m_invMass*f;c.m_sweep.c.y+=c.m_invMass*p;c.m_sweep.a+=c.m_invI*(g*p-k*f);a.synchronizeTransform();c.synchronizeTransform();return x.abs(b)<M.b2_linearSlop},__class__:ig});var Ib=function(){this.type=T.e_unknownJoint;this.bodyB=this.bodyA=this.userData=null;this.collideConnected=!1};n["box2D.dynamics.joints.B2JointDef"]=Ib;Ib.__name__=
["box2D","dynamics","joints","B2JointDef"];Ib.prototype={__class__:Ib};var Df=function(){Ib.call(this);this.localAnchorA=new y;this.localAnchorB=new y;this.type=T.e_distanceJoint;this.length=1;this.dampingRatio=this.frequencyHz=0};n["box2D.dynamics.joints.B2DistanceJointDef"]=Df;Df.__name__=["box2D","dynamics","joints","B2DistanceJointDef"];Df.__super__=Ib;Df.prototype=L(Ib.prototype,{initialize:function(a,b,c,d){this.bodyA=a;this.bodyB=b;this.localAnchorA.setV(this.bodyA.getLocalPoint(c));this.localAnchorB.setV(this.bodyB.getLocalPoint(d));
a=d.x-c.x;c=d.y-c.y;this.length=Math.sqrt(a*a+c*c);this.dampingRatio=this.frequencyHz=0},__class__:Df});var Ei=function(a){T.call(this,a);this.m_localAnchorA=new y;this.m_localAnchorB=new y;this.m_linearMass=new tb;this.m_linearImpulse=new y;this.m_localAnchorA.setV(a.localAnchorA);this.m_localAnchorB.setV(a.localAnchorB);this.m_linearMass.setZero();this.m_angularMass=0;this.m_linearImpulse.setZero();this.m_angularImpulse=0;this.m_maxForce=a.maxForce;this.m_maxTorque=a.maxTorque};n["box2D.dynamics.joints.B2FrictionJoint"]=
Ei;Ei.__name__=["box2D","dynamics","joints","B2FrictionJoint"];Ei.__super__=T;Ei.prototype=L(T.prototype,{getAnchorA:function(){return this.m_bodyA.getWorldPoint(this.m_localAnchorA)},getAnchorB:function(){return this.m_bodyB.getWorldPoint(this.m_localAnchorB)},getReactionForce:function(a){return new y(a*this.m_linearImpulse.x,a*this.m_linearImpulse.y)},getReactionTorque:function(a){return a*this.m_angularImpulse},setMaxForce:function(a){this.m_maxForce=a},getMaxForce:function(){return this.m_maxForce},
setMaxTorque:function(a){this.m_maxTorque=a},getMaxTorque:function(){return this.m_maxTorque},initVelocityConstraints:function(a){var b,c,d=this.m_bodyA,e=this.m_bodyB;b=d.m_xf.R;var f=this.m_localAnchorA.x-d.m_sweep.localCenter.x,g=this.m_localAnchorA.y-d.m_sweep.localCenter.y;c=b.col1.x*f+b.col2.x*g;g=b.col1.y*f+b.col2.y*g;f=c;b=e.m_xf.R;var k=this.m_localAnchorB.x-e.m_sweep.localCenter.x,p=this.m_localAnchorB.y-e.m_sweep.localCenter.y;c=b.col1.x*k+b.col2.x*p;p=b.col1.y*k+b.col2.y*p;k=c;b=d.m_invMass;
c=e.m_invMass;var w=d.m_invI,h=e.m_invI,l=new tb;l.col1.x=b+c;l.col2.x=0;l.col1.y=0;l.col2.y=b+c;l.col1.x+=w*g*g;l.col2.x+=-w*f*g;l.col1.y+=-w*f*g;l.col2.y+=w*f*f;l.col1.x+=h*p*p;l.col2.x+=-h*k*p;l.col1.y+=-h*k*p;l.col2.y+=h*k*k;l.getInverse(this.m_linearMass);this.m_angularMass=w+h;0<this.m_angularMass&&(this.m_angularMass=1/this.m_angularMass);a.warmStarting?(this.m_linearImpulse.x*=a.dtRatio,this.m_linearImpulse.y*=a.dtRatio,this.m_angularImpulse*=a.dtRatio,a=this.m_linearImpulse,d.m_linearVelocity.x-=
b*a.x,d.m_linearVelocity.y-=b*a.y,d.m_angularVelocity-=w*(f*a.y-g*a.x+this.m_angularImpulse),e.m_linearVelocity.x+=c*a.x,e.m_linearVelocity.y+=c*a.y,e.m_angularVelocity+=h*(k*a.y-p*a.x+this.m_angularImpulse)):(this.m_linearImpulse.setZero(),this.m_angularImpulse=0)},solveVelocityConstraints:function(a){var b,c,d=this.m_bodyA,e=this.m_bodyB,f=d.m_linearVelocity,g=d.m_angularVelocity,k=e.m_linearVelocity,p=e.m_angularVelocity,w=d.m_invMass,h=e.m_invMass,l=d.m_invI,m=e.m_invI;b=d.m_xf.R;var n=this.m_localAnchorA.x-
d.m_sweep.localCenter.x,D=this.m_localAnchorA.y-d.m_sweep.localCenter.y;c=b.col1.x*n+b.col2.x*D;D=b.col1.y*n+b.col2.y*D;n=c;b=e.m_xf.R;var q=this.m_localAnchorB.x-e.m_sweep.localCenter.x,u=this.m_localAnchorB.y-e.m_sweep.localCenter.y;c=b.col1.x*q+b.col2.x*u;u=b.col1.y*q+b.col2.y*u;q=c;c=-this.m_angularMass*(p-g);var r=this.m_angularImpulse;b=a.dt*this.m_maxTorque;this.m_angularImpulse=x.clamp(this.m_angularImpulse+c,-b,b);c=this.m_angularImpulse-r;g-=l*c;p+=m*c;b=x.mulMV(this.m_linearMass,new y(-(k.x-
p*u-f.x+g*D),-(k.y+p*q-f.y-g*n)));c=this.m_linearImpulse.copy();this.m_linearImpulse.add(b);b=a.dt*this.m_maxForce;this.m_linearImpulse.lengthSquared()>b*b&&(this.m_linearImpulse.normalize(),this.m_linearImpulse.multiply(b));b=x.subtractVV(this.m_linearImpulse,c);f.x-=w*b.x;f.y-=w*b.y;g-=l*(n*b.y-D*b.x);k.x+=h*b.x;k.y+=h*b.y;p+=m*(q*b.y-u*b.x);d.m_angularVelocity=g;e.m_angularVelocity=p},solvePositionConstraints:function(a){return!0},__class__:Ei});var Fi=function(){Ib.call(this);this.localAnchorA=
new y;this.localAnchorB=new y;this.type=T.e_frictionJoint;this.maxTorque=this.maxForce=0};n["box2D.dynamics.joints.B2FrictionJointDef"]=Fi;Fi.__name__=["box2D","dynamics","joints","B2FrictionJointDef"];Fi.__super__=Ib;Fi.prototype=L(Ib.prototype,{initialize:function(a,b,c){this.bodyA=a;this.bodyB=b;this.localAnchorA.setV(this.bodyA.getLocalPoint(c));this.localAnchorB.setV(this.bodyB.getLocalPoint(c))},__class__:Fi});var Ai=function(a){T.call(this,a);this.m_groundAnchor1=new y;this.m_groundAnchor2=
new y;this.m_localAnchor1=new y;this.m_localAnchor2=new y;this.m_J=new al;var b=a.joint1.m_type,c=a.joint2.m_type;this.m_prismatic2=this.m_revolute2=this.m_prismatic1=this.m_revolute1=null;this.m_ground1=a.joint1.getBodyA();this.m_bodyA=a.joint1.getBodyB();b==T.e_revoluteJoint?(this.m_revolute1=q.__cast(a.joint1,le),this.m_groundAnchor1.setV(this.m_revolute1.m_localAnchor1),this.m_localAnchor1.setV(this.m_revolute1.m_localAnchor2),b=this.m_revolute1.getJointAngle()):(this.m_prismatic1=q.__cast(a.joint1,
jg),this.m_groundAnchor1.setV(this.m_prismatic1.m_localAnchor1),this.m_localAnchor1.setV(this.m_prismatic1.m_localAnchor2),b=this.m_prismatic1.getJointTranslation());this.m_ground2=a.joint2.getBodyA();this.m_bodyB=a.joint2.getBodyB();c==T.e_revoluteJoint?(this.m_revolute2=q.__cast(a.joint2,le),this.m_groundAnchor2.setV(this.m_revolute2.m_localAnchor1),this.m_localAnchor2.setV(this.m_revolute2.m_localAnchor2),c=this.m_revolute2.getJointAngle()):(this.m_prismatic2=q.__cast(a.joint2,jg),this.m_groundAnchor2.setV(this.m_prismatic2.m_localAnchor1),
this.m_localAnchor2.setV(this.m_prismatic2.m_localAnchor2),c=this.m_prismatic2.getJointTranslation());this.m_ratio=a.ratio;this.m_constant=b+this.m_ratio*c;this.m_impulse=0};n["box2D.dynamics.joints.B2GearJoint"]=Ai;Ai.__name__=["box2D","dynamics","joints","B2GearJoint"];Ai.__super__=T;Ai.prototype=L(T.prototype,{getAnchorA:function(){return this.m_bodyA.getWorldPoint(this.m_localAnchor1)},getAnchorB:function(){return this.m_bodyB.getWorldPoint(this.m_localAnchor2)},getReactionForce:function(a){return new y(a*
this.m_impulse*this.m_J.linearB.x,a*this.m_impulse*this.m_J.linearB.y)},getReactionTorque:function(a){var b=this.m_bodyB.m_xf.R,c=this.m_localAnchor1.x-this.m_bodyB.m_sweep.localCenter.x,d=this.m_localAnchor1.y-this.m_bodyB.m_sweep.localCenter.y,e=b.col1.x*c+b.col2.x*d,d=b.col1.y*c+b.col2.y*d;return a*(this.m_impulse*this.m_J.angularB-e*this.m_impulse*this.m_J.linearB.y+d*this.m_impulse*this.m_J.linearB.x)},getRatio:function(){return this.m_ratio},setRatio:function(a){this.m_ratio=a},initVelocityConstraints:function(a){var b=
this.m_ground1,c=this.m_ground2,d=this.m_bodyA,e=this.m_bodyB,f,g,k,p,w,h=0;this.m_J.setZero();null!=this.m_revolute1?(this.m_J.angularA=-1,h+=d.m_invI):(p=b.m_xf.R,f=this.m_prismatic1.m_localXAxis1,b=p.col1.x*f.x+p.col2.x*f.y,f=p.col1.y*f.x+p.col2.y*f.y,p=d.m_xf.R,g=this.m_localAnchor1.x-d.m_sweep.localCenter.x,k=this.m_localAnchor1.y-d.m_sweep.localCenter.y,w=p.col1.x*g+p.col2.x*k,k=p.col1.y*g+p.col2.y*k,p=w*f-k*b,this.m_J.linearA.set(-b,-f),this.m_J.angularA=-p,h+=d.m_invMass+d.m_invI*p*p);null!=
this.m_revolute2?(this.m_J.angularB=-this.m_ratio,h+=this.m_ratio*this.m_ratio*e.m_invI):(p=c.m_xf.R,f=this.m_prismatic2.m_localXAxis1,b=p.col1.x*f.x+p.col2.x*f.y,f=p.col1.y*f.x+p.col2.y*f.y,p=e.m_xf.R,g=this.m_localAnchor2.x-e.m_sweep.localCenter.x,k=this.m_localAnchor2.y-e.m_sweep.localCenter.y,w=p.col1.x*g+p.col2.x*k,k=p.col1.y*g+p.col2.y*k,p=w*f-k*b,this.m_J.linearB.set(-this.m_ratio*b,-this.m_ratio*f),this.m_J.angularB=-this.m_ratio*p,h+=this.m_ratio*this.m_ratio*(e.m_invMass+e.m_invI*p*p));
this.m_mass=0<h?1/h:0;a.warmStarting?(d.m_linearVelocity.x+=d.m_invMass*this.m_impulse*this.m_J.linearA.x,d.m_linearVelocity.y+=d.m_invMass*this.m_impulse*this.m_J.linearA.y,d.m_angularVelocity+=d.m_invI*this.m_impulse*this.m_J.angularA,e.m_linearVelocity.x+=e.m_invMass*this.m_impulse*this.m_J.linearB.x,e.m_linearVelocity.y+=e.m_invMass*this.m_impulse*this.m_J.linearB.y,e.m_angularVelocity+=e.m_invI*this.m_impulse*this.m_J.angularB):this.m_impulse=0},solveVelocityConstraints:function(a){a=this.m_bodyA;
var b=this.m_bodyB,c=this.m_J.compute(a.m_linearVelocity,a.m_angularVelocity,b.m_linearVelocity,b.m_angularVelocity),c=-this.m_mass*c;this.m_impulse+=c;a.m_linearVelocity.x+=a.m_invMass*c*this.m_J.linearA.x;a.m_linearVelocity.y+=a.m_invMass*c*this.m_J.linearA.y;a.m_angularVelocity+=a.m_invI*c*this.m_J.angularA;b.m_linearVelocity.x+=b.m_invMass*c*this.m_J.linearB.x;b.m_linearVelocity.y+=b.m_invMass*c*this.m_J.linearB.y;b.m_angularVelocity+=b.m_invI*c*this.m_J.angularB},solvePositionConstraints:function(a){a=
this.m_bodyA;var b=this.m_bodyB,c,d;c=null!=this.m_revolute1?this.m_revolute1.getJointAngle():this.m_prismatic1.getJointTranslation();d=null!=this.m_revolute2?this.m_revolute2.getJointAngle():this.m_prismatic2.getJointTranslation();c=-this.m_mass*(this.m_constant-(c+this.m_ratio*d));a.m_sweep.c.x+=a.m_invMass*c*this.m_J.linearA.x;a.m_sweep.c.y+=a.m_invMass*c*this.m_J.linearA.y;a.m_sweep.a+=a.m_invI*c*this.m_J.angularA;b.m_sweep.c.x+=b.m_invMass*c*this.m_J.linearB.x;b.m_sweep.c.y+=b.m_invMass*c*this.m_J.linearB.y;
b.m_sweep.a+=b.m_invI*c*this.m_J.angularB;a.synchronizeTransform();b.synchronizeTransform();return 0<M.b2_linearSlop},__class__:Ai});var Bi=function(){Ib.call(this);this.type=T.e_gearJoint;this.joint2=this.joint1=null;this.ratio=1};n["box2D.dynamics.joints.B2GearJointDef"]=Bi;Bi.__name__=["box2D","dynamics","joints","B2GearJointDef"];Bi.__super__=Ib;Bi.prototype=L(Ib.prototype,{__class__:Bi});var al=function(){this.linearA=new y;this.linearB=new y};n["box2D.dynamics.joints.B2Jacobian"]=al;al.__name__=
["box2D","dynamics","joints","B2Jacobian"];al.prototype={setZero:function(){this.linearA.setZero();this.angularA=0;this.linearB.setZero();this.angularB=0},set:function(a,b,c,d){this.linearA.setV(a);this.angularA=b;this.linearB.setV(c);this.angularB=d},compute:function(a,b,c,d){return this.linearA.x*a.x+this.linearA.y*a.y+this.angularA*b+(this.linearB.x*c.x+this.linearB.y*c.y)+this.angularB*d},__class__:al};var vi=function(){};n["box2D.dynamics.joints.B2JointEdge"]=vi;vi.__name__=["box2D","dynamics",
"joints","B2JointEdge"];vi.prototype={__class__:vi};var gh=function(a){T.call(this,a);this.m_localAnchor1=new y;this.m_localAnchor2=new y;this.m_localXAxis1=new y;this.m_localYAxis1=new y;this.m_axis=new y;this.m_perp=new y;this.m_K=new tb;this.m_impulse=new y;this.m_localAnchor1.setV(a.localAnchorA);this.m_localAnchor2.setV(a.localAnchorB);this.m_localXAxis1.setV(a.localAxisA);this.m_localYAxis1.x=-this.m_localXAxis1.y;this.m_localYAxis1.y=this.m_localXAxis1.x;this.m_impulse.setZero();this.m_motorImpulse=
this.m_motorMass=0;this.m_lowerTranslation=a.lowerTranslation;this.m_upperTranslation=a.upperTranslation;this.m_maxMotorForce=a.maxMotorForce;this.m_motorSpeed=a.motorSpeed;this.m_enableLimit=a.enableLimit;this.m_enableMotor=a.enableMotor;this.m_limitState=T.e_inactiveLimit;this.m_axis.setZero();this.m_perp.setZero()};n["box2D.dynamics.joints.B2LineJoint"]=gh;gh.__name__=["box2D","dynamics","joints","B2LineJoint"];gh.__super__=T;gh.prototype=L(T.prototype,{getAnchorA:function(){return this.m_bodyA.getWorldPoint(this.m_localAnchor1)},
getAnchorB:function(){return this.m_bodyB.getWorldPoint(this.m_localAnchor2)},getReactionForce:function(a){return new y(a*(this.m_impulse.x*this.m_perp.x+(this.m_motorImpulse+this.m_impulse.y)*this.m_axis.x),a*(this.m_impulse.x*this.m_perp.y+(this.m_motorImpulse+this.m_impulse.y)*this.m_axis.y))},getReactionTorque:function(a){return a*this.m_impulse.y},getJointTranslation:function(){var a=this.m_bodyA,b=this.m_bodyB,c=a.getWorldPoint(this.m_localAnchor1),d=b.getWorldPoint(this.m_localAnchor2),b=d.x-
c.x,c=d.y-c.y,a=a.getWorldVector(this.m_localXAxis1);return a.x*b+a.y*c},getJointSpeed:function(){var a=this.m_bodyA,b=this.m_bodyB,c;c=a.m_xf.R;var d=this.m_localAnchor1.x-a.m_sweep.localCenter.x,e=this.m_localAnchor1.y-a.m_sweep.localCenter.y,f=c.col1.x*d+c.col2.x*e,e=c.col1.y*d+c.col2.y*e,d=f;c=b.m_xf.R;var g=this.m_localAnchor2.x-b.m_sweep.localCenter.x,k=this.m_localAnchor2.y-b.m_sweep.localCenter.y,f=c.col1.x*g+c.col2.x*k,k=c.col1.y*g+c.col2.y*k,g=f;c=b.m_sweep.c.x+g-(a.m_sweep.c.x+d);var f=
b.m_sweep.c.y+k-(a.m_sweep.c.y+e),p=a.getWorldVector(this.m_localXAxis1),w=a.m_linearVelocity,h=b.m_linearVelocity,a=a.m_angularVelocity,b=b.m_angularVelocity;return c*-a*p.y+f*a*p.x+(p.x*(h.x+-b*k-w.x- -a*e)+p.y*(h.y+b*g-w.y-a*d))},isLimitEnabled:function(){return this.m_enableLimit},enableLimit:function(a){this.m_bodyA.setAwake(!0);this.m_bodyB.setAwake(!0);this.m_enableLimit=a},getLowerLimit:function(){return this.m_lowerTranslation},getUpperLimit:function(){return this.m_upperTranslation},setLimits:function(a,
b){this.m_bodyA.setAwake(!0);this.m_bodyB.setAwake(!0);this.m_lowerTranslation=a;this.m_upperTranslation=b},isMotorEnabled:function(){return this.m_enableMotor},enableMotor:function(a){this.m_bodyA.setAwake(!0);this.m_bodyB.setAwake(!0);this.m_enableMotor=a},setMotorSpeed:function(a){this.m_bodyA.setAwake(!0);this.m_bodyB.setAwake(!0);this.m_motorSpeed=a},getMotorSpeed:function(){return this.m_motorSpeed},setMaxMotorForce:function(a){this.m_bodyA.setAwake(!0);this.m_bodyB.setAwake(!0);this.m_maxMotorForce=
a},getMaxMotorForce:function(){return this.m_maxMotorForce},getMotorForce:function(){return this.m_motorImpulse},initVelocityConstraints:function(a){var b=this.m_bodyA,c=this.m_bodyB,d,e;this.m_localCenterA.setV(b.getLocalCenter());this.m_localCenterB.setV(c.getLocalCenter());var f=b.getTransform();c.getTransform();d=b.m_xf.R;var g=this.m_localAnchor1.x-this.m_localCenterA.x,k=this.m_localAnchor1.y-this.m_localCenterA.y;e=d.col1.x*g+d.col2.x*k;k=d.col1.y*g+d.col2.y*k;g=e;d=c.m_xf.R;var p=this.m_localAnchor2.x-
this.m_localCenterB.x,w=this.m_localAnchor2.y-this.m_localCenterB.y;e=d.col1.x*p+d.col2.x*w;w=d.col1.y*p+d.col2.y*w;p=e;d=c.m_sweep.c.x+p-b.m_sweep.c.x-g;e=c.m_sweep.c.y+w-b.m_sweep.c.y-k;this.m_invMassA=b.m_invMass;this.m_invMassB=c.m_invMass;this.m_invIA=b.m_invI;this.m_invIB=c.m_invI;this.m_axis.setV(x.mulMV(f.R,this.m_localXAxis1));this.m_a1=(d+g)*this.m_axis.y-(e+k)*this.m_axis.x;this.m_a2=p*this.m_axis.y-w*this.m_axis.x;this.m_motorMass=this.m_invMassA+this.m_invMassB+this.m_invIA*this.m_a1*
this.m_a1+this.m_invIB*this.m_a2*this.m_a2;this.m_motorMass=this.m_motorMass>Number.MIN_VALUE?1/this.m_motorMass:0;this.m_perp.setV(x.mulMV(f.R,this.m_localYAxis1));this.m_s1=(d+g)*this.m_perp.y-(e+k)*this.m_perp.x;this.m_s2=p*this.m_perp.y-w*this.m_perp.x;f=this.m_invMassA;g=this.m_invMassB;k=this.m_invIA;p=this.m_invIB;this.m_K.col1.x=f+g+k*this.m_s1*this.m_s1+p*this.m_s2*this.m_s2;this.m_K.col1.y=k*this.m_s1*this.m_a1+p*this.m_s2*this.m_a2;this.m_K.col2.x=this.m_K.col1.y;this.m_K.col2.y=f+g+k*
this.m_a1*this.m_a1+p*this.m_a2*this.m_a2;this.m_enableLimit?(d=this.m_axis.x*d+this.m_axis.y*e,x.abs(this.m_upperTranslation-this.m_lowerTranslation)<2*M.b2_linearSlop?this.m_limitState=T.e_equalLimits:d<=this.m_lowerTranslation?this.m_limitState!=T.e_atLowerLimit&&(this.m_limitState=T.e_atLowerLimit,this.m_impulse.y=0):d>=this.m_upperTranslation?this.m_limitState!=T.e_atUpperLimit&&(this.m_limitState=T.e_atUpperLimit,this.m_impulse.y=0):(this.m_limitState=T.e_inactiveLimit,this.m_impulse.y=0)):
this.m_limitState=T.e_inactiveLimit;0==this.m_enableMotor&&(this.m_motorImpulse=0);a.warmStarting?(this.m_impulse.x*=a.dtRatio,this.m_impulse.y*=a.dtRatio,this.m_motorImpulse*=a.dtRatio,a=this.m_impulse.x*this.m_perp.x+(this.m_motorImpulse+this.m_impulse.y)*this.m_axis.x,d=this.m_impulse.x*this.m_perp.y+(this.m_motorImpulse+this.m_impulse.y)*this.m_axis.y,e=this.m_impulse.x*this.m_s1+(this.m_motorImpulse+this.m_impulse.y)*this.m_a1,f=this.m_impulse.x*this.m_s2+(this.m_motorImpulse+this.m_impulse.y)*
this.m_a2,b.m_linearVelocity.x-=this.m_invMassA*a,b.m_linearVelocity.y-=this.m_invMassA*d,b.m_angularVelocity-=this.m_invIA*e,c.m_linearVelocity.x+=this.m_invMassB*a,c.m_linearVelocity.y+=this.m_invMassB*d,c.m_angularVelocity+=this.m_invIB*f):(this.m_impulse.setZero(),this.m_motorImpulse=0)},solveVelocityConstraints:function(a){var b=this.m_bodyA,c=this.m_bodyB,d=b.m_linearVelocity,e=b.m_angularVelocity,f=c.m_linearVelocity,g=c.m_angularVelocity,k,p,w;this.m_enableMotor&&this.m_limitState!=T.e_equalLimits&&
(w=this.m_motorMass*(this.m_motorSpeed-(this.m_axis.x*(f.x-d.x)+this.m_axis.y*(f.y-d.y)+this.m_a2*g-this.m_a1*e)),k=this.m_motorImpulse,a=a.dt*this.m_maxMotorForce,this.m_motorImpulse=x.clamp(this.m_motorImpulse+w,-a,a),w=this.m_motorImpulse-k,k=w*this.m_axis.x,a=w*this.m_axis.y,p=w*this.m_a1,w*=this.m_a2,d.x-=this.m_invMassA*k,d.y-=this.m_invMassA*a,e-=this.m_invIA*p,f.x+=this.m_invMassB*k,f.y+=this.m_invMassB*a,g+=this.m_invIB*w);a=this.m_perp.x*(f.x-d.x)+this.m_perp.y*(f.y-d.y)+this.m_s2*g-this.m_s1*
e;this.m_enableLimit&&this.m_limitState!=T.e_inactiveLimit?(p=this.m_axis.x*(f.x-d.x)+this.m_axis.y*(f.y-d.y)+this.m_a2*g-this.m_a1*e,k=this.m_impulse.copy(),w=this.m_K.solve(new y,-a,-p),this.m_impulse.add(w),this.m_limitState==T.e_atLowerLimit?this.m_impulse.y=x.max(this.m_impulse.y,0):this.m_limitState==T.e_atUpperLimit&&(this.m_impulse.y=x.min(this.m_impulse.y,0)),a=-a-(this.m_impulse.y-k.y)*this.m_K.col2.x,this.m_impulse.x=0!=this.m_K.col1.x?a/this.m_K.col1.x+k.x:k.x,w.x=this.m_impulse.x-k.x,
w.y=this.m_impulse.y-k.y,k=w.x*this.m_perp.x+w.y*this.m_axis.x,a=w.x*this.m_perp.y+w.y*this.m_axis.y,p=w.x*this.m_s1+w.y*this.m_a1,w=w.x*this.m_s2+w.y*this.m_a2):(w=0!=this.m_K.col1.x?-a/this.m_K.col1.x:0,this.m_impulse.x+=w,k=w*this.m_perp.x,a=w*this.m_perp.y,p=w*this.m_s1,w*=this.m_s2);d.x-=this.m_invMassA*k;d.y-=this.m_invMassA*a;e-=this.m_invIA*p;f.x+=this.m_invMassB*k;f.y+=this.m_invMassB*a;g+=this.m_invIB*w;b.m_linearVelocity.setV(d);b.m_angularVelocity=e;c.m_linearVelocity.setV(f);c.m_angularVelocity=
g},solvePositionConstraints:function(a){a=this.m_bodyA;var b=this.m_bodyB,c=a.m_sweep.c,d=a.m_sweep.a,e=b.m_sweep.c,f=b.m_sweep.a,g,k,p,w,h,l=0,m=0;p=!1;var n=0,D=tb.fromAngle(d);w=tb.fromAngle(f);g=D;var m=this.m_localAnchor1.x-this.m_localCenterA.x,q=this.m_localAnchor1.y-this.m_localCenterA.y;k=g.col1.x*m+g.col2.x*q;q=g.col1.y*m+g.col2.y*q;m=k;g=w;w=this.m_localAnchor2.x-this.m_localCenterB.x;h=this.m_localAnchor2.y-this.m_localCenterB.y;k=g.col1.x*w+g.col2.x*h;h=g.col1.y*w+g.col2.y*h;w=k;g=e.x+
w-c.x-m;k=e.y+h-c.y-q;if(this.m_enableLimit){this.m_axis=x.mulMV(D,this.m_localXAxis1);this.m_a1=(g+m)*this.m_axis.y-(k+q)*this.m_axis.x;this.m_a2=w*this.m_axis.y-h*this.m_axis.x;var u=this.m_axis.x*g+this.m_axis.y*k;x.abs(this.m_upperTranslation-this.m_lowerTranslation)<2*M.b2_linearSlop?(n=x.clamp(u,-M.b2_maxLinearCorrection,M.b2_maxLinearCorrection),l=x.abs(u),p=!0):u<=this.m_lowerTranslation?(n=x.clamp(u-this.m_lowerTranslation+M.b2_linearSlop,-M.b2_maxLinearCorrection,0),l=this.m_lowerTranslation-
u,p=!0):u>=this.m_upperTranslation&&(n=x.clamp(u-this.m_upperTranslation+M.b2_linearSlop,0,M.b2_maxLinearCorrection),l=u-this.m_upperTranslation,p=!0)}this.m_perp=x.mulMV(D,this.m_localYAxis1);this.m_s1=(g+m)*this.m_perp.y-(k+q)*this.m_perp.x;this.m_s2=w*this.m_perp.y-h*this.m_perp.x;D=new y;q=this.m_perp.x*g+this.m_perp.y*k;l=x.max(l,x.abs(q));m=0;p?(p=this.m_invMassA,w=this.m_invMassB,h=this.m_invIA,g=this.m_invIB,this.m_K.col1.x=p+w+h*this.m_s1*this.m_s1+g*this.m_s2*this.m_s2,this.m_K.col1.y=h*
this.m_s1*this.m_a1+g*this.m_s2*this.m_a2,this.m_K.col2.x=this.m_K.col1.y,this.m_K.col2.y=p+w+h*this.m_a1*this.m_a1+g*this.m_a2*this.m_a2,this.m_K.solve(D,-q,-n)):(p=this.m_invMassA,w=this.m_invMassB,h=this.m_invIA,g=this.m_invIB,n=p+w+h*this.m_s1*this.m_s1+g*this.m_s2*this.m_s2,D.x=0!=n?-q/n:0,D.y=0);n=D.x*this.m_perp.x+D.y*this.m_axis.x;p=D.x*this.m_perp.y+D.y*this.m_axis.y;q=D.x*this.m_s1+D.y*this.m_a1;D=D.x*this.m_s2+D.y*this.m_a2;c.x-=this.m_invMassA*n;c.y-=this.m_invMassA*p;d-=this.m_invIA*
q;e.x+=this.m_invMassB*n;e.y+=this.m_invMassB*p;f+=this.m_invIB*D;a.m_sweep.a=d;b.m_sweep.a=f;a.synchronizeTransform();b.synchronizeTransform();return l<=M.b2_linearSlop&&m<=M.b2_angularSlop},__class__:gh});var Ff=function(){Ib.call(this);this.localAnchorA=new y;this.localAnchorB=new y;this.localAxisA=new y;this.type=T.e_lineJoint;this.localAxisA.set(1,0);this.enableLimit=!1;this.upperTranslation=this.lowerTranslation=0;this.enableMotor=!1;this.motorSpeed=this.maxMotorForce=0};n["box2D.dynamics.joints.B2LineJointDef"]=
Ff;Ff.__name__=["box2D","dynamics","joints","B2LineJointDef"];Ff.__super__=Ib;Ff.prototype=L(Ib.prototype,{initialize:function(a,b,c,d){this.bodyA=a;this.bodyB=b;this.localAnchorA=this.bodyA.getLocalPoint(c);this.localAnchorB=this.bodyB.getLocalPoint(c);this.localAxisA=this.bodyA.getLocalVector(d)},__class__:Ff});var wi=function(a){T.call(this,a);this.K=new tb;this.K1=new tb;this.K2=new tb;this.m_localAnchor=new y;this.m_target=new y;this.m_impulse=new y;this.m_mass=new tb;this.m_C=new y;this.m_target.setV(a.target);
var b=this.m_target.x-this.m_bodyB.m_xf.position.x,c=this.m_target.y-this.m_bodyB.m_xf.position.y,d=this.m_bodyB.m_xf.R;this.m_localAnchor.x=b*d.col1.x+c*d.col1.y;this.m_localAnchor.y=b*d.col2.x+c*d.col2.y;this.m_maxForce=a.maxForce;this.m_impulse.setZero();this.m_frequencyHz=a.frequencyHz;this.m_dampingRatio=a.dampingRatio;this.m_gamma=this.m_beta=0};n["box2D.dynamics.joints.B2MouseJoint"]=wi;wi.__name__=["box2D","dynamics","joints","B2MouseJoint"];wi.__super__=T;wi.prototype=L(T.prototype,{getAnchorA:function(){return this.m_target},
getAnchorB:function(){return this.m_bodyB.getWorldPoint(this.m_localAnchor)},getReactionForce:function(a){return new y(a*this.m_impulse.x,a*this.m_impulse.y)},getReactionTorque:function(a){return 0},getTarget:function(){return this.m_target},setTarget:function(a){0==this.m_bodyB.isAwake()&&this.m_bodyB.setAwake(!0);this.m_target=a},getMaxForce:function(){return this.m_maxForce},setMaxForce:function(a){this.m_maxForce=a},getFrequency:function(){return this.m_frequencyHz},setFrequency:function(a){this.m_frequencyHz=
a},getDampingRatio:function(){return this.m_dampingRatio},setDampingRatio:function(a){this.m_dampingRatio=a},initVelocityConstraints:function(a){var b=this.m_bodyB,c=b.getMass(),d=2*Math.PI*this.m_frequencyHz,e=c*d*d;this.m_gamma=a.dt*(2*c*this.m_dampingRatio*d+a.dt*e);this.m_gamma=0!=this.m_gamma?1/this.m_gamma:0;this.m_beta=a.dt*e*this.m_gamma;var e=b.m_xf.R,c=this.m_localAnchor.x-b.m_sweep.localCenter.x,d=this.m_localAnchor.y-b.m_sweep.localCenter.y,f=e.col1.x*c+e.col2.x*d,d=e.col1.y*c+e.col2.y*
d,c=f,e=b.m_invMass,f=b.m_invI;this.K1.col1.x=e;this.K1.col2.x=0;this.K1.col1.y=0;this.K1.col2.y=e;this.K2.col1.x=f*d*d;this.K2.col2.x=-f*c*d;this.K2.col1.y=-f*c*d;this.K2.col2.y=f*c*c;this.K.setM(this.K1);this.K.addM(this.K2);this.K.col1.x+=this.m_gamma;this.K.col2.y+=this.m_gamma;this.K.getInverse(this.m_mass);this.m_C.x=b.m_sweep.c.x+c-this.m_target.x;this.m_C.y=b.m_sweep.c.y+d-this.m_target.y;b.m_angularVelocity*=.98;this.m_impulse.x*=a.dtRatio;this.m_impulse.y*=a.dtRatio;b.m_linearVelocity.x+=
e*this.m_impulse.x;b.m_linearVelocity.y+=e*this.m_impulse.y;b.m_angularVelocity+=f*(c*this.m_impulse.y-d*this.m_impulse.x)},solveVelocityConstraints:function(a){var b=this.m_bodyB,c,d,e;c=b.m_xf.R;var f=this.m_localAnchor.x-b.m_sweep.localCenter.x,g=this.m_localAnchor.y-b.m_sweep.localCenter.y;d=c.col1.x*f+c.col2.x*g;g=c.col1.y*f+c.col2.y*g;f=d;d=b.m_linearVelocity.x+-b.m_angularVelocity*g;var k=b.m_linearVelocity.y+b.m_angularVelocity*f;c=this.m_mass;d=d+this.m_beta*this.m_C.x+this.m_gamma*this.m_impulse.x;
e=k+this.m_beta*this.m_C.y+this.m_gamma*this.m_impulse.y;k=-(c.col1.x*d+c.col2.x*e);e=-(c.col1.y*d+c.col2.y*e);c=this.m_impulse.x;d=this.m_impulse.y;this.m_impulse.x+=k;this.m_impulse.y+=e;a=a.dt*this.m_maxForce;this.m_impulse.lengthSquared()>a*a&&this.m_impulse.multiply(a/this.m_impulse.length());k=this.m_impulse.x-c;e=this.m_impulse.y-d;b.m_linearVelocity.x+=b.m_invMass*k;b.m_linearVelocity.y+=b.m_invMass*e;b.m_angularVelocity+=b.m_invI*(f*e-g*k)},solvePositionConstraints:function(a){return!0},
__class__:wi});var xi=function(){Ib.call(this);this.target=new y;this.type=T.e_mouseJoint;this.maxForce=0;this.frequencyHz=5;this.dampingRatio=.7};n["box2D.dynamics.joints.B2MouseJointDef"]=xi;xi.__name__=["box2D","dynamics","joints","B2MouseJointDef"];xi.__super__=Ib;xi.prototype=L(Ib.prototype,{__class__:xi});var jg=function(a){T.call(this,a);this.m_localAnchor1=new y;this.m_localAnchor2=new y;this.m_localXAxis1=new y;this.m_localYAxis1=new y;this.m_axis=new y;this.m_perp=new y;this.m_K=new Bf;
this.m_impulse=new qd;this.m_localAnchor1.setV(a.localAnchorA);this.m_localAnchor2.setV(a.localAnchorB);this.m_localXAxis1.setV(a.localAxisA);this.m_localYAxis1.x=-this.m_localXAxis1.y;this.m_localYAxis1.y=this.m_localXAxis1.x;this.m_refAngle=a.referenceAngle;this.m_impulse.setZero();this.m_motorImpulse=this.m_motorMass=0;this.m_lowerTranslation=a.lowerTranslation;this.m_upperTranslation=a.upperTranslation;this.m_maxMotorForce=a.maxMotorForce;this.m_motorSpeed=a.motorSpeed;this.m_enableLimit=a.enableLimit;
this.m_enableMotor=a.enableMotor;this.m_limitState=T.e_inactiveLimit;this.m_axis.setZero();this.m_perp.setZero()};n["box2D.dynamics.joints.B2PrismaticJoint"]=jg;jg.__name__=["box2D","dynamics","joints","B2PrismaticJoint"];jg.__super__=T;jg.prototype=L(T.prototype,{getAnchorA:function(){return this.m_bodyA.getWorldPoint(this.m_localAnchor1)},getAnchorB:function(){return this.m_bodyB.getWorldPoint(this.m_localAnchor2)},getReactionForce:function(a){return new y(a*(this.m_impulse.x*this.m_perp.x+(this.m_motorImpulse+
this.m_impulse.z)*this.m_axis.x),a*(this.m_impulse.x*this.m_perp.y+(this.m_motorImpulse+this.m_impulse.z)*this.m_axis.y))},getReactionTorque:function(a){return a*this.m_impulse.y},getJointTranslation:function(){var a=this.m_bodyA,b=this.m_bodyB,c=a.getWorldPoint(this.m_localAnchor1),d=b.getWorldPoint(this.m_localAnchor2),b=d.x-c.x,c=d.y-c.y,a=a.getWorldVector(this.m_localXAxis1);return a.x*b+a.y*c},getJointSpeed:function(){var a=this.m_bodyA,b=this.m_bodyB,c;c=a.m_xf.R;var d=this.m_localAnchor1.x-
a.m_sweep.localCenter.x,e=this.m_localAnchor1.y-a.m_sweep.localCenter.y,f=c.col1.x*d+c.col2.x*e,e=c.col1.y*d+c.col2.y*e,d=f;c=b.m_xf.R;var g=this.m_localAnchor2.x-b.m_sweep.localCenter.x,k=this.m_localAnchor2.y-b.m_sweep.localCenter.y,f=c.col1.x*g+c.col2.x*k,k=c.col1.y*g+c.col2.y*k,g=f;c=b.m_sweep.c.x+g-(a.m_sweep.c.x+d);var f=b.m_sweep.c.y+k-(a.m_sweep.c.y+e),p=a.getWorldVector(this.m_localXAxis1),w=a.m_linearVelocity,h=b.m_linearVelocity,a=a.m_angularVelocity,b=b.m_angularVelocity;return c*-a*p.y+
f*a*p.x+(p.x*(h.x+-b*k-w.x- -a*e)+p.y*(h.y+b*g-w.y-a*d))},isLimitEnabled:function(){return this.m_enableLimit},enableLimit:function(a){this.m_bodyA.setAwake(!0);this.m_bodyB.setAwake(!0);this.m_enableLimit=a},getLowerLimit:function(){return this.m_lowerTranslation},getUpperLimit:function(){return this.m_upperTranslation},setLimits:function(a,b){this.m_bodyA.setAwake(!0);this.m_bodyB.setAwake(!0);this.m_lowerTranslation=a;this.m_upperTranslation=b},isMotorEnabled:function(){return this.m_enableMotor},
enableMotor:function(a){this.m_bodyA.setAwake(!0);this.m_bodyB.setAwake(!0);this.m_enableMotor=a},setMotorSpeed:function(a){this.m_bodyA.setAwake(!0);this.m_bodyB.setAwake(!0);this.m_motorSpeed=a},getMotorSpeed:function(){return this.m_motorSpeed},setMaxMotorForce:function(a){this.m_bodyA.setAwake(!0);this.m_bodyB.setAwake(!0);this.m_maxMotorForce=a},getMotorForce:function(){return this.m_motorImpulse},initVelocityConstraints:function(a){var b=this.m_bodyA,c=this.m_bodyB,d,e;this.m_localCenterA.setV(b.getLocalCenter());
this.m_localCenterB.setV(c.getLocalCenter());var f=b.getTransform();c.getTransform();d=b.m_xf.R;var g=this.m_localAnchor1.x-this.m_localCenterA.x,k=this.m_localAnchor1.y-this.m_localCenterA.y;e=d.col1.x*g+d.col2.x*k;k=d.col1.y*g+d.col2.y*k;g=e;d=c.m_xf.R;var p=this.m_localAnchor2.x-this.m_localCenterB.x,w=this.m_localAnchor2.y-this.m_localCenterB.y;e=d.col1.x*p+d.col2.x*w;w=d.col1.y*p+d.col2.y*w;p=e;d=c.m_sweep.c.x+p-b.m_sweep.c.x-g;e=c.m_sweep.c.y+w-b.m_sweep.c.y-k;this.m_invMassA=b.m_invMass;this.m_invMassB=
c.m_invMass;this.m_invIA=b.m_invI;this.m_invIB=c.m_invI;this.m_axis.setV(x.mulMV(f.R,this.m_localXAxis1));this.m_a1=(d+g)*this.m_axis.y-(e+k)*this.m_axis.x;this.m_a2=p*this.m_axis.y-w*this.m_axis.x;this.m_motorMass=this.m_invMassA+this.m_invMassB+this.m_invIA*this.m_a1*this.m_a1+this.m_invIB*this.m_a2*this.m_a2;this.m_motorMass>Number.MIN_VALUE&&(this.m_motorMass=1/this.m_motorMass);this.m_perp.setV(x.mulMV(f.R,this.m_localYAxis1));this.m_s1=(d+g)*this.m_perp.y-(e+k)*this.m_perp.x;this.m_s2=p*this.m_perp.y-
w*this.m_perp.x;f=this.m_invMassA;g=this.m_invMassB;k=this.m_invIA;p=this.m_invIB;this.m_K.col1.x=f+g+k*this.m_s1*this.m_s1+p*this.m_s2*this.m_s2;this.m_K.col1.y=k*this.m_s1+p*this.m_s2;this.m_K.col1.z=k*this.m_s1*this.m_a1+p*this.m_s2*this.m_a2;this.m_K.col2.x=this.m_K.col1.y;this.m_K.col2.y=k+p;this.m_K.col2.z=k*this.m_a1+p*this.m_a2;this.m_K.col3.x=this.m_K.col1.z;this.m_K.col3.y=this.m_K.col2.z;this.m_K.col3.z=f+g+k*this.m_a1*this.m_a1+p*this.m_a2*this.m_a2;this.m_enableLimit?(d=this.m_axis.x*
d+this.m_axis.y*e,x.abs(this.m_upperTranslation-this.m_lowerTranslation)<2*M.b2_linearSlop?this.m_limitState=T.e_equalLimits:d<=this.m_lowerTranslation?this.m_limitState!=T.e_atLowerLimit&&(this.m_limitState=T.e_atLowerLimit,this.m_impulse.z=0):d>=this.m_upperTranslation?this.m_limitState!=T.e_atUpperLimit&&(this.m_limitState=T.e_atUpperLimit,this.m_impulse.z=0):(this.m_limitState=T.e_inactiveLimit,this.m_impulse.z=0)):this.m_limitState=T.e_inactiveLimit;0==this.m_enableMotor&&(this.m_motorImpulse=
0);a.warmStarting?(this.m_impulse.x*=a.dtRatio,this.m_impulse.y*=a.dtRatio,this.m_motorImpulse*=a.dtRatio,a=this.m_impulse.x*this.m_perp.x+(this.m_motorImpulse+this.m_impulse.z)*this.m_axis.x,d=this.m_impulse.x*this.m_perp.y+(this.m_motorImpulse+this.m_impulse.z)*this.m_axis.y,e=this.m_impulse.x*this.m_s1+this.m_impulse.y+(this.m_motorImpulse+this.m_impulse.z)*this.m_a1,f=this.m_impulse.x*this.m_s2+this.m_impulse.y+(this.m_motorImpulse+this.m_impulse.z)*this.m_a2,b.m_linearVelocity.x-=this.m_invMassA*
a,b.m_linearVelocity.y-=this.m_invMassA*d,b.m_angularVelocity-=this.m_invIA*e,c.m_linearVelocity.x+=this.m_invMassB*a,c.m_linearVelocity.y+=this.m_invMassB*d,c.m_angularVelocity+=this.m_invIB*f):(this.m_impulse.setZero(),this.m_motorImpulse=0)},solveVelocityConstraints:function(a){var b=this.m_bodyA,c=this.m_bodyB,d=b.m_linearVelocity,e=b.m_angularVelocity,f=c.m_linearVelocity,g=c.m_angularVelocity,k,p,w;this.m_enableMotor&&this.m_limitState!=T.e_equalLimits&&(w=this.m_motorMass*(this.m_motorSpeed-
(this.m_axis.x*(f.x-d.x)+this.m_axis.y*(f.y-d.y)+this.m_a2*g-this.m_a1*e)),k=this.m_motorImpulse,a=a.dt*this.m_maxMotorForce,this.m_motorImpulse=x.clamp(this.m_motorImpulse+w,-a,a),w=this.m_motorImpulse-k,k=w*this.m_axis.x,a=w*this.m_axis.y,p=w*this.m_a1,w*=this.m_a2,d.x-=this.m_invMassA*k,d.y-=this.m_invMassA*a,e-=this.m_invIA*p,f.x+=this.m_invMassB*k,f.y+=this.m_invMassB*a,g+=this.m_invIB*w);p=this.m_perp.x*(f.x-d.x)+this.m_perp.y*(f.y-d.y)+this.m_s2*g-this.m_s1*e;a=g-e;this.m_enableLimit&&this.m_limitState!=
T.e_inactiveLimit?(w=this.m_axis.x*(f.x-d.x)+this.m_axis.y*(f.y-d.y)+this.m_a2*g-this.m_a1*e,k=this.m_impulse.copy(),w=this.m_K.solve33(new qd,-p,-a,-w),this.m_impulse.add(w),this.m_limitState==T.e_atLowerLimit?this.m_impulse.z=x.max(this.m_impulse.z,0):this.m_limitState==T.e_atUpperLimit&&(this.m_impulse.z=x.min(this.m_impulse.z,0)),p=-p-(this.m_impulse.z-k.z)*this.m_K.col3.x,a=-a-(this.m_impulse.z-k.z)*this.m_K.col3.y,a=this.m_K.solve22(new y,p,a),a.x+=k.x,a.y+=k.y,this.m_impulse.x=a.x,this.m_impulse.y=
a.y,w.x=this.m_impulse.x-k.x,w.y=this.m_impulse.y-k.y,w.z=this.m_impulse.z-k.z,k=w.x*this.m_perp.x+w.z*this.m_axis.x,a=w.x*this.m_perp.y+w.z*this.m_axis.y,p=w.x*this.m_s1+w.y+w.z*this.m_a1,w=w.x*this.m_s2+w.y+w.z*this.m_a2):(w=this.m_K.solve22(new y,-p,-a),this.m_impulse.x+=w.x,this.m_impulse.y+=w.y,k=w.x*this.m_perp.x,a=w.x*this.m_perp.y,p=w.x*this.m_s1+w.y,w=w.x*this.m_s2+w.y);d.x-=this.m_invMassA*k;d.y-=this.m_invMassA*a;e-=this.m_invIA*p;f.x+=this.m_invMassB*k;f.y+=this.m_invMassB*a;g+=this.m_invIB*
w;b.m_linearVelocity.setV(d);b.m_angularVelocity=e;c.m_linearVelocity.setV(f);c.m_angularVelocity=g},solvePositionConstraints:function(a){a=this.m_bodyA;var b=this.m_bodyB,c=a.m_sweep.c,d=a.m_sweep.a,e=b.m_sweep.c,f=b.m_sweep.a,g,k,p,w,h=0,l=0;p=!1;var m=0,n=tb.fromAngle(d),D=tb.fromAngle(f);g=n;var l=this.m_localAnchor1.x-this.m_localCenterA.x,q=this.m_localAnchor1.y-this.m_localCenterA.y;k=g.col1.x*l+g.col2.x*q;q=g.col1.y*l+g.col2.y*q;l=k;g=D;D=this.m_localAnchor2.x-this.m_localCenterB.x;w=this.m_localAnchor2.y-
this.m_localCenterB.y;k=g.col1.x*D+g.col2.x*w;w=g.col1.y*D+g.col2.y*w;D=k;g=e.x+D-c.x-l;k=e.y+w-c.y-q;if(this.m_enableLimit){this.m_axis=x.mulMV(n,this.m_localXAxis1);this.m_a1=(g+l)*this.m_axis.y-(k+q)*this.m_axis.x;this.m_a2=D*this.m_axis.y-w*this.m_axis.x;var u=this.m_axis.x*g+this.m_axis.y*k;x.abs(this.m_upperTranslation-this.m_lowerTranslation)<2*M.b2_linearSlop?(m=x.clamp(u,-M.b2_maxLinearCorrection,M.b2_maxLinearCorrection),h=x.abs(u),p=!0):u<=this.m_lowerTranslation?(m=x.clamp(u-this.m_lowerTranslation+
M.b2_linearSlop,-M.b2_maxLinearCorrection,0),h=this.m_lowerTranslation-u,p=!0):u>=this.m_upperTranslation&&(m=x.clamp(u-this.m_upperTranslation+M.b2_linearSlop,0,M.b2_maxLinearCorrection),h=u-this.m_upperTranslation,p=!0)}this.m_perp=x.mulMV(n,this.m_localYAxis1);this.m_s1=(g+l)*this.m_perp.y-(k+q)*this.m_perp.x;this.m_s2=D*this.m_perp.y-w*this.m_perp.x;n=new qd;q=this.m_perp.x*g+this.m_perp.y*k;D=f-d-this.m_refAngle;h=x.max(h,x.abs(q));l=x.abs(D);p?(p=this.m_invMassA,w=this.m_invMassB,g=this.m_invIA,
k=this.m_invIB,this.m_K.col1.x=p+w+g*this.m_s1*this.m_s1+k*this.m_s2*this.m_s2,this.m_K.col1.y=g*this.m_s1+k*this.m_s2,this.m_K.col1.z=g*this.m_s1*this.m_a1+k*this.m_s2*this.m_a2,this.m_K.col2.x=this.m_K.col1.y,this.m_K.col2.y=g+k,this.m_K.col2.z=g*this.m_a1+k*this.m_a2,this.m_K.col3.x=this.m_K.col1.z,this.m_K.col3.y=this.m_K.col2.z,this.m_K.col3.z=p+w+g*this.m_a1*this.m_a1+k*this.m_a2*this.m_a2,this.m_K.solve33(n,-q,-D,-m)):(p=this.m_invMassA,w=this.m_invMassB,g=this.m_invIA,k=this.m_invIB,m=g*this.m_s1+
k*this.m_s2,u=g+k,this.m_K.col1.set(p+w+g*this.m_s1*this.m_s1+k*this.m_s2*this.m_s2,m,0),this.m_K.col2.set(m,u,0),m=this.m_K.solve22(new y,-q,-D),n.x=m.x,n.y=m.y,n.z=0);m=n.x*this.m_perp.x+n.z*this.m_axis.x;p=n.x*this.m_perp.y+n.z*this.m_axis.y;q=n.x*this.m_s1+n.y+n.z*this.m_a1;n=n.x*this.m_s2+n.y+n.z*this.m_a2;c.x-=this.m_invMassA*m;c.y-=this.m_invMassA*p;d-=this.m_invIA*q;e.x+=this.m_invMassB*m;e.y+=this.m_invMassB*p;f+=this.m_invIB*n;a.m_sweep.a=d;b.m_sweep.a=f;a.synchronizeTransform();b.synchronizeTransform();
return h<=M.b2_linearSlop&&l<=M.b2_angularSlop},__class__:jg});var yi=function(){Ib.call(this);this.localAnchorA=new y;this.localAnchorB=new y;this.localAxisA=new y;this.type=T.e_prismaticJoint;this.localAxisA.set(1,0);this.referenceAngle=0;this.enableLimit=!1;this.upperTranslation=this.lowerTranslation=0;this.enableMotor=!1;this.motorSpeed=this.maxMotorForce=0};n["box2D.dynamics.joints.B2PrismaticJointDef"]=yi;yi.__name__=["box2D","dynamics","joints","B2PrismaticJointDef"];yi.__super__=Ib;yi.prototype=
L(Ib.prototype,{initialize:function(a,b,c,d){this.bodyA=a;this.bodyB=b;this.localAnchorA=this.bodyA.getLocalPoint(c);this.localAnchorB=this.bodyB.getLocalPoint(c);this.localAxisA=this.bodyA.getLocalVector(d);this.referenceAngle=this.bodyB.getAngle()-this.bodyA.getAngle()},__class__:yi});var ue=function(a){T.call(this,a);this.m_groundAnchor1=new y;this.m_groundAnchor2=new y;this.m_localAnchor1=new y;this.m_localAnchor2=new y;this.m_u1=new y;this.m_u2=new y;this.m_ground=this.m_bodyA.m_world.m_groundBody;
this.m_groundAnchor1.x=a.groundAnchorA.x-this.m_ground.m_xf.position.x;this.m_groundAnchor1.y=a.groundAnchorA.y-this.m_ground.m_xf.position.y;this.m_groundAnchor2.x=a.groundAnchorB.x-this.m_ground.m_xf.position.x;this.m_groundAnchor2.y=a.groundAnchorB.y-this.m_ground.m_xf.position.y;this.m_localAnchor1.setV(a.localAnchorA);this.m_localAnchor2.setV(a.localAnchorB);this.m_ratio=a.ratio;this.m_constant=a.lengthA+this.m_ratio*a.lengthB;this.m_maxLength1=x.min(a.maxLengthA,this.m_constant-this.m_ratio*
ue.b2_minPulleyLength);this.m_maxLength2=x.min(a.maxLengthB,(this.m_constant-ue.b2_minPulleyLength)/this.m_ratio);this.m_limitImpulse2=this.m_limitImpulse1=this.m_impulse=0};n["box2D.dynamics.joints.B2PulleyJoint"]=ue;ue.__name__=["box2D","dynamics","joints","B2PulleyJoint"];ue.__super__=T;ue.prototype=L(T.prototype,{getAnchorA:function(){return this.m_bodyA.getWorldPoint(this.m_localAnchor1)},getAnchorB:function(){return this.m_bodyB.getWorldPoint(this.m_localAnchor2)},getReactionForce:function(a){return new y(a*
this.m_impulse*this.m_u2.x,a*this.m_impulse*this.m_u2.y)},getReactionTorque:function(a){return 0},getGroundAnchorA:function(){var a=this.m_ground.m_xf.position.copy();a.add(this.m_groundAnchor1);return a},getGroundAnchorB:function(){var a=this.m_ground.m_xf.position.copy();a.add(this.m_groundAnchor2);return a},getLength1:function(){var a=this.m_bodyA.getWorldPoint(this.m_localAnchor1),b=a.x-(this.m_ground.m_xf.position.x+this.m_groundAnchor1.x),a=a.y-(this.m_ground.m_xf.position.y+this.m_groundAnchor1.y);
return Math.sqrt(b*b+a*a)},getLength2:function(){var a=this.m_bodyB.getWorldPoint(this.m_localAnchor2),b=a.x-(this.m_ground.m_xf.position.x+this.m_groundAnchor2.x),a=a.y-(this.m_ground.m_xf.position.y+this.m_groundAnchor2.y);return Math.sqrt(b*b+a*a)},getRatio:function(){return this.m_ratio},initVelocityConstraints:function(a){var b=this.m_bodyA,c=this.m_bodyB,d;d=b.m_xf.R;var e=this.m_localAnchor1.x-b.m_sweep.localCenter.x,f=this.m_localAnchor1.y-b.m_sweep.localCenter.y,g=d.col1.x*e+d.col2.x*f,f=
d.col1.y*e+d.col2.y*f,e=g;d=c.m_xf.R;var k=this.m_localAnchor2.x-c.m_sweep.localCenter.x,p=this.m_localAnchor2.y-c.m_sweep.localCenter.y,g=d.col1.x*k+d.col2.x*p,p=d.col1.y*k+d.col2.y*p,k=g;d=c.m_sweep.c.x+k;var g=c.m_sweep.c.y+p,w=this.m_ground.m_xf.position.x+this.m_groundAnchor2.x,h=this.m_ground.m_xf.position.y+this.m_groundAnchor2.y;this.m_u1.set(b.m_sweep.c.x+e-(this.m_ground.m_xf.position.x+this.m_groundAnchor1.x),b.m_sweep.c.y+f-(this.m_ground.m_xf.position.y+this.m_groundAnchor1.y));this.m_u2.set(d-
w,g-h);d=this.m_u1.length();g=this.m_u2.length();d>M.b2_linearSlop?this.m_u1.multiply(1/d):this.m_u1.setZero();g>M.b2_linearSlop?this.m_u2.multiply(1/g):this.m_u2.setZero();0<this.m_constant-d-this.m_ratio*g?(this.m_state=T.e_inactiveLimit,this.m_impulse=0):this.m_state=T.e_atUpperLimit;d<this.m_maxLength1?(this.m_limitState1=T.e_inactiveLimit,this.m_limitImpulse1=0):this.m_limitState1=T.e_atUpperLimit;g<this.m_maxLength2?(this.m_limitState2=T.e_inactiveLimit,this.m_limitImpulse2=0):this.m_limitState2=
T.e_atUpperLimit;d=e*this.m_u1.y-f*this.m_u1.x;g=k*this.m_u2.y-p*this.m_u2.x;this.m_limitMass1=b.m_invMass+b.m_invI*d*d;this.m_limitMass2=c.m_invMass+c.m_invI*g*g;this.m_pulleyMass=this.m_limitMass1+this.m_ratio*this.m_ratio*this.m_limitMass2;this.m_limitMass1=1/this.m_limitMass1;this.m_limitMass2=1/this.m_limitMass2;this.m_pulleyMass=1/this.m_pulleyMass;a.warmStarting?(this.m_impulse*=a.dtRatio,this.m_limitImpulse1*=a.dtRatio,this.m_limitImpulse2*=a.dtRatio,a=(-this.m_impulse-this.m_limitImpulse1)*
this.m_u1.x,d=(-this.m_impulse-this.m_limitImpulse1)*this.m_u1.y,g=(-this.m_ratio*this.m_impulse-this.m_limitImpulse2)*this.m_u2.x,w=(-this.m_ratio*this.m_impulse-this.m_limitImpulse2)*this.m_u2.y,b.m_linearVelocity.x+=b.m_invMass*a,b.m_linearVelocity.y+=b.m_invMass*d,b.m_angularVelocity+=b.m_invI*(e*d-f*a),c.m_linearVelocity.x+=c.m_invMass*g,c.m_linearVelocity.y+=c.m_invMass*w,c.m_angularVelocity+=c.m_invI*(k*w-p*g)):this.m_limitImpulse2=this.m_limitImpulse1=this.m_impulse=0},solveVelocityConstraints:function(a){a=
this.m_bodyA;var b=this.m_bodyB,c;c=a.m_xf.R;var d=this.m_localAnchor1.x-a.m_sweep.localCenter.x,e=this.m_localAnchor1.y-a.m_sweep.localCenter.y,f=c.col1.x*d+c.col2.x*e,e=c.col1.y*d+c.col2.y*e,d=f;c=b.m_xf.R;var g=this.m_localAnchor2.x-b.m_sweep.localCenter.x,k=this.m_localAnchor2.y-b.m_sweep.localCenter.y,f=c.col1.x*g+c.col2.x*k,k=c.col1.y*g+c.col2.y*k,g=f,p,w;this.m_state==T.e_atUpperLimit&&(c=a.m_linearVelocity.x+-a.m_angularVelocity*e,f=a.m_linearVelocity.y+a.m_angularVelocity*d,p=b.m_linearVelocity.x+
-b.m_angularVelocity*k,w=b.m_linearVelocity.y+b.m_angularVelocity*g,c=-(this.m_u1.x*c+this.m_u1.y*f)-this.m_ratio*(this.m_u2.x*p+this.m_u2.y*w),w=this.m_pulleyMass*-c,c=this.m_impulse,this.m_impulse=x.max(0,this.m_impulse+w),w=this.m_impulse-c,c=-w*this.m_u1.x,f=-w*this.m_u1.y,p=-this.m_ratio*w*this.m_u2.x,w=-this.m_ratio*w*this.m_u2.y,a.m_linearVelocity.x+=a.m_invMass*c,a.m_linearVelocity.y+=a.m_invMass*f,a.m_angularVelocity+=a.m_invI*(d*f-e*c),b.m_linearVelocity.x+=b.m_invMass*p,b.m_linearVelocity.y+=
b.m_invMass*w,b.m_angularVelocity+=b.m_invI*(g*w-k*p));this.m_limitState1==T.e_atUpperLimit&&(c=a.m_linearVelocity.x+-a.m_angularVelocity*e,f=a.m_linearVelocity.y+a.m_angularVelocity*d,c=-(this.m_u1.x*c+this.m_u1.y*f),w=-this.m_limitMass1*c,c=this.m_limitImpulse1,this.m_limitImpulse1=x.max(0,this.m_limitImpulse1+w),w=this.m_limitImpulse1-c,c=-w*this.m_u1.x,f=-w*this.m_u1.y,a.m_linearVelocity.x+=a.m_invMass*c,a.m_linearVelocity.y+=a.m_invMass*f,a.m_angularVelocity+=a.m_invI*(d*f-e*c));this.m_limitState2==
T.e_atUpperLimit&&(p=b.m_linearVelocity.x+-b.m_angularVelocity*k,w=b.m_linearVelocity.y+b.m_angularVelocity*g,c=-(this.m_u2.x*p+this.m_u2.y*w),w=-this.m_limitMass2*c,c=this.m_limitImpulse2,this.m_limitImpulse2=x.max(0,this.m_limitImpulse2+w),w=this.m_limitImpulse2-c,p=-w*this.m_u2.x,w=-w*this.m_u2.y,b.m_linearVelocity.x+=b.m_invMass*p,b.m_linearVelocity.y+=b.m_invMass*w,b.m_angularVelocity+=b.m_invI*(g*w-k*p))},solvePositionConstraints:function(a){a=this.m_bodyA;var b=this.m_bodyB,c,d=this.m_ground.m_xf.position.x+
this.m_groundAnchor1.x,e=this.m_ground.m_xf.position.y+this.m_groundAnchor1.y,f=this.m_ground.m_xf.position.x+this.m_groundAnchor2.x,g=this.m_ground.m_xf.position.y+this.m_groundAnchor2.y,k,p,w,h,l,m,n,D=0;this.m_state==T.e_atUpperLimit&&(c=a.m_xf.R,k=this.m_localAnchor1.x-a.m_sweep.localCenter.x,p=this.m_localAnchor1.y-a.m_sweep.localCenter.y,l=c.col1.x*k+c.col2.x*p,p=c.col1.y*k+c.col2.y*p,k=l,c=b.m_xf.R,w=this.m_localAnchor2.x-b.m_sweep.localCenter.x,h=this.m_localAnchor2.y-b.m_sweep.localCenter.y,
l=c.col1.x*w+c.col2.x*h,h=c.col1.y*w+c.col2.y*h,w=l,c=a.m_sweep.c.x+k,l=a.m_sweep.c.y+p,m=b.m_sweep.c.x+w,n=b.m_sweep.c.y+h,this.m_u1.set(c-d,l-e),this.m_u2.set(m-f,n-g),c=this.m_u1.length(),l=this.m_u2.length(),c>M.b2_linearSlop?this.m_u1.multiply(1/c):this.m_u1.setZero(),l>M.b2_linearSlop?this.m_u2.multiply(1/l):this.m_u2.setZero(),c=this.m_constant-c-this.m_ratio*l,D=x.max(D,-c),c=x.clamp(c+M.b2_linearSlop,-M.b2_maxLinearCorrection,0),n=-this.m_pulleyMass*c,c=-n*this.m_u1.x,l=-n*this.m_u1.y,m=
-this.m_ratio*n*this.m_u2.x,n=-this.m_ratio*n*this.m_u2.y,a.m_sweep.c.x+=a.m_invMass*c,a.m_sweep.c.y+=a.m_invMass*l,a.m_sweep.a+=a.m_invI*(k*l-p*c),b.m_sweep.c.x+=b.m_invMass*m,b.m_sweep.c.y+=b.m_invMass*n,b.m_sweep.a+=b.m_invI*(w*n-h*m),a.synchronizeTransform(),b.synchronizeTransform());this.m_limitState1==T.e_atUpperLimit&&(c=a.m_xf.R,k=this.m_localAnchor1.x-a.m_sweep.localCenter.x,p=this.m_localAnchor1.y-a.m_sweep.localCenter.y,l=c.col1.x*k+c.col2.x*p,p=c.col1.y*k+c.col2.y*p,k=l,c=a.m_sweep.c.x+
k,l=a.m_sweep.c.y+p,this.m_u1.set(c-d,l-e),c=this.m_u1.length(),c>M.b2_linearSlop?(this.m_u1.x*=1/c,this.m_u1.y*=1/c):this.m_u1.setZero(),c=this.m_maxLength1-c,D=x.max(D,-c),c=x.clamp(c+M.b2_linearSlop,-M.b2_maxLinearCorrection,0),n=-this.m_limitMass1*c,c=-n*this.m_u1.x,l=-n*this.m_u1.y,a.m_sweep.c.x+=a.m_invMass*c,a.m_sweep.c.y+=a.m_invMass*l,a.m_sweep.a+=a.m_invI*(k*l-p*c),a.synchronizeTransform());this.m_limitState2==T.e_atUpperLimit&&(c=b.m_xf.R,w=this.m_localAnchor2.x-b.m_sweep.localCenter.x,
h=this.m_localAnchor2.y-b.m_sweep.localCenter.y,l=c.col1.x*w+c.col2.x*h,h=c.col1.y*w+c.col2.y*h,w=l,m=b.m_sweep.c.x+w,n=b.m_sweep.c.y+h,this.m_u2.set(m-f,n-g),l=this.m_u2.length(),l>M.b2_linearSlop?(this.m_u2.x*=1/l,this.m_u2.y*=1/l):this.m_u2.setZero(),c=this.m_maxLength2-l,D=x.max(D,-c),c=x.clamp(c+M.b2_linearSlop,-M.b2_maxLinearCorrection,0),n=-this.m_limitMass2*c,m=-n*this.m_u2.x,n=-n*this.m_u2.y,b.m_sweep.c.x+=b.m_invMass*m,b.m_sweep.c.y+=b.m_invMass*n,b.m_sweep.a+=b.m_invI*(w*n-h*m),b.synchronizeTransform());
return D<M.b2_linearSlop},__class__:ue});var zi=function(){Ib.call(this);this.groundAnchorA=new y;this.groundAnchorB=new y;this.localAnchorA=new y;this.localAnchorB=new y;this.type=T.e_pulleyJoint;this.groundAnchorA.set(-1,1);this.groundAnchorB.set(1,1);this.localAnchorA.set(-1,0);this.localAnchorB.set(1,0);this.maxLengthB=this.lengthB=this.maxLengthA=this.lengthA=0;this.ratio=1;this.collideConnected=!0};n["box2D.dynamics.joints.B2PulleyJointDef"]=zi;zi.__name__=["box2D","dynamics","joints","B2PulleyJointDef"];
zi.__super__=Ib;zi.prototype=L(Ib.prototype,{initialize:function(a,b,c,d,e,f,g){this.bodyA=a;this.bodyB=b;this.groundAnchorA.setV(c);this.groundAnchorB.setV(d);this.localAnchorA=this.bodyA.getLocalPoint(e);this.localAnchorB=this.bodyB.getLocalPoint(f);a=e.x-c.x;c=e.y-c.y;this.lengthA=Math.sqrt(a*a+c*c);c=f.x-d.x;d=f.y-d.y;this.lengthB=Math.sqrt(c*c+d*d);this.ratio=g;g=this.lengthA+this.ratio*this.lengthB;this.maxLengthA=g-this.ratio*ue.b2_minPulleyLength;this.maxLengthB=(g-ue.b2_minPulleyLength)/
this.ratio},__class__:zi});var le=function(a){T.call(this,a);this.K=new tb;this.K1=new tb;this.K2=new tb;this.K3=new tb;this.impulse3=new qd;this.impulse2=new y;this.reduced=new y;this.m_localAnchor1=new y;this.m_localAnchor2=new y;this.m_impulse=new qd;this.m_mass=new Bf;this.m_localAnchor1.setV(a.localAnchorA);this.m_localAnchor2.setV(a.localAnchorB);this.m_referenceAngle=a.referenceAngle;this.m_impulse.setZero();this.m_motorImpulse=0;this.m_lowerAngle=a.lowerAngle;this.m_upperAngle=a.upperAngle;
this.m_maxMotorTorque=a.maxMotorTorque;this.m_motorSpeed=a.motorSpeed;this.m_enableLimit=a.enableLimit;this.m_enableMotor=a.enableMotor;this.m_limitState=T.e_inactiveLimit};n["box2D.dynamics.joints.B2RevoluteJoint"]=le;le.__name__=["box2D","dynamics","joints","B2RevoluteJoint"];le.__super__=T;le.prototype=L(T.prototype,{getAnchorA:function(){return this.m_bodyA.getWorldPoint(this.m_localAnchor1)},getAnchorB:function(){return this.m_bodyB.getWorldPoint(this.m_localAnchor2)},getReactionForce:function(a){return new y(a*
this.m_impulse.x,a*this.m_impulse.y)},getReactionTorque:function(a){return a*this.m_impulse.z},getJointAngle:function(){return this.m_bodyB.m_sweep.a-this.m_bodyA.m_sweep.a-this.m_referenceAngle},getJointSpeed:function(){return this.m_bodyB.m_angularVelocity-this.m_bodyA.m_angularVelocity},isLimitEnabled:function(){return this.m_enableLimit},enableLimit:function(a){this.m_enableLimit=a},getLowerLimit:function(){return this.m_lowerAngle},getUpperLimit:function(){return this.m_upperAngle},setLimits:function(a,
b){this.m_lowerAngle=a;this.m_upperAngle=b},isMotorEnabled:function(){this.m_bodyA.setAwake(!0);this.m_bodyB.setAwake(!0);return this.m_enableMotor},enableMotor:function(a){this.m_enableMotor=a},setMotorSpeed:function(a){this.m_bodyA.setAwake(!0);this.m_bodyB.setAwake(!0);this.m_motorSpeed=a},getMotorSpeed:function(){return this.m_motorSpeed},setMaxMotorTorque:function(a){this.m_maxMotorTorque=a},getMotorTorque:function(){return this.m_maxMotorTorque},initVelocityConstraints:function(a){var b=this.m_bodyA,
c=this.m_bodyB,d,e;d=b.m_xf.R;var f=this.m_localAnchor1.x-b.m_sweep.localCenter.x,g=this.m_localAnchor1.y-b.m_sweep.localCenter.y;e=d.col1.x*f+d.col2.x*g;g=d.col1.y*f+d.col2.y*g;f=e;d=c.m_xf.R;var k=this.m_localAnchor2.x-c.m_sweep.localCenter.x,p=this.m_localAnchor2.y-c.m_sweep.localCenter.y;e=d.col1.x*k+d.col2.x*p;p=d.col1.y*k+d.col2.y*p;k=e;d=b.m_invMass;e=c.m_invMass;var w=b.m_invI,h=c.m_invI;this.m_mass.col1.x=d+e+g*g*w+p*p*h;this.m_mass.col2.x=-g*f*w-p*k*h;this.m_mass.col3.x=-g*w-p*h;this.m_mass.col1.y=
this.m_mass.col2.x;this.m_mass.col2.y=d+e+f*f*w+k*k*h;this.m_mass.col3.y=f*w+k*h;this.m_mass.col1.z=this.m_mass.col3.x;this.m_mass.col2.z=this.m_mass.col3.y;this.m_mass.col3.z=w+h;this.m_motorMass=1/(w+h);0==this.m_enableMotor&&(this.m_motorImpulse=0);if(this.m_enableLimit){var l=c.m_sweep.a-b.m_sweep.a-this.m_referenceAngle;x.abs(this.m_upperAngle-this.m_lowerAngle)<2*M.b2_angularSlop?this.m_limitState=T.e_equalLimits:l<=this.m_lowerAngle?(this.m_limitState!=T.e_atLowerLimit&&(this.m_impulse.z=0),
this.m_limitState=T.e_atLowerLimit):l>=this.m_upperAngle?(this.m_limitState!=T.e_atUpperLimit&&(this.m_impulse.z=0),this.m_limitState=T.e_atUpperLimit):(this.m_limitState=T.e_inactiveLimit,this.m_impulse.z=0)}else this.m_limitState=T.e_inactiveLimit;a.warmStarting?(this.m_impulse.x*=a.dtRatio,this.m_impulse.y*=a.dtRatio,this.m_motorImpulse*=a.dtRatio,a=this.m_impulse.x,l=this.m_impulse.y,b.m_linearVelocity.x-=d*a,b.m_linearVelocity.y-=d*l,b.m_angularVelocity-=w*(f*l-g*a+this.m_motorImpulse+this.m_impulse.z),
c.m_linearVelocity.x+=e*a,c.m_linearVelocity.y+=e*l,c.m_angularVelocity+=h*(k*l-p*a+this.m_motorImpulse+this.m_impulse.z)):(this.m_impulse.setZero(),this.m_motorImpulse=0)},solveVelocityConstraints:function(a){var b=this.m_bodyA,c=this.m_bodyB,d,e,f,g,k,p=b.m_linearVelocity,w=b.m_angularVelocity,h=c.m_linearVelocity,l=c.m_angularVelocity,m=b.m_invMass,n=c.m_invMass,D=b.m_invI,q=c.m_invI;this.m_enableMotor&&this.m_limitState!=T.e_equalLimits&&(f=this.m_motorMass*-(l-w-this.m_motorSpeed),g=this.m_motorImpulse,
a=a.dt*this.m_maxMotorTorque,this.m_motorImpulse=x.clamp(this.m_motorImpulse+f,-a,a),f=this.m_motorImpulse-g,w-=D*f,l+=q*f);if(this.m_enableLimit&&this.m_limitState!=T.e_inactiveLimit){d=b.m_xf.R;f=this.m_localAnchor1.x-b.m_sweep.localCenter.x;g=this.m_localAnchor1.y-b.m_sweep.localCenter.y;e=d.col1.x*f+d.col2.x*g;g=d.col1.y*f+d.col2.y*g;f=e;d=c.m_xf.R;a=this.m_localAnchor2.x-c.m_sweep.localCenter.x;k=this.m_localAnchor2.y-c.m_sweep.localCenter.y;e=d.col1.x*a+d.col2.x*k;k=d.col1.y*a+d.col2.y*k;a=
e;e=h.x+-l*k-p.x- -w*g;var u=h.y+l*a-p.y-w*f;this.m_mass.solve33(this.impulse3,-e,-u,-(l-w));this.m_limitState==T.e_equalLimits?this.m_impulse.add(this.impulse3):this.m_limitState==T.e_atLowerLimit?(d=this.m_impulse.z+this.impulse3.z,0>d&&(this.m_mass.solve22(this.reduced,-e,-u),this.impulse3.x=this.reduced.x,this.impulse3.y=this.reduced.y,this.impulse3.z=-this.m_impulse.z,this.m_impulse.x+=this.reduced.x,this.m_impulse.y+=this.reduced.y,this.m_impulse.z=0)):this.m_limitState==T.e_atUpperLimit&&(d=
this.m_impulse.z+this.impulse3.z,0<d&&(this.m_mass.solve22(this.reduced,-e,-u),this.impulse3.x=this.reduced.x,this.impulse3.y=this.reduced.y,this.impulse3.z=-this.m_impulse.z,this.m_impulse.x+=this.reduced.x,this.m_impulse.y+=this.reduced.y,this.m_impulse.z=0));p.x-=m*this.impulse3.x;p.y-=m*this.impulse3.y;w-=D*(f*this.impulse3.y-g*this.impulse3.x+this.impulse3.z);h.x+=n*this.impulse3.x;h.y+=n*this.impulse3.y;l+=q*(a*this.impulse3.y-k*this.impulse3.x+this.impulse3.z)}else d=b.m_xf.R,f=this.m_localAnchor1.x-
b.m_sweep.localCenter.x,g=this.m_localAnchor1.y-b.m_sweep.localCenter.y,e=d.col1.x*f+d.col2.x*g,g=d.col1.y*f+d.col2.y*g,f=e,d=c.m_xf.R,a=this.m_localAnchor2.x-c.m_sweep.localCenter.x,k=this.m_localAnchor2.y-c.m_sweep.localCenter.y,e=d.col1.x*a+d.col2.x*k,k=d.col1.y*a+d.col2.y*k,a=e,this.m_mass.solve22(this.impulse2,-(h.x+-l*k-p.x- -w*g),-(h.y+l*a-p.y-w*f)),this.m_impulse.x+=this.impulse2.x,this.m_impulse.y+=this.impulse2.y,p.x-=m*this.impulse2.x,p.y-=m*this.impulse2.y,w-=D*(f*this.impulse2.y-g*this.impulse2.x),
h.x+=n*this.impulse2.x,h.y+=n*this.impulse2.y,l+=q*(a*this.impulse2.y-k*this.impulse2.x);b.m_linearVelocity.setV(p);b.m_angularVelocity=w;c.m_linearVelocity.setV(h);c.m_angularVelocity=l},solvePositionConstraints:function(a){var b,c;a=this.m_bodyA;var d=this.m_bodyB,e=0;c=0;var f,g,k;if(this.m_enableLimit&&this.m_limitState!=T.e_inactiveLimit){b=d.m_sweep.a-a.m_sweep.a-this.m_referenceAngle;var p=0;this.m_limitState==T.e_equalLimits?(b=x.clamp(b-this.m_lowerAngle,-M.b2_maxAngularCorrection,M.b2_maxAngularCorrection),
p=-this.m_motorMass*b,e=x.abs(b)):this.m_limitState==T.e_atLowerLimit?(b-=this.m_lowerAngle,e=-b,b=x.clamp(b+M.b2_angularSlop,-M.b2_maxAngularCorrection,0),p=-this.m_motorMass*b):this.m_limitState==T.e_atUpperLimit&&(e=b-=this.m_upperAngle,b=x.clamp(b-M.b2_angularSlop,0,M.b2_maxAngularCorrection),p=-this.m_motorMass*b);a.m_sweep.a-=a.m_invI*p;d.m_sweep.a+=d.m_invI*p;a.synchronizeTransform();d.synchronizeTransform()}c=a.m_xf.R;p=this.m_localAnchor1.x-a.m_sweep.localCenter.x;b=this.m_localAnchor1.y-
a.m_sweep.localCenter.y;f=c.col1.x*p+c.col2.x*b;b=c.col1.y*p+c.col2.y*b;p=f;c=d.m_xf.R;var w=this.m_localAnchor2.x-d.m_sweep.localCenter.x,h=this.m_localAnchor2.y-d.m_sweep.localCenter.y;f=c.col1.x*w+c.col2.x*h;h=c.col1.y*w+c.col2.y*h;w=f;g=d.m_sweep.c.x+w-a.m_sweep.c.x-p;k=d.m_sweep.c.y+h-a.m_sweep.c.y-b;var l=g*g+k*k;c=Math.sqrt(l);f=a.m_invMass;var m=d.m_invMass,n=a.m_invI,D=d.m_invI,q=10*M.b2_linearSlop;l>q*q&&(l=1/(f+m),g=l*-g,k=l*-k,a.m_sweep.c.x-=.5*f*g,a.m_sweep.c.y-=.5*f*k,d.m_sweep.c.x+=
.5*m*g,d.m_sweep.c.y+=.5*m*k,g=d.m_sweep.c.x+w-a.m_sweep.c.x-p,k=d.m_sweep.c.y+h-a.m_sweep.c.y-b);this.K1.col1.x=f+m;this.K1.col2.x=0;this.K1.col1.y=0;this.K1.col2.y=f+m;this.K2.col1.x=n*b*b;this.K2.col2.x=-n*p*b;this.K2.col1.y=-n*p*b;this.K2.col2.y=n*p*p;this.K3.col1.x=D*h*h;this.K3.col2.x=-D*w*h;this.K3.col1.y=-D*w*h;this.K3.col2.y=D*w*w;this.K.setM(this.K1);this.K.addM(this.K2);this.K.addM(this.K3);this.K.solve(le.tImpulse,-g,-k);g=le.tImpulse.x;k=le.tImpulse.y;a.m_sweep.c.x-=a.m_invMass*g;a.m_sweep.c.y-=
a.m_invMass*k;a.m_sweep.a-=a.m_invI*(p*k-b*g);d.m_sweep.c.x+=d.m_invMass*g;d.m_sweep.c.y+=d.m_invMass*k;d.m_sweep.a+=d.m_invI*(w*k-h*g);a.synchronizeTransform();d.synchronizeTransform();return c<=M.b2_linearSlop&&e<=M.b2_angularSlop},__class__:le});var Ef=function(){Ib.call(this);this.localAnchorA=new y;this.localAnchorB=new y;this.type=T.e_revoluteJoint;this.localAnchorA.set(0,0);this.localAnchorB.set(0,0);this.motorSpeed=this.maxMotorTorque=this.upperAngle=this.lowerAngle=this.referenceAngle=0;
this.enableMotor=this.enableLimit=!1};n["box2D.dynamics.joints.B2RevoluteJointDef"]=Ef;Ef.__name__=["box2D","dynamics","joints","B2RevoluteJointDef"];Ef.__super__=Ib;Ef.prototype=L(Ib.prototype,{initialize:function(a,b,c){this.bodyA=a;this.bodyB=b;this.localAnchorA=this.bodyA.getLocalPoint(c);this.localAnchorB=this.bodyB.getLocalPoint(c);this.referenceAngle=this.bodyB.getAngle()-this.bodyA.getAngle()},__class__:Ef});var Ci=function(a){T.call(this,a);this.m_localAnchorA=new y;this.m_localAnchorB=new y;
this.m_impulse=new qd;this.m_mass=new Bf;this.m_localAnchorA.setV(a.localAnchorA);this.m_localAnchorB.setV(a.localAnchorB);this.m_referenceAngle=a.referenceAngle;this.m_impulse.setZero();this.m_mass=new Bf};n["box2D.dynamics.joints.B2WeldJoint"]=Ci;Ci.__name__=["box2D","dynamics","joints","B2WeldJoint"];Ci.__super__=T;Ci.prototype=L(T.prototype,{getAnchorA:function(){return this.m_bodyA.getWorldPoint(this.m_localAnchorA)},getAnchorB:function(){return this.m_bodyB.getWorldPoint(this.m_localAnchorB)},
getReactionForce:function(a){return new y(a*this.m_impulse.x,a*this.m_impulse.y)},getReactionTorque:function(a){return a*this.m_impulse.z},initVelocityConstraints:function(a){var b,c,d=this.m_bodyA,e=this.m_bodyB;b=d.m_xf.R;var f=this.m_localAnchorA.x-d.m_sweep.localCenter.x,g=this.m_localAnchorA.y-d.m_sweep.localCenter.y;c=b.col1.x*f+b.col2.x*g;g=b.col1.y*f+b.col2.y*g;f=c;b=e.m_xf.R;var k=this.m_localAnchorB.x-e.m_sweep.localCenter.x,p=this.m_localAnchorB.y-e.m_sweep.localCenter.y;c=b.col1.x*k+b.col2.x*
p;p=b.col1.y*k+b.col2.y*p;k=c;b=d.m_invMass;c=e.m_invMass;var w=d.m_invI,h=e.m_invI;this.m_mass.col1.x=b+c+g*g*w+p*p*h;this.m_mass.col2.x=-g*f*w-p*k*h;this.m_mass.col3.x=-g*w-p*h;this.m_mass.col1.y=this.m_mass.col2.x;this.m_mass.col2.y=b+c+f*f*w+k*k*h;this.m_mass.col3.y=f*w+k*h;this.m_mass.col1.z=this.m_mass.col3.x;this.m_mass.col2.z=this.m_mass.col3.y;this.m_mass.col3.z=w+h;a.warmStarting?(this.m_impulse.x*=a.dtRatio,this.m_impulse.y*=a.dtRatio,this.m_impulse.z*=a.dtRatio,d.m_linearVelocity.x-=b*
this.m_impulse.x,d.m_linearVelocity.y-=b*this.m_impulse.y,d.m_angularVelocity-=w*(f*this.m_impulse.y-g*this.m_impulse.x+this.m_impulse.z),e.m_linearVelocity.x+=c*this.m_impulse.x,e.m_linearVelocity.y+=c*this.m_impulse.y,e.m_angularVelocity+=h*(k*this.m_impulse.y-p*this.m_impulse.x+this.m_impulse.z)):this.m_impulse.setZero()},solveVelocityConstraints:function(a){var b,c;a=this.m_bodyA;var d=this.m_bodyB,e=a.m_linearVelocity,f=a.m_angularVelocity,g=d.m_linearVelocity,k=d.m_angularVelocity,p=a.m_invMass,
h=d.m_invMass,l=a.m_invI,m=d.m_invI;b=a.m_xf.R;var n=this.m_localAnchorA.x-a.m_sweep.localCenter.x,q=this.m_localAnchorA.y-a.m_sweep.localCenter.y;c=b.col1.x*n+b.col2.x*q;q=b.col1.y*n+b.col2.y*q;n=c;b=d.m_xf.R;var D=this.m_localAnchorB.x-d.m_sweep.localCenter.x,u=this.m_localAnchorB.y-d.m_sweep.localCenter.y;c=b.col1.x*D+b.col2.x*u;u=b.col1.y*D+b.col2.y*u;D=c;b=g.x-k*u-e.x+f*q;c=g.y+k*D-e.y-f*n;var La=k-f,r=new qd;this.m_mass.solve33(r,-b,-c,-La);this.m_impulse.add(r);e.x-=p*r.x;e.y-=p*r.y;f-=l*(n*
r.y-q*r.x+r.z);g.x+=h*r.x;g.y+=h*r.y;k+=m*(D*r.y-u*r.x+r.z);a.m_angularVelocity=f;d.m_angularVelocity=k},solvePositionConstraints:function(a){var b,c;a=this.m_bodyA;var d=this.m_bodyB;b=a.m_xf.R;var e=this.m_localAnchorA.x-a.m_sweep.localCenter.x,f=this.m_localAnchorA.y-a.m_sweep.localCenter.y;c=b.col1.x*e+b.col2.x*f;f=b.col1.y*e+b.col2.y*f;e=c;b=d.m_xf.R;var g=this.m_localAnchorB.x-d.m_sweep.localCenter.x,k=this.m_localAnchorB.y-d.m_sweep.localCenter.y;c=b.col1.x*g+b.col2.x*k;k=b.col1.y*g+b.col2.y*
k;g=c;b=a.m_invMass;c=d.m_invMass;var p=a.m_invI,h=d.m_invI,l=d.m_sweep.c.x+g-a.m_sweep.c.x-e,m=d.m_sweep.c.y+k-a.m_sweep.c.y-f,n=d.m_sweep.a-a.m_sweep.a-this.m_referenceAngle,q=10*M.b2_linearSlop,D=Math.sqrt(l*l+m*m),u=x.abs(n);D>q&&(p*=1,h*=1);this.m_mass.col1.x=b+c+f*f*p+k*k*h;this.m_mass.col2.x=-f*e*p-k*g*h;this.m_mass.col3.x=-f*p-k*h;this.m_mass.col1.y=this.m_mass.col2.x;this.m_mass.col2.y=b+c+e*e*p+g*g*h;this.m_mass.col3.y=e*p+g*h;this.m_mass.col1.z=this.m_mass.col3.x;this.m_mass.col2.z=this.m_mass.col3.y;
this.m_mass.col3.z=p+h;q=new qd;this.m_mass.solve33(q,-l,-m,-n);a.m_sweep.c.x-=b*q.x;a.m_sweep.c.y-=b*q.y;a.m_sweep.a-=p*(e*q.y-f*q.x+q.z);d.m_sweep.c.x+=c*q.x;d.m_sweep.c.y+=c*q.y;d.m_sweep.a+=h*(g*q.y-k*q.x+q.z);a.synchronizeTransform();d.synchronizeTransform();return D<=M.b2_linearSlop&&u<=M.b2_angularSlop},__class__:Ci});var Di=function(){Ib.call(this);this.localAnchorA=new y;this.localAnchorB=new y;this.type=T.e_weldJoint;this.referenceAngle=0};n["box2D.dynamics.joints.B2WeldJointDef"]=Di;Di.__name__=
["box2D","dynamics","joints","B2WeldJointDef"];Di.__super__=Ib;Di.prototype=L(Ib.prototype,{initialize:function(a,b,c){this.bodyA=a;this.bodyB=b;this.localAnchorA.setV(this.bodyA.getLocalPoint(c));this.localAnchorB.setV(this.bodyB.getLocalPoint(c));this.referenceAngle=this.bodyB.getAngle()-this.bodyA.getAngle()},__class__:Di});var Gf=function(a){null==a&&(a=!0);ga.call(this);this.alignRight=a;this.start=!0;this.fps=this.mem_max=0;this.text=new Cd;this.text.set_width(70);this.text.set_height(15);this.text.set_defaultTextFormat(new hh("_sans",
10,16777215));this.text.set_selectable(!1);this.text.mouseEnabled=!1;this.text.set_wordWrap(!0);this.text.set_multiline(!0);this.rectangle=new ha(69,0,1,1);this.addEventListener("addedToStage",K(this,this.init),!1,0,!0);this.addEventListener("removedFromStage",K(this,this.destroy),!1,0,!0)};n["com.nmefermmmtools.debug.Stats"]=Gf;Gf.__name__=["com","nmefermmmtools","debug","Stats"];Gf.__super__=ga;Gf.prototype=L(ga.prototype,{init:function(a){this._stage=ka.current.stage;this.get_graphics().beginFill(51);
this.get_graphics().drawRect(0,0,70,15);this.get_graphics().endFill();this.addChild(this.text);this.graph=new Ba(70,1,!1,51);this.get_graphics().beginBitmapFill(this.graph,new Oa(1,0,0,1,0,15));this.get_graphics().drawRect(0,15,70,1);this.addEventListener("enterFrame",K(this,this.update))},destroy:function(a){for(this.get_graphics().clear();0<this.get_numChildren();)this.removeChildAt(0);this.graph.dispose();this.removeEventListener("enterFrame",K(this,this.update))},update:function(a){this.start&&
this.alignRight&&(this.set_x(this._stage.stageWidth-this.get_width()),this.start=!1);this.timer=ka.getTimer();this.timer-1E3>this.ms_prev?(this.mem=9.54E-7*Td.get_totalMemory(),this.mem_max=this.mem_max>this.mem?this.mem_max:this.mem,60<this.fps&&(this.fps=60),this.fpsStr="FPS: "+this.fps+" / 60",this.memStr="MEM: "+Math.round(this.mem),this.memMaxStr="MAX: "+Math.round(this.mem_max),this.fps=0,this.ms_prev=this.timer,this.text.set_text(this.fpsStr)):(this.fps++,this.ms=this.timer)},normalizeMem:function(a){return u["int"](Math.min(1,
Math.sqrt(Math.sqrt(5E3*a)))-2)},__class__:Gf});var ve=function(){};n["com.nmefermmmtools.debug.Colors"]=ve;ve.__name__=["com","nmefermmmtools","debug","Colors"];var bl=function(){};n["com.stencyl.AssetLoader"]=bl;bl.__name__=["com","stencyl","AssetLoader"];bl.prototype={__class__:bl};var la=function(){if(""==R.getText("assets/data/game.xml"))throw new F("Data.hx - Could not load game. Check your logs for a possible cause (likely a bad MP3 file).");};n["com.stencyl.Data"]=la;la.__name__=["com","stencyl",
"Data"];la.instance=null;la.theLoader=null;la.get=function(){null==la.instance&&(la.instance=new la,la.instance.loader=la.theLoader=ua.createInstance(ua.resolveClass("scripts.MyAssets"),[]),la.instance.loadAll());return la.instance};la.prototype={updatePreloader:function(a){},loadAll:function(){this.gameXML=new Qd(ba.parse(R.getText("assets/data/game.xml")).firstElement());this.resourceListXML=new Qd(ba.parse(R.getText("assets/data/resources.xml")).firstElement());this.sceneListXML=new Qd(ba.parse(R.getText("assets/data/scenes.xml")).firstElement());
this.behaviorListXML=new Qd(ba.parse(R.getText("assets/data/behaviors.xml")).firstElement());this.updatePreloader(5);this.loadReaders();this.loadBehaviors();this.updatePreloader(15);this.loadResources();this.updatePreloader(90);this.scenesXML=new xa;this.loader.loadScenes(this.scenesXML);this.updatePreloader(100);this.behaviorListXML=this.resourceListXML=null},loadReaders:function(){this.readers=[];this.readers.push(new ih);this.readers.push(new Gi);this.readers.push(new Hi);this.readers.push(new Dd);
this.readers.push(new Bc);this.readers.push(new Ii)},loadBehaviors:function(){this.behaviors=new xa;for(var a=this.behaviorListXML.get_elements();a.hasNext();){var b=a.next(),c=u.parseInt(b.att.resolve("id")),b=kg.readBehavior(b);this.behaviors.h[c]=b}},loadResources:function(){this.resourceAssets=new ma;this.loader.loadResources(this.resourceAssets);this.updatePreloader(65);this.readResourceXML(this.resourceListXML);this.resourceMap=new ma;for(var a=this.resources.iterator();a.hasNext();){var b=
a.next();null!=b&&(q.__instanceof(b,Hf)?this.resourceMap.set("Sprite_"+b.name,b):this.resourceMap.set(b.name,b))}},readResourceXML:function(a){this.resources=new xa;for(a=a.get_elements();a.hasNext();){var b=a.next(),c=0;b.has.resolve("atlasID")&&(c=u.parseInt(b.att.resolve("atlasID")));var d=u.parseInt(b.att.resolve("id")),b=this.readResource(u.parseInt(b.att.resolve("id")),c,b.get_name(),b.att.resolve("name"),b);this.resources.h[d]=b}},readResource:function(a,b,c,d,e){for(var f=0,g=this.readers;f<
g.length;){var k=g[f];++f;if(k.accepts(c))return k.read(a,b,c,d,e)}return null},getResourcesOfType:function(a){for(var b=[],c=this.resources.iterator();c.hasNext();){var d=c.next();q.__instanceof(d,a)&&b.push(d)}return b},getAllActorTypes:function(){for(var a=[],b=this.resources.iterator();b.hasNext();){var c=b.next();q.__instanceof(c,Od)&&a.push(q.__cast(c,Od))}return a},getGraphicAsset:function(a,b){if(null==this.resourceAssets.get(a)){var c=R.getBitmapData(b,!1);this.resourceAssets.set(a,c)}return this.resourceAssets.get(a)},
loadAtlas:function(a){var b;b=na.get().atlases.get(a);if(null!=b&&!b.active)for(b.active=!0,a=0,b=b.members;a<b.length;){var c=b[a];++a;c=this.resources.h[c];null!=c&&c.loadGraphics()}},unloadAtlas:function(a){},__class__:la};var ac=function(){this.eventTable=new xa;this.eventTable.h[ac.TYPE_ADS]=[];this.eventTable.h[ac.TYPE_PURCHASES]=[];this.eventTable.h[ac.TYPE_GAMECENTER]=[];this.eventTable.h[ac.TYPE_KEYBOARD]=[]};n["com.stencyl.event.EventMaster"]=ac;ac.__name__=["com","stencyl","event","EventMaster"];
ac.prototype={addAdEvent:function(a){this.eventTable.h[ac.TYPE_ADS].push(a)},addPurchaseEvent:function(a){this.eventTable.h[ac.TYPE_PURCHASES].push(a)},addGameCenterEvent:function(a){this.eventTable.h[ac.TYPE_GAMECENTER].push(a)},addKeyboardEvent:function(a){this.eventTable.h[ac.TYPE_KEYBOARD].push(a)},clear:function(){I.clear(this.eventTable.h[ac.TYPE_ADS]);I.clear(this.eventTable.h[ac.TYPE_PURCHASES]);I.clear(this.eventTable.h[ac.TYPE_GAMECENTER]);I.clear(this.eventTable.h[ac.TYPE_KEYBOARD])},__class__:ac};
var h=function(a){this.isHUDZoomable=this.keyPollOccurred=this.isFullScreen=!1;this.zoomMultiplier=1;a.mouseChildren=!1;a.mouseEnabled=!1;ra.debugDraw&&(h.DEBUG_DRAW=!0);h.engine=this;l.engine=this;this.root=a;this.isFullScreen=ra.startInFullScreen;h.screenScaleX=a.get_scaleX();h.originalScaleX=h.screenScaleX;h.screenScaleY=a.get_scaleY();h.originalScaleY=h.screenScaleY;h.screenOffsetX=u["int"](a.get_x());h.screenOffsetY=u["int"](a.get_y());h.NO_PHYSICS=1==ra.physicsMode;h.stage.addEventListener("enterFrame",
K(this,this.onUpdate));h.stage.addEventListener("deactivate",K(this,this.onFocusLost));h.stage.addEventListener("activate",K(this,this.onFocus));this.begin(ra.initSceneID)};n["com.stencyl.Engine"]=h;h.__name__=["com","stencyl","Engine"];h.cameraX=null;h.cameraY=null;h.screenScaleX=null;h.screenScaleY=null;h.originalScaleX=null;h.originalScaleY=null;h.screenOffsetX=null;h.screenOffsetY=null;h.screenWidth=null;h.screenHeight=null;h.sceneWidth=null;h.sceneHeight=null;h.screenWidthHalf=null;h.screenHeightHalf=
null;h.ngID=null;h.ngKey=null;h.movieClip=null;h.stage=null;h.debugDrawer=null;h.initBehaviors=function(a,b,c,d,e){if(null!=b){for(b=new If(b,b.arrayKeys());b.hasNext();){var f=b.next();if(null!=f&&f.enabled){var g;g=la.get().behaviors.get(f.behaviorID);var k=new ma;if(null!=g){if(g.isEvent)for(var p=g.attributes.keys();p.hasNext();){var h=p.next(),l=g.attributes.get(h);if(null!=l&&(l=q.__cast(l,kf),null!=l)){var m=l.type,n=l.ID;"list"==m?(l=new kf(n,l.fieldName,l.fullName,[],m,null,l.hidden),null!=
Ab[h]?k.setReserved(h,l):k.h[h]=l):"map"==m&&(l=new kf(n,l.fieldName,l.fullName,new ma,m,null,l.hidden),null!=Ab[h]?k.setReserved(h,l):k.h[h]=l)}}for(p=f.values.keys();p.hasNext();)h=p.next(),l=f.values.get(h),null!=g&&(m=g.attributes.get(h),null!=m&&(m=q.__cast(m,kf),null!=m&&(l=new kf(m.ID,m.fieldName,m.fullName,l,m.type,null,m.hidden),null!=Ab[h]?k.setReserved(h,l):k.h[h]=l)));null!=g&&(f=new Ji(c,d,g.ID,g.name,g.classname,!0,!1,k,g.type,g.isEvent),a.add(f))}}}e&&a.initScripts()}};h.toPhysicalUnits=
function(a){return a/=h.physicsScale};h.toPixelUnits=function(a){return a*=h.physicsScale};h.vToPhysicalUnits=function(a){a.x=h.toPhysicalUnits(a.x);a.y=h.toPhysicalUnits(a.y);return a};h.vToPixelUnits=function(a){a.x=h.toPixelUnits(a.x);a.y=h.toPixelUnits(a.y);return a};h.invokeListeners=function(a){for(var b=0;b<a.length;){try{var c=a[b];c(a);-1==I.indexOf(a,c)&&b--}catch(d){if(Ia.lastException=d,d instanceof F&&(d=d.val),q.__instanceof(d,String))null;else throw d;}b++}};h.invokeListeners2=function(a,
b){for(var c=0;c<a.length;){try{var d=a[c];d(b,a);-1==I.indexOf(a,d)&&c--}catch(e){if(Ia.lastException=e,e instanceof F&&(e=e.val),q.__instanceof(e,String))null;else throw e;}c++}};h.invokeListeners3=function(a,b,c){for(var d=0;d<a.length;){try{var e=a[d];e(b,c,a);-1==I.indexOf(a,e)&&d--}catch(f){if(Ia.lastException=f,f instanceof F&&(f=f.val),q.__instanceof(f,String))null;else throw f;}d++}};h.invokeListeners4=function(a,b,c,d){for(var e=0;e<a.length;){try{var f=a[e];f(b,c,d,a);-1==I.indexOf(a,f)&&
e--}catch(g){if(Ia.lastException=g,g instanceof F&&(g=g.val),q.__instanceof(g,String))null;else throw g;}e++}};h.invokeListeners5=function(a,b,c,d,e){for(var f=0;f<a.length;){try{var g=a[f];g(b,c,d,e,a);-1==I.indexOf(a,g)&&f--}catch(k){if(Ia.lastException=k,k instanceof F&&(k=k.val),q.__instanceof(k,String))null;else throw k;}f++}};h.invokeListeners6=function(a,b,c,d,e,f){for(var g=0;g<a.length;){try{var k=a[g];k(b,c,d,e,f,a);-1==I.indexOf(a,k)&&g--}catch(p){if(Ia.lastException=p,p instanceof F&&
(p=p.val),q.__instanceof(p,String))null;else throw p;}g++}};h.prototype={addShader:function(a,b){},clearShaders:function(){},toggleShadersForHUD:function(){},resetShaders:function(){},begin:function(a){this.loadedAtlases=new xa;this.atlasesToLoad=new xa;this.atlasesToUnload=new xa;A.enable();A.define(h.INTERNAL_SHIFT,[16]);A.define(h.INTERNAL_CTRL,[17]);h.landscape=ra.landscape;var b=ra.stageWidth,c=ra.stageHeight;h.screenWidth=b|0;h.screenHeight=c|0;h.screenWidthHalf=b/2|0;h.screenHeightHalf=c/2|
0;la.get();na.get().loadScenes();this.g=new Ed;h.started=!0;this.tileUpdated=!1;this.shakeTimer=0;this.shakeIntensity=.01;this.isShaking=!1;this.enter=this.leave=null;h.cameraX=0;this.acc=h.cameraY=0;this.lastTime=ka.getTimer();h.sceneWidth=b;h.sceneHeight=c;this.colorLayer=new Pd;this.root.addChild(this.colorLayer);this.master=new ga;this.root.addChild(this.master);this.hudLayer=new ga;this.root.addChild(this.hudLayer);this.transitionLayer=new ga;this.root.addChild(this.transitionLayer);this.transitionBitmapLayer=
new qb(new Ba(1,1,!0,0));this.debugLayer=new ga;this.root.addChild(this.debugLayer);this.actorsToCreateInNextScene=[];this.gameAttributes=new ma;for(b=na.get().gameAttributes.keys();b.hasNext();)c=b.next(),this.setGameAttribute(c,na.get().gameAttributes.get(c));this.channels=[];b=0;for(c=l.CHANNELS;b<c;){var d=b++;this.channels.push(new we(this,d))}this.enter=new jh(.5);this.enter.start();this.sceneToEnter=a;this.loadScene(a)},loadScene:function(a){this.collisionPairs=new Kc(32);h.paddingTop=0;h.paddingLeft=
0;h.paddingBottom=0;h.paddingRight=0;this.tasks=[];this.scene=na.get().scenes.get(a);if(-1==a||null==this.scene){a=na.get().scenes;var b=na.get().defaultSceneID;this.scene=a.get(b);if(null==this.scene){h.stage.removeEventListener("enterFrame",K(this,this.onUpdate));return}}this.scene.load();a=new xa;if(this.scene.retainsAtlases)for(b=this.loadedAtlases.iterator();b.hasNext();){var c=b.next();a.h[c]=c}else{for(b=this.loadedAtlases.iterator();b.hasNext();){var c=b.next(),d=void 0,d=na.get().atlases.get(c);
d.allScenes&&(a.h[c]=c)}b=0;for(c=this.scene.atlases;b<c.length;)d=c[b],++b,a.h[d]=d}for(b=this.atlasesToLoad.iterator();b.hasNext();)c=b.next(),a.h[c]=c;for(b=this.atlasesToUnload.iterator();b.hasNext();)c=b.next(),a.remove(c);for(b=this.loadedAtlases.iterator();b.hasNext();)c=b.next(),a.h.hasOwnProperty(c)||(la.get().unloadAtlas(c),this.loadedAtlases.remove(c));for(a=a.iterator();a.hasNext();)b=a.next(),this.loadedAtlases.h.hasOwnProperty(b)||(la.get().loadAtlas(b),this.loadedAtlases.h[b]=b);this.atlasesToLoad=
new xa;this.atlasesToUnload=new xa;h.sceneWidth=this.scene.sceneWidth;h.sceneHeight=this.scene.sceneHeight;this.behaviors=new Ki;this.groups=new xa;this.reverseGroups=new ma;a=0;for(b=na.get().groups;a<b.length;)c=b[a],++a,d=new Li(c.ID,c.name),this.groups.h[c.ID]=d,this.reverseGroups.set(c.name,d),d.name=c.name;a=new Li(na.REGION_ID,"Regions");this.groups.h[na.REGION_ID]=a;this.reverseGroups.set("Regions",a);this.disableCollisionList=[];this.actorsOfType=new xa;this.recycledActorsOfType=new xa;this.regions=
new Kc(32);this.regions.reuseIterator=!0;this.terrainRegions=new xa;this.joints=new xa;this.dynamicTiles=new ma;this.animatedTiles=[];this.hudActors=new Kc(64);this.hudActors.reuseIterator=!0;this.allActors=new Kc(256);this.allActors.reuseIterator=!0;this.actorsPerLayer=new xa;this.nextID=0;this.whenKeyPressedListeners=new ma;this.hasKeyPressedListeners=!1;this.whenAnyKeyPressedListeners=[];this.whenAnyKeyReleasedListeners=[];this.whenAnyGamepadPressedListeners=[];this.whenAnyGamepadReleasedListeners=
[];this.whenTypeGroupCreatedListeners=new rd;this.whenTypeGroupDiesListeners=new rd;this.typeGroupPositionListeners=new xa;this.collisionListeners=new xa;this.soundListeners=new rd;this.nativeListeners=[];this.whenUpdatedListeners=[];this.whenDrawingListeners=[];this.whenMousePressedListeners=[];this.whenMouseReleasedListeners=[];this.whenMouseMovedListeners=[];this.whenMouseDraggedListeners=[];this.whenPausedListeners=[];this.whenSwipedListeners=[];this.whenMTStartListeners=[];this.whenMTDragListeners=
[];this.whenMTEndListeners=[];this.whenFocusChangedListeners=[];h.NO_PHYSICS||this.initPhysics();this.gravityX=this.scene.gravityX;this.gravityY=this.scene.gravityY;this.loadTerrain();this.loadRegions();this.loadTerrainRegions();this.loadActors();this.loadCamera();this.loadJoints();this.loadDeferredActors();h.initBehaviors(this.behaviors,this.scene.behaviorValues,this,this,!0);this.initActorScripts()},initPhysics:function(){var a=new y(this.scene.gravityX,this.scene.gravityY);this.world=new eb(a,
!1);eb.m_continuousPhysics=!1;eb.m_warmStarting=!0;a=new fd;a.lowerBound.x=0;a.lowerBound.y=0;a.upperBound.x=h.screenWidth/h.physicsScale;a.upperBound.y=h.screenHeight/h.physicsScale;this.world.setScreenBounds(a);h.debugDrawer=new ad;h.debugDrawer.setSprite(this.debugLayer);h.debugDrawer.setLineThickness(3);h.debugDrawer.setDrawScale(10*h.SCALE);h.debugDrawer.setFillAlpha(0);h.debugDrawer.setFlags(ad.e_shapeBit|ad.e_jointBit);this.world.setDebugDraw(h.debugDrawer)},loadActors:function(){this.actorsToCreate=
[];for(var a=this.scene.actors.iterator();a.hasNext();){var b=a.next();this.actorsToCreate.push(this.createActor(b,!0))}},loadDeferredActors:function(){for(var a=0,b=this.actorsToCreateInNextScene;a<b.length;){var c=b[a];++a;l.lastCreatedActor=this.createActorOfType(c.type,c.x,c.y,c.layer)}this.actorsToCreateInNextScene=[]},initActorScripts:function(){for(var a=0,b=this.actorsToCreate;a<b.length;){var c=b[a];++a;c.initScripts()}this.actorsToCreate=null},loadCamera:function(){this.camera=new Da(this,
-1,na.DOODAD_ID,0,0,this.getTopLayer(),2,2,null,null,null,null,!0,!1,!0,!1,null,0,!0,!1);this.camera.set_name("Camera");this.camera.isCamera=!0;h.cameraX=0;h.cameraY=0},loadRegions:function(){this.regions=new Kc(32);this.regions.reuseIterator=!0;for(var a=this.scene.regions.iterator();a.hasNext();){var b=a.next(),c=new $b(this,b.x,b.y,b.shapes,b.simpleBounds);c.set_name(b.name);h.NO_PHYSICS||(c.setX(h.toPixelUnits(b.x)+c.regionWidth/2),c.setY(h.toPixelUnits(b.y)+c.regionHeight/2));c.ID=b.ID;this.addRegion(c)}},
loadTerrainRegions:function(){this.terrainRegions=new xa;if(!h.NO_PHYSICS)for(var a=this.scene.terrainRegions.iterator();a.hasNext();){var b=a.next(),c=new Te(this,b.x,b.y,b.shapes,b.groupID,b.fillColor);c.set_name(b.name);c.setX(h.toPixelUnits(b.x)+c.regionWidth/2);c.setY(h.toPixelUnits(b.y)+c.regionHeight/2);c.ID=b.ID;this.addTerrainRegion(c)}},loadJoints:function(){if(!h.NO_PHYSICS)for(var a=this.scene.joints.iterator();a.hasNext();){var b=a.next(),c=b.actor1,d=b.actor2,e=b.collideConnected,f=
null,g=null,k=null;if(3==b.type)c=this.createStickJoint(this.getActor(c).body,this.getActor(d).body,b.ID,e),this.joints.h[b.ID]=c;else if(1==b.type){var p;p=q.__cast(b,Ef);k=this.getActor(c).body.getLocalCenter().copy();k.x=h.toPixelUnits(k.x);k.y=h.toPixelUnits(k.y);f=this.getActor(c).body;g=-1==d?this.world.m_groundBody:this.getActor(d).body;c=this.createHingeJoint(f,g,k,b.ID,e,p.enableLimit,p.enableMotor,p.lowerAngle,p.upperAngle,p.maxMotorTorque,-p.motorSpeed);this.joints.h[b.ID]=c}else if(2==
b.type||7==b.type)p=q.__cast(b,Ff),k=this.getActor(c).body.getLocalCenter().copy(),k.x=h.toPixelUnits(k.x),k.y=h.toPixelUnits(k.y),f=this.getActor(c).body,g=-1==d?this.world.m_groundBody:this.getActor(d).body,c=this.createSlidingJoint(f,g,p.localAxisA,b.ID,e,p.enableLimit,p.enableMotor,p.lowerTranslation,p.upperTranslation,p.maxMotorForce,p.motorSpeed),this.joints.h[b.ID]=c}},loadTerrain:function(){this.initLayers();for(var a=0,b=this.scene.wireframes;a<b.length;){var c=b[a];++a;var d=null;h.NO_PHYSICS||
(d=new Da(this,I.INTEGER_MAX,na.TERRAIN_ID,c.x,c.y,this.getTopLayer(),c.width|0,c.height|0,null,new ma,null,null,!1,!0,!1,!1,c.shape));d.set_name("Terrain");d.typeID=-1;d.set_visible(!1);this.getGroup(na.TERRAIN_ID).addChild(d)}},initLayers:function(){this.setColorBackground(this.scene.colorBackground);this.animatedTiles=this.scene.animatedTiles;if(null!=this.animatedTiles)for(var a=0,b=this.animatedTiles;a<b.length;){var c=b[a];++a;c.currFrame=0;c.currTime=0;c.updateSource=!0}this.layers=this.scene.layers;
this.layersToDraw=new xa;this.layersByName=new ma;this.interactiveLayers=[];this.backgroundLayers=[];for(var b=a=!1,c=0,d=-1,e=new xa,f=this.layers.iterator();f.hasNext();){var g=f.next(),d=u["int"](Math.max(d,g.order));e.h[g.order]=g;this.layersByName.set(g.layerName,g);q.__instanceof(g,Ub)?this.interactiveLayers.push(q.__cast(g,Ub)):q.__instanceof(g,sc)&&this.backgroundLayers.push(q.__cast(g,sc))}f=0;for(g=d+1;f<g;){var k=f++,p=d-k,k=e.h[k];k.order=p;this.layersToDraw.h[p]=k}e=0;for(d+=1;e<d;)f=
e++,g=this.layersToDraw.h[f],q.__instanceof(g,sc)?(f=q.__cast(g,sc),f.load(),this.master.addChild(f)):q.__instanceof(g,Ub)&&(g=q.__cast(g,Ub),a||(a=!0,this.bottomLayer=f),b||c!=Math.floor(this.interactiveLayers.length/2)||(b=!0,this.middleLayer=f),this.master.addChild(g),this.actorsPerLayer.h[g.ID]=g.actorContainer,this.topLayer=f,this.defaultGroup=g.actorContainer,h.NO_PHYSICS&&g.tiles.mountGrid(),c++);null==this.defaultGroup&&(this.defaultGroup=new me(0,"",0,1,1,1,10),this.master.addChild(this.defaultGroup))},
setColorBackground:function(a){a.draw(this.colorLayer.get_graphics(),0,0,h.screenWidth*h.SCALE|0,h.screenHeight*h.SCALE|0)},optimizePool:function(){for(var a=this.recycledActorsOfType.iterator();a.hasNext();){for(var b=a.next(),c=[],d=0;d<b.length;){var e=b[d];++d;null!=e&&e.recycled&&c.push(e)}for(d=0;d<c.length;)e=c[d],++d,P.remove(b,e),this.removeActor(e)}},cleanup:function(){null!=h.debugDrawer&&null!=h.debugDrawer.m_sprite&&h.debugDrawer.m_sprite.get_graphics().clear();I.removeAllChildren(this.master);
I.removeAllChildren(this.hudLayer);this.behaviors.destroy();for(var a=this.actorsPerLayer.iterator();a.hasNext();){var b=a.next();I.removeAllChildren(b)}this.camera.destroy();this.camera=null;if(null!=this.world){a=this.world.getBodyList();for(b=this.world.getJointList();null!=b;)this.world.destroyJoint(b),b=b.getNext();for(;null!=a;)this.world.destroyBody(a),a=a.getNext()}for(a=this.actorsOfType.iterator();a.hasNext();)a.next().length=0;for(a=this.recycledActorsOfType.iterator();a.hasNext();)for(var b=
a.next(),c=0;c<b.length;){var d=b[c];++c;d.destroyed||d.destroy()}for(a=this.recycledActorsOfType.iterator();a.hasNext();)a.next().length=0;a=0;for(b=this.interactiveLayers;a<b.length;)c=b[a],++a,c.tiles.clearBitmap();for(a=this.allActors.iterator();a.hasNext();)a.next().destroy();for(;0<Wg.count(this.allActors);)for(a=this.allActors.keys();a.hasNext();)b=a.next(),this.allActors.clr(b);this.scene.unload();this.whenKeyPressedListeners=this.disableCollisionList=this.collisionPairs=this.tasks=this.scene=
this.allActors=this.reverseGroups=this.groups=this.joints=this.terrainRegions=this.regions=this.animatedTiles=this.dynamicTiles=this.layersToDraw=this.actorsPerLayer=this.backgroundLayers=this.interactiveLayers=this.layersByName=this.layers=this.hudActors=this.recycledActorsOfType=this.actorsOfType=null;this.hasKeyPressedListeners=!1;this.nativeListeners=this.whenFocusChangedListeners=this.whenMTEndListeners=this.whenMTDragListeners=this.whenMTStartListeners=this.whenSwipedListeners=this.whenPausedListeners=
this.whenMouseDraggedListeners=this.whenMouseMovedListeners=this.whenMouseReleasedListeners=this.whenMousePressedListeners=this.whenDrawingListeners=this.whenUpdatedListeners=this.soundListeners=this.collisionListeners=this.typeGroupPositionListeners=this.whenTypeGroupDiesListeners=this.whenTypeGroupCreatedListeners=this.whenAnyGamepadReleasedListeners=this.whenAnyGamepadPressedListeners=this.whenAnyKeyReleasedListeners=this.whenAnyKeyPressedListeners=null;l.lastCreatedActor=null;l.lastCreatedJoint=
null;l.lastCreatedRegion=null;l.lastCreatedTerrainRegion=null;A.update();this.world=null},switchScene:function(a,b,c){if(!this.isTransitioning()){null!=b&&b.isComplete()&&b.reset();if(null==b||0==b.duration)b=new Ea(0);if(null==c||0==c.duration)c=new Ea(1);this.leave=b;this.enter=c;this.leave.isComplete()||this.leave.start();this.sceneToEnter=a}},enterScene:function(){this.enter.isComplete()||(this.enter.start(),null!=this.leave&&this.leave.cleanup());this.leave=null;this.cleanup();this.loadScene(this.sceneToEnter)},
isTransitioning:function(){return null!=this.enter&&this.enter.isActive()||null!=this.leave&&this.leave.isActive()?!0:!1},isTransitioningOut:function(){return null!=this.leave&&this.leave.isActive()?!0:!1},createActorInNextScene:function(a,b,c,d){this.actorsToCreateInNextScene.push(new cl(a,b,c,d))},createActor:function(a,b){var c;c=q.__cast(la.get().resources.get(a.actorType.spriteID),Hf);c=new Da(this,a.elementID,a.groupID,a.x/h.physicsScale,a.y/h.physicsScale,a.layerID,c.width,c.height,c,a.behaviorValues,
a.actorType,h.NO_PHYSICS?null:a.actorType.bodyDef,!1,!1,!1,!1,null,a.actorType.ID,a.actorType.autoScale,a.actorType.ignoreGravity,a.actorType.physicsMode);if(0!=a.angle)if(0!=c.currOffset.x||0!=c.currOffset.y){var d=c.currOrigin.x|0,e=c.currOrigin.y|0;c.setOriginPoint(c.cacheWidth/2|0,c.cacheHeight/2|0);c.setAngle(a.angle,!1);c.setOriginPoint(d,e)}else c.setAngle(a.angle,!1);1==a.scaleX&&1==a.scaleY||c.growTo(a.scaleX,a.scaleY,0);c.set_name(a.actorType.name);this.moveActorToLayer(c,a.layerID);null==
this.recycledActorsOfType.h[a.actorType.ID]&&(this.recycledActorsOfType.h[a.actorType.ID]=[]);this.recycledActorsOfType.h[a.actorType.ID].push(c);2>a.actorType.physicsMode&&(d=this.groups.h[a.groupID],null!=d&&d.addChild(c));a.elementID==I.INTEGER_MAX?(this.nextID++,c.ID=this.nextID,this.allActors.set(c.ID,c)):(this.allActors.set(c.ID,c),this.nextID=u["int"](Math.max(c.ID,this.nextID)));c.internalUpdate(0,!1);c.updateDrawingMatrix();null!=a.actorType&&(d=this.actorsOfType.h[a.actorType.ID],null==
d&&(d=[],this.actorsOfType.h[a.actorType.ID]=d),null!=d&&d.push(c));return c},removeActor:function(a){this.allActors.clr(a.ID);this.removeActorFromLayer(a,a.layerID);var b=a.getGroupID();this.groups.h[b].removeChild(a);(a.isHUD||a.alwaysSimulate)&&this.hudActors.clr(a.ID);a.destroy();null!=la.get().resources.get(a.typeID)&&(b=q.__cast(la.get().resources.get(a.typeID),Od),b=this.actorsOfType.h[b.ID],null!=b&&P.remove(b,a))},removeActorFromLayer:function(a,b){var c=this.actorsPerLayer.h[b];null==c&&
(c=this.defaultGroup);c.contains(a)&&c.removeChild(a)},moveActorToLayer:function(a,b){var c=this.actorsPerLayer.h[b];null==c&&(c=this.defaultGroup);c.addChild(a);a.layerID=b},recycleActor:function(a){if(null!=a&&!a.recycled){var b=h.engine.whenTypeGroupDiesListeners.get(a.getType()),c=h.engine.whenTypeGroupDiesListeners.get(a.getGroup());h.invokeListeners(a.whenKilledListeners);null!=b&&h.invokeListeners2(b,a);null!=c&&h.invokeListeners2(c,a);a.isHUD&&a.unanchorFromScreen();a.alwaysSimulate&&a.makeSometimesSimulate(!1);
a.firstMove=!1;a.setX(1E6,!1,!0);a.setY(1E6,!1,!0);a.colX=1E6;a.colY=1E6;a.recycled=!0;a.killLeaveScreen=!1;a.lastScreenState=!1;a.lastSceneState=!1;a.cancelTweens();a.clearFilters();a.resetBlendMode();a.fadeTo(1,.01);a.realScaleX=1;a.realScaleY=1;a.switchToDefaultAnimation();a.disableActorDrawing();a.removeAttachedImages();if(0==a.physicsMode&&null!=a.body)for(b=a.body.getContactList();null!=b;)h.engine.world.m_contactManager.m_contactListener.endContact(b.contact),b=b.next;a.removeAllListeners();
a.resetListeners();this.removeActorFromLayer(a,a.layerID);0==a.physicsMode&&(a.body.setActive(!1),a.body.setAwake(!1),null!=a.body.m_prev&&(a.body.m_prev.m_next=a.body.m_next),null!=a.body.m_next&&(a.body.m_next.m_prev=a.body.m_prev),a.body==this.world.m_bodyList&&(this.world.m_bodyList=a.body.m_next),a.body.m_prev=null,a.body.m_next=null,--this.world.m_bodyCount);a.xSpeed=0;a.ySpeed=0;a.rSpeed=0;a.continuousCollision=!1;b=0;for(c=this.tasks;b<c.length;){var d=c[b];++b;d.actor==a&&this.removeTask(d)}this.allActors.clr(a.ID)}},
getRecycledActorOfType:function(a,b,c,d){var e=0,e=d==l.FRONT?this.getTopLayer():d==l.BACK?this.getBottomLayer():this.getMiddleLayer();return this.getRecycledActorOfTypeOnLayer(a,b,c,e)},getRecycledActorOfTypeOnLayer:function(a,b,c,d){var e=null;null==this.recycledActorsOfType.h[a.ID]&&(this.recycledActorsOfType.h[a.ID]=[]);var f=this.recycledActorsOfType.h[a.ID];if(null!=f){for(var g=0;g<f.length;)if(e=f[g],++g,null!=e&&e.recycled)return e.createTime=ka.getTimer(),this.allActors.set(e.ID,e),e.dead=
!1,e.dying=!1,e.recycled=!1,e.killLeaveScreen=!1,e.switchToDefaultAnimation(),e.enableAllBehaviors(),0==e.physicsMode&&(e.body.setActive(!0),e.body.setAwake(!0),e.body.m_prev=null,e.body.m_next=this.world.m_bodyList,null!=this.world.m_bodyList&&(this.world.m_bodyList.m_prev=e.body),this.world.m_bodyList=e.body,++this.world.m_bodyCount),e.registry=new ma,e.enableActorDrawing(),e.setX(b,!1,!0),e.setY(c,!1,!0),0==e.physicsMode&&(e.colX=b,e.colY=c),e.setAngle(0,!1),e.setIgnoreGravity(e.defaultGravity),
e.set_alpha(1),e.realScaleX=1,e.realScaleY=1,null!=e.bodyDef&&(e.continuousCollision=e.bodyDef.bullet),this.moveActorToLayer(e,d),e.initScripts(),a=this.whenTypeGroupCreatedListeners.h[a.__id__],b=this.whenTypeGroupCreatedListeners.get(e.getGroup()),null!=a&&h.invokeListeners2(a,e),null!=b&&h.invokeListeners2(b,e),e;e=this.createActorOfType(a,b,c,d)}return e},createActorOfType:function(a,b,c,d){if(null==a)return null;b=new Mi(I.INTEGER_MAX,b|0,c|0,1,1,d,0,a.groupID,a.ID,null,!1);b=this.createActor(b,
!0);b.initScripts();a=this.whenTypeGroupCreatedListeners.h[a.__id__];c=this.whenTypeGroupCreatedListeners.get(b.getGroup());null!=a&&h.invokeListeners2(a,b);null!=c&&h.invokeListeners2(c,b);return b},getTopLayer:function(){return this.layersToDraw.h[this.topLayer].ID},getBottomLayer:function(){return this.layersToDraw.h[this.bottomLayer].ID},getMiddleLayer:function(){return this.layersToDraw.h[this.middleLayer].ID},update:function(a){if(null!=this.scene){rb.stage_onEnterFrame(null);if(!h.NO_PHYSICS){var b=
this.world.getScreenBounds();b.lowerBound.x=(Math.abs(h.cameraX/h.SCALE)-h.paddingLeft)/h.physicsScale;b.lowerBound.y=(Math.abs(h.cameraY/h.SCALE)-h.paddingTop)/h.physicsScale;b.upperBound.x=b.lowerBound.x+(h.screenWidth+h.paddingRight+h.paddingLeft)/h.physicsScale;b.upperBound.y=b.lowerBound.y+(h.screenHeight+h.paddingBottom+h.paddingTop)/h.physicsScale}var b=A.mouseX/h.SCALE|0,c=A.mouseY/h.SCALE|0;A.mousePressed&&(l.mpx=b,l.mpy=c,h.invokeListeners(this.whenMousePressedListeners));A.mouseReleased&&
(l.mrx=b,l.mry=c,h.invokeListeners(this.whenMouseReleasedListeners));if(this.mx!=b||this.my!=c)this.mx=b,this.my=c,h.invokeListeners(this.whenMouseMovedListeners),A.mouseDown&&!A.mousePressed&&h.invokeListeners(this.whenMouseDraggedListeners);for(b=0;b<this.tasks.length;)c=this.tasks[b],c.done||c.update(h.STEP_SIZE),c.done&&(P.remove(this.tasks,c),b--),b++;if(this.hasKeyPressedListeners){for(b=this.whenKeyPressedListeners.keys();b.hasNext();){var d=b.next(),c=A.pressed(d),e=A.released(d);if(c||e)d=
this.whenKeyPressedListeners.get(d),h.invokeListeners3(d,c,e)}this.keyPollOccurred=!0}h.invokeListeners2(this.whenUpdatedListeners,a);h.NO_PHYSICS||(this.world.step(.01,3,3),this.world.clearForces(),h.DEBUG_DRAW&&this.world.drawDebugData());if(0!=this.regions._h._size)for(b=this.regions.iterator();b.hasNext();)c=b.next(),null!=c&&c.innerUpdate(a,!0);for(;0<this.disableCollisionList.length;)this.disableCollisionList.pop();if(0!=this.collisionPairs._h._size)for(b=this.collisionPairs.keys();b.hasNext();)c=
b.next(),this.collisionPairs.clr(c);Ue.updateAll(a);if(0!=this.allActors._h._size)for(b=this.allActors.iterator();b.hasNext();)c=b.next(),null==c||c.dead||c.recycled||(e=(0<c.physicsMode||c.body.isActive())&&c.colX+c.cacheWidth>=-h.cameraX/h.SCALE-h.paddingLeft&&c.colY+c.cacheHeight>=-h.cameraY/h.SCALE-h.paddingTop&&c.colX<-h.cameraX/h.SCALE+h.screenWidth+h.paddingRight&&c.colY<-h.cameraY/h.SCALE+h.screenHeight+h.paddingBottom,c.isOnScreenCache=e,0==c.physicsMode&&null!=c.body?c.killLeaveScreen&&
!e?this.recycleActor(c):(c.body.isActive()||c.alwaysSimulate||c.isHUD)&&c.innerUpdate(a,!1):0<c.physicsMode&&(c.killLeaveScreen&&!e?this.recycleActor(c):(e||c.alwaysSimulate||c.isHUD)&&c.innerUpdate(a,!1)),c.dead&&this.disableCollisionList.push(c));this.keyPollOccurred=!1;b=0;for(c=this.disableCollisionList.length;b<c;)e=b++,e=this.disableCollisionList[e],null!=e&&(e.handlesCollisions=!1);b=0;for(c=this.animatedTiles.length;b<c;)e=b++,e=this.animatedTiles[e],e.update(a),this.tileUpdated=this.tileUpdated||
e.updateSource;null!=this.leave&&this.leave.isActive()?this.leave.update(a):null!=this.enter&&this.enter.isActive()&&this.enter.update(a);for(b=this.layers.iterator();b.hasNext();)b.next().updatePosition(h.cameraX,h.cameraY,a);!h.NO_PHYSICS&&h.DEBUG_DRAW&&(this.debugLayer.set_x(h.cameraX),this.debugLayer.set_y(h.cameraY));this.isShaking&&(this.shakeTimer-=h.STEP_SIZE,0>=this.shakeTimer?this.stopShakingScreen():(a=-this.shakeIntensity*h.screenWidth+2*Math.random()*this.shakeIntensity*h.screenWidth,
b=-this.shakeIntensity*h.screenHeight+2*Math.random()*this.shakeIntensity*h.screenHeight,this.master.set_x(a*h.SCALE),this.master.set_y(b*h.SCALE)))}},onUpdate:function(a){a=ka.getTimer();var b=a-this.lastTime;200<=b&&(b=200);this.acc+=b;h.elapsedTime=b;null!=this.leave?(rb.stage_onEnterFrame(null),this.leave.isComplete()&&(this.leave.deactivate(),this.enterScene())):null!=this.enter&&this.enter.isComplete()&&(this.enter.deactivate(),this.enter.cleanup(),this.enter=null);this.postUpdate(a)},postUpdate:function(a){for(;this.acc>
h.STEP_SIZE;)this.update(h.STEP_SIZE),this.acc-=h.STEP_SIZE,A.update();this.lastTime=a;if(0!=this.allActors._h._size)for(a=this.allActors.iterator();a.hasNext();){var b=a.next();null==b||0==b.physicsMode&&null==b.body||(null!=b.currAnimation&&b.currAnimation.needsBitmapUpdate()&&b.currAnimation.updateBitmap(),b.dead||b.dying?this.removeActor(b):b.updateMatrix||b.resetOrigin?(b.updateDrawingMatrix(),b.updateMatrix=!1,b.resetOrigin=!1):b.smoothMove&&(b.drawX==b.realX&&b.drawY==b.realY||b.updateDrawingMatrix()))}this.draw()},
onFocus:function(a){this.focusChanged(!1)},onFocusLost:function(a){this.focusChanged(!0)},focusChanged:function(a){null!=this.whenFocusChangedListeners&&h.invokeListeners2(this.whenFocusChangedListeners,a)},handleCollision:function(a,b){var c=a.typeID,d=b.otherActor.typeID,e=0,f=0;if(h.NO_PHYSICS)e=Da.GROUP_OFFSET+b.groupA,f=Da.GROUP_OFFSET+b.groupB;else if(null!=b.thisShape?(e=b.thisShape.groupID,e==na.INHERIT_ID&&(f=b.thisShape.getBody(),null!=f&&(e=f.getUserData().groupID)),e=Da.GROUP_OFFSET+e):
e=Da.GROUP_OFFSET+b.thisActor.groupID,null!=b.otherShape){f=b.otherShape.groupID;if(f==na.INHERIT_ID){var g=b.otherShape.getBody();null!=g&&(f=g.getUserData().groupID)}f=Da.GROUP_OFFSET+f}else f=Da.GROUP_OFFSET+b.otherActor.groupID;if(null!=this.collisionPairs&&(this.collisionPairs._h.hasKey(a.ID)||this.collisionPairs.set(a.ID,new xa),this.collisionPairs._h.hasKey(b.otherActor.ID)||this.collisionPairs.set(b.otherActor.ID,new xa),this.collisionPairs.get(a.ID).exists(b.otherActor.ID)||this.collisionPairs.get(b.otherActor.ID).exists(a.ID)))return;
if(-1<c||-1<d)if(!b.otherCollidedWithTerrain&&this.collisionListeners.h.hasOwnProperty(c)&&this.collisionListeners.h[c].exists(d)&&(g=this.collisionListeners.h[c].get(d),h.invokeListeners2(g,b),0==g.length&&this.collisionListeners.h[c].remove(d)),c!=d&&this.collisionListeners.h.hasOwnProperty(d)&&this.collisionListeners.h[d].exists(c)){var g=this.collisionListeners.h[d].get(c),k=b.switchData(fc.get());h.invokeListeners2(g,k);0==g.length&&this.collisionListeners.h[d].remove(c)}0<e&&0<f&&(this.collisionListeners.h.hasOwnProperty(e)&&
this.collisionListeners.h[e].exists(f)&&(c=this.collisionListeners.h[e].get(f),h.invokeListeners2(c,b),0==c.length&&this.collisionListeners.h[e].remove(f)),e!=f&&this.collisionListeners.h.hasOwnProperty(f)&&this.collisionListeners.h[f].exists(e)&&(c=this.collisionListeners.h[f].get(e),d=b.switchData(fc.get()),h.invokeListeners2(c,d),0==c.length&&this.collisionListeners.h[f].remove(e)));null!=this.collisionPairs&&(this.collisionPairs.get(a.ID).set(b.otherActor.ID,!1),this.collisionPairs.get(b.otherActor.ID).set(a.ID,
!1))},soundFinished:function(a){var b;b=q.__cast(this.channels[a],we);if(null!=this.soundListeners){a=this.soundListeners.h[a.__id__];var c=this.soundListeners.h[b.currentClip.__id__];null!=a&&h.invokeListeners(a);null!=c&&h.invokeListeners(c)}b.currentSound=null},addTask:function(a){this.tasks.push(a)},removeTask:function(a){P.remove(this.tasks,a)},shakeScreen:function(a,b){this.shakeTimer=h.MS_PER_SEC*b|0;this.isShaking=!0;this.shakeIntensity=a},stopShakingScreen:function(){this.shakeTimer=0;this.isShaking=
!1;this.master.set_x(0);this.master.set_y(0)},cameraFollow:function(a,b,c){this.moveCamera(a.colX+a.cacheWidth/2,a.colY+a.cacheHeight/2)},moveCamera:function(a,b){this.camera.setLocation(a,b);h.cameraX=-Math.abs(this.camera.realX)+h.screenWidthHalf;h.cameraY=-Math.abs(this.camera.realY)+h.screenHeightHalf;h.cameraX=Math.max(h.cameraX,-h.sceneWidth+h.screenWidth);h.cameraY=Math.max(h.cameraY,-h.sceneHeight+h.screenHeight);h.cameraX*=h.SCALE;h.cameraY*=h.SCALE;h.cameraX=Math.min(0,h.cameraX);h.cameraY=
Math.min(0,h.cameraY);1!=this.zoomMultiplier&&this.isHUDZoomable&&(this.hudLayer.set_x(-l.getScreenX()),this.hudLayer.set_y(-l.getScreenY()))},setZoom:function(a){0>=a||(this.zoomMultiplier=a,this.root.set_scaleX(a*h.originalScaleX),this.root.set_scaleY(a*h.originalScaleY),h.screenScaleX=a*h.originalScaleX,h.screenScaleY=a*h.originalScaleY,h.screenWidth=1/a*ra.stageWidth|0,h.screenWidthHalf=h.screenWidth/2|0,h.screenHeight=1/a*ra.stageHeight|0,h.screenHeightHalf=h.screenHeight/2|0,this.setColorBackground(this.scene.colorBackground),
this.root.set_scrollRect(new ha(0,0,h.screenWidth,h.screenHeight)),this.moveCamera(this.camera.realX,this.camera.realY),this.isHUDZoomable||(this.hudLayer.set_scaleX(1/a),this.hudLayer.set_scaleY(1/a)))},pause:function(){if(!this.isTransitioning()){h.paused=!0;if(0!=this.allActors._h._size)for(var a=this.allActors.keys();a.hasNext();){var b=a.next(),b=this.allActors.get(b);null!=b&&b.pause()}h.invokeListeners2(this.whenPausedListeners,!0)}},unpause:function(){h.paused=!1;if(0!=this.allActors._h._size)for(var a=
this.allActors.keys();a.hasNext();){var b=a.next(),b=this.allActors.get(b);null!=b&&b.unpause()}h.invokeListeners2(this.whenPausedListeners,!1)},isPaused:function(){return h.paused},draw:function(){for(var a=0,b=this.interactiveLayers;a<b.length;){var c=b[a];++a;c.overlay.get_graphics().clear();c.drawnOn&&(c.bitmapOverlay.bitmapData.fillRect(c.bitmapOverlay.bitmapData.rect,0),c.drawnOn=!1)}if(0!=this.hudActors._h._size)for(a=this.hudActors.iterator();a.hasNext();)b=a.next(),(b.dead||b.recycled)&&
this.hudActors.clr(b.ID);if(0!=this.allActors._h._size)for(a=this.allActors.iterator();a.hasNext();)b=a.next(),0<b.whenDrawingListeners.length&&(c=q.__cast(this.layers.get(b.layerID),Ub),null!=c&&(c.drawnOn=!0,this.g.graphics=c.overlay.get_graphics(),this.g.canvas=c.bitmapOverlay.bitmapData,this.g.translateToActor(b),this.g.resetGraphicsSettings(),h.invokeListeners4(b.whenDrawingListeners,this.g,0,0)));a=0;for(b=this.interactiveLayers;a<b.length;)if(c=b[a],++a,c.cameraMoved||this.tileUpdated)c.tiles.draw(h.cameraX*
c.scrollFactorX|0,h.cameraY*c.scrollFactorY|0),c.cameraMoved=!1;this.tileUpdated=!1;this.g.graphics=this.transitionLayer.get_graphics();this.g.canvas=this.transitionBitmapLayer.bitmapData;this.g.translateToScreen();this.g.graphics.clear();this.g.canvas.fillRect(this.g.canvas.rect,0);this.g.resetGraphicsSettings();h.invokeListeners4(this.whenDrawingListeners,this.g,0,0);null!=this.leave&&this.leave.isActive()?this.leave.draw(null):null!=this.enter&&this.enter.isActive()&&this.enter.draw(null)},getValue:function(a,
b){return this.behaviors.getAttribute(a,b)},setValue:function(a,b,c){this.behaviors.setAttribute(a,b,c)},say:function(a,b,c){return this.behaviors.call2(a,b,c)},shout:function(a,b){return this.behaviors.call(a,b)},getActor:function(a){return this.allActors.get(a)},getActorsOfType:function(a){return null==a?[]:null!=this.actorsOfType.h[a.ID]?this.actorsOfType.h[a.ID]:[]},getRecycledActorsOfType:function(a){return this.recycledActorsOfType.h[a.ID]},addHUDActor:function(a){this.hudActors.set(a.ID,a)},
removeHUDActor:function(a){this.hudActors.clr(a.ID)},getLayer:function(a,b){return 0==a?h.engine.layers.get(u.parseInt(b)):h.engine.layersByName.get(b)},moveToLayer:function(a,b,c){b=this.getLayer(b,c);q.__instanceof(b,Ub)&&a.layerID!=b.ID&&(this.removeActorFromLayer(a,a.layerID),a.layerID=b.ID,this.moveActorToLayer(a,b.ID))},sendToBack:function(a){this.removeActorFromLayer(a,a.layerID);a.layerID=this.getBottomLayer();this.moveActorToLayer(a,a.layerID)},sendBackward:function(a){this.removeActorFromLayer(a,
a.layerID);for(var b=this.layers.get(a.layerID).order;function(a){var d=--b;return a.layersToDraw.h.hasOwnProperty(d)}(this);)if(u.is(this.layersToDraw.h[b],Ub)){a.layerID=this.layersToDraw.h[b].ID;this.moveActorToLayer(a,a.layerID);break}},bringToFront:function(a){this.removeActorFromLayer(a,a.layerID);a.layerID=this.getTopLayer();this.moveActorToLayer(a,a.layerID)},bringForward:function(a){this.removeActorFromLayer(a,a.layerID);for(var b=this.layers.get(a.layerID).order;function(a){var d=++b;return a.layersToDraw.h.hasOwnProperty(d)}(this);)if(u.is(this.layersToDraw.h[b],
Ub)){a.layerID=this.layersToDraw.h[b].ID;this.moveActorToLayer(a,a.layerID);break}},getNumberOfActorsWithinLayer:function(a,b){var c=this.getLayer(a,b);return q.__instanceof(c,Ub)?q.__cast(c,Ub).actorContainer.get_numChildren():0},getNumberOfLayers:function(){return this.master.get_numChildren()},getOrderOfLayer:function(a,b){return this.getLayer(a,b).order},moveLayerToOrder:function(a,b,c){a=this.getLayer(a,b);0>c&&(c=0);c>this.master.get_numChildren()-1&&(c=this.master.get_numChildren()-1);a.order!=
c&&(this.master.setChildIndex(a,c),this.refreshLayers())},getNextLayerID:function(){for(var a=-1,b=this.layers.iterator();b.hasNext();)var c=b.next(),a=u["int"](Math.max(a,c.ID));return a+1},insertLayer:function(a,b){this.master.addChildAt(a,b);q.__instanceof(a,sc)?this.backgroundLayers.push(q.__cast(a,sc)):q.__instanceof(a,Ub)&&this.interactiveLayers.push(q.__cast(a,Ub));this.layers.set(a.ID,a);this.layersByName.set(a.layerName,a);this.refreshLayers()},removeLayer:function(a){this.master.removeChild(a);
if(q.__instanceof(a,sc)){var b;b=q.__cast(a,sc);P.remove(this.backgroundLayers,b)}else q.__instanceof(a,Ub)&&(b=q.__cast(a,Ub),P.remove(this.interactiveLayers,b));this.layers.clr(a.ID);this.layersByName.remove(a.layerName);this.refreshLayers()},refreshLayers:function(){for(var a=!1,b=!1,c=0,d=0,e=this.master.get_numChildren();d<e;){var f=d++,g;g=q.__cast(this.master.getChildAt(f),me);this.layersToDraw.h[f]=g;q.__instanceof(g,Ub)&&(a||(a=!0,this.bottomLayer=f),b||c!=Math.floor(this.interactiveLayers.length/
2)||(b=!0,this.middleLayer=f),this.topLayer=f,c++)}},getPhysicalWidth:function(){return this.physicalWidth},getPhysicalHeight:function(){return this.physicalHeight},enableGlobalSleeping:function(){this.world.m_allowSleep=!0},disableGlobalSleeping:function(){this.world.m_allowSleep=!1},getGroup:function(a,b){if(a==na.INHERIT_ID&&null!=b){var c=b.getGroupID();return this.groups.h[c]}return this.groups.h[a]},getGroupByName:function(a){a=this.reverseGroups.get(a);return null==a?this.groups.h[na.ACTOR_ID]:
a},nextJointID:function(){for(var a=-1,b=this.joints.iterator();b.hasNext();){var c=b.next();null!=c&&(a=u["int"](Math.max(a,c.ID)))}return a+1},addJoint:function(a){var b=this.nextJointID();a.ID=b;this.joints.h[b]=a},getJoint:function(a){return this.joints.h[a]},destroyJoint:function(a){this.joints.remove(a.ID);this.world.destroyJoint(a)},createStickJoint:function(a,b,c,d,e,f){null==f&&(f=0);null==e&&(e=0);null==d&&(d=!1);null==c&&(c=-1);var g=a.getLocalCenter(),k=b.getLocalCenter();0==a.getType()&&
(g.x=q.__cast(a.getUserData(),Da).getPhysicsWidth()/2,g.y=q.__cast(a.getUserData(),Da).getPhysicsHeight()/2);0==b.getType()&&(k.x=q.__cast(b.getUserData(),Da).getPhysicsWidth()/2,k.y=q.__cast(b.getUserData(),Da).getPhysicsHeight()/2);var g=a.getWorldPoint(g),k=b.getWorldPoint(k),p=new Df;p.initialize(a,b,g,k);p.collideConnected=d;p.dampingRatio=e;p.frequencyHz=f;a=this.world.createJoint(p);-1==c?this.addJoint(a):(this.joints.h[c]=a,a.ID=c);return q.__cast(a,ig)},createCustomStickJoint:function(a,
b,c,d,e,f){b=new y(b,c);e=new y(e,f);b.x=h.toPhysicalUnits(b.x);b.y=h.toPhysicalUnits(b.y);e.x=h.toPhysicalUnits(e.x);e.y=h.toPhysicalUnits(e.y);b=a.getWorldPoint(b);e=d.getWorldPoint(e);f=new Df;f.initialize(a,d,b,e);a=this.world.createJoint(f);this.addJoint(a);return q.__cast(a,ig)},createHingeJoint:function(a,b,c,d,e,f,g,k,p,w,l){null==l&&(l=0);null==w&&(w=0);null==p&&(p=0);null==k&&(k=0);null==g&&(g=!1);null==f&&(f=!1);null==e&&(e=!1);null==d&&(d=-1);null==b&&(b=this.world.m_groundBody);null==
c&&(c=a.getLocalCenter());var m=new Ef;m.bodyA=a;m.bodyB=b;c.x=h.toPhysicalUnits(c.x);c.y=h.toPhysicalUnits(c.y);m.localAnchorA=c;m.localAnchorB=b.getLocalPoint(a.getWorldPoint(c));m.collideConnected=e;m.enableLimit=f;m.enableMotor=g;m.lowerAngle=k;m.upperAngle=p;m.maxMotorTorque=w;m.motorSpeed=l;a=this.world.createJoint(m);-1==d?this.addJoint(a):(this.joints.h[d]=a,a.ID=d);return q.__cast(a,le)},createSlidingJoint:function(a,b,c,d,e,f,g,k,p,w,l){null==l&&(l=0);null==w&&(w=0);null==p&&(p=0);null==
k&&(k=0);null==g&&(g=!1);null==f&&(f=!1);null==e&&(e=!1);null==d&&(d=-1);null==b&&(b=this.world.m_groundBody);null==c&&(c=new y(1,0));c.normalize();var m=a.getWorldCenter(),n=b.getWorldCenter();0==a.getType()&&null!=q.__cast(a.getUserData(),Da)&&(m.x=q.__cast(a.getUserData(),Da).getPhysicsWidth()/2,m.y=q.__cast(a.getUserData(),Da).getPhysicsHeight()/2,m=a.getWorldPoint(m));0==b.getType()&&null!=q.__cast(b.getUserData(),Da)&&(n.x=q.__cast(b.getUserData(),Da).getPhysicsWidth()/2,n.y=q.__cast(b.getUserData(),
Da).getPhysicsHeight()/2,b.getWorldPoint(n));n=new Ff;n.initialize(a,b,m,c);n.collideConnected=e;n.enableLimit=f;n.enableMotor=g;n.lowerTranslation=h.toPhysicalUnits(k);n.upperTranslation=h.toPhysicalUnits(p);n.maxMotorForce=w;n.motorSpeed=h.toPhysicalUnits(l);a=this.world.createJoint(n);-1==d?this.addJoint(a):(this.joints.h[d]=a,a.ID=d);return q.__cast(a,gh)},createRegion:function(a,b,c,d){null==d&&(d=!1);var e=[];e.push(c);c=new $b(this,a,b,e);d&&(c.setX(h.toPixelUnits(a)+c.regionWidth/2),c.setY(h.toPixelUnits(b)+
c.regionHeight/2));this.addRegion(c);return c},createBoxRegion:function(a,b,c,d){a=h.toPhysicalUnits(a);b=h.toPhysicalUnits(b);c=h.toPhysicalUnits(c);d=h.toPhysicalUnits(d);if(h.NO_PHYSICS)return a=new $b(this,a,b,[],new ha(0,0,c,d)),this.addRegion(a),a;var e=new za;e.setAsBox(c/2,d/2);return this.createRegion(a,b,e,!0)},createCircularRegion:function(a,b,c){a=h.toPhysicalUnits(a);b=h.toPhysicalUnits(b);c=h.toPhysicalUnits(c);if(h.NO_PHYSICS)return a=new $b(this,a,b,[],new ha(0,0,2*c,2*c)),this.addRegion(a),
a;var d=new hb;d.m_radius=c;return this.createRegion(a,b,d,!0)},addRegion:function(a){-1==a.ID&&(a.ID=this.nextRegionID());this.regions.set(a.ID,a);h.NO_PHYSICS&&this.groups.h[na.REGION_ID].addChild(a)},removeRegion:function(a){a=this.getRegion(a);this.regions.clr(a.ID);a.destroy();h.NO_PHYSICS&&this.groups.h[na.REGION_ID].removeChild(a)},getRegion:function(a){return this.regions.get(a)},getRegions:function(){return this.regions},nextRegionID:function(){for(var a=-1,b=this.regions.iterator();b.hasNext();){var c=
b.next();null!=c&&(a=u["int"](Math.max(a,c.ID)))}return a+1},isInRegion:function(a,b){return null!=b&&null!=this.regions.get(b.getID())?b.containsActor(a):!1},createTerrainRegion:function(a,b,c,d,e){null==e&&(e=1);null==d&&(d=!1);var f=[];f.push(c);c=new Te(this,a,b,f,e);d&&(c.setX(h.toPixelUnits(a)+c.regionWidth/2),c.setY(h.toPixelUnits(b)+c.regionHeight/2));this.addTerrainRegion(c);return c},createBoxTerrainRegion:function(a,b,c,d,e){null==e&&(e=1);a=h.toPhysicalUnits(a);b=h.toPhysicalUnits(b);
c=h.toPhysicalUnits(c);d=h.toPhysicalUnits(d);var f=new za;f.setAsBox(c/2,d/2);return this.createTerrainRegion(a,b,f,!0,e)},createCircularTerrainRegion:function(a,b,c,d){null==d&&(d=1);a=h.toPhysicalUnits(a);b=h.toPhysicalUnits(b);c=h.toPhysicalUnits(c);var e=new hb;e.m_radius=c;return this.createTerrainRegion(a,b,e,!0,d)},addTerrainRegion:function(a){-1==a.ID&&(a.ID=this.nextTerrainRegionID());this.terrainRegions.h[a.ID]=a},removeTerrainRegion:function(a){var b=this.getTerrainRegion(a);this.terrainRegions.remove(a);
b.destroy()},getTerrainRegion:function(a){return this.terrainRegions.h[a]},getTerrainRegions:function(){return this.terrainRegions},nextTerrainRegionID:function(){for(var a=-1,b=this.terrainRegions.iterator();b.hasNext();){var c=b.next();null!=c&&(a=u["int"](Math.max(a,c.ID)))}return a+1},setGameAttribute:function(a,b){this.gameAttributes.set(a,b)},getGameAttribute:function(a){return this.gameAttributes.get(a)},setOffscreenTolerance:function(a,b,c,d){h.paddingTop=a;h.paddingLeft=b;h.paddingBottom=
c;h.paddingRight=d},setScrollFactor:function(a,b,c){null==c&&(c=b);this.layers.get(a).scrollFactorX=b;this.layers.get(a).scrollFactorY=c},__class__:h};var A=function(){};n["com.stencyl.Input"]=A;A.__name__=["com","stencyl","Input"];A.lastEvent=null;A.lastKey=null;A.mouseDown=null;A.mouseUp=null;A.mousePressed=null;A.mouseReleased=null;A.mouseWheel=null;A.rightMouseDown=null;A.rightMouseUp=null;A.rightMousePressed=null;A.rightMouseReleased=null;A.middleMouseDown=null;A.middleMouseUp=null;A.middleMousePressed=
null;A.middleMouseReleased=null;A.accelX=null;A.accelY=null;A.accelZ=null;A.numTouches=null;A.swipeDirection=null;A.swipedUp=null;A.swipedDown=null;A.swipedLeft=null;A.swipedRight=null;A.getControlMap=function(){return A._control};A.define=function(a,b){A._control.set(a,b)};A.check=function(a){if("string"==typeof a){a=A._control.get(a);if(null==a)return!1;for(var b=a.length;0<b--;)if(0>a[b]){if(0<A._keyNum)return!0}else if(A._key[a[b]])return!0;return!1}return 0>a?0<A._keyNum:A._key[a]};A.pressed=
function(a){if("string"==typeof a){a=A._control.get(a);if(null==a)return!1;for(var b=a.length;0<b--;)if(0>a[b]?0!=A._pressNum:0<=A.indexOf(A._press,a[b]))return!0;return!1}return 0>a?0!=A._pressNum:0<=A.indexOf(A._press,a)};A.released=function(a){if("string"==typeof a){a=A._control.get(a);if(null==a)return!1;for(var b=a.length;0<b--;)if(0>a[b]?0!=A._releaseNum:0<=A.indexOf(A._release,a[b]))return!0;return!1}return 0>a?0!=A._releaseNum:0<=A.indexOf(A._release,a)};A.indexOf=function(a,b){for(var c=
0,d=0;d<a.length;){var e=a[d];++d;if(b==e)return c;c++}return-1};A.enableSwipeDetection=function(){};A.disableSwipeDetection=function(){};A.enableJoystick=function(){A._joystickEnabled||null==h.stage||(A._joystickEnabled=!0)};A.enable=function(){A._enabled||null==h.stage||(h.stage.addEventListener("keyDown",A.onKeyDown,!1,2),h.stage.addEventListener("keyUp",A.onKeyUp,!1,2),h.stage.addEventListener("mouseDown",A.onMouseDown,!1,2),h.stage.addEventListener("mouseUp",A.onMouseUp,!1,2),h.stage.addEventListener("mouseWheel",
A.onMouseWheel,!1,2),h.stage.addEventListener("touchBegin",A.onMouseDown),h.stage.addEventListener("touchEnd",A.onMouseUp),new Aa(h.engine.root,2),h.engine.root.addEventListener("rox_gesture_swipe",A.onSwipe),A.swipeDirection=-1,A.swipedLeft=!1,A.swipedRight=!1,A.swipedUp=!1,A.swipedDown=!1,A.mouseX=0,A.mouseY=0,A.accelX=0,A.accelY=0,A.accelZ=0,A.numTouches=0,A._enabled=!0)};A.onSwipe=function(a){a=q.__cast(a.extra,W);Math.abs(a.x)<=Math.abs(a.y)?A.swipeDirection=0>=a.y?2:3:Math.abs(a.x)>Math.abs(a.y)&&
(A.swipeDirection=0>=a.x?0:1)};A.update=function(){A.swipedLeft=!1;A.swipedRight=!1;A.swipedUp=!1;A.swipedDown=!1;if(-1<A.swipeDirection){switch(A.swipeDirection){case 0:A.swipedLeft=!0;break;case 1:A.swipedRight=!0;break;case 2:A.swipedUp=!0;break;case 3:A.swipedDown=!0}null!=h.engine.whenSwipedListeners&&h.invokeListeners(h.engine.whenSwipedListeners);A.swipeDirection=-1}A.mouseX=(h.stage.get_mouseX()-h.screenOffsetX)/h.screenScaleX;for(A.mouseY=(h.stage.get_mouseY()-h.screenOffsetY)/h.screenScaleY;-1<
A._pressNum--;)A._press[A._pressNum]=-1;for(A._pressNum=0;-1<A._releaseNum--;)A._release[A._releaseNum]=-1;A._releaseNum=0;A.mousePressed&&(A.mousePressed=!1);A.mouseReleased&&(A.mouseReleased=!1);A.rightMousePressed&&(A.rightMousePressed=!1);A.rightMouseReleased&&(A.rightMouseReleased=!1);A.middleMousePressed&&(A.middleMousePressed=!1);A.middleMouseReleased&&(A.middleMouseReleased=!1);A.mouseWheelDelta=0};A.simulateKeyPress=function(a){var b=A._control.get(a)[0];A.onKeyDown(new Ve("keyDown",!0,!0,
b,b));h.engine.keyPollOccurred&&(a=h.engine.whenKeyPressedListeners.get(a),null!=a&&h.invokeListeners3(a,!0,!1))};A.simulateKeyRelease=function(a){var b=A._control.get(a)[0];A.onKeyUp(new Ve("keyUp",!0,!0,b,b));h.engine.keyPollOccurred&&(a=h.engine.whenKeyPressedListeners.get(a),null!=a&&h.invokeListeners3(a,!1,!0))};A.onKeyDown=function(a){var b=A.lastKey=a.keyCode;if(!(7E3<b)){if(8==b)A.keyString=P.substr(A.keyString,0,A.keyString.length-1);else if(47<b&&58>b||64<b&&91>b||32==b){100<A.keyString.length&&
(A.keyString=P.substr(A.keyString,1,null));var c=String.fromCharCode(b);A.keyString+=c}A._key[b]||(A._key[b]=!0,A._keyNum++,A._press[A._pressNum++]=b);h.invokeListeners2(h.engine.whenAnyKeyPressedListeners,a)}};A.onKeyUp=function(a){var b=a.keyCode;7E3<b||(A._key[b]&&(A._key[b]=!1,A._keyNum--,A._release[A._releaseNum++]=b),h.invokeListeners2(h.engine.whenAnyKeyReleasedListeners,a))};A.onMouseDown=function(a){A.mouseDown||(A.mouseDown=!0,A.mouseUp=!1,A.mousePressed=!0)};A.onMouseUp=function(a){A.mouseDown=
!1;A.mouseUp=!0;A.mouseReleased=!0};A.onRightMouseDown=function(a){A.rightMouseDown||(A.rightMouseDown=!0,A.rightMouseUp=!1,A.rightMousePressed=!0)};A.onRightMouseUp=function(a){A.rightMouseDown=!1;A.rightMouseUp=!0;A.rightMouseReleased=!0};A.onMiddleMouseDown=function(a){A.middleMouseDown||(A.middleMouseDown=!0,A.middleMouseUp=!1,A.middleMousePressed=!0)};A.onMiddleMouseUp=function(a){A.middleMouseDown=!1;A.middleMouseUp=!0;A.middleMouseReleased=!0};A.onMouseWheel=function(a){A.mouseWheel=!0;A.mouseWheelDelta=
a.delta};A.setJoySensitivity=function(a){};A.mapJoystickButton=function(a,b){};A.getButtonPressure=function(a){return A.check(a)?1:0};A.joyData=null;A.saveJoystickConfig=function(a){};A.loadJoystickConfig=function(a){};A.clearJoystickConfig=function(){A._joyControlMap=new ma;A._controlButtonMap=new ma;A.joySensitivity=.12};var cd=function(){this.id="";this.a=[]};n["com.stencyl.JoystickButton"]=cd;cd.__name__=["com","stencyl","JoystickButton"];cd.fromID=function(a){var b=new cd;b.id=a;if(-1!=a.indexOf("axis")){var c=
u.parseInt(function(b){b=a.indexOf(",");return P.substr(a,0,b)}(this)),d=u.parseInt(function(b){b=a.lastIndexOf(" ")+1;return P.substr(a,b,null)}(this)),e;e="+"==function(b){b=a.indexOf("axis")-1;return P.substr(a,b,1)}(this)?1:-1;b.a=[c,cd.AXIS,d,e]}else if(-1!=a.indexOf("hat")){c=u.parseInt(function(b){b=a.indexOf(",");return P.substr(a,0,b)}(this));e=d=0;switch(a.split(" ")[1]){case "up":d=1;e=-1;break;case "down":e=d=1;break;case "right":d=0;e=1;break;case "left":d=0,e=-1}b.a=[c,cd.HAT,d,e]}else c=
u.parseInt(function(b){b=a.indexOf(",");return P.substr(a,0,b)}(this)),d=u.parseInt(function(b){b=a.lastIndexOf(" ");return P.substr(a,b,null)}(this)),b.a=[c,cd.BUTTON,d];return b};cd.prototype={equals:function(a){return this.id==a.id},__class__:cd};var ia=function(){};n["com.stencyl.Key"]=ia;ia.__name__=["com","stencyl","Key"];ia.nameOfKey=function(a){if(97<=a&&122>=a)return String.fromCharCode(a);if(112<=a&&126>=a)return"F"+u.string(a-111);if(96<=a&&105>=a)return"NUMPAD "+u.string(a-96);switch(a){case 37:return"LEFT";
case 38:return"UP";case 39:return"RIGHT";case 40:return"DOWN";case 13:return"ENTER";case 17:return"CONTROL";case 32:return"SPACE";case 16:return"SHIFT";case 8:return"BACKSPACE";case 20:return"CAPS LOCK";case 46:return"DELETE";case 35:return"END";case 27:return"ESCAPE";case 36:return"HOME";case 45:return"INSERT";case 9:return"TAB";case 34:return"PAGE DOWN";case 33:return"PAGE UP";case 107:return"NUMPAD ADD";case 110:return"NUMPAD DECIMAL";case 111:return"NUMPAD DIVIDE";case 108:return"NUMPAD ENTER";
case 106:return"NUMPAD MULTIPLY";case 109:return"NUMPAD SUBTRACT";default:return String.fromCharCode(a)}};var W=function(a,b){null==b&&(b=0);null==a&&(a=0);this.x=a;this.y=b};n["openfl.geom.Point"]=W;W.__name__=["openfl","geom","Point"];W.distance=function(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)};W.interpolate=function(a,b,c){return new W(b.x+c*(a.x-b.x),b.y+c*(a.y-b.y))};W.polar=function(a,b){return new W(a*Math.cos(b),a*Math.sin(b))};W.prototype={add:function(a){return new W(a.x+
this.x,a.y+this.y)},clone:function(){return new W(this.x,this.y)},copyFrom:function(a){this.x=a.x;this.y=a.y},equals:function(a){return null!=a&&a.x==this.x&&a.y==this.y},normalize:function(a){if(0!=this.x||0!=this.y)a/=Math.sqrt(this.x*this.x+this.y*this.y),this.x*=a,this.y*=a},offset:function(a,b){this.x+=a;this.y+=b},setTo:function(a,b){this.x=a;this.y=b},subtract:function(a){return new W(this.x-a.x,this.y-a.y)},toString:function(){return"(x="+this.x+", y="+this.y+")"},__toLimeVector2:function(){return new yc(this.x,
this.y)},get_length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},__class__:W,__properties__:{get_length:"get_length"}};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};n["openfl.geom.Rectangle"]=ha;ha.__name__=["openfl","geom","Rectangle"];ha.prototype={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},equals:function(a){return null!=a&&this.x==a.x&&this.y==a.y&&this.width==a.width&&this.height==a.height},inflate:function(a,
b){this.x-=a;this.width+=2*a;this.y-=b;this.height+=2*b},inflatePoint:function(a){this.inflate(a.x,a.y)},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)},intersects:function(a){var b;b=this.x<a.x?a.x:this.x;if((this.get_right()>a.get_right()?a.get_right():this.get_right())<=
b)return!1;b=this.y<a.y?a.y:this.y;return(this.get_bottom()>a.get_bottom()?a.get_bottom():this.get_bottom())>b},isEmpty:function(){return 0>=this.width||0>=this.height},offset:function(a,b){this.x+=a;this.y+=b},offsetPoint:function(a){this.x+=a.x;this.y+=a.y},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},toString:function(){return"(x="+this.x+", y="+this.y+", width="+this.width+", height="+this.height+")"},union:function(a){if(0==
this.width||0==this.height)return a.clone();if(0==a.width||0==a.height)return this.clone();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();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 new ha(b,d,c-b,a-d)},__contract:function(a,b,c,d){if(0!=this.width||0!=this.height)this.get_right(),this.get_bottom(),this.x<a&&(this.x=a),this.y<b&&(this.y=b),this.get_right()>a+c&&(this.width=a+c-this.x),
this.get_bottom()>b+d&&(this.height=b+d-this.y)},__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 tc(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,k=b.b*(this.x+this.width)+b.d*this.y;g<c&&(c=g);k<e&&(e=k);g>d&&(d=g);k>f&&(f=k);g=b.a*(this.x+this.width)+b.c*(this.y+this.height);k=b.b*(this.x+this.width)+b.d*(this.y+this.height);g<c&&(c=g);k<e&&(e=k);g>d&&(d=g);k>f&&(f=k);g=b.a*this.x+b.c*(this.y+this.height);k=b.b*this.x+b.d*(this.y+this.height);g<c&&(c=g);k<e&&(e=k);g>d&&(d=g);k>f&&(f=k);a.setTo(c+b.tx,e+b.ty,d-c,f-e)},get_bottom:function(){return this.y+this.height},set_bottom:function(a){this.height=
a-this.y;return a},get_bottomRight:function(){return new W(this.x+this.width,this.y+this.height)},set_bottomRight:function(a){this.width=a.x-this.x;this.height=a.y-this.y;return a.clone()},get_left:function(){return this.x},set_left:function(a){this.width-=a-this.x;return this.x=a},get_right:function(){return this.x+this.width},set_right:function(a){this.width=a-this.x;return a},get_size:function(){return new W(this.width,this.height)},set_size:function(a){this.width=a.x;this.height=a.y;return a.clone()},
get_top:function(){return this.y},set_top:function(a){this.height-=a-this.y;return this.y=a},get_topLeft:function(){return new W(this.x,this.y)},set_topLeft:function(a){this.x=a.x;this.y=a.y;return a.clone()},__class__:ha,__properties__:{set_topLeft:"set_topLeft",get_topLeft:"get_topLeft",set_top:"set_top",get_top:"get_top",set_size:"set_size",get_size:"get_size",set_right:"set_right",get_right:"get_right",set_left:"set_left",get_left:"get_left",set_bottomRight:"set_bottomRight",get_bottomRight:"get_bottomRight",
set_bottom:"set_bottom",get_bottom:"get_bottom"}};var Oa=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};n["openfl.geom.Matrix"]=Oa;Oa.__name__=["openfl","geom","Matrix"];Oa.prototype={clone:function(){return new Oa(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},copyColumnFrom:function(a,b){if(2<a)throw new F("Column "+a+" out of bounds (2)");0==a?(this.a=b.x,this.c=b.y):1==a?(this.b=b.x,this.d=b.y):(this.tx=b.x,this.ty=b.y)},copyColumnTo:function(a,b){if(2<a)throw new F("Column "+a+" out of bounds (2)");0==a?(b.x=this.a,b.y=this.c,b.z=0):1==a?(b.x=this.b,b.y=this.d,b.z=0):(b.x=this.tx,b.y=this.ty,b.z=1)},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},copyRowFrom:function(a,b){if(2<a)throw new F("Row "+a+" out of bounds (2)");0==a?(this.a=b.x,this.c=b.y):1==a?(this.b=b.x,this.d=b.y):(this.tx=b.x,this.ty=b.y)},copyRowTo:function(a,b){if(2<a)throw new F("Row "+a+" out of bounds (2)");0==a?(b.x=this.a,b.y=this.b,b.z=this.tx):1==a?(b.x=this.c,b.y=this.d,b.z=this.ty):b.setTo(0,0,1)},createBox:function(a,b,c,d,e){null==e&&(e=0);null==d&&(d=0);null==c&&(c=0);if(0!=c){var f=Math.cos(c);c=Math.sin(c);this.a=f*a;
this.b=c*b;this.c=-c*a;this.d=f*b}else this.a=a,this.c=this.b=0,this.d=b;this.tx=d;this.ty=e},createGradientBox:function(a,b,c,d,e){null==e&&(e=0);null==d&&(d=0);null==c&&(c=0);this.a=a/1638.4;this.d=b/1638.4;if(0!=c){var f=Math.cos(c);c=Math.sin(c);this.b=c*this.d;this.c=-c*this.a;this.a*=f;this.d*=f}else this.c=this.b=0;this.tx=d+a/2;this.ty=e+b/2},deltaTransformPoint:function(a){return new W(a.x*this.a+a.y*this.c,a.x*this.b+a.y*this.d)},equals:function(a){return null!=a&&this.tx==a.tx&&this.ty==
a.ty&&this.a==a.a&&this.b==a.b&&this.c==a.c&&this.d==a.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},setRotation:function(a,b){null==b&&(b=1);this.a=Math.cos(a)*b;this.c=Math.sin(a)*b;this.b=-this.c;this.d=this.a},setTo:function(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.d=d;this.tx=e;this.ty=f},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)"},toMozString:function(){return"matrix("+this.a+", "+this.b+", "+this.c+", "+this.d+", "+this.tx+"px, "+this.ty+"px)"},toString:function(){return"matrix("+this.a+", "+this.b+", "+this.c+", "+this.d+", "+this.tx+", "+this.ty+")"},transformPoint:function(a){return new W(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},__cleanValues:function(){this.a=Math.round(1E3*this.a)/1E3;this.b=Math.round(1E3*this.b)/1E3;this.c=Math.round(1E3*this.c)/1E3;this.d=Math.round(1E3*this.d)/1E3;this.tx=Math.round(10*this.tx)/10;this.ty=Math.round(10*this.ty)/10},__toMatrix3:function(){return new xe(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))},__transformPoint:function(a){var b=a.x,c=a.y;a.x=b*this.a+c*this.c+this.tx;a.y=b*this.b+c*this.d+this.ty},__transformX:function(a,b){return a*this.a+
b*this.c+this.tx},__transformY:function(a,b){return a*this.b+b*this.d+this.ty},__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__:Oa};var l=function(){this.checkProperties=this.scriptInit=!1;this.nameMap=new ma;this.propertyChangeListeners=new ma;this.equalityPairs=new rd};n["com.stencyl.behavior.Script"]=l;l.__name__=["com","stencyl","behavior","Script"];l.engine=null;l.sameAs=function(a,b){return a==b};l.sameAsAny=function(a,b,c){return a==
b||a==c};l.asBoolean=function(a){return 1==a||"true"==a};l.strCompare=function(a,b,c){return 0>c?a<b:a>b};l.strCompareBefore=function(a,b){return a<b};l.strCompareAfter=function(a,b){return a>b};l.asNumber=function(a){return null==a?0:"number"==typeof a?q.__cast(a,Jf):(a|0)===a?q.__cast(a,$m):"boolean"==typeof a?q.__cast(a,En)?1:0:"string"==typeof a?u.parseFloat(a):parseFloat(u.string(a))};l.hasValue=function(a){return l.isPrimitive(a)?!0:"string"==typeof a?""!=q.__cast(a,String):null!=a};l.isPrimitive=
function(a){return"boolean"==typeof a||"number"==typeof a||(a|0)===a?!0:!1};l.getDefaultValue=function(a){return"boolean"==typeof a?!1:"number"==typeof a||(a|0)===a?0:"string"==typeof a?"":null};l.getGroupByName=function(a){return l.engine.getGroupByName(a)};l.getLastCreatedRegion=function(){return l.lastCreatedRegion};l.getAllRegions=function(){for(var a=[],b=l.engine.regions.iterator();b.hasNext();){var c=b.next();null!=c&&a.push(c)}return a};l.getRegion=function(a){return l.engine.getRegion(a)};
l.removeRegion=function(a){l.engine.removeRegion(a)};l.createBoxRegion=function(a,b,c,d){return l.lastCreatedRegion=l.engine.createBoxRegion(a,b,c,d)};l.createCircularRegion=function(a,b,c){return l.lastCreatedRegion=l.engine.createCircularRegion(a,b,c)};l.isInRegion=function(a,b){return l.engine.isInRegion(a,b)};l.getActorsInRegion=function(a){var b=[];for(a=a.getContainedActors().iterator();a.hasNext();){var c=a.next();b.push(l.engine.getActor(c))}return b};l.sceneHasBehavior=function(a){return l.engine.behaviors.hasBehavior(a)};
l.enableBehaviorForScene=function(a){l.engine.behaviors.enableBehavior(a)};l.disableBehaviorForScene=function(a){l.engine.behaviors.disableBehavior(a)};l.isBehaviorEnabledForScene=function(a){return l.engine.behaviors.isBehaviorEnabled(a)};l.getValueForScene=function(a,b){return l.engine.getValue(a,b)};l.setValueForScene=function(a,b,c){l.engine.setValue(a,b,c)};l.shoutToScene=function(a,b){return l.engine.shout(a,b)};l.sayToScene=function(a,b,c){return l.engine.say(a,b,c)};l.setGameAttribute=function(a,
b){l.engine.setGameAttribute(a,b)};l.getGameAttribute=function(a){return l.engine.getGameAttribute(a)};l.runLater=function(a,b,c){a=new Ni(b,a|0,!1,c);l.engine.addTask(a);return a};l.runPeriodically=function(a,b,c){a=new Ni(b,a|0,!0,c);l.engine.addTask(a);return a};l.getStepSize=function(){return h.STEP_SIZE};l.getScene=function(){return l.engine.scene};l.getCurrentScene=function(){return l.getScene().ID};l.getIDForScene=function(a){var b;for(b=na.get().scenes.iterator();b.hasNext();){var c=b.next();
if(a==c.name)return c.ID}return 0};l.getCurrentSceneName=function(){return l.getScene().name};l.getSceneWidth=function(){return l.getScene().sceneWidth};l.getSceneHeight=function(){return l.getScene().sceneHeight};l.getTileWidth=function(){return l.getScene().tileWidth};l.getTileHeight=function(){return l.getScene().tileHeight};l.reloadCurrentScene=function(a,b){l.engine.switchScene(l.getCurrentScene(),a,b)};l.switchScene=function(a,b,c){l.engine.switchScene(a,b,c)};l.createPixelizeOut=function(a,
b){null==b&&(b=15);return new kh(a,1,b)};l.createPixelizeIn=function(a,b){null==b&&(b=15);return new kh(a,b,1)};l.createBubblesOut=function(a,b){null==b&&(b=-16777216);return new lh(Ea.OUT,a,50,b)};l.createBubblesIn=function(a,b){null==b&&(b=-16777216);return new lh(Ea.IN,a,50,b)};l.createBlindsOut=function(a,b){null==b&&(b=-16777216);return new mh(Ea.OUT,a,10,b)};l.createBlindsIn=function(a,b){null==b&&(b=-16777216);return new mh(Ea.IN,a,10,b)};l.createRectangleOut=function(a,b){null==b&&(b=-16777216);
return new nh(Ea.OUT,a,b)};l.createRectangleIn=function(a,b){null==b&&(b=-16777216);return new nh(Ea.IN,a,b)};l.createSlideTransition=function(a,b){return new jd(l.engine.master,l.engine.colorLayer,a,b)};l.createSlideUpTransition=function(a){return l.createSlideTransition(a,jd.SLIDE_UP)};l.createSlideDownTransition=function(a){return l.createSlideTransition(a,jd.SLIDE_DOWN)};l.createSlideLeftTransition=function(a){return l.createSlideTransition(a,jd.SLIDE_LEFT)};l.createSlideRightTransition=function(a){return l.createSlideTransition(a,
jd.SLIDE_RIGHT)};l.createCrossfadeTransition=function(a){return new Oi(l.engine.root,a)};l.createFadeOut=function(a,b){null==b&&(b=-16777216);return new Pi(a,b)};l.createFadeIn=function(a,b){null==b&&(b=-16777216);return new jh(a,b)};l.createCircleOut=function(a,b){null==b&&(b=-16777216);return new oh(Ea.OUT,a,b)};l.createCircleIn=function(a,b){null==b&&(b=-16777216);return new oh(Ea.IN,a,b)};l.getLayer=function(a,b){return l.engine.getLayer(a,b)};l.setBlendModeForLayer=function(a,b,c){l.getLayer(a,
b);l.getLayer(a,b).set_blendMode(c)};l.showTileLayer=function(a,b){l.engine.getLayer(a,b).set_alpha(1)};l.hideTileLayer=function(a,b){l.engine.getLayer(a,b).set_alpha(0)};l.fadeTileLayerTo=function(a,b,c,d,e){null==e&&(e=Jb.get_easeNone());ea.tween(l.getLayer(a,b),d,{alpha:c}).ease(e)};l.getTileLayerOpacity=function(a,b){return 100*l.engine.getLayer(a,b).get_alpha()};l.transitionToLayer=function(a){null!=a&&(h.engine.g.graphics=a.overlay.get_graphics(),h.engine.g.canvas=a.bitmapOverlay.bitmapData)};
l.setDrawingLayer=function(a,b){var c;c=q.__cast(h.engine.getLayer(a,b),Ub);l.transitionToLayer(c)};l.setDrawingLayerToActorLayer=function(a){null!=a&&(a=q.__cast(h.engine.layers.get(a.layerID),Ub),l.transitionToLayer(a))};l.setDrawingLayerToSceneLayer=function(){h.engine.g.graphics=h.engine.transitionLayer.get_graphics();h.engine.g.canvas=h.engine.transitionBitmapLayer.bitmapData};l.getScreenX=function(){return Math.abs(h.cameraX/h.SCALE)};l.getScreenY=function(){return Math.abs(h.cameraY/h.SCALE)};
l.getScreenXCenter=function(){return Math.abs(h.cameraX/h.SCALE)+h.screenWidth/2};l.getScreenYCenter=function(){return Math.abs(h.cameraY/h.SCALE)+h.screenHeight/2};l.getCamera=function(){return l.engine.camera};l.isCtrlDown=function(){return A.check(h.INTERNAL_CTRL)};l.isShiftDown=function(){return A.check(h.INTERNAL_SHIFT)};l.simulateKeyPress=function(a){A.simulateKeyPress(a)};l.simulateKeyRelease=function(a){A.simulateKeyRelease(a)};l.isKeyDown=function(a){return A.check(a)};l.isKeyPressed=function(a){return A.pressed(a)};
l.isKeyReleased=function(a){return A.released(a)};l.isMouseDown=function(){return A.mouseDown};l.isMousePressed=function(){return A.mousePressed};l.isMouseReleased=function(){return A.mouseReleased};l.getMouseX=function(){return A.mouseX/h.SCALE};l.getMouseY=function(){return A.mouseY/h.SCALE};l.getMouseWorldX=function(){return A.mouseX/h.SCALE+h.cameraX};l.getMouseWorldY=function(){return A.mouseY/h.SCALE+h.cameraY};l.getMousePressedX=function(){return l.mpx};l.getMousePressedY=function(){return l.mpy};
l.getMouseReleasedX=function(){return l.mrx};l.getMouseReleasedY=function(){return l.mry};l.showCursor=function(){Qi.show()};l.hideCursor=function(){Qi.hide()};l.charFromCharCode=function(a){return 32>a||126<a&&160>a?"":String.fromCharCode(a)};l.getLastCreatedActor=function(){return l.lastCreatedActor};l.createActor=function(a,b,c,d){a=l.engine.createActorOfType(a,b,c,d);return l.lastCreatedActor=a};l.createRecycledActor=function(a,b,c,d){a=l.engine.getRecycledActorOfType(a,b,c,d);return l.lastCreatedActor=
a};l.createRecycledActorOnLayer=function(a,b,c,d,e){a=l.engine.getRecycledActorOfTypeOnLayer(a,b,c,l.engine.getLayer(d,e).ID);return l.lastCreatedActor=a};l.recycleActor=function(a){l.engine.recycleActor(a)};l.createActorInNextScene=function(a,b,c,d){l.engine.createActorInNextScene(a,b,c,d)};l.getActorTypeByName=function(a){for(var b=l.getAllActorTypes(),c=0;c<b.length;){var d=b[c];++c;if(d.name==a)return d}return null};l.getActorType=function(a){return q.__cast(la.get().resources.get(a),Od)};l.getAllActorTypes=
function(){return la.get().getAllActorTypes()};l.getActorsOfType=function(a){return l.engine.getActorsOfType(a)};l.getActor=function(a){return l.engine.getActor(a)};l.getActorGroup=function(a){return l.engine.getGroup(a)};l.setGravity=function(a,b){null==l.engine.world?(l.engine.gravityX=a,l.engine.gravityY=b):l.engine.world.setGravity(new y(a,b))};l.getGravity=function(){return null==l.engine.world?(l.dummyVec.x=l.engine.gravityX,l.dummyVec.y=l.engine.gravityY,l.dummyVec):l.engine.world.getGravity()};
l.enableContinuousCollisions=function(){eb.m_continuousPhysics=!0};l.toPhysicalUnits=function(a){return h.toPhysicalUnits(a)};l.toPixelUnits=function(a){return h.toPixelUnits(a)};l.makeActorNotPassThroughTerrain=function(a){h.NO_PHYSICS?null!=a&&1==a.physicsMode&&(a.continuousCollision=!0):(eb.m_continuousPhysics=!0,null!=a&&0==a.physicsMode&&a.body.setBullet(!0))};l.mute=function(){};l.unmute=function(){};l.getSound=function(a){a=la.get().resources.get(a);return null==a?null:q.__cast(a,Kf)};l.getSoundByName=
function(a){for(var b=la.get().getResourcesOfType(Kf),c=0;c<b.length;){var d=b[c];++c;if(d.name==a)return d}return null};l.playSound=function(a){if(null!=a){for(var b=0,c=l.CHANNELS;b<c;){var d=b++,d=l.engine.channels[d];if(null==d.currentSound){d.playSound(a);return}}null}};l.loopSound=function(a){if(null!=a){for(var b=0,c=l.CHANNELS;b<c;){var d=b++,d=l.engine.channels[d];if(null==d.currentSound){d.loopSound(a);return}}null}};l.playSoundOnChannel=function(a,b){l.engine.channels[b].playSound(a)};
l.loopSoundOnChannel=function(a,b){l.engine.channels[b].loopSound(a)};l.stopSoundOnChannel=function(a){l.engine.channels[a].stopSound()};l.pauseSoundOnChannel=function(a){l.engine.channels[a].setPause(!0)};l.resumeSoundOnChannel=function(a){l.engine.channels[a].setPause(!1)};l.setVolumeForChannel=function(a,b){l.engine.channels[b].setVolume(a)};l.stopAllSounds=function(){for(var a=0,b=l.CHANNELS;a<b;){var c=a++;l.engine.channels[c].stopSound()}};l.setVolumeForAllSounds=function(a){we.masterVolume=
a;a=0;for(var b=l.CHANNELS;a<b;){var c=a++,c=l.engine.channels[c];c.setVolume(c.volume)}};l.fadeInSoundOnChannel=function(a,b){l.engine.channels[a].fadeInSound(b)};l.fadeOutSoundOnChannel=function(a,b){l.engine.channels[a].fadeOutSound(b)};l.fadeInForAllSounds=function(a){for(var b=0,c=l.CHANNELS;b<c;){var d=b++;l.engine.channels[d].fadeInSound(a)}};l.fadeOutForAllSounds=function(a){for(var b=0,c=l.CHANNELS;b<c;){var d=b++;l.engine.channels[d].fadeOutSound(a)}};l.getPositionForChannel=function(a){a=
l.engine.channels[a];return null!=a&&null!=a.currentSound?a.currentSound.get_position():0};l.getSoundLengthForChannel=function(a){a=l.engine.channels[a];return null!=a&&null!=a.currentSource?a.currentSource.get_length():0};l.getSoundLength=function(a){return null!=a&&null!=a.src?a.src.get_length():0};l.setColorBackground=function(a,b){null==b&&(b=-2);l.engine.colorLayer.get_graphics().clear();a!=Fd.TRANSPARENT&&(b==Fd.TRANSPARENT?l.engine.setColorBackground(new Fd(a)):l.engine.setColorBackground(new lg(a,
b)))};l.setScrollSpeedForBackground=function(a,b,c,d){if(0==a&&"-1"==b)for(a=0,b=h.engine.backgroundLayers;a<b.length;){var e=b[a];++a;e.setScrollSpeed(c,d)}else a=h.engine.getLayer(a,b),q.__instanceof(a,sc)&&q.__cast(a,sc).setScrollSpeed(c,d)};l.setScrollFactorForLayer=function(a,b,c,d){a=h.engine.getLayer(a,b);q.__instanceof(a,sc)?q.__cast(a,sc).setScrollFactor(c,d):q.__instanceof(a,Ub)&&(a.scrollFactorX=c,a.scrollFactorY=d)};l.changeBackground=function(a,b,c){for(var d=la.get().getResourcesOfType(Ud),
e=null,f=0;f<d.length;){var g=d[f];++f;g.name==c&&(e=q.__cast(g,Ud))}null!=e&&(a=h.engine.getLayer(a,b),q.__instanceof(a,sc)&&q.__cast(a,sc).reload(e.ID))};l.changeBackgroundImage=function(a,b,c){null!=c&&(a=l.engine.getLayer(a,b),q.__instanceof(a,sc)&&q.__cast(a,sc).setImage(c))};l.addBackground=function(a,b,c){a=la.get().resourceMap.get(a);b=new sc(l.engine.getNextLayerID(),b,c,0,0,1,10,a.ID,!1);b.load();l.engine.insertLayer(b,c)};l.addBackgroundFromImage=function(a,b,c,d){c=new sc(l.engine.getNextLayerID(),
c,d,0,0,1,10,-1,!1);c.loadFromImg(a,b);l.engine.insertLayer(c,d)};l.removeBackground=function(a,b){var c=l.engine.getLayer(a,b);q.__instanceof(c,sc)&&l.engine.removeLayer(c)};l.captureScreenshot=function(){var a=new Ba(u["int"](l.getStageWidth()),u["int"](l.getStageHeight()));a.draw(ka.current.stage);return a};l.getImageForActor=function(a){return a.getCurrentImage().clone()};l.getExternalImage=function(a){return R.getBitmapData("assets/data/"+a,!1)};l.loadImageFromURL=function(a,b){var c=new Ri;
c.contentLoaderInfo.addEventListener("complete",function(a){a=q.__cast(a.currentTarget.content,qb).bitmapData;b(a)});c.load(new ne(a))};l.getSubImage=function(a,b,c,d,e){b=b*h.SCALE|0;c=c*h.SCALE|0;d=d*h.SCALE|0;e=e*h.SCALE|0;if(null!=a&&0<=b&&0<=c&&0<d&&0<e&&b<a.width&&c<a.height){var f=new Ba(d,e);l.dummyRect.x=b;l.dummyRect.y=c;l.dummyRect.width=d;l.dummyRect.height=e;l.dummyPoint.x=0;l.dummyPoint.y=0;f.copyPixels(a,l.dummyRect,l.dummyPoint);return f}return new Ba(1,1)};l.setOrderForImage=function(a,
b){null!=a&&null!=a.parent&&0<=b&&b<a.parent.get_numChildren()&&a.parent.setChildIndex(a,b)};l.getOrderForImage=function(a){return null!=a&&null!=a.parent?a.parent.getChildIndex(a):-1};l.bringImageBack=function(a){null!=a&&null!=a.parent&&l.setOrderForImage(a,a.parent.getChildIndex(a)-1)};l.bringImageForward=function(a){null!=a&&null!=a.parent&&l.setOrderForImage(a,a.parent.getChildIndex(a)+1)};l.bringImageToBack=function(a){null!=a&&null!=a.parent&&l.setOrderForImage(a,0)};l.bringImagetoFront=function(a){null!=
a&&null!=a.parent&&l.setOrderForImage(a,a.parent.get_numChildren()-1)};l.attachImageToActor=function(a,b,c,d,e){null==e&&(e=1);c=c*h.SCALE|0;d=d*h.SCALE|0;null!=a&&(2==e?(b.addChild(a),b.setChildIndex(a,0)):b.addChild(a),a.set_imgX(c-h.SCALE*b.getWidth()*(h.SCALE/2)),a.set_imgY(d-h.SCALE*b.getHeight()*(h.SCALE/2)),a.set_smoothing(ra.antialias),b.attachedImages.push(a))};l.attachImageToHUD=function(a,b,c){b=b*h.SCALE|0;c=c*h.SCALE|0;null!=a&&(l.engine.hudLayer.addChild(a),a.set_imgX(b),a.set_imgY(c),
a.set_smoothing(ra.antialias))};l.attachImageToLayer=function(a,b,c,d,e,f){null==f&&(f=1);d=d*h.SCALE|0;e=e*h.SCALE|0;null!=a&&(b=l.engine.getLayer(b,c),2==f?b.addChildAt(a,0):b.addChild(a),a.set_imgX(d),a.set_imgY(e),a.set_smoothing(ra.antialias))};l.removeImage=function(a){if(null!=a){if(q.__instanceof(a.parent,Da)){var b;b=q.__cast(a.parent,Da).attachedImages;P.remove(b,a)}a.parent.removeChild(a)}};l.resizeImage=function(a,b,c,d){null==d&&(d=!0);null==c&&(c=1);null==b&&(b=1);var e=new Oa;e.scale(b,
c);b=new Ba(a.width*b|0,a.height*c|0,!0,0);b.draw(a,e,null,null,null,d);return b};l.drawImageOnImage=function(a,b,c,d,e){c=c*h.SCALE|0;d=d*h.SCALE|0;if(null!=a&&null!=b)if(l.dummyRect.x=0,l.dummyRect.y=0,l.dummyRect.width=a.width,l.dummyRect.height=a.height,l.dummyPoint.x=c,l.dummyPoint.y=d,10==e)b.copyPixels(a,l.dummyRect,l.dummyPoint,null,null,!0);else{var f=new Oa;f.identity();f.translate(c*h.SCALE,d*h.SCALE);b.draw(a,f,null,e)}};l.drawTextOnImage=function(a,b,c,d,e){c=c*h.SCALE|0;d=d*h.SCALE|
0;if(null!=a){var f=Ed.fontCache.h[e.ID];null==f&&(f=e.font.getPreparedGlyphs(e.fontScale,0,!1),Ed.fontCache.h[e.ID]=f);e.font.render(a,f,b,0,1,c,d,0,0)}};l.clearImagePartially=function(a,b,c,d,e){b=b*h.SCALE|0;c=c*h.SCALE|0;d=d*h.SCALE|0;e=e*h.SCALE|0;null!=a&&(l.dummyRect.x=b,l.dummyRect.y=c,l.dummyRect.width=d,l.dummyRect.height=e,a.fillRect(l.dummyRect,0))};l.clearImage=function(a){null!=a&&(l.dummyRect.x=0,l.dummyRect.y=0,l.dummyRect.width=a.width,l.dummyRect.height=a.height,a.fillRect(l.dummyRect,
0))};l.clearImageUsingMask=function(a,b,c,d){c=c*h.SCALE|0;d=d*h.SCALE|0;var e=new ga,f=new qb(a);b=new qb(b);b.set_x(c);b.set_y(d);f.set_blendMode(7);b.set_blendMode(4);e.addChild(f);e.addChild(b);c=new Ba(a.width,a.height,!0,0);c.draw(e);l.dummyRect.x=0;l.dummyRect.y=0;l.dummyRect.width=a.width;l.dummyRect.height=a.height;l.dummyPoint.x=0;l.dummyPoint.y=0;a.copyPixels(c,l.dummyRect,l.dummyPoint)};l.retainImageUsingMask=function(a,b,c,d){c=c*h.SCALE|0;d=d*h.SCALE|0;l.dummyRect.x=0;l.dummyRect.y=
0;l.dummyRect.width=b.width;l.dummyRect.height=b.height;l.dummyPoint.x=c;l.dummyPoint.y=d;a.copyChannel(b,l.dummyRect,l.dummyPoint,8,8)};l.fillImage=function(a,b){null!=a&&(l.dummyRect.x=0,l.dummyRect.y=0,l.dummyRect.width=a.width,l.dummyRect.height=a.height,a.fillRect(l.dummyRect,-16777216|b))};l.filterImage=function(a,b){};l.imageSetPixel=function(a,b,c,d){null!=a&&(b=b*h.SCALE|0,c=c*h.SCALE|0,a.setPixel(b,c,d),2==h.SCALE&&(a.setPixel(b+1,c,d),a.setPixel(b,c+1,d),a.setPixel(b+1,c+1,d)),4==h.SCALE&&
(a.setPixel(b+2,c,d),a.setPixel(b+2,c+1,d),a.setPixel(b+2,c+2,d),a.setPixel(b,c+2,d),a.setPixel(b+1,c+2,d)))};l.imageGetPixel=function(a,b,c){return null!=a?(b=b*h.SCALE|0,c=c*h.SCALE|0,a.getPixel(b,c)):0};l.imageSwapColor=function(a,b,c){null!=a&&(l.dummyRect.x=0,l.dummyRect.y=0,l.dummyRect.width=a.width,l.dummyRect.height=a.height,l.dummyPoint.x=0,l.dummyPoint.y=0,a.threshold(a,l.dummyRect,l.dummyPoint,"==",-16777216|b,-16777216|c,-1,!0))};l.flipImageHorizontal=function(a){var b=new Oa;b.scale(-1,
1);b.translate(a.width,0);var c=new Ba(a.width,a.height,!0,0);c.draw(a,b);l.dummyRect.x=0;l.dummyRect.y=0;l.dummyRect.width=c.width;l.dummyRect.height=c.height;l.dummyPoint.x=0;l.dummyPoint.y=0;a.copyPixels(c,l.dummyRect,l.dummyPoint)};l.flipImageVertical=function(a){var b=new Oa;b.scale(1,-1);b.translate(0,a.height);var c=new Ba(a.width,a.height,!0,0);c.draw(a,b);l.dummyRect.x=0;l.dummyRect.y=0;l.dummyRect.width=c.width;l.dummyRect.height=c.height;l.dummyPoint.x=0;l.dummyPoint.y=0;a.copyPixels(c,
l.dummyRect,l.dummyPoint)};l.setXForImage=function(a,b){null!=a&&a.set_imgX(h.SCALE*b)};l.setYForImage=function(a,b){null!=a&&a.set_imgY(h.SCALE*b)};l.fadeImageTo=function(a,b,c,d){null==c&&(c=1);null==d&&(d=Jb.get_easeNone());ea.tween(a,c,{alpha:b}).ease(d)};l.setOriginForImage=function(a,b,c){a.setOrigin(b,c)};l.growImageTo=function(a,b,c,d,e){null==d&&(d=1);null==c&&(c=1);null==b&&(b=1);null==e&&(e=Jb.get_easeNone());ea.tween(a,d,{scaleX:b,scaleY:c}).ease(e)};l.spinImageTo=function(a,b,c,d){null==
c&&(c=1);null==d&&(d=Jb.get_easeNone());ea.tween(a,c,{rotation:b}).ease(d)};l.moveImageTo=function(a,b,c,d,e){null==d&&(d=1);b*=h.SCALE;c*=h.SCALE;null==e&&(e=Jb.get_easeNone());ea.tween(a,d,{imgX:b,imgY:c}).ease(e).onUpdate(function(){a.set_imgX(a.get_imgX());a.set_imgY(a.get_imgY())})};l.spinImageBy=function(a,b,c,d){null==c&&(c=1);l.spinImageTo(a,a.get_rotation()+b,c,d)};l.moveImageBy=function(a,b,c,d,e){null==d&&(d=1);l.moveImageTo(a,a.get_imgX()/h.SCALE+b,a.get_imgY()/h.SCALE+c,d,e)};l.setFilterForImage=
function(a,b){};l.clearFiltersForImage=function(a){null!=a&&a.set_filters([])};l.imageToText=function(a){l.dummyRect.x=0;l.dummyRect.y=0;l.dummyRect.width=a.width;l.dummyRect.height=a.height;var b=a.getPixels(l.dummyRect);b.position=0;for(var c=Ya.alloc(kb.get_length(b));va.gt(b.__length-b.position,0);)c.set(b.position,b.readByte());return a.width+";"+a.height+";"+l.toBase64(c)};l.imageFromText=function(a){var b=a.split(";");a=u.parseInt(b[0]);for(var c=u.parseInt(b[1]),d=l.fromBase64(b[2]),b=new kd(0),
e=0,f=d.length;e<f;){var g=e++;b.writeByte(d.b[g])}b.position=0;d=new Ba(a,c,!0,0);l.dummyRect.x=0;l.dummyRect.y=0;l.dummyRect.width=a;l.dummyRect.height=c;d.setPixels(l.dummyRect,b);return d};l.toBase64=function(a){var b=Ya.ofString("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");a=(new mg(b)).encodeBytes(a).toString();b=a.length%4;1<b&&(a+="=");2==b&&(a+="=");return a};l.fromBase64=function(a){var b=-1;"="==a.charAt(a.length-2)?b=2:"="==a.charAt(a.length-1)&&(b=1);-1!=b&&(a=
P.substr(a,0,a.length-b));b=Ya.ofString("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");return(new mg(b)).decodeBytes(Ya.ofString(a))};l.startShakingScreen=function(a,b){null==b&&(b=.5);null==a&&(a=.05);l.engine.shakeScreen(a,b)};l.stopShakingScreen=function(){l.engine.stopShakingScreen()};l.getTopLayer=function(){return l.engine.getTopLayer()};l.getBottomLayer=function(){return l.engine.getBottomLayer()};l.getMiddleLayer=function(){return l.engine.getMiddleLayer()};l.getTileLayerAt=
function(a,b){var c=l.engine.getLayer(a,b);return null!=c&&q.__instanceof(c,Ub)?q.__cast(c,Ub).tiles:null};l.getTilesetIDByName=function(a){a=la.get().resourceMap.get(a);return q.__instanceof(a,ld)?a.ID:-1};l.setTileAt=function(a,b,c,d,e,f){a=u["int"](a);b=u["int"](b);e=u["int"](e);f=u["int"](f);var g=l.engine.getLayer(c,d);if(null!=g&&q.__instanceof(g,Ub)){var k;k=q.__cast(g,Ub).tiles;e=q.__cast(la.get().resources.get(e),ld).tiles[f];k.setTileAt(a,b,e);null==e||null==e.pixels||I.contains(l.engine.animatedTiles,
e)||1<e.durations.length&&l.engine.animatedTiles.push(e);if(null!=e&&-1!=e.collisionID){e=na.get().shapes.get(e.collisionID);k=e.getVertices();e=e.getVertexCount();k=za.asArray(k,e);e=0;for(f=k.getVertices();e<f.length;){var p=f[e];++e;p.x*=l.engine.scene.tileWidth/32;p.y*=l.engine.scene.tileHeight/32}e=b*l.engine.scene.tileWidth;f=a*l.engine.scene.tileHeight;h.NO_PHYSICS||null==k?null!=k&&l.getTileLayerAt(c,d).grid.setTile(b,a):l.createDynamicTile(k,h.toPhysicalUnits(e),h.toPhysicalUnits(f),g.ID,
l.engine.scene.tileWidth,l.engine.scene.tileHeight)}l.engine.tileUpdated=!0}};l.tileExistsAt=function(a,b,c,d){return null!=l.getTileAt(u["int"](a),u["int"](b),c,d)};l.tileCollisionAt=function(a,b,c,d){if(0==c&&0>u.parseInt(d)){c=0;for(d=l.engine.interactiveLayers;c<d.length;){var e=d[c];++c;e=e.tiles.getTileAt(u["int"](a),u["int"](b));if(null!=e&&-1!=e.collisionID)return!0}return!1}a=l.getTileAt(u["int"](a),u["int"](b),c,d);return null==a||-1==a.collisionID?!1:!0};l.getTilePosition=function(a,b){var c=
l.engine.scene.tileHeight,d=l.engine.scene.tileWidth;return 0==a?u["int"](Math.floor(b/d)):u["int"](Math.floor(b/c))};l.getTileIDAt=function(a,b,c,d){a=l.getTileAt(u["int"](a),u["int"](b),c,d);return null==a?-1:a.tileID};l.getTileColIDAt=function(a,b,c,d){a=l.getTileAt(u["int"](a),u["int"](b),c,d);return null==a?-1:a.collisionID};l.getTileDataAt=function(a,b,c,d){a=l.getTileAt(u["int"](a),u["int"](b),c,d);return null==a?"":a.metadata};l.getTilesetIDAt=function(a,b,c,d){a=l.getTileAt(u["int"](a),u["int"](b),
c,d);return null==a?-1:a.parent.ID};l.getTileAt=function(a,b,c,d){c=l.getTileLayerAt(c,d);return null==c?null:c.getTileAt(u["int"](a),u["int"](b))};l.removeTileAt=function(a,b,c,d){a=u["int"](a);b=u["int"](b);var e=l.engine.getLayer(c,d);if(null!=e&&q.__instanceof(e,Ub)){var f;f=q.__cast(e,Ub).tiles;c=l.getTileAt(a,b,c,d);null!=c&&(h.NO_PHYSICS||-1==c.collisionID?-1!=c.collisionID&&f.grid.clearTile(b,a):(e="ID-"+b*l.engine.scene.tileWidth+"-"+a*l.engine.scene.tileHeight+"-"+e.ID,c=l.engine.dynamicTiles.get(e),
null!=c&&(l.engine.removeActor(c),l.engine.dynamicTiles.remove(e))),f.setTileAt(a,b,null),l.engine.tileUpdated=!0)}};l.getTileForCollision=function(a,b){if(a.thisCollidedWithTile||a.otherCollidedWithTile){var c=Math.round(h.toPixelUnits(b.normalX)),d=Math.round(h.toPixelUnits(b.normalY)),e=Math.round(h.toPixelUnits(b.x)),f=Math.round(h.toPixelUnits(b.y));a.thisCollidedWithTile&&(c=-c,d=-d);0>c&&0==e%l.engine.scene.tileWidth&&--e;0>d&&0==f%l.engine.scene.tileHeight&&--f;e=l.getTilePosition(0,e);f=
l.getTilePosition(1,f);c=0;for(d=l.engine.interactiveLayers;c<d.length;){var g=d[c];++c;g=g.tiles.getTileAt(f,e);if(null!=g&&-1!=g.collisionID)return g}}return null};l.getTileDataForCollision=function(a,b){var c=l.getTileForCollision(a,b);return null!=c?c.metadata:""};l.createDynamicTile=function(a,b,c,d,e,f){a=new Da(l.engine,I.INTEGER_MAX,na.TERRAIN_ID,b,c,d,e,f,null,null,null,null,!1,!0,!1,!1,a,-1,!1,!1);a.set_name("Terrain");a.set_visible(!1);l.engine.moveActorToLayer(a,d);b="ID-"+h.toPixelUnits(b)+
"-"+h.toPixelUnits(c)+"-"+d;l.engine.dynamicTiles.set(b,a)};l.getFont=function(a){return q.__cast(la.get().resources.get(a),ye)};l.pause=function(){l.engine.pause()};l.unpause=function(){l.engine.unpause()};l.toggleFullScreen=function(){};l.pauseAll=function(){h.paused=!0};l.unpauseAll=function(){h.paused=!1};l.getScreenWidth=function(){return h.screenWidth};l.getScreenHeight=function(){return h.screenHeight};l.getStageWidth=function(){return h.stage.stageWidth};l.getStageHeight=function(){return h.stage.stageHeight};
l.setOffscreenTolerance=function(a,b,c,d){h.paddingTop=a|0;h.paddingLeft=b|0;h.paddingRight=d|0;h.paddingBottom=c|0};l.isTransitioning=function(){return l.engine.isTransitioning()};l.setTimeScale=function(a){h.timeScale=a};l.randomFloat=function(){return Math.random()};l.randomFloatBetween=function(a,b){return a<=b?a+Math.random()*(b-a):b+Math.random()*(a-b)};l.randomInt=function(a,b){return a<=b?(a|0)+Math.floor(Math.random()*((b|0)-(a|0)+1)):(b|0)+Math.floor(Math.random()*((a|0)-(b|0)+1))};l.abortTween=
function(a){};l.saveGame=function(a,b){for(var c=gc.getLocal(a),d=l.engine.gameAttributes.keys();d.hasNext();){var e=d.next();I.saveToSharedObject(c,e,l.engine.gameAttributes.get(e))}I.flushSharedObject(c,b)};l.loadGame=function(a,b){for(var c=gc.getLocal(a),d=0,e=O.fields(c.data);d<e.length;){var f=e[d];++d;var g=I.loadFromSharedObject(c,f);l.engine.gameAttributes.set(f,g)}null!=b&&b(!0)};l.saveData=function(a,b,c,d){a=gc.getLocal(a);I.saveToSharedObject(a,b,c);I.flushSharedObject(a,d)};l.loadData=
function(a,b,c){a=gc.getLocal(a);b=I.loadFromSharedObject(a,b);null!=c&&c(!0);return b};l.checkData=function(a,b){var c=gc.getLocal(a);return null!=O.field(c.data,b)};l.defaultURLHandler=function(a){new ng(a.target);null};l.openURLInBrowser=function(a){ka.getURL(new ne(a))};l.visitURL=function(a,b){null==b&&(b=l.defaultURLHandler);try{var c=new ne(a);c.method=Vd.toString(1);(new ng(c)).addEventListener("complete",b)}catch(d){if(Ia.lastException=d,d instanceof F&&(d=d.val),q.__instanceof(d,String))null;
else throw d;}};l.postToURL=function(a,b,c){null==c&&(c=l.defaultURLHandler);a=new ne(a);a.method=Vd.toString(4);null!=b&&(a.data=new Si(b));try{var d=new ng(a);d.addEventListener("complete",c);l.runLater(500,function(a){d.close()})}catch(e){if(Ia.lastException=e,e instanceof F&&(e=e.val),q.__instanceof(e,String))null;else throw e;}};l.convertToPseudoUnicode=function(a){for(var b=[],c="",d="ABCDEF".split(""),e=0,f=0,g=a.length;f<g;){var k=f++;if(!(k<e)){if(128>P.cca(a,k))c+=a.charAt(k);else for(b.length=
0;k<a.length;){128<=P.cca(a,k)&&(b.push(P.cca(a,k)),e+=1);if(128>P.cca(a,k)||k==a.length-1){for(;0<b.length;){var p=0,h=63,m=0,n=0,q=u["int"](l.asNumber(b[0]));for(b.splice(0,1);192==(q&192);)q<<=1,q&=255,n+=6,h>>=1,m++,p<<=6,p|=u["int"](l.asNumber(b[0]))&63,b.splice(0,1);k="";for(p|=(q>>m&h)<<n;0!=p;)h=p%16,k=10>h?k+(""+h):k+d[u["int"](Math.min(Math.max(h-10,0),5))],p=u["int"](Math.floor(p/16));p="";for(h=k.length-1;0<=h;)p+=k.charAt(h),h--;k=0;for(h=4-p.length;k<h;)k++,p="0"+p;c+="~x"+p}--e;break}k+=
1}e+=1}}return c};l.simpleTweet=function(a,b){l.openURLInBrowser("http://twitter.com/home?status="+encodeURIComponent(a+" "+b))};l.newgroundsShowAd=function(){};l.newgroundsSetMedalPosition=function(a,b){};l.newgroundsUnlockMedal=function(a){};l.newgroundsSubmitScore=function(a,b){};l.newgroundsShowScore=function(a){};l.newgroundsHelper=function(a){};l.kongregateInitAPI=function(){};l.kongregateSubmitStat=function(a,b){};l.kongregateIsGuest=function(){return!0};l.kongregateGetUsername=function(){return"Guest"};
l.kongregateGetUserID=function(){return 0};l.loadAtlas=function(a){l.engine.atlasesToLoad.h[a]=a};l.unloadAtlas=function(a){l.engine.atlasesToUnload.h[a]=a};l.atlasIsLoaded=function(a){a=na.get().atlases.get(a);return null!=a&&a.active};l.initGooglePlayGames=function(){};l.stopGooglePlayGames=function(){};l.getGPGConnectionInfo=function(a){return!1};l.showGPGAchievements=function(){};l.showGPGLeaderboards=function(){};l.showGPGLeaderboard=function(a){};l.showGPGQuests=function(){};l.unlockGPGAchievement=
function(a){};l.incrementGPGAchievement=function(a,b){};l.submitGPGScore=function(a,b){};l.updateGPGEvent=function(a,b){};l.getCompletedGPGQuests=function(){return[]};l.gameCenterInitialize=function(){};l.gameCenterIsAuthenticated=function(){return!1};l.gameCenterGetPlayerName=function(){return"None"};l.gameCenterGetPlayerID=function(){return"None"};l.gameCenterShowLeaderboard=function(a){};l.gameCenterShowAchievements=function(){};l.gameCenterSubmitScore=function(a,b){};l.gameCenterSubmitAchievement=
function(a,b){};l.gameCenterResetAchievements=function(){};l.gameCenterShowBanner=function(a,b){};l.purchasesAreInitialized=function(){return!1};l.purchasesRestore=function(){};l.purchasesBuy=function(a){};l.purchasesHasBought=function(a){return!1};l.purchasesGetTitle=function(a){return""};l.purchasesGetDescription=function(a){return""};l.purchasesGetPrice=function(a){return""};l.purchasesRequestProductInfo=function(a){};l.purchasesUse=function(a){};l.purchasesGoogleConsume=function(a){};l.purchasesGetQuantity=
function(a){return 0};l.showAlert=function(a,b){};l.vibrate=function(a){};l.showKeyboard=function(){};l.hideKeyboard=function(){};l.setKeyboardText=function(a){};l.setIconBadgeNumber=function(a){};l.enableDebugDrawing=function(){h.DEBUG_DRAW=!0;h.NO_PHYSICS||h.debugDrawer.m_sprite.get_graphics().clear()};l.disableDebugDrawing=function(){h.DEBUG_DRAW=!1;h.NO_PHYSICS||h.debugDrawer.m_sprite.get_graphics().clear()};l.gameURL=function(){return""};l.exitGame=function(){};l.createGrayscaleFilter=function(){var a=
[],a=a.concat([.5,.5,.5,0,0]),a=a.concat([.5,.5,.5,0,0]),a=a.concat([.5,.5,.5,0,0]),a=a.concat([0,0,0,1,0]);return new We(a)};l.createSepiaFilter=function(){var a=[],a=a.concat([.34,.33,.33,0,30]),a=a.concat([.33,.34,.33,0,20]),a=a.concat([.33,.33,.34,0,0]),a=a.concat([0,0,0,1,0]);return new We(a)};l.createNegativeFilter=function(){var a=[],a=a.concat([-1,0,0,0,255]),a=a.concat([0,-1,0,0,255]),a=a.concat([0,0,-1,0,255]),a=a.concat([0,0,0,1,0]);return new We(a)};l.createTintFilter=function(a,b){null==
b&&(b=1);var c=new pa;c.colorize(a,b);return c.getFilter()};l.createHueFilter=function(a){var b=new pa;b.adjustHue(a);b.adjustSaturation(1);return b.getFilter()};l.createSaturationFilter=function(a){var b=new pa;b.adjustSaturation(a/100);return b.getFilter()};l.createBrightnessFilter=function(a){var b=new pa;b.adjustBrightness(a/100);return b.getFilter()};l.prototype={toInternalName:function(a){if(null==this.nameMap)return a;var b=this.nameMap.get(a);return null==b?a:b},forwardMessage:function(a){},
clearListeners:function(){this.propertyChangeListeners=new ma},internalGetGroup:function(a,b,c){if(h.NO_PHYSICS)return b=q.__cast(c,fc),a==b.actorA?l.engine.getGroup(b.groupA):l.engine.getGroup(b.groupB);b=q.__cast(b,id);if(null==b)return q.__cast(a,Da).getGroup();a=b.groupID;if(a==na.INHERIT_ID){b=b.getBody();if(null!=b)return l.engine.getGroup(b.getUserData().groupID);null}return l.engine.getGroup(a)},init:function(){},addMobileKeyboardListener:function(a,b){l.engine.nativeListeners.push(new og(ac.TYPE_KEYBOARD,
a,b))},addMobileAdListener:function(a,b){l.engine.nativeListeners.push(new og(ac.TYPE_ADS,a,b))},addGameCenterListener:function(a,b){l.engine.nativeListeners.push(new og(ac.TYPE_GAMECENTER,a,b))},addPurchaseListener:function(a,b){l.engine.nativeListeners.push(new og(ac.TYPE_PURCHASES,a,b))},addWhenCreatedListener:function(a,b){var c=q.__instanceof(this,da);null!=a&&(a.whenCreatedListeners.push(b),c&&q.__cast(this,da).actor.registerListener(a.whenCreatedListeners,b))},addWhenKilledListener:function(a,
b){var c=q.__instanceof(this,da);null!=a&&(a.whenKilledListeners.push(b),c&&q.__cast(this,da).actor.registerListener(a.whenKilledListeners,b))},addWhenUpdatedListener:function(a,b){var c=q.__instanceof(this,da);null==a&&c&&(a=q.__cast(this,da).actor);var d;d=null!=a?a.whenUpdatedListeners:l.engine.whenUpdatedListeners;d.push(b);c&&q.__cast(this,da).actor.registerListener(d,b)},addWhenDrawingListener:function(a,b){var c=q.__instanceof(this,da);null==a&&c&&(a=q.__cast(this,da).actor);var d;d=null!=
a?a.whenDrawingListeners:l.engine.whenDrawingListeners;d.push(b);c&&q.__cast(this,da).actor.registerListener(d,b)},addActorEntersRegionListener:function(a,b){null!=a&&(a.whenActorEntersListeners.push(b),q.__instanceof(this,da)&&q.__cast(this,da).actor.registerListener(a.whenActorEntersListeners,b))},addActorExitsRegionListener:function(a,b){null!=a&&(a.whenActorExitsListeners.push(b),q.__instanceof(this,da)&&q.__cast(this,da).actor.registerListener(a.whenActorExitsListeners,b))},addActorPositionListener:function(a,
b){null!=a&&(a.positionListeners.push(b),a.positionListenerCount++,q.__instanceof(this,da)&&q.__cast(this,da).actor.registerListener(a.positionListeners,b))},addActorTypeGroupPositionListener:function(a,b){l.engine.typeGroupPositionListeners.h.hasOwnProperty(a)||l.engine.typeGroupPositionListeners.set(a,[]);var c;c=q.__cast(l.engine.typeGroupPositionListeners.h[a],Array);c.push(b);q.__instanceof(this,da)&&q.__cast(this,da).actor.registerListener(c,b)},addSwipeListener:function(a){l.engine.whenSwipedListeners.push(a);
q.__instanceof(this,da)&&q.__cast(this,da).actor.registerListener(l.engine.whenSwipedListeners,a)},addMultiTouchStartListener:function(a){},addMultiTouchMoveListener:function(a){},addMultiTouchEndListener:function(a){},addKeyStateListener:function(a,b){null==l.engine.whenKeyPressedListeners.get(a)&&l.engine.whenKeyPressedListeners.set(a,[]);l.engine.hasKeyPressedListeners=!0;var c=l.engine.whenKeyPressedListeners.get(a);c.push(b);q.__instanceof(this,da)&&q.__cast(this,da).actor.registerListener(c,
b)},addAnyKeyPressedListener:function(a){l.engine.whenAnyKeyPressedListeners.push(a);q.__instanceof(this,da)&&q.__cast(this,da).actor.registerListener(l.engine.whenAnyKeyPressedListeners,a)},addAnyKeyReleasedListener:function(a){l.engine.whenAnyKeyReleasedListeners.push(a);q.__instanceof(this,da)&&q.__cast(this,da).actor.registerListener(l.engine.whenAnyKeyReleasedListeners,a)},addAnyGamepadPressedListener:function(a){l.engine.whenAnyGamepadPressedListeners.push(a);q.__instanceof(this,da)&&q.__cast(this,
da).actor.registerListener(l.engine.whenAnyGamepadPressedListeners,a)},addAnyGamepadReleasedListener:function(a){l.engine.whenAnyGamepadReleasedListeners.push(a);q.__instanceof(this,da)&&q.__cast(this,da).actor.registerListener(l.engine.whenAnyGamepadReleasedListeners,a)},addMousePressedListener:function(a){l.engine.whenMousePressedListeners.push(a);q.__instanceof(this,da)&&q.__cast(this,da).actor.registerListener(l.engine.whenMousePressedListeners,a)},addMouseReleasedListener:function(a){l.engine.whenMouseReleasedListeners.push(a);
q.__instanceof(this,da)&&q.__cast(this,da).actor.registerListener(l.engine.whenMouseReleasedListeners,a)},addMouseMovedListener:function(a){l.engine.whenMouseMovedListeners.push(a);q.__instanceof(this,da)&&q.__cast(this,da).actor.registerListener(l.engine.whenMouseMovedListeners,a)},addMouseDraggedListener:function(a){l.engine.whenMouseDraggedListeners.push(a);q.__instanceof(this,da)&&q.__cast(this,da).actor.registerListener(l.engine.whenMouseDraggedListeners,a)},addMouseOverActorListener:function(a,
b){null!=a&&(a.mouseOverListeners.push(b),q.__instanceof(this,da)&&q.__cast(this,da).actor.registerListener(a.mouseOverListeners,b))},addPropertyChangeListener:function(a,b,c){this.propertyChangeListeners.exists(a)||this.propertyChangeListeners.set(a,[]);null==b||this.propertyChangeListeners.exists(b)||this.propertyChangeListeners.set(b,[]);a=this.propertyChangeListeners.get(a);var d=this.propertyChangeListeners.get(b);a.push(c);if(null!=b){d.push(c);var e=[];e.push(a);e.push(d);this.equalityPairs.set(c,
e)}q.__instanceof(this,da)&&(q.__cast(this,da).actor.registerListener(a,c),null!=b&&q.__cast(this,da).actor.registerListener(d,c));this.checkProperties=!0},propertyChanged:function(a,b){if(this.checkProperties){var c=this.propertyChangeListeners.get(a);if(null!=c)for(var d=0;d<c.length;){try{var e=c[d];e(b,c);if(-1==I.indexOf(c,e)&&(d--,null!=this.equalityPairs.h[e.__id__])){var f=0,g;for(g=q.__cast(this.equalityPairs.h[e.__id__],Array);f<g.length;){var k=g[f];++f;k!=c&&k.splice(I.indexOf(k,e),1)}this.equalityPairs.remove(e)}}catch(p){if(Ia.lastException=
p,p instanceof F&&(p=p.val),q.__instanceof(p,String))null;else throw p;}d++}}},addCollisionListener:function(a,b){null!=a&&(a.collisionListeners.push(b),a.collisionListenerCount++,q.__instanceof(this,da)&&q.__cast(this,da).actor.registerListener(a.collisionListeners,b))},addSceneCollisionListener:function(a,b,c){if(!l.engine.collisionListeners.h.hasOwnProperty(a)){var d=new xa;l.engine.collisionListeners.set(a,d)}l.engine.collisionListeners.h.hasOwnProperty(b)||(d=new xa,l.engine.collisionListeners.set(b,
d));l.engine.collisionListeners.h[a].exists(b)||l.engine.collisionListeners.h[a].set(b,[]);a=q.__cast(l.engine.collisionListeners.h[a].get(b),Array);a.push(c);q.__instanceof(this,da)&&(q.__cast(this,da).actor.collisionListenerCount++,q.__cast(this,da).actor.registerListener(a,c))},addWhenTypeGroupCreatedListener:function(a,b){l.engine.whenTypeGroupCreatedListeners.exists(a)||l.engine.whenTypeGroupCreatedListeners.set(a,[]);var c=l.engine.whenTypeGroupCreatedListeners.get(a);c.push(b);q.__instanceof(this,
da)&&q.__cast(this,da).actor.registerListener(c,b)},addWhenTypeGroupKilledListener:function(a,b){l.engine.whenTypeGroupDiesListeners.exists(a)||l.engine.whenTypeGroupDiesListeners.set(a,[]);var c=l.engine.whenTypeGroupDiesListeners.get(a);c.push(b);q.__instanceof(this,da)&&q.__cast(this,da).actor.registerListener(c,b)},addSoundListener:function(a,b){l.engine.soundListeners.exists(a)||l.engine.soundListeners.set(a,[]);var c=l.engine.soundListeners.get(a);c.push(b);q.__instanceof(this,da)&&q.__cast(this,
da).actor.registerListener(c,b)},addFocusChangeListener:function(a){l.engine.whenFocusChangedListeners.push(a);q.__instanceof(this,da)&&q.__cast(this,da).actor.registerListener(l.engine.whenFocusChangedListeners,a)},addPauseListener:function(a){l.engine.whenPausedListeners.push(a);q.__instanceof(this,da)&&q.__cast(this,da).actor.registerListener(l.engine.whenPausedListeners,a)},disableThisBehavior:function(){l.engine.behaviors.disableBehavior(this.wrapper.name)},tweenNumber:function(a,b,c,d){null==
c&&(c=1);ea.tween(this,c,{alpha:b}).ease(null==d?Jb.get_easeNone():d)},__class__:l};var da=function(a){l.call(this);this.actor=a};n["com.stencyl.behavior.ActorScript"]=da;da.__name__=["com","stencyl","behavior","ActorScript"];da.__super__=l;da.prototype=L(l.prototype,{getValue:function(a,b){return this.actor.getValue(a,b)},setValue:function(a,b,c){this.actor.setValue(a,b,c)},shout:function(a,b){return this.actor.shout(a,b)},disableThisBehavior:function(){this.actor.disableBehavior(this.wrapper.name)},
__class__:da});var kf=function(a,b,c,d,e,f,g){this.ID=a;this.fieldName=b;this.fullName=c;this.type=e;this.value=d;this.realValue=null;this.hidden=g};n["com.stencyl.behavior.Attribute"]=kf;kf.__name__=["com","stencyl","behavior","Attribute"];kf.prototype={getRealValue:function(){if(null==this.realValue)if("int"==this.type)this.realValue=u.parseInt(this.value);else if("float"==this.type||"number"==this.type)this.realValue=u.parseFloat(this.value);else if("bool"==this.type||"boolean"==this.type)this.realValue=
"true"==this.value?!0:!1;else if("color"==this.type)if(null==this.value||""==this.value)this.realValue=-16777216;else{var a=this.value.split(","),b=u.parseInt(a[0]),c=u.parseInt(a[1]),d=u.parseInt(a[2]);this.realValue=u.parseInt(a[3])<<24|b<<16|c<<8|d}else if("sound"==this.type||"actortype"==this.type||"font"==this.type)null!=this.value&&(this.realValue="null"==this.value||""==this.value?null:la.get().resources.get(this.value),"font"!=this.type||q.__instanceof(this.realValue,ye)||(this.realValue=
null),"sound"!=this.type||q.__instanceof(this.realValue,Kf)||(this.realValue=null),"actortype"!=this.type||q.__instanceof(this.realValue,Od)||(this.realValue=null));else if("actorgroup"==this.type)this.realValue=u.parseInt(this.value);else if("control"==this.type)this.realValue=this.value;else if("effect"==this.type)this.realValue=this.value;else if("animation"==this.type)this.realValue=this.value;else if("game-attribute"==this.type)this.realValue=this.value;else if("scene"==this.type)this.realValue=
na.get().scenes.get(this.value);else if("text"==this.type)this.realValue=this.value;else if("list"==this.type){if(this.realValue=this.value,null==this.value||""==this.value)this.realValue=[]}else if("map"==this.type){if(this.realValue=this.value,null==this.value||""==this.value)this.realValue=new ma}else null!=this.value&&"actor"==this.type?this.realValue="thisactor"==this.value?this.parent:u.parseInt(this.value):null!=this.value&&"joint"==this.type?this.realValue=u.parseInt(this.value):null!=this.value&&
"region"==this.type&&(this.realValue=u.parseInt(this.value));return this.realValue},__class__:kf};var Ji=function(a,b,c,d,e,f,g,k,p,h){this.isEvent=h;this.parent=a;this.engine=b;this.classname=e;if(null!=b)try{this.cls=ua.resolveClass(e)}catch(l){if(Ia.lastException=l,l instanceof F&&(l=l.val),q.__instanceof(l,String))null;else throw l;}this.enabled=f;this.drawable=g;this.ID=c;this.name=d;this.type=p;this.attributes=k};n["com.stencyl.behavior.Behavior"]=Ji;Ji.__name__=["com","stencyl","behavior",
"Behavior"];Ji.prototype={initScript:function(a){null==a&&(a=!1);if(null==this.cls)this.script=new Qc;else if(this.script="actor"==this.type?ua.createInstance(this.cls,[0,this.parent,null]):ua.createInstance(this.cls,[0,null]),this.script.wrapper=this,this.initAttributes(),!a)try{this.script.init(),this.script.scriptInit=!0}catch(b){if(Ia.lastException=b,b instanceof F&&(b=b.val),q.__instanceof(b,String))null;else throw b;}},initAttributes:function(){for(var a=this.attributes.iterator();a.hasNext();){var b=
a.next();try{if(!(b.hidden||"actor"==b.type&&"actor"==b.fieldName&&q.__instanceof(this.script,da))){var c=this.script.toInternalName(b.fieldName);if("actor"==b.type||"joint"==b.type||"region"==b.type){var d=u.parseInt(""+u.string(b.getRealValue()));"actor"==b.type?O.setField(this.script,c,this.engine.getActor(d)):"joint"!=b.type&&"region"==b.type&&O.setField(this.script,c,this.engine.getRegion(d))}else if("actorgroup"==b.type){var e=u.parseInt(""+u.string(b.getRealValue()));O.setField(this.script,
c,this.engine.getGroup(e))}else{var f=b.getRealValue();if("list"==b.type)b=null,null!=f?(b=q.__cast(f,Array),b=b.slice()):b=[],this.script[c]=b;else if("map"==b.type){b=null;if(null!=f)for(var g=f,b=new ma,k=g.keys();k.hasNext();){var p=k.next(),h=g.get(p);b.set(p,h)}else b=new ma;this.script[c]=b}else this.script[c]=f}}}catch(l){if(Ia.lastException=l,l instanceof F&&(l=l.val),q.__instanceof(l,String))null;else throw l;}}},__class__:Ji};var ph=function(a,b){this.behaviorID=a;this.values=b;this.enabled=
!0};n["com.stencyl.behavior.BehaviorInstance"]=ph;ph.__name__=["com","stencyl","behavior","BehaviorInstance"];ph.prototype={__class__:ph};var Ki=function(){this.behaviors=[];this.cache=new ma};n["com.stencyl.behavior.BehaviorManager"]=Ki;Ki.__name__=["com","stencyl","behavior","BehaviorManager"];Ki.prototype={destroy:function(){this.cache=this.behaviors=null},add:function(a){this.cache.set(a.name,a);this.behaviors.push(a)},hasBehavior:function(a){return null==this.cache?!1:null!=this.cache.get(a)},
enableBehavior:function(a){if(this.hasBehavior(a)){a=this.cache.get(a);if(null!=a.script&&!a.script.scriptInit)try{a.script.init(),a.script.scriptInit=!0}catch(b){if(Ia.lastException=b,b instanceof F&&(b=b.val),q.__instanceof(b,String))null;else throw b;}a.enabled=!0}},disableBehavior:function(a){this.hasBehavior(a)&&(this.cache.get(a).enabled=!1)},isBehaviorEnabled:function(a){return this.hasBehavior(a)?this.cache.get(a).enabled:!1},initScripts:function(){for(var a=0,b=this.behaviors.length;a<b;){var c=
a++,c=this.behaviors[c];c.initScript(!c.enabled)}},getAttribute:function(a,b){var c=this.cache.get(a);if(null!=c&&null!=c.script){b=c.script.toInternalName(b);var d=O.field(c.script,b);null!=d||Object.prototype.hasOwnProperty.call(c.script,b)||null;return d}null;return null},setAttribute:function(a,b,c){a=this.cache.get(a);null!=a&&null!=a.script?null!=O.field(a.script,b)||Object.prototype.hasOwnProperty.call(a.script,b)?(a.script[b]=c,a.script.propertyChanged(b,c)):null:null},call:function(a,b){if(null==
this.cache)return null;for(var c=null,d=0,e=this.behaviors.length;d<e;){var f=d++,f=this.behaviors[f];if(f.enabled&&null!=f.script)try{var g=O.field(f.script,a);null!=g?c=g.apply(f.script,b):f.script.forwardMessage(a)}catch(k){if(Ia.lastException=k,k instanceof F&&(k=k.val),q.__instanceof(k,String))f.script.forwardMessage(a);else throw k;}}return c},call2:function(a,b,c){if(null==this.cache)return null;var d=null;a=this.cache.get(a);if(null!=a){if(!a.enabled||null==a.script)return d;try{var e=O.field(a.script,
b);null!=e?d=e.apply(a.script,c):a.script.forwardMessage(b)}catch(f){if(Ia.lastException=f,f instanceof F&&(f=f.val),q.__instanceof(f,String))a.script.forwardMessage(b);else throw f;}}return d},__class__:Ki};var Qc=function(){l.call(this)};n["com.stencyl.behavior.SceneScript"]=Qc;Qc.__name__=["com","stencyl","behavior","SceneScript"];Qc.__super__=l;Qc.prototype=L(l.prototype,{__class__:Qc});var Ni=function(a,b,c,d){this.toExecute=a;this.interval=b;this.repeats=c;this.actor=d;this.done=!1;this.timer=
b};n["com.stencyl.behavior.TimedTask"]=Ni;Ni.__name__=["com","stencyl","behavior","TimedTask"];Ni.prototype={update:function(a){null==this.actor||this.actor.isAlive()?null==this.actor&&h.engine.isPaused()||null!=this.actor&&this.actor.isPaused()||(this.timer-=a,0>=this.timer&&(this.toExecute(this),this.done=!this.repeats,this.repeats&&(this.timer+=this.interval))):this.done=!0},__class__:Ni};var og=function(a,b,c){this.metaType=a;this.type=b;this.fn=c};n["com.stencyl.event.NativeListener"]=og;og.__name__=
["com","stencyl","event","NativeListener"];og.prototype={checkEvents:function(a){a=a.eventTable.h[this.metaType];if(null!=a)for(var b=0;b<a.length;){var c=a[b];++b;c.type==this.type&&(this.metaType==ac.TYPE_ADS?this.fn():this.metaType==ac.TYPE_PURCHASES?this.fn(c.data1):this.metaType==ac.TYPE_GAMECENTER?this.fn(c.data1):this.metaType==ac.TYPE_KEYBOARD&&this.fn(c.data1))}},__class__:og};var sb=function(a,b){null==b&&(b="");this.type=a;this.data1=b};n["com.stencyl.event.StencylEvent"]=sb;sb.__name__=
["com","stencyl","event","StencylEvent"];sb.prototype={__class__:sb};var md=function(){};n["com.stencyl.graphics.AbstractAnimation"]=md;md.__name__=["com","stencyl","graphics","AbstractAnimation"];md.prototype={__class__:md};var qb=function(a,b,c){null==c&&(c=!1);wa.call(this);this.bitmapData=a;this.pixelSnapping=b;this.smoothing=c;null==b&&(this.pixelSnapping=1)};n["openfl.display.Bitmap"]=qb;qb.__name__=["openfl","display","Bitmap"];qb.__super__=wa;qb.prototype=L(wa.prototype,{__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,f){if(!f.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(f),!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){an.render(this,a)},__renderCairoMask:function(a){a.cairo.rectangle(0,0,this.get_width(),this.get_height())},__renderCanvas:function(a){bn.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?Lf.renderImage(this,a):Lf.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){null!=this.bitmapData&&(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,Oa.__identity),wa.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__:qb});var qh=function(a,b,c,d,e,f,g){qb.call(this,new Ba(a.width/c|0,a.height/d|0));this.model=g;this.across=c;this.down=d;this.frameWidth=
a.width/c|0;this.frameHeight=a.height/d|0;this.set_x(Math.round(-a.width/(2*c)*h.SCALE));this.set_y(Math.round(-a.height/(2*d)*h.SCALE));this.frameIndex=this.timer=0;this.looping=f;this.sheet=a;this.durations=e;this.individualDurations=!1;this.numFrames=b;this.smoothing=ra.antialias;this.region=new ha(0,0,this.frameWidth*h.SCALE,this.frameHeight*h.SCALE);this.pt=new W(0,0);this.finished=1>=b;this.region.x=this.frameIndex%this.across*this.frameWidth;this.region.y=this.frameHeight*Math.floor(this.frameIndex/
this.across);this.bitmapData.fillRect(this.bitmapData.rect,0);this.bitmapData.copyPixels(this.sheet,this.region,this.pt);this.needsUpdate=!1};n["com.stencyl.graphics.BitmapAnimation"]=qh;qh.__name__=["com","stencyl","graphics","BitmapAnimation"];qh.__interfaces__=[md];qh.__super__=qb;qh.prototype=L(qb.prototype,{update:function(a){null!=this.model&&this.looping?(a=this.frameIndex,this.timer=this.model.sharedTimer,this.frameIndex=this.model.sharedFrameIndex,a!=this.frameIndex&&(this.needsUpdate=!0)):
(this.timer+=a,0<this.numFrames&&this.timer>this.durations[this.frameIndex]&&(a=this.frameIndex,this.timer-=this.durations[this.frameIndex],this.frameIndex++,this.frameIndex>=this.numFrames&&(this.looping?this.frameIndex=0:(this.finished=!0,this.frameIndex--)),a!=this.frameIndex&&(this.needsUpdate=!0)))},getCurrentFrame:function(){return this.frameIndex},getNumFrames:function(){return this.numFrames},setFrame:function(a){if(0>a||a>=this.numFrames)a=0;a!=this.frameIndex&&(this.frameIndex=a,this.needsUpdate=
!0);this.timer=0;this.finished=!1;null!=this.model&&(this.model.sharedFrameIndex=a)},isFinished:function(){return this.finished},needsBitmapUpdate:function(){return this.needsUpdate},reset:function(){this.frameIndex=this.timer=0;this.finished=!1;this.needsUpdate=!0},updateBitmap:function(){this.region.x=this.frameIndex%this.across*this.frameWidth;this.region.y=this.frameHeight*Math.floor(this.frameIndex/this.across);this.bitmapData.fillRect(this.bitmapData.rect,0);this.bitmapData.copyPixels(this.sheet,
this.region,this.pt);this.needsUpdate=!1},draw:function(a,b,c,d,e){a.drawImage(this.bitmapData,b,c,d,null)},getFrameDurations:function(){return this.durations},setFrameDurations:function(a){if(null!=this.durations){for(var b=[],c=0,d=this.durations.length;c<d;)c++,b.push(a);this.durations=b;this.individualDurations=!0}},setFrameDuration:function(a,b){if(!this.individualDurations){for(var c=[],d=0,e=this.durations.length;d<e;){var f=d++;c.push(this.durations[f])}this.durations=c;this.individualDurations=
!0}0<=a&&a<this.durations.length&&(this.durations[a]=b)},getCurrentImage:function(){return this.bitmapData},__class__:qh});var Cc=function(a,b,c,d,e,f,g,k,p){null==p&&(p=0);null==k&&(k=0);null==g&&(g=0);null==f&&(f=0);qb.call(this);this.align="left";this.multiLine=!1;this.autoUpperCase=!0;this.customSpacingY=this.customSpacingX=0;this.fontSet=R.getBitmapData(a);this.characterWidth=b;this.characterHeight=c;this.characterSpacingX=f;this.characterSpacingY=g;this.characterPerRow=e;this.offsetX=k;this.offsetY=
p;this.grabData=[];a=this.offsetX;b=this.offsetY;e=c=0;for(f=d.length;e<f;)g=e++,this.grabData[P.cca(d,g)]=new ha(a,b,this.characterWidth,this.characterHeight),c++,c==this.characterPerRow?(c=0,a=this.offsetX,b+=this.characterHeight+this.characterSpacingY):a+=this.characterWidth+this.characterSpacingX};n["com.stencyl.graphics.BitmapFont"]=Cc;Cc.__name__=["com","stencyl","graphics","BitmapFont"];Cc.__super__=qb;Cc.prototype=L(qb.prototype,{set_text:function(a){this._text=this.autoUpperCase?a.toUpperCase():
a;this.removeUnsupportedCharacters(this.multiLine);this.buildBitmapFontText();return this._text},get_text:function(){return this._text},setText:function(a,b,c,d,e,f){null==f&&(f=!1);null==e&&(e="left");null==d&&(d=0);null==c&&(c=0);null==b&&(b=!1);this.customSpacingX=c;this.customSpacingY=d;this.align=e;this.multiLine=b;this.autoUpperCase=f?!1:!0;this.set_text(a)},buildBitmapFontText:function(){var a;if(this.multiLine){var b=this._text.split("\n"),c=0,d=0;a=new Ba(this.getLongestLine()*(this.characterWidth+
this.customSpacingX),b.length*(this.characterHeight+this.customSpacingY)-this.customSpacingY,!0,15);for(var e=0,f=b.length;e<f;){var g=e++;this.align==Cc.ALIGN_LEFT?c=0:this.align==Cc.ALIGN_RIGHT?c=a.width-b[g].length*(this.characterWidth+this.customSpacingX):this.align==Cc.ALIGN_CENTER&&(c=Math.floor(a.width/2-b[g].length*(this.characterWidth+this.customSpacingX)/2),c+=Math.floor(this.customSpacingX/2));this.pasteLine(a,b[g],c,d,this.customSpacingX);d+=this.characterHeight+this.customSpacingY}}else a=
new Ba(this._text.length*(this.characterWidth+this.customSpacingX),this.characterHeight,!0,15),this.pasteLine(a,this._text,0,0,this.customSpacingX);this.bitmapData=a},getCharacter:function(a){var b=new qb,c=new Ba(this.characterWidth,this.characterHeight,!0,15);u.is(this.grabData[P.cca(a,0)],ha)&&32!=P.cca(a,0)&&c.copyPixels(this.fontSet,this.grabData[P.cca(a,0)],new W(0,0));b.bitmapData=c;return b},pasteLine:function(a,b,c,d,e){null==e&&(e=0);null==d&&(d=0);null==c&&(c=0);for(var f=0,g=b.length;f<
g;){var k=f++;" "==b.charAt(k)?c+=this.characterWidth+e:u.is(this.grabData[P.cca(b,k)],ha)&&(a.copyPixels(this.fontSet,this.grabData[P.cca(b,k)],new W(c,d)),c+=this.characterWidth+e)}},getLongestLine:function(){var a=0;if(0<this._text.length)for(var b=this._text.split("\n"),c=0,d=b.length;c<d;){var e=c++;b[e].length>a&&(a=b[e].length)}return a},removeUnsupportedCharacters:function(a){null==a&&(a=!0);for(var b="",c=0,d=this._text.length;c<d;){var e=c++;if(u.is(this.grabData[P.cca(this._text,e)],ha)||
32==P.cca(this._text,e)||0==a&&"\n"==this._text.charAt(e))b+=this._text.charAt(e)}return b},__class__:Cc,__properties__:L(qb.prototype.__properties__,{set_text:"set_text",get_text:"get_text"})});var dl=function(a){ga.call(this);this.img=a;this.offsetY=this.offsetX=0;this.addChild(a)};n["com.stencyl.graphics.BitmapWrapper"]=dl;dl.__name__=["com","stencyl","graphics","BitmapWrapper"];dl.__super__=ga;dl.prototype=L(ga.prototype,{set_imgX:function(a){this.set_x(a+this.offsetX);return this.imgX=a},get_imgX:function(){return this.imgX},
set_imgY:function(a){this.set_y(a+this.offsetY);return this.imgY=a},get_imgY:function(){return this.imgY},set_smoothing:function(a){return this.img.smoothing=a},get_smoothing:function(){return this.img.smoothing},setOrigin:function(a,b){this.set_x(this.get_x()+(a-this.offsetX));this.set_y(this.get_y()+(b-this.offsetY));this.offsetX=a;this.offsetY=b;this.img.set_x(-a);this.img.set_y(-b)},__class__:dl,__properties__:L(ga.prototype.__properties__,{set_imgY:"set_imgY",get_imgY:"get_imgY",set_imgX:"set_imgX",
get_imgX:"get_imgX",set_smoothing:"set_smoothing",get_smoothing:"get_smoothing"})});var Ti=function(){};n["com.stencyl.graphics.BlendModes"]=Ti;Ti.__name__=["com","stencyl","graphics","BlendModes"];Ti.get=function(a){return Ti.stringBlendMap.get(a)};var Ed=function(){this.drawActor=!1;this.x=this.y=0;this.scaleX=this.scaleY=h.SCALE;this.alpha=1;this.blendMode=10;this.strokeColor=this.fillColor=this.strokeSize=0;this.rect=new ha;this.rect2=new ha;this.point=new W;this.point2=new W;this.data=[0,0,0];
this.drawPoly=!1;this.firstY=this.firstX=this.pointCounter=0;this.font=this.defaultFont=new ye(-1,0,"",!0);this.drawData=[];null==Ed.fontCache&&(Ed.fontCache=new xa);this.mtx=new Oa;var a=Ed.fontCache.h[-1];null==a&&(a=this.font.font.getPreparedGlyphs(this.font.fontScale,0,!0),Ed.fontCache.h[-1]=a);this.fontData=a};n["com.stencyl.graphics.G"]=Ed;Ed.__name__=["com","stencyl","graphics","G"];Ed.prototype={resetGraphicsSettings:function(){this.alpha=1;this.strokeColor=this.fillColor=this.strokeSize=
0;this.font=this.defaultFont},setFont:function(a){null!=a&&a!=this.font&&(this.font=a,this.font==this.defaultFont?(this.fontData=Ed.fontCache.h[-1],null==this.fontData&&(this.fontData=this.font.font.getPreparedGlyphs(this.font.fontScale,0,!0),Ed.fontCache.h[-1]=this.fontData)):(this.fontData=Ed.fontCache.h[this.font.ID],null==this.fontData&&(this.fontData=this.font.font.getPreparedGlyphs(this.font.fontScale,0,!1),Ed.fontCache.h[this.font.ID]=this.fontData)))},startGraphics:function(){!this.drawActor||
null!=this.actor&&this.actor.isHUD||(this.x+=h.cameraX,this.y+=h.cameraY);0==this.strokeSize?this.graphics.lineStyle():this.graphics.lineStyle(this.strokeSize,this.strokeColor,this.alpha)},endGraphics:function(){this.drawActor&&!this.actor.isHUD&&(this.x-=h.cameraX,this.y-=h.cameraY);this.graphics.lineStyle()},translate:function(a,b){this.x+=a*this.scaleX;this.y+=b*this.scaleY},moveTo:function(a,b){this.drawActor?(null!=this.actor&&this.translateToActor(this.actor),this.x+=a*this.scaleX,this.y+=b*
this.scaleY):(this.x=a*this.scaleX,this.y=b*this.scaleY)},translateToScreen:function(){this.drawActor=!1;this.actor=null;this.y=this.x=0},translateToActor:function(a){this.drawActor=!0;this.actor=a;if(a.smoothMove){var b=a.drawY-Math.floor(a.cacheHeight/2)-a.currOffset.y;this.x=(a.drawX-Math.floor(a.cacheWidth/2)-a.currOffset.x)*this.scaleX;this.y=b*this.scaleY}else this.x=a.colX*this.scaleX,this.y=a.colY*this.scaleY},drawString:function(a,b,c){null==this.font&&(this.font=this.defaultFont);this.drawActor?
null!=this.actor&&this.actor.isHUD?(b=this.x+b*this.scaleX,c=this.y+c*this.scaleY):(b=this.x+b*this.scaleX+h.cameraX,c=this.y+c*this.scaleY+h.cameraY):(b=this.x+b*this.scaleX,c=this.y+c*this.scaleY);this.mtx.identity();this.mtx.translate(b,c);var d=this.font.font.getTextWidth(a,this.font.letterSpacing,this.font.fontScale),e=u["int"](this.font.font.getFontHeight()*this.font.fontScale);if(0<d&&0<e){var f=new Ba(d,e,!0,0);this.font.font.render(f,this.fontData,a,0,this.alpha,0,0,this.font.letterSpacing,
0);this.graphics.beginBitmapFill(f,this.mtx);this.graphics.drawRect(b,c,d,e);this.graphics.endFill()}},drawLine:function(a,b,c,d){a*=this.scaleX;b*=this.scaleY;c*=this.scaleX;d*=this.scaleY;!this.drawActor||null!=this.actor&&this.actor.isHUD||(this.x+=h.cameraX,this.y+=h.cameraY);0==this.strokeSize?this.graphics.lineStyle():this.graphics.lineStyle(this.strokeSize,this.strokeColor,this.alpha);this.graphics.moveTo(this.x+a,this.y+b);this.graphics.lineTo(this.x+c,this.y+d);this.drawActor&&!this.actor.isHUD&&
(this.x-=h.cameraX,this.y-=h.cameraY);this.graphics.lineStyle()},fillPixel:function(a,b){!this.drawActor||null!=this.actor&&this.actor.isHUD||(this.x+=h.cameraX,this.y+=h.cameraY);0==this.strokeSize?this.graphics.lineStyle():this.graphics.lineStyle(this.strokeSize,this.strokeColor,this.alpha);this.graphics.lineStyle();this.graphics.beginFill(this.fillColor,this.alpha);this.graphics.drawRect(this.x+(a*h.SCALE|0),this.y+(b*h.SCALE|0),h.SCALE|0,h.SCALE|0);this.graphics.endFill();this.drawActor&&!this.actor.isHUD&&
(this.x-=h.cameraX,this.y-=h.cameraY);this.graphics.lineStyle()},drawRect:function(a,b,c,d){a*=this.scaleX;b*=this.scaleY;c*=this.scaleX;d*=this.scaleY;!this.drawActor||null!=this.actor&&this.actor.isHUD||(this.x+=h.cameraX,this.y+=h.cameraY);0==this.strokeSize?this.graphics.lineStyle():this.graphics.lineStyle(this.strokeSize,this.strokeColor,this.alpha);this.graphics.drawRect(this.x+a,this.y+b,c,d);this.drawActor&&!this.actor.isHUD&&(this.x-=h.cameraX,this.y-=h.cameraY);this.graphics.lineStyle()},
fillRect:function(a,b,c,d){a*=this.scaleX;b*=this.scaleY;c*=this.scaleX;d*=this.scaleY;!this.drawActor||null!=this.actor&&this.actor.isHUD||(this.x+=h.cameraX,this.y+=h.cameraY);0==this.strokeSize?this.graphics.lineStyle():this.graphics.lineStyle(this.strokeSize,this.strokeColor,this.alpha);this.graphics.beginFill(this.fillColor,this.alpha);this.graphics.drawRect(this.x+a,this.y+b,c,d);this.graphics.endFill();this.drawActor&&!this.actor.isHUD&&(this.x-=h.cameraX,this.y-=h.cameraY);this.graphics.lineStyle()},
drawRoundRect:function(a,b,c,d,e){a*=this.scaleX;b*=this.scaleY;c*=this.scaleX;d*=this.scaleY;!this.drawActor||null!=this.actor&&this.actor.isHUD||(this.x+=h.cameraX,this.y+=h.cameraY);0==this.strokeSize?this.graphics.lineStyle():this.graphics.lineStyle(this.strokeSize,this.strokeColor,this.alpha);this.graphics.drawRoundRect(this.x+a,this.y+b,c,d,e,e);this.drawActor&&!this.actor.isHUD&&(this.x-=h.cameraX,this.y-=h.cameraY);this.graphics.lineStyle()},fillRoundRect:function(a,b,c,d,e){a*=this.scaleX;
b*=this.scaleY;c*=this.scaleX;d*=this.scaleY;!this.drawActor||null!=this.actor&&this.actor.isHUD||(this.x+=h.cameraX,this.y+=h.cameraY);0==this.strokeSize?this.graphics.lineStyle():this.graphics.lineStyle(this.strokeSize,this.strokeColor,this.alpha);this.graphics.beginFill(this.fillColor,this.alpha);this.graphics.drawRoundRect(this.x+a,this.y+b,c,d,e,e);this.graphics.endFill();this.drawActor&&!this.actor.isHUD&&(this.x-=h.cameraX,this.y-=h.cameraY);this.graphics.lineStyle()},drawCircle:function(a,
b,c){a*=this.scaleX;b*=this.scaleY;c*=this.scaleX;!this.drawActor||null!=this.actor&&this.actor.isHUD||(this.x+=h.cameraX,this.y+=h.cameraY);0==this.strokeSize?this.graphics.lineStyle():this.graphics.lineStyle(this.strokeSize,this.strokeColor,this.alpha);this.graphics.drawCircle(this.x+a,this.y+b,c);this.drawActor&&!this.actor.isHUD&&(this.x-=h.cameraX,this.y-=h.cameraY);this.graphics.lineStyle()},fillCircle:function(a,b,c){a*=this.scaleX;b*=this.scaleY;c*=this.scaleX;!this.drawActor||null!=this.actor&&
this.actor.isHUD||(this.x+=h.cameraX,this.y+=h.cameraY);0==this.strokeSize?this.graphics.lineStyle():this.graphics.lineStyle(this.strokeSize,this.strokeColor,this.alpha);this.graphics.beginFill(this.fillColor,this.alpha);this.graphics.drawCircle(this.x+a,this.y+b,c);this.graphics.endFill();this.drawActor&&!this.actor.isHUD&&(this.x-=h.cameraX,this.y-=h.cameraY);this.graphics.lineStyle()},beginFillPolygon:function(){this.drawPoly=!1;!this.drawActor||null!=this.actor&&this.actor.isHUD||(this.x+=h.cameraX,
this.y+=h.cameraY);0==this.strokeSize?this.graphics.lineStyle():this.graphics.lineStyle(this.strokeSize,this.strokeColor,this.alpha);this.graphics.moveTo(this.x,this.y);this.pointCounter=0},endDrawingPolygon:function(){2<=this.pointCounter&&(this.drawPoly?this.graphics.lineTo(this.x+this.firstX,this.y+this.firstY):(this.graphics.lineTo(this.x+this.firstX,this.y+this.firstY),this.graphics.endFill()),this.drawActor&&!this.actor.isHUD&&(this.x-=h.cameraX,this.y-=h.cameraY),this.graphics.lineStyle())},
beginDrawPolygon:function(){this.drawPoly=!0;!this.drawActor||null!=this.actor&&this.actor.isHUD||(this.x+=h.cameraX,this.y+=h.cameraY);0==this.strokeSize?this.graphics.lineStyle():this.graphics.lineStyle(this.strokeSize,this.strokeColor,this.alpha);this.graphics.moveTo(this.x,this.y);this.pointCounter=0},addPointToPolygon:function(a,b){a*=this.scaleX;b*=this.scaleY;0==this.pointCounter&&(this.firstX=a,this.firstY=b,this.graphics.moveTo(this.x+a,this.y+b),this.drawPoly||this.graphics.beginFill(this.fillColor,
this.alpha));this.pointCounter++;this.graphics.lineTo(this.x+a,this.y+b)},drawImage:function(a,b,c,d,e){null==d&&(d=0);b*=this.scaleX;c*=this.scaleY;this.rect.x=0;this.rect.y=0;this.rect.width=a.width;this.rect.height=a.height;this.drawActor?null!=this.actor&&this.actor.isHUD?(this.point.x=this.x+b,this.point.y=this.y+c):(this.point.x=this.x+b+h.cameraX,this.point.y=this.y+c+h.cameraY):(this.point.x=this.x+b,this.point.y=this.y+c);0!=d?(this.mtx.identity(),this.mtx.rotate(-d),this.mtx.translate(this.point.x,
this.point.y),this.canvas.draw(a,this.mtx)):this.canvas.copyPixels(a,this.rect,this.point)},toARGB:function(a,b){var c=0;return c=a+(b<<24)},resetFont:function(){this.font=this.defaultFont},__class__:Ed};var Ui=function(a,b,c,d,e,f){this.blendName="NORMAL";this.tint=!1;ga.call(this);this.model=f;this.set_x(-c/2*h.SCALE);this.set_y(-d/2*h.SCALE);this.frameIndex=this.timer=0;this.frameWidth=c;this.frameHeight=d;this.looping=e;this.tilesheet=a;this.durations=b;this.numFrames=b.length;this.data=[0,0,
0];this.data[0]=0;this.data[1]=0;this.data[2]=this.frameIndex;this.tint?(this.data[3]=this.redValue,this.data[4]=this.greenValue,this.data[5]=this.blueValue,this.get_graphics().clear(),this.tilesheet.drawTiles(this.get_graphics(),this.data,ra.antialias,4)):(this.data[3]=1,this.data[4]=1,this.data[5]=1,this.get_graphics().clear(),"ADD"==this.blendName?this.tilesheet.drawTiles(this.get_graphics(),this.data,ra.antialias,65540):"MULTIPLY"==this.blendName?this.tilesheet.drawTiles(this.get_graphics(),this.data,
ra.antialias,131076):"SCREEN"==this.blendName?this.tilesheet.drawTiles(this.get_graphics(),this.data,ra.antialias,262148):this.tilesheet.drawTiles(this.get_graphics(),this.data,ra.antialias,4));this.needsUpdate=!1};n["com.stencyl.graphics.SheetAnimation"]=Ui;Ui.__name__=["com","stencyl","graphics","SheetAnimation"];Ui.__interfaces__=[md];Ui.__super__=ga;Ui.prototype=L(ga.prototype,{update:function(a){null!=this.model&&this.looping?(a=this.frameIndex,this.timer=this.model.sharedTimer,this.frameIndex=
this.model.sharedFrameIndex,a!=this.frameIndex&&(this.needsUpdate=!0)):(this.timer+=a,0<this.numFrames&&this.timer>this.durations[this.frameIndex]&&(a=this.frameIndex,this.timer-=this.durations[this.frameIndex],this.frameIndex++,this.frameIndex>=this.numFrames&&(this.looping?this.frameIndex=0:(this.finished=!0,this.frameIndex--)),a!=this.frameIndex&&(this.needsUpdate=!0)))},getCurrentFrame:function(){return this.frameIndex},getNumFrames:function(){return this.numFrames},setFrame:function(a){if(0>
a||a>=this.numFrames)a=0;a!=this.frameIndex&&(this.frameIndex=a,this.needsUpdate=!0);this.timer=0;this.finished=!1;null!=this.model&&(this.model.sharedFrameIndex=a)},isFinished:function(){return this.finished},needsBitmapUpdate:function(){return this.needsUpdate},reset:function(){this.frameIndex=this.timer=0;this.finished=!1;this.needsUpdate=!0},updateBitmap:function(){this.data[0]=0;this.data[1]=0;this.data[2]=this.frameIndex;this.tint?(this.data[3]=this.redValue,this.data[4]=this.greenValue,this.data[5]=
this.blueValue,this.get_graphics().clear(),this.tilesheet.drawTiles(this.get_graphics(),this.data,ra.antialias,4)):(this.data[3]=1,this.data[4]=1,this.data[5]=1,this.get_graphics().clear(),"ADD"==this.blendName?this.tilesheet.drawTiles(this.get_graphics(),this.data,ra.antialias,65540):"MULTIPLY"==this.blendName?this.tilesheet.drawTiles(this.get_graphics(),this.data,ra.antialias,131076):"SCREEN"==this.blendName?this.tilesheet.drawTiles(this.get_graphics(),this.data,ra.antialias,262148):this.tilesheet.drawTiles(this.get_graphics(),
this.data,ra.antialias,4));this.needsUpdate=!1},draw:function(a,b,c,d,e){this.data[0]=b;this.data[1]=c;this.data[2]=this.frameIndex;this.data[3]=d;this.data[4]=e;this.tilesheet.drawTiles(a.graphics,this.data,ra.antialias,10)},getFrameDurations:function(){return this.durations},setFrameDurations:function(a){if(null!=this.durations){for(var b=[],c=0,d=this.durations.length;c<d;)c++,b.push(a);this.durations=b;this.individualDurations=!0}},setFrameDuration:function(a,b){if(!this.individualDurations){for(var c=
[],d=0,e=this.durations.length;d<e;){var f=d++;c.push(this.durations[f])}this.durations=c;this.individualDurations=!0}0<=a&&a<this.durations.length&&(this.durations[a]=b)},getCurrentImage:function(){var a=new Ba(u["int"](this.get_width()),u["int"](this.get_height()),!0,16777215);a.copyPixels(this.tilesheet.__bitmap,new ha(this.frameIndex%this.framesAcross*this.get_width(),Math.floor(this.frameIndex/this.framesAcross)*this.get_height(),u["int"](this.get_width()),u["int"](this.get_height())),new W(0,
0),null,null,!1);return a},getBitmap:function(){return this.tilesheet.__bitmap},__class__:Ui});var sd=function(){this._maxHeight=0;this._point=new W;this._matrix=new Oa;this._colorTransform=new yd;this._glyphs=[]};n["com.stencyl.graphics.fonts.BitmapFont"]=sd;sd.__name__=["com","stencyl","graphics","fonts","BitmapFont"];sd.store=function(a,b){sd._storedFonts.set(a,b)};sd.fetch=function(a){return sd._storedFonts.get(a)};sd.prototype={loadPixelizer:function(a,b){this.reset();this._glyphString=b;if(null!=
a){var c=[];this.prepareBitmapData(a,c);for(var d,e=0,f=c.length;e<f;){var g=e++;d=c[g];var k=new Ba(Math.floor(d.width),Math.floor(d.height),!0,0);k.copyPixels(a,d,sd.ZERO_POINT,null,null,!0);this.setGlyph(P.cca(this._glyphString,g),k)}}return this},loadAngelCode:function(a,b){this.reset();if(null!=a){this._glyphString="";var c=new ha,d=new W,e,f=0,g;g=null;for(var k=b.elements();k.hasNext();){e=k.next();if(e.nodeType!=ba.Element)throw new F("Bad node type, expected Element but found "+e.nodeType);
if("font"==e.nodeName)for(e=e.elements();e.hasNext();){var p=e.next();if(p.nodeType!=ba.Element)throw new F("Bad node type, expected Element but found "+p.nodeType);if("chars"==p.nodeName){g=p;break}}}if(null!=g)for(k=g.elements();k.hasNext();){p=k.next();if(p.nodeType!=ba.Element)throw new F("Bad node type, expected Element but found "+p.nodeType);if("char"==p.nodeName){c.x=u.parseInt(p.get("x"));c.y=u.parseInt(p.get("y"));c.width=u.parseInt(p.get("width"));c.height=u.parseInt(p.get("height"));d.x=
u.parseInt(p.get("xoffset"));d.y=u.parseInt(p.get("yoffset"));g=u.parseInt(p.get("id"));e=String.fromCharCode(g);this._glyphString+=e;var h=u.parseInt(p.get("xadvance")),l=h;c.width>h&&(l=c.width|0,d.x=0);e=" "!=e&&""!=e?new Ba(l,u.parseInt(p.get("height"))+u.parseInt(p.get("yoffset")),!0,0):new Ba(l,1,!0,0);e.copyPixels(a,c,d,null,null,!0);this.setGlyph(g,e);f++}}}return this},reset:function(){this.dispose();this._maxHeight=0;this._glyphs=[];this._glyphString=""},prepareBitmapData:function(a,b){for(var c=
a.getPixel(0,0),d=0,e;d<a.height;){var f=0;for(e=0;e<a.width;){if(u["int"](a.getPixel(e,d))!=c){for(var g=e,k=d;u["int"](a.getPixel(g,d))!=c;)g++;for(;u["int"](a.getPixel(e,k))!=c;)k++;g-=e;k-=d;b.push(new ha(e,d,g,k));k>f&&(f=k);k>this._maxHeight&&(this._maxHeight=k);e+=g}e++}d+=f+1}c=a.clone();k=a.getPixel32(0,0);for(d=0;d<a.height;){for(e=0;e<a.width;)f=a.getPixel32(e,d),f==k&&c.setPixel32(e,d,0),e++;d++}return c},getPreparedGlyphs:function(a,b,c){null==c&&(c=!0);var d=[];this._matrix.identity();
this._matrix.scale(a,a);this._colorTransform.redOffset=0;this._colorTransform.greenOffset=0;this._colorTransform.blueOffset=0;this._colorTransform.redMultiplier=.00392*(b>>16);this._colorTransform.greenMultiplier=.00392*(b>>8&255);this._colorTransform.blueMultiplier=.00392*(b&255);for(var e,f=0,g=this._glyphs.length;f<g;){var k=f++;b=this._glyphs[k];null!=b&&(e=new Ba(Math.floor(b.width*a),Math.floor(b.height*a),!0,0),c?e.draw(b,this._matrix,this._colorTransform):e.draw(b,this._matrix),d[k]=e)}return d},
dispose:function(){for(var a,b=0,c=this._glyphs.length;b<c;){var d=b++;a=this._glyphs[d];null!=a&&this._glyphs[d].dispose()}this._glyphs=null},getFontData:function(){for(var a="",b=0,c=this._glyphString.length;b<c;)for(var d=b++,e=P.cca(this._glyphString,d),e=this._glyphs[e],a=a+P.substr(this._glyphString,d,1),a=a+e.width,a=a+e.height,d=0,f=e.height;d<f;)for(var g=d++,k=0,p=e.width;k<p;)var h=k++,a=0!=e.getPixel32(h,g)?a+"1":a+"0";return a},setGlyph:function(a,b){null!=this._glyphs[a]&&this._glyphs[a].dispose();
this._glyphs[a]=b;b.height>this._maxHeight&&(this._maxHeight=b.height)},render:function(a,b,c,d,e,f,g,k,p){this._point.x=f;this._point.y=g;f=d=0;for(g=c.length;f<g;)if(p=f++,!(p<d)){var h=P.cca(c,p);126==h&&"x"==c.charAt(p+1)&&(p=c.substring(p+2,p+6),h=u.parseInt("0x"+p),d+=5);p=b[h];if(null!=p){if(1==e)a.copyPixels(p,p.rect,this._point,null,null,!0);else{var h=new yd(1,1,1,e,0,0,0,0),l=p.clone();l.colorTransform(l.rect,h);a.copyPixels(l,l.rect,this._point,null,null,!0)}this._point.x+=p.width+k}d++}},
toARGB:function(a,b){var c=0;return c=a+(b<<24)},getTextWidth:function(a,b,c){null==c&&(c=1);null==b&&(b=0);for(var d=0,e=0,f=a.length,g=0;g<f;){var k=g++;if(!(k<e)){var p=P.cca(a,k);126==p&&"x"==a.charAt(k+1)&&(k=a.substring(k+2,k+6),p=u.parseInt("0x"+k),e+=5);k=this._glyphs[p];null!=k&&(d+=k.width);e++}}d=Math.round(d*c);1<f&&(d+=(f-1)*b);return d},getFontHeight:function(){return this._maxHeight},get_numLetters:function(){return this._glyphs.length},containsCharacter:function(a){return 0<=this._glyphString.indexOf(a)},
__class__:sd,__properties__:{get_numLetters:"get_numLetters"}};var lf=function(){};n["com.stencyl.graphics.fonts.DefaultFontGenerator"]=lf;lf.__name__=["com","stencyl","graphics","fonts","DefaultFontGenerator"];lf.generateAndStoreDefaultFont=function(){for(var a="",b=new Ba(700,9,!0,-7829368),c=0,d=0;d<lf.fontData.length;){for(var a=a+P.substr(lf.fontData,d,1),e=u.parseInt(function(a){a=++d;return P.substr(lf.fontData,a,1)}(this)),f=0,g=u.parseInt(function(a){a=++d;return P.substr(lf.fontData,a,1)}(this));f<
g;)for(var k=f++,p=0,h=e;p<h;){var l=p++;d++;"1"==P.substr(lf.fontData,d,1)?b.setPixel32(1+7*c+l,1+k,-1):b.setPixel32(1+7*c+l,1+k,0)}d++;c++}sd.store("default",(new sd).loadPixelizer(b,a));b.dispose()};var el=function(a){ga.call(this);this.canvas=this.get_graphics();this._text="";this._color=0;this._useColor=!0;this._outline=!1;this._outlineColor=0;this._shadow=!1;this._shadowColor=0;this._background=!1;this._backgroundColor=16777215;this._alignment=1;this._padding=0;this._pendingTextChange=!1;this._fieldWidth=
1;this._multiLine=!1;this._letterSpacing=this._lineSpacing=0;this._fontScale=1;this._autoUpperCase=!1;this._wordWrap=this._fixedWidth=!0;this._alpha=1;null==a?(null==sd.fetch("default")&&lf.generateAndStoreDefaultFont(),this._font=sd.fetch("default")):this._font=a;this.updateGlyphs(!0,this._shadow,this._outline);this.bitmapData=new Ba(1,1,!0);this._bitmap=new qb(this.bitmapData);this.addChild(this._bitmap);this._pendingTextChange=!0;this.update()};n["com.stencyl.graphics.fonts.Label"]=el;el.__name__=
["com","stencyl","graphics","fonts","Label"];el.__super__=ga;el.prototype=L(ga.prototype,{destroy:function(){this._font=null;this.removeChild(this._bitmap);this._bitmap=null;this.bitmapData.dispose();this.bitmapData=null;this.clearPreparedGlyphs(this._preparedTextGlyphs);this.clearPreparedGlyphs(this._preparedShadowGlyphs);this.clearPreparedGlyphs(this._preparedOutlineGlyphs)},get_text:function(){return this._text},set_text:function(a){var b;b=a.split("\\n").join("\n");b!=this._text&&(this._text=
a,this._text=this._text.split("\\n").join("\n"),this._autoUpperCase&&(this._text=this._text.toUpperCase()),this._pendingTextChange=!0,this.update());return this._text},updateBitmapData:function(){if(null!=this._font){var a=this._fieldWidth,b=[],c=Math.floor(this._font.getFontHeight()*this._fontScale),d=this._alignment,e,f=this._text.split("\n"),g=-1,k=-1;this._multiLine||(f=[f[0]]);for(var p,h;++g<f.length;)if(this._fixedWidth){e=!1;var l=f[g].split(" ");if(0<l.length)for(var m=0,n="";!e;){h=l[m];
var q=n+h+" ",D=!1;if(this._wordWrap)this._font.getTextWidth(q,this._letterSpacing,this._fontScale)>this._fieldWidth?(""==n?l.splice(0,1):b.push(P.substr(n,0,n.length-1)),n="",this._multiLine?l.splice(0,m):l.splice(0,l.length),m=0,D=!0):(n+=h+" ",m++);else if(this._font.getTextWidth(q,this._letterSpacing,this._fontScale)>this._fieldWidth)for(k=0,p=h.length;k<p;)q=n+h.charAt(k),this._font.getTextWidth(q,this._letterSpacing,this._fontScale)>this._fieldWidth?(b.push(P.substr(n,0,n.length-1)),h=n="",
m=l.length,k=p,D=!0):n+=h.charAt(k),k++;else n+=h+" ",m++;m>=l.length&&(D||(e=P.substr(n,0,n.length-1),a=Math.floor(Math.max(a,this._font.getTextWidth(e,this._letterSpacing,this._fontScale))),b.push(e)),e=!0)}else b.push("")}else a=Math.floor(Math.max(a,this._font.getTextWidth(f[g],this._letterSpacing,this._fontScale))),b.push(f[g]);a=a+2*this._padding+(this._outline?2:0);f=Math.floor(2*this._padding+Math.max(1,b.length*c+(this._shadow?1:0)+(this._outline?2:0)))+(1<=b.length?this._lineSpacing*(b.length-
1):0);null==this.bitmapData||a==this.bitmapData.width&&f==this.bitmapData.height||(this.bitmapData.dispose(),this.bitmapData=null);null==this.bitmapData?this.bitmapData=new Ba(a,f,!this._background,this._backgroundColor):this.bitmapData.fillRect(this.bitmapData.rect,this._backgroundColor);this.bitmapData.lock();for(g=f=0;g<b.length;){l=b[g];++g;n=m=0;3==d&&(m=this._fixedWidth?Math.floor((this._fieldWidth-this._font.getTextWidth(l,this._letterSpacing,this._fontScale))/2):Math.floor((a-this._font.getTextWidth(l,
this._letterSpacing,this._fontScale))/2));2==d&&(m=this._fixedWidth?this._fieldWidth-Math.floor(this._font.getTextWidth(l,this._letterSpacing,this._fontScale)):a-Math.floor(this._font.getTextWidth(l,this._letterSpacing,this._fontScale))-2*this.get_padding());if(this._outline){for(e=0;3>e;)for(k=e++,p=0;3>p;)h=p++,this._font.render(this.bitmapData,this._preparedOutlineGlyphs,l,this._outlineColor,this._alpha,h+m+this._padding,k+f*(c+this._lineSpacing)+this._padding,this._letterSpacing);m+=1;n+=1}this._shadow&&
this._font.render(this.bitmapData,this._preparedShadowGlyphs,l,this._shadowColor,this._alpha,1+m+this._padding,1+n+f*(c+this._lineSpacing)+this._padding,this._letterSpacing);this._font.render(this.bitmapData,this._preparedTextGlyphs,l,this._color,this._alpha,m+this._padding,n+f*(c+this._lineSpacing)+this._padding,this._letterSpacing);f++}this.bitmapData.unlock();this._pendingTextChange=!1}},update:function(){this._pendingTextChange&&(this.updateBitmapData(),this._bitmap.bitmapData=this.bitmapData)},
get_background:function(){return this._background},set_background:function(a){this._background!=a&&(this._background=a,this._pendingTextChange=!0,this.update());return a},get_backgroundColor:function(){return this._backgroundColor},set_backgroundColor:function(a){this._backgroundColor!=a&&(this._backgroundColor=a,this._background&&(this._pendingTextChange=!0,this.update()));return a},get_shadow:function(){return this._shadow},set_shadow:function(a){this._shadow!=a&&(this._shadow=a,this._outline=!1,
this.updateGlyphs(!1,this._shadow,!1),this._pendingTextChange=!0,this.update());return a},get_shadowColor:function(){return this._shadowColor},set_shadowColor:function(a){this._shadowColor!=a&&(this._shadowColor=a,this.updateGlyphs(!1,this._shadow,!1),this._pendingTextChange=!0,this.update());return a},get_padding:function(){return this._padding},set_padding:function(a){this._padding!=a&&(this._padding=a,this._pendingTextChange=!0,this.update());return a},get_color:function(){return this._color},
set_color:function(a){this._color!=a&&(this._color=a,this.updateGlyphs(!0,!1,!1),this._pendingTextChange=!0,this.update());return a},get_useColor:function(){return this._useColor},set_useColor:function(a){this._useColor!=a&&(this._useColor=a,this.updateGlyphs(!0,!1,!1),this._pendingTextChange=!0,this.update());return a},setWidth:function(a){1>a&&(a=1);a!=this._fieldWidth&&(this._fieldWidth=a,this._pendingTextChange=!0,this.update());return a},get_alignment:function(){return this._alignment},set_alignment:function(a){this._alignment!=
a&&(this._alignment=a,this._pendingTextChange=!0,this.update());return a},get_multiLine:function(){return this._multiLine},set_multiLine:function(a){this._multiLine!=a&&(this._multiLine=a,this._pendingTextChange=!0,this.update());return a},get_outline:function(){return this._outline},set_outline:function(a){this._outline!=a&&(this._outline=a,this._shadow=!1,this.updateGlyphs(!1,!1,!0),this._pendingTextChange=!0,this.update());return a},get_outlineColor:function(){return this._outlineColor},set_outlineColor:function(a){this._outlineColor!=
a&&(this._outlineColor=a,this.updateGlyphs(!1,!1,this._outline),this._pendingTextChange=!0,this.update());return a},get_font:function(){return this._font},set_font:function(a){this._font!=a&&(this._font=a,this.updateGlyphs(!0,this._shadow,this._outline),this._pendingTextChange=!0,this.update());return a},get_lineSpacing:function(){return this._lineSpacing},set_lineSpacing:function(a){this._lineSpacing!=a&&(this._lineSpacing=Math.floor(Math.abs(a)),this._pendingTextChange=!0,this.update());return a},
setAlpha:function(a){this._alpha!=a&&(this._alpha=a,this.set_alpha(this._alpha))},getAlpha:function(){return this._alpha},get_fontScale:function(){return this._fontScale},set_fontScale:function(a){var b=Math.abs(a);b!=this._fontScale&&(this._fontScale=b,this.updateGlyphs(!0,this._shadow,this._outline),this._pendingTextChange=!0,this.update());return a},get_letterSpacing:function(){return this._letterSpacing},set_letterSpacing:function(a){a=Math.floor(Math.abs(a));a!=this._letterSpacing&&(this._letterSpacing=
a,this._pendingTextChange=!0,this.update());return this._letterSpacing},get_autoUpperCase:function(){return this._autoUpperCase},set_autoUpperCase:function(a){this._autoUpperCase!=a&&(this._autoUpperCase=a)&&this.set_text(this._text.toUpperCase());return this._autoUpperCase},get_wordWrap:function(){return this._wordWrap},set_wordWrap:function(a){this._wordWrap!=a&&(this._wordWrap=a,this._pendingTextChange=!0,this.update());return this._wordWrap},get_fixedWidth:function(){return this._fixedWidth},
set_fixedWidth:function(a){this._fixedWidth!=a&&(this._fixedWidth=a,this._pendingTextChange=!0,this.update());return this._fixedWidth},updateGlyphs:function(a,b,c){null==c&&(c=!1);null==b&&(b=!1);null==a&&(a=!1);a&&(this.clearPreparedGlyphs(this._preparedTextGlyphs),this._preparedTextGlyphs=this._font.getPreparedGlyphs(this._fontScale,this._color,this._useColor));b&&(this.clearPreparedGlyphs(this._preparedShadowGlyphs),this._preparedShadowGlyphs=this._font.getPreparedGlyphs(this._fontScale,this._shadowColor));
c&&(this.clearPreparedGlyphs(this._preparedOutlineGlyphs),this._preparedOutlineGlyphs=this._font.getPreparedGlyphs(this._fontScale,this._outlineColor))},clearPreparedGlyphs:function(a){if(null!=a)for(var b=0;b<a.length;){var c=a[b];++b;null!=c&&c.dispose()}},__class__:el,__properties__:L(ga.prototype.__properties__,{set_fixedWidth:"set_fixedWidth",get_fixedWidth:"get_fixedWidth",set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",set_autoUpperCase:"set_autoUpperCase",get_autoUpperCase:"get_autoUpperCase",
set_letterSpacing:"set_letterSpacing",get_letterSpacing:"get_letterSpacing",set_fontScale:"set_fontScale",get_fontScale:"get_fontScale",set_lineSpacing:"set_lineSpacing",get_lineSpacing:"get_lineSpacing",set_font:"set_font",get_font:"get_font",set_outlineColor:"set_outlineColor",get_outlineColor:"get_outlineColor",set_outline:"set_outline",get_outline:"get_outline",set_multiLine:"set_multiLine",get_multiLine:"get_multiLine",set_alignment:"set_alignment",get_alignment:"get_alignment",set_useColor:"set_useColor",
get_useColor:"get_useColor",set_color:"set_color",get_color:"get_color",set_padding:"set_padding",get_padding:"get_padding",set_shadowColor:"set_shadowColor",get_shadowColor:"get_shadowColor",set_shadow:"set_shadow",get_shadow:"get_shadow",set_backgroundColor:"set_backgroundColor",get_backgroundColor:"get_backgroundColor",set_background:"set_background",get_background:"get_background",set_text:"set_text",get_text:"get_text"})});var fl=function(){};n["com.stencyl.graphics.fonts.TextAlign"]=fl;fl.__name__=
["com","stencyl","graphics","fonts","TextAlign"];var Vb=function(){};n["com.stencyl.graphics.shaders.BasicShader"]=Vb;Vb.__name__=["com","stencyl","graphics","shaders","BasicShader"];Vb.prototype={setProperty:function(a,b){this.model.setUniform(a,b)},getProperty:function(a){return this.model.getUniform(a)},tweenProperty:function(a,b,c,d){null==c&&(c=1);this.model.tweenUniform(a,b,c,d)},enable:function(){h.engine.addShader(this.model)},disable:function(){h.engine.clearShaders();this.model.parent.removeChild(this.model)},
setTimeScale:function(a){this.model.timeScale=a},combine:function(a){h.engine.addShader(this.model);this.model.set_to(a.model);return a},__class__:Vb};var gl=function(a,b,c,d,e,f,g,k,p){null==p&&(p=.0075);null==k&&(k=.009);null==g&&(g=.012);null==f&&(f=.6);null==e&&(e=.4);null==d&&(d=3);null==c&&(c=4);null==b&&(b=.004);null==a&&(a=.25);this.model=new Lc("\n\t\t\tvarying vec2 vTexCoord;\n\t\t\tuniform vec2 uResolution;\n\t\t\tuniform sampler2D uImage0;\n\t\t\t\n\t\t\tuniform float currPixelWeight;\n\t\t\tuniform float neighborPixelWeight;\n\t\t\tuniform float lowThreshold;\n\t\t\tuniform float mediumThreshold;\n\t\t\tuniform float lowMultiplier;\n\t\t\tuniform float mediumMultiplier;\n\t\t\tuniform float highMultiplier;\n\n\t\t\tvoid main(void)\n\t\t\t{\n\t\t\t\tvec4 sum = vec4(0.0);\n\t\t\t\tvec2 q1 = vTexCoord;\n\t\t\t\tvec4 oricol = texture2D(uImage0, vec2(q1.x, q1.y));\n\t\t\t\tvec3 col;\n\t\t\t\t\n\t\t\t\tfor(int i = -3; i < 3; i++) \n\t\t\t\t{\n\t\t\t\t\tfor(int j = -3; j < 3; j++) \n\t\t\t\t\t{\n\t\t\t\t\t\tsum += texture2D(uImage0, vec2(j, i) * neighborPixelWeight + vec2(q1.x, q1.y)) * currPixelWeight;\n\t\t\t\t\t}\n\t\t\t   \t}\n\t\t\t \n\t\t\t  \tif(oricol.r < lowThreshold) \n\t\t\t  \t{\n\t\t\t\t\tgl_FragColor = sum * sum * lowMultiplier + oricol;\n\t\t\t  \t} \n\t\t\t  \n\t\t\t  \telse \n\t\t\t  \t{\n\t\t\t\t\tif(oricol.r < mediumThreshold) \n\t\t\t\t\t{\n\t\t\t\t\t\tgl_FragColor = sum * sum * mediumMultiplier + oricol;\n\t\t\t\t   \t} \n\t\t\t\t   \t\n\t\t\t\t   \telse \n\t\t\t\t   \t{\n\t\t\t\t\t\tgl_FragColor = sum * sum * highMultiplier + oricol;\n\t\t\t\t   \t}\n\t\t\t   }\n\t\t\t}\n\t\t",
!0);this.setProperty("currPixelWeight",a);this.setProperty("neighborPixelWeight",b);this.setProperty("sampleX",c);this.setProperty("sampleY",d);this.setProperty("lowThreshold",e);this.setProperty("mediumThreshold",f);this.setProperty("lowMultiplier",g);this.setProperty("mediumMultiplier",k);this.setProperty("highMultiplier",p)};n["com.stencyl.graphics.shaders.BloomShader"]=gl;gl.__name__=["com","stencyl","graphics","shaders","BloomShader"];gl.__super__=Vb;gl.prototype=L(Vb.prototype,{__class__:gl});
var hl=function(a,b,c){null==c&&(c=1);null==b&&(b=1);null==a&&(a=2);this.model=new Lc("\n\t\t\t//in attributes from our vertex shader\n\t\t\tvarying vec2 vTexCoord;\n\t\t\t\n\t\t\t//declare uniforms\n\t\t\tuniform sampler2D uImage0;\n\t\t\tuniform vec2 uResolution;\n\t\t\t\n\t\t\tuniform float radius;\n\t\t\tuniform float dirx;\n\t\t\tuniform float diry;\n\t\t\t\n\t\t\tvoid main()\n\t\t\t{\n\t\t\t\t//this will be our RGBA sum\n\t\t\t\tvec4 sum = vec4(0.0);\n\t\t\t\n\t\t\t\t//our original texcoord for this fragment\n\t\t\t\tvec2 tc = vTexCoord;\n\t\t\t\n\t\t\t\t//the amount to blur, i.e. how far off center to sample from\n\t\t\t\t//1.0 -> blur by one pixel\n\t\t\t\t//2.0 -> blur by two pixels, etc.\n\t\t\t\tfloat blur = radius / uResolution.x;\n\t\t\t\n\t\t\t\t//the direction of our blur\n\t\t\t\t//(1.0, 0.0) -> x-axis blur\n\t\t\t\t//(0.0, 1.0) -> y-axis blur\n\t\t\t\tfloat hstep = dirx;\n\t\t\t\tfloat vstep = diry;\n\t\t\t\n\t\t\t\t//apply blurring, using a 9-tap filter with predefined gaussian weights\n\t\t\t\n\t\t\t\tsum += texture2D(uImage0, vec2(tc.x - 4.0*blur*hstep, tc.y - 4.0*blur*vstep)) * 0.0162162162;\n\t\t\t\tsum += texture2D(uImage0, vec2(tc.x - 3.0*blur*hstep, tc.y - 3.0*blur*vstep)) * 0.0540540541;\n\t\t\t\tsum += texture2D(uImage0, vec2(tc.x - 2.0*blur*hstep, tc.y - 2.0*blur*vstep)) * 0.1216216216;\n\t\t\t\tsum += texture2D(uImage0, vec2(tc.x - 1.0*blur*hstep, tc.y - 1.0*blur*vstep)) * 0.1945945946;\n\t\t\t\n\t\t\t\tsum += texture2D(uImage0, vec2(tc.x, tc.y)) * 0.2270270270;\n\t\t\t\n\t\t\t\tsum += texture2D(uImage0, vec2(tc.x + 1.0*blur*hstep, tc.y + 1.0*blur*vstep)) * 0.1945945946;\n\t\t\t\tsum += texture2D(uImage0, vec2(tc.x + 2.0*blur*hstep, tc.y + 2.0*blur*vstep)) * 0.1216216216;\n\t\t\t\tsum += texture2D(uImage0, vec2(tc.x + 3.0*blur*hstep, tc.y + 3.0*blur*vstep)) * 0.0540540541;\n\t\t\t\tsum += texture2D(uImage0, vec2(tc.x + 4.0*blur*hstep, tc.y + 4.0*blur*vstep)) * 0.0162162162;\n\t\t\t\n\t\t\t\t//discard alpha for our simple demo, multiply by vertex color and return\n\t\t\t\tgl_FragColor = vec4(sum.rgb, 1.0);\n\t\t\t}\n\t\t",
!0);this.setRadius(a);this.setDirectionX(b);this.setDirectionY(c)};n["com.stencyl.graphics.shaders.BlurShader"]=hl;hl.__name__=["com","stencyl","graphics","shaders","BlurShader"];hl.__super__=Vb;hl.prototype=L(Vb.prototype,{setRadius:function(a){this.setProperty("radius",a)},setDirectionX:function(a){this.setProperty("dirx",a)},setDirectionY:function(a){this.setProperty("diry",a)},__class__:hl});var Mf=function(a,b,c){null==c&&(c=1);null==b&&(b=1);null==a&&(a=1);this.model=new Lc("\n\t\t\tvarying vec2 vTexCoord;\n\t\t\tuniform sampler2D uImage0;\n\t\t\tuniform float contrast;\n\t\t\tuniform float brightness;\n\t\t\tuniform float saturation;\n\n\t\t\tvoid main() \n\t\t\t{\n\t\t\t\tvec3 color = texture2D(uImage0, vTexCoord).rgb;\n\t\t\t\tconst vec3 luminanceCoefficient = vec3(0.2125, 0.7154, 0.0721);\n\t\t\t\tvec3 avgLuminance = vec3(0.5, 0.5, 0.5);\n\t\t\n\t\t\t\tvec3 brtColor = vec3(color.x * brightness, color.y * brightness, color.z * brightness);\n\t\t\t\tvec3 intensity = vec3(dot(brtColor, luminanceCoefficient));\n\t\t\t\tvec3 satColor = mix(intensity, brtColor, saturation);\n\t\t\t\tvec3 conColor = mix(avgLuminance, satColor, contrast);\n\t\t\n\t\t\t\tgl_FragColor = vec4(conColor, 1);\n\t\t\t}\n\t\t\t\n\t\t\tvec3 mix(vec3 a, vec3 b, float amount) \n\t\t\t{ \n\t\t\t\treturn vec3(a.x * (1.0 - amount) + b.x * amount, a.y * (1.0 - amount) + b.y * amount, a.z * (1.0 - amount) + b.z * amount); \n\t\t\t}\n\t\t",
!0);this.setContrast(a);this.setBrightness(b);this.setSaturation(c)};n["com.stencyl.graphics.shaders.CSBShader"]=Mf;Mf.__name__=["com","stencyl","graphics","shaders","CSBShader"];Mf.create=function(a,b){null==b&&(b=1);null==a&&(a="contrast");return"contrast"==a?new Mf(b,1,1):"saturation"==a?new Mf(1,1,b):new Mf(1,b,1)};Mf.__super__=Vb;Mf.prototype=L(Vb.prototype,{setContrast:function(a){this.setProperty("contrast",a)},setBrightness:function(a){this.setProperty("brightness",a)},setSaturation:function(a){this.setProperty("saturation",
a)},__class__:Mf});var il=function(a){this.model=new Lc("assets/data/"+a)};n["com.stencyl.graphics.shaders.ExternalShader"]=il;il.__name__=["com","stencyl","graphics","shaders","ExternalShader"];il.__super__=Vb;il.prototype=L(Vb.prototype,{__class__:il});var jl=function(a,b,c,d,e){null==e&&(e=1);null==d&&(d=1.6);null==c&&(c=.6);null==b&&(b=!1);null==a&&(a=.05);this.model=new Lc("\n\t\t\t/*\n\t\t\t\tFilm Grain post-process shader v1.1\n\t\t\t\tMartins Upitis (martinsh) devlog-martinsh.blogspot.com\n\t\t\t*/\n\t\t\t\n\t\t\tuniform sampler2D uImage0; //rendered scene sampler\n\t\t\tuniform vec2 uResolution; //scene sampler resolution\n\t\t\tuniform float uTime;\n\t\t\t\n\t\t\tvarying vec2 vTexCoord;\n\t\t\t\n\t\t\tconst float permTexUnit = 1.0/256.0;        // Perm texture texel-size\n\t\t\tconst float permTexUnitHalf = 0.5/256.0;    // Half perm texture texel-size\n\t\t\t\n\t\t\tfloat width = uResolution.x;\n\t\t\tfloat height = uResolution.y;\n\t\t\t\n\t\t\tuniform float grainamount; //grain amount\n\t\t\tuniform float colored; //colored noise?\n\t\t\tuniform float coloramount;\n\t\t\tuniform float grainsize; //grain particle size (1.5 - 2.5)\n\t\t\tuniform float lumamount; //\n\t\t\t\n\t\t\t//a random texture generator, but you can also use a pre-computed perturbation texture\n\t\t\tvec4 rnm(in vec2 tc)\n\t\t\t{\n\t\t\t\tfloat noise =  sin(dot(tc + vec2(uTime,uTime),vec2(12.9898,78.233))) * 43758.5453;\n\t\t\t\n\t\t\t\tfloat noiseR =  fract(noise)*2.0-1.0;\n\t\t\t\tfloat noiseG =  fract(noise*1.2154)*2.0-1.0;\n\t\t\t\tfloat noiseB =  fract(noise*1.3453)*2.0-1.0;\n\t\t\t\tfloat noiseA =  fract(noise*1.3647)*2.0-1.0;\n\t\t\t\n\t\t\t\treturn vec4(noiseR,noiseG,noiseB,noiseA);\n\t\t\t}\n\t\t\t\n\t\t\tfloat fade(in float t) {\n\t\t\t\treturn t*t*t*(t*(t*6.0-15.0)+10.0);\n\t\t\t}\n\t\t\t\n\t\t\tfloat pnoise3D(in vec3 p)\n\t\t\t{\n\t\t\t\tvec3 pi = permTexUnit*floor(p)+permTexUnitHalf; // Integer part, scaled so +1 moves permTexUnit texel\n\t\t\t\t// and offset 1/2 texel to sample texel centers\n\t\t\t\tvec3 pf = fract(p);     // Fractional part for interpolation\n\t\t\t\n\t\t\t\t// Noise contributions from (x=0, y=0), z=0 and z=1\n\t\t\t\tfloat perm00 = rnm(pi.xy).a ;\n\t\t\t\tvec3  grad000 = rnm(vec2(perm00, pi.z)).rgb * 4.0 - 1.0;\n\t\t\t\tfloat n000 = dot(grad000, pf);\n\t\t\t\tvec3  grad001 = rnm(vec2(perm00, pi.z + permTexUnit)).rgb * 4.0 - 1.0;\n\t\t\t\tfloat n001 = dot(grad001, pf - vec3(0.0, 0.0, 1.0));\n\t\t\t\n\t\t\t\t// Noise contributions from (x=0, y=1), z=0 and z=1\n\t\t\t\tfloat perm01 = rnm(pi.xy + vec2(0.0, permTexUnit)).a ;\n\t\t\t\tvec3  grad010 = rnm(vec2(perm01, pi.z)).rgb * 4.0 - 1.0;\n\t\t\t\tfloat n010 = dot(grad010, pf - vec3(0.0, 1.0, 0.0));\n\t\t\t\tvec3  grad011 = rnm(vec2(perm01, pi.z + permTexUnit)).rgb * 4.0 - 1.0;\n\t\t\t\tfloat n011 = dot(grad011, pf - vec3(0.0, 1.0, 1.0));\n\t\t\t\n\t\t\t\t// Noise contributions from (x=1, y=0), z=0 and z=1\n\t\t\t\tfloat perm10 = rnm(pi.xy + vec2(permTexUnit, 0.0)).a ;\n\t\t\t\tvec3  grad100 = rnm(vec2(perm10, pi.z)).rgb * 4.0 - 1.0;\n\t\t\t\tfloat n100 = dot(grad100, pf - vec3(1.0, 0.0, 0.0));\n\t\t\t\tvec3  grad101 = rnm(vec2(perm10, pi.z + permTexUnit)).rgb * 4.0 - 1.0;\n\t\t\t\tfloat n101 = dot(grad101, pf - vec3(1.0, 0.0, 1.0));\n\t\t\t\n\t\t\t\t// Noise contributions from (x=1, y=1), z=0 and z=1\n\t\t\t\tfloat perm11 = rnm(pi.xy + vec2(permTexUnit, permTexUnit)).a ;\n\t\t\t\tvec3  grad110 = rnm(vec2(perm11, pi.z)).rgb * 4.0 - 1.0;\n\t\t\t\tfloat n110 = dot(grad110, pf - vec3(1.0, 1.0, 0.0));\n\t\t\t\tvec3  grad111 = rnm(vec2(perm11, pi.z + permTexUnit)).rgb * 4.0 - 1.0;\n\t\t\t\tfloat n111 = dot(grad111, pf - vec3(1.0, 1.0, 1.0));\n\t\t\t\n\t\t\t\t// Blend contributions along x\n\t\t\t\tvec4 n_x = mix(vec4(n000, n001, n010, n011), vec4(n100, n101, n110, n111), fade(pf.x));\n\t\t\t\n\t\t\t\t// Blend contributions along y\n\t\t\t\tvec2 n_xy = mix(n_x.xy, n_x.zw, fade(pf.y));\n\t\t\t\n\t\t\t\t// Blend contributions along z\n\t\t\t\tfloat n_xyz = mix(n_xy.x, n_xy.y, fade(pf.z));\n\t\t\t\n\t\t\t\t// We're done, return the final noise value.\n\t\t\t\treturn n_xyz;\n\t\t\t}\n\t\t\t\n\t\t\t//2d coordinate orientation thing\n\t\t\tvec2 coordRot(in vec2 tc, in float angle)\n\t\t\t{\n\t\t\t\tfloat aspect = width/height;\n\t\t\t\tfloat rotX = ((tc.x*2.0-1.0)*aspect*cos(angle)) - ((tc.y*2.0-1.0)*sin(angle));\n\t\t\t\tfloat rotY = ((tc.y*2.0-1.0)*cos(angle)) + ((tc.x*2.0-1.0)*aspect*sin(angle));\n\t\t\t\trotX = ((rotX/aspect)*0.5+0.5);\n\t\t\t\trotY = rotY*0.5+0.5;\n\t\t\t\treturn vec2(rotX,rotY);\n\t\t\t}\n\t\t\t\n\t\t\tvoid main()\n\t\t\t{\n\t\t\t\tvec2 texCoord = vTexCoord.st;\n\t\t\t\n\t\t\t\tvec3 rotOffset = vec3(1.425,3.892,5.835); //rotation offset values\n\t\t\t\tvec2 rotCoordsR = coordRot(texCoord, uTime + rotOffset.x);\n\t\t\t\tvec3 noise = vec3(pnoise3D(vec3(rotCoordsR*vec2(width/grainsize,height/grainsize),0.0)));\n\t\t\t\n\t\t\t\tif (colored == 1.0)\n\t\t\t\t{\n\t\t\t\t\tvec2 rotCoordsG = coordRot(texCoord, uTime + rotOffset.y);\n\t\t\t\t\tvec2 rotCoordsB = coordRot(texCoord, uTime + rotOffset.z);\n\t\t\t\t\tnoise.g = mix(noise.r,pnoise3D(vec3(rotCoordsG*vec2(width/grainsize,height/grainsize),1.0)),coloramount);\n\t\t\t\t\tnoise.b = mix(noise.r,pnoise3D(vec3(rotCoordsB*vec2(width/grainsize,height/grainsize),2.0)),coloramount);\n\t\t\t\t}\n\t\t\t\n\t\t\t\tvec3 col = texture2D(uImage0, texCoord).rgb;\n\t\t\t\n\t\t\t\t//noisiness response curve based on scene luminance\n\t\t\t\tvec3 lumcoeff = vec3(0.299,0.587,0.114);\n\t\t\t\tfloat luminance = mix(0.0,dot(col, lumcoeff),lumamount);\n\t\t\t\tfloat lum = smoothstep(0.2,0.0,luminance);\n\t\t\t\tlum += luminance;\n\t\t\t\n\t\t\t\n\t\t\t\tnoise = mix(noise,vec3(0.0),pow(lum,4.0));\n\t\t\t\tcol = col+noise*grainamount;\n\t\t\t\n\t\t\t\tgl_FragColor =  vec4(col,1.0);\n\t\t\t}\n\t\t",
!0);this.setGrainAmount(a);this.setColorAmount(c);this.setGrainSize(d);this.setLuminance(e);b?this.enableColor():this.disableColor()};n["com.stencyl.graphics.shaders.GrainShader"]=jl;jl.__name__=["com","stencyl","graphics","shaders","GrainShader"];jl.__super__=Vb;jl.prototype=L(Vb.prototype,{enableColor:function(){this.setProperty("colored",1)},disableColor:function(){this.setProperty("colored",0)},setGrainAmount:function(a){this.setProperty("grainamount",a)},setColorAmount:function(a){this.setProperty("coloramount",
a)},setGrainSize:function(a){this.setProperty("grainsize",a)},setLuminance:function(a){this.setProperty("lumamount",a)},__class__:jl});var kl=function(){this.model=new Lc("\n\t\t\t#ifdef GL_ES\n\t\t\t\tprecision mediump float;\n\t\t\t#endif\n\t\t\t\n\t\t\tvarying vec2 vTexCoord;\n\t\t\tuniform sampler2D uImage0;\n\t\t\t\n\t\t\tvoid main(void)\n\t\t\t{\n\t\t\t\tvec4 color = texture2D(uImage0, vTexCoord);\n\t\t\t\tfloat gray = dot(color.rgb, vec3(0.299, 0.587, 0.114));\n\t\t\t\tgl_FragColor = vec4(gray, gray, gray, 1.0);\n\t\t\t}\n\t\t",
!0)};n["com.stencyl.graphics.shaders.GrayscaleShader"]=kl;kl.__name__=["com","stencyl","graphics","shaders","GrayscaleShader"];kl.__super__=Vb;kl.prototype=L(Vb.prototype,{__class__:kl});var ll=function(a,b){null==b&&(b=!0);null==a&&(a=0);b&&(a*=Math.PI/180);this.model=new Lc("\n\t\t\tvarying vec2 vTexCoord;\n\t\t\tuniform sampler2D uImage0;\n\t\t\t\n\t\t\tuniform float hue;\n\t\t\tconst mat3 rgb2yiq = mat3(0.299, 0.587, 0.114, 0.595716, -0.274453, -0.321263, 0.211456, -0.522591, 0.311135);\n\t\t\tconst mat3 yiq2rgb = mat3(1.0, 0.9563, 0.6210, 1.0, -0.2721, -0.6474, 1.0, -1.1070, 1.7046);\n\n\t\t\tvoid main() \n\t\t\t{\n\t\t\t\tvec3 color = texture2D(uImage0, vTexCoord).rgb;\n\t\t\t\tvec3 yColor = rgb2yiq * color; \n\n\t\t\t\tfloat originalHue = atan(yColor.b, yColor.g);\n\t\t\t\tfloat finalHue = originalHue + hue;\n\t\t\t\tfloat chroma = sqrt(yColor.b * yColor.b + yColor.g * yColor.g);\n\t\t\t\t\n\t\t\t\tvec3 yFinalColor = vec3(yColor.r, chroma * cos(finalHue), chroma * sin(finalHue));\n\t\t\t\tgl_FragColor = vec4(yiq2rgb * yFinalColor, 1.0);\n\t\t\t}\n\t\t",
!0);this.setHue(a,!1)};n["com.stencyl.graphics.shaders.HueShader"]=ll;ll.__name__=["com","stencyl","graphics","shaders","HueShader"];ll.__super__=Vb;ll.prototype=L(Vb.prototype,{setHue:function(a,b){null==b&&(b=!0);b&&(a*=Math.PI/180);this.setProperty("hue",a)},__class__:ll});var ml=function(a){this.model=new Lc(a,!0)};n["com.stencyl.graphics.shaders.InlineShader"]=ml;ml.__name__=["com","stencyl","graphics","shaders","InlineShader"];ml.__super__=Vb;ml.prototype=L(Vb.prototype,{__class__:ml});var nl=
function(){this.model=new Lc("\n\t\t\t#ifdef GL_ES\n\t\t\t\tprecision mediump float;\n\t\t\t#endif\n\t\t\t\n\t\t\tvarying vec2 vTexCoord;\n\t\t\tuniform sampler2D uImage0;\n\t\t\t\n\t\t\tvoid main(void)\n\t\t\t{\n\t\t\t\tvec4 color = texture2D(uImage0, vTexCoord);\n\t\t\t\tgl_FragColor = vec4(vec3(1.0, 1.0, 1.0) - color.rgb, color.a);\n\t\t\t}\n\t\t",!0)};n["com.stencyl.graphics.shaders.InvertShader"]=nl;nl.__name__=["com","stencyl","graphics","shaders","InvertShader"];nl.__super__=Vb;nl.prototype=
L(Vb.prototype,{__class__:nl});var rh=function(a){wa.call(this)};n["openfl.display.DirectRenderer"]=rh;rh.__name__=["openfl","display","DirectRenderer"];rh.__super__=wa;rh.prototype=L(wa.prototype,{get_render:function(){return this.__render},set_render:function(a){return this.__render=a},__class__:rh,__properties__:L(wa.prototype.__properties__,{set_render:"set_render",get_render:"get_render"})});var Gd=function(){wa.call(this);this.__added||(this.__added=!0,null)};n["openfl.display.OpenGLView"]=
Gd;Gd.__name__=["openfl","display","OpenGLView"];Gd.__properties__={get_isSupported:"get_isSupported"};Gd.isSupported=null;Gd.get_isSupported=function(){return!1};Gd.__super__=rh;Gd.prototype=L(rh.prototype,{__renderCanvas:function(a){},__renderDOM:function(a){null!=this.stage&&this.__worldVisible&&this.__renderable?(this.__added||(a.element.appendChild(this.__canvas),this.__added=!0,Hd.initializeElement(this,this.__canvas,a)),null!=this.__context&&(a=null,a=null==this.get_scrollRect()?new ha(0,0,
this.stage.stageWidth,this.stage.stageHeight):new ha(this.get_x()+this.get_scrollRect().x,this.get_y()+this.get_scrollRect().y,this.get_scrollRect().width,this.get_scrollRect().height),null!=this.__render&&this.__render(a))):this.__added&&(a.element.removeChild(this.__canvas),this.__added=!1)},__renderGL:function(a){if(null!=this.stage&&this.__renderable){var b=null,b=null==this.get_scrollRect()?new ha(0,0,this.stage.stageWidth,this.stage.stageHeight):new ha(this.get_x()+this.get_scrollRect().x,this.get_y()+
this.get_scrollRect().y,this.get_scrollRect().width,this.get_scrollRect().height);null!=this.__render&&this.__render(b);a.shaderManager.setShader(null);a.blendModeManager.setBlendMode(null)}},__class__:Gd});var Lc=function(a,b){null==b&&(b=!1);this.timeScale=1;this.time=0;this.defaultFramebuffer=null;Gd.call(this);this.set_render(K(this,this._render));this.uniforms=new ma;this.framebuffer=m.context.createFramebuffer();this.rebuild();switch(m.context.checkFramebufferStatus(36160)){case 36054:null;
break;case 36061:null;break;case 36053:break;default:null}this.buffer=m.context.createBuffer();m.context.bindBuffer(34962,this.buffer);m.bufferData(34962,function(a){a=[-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,-1,1,0,1,1,1,1,-1,1,0,1];return null!=a?new Float32Array(a):null}(this),35044);m.context.bindBuffer(34962,null);if(b)this.fullScreenShader=new sh([{src:"\n#ifdef GL_ES\n\tprecision mediump float;\n#endif\n\nattribute vec4 aVertex;\n\nattribute vec2 aTexCoord;\nvarying vec2 vTexCoord;\n\nvoid main() {\n\tvTexCoord = aTexCoord;\n\tgl_Position = vec4(aVertex.x, aVertex.y, 0.0, 1.0);\n}",
fragment:!1},{src:a,fragment:!0}]);else if(6<a.length&&".glslx"==P.substr(a,-6,null)){var c=new Qd(ba.parse(R.getText(a)).firstElement()),d;d=c.hasNode.resolve("vertex")?c.node.resolve("vertex").get_innerData():"\n#ifdef GL_ES\n\tprecision mediump float;\n#endif\n\nattribute vec4 aVertex;\n\nattribute vec2 aTexCoord;\nvarying vec2 vTexCoord;\n\nvoid main() {\n\tvTexCoord = aTexCoord;\n\tgl_Position = vec4(aVertex.x, aVertex.y, 0.0, 1.0);\n}";c=c.node.resolve("fragment").get_innerData();this.fullScreenShader=
new sh([{src:d,fragment:!1},{src:c,fragment:!0}])}else this.fullScreenShader=new sh([{src:"\n#ifdef GL_ES\n\tprecision mediump float;\n#endif\n\nattribute vec4 aVertex;\n\nattribute vec2 aTexCoord;\nvarying vec2 vTexCoord;\n\nvoid main() {\n\tvTexCoord = aTexCoord;\n\tgl_Position = vec4(aVertex.x, aVertex.y, 0.0, 1.0);\n}",fragment:!1},{src:R.getText(a),fragment:!0}]);this.imageUniform=m.context.getUniformLocation(this.fullScreenShader.program,"uImage0");this.timeUniform=m.context.getUniformLocation(this.fullScreenShader.program,
"uTime");this.resolutionUniform=m.context.getUniformLocation(this.fullScreenShader.program,"uResolution");this.resolutionUsUniform=m.context.getUniformLocation(this.fullScreenShader.program,"uResolutionUs");this.vertexSlot=m.context.getAttribLocation(this.fullScreenShader.program,"aVertex");this.texCoordSlot=m.context.getAttribLocation(this.fullScreenShader.program,"aTexCoord")};n["com.stencyl.graphics.shaders.PostProcess"]=Lc;Lc.__name__=["com","stencyl","graphics","shaders","PostProcess"];Lc.__properties__=
{get_vertices:"get_vertices"};Lc.get_vertices=function(){return[-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,-1,1,0,1,1,1,1,-1,1,0,1]};Lc.__super__=Gd;Lc.prototype=L(Gd.prototype,{setUniform:function(a,b){if(this.uniforms.exists(a))this.uniforms.get(a).value=b;else{var c=m.context.getUniformLocation(this.fullScreenShader.program,a);this.uniforms.set(a,{id:c,value:b})}},getUniform:function(a){return this.uniforms.exists(a)?this.uniforms.get(a).value:-1},tweenUniform:function(a,b,c,d){null==c&&(c=1);this.uniforms.exists(a)&&
(a=this.uniforms.get(a),ea.tween(a,c,{value:b}).ease(d))},set_to:function(a){this.renderTo=null==a?this.defaultFramebuffer:a.framebuffer;return a},enable:function(a){var b=h.engine.root.get_numChildren();0>b&&(b=0);h.engine.root.addChildAt(this,b);this.set_to(a)},rebuild:function(){m.context.bindFramebuffer(36160,this.framebuffer);null!=this.texture&&m.context.deleteTexture(this.texture);null!=this.renderbuffer&&m.context.deleteRenderbuffer(this.renderbuffer);this.createTexture(u["int"](Pa.get_screenResolutionX()),
u["int"](Pa.get_screenResolutionY()));this.createRenderbuffer(u["int"](Pa.get_screenResolutionX()),u["int"](Pa.get_screenResolutionY()));m.context.bindFramebuffer(36160,null)},createRenderbuffer:function(a,b){this.renderbuffer=m.context.createRenderbuffer();m.context.bindRenderbuffer(36161,this.renderbuffer);m.context.renderbufferStorage(36161,33189,a,b);m.context.framebufferRenderbuffer(36160,36096,36161,this.renderbuffer)},createTexture:function(a,b){this.texture=m.context.createTexture();m.context.bindTexture(3553,
this.texture);m.context.texImage2D(3553,0,6407,a,b,0,6407,5121,null);m.context.texParameteri(3553,10242,33071);m.context.texParameteri(3553,10243,33071);m.context.texParameteri(3553,10241,9729);m.context.texParameteri(3553,10240,9729);m.context.framebufferTexture2D(36160,36064,3553,this.texture,0)},capture:function(){m.context.bindFramebuffer(36160,this.framebuffer);m.context.viewport(0,0,ka.current.stage.stageWidth|0,ka.current.stage.stageHeight|0);m.context.clear(16640)},_render:function(a){this.time+=
h.elapsedTime*this.timeScale;m.context.bindFramebuffer(36160,this.renderTo);m.viewport(0,0,u["int"](Pa.get_screenResolutionX()),u["int"](Pa.get_screenResolutionY()));m.context.clear(16640);m.context.useProgram(this.fullScreenShader.program);m.context.enableVertexAttribArray(this.vertexSlot);m.context.enableVertexAttribArray(this.texCoordSlot);m.context.activeTexture(33984);m.context.bindTexture(3553,this.texture);m.context.enable(3553);m.context.bindBuffer(34962,this.buffer);m.context.vertexAttribPointer(this.vertexSlot,
2,5126,!1,16,0);m.context.vertexAttribPointer(this.texCoordSlot,2,5126,!1,16,8);m.context.uniform1i(this.imageUniform,0);m.context.uniform1f(this.timeUniform,this.time);m.context.uniform2f(this.resolutionUniform,ka.current.stage.stageWidth|0,ka.current.stage.stageHeight|0);m.context.uniform2f(this.resolutionUsUniform,ka.current.stage.stageWidth/ra.gameScale|0,ka.current.stage.stageHeight/ra.gameScale|0);a=this.uniforms.iterator();for(var b=a.next();null!=b;)m.context.uniform1f(b.id,b.value),b=a.next();
m.context.drawArrays(4,0,6);m.context.bindBuffer(34962,null);m.context.disable(3553);m.context.bindTexture(3553,null);m.context.disableVertexAttribArray(this.vertexSlot);m.context.disableVertexAttribArray(this.texCoordSlot);m.context.useProgram(null);1286==m.context.getError()&&null},__class__:Lc,__properties__:L(Gd.prototype.__properties__,{set_to:"set_to"})});var ol=function(a){null==a&&(a=1);this.model=new Lc("\n\t\t\t#ifdef GL_ES\n\t\t\t\tprecision mediump float;\n\t\t\t#endif\n\t\t\t\n\t\t\tvarying vec2 vTexCoord;\n\t\t\tuniform vec2 uResolution;\n\t\t\tuniform sampler2D uImage0;\n\t\t\t\n\t\t\tuniform float scale;\n\t\t\t\n\t\t\tvoid main()\n\t\t\t{\n\t\t\t\tif (mod(floor(vTexCoord.y * uResolution.y / scale), 2.0) == 0.0)\n\t\t\t\t\tgl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);\n\t\t\t\telse\n\t\t\t\t\tgl_FragColor = texture2D(uImage0, vTexCoord);\n\t\t\t}\n\t\t",
!0);this.setScale(a)};n["com.stencyl.graphics.shaders.ScanlineShader"]=ol;ol.__name__=["com","stencyl","graphics","shaders","ScanlineShader"];ol.__super__=Vb;ol.prototype=L(Vb.prototype,{setScale:function(a){this.setProperty("scale",a)},__class__:ol});var pl=function(){this.model=new Lc("\n\t\t\t#ifdef GL_ES\n\t\t\t\tprecision mediump float;\n\t\t\t#endif\n\t\t\t\n\t\t\tvarying vec2 vTexCoord;\n\t\t\tuniform sampler2D uImage0;\n\t\t\t\n\t\t\tvoid main(void)\n\t\t\t{\n\t\t\t\tvec4 color = texture2D(uImage0, vTexCoord);\n\t\t\t\tgl_FragColor.r = dot(color, vec4(0.393,0.769,0.189,0));\n\t\t\t\tgl_FragColor.g = dot(color, vec4(0.349,0.686,0.168,0));\n\t\t\t\tgl_FragColor.b = dot(color, vec4(0.272,0.534,0.131,0));\n\t\t\t\tgl_FragColor.a = color.a;\n\t\t\t}\n\t\t",
!0)};n["com.stencyl.graphics.shaders.SepiaShader"]=pl;pl.__name__=["com","stencyl","graphics","shaders","SepiaShader"];pl.__super__=Vb;pl.prototype=L(Vb.prototype,{__class__:pl});var sh=function(a){this.program=m.context.createProgram();for(var b=0;b<a.length;){var c=a[b];++b;c=this.compile(c.src,c.fragment?35632:35633);if(null==c)return;m.context.attachShader(this.program,c);m.context.deleteShader(c)}m.context.linkProgram(this.program);m.context.getProgramParameter(this.program,35714)};n["com.stencyl.graphics.shaders.Shader"]=
sh;sh.__name__=["com","stencyl","graphics","shaders","Shader"];sh.prototype={compile:function(a,b){var c=m.context.createShader(b);m.context.shaderSource(c,a);m.context.compileShader(c);return 0==m.context.getShaderParameter(c,35713)?null:c},attribute:function(a){return m.context.getAttribLocation(this.program,a)},uniform:function(a){return m.context.getUniformLocation(this.program,a)},bind:function(){m.context.useProgram(this.program)},__class__:sh};var ql=function(a){null==a&&(a=2);this.model=new Lc("\n\t\t\tvarying vec2 vTexCoord;\n\t\t\tuniform sampler2D uImage0;\n\t\t\tuniform vec2 uResolution;\n\t\t\t\n\t\t\tuniform float amount;\n\t\t\t\n\t\t\tvoid main()\n\t\t\t{\n\t\t\t\t//this will be our RGBA sum\n\t\t\t\tvec4 sum = vec4(0.0);\n\t\t\t\t\n\t\t\t\t//our original texcoord for this fragment\n\t\t\t\tvec2 tc = vTexCoord;\n\t\t\t\t\n\t\t\t\tfloat reach = 1.0 / uResolution.x;\n\n\t\t\t\t//current pixel\n\t\t\t\tsum += texture2D(uImage0, vec2(tc.x, tc.y));\n\t\t\t\t\n\t\t\t\t//sharpen\n\t\t\t\tsum += (texture2D(uImage0, vec2(tc.x, tc.y)) - texture2D(uImage0, vec2(tc.x + 1.0 * reach, tc.y))) * amount;\n\t\t\t\tsum += (texture2D(uImage0, vec2(tc.x, tc.y)) - texture2D(uImage0, vec2(tc.x - 1.0 * reach, tc.y))) * amount;\n\t\t\t\tsum += (texture2D(uImage0, vec2(tc.x, tc.y)) - texture2D(uImage0, vec2(tc.x, tc.y + 1.0 * reach))) * amount;\n\t\t\t\tsum += (texture2D(uImage0, vec2(tc.x, tc.y)) - texture2D(uImage0, vec2(tc.x, tc.y - 1.0 * reach))) * amount;\n\t\t\t\t\n\t\t\t\tgl_FragColor = vec4(sum.rgb, 1.0);\n\t\t\t}\n\t\t",
!0);this.setAmount(a)};n["com.stencyl.graphics.shaders.SharpenShader"]=ql;ql.__name__=["com","stencyl","graphics","shaders","SharpenShader"];ql.__super__=Vb;ql.prototype=L(Vb.prototype,{setAmount:function(a){this.setProperty("amount",a)},__class__:ql});var rl=function(a,b){null==b&&(b=1);this.model=new Lc("\n\t\t\tvarying vec2 vTexCoord;\n\t\t\tuniform sampler2D uImage0;\n\t\t\tuniform float amount;\n\t\t\tuniform float red;\n\t\t\tuniform float green;\n\t\t\tuniform float blue;\n\n\t\t\tvoid main() \n\t\t\t{\n\t\t\t\tvec3 color = texture2D(uImage0, vTexCoord).rgb;\n\t\t\t\tvec3 endColor = mix(color, vec3(red, green, blue), amount);\n\t\t\t\tgl_FragColor = vec4(endColor.x, endColor.y, endColor.z, 1);\n\t\t\t}\n\t\t\t\n\t\t\tvec3 mix(vec3 a, vec3 b, float amount) \n\t\t\t{ \n\t\t\t\treturn vec3(a.x * (1.0 - amount) + b.x * amount, a.y * (1.0 - amount) + b.y * amount, a.z * (1.0 - amount) + b.z * amount); \n\t\t\t}\n\t\t",
!0);this.setColor(a);this.setAmount(b)};n["com.stencyl.graphics.shaders.TintShader"]=rl;rl.__name__=["com","stencyl","graphics","shaders","TintShader"];rl.__super__=Vb;rl.prototype=L(Vb.prototype,{setAmount:function(a){this.setProperty("amount",a)},setColor:function(a){this.setProperty("red",(a>>16&255)/255);this.setProperty("green",(a>>8&255)/255);this.setProperty("blue",(a&255)/255)},__class__:rl});var Ea=function(a){this.duration=a;this.complete=this.active=!1;0==a&&(this.complete=!0)};n["com.stencyl.graphics.transitions.Transition"]=
Ea;Ea.__name__=["com","stencyl","graphics","transitions","Transition"];Ea.prototype={start:function(){},reset:function(){this.complete=!1},stop:function(){this.complete=!0},deactivate:function(){this.active=!1},cleanup:function(){},isActive:function(){return this.active},isComplete:function(){return this.complete},update:function(a){},draw:function(a){},getDuration:function(){return this.duration},__class__:Ea};var mh=function(a,b,c,d){null==c&&(c=10);Ea.call(this,b);this.color=d;this.direction=a;
this.numBlinds=c;a==Ea.IN?(this.beginBlindWidth=h.screenWidth*h.SCALE/c,this.endBlindWidth=0):a==Ea.OUT?(this.beginBlindWidth=0,this.endBlindWidth=h.screenWidth*h.SCALE/c):this.complete=!0};n["com.stencyl.graphics.transitions.BlindsTransition"]=mh;mh.__name__=["com","stencyl","graphics","transitions","BlindsTransition"];mh.__super__=Ea;mh.prototype=L(Ea.prototype,{start:function(){this.active=!0;this.blindRect=new ha(0,0,this.beginBlindWidth,h.screenHeight*h.SCALE);this.blindWidth=this.beginBlindWidth;
this.rect=new Pd;this.graphics=this.rect.get_graphics();this.direction==Ea.IN&&(this.graphics.beginFill(this.color),this.graphics.drawRect(0,0,h.screenWidth*h.SCALE,h.screenHeight*h.SCALE),this.graphics.endFill());h.engine.transitionLayer.addChild(this.rect);ea.tween(this,this.duration,{blindWidth:this.endBlindWidth}).ease(Jb.get_easeNone()).onComplete(K(this,this.stop))},draw:function(a){this.graphics.clear();this.graphics.beginFill(this.color);this.blindRect.x=0;this.blindRect.width=this.blindWidth;
this.direction==Ea.IN&&(this.blindRect.x+=h.screenWidth*h.SCALE/this.numBlinds-this.blindWidth);a=0;for(var b=this.numBlinds;a<b;)a++,this.graphics.drawRect(this.blindRect.x,this.blindRect.y,this.blindRect.width,this.blindRect.height),this.blindRect.x+=h.screenWidth*h.SCALE/this.numBlinds;this.graphics.endFill()},cleanup:function(){null!=this.rect&&(h.engine.transitionLayer.removeChild(this.rect),this.rect=null)},__class__:mh});var lh=function(a,b,c,d){null==d&&(d=-16777216);null==c&&(c=50);Ea.call(this,
b);this.color=d;this.direction=a;this.numBubbles=c};n["com.stencyl.graphics.transitions.BubblesTransition"]=lh;lh.__name__=["com","stencyl","graphics","transitions","BubblesTransition"];lh.__super__=Ea;lh.prototype=L(Ea.prototype,{start:function(){this.active=!0;this.rect=new Pd;this.graphics=this.rect.get_graphics();this.screenWidth=h.screenWidth*h.SCALE|0;this.screenHeight=h.screenHeight*h.SCALE|0;this.direction==Ea.IN&&(this.graphics.beginFill(this.color),this.graphics.drawRect(0,0,this.screenWidth,
this.screenHeight),this.graphics.endFill());this.drawBitmap=new Ba(this.screenWidth,this.screenHeight);var a=this.screenWidth/this.screenHeight,b=u["int"](Math.sqrt(this.numBubbles/a)),c=this.screenHeight/b,a=Math.ceil(b*a|0),b=Math.ceil(b),d=a*c-this.screenWidth|0,e=new ha(-d/2,-(b*c-this.screenHeight|0)/2,c,c);this.bubblePositions=[];for(var f=0;f<b;){f++;for(var g=0;g<a;)g++,this.bubblePositions.push(new W(e.x+Math.floor(Math.random()*(c+1)),e.y+Math.floor(Math.random()*(c+1)))),e.x+=c;e.x=-d/
2;e.y+=c}this.beginRadius=0;this.endRadius=Math.ceil(W.distance(new W(0,0),new W(c,c)));this.radius=this.beginRadius;h.engine.transitionLayer.addChild(this.rect);ea.tween(this,this.duration,{radius:this.endRadius}).ease(Jb.get_easeNone()).onComplete(K(this,this.stop))},draw:function(a){this.graphics.clear();if(this.direction==Ea.IN){this.drawBitmap.draw(h.engine.colorLayer);this.drawBitmap.draw(h.engine.master);this.graphics.beginFill(this.color);this.graphics.drawRect(0,0,this.screenWidth,this.screenHeight);
this.graphics.endFill();a=0;for(var b=this.bubblePositions;a<b.length;){var c=b[a];++a;this.graphics.beginBitmapFill(this.drawBitmap);this.graphics.drawCircle(c.x,c.y,this.radius);this.graphics.endFill()}}else if(this.direction==Ea.OUT)for(a=0,b=this.bubblePositions;a<b.length;)c=b[a],++a,this.graphics.beginFill(this.color),this.graphics.drawCircle(c.x,c.y,this.radius),this.graphics.endFill()},cleanup:function(){null!=this.rect&&(h.engine.transitionLayer.removeChild(this.rect),this.rect=null)},__class__:lh});
var oh=function(a,b,c){null==c&&(c=-16777216);Ea.call(this,b);this.color=c;this.direction=a;a==Ea.IN?(this.beginRadius=0,this.endRadius=u["int"](Math.ceil(W.distance(new W(0,0),new W(h.screenWidthHalf*h.SCALE,h.screenHeightHalf*h.SCALE))))):a==Ea.OUT&&(this.beginRadius=u["int"](Math.ceil(W.distance(new W(0,0),new W(h.screenWidthHalf*h.SCALE,h.screenHeightHalf*h.SCALE)))),this.endRadius=0)};n["com.stencyl.graphics.transitions.CircleTransition"]=oh;oh.__name__=["com","stencyl","graphics","transitions",
"CircleTransition"];oh.__super__=Ea;oh.prototype=L(Ea.prototype,{start:function(){this.active=!0;this.s=new Pd;this.circleImg=new Ba(h.screenWidth*h.SCALE|0,h.screenHeight*h.SCALE|0);this.radius=this.beginRadius;if(this.direction==Ea.IN){var a=this.s.get_graphics();a.beginFill(this.color);a.drawRect(0,0,h.screenWidth*h.SCALE,h.screenHeight*h.SCALE);a.endFill()}h.engine.transitionLayer.addChild(this.s);ea.tween(this,this.duration,{radius:this.endRadius}).ease(Jb.get_easeNone()).onComplete(K(this,this.stop))},
draw:function(a){this.s.get_graphics().clear();this.s.get_graphics().beginFill(this.color);this.s.get_graphics().drawRect(0,0,h.screenWidth*h.SCALE,h.screenHeight*h.SCALE);this.s.get_graphics().endFill();this.circleImg.draw(h.engine.colorLayer);this.circleImg.draw(h.engine.master);this.s.get_graphics().beginBitmapFill(this.circleImg);this.s.get_graphics().drawCircle(h.screenWidthHalf*h.SCALE,h.screenHeightHalf*h.SCALE,this.radius);this.s.get_graphics().endFill()},cleanup:function(){null!=this.s&&
(h.engine.transitionLayer.removeChild(this.s),this.s=null)},__class__:oh});var Oi=function(a,b){Ea.call(this,b);this.oldImg=a};n["com.stencyl.graphics.transitions.CrossfadeTransition"]=Oi;Oi.__name__=["com","stencyl","graphics","transitions","CrossfadeTransition"];Oi.__super__=Ea;Oi.prototype=L(Ea.prototype,{start:function(){this.active=!0;this.bitmap=new Ba(h.screenWidth*h.SCALE|0,h.screenHeight*h.SCALE|0);this.bitmap.draw(this.oldImg);this.rect=new Pd;var a=this.rect.get_graphics();a.beginBitmapFill(this.bitmap);
a.drawRect(0,0,h.screenWidth*h.SCALE,h.screenHeight*h.SCALE);a.endFill();h.engine.transitionLayer.addChild(this.rect);ea.tween(this.rect,this.duration,{alpha:0}).ease(Jb.get_easeNone()).onComplete(K(this,this.stop))},draw:function(a){},cleanup:function(){this.bitmap=this.oldImg=null;null!=this.rect&&(h.engine.transitionLayer.removeChild(this.rect),this.rect=null)},__class__:Oi});var jh=function(a,b){null==b&&(b=-16777216);Ea.call(this,a);this.color=b;this.direction=Ea.IN};n["com.stencyl.graphics.transitions.FadeInTransition"]=
jh;jh.__name__=["com","stencyl","graphics","transitions","FadeInTransition"];jh.__super__=Ea;jh.prototype=L(Ea.prototype,{start:function(){this.active=!0;this.rect=new Pd;var a=this.rect.get_graphics();a.beginFill(this.color);a.drawRect(0,0,h.screenWidth*h.SCALE,h.screenHeight*h.SCALE);a.endFill();h.engine.transitionLayer.addChild(this.rect);ea.tween(this.rect,this.duration,{alpha:0}).ease(Jb.get_easeNone()).onComplete(K(this,this.stop))},cleanup:function(){null!=this.rect&&(h.engine.transitionLayer.removeChild(this.rect),
this.rect=null)},__class__:jh});var Pi=function(a,b){null==b&&(b=-16777216);Ea.call(this,a);this.color=b;this.direction=Ea.IN};n["com.stencyl.graphics.transitions.FadeOutTransition"]=Pi;Pi.__name__=["com","stencyl","graphics","transitions","FadeOutTransition"];Pi.__super__=Ea;Pi.prototype=L(Ea.prototype,{start:function(){this.active=!0;this.rect=new Pd;this.rect.set_alpha(0);var a=this.rect.get_graphics();a.beginFill(this.color);a.drawRect(0,0,h.screenWidth*h.SCALE,h.screenHeight*h.SCALE);a.endFill();
h.engine.transitionLayer.addChild(this.rect);ea.tween(this.rect,this.duration,{alpha:1}).ease(Jb.get_easeNone()).onComplete(K(this,this.stop))},cleanup:function(){null!=this.rect&&(h.engine.transitionLayer.removeChild(this.rect),this.rect=null)},__class__:Pi});var kh=function(a,b,c){Ea.call(this,a);this.beginPixelSize=b;this.endPixelSize=c;this.pixelSize=b};n["com.stencyl.graphics.transitions.PixelizeTransition"]=kh;kh.__name__=["com","stencyl","graphics","transitions","PixelizeTransition"];kh.__super__=
Ea;kh.prototype=L(Ea.prototype,{start:function(){this.active=!0;this.rect=new Pd;this.graphics=this.rect.get_graphics();this.srcImg=new Ba(h.screenWidth*h.SCALE|0,h.screenHeight*h.SCALE|0);this.pixelRect=new ha(0,0,0,0);h.engine.transitionLayer.addChild(this.rect);ea.tween(this,this.duration,{pixelSize:this.endPixelSize}).ease(Jb.get_easeNone()).onComplete(K(this,this.stop))},draw:function(a){if(1!=this.pixelSize){this.graphics.clear();this.srcImg.draw(h.engine.colorLayer);this.srcImg.draw(h.engine.master);
this.c=Math.ceil(h.screenWidth*h.SCALE/this.pixelSize);this.r=Math.ceil(h.screenHeight*h.SCALE/this.pixelSize);this.xOverflow=this.c*this.pixelSize-h.screenWidth*h.SCALE|0;this.yOverflow=this.r*this.pixelSize-h.screenHeight*h.SCALE|0;this.pixelRect.x=-this.xOverflow/2;this.pixelRect.y=-this.yOverflow/2;this.pixelRect.height=this.pixelRect.width=this.pixelSize;this.halfSize=this.pixelSize/2|0;a=0;for(var b=this.r;a<b;){a++;for(var c=0,d=this.c;c<d;)c++,this.graphics.beginFill(this.srcImg.getPixel32(this.pixelRect.x+
this.halfSize|0,this.pixelRect.y+this.halfSize|0)),this.graphics.drawRect(this.pixelRect.x,this.pixelRect.y,this.pixelRect.width,this.pixelRect.height),this.graphics.endFill(),this.pixelRect.x+=this.pixelSize;this.pixelRect.x=-this.xOverflow/2;this.pixelRect.y+=this.pixelSize}}},cleanup:function(){null!=this.rect&&(h.engine.transitionLayer.removeChild(this.rect),this.rect=null)},__class__:kh});var nh=function(a,b,c){Ea.call(this,b);this.color=c;this.direction=a;a==Ea.IN?(this.beginHeight=this.beginWidth=
0,this.endWidth=h.screenWidth*h.SCALE|0,this.endHeight=h.screenHeight*h.SCALE|0):a==Ea.OUT?(this.beginWidth=h.screenWidth*h.SCALE|0,this.beginHeight=h.screenHeight*h.SCALE|0,this.endHeight=this.endWidth=0):this.complete=!0};n["com.stencyl.graphics.transitions.RectangleTransition"]=nh;nh.__name__=["com","stencyl","graphics","transitions","RectangleTransition"];nh.__super__=Ea;nh.prototype=L(Ea.prototype,{start:function(){this.active=!0;this.width=this.beginWidth;this.height=this.beginHeight;this.rectangleImg=
new Ba(h.screenWidth*h.SCALE|0,h.screenHeight*h.SCALE|0);this.rect=new Pd;this.graphics=this.rect.get_graphics();this.direction==Ea.IN&&(this.graphics.beginFill(this.color),this.graphics.drawRect(0,0,h.screenWidth*h.SCALE,h.screenHeight*h.SCALE),this.graphics.endFill());h.engine.transitionLayer.addChild(this.rect);ea.tween(this,this.duration,{width:this.endWidth,height:this.endHeight}).ease(Jb.get_easeNone()).onComplete(K(this,this.stop))},draw:function(a){this.graphics.clear();this.graphics.beginFill(this.color);
this.graphics.drawRect(0,0,h.screenWidth*h.SCALE,h.screenHeight*h.SCALE);this.graphics.endFill();this.rectangleImg.draw(h.engine.colorLayer);this.rectangleImg.draw(h.engine.master);this.graphics.beginBitmapFill(this.rectangleImg);this.graphics.drawRect((h.screenWidth*h.SCALE-this.width)/2,(h.screenHeight*h.SCALE-this.height)/2,this.width,this.height);this.graphics.endFill()},cleanup:function(){null!=this.rect&&(h.engine.transitionLayer.removeChild(this.rect),this.rect=null)},__class__:nh});var jd=
function(a,b,c,d){Ea.call(this,c);this.sceneSpr=a;this.sceneCol=b;this.oldSceneMatrix=new Oa;this.newSceneMatrix=new Oa;this.ty=this.tx=0;d==jd.SLIDE_UP?(this.newSceneMatrix.ty=-h.screenHeight*h.SCALE,this.ty=h.screenHeight*h.SCALE):d==jd.SLIDE_DOWN?(this.newSceneMatrix.ty=h.screenHeight*h.SCALE,this.ty=-h.screenHeight*h.SCALE):d==jd.SLIDE_LEFT?(this.newSceneMatrix.tx=-h.screenWidth*h.SCALE,this.tx=h.screenWidth*h.SCALE):d==jd.SLIDE_RIGHT?(this.newSceneMatrix.tx=h.screenWidth*h.SCALE,this.tx=-h.screenWidth*
h.SCALE):this.complete=!0};n["com.stencyl.graphics.transitions.SlideTransition"]=jd;jd.__name__=["com","stencyl","graphics","transitions","SlideTransition"];jd.__super__=Ea;jd.prototype=L(Ea.prototype,{start:function(){this.active=!0;this.oldBitmap=new Ba(h.screenWidth*h.SCALE|0,h.screenHeight*h.SCALE|0);this.oldBitmap.draw(this.sceneCol);this.oldBitmap.draw(this.sceneSpr);this.newBitmap=new Ba(h.screenWidth*h.SCALE|0,h.screenHeight*h.SCALE|0);this.drawBitmap=new Ba(h.screenWidth*h.SCALE|0,h.screenHeight*
h.SCALE|0);this.rect=new Pd;this.graphics=this.rect.get_graphics();this.graphics.beginBitmapFill(this.oldBitmap);this.graphics.drawRect(0,0,h.screenWidth*h.SCALE,h.screenHeight*h.SCALE);this.graphics.endFill();h.engine.transitionLayer.addChild(this.rect);ea.tween(this.oldSceneMatrix,this.duration,{tx:this.tx,ty:this.ty}).ease(Jb.get_easeNone()).onComplete(K(this,this.stop));ea.tween(this.newSceneMatrix,this.duration,{tx:0,ty:0}).ease(Jb.get_easeNone()).onComplete(K(this,this.stop))},draw:function(a){this.graphics.clear();
this.newBitmap.draw(this.sceneCol);this.newBitmap.draw(this.sceneSpr);this.drawBitmap.draw(this.newBitmap,this.newSceneMatrix);this.drawBitmap.draw(this.oldBitmap,this.oldSceneMatrix);this.graphics.beginBitmapFill(this.drawBitmap);this.graphics.drawRect(0,0,h.screenWidth*h.SCALE,h.screenHeight*h.SCALE);this.graphics.endFill()},cleanup:function(){this.sceneSpr=null;null!=this.rect&&(h.engine.transitionLayer.removeChild(this.rect),this.rect=null)},__class__:jd});var mf=function(){};n["com.stencyl.io.AbstractReader"]=
mf;mf.__name__=["com","stencyl","io","AbstractReader"];mf.prototype={__class__:mf};var Dd=function(){};n["com.stencyl.io.ActorTypeReader"]=Dd;Dd.__name__=["com","stencyl","io","ActorTypeReader"];Dd.__interfaces__=[mf];Dd.readBehaviors=function(a){var b=new ma;for(a=a.get_elements();a.hasNext();){var c=a.next();if(I.toBoolean(c.att.resolve("enabled"))){var d=c.att.resolve("id"),c=Dd.readBehavior(c);null!=Ab[d]?b.setReserved(d,c):b.h[d]=c}}return b};Dd.readBehavior=function(a){var b=u.parseInt(a.att.resolve("id")),
c=new ma;for(a=a.get_elements();a.hasNext();){var d=a.next(),e=d.att.resolve("id"),f=d.att.resolve("val");c.set(e,f);d.get_elements().hasNext()&&(e=u.parseInt(d.att.resolve("list")),1==e?(e=d.att.resolve("id"),d=Dd.readList(d),c.set(e,d)):2==e&&(e=d.att.resolve("id"),d=Dd.readMap(d),c.set(e,d)))}return new ph(b,c)};Dd.readList=function(a){var b=[];for(a=a.get_elements();a.hasNext();){var c=a.next(),d=u.parseInt(c.att.resolve("order")),e=c.get_name();if("number"==e.toLowerCase())e=u.parseFloat(c.att.resolve("value")),
b.splice(d,0,e);else if("text"==e.toLowerCase())e=c.att.resolve("value"),b.splice(d,0,e);else if("bool"==e.toLowerCase()||"boolean"==e.toLowerCase())e=I.toBoolean(c.att.resolve("value")),b.splice(d,0,e);else if("list"==e.toLowerCase()){e=[];for(c=c.get_elements();c.hasNext();){var f=c.next(),g=u.parseInt(f.att.resolve("order"));e[g]=f.att.resolve("value")}b.splice(d,0,e)}else if("map"==e.toLowerCase()){e=new ma;for(c=c.get_elements();c.hasNext();)g=c.next(),f=g.att.resolve("key"),g=g.att.resolve("value"),
e.set(f,g);b.splice(d,0,e)}}return b};Dd.readMap=function(a){var b=new ma;for(a=a.get_elements();a.hasNext();){var c=a.next(),d=c.att.resolve("key"),e=c.get_name();if("number"==e.toLowerCase())e=u.parseFloat(c.att.resolve("value")),null!=Ab[d]?b.setReserved(d,e):b.h[d]=e;else if("text"==e.toLowerCase())e=c.att.resolve("value"),null!=Ab[d]?b.setReserved(d,e):b.h[d]=e;else if("bool"==e.toLowerCase()||"boolean"==e.toLowerCase())e=I.toBoolean(c.att.resolve("value")),null!=Ab[d]?b.setReserved(d,e):b.h[d]=
e;else if("list"==e.toLowerCase()){e=[];for(c=c.get_elements();c.hasNext();){var f=c.next(),g=u.parseInt(f.att.resolve("order"));e[g]=f.att.resolve("value")}null!=Ab[d]?b.setReserved(d,e):b.h[d]=e}else if("map"==e.toLowerCase()){e=new ma;for(c=c.get_elements();c.hasNext();)g=c.next(),f=g.att.resolve("key"),g=g.att.resolve("value"),e.set(f,g);null!=Ab[d]?b.setReserved(d,e):b.h[d]=e}}return b};Dd.prototype={accepts:function(a){return"actor"==a},read:function(a,b,c,d,e){c=new hg;c.fixedRotation=I.toBoolean(e.att.resolve("fixedrot"));
"0"==e.att.resolve("bodytype")?c.type=S.b2_staticBody:"1"==e.att.resolve("bodytype")?c.type=S.b2_kinematicBody:c.type=S.b2_dynamicBody;c.linearDamping=u.parseFloat(e.att.resolve("ldamp"));c.angularDamping=u.parseFloat(e.att.resolve("adamp"));c.friction=u.parseFloat(e.att.resolve("fric"));c.bounciness=u.parseFloat(e.att.resolve("rest"));c.mass=u.parseFloat(e.att.resolve("mass"));c.aMass=u.parseFloat(e.att.resolve("inertia"));c.active=!0;c.bullet=!1;c.allowSleep=!1;c.awake=!0;c.ignoreGravity=I.toBoolean(e.att.resolve("ignoreg"));
c.bullet=I.toBoolean(e.att.resolve("continuous"));var f=u.parseInt(e.att.resolve("sprite")),g=u.parseInt(e.att.resolve("gid")),k=u.parseInt(e.att.resolve("physicsMode")),p=I.toBoolean(e.att.resolve("ascale")),h=I.toBoolean(e.att.resolve("pausable")),l=c.ignoreGravity||c.type==S.b2_staticBody||c.type==S.b2_kinematicBody,m=Dd.readBehaviors(e.node.resolve("snippets"));if(""!=e.att.resolve("eventsnippetid")){var n=u.parseInt(e.att.resolve("eventsnippetid"));-1<n&&(e=e.att.resolve("eventsnippetid"),n=
new ph(n,new ma),null!=Ab[e]?m.setReserved(e,n):m.h[e]=n)}return new Od(a,b,d,g,f,m,c,k,p,h,l)},__class__:Dd};var ih=function(){};n["com.stencyl.io.BackgroundReader"]=ih;ih.__name__=["com","stencyl","io","BackgroundReader"];ih.__interfaces__=[mf];ih.prototype={accepts:function(a){return"background"==a},read:function(a,b,c,d,e){if("color-bg"==c)return a=u.parseInt(e.att.resolve("red")),b=u.parseInt(e.att.resolve("green")),d=u.parseInt(e.att.resolve("blue")),c=255,-1==a||-1==b||-1==d?new Fd(Fd.TRANSPARENT):
new Fd(c<<24|a<<16|b<<8|d);if("grad-bg"==c){a=u.parseInt(e.att.resolve("r1"));b=u.parseInt(e.att.resolve("g1"));d=u.parseInt(e.att.resolve("b1"));c=255;var f=c<<24|a<<16|b<<8|d;a=u.parseInt(e.att.resolve("r2"));b=u.parseInt(e.att.resolve("g2"));d=u.parseInt(e.att.resolve("b2"));return new lg(f,c<<24|a<<16|b<<8|d)}c=u.parseFloat(e.att.resolve("dx"));var f=u.parseFloat(e.att.resolve("dy")),g=u.parseFloat(e.att.resolve("xpf")),k=u.parseFloat(e.att.resolve("ypf")),p=[],h=0;if(0<u.parseInt(e.att.resolve("numframes")))for(var l=
e.att.resolve("durations").split(","),m=0;m<l.length;){var n=l[m];++m;p[h]=u.parseInt(n);h++}e=I.toBoolean(e.att.resolve("repeats"));return 0!=c||0!=f?new nf(a,b,d,p,g,k,e,c,f):new Ud(a,b,d,p,g,k,e)},__class__:ih};var kg=function(){};n["com.stencyl.io.BehaviorReader"]=kg;kg.__name__=["com","stencyl","io","BehaviorReader"];kg.readBehavior=function(a){var b=u.parseInt(a.att.resolve("id")),c=a.att.resolve("name"),d="",e=!1;try{d=a.att.resolve("class")}catch(f){if(Ia.lastException=f,f instanceof F&&(f=
f.val),!q.__instanceof(f,String))throw f;}try{e="true"==a.att.resolve("attachedevent")}catch(g){if(Ia.lastException=g,g instanceof F&&(g=g.val),!q.__instanceof(g,String))throw g;}var k=new ma,p=a.att.resolve("type");for(a=a.get_elements();a.hasNext();){var h=a.next(),l=h.get_name();"snippets"!=l&&"blocks"!=l&&"events"!=l&&(l=h.att.resolve("id"),h=kg.readAttribute(h,e),null!=Ab[l]?k.setReserved(l,h):k.h[l]=h)}return new Ji(null,null,b,c,d,!0,!0,k,p,e)};kg.readAttribute=function(a,b){var c=u.parseInt(a.att.resolve("id")),
d=a.att.resolve("name"),e=a.att.resolve("fullname"),f=b||"true"==a.att.resolve("hidden"),g="";try{g=a.att.resolve("defaultValue")}catch(k){if(Ia.lastException=k,k instanceof F&&(k=k.val),!q.__instanceof(k,String))throw k;}var p=a.get_name();return new kf(c,d,e,g,p,null,f)};kg.prototype={__class__:kg};var Ii=function(){};n["com.stencyl.io.FontReader"]=Ii;Ii.__name__=["com","stencyl","io","FontReader"];Ii.__interfaces__=[mf];Ii.prototype={accepts:function(a){return"font"==a},read:function(a,b,c,d,e){return new ye(a,
b,d,!1)},__class__:Ii};var Gi=function(){};n["com.stencyl.io.SoundReader"]=Gi;Gi.__name__=["com","stencyl","io","SoundReader"];Gi.__interfaces__=[mf];Gi.prototype={accepts:function(a){return"sound"==a||"music"==a},read:function(a,b,c,d,e){c=I.toBoolean(e.att.resolve("stream"));var f=I.toBoolean(e.att.resolve("loop")),g=u.parseFloat(e.att.resolve("pan")),k=u.parseFloat(e.att.resolve("volume"));e=e.att.resolve("type");a=new Kf(a,d,c,f,g,k,e);a.atlasID=b;return a},__class__:Gi};var Bc=function(){};n["com.stencyl.io.SpriteReader"]=
Bc;Bc.__name__=["com","stencyl","io","SpriteReader"];Bc.__interfaces__=[mf];Bc.createShape=function(a,b,c,d,e,f){null==f&&(f=-1);null==e&&(e=-1);null==d&&(d=0);null==c&&(c=0);var g=0,k=0,p=0,w=0;if("circle"==a)return p=parseFloat(b[0]),g=parseFloat(b[1]),k=parseFloat(b[2]),b=2*p,w=new hb,w.m_radius=h.toPhysicalUnits(p),w.m_p.x=h.toPhysicalUnits(g-(e-b)/2),w.m_p.y=h.toPhysicalUnits(k-(f-b)/2),w;if("poly"==a||"polyregion"==a){var l=[],m=u.parseInt(b[0]),p=0,w=1,n=0,q=0;"polyregion"==a&&(q=n=1E7);for(var D=
0,r=0;p<m;)g=h.toPhysicalUnits(parseFloat(b[w])),k=h.toPhysicalUnits(parseFloat(b[w+1])),n=Math.min(n,parseFloat(b[w])),q=Math.min(q,parseFloat(b[w+1])),D=Math.max(D,parseFloat(b[w])),r=Math.max(r,parseFloat(b[w+1])),l[p]=new y(g,k),p++,w+=2;Bc.EnsureCorrectVertexDirection(l);p=D-n;w=r-q;g=n-h.toPixelUnits(c);d=q-h.toPixelUnits(d);k=p/2;c=w/2;var r=za.asArray(l,l.length),D=new fd,La=new hd;La.setIdentity();r.computeAABB(D,La);p<e&&(n="polyregion"==a?n+Math.abs(e-p)/2:n+h.toPhysicalUnits(Math.abs(e-
p)/2));w<f&&(q="polyregion"==a?q+Math.abs(f-w)/2:q+h.toPhysicalUnits(Math.abs(f-w)/2));p=0;for(w=1;p<m;)"polyregion"==a?(e=h.toPhysicalUnits(parseFloat(b[w])-k-n+g),f=h.toPhysicalUnits(parseFloat(b[w+1])-c-q+d),l[p]=new y(e,f)):l[p]=new y(h.toPhysicalUnits(parseFloat(b[w])-k)-n,h.toPhysicalUnits(parseFloat(b[w+1])-c)-q),p++,w+=2;Bc.EnsureCorrectVertexDirection(l);return za.asArray(l,l.length)}if("wireframe"==a){e=[];p=parseFloat(b[0]);f=0;for(w=1;f<p;)e.push(new y(h.toPhysicalUnits(parseFloat(b[w])),
h.toPhysicalUnits(parseFloat(b[w+1])))),f++,w+=2;p=Bc.getWidth(e);w=Bc.getHeight(e);b=[];f=0;for(a=e.length+1;f<a;)n=f++,l=new te(e[n%e.length],e[(n+1)%e.length]),b.push(l),l.m_hasVertex0=!0,l.m_hasVertex3=!0,m=e[(n-1)%e.length],n=e[(n+2)%e.length],null==m&&(m=e[e.length-1]),null==n&&(n=e[0]),l.m_v0=m,l.m_v3=n;e=new xa;e.h[0]=b;e.h[1]=p;e.h[2]=w;return e}return null};Bc.CheckVertexDirection=function(a){if(2<a.length){for(var b=0,c=0;0==b&&c<a.length-2;)b=a[c].winding(a[c+1],a[c+2]),++c;if(0>b)return!1}return!0};
Bc.EnsureCorrectVertexDirection=function(a){return Bc.CheckVertexDirection(a)?!0:(Bc.ReverseVertices(a),!1)};Bc.ReverseVertices=function(a){for(var b=0,c=a.length-1,d;c>b;)d=a[b].x,a[b].x=a[c].x,a[c].x=d,d=a[b].y,a[b].y=a[c].y,a[c].y=d,++b,--c};Bc.getWidth=function(a){for(var b=1E7,c=0,d=0;d<a.length;){var e=a[d];++d;b=Math.min(b,e.x);c=Math.max(c,e.x)}return c-b};Bc.getHeight=function(a){for(var b=1E7,c=0,d=0;d<a.length;){var e=a[d];++d;b=Math.min(b,e.y);c=Math.max(c,e.y)}return c-b};Bc.prototype=
{accepts:function(a){return"sprite"==a},read:function(a,b,c,d,e){c=u.parseInt(e.att.resolve("width"));var f=u.parseInt(e.att.resolve("height")),g=0;try{g=u.parseInt(e.att.resolve("defaultAnimation"))}catch(k){if(Ia.lastException=k,k instanceof F&&(k=k.val),!q.__instanceof(k,String))throw k;}a=new Hf(a,b,d,c,f,g);for(e=e.get_elements();e.hasNext();)d=e.next(),b=u.parseInt(d.att.resolve("id")),d=this.readAnimation(d,a),a.animations.h[b]=d;return a},readAnimation:function(a,b){for(var c=u.parseInt(a.att.resolve("id")),
d=a.att.resolve("name"),e=u.parseInt(a.att.resolve("width")),f=u.parseInt(a.att.resolve("height")),g=u.parseFloat(a.att.resolve("originx")),k=u.parseFloat(a.att.resolve("originy")),p=u.parseInt(a.att.resolve("numframes")),h=u.parseInt(a.att.resolve("across")),l=u.parseInt(a.att.resolve("down")),m=b.ID,n=this.readSimpleShapes(a,e/h,f/l),q=this.readShapes(a,e/h,f/l),D=I.toBoolean(a.att.resolve("loop")),r=I.toBoolean(a.att.resolve("sync")),La=[],t=0,z=a.att.resolve("durations").split(","),v=0;v<z.length;){var y=
z[v];++v;La[t]=u.parseInt(y);La[t]=Math.floor(La[t]/10);La[t]*=10;t++}return new Ue(c,d,m,n,q,D,r,e,f,g,k,La,p,h,l,b.atlasID)},readSimpleShapes:function(a,b,c){b=new xa;for(a=a.get_elements();a.hasNext();){var d=a.next();c=u.parseInt(d.att.resolve("id"));var e=u.parseInt(d.att.resolve("gid")),f=I.toBoolean(d.att.resolve("sensor")),g=d.get_name(),d=d.att.resolve("data").split(","),k=u.parseInt(d[0]);if("poly"==g&&4==k){for(var g=0,p=1,h=1E7,l=1E7,m=0,n=0,q=u.parseInt(d[1]),D=u.parseInt(d[2]);g<k;)h=
u["int"](Math.min(h,u.parseInt(d[p]))),l=u["int"](Math.min(l,u.parseInt(d[p+1]))),m=u["int"](Math.max(m,u.parseInt(d[p]))),n=u["int"](Math.max(n,u.parseInt(d[p+1]))),g++,p+=2;e=new Fb(m-h,n-l,q,D,!f,e);b.set(c,e)}}return b},readShapes:function(a,b,c){var d=new xa;for(a=a.get_elements();a.hasNext();){var e=a.next(),f=u.parseInt(e.att.resolve("id"));u.parseInt(e.att.resolve("gid"));var g=I.toBoolean(e.att.resolve("sensor")),k=e.get_name(),p=e.att.resolve("data").split(","),k=Bc.createShape(k,p,0,0,
b,c),p=new ke;p.shape=k;p.density=u.parseFloat(e.att.resolve("density"));p.friction=u.parseFloat(e.att.resolve("fric"));p.restitution=u.parseFloat(e.att.resolve("rest"));p.isSensor=g;p.groupID=u.parseInt(e.att.resolve("gid"));d.h[f]=p}return d},__class__:Bc};var Hi=function(){};n["com.stencyl.io.TilesetReader"]=Hi;Hi.__name__=["com","stencyl","io","TilesetReader"];Hi.__interfaces__=[mf];Hi.prototype={accepts:function(a){return"tileset"==a},read:function(a,b,c,d,e){var f=u.parseInt(e.att.resolve("across")),
g=u.parseInt(e.att.resolve("down")),k=u.parseInt(e.att.resolve("tw")),p=u.parseInt(e.att.resolve("th"));c=[];a=new ld(a,b,d,f,g,k,p,c);for(e=e.get_elements();e.hasNext();)b=e.next(),c[u.parseInt(b.att.resolve("id"))]=this.readTile(b,a);a.setupTilesheet();return a},readTile:function(a,b){for(var c=u.parseInt(a.att.resolve("id")),d=u.parseInt(a.att.resolve("collision")),e=a.att.resolve("data"),f=u.parseInt(a.att.resolve("frames")),g=[],k=0,p=0,h=a.att.resolve("durations").split(",");p<h.length;){var l=
h[p];++p;g[k]=u.parseInt(l);g[k]=Math.floor(g[k]/10);g[k]*=10;k++}k=null;a.has.resolve("autotile")&&(k=na.get().autotileFormats,p=u.parseInt(a.att.resolve("autotile")),k=k.get(p));p=null;if(a.has.resolve("autotileMerge"))for(p=new xa,h=0,l=a.att.resolve("autotileMerge").split(",");h<l.length;){var m=l[h];++h;var n=u.parseInt(m),m=u.parseInt(m);p.h[n]=m}return new Wd(c,d,e,f,g,k,p,b)},__class__:Hi};var Da=function(a,b,c,d,e,f,g,k,p,w,l,m,n,u,D,r,La,t,z,v,x){null==x&&(x=0);null==v&&(v=!1);null==z&&
(z=!0);null==t&&(t=0);null==r&&(r=!1);null==D&&(D=!1);null==u&&(u=!1);null==n&&(n=!1);null==k&&(k=32);null==g&&(g=32);null==f&&(f=0);null==e&&(e=0);null==d&&(d=0);this.collisionListenerCount=0;this.maxMove=99999;this.minMove=3;this.moveXDistance=this.moveYDistance=0;this.moveMultiplier=.33;this.drawX=this.drawY=0;this.smoothMove=this.firstMove=this.snapOnSet=!1;this.attachedImages=null;this.animsBackedUp=this.tint=!1;ga.call(this);h.NO_PHYSICS&&0==x&&(this.physicsMode=x=1);this.dummy=new y;this.zero=
new y(0,0);this._point=I.point;this._moveX=this._moveY=0;this.HITBOX=new oe;this.set_shape(this.HITBOX);q.__instanceof(this,$b)&&h.NO_PHYSICS&&(La=this.HITBOX=new Fb(g|0,k|0,0,0,!1,-2),this.set_shape(La));this.set_x(0);this.set_y(0);this.set_rotation(0);this.realAngle=this.realY=this.realX=0;this.realScaleY=this.realScaleX=1;this.originY=this.originX=0;this.collidable=!0;this.solid=!n;this.updateMatrix=!0;0<x?(this.set_x(d*h.physicsScale),this.set_y(e*h.physicsScale)):(this.set_x(d),this.set_y(e));
this.realX=this.colX=d;this.realY=this.colY=e;this.activePositionTweens=this.activeAngleTweens=0;this.lastScale=new W(1,1);this.lastY=this.lastX=-1E3;this.lastAngle=0;this.tweenLoc=new W(0,0);this.tweenAngle=new sl;this.transformPoint=new W(0,0);this.transformMatrix=new Oa;this.drawMatrix=new Oa;this.currOrigin=new W(0,0);this.currOffset=new W(0,0);this.registry=new ma;this.attachedImages=[];this.physicsMode=x;this.autoScale=z;this.mouseState=this.rSpeed=this.ySpeed=this.xSpeed=0;this.isTerrainRegion=
this.isRegion=this.isCamera=this.isOnScreenCache=this.lastSceneState=this.lastScreenState=!1;this.drawActor=!0;this.fixedRotation=this.continuousCollision=this.isHUD=this.alwaysSimulate=this.killLeaveScreen=!1;this.defaultGravity=this.ignoreGravity=v;this.resetOrigin=!0;this.allListeners=new xa;this.allListenerReferences=[];this.whenCreatedListeners=[];this.whenUpdatedListeners=[];this.whenDrawingListeners=[];this.whenKilledListeners=[];this.mouseOverListeners=[];this.positionListeners=[];this.collisionListeners=
[];this.destroyed=this.paused=this.recycled=!1;this.set_name("Unknown");this.ID=b;this.groupID=c;this.layerID=f;this.typeID=t;this.engine=a;this.groupsToCollideWith=na.get().groupsCollidesWith.get(c);this.collidedList=[];this.collisions=new Kc(16);this.simpleCollisions=new Kc(16);this.contacts=new Kc(16);this.regionContacts=new Kc(16);this.collisions.reuseIterator=!0;this.simpleCollisions.reuseIterator=!0;this.contacts.reuseIterator=!0;this.regionContacts.reuseIterator=!0;this.collisionsCount=this.contactCount=
0;this.handlesCollisions=!0;this.behaviors=new Ki;this.currAnimationName="";this.animationMap=new ma;this.shapeMap=new ma;this.originMap=new ma;this.sprite=p;if(null!=p&&(b=q.__cast(la.get().resources.get(l.spriteID),Hf),null!=b))for(this.type=q.__cast(la.get().resources.get(t),Od),t=b.animations.iterator();t.hasNext();)b=t.next(),this.addAnim(b.animID,b.animName,b.imgData,b.frameCount,Math.floor(b.imgWidth/b.framesAcross),Math.floor(b.imgHeight/b.framesDown),b.framesAcross,b.framesDown,b.originX,
b.originY,b.durations,b.looping,0<x?b.simpleShapes:b.physicsShapes);this.addAnim(-1,"recyclingDefault",null,1,1,1,1,1,1,1,[1E3],!1,null);if(null!=m&&0==x)m.bullet&&(eb.m_continuousPhysics=!0),m.groupID=c,this.initFromBody(m),c=new za,c.setAsBox(1,1),this.body.createFixture2(c,.1),this.md=new bh,this.md.mass=m.mass,this.md.I=m.aMass,this.md.center.x=0,this.md.center.y=0,this.body.setMassData(this.md),this.bodyScale=new W(1,1);else{if(null==La||ua["typeof"](La)==bb.TFloat)La=Da.createBox(g,k);null!=
m&&(this.continuousCollision=m.bullet);q.__instanceof(this,$b)&&(n=!0,r=!1);q.__instanceof(this,Te)&&(r=!1);null!=La&&q.__instanceof(La,oe)?(this.set_shape(La),this.isTerrain=!0):0==x&&this.initBody(c,n,u,D,r,La)}this.switchToDefaultAnimation();null!=p?this.setLocation(h.toPixelUnits(d),h.toPixelUnits(e)):null!=La&&q.__instanceof(La,oe)?(d=new qb(new Ba(1,1,!0,0)),d.set_x(g),d.set_y(k),this.addChild(d),this.cacheWidth=this.set_width(g),this.cacheHeight=this.set_height(k)):0==x&&this.body.setPosition(new y(d,
e));null==w&&null!=l&&(w=l.behaviorValues);h.initBehaviors(this.behaviors,w,this,a,!1)};n["com.stencyl.models.Actor"]=Da;Da.__name__=["com","stencyl","models","Actor"];Da.lastCollided=null;Da.createBox=function(a,b){var c=new za;c.setAsBox(h.toPhysicalUnits(a/2),h.toPhysicalUnits(b/2));return c};Da.actuateUnloadForTarget=function(a){var b=ea.targetLibraries;b.exists(a)&&b.remove(a)};Da.scaleShape=function(a,b,c){if(q.__instanceof(a,hb))q.__cast(a,hb).m_radius*=c;else if(q.__instanceof(a,za)){a=q.__cast(a,
za);for(var d=a.m_vertices,e=[],f=0;f<d.length;){var g=d[f];++f;g.subtract(b);g.multiply(c);g.add(b);e.push(g)}a.setAsArray(e)}};Da.__super__=ga;Da.prototype=L(ga.prototype,{destroy:function(){if(!this.destroyed){this.clearFilters();this.destroyed=!0;for(var a=this.animationMap.iterator();a.hasNext();)a.next().set_visible(!1);I.removeAllChildren(this);if(null!=this.body&&0==this.physicsMode){for(a=this.body.getContactList();null!=a;)h.engine.world.m_contactManager.m_contactListener.endContact(a.contact),
a=a.next;h.engine.world.destroyBody(this.body)}this.cancelTweens();this.regionContacts=this.contacts=this.sprite=this.body=this.currOrigin=this.currOffset=this.currAnimation=this.animationMap=this.defaultAnim=this.originMap=this.shapeMap=Da.lastCollided=null;this.collisionsCount=this.contactCount=0;this.allListenerReferences=this.allListeners=this.collisionListeners=this.positionListeners=this.mouseOverListeners=this.whenKilledListeners=this.whenDrawingListeners=this.whenUpdatedListeners=this.whenCreatedListeners=
this.transformMatrix=this.transformPoint=null;this.collisionListenerCount=this.positionListenerCount=0;this.simpleCollisions=this.collisions=this.registry=null;null!=this.bodyDef&&(this.bodyDef=this.bodyDef.userData=null);this.behaviors.destroy()}},resetListeners:function(){for(var a=this.allListeners.iterator();a.hasNext();){var b=a.next();this.allListeners.remove(b)}for(;0<this.allListenerReferences.length;)this.allListenerReferences.pop();for(;0<this.whenUpdatedListeners.length;)this.whenUpdatedListeners.pop();
for(;0<this.whenDrawingListeners.length;)this.whenDrawingListeners.pop();for(;0<this.whenKilledListeners.length;)this.whenKilledListeners.pop();for(;0<this.mouseOverListeners.length;)this.mouseOverListeners.pop();for(;0<this.positionListeners.length;)this.positionListeners.pop();for(;0<this.collisionListeners.length;)this.collisionListeners.pop();this.collisionListenerCount=this.positionListenerCount=0},addAnim:function(a,b,c,d,e,f,g,k,p,h,l,m,n){null==m&&(m=!0);null==h&&(h=0);null==p&&(p=0);null==
k&&(k=1);null==g&&(g=1);null==d&&(d=1);if(null!=n){e=[];if(1==this.physicsMode)for(n=n.iterator();n.hasNext();)f=n.next(),q.__instanceof(f,Fb)&&0<this.physicsMode&&(f=q.__cast(f,Fb).clone(),f.assignTo(this)),e.push(f);else if(2!=this.physicsMode)for(n=n.iterator();n.hasNext();)f=n.next(),e.push(f);0<this.physicsMode&&(e=new pg(e,this));this.shapeMap.set(b,e)}null==c||0>=c.width||0>=c.height||(a=new qh(c,d,g,k,l,m,this.sprite.animations.h[a].sync?this.sprite.animations.h[a]:null),this.animationMap.set(b,
a));p=new y(p,h);this.originMap.set(b,p)},initScripts:function(){if(2==this.physicsMode)this.handlesCollisions=!1;else{this.handlesCollisions=!0;this.behaviors.initScripts();for(var a=0;a<this.whenCreatedListeners.length;){try{var b=this.whenCreatedListeners[a];b(this.whenCreatedListeners);-1==I.indexOf(this.whenCreatedListeners,b)&&a--}catch(c){if(Ia.lastException=c,c instanceof F&&(c=c.val),q.__instanceof(c,String))null;else throw c;}a++}}},initFromBody:function(a){a.allowSleep=!1;a.userData=this;
this.bodyDef=a;this.body=h.engine.world.createBody(a)},initBody:function(a,b,c,d,e,f){var g=new hg;g.groupID=a;g.position.x=h.toPhysicalUnits(this.get_x());g.position.y=h.toPhysicalUnits(this.get_y());g.angle=0;g.fixedRotation=!e;g.allowSleep=!1;g.type=c?S.b2_staticBody:d?S.b2_kinematicBody:S.b2_dynamicBody;if(f instanceof Array&&null==f.__enum__)for(g.userData=this,this.body=h.engine.world.createBody(g),b=q.__cast(f,Array),f=0;f<b.length;)a=b[f],++f,c=new ke,c.shape=a,c.friction=1,c.density=.1,c.restitution=
0,c.isSensor=!1,c.groupID=na.TERRAIN_ID,c.userData=this,this.body.createFixture(c);else a=new ke,a.shape=f,a.friction=1,a.density=.1,a.restitution=0,a.isSensor=b,a.groupID=na.INHERIT_ID,a.userData=this,g.userData=this,this.body=h.engine.world.createBody(g),this.body.createFixture(a);this.bodyDef=g},addAnimation:function(a,b){this.animationMap.set(a,b)},getAnimation:function(){return this.currAnimationName},setAnimation:function(a){this.switchAnimation(a)},switchToDefaultAnimation:function(){if(null!=
this.sprite&&0<Wg.count(this.sprite.animations)){var a=this.sprite.animations.h[this.sprite.defaultAnimation];if(null==a)for(var b=this.sprite.animations.iterator();b.hasNext();){a=b.next();break}this.defaultAnim=q.__cast(a,Ue).animName;this.switchAnimation(this.defaultAnim);this.setCurrentFrame(0)}},isAnimationPlaying:function(){return q.__instanceof(this.currAnimation,md)?!q.__cast(this.currAnimation,md).isFinished():!0},getCurrentFrame:function(){return q.__instanceof(this.currAnimation,md)?q.__cast(this.currAnimation,
md).getCurrentFrame():0},setCurrentFrame:function(a){q.__instanceof(this.currAnimation,md)&&q.__cast(this.currAnimation,md).setFrame(a)},getNumFrames:function(){return q.__instanceof(this.currAnimation,md)?q.__cast(this.currAnimation,md).getNumFrames():0},switchAnimation:function(a){if(a!=this.currAnimationName){var b=this.animationMap.get(a);if(null!=b){null!=this.currAnimation&&this.removeChild(this.currAnimation);var c=!1;if(null!=this.body&&0==this.physicsMode){var d=this.shapeMap.get(this.currAnimationName),
e=this.shapeMap.get(a);if(null==d||null==e)c=!0;else if(d.length!=e.length||1<d.length)c=!0;else{var d=d[0],f=e[0];if(null==d||null==f)c=!0;else{var g=d.shape,e=f.shape;if(d.isSensor!=f.isSensor)c=!0;else if(d.groupID!=f.groupID)c=!0;else if((null==g?null:q.getClass(g))==(null==e?null:q.getClass(e)))if((null==g?null:q.getClass(g))==za)if(d=q.__cast(g,za),e=q.__cast(e,za),d.m_vertexCount!=e.m_vertexCount)c=!0;else for(f=0,g=d.m_vertexCount;f<g;){var k=f++;if(d.m_vertices[k].x!=e.m_vertices[k].x){c=
!0;break}else if(d.m_vertices[k].y!=e.m_vertices[k].y){c=!0;break}}else(null==g?null:q.getClass(g))==hb&&(d=q.__cast(g,hb),e=q.__cast(e,hb),d.m_radius!=e.m_radius||d.m_p.x!=e.m_p.x||d.m_p.y!=e.m_p.y)&&(c=!0);else c=!0}}}this.currAnimationName=a;this.currAnimation=b;this.addChild(b);b=this.originMap.get(a);0==this.physicsMode&&this.updateTweenProperties();e=this.currAnimation.get_width()/h.SCALE/2-b.x;d=this.currAnimation.get_height()/h.SCALE/2-b.y;if(null!=this.body&&c&&0==this.physicsMode){c=[];
for(f=this.body.getContactList();null!=f;)u.is(f.other.getUserData(),$b)&&f.contact.isTouching()&&c.push(f.other.getUserData()),h.engine.world.m_contactManager.m_contactListener.endContact(f.contact),f=f.next;for(f=this.collisions.keys();f.hasNext();)g=f.next(),this.collisions.clr(g);this.collisions=new Kc(16);this.simpleCollisions=new Kc(16);this.contacts=new Kc(16);this.regionContacts=new Kc(16);this.collisions.reuseIterator=!0;this.simpleCollisions.reuseIterator=!0;this.contacts.reuseIterator=
!0;this.regionContacts.reuseIterator=!0;for(this.collisionsCount=this.contactCount=0;0<this.body.m_fixtureCount;)this.body.DestroyFixture(this.body.getFixtureList());f=0;for(a=q.__cast(this.shapeMap.get(a),Array);f<a.length;){var p=a[f];++f;g=new ke;this.bodyDef.friction<I.NUMBER_MAX_VALUE&&(g.friction=this.bodyDef.friction,g.restitution=this.bodyDef.bounciness,0<this.bodyDef.mass&&(g.density=.1));g.density=p.density;g.isSensor=p.isSensor;g.groupID=p.groupID;g.shape=p.shape;if(null!=b)if(this.body.origin.x=
h.toPhysicalUnits(-b.x),this.body.origin.y=h.toPhysicalUnits(-b.y),q.__instanceof(p.shape,za)){var k=new hd,w;w=q.__cast(p.shape,za);p=new za;p.setAsArray(w.m_vertices,w.m_vertices.length);w=p.m_vertices;var l=p.m_normals;k.position.set(h.toPhysicalUnits(e),h.toPhysicalUnits(d));k.R.setAngle(0);for(var m=0,n=p.m_vertexCount;m<n;){var r=m++;w[r]=k.multiply(w[r]);l[r]=k.R.multiplyV(l[r])}p.setAsArray(w,w.length);p.m_normals=l;g.shape=p}else q.__instanceof(p.shape,hb)&&(k=q.__cast(p.shape,hb),p=new hb,
p.setRadius(k.getRadius()),p.m_p.x=k.m_p.x+h.toPhysicalUnits(e),p.m_p.y=k.m_p.y+h.toPhysicalUnits(d),g.shape=p);this.body.createFixture(g).SetUserData(this)}if(null!=this.body.getFixtureList())for(this.bodyScale.x=1,this.bodyScale.y=1,a=0;a<c.length;)e=c[a],++a,d=this.body.getFixtureList().m_aabb,e.getBody().getFixtureList().m_aabb.testOverlap(d)&&e.addActor(this);null!=this.md&&this.body.setMassData(this.md)}else null!=this.shapeMap.get(a)&&1==this.physicsMode&&(this.set_shape(this.shapeMap.get(a)),
this.HITBOX=this._mask);this.cacheWidth=this.currAnimation.get_width()/h.SCALE;this.cacheHeight=this.currAnimation.get_height()/h.SCALE;null!=this.body&&(this.body.size.x=h.toPhysicalUnits(this.cacheWidth),this.body.size.y=h.toPhysicalUnits(this.cacheHeight));0==this.physicsMode&&(this.realX=this.getX(!1),this.realY=this.getY(!1));null!=b&&this.setOriginPoint(b.x|0,b.y|0);this.updateMatrix=!0;q.__instanceof(this.currAnimation,md)&&q.__cast(this.currAnimation,md).reset()}}},removeAttachedImages:function(){for(var a=
0,b=this.attachedImages;a<b.length;){var c=b[a];++a;this.removeChild(c)}this.attachedImages=[]},update:function(a){this.innerUpdate(a,!0)},innerUpdate:function(a,b){if(!(this.paused||this.isCamera||this.dying||this.dead||this.destroyed||b&&(this.isHUD||this.alwaysSimulate))){if(0<this.mouseOverListeners.length){var c=this.isMouseOver();0>=this.mouseState&&c?this.mouseState=1:1<=this.mouseState&&c?(this.mouseState=2,A.mousePressed?this.mouseState=3:A.mouseDown&&(this.mouseState=4),A.mouseReleased&&
(this.mouseState=5)):0<this.mouseState&&!c?this.mouseState=-1:-1!=this.mouseState||c||(this.mouseState=0);h.invokeListeners2(this.mouseOverListeners,this.mouseState)}var c=this.type.ID,d=Da.GROUP_OFFSET+this.groupID,e=this.engine.collisionListeners,f=this.engine.typeGroupPositionListeners;0==this.physicsMode&&(0<this.collisionListenerCount||null!=e.h[c]||null!=e.h[d])&&this.handleCollisions();this.internalUpdate(a,!0);1==this.physicsMode&&(0<this.collisionListenerCount||null!=e.h[c]||null!=e.h[d])&&
this.handleCollisionsSimple();2>this.physicsMode&&h.invokeListeners2(this.whenUpdatedListeners,a);(0<this.positionListenerCount||null!=f.h[c]||null!=f.h[d])&&this.checkScreenState();null!=this.label&&this.label.setAlpha(this.get_alpha())}},internalUpdate:function(a,b){if(!this.paused){if(0<this.physicsMode){1!=this.physicsMode||this.ignoreGravity||this.isHUD||(this.xSpeed+=a*this.engine.gravityX*.001,this.ySpeed+=a*this.engine.gravityY*.001);if(0!=this.xSpeed||0!=this.ySpeed)this.resetReal(this.realX,
this.realY),this.moveActorBy(a*this.xSpeed*.01,a*this.ySpeed*.01,this.groupsToCollideWith);0!=this.rSpeed&&(this.realAngle+=a*this.rSpeed*.001);this.fixedRotation&&(this.rSpeed=this.realAngle=0)}else{var c=this.body.getPosition();this.realX=c.x*h.physicsScale;this.realY=c.y*h.physicsScale;this.resetReal(this.realX,this.realY);this.realAngle=57.29577951308402*this.body.getAngle()}if(this.lastX!=this.realX||this.lastY!=this.realY||this.lastAngle!=this.realAngle||this.lastScale.x!=this.realScaleX||this.lastScale.y!=
this.realScaleY)this.updateMatrix=!0;this.lastX=this.realX;this.lastY=this.realY;this.lastAngle=this.realAngle;this.lastScale.x=this.realScaleX;this.lastScale.y=this.realScaleY;b&&null!=this.currAnimation&&this.currAnimation.update(a);this.updateTweenProperties()}},updateDrawingMatrix:function(){if(!this.paused){if(this.smoothMove)this.firstMove||(this.drawX=this.realX,this.drawY=this.realY,this.firstMove=!0),this.moveXDistance=this.realX-this.drawX,this.moveYDistance=this.realY-this.drawY,this.drawX=
this.moveXDistance>this.minMove?this.moveXDistance*this.moveMultiplier>this.minMove?this.moveXDistance>this.maxMove?this.realX:this.drawX+this.moveXDistance*this.moveMultiplier:this.drawX+this.minMove:this.moveXDistance<-1*this.minMove?this.moveXDistance*this.moveMultiplier<-1*this.minMove?this.moveXDistance<-1*this.maxMove?this.realX:this.drawX+this.moveXDistance*this.moveMultiplier:this.drawX-this.minMove:this.realX,this.drawY=this.moveYDistance>this.minMove?this.moveYDistance*this.moveMultiplier>
this.minMove?this.moveYDistance>this.maxMove?this.realY:this.drawY+this.moveYDistance*this.moveMultiplier:this.drawY+this.minMove:this.moveYDistance<-1*this.minMove?this.moveYDistance*this.moveMultiplier<-1*this.minMove?this.moveYDistance<-1*this.maxMove?this.realY:this.drawY+this.moveYDistance*this.moveMultiplier:this.drawY-this.minMove:this.realY;else if(0<this.physicsMode)this.drawX=this.realX,this.drawY=this.realY;else{var a=this.body.getPosition();this.drawX=a.x*h.physicsScale;this.drawY=a.y*
h.physicsScale}this.transformPoint.x=this.currOrigin.x-this.cacheWidth*h.SCALE/2;this.transformPoint.y=this.currOrigin.y-this.cacheHeight*h.SCALE/2;this.transformMatrix.identity();this.transformMatrix.translate(-this.transformPoint.x*h.SCALE,-this.transformPoint.y*h.SCALE);this.transformMatrix.scale(this.realScaleX,this.realScaleY);0!=this.realAngle&&this.transformMatrix.rotate(.01745329251994278*this.realAngle);ra.pixelsnap?this.transformMatrix.translate(Math.round(this.drawX)*h.SCALE,Math.round(this.drawY)*
h.SCALE):this.transformMatrix.translate(this.drawX*h.SCALE,this.drawY*h.SCALE);null==this.transformObj&&(this.transformObj=this.get_transform());this.transformObj.set_matrix(this.transformMatrix)}},updateTweenProperties:function(){var a=0<this.activePositionTweens,b=0<this.activeAngleTweens;!this.autoScale||0!=this.physicsMode||null==this.body||this.bodyDef.type==S.b2_staticBody||this.bodyScale.x==this.realScaleX&&this.bodyScale.y==this.realScaleY||0!=this.realScaleX&&0!=this.realScaleY&&this.scaleBody(this.realScaleX,
this.realScaleY);a&&b?(0==this.physicsMode?(this.realX=this.tweenLoc.x,this.realY=this.tweenLoc.y,this.realAngle=this.tweenAngle.angle,this.dummy.x=h.toPhysicalUnits(this.realX+Math.floor(this.cacheWidth/2)+this.currOffset.x),this.dummy.y=h.toPhysicalUnits(this.realY+Math.floor(this.cacheHeight/2)+this.currOffset.y),this.body.setPositionAndAngle(this.dummy,.01745329251994278*this.realAngle)):(this.moveActorBy(this.tweenLoc.x-this.getX(!1),this.tweenLoc.y-this.getY(!1),this.groupsToCollideWith),this.setAngle(this.tweenAngle.angle,
!1)),this.updateMatrix=!0):(a&&(0==this.physicsMode?(this.setX(this.tweenLoc.x),this.setY(this.tweenLoc.y)):(this.moveActorBy(this.tweenLoc.x-this.getX(!1),this.tweenLoc.y-this.getY(!1),this.groupsToCollideWith),this.updateMatrix=!0)),b&&this.setAngle(this.tweenAngle.angle,!1))},scaleBody:function(a,b){for(var c=[],d=this.body.getFixtureList();null!=d;)c.push(d),d=d.getNext();for(d=0;d<c.length;){var e=c[d];++d;var e=e.getShape(),f=this.body.getLocalCenter();if(q.__instanceof(e,hb)){var g=1/this.bodyScale.x*
a,k=1/this.bodyScale.y*b,p;p=q.__cast(e,hb).m_p;p.subtract(f);p.x*=g;p.y*=k;q.__cast(e,hb).m_p=f.copy();q.__cast(e,hb).m_p.add(p);e.m_radius*=Math.abs(g)}else if(q.__instanceof(e,za)){g=q.__cast(e,za).m_vertices;k=[];p=0<this.bodyScale.x&&0>a||0>this.bodyScale.x&&0<a;for(var h=0<this.bodyScale.y&&0>b||0>this.bodyScale.y&&0<b,l=0;l<g.length;){var m=g[l];++l;m.subtract(f);m.x=m.x*(1/Math.abs(this.bodyScale.x))*Math.abs(a);m.y=m.y*(1/Math.abs(this.bodyScale.y))*Math.abs(b);p&&(m.x=-m.x);h&&(m.y=-m.y);
var n=f.copy();n.add(m);k.push(n)}p&&h||!p&&!h||k.reverse();q.__cast(e,za).setAsArray(k,k.length)}}this.bodyScale.x=a;this.bodyScale.y=b},checkScreenState:function(){var a=this.isOnScreen(),b=a||this.isInScene(),c=!this.lastScreenState&&a,d=!this.lastSceneState&&b,e=this.lastScreenState&&!a,f=this.lastSceneState&&!b;h.invokeListeners5(this.positionListeners,c,e,d,f);var g=this.engine.typeGroupPositionListeners.h[this.groupID+Da.GROUP_OFFSET],k=this.engine.typeGroupPositionListeners.h[this.typeID];
null!=g&&h.invokeListeners6(g,this,c,e,d,f);null!=k&&h.invokeListeners6(k,this,c,e,d,f);this.lastScreenState=a;this.lastSceneState=b},handleCollisions:function(){var a,b,c;if(0<this.contactCount)for(var d=this.contacts.iterator();d.hasNext();){var e=d.next(),f=e.key;if(null!=this.collisions.get(f))for(a=this.collisions.get(f),a.points=[],e.getWorldManifold(Da.manifold),b=0,c=Da.manifold.m_points;b<c.length;){var g=c[b];++b;0!=g.x&&0!=g.y&&a.points.push(new Vi(g.x,g.y,Da.manifold.m_normal.x,Da.manifold.m_normal.y))}else{var k;
k=q.__cast(e.getFixtureA().getUserData(),Da);var p;p=q.__cast(e.getFixtureB().getUserData(),Da);k==this?(a=p,b=e.getFixtureB(),c=e.getFixtureA()):(a=k,b=e.getFixtureA(),c=e.getFixtureB());g=new fc;g.otherActor=a;g.otherShape=b;g.thisActor=this;g.thisShape=c;g.actorA=k;g.actorB=p;e.getWorldManifold(Da.manifold);var w=null;this.collisions.set(f,g);this.collisionsCount++;f=this.getBody();k=a.getBody();p=e.getFixtureA().getBody();for(var e=e.getFixtureB().getBody(),l=0,m=Da.manifold.m_points;l<m.length;)w=
m[l],++l,0!=w.x&&0!=w.y&&(w=new Vi(w.x,w.y,Da.manifold.m_normal.x,Da.manifold.m_normal.y),g.points.push(w),p==f?(g.thisFromBottom=g.thisFromBottom||0<w.normalY,g.thisFromTop=g.thisFromTop||0>w.normalY,g.thisFromLeft=g.thisFromLeft||0>w.normalX,g.thisFromRight=g.thisFromRight||0<w.normalX):e==f&&(g.thisFromBottom=g.thisFromBottom||0>w.normalY,g.thisFromTop=g.thisFromTop||0<w.normalY,g.thisFromLeft=g.thisFromLeft||0<w.normalX,g.thisFromRight=g.thisFromRight||0>w.normalX),p==k?(g.otherFromBottom=g.otherFromBottom||
0<w.normalY,g.otherFromTop=g.otherFromTop||0>w.normalY,g.otherFromLeft=g.otherFromLeft||0>w.normalX,g.otherFromRight=g.otherFromRight||0<w.normalX):e==k&&(g.otherFromBottom=g.otherFromBottom||0>w.normalY,g.otherFromTop=g.otherFromTop||0<w.normalY,g.otherFromLeft=g.otherFromLeft||0<w.normalX,g.otherFromRight=g.otherFromRight||0>w.normalX),null!=a&&(g.thisCollidedWithActor=g.thisCollidedWithActor||1!=a.groupID&&-2!=a.groupID&&!a.isTerrainRegion,g.thisCollidedWithTerrain=g.thisCollidedWithTerrain||a.isTerrainRegion,
g.thisCollidedWithTile=g.thisCollidedWithTile||1==a.groupID),g.otherCollidedWithActor=g.otherCollidedWithActor||1!=this.groupID&&-2!=this.groupID&&!this.isTerrainRegion,g.otherCollidedWithTerrain=g.otherCollidedWithTerrain||this.isTerrainRegion,g.otherCollidedWithTile=g.otherCollidedWithTile||1==this.groupID,g.thisCollidedWithSensor=g.thisCollidedWithSensor||b.isSensor(),g.otherCollidedWithSensor=g.otherCollidedWithSensor||c.isSensor())}}if(0<this.collisionsCount)for(d=this.collisions.iterator();d.hasNext();)a=
d.next(),null!=a&&null!=a.thisActor&&null!=a.otherActor&&a.thisActor.handlesCollisions&&a.otherActor.handlesCollisions&&(Da.lastCollided=a.otherActor,h.invokeListeners2(this.collisionListeners,a),this.engine.handleCollision(this,a))},addContact:function(a){null!=this.contacts&&(this.contacts.set(a.key,a),this.contactCount++,this.collisions.clr(a.key)&&this.collisionsCount--)},removeContact:function(a){null!=this.collisions&&this.collisions.clr(a.key)&&this.collisionsCount--;null!=this.contacts&&this.contacts.clr(a.key)&&
this.contactCount--},addRegionContact:function(a){null!=this.regionContacts&&this.regionContacts.set(a.key,a)},removeRegionContact:function(a){null!=this.regionContacts&&this.regionContacts.clr(a.key)},getID:function(){return this.ID},getName:function(){return this.get_name()},getGroupID:function(){return 0<this.physicsMode?this.groupID:this.body.groupID},getLayerID:function(){return this.layerID},getLayerName:function(){return this.engine.layers.get(this.layerID).layerName},getLayerOrder:function(){return this.engine.layers.get(this.layerID).order},
getType:function(){if(-1==this.typeID)return null;var a;a=la.get().resources.get(this.typeID);return q.__instanceof(a,Od)?q.__cast(a,Od):null},isPausable:function(){return this.getType().pausable},isPaused:function(){return this.paused},pause:function(){this.isPausable()&&(ea.pause(this),ea.pause(this.tweenAngle),ea.pause(this.tweenLoc),this.paused=!0,0==this.physicsMode&&this.body.setPaused(!0))},unpause:function(){this.isPausable()&&(ea.resume(this),ea.resume(this.tweenAngle),ea.resume(this.tweenLoc),
this.paused=!1,0==this.physicsMode&&this.body.setPaused(!1))},getGroup:function(){var a=this.getGroupID();return this.engine.groups.h[a]},getIsRegion:function(){return this.isRegion},getIsTerrainRegion:function(){return this.isTerrainRegion},moveToLayer:function(a,b){this.isHUD||this.engine.moveToLayer(this,a,b)},bringToFront:function(){this.isHUD||this.engine.bringToFront(this)},bringForward:function(){this.isHUD||this.engine.bringForward(this)},sendToBack:function(){this.isHUD||this.engine.sendToBack(this)},
sendBackward:function(){this.isHUD||this.engine.sendBackward(this)},moveToBottom:function(){this.parent.setChildIndex(this,0)},moveToTop:function(){this.parent.setChildIndex(this,this.parent.get_numChildren()-1)},moveDown:function(){var a=this.parent.getChildIndex(this);0<a&&this.parent.setChildIndex(this,a-1)},moveUp:function(){var a=this.parent.getChildIndex(this),b=this.parent.get_numChildren()-1;a<b&&this.parent.setChildIndex(this,a+1)},getZIndex:function(){return this.parent.getChildIndex(this)},
setZIndex:function(a){var b=this.parent.get_numChildren()-1;a>b&&(a=b);0>a&&(a=0);this.parent.setChildIndex(this,a)},enableSmoothMotion:function(){this.smoothMove=!0},getX:function(a){null==a&&(a=!0);var b=-1;h.NO_PHYSICS||(this.isRegion||this.isTerrainRegion?b=h.toPixelUnits(this.body.getPosition().x)-this.cacheWidth/2:0==this.physicsMode&&(b=this.body.getPosition().x*h.physicsScale-Math.floor(this.cacheWidth/2)-this.currOffset.x));if(h.NO_PHYSICS||0<this.physicsMode)b=this.realX-Math.floor(this.cacheWidth/
2)-this.currOffset.x;return a?Math.round(b):b},getY:function(a){null==a&&(a=!0);var b=-1;h.NO_PHYSICS||(this.isRegion||this.isTerrainRegion?b=h.toPixelUnits(this.body.getPosition().y)-this.cacheHeight/2:0==this.physicsMode&&(b=this.body.getPosition().y*h.physicsScale-Math.floor(this.cacheHeight/2)-this.currOffset.y));if(h.NO_PHYSICS||0<this.physicsMode)b=this.realY-Math.floor(this.cacheHeight/2)-this.currOffset.y;return a?Math.round(b):b},getXCenter:function(){return 0==this.physicsMode?Math.round(h.toPixelUnits(this.body.getWorldCenter().x)-
this.currOffset.x):this.realX-this.currOffset.x},getYCenter:function(){return 0==this.physicsMode?Math.round(h.toPixelUnits(this.body.getWorldCenter().y)-this.currOffset.y):this.realY-this.currOffset.y},getScreenX:function(){return this.isHUD?this.getX(!0):this.getX(!0)+h.cameraX/h.SCALE},getScreenY:function(){return this.isHUD?this.getY(!0):this.getY(!0)+h.cameraY/h.SCALE},setX:function(a,b,c){null==c&&(c=!1);null==b&&(b=!1);1==this.physicsMode?this.moveActorTo(a+Math.floor(this.cacheWidth/2)+this.currOffset.x,
this.realY,!c&&this.continuousCollision?this.groupsToCollideWith:null,null):2==this.physicsMode?this.resetReal(a+Math.floor(this.cacheWidth/2)+this.currOffset.x,this.realY):(this.dummy.x=this.isRegion||this.isTerrainRegion?h.toPhysicalUnits(a):h.toPhysicalUnits(a+Math.floor(this.cacheWidth/2)+this.currOffset.x),this.dummy.y=this.body.getPosition().y,this.body.setPosition(this.dummy),b&&this.body.setLinearVelocity(this.zero));this.snapOnSet&&(this.drawX=this.realX,this.drawY=this.realY);this.updateMatrix=
!0},setY:function(a,b,c){null==c&&(c=!1);null==b&&(b=!1);1==this.physicsMode?this.moveActorTo(this.realX,a+Math.floor(this.cacheHeight/2)+this.currOffset.y,!c&&this.continuousCollision?this.groupsToCollideWith:null,null):2==this.physicsMode?this.resetReal(this.realX,a+Math.floor(this.cacheHeight/2)+this.currOffset.y):(this.dummy.y=this.isRegion||this.isTerrainRegion?h.toPhysicalUnits(a):h.toPhysicalUnits(a+Math.floor(this.cacheHeight/2)+this.currOffset.y),this.dummy.x=this.body.getPosition().x,this.body.setPosition(this.dummy),
b&&this.body.setLinearVelocity(this.zero));this.snapOnSet&&(this.drawX=this.realX,this.drawY=this.realY);this.updateMatrix=!0},follow:function(a){null!=a&&(0<this.physicsMode?this.moveActorTo(a.getXCenter(),a.getYCenter(),null,null):this.body.setPosition(a.body.getWorldCenter()))},followWithOffset:function(a,b,c){0<this.physicsMode?this.moveActorTo(a.getXCenter()+b,a.getYCenter()+c,null,null):(a=a.body.getWorldCenter(),a.x+=h.toPhysicalUnits(b),a.y+=h.toPhysicalUnits(c),this.body.setPosition(a))},
setOriginPoint:function(a,b){var c=null,c=0==this.physicsMode?this.body.getPosition():new y(h.toPhysicalUnits(this.realX),h.toPhysicalUnits(this.realY)),d=new y(this.currOffset.x,this.currOffset.y),e=this.getAngle(),f=a-this.cacheWidth/2|0,g=b-this.cacheHeight/2|0;if(null!=this.currOrigin&&((this.currOffset.x|0)!=f||(this.currOffset.y|0)!=g)&&0!=(57.29577951308402*e|0)){var k=e+Math.atan2(-this.currOffset.y,-this.currOffset.x),p=e+Math.atan2(-g,-f),w=Math.sqrt(Math.pow(this.currOffset.x,2)+Math.pow(this.currOffset.y,
2)),l=Math.sqrt(Math.pow(f,2)+Math.pow(g,2)),e=Math.round(this.currOrigin.x+Math.cos(k)*w),k=Math.round(this.currOrigin.y+Math.sin(k)*w),w=Math.round(a+Math.cos(p)*l),p=Math.round(b+Math.sin(p)*l);c.x+=h.toPhysicalUnits(e-w);c.y+=h.toPhysicalUnits(k-p)}this.currOrigin.x=a;this.currOrigin.y=b;this.originX=this.currOffset.x=f;this.originY=this.currOffset.y=g;d.x=this.currOffset.x-d.x;d.y=this.currOffset.y-d.y;c.x+=h.toPhysicalUnits(d.x);c.y+=h.toPhysicalUnits(d.y);0==this.physicsMode?this.body.setPosition(c):
(this.realX=h.toPixelUnits(c.x),this.realY=h.toPixelUnits(c.y));this.resetOrigin=!0},getXVelocity:function(){return 0<this.physicsMode?this.xSpeed:this.body.getLinearVelocity().x},getYVelocity:function(){return 0<this.physicsMode?this.ySpeed:this.body.getLinearVelocity().y},setXVelocity:function(a){if(0<this.physicsMode)this.xSpeed=a;else{var b=this.body.getLinearVelocity();b.x=a;this.body.setLinearVelocity(b);this.body.setAwake(!0)}},setYVelocity:function(a){if(0<this.physicsMode)this.ySpeed=a;else{var b=
this.body.getLinearVelocity();b.y=a;this.body.setLinearVelocity(b);this.body.setAwake(!0)}},setVelocity:function(a,b){this.setXVelocity(b*Math.cos(.01745329251994278*a));this.setYVelocity(b*Math.sin(.01745329251994278*a))},accelerateX:function(a){this.setXVelocity(this.getXVelocity()+a)},accelerateY:function(a){this.setYVelocity(this.getYVelocity()+a)},accelerate:function(a,b){this.setXVelocity(this.getXVelocity()+b*Math.cos(.01745329251994278*a));this.setYVelocity(this.getYVelocity()+b*Math.sin(.01745329251994278*
a))},getAngle:function(){return 0<this.physicsMode?.01745329251994278*this.realAngle:this.body.getAngle()},getAngleInDegrees:function(){return 0<this.physicsMode?this.realAngle:57.29577951308402*this.body.getAngle()},setAngle:function(a,b){null==b&&(b=!0);b?0<this.physicsMode?this.realAngle=57.29577951308402*a:this.body.setAngle(a):0<this.physicsMode?this.realAngle=a:this.body.setAngle(.01745329251994278*a);this.updateMatrix=!0},rotate:function(a,b){null==b&&(b=!0);b?0<this.physicsMode?this.realAngle+=
57.29577951308402*a:this.body.setAngle(this.body.getAngle()+a):0<this.physicsMode?this.realAngle+=a:this.body.setAngle(this.body.getAngle()+.01745329251994278*a)},getAngularVelocity:function(){return 0<this.physicsMode?.01745329251994278*this.rSpeed:this.body.getAngularVelocity()},setAngularVelocity:function(a){0<this.physicsMode?this.rSpeed=57.29577951308402*a:(this.body.setAngularVelocity(a),this.body.setAwake(!0))},changeAngularVelocity:function(a){0<this.physicsMode?this.rSpeed+=57.29577951308402*
a:(this.body.setAngularVelocity(this.body.getAngularVelocity()+a),this.body.setAwake(!0))},push:function(a,b,c){if(0<this.physicsMode)this.dummy.x=a,this.dummy.y=b,this.dummy.normalize(),this.accelerateX(this.dummy.x*c*.01),this.accelerateY(this.dummy.y*c*.01);else if(0!=a||0!=b)this.dummy.x=a,this.dummy.y=b,this.dummy.normalize(),this.dummy.multiply(c),this.body.applyForce(this.dummy,this.body.getWorldCenter())},pushInDirection:function(a,b){this.push(Math.cos(.01745329251994278*a),Math.sin(.01745329251994278*
a),b)},applyImpulse:function(a,b,c){if(0<this.physicsMode)this.dummy.x=a,this.dummy.y=b,this.dummy.normalize(),this.accelerateX(this.dummy.x*c),this.accelerateY(this.dummy.y*c);else if(0!=a||0!=b)this.dummy.x=a,this.dummy.y=b,this.dummy.normalize(),this.dummy.multiply(c),this.body.applyImpulse(this.dummy,this.body.getWorldCenter())},applyImpulseInDirection:function(a,b){this.applyImpulse(Math.cos(.01745329251994278*a),Math.sin(.01745329251994278*a),b)},applyTorque:function(a){0<this.physicsMode?this.fixedRotation||
(this.rSpeed-=a):(this.body.applyTorque(a),this.body.setAwake(!0))},getWidth:function(){return this.cacheWidth},getHeight:function(){return this.cacheHeight},getPhysicsWidth:function(){return this.cacheWidth/h.physicsScale},getPhysicsHeight:function(){return this.cacheHeight/h.physicsScale},getBody:function(){return this.body},enableRotation:function(){0<this.physicsMode?this.fixedRotation=!1:this.body.setFixedRotation(!1)},disableRotation:function(){0<this.physicsMode?this.fixedRotation=!0:this.body.setFixedRotation(!0)},
setIgnoreGravity:function(a){this.ignoreGravity=a;0==this.physicsMode&&this.body.setIgnoreGravity(a)},ignoresGravity:function(){return 0<this.physicsMode?this.ignoreGravity:this.body.isIgnoringGravity()},getFriction:function(){return 0==this.physicsMode&&null!=this.body.m_fixtureList?this.body.m_fixtureList.m_friction:0},getBounciness:function(){return 0==this.physicsMode&&null!=this.body.m_fixtureList?this.body.m_fixtureList.m_restitution:0},getMass:function(){return 0==this.physicsMode?this.md.mass:
0},getAngularMass:function(){return 0==this.physicsMode?this.md.I:0},getLinearDamping:function(){return 0==this.physicsMode?this.body.getLinearDamping():0},getAngularDamping:function(){return 0==this.physicsMode?this.body.getAngularDamping():0},setFriction:function(a){0==this.physicsMode&&this.body.setFriction(a)},setBounciness:function(a){0==this.physicsMode&&this.body.setBounciness(a)},setMass:function(a){0==this.physicsMode&&(this.md.mass=a,this.body.setMassData(this.md))},setAngularMass:function(a){0==
this.physicsMode&&(this.md.I=a,this.body.setMassData(this.md))},setLinearDamping:function(a){0==this.physicsMode&&this.body.setLinearDamping(a)},setAngularDamping:function(a){0==this.physicsMode&&this.body.setAngularDamping(a)},isMouseOver:function(){var a,b;this.isHUD?(a=(A.mouseX-h.engine.hudLayer.get_x())/h.SCALE,b=(A.mouseY-h.engine.hudLayer.get_y())/h.SCALE):(a=(A.mouseX-h.cameraX*this.engine.layers.get(this.layerID).scrollFactorX)/h.SCALE,b=(A.mouseY-h.cameraY*this.engine.layers.get(this.layerID).scrollFactorY)/
h.SCALE);var c=(this.get_scaleX()-1)*Math.floor(this.cacheWidth/2),d=(this.get_scaleY()-1)*Math.floor(this.cacheHeight/2),e=this.colX-c,f=this.colY-d;if(0!=this.get_rotation()){var g=e+this.currOrigin.x*this.get_scaleX(),k=f+this.currOrigin.y*this.get_scaleY();a-=g;b-=k;var p=.01745329251994278*this.get_rotation(),g=g+a*Math.cos(p)+b*Math.sin(p),k=k-a*Math.sin(p)+b*Math.cos(p);a=g;b=k}return this.isHUD&&!h.engine.isHUDZoomable?a>=e/h.engine.zoomMultiplier&&b>=f/h.engine.zoomMultiplier&&a<(e+this.cacheWidth+
2*c)/h.engine.zoomMultiplier&&b<(f+this.cacheHeight+2*d)/h.engine.zoomMultiplier:a>=e&&b>=f&&a<e+this.cacheWidth+2*c&&b<f+this.cacheHeight+2*d},isMouseHover:function(){return this.isMouseOver()&&A.mouseUp},isMouseDown:function(){return this.isMouseOver()&&A.mouseDown},isMousePressed:function(){return this.isMouseOver()&&A.mousePressed},isMouseReleased:function(){return this.isMouseOver()&&A.mouseReleased},cancelTweens:function(){ea.stop(this,["alpha","realScaleX","realScaleY"],!1,!1);ea.stop(this.tweenAngle,
null,!1,!1);ea.stop(this.tweenLoc,null,!1,!1);this.activeAngleTweens=this.activePositionTweens=0;Da.actuateUnloadForTarget(this);Da.actuateUnloadForTarget(this.tweenAngle);Da.actuateUnloadForTarget(this.tweenLoc)},fadeTo:function(a,b,c){null==b&&(b=1);null==c&&(c=Jb.get_easeNone());ea.tween(this,b,{alpha:a}).ease(c)},growTo:function(a,b,c,d){null==c&&(c=1);null==b&&(b=1);null==a&&(a=1);null==d&&(d=Jb.get_easeNone());ea.tween(this,c,{realScaleX:a,realScaleY:b}).ease(d)},spinTo:function(a,b,c){null==
b&&(b=1);this.tweenAngle.angle=this.realAngle;null==c&&(c=Jb.get_easeNone());this.activeAngleTweens++;ea.tween(this.tweenAngle,b,{angle:a}).ease(c).onComplete(K(this,this.onTweenAngleComplete))},moveTo:function(a,b,c,d){null==c&&(c=1);this.tweenLoc.x=this.getX(!1);this.tweenLoc.y=this.getY(!1);null==d&&(d=Jb.get_easeNone());this.activePositionTweens++;ea.tween(this.tweenLoc,c,{x:a,y:b}).ease(d).onComplete(K(this,this.onTweenPositionComplete))},spinBy:function(a,b,c){null==b&&(b=1);this.spinTo(this.realAngle+
a,b,c)},moveBy:function(a,b,c,d){null==c&&(c=1);this.moveTo(this.getX(!1)+a,this.getY(!1)+b,c,d)},onTweenAngleComplete:function(){this.updateTweenProperties();this.activeAngleTweens--},onTweenPositionComplete:function(){this.updateTweenProperties();this.activePositionTweens--;null!=this.currOffset&&this.resetReal(this.realX,this.realY)},drawImage:function(a){if(null!=this.currAnimation){var b=0,c=0;0<this.realAngle&&(this.drawMatrix.identity(),this.transformPoint.x=0-this.cacheWidth*h.SCALE/2,this.transformPoint.y=
0-this.cacheHeight*h.SCALE/2,this.drawMatrix.translate(-this.transformPoint.x*h.SCALE,-this.transformPoint.y*h.SCALE),this.drawMatrix.scale(this.realScaleX,this.realScaleY),this.drawMatrix.rotate(.01745329251994278*this.realAngle),this.drawMatrix.translate(this.colX*h.SCALE,this.colY*h.SCALE),b+=this.transformMatrix.tx-this.drawMatrix.tx,c+=this.transformMatrix.ty-this.drawMatrix.ty);q.__cast(this.currAnimation,md).draw(a,b,c,.01745329251994278*this.realAngle,a.alpha)}},getCurrentImage:function(){return q.__cast(this.currAnimation,
md).getCurrentImage()},enableActorDrawing:function(){this.drawActor=!0;null!=this.currAnimation&&this.currAnimation.set_visible(!0);for(var a=this.animationMap.iterator();a.hasNext();){var b=a.next();null!=b&&b.set_visible(!0)}},disableActorDrawing:function(){this.drawActor=!1;null!=this.currAnimation&&this.currAnimation.set_visible(!1);for(var a=this.animationMap.iterator();a.hasNext();){var b=a.next();null!=b&&b.set_visible(!1)}},drawsImage:function(){return this.drawActor},setFilter:function(a){a=
a[0].matrix;if(!this.animsBackedUp){this.backupAnimationMap=new ma;for(var b=this.animationMap.keys();b.hasNext();){var c=b.next(),d=this.animationMap.get(c).sheet.clone();this.backupAnimationMap.set(c,d)}this.animsBackedUp=!0}for(b=this.animationMap.keys();b.hasNext();)c=b.next(),c=this.animationMap.get(c),d=c.sheet.clone(),d.applyFilter(d,d.rect,new W(0,0),new We(a)),c.sheet=d.clone(),c.region.x=c.frameIndex%c.across*c.frameWidth,c.region.y=c.frameHeight*Math.floor(c.frameIndex/c.across),c.bitmapData.fillRect(c.bitmapData.rect,
0),c.bitmapData.copyPixels(c.sheet,c.region,c.pt),c.needsUpdate=!1},clearFilters:function(){if(this.animsBackedUp){for(var a=this.backupAnimationMap.keys();a.hasNext();){var b=a.next(),c=this.backupAnimationMap.get(b),b=this.animationMap.get(b);b.sheet=c.clone();b.region.x=b.frameIndex%b.across*b.frameWidth;b.region.y=b.frameHeight*Math.floor(b.frameIndex/b.across);b.bitmapData.fillRect(b.bitmapData.rect,0);b.bitmapData.copyPixels(b.sheet,b.region,b.pt);b.needsUpdate=!1}this.animsBackedUp=!1}},setBlendMode:function(a){this.set_blendMode(a)},
resetBlendMode:function(){},addBehavior:function(a){null!=this.behaviors&&this.behaviors.add(a)},hasBehavior:function(a){return null!=this.behaviors?this.behaviors.hasBehavior(a):!1},enableBehavior:function(a){null!=this.behaviors&&this.behaviors.enableBehavior(a)},disableBehavior:function(a){null!=this.behaviors&&this.behaviors.disableBehavior(a)},isBehaviorEnabled:function(a){return null!=this.behaviors?this.behaviors.isBehaviorEnabled(a):!1},enableAllBehaviors:function(){if(null!=this.behaviors)for(var a=
0,b=this.behaviors.behaviors;a<b.length;){var c=b[a];++a;c.enabled=!0}},getValue:function(a,b){return this.behaviors.getAttribute(a,b)},setValue:function(a,b,c){this.behaviors.setAttribute(a,b,c)},shout:function(a,b){return this.behaviors.call(a,b)},say:function(a,b,c){return this.behaviors.call2(a,b,c)},setActorValue:function(a,b){null!=this.registry&&this.registry.set(a,b)},getActorValue:function(a){return null==this.registry?null:this.registry.get(a)},hasActorValue:function(a){return null==this.registry?
null:null!=this.registry.get(a)},registerListener:function(a,b){var c=I.indexOf(this.allListenerReferences,a),d=null;-1!=c?d=this.allListeners.h[c]:(this.allListenerReferences.push(a),c=this.allListenerReferences.length-1,d=[],this.allListeners.h[c]=d);d.push(b)},removeAllListeners:function(){for(var a=0,b=this.allListenerReferences.length;a<b;){var c=a++,d=this.allListenerReferences[c];if(null!=d&&(c=q.__cast(this.allListeners.h[c],Array),null!=c))for(var e=0,f=c.length;e<f;){var g=e++;I.removeValueFromArray(d,
c[g])}}this.allListenerReferences.length=0},anchorToScreen:function(){0==this.physicsMode&&this.body.setAlwaysActive(!0);this.isHUD=!0;this.engine.removeActorFromLayer(this,this.layerID);this.engine.addHUDActor(this);this.engine.hudLayer.addChild(this);this.updateMatrix=!0},unanchorFromScreen:function(){0==this.physicsMode&&this.body.setAlwaysActive(this.alwaysSimulate);this.isHUD=!1;this.engine.removeHUDActor(this);this.engine.hudLayer.removeChild(this);this.engine.moveActorToLayer(this,this.layerID);
this.updateMatrix=!0},isAnchoredToScreen:function(){return this.isHUD},makeAlwaysSimulate:function(a){null==a&&(a=!0);this.alwaysSimulate||(0==this.physicsMode&&a&&this.body.setAlwaysActive(!0),this.alwaysSimulate=!0,this.engine.addHUDActor(this))},makeSometimesSimulate:function(a){null==a&&(a=!0);this.alwaysSimulate&&(0==this.physicsMode&&a&&this.body.setAlwaysActive(!1),this.alwaysSimulate=!1,this.engine.removeHUDActor(this))},alwaysSimulates:function(){return this.alwaysSimulate},die:function(){this.dying=
!0;var a=this.engine.whenTypeGroupDiesListeners.get(this.getType()),b=this.engine.whenTypeGroupDiesListeners.get(this.getGroup());h.invokeListeners(this.whenKilledListeners);null!=a&&h.invokeListeners2(a,this);null!=b&&h.invokeListeners2(b,this);this.removeAllListeners()},isDying:function(){return this.dying},isAlive:function(){return!(this.dead||this.dying||this.recycled)},isOnScreen:function(){var a=h.cameraX/h.SCALE,b=h.cameraY/h.SCALE,c=h.paddingLeft,d=h.paddingTop,e=h.paddingRight,f=h.paddingBottom;
return(0<this.physicsMode||this.body.isActive())&&this.getX(!0)>=-a-c&&this.getY(!0)>=-b-d&&this.getX(!0)<-a+h.screenWidth+e&&this.getY(!0)<-b+h.screenHeight+f},isInScene:function(){return(0<this.physicsMode||this.body.isActive())&&0<=this.getX(!0)&&0<=this.getY(!0)&&this.getX(!0)<h.sceneWidth&&this.getY(!0)<h.sceneHeight},getLastCollidedActor:function(){return Da.lastCollided},killSelfAfterLeavingScreen:function(){this.killLeaveScreen=!0},toString:function(){return null==this.get_name()?"Unknown Actor "+
this.ID:"[Actor "+this.ID+","+this.get_name()+"]"},addRectangularShape:function(a,b,c,d){if(0==this.physicsMode){var e=new za,f=[];a=h.toPhysicalUnits(a-Math.floor(this.cacheWidth/2)-this.currOffset.x);b=h.toPhysicalUnits(b-Math.floor(this.cacheHeight/2)-this.currOffset.y);c=h.toPhysicalUnits(c);d=h.toPhysicalUnits(d);f.push(new y(a,b));f.push(new y(a+c,b));f.push(new y(a+c,b+d));f.push(new y(a,b+d));e.setAsVector(f);this.getBody().createFixture2(e,1).SetUserData(this)}},addCircularShape:function(a,
b,c){if(0==this.physicsMode){var d=new hb;d.m_radius=h.toPhysicalUnits(c);d.m_p.x=h.toPhysicalUnits(a);d.m_p.y=h.toPhysicalUnits(b);this.getBody().createFixture2(d,1).SetUserData(this)}},addVertex:function(a,b,c){b=h.toPhysicalUnits(b-Math.floor(this.cacheWidth/2)-this.currOffset.x);c=h.toPhysicalUnits(c-Math.floor(this.cacheHeight/2)-this.currOffset.y);a.push(new y(b,c))},addPolygonalShape:function(a){if(0==this.physicsMode){var b=new za;b.setAsArray(a);this.getBody().createFixture2(b,1).SetUserData(this)}},
getLastCreatedFixture:function(){return 0==this.physicsMode?this.body.getFixtureList():null},setLocation:function(a,b){this.realX=a;this.realY=b;this.setX(a,!1,!0);this.setY(b,!1,!0)},get_shape:function(){return this._mask},set_shape:function(a){if(this._mask==a)return a;null!=this._mask&&this._mask.assignTo(null);this._mask=a;null!=a&&this._mask.assignTo(this);return this._mask},collide:function(a,b,c){a=this.engine.getGroup(a);this._x=this.realX;this._y=this.realY;this.resetReal(b,c);if(null==this._mask){b=
0;for(a=a.list;b<a.length;)if(c=a[b],++b,!c.recycled&&this.colX+this.cacheWidth>=c.colX&&this.colY+this.cacheHeight>=c.colY&&this.colX<=c.colX+c.cacheWidth&&this.colY<=c.colY+c.cacheHeight&&c.collidable&&c!=this&&(null==c._mask||c._mask.collide(this.HITBOX)))return this.colMask=c._mask,this.resetReal(this._x,this._y),c;this.resetReal(this._x,this._y);return null}b=0;for(a=a.list;b<a.length;)if(c=a[b],++b,!c.recycled&&this.colX+this.cacheWidth>=c.colX&&this.colY+this.cacheHeight>=c.colY&&this.colX<=
c.colX+c.cacheWidth&&this.colY<=c.colY+c.cacheHeight&&c.collidable&&c!=this&&this._mask.collide(null!=c._mask?c._mask:c.HITBOX))return this.colMask=null!=c._mask?c._mask:c.HITBOX,this.resetReal(this._x,this._y),c;this.resetReal(this._x,this._y);return null},collideTypes:function(a,b,c){var d=this.collidedList.length;if("string"==typeof a){if(this.collideInto(a,b,c,this.collidedList),this.collidedList.length>d)return this.collidedList[this.collidedList.length-1]}else if(a=this.HITBOX.collideTypes,
null!=a){for(var e=0;e<a.length;){var f=a[e];++e;f!=na.REGION_ID&&this.collideInto(f,b,c,this.collidedList)}if(this.collidedList.length>d)return this.collidedList[this.collidedList.length-1]}return null},collideWith:function(a,b,c){this._x=this.realX;this._y=this.realY;this.resetReal(b,c);if(this.colX+this.cacheWidth>=a.colX&&this.colY+this.cacheHeight>=a.colY&&this.colX<=a.colX+a.cacheWidth&&this.colY<=a.colY+a.cacheHeight&&this.collidable&&a.collidable){if(null==this._mask){if(null==a._mask||a._mask.collide(this.HITBOX))return this.resetReal(this._x,
this._y),a;this.resetReal(this._x,this._y);return null}if(this._mask.collide(null!=a._mask?a._mask:a.HITBOX))return this.resetReal(this._x,this._y),a}this.resetReal(this._x,this._y);return null},collideInto:function(a,b,c,d){a=this.engine.getGroup(a);this._x=this.realX;this._y=this.realY;this.resetReal(b,c);b=d.length;if(null==this._mask)for(c=0,a=a.list;c<a.length;){var e=a[c];++c;e.recycled||this.colX+this.cacheWidth>=e.colX&&this.colY+this.cacheHeight>=e.colY&&this.colX<=e.colX+e.cacheWidth&&this.colY<=
e.colY+e.cacheHeight&&e.collidable&&e!=this&&(null==e._mask||e._mask.collide(this.HITBOX))&&(I.contains(d,e)||(d[b++]=e))}else for(c=0,a=a.list;c<a.length;)e=a[c],++c,this.colX+this.cacheWidth>=e.colX&&this.colY+this.cacheHeight>=e.colY&&this.colX<=e.colX+e.cacheWidth&&this.colY<=e.colY+e.cacheHeight&&e.collidable&&e!=this&&this._mask.collide(null!=e._mask?e._mask:e.HITBOX)&&(I.contains(d,e)||(d[b++]=e));this.resetReal(this._x,this._y)},clearCollisionInfoList:function(){if(0<this.collisionsCount)for(var a=
this.simpleCollisions.iterator();a.hasNext();){var b=a.next();b.remove=!0;null!=b.linkedCollision&&(b.linkedCollision.remove=!0)}},clearCollidedList:function(){for(;0<this.collidedList.length;)this.collidedList.pop();this.listChecked=0},addCollision:function(a){var b;if(-1!=(b=this.alreadyCollided(a.maskA,a.maskB))){var c=this.simpleCollisions.get(b);a.switchData(c.linkedCollision);a.linkedCollision.remove=!1;a.remove=!1;fc.recycle(c);this.simpleCollisions.clr(b);this.simpleCollisions.set(b,a);return a}this.simpleCollisions.clr(this.collisionsCount);
this.simpleCollisions.set(this.collisionsCount,a);this.collisionsCount++;return a},alreadyCollided:function(a,b){for(var c=this.simpleCollisions.keys();c.hasNext();){var d=c.next(),e=this.simpleCollisions.get(d);if(null!=e&&(e.maskA==a&&e.maskB==b||e.maskA==b&&e.maskB==a))return d}return-1},resetReal:function(a,b){this.realX=a;this.realY=b;this.colX=this.realX-Math.floor(this.cacheWidth/2)-this.currOffset.x;this.colY=this.realY-Math.floor(this.cacheHeight/2)-this.currOffset.y},adjustByWidth:function(a){if(null!=
this._mask&&null!=this._mask.lastCheckedMask&&q.__instanceof(this._mask.lastCheckedMask,Fb)){var b;b=q.__cast(this._mask.lastCheckedMask,Fb);return a?this.cacheWidth/2-(this.cacheWidth-(b._x+b._width)):this.cacheWidth/2-b._x}return this.cacheWidth/2},adjustByHeight:function(a){if(null!=this._mask&&null!=this._mask.lastCheckedMask&&q.__instanceof(this._mask.lastCheckedMask,Fb)){var b;b=q.__cast(this._mask.lastCheckedMask,Fb);return a?this.cacheHeight/2-(this.cacheHeight-(b._y+b._height)):this.cacheHeight/
2-b._y}return this.cacheHeight/2},getAllCollisionInfo:function(a,b){for(var c=null;this.listChecked<this.collidedList.length;){var d=fc.get();this.colMask=this.collidedList[this.listChecked]._mask;this.fillCollisionInfo(d,this.collidedList[this.listChecked],a,b);this.addCollision(d);if(null==d.linkedCollision){var e=fc.get();d.switchData(e);this.collidedList[this.listChecked].addCollision(e)}d.solidCollision&&(c=d);this.listChecked++}return c},moveActorBy:function(a,b,c,d){null==d&&(d=!1);if(0!=a||
0!=b){this.clearCollisionInfoList();this.clearCollidedList();if(null!=c){var e,f,g;if(0!=a)if(f=0<a?Math.ceil(this.realX+a):Math.floor(this.realX+a),this.collidable&&(d||null!=this.collideTypes(c,f,this.realY)))for(this.clearCollidedList();0!=a;){e=1<=a||-1>=a?1:Math.abs(a);e=0<a?e:-e;f=0<e?Math.ceil(this.realX+e):Math.floor(this.realX+e);null!=(g=this.collide(na.REGION_ID,f,this.realY))&&q.__cast(g,$b).addActor(this);if(null!=this.collideTypes(c,f,this.realY)&&(f=this.getAllCollisionInfo(e,0),null!=
f)){this.xSpeed=0;f.useBounds&&(this.realX=0<e?f.bounds.x-Math.ceil(this.adjustByWidth(!0)):f.bounds.x+f.bounds.width+Math.floor(this.adjustByWidth(!1)));break}this.realX+=e;a-=e}else this.realX+=a;if(0!=b)if(f=0<b?Math.ceil(this.realY+b):Math.floor(this.realY+b),this.clearCollidedList(),this.collidable&&(d||null!=this.collideTypes(c,this.realX,f)))for(this.clearCollidedList();0!=b;){e=1<=b||-1>=b?1:Math.abs(b);e=0<b?e:-e;f=0<e?Math.ceil(this.realY+e):Math.floor(this.realY+e);null!=(g=this.collide(na.REGION_ID,
this.realX,f))&&q.__cast(g,$b).addActor(this);if(null!=this.collideTypes(c,this.realX,f)&&(a=this.getAllCollisionInfo(0,e),null!=a)){this.ySpeed=0;a.useBounds&&(this.realY=0<e?a.bounds.y-Math.ceil(this.adjustByHeight(!0)):a.bounds.y+a.bounds.height+Math.floor(this.adjustByHeight(!1)));break}this.realY+=e;b-=e}else this.realY+=b}else this.realX+=a,this.realY+=b;this.resetReal(this.realX,this.realY)}},moveActorTo:function(a,b,c,d){null==d&&(d=!1);this.moveActorBy(a-this.realX,b-this.realY,c,d)},moveActorTowards:function(a,
b,c,d,e){null==e&&(e=!1);this._point.x=a-this.realX;this._point.y=b-this.realY;this._point.normalize(c);this.moveActorBy(this._point.x,this._point.y,d,e)},moveCollideX:function(a,b){},moveCollideY:function(a,b){},fillCollisionInfo:function(a,b,c,d){if(q.__instanceof(b,$b))q.__cast(b,$b).addActor(this);else{a.thisActor=a.actorA=this;a.otherActor=a.actorB=b;a.maskA=this._mask;a.maskB=this.colMask;a.solidCollision=this._mask.solid&&this.colMask.solid;a.groupA=this._mask.lastCheckedMask.groupID;a.groupB=
this._mask.lastCheckedMask.lastColID;var e,f=this.getGroupID();e=fc.collisionResponses.h[f];var g=f=!1;null!=e&&null!=function(a){a=b.getGroupID();return e.h[a]}(this)&&("sensor"==function(a){a=b.getGroupID();return e.h[a]}(this)?(a.solidCollision=!1,f=!0):g=a.solidCollision=!0);null!=this.colMask&&(a.useBounds=!0,a.bounds.x=this.colMask.lastBounds.x,a.bounds.y=this.colMask.lastBounds.y,a.bounds.width=this.colMask.lastBounds.width,a.bounds.height=this.colMask.lastBounds.height);0!=c&&(b.ID==I.INTEGER_MAX?
(a.thisFromLeft=0>c,a.thisFromRight=0<c):(a.thisFromLeft=b.colX<this.colX,a.thisFromRight=b.colX>this.colX),a.otherFromLeft=!a.thisFromLeft,a.otherFromRight=!a.thisFromRight,a.thisFromTop=a.otherFromTop=!1,a.thisFromBottom=a.otherFromBottom=!1);0!=d&&(b.ID==I.INTEGER_MAX?(a.thisFromTop=0>d,a.thisFromBottom=0<d):(a.thisFromTop=b.colY<this.colY,a.thisFromBottom=b.colY>this.colY),a.otherFromTop=!a.thisFromTop,a.otherFromBottom=!a.thisFromBottom,a.thisFromLeft=a.otherFromLeft=!1,a.thisFromRight=a.otherFromRight=
!1);a.thisCollidedWithActor=!0;a.thisCollidedWithTile=b.ID==I.INTEGER_MAX;a.thisCollidedWithSensor=null!=a?f||!g&&!a.maskB.solid:!1;a.thisCollidedWithTerrain=!1;a.otherCollidedWithActor=!0;a.otherCollidedWithTile=b.ID==I.INTEGER_MAX;a.otherCollidedWithSensor=null!=a?!a.maskA.solid:!1;a.otherCollidedWithTerrain=!1}},handleCollisionsSimple:function(){if(0<this.collisionsCount)for(var a=this.simpleCollisions.iterator();a.hasNext();){var b=a.next();null!=b&&1!=b.remove&&(Da.lastCollided=b.otherActor,
h.invokeListeners2(this.collisionListeners,b),this.engine.handleCollision(this,b))}},__class__:Da,__properties__:L(ga.prototype.__properties__,{set_shape:"set_shape",get_shape:"get_shape"})});var tl=function(a,b,c,d){this.ID=a;this.name=b;this.allScenes=c;this.members=d;this.active=!0};n["com.stencyl.models.Atlas"]=tl;tl.__name__=["com","stencyl","models","Atlas"];tl.prototype={__class__:tl};var Nf=function(){};n["com.stencyl.models.Background"]=Nf;Nf.__name__=["com","stencyl","models","Background"];
Nf.prototype={__class__:Nf};var Wi=function(a,b){this.group1=a;this.group2=b};n["com.stencyl.models.CollisionGroupDef"]=Wi;Wi.__name__=["com","stencyl","models","CollisionGroupDef"];Wi.prototype={__class__:Wi};var hc=function(a,b,c){this.ID=a;this.atlasID=c;this.name=b;this.sID=a+","+b};n["com.stencyl.models.Resource"]=hc;hc.__name__=["com","stencyl","models","Resource"];hc.prototype={toString:function(){return this.sID},isAtlasActive:function(){var a;a=na.get().atlases.get(this.atlasID);return null==
a?!1:a.active},loadGraphics:function(){},unloadGraphics:function(){},__class__:hc};var ye=function(a,b,c,d){hc.call(this,a,c,b);this.isDefault=d;this.loadGraphics()};n["com.stencyl.models.Font"]=ye;ye.__name__=["com","stencyl","models","Font"];ye.__super__=hc;ye.prototype=L(hc.prototype,{getHeight:function(){return null!=this.font?this.font.getFontHeight():0},loadGraphics:function(){if(this.isDefault){var a=R.getText("assets/graphics/default-font.fnt"),a=ba.parse(a);ye.defaultFont=this.font=(new sd).loadAngelCode(R.getBitmapData("assets/graphics/default-font.png"),
a);this.fontScale=h.SCALE}else{var a=la.get().resourceAssets.get(this.ID+".fnt"),a=ba.parse(a),b=la.get().getGraphicAsset(this.ID+".png","assets/graphics/"+h.IMG_BASE+"/font-"+this.ID+".png");this.font=(new sd).loadAngelCode(b,a);this.fontScale=1}this.letterSpacing=0},unloadGraphics:function(){this.font=ye.defaultFont;this.fontScale=1;this.letterSpacing=0;la.get().resourceAssets.remove(this.ID+".png")},setLetterSpacing:function(a){this.letterSpacing=a|0},__class__:ye});var na=function(a){this.name=
a.att.resolve("name");this.width=u.parseInt(a.att.resolve("width"));this.height=u.parseInt(a.att.resolve("height"));this.actualWidth=u.parseInt(a.att.resolve("awidth"));this.actualHeight=u.parseInt(a.att.resolve("aheight"));this.scale=u.parseInt(a.att.resolve("scale"));this.defaultSceneID=0;try{this.defaultSceneID=u.parseInt(a.att.resolve("defaultSceneID"))}catch(b){if(Ia.lastException=b,b instanceof F&&(b=b.val),!q.__instanceof(b,String))throw b;}this.shapes=this.readShapes(a.node.resolve("collisions").get_elements());
this.atlases=this.readAtlases(a.node.resolve("atlases").get_elements());this.autotileFormats=this.readAutotileFormats(a.node.resolve("autotileFormats").get_elements());this.groups=this.readGroups(a.node.resolve("groups").get_elements());this.groups.push(new of(na.REGION_ID,"Regions"));this.groups.push(new of(na.PLAYER_ID,"Players"));this.groups.push(new of(na.TERRAIN_ID,"Terrain"));this.groups.push(new of(na.DOODAD_ID,"Doodads"));this.groups.push(new of(na.ACTOR_ID,"Actors"));this.groupsCollidesWith=
new xa;this.collisionGroups=this.readCollisionGroups(a.node.resolve("cgroups").get_elements());na.collisionMap=[];for(var c=0,d=0,e=this.groups;d<e.length;){var f=e[d];++d;c=u["int"](Math.max(f.ID|0,c))}c++;for(d=0;d<c;)for(e=d++,na.collisionMap.push([]),f=0;f<c;)f++,na.collisionMap[e].push(!1);if(h.NO_PHYSICS)for(c=0,d=this.groups;c<d.length;)e=d[c],++c,this.collisionGroups.push(new Wi(e.ID,na.REGION_ID));c=0;for(d=this.collisionGroups;c<d.length;){f=d[c];++c;e=f.group1;f=f.group2;this.groupsCollidesWith.h.hasOwnProperty(e)||
(this.groupsCollidesWith.h[e]=[]);this.groupsCollidesWith.h.hasOwnProperty(f)||(this.groupsCollidesWith.h[f]=[]);if(!h.NO_PHYSICS||0<=e&&0<=f)na.collisionMap[e][f]=!0,na.collisionMap[f][e]=!0;this.groupsCollidesWith.h[e].push(f);this.groupsCollidesWith.h[f].push(e)}this.gameAttributes=na.readGameAttributes(a.node.resolve("attributes").get_elements());la.get().gameXML=null};n["com.stencyl.models.GameModel"]=na;na.__name__=["com","stencyl","models","GameModel"];na.instance=null;na.collisionMap=null;
na.get=function(){null==na.instance&&(na.instance=new na(la.get().gameXML));return na.instance};na.readGameAttributes=function(a){for(var b=new ma;a.hasNext();){var c=a.next(),d=c.get_name();if("number"==d)d=u.parseFloat(c.att.resolve("value")),c=c.att.resolve("name"),null!=Ab[c]?b.setReserved(c,d):b.h[c]=d;else if("text"==d)d=c.att.resolve("value"),c=c.att.resolve("name"),null!=Ab[c]?b.setReserved(c,d):b.h[c]=d;else if("bool"==d||"boolean"==d)d=I.toBoolean(c.att.resolve("value")),c=c.att.resolve("name"),
null!=Ab[c]?b.setReserved(c,d):b.h[c]=d;else if("list"==d){for(var d=[],e=c.get_elements();e.hasNext();){var f=e.next(),g=u.parseInt(f.att.resolve("order"));d[g]=f.att.resolve("value")}c=c.att.resolve("name");null!=Ab[c]?b.setReserved(c,d):b.h[c]=d}else if("map"==d){d=new ma;for(e=c.get_elements();e.hasNext();)g=e.next(),f=g.att.resolve("key"),g=g.att.resolve("value"),d.set(f,g);c=c.att.resolve("name");null!=Ab[c]?b.setReserved(c,d):b.h[c]=d}}return b};na.prototype={loadScenes:function(){this.scenes=
this.readScenes(la.get().sceneListXML)},readScenes:function(a){var b=new xa;for(a=a.get_elements();a.hasNext();){var c=a.next(),d=u.parseInt(c.att.resolve("id")),e=u.parseInt(c.att.resolve("id")),c=new Xi(d,c.att.resolve("name"));b.h[e]=c}la.get().scenesXML=null;la.get().sceneListXML=null;return b},readShapes:function(a){for(var b=new xa;a.hasNext();){for(var c=a.next(),d=c.att.resolve("pts").split("#"),e=[],f=0;f<d.length;){var g=d[f];++f;var k=g.split(","),g=parseFloat(k[0]),k=parseFloat(k[1]);
e.push(new y(3.1*g,3.1*k))}Bc.EnsureCorrectVertexDirection(e);d=new za;d.setAsArray(e,e.length);c=u.parseInt(c.att.resolve("id"));b.h[c]=d}return b},readAtlases:function(a){for(var b=new xa;a.hasNext();){var c=a.next(),d=u.parseInt(c.att.resolve("id")),e=c.att.resolve("name"),f=c.att.resolve("members").split(","),g;g=c.has.resolve("allScenes")?"true"==c.att.resolve("allScenes"):"true"==c.att.resolve("start");var k=[];if(""!=c.att.resolve("members")){for(c=0;c<f.length;){var p=f[c];++c;k.push(u.parseInt(p))}k.pop()}e=
new tl(d,e,g,k);b.h[d]=e}return b},readAutotileFormats:function(a){for(var b=new xa;a.hasNext();){for(var c=a.next(),d=c.att.resolve("name"),e=u.parseInt(c.att.resolve("id")),f=u.parseInt(c.att.resolve("across")),g=u.parseInt(c.att.resolve("down")),k=[],c=c.get_elements();c.hasNext();)for(var p=c.next(),h=p.att.resolve("corners").split(" "),h=new ul(this.readPoint(h[0]),this.readPoint(h[1]),this.readPoint(h[2]),this.readPoint(h[3])),l=0,p=p.att.resolve("flag").split(",");l<p.length;){var m=p[l];++l;
if(-1!=m.indexOf("-"))for(var n=u.parseInt(m.split("-")[0]),m=u.parseInt(m.split("-")[1]),m=m+1;n<m;){var q=n++;k[q]=h}else k[u.parseInt(m)]=h}d=new vl(d,e,f,g,k);b.h[e]=d}return b},readPoint:function(a){a=a.split(",");return new W(u.parseInt(a[0]),u.parseInt(a[1]))},readGroups:function(a){for(var b=[];a.hasNext();){var c=a.next();b.push(new of(u.parseInt(c.att.resolve("id")),c.att.resolve("name")))}return b},readCollisionGroups:function(a){for(var b=[];a.hasNext();){var c=a.next();b.push(new Wi(u.parseInt(c.att.resolve("g1")),
u.parseInt(c.att.resolve("g2"))))}return b},__class__:na};var of=function(a,b){this.ID=a;this.name=b};n["com.stencyl.models.GroupDef"]=of;of.__name__=["com","stencyl","models","GroupDef"];of.prototype={__class__:of};var ja=function(){this.isPressed=!1;this.outerAlphaWhenReleased=this.outerAlphaWhenPressed=this.innerAlphaWhenReleased=this.innerAlphaWhenPressed=1;this.outerImage=this.innerImage=null;this.hideWhenReleased=!1;this.joystickDistance=this.joystickDirection=this.joystickDefaultDirection=
this.joystickType=0;ga.call(this)};n["com.stencyl.models.Joystick"]=ja;ja.__name__=["com","stencyl","models","Joystick"];ja.joystickMap=null;ja.addJoystick=function(a,b,c,d,e,f,g,k,p){null==p&&(p=!1);null==k&&(k=0);null==g&&(g=0);null==f&&(f=0);null==e&&(e=0);null==d&&(d=0);null!=ja.joystickMap&&ja.joystickMap.h.hasOwnProperty(a)&&ja.removeJoystick(a);var w=ua.createEmptyInstance(ja);w.start();w.id=a;w.joystickTouchID=-1;w.joystickDistance=0;w.joystickDirection=0;w.joystickDefaultDirection=0;w.joystickType=
d;w.center=new W(b*h.SCALE,c*h.SCALE);ja.joystickMap.h[a]=w;ja.setJoystickImage(a,!0,"outer-joystick");ja.setJoystickImage(a,!1,"inner-joystick");w.outerAlphaWhenPressed=1;w.outerAlphaWhenReleased=1;w.innerAlphaWhenPressed=1;w.innerAlphaWhenReleased=1;w.joystickType==ja.showWherePressed&&(w.joystickBounds=new ha(e*h.SCALE+ja.viewOffsetX,f*h.SCALE+ja.viewOffsetY,g*h.SCALE,k*h.SCALE));p&&(w.hideWhenReleased=!0,w.outerImage.set_visible(!1),w.innerImage.set_visible(!1))};ja.removeJoystick=function(a){if(ja.joystickMap.h.hasOwnProperty(a)){var b=
ja.joystickMap.h[a],c=h.engine.root;ja.joystickMap.remove(a);c.removeChild(b.outerImage);c.removeChild(b.innerImage)}};ja.getJoystickDisDir=function(a,b){null==b&&(b=!0);var c=0;ja.joystickMap.h.hasOwnProperty(a)&&(c=ja.joystickMap.h[a],c=b?c.joystickDistance:c.joystickDirection);return c};ja.setJoystickCenter=function(a,b,c){ja.joystickMap.h.hasOwnProperty(a)&&(a=ja.joystickMap.h[a],a.center=new W(b*h.SCALE,c*h.SCALE),a.outerImage.set_x(a.center.x-.5*a.outerImage.get_width()),a.outerImage.set_y(a.center.y-
.5*a.outerImage.get_height()),a.innerImage.set_x(a.center.x-.5*a.innerImage.get_width()),a.innerImage.set_y(a.center.y-.5*a.innerImage.get_height()))};ja.getJoystickCenter=function(a,b){null==b&&(b=!0);var c=0;ja.joystickMap.h.hasOwnProperty(a)&&(c=ja.joystickMap.h[a],c=(b?c.center.x:c.center.y)/h.SCALE);return c};ja.setJoystickRadius=function(a,b,c){null==b&&(b=!0);ja.joystickMap.h.hasOwnProperty(a)&&(a=ja.joystickMap.h[a],b&&a.outerRadius!=c*h.SCALE?a.outerRadius=c*h.SCALE:a.innerRadius!=c*h.SCALE&&
(a.innerRadius=c*h.SCALE))};ja.getJoystickRadius=function(a,b){null==b&&(b=!0);var c=0;ja.joystickMap.h.hasOwnProperty(a)&&(c=ja.joystickMap.h[a],c=(b?c.innerRadius:c.outerRadius)/h.SCALE);return c};ja.alwaysHideRJ=function(a){ja.joystickMap.h.hasOwnProperty(a)&&(a=ja.joystickMap.h[a],a.hideWhenReleased=!0,a.outerImage.set_visible(!1),a.innerImage.set_visible(!1))};ja.setDefaultDirection=function(a,b){if(ja.joystickMap.h.hasOwnProperty(a)){var c=ja.joystickMap.h[a];c.joystickDefaultDirection=b;c.joystickDirection=
b}};ja.isJoystickPressed=function(a){return ja.joystickMap.h.hasOwnProperty(a)?ja.joystickMap.h[a].isPressed:!1};ja.setTouchRegionForRJ=function(a,b,c,d,e){null==e&&(e=0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);ja.joystickMap.h.hasOwnProperty(a)&&(a=ja.joystickMap.h[a],a.joystickType==ja.showWherePressed&&(a.joystickBounds=new ha(b*h.SCALE+ja.viewOffsetX,c*h.SCALE+ja.viewOffsetY,d*h.SCALE,e*h.SCALE)))};ja.getTouchRegionPropertyForRJ=function(a,b){if(ja.joystickMap.h.hasOwnProperty(a)){var c=
ja.joystickMap.h[a];if(c.joystickType==ja.showWherePressed)return 1==b?c.joystickBounds.x-ja.viewOffsetX:2==b?c.joystickBounds.y-ja.viewOffsetY:3==b?c.joystickBounds.width/h.SCALE:c.joystickBounds.height/h.SCALE}return 0};ja.setJoystickImage=function(a,b,c){if(ja.joystickMap.h.hasOwnProperty(a)){a=ja.joystickMap.h[a];var d=h.engine.root,e=null,e=1==h.SCALE?R.getBitmapData("assets/data/"+c+".png"):1.5==h.SCALE?R.getBitmapData("assets/data/"+c+"@1.5x.png"):2==h.SCALE?R.getBitmapData("assets/data/"+
c+"@2x.png"):R.getBitmapData("assets/data/"+c+"@4x.png");b?(null!=a.outerImage&&d.removeChild(a.outerImage),a.outerImage=new qb(e),a.outerImage.set_x(a.center.x-.5*a.outerImage.get_width()),a.outerImage.set_y(a.center.y-.5*a.outerImage.get_height()),d.addChild(a.outerImage),a.outerRadius=.5*a.outerImage.get_width()):(null!=a.innerImage&&d.removeChild(a.innerImage),a.innerImage=new qb(e),a.innerImage.set_x(a.center.x-.5*a.innerImage.get_width()),a.innerImage.set_y(a.center.y-.5*a.innerImage.get_height()),
d.addChild(a.innerImage),a.innerRadius=a.outerRadius-.5*a.innerImage.get_width())}};ja.setJoystickAlpha=function(a,b,c,d){null==d&&(d=!0);null==c&&(c=1);null==b&&(b=!0);ja.joystickMap.h.hasOwnProperty(a)&&(a=ja.joystickMap.h[a],b?d?(a.outerAlphaWhenReleased=c,a.outerImage.set_alpha(c)):a.outerAlphaWhenPressed=c:d?(a.innerAlphaWhenReleased=c,a.innerImage.set_alpha(c)):a.innerAlphaWhenPressed=c)};ja.__super__=ga;ja.prototype=L(ga.prototype,{start:function(){ja.initialized||(ja.initialized=!0,ja.joystickMap=
new xa,ja.viewOffsetX=h.screenOffsetX,ja.viewOffsetY=h.screenOffsetY);Ec.get_supportsTouchEvents()?(h.stage.addEventListener("touchBegin",K(this,this.onTouchBegin)),h.stage.addEventListener("touchMove",K(this,this.onTouchMove)),h.stage.addEventListener("touchEnd",K(this,this.onTouchEnd)),Ec.set_inputMode(2)):(h.stage.addEventListener("mouseDown",K(this,this.onMouseDown)),h.stage.addEventListener("mouseMove",K(this,this.onMouseMove)),h.stage.addEventListener("mouseUp",K(this,this.onMouseUp)))},stop:function(){Ec.get_supportsTouchEvents()?
(h.stage.removeEventListener("touchBegin",K(this,this.onTouchBegin)),h.stage.removeEventListener("touchMove",K(this,this.onTouchMove)),h.stage.removeEventListener("touchEnd",K(this,this.onTouchEnd))):(h.stage.removeEventListener("mouseDown",K(this,this.onMouseDown)),h.stage.removeEventListener("mouseMove",K(this,this.onMouseMove)),h.stage.removeEventListener("mouseUp",K(this,this.onMouseUp)));ja.joystickMap=null},onTouchBegin:function(a){this.onBegin(a.stageX,a.stageY,a.touchPointID)},onTouchMove:function(a){this.onMove(a.stageX,
a.stageY,a.touchPointID)},onTouchEnd:function(a){this.onEnd(a.stageX,a.stageY,a.touchPointID)},onMouseDown:function(a){this.onBegin(a.stageX,a.stageY,0)},onMouseMove:function(a){this.onMove(a.stageX,a.stageY,0)},onMouseUp:function(a){this.onEnd(a.stageX,a.stageY,0)},onBegin:function(a,b,c){if(-1==this.joystickTouchID)if(a/=h.screenScaleX,b/=h.screenScaleY,this.outerImage.set_alpha(this.outerAlphaWhenPressed),this.innerImage.set_alpha(this.innerAlphaWhenPressed),this.isPressed=!0,this.joystickType==
ja.fixedCenter){var d=Math.sqrt(Math.pow(this.center.x+ja.viewOffsetX-a,2)+Math.pow(this.center.y+ja.viewOffsetY-b,2)),e=Math.atan2(this.center.y+ja.viewOffsetY-b,this.center.x+ja.viewOffsetX-a);d>this.outerRadius||(d>this.outerRadius-this.innerRadius?(d=this.outerRadius-this.innerRadius,this.innerImage.set_x(this.center.x-Math.cos(e)*(this.outerRadius-this.innerRadius)-.5*this.innerImage.get_width()),this.innerImage.set_y(this.center.y-Math.sin(e)*(this.outerRadius-this.innerRadius)-.5*this.innerImage.get_height())):
(this.innerImage.set_x(a-ja.viewOffsetX-.5*this.innerImage.get_width()),this.innerImage.set_y(b-ja.viewOffsetY-.5*this.innerImage.get_height())),this.joystickTouchID=c,this.joystickDistance=d/(this.outerRadius-this.innerRadius),this.joystickDirection=180*e/3.1415926535+180)}else this.joystickType!=ja.showWherePressed||a<this.joystickBounds.x||a>this.joystickBounds.x+this.joystickBounds.width||b<this.joystickBounds.y||b>this.joystickBounds.y+this.joystickBounds.height||(this.center.x=a-ja.viewOffsetX,
this.center.y=b-ja.viewOffsetY,this.outerImage.set_x(this.center.x-.5*this.outerImage.get_width()),this.outerImage.set_y(this.center.y-.5*this.outerImage.get_height()),this.innerImage.set_x(this.center.x-.5*this.innerImage.get_width()),this.innerImage.set_y(this.center.y-.5*this.innerImage.get_height()),this.hideWhenReleased&&(this.outerImage.set_visible(!0),this.innerImage.set_visible(!0)),this.joystickTouchID=c)},onMove:function(a,b,c){if(c==this.joystickTouchID){a/=h.screenScaleX;b/=h.screenScaleY;
c=Math.sqrt(Math.pow(this.center.x+ja.viewOffsetX-a,2)+Math.pow(this.center.y+ja.viewOffsetY-b,2));var d=Math.atan2(this.center.y+ja.viewOffsetY-b,this.center.x+ja.viewOffsetX-a);c>this.outerRadius-this.innerRadius?(c=this.outerRadius-this.innerRadius,this.innerImage.set_x(this.center.x-Math.cos(d)*(this.outerRadius-this.innerRadius)-.5*this.innerImage.get_width()),this.innerImage.set_y(this.center.y-Math.sin(d)*(this.outerRadius-this.innerRadius)-.5*this.innerImage.get_height())):(this.innerImage.set_x(a-
ja.viewOffsetX-.5*this.innerImage.get_width()),this.innerImage.set_y(b-ja.viewOffsetY-.5*this.innerImage.get_height()));this.joystickDistance=c/(this.outerRadius-this.innerRadius);this.joystickDirection=180*d/3.1415926535+180}},onEnd:function(a,b,c){c==this.joystickTouchID&&(this.joystickTouchID=-1,this.isPressed=!1,this.outerImage.set_alpha(this.outerAlphaWhenReleased),this.innerImage.set_alpha(this.innerAlphaWhenReleased),this.center.x=this.outerImage.get_x()+this.outerRadius,this.center.y=this.outerImage.get_y()+
this.outerRadius,this.innerImage.set_x(this.center.x-.5*this.innerImage.get_width()),this.innerImage.set_y(this.center.y-.5*this.innerImage.get_height()),this.hideWhenReleased&&(this.outerImage.set_visible(!1),this.innerImage.set_visible(!1)),this.joystickDistance=0,this.joystickDirection=this.joystickDefaultDirection)},__class__:ja});var $b=function(a,b,c,d,e){Da.call(this,a,-1,-2,b,c,a.getTopLayer(),h.NO_PHYSICS?e.width:1,h.NO_PHYSICS?e.height:1,null,null,null,null,!1,!1,!1,!1,h.NO_PHYSICS?null:
d[0],0,h.NO_PHYSICS);this.isRegion=this.alwaysSimulate=!0;this.solid=this.isTerrainRegion=!1;this.set_name("Region");this.simpleBounds=e;this.copy=d[0];this.containedActors=new xa;this.whenActorEntersListeners=[];this.whenActorExitsListeners=[];this.justAdded=[];this.justRemoved=[];h.NO_PHYSICS||(this.body.setSleepingAllowed(!0),this.body.setAwake(!1),this.body.setIgnoreGravity(!0));var f=a=0,g=0,k=0;if(h.NO_PHYSICS)f=e.width,k=e.height,this.cacheWidth=this.originalWidth=this.regionWidth=Math.round(Math.abs(a-
f)),this.cacheHeight=this.originalHeight=this.regionHeight=Math.round(Math.abs(g-k)),this.currOffset.x=-(this.cacheWidth/2),this.currOffset.y=-(this.cacheHeight/2),this.resetReal(b*h.physicsScale,c*h.physicsScale);else if(q.__instanceof(d[0],za)){this.isCircle=!1;b=new hd;b.setIdentity();c=new fd;q.__cast(d[0],za).computeAABB(c,b);a=c.lowerBound.x;f=c.upperBound.x;g=c.lowerBound.y;k=c.upperBound.y;e=0;for(var p=d.length;e<p;){var w=e++,l=new ke;l.isSensor=!0;l.userData=this;l.shape=d[w];l.friction=
1;l.density=.1;l.restitution=0;l.groupID=na.INHERIT_ID;this.body.createFixture(l);q.__cast(d[w],za).computeAABB(c,b);a=Math.min(a,c.lowerBound.x);f=Math.max(f,c.upperBound.x);g=Math.min(g,c.lowerBound.y);k=Math.max(k,c.upperBound.y)}this.cacheWidth=this.originalWidth=this.regionWidth=Math.round(h.toPixelUnits(Math.abs(a-f)));this.cacheHeight=this.originalHeight=this.regionHeight=Math.round(h.toPixelUnits(Math.abs(g-k)))}else q.__instanceof(d[0],hb)&&(this.isCircle=!0,this.cacheWidth=this.originalWidth=
this.regionWidth=h.toPixelUnits(2*q.__cast(d[0],hb).m_radius),this.cacheHeight=this.originalHeight=this.regionHeight=h.toPixelUnits(2*q.__cast(d[0],hb).m_radius))};n["com.stencyl.models.Region"]=$b;$b.__name__=["com","stencyl","models","Region"];$b.__super__=Da;$b.prototype=L(Da.prototype,{containsActor:function(a){return null!=a?this.containedActors.h.hasOwnProperty(a.ID):!1},getContainedActors:function(){return this.containedActors},addActor:function(a){if(null!=a&&-1!=a.ID&&!this.containedActors.h.hasOwnProperty(a.ID)){this.containedActors.h[a.ID]=
a.ID;var b=I.indexOf(this.justRemoved,a);-1==b?this.justAdded.push(a):this.justRemoved.splice(b,1)}},removeActor:function(a){null!=a&&-1!=a.ID&&-1==I.indexOf(this.justRemoved,a)&&(this.containedActors.remove(a.ID),this.justRemoved.push(a))},follow:function(a){var b=a.realY+a.cacheHeight/2;this.setX(a.realX+a.cacheWidth/2);this.setY(b)},resetSize:function(){this.setRegionSize(this.originalWidth,this.originalHeight)},setRegionDiameter:function(a){this.setRegionSize(a,a)},setRegionSize:function(a,b){var c=
this.regionWidth,d=this.regionHeight;a=h.toPhysicalUnits(a);b=h.toPhysicalUnits(b);var e;this.isCircle?(e=new hb,e.m_radius=a/2):(e=new za,e.setAsBox(a/2,b/2));var f=new ke;f.isSensor=!0;f.userData=this;f.shape=e;f.groupID=na.INHERIT_ID;if(null!=this.body&&null!=this.body.getFixtureList()){for(;0<this.body.m_fixtureCount;)this.body.DestroyFixture(this.body.getFixtureList());this.body.createFixture(f);this.cacheWidth=this.regionWidth=h.toPixelUnits(a);this.cacheHeight=this.regionHeight=h.toPixelUnits(b)}c=
this.regionWidth-c;d=this.regionHeight-d;this.setLocation(this.getX()+c/2,this.getY()+d/2)},setLocation:function(a,b){this.setX(a+this.regionWidth/2);this.setY(b+this.regionHeight/2)},getWidth:function(){return this.regionWidth},getHeight:function(){return this.regionHeight},isMouseOver:function(){var a=(A.mouseX-h.cameraX)/h.SCALE,b=(A.mouseY-h.cameraY)/h.SCALE,c=this.getX(),d=this.getY();return a>=c&&b>=d&&a<c+this.regionWidth&&b<d+this.regionHeight},innerUpdate:function(a,b){this.clearCollisionInfoList();
if(h.NO_PHYSICS)for(var c=this.containedActors.iterator();c.hasNext();){var d=c.next(),d=h.engine.getActor(d);null==this.HITBOX||null==d||this.HITBOX.collide(d.HITBOX)||this.removeActor(d)}for(;null!=this.justAdded&&0<this.justAdded.length;)c=q.__cast(this.justAdded.pop(),Da),h.invokeListeners2(this.whenActorEntersListeners,c);for(;null!=this.justRemoved&&0<this.justRemoved.length;)c=q.__cast(this.justRemoved.pop(),Da),h.invokeListeners2(this.whenActorExitsListeners,c);null!=this.mouseOverListeners&&
0<this.mouseOverListeners.length&&(c=this.isMouseOver(),0>=this.mouseState&&c?this.mouseState=1:1<=this.mouseState&&c?(this.mouseState=2,A.mousePressed?this.mouseState=3:A.mouseDown&&(this.mouseState=4),A.mouseReleased&&(this.mouseState=5)):0<this.mouseState&&!c?this.mouseState=-1:-1!=this.mouseState||c||(this.mouseState=0),h.invokeListeners2(this.mouseOverListeners,this.mouseState))},__class__:$b});var Xi=function(a,b){this.ID=a;this.name=b};n["com.stencyl.models.Scene"]=Xi;Xi.__name__=["com","stencyl",
"models","Scene"];Xi.prototype={load:function(){var a=new Qd(ba.parse(R.getText("assets/data/scene-"+this.ID+".xml")).firstElement()),b=u.parseInt(a.att.resolve("depth"));this.sceneWidth=u.parseInt(a.att.resolve("width"));this.sceneHeight=u.parseInt(a.att.resolve("height"));this.tileWidth=u.parseInt(a.att.resolve("tilew"));this.tileHeight=u.parseInt(a.att.resolve("tileh"));this.gravityX=u.parseFloat(a.att.resolve("gravx"));this.gravityY=u.parseFloat(a.att.resolve("gravy"));this.animatedTiles=[];this.actors=
this.readActors(a.node.resolve("actors").get_elements());this.behaviorValues=Dd.readBehaviors(a.node.resolve("snippets"));var c="";try{c=a.att.resolve("eventsnippetid")}catch(d){if(Ia.lastException=d,d instanceof F&&(d=d.val),!q.__instanceof(d,String))throw d;}if(""!=c&&(this.eventID=u.parseInt(c),-1<this.eventID)){var e=new ph(this.eventID,new ma);this.behaviorValues.set(c,e)}this.joints=this.readJoints(a.node.resolve("joints").get_elements());this.regions=this.readRegions(a.node.resolve("regions").get_elements());
this.terrainRegions=this.readTerrainRegions(a.node.resolve("terrainRegions").get_elements());this.wireframes=this.readWireframes(a.node.resolve("terrain").get_elements());b=this.readRawLayers(R.getText("assets/data/scene-"+this.ID+".txt"),b);this.layers=this.readAllLayers(a.node.resolve("layers").get_elements(),b);a.hasNode.resolve("atlases")?this.retainsAtlases="true"==a.node.resolve("atlases").att.resolve("retainAtlases"):this.retainsAtlases=!0;this.atlases=this.retainsAtlases?[]:this.readAtlases(a.node.resolve("atlases"))},
unload:function(){this.animatedTiles=this.terrainRegions=this.regions=this.joints=this.wireframes=this.layers=this.behaviorValues=this.actors=this.colorBackground=null},readRegions:function(a){for(var b=new xa;a.hasNext();){var c=a.next(),c=this.readRegion(c);b.h[c.ID]=c}return b},readRegion:function(a){var b=a.att.resolve("type"),c=u.parseInt(a.att.resolve("id")),d=a.att.resolve("name"),e=h.toPhysicalUnits(u.parseFloat(a.att.resolve("x"))),f=h.toPhysicalUnits(u.parseFloat(a.att.resolve("y"))),g=
null;this.shapeList=[];if("box"==b)g=h.toPhysicalUnits(u.parseFloat(a.att.resolve("w"))),b=h.toPhysicalUnits(u.parseFloat(a.att.resolve("h"))),h.NO_PHYSICS?(g=u.parseFloat(a.att.resolve("w")),b=u.parseFloat(a.att.resolve("h")),c=new Xe(this.shapeList,c,d,e,f,0,new ha(0,0,g,b))):(a=new za,a.setAsBox(g/2,b/2),this.shapeList[0]=a,c=new Xe(this.shapeList,c,d,e,f));else if("poly"==b){var g=u.parseFloat(a.att.resolve("w")),b=u.parseFloat(a.att.resolve("h")),k=null;a.has.resolve("pts")&&(k=a.att.resolve("pts"));
if(null==k||h.NO_PHYSICS)return h.NO_PHYSICS?(g=u.parseFloat(a.att.resolve("w")),b=u.parseFloat(a.att.resolve("h")),c=new Xe(this.shapeList,c,d,e,f,0,new ha(0,0,g,b))):(a=new za,a.setAsBox(g/2,b/2),this.shapeList[0]=a,c=new Xe(this.shapeList,c,d,e,f)),c;this.currX=e;this.currY=f;this.currW=g;this.currH=b;a=k.split(",");for(var g=[],b=parseFloat(a[0]),p=k=0;k<b;)g.push(new W(parseFloat(a[p+1]),parseFloat(a[p+2]))),k++,p+=2;(new ub(g)).decompose(K(this,this.addPolygonRegion));c=new Xe(this.shapeList,
c,d,e,f)}else b=h.toPhysicalUnits(u.parseFloat(a.att.resolve("rad"))),h.NO_PHYSICS?(b=u.parseFloat(a.att.resolve("rad")),c=new Xe(this.shapeList,c,d,e,f,0,new ha(0,0,2*b,2*b))):(g=new hb,g.m_radius=b,this.shapeList[0]=g,c=new Xe(this.shapeList,c,d,e,f));return c},addPolygonRegion:function(a){var b=Number.MAX_VALUE,c=Number.MAX_VALUE,d=0,e=0,f=[];f[0]=""+a.points.length;for(var g=0,k=a.points.length;g<k;){var p=g++,b=Math.min(b,a.points[p].x),c=Math.min(c,a.points[p].y),d=Math.min(d,a.points[p].x),
e=Math.min(e,a.points[p].y);f.push(""+a.points[p].x);f.push(""+a.points[p].y)}h.toPhysicalUnits(b);h.toPhysicalUnits(c);a=q.__cast(Bc.createShape("polyregion",f,this.currX,this.currY,this.currW,this.currH),za);this.shapeList.push(a)},addPolygonTerrain:function(a){var b=Number.MAX_VALUE,c=Number.MAX_VALUE,d=0,e=0,f=[];f[0]=""+a.points.length;for(var g=0,k=a.points.length;g<k;){var p=g++,b=Math.min(b,a.points[p].x),c=Math.min(c,a.points[p].y),d=Math.min(d,a.points[p].x),e=Math.min(e,a.points[p].y);
f.push(""+a.points[p].x);f.push(""+a.points[p].y)}h.toPhysicalUnits(b);h.toPhysicalUnits(c);a=q.__cast(Bc.createShape("polyregion",f,this.currX,this.currY,this.currW,this.currH),za);this.shapeList.push(a)},readTerrainRegions:function(a){for(var b=new xa;a.hasNext();){var c=a.next(),c=this.readTerrainRegion(c);b.h[c.ID]=c}return b},readTerrainRegion:function(a){var b=a.att.resolve("type"),c=u.parseInt(a.att.resolve("id")),d=a.att.resolve("name"),e=u.parseInt(a.att.resolve("group")),f=h.toPhysicalUnits(u.parseFloat(a.att.resolve("x"))),
g=h.toPhysicalUnits(u.parseFloat(a.att.resolve("y"))),k=u.parseInt(a.att.resolve("r")),p=u.parseInt(a.att.resolve("g")),w=u.parseInt(a.att.resolve("b")),k=k<<16|p<<8|w,p=null;this.shapeList=[];if("box"==b)b=h.toPhysicalUnits(u.parseFloat(a.att.resolve("w"))),a=h.toPhysicalUnits(u.parseFloat(a.att.resolve("h"))),p=new za,p.setAsBox(b/2,a/2),this.shapeList[0]=p;else if("poly"==b){b=u.parseFloat(a.att.resolve("w"));p=u.parseFloat(a.att.resolve("h"));a=a.att.resolve("pts").split(",");this.currX=f;this.currY=
g;this.currW=b;this.currH=p;for(var b=[],p=parseFloat(a[0]),l=w=0;w<p;)b.push(new W(parseFloat(a[l+1]),parseFloat(a[l+2]))),w++,l+=2;(new ub(b)).decompose(K(this,this.addPolygonTerrain))}else a=h.toPhysicalUnits(u.parseFloat(a.att.resolve("rad"))),p=new hb,p.m_radius=a,this.shapeList[0]=p;return new wl(this.shapeList,c,d,f,g,e,k)},readJoints:function(a){for(var b=new xa;a.hasNext();){var c=a.next(),c=this.readJoint(c);b.h[c.ID]=c}return b},readJoint:function(a){var b=a.get_name(),c=u.parseInt(a.att.resolve("id")),
d=u.parseInt(a.att.resolve("a1")),e=u.parseInt(a.att.resolve("a2")),f=I.toBoolean(a.att.resolve("collide"));return"STICK_JOINT"==b?(b=new Df,b.ID=c,b.actor1=d,b.actor2=e,b.localAnchorA=null,b.localAnchorB=null,b.collideConnected=f,b.dampingRatio=u.parseFloat(a.att.resolve("damping")),b.frequencyHz=u.parseFloat(a.att.resolve("freq")),b):"HINGE_JOINT"==b?(b=new Ef,b.ID=c,b.actor1=d,b.actor2=e,b.localAnchorA=null,b.localAnchorB=null,b.collideConnected=f,b.enableLimit=I.toBoolean(a.att.resolve("limit")),
b.enableMotor=I.toBoolean(a.att.resolve("motor")),b.lowerAngle=u.parseFloat(a.att.resolve("lower")),b.upperAngle=u.parseFloat(a.att.resolve("upper")),b.maxMotorTorque=u.parseFloat(a.att.resolve("torque")),b.motorSpeed=u.parseFloat(a.att.resolve("speed")),b):"SLIDING_JOINT"==b?(b=new Ff,b.ID=c,b.actor1=d,b.actor2=e,b.localAnchorA=null,b.localAnchorB=null,b.collideConnected=f,b.enableLimit=I.toBoolean(a.att.resolve("limit")),b.enableMotor=I.toBoolean(a.att.resolve("motor")),b.lowerTranslation=u.parseFloat(a.att.resolve("lower")),
b.upperTranslation=u.parseFloat(a.att.resolve("upper")),b.maxMotorForce=u.parseFloat(a.att.resolve("force")),b.motorSpeed=u.parseFloat(a.att.resolve("speed")),b.localAxisA.x=u.parseFloat(a.att.resolve("x")),b.localAxisA.y=u.parseFloat(a.att.resolve("y")),b):null},readAllLayers:function(a,b){var c=new Kc(16);for(c.reuseIterator=!0;a.hasNext();){var d=a.next();if("color-bg"==d.get_name()||"grad-bg"==d.get_name())this.colorBackground=q.__cast((new ih).read(0,0,d.get_name(),"",d),Nf);else{var e=u.parseInt(d.att.resolve("id")),
f=d.att.resolve("name"),g=u.parseInt(d.att.resolve("order")),k=u.parseFloat(d.att.resolve("scrollFactorX")),p=u.parseFloat(d.att.resolve("scrollFactorY")),h=u.parseFloat(d.att.resolve("opacity"))/100,l=Ti.get(d.att.resolve("blendMode"));if("layer"==d.get_name()){var m=b.get(e);null==m&&(m=new Rc(e,g,this,u["int"](Math.floor(this.sceneWidth/this.tileWidth)),u["int"](Math.floor(this.sceneHeight/this.tileHeight))));m.set_name(f);e=new Ub(e,f,g,k,p,h,l,m);c.set(e.ID,e)}else"background"==d.get_name()&&
(m=u.parseInt(d.att.resolve("rid")),d="true"==d.att.resolve("customScrollFactor"),e=new sc(e,f,g,k,p,h,l,m,d),c.set(e.ID,e))}}return c},readRawLayers:function(a,b){var c=new Kc(16);c.reuseIterator=!0;if(null!=a)for(var d=a.split("~"),e=0;e<b;){var f=e++,f=this.readRawLayer(d[f]);c.set(f.layerID,f)}return c},readRawLayer:function(a){a=a.split("#");var b=u["int"](Math.floor(this.sceneWidth/this.tileWidth)),c=u["int"](Math.floor(this.sceneHeight/this.tileHeight)),d=u.parseInt(a[0]),e=u.parseInt(a[1]),
c=new Rc(d,e,this,b,c),e=d=0,f=new Yi(this.sceneWidth,this.sceneHeight,this.tileWidth,this.tileHeight);c.grid=f;a=a[2].split("|");for(var g=0,k=a.length;g<k;){var p=g++;if(""!=a[p]&&"E"!=a[p]&&"EMPTY"!=a[p]){var h=a[p].split(",");3<h.length&&h.splice(0,1);var l=u.parseInt(h[0]),p=u.parseInt(h[1]),h=u.parseInt(h[2]),m=null;-1!=l&&(m=q.__cast(la.get().resources.get(l),ld));for(l=0;l<h;){l++;if(null==m||0>p||null==m)c.setTileAt(d,e,null);else{c.setTileAt(d,e,m.tiles[p]);0<=m.tiles[p].collisionID&&f.setTile(e,
d,!0);var n=m.tiles[p];if(null!=n&&1<n.durations.length){for(var r=!1,D=0,t=this.animatedTiles;D<t.length&&!(r=t[D],++D,r=r==n););r||this.animatedTiles.push(n)}}e++;e>=b&&(e=0,d++)}}}return c},readAtlases:function(a){var b=[],c=a.att.resolve("members").split(",");if(""!=a.att.resolve("members"))for(a=0;a<c.length;){var d=c[a];++a;if(""!=d){var e=u.parseInt(d),f=void 0,f=na.get().atlases.get(e);f.allScenes||b.push(u.parseInt(d))}}return b},readWireframes:function(a){for(var b=[];a.hasNext();){var c=
a.next(),d=u.parseFloat(c.att.resolve("x")),e=u.parseFloat(c.att.resolve("y")),c=c.att.resolve("pts").split(",");h.NO_PHYSICS||(c=Bc.createShape("wireframe",c,d,e),b.push(new xl(h.toPhysicalUnits(d),h.toPhysicalUnits(e),c.h[1],c.h[2],c.h[0],null)))}return b},readActors:function(a){for(var b=new xa;a.hasNext();){var c=a.next(),d=this.readActorInstance(c);null!=d&&(c=u.parseInt(c.att.resolve("aid")),b.h[c]=d)}return b},readActorInstance:function(a){var b=u.parseInt(a.att.resolve("aid")),c=u.parseInt(a.att.resolve("x")),
d=u.parseInt(a.att.resolve("y")),e=1,f=1;try{e=u.parseFloat(a.att.resolve("sx")),f=u.parseFloat(a.att.resolve("sy"))}catch(g){if(Ia.lastException=g,g instanceof F&&(g=g.val),!q.__instanceof(g,String))throw g;}var k=u.parseInt(a.att.resolve("z")),p=u.parseInt(a.att.resolve("a")),h=u.parseInt(a.att.resolve("group")),l=u.parseInt(a.att.resolve("id")),m=I.toBoolean(a.att.resolve("c")),n=null;m&&(n=Dd.readBehaviors(a.node.resolve("snippets")));if(0==e||0==f)f=e=1;m||(n=null);if(null==la.get().resources.get(l))return null;
a=new Mi(b,c,d,e,f,k,p,h,l,n,m);null!=a.actorType&&(a.groupID=a.actorType.groupID);return a},getID:function(){return this.ID},__class__:Xi};var Kf=function(a,b,c,d,e,f,g){hc.call(this,a,b,-1);this.streaming=c;this.looping=d;this.panning=e;this.volume=f;this.ext=g;this.ext="ogg";this.loadGraphics()};n["com.stencyl.models.Sound"]=Kf;Kf.__name__=["com","stencyl","models","Sound"];Kf.__super__=hc;Kf.prototype=L(hc.prototype,{loadGraphics:function(){this.streaming||(this.src=R.getSound("assets/sfx/sound-"+
this.ID+"."+this.ext,!1))},unloadGraphics:function(){this.streaming||(null!=this.src&&(this.stopInstances(),this.src.close()),this.src=null)},play:function(a,b){null==b&&(b=0);this.streaming&&(this.src=R.getSound("assets/music/sound-"+this.ID+"."+this.ext,!1));return null==this.src?null:this.src.play(b)},loop:function(a,b){null==b&&(b=0);this.streaming&&(this.src=R.getSound("assets/music/sound-"+this.ID+"."+this.ext,!1));return null==this.src?null:this.src.play(b,I.INTEGER_MAX)},stopInstances:function(){for(var a=
0,b=l.CHANNELS;a<b;){var c=a++,c=h.engine.channels[c];c.currentSource==this.src&&c.stopSound()}},__class__:Kf});var we=function(a,b){this.currentClip=this.currentSound=null;this.looping=!1;this.volume=1;this.position=0;this.channelNum=b;this.engine=a;this.transform=new ze};n["com.stencyl.models.SoundChannel"]=we;we.__name__=["com","stencyl","models","SoundChannel"];we.prototype={playSound:function(a){null!=this.currentSound&&this.currentSound.stop();if(null!=a){a.volume=this.volume*we.masterVolume;
this.currentClip=a;this.currentSound=a.play(this.channelNum);if(null==this.currentSound)return this.currentClip=null;this.setVolume(this.volume);this.currentSound.addEventListener("soundComplete",K(this,this.stopped))}this.position=0;null!=a&&(this.currentSource=a.src);this.looping=!1;return this.currentSound},loopSound:function(a){null!=this.currentSound&&this.currentSound.stop();if(null!=a){a.volume=this.volume*we.masterVolume;this.currentClip=a;this.currentSound=a.loop(this.channelNum);if(null==
this.currentSound)return this.currentClip=null;this.setVolume(this.volume);this.currentSound.addEventListener("soundComplete",K(this,this.stopped))}this.position=0;null!=a&&(this.currentSource=a.src);this.looping=!0;return this.currentSound},setPause:function(a){null!=this.currentSound&&(a?(this.currentSound.removeEventListener("soundComplete",K(this,this.looped)),this.position=this.currentSound.get_position(),this.currentSound.stop()):null!=this.currentSource&&(this.currentSound=this.currentClip.play(this.channelNum,
this.position),this.currentSound.set_soundTransform(this.transform),this.looping&&this.currentSound.addEventListener("soundComplete",K(this,this.looped))))},looped:function(a){null!=this.currentSound&&this.currentSound.removeEventListener("soundComplete",K(this,this.looped));this.loopSound(this.currentClip)},stopped:function(a){null!=this.currentSound&&this.currentSound.removeEventListener("soundComplete",K(this,this.stopped));h.engine.soundFinished(this.channelNum)},stopSound:function(){null!=this.currentSound&&
(this.currentSound.stop(),this.position=0,this.currentSound=this.currentSource=null)},fadeInSound:function(a){if(null!=this.currentSound)ea.tween(this.transform,a,{volume:1}).onUpdate(K(this,this.onUpdate))},fadeOutSound:function(a){if(null!=this.currentSound)ea.tween(this.transform,a,{volume:0}).onUpdate(K(this,this.onUpdate))},onUpdate:function(){null!=this.currentSound&&this.currentSound.set_soundTransform(this.transform)},setVolume:function(a){this.volume=a;null!=this.currentSound&&(this.transform.volume=
a*we.masterVolume,this.currentSound.set_soundTransform(this.transform))},__class__:we};var Te=function(a,b,c,d,e,f){null==f&&(f=0);Da.call(this,a,-1,e,b,c,a.getTopLayer(),1,1,null,null,null,null,!1,!0,!1,!1,d[0]);0==f&&(f=0);this.fillColor=f;this.alwaysSimulate=!0;this.isRegion=!1;this.isTerrainRegion=!0;this.copy=d[0];this.body.setSleepingAllowed(!0);this.body.setAwake(!1);this.body.setIgnoreGravity(!0);f=c=b=a=0;if(q.__instanceof(d[0],za)){this.isCircle=!1;var g=new hd;g.setIdentity();var k=new fd;
q.__cast(d[0],za).computeAABB(k,g);a=k.lowerBound.x;b=k.upperBound.x;c=k.lowerBound.y;f=k.upperBound.y;for(var p=0,w=d.length;p<w;){var l=p++,m=new ke;m.isSensor=!1;m.userData=this;m.shape=d[l];m.friction=1;m.density=.1;m.restitution=0;m.groupID=e;this.body.createFixture(m);q.__cast(d[l],za).computeAABB(k,g);a=Math.min(a,k.lowerBound.x);b=Math.max(b,k.upperBound.x);c=Math.min(c,k.lowerBound.y);f=Math.max(f,k.upperBound.y)}this.originalWidth=this.regionWidth=Math.round(h.toPixelUnits(Math.abs(a-b)));
this.originalHeight=this.regionHeight=Math.round(h.toPixelUnits(Math.abs(c-f)))}else q.__instanceof(d[0],hb)&&(this.isCircle=!0,this.originalWidth=this.regionWidth=h.toPixelUnits(2*q.__cast(d[0],hb).m_radius),this.originalHeight=this.regionHeight=h.toPixelUnits(2*q.__cast(d[0],hb).m_radius))};n["com.stencyl.models.Terrain"]=Te;Te.__name__=["com","stencyl","models","Terrain"];Te.__super__=Da;Te.prototype=L(Da.prototype,{follow:function(a){var b=a.realY+a.cacheHeight/2;this.setX(a.realX+a.cacheWidth/
2);this.setY(b)},resetSize:function(){this.setRegionSize(this.originalWidth,this.originalHeight)},setRegionDiameter:function(a){this.setRegionSize(a,a)},setRegionSize:function(a,b){var c=this.regionWidth,d=this.regionHeight;a=h.toPhysicalUnits(a);b=h.toPhysicalUnits(b);var e;this.isCircle?(e=new hb,e.m_radius=a/2):(e=new za,e.setAsBox(a/2,b/2));var f=new ke;f.isSensor=!0;f.userData=this;f.shape=e;if(null!=this.body&&null!=this.body.getFixtureList()){for(;0<this.body.m_fixtureCount;)this.body.DestroyFixture(this.body.getFixtureList());
this.body.createFixture(f);this.regionWidth=h.toPixelUnits(a);this.regionHeight=h.toPixelUnits(b)}c=this.regionWidth-c;d=this.regionHeight-d;this.setLocation(this.getX()+c/2,this.getY()+d/2)},setLocation:function(a,b){this.setX(a+this.regionWidth/2);this.setY(b+this.regionHeight/2)},getWidth:function(){return this.regionWidth},getHeight:function(){return this.regionHeight},getFillColor:function(){return this.fillColor},__class__:Te});var Od=function(a,b,c,d,e,f,g,k,p,h,l){hc.call(this,a,c,b);this.groupID=
d;this.spriteID=e;this.behaviorValues=f;this.bodyDef=g;this.physicsMode=k;this.autoScale=p;this.pausable=h;this.ignoreGravity=l};n["com.stencyl.models.actor.ActorType"]=Od;Od.__name__=["com","stencyl","models","actor","ActorType"];Od.__super__=hc;Od.prototype=L(hc.prototype,{toString:function(){return this.name},loadGraphics:function(){la.get().resources.get(this.spriteID).loadGraphics()},unloadGraphics:function(){la.get().resources.get(this.spriteID).unloadGraphics()},__class__:Od});var sl=function(){};
n["com.stencyl.models.actor.AngleHolder"]=sl;sl.__name__=["com","stencyl","models","actor","AngleHolder"];sl.prototype={__class__:sl};var Ue=function(a,b,c,d,e,f,g,k,p,h,l,m,n,q,D,u){this.sharedTimer=this.sharedFrameIndex=0;this.animID=a;this.animName=b;this.parentID=c;this.simpleShapes=d;this.physicsShapes=e;this.looping=f;this.sync=g;this.durations=m;this.imgWidth=k;this.imgHeight=p;this.frameCount=n;this.framesAcross=q;this.framesDown=D;this.originX=h;this.originY=l;a=na.get().atlases.get(u);null!=
a&&a.active&&this.loadGraphics();1<n&&f&&Ue.allAnimations.push(this)};n["com.stencyl.models.actor.Animation"]=Ue;Ue.__name__=["com","stencyl","models","actor","Animation"];Ue.updateAll=function(a){for(var b=0,c=Ue.allAnimations;b<c.length;){var d=c[b];++b;d.update(a)}};Ue.prototype={loadGraphics:function(){this.imgData=la.get().getGraphicAsset(this.parentID+"-"+this.animID+".png","assets/graphics/"+h.IMG_BASE+"/sprite-"+this.parentID+"-"+this.animID+".png")},unloadGraphics:function(){this.imgData=
new Ba(this.framesAcross,this.framesDown);la.get().resourceAssets.remove(this.parentID+"-"+this.animID+".png")},update:function(a){this.sharedTimer+=a;1<this.frameCount&&this.sharedTimer>this.durations[this.sharedFrameIndex]&&(this.sharedTimer-=this.durations[this.sharedFrameIndex],this.sharedFrameIndex++,this.sharedFrameIndex>=this.frameCount&&(this.looping?this.sharedFrameIndex=0:this.sharedFrameIndex--))},__class__:Ue};var fc=function(){this.points=[];this.bounds=new ha;this.clear()};n["com.stencyl.models.actor.Collision"]=
fc;fc.__name__=["com","stencyl","models","actor","Collision"];fc.addResponse=function(a,b,c){if(null==fc.collisionResponses.h[a.groupID]){var d=new xa;fc.collisionResponses.h[a.groupID]=d}null==fc.collisionResponses.h[b.groupID]&&(d=new xa,fc.collisionResponses.h[b.groupID]=d);fc.collisionResponses.h[a.groupID].set(b.groupID,c);fc.collisionResponses.h[b.groupID].set(a.groupID,c)};fc.get=function(){return 0<fc.recycledCollisions.length?fc.recycledCollisions.pop():new fc};fc.recycle=function(a){a.clear();
fc.recycledCollisions.push(a)};fc.prototype={clear:function(){for(;0<this.points.length;)this.points.pop();this.remove=this.solidCollision=this.useBounds=this.otherCollidedWithTerrain=this.otherCollidedWithSensor=this.otherCollidedWithTile=this.otherCollidedWithActor=this.otherFromRight=this.otherFromBottom=this.otherFromLeft=this.otherFromTop=this.thisCollidedWithTerrain=this.thisCollidedWithSensor=this.thisCollidedWithTile=this.thisCollidedWithActor=this.thisFromRight=this.thisFromBottom=this.thisFromLeft=
this.thisFromTop=!1;this.linkedCollision=this.maskA=this.maskB=this.actorB=this.actorA=this.otherShape=this.thisShape=this.otherActor=this.thisActor=null;this.bounds.setEmpty()},switchData:function(a){if(null==a)return null;a.thisActor=this.otherActor;a.thisShape=this.otherShape;a.thisFromTop=this.otherFromTop;a.thisFromLeft=this.otherFromLeft;a.thisFromBottom=this.otherFromBottom;a.thisFromRight=this.otherFromRight;a.thisCollidedWithActor=this.otherCollidedWithActor;a.thisCollidedWithTile=this.otherCollidedWithTile;
a.thisCollidedWithSensor=this.otherCollidedWithSensor;a.thisCollidedWithTerrain=this.otherCollidedWithTerrain;a.otherActor=this.thisActor;a.otherShape=this.thisShape;a.otherFromTop=this.thisFromTop;a.otherFromLeft=this.thisFromLeft;a.otherFromBottom=this.thisFromBottom;a.otherFromRight=this.thisFromRight;a.otherCollidedWithActor=this.thisCollidedWithActor;a.otherCollidedWithTile=this.thisCollidedWithTile;a.otherCollidedWithSensor=this.thisCollidedWithSensor;a.otherCollidedWithTerrain=this.thisCollidedWithTerrain;
a.actorA=this.actorA;a.actorB=this.actorB;a.points=this.points;a.useBounds=this.useBounds;a.maskA=this.maskA;a.maskB=this.maskB;a.solidCollision=this.solidCollision;a.groupA=this.groupA;a.groupB=this.groupB;a.linkedCollision=this;return this.linkedCollision=a},__class__:fc};var Vi=function(a,b,c,d){this.x=a;this.y=b;this.normalX=c;this.normalY=d};n["com.stencyl.models.actor.CollisionPoint"]=Vi;Vi.__name__=["com","stencyl","models","actor","CollisionPoint"];Vi.prototype={__class__:Vi};var Li=function(a,
b){this.name=b;this.ID=a;this.sID="[Group "+a+","+b+"]";this.list=[]};n["com.stencyl.models.actor.Group"]=Li;Li.__name__=["com","stencyl","models","actor","Group"];Li.prototype={addChild:function(a){this.list.push(a)},removeChild:function(a){},toString:function(){return this.sID},__class__:Li};var Hf=function(a,b,c,d,e,f){hc.call(this,a,c,b);this.width=d;this.height=e;this.defaultAnimation=f;this.animations=new xa};n["com.stencyl.models.actor.Sprite"]=Hf;Hf.__name__=["com","stencyl","models","actor",
"Sprite"];Hf.__super__=hc;Hf.prototype=L(hc.prototype,{loadGraphics:function(){for(var a=this.animations.iterator();a.hasNext();)a.next().loadGraphics()},unloadGraphics:function(){for(var a=this.animations.iterator();a.hasNext();)a.next().unloadGraphics()},__class__:Hf});var Fd=function(a){hc.call(this,0,"Color Background",-1);this.bgColor=a;a==Fd.WHITE&&(this.bgColor=16777215)};n["com.stencyl.models.background.ColorBackground"]=Fd;Fd.__name__=["com","stencyl","models","background","ColorBackground"];
Fd.__interfaces__=[Nf];Fd.__super__=hc;Fd.prototype=L(hc.prototype,{update:function(){},draw:function(a,b,c,d,e){this.bgColor!=Fd.TRANSPARENT&&(a.clear(),a.beginFill(this.bgColor),a.drawRect(0,0,d,e),a.endFill())},__class__:Fd});var lg=function(a,b){hc.call(this,0,"Gradient Background",-1);this.topColor=a;this.bottomColor=b};n["com.stencyl.models.background.GradientBackground"]=lg;lg.__name__=["com","stencyl","models","background","GradientBackground"];lg.__interfaces__=[Nf];lg.__super__=hc;lg.prototype=
L(hc.prototype,{update:function(){},draw:function(a,b,c,d,e){b=[this.topColor,this.bottomColor];c=new Oa;c.createGradientBox(d,e,Math.PI/2,0,0);a.clear();a.beginGradientFill(0,b,[100,100],[0,255],c,0);a.drawRect(0,0,d,e);a.endFill()},__class__:lg});var Ud=function(a,b,c,d,e,f,g){hc.call(this,a,c,b);this.parallaxX=e;this.parallaxY=f;this.durations=d;this.repeats=g;this.currFrame=this.currTime=0;this.isAtlasActive()&&this.loadGraphics();this.repeated=!1};n["com.stencyl.models.background.ImageBackground"]=
Ud;Ud.__name__=["com","stencyl","models","background","ImageBackground"];Ud.__interfaces__=[Nf];Ud.__super__=hc;Ud.prototype=L(hc.prototype,{update:function(){},draw:function(a,b,c,d,e){},drawRepeated:function(a,b,c){a=this.img.width;var d=this.img.height,e=new ha(0,0,a,d);if(!(a>=b&&d>=c)){a<b&&(b+=(a|0)-b%(a|0));d<c&&(c+=(d|0)-c%(d|0));var f=new Ba(u["int"](Math.max(b,a)),u["int"](Math.max(c,d))),g=0;for(c=(c/d|0)+1;g<c;)for(var k=g++,p=0,h=(b/a|0)+1;p<h;){var l=p++;f.copyPixels(this.img,e,new W(l*
a,k*d))}this.img=f}this.repeated=!0},loadGraphics:function(){var a=[],b=this.durations.length;if(0<b)for(var c=0;c<b;){var d=c++;a.push(la.get().getGraphicAsset(this.ID+"-"+d+".png","assets/graphics/"+h.IMG_BASE+"/background-"+this.ID+"-"+d+".png"))}else a.push(la.get().getGraphicAsset(this.ID+"-0.png","assets/graphics/"+h.IMG_BASE+"/background-"+this.ID+"-0.png"));this.frames=[];b=0;for(c=a.length;b<c;)d=b++,this.repeats?(this.img=a[d],this.drawRepeated(null,h.screenWidth*h.SCALE|0,h.screenHeight*
h.SCALE|0),this.frames.push(this.img)):this.frames.push(a[d]);this.img=this.frames[0]},unloadGraphics:function(){this.img=new Ba(1,1);this.currFrame=0;this.repeated=!1;this.frames=[];for(var a=0,b=this.durations;a<b.length;)++a,this.frames.push(this.img);a=this.durations.length;if(0<a)for(b=0;b<a;){var c=b++;la.get().resourceAssets.remove(this.ID+"-"+c+".png")}else la.get().resourceAssets.remove(this.ID+"-0.png")},__class__:Ud});var nf=function(a,b,c,d,e,f,g,k,p){Ud.call(this,a,b,c,d,e,f,g);this.xVelocity=
k;this.yVelocity=p};n["com.stencyl.models.background.ScrollingBackground"]=nf;nf.__name__=["com","stencyl","models","background","ScrollingBackground"];nf.__interfaces__=[Nf];nf.__super__=Ud;nf.prototype=L(Ud.prototype,{update:function(){},draw:function(a,b,c,d,e){},__class__:nf});var Ye=function(){this.reset()};n["com.stencyl.models.collision.CollisionInfo"]=Ye;Ye.__name__=["com","stencyl","models","collision","CollisionInfo"];Ye.getCollisionInfo=function(){return 0<Ye.infoArray.length?Ye.infoArray.pop():
new Ye};Ye.recycle=function(a){Ye.infoArray.push(a)};Ye.prototype={reset:function(){this.max=this.min=0;this.maskA=this.maskB=null;this.solidCollision=!0},__class__:Ye};var oe=function(){this.collideTypes=[];this.solid=!0;this._class=ua.getClassName(q.getClass(this));this._check=new ma;var a=ua.getClassName(oe);this._check.set(a,K(this,this.collideMask));a=ua.getClassName(pg);this._check.set(a,K(this,this.collideMasklist));this.lastBounds=new ha;this.lastColID=-1};n["com.stencyl.models.collision.Mask"]=
oe;oe.__name__=["com","stencyl","models","collision","Mask"];oe.prototype={collide:function(a){if(null==this.parent)throw new F("Mask must be attached to a parent Entity");var b=this._check.get(a._class);if(null!=b)return b(a);b=a._check.get(this._class);return null!=b?b(this):!1},collideMask:function(a){return this.parent.colX+this.parent.cacheWidth>a.parent.colX&&this.parent.colY+this.parent.cacheHeight>a.parent.colY&&this.parent.colX<a.parent.colX+a.parent.cacheWidth&&this.parent.colY<a.parent.colY+
a.parent.cacheHeight?(this.lastBounds.x=this.parent.colX,this.lastBounds.y=this.parent.colY,this.lastBounds.width=this.parent.cacheWidth,this.lastBounds.height=this.parent.cacheHeight,this.lastCheckedMask=this,!0):!1},collideMasklist:function(a){return a.collide(this)},assignTo:function(a){this.parent=a;null!=a&&this.update()},debugDraw:function(a,b,c){},update:function(){},projectMask:function(a,b){var c,d=-9999999999,e=9999999999;c=-this.parent.originX*a.x-this.parent.originY*a.y;c<e&&(e=c);c>d&&
(d=c);c=(-this.parent.originX+this.parent.cacheWidth)*a.x-this.parent.originY*a.y;c<e&&(e=c);c>d&&(d=c);c=-this.parent.originX*a.x+(-this.parent.originY+this.parent.cacheHeight)*a.y;c<e&&(e=c);c>d&&(d=c);c=(-this.parent.originX+this.parent.cacheWidth)*a.x+(-this.parent.originY+this.parent.cacheHeight)*a.y;c<e&&(e=c);c>d&&(d=c);b.min=e;b.max=d},__class__:oe};var Fb=function(a,b,c,d,e,f){null==f&&(f=0);null==e&&(e=!0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=1);null==a&&(a=1);oe.call(this);this.lastBounds.width=
this._width=a;this.lastBounds.height=this._height=b;this._x=c;this._y=d;this.solid=e;this.groupID=f;a=ua.getClassName(Fb);this._check.set(a,K(this,this.collideHitbox))};n["com.stencyl.models.collision.Hitbox"]=Fb;Fb.__name__=["com","stencyl","models","collision","Hitbox"];Fb.__super__=oe;Fb.prototype=L(oe.prototype,{clone:function(){return new Fb(this._width,this._height,this._x,this._y,this.solid,this.groupID)},collideMask:function(a){return this.parent.colX+this._x+this._width>a.parent.colX&&this.parent.colY+
this._y+this._height>a.parent.colY&&this.parent.colX+this._x<a.parent.colX+a.parent.cacheWidth&&this.parent.colY+this._y<a.parent.colY+a.parent.cacheHeight?(this.lastBounds.x=this.parent.colX+this.parent.cacheWidth,this.lastBounds.y=this.parent.colY+this.parent.cacheHeight,this.lastBounds.width=this.parent.cacheWidth,this.lastBounds.height=this.parent.cacheHeight,this.lastCheckedMask=this,!0):!1},collideHitbox:function(a){return this.parent.colX+this._x+this._width>a.parent.colX+a._x&&this.parent.colY+
this._y+this._height>a.parent.colY+a._y&&this.parent.colX+this._x<a.parent.colX+a._x+a._width&&this.parent.colY+this._y<a.parent.colY+a._y+a._height?(this.lastBounds.x=this.parent.colX+this._x,this.lastBounds.y=this.parent.colY+this._y,this.lastBounds.width=this._width,this.lastBounds.height=this._height,this.lastCheckedMask=this,!0):!1},get_x:function(){return this._x},set_x:function(a){if(this._x==a)return a;this._x=a;null!=this.list?this.list.update():null!=this.parent&&this.update();return this._x},
get_y:function(){return this._y},set_y:function(a){if(this._y==a)return a;this._y=a;null!=this.list?this.list.update():null!=this.parent&&this.update();return this._y},get_width:function(){return this._width},set_width:function(a){if(this._width==a)return a;this._width=a;null!=this.list?this.list.update():null!=this.parent&&this.update();return this._width},get_height:function(){return this._height},set_height:function(a){if(this._height==a)return a;this._height=a;null!=this.list?this.list.update():
null!=this.parent&&this.update();return this._height},update:function(){null!=this.parent&&null!=this.list&&this.list.update()},__class__:Fb,__properties__:{set_height:"set_height",get_height:"get_height",set_width:"set_width",get_width:"get_width",set_y:"set_y",get_y:"get_y",set_x:"set_x",get_x:"get_x"}});var Yi=function(a,b,c,d,e,f){null==f&&(f=0);null==e&&(e=0);Fb.call(this);if(0==a||0==b||0==c||0==d)throw new F("Illegal Grid, sizes cannot be 0.");this._rect=I.rect;this._point=I.point;this._point2=
I.point2;this.columns=a/c|0;this.rows=b/d|0;this._tile=new ha(0,0,c,d);this._x=e;this._y=f;this._width=a;this._height=b;this.usePositions=!1;this.groupID=na.TERRAIN_ID;a=ua.getClassName(oe);this._check.set(a,K(this,this.collideMask));a=ua.getClassName(Fb);this._check.set(a,K(this,this.collideHitbox));a=ua.getClassName(th);this._check.set(a,K(this,this.collidePixelmask));this.data=[];a=0;for(b=this.rows;a<b;)a++,this.data.push([])};n["com.stencyl.models.collision.Grid"]=Yi;Yi.__name__=["com","stencyl",
"models","collision","Grid"];Yi.__super__=Fb;Yi.prototype=L(Fb.prototype,{setTile:function(a,b,c){null==c&&(c=!0);null==b&&(b=0);null==a&&(a=0);0>a||a>this.columns-1||0>b||b>this.rows-1||(this.usePositions&&(a=a/this._tile.width|0,b=b/this._tile.height|0),this.data[b][a]=c)},clearTile:function(a,b){null==b&&(b=0);null==a&&(a=0);this.setTile(a,b,!1)},checkTile:function(a,b){return 0>a||a>this.columns-1||0>b||b>this.rows-1?!1:!0},getTile:function(a,b){null==b&&(b=0);null==a&&(a=0);if(0>a||a>this.columns-
1||0>b||b>this.rows-1)return!1;this.usePositions&&(a=a/this._tile.width|0,b=b/this._tile.height|0);return this.data[b][a]},setRect:function(a,b,c,d,e){null==e&&(e=!0);null==d&&(d=1);null==c&&(c=1);null==b&&(b=0);null==a&&(a=0);this.usePositions&&(a=a/this._tile.width|0,b=b/this._tile.height|0,c=c/this._tile.width|0,d=d/this._tile.height|0);var f=b;for(b+=d;f<b;){d=f++;for(var g=a,k=a+c;g<k;){var p=g++;this.setTile(p,d,e)}}},clearRect:function(a,b,c,d){null==d&&(d=1);null==c&&(c=1);null==b&&(b=0);
null==a&&(a=0);this.setRect(a,b,c,d,!1)},get_tileWidth:function(){return this._tile.width|0},get_tileHeight:function(){return this._tile.height|0},collideMask:function(a){var b,c;this._rect.x=a.parent.colX-this.parent.colX;this._rect.y=a.parent.colY-this.parent.colY;b=((this._rect.x+a.parent.cacheWidth-1)/this._tile.width|0)+1;c=((this._rect.y+a.parent.cacheHeight-1)/this._tile.height|0)+1;a=this._rect.x/this._tile.width|0;for(var d=this._rect.y/this._tile.height|0;d<c;)for(var e=d++,f=a;f<b;){var g=
f++;if(this.getTile(g,e))return!0}return!1},collideHitbox:function(a){var b,c,d;this._rect.x=a.parent.colX+a._x;this._rect.y=a.parent.colY+a._y;c=((this._rect.x+a._width-1)/this._tile.width|0)+1;d=((this._rect.y+a._height-1)/this._tile.height|0)+1;b=this._rect.x/this._tile.width|0;for(var e=this._rect.y/this._tile.height|0;e<d;)for(var f=e++,g=b;g<c;){var k=g++;if(this.getTile(k,f))return this.lastBounds.x=k*this._tile.width,this.lastBounds.y=f*this._tile.height,this.lastBounds.width=this._tile.width,
this.lastBounds.height=this._tile.height,a.lastColID=this.groupID,!0}return!1},collidePixelmask:function(a){return!1},squareProjection:function(a,b){a.x<a.y?(b.x=a.x,b.y=a.y):(b.y=a.x,b.x=a.y)},__class__:Yi,__properties__:L(Fb.prototype.__properties__,{get_tileHeight:"get_tileHeight",get_tileWidth:"get_tileWidth"})});var pg=function(a,b){this._count=0;Fb.call(this);this._masks=[];this._temp=[];this.solid=!1;this.parent=b;for(var c=0;c<a.length;){var d=a[c];++c;this.add(d)}};n["com.stencyl.models.collision.Masklist"]=
pg;pg.__name__=["com","stencyl","models","collision","Masklist"];pg.__super__=Fb;pg.prototype=L(Fb.prototype,{collide:function(a){for(var b=0,c=this._masks;b<c.length;){var d=c[b];++b;d.groupID=d.groupID==na.INHERIT_ID?d.parent.groupID:d.groupID;if((q.__instanceof(a,pg)||-2==a.groupID||na.collisionMap[d.groupID][a.groupID])&&d.collide(a))return this.lastBounds.x=d.lastBounds.x,this.lastBounds.y=d.lastBounds.y,this.lastBounds.width=d.lastBounds.width,this.lastBounds.height=d.lastBounds.height,this.lastCheckedMask=
d,this.lastColID=a.groupID,!0}return!1},collideMasklist:function(a){for(var b=0,c=this._masks;b<c.length;){var d=c[b];++b;d.groupID=d.groupID==na.INHERIT_ID?d.parent.groupID:d.groupID;for(var e=0,f=a._masks;e<f.length;){var g=f[e];++e;g.groupID=g.groupID==na.INHERIT_ID?g.parent.groupID:g.groupID;if(d.collide(g))return a.lastBounds.x=g.lastBounds.x,a.lastBounds.y=g.lastBounds.y,a.lastBounds.width=g.lastBounds.width,a.lastBounds.height=g.lastBounds.height,a.lastCheckedMask=g,a.lastColID=d.groupID,!0}}return!0},
add:function(a){this._masks[this._count++]=a;a.list=this;a.parent=this.parent;this.solid=this.solid||a.solid;this.update();a.groupID=a.groupID==na.INHERIT_ID?this.parent.groupID:a.groupID;var b;b=na.get().groupsCollidesWith.get(a.groupID);if(null!=b)for(var c=0;c<b.length;){var d=b[c];++c;I.contains(this.collideTypes,d)||this.collideTypes.push(d)}return a},remove:function(a){if(0>Wg.indexOf(this._masks,a))return a;for(var b=this._temp.length=0,c=this._masks;b<c.length;){var d=c[b];++b;d==a?(a.list=
null,a.parent=null,this._count--,this.update()):this._temp[this._temp.length]=d}b=this._masks;this._masks=this._temp;this._temp=b;return a},removeAt:function(a){null==a&&(a=0);this._temp.length=0;var b=this._masks.length;for(a%=b;0<b--;)b==a?(this._masks[a].list=null,this._count--,this.update()):this._temp[this._temp.length]=this._masks[a];a=this._masks;this._masks=this._temp;this._temp=a},removeAll:function(){for(var a=0,b=this._masks;a<b.length;){var c=b[a];++a;c.list=null}this._count=0;this._masks.length=
0;this._temp.length=0;this.update()},getMask:function(a){null==a&&(a=0);return this._masks[a%this._masks.length]},assignTo:function(a){for(var b=0,c=this._masks;b<c.length;){var d=c[b];++b;d.parent=a}Fb.prototype.assignTo.call(this,a)},update:function(){for(var a=1E5,b=1E5,c=0,d=0,e,f=this._count;0<f--;)null!=(e=q.__cast(this._masks[f],Fb))&&(e._x<b&&(b=e._x),e._y<a&&(a=e._y),e._x+e._width>c&&(c=e._x+e._width),e._y+e._height>d&&(d=e._y+e._height));this._x=b;this._y=a;this._width=c-b;this._height=
d-a;Fb.prototype.update.call(this)},get_count:function(){return this._count},__class__:pg,__properties__:L(Fb.prototype.__properties__,{get_count:"get_count"})});var th=function(a,b,c){null==c&&(c=0);null==b&&(b=0);Fb.call(this);q.__instanceof(a,Ba)&&(this._data=a);if(null==this._data)throw new F("Invalid Pixelmask source image.");this.threshold=1;this._rect=I.rect;this._point=I.point;this._point2=I.point2;this._width=this.get_data().width;this._height=this.get_data().height;this._x=b;this._y=c;a=
ua.getClassName(oe);this._check.set(a,K(this,this.collideMask));a=ua.getClassName(th);this._check.set(a,K(this,this.collidePixelmask));a=ua.getClassName(Fb);this._check.set(a,K(this,this.collideHitbox))};n["com.stencyl.models.collision.Pixelmask"]=th;th.__name__=["com","stencyl","models","collision","Pixelmask"];th.__super__=Fb;th.prototype=L(Fb.prototype,{collideMask:function(a){this._point.x=this.parent.colX+this._x;this._point.y=this.parent.colY+this._y;this._rect.x=a.parent.colX;this._rect.y=
a.parent.colY;this._rect.width=a.parent.cacheWidth;this._rect.height=a.parent.cacheHeight;return!1},collideHitbox:function(a){this._point.x=this.parent.colX+this._x;this._point.y=this.parent.colY+this._y;this._rect.x=a.parent.colX+a._x;this._rect.y=a.parent.colY+a._y;this._rect.width=a._width;this._rect.height=a._height;return!1},collidePixelmask:function(a){this._point.x=this.parent.colX+this._x;this._point.y=this.parent.colY+this._y;this._point2.x=a.parent.colX+a._x;this._point2.y=a.parent.colY+
a._y;return!1},get_data:function(){return this._data},set_data:function(a){this._data=a;this._width=a.width;this._height=a.height;this.update();return this._data},__class__:th,__properties__:L(Fb.prototype.__properties__,{set_data:"set_data",get_data:"get_data"})});var Mi=function(a,b,c,d,e,f,g,k,p,h,l){this.elementID=a;this.x=b;this.y=c;this.scaleX=d;this.scaleY=e;this.layerID=f;this.angle=g;this.groupID=k;this.actorID=p;this.behaviorValues=h;this.isCustomized=l;this.actorType=q.__cast(la.get().resources.get(p),
Od)};n["com.stencyl.models.scene.ActorInstance"]=Mi;Mi.__name__=["com","stencyl","models","scene","ActorInstance"];Mi.prototype={__class__:Mi};var dd=function(){};n["com.stencyl.models.scene.Autotile"]=dd;dd.__name__=["com","stencyl","models","scene","Autotile"];var vl=function(a,b,c,d,e){this.animIndex=[];this.defaultAnimationIndex=0;this.name=a;this.id=b;this.tilesAcross=c;this.tilesDown=d;a=0;b=new rd;for(c=0;256>c;)d=c++,null!=b.h.__keys__[e[d].__id__]?this.animIndex[d]=b.h[e[d].__id__]:(this.animIndex[d]=
a,b.set(e[d],a),++a);this.defaultAnimationIndex=this.animIndex[255];this.autotileArrayLength=a;this.animCorners=[];for(a=0;256>a;)b=a++,this.animCorners[this.animIndex[b]]=e[b]};n["com.stencyl.models.scene.AutotileFormat"]=vl;vl.__name__=["com","stencyl","models","scene","AutotileFormat"];vl.prototype={__class__:vl};var ul=function(a,b,c,d){this.tl=a;this.tr=b;this.bl=c;this.br=d};n["com.stencyl.models.scene.Corners"]=ul;ul.__name__=["com","stencyl","models","scene","Corners"];ul.prototype={toString:function(){return"TL: "+
u.string(this.tl)+", TR: "+u.string(this.tr)+", BL: "+u.string(this.bl)+", BR: "+u.string(this.br)},__class__:ul};var cl=function(a,b,c,d){this.type=a;this.x=b;this.y=c;this.layer=d};n["com.stencyl.models.scene.DeferredActor"]=cl;cl.__name__=["com","stencyl","models","scene","DeferredActor"];cl.prototype={__class__:cl};var me=function(a,b,c,d,e,f,g){ga.call(this);this.ID=a;this.layerName=b;this.order=c;this.scrollFactorX=d;this.scrollFactorY=e;this.set_alpha(f)};n["com.stencyl.models.scene.layers.RegularLayer"]=
me;me.__name__="com stencyl models scene layers RegularLayer".split(" ");me.__super__=ga;me.prototype=L(ga.prototype,{updatePosition:function(a,b,c){},__class__:me});var Ub=function(a,b,c,d,e,f,g,k){this.cameraOldX=this.cameraOldY=1;this.cameraMoved=!0;me.call(this,a,b,c,d,e,f,g);this.tiles=k;this.tiles.reset();this.tiles.blendName=Sc.toString(g);this.underActors=new ga;this.actorContainer=new ga;this.overActors=new ga;this.overlay=new ga;this.bitmapOverlay=new qb(new Ba(h.screenWidth,h.screenHeight,
!0,0));this.addChild(this.tiles);this.addChild(this.underActors);this.addChild(this.actorContainer);this.addChild(this.overActors);this.addChild(this.overlay);this.addChild(this.bitmapOverlay);this.drawnOn=!0};n["com.stencyl.models.scene.Layer"]=Ub;Ub.__name__=["com","stencyl","models","scene","Layer"];Ub.__super__=me;Ub.prototype=L(me.prototype,{updatePosition:function(a,b,c){var d=a*this.scrollFactorX|0;c=b*this.scrollFactorY|0;a=ra.pixelsnap?Math.round(a):a|0;b=ra.pixelsnap?Math.round(b):b|0;this.overlay.set_x(-a);
this.overlay.set_y(-b);this.bitmapOverlay.set_x(-a);this.bitmapOverlay.set_y(-b);this.tiles.setPosition(-d,-c);this.set_x(a*this.scrollFactorX|0);this.set_y(b*this.scrollFactorY|0);a=d/(h.engine.scene.tileWidth*h.SCALE)|0;b=c/(h.engine.scene.tileHeight*h.SCALE)|0;this.cameraMoved=this.cameraMoved||this.cameraOldX!=a||this.cameraOldY!=b;this.cameraOldX=a;this.cameraOldY=b},__class__:Ub});var Xe=function(a,b,c,d,e,f,g){null==f&&(f=0);this.x=d;this.y=e;this.shapes=a;this.shape=this.shapes[0];this.ID=
b;this.name=c;this.shapeID=f;this.simpleBounds=g};n["com.stencyl.models.scene.RegionDef"]=Xe;Xe.__name__=["com","stencyl","models","scene","RegionDef"];Xe.prototype={__class__:Xe};var Xd=function(a,b,c,d,e,f,g){null==g&&(g=!0);null==f&&(f=0);null==e&&(e=0);null==d&&(d=0);ga.call(this);this.curStep=0;this.running=!0;this.repeats=g;this.image1=new qb(a);this.addChild(this.image1);this.cacheWidth=this.image1.get_width();this.cacheHeight=this.image1.get_height();g&&(this.image2=new qb(a),this.image2.set_x(this.image1.get_x()-
this.cacheWidth),this.addChild(this.image2),this.image3=new qb(a),this.image3.set_x(this.image1.get_x()+this.cacheWidth),this.addChild(this.image3),this.image4=new qb(a),this.image4.set_x(this.image1.get_x()-this.cacheWidth),this.image4.set_y(this.image1.get_y()-this.cacheHeight),this.addChild(this.image4),this.image5=new qb(a),this.image5.set_y(this.image1.get_y()-this.cacheHeight),this.addChild(this.image5),this.image6=new qb(a),this.image6.set_x(this.image1.get_x()+this.cacheWidth),this.image6.set_y(this.image1.get_y()-
this.cacheHeight),this.addChild(this.image6),this.image7=new qb(a),this.image7.set_x(this.image1.get_x()-this.cacheWidth),this.image7.set_y(this.image1.get_y()+this.cacheHeight),this.addChild(this.image7),this.image8=new qb(a),this.image8.set_y(this.image1.get_y()+this.cacheHeight),this.addChild(this.image8),this.image9=new qb(a),this.image9.set_x(this.image1.get_x()+this.cacheWidth),this.image9.set_y(this.image1.get_y()+this.cacheHeight),this.addChild(this.image9));this.yPos=this.xPos=this.yP=this.xP=
0;this.xVelocity=b;this.yVelocity=c;this.parallaxX=d;this.parallaxY=e;this.scrolling=0!=b||0!=c;this.parallax=0!=d||0!=e;this.backgroundID=f};n["com.stencyl.models.scene.ScrollingBitmap"]=Xd;Xd.__name__=["com","stencyl","models","scene","ScrollingBitmap"];Xd.__super__=ga;Xd.prototype=L(ga.prototype,{update:function(a,b,c){c=!1;this.parallax?(this.xPos=a*this.parallaxX|0,this.yPos=b*this.parallaxY|0,c=!0):this.running?this.yPos=this.xPos=0:(this.xPos=this.xP,this.yPos=this.yP);if(this.scrolling&&this.running){a=
this.cacheWidth;b=this.cacheHeight;this.xP+=this.xVelocity/10*h.SCALE;this.yP+=this.yVelocity/10*h.SCALE;if(this.repeats){if(this.xP<-a||this.xP>a)this.xP=0;if(this.yP<-b||this.yP>b)this.yP=0}this.xPos+=Math.floor(this.xP);this.yPos+=Math.floor(this.yP);this.curStep+=1;1<=this.curStep&&(c=!0,this.curStep-=Math.floor(this.curStep))}c&&this.resetPositions()},resetPositions:function(){this.cacheWidth=this.image1.get_width();this.cacheHeight=this.image1.get_height();this.repeats&&(this.xPos<-this.cacheWidth&&
(this.xPos%=this.cacheWidth),this.yPos<-this.cacheHeight&&(this.yPos%=this.cacheHeight));this.image1.set_x(this.xPos);this.image1.set_y(this.yPos);this.repeats&&(this.image2.set_x(this.xPos-this.cacheWidth),this.image2.set_y(this.yPos),this.image3.set_x(this.xPos+this.cacheWidth),this.image3.set_y(this.yPos),this.image4.set_x(this.xPos-this.cacheWidth),this.image4.set_y(this.yPos-this.cacheHeight),this.image5.set_x(this.xPos),this.image5.set_y(this.yPos-this.cacheHeight),this.image6.set_x(this.xPos+
this.cacheWidth),this.image6.set_y(this.yPos-this.cacheHeight),this.image7.set_x(this.xPos-this.cacheWidth),this.image7.set_y(this.yPos+this.cacheHeight),this.image8.set_x(this.xPos),this.image8.set_y(this.yPos+this.cacheHeight),this.image9.set_x(this.xPos+this.cacheWidth),this.image9.set_y(this.yPos+this.cacheHeight))},start:function(){this.running=!0},stop:function(){this.running=!1},__class__:Xd});var wl=function(a,b,c,d,e,f,g){null==g&&(g=0);null==f&&(f=0);this.x=d;this.y=e;this.shapes=a;this.shape=
this.shapes[0];this.ID=b;this.name=c;this.groupID=f;0==this.fillColor&&(this.fillColor=0);this.fillColor=g};n["com.stencyl.models.scene.TerrainDef"]=wl;wl.__name__=["com","stencyl","models","scene","TerrainDef"];wl.prototype={__class__:wl};var Wd=function(a,b,c,d,e,f,g,k){this.tileID=a;this.collisionID=b;this.metadata=c;this.frameIndex=d;this.durations=e;this.parent=k;var p;p=na.get().atlases.get(k.atlasID);if(null!=f){this.autotileFormat=f;this.autotileMergeSet=g;g=[];var h=0;for(f=f.autotileArrayLength;h<
f;)h++,g.push(new Wd(a,b,c,d,e,null,null,k));this.autotiles=g}null!=p&&p.active&&this.loadGraphics();this.currTime=this.currFrame=0;this.updateSource=!1};n["com.stencyl.models.scene.Tile"]=Wd;Wd.__name__=["com","stencyl","models","scene","Tile"];Wd.prototype={update:function(a){1==this.durations.length||h.paused||(this.currTime+=Math.floor(a),this.currTime>(this.durations[this.currFrame]|0)&&(this.currTime-=this.durations[this.currFrame]|0,this.currFrame+1<this.durations.length?this.currFrame++:this.currFrame=
0,this.updateSource=!0))},getSource:function(a,b){return new ha(this.currFrame*a*h.SCALE,0,a*h.SCALE,b*h.SCALE)},loadGraphics:function(){var a=null;if(1<this.durations.length||null!=this.autotileFormat)a=la.get().getGraphicAsset(this.parent.ID+"-"+this.tileID+".png","assets/graphics/"+h.IMG_BASE+"/tileset-"+this.parent.ID+"-"+this.tileID+".png");if(null!=this.autotileFormat)for(var b=0,c=0,a=this.createAutotileAnimations(a,this.autotileFormat);c<a.length;){var d=a[c];++c;this.autotiles[b++].loadAnimationPixels(d)}else this.loadAnimationPixels(a)},
unloadGraphics:function(){this.pixels=null;if(null!=this.autotiles)for(var a=0,b=this.autotiles;a<b.length;){var c=b[a];++a;c.pixels=null}(1<this.durations.length||null!=this.autotiles)&&la.get().resourceAssets.remove(this.parent.ID+"-"+this.tileID+".png")},loadAnimationPixels:function(a){null!=a&&(this.pixels=a)},createAutotileAnimations:function(a,b){var c=[],d=this.durations.length,e=a.width/d/b.tilesAcross|0,f=a.height/b.tilesDown|0,g=e/2|0,k=f/2|0;Wd.rect.width=g;Wd.rect.height=k;for(var p=0,
h=b.animCorners;p<h.length;){var l=h[p];++p;for(var m=new Ba(e*d,f),n=function(a,b){return function(c,d){a(b,c,d)}}(K(m,m.copyPixels),a),q=0;q<d;){var D=q++,u=e*b.tilesAcross*D,D=e*D;n(this.sourceRect(l.tl,u),new W(D,0));n(this.sourceRect(l.tr,u),new W(D+g,0));n(this.sourceRect(l.br,u),new W(D+g,k));n(this.sourceRect(l.bl,u),new W(D,k))}c.push(m)}return c},sourceRect:function(a,b){Wd.rect.x=b+a.x*Wd.rect.width;Wd.rect.y=a.y*Wd.rect.height;return Wd.rect},__class__:Wd};var Rc=function(a,b,c,d,e){this.tilesets=
[];this.blendName="NORMAL";ga.call(this);this.layerID=a;this.zOrder=b;this.scene=c;this.numRows=e;this.numCols=d;this.noTiles=!0;this.rows=[];this.autotileData=[];for(a=0;a<e;)for(b=a++,this.rows[b]=[],this.autotileData[b]=[],c=0;c<d;){var f=c++;this.rows[b][f]=null;this.autotileData[b][f]=0}this.flashPoint=new W};n["com.stencyl.models.scene.TileLayer"]=Rc;Rc.__name__=["com","stencyl","models","scene","TileLayer"];Rc.__super__=ga;Rc.prototype=L(ga.prototype,{reset:function(){if(!this.noTiles){this.bitmapData=
new Ba(h.screenWidth*h.SCALE+this.scene.tileWidth*h.SCALE|0,h.screenHeight*h.SCALE+this.scene.tileHeight*h.SCALE|0,!0,0);var a=new qb(this.bitmapData);a.smoothing=ra.antialias;this.addChild(a)}this.set_alpha(1)},clearBitmap:function(){for(;0<this.get_numChildren();)this.removeChildAt(0);null!=this.bitmapData&&this.bitmapData.dispose();this.bitmapData=null},setPosition:function(a,b){this.set_x(a-a%(this.scene.tileWidth*h.SCALE));this.set_y(b-b%(this.scene.tileHeight*h.SCALE))},mountGrid:function(){if(null!=
this.grid){var a=new Da(h.engine,I.INTEGER_MAX,na.TERRAIN_ID,0,0,h.engine.getTopLayer(),this.grid.get_width(),this.grid.get_height(),null,new ma,null,null,!1,!0,!1,!1,this.grid,-1,h.NO_PHYSICS);a.set_name("Terrain");a.typeID=-1;a.set_visible(!1);a.ignoreGravity=!0;h.engine.getGroup(na.TERRAIN_ID).addChild(a)}},setTileAt:function(a,b,c,d){null==d&&(d=!0);if(!(0>b||0>a||b>=this.numCols||a>=this.numRows)){this.noTiles&&null!=c&&(this.noTiles=!1,null==this.bitmapData&&this.reset());var e=this.rows[a][b];
d&&(d=null!=e&&null!=e.autotiles||null!=c&&null!=c.autotiles);this.rows[a][b]=c;this.autotileData[a][b]=0;d&&this.updateAutotilesNear(a,b)}},getTileAt:function(a,b){return 0>b||0>a||b>=this.numCols||a>=this.numRows?null:this.rows[a][b]},updateAutotilesNear:function(a,b){for(var c=a-1,d=a+2;c<d;)for(var e=c++,f=b-1,g=b+2;f<g;){var k=f++;0>k||0>e||k>=this.numCols||e>=this.numRows||this.updateAutotile(e,k)}},updateAutotile:function(a,b){var c=this.rows[a][b];if(null!=c&&null!=c.autotiles){for(var d=
0,e=Rc.autotileFlagPointMap.keys();e.hasNext();){var f=e.next(),g=Rc.autotileFlagPointMap.h[f],k=b+g.x|0,g=a+g.y|0;0>k||0>g||k>=this.numCols||g>=this.numRows||this.rows[g][k]==c||(d|=f)}this.autotileData[a][b]=c.autotileFormat.animIndex[d]}},draw:function(a,b){if(!this.noTiles&&null!=this.bitmapData){this.bitmapData.fillRect(this.bitmapData.rect,0);a=Math.floor(Math.abs(a));b=Math.floor(Math.abs(b));for(var c=this.numRows,d=this.scene.tileWidth,e=this.scene.tileHeight,f=a/h.SCALE/d|0,g=b/h.SCALE/
e|0,k=2+f+(h.screenWidth/d|0),p=2+g+(h.screenHeight/e|0),k=u["int"](Math.min(k,this.numCols)),p=u["int"](Math.min(p,c)),l=c=0;g<p;){for(var m=f;m<k;){var n=this.getTileAt(g,m);if(null!=n){if(null==Rc.cacheSource.h[n.parent.ID*Rc.TILESET_CACHE_MULTIPLIER+n.tileID]||n.updateSource)if(null==n.pixels&&null==n.autotiles){var q=n.parent.getImageSourceForTile(n.tileID,d,e);Rc.cacheSource.h[n.parent.ID*Rc.TILESET_CACHE_MULTIPLIER+n.tileID]=q}else q=n.getSource(d,e),Rc.cacheSource.h[n.parent.ID*Rc.TILESET_CACHE_MULTIPLIER+
n.tileID]=q,n.updateSource=!1;q=Rc.cacheSource.h[n.parent.ID*Rc.TILESET_CACHE_MULTIPLIER+n.tileID];null!=q&&(null!=n.autotiles&&(n=n.autotiles[this.autotileData[g][m]]),this.pixels=null==n.pixels?n.parent.pixels:n.pixels,this.flashPoint.x=c*h.SCALE,this.flashPoint.y=l*h.SCALE,null!=this.pixels&&this.bitmapData.copyPixels(this.pixels,q,this.flashPoint,null,null,!0))}m++;c+=d}c=0;l+=e;g++}}},__class__:Rc});var ld=function(a,b,c,d,e,f,g,k){hc.call(this,a,c,b);this.framesAcross=d;this.framesDown=e;this.tileWidth=
f;this.tileHeight=g;this.tiles=k;this.isAtlasActive()&&this.loadGraphics();ld.temp=new ha};n["com.stencyl.models.scene.Tileset"]=ld;ld.__name__=["com","stencyl","models","scene","Tileset"];ld.temp=null;ld.__super__=hc;ld.prototype=L(hc.prototype,{setupTilesheet:function(){},getImageSourceForTile:function(a,b,c){a=this.tiles[a];if(null==a)ld.temp.x=0,ld.temp.y=0;else{var d=Math.floor(a.frameIndex/this.framesAcross);ld.temp.x=Math.floor(a.frameIndex%this.framesAcross)*b*h.SCALE;ld.temp.y=d*c*h.SCALE}ld.temp.width=
b*h.SCALE;ld.temp.height=c*h.SCALE;return ld.temp.clone()},loadGraphics:function(){this.pixels=la.get().getGraphicAsset(this.ID+".png","assets/graphics/"+h.IMG_BASE+"/tileset-"+this.ID+".png");for(var a=0,b=this.tiles;a<b.length;){var c=b[a];++a;null!=c&&c.loadGraphics()}0<this.tiles.length&&this.setupTilesheet()},unloadGraphics:function(){this.pixels=null;for(var a=0,b=this.tiles;a<b.length;){var c=b[a];++a;null!=c&&c.unloadGraphics()}la.get().resourceAssets.remove(this.ID+".png")},convertPixels:function(a){var b=
this.tileWidth*h.SCALE|0,c=this.tileHeight*h.SCALE|0,d=a.width/b|0,e=a.height/c|0,f=new Ba(a.width+2*d|0,a.height+2*e|0,!0,0),g,k,p,l,m;for(g=0;g<e;){for(k=0;k<d;)p=k*b+2*k+1|0,l=g*c+2*g+1|0,m=new ha(k*b,g*c,b,c),p=new W(p,l),f.copyPixels(a,m,p),k++;g++}for(g=0;g<e;){for(k=0;k<d;){p=k*b+2*k+1|0;l=g*c+2*g+1|0;for(a=0;a<b;)m=f.getPixel32(p+a,l),f.setPixel32(p+a,l-1,m),m=f.getPixel32(p+a,l+c-1),f.setPixel32(p+a,l+c,m),a++;for(a=0;a<c;)m=f.getPixel32(p,l+a),f.setPixel32(p-1,l+a,m),m=f.getPixel32(p+b-
1,l+a),f.setPixel32(p+b,l+a,m),a++;k++}g++}return f},__class__:ld});var xl=function(a,b,c,d,e,f){this.x=a;this.y=b;this.width=c;this.height=d;this.shape=e;this.shape2=f};n["com.stencyl.models.scene.Wireframe"]=xl;xl.__name__=["com","stencyl","models","scene","Wireframe"];xl.prototype={__class__:xl};var sc=function(a,b,c,d,e,f,g,k,p){me.call(this,a,b,c,d,e,f,g);this.resourceID=k;this.customScroll=p;this.model=q.__cast(la.get().resources.get(k),Ud)};n["com.stencyl.models.scene.layers.BackgroundLayer"]=
sc;sc.__name__="com stencyl models scene layers BackgroundLayer".split(" ");sc.__super__=me;sc.prototype=L(me.prototype,{load:function(){if(null!=this.model&&null!=this.model.img){this.bitmap=new qb(this.model.img,1,!0);this.bitmap.smoothing=ra.antialias;this.currTime=this.currIndex=0;this.isAnimated=1<this.model.frames.length;this.frameCount=this.model.frames.length;this.model.repeats&&!this.model.repeated&&this.model.drawRepeated(this,h.screenWidth*h.SCALE|0,h.screenHeight*h.SCALE|0);var a=0,b=
0;if(this.customScroll)a=this.scrollFactorX,b=this.scrollFactorY;else if(this.model.repeats)a=this.model.parallaxX,b=this.model.parallaxY;else{var c=this.model.img.width,d=this.model.img.height,e=h.screenWidth*h.SCALE|0,f=h.screenHeight*h.SCALE|0,g=h.sceneWidth*h.SCALE|0,k=h.sceneHeight*h.SCALE|0;c>e&&c<g&&(a=1-(g-c)/(g-e));d>f&&d<k&&(b=1-(k-d)/(k-f))}q.__instanceof(this.model,nf)?(c=q.__cast(this.model,nf),a=new Xd(this.model.img,c.xVelocity,c.yVelocity,a,b,this.resourceID,this.model.repeats),this.addChild(this.bgChild=
a)):this.model.repeats?(a=new Xd(this.model.img,0,0,a,b,this.resourceID),this.addChild(this.bgChild=a)):(this.cacheWidth=this.model.img.width,this.cacheHeight=this.model.img.height,this.scrollFactorX=a,this.scrollFactorY=b,this.addChild(this.bgChild=this.bitmap))}},loadFromImg:function(a,b){this.model=new nf(-1,-1,"",[100],0,0,b,0,0);this.model.img=a;this.model.frames=[a];this.load()},setScrollFactor:function(a,b){this.scrollFactorX=a;this.scrollFactorY=b;if(q.__instanceof(this.bgChild,Xd)){var c;
c=q.__cast(this.bgChild,Xd);c.parallaxX=a;c.parallaxY=b}},setScrollSpeed:function(a,b){if(q.__instanceof(this.bgChild,Xd)){var c;c=q.__cast(this.bgChild,Xd);c.xVelocity=a;c.yVelocity=b}},reload:function(a){null!=this.bgChild&&(this.removeChild(this.bgChild),this.bgChild=null);this.resourceID=a;this.model=q.__cast(la.get().resources.get(this.resourceID),Ud);this.load()},setImage:function(a){this.bitmap.bitmapData=a;this.currTime=this.currIndex=0;this.isAnimated=1<this.model.frames.length;this.frameCount=
this.model.frames.length},updateAnimation:function(a){this.currTime+=a;null!=this.model&&this.currTime>=this.model.durations[this.currIndex]&&(this.currTime=0,this.currIndex++,this.currIndex>=this.frameCount&&(this.currIndex=0),q.__instanceof(this.bgChild,Xd)?(this.cacheIndex=this.currIndex,this.model.repeats&&this.model.drawRepeated(this,h.screenWidth*h.SCALE|0,h.screenHeight*h.SCALE|0),this.currIndex=this.cacheIndex,a=this.bgChild.image1,a.bitmapData=this.model.frames[this.currIndex],this.model.repeats&&
(a=this.bgChild.image2,a.bitmapData=this.model.frames[this.currIndex],a=this.bgChild.image3,a.bitmapData=this.model.frames[this.currIndex],a=this.bgChild.image4,a.bitmapData=this.model.frames[this.currIndex],a=this.bgChild.image5,a.bitmapData=this.model.frames[this.currIndex],a=this.bgChild.image6,a.bitmapData=this.model.frames[this.currIndex],a=this.bgChild.image7,a.bitmapData=this.model.frames[this.currIndex],a=this.bgChild.image8,a.bitmapData=this.model.frames[this.currIndex],a=this.bgChild.image9,
a.bitmapData=this.model.frames[this.currIndex])):this.bitmap.bitmapData=this.model.frames[this.currIndex])},updatePosition:function(a,b,c){q.__instanceof(this.bgChild,Xd)?q.__cast(this.bgChild,Xd).update(a,b,c):(this.set_x(a*this.scrollFactorX|0),this.set_y(b*this.scrollFactorY|0));this.isAnimated&&this.updateAnimation(c)},getBitmap:function(){return this.bgChild},__class__:sc});var nb=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this.a=a;this.r=b;this.g=c;this.b=
d};n["com.stencyl.utils.ARGB"]=nb;nb.__name__=["com","stencyl","utils","ARGB"];nb.setARGBi=function(a,b,c,d){return(a&255)<<24|(b&255)<<16|(c&255)<<8|d&255};nb.setARGBf=function(a,b,c,d){return nb.setARGBi(vb.round(255*(0>a?0:1<a?1:a)),vb.round(255*(0>b?0:1<b?1:b)),vb.round(255*(0>c?0:1<c?1:c)),vb.round(255*(0>d?0:1<d?1:d)))};nb.toARGB=function(a){return new nb(.00392156862745098*(a>>>24),.00392156862745098*(a>>>16&255),.00392156862745098*(a>>>8&255),.00392156862745098*(a&255))};nb.getRGB=function(a){return a&
16777215};nb.setRGB=function(a,b,c,d){return b<<16|c<<8|d|a&-16777216};nb.getA=function(a){return a>>>24};nb.getAf=function(a){return.00392156862745098*(a>>>24)};nb.getR=function(a){return a>>>16&255};nb.getRf=function(a){return.00392156862745098*(a>>>16&255)};nb.getG=function(a){return a>>>8&255};nb.getGf=function(a){return.00392156862745098*(a>>>8&255)};nb.getB=function(a){return a&255};nb.getBf=function(a){return.00392156862745098*(a&255)};nb.setA=function(a,b){return b<<24|a&16777215};nb.setAf=
function(a,b){return nb.setA(a,vb.round(255*(0>b?0:1<b?1:b)))};nb.setR=function(a,b){return(b&255)<<16|a&-16711681};nb.setRf=function(a,b){return nb.setR(a,vb.round(255*(0>b?0:1<b?1:b)))};nb.setG=function(a,b){return b<<8|a&-65281};nb.setGf=function(a,b){return nb.setG(a,vb.round(255*(0>b?0:1<b?1:b)))};nb.setB=function(a,b){return b|a&-256};nb.setBf=function(a,b){return nb.setB(a,vb.round(255*(0>b?0:1<b?1:b)))};nb.prototype={set:function(a,b,c,d){this.a=a;this.r=b;this.g=c;this.b=d},lerp:function(a,
b,c){c.a=this.a+(a.a-this.a)*b;c.r=this.r+(a.r-this.r)*b;c.g=this.g+(a.g-this.g)*b;c.b=this.b+(a.b-this.b)*b},getA8:function(){return vb.round(255*this.a)},getR8:function(){return vb.round(255*this.r)},getG8:function(){return vb.round(255*this.g)},getB8:function(){return vb.round(255*this.b)},get24:function(){return vb.round(255*this.r)<<16|vb.round(255*this.g)<<8|vb.round(255*this.b)},set24:function(a,b,c){this.a=this.a;this.r=.00392156862745098*(a&255);this.g=.00392156862745098*(b&255);this.b=.00392156862745098*
(c&255)},get32:function(){return vb.round(255*this.a)<<24|vb.round(255*this.r)<<16|vb.round(255*this.g)<<8|vb.round(255*this.b)},set32:function(a,b,c,d){this.a=.00392156862745098*(a&255);this.r=.00392156862745098*(b&255);this.g=.00392156862745098*(c&255);this.b=.00392156862745098*(d&255)},copy:function(a){a.a=this.a;a.r=this.r;a.g=this.g;a.b=this.b;return a},__class__:nb};var Gb=n["com.stencyl.utils.ColorDeficiencyTypes"]={__ename__:["com","stencyl","utils","ColorDeficiencyTypes"],__constructs__:"Protanopia Protanomaly Deuteranopia Deuteranomaly Tritanopia Tritanomaly Achromatopsia Achromatomaly".split(" ")};
Gb.Protanopia=["Protanopia",0];Gb.Protanopia.toString=J;Gb.Protanopia.__enum__=Gb;Gb.Protanomaly=["Protanomaly",1];Gb.Protanomaly.toString=J;Gb.Protanomaly.__enum__=Gb;Gb.Deuteranopia=["Deuteranopia",2];Gb.Deuteranopia.toString=J;Gb.Deuteranopia.__enum__=Gb;Gb.Deuteranomaly=["Deuteranomaly",3];Gb.Deuteranomaly.toString=J;Gb.Deuteranomaly.__enum__=Gb;Gb.Tritanopia=["Tritanopia",4];Gb.Tritanopia.toString=J;Gb.Tritanopia.__enum__=Gb;Gb.Tritanomaly=["Tritanomaly",5];Gb.Tritanomaly.toString=J;Gb.Tritanomaly.__enum__=
Gb;Gb.Achromatopsia=["Achromatopsia",6];Gb.Achromatopsia.toString=J;Gb.Achromatopsia.__enum__=Gb;Gb.Achromatomaly=["Achromatomaly",7];Gb.Achromatomaly.toString=J;Gb.Achromatomaly.__enum__=Gb;var pa=function(){this.identity();this.matrix=[]};n["com.stencyl.utils.ColorMatrix"]=pa;pa.__name__=["com","stencyl","utils","ColorMatrix"];pa.mulMatrixMatrix=function(a,b,c){var d=a.m11,e=a.m12,f=a.m13,g=a.m14;c.m11=a.m11*b.m11+a.m12*b.m21+a.m13*b.m31+a.m14*b.m41;c.m12=d*b.m12+a.m12*b.m22+a.m13*b.m32+a.m14*b.m42;
c.m13=d*b.m13+e*b.m23+a.m13*b.m33+a.m14*b.m43;c.m14=d*b.m14+e*b.m24+f*b.m34+a.m14*b.m44;c.m15=d*b.m15+e*b.m25+f*b.m35+g*b.m45;d=a.m21;e=a.m22;f=a.m23;g=a.m24;c.m21=a.m21*b.m11+a.m22*b.m21+a.m23*b.m31+a.m24*b.m41;c.m22=d*b.m12+a.m22*b.m22+a.m23*b.m32+a.m24*b.m42;c.m23=d*b.m13+e*b.m23+a.m23*b.m33+a.m24*b.m43;c.m24=d*b.m14+e*b.m24+f*b.m34+a.m24*b.m44;c.m25=d*b.m15+e*b.m25+f*b.m35+g*b.m45;d=a.m31;e=a.m32;f=a.m33;g=a.m34;c.m31=a.m31*b.m11+a.m32*b.m21+a.m33*b.m31+a.m34*b.m41;c.m32=d*b.m12+a.m32*b.m22+a.m33*
b.m32+a.m34*b.m42;c.m33=d*b.m13+e*b.m23+a.m33*b.m33+a.m34*b.m43;c.m34=d*b.m14+e*b.m24+f*b.m34+a.m34*b.m44;c.m35=d*b.m15+e*b.m25+f*b.m35+g*b.m45;d=a.m41;e=a.m42;f=a.m43;g=a.m44;c.m41=a.m41*b.m11+a.m42*b.m21+a.m43*b.m31+a.m44*b.m41;c.m42=d*b.m12+a.m42*b.m22+a.m43*b.m32+a.m44*b.m42;c.m43=d*b.m13+e*b.m23+a.m43*b.m33+a.m44*b.m43;c.m44=d*b.m14+e*b.m24+f*b.m34+a.m44*b.m44;c.m45=d*b.m15+e*b.m25+f*b.m35+g*b.m45;return c};pa.blendMatrixMatrix=function(a,b,c,d){var e=1-d;c.m11=e*a.m11+d*b.m11;c.m12=e*a.m12+
d*b.m12;c.m13=e*a.m13+d*b.m13;c.m14=e*a.m14+d*b.m14;c.m15=e*a.m15+d*b.m15;c.m21=e*a.m21+d*b.m21;c.m22=e*a.m22+d*b.m22;c.m23=e*a.m23+d*b.m23;c.m24=e*a.m24+d*b.m24;c.m25=e*a.m25+d*b.m25;c.m31=e*a.m31+d*b.m31;c.m32=e*a.m32+d*b.m32;c.m33=e*a.m33+d*b.m33;c.m34=e*a.m34+d*b.m34;c.m35=e*a.m35+d*b.m35;c.m41=e*a.m41+d*b.m41;c.m42=e*a.m42+d*b.m42;c.m43=e*a.m43+d*b.m43;c.m44=e*a.m44+d*b.m44;c.m45=e*a.m45+d*b.m45;return c};pa.prototype={getFilter:function(){this.toArray(this.matrix);return new We(this.matrix)},
identity:function(){this.m11=1;this.m21=this.m15=this.m14=this.m13=this.m12=0;this.m22=1;this.m32=this.m31=this.m25=this.m24=this.m23=0;this.m33=1;this.m43=this.m42=this.m41=this.m35=this.m34=0;this.m44=1;this.m45=0;return this},invert:function(){this.mul(-1,0,0,0,255,0,-1,0,0,255,0,0,-1,0,255,0,0,0,1,0);return this},adjustSaturation:function(a){var b=1-a,c=b*pa.LUMA_R,d=b*pa.LUMA_G,b=b*pa.LUMA_B;this.mul(c+a,d,b,0,0,c,d+a,b,0,0,c,d,b+a,0,0,0,0,0,1,0);return this},adjustBrightness:function(a){this.adjustBrightnessRGB(a,
a,a);return this},adjustBrightnessRGB:function(a,b,c){this.mul(1,0,0,0,255*a,0,1,0,0,255*b,0,0,1,0,255*c,0,0,0,1,0);return this},adjustContrast:function(a){this.adjustContrastRGB(a,a,a);return this},adjustContrastRGB:function(a,b,c){a+=1;b+=1;c+=1;this.mul(a,0,0,0,128*(1-a),0,b,0,0,128*(1-b),0,0,c,0,128*(1-c),0,0,0,1,0);return this},adjustHue:function(a){a*=.01745329251994278;var b=Math.cos(a);a=Math.sin(a);this.mul(pa.LUMA_R+b*(1-pa.LUMA_R)+a*-pa.LUMA_R,pa.LUMA_G+b*-pa.LUMA_G+a*-pa.LUMA_G,pa.LUMA_B+
b*-pa.LUMA_B+a*(1-pa.LUMA_B),0,0,pa.LUMA_R+b*-pa.LUMA_R+.143*a,pa.LUMA_G+b*(1-pa.LUMA_G)+.14*a,pa.LUMA_B+b*-pa.LUMA_B+-.283*a,0,0,pa.LUMA_R+b*-pa.LUMA_R+a*-(1-pa.LUMA_R),pa.LUMA_G+b*-pa.LUMA_G+a*pa.LUMA_G,pa.LUMA_B+b*(1-pa.LUMA_B)+a*pa.LUMA_B,0,0,0,0,0,1,0);return this},luminance2Alpha:function(){this.mul(0,0,0,0,255,0,0,0,0,255,0,0,0,0,255,pa.LUMA_R,pa.LUMA_G,pa.LUMA_B,0,0);return this},adjustAlphaContrast:function(a){a+=1;this.mul(1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,a,128*(1-a));return this},colorize:function(a,
b){null==b&&(b=1);var c=.00392156862745098*(a>>>16&255),d=.00392156862745098*(a>>>8&255),e=.00392156862745098*(a&255),f=1-b;this.mul(f+b*c*pa.LUMA_R,b*c*pa.LUMA_G,b*c*pa.LUMA_B,0,0,b*d*pa.LUMA_R,f+b*d*pa.LUMA_G,b*d*pa.LUMA_B,0,0,b*e*pa.LUMA_R,b*e*pa.LUMA_G,f+b*e*pa.LUMA_B,0,0,0,0,0,1,0);return this},rotateHue:function(a){this.initHue();pa.mulMatrixMatrix(this,this.preHue,this);this.rotateBlue(a);pa.mulMatrixMatrix(this,this.postHue,this);return this},setChannels:function(a,b,c,d){null==d&&(d=8);null==
c&&(c=4);null==b&&(b=2);null==a&&(a=1);var e=(1==(a&1)?1:0)+(2==(a&2)?1:0)+(4==(a&4)?1:0)+(8==(a&8)?1:0);0<e&&(e=1/e);var f=(1==(b&1)?1:0)+(2==(b&2)?1:0)+(4==(b&4)?1:0)+(8==(b&8)?1:0);0<f&&(f=1/f);var g=(1==(c&1)?1:0)+(2==(c&2)?1:0)+(4==(c&4)?1:0)+(8==(c&8)?1:0);0<g&&(g=1/g);var k=(1==(d&1)?1:0)+(2==(d&2)?1:0)+(4==(d&4)?1:0)+(8==(d&8)?1:0);0<k&&(k=1/k);this.mul(1==(a&1)?e:0,2==(a&2)?e:0,4==(a&4)?e:0,8==(a&8)?e:0,0,1==(b&1)?f:0,2==(b&2)?f:0,4==(b&4)?f:0,8==(b&8)?f:0,0,1==(c&1)?g:0,2==(c&2)?g:0,4==
(c&4)?g:0,8==(c&8)?g:0,0,1==(d&1)?k:0,2==(d&2)?k:0,4==(d&4)?k:0,8==(d&8)?k:0,0);return this},average:function(a,b,c){null==c&&(c=.33333333);null==b&&(b=.33333333);null==a&&(a=.33333333);this.mul(a,b,c,0,0,a,b,c,0,0,a,b,c,0,0,0,0,0,1,0);return this},threshold:function(a,b){null==b&&(b=256);this.mul(pa.LUMA_R*b,pa.LUMA_G*b,pa.LUMA_B*b,0,-b*a,pa.LUMA_R*b,pa.LUMA_G*b,pa.LUMA_B*b,0,-b*a,pa.LUMA_R*b,pa.LUMA_G*b,pa.LUMA_B*b,0,-b*a,0,0,0,1,0);return this},desaturate:function(){this.mul(pa.LUMA_R,pa.LUMA_G,
pa.LUMA_B,0,0,pa.LUMA_R,pa.LUMA_G,pa.LUMA_B,0,0,pa.LUMA_R,pa.LUMA_G,pa.LUMA_B,0,0,0,0,0,1,0);return this},setMultiplicators:function(a,b,c,d){null==d&&(d=1);null==c&&(c=1);null==b&&(b=1);null==a&&(a=1);this.mul(a,0,0,0,0,0,b,0,0,0,0,0,c,0,0,0,0,0,d,0);return this},clearChannels:function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!1);null==b&&(b=!1);null==a&&(a=!1);a&&(this.m11=this.m12=this.m13=this.m14=this.m15=0);b&&(this.m21=this.m22=this.m23=this.m24=this.m25=0);c&&(this.m31=this.m32=this.m33=this.m34=
this.m35=0);d&&(this.m41=this.m42=this.m43=this.m44=this.m45=0);return this},thresholdAlpha:function(a,b){null==b&&(b=256);this.mul(1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,b,-b*a);return this},averageRGB2Alpha:function(){this.mul(0,0,0,0,255,0,0,0,0,255,0,0,0,0,255,pa.INV3,pa.INV3,pa.INV3,0,0);return this},invertAlpha:function(){this.mul(1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,-1,255);return this},rgb2Alpha:function(a,b,c){this.mul(0,0,0,0,255,0,0,0,0,255,0,0,0,0,255,a,b,c,0,0);return this},setAlpha:function(a){this.mul(1,
0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,a,0);return this},rotateRed:function(a){a*=.01745329251994278;var b=Math.cos(a);a=Math.cos(a);this.m11=1;this.m21=this.m15=this.m14=this.m13=this.m12=0;this.m22=b;this.m23=-a;this.m31=this.m25=this.m24=0;this.m32=a;this.m33=b;this.m43=this.m42=this.m41=this.m35=this.m34=0;this.m44=1;this.m45=0;return this},rotateGreen:function(a){a*=.01745329251994278;var b=Math.cos(a);a=Math.cos(a);this.m11=b;this.m12=0;this.m13=a;this.m21=this.m15=this.m14=0;this.m22=1;this.m25=
this.m24=this.m23=0;this.m31=-a;this.m32=0;this.m33=b;this.m43=this.m42=this.m41=this.m35=this.m34=0;this.m44=1;this.m45=0;return this},rotateBlue:function(a){a*=.01745329251994278;var b=Math.cos(a);a=Math.cos(a);this.m11=b;this.m12=-a;this.m15=this.m14=this.m13=0;this.m21=a;this.m22=b;this.m32=this.m31=this.m25=this.m24=this.m23=0;this.m33=1;this.m43=this.m42=this.m41=this.m35=this.m34=0;this.m44=1;this.m45=0;return this},shearRed:function(a,b){this.m11=1;this.m12=a;this.m13=b;this.m21=this.m15=
this.m14=0;this.m22=1;this.m32=this.m31=this.m25=this.m24=this.m23=0;this.m33=1;this.m43=this.m42=this.m41=this.m35=this.m34=0;this.m44=1;this.m45=0;return this},shearGreen:function(a,b){this.m11=1;this.m15=this.m14=this.m13=this.m12=0;this.m21=a;this.m22=1;this.m23=b;this.m32=this.m31=this.m25=this.m24=0;this.m33=1;this.m43=this.m42=this.m41=this.m35=this.m34=0;this.m44=1;this.m45=0;return this},shearBlue:function(a,b){this.m11=1;this.m21=this.m15=this.m14=this.m13=this.m12=0;this.m22=1;this.m25=
this.m24=this.m23=0;this.m31=a;this.m32=b;this.m33=1;this.m43=this.m42=this.m41=this.m35=this.m34=0;this.m44=1;this.m45=0;return this},applyColorDeficiency:function(a){switch(a[1]){case 0:this.mul(.567,.433,0,0,0,.558,.442,0,0,0,0,.242,.758,0,0,0,0,0,1,0);break;case 1:this.mul(.817,.183,0,0,0,.333,.667,0,0,0,0,.125,.875,0,0,0,0,0,1,0);break;case 2:this.mul(.625,.375,0,0,0,.7,.3,0,0,0,0,.3,.7,0,0,0,0,0,1,0);break;case 3:this.mul(.8,.2,0,0,0,.258,.742,0,0,0,0,.142,.858,0,0,0,0,0,1,0);break;case 4:this.mul(.95,
.05,0,0,0,0,.433,.567,0,0,0,.475,.525,0,0,0,0,0,1,0);break;case 5:this.mul(.967,.033,0,0,0,0,.733,.267,0,0,0,.183,.817,0,0,0,0,0,1,0);break;case 6:this.mul(.299,.587,.114,0,0,.299,.587,.114,0,0,.299,.587,.114,0,0,0,0,0,1,0);break;case 7:this.mul(.618,.32,.062,0,0,.163,.775,.062,0,0,.163,.32,.516,0,0,0,0,0,1,0)}return this},applyMatrix:function(a,b){var c=a.a,d=a.r,e=a.g,f=a.b,g=I.clamp(.5+d*this.m41+e*this.m42+f*this.m43+c*this.m44+this.m45|0,0,255),k=I.clamp(.5+d*this.m11+e*this.m12+f*this.m13+c*
this.m14+this.m15|0,0,255),p=I.clamp(.5+d*this.m21+e*this.m22+f*this.m23+c*this.m24+this.m25|0,0,255),c=I.clamp(.5+d*this.m31+e*this.m32+f*this.m33+c*this.m34+this.m35|0,0,255);b.a=g;b.r=k;b.g=p;b.b=c;return b},transformVector:function(a){var b=a[0],c=a[1],d=a[2],e=a[3],f=b*this.m21+c*this.m22+d*this.m23+e*this.m24+this.m25,g=b*this.m31+c*this.m32+d*this.m33+e*this.m34+this.m35,k=b*this.m41+c*this.m42+d*this.m43+e*this.m44+this.m45;a[0]=b*this.m11+c*this.m12+d*this.m13+e*this.m14+this.m15;a[1]=f;
a[2]=g;a[3]=k;return a},initHue:function(){if(!this.hueInitialized){this.hueInitialized=!0;this.preHue=new pa;this.preHue.rotateRed(45);this.preHue.rotateGreen(-39.182655);var a=[];a[0]=pa.LUMA_R2;a[1]=pa.LUMA_G2;a[2]=pa.LUMA_B2;a[3]=1;this.preHue.transformVector(a);var b=a[0]/a[2],a=a[1]/a[2];this.preHue.shearBlue(b,a);this.postHue=new pa;this.postHue.shearBlue(-b,-a);this.postHue.rotateGreen(39.182655);this.postHue.rotateRed(-45)}},toArray:function(a){a[0]=this.m11;a[1]=this.m12;a[2]=this.m13;a[3]=
this.m14;a[4]=this.m15;a[5]=this.m21;a[6]=this.m22;a[7]=this.m23;a[8]=this.m24;a[9]=this.m25;a[10]=this.m31;a[11]=this.m32;a[12]=this.m33;a[13]=this.m34;a[14]=this.m35;a[15]=this.m41;a[16]=this.m42;a[17]=this.m43;a[18]=this.m44;a[19]=this.m45;return a},set:function(a,b,c,d,e,f,g,k,p,h,l,m,n,q,D,u,r,t,z,v){this.m11=a;this.m12=b;this.m13=c;this.m14=d;this.m15=e;this.m21=f;this.m22=g;this.m23=k;this.m24=p;this.m25=h;this.m31=l;this.m32=m;this.m33=n;this.m34=q;this.m35=D;this.m41=u;this.m42=r;this.m43=
t;this.m44=z;this.m45=v},mul:function(a,b,c,d,e,f,g,k,p,h,l,m,n,q,D,u,r,t,z,v){var y=this.m11,x=this.m12,A=this.m13,B=this.m14;this.m11=this.m11*a+this.m12*f+this.m13*l+this.m14*u;this.m12=y*b+this.m12*g+this.m13*m+this.m14*r;this.m13=y*c+x*k+this.m13*n+this.m14*t;this.m14=y*d+x*p+A*q+this.m14*z;this.m15=y*e+x*h+A*D+B*v;y=this.m21;x=this.m22;A=this.m23;B=this.m24;this.m21=this.m21*a+this.m22*f+this.m23*l+this.m24*u;this.m22=y*b+this.m22*g+this.m23*m+this.m24*r;this.m23=y*c+x*k+this.m23*n+this.m24*
t;this.m24=y*d+x*p+A*q+this.m24*z;this.m25=y*e+x*h+A*D+B*v;y=this.m31;x=this.m32;A=this.m33;B=this.m34;this.m31=this.m31*a+this.m32*f+this.m33*l+this.m34*u;this.m32=y*b+this.m32*g+this.m33*m+this.m34*r;this.m33=y*c+x*k+this.m33*n+this.m34*t;this.m34=y*d+x*p+A*q+this.m34*z;this.m35=y*e+x*h+A*D+B*v;y=this.m41;x=this.m42;A=this.m43;B=this.m44;this.m41=this.m41*a+this.m42*f+this.m43*l+this.m44*u;this.m42=y*b+this.m42*g+this.m43*m+this.m44*r;this.m43=y*c+x*k+this.m43*n+this.m44*t;this.m44=y*d+x*p+A*q+
this.m44*z;this.m45=y*e+x*h+A*D+B*v},__class__:pa};var vb=function(){};n["com.stencyl.utils.Mathematics"]=vb;vb.__name__=["com","stencyl","utils","Mathematics"];vb.round=function(a){return(0<a?a+.5:0>a?a-.5:0)|0};vb.clamp=function(a,b,c){return a<b?b:a>c?c:a};vb.fclamp=function(a,b,c){return a<b?b:a>c?c:a};var ub=function(a){this.points=a;this.combineClosePoints();this.combineColinearPoints();this.makeCCW()};n["com.stencyl.utils.PolyDecompBayazit"]=ub;ub.__name__=["com","stencyl","utils","PolyDecompBayazit"];
ub.area=function(a,b,c){return(b.x-a.x)*(c.y-a.y)-(c.x-a.x)*(b.y-a.y)};ub.right=function(a,b,c){return 0>ub.area(a,b,c)};ub.rightOn=function(a,b,c){return 0>=ub.area(a,b,c)};ub.left=function(a,b,c){return 0<ub.area(a,b,c)};ub.leftOn=function(a,b,c){return 0<=ub.area(a,b,c)};ub.sqdist=function(a,b){var c=b.x-a.x,d=b.y-a.y;return c*c+d*d};ub.getIntersection=function(a,b,c,d){var e=b.y-a.y;b=a.x-b.x;a=e*a.x+b*a.y;var f=d.y-c.y;d=c.x-d.x;c=f*c.x+d*c.y;var g=e*d-f*b;return Math.abs(g)>Number.MIN_VALUE?
new W((d*a-b*c)/g,(e*c-f*a)/g):null};ub.prototype={combineColinearPoints:function(){for(var a=[],b=0,c=this.points.length;b<c;){var d=b++,e=this.at(d-1),f=this.at(d),d=this.at(d+1);null!=ub.getIntersection(e,f,f,d)&&a.push(f)}this.points=a},combineClosePoints:function(){for(var a=[],b=0,c=this.points.length;b<c;){var d=b++,e=this.at(d),d=this.at(d+1);ub.sqdist(e,d)>Number.MIN_VALUE&&a.push(e)}this.points=a},at:function(a){var b=this.points.length;return this.points[(a+b)%b]},isReflex:function(a){return ub.right(this.at(a-
1),this.at(a),this.at(a+1))},polyFromRange:function(a,b){return a<b?new ub(this.points.slice(a,b+1)):new ub(this.points.slice(a).concat(this.points.slice(0,b+1)))},decompose:function(a){if(!(3>this.points.length)){for(var b=0,c=this.points.length;b<c;){var d=b++;if(this.isReflex(d)){for(var e=Number.MAX_VALUE,f=null,b=0,g=Number.MAX_VALUE,k=null,p=c=0,h=this.points.length;p<h;){var l=p++;if(ub.left(this.at(d-1),this.at(d),this.at(l))&&ub.rightOn(this.at(d-1),this.at(d),this.at(l-1))){var m=ub.getIntersection(this.at(d-
1),this.at(d),this.at(l),this.at(l-1));if(ub.right(this.at(d+1),this.at(d),m)){var n=ub.sqdist(this.at(d),m);n<g&&(g=n,k=m,c=l)}}ub.left(this.at(d+1),this.at(d),this.at(l+1))&&ub.rightOn(this.at(d+1),this.at(d),this.at(l))&&(m=ub.getIntersection(this.at(d+1),this.at(d),this.at(l),this.at(l+1)),ub.left(this.at(d-1),this.at(d),m)&&(n=ub.sqdist(this.at(d),m),n<e&&(e=n,f=m,b=l)))}if(c==(b+1)%this.points.length)e=new W(.5*(k.x+f.x),.5*(k.y+f.y)),f=this.polyFromRange(d,b),f.points.push(e),d=d<b?this.polyFromRange(c,
d):this.polyFromRange(0,d),d.points.push(e);else{c>b&&(b+=this.points.length);e=0;for(f=Number.MAX_VALUE;c<=b;)ub.leftOn(this.at(d-1),this.at(d),this.at(c))&&ub.rightOn(this.at(d+1),this.at(d),this.at(c))&&(g=ub.sqdist(this.at(d),this.at(c)),g<f&&(f=g,this.at(c),e=c%this.points.length)),++c;f=this.polyFromRange(d,e);d=this.polyFromRange(e,d)}f.points.length<d.points.length?(f.decompose(a),d.decompose(a)):(d.decompose(a),f.decompose(a));return}}3<=this.points.length&&a(this)}},makeCCW:function(){for(var a=
0,b=1,c=this.points.length;b<c;){var d=b++;if(this.at(d).y<this.at(a).y||this.at(d).y==this.at(a).y&&this.at(d).x>this.at(a).x)a=d}ub.left(this.at(a-1),this.at(a),this.at(a+1))||this.points.reverse()},__class__:ub};var Wb=function(a,b,c){null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this.r=a;this.g=b;this.b=c};n["com.stencyl.utils.RGB"]=Wb;Wb.__name__=["com","stencyl","utils","RGB"];Wb.setRGBi=function(a,b,c){return(a&255)<<16|(b&255)<<8|c&255};Wb.setRGBf=function(a,b,c){return Wb.setRGBi(vb.round(255*
(0>a?0:1<a?1:a)),vb.round(255*(0>b?0:1<b?1:b)),vb.round(255*(0>c?0:1<c?1:c)))};Wb.getR=function(a){return a>>>16&255};Wb.getRf=function(a){return.00392156862745098*(a>>>16&255)};Wb.getG=function(a){return a>>>8&255};Wb.getGf=function(a){return.00392156862745098*(a>>>8&255)};Wb.getB=function(a){return a&255};Wb.getBf=function(a){return.00392156862745098*(a&255)};Wb.setR=function(a,b){return(b&255)<<16|a&-16711681};Wb.setRf=function(a,b){return Wb.setR(a,vb.round(255*(0>b?0:1<b?1:b)))};Wb.setG=function(a,
b){return(b&255)<<8|a&-65281};Wb.setGf=function(a,b){return Wb.setG(a,vb.round(255*(0>b?0:1<b?1:b)))};Wb.setB=function(a,b){return b&255|a&-256};Wb.setBf=function(a,b){return Wb.setB(a,vb.round(255*(0>b?0:1<b?1:b)))};Wb.prototype={set:function(a,b,c){this.r=a;this.g=b;this.b=c},lerp:function(a,b,c){b.r=this.r+(a.r-this.r)*c;b.g=this.g+(a.g-this.g)*c;b.b=this.b+(a.b-this.b)*c},getR8:function(){return vb.round(255*this.r)},getG8:function(){return vb.round(255*this.g)},getB8:function(){return vb.round(255*
this.b)},get24:function(){return vb.round(255*this.r)<<16|vb.round(255*this.g)<<8|vb.round(255*this.b)},set24:function(a,b,c){this.r=.00392156862745098*(a&255);this.g=.00392156862745098*(b&255);this.b=.00392156862745098*(c&255)},copy:function(a){a.r=this.r;a.g=this.g;a.b=this.b;return a},__class__:Wb};var ze=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};n["openfl.media.SoundTransform"]=ze;ze.__name__=["openfl",
"media","SoundTransform"];ze.prototype={clone:function(){return new ze(this.volume,this.pan)},__class__:ze};var Re=function(){Va.call(this);this.applicationDomain=qg.currentDomain;this.bytesTotal=this.bytesLoaded=0;this.childAllowsParent=!0;this.parameters={}};n["openfl.display.LoaderInfo"]=Re;Re.__name__=["openfl","display","LoaderInfo"];Re.create=function(a){var b=new Re;b.uncaughtErrorEvents=new Zi;null!=a?b.loader=a:b.url=Re.__rootURL;return b};Re.__super__=Va;Re.prototype=L(Va.prototype,{__class__:Re});
var qg=function(a){this.parentDomain=null!=a?a:qg.currentDomain};n["openfl.system.ApplicationDomain"]=qg;qg.__name__=["openfl","system","ApplicationDomain"];qg.prototype={getDefinition:function(a){return ua.resolveClass(a)},hasDefinition:function(a){return null!=ua.resolveClass(a)},__class__:qg};var Zi=function(){Va.call(this)};n["openfl.events.UncaughtErrorEvents"]=Zi;Zi.__name__=["openfl","events","UncaughtErrorEvents"];Zi.__super__=Va;Zi.prototype=L(Va.prototype,{__class__:Zi});var yd=function(a,
b,c,d,e,f,g,k){null==k&&(k=0);null==g&&(g=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=g;this.alphaOffset=k};n["openfl.geom.ColorTransform"]=yd;yd.__name__=["openfl","geom","ColorTransform"];yd.prototype={concat:function(a){this.redMultiplier*=a.redMultiplier;this.greenMultiplier*=a.greenMultiplier;this.blueMultiplier*=
a.blueMultiplier;this.alphaMultiplier*=a.alphaMultiplier;this.redOffset=a.redMultiplier*this.redOffset+a.redOffset;this.greenOffset=a.greenMultiplier*this.greenOffset+a.greenOffset;this.blueOffset=a.blueMultiplier*this.blueOffset+a.blueOffset;this.alphaOffset=a.alphaMultiplier*this.alphaOffset+a.alphaOffset},toString:function(){return"(redMultiplier="+this.redMultiplier+", greenMultiplier="+this.greenMultiplier+", blueMultiplier="+this.blueMultiplier+", alphaMultiplier="+this.alphaMultiplier+", redOffset="+
this.redOffset+", greenOffset="+this.greenOffset+", blueOffset="+this.blueOffset+", alphaOffset="+this.alphaOffset+")"},__clone:function(){return new yd(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},get_color:function(){return(this.redOffset|0)<<16|(this.greenOffset|0)<<8|this.blueOffset|0},set_color:function(a){this.redOffset=a>>16&255;this.greenOffset=a>>8&255;this.blueOffset=a&255;this.blueMultiplier=this.greenMultiplier=this.redMultiplier=0;return this.get_color()},__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__:yd,__properties__:{set_color:"set_color",get_color:"get_color"}};var I=function(){};n["com.stencyl.utils.Utils"]=I;I.__name__=["com","stencyl","utils","Utils"];I.__properties__={set_time:"set_time",set_pan:"set_pan",get_pan:"get_pan",set_volume:"set_volume",get_volume:"get_volume"};I.width=null;I.height=null;I.elapsed=null;I.bounds=
null;I.toBoolean=function(a){return"true"==a?!0:!1};I.clear=function(a){a.length=0};I.removeValueFromArray=function(a,b){for(var c=a.length-1;-1<c;)a[c]==b&&a.splice(c,1),c--};I.contains=function(a,b){for(var c=a.length-1;-1<c;){if(a[c]==b)return!0;c--}return!1};I.mapContainsValue=function(a,b){for(var c=new If(a,a.arrayKeys());c.hasNext();)if(c.next()==b)return!0;return!1};I.mapCount=function(a){var b=0;for(a=new If(a,a.arrayKeys());a.hasNext();)a.next(),b++;return b};I.mapToList=function(a,b){var c=
[];if("keys"==b)for(var d=a.keys();d.hasNext();){var e=d.next();c.push(e)}else for(d=new If(a,a.arrayKeys());d.hasNext();)e=d.next(),c.push(e);return c};I.copyMap=function(a){for(var b=new ma,c=a.keys();c.hasNext();){var d=c.next(),e;e=null!=Ab[d]?a.getReserved(d):a.h[d];b.set(d,e)}return b};I.removeAllChildren=function(a){for(;0<a.get_numChildren();){var b=a.getChildAt(0);q.__instanceof(b,xc)&&I.removeAllChildren(q.__cast(b,xc));a.removeChild(b)}};I.demouse=function(a){for(var b=0,c=a.get_numChildren();b<
c;){var d=b++,d=a.getChildAt(d);q.__instanceof(d,xc)&&I.demouse(q.__cast(d,xc));a.mouseChildren=!1;a.mouseEnabled=!1}};I.setCamera=function(a,b){null==b&&(b=0);null==a&&(a=0);I.camera.x=a;I.camera.y=b};I.resetCamera=function(){I.camera.x=I.camera.y=0};I.get_volume=function(){return I._volume};I.set_volume=function(a){0>a&&(a=0);if(I._volume==a)return a;I._soundTransform.volume=I._volume=a;return I._volume};I.get_pan=function(){return I._pan};I.set_pan=function(a){-1>a&&(a=-1);1<a&&(a=1);if(I._pan==
a)return a;I._soundTransform.pan=I._pan=a;return I._pan};I.sign=function(a){return 0>a?-1:0<a?1:0};I.approach=function(a,b,c){return a<b?b<a+c?b:a+c:b>a-c?b:a-c};I.lerp=function(a,b,c){null==c&&(c=1);return a+(b-a)*c};I.colorLerp=function(a,b,c){null==c&&(c=1);if(0>=c)return a;if(1<=c)return b;var d=a>>24&255,e=a>>16&255,f=a>>8&255;a&=255;e+=((b>>16&255)-e)*c|0;f+=((b>>8&255)-f)*c|0;a+=((b&255)-a)*c|0;return d+(((b>>24&255)-d)*c|0)<<24|e<<16|f<<8|a};I.stepTowards=function(a,b,c,d){null==d&&(d=1);
I.point.x=b-a.x;I.point.y=c-a.y;I.point.get_length()<=d?(a.x=b,a.y=c):(I.point.normalize(d),a.x+=I.point.x,a.y+=I.point.y)};I.anchorTo=function(a,b,c){null==c&&(c=0);I.point.x=a.x-b.x;I.point.y=a.y-b.y;I.point.get_length()>c&&I.point.normalize(c);a.x=b.x+I.point.x;a.y=b.y+I.point.y};I.angle=function(a,b,c,d){a=57.29577951308402*Math.atan2(d-b,c-a);return 0>a?a+360:a};I.angleXY=function(a,b,c,d,e){null==e&&(e=0);null==d&&(d=0);null==c&&(c=1);b*=.01745329251994278;a.x=Math.cos(b)*c+d;a.y=Math.sin(b)*
c+e};I.rotateAround=function(a,b,c,d){null==d&&(d=!0);null==c&&(c=0);d&&(c+=I.angle(b.x,b.y,a.x,a.y));I.angleXY(a,c,I.distance(b.x,b.y,a.x,a.y),b.x,b.y)};I.distance=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);return Math.sqrt((c-a)*(c-a)+(d-b)*(d-b))};I.distanceSquared=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);return(c-a)*(c-a)+(d-b)*(d-b)};I.distanceRects=function(a,b,c,d,e,f,g,k){return a<e+g&&e<a+c?b<f+k&&f<b+d?0:b>f?b-(f+k):f-(b+d):b<f+k&&f<b+d?a>e?a-(e+g):e-(a+c):a>e?b>f?I.distance(a,
b,e+g,f+k):I.distance(a,b+d,e+g,f):b>f?I.distance(a+c,b,e,f+k):I.distance(a+c,b+d,e,f)};I.distanceRectPoint=function(a,b,c,d,e,f){return a>=c&&a<=c+e?b>=d&&b<=d+f?0:b>d?b-(d+f):d-b:b>=d&&b<=d+f?a>c?a-(c+e):c-a:a>c?b>d?I.distance(a,b,c+e,d+f):I.distance(a,b,c+e,d):b>d?I.distance(a,b,c,d+f):Math.sqrt((c-a)*(c-a)+(d-b)*(d-b))};I.clamp=function(a,b,c){if(c>b)return a<c||(a=c),a>b?a:b;a<b||(a=b);return a>c?a:c};I.clampInRect=function(a,b,c,d,e,f){null==f&&(f=0);a.x=I.clamp(a.x,b+f,b+d-f);a.y=I.clamp(a.y,
c+f,c+e-f)};I.scale=function(a,b,c,d,e){return d+(a-b)/(c-b)*(e-d)};I.scaleClamp=function(a,b,c,d,e){a=d+(a-b)/(c-b)*(e-d);if(e>d)return a<e||(a=e),a>d?a:d;a<d||(a=d);return a>e?a:e};I.indexOf=function(a,b){for(var c=0,d=0;d<a.length;){var e=a[d];++d;if(b==e)return c;c++}return-1};I.next=function(a,b,c){null==c&&(c=!0);return c?b[(I.indexOf(b,a)+1)%b.length]:b[u["int"](Math.max(I.indexOf(b,a)+1,b.length-1))]};I.prev=function(a,b,c){null==c&&(c=!0);return c?b[(I.indexOf(b,a)-1+b.length)%b.length]:
b[u["int"](Math.max(I.indexOf(b,a)-1,0))]};I.swap=function(a,b,c){return a==b?c:b};I.getColorRGB=function(a,b,c){null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);return a<<16|b<<8|c};I.getRed=function(a){return a>>16&255};I.getGreen=function(a){return a>>8&255};I.getBlue=function(a){return a&255};I.timeFlag=function(){var a=Ad.stamp(),b=a-I._time;I._time=a;return b};I.frames=function(a,b,c){null==c&&(c=0);var d=[];c++;if(a<b)for(;a<=b;)d.push(a),a+=c;else for(;a>=b;)d.push(a),a-=c;return d};I.time=null;
I.set_time=function(a){I._time=a;return I._time};I.saveToSharedObject=function(a,b,c){a.data[b]=c};I.loadFromSharedObject=function(a,b){return O.field(a.data,b)};I.flushSharedObject=function(a,b){var c=null;try{c=a.flush()}catch(d){Ia.lastException=d;d instanceof F&&(d=d.val);null!=b&&b(!1);return}0==c&&null!=b&&b(!0)};I.saveMap=function(a,b,c){b=gc.getLocal(b);for(var d=a.keys();d.hasNext();){var e=d.next();O.setField(b.data,e,null!=Ab[e]?a.getReserved(e):a.h[e])}I.flushSharedObject(b,c)};I.loadMap=
function(a,b,c){b=gc.getLocal(b);for(var d=0,e=O.fields(b.data);d<e.length;){var f=e[d];++d;var g=O.field(b.data,f);a.set(f,g)}null!=c&&c(!0)};I._time=null;I._updateTime=null;I._renderTime=null;I._gameTime=null;I._flashTime=null;I._getSeed=null;I.stage=null;var V=function(){};n["de.polygonal.Printf"]=V;V.__name__=["de","polygonal","Printf"];V.dataTypeMap=null;V.formatIntFuncHash=null;V.formatFloatFuncHash=null;V.formatStringFuncHash=null;V.init=function(){V.dataTypeMap=V.makeDataTypeMap();V.formatIntFuncHash=
new xa;V.formatIntFuncHash.h[1]=V.formatSignedDecimal;V.formatIntFuncHash.h[2]=V.formatUnsignedDecimal;V.formatIntFuncHash.h[0]=V.formatCharacter;V.formatIntFuncHash.h[4]=V.formatHexadecimal;V.formatIntFuncHash.h[3]=V.formatOctal;V.formatIntFuncHash.h[5]=V.formatBinary;V.formatFloatFuncHash=new xa;V.formatFloatFuncHash.h[0]=V.formatNormalFloat;V.formatFloatFuncHash.h[1]=V.formatScientific;V.formatFloatFuncHash.h[2]=V.formatNaturalFloat;V.formatStringFuncHash=new xa;V.formatStringFuncHash.h[2]=V.formatString};
V.makeDataTypeMap=function(){var a=new xa;a.set(105,Cb.FmtInteger(Mb.ISignedDecimal));a.set(100,Cb.FmtInteger(Mb.ISignedDecimal));a.set(117,Cb.FmtInteger(Mb.IUnsignedDecimal));a.set(99,Cb.FmtInteger(Mb.ICharacter));a.set(120,Cb.FmtInteger(Mb.IHex));a.set(88,Cb.FmtInteger(Mb.IHex));a.set(111,Cb.FmtInteger(Mb.IOctal));a.set(98,Cb.FmtInteger(Mb.IBin));a.set(102,Cb.FmtFloat(td.FNormal));a.set(101,Cb.FmtFloat(td.FScientific));a.set(69,Cb.FmtFloat(td.FScientific));a.set(103,Cb.FmtFloat(td.FNatural));a.set(71,
Cb.FmtFloat(td.FNatural));a.h[115]=Cb.FmtString;a.h[112]=Cb.FmtPointer;a.h[110]=Cb.FmtNothing;return a};V.format=function(a,b){V._initialized||(V._initialized=!0,V.init());for(var c="",d=0,e=V.tokenize(a),f=0;f<e.length;){var g=e[f];++f;switch(g[1]){case 3:throw new F("invalid format specifier");case 0:c+=g[2];break;case 2:var k=g[2];if(!Object.prototype.hasOwnProperty.call(b[0],k))throw new F("no field named "+k);c+=u.string(O.field(b[0],k));break;case 1:k=g[3];g=g[2];k.width=null!=k.width?k.width:
q.__cast(b[d++],$m);k.precision=null!=k.precision?k.precision:q.__cast(b[d++],$m);var p=b[d++],h;switch(g[1]){case 1:h=V.formatFloatFuncHash.h[g[2][1]];break;case 0:h=V.formatIntFuncHash.h[g[2][1]];break;case 2:h=V.formatStringFuncHash.h[2];break;case 3:throw new F("specifier 'p' is not supported");case 4:throw new F("specifier 'n' is not supported");}c+=h(p,k)}}return c};V.tokenize=function(a){return[]};V.formatBinary=function(a,b){var c="",d=b.flags,e=b.precision,f=b.width;-1==e&&(e=1);if(0!=a){0!=
(d&1<<Ka.LengthH[1])&&(a&=65535);var g=a;do c=(0<(g&1)?"1":"0")+c,g>>>=1;while(0<g);1<e&&(e>c.length&&(c=V.lpad(c,"0",e)),0!=(d&1<<Ka.Sharp[1])&&(c="b"+c))}return 0!=(d&1<<Ka.Minus[1])?f>c.length?V.rpad(c," ",f):c:f>c.length?V.lpad(c,0!=(d&1<<Ka.Zero[1])?"0":" ",f):c};V.formatOctal=function(a,b){var c="",d=b.flags,e=b.precision,f=b.width;-1==e&&(e=1);0!=a&&(0!=(d&1<<Ka.LengthH[1])&&(a&=65535),c=V.toOct(a),0!=(d&1<<Ka.Sharp[1])&&(c="0"+c),1<e&&c.length<e&&(c=V.lpad(c,"0",e)));return 0!=(d&1<<Ka.Minus[1])?
f>c.length?V.rpad(c," ",f):c:f>c.length?V.lpad(c,0!=(d&1<<Ka.Zero[1])?"0":" ",f):c};V.formatHexadecimal=function(a,b){var c="",d=b.flags,e=b.precision,f=b.width;-1==e&&(e=1);0!=a&&(0!=(d&1<<Ka.LengthH[1])&&(a&=65535),c=V.toHex(a),1<e&&c.length<e&&(c=V.lpad(c,"0",e)),0!=(d&1<<Ka.Sharp[1])&&0!=a&&(c="0x"+c),c=0!=(d&1<<Ka.UpperCase[1])?c.toUpperCase():c.toLowerCase());return 0!=(d&1<<Ka.Minus[1])?f>c.length?V.rpad(c," ",f):c:f>c.length?V.lpad(c,0!=(d&1<<Ka.Zero[1])?"0":" ",f):c};V.formatUnsignedDecimal=
function(a,b){var c,d=b.precision;0<=a?c=V.formatSignedDecimal(a,b):(c=new Bb(0,a),c=$i.toString(c),1<d&&c.length<d&&(c=V.lpad(c,"0",d)),c=V.padNumber(c,a,b.flags,b.width));return c};V.formatNaturalFloat=function(a,b){b.precision=0;var c=V.formatNormalFloat(a,b),d=V.formatScientific(a,b);if(0!=(b.flags&1<<Ka.Sharp[1])&&-1!=c.indexOf(".")){for(var e=c.length-1;48==V.codeAt(c,e);)e--;c=P.substr(c,0,e)}return c.length<=d.length?c:d};V.formatScientific=function(a,b){var c="",d=b.flags,e=b.precision;-1==
e&&(e=6);var f,g;if(0==a){if(g=f=0,c+="0",0<e)for(var c=c+".",k=0;k<e;)k++,c+="0"}else f=0<a?1:0>a?-1:0,0>a&&(a=-a),g=Math.floor(Math.log(a)/2.302585092994046),a/=Math.pow(10,g),k=Math.pow(.1,e),a=V.roundTo(a,k);c=0>f?c+"-":0!=(d&1<<Ka.Plus[1])?c+"+":c+"";0!=a&&(c+=V.rpad(function(b){b=V.str(a);return P.substr(b,0,e+2)}(this),"0",e+2));c=0!=(d&1<<Ka.UpperCase[1])?c+"E":c+"e";c=0<=g?c+"+":c+"-";10>g?c+="00":100>g&&(c+="0");return c+=V.str(V.abs(g))};V.formatSignedDecimal=function(a,b){var c,d=b.flags,
e=b.precision,f=b.width;0==e&&0==a?c="":(0!=(d&1<<Ka.LengthH[1])&&(a&=65535),c=V.str(V.abs(a)),1<e&&c.length<e&&(c=V.lpad(c,"0",e)),0!=(d&1<<Ka.Zero[1])&&(c=V.lpad(c,"0",0>a?f-1:f)),0>a&&(c="-"+c));0<=a&&(0!=(d&1<<Ka.Plus[1])?c="+"+c:0!=(d&1<<Ka.Space[1])&&(c=" "+c));return c=0!=(d&1<<Ka.Minus[1])?V.rpad(c," ",b.width):V.lpad(c," ",b.width)};V.formatString=function(a,b){var c=a,d=b.precision,e=b.width;0<d&&(c=P.substr(a,0,d));d=c.length;0<e&&d<e&&(c=0!=(b.flags&1<<Ka.Minus[1])?V.rpad(c," ",e):V.lpad(c,
" ",e));return c};V.formatNormalFloat=function(a,b){var c,d=b.flags,e=b.precision,f=b.width;-1==e&&(e=6);if(0==e)c=V.str(V.abs(Math.round(a))),0!=(d&1<<Ka.Sharp[1])&&(c+=".");else if(a=V.roundTo(a,Math.pow(.1,e)),isNaN(a))c="NaN";else{c=u["int"](Math.pow(10,e));c=V.str((a*c|0)/c);var g=c.indexOf(".");-1!=g?g=P.substr(c,g+1,null).length:(c+=".",g=0);for(;g<e;)g++,c+="0"}0!=(d&1<<Ka.Plus[1])&&0<=a?c="+"+c:0!=(d&1<<Ka.Space[1])&&0<=a&&(c=" "+c);0!=(d&1<<Ka.Zero[1])&&(c=V.lpad(c,"0",0>a?f-1:f));0>a&&
(c="-"+c);return c=0!=(d&1<<Ka.Minus[1])?V.rpad(c," ",f):V.lpad(c," ",f)};V.formatCharacter=function(a,b){var c=String.fromCharCode(a);1<b.width&&(c=0!=(b.flags&1<<Ka.Minus[1])?V.rpad(c," ",b.width):V.lpad(c," ",b.width));return c};V.padNumber=function(a,b,c,d){var e=a.length;0<d&&e<d&&(a=0!=(c&1<<Ka.Minus[1])?V.rpad(a," ",d):0<=b?V.lpad(a,0!=(c&1<<Ka.Zero[1])?"0":" ",d):0!=(c&1<<Ka.Zero[1])?"-"+V.lpad(P.substr(a,1,null),"0",d):V.lpad(a," ",d));return a};V.lpad=function(a,b,c){if(0>=b.length)throw new F("error");
for(;a.length<c;)a=b+a;return a};V.rpad=function(a,b,c){if(0>=b.length)throw new F("error");for(;a.length<c;)a+=b;return a};V.toHex=function(a){var b="";do b="0123456789ABCDEF".charAt(a&15)+b,a>>>=4;while(0<a);return b};V.toOct=function(a){var b="";do b=(a&7)+b,a>>>=3;while(0<a);return b};V.abs=function(a){return u["int"](Math.abs(a))};V.str=function(a){return u.string(a)};V.codeAt=function(a,b){return a.charCodeAt(b)};V.isDigit=function(a){return 48<=a&&57>=a};V.roundTo=function(a,b){return Math.round(a/
b)*b};V.round=function(a){return Math.round(a)};V.exp=function(a,b){return u["int"](Math.pow(a,b))};V.fabs=function(a){return 0>a?-a:a};V.fsgn=function(a){return 0<a?1:0>a?-1:0};var Ka=n["de.polygonal._Printf.FormatFlags"]={__ename__:["de","polygonal","_Printf","FormatFlags"],__constructs__:"Minus Plus Space Sharp Zero LengthH LengthL Lengthl UpperCase".split(" ")};Ka.Minus=["Minus",0];Ka.Minus.toString=J;Ka.Minus.__enum__=Ka;Ka.Plus=["Plus",1];Ka.Plus.toString=J;Ka.Plus.__enum__=Ka;Ka.Space=["Space",
2];Ka.Space.toString=J;Ka.Space.__enum__=Ka;Ka.Sharp=["Sharp",3];Ka.Sharp.toString=J;Ka.Sharp.__enum__=Ka;Ka.Zero=["Zero",4];Ka.Zero.toString=J;Ka.Zero.__enum__=Ka;Ka.LengthH=["LengthH",5];Ka.LengthH.toString=J;Ka.LengthH.__enum__=Ka;Ka.LengthL=["LengthL",6];Ka.LengthL.toString=J;Ka.LengthL.__enum__=Ka;Ka.Lengthl=["Lengthl",7];Ka.Lengthl.toString=J;Ka.Lengthl.__enum__=Ka;Ka.UpperCase=["UpperCase",8];Ka.UpperCase.toString=J;Ka.UpperCase.__enum__=Ka;var rg=n["de.polygonal._Printf.FormatToken"]={__ename__:["de",
"polygonal","_Printf","FormatToken"],__constructs__:["BareString","Tag","Property","Unknown"]};rg.BareString=function(a){a=["BareString",0,a];a.__enum__=rg;a.toString=J;return a};rg.Tag=function(a,b){var c=["Tag",1,a,b];c.__enum__=rg;c.toString=J;return c};rg.Property=function(a){a=["Property",2,a];a.__enum__=rg;a.toString=J;return a};rg.Unknown=function(a,b){var c=["Unknown",3,a,b];c.__enum__=rg;c.toString=J;return c};var Cb=n["de.polygonal._Printf.FormatDataType"]={__ename__:["de","polygonal","_Printf",
"FormatDataType"],__constructs__:["FmtInteger","FmtFloat","FmtString","FmtPointer","FmtNothing"]};Cb.FmtInteger=function(a){a=["FmtInteger",0,a];a.__enum__=Cb;a.toString=J;return a};Cb.FmtFloat=function(a){a=["FmtFloat",1,a];a.__enum__=Cb;a.toString=J;return a};Cb.FmtString=["FmtString",2];Cb.FmtString.toString=J;Cb.FmtString.__enum__=Cb;Cb.FmtPointer=["FmtPointer",3];Cb.FmtPointer.toString=J;Cb.FmtPointer.__enum__=Cb;Cb.FmtNothing=["FmtNothing",4];Cb.FmtNothing.toString=J;Cb.FmtNothing.__enum__=
Cb;var Mb=n["de.polygonal._Printf.IntegerType"]={__ename__:["de","polygonal","_Printf","IntegerType"],__constructs__:"ICharacter ISignedDecimal IUnsignedDecimal IOctal IHex IBin".split(" ")};Mb.ICharacter=["ICharacter",0];Mb.ICharacter.toString=J;Mb.ICharacter.__enum__=Mb;Mb.ISignedDecimal=["ISignedDecimal",1];Mb.ISignedDecimal.toString=J;Mb.ISignedDecimal.__enum__=Mb;Mb.IUnsignedDecimal=["IUnsignedDecimal",2];Mb.IUnsignedDecimal.toString=J;Mb.IUnsignedDecimal.__enum__=Mb;Mb.IOctal=["IOctal",3];Mb.IOctal.toString=
J;Mb.IOctal.__enum__=Mb;Mb.IHex=["IHex",4];Mb.IHex.toString=J;Mb.IHex.__enum__=Mb;Mb.IBin=["IBin",5];Mb.IBin.toString=J;Mb.IBin.__enum__=Mb;var td=n["de.polygonal._Printf.FloatType"]={__ename__:["de","polygonal","_Printf","FloatType"],__constructs__:["FNormal","FScientific","FNatural"]};td.FNormal=["FNormal",0];td.FNormal.toString=J;td.FNormal.__enum__=td;td.FScientific=["FScientific",1];td.FScientific.toString=J;td.FScientific.__enum__=td;td.FNatural=["FNatural",2];td.FNatural.toString=J;td.FNatural.__enum__=
td;var ca=function(){};n["de.polygonal.ds.ArrayUtil"]=ca;ca.__name__=["de","polygonal","ds","ArrayUtil"];ca.alloc=function(a){return Array(a)};ca.shrink=function(a,b){a.length>b&&(a.length=b);return a};ca.copy=function(a,b,c,d){null==d&&(d=-1);null==c&&(c=0);-1==d&&(d=a.length);for(var e=0;c<d;){var f=c++;b[e++]=a[f]}return b};ca.fill=function(a,b,c){null==c&&(c=-1);-1==c&&(c=a.length);for(var d=0;d<c;){var e=d++;a[e]=b}};ca.assign=function(a,b,c,d){null==d&&(d=-1);-1==d&&(d=a.length);null==c&&(c=
[]);for(var e=0;e<d;){var f=e++;a[f]=ua.createInstance(b,c)}};ca.memmove=function(a,b,c,d){if(c!=b)if(c<=b){c+=d;b+=d;for(var e=0;e<d;)e++,c--,b--,a[b]=a[c]}else for(e=0;e<d;)e++,a[b]=a[c],c++,b++};ca.bsearchComparator=function(a,b,c,d,e){for(var f,g=d+1;c<g;)f=c+(g-c>>1),0>e(a[f],b)?c=f+1:g=f;return c<=d&&0==e(a[c],b)?c:~c};ca.bsearchInt=function(a,b,c,d){for(var e,f=d+1;c<f;)e=c+(f-c>>1),a[e]<b?c=e+1:f=e;return c<=d&&a[c]==b?c:~c};ca.bsearchFloat=function(a,b,c,d){for(var e,f=d+1;c<f;)e=c+(f-c>>
1),a[e]<b?c=e+1:f=e;return c<=d&&a[c]==b?c:~c};ca.shuffle=function(a,b){var c=a.length;if(null==b)for(var d=Math;1<--c;){var e=u["int"](d.random()*c),f=a[c];a[c]=a[e];a[e]=f}else for(d=0;1<--c;)e=u["int"](b[d++]*c),f=a[c],a[c]=a[e],a[e]=f};ca.sortRange=function(a,b,c,d,e){1<a.length&&(c?ca._insertionSort(a,d,e,b):ca._quickSort(a,d,e,b))};ca.quickPerm=function(a){var b=[],c=[],d=[],e,f,g;for(e=0;e<a;)f=e++,c[f]=f+1,d[f]=0;b.push(c.slice());for(e=1;e<a;)d[e]<e?(f=e%2*d[e],g=c[f],c[f]=c[e],c[e]=g,b.push(c.slice()),
d[e]++,e=1):(d[e]=0,e++);return b};ca.equals=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};ca.split=function(a,b,c){for(var d=[],e=null,f=0;f<b;){var g=f++;0==g%c&&(d[g/c|0]=e=[]);e.push(a[g])}return d};ca._insertionSort=function(a,b,c,d){var e=b+1;for(c=b+c;e<c;){for(var f=e++,g=a[f];f>b;){var k=a[f-1];if(0<d(k,g))a[f]=k,f--;else break}a[f]=g}};ca._quickSort=function(a,b,c,d){var e=b+c-1,f=b,g=e;if(1<c){var k=b+(c>>1);c=b+c-1;
var p=a[b],h=a[k],l=a[c],m=d(p,l),k=0>m&&0>d(p,h)?0>d(h,l)?k:c:0>d(h,p)&&0>d(h,l)?0>m?b:c:0>d(l,p)?k:b;c=a[k];for(a[k]=a[b];f<g;){for(;0>d(c,a[g])&&f<g;)g--;g!=f&&(a[f]=a[g],f++);for(;0<d(c,a[f])&&f<g;)f++;g!=f&&(a[g]=a[f],g--)}a[f]=c;ca._quickSort(a,b,f-b,d);ca._quickSort(a,f+1,e-f,d)}};var yl=function(){};n["de.polygonal.ds.Cloneable"]=yl;yl.__name__=["de","polygonal","ds","Cloneable"];yl.prototype={__class__:yl};var zl=function(){};n["de.polygonal.ds.Hashable"]=zl;zl.__name__=["de","polygonal",
"ds","Hashable"];zl.prototype={__class__:zl};var sg=function(){};n["de.polygonal.ds.Collection"]=sg;sg.__name__=["de","polygonal","ds","Collection"];sg.__interfaces__=[zl];sg.prototype={__class__:sg};var pe=function(){};n["de.polygonal.ds.Comparable"]=pe;pe.__name__=["de","polygonal","ds","Comparable"];pe.prototype={__class__:pe};var pf=function(a,b){null==a&&(a=0);this._size=0;this._iterator=null;this.maxSize=-1;this._a=0<a?ca.alloc(a):[];this.key=Id._counter++;this.reuseIterator=!1};n["de.polygonal.ds.DA"]=
pf;pf.__name__=["de","polygonal","ds","DA"];pf.__interfaces__=[sg];pf.prototype={pack:function(){if(this._a.length!=this._size){var a=this._a;this._a=ca.alloc(this._size);for(var b=0,c=this._size;b<c;){var d=b++;this._a[d]=a[d]}b=this._size;for(c=a.length;b<c;)d=b++,a[d]=null}},reserve:function(a){if(this._size!=a){var b=this._a;this._a=ca.alloc(a);if(this._size<a){a=0;for(var c=this._size;a<c;){var d=a++;this._a[d]=b[d]}}}},trim:function(a){this._size=a},get:function(a){return this._a[a]},getNext:function(a){return this._a[a+
1==this._size?0:a+1]},getPrev:function(a){return this._a[-1==a-1?this._size-1:a-1]},set:function(a,b){this._a[a]=b;a>=this._size&&this._size++},swp:function(a,b){var c=this._a[a];this._a[a]=this._a[b];a>=this._size&&this._size++;this._a[b]=c;b>=this._size&&this._size++},cpy:function(a,b){this._a[a]=this._a[b];a>=this._size&&this._size++},front:function(){return this._a[0]},back:function(){return this._a[this._size-1]},popBack:function(){var a=this._a[this._size-1];this._size--;return a},pushBack:function(a){this.set(this._size,
a)},popFront:function(){return this.removeAt(0)},pushFront:function(a){this.insertAt(0,a)},insertAt:function(a,b){for(var c=this._size;c>a;)this.__cpy(c--,c);this._a[a]=b;this._size++},removeAt:function(a){for(var b=this._a[a],c=this._size-1;a<c;)this.__cpy(a++,a);this._size--;return b},swapPop:function(a){this.__set(a,this.__get(--this._size))},removeRange:function(a,b,c){if(null==c){var d=this._size;for(a+=b;a<d;)this._a[a-b]=this._a[a],a++}else{d=this._size;a+=b;for(var e,f;a<d;)f=a-b,e=this._a[f],
c.set(c._size,e),this.__cpy(f,a++)}this._size-=b;return c},concat:function(a,b){null==b&&(b=!1);if(b){var c=new pf;c._size=this._size+a._size;for(var d=0,e=this._size;d<e;){var f=d++;c._a[f]=this._a[f];f>=c._size&&c._size++}d=this._size;for(e=this._size+a._size;d<e;)f=d++,c._a[f]=a._a[f-this._size],f>=c._size&&c._size++;return c}c=this._size;this._size+=a._size;d=0;for(e=a._size;d<e;)f=d++,this.__set(c++,a._a[f]);return this},indexOf:function(a,b,c,d){null==c&&(c=!1);null==b&&(b=0);if(0==this._size)return-1;
if(c){if(null!=d)return ca.bsearchComparator(this._a,a,b,this._size-1,d);for(var e=c=this._size;b<e;)d=b+(e-b>>1),0>q.__cast(this._a[d],pe).compare(a)?b=d+1:e=d;return b<=c&&0==q.__cast(this._a[b],pe).compare(a)?b:-b}c=b;b=-1;d=this._size-1;do if(this._a[c]==a){b=c;break}while(c++<d);return b},lastIndexOf:function(a,b){null==b&&(b=-1);if(0==this._size)return-1;0>b&&(b=this._size+b);var c=-1,d=b;do if(this._a[d]==a){c=d;break}while(0<d--);return c},reverse:function(){this._a.length>this._size&&(this._a=
ca.shrink(this._a,this._size));this._a.reverse()},assign:function(a,b,c){null==c&&(c=0);0<c?this._size=c:c=this._size;null==b&&(b=[]);for(var d=0;d<c;){var e=d++;this.__set(e,ua.createInstance(a,b))}},fill:function(a,b){null==b&&(b=0);0<b?this._size=b:b=this._size;for(var c=0;c<b;){var d=c++;this._a[d]=a}return this},memmove:function(a,b,c){if(b!=a)if(b<=a){b+=c;a+=c;for(var d=0;d<c;)d++,b--,a--,this._a[a]=this._a[b]}else for(d=0;d<c;)d++,this._a[a]=this._a[b],b++,a++},join:function(a){if(0==this._size)return"";
if(1==this._size)return u.string(this._a[0]);for(var b=u.string(this._a[0])+a,c=1,d=this._size-1;c<d;)var e=c++,b=b+u.string(this._a[e]),b=b+a;return b+=u.string(this._a[this._size-1])},sort:function(a,b,c,d){null==d&&(d=-1);null==c&&(c=0);null==b&&(b=!1);1<this._size&&(-1==d&&(d=this._size-c),null==a?b?this._insertionSortComparable(c,d):this._quickSortComparable(c,d):b?this._insertionSort(c,d,a):0==c&&d==this._size?(ca.shrink(this._a,this._size),this._a.sort(a)):this._quickSort(c,d,a))},inRange:function(a){return 0<=
a&&a<this._size},getArray:function(){return this._a},free:function(){for(var a=0,b=this._a.length;a<b;){var c=a++;this._a[c]=null}this._iterator=this._a=null},contains:function(a){for(var b=!1,c=0,d=this._size;c<d;){var e=c++;if(this._a[e]==a){b=!0;break}}return b},remove:function(a){if(0==this._size)return!1;for(var b=0,c=this._size;b<c;)if(this._a[b]==a){c--;for(var d=b;d<c;)this._a[d]=this._a[d+1],++d}else b++;a=0!=this._size-c;this._size=c;return a},clear:function(a){null==a&&(a=!1);if(a){a=0;
for(var b=this._a.length;a<b;){var c=a++;this._a[c]=null}}this._size=0},iterator:function(){return this.reuseIterator?(null==this._iterator?this._iterator=new uh(this):this._iterator.reset(),this._iterator):new uh(this)},size:function(){return this._size},isEmpty:function(){return 0==this._size},toArray:function(){for(var a=ca.alloc(this._size),b=0,c=this._size;b<c;){var d=b++;a[d]=this._a[d]}return a},clone:function(a,b){null==a&&(a=!0);var c=new pf(this._size,this.maxSize);c._size=this._size;if(a)for(var d=
0,e=this._size;d<e;){var f=d++;c._a[f]=this._a[f]}else if(null==b)for(d=null,e=0,f=this._size;e<f;){var g=e++,d=q.__cast(this._a[g],yl);c.__set(g,d.clone())}else for(d=0,e=this._size;d<e;)f=d++,c.__set(f,b(this._a[f]));return c},shuffle:function(a){var b=this._size;if(null==a)for(a=Math;1<--b;){var c=u["int"](a.random()*b),d=this._a[b];this._a[b]=this._a[c];this._a[c]=d}else for(c=0;1<--b;){var d=u["int"](a.get(c++)*b),e=this._a[b];this._a[b]=this._a[d];this._a[d]=e}},toString:function(){var a="{ DA size: "+
this._size+" }";if(0==this._size)return a;for(var a=a+"\n[\n",b=0,c=this._size;b<c;)var d=b++,a=a+V.format("  %4d -> %s\n",[d,u.string(this._a[d])]);return a+"]"},_quickSort:function(a,b,c){var d=a+b-1,e=a,f=d;if(1<b){var g=a+(b>>1);b=a+b-1;var k=this._a[a],p=this._a[g],h=this._a[b],l=c(k,h),g=0>l&&0>c(k,p)?0>c(p,h)?g:b:0>c(p,k)&&0>c(p,h)?0>l?a:b:0>c(h,k)?g:a;b=this._a[g];for(this._a[g]=this._a[a];e<f;){for(;0>c(b,this._a[f])&&e<f;)f--;f!=e&&(this._a[e]=this._a[f],e++);for(;0<c(b,this._a[e])&&e<f;)e++;
f!=e&&(this._a[f]=this._a[e],f--)}this._a[e]=b;this._quickSort(a,e-a,c);this._quickSort(e+1,d-e,c)}},_quickSortComparable:function(a,b){var c=a+b-1,d=a,e=c;if(1<b){var f=a+(b>>1),g=a+b-1,k;k=q.__cast(this._a[a],pe);var p;p=q.__cast(this._a[f],pe);var h;h=q.__cast(this._a[g],pe);var l=k.compare(h),f=0>l&&0>k.compare(p)?0>p.compare(h)?f:g:0>k.compare(p)&&0>p.compare(h)?0>l?a:g:0>h.compare(k)?f:a,g=q.__cast(this._a[f],pe);for(this._a[f]=this._a[a];d<e;){for(;0>g.compare(q.__cast(this._a[e],pe))&&d<e;)e--;
e!=d&&(this._a[d]=this._a[e],d++);for(;0<g.compare(q.__cast(this._a[d],pe))&&d<e;)d++;e!=d&&(this._a[e]=this._a[d],e--)}this._a[d]=g;this._quickSortComparable(a,d-a);this._quickSortComparable(d+1,c-d)}},_insertionSort:function(a,b,c){var d=a+1;for(b=a+b;d<b;){for(var e=d++,f=this._a[e];e>a;){var g=this._a[e-1];if(0<c(g,f))this._a[e]=g,e--;else break}this._a[e]=f}},_insertionSortComparable:function(a,b){for(var c=a+1,d=a+b;c<d;){for(var e=c++,f=this._a[e];e>a;){var g=this._a[e-1];if(0<q.__cast(g,pe).compare(f))this._a[e]=
g,e--;else break}this._a[e]=f}},__get:function(a){return this._a[a]},__set:function(a,b){this._a[a]=b},__cpy:function(a,b){this._a[a]=this._a[b]},__class__:pf};var Ze=function(){};n["de.polygonal.ds.Itr"]=Ze;Ze.__name__=["de","polygonal","ds","Itr"];Ze.prototype={__class__:Ze};var uh=function(a){this._f=a;this._a=this._f._a;this._s=this._f._size;this._i=0;this};n["de.polygonal.ds.DAIterator"]=uh;uh.__name__=["de","polygonal","ds","DAIterator"];uh.__interfaces__=[Ze];uh.prototype={reset:function(){this._a=
this._f._a;this._s=this._f._size;this._i=0;return this},hasNext:function(){return this._i<this._s},next:function(){return this._a[this._i++]},remove:function(){this._f.removeAt(--this._i);this._s--},__a:function(a){return a._a},__size:function(a){return a._size},__class__:uh};var Id=function(){};n["de.polygonal.ds.HashKey"]=Id;Id.__name__=["de","polygonal","ds","HashKey"];Id.next=function(){return Id._counter++};var tg=function(){};n["de.polygonal.ds.Map"]=tg;tg.__name__=["de","polygonal","ds","Map"];
tg.__interfaces__=[sg];tg.prototype={__class__:tg};var aj=function(a,b,c,d){null==d&&(d=-1);null==c&&(c=!0);null==b&&(b=-1);-1==b&&(b=a);this._isResizable=c;this._h=new qe(a,b,c,d);this._keys=ca.alloc(b);this._vals=ca.alloc(b);this._next=ca.alloc(b);a=0;for(c=b-1;a<c;)d=a++,this._next[d]=d+1;this._next[b-1]=-1;this._sizeLevel=this._free=0;this._iterator=null;this._tmpArr=[];this.key=Id._counter++;this.reuseIterator=!1};n["de.polygonal.ds.HashTable"]=aj;aj.__name__=["de","polygonal","ds","HashTable"];
aj.__interfaces__=[tg];aj.prototype={getLoadFactor:function(){return this._h.getLoadFactor()},getSlotCount:function(){return this._h._mask+1},getCapacity:function(){return this._h._capacity},getCollisionCount:function(){return this._h.getCollisionCount()},getFront:function(a){a=this._h.getFront(a.key);return-2147483648==a?null:this._vals[a]},setIfAbsent:function(a,b){if(this._h._size==this._h._capacity){if(this._h.setIfAbsent(a.key,this._h._size))return this._expand(this._h._capacity>>1),this._vals[this._free]=
b,this._keys[this._free]=a,this._free=this._next[this._free],!0}else if(this._h.setIfAbsent(a.key,this._free))return this._vals[this._free]=b,this._keys[this._free]=a,this._free=this._next[this._free],!0;return!1},rehash:function(a){this._h.rehash(a)},remap:function(a,b){var c=this._h.get(a.key);return-2147483648!=c?(this._vals[c]=b,!0):!1},toKeyArray:function(){for(var a=ca.alloc(this._h._size),b=0,c=0,d=this._h._capacity;c<d;){var e=c++;null!=this._keys[e]&&(a[b++]=this._keys[e])}return a},toKeyDA:function(){for(var a=
new pf(this._h._size),b=0,c=this._h._capacity;b<c;){var d=b++;null!=this._keys[d]&&a.set(a._size,this._keys[d])}return a},pack:function(){for(var a=0,b=this._h._capacity;a<b;){var c=a++;null!=this._keys[c]&&(this._vals[c]=null)}},toString:function(){var a=V.format("{ HashTable size/capacity: %d/%d, load factor: %.2f }",[this._h._size,this._h._capacity,this._h.getLoadFactor()]);if(0==this._h._size)return a;for(var a=a+"\n[\n",b=0,c=this.keys();c.hasNext();){var d=c.next(),d=u.string(d).length;b>d||
(b=d)}for(c=this.keys();c.hasNext();)d=c.next(),a+=V.format("  %- "+b+"s -> %s\n",[d,u.string(this.get(d))]);return a+"]"},has:function(a){for(var b=!1,c=0,d=this._h._capacity;c<d;){var e=c++;if(null!=this._keys[e]&&this._vals[e]==a){b=!0;break}}return b},hasKey:function(a){return this._h.hasKey(a.key)},get:function(a){a=this._h.get(a.key);return-2147483648==a?null:this._vals[a]},getAll:function(a,b){if(-2147483648==this._h.get(a.key))return 0;for(var c=this._h.getAll(a.key,this._tmpArr),d=0;d<c;){var e=
d++;b[e]=this._vals[this._tmpArr[e]]}return c},set:function(a,b){this._h._size==this._h._capacity&&this._expand(this._h._capacity);var c=this._h.set(a.key,this._free);this._vals[this._free]=b;this._keys[this._free]=a;this._free=this._next[this._free];return c},clr:function(a){var b=this._h.get(a.key);if(-2147483648==b)return!1;this._keys[b]=null;this._next[b]=this._free;this._free=b;b=!1;0<this._sizeLevel&&this._h._size-1==this._h._capacity>>2&&this._isResizable&&(b=!0);this._h.clr(a.key);b&&this._shrink();
return!0},toValSet:function(){for(var a=new Of,b=0,c=this._h._capacity;b<c;){var d=b++;null!=this._keys[d]&&a.set(this._vals[d])}return a},toKeySet:function(){for(var a=new Of,b=0,c=this._h._capacity;b<c;){var d=b++;null!=this._keys[d]&&a.set(this._keys[d])}return a},keys:function(){return new bj(this)},free:function(){for(var a=0,b=this._h._size;a<b;){var c=a++;this._vals[c]=null;this._keys[c]=null}this._next=this._keys=this._vals=null;this._h.free();this._tmpArr=this._iterator=this._h=null},contains:function(a){return this.has(a)},
remove:function(a){for(var b=!1,c=[],d=0,e=this._h._capacity;d<e;){var f=d++;null!=this._keys[f]&&this._vals[f]==a&&(c.push(this._keys[f]),b=!0)}if(b){for(a=0;a<c.length;)b=c[a],++a,this.clr(b);return!0}return!1},clear:function(a){null==a&&(a=!1);this._h.clear(a);for(var b=0,c=this._h._capacity;b<c;){var d=b++;this._keys[d]=null}if(a){a=0;for(b=this._h._capacity;a<b;)c=a++,this._vals[c]=null,this._keys[c]=null;for(;0<this._sizeLevel;)this._shrink()}a=0;for(b=this._h._capacity-1;a<b;)c=a++,this._next[c]=
c+1;this._next[this._h._capacity-1]=-1;this._free=0},iterator:function(){return this.reuseIterator?(null==this._iterator?this._iterator=new vh(this):this._iterator.reset(),this._iterator):new vh(this)},isEmpty:function(){return 0==this._h._size},size:function(){return this._h._size},toArray:function(){for(var a=ca.alloc(this._h._size),b=0,c=0,d=this._h._capacity;c<d;){var e=c++;null!=this._keys[e]&&(a[b++]=this._vals[e])}return a},clone:function(a,b){null==a&&(a=!0);var c=ua.createEmptyInstance(aj);
c.key=Id._counter++;c._h=this._h.clone(!1);if(a)c._vals=[],ca.copy(this._vals,c._vals,null,null);else{var d=ca.alloc(this._h._capacity);if(null!=b)for(var e=0,f=this._h._capacity;e<f;){var g=e++;null!=this._keys[g]&&(d[g]=b(this._vals[g]))}else for(e=null,f=0,g=this._h._capacity;f<g;){var k=f++;null!=this._keys[k]&&(e=this._vals[k],d[k]=e.clone())}c._vals=d}c._sizeLevel=this._sizeLevel;c._free=this._free;c._next=[];ca.copy(this._next,c._next,null,null);c._keys=[];ca.copy(this._keys,c._keys,null,null);
return c},_expand:function(a){var b=a<<1,c=ca.alloc(b);ca.copy(this._next,c,0,a);this._next=c;c=ca.alloc(b);ca.copy(this._keys,c,0,a);this._keys=c;for(var c=a-1,d=b-1;c<d;){var e=c++;this._next[e]=e+1}this._next[b-1]=-1;this._free=a;b=ca.alloc(b);ca.copy(this._vals,b,0,a);this._vals=b;this._sizeLevel++},_shrink:function(){this._sizeLevel--;var a=this._h._capacity;this._next=ca.alloc(a);for(var b=0,c=a-1;b<c;){var d=b++;this._next[d]=d+1}this._next[a-1]=-1;this._free=0;b=ca.alloc(a);a=ca.alloc(a);
for(c=this._h.iterator();c.hasNext();)d=c.next(),b[this._free]=this._keys[d],a[this._free]=this._vals[d],this._free=this._next[this._free];this._keys=b;this._vals=a;a=0;for(b=this._free;a<b;)c=a++,this._h.remap(this._keys[c].key,c)},__getNext:function(a){return this._next[a]},__setNext:function(a,b){this._next[a]=b},__key:function(a){return a.key},__class__:aj};var bj=function(a){this._f=a;this._keys=this._f._keys;this._i=-1;this._s=this._f._h._capacity;this};n["de.polygonal.ds.HashTableKeyIterator"]=
bj;bj.__name__=["de","polygonal","ds","HashTableKeyIterator"];bj.__interfaces__=[Ze];bj.prototype={reset:function(){this._keys=this._f._keys;this._i=-1;this._s=this._f._h._capacity;return this},hasNext:function(){for(;++this._i<this._s;)if(null!=this._keys[this._i])return!0;return!1},next:function(){return this._keys[this._i]},remove:function(){throw new F("unsupported operation");},__vals:function(a){return a._vals},__keys:function(a){return a._keys},__class__:bj};var vh=function(a){this._f=a;this._vals=
this._f._vals;this._keys=this._f._keys;this._i=-1;this._s=this._f._h._capacity;this};n["de.polygonal.ds.HashTableValIterator"]=vh;vh.__name__=["de","polygonal","ds","HashTableValIterator"];vh.__interfaces__=[Ze];vh.prototype={reset:function(){this._vals=this._f._vals;this._keys=this._f._keys;this._i=-1;this._s=this._f._h._capacity;return this},hasNext:function(){for(;++this._i<this._s;)if(null!=this._keys[this._i])return!0;return!1},next:function(){return this._vals[this._i]},remove:function(){throw new F("unsupported operation");
},__vals:function(a){return a._vals},__keys:function(a){return a._keys},__class__:vh};var wh=function(){};n["de.polygonal.ds.Set"]=wh;wh.__name__=["de","polygonal","ds","Set"];wh.__interfaces__=[sg];wh.prototype={__class__:wh};var Ae=function(a,b,c,d){null==c&&(c=!0);null==b&&(b=-1);this._isResizable=c;-1==b&&(b=a);this._free=0;this._capacity=b;this._size=0;this._mask=a-1;this._sizeLevel=0;this._iterator=null;this.maxSize=-1;this._hash=ca.alloc(a);ca.fill(this._hash,-1,a);this._data=ca.alloc(this._capacity<<
1);this._next=ca.alloc(this._capacity);a=1;for(c=0;c<b;)c++,this._data[a-1]=-2147483648,this._data[a]=-1,a+=2;b=0;for(a=this._capacity-1;b<a;)c=b++,this._next[c]=c+1;this._next[this._capacity-1]=-1;this.key=Id._counter++;this.reuseIterator=!1};n["de.polygonal.ds.IntHashSet"]=Ae;Ae.__name__=["de","polygonal","ds","IntHashSet"];Ae.__interfaces__=[wh];Ae.prototype={getLoadFactor:function(){return this._size/(this._mask+1)},getSlotCount:function(){return this._mask+1},getCapacity:function(){return this._capacity},
getCollisionCount:function(){for(var a=0,b,c=0,d=this._mask+1;c<d;)if(b=c++,b=this._hash[b],-1!=b)for(b=this._data[b+1];-1!=b;)b=this._data[b+1],a++;return a},hasFront:function(a){var b=73856093*a&this._mask,c=this._hash[b];if(-1==c)return!1;if(this._data[c]==a)return!0;for(var d=!1,e=c,f=e,c=this._data[c+1];-1!=c;){if(this._data[c]==a){this._data[f+1]=this._data[c+1];this._data[c+1]=e;this._hash[b]=c;d=!0;break}c=this.__getData((f=c)+1)}return d},rehash:function(a){if(a!=this._mask+1){a=new Ae(a,
this._capacity);for(var b=0,c=this._capacity;b<c;){var d=b++,d=this._data[d<<1];-2147483648!=d&&a.set(d)}this._hash=a._hash;this._data=a._data;this._next=a._next;this._mask=a._mask;this._free=a._free;this._sizeLevel=a._sizeLevel}},toString:function(){var a=V.format("{ IntHashSet size/capacity: %d/%d, load factor: %.2f }",[this._size,this._capacity,this._size/(this._mask+1)]);if(0==this._size)return a;for(var a=a+"\n[\n",b=this.iterator();b.hasNext();)var c=b.next(),a=a+("  "+c+"\n");return a+"]"},
has:function(a){var b=this._hash[73856093*a&this._mask];if(-1==b)return!1;if(this._data[b]==a)return!0;for(var c=!1,b=this._data[b+1];-1!=b;){if(this._data[b]==a){c=!0;break}b=this._data[b+1]}return c},set:function(a){var b=73856093*a&this._mask,c=this._hash[b];if(-1==c)return this._size==this._capacity&&this._expand(),c=this._free<<1,this._free=this._next[this._free],this._hash[b]=c,this._data[c]=a,this._size++,!0;if(this._data[c]==a)return!1;for(b=this._data[c+1];-1!=b;){if(this._data[b]==a){c=
-1;break}c=b;b=this._data[b+1]}if(-1==c)return!1;if(this._size==this._capacity){if(!this._isResizable)throw new F("hash set is full ("+this._capacity+")");this._expand()}b=this._free<<1;this._free=this._next[this._free];this._data[b]=a;this._data[c+1]=b;this._size++;return!0},free:function(){this._iterator=this._next=this._data=this._hash=null},contains:function(a){return this.has(a)},remove:function(a){var b=73856093*a&this._mask,c=this._hash[b];if(-1==c)return!1;if(a==this._data[c])return this._hash[b]=
-1==this._data[c+1]?-1:this._data[c+1],a=c>>1,this._next[a]=this._free,this._free=a,this._data[c]=-2147483648,this._data[c+1]=-1,this._size--,0<this._sizeLevel&&this._size==this._capacity>>2&&this._isResizable&&this._shrink(),!0;for(var b=!1,d=c,c=this._data[c+1];-1!=c;){if(this._data[c]==a){b=!0;break}c=this.__getData((d=c)+1)}return b?(this._data[d+1]=this._data[c+1],a=c>>1,this._next[a]=this._free,this._free=a,this._data[c]=-2147483648,this._data[c+1]=-1,--this._size,0<this._sizeLevel&&this._size==
this._capacity>>2&&this._isResizable&&this._shrink(),!0):!1},size:function(){return this._size},clear:function(a){null==a&&(a=!1);a&&0<this._sizeLevel&&(this._capacity>>=this._sizeLevel,this._sizeLevel=0,this._data=ca.alloc(this._capacity<<1),this._next=ca.alloc(this._capacity));ca.fill(this._hash,-1,this._mask+1);a=1;for(var b=0,c=this._capacity;b<c;)b++,this._data[a-1]=-2147483648,this._data[a]=-1,a+=2;a=0;for(b=this._capacity-1;a<b;)c=a++,this._next[c]=c+1;this._next[this._capacity-1]=-1;this._size=
this._free=0},iterator:function(){return this.reuseIterator?(null==this._iterator?this._iterator=new xh(this):this._iterator.reset(),this._iterator):new xh(this)},isEmpty:function(){return 0==this._size},toArray:function(){for(var a=ca.alloc(this._size),b=0,c=0,d=this._capacity;c<d;){var e=c++,e=this._data[e<<1];-2147483648!=e&&(a[b++]=e)}return a},clone:function(a,b){var c=ua.createEmptyInstance(Ae);c.key=Id._counter++;c.maxSize=this.maxSize;c._hash=[];ca.copy(this._hash,c._hash,null,null);c._data=
[];ca.copy(this._data,c._data,null,null);c._next=[];ca.copy(this._next,c._next,null,null);c._mask=this._mask;c._capacity=this._capacity;c._free=this._free;c._size=this._size;c._sizeLevel=this._sizeLevel;return c},_hashCode:function(a){return 73856093*a&this._mask},_expand:function(){this._sizeLevel++;var a=this._capacity,b=a<<1;this._capacity=b;var c=ca.alloc(b);ca.copy(this._next,c,0,a);this._next=c;c=ca.alloc(b<<1);ca.copy(this._data,c,0,a<<1);this._data=c;for(var c=a-1,d=b-1;c<d;){var e=c++;this._next[e]=
e+1}this._next[b-1]=-1;this._free=a;b=(a<<1)+1;for(c=0;c<a;)c++,this._data[b-1]=-2147483648,this._data[b]=-1,b+=2},_shrink:function(){this._sizeLevel--;var a=this._capacity>>1;this._capacity=a;var b=a<<1,c=ca.alloc(b);this._next=ca.alloc(a);for(var d=0,e=0,f=this._mask+1;e<f;){var g=e++,k=this._hash[g];if(-1!=k)for(this._hash[g]=d,c[d++]=this._data[k],c[d++]=-1,k=this._data[k+1];-1!=k;)c[d-1]=d,c[d++]=this._data[k],c[d++]=-1,k=this._data[k+1]}for(d=b>>1;d<b;)c[d++]=-2147483648,c[d++]=-1;this._data=
c;b=0;for(c=a-1;b<c;)d=b++,this._next[d]=d+1;this._next[a-1]=-1;this._free=a>>1},__getHash:function(a){return this._hash[a]},__setHash:function(a,b){this._hash[a]=b},__getNext:function(a){return this._next[a]},__setNext:function(a,b){this._next[a]=b},__getData:function(a){return this._data[a]},__setData:function(a,b){this._data[a]=b},__class__:Ae};var xh=function(a){this._f=a;this._data=this._f._data;this._i=0;for(this._s=this._f._capacity;this._i<this._s&&-2147483648==this._data[this._i<<1];)this._i++};
n["de.polygonal.ds.IntHashSetIterator"]=xh;xh.__name__=["de","polygonal","ds","IntHashSetIterator"];xh.__interfaces__=[Ze];xh.prototype={reset:function(){this._data=this._f._data;this._i=0;for(this._s=this._f._capacity;this._i<this._s&&-2147483648==this._data[this._i<<1];)this._i++;return this},hasNext:function(){return this._i<this._s},next:function(){for(var a=this.__getData(this._i++<<1);this._i<this._s&&-2147483648==this._data[this._i<<1];)this._i++;return a},remove:function(){throw new F("unsupported operation");
},_scan:function(){for(;this._i<this._s&&-2147483648==this._data[this._i<<1];)this._i++},__getData:function(a){return this._data[a]},__class__:xh};var Kc=function(a,b,c,d){null==d&&(d=-1);null==c&&(c=!0);null==b&&(b=-1);-1==b&&(b=a);this._isResizable=c;this._h=new qe(a,b,c,d);this._vals=ca.alloc(b);this.maxSize=-1;this._next=ca.alloc(b);this._keys=ca.alloc(b);ca.fill(this._keys,-2147483648,b);a=0;for(c=b-1;a<c;)d=a++,this._next[d]=d+1;this._next[b-1]=-1;this._sizeLevel=this._i0=this._key0=this._free=
0;this._iterator=null;this._tmpArr=[];this.key=Id._counter++;this.reuseIterator=!1};n["de.polygonal.ds.IntHashTable"]=Kc;Kc.__name__=["de","polygonal","ds","IntHashTable"];Kc.__interfaces__=[tg];Kc.prototype={getLoadFactor:function(){return this._h.getLoadFactor()},getSlotCount:function(){return this._h._mask+1},getCapacity:function(){return this._h._capacity},getCollisionCount:function(){return this._h.getCollisionCount()},getFront:function(a){if(this._key0==a)return this._vals[this._i0];var b=this._h.getFront(a);
if(-2147483648==b)return null;this._key0=a;return this._vals[this._i0=b]},setIfAbsent:function(a,b){if(this._h._size==this._h._capacity){if(this._h.setIfAbsent(a,this._free))return this._key0=-2147483648,this._expand(this._h._capacity>>1),this._vals[this._free]=b,this._keys[this._free]=a,this._free=this._next[this._free],!0}else if(this._h.setIfAbsent(a,this._free))return this._key0=-2147483648,this._vals[this._free]=b,this._keys[this._free]=a,this._free=this._next[this._free],!0;return!1},rehash:function(a){this._h.rehash(a)},
remap:function(a,b){var c=this._h.get(a);return-2147483648!=c?(this._vals[c]=b,!0):!1},toKeyArray:function(){return this._h.toKeyArray()},toKeyDA:function(){return this._h.toKeyDA()},toString:function(){var a=V.format("{ IntHashTable size/capacity: %d/%d, load factor: %.2f }",[this._h._size,this._h._capacity,this._h.getLoadFactor()]);if(0==this._h._size)return a;for(var a=a+"\n[\n",b=0,c=this.keys();c.hasNext();)var d=c.next(),b=Math.max(b,d);for(c=1;0!=b;)c++,b=b/10|0;for(b=this.keys();b.hasNext();)d=
b.next(),a+=V.format("  %- "+c+"d -> %s\n",[d,u.string(this._vals[this._h.getFront(d)])]);return a+"]"},has:function(a){for(var b=!1,c=0,d=this._h._capacity;c<d;){var e=c++;if(-2147483648!=this._keys[e]&&this._vals[e]==a){b=!0;break}}return b},hasKey:function(a){return this._h.hasKey(a)},count:function(a){return this._h.count(a)},get:function(a){a=this._h.get(a);return-2147483648==a?null:this._vals[a]},getAll:function(a,b){if(-2147483648==this._h.get(a))return 0;for(var c=this._h.getAll(a,this._tmpArr),
d=0;d<c;){var e=d++;b[e]=this._vals[this._tmpArr[e]]}return c},set:function(a,b){this._key0=-2147483648;this._h._size==this._h._capacity&&this._expand(this._h._capacity);this._h.set(a,this._free);this._vals[this._free]=b;this._keys[this._free]=a;this._free=this._next[this._free];return!0},clr:function(a){var b=this._h.get(a);if(-2147483648==b)return!1;this._key0=-2147483648;this._vals[b]=null;this._keys[b]=-2147483648;this._next[b]=this._free;this._free=b;b=!1;0<this._sizeLevel&&this._h._size-1==
this._h._capacity>>2&&this._isResizable&&(b=!0);this._h.clr(a);b&&this._shrink();return!0},toValSet:function(){for(var a=new Of,b=0,c=this._h._capacity;b<c;){var d=b++;-2147483648!=this._keys[d]&&a.set(this._vals[d])}return a},toKeySet:function(){return this._h.toKeySet()},keys:function(){return this._h.keys()},free:function(){for(var a=0,b=this._h._size;a<b;){var c=a++;this._vals[c]=null}this._next=this._keys=this._vals=null;this._h.free();this._tmpArr=this._iterator=this._h=null},contains:function(a){return this.has(a)},
remove:function(a){for(var b=!1,c=[],d=0,e=this._h._capacity;d<e;){var f=d++;-2147483648!=this._keys[f]&&this._vals[f]==a&&(c.push(this._keys[f]),b=!0)}if(b){for(a=0;a<c.length;)b=c[a],++a,this.clr(b);return!0}return!1},clear:function(a){null==a&&(a=!1);this._h.clear(a);for(var b=0,c=this._h._capacity;b<c;){var d=b++;this._keys[d]=-2147483648}if(a){for(;0<this._sizeLevel;)this._shrink();a=0;for(b=this._h._capacity;a<b;)c=a++,this._vals[c]=null,this._keys[c]=-2147483648}a=0;for(b=this._h._capacity-
1;a<b;)c=a++,this._next[c]=c+1;this._next[this._h._capacity-1]=-1;this._free=0},iterator:function(){return this.reuseIterator?(null==this._iterator?this._iterator=new yh(this):this._iterator.reset(),this._iterator):new yh(this)},isEmpty:function(){return 0==this._h._size},size:function(){return this._h._size},toArray:function(){for(var a=ca.alloc(this._h._size),b=0,c=0,d=this._h._capacity;c<d;){var e=c++;-2147483648!=this._keys[e]&&(a[b++]=this._vals[e])}return a},clone:function(a,b){null==a&&(a=
!0);var c=ua.createEmptyInstance(Kc);c.key=Id._counter++;c.maxSize=this.maxSize;c._h=this._h.clone(!1);if(a)c._vals=[],ca.copy(this._vals,c._vals,null,null);else{var d=ca.alloc(this._h._capacity);if(null!=b)for(var e=0,f=this._h._capacity;e<f;){var g=e++;-2147483648!=this._keys[g]&&(d[g]=b(this._vals[g]))}else for(e=null,f=0,g=this._h._capacity;f<g;){var k=f++;-2147483648!=this._keys[k]&&(e=this._vals[k],d[k]=e.clone())}c._vals=d}c._sizeLevel=this._sizeLevel;c._free=this._free;c._key0=this._key0;
c._i0=this._i0;c._next=[];ca.copy(this._next,c._next,null,null);c._keys=[];ca.copy(this._keys,c._keys,null,null);return c},_expand:function(a){var b=a<<1,c=ca.alloc(b);ca.copy(this._next,c,0,a);this._next=c;c=ca.alloc(b);ca.copy(this._keys,c,0,a);this._keys=c;for(c=a;c<b;){var d=c++;this._keys[d]=-2147483648}c=a-1;for(d=b-1;c<d;){var e=c++;this._next[e]=e+1}this._next[b-1]=-1;this._free=a;b=ca.alloc(b);ca.copy(this._vals,b,0,a);this._vals=b;this._sizeLevel++},_shrink:function(){this._sizeLevel--;
var a=this._h._capacity;this._next=ca.alloc(a);for(var b=0,c=a-1;b<c;){var d=b++;this._next[d]=d+1}this._next[a-1]=-1;this._free=0;b=ca.alloc(a);ca.fill(b,-2147483648,a);a=ca.alloc(a);for(c=this._h.iterator();c.hasNext();)d=c.next(),b[this._free]=this._keys[d],a[this._free]=this._vals[d],this._free=this._next[this._free];this._keys=b;this._vals=a;a=0;for(b=this._free;a<b;)c=a++,this._h.remap(this._keys[c],c)},_invalidate:function(){this._key0=-2147483648},__getNext:function(a){return this._next[a]},
__setNext:function(a,b){this._next[a]=b},__getKey:function(a){return this._keys[a]},__setKey:function(a,b){this._keys[a]=b},__clrKey:function(a){this._keys[a]=-2147483648},__hasKey:function(a){return-2147483648!=this._keys[a]},__class__:Kc};var yh=function(a){this._f=a;this._vals=this._f._vals;this._keys=this._f._keys;this._i=-1;this._s=this._f._h._capacity;this};n["de.polygonal.ds.IntHashTableIterator"]=yh;yh.__name__=["de","polygonal","ds","IntHashTableIterator"];yh.__interfaces__=[Ze];yh.prototype=
{reset:function(){this._vals=this._f._vals;this._keys=this._f._keys;this._i=-1;this._s=this._f._h._capacity;return this},hasNext:function(){for(;++this._i<this._s;)if(-2147483648!=this._keys[this._i])return!0;return!1},next:function(){return this._vals[this._i]},remove:function(){throw new F("unsupported operation");},__vals:function(a){return a._vals},__keys:function(a){return a._keys},__class__:yh};var qe=function(a,b,c,d){null==c&&(c=!0);null==b&&(b=-1);-1==b&&(b=a);this._isResizable=c;this._free=
0;this._capacity=b;this._size=0;this._mask=a-1;this._sizeLevel=0;this._iterator=null;this.maxSize=-1;this._hash=ca.alloc(a);ca.fill(this._hash,-1,a);this._data=ca.alloc(3*this._capacity);ca.fill(this._data,0,3*this._capacity);this._next=ca.alloc(this._capacity);ca.fill(this._next,0,this._capacity);a=2;for(c=0;c<b;)c++,this._data[a-1]=-2147483648,this._data[a]=-1,a+=3;b=0;for(a=this._capacity-1;b<a;)c=b++,this._next[c]=c+1;this._next[this._capacity-1]=-1;this.key=Id._counter++;this.reuseIterator=!1};
n["de.polygonal.ds.IntIntHashTable"]=qe;qe.__name__=["de","polygonal","ds","IntIntHashTable"];qe.__interfaces__=[tg];qe.prototype={getLoadFactor:function(){return this._size/(this._mask+1)},getSlotCount:function(){return this._mask+1},getCapacity:function(){return this._capacity},getCollisionCount:function(){for(var a=0,b,c=0,d=this._mask+1;c<d;)if(b=c++,b=this._hash[b],-1!=b)for(b=this._data[b+2];-1!=b;)b=this._data[b+2],a++;return a},getFront:function(a){var b=73856093*a&this._mask,c=this._hash[b];
if(-1==c)return-2147483648;if(this._data[c]==a)return this._data[c+1];for(var d=-2147483648,e=c,f=e,c=this._data[c+2];-1!=c;){if(this._data[c]==a){d=this._data[c+1];this._data[f+2]=this._data[c+2];this._data[c+2]=e;this._hash[b]=c;break}c=this.__getData((f=c)+2)}return d},setIfAbsent:function(a,b){var c=73856093*a&this._mask,d=this._hash[c];if(-1==d)return this._size==this._capacity&&this._isResizable&&this._expand(),d=3*this._free,this._free=this._next[this._free],this._hash[c]=d,this._data[d]=a,
this._data[d+1]=b,this._size++,!0;if(this._data[d]==a)return!1;for(c=this._data[d+2];-1!=c;){if(this._data[c]==a){d=-1;break}c=this.__getData((d=c)+2)}if(-1==d)return!1;this._size==this._capacity&&this._isResizable&&this._expand();c=3*this._free;this._free=this._next[this._free];this._data[d+2]=c;this._data[c]=a;this._data[c+1]=b;this._size++;return!0},rehash:function(a){if(a!=this._mask+1){a=new qe(a,this._capacity);for(var b=0,c=this._capacity;b<c;){var d=b++,e=this._data[3*d+1];-2147483648!=e&&
a.set(this._data[3*d],e)}this._hash=a._hash;this._data=a._data;this._next=a._next;this._mask=a._mask;this._free=a._free;this._sizeLevel=a._sizeLevel}},remap:function(a,b){var c=this._hash[73856093*a&this._mask];if(-1==c)return!1;if(this._data[c]==a)return this._data[c+1]=b,!0;for(c=this._data[c+2];-1!=c;){if(this._data[c]==a){this._data[c+1]=b;break}c=this._data[c+2]}return-1!=c},extract:function(a){var b=73856093*a&this._mask,c=this._hash[b];if(-1==c)return-2147483648;if(a==this._data[c])return a=
this._data[c+1],this._hash[b]=-1==this._data[c+2]?-1:this._data[c+2],b=c/3|0,this._next[b]=this._free,this._free=b,this._data[c+1]=-2147483648,this._data[c+2]=-1,this._size--,0<this._sizeLevel&&this._size==this._capacity>>2&&this._isResizable&&this._shrink(),a;for(var d=c,c=this._data[c+2],b=-2147483648;-1!=c;){if(this._data[c]==a){b=this._data[c+1];break}c=this.__getData((d=c)+2)}return-2147483648!=b?(this._data[d+2]=this._data[c+2],a=c/3|0,this._next[a]=this._free,this._free=a,this._data[c+1]=-2147483648,
this._data[c+2]=-1,--this._size,0<this._sizeLevel&&this._size==this._capacity>>2&&this._isResizable&&this._shrink(),b):-2147483648},removePair:function(a,b){return!1},toKeyArray:function(){if(0==this._size)return[];for(var a=ca.alloc(this._size),b=0,c=0,d=this._capacity;c<d;){var e=c++;-2147483648!=this._data[3*e+1]&&(a[b++]=this._data[3*e])}return a},toKeyDA:function(){for(var a=new pf(this._size),b=0,c=this._capacity;b<c;){var d=b++;-2147483648!=this._data[3*d+1]&&a.set(a._size,this._data[3*d])}return a},
toString:function(){var a=V.format("[ IntIntHashTable size/capacity: %d/%d, load factor: %.2f }",[this._size,this._capacity,this._size/(this._mask+1)]);if(0==this._size)return a;for(var a=a+"\n[\n",b=0,c=this.keys();c.hasNext();)var d=c.next(),b=Math.max(b,d);for(c=1;0!=b;)c++,b=b/10|0;for(b=this.keys();b.hasNext();)d=b.next(),a+=V.format("  %- "+c+"d -> %d\n",[d,this.get(d)]);return a+"]"},has:function(a){for(var b=!1,c=0,d=this._capacity;c<d;){var e=c++;if(this._data[3*e+1]==a){b=!0;break}}return b},
hasKey:function(a){var b=this._hash[73856093*a&this._mask];if(-1==b)return!1;if(this._data[b]==a)return!0;for(var c=!1,b=this._data[b+2];-1!=b;){if(this._data[b]==a){c=!0;break}b=this._data[b+2]}return c},count:function(a){var b=0,c=this._hash[73856093*a&this._mask];if(-1!=c)for(;-1!=c;)this._data[c]==a&&b++,c=this._data[c+2];return b},get:function(a){var b=this._hash[73856093*a&this._mask];if(-1==b)return-2147483648;if(this._data[b]==a)return this._data[b+1];for(var c=-2147483648,b=this._data[b+
2];-1!=b;){if(this._data[b]==a){c=this._data[b+1];break}b=this._data[b+2]}return c},getAll:function(a,b){var c=this._hash[73856093*a&this._mask];if(-1==c)return 0;var d=0;this._data[c]==a&&(b[d++]=this._data[c+1]);for(c=this._data[c+2];-1!=c;)this._data[c]==a&&(b[d++]=this._data[c+1]),c=this._data[c+2];return d},set:function(a,b){this._size==this._capacity&&this._isResizable&&this._expand();var c=3*this._free;this._free=this._next[this._free];this._data[c]=a;this._data[c+1]=b;var d=73856093*a&this._mask,
e=this._hash[d];if(-1==e)return this._hash[d]=c,this._size++,!0;for(var d=this._data[e]!=a,f=this._data[e+2];-1!=f;)this._data[f]==a&&(d=!1),e=f,f=this._data[f+2];this._data[e+2]=c;this._size++;return d},clr:function(a){var b=73856093*a&this._mask,c=this._hash[b];if(-1==c)return!1;if(a==this._data[c])return this._hash[b]=-1==this._data[c+2]?-1:this._data[c+2],a=c/3|0,this._next[a]=this._free,this._free=a,this._data[c+1]=-2147483648,this._data[c+2]=-1,this._size--,0<this._sizeLevel&&this._size==this._capacity>>
2&&this._isResizable&&this._shrink(),!0;for(var b=!1,d=c,c=this._data[c+2];-1!=c;){if(this._data[c]==a){b=!0;break}c=this.__getData((d=c)+2)}return b?(this._data[d+2]=this._data[c+2],a=c/3|0,this._next[a]=this._free,this._free=a,this._data[c+1]=-2147483648,this._data[c+2]=-1,--this._size,0<this._sizeLevel&&this._size==this._capacity>>2&&this._isResizable&&this._shrink(),!0):!1},toValSet:function(){for(var a=new Ae(this._capacity),b=0,c=this._capacity;b<c;){var d=b++,d=this._data[3*d+1];-2147483648!=
d&&a.set(d)}return a},toKeySet:function(){for(var a=new Ae(this._capacity),b=0,c=this._capacity;b<c;){var d=b++;-2147483648!=this._data[3*d+1]&&a.set(this._data[3*d])}return a},keys:function(){return new cj(this)},free:function(){this._iterator=this._next=this._data=this._hash=null},contains:function(a){return this.has(a)},remove:function(a){for(var b=0,c=[],d=0,e=this._capacity;d<e;){var f=3*d++;this._data[f+1]==a&&(c[b++]=this._data[f])}if(0<b){for(a=0;a<c.length;)b=c[a],++a,this.clr(b);return!0}return!1},
size:function(){return this._size},clear:function(a){null==a&&(a=!1);a&&0<this._sizeLevel&&(this._capacity>>=this._sizeLevel,this._sizeLevel=0,this._data=ca.alloc(3*this._capacity),this._next=ca.alloc(this._capacity));ca.fill(this._hash,-1,this._mask+1);a=2;for(var b=0,c=this._capacity;b<c;)b++,this._data[a-1]=-2147483648,this._data[a]=-1,a+=3;a=0;for(b=this._capacity-1;a<b;)c=a++,this._next[c]=c+1;this._next[this._capacity-1]=-1;this._size=this._free=0},iterator:function(){return this.reuseIterator?
(null==this._iterator?this._iterator=new zh(this):this._iterator.reset(),this._iterator):new zh(this)},isEmpty:function(){return 0==this._size},toArray:function(){for(var a=ca.alloc(this._size),b=0,c=0,d=this._capacity;c<d;){var e=c++,e=this._data[3*e+1];-2147483648!=e&&(a[b++]=e)}return a},clone:function(a,b){var c=ua.createEmptyInstance(qe);c.key=Id._counter++;c.maxSize=this.maxSize;c._hash=[];ca.copy(this._hash,c._hash,null,null);c._data=[];ca.copy(this._data,c._data,null,null);c._next=[];ca.copy(this._next,
c._next,null,null);c._mask=this._mask;c._capacity=this._capacity;c._free=this._free;c._size=this._size;c._sizeLevel=this._sizeLevel;return c},_hashCode:function(a){return 73856093*a&this._mask},_expand:function(){this._sizeLevel++;var a=this._capacity,b=a<<1;this._capacity=b;var c=ca.alloc(b);ca.copy(this._next,c,0,a);this._next=c;c=ca.alloc(3*b);ca.copy(this._data,c,0,3*a);this._data=c;for(var c=a-1,d=b-1;c<d;){var e=c++;this._next[e]=e+1}this._next[b-1]=-1;this._free=a;b=3*a+2;for(c=0;c<a;)c++,
this._data[b-1]=-2147483648,this._data[b]=-1,b+=3},_shrink:function(){this._sizeLevel--;var a=this._capacity>>1;this._capacity=a;var b=3*a,c=ca.alloc(b);this._next=ca.alloc(a);for(var d=0,e=0,f=this._mask+1;e<f;){var g=e++,k=this._hash[g];if(-1!=k)for(this._hash[g]=d,c[d]=this._data[k],c[d+1]=this._data[k+1],c[d+2]=-1,d+=3,k=this._data[k+2];-1!=k;)c[d-1]=d,c[d]=this._data[k],c[d+1]=this._data[k+1],c[d+2]=-1,d+=3,k=this._data[k+2]}for(d=b>>1;d<b;)c[d+1]=-2147483648,c[d+2]=-1,d+=3;this._data=c;b=0;
for(c=a-1;b<c;)d=b++,this._next[d]=d+1;this._next[a-1]=-1;this._free=a>>1},__getHash:function(a){return this._hash[a]},__setHash:function(a,b){this._hash[a]=b},__getNext:function(a){return this._next[a]},__setNext:function(a,b){this._next[a]=b},__getData:function(a){return this._data[a]},__setData:function(a,b){this._data[a]=b},__class__:qe};var zh=function(a){this._f=a;this._data=this._f._data;this._i=0;for(this._s=this._f._capacity;this._i<this._s&&-2147483648==this._data[3*this._i+1];)this._i++};
n["de.polygonal.ds.IntIntHashTableValIterator"]=zh;zh.__name__=["de","polygonal","ds","IntIntHashTableValIterator"];zh.__interfaces__=[Ze];zh.prototype={reset:function(){this._data=this._f._data;this._i=0;for(this._s=this._f._capacity;this._i<this._s&&-2147483648==this._data[3*this._i+1];)this._i++;return this},hasNext:function(){return this._i<this._s},next:function(){for(var a=this.__getData(3*this._i++ +1);this._i<this._s&&-2147483648==this._data[3*this._i+1];)this._i++;return a},remove:function(){throw new F("unsupported operation");
},_scan:function(){for(;this._i<this._s&&-2147483648==this._data[3*this._i+1];)this._i++},__getData:function(a){return this._data[a]},__class__:zh};var cj=function(a){this._f=a;this._data=this._f._data;this._i=0;for(this._s=this._f._capacity;this._i<this._s&&-2147483648==this._data[3*this._i+1];)this._i++};n["de.polygonal.ds.IntIntHashTableKeyIterator"]=cj;cj.__name__=["de","polygonal","ds","IntIntHashTableKeyIterator"];cj.__interfaces__=[Ze];cj.prototype={reset:function(){this._data=this._f._data;
this._i=0;for(this._s=this._f._capacity;this._i<this._s&&-2147483648==this._data[3*this._i+1];)this._i++;return this},hasNext:function(){return this._i<this._s},next:function(){for(var a=this.__getData(3*this._i++);this._i<this._s&&-2147483648==this._data[3*this._i+1];)this._i++;return a},remove:function(){throw new F("unsupported operation");},_scan:function(){for(;this._i<this._s&&-2147483648==this._data[3*this._i+1];)this._i++},__getData:function(a){return this._data[a]},__class__:cj};var Of=function(){this._a=
new pf;this.key=Id._counter++;this.reuseIterator=!1};n["de.polygonal.ds.ListSet"]=Of;Of.__name__=["de","polygonal","ds","ListSet"];Of.__interfaces__=[wh];Of.prototype={toString:function(){var a="{ ListSet size: "+this.size()+" }";if(this.isEmpty())return a;for(var a=a+"\n[\n",b=0,c=this.size();b<c;)var d=b++,a=a+("  "+u.string(this._a._a[d])+"\n");return a+"]"},has:function(a){return this._a.contains(a)},set:function(a){if(this._a.contains(a))return!1;this._a.pushBack(a);return!0},merge:function(a,
b,c){if(b)for(c=a.iterator();c.hasNext();)a=c.next(),this.set(a);else if(null!=c)for(a=a.iterator();a.hasNext();)b=a.next(),this.set(c(b));else for(c=a.iterator();c.hasNext();)a=c.next(),this.set(a.clone())},free:function(){this._a.free();this._a=null},contains:function(a){return this._a.contains(a)},remove:function(a){return this._a.remove(a)},clear:function(a){null==a&&(a=!1);this._a.clear(a)},iterator:function(){this._a.reuseIterator=this.reuseIterator;return this._a.iterator()},isEmpty:function(){return 0==
this._a._size},size:function(){return this._a._size},toArray:function(){return this._a.toArray()},clone:function(a,b){null==a&&(a=!0);var c=ua.createEmptyInstance(Of);c.key=Id._counter++;c._a=this._a.clone(a,b);return c},__class__:Of};var Ln=function(){};n["de.polygonal.ds.error.Assert"]=Ln;Ln.__name__=["de","polygonal","ds","error","Assert"];var nd=n["haxe.StackItem"]={__ename__:["haxe","StackItem"],__constructs__:["CFunction","Module","FilePos","Method","LocalFunction"]};nd.CFunction=["CFunction",
0];nd.CFunction.toString=J;nd.CFunction.__enum__=nd;nd.Module=function(a){a=["Module",1,a];a.__enum__=nd;a.toString=J;return a};nd.FilePos=function(a,b,c){a=["FilePos",2,a,b,c];a.__enum__=nd;a.toString=J;return a};nd.Method=function(a,b){var c=["Method",3,a,b];c.__enum__=nd;c.toString=J;return c};nd.LocalFunction=function(a){a=["LocalFunction",4,a];a.__enum__=nd;a.toString=J;return a};var Ia=function(){};n["haxe.CallStack"]=Ia;Ia.__name__=["haxe","CallStack"];Ia.lastException=null;Ia.getStack=function(a){if(null==
a)return[];var b=Error.prepareStackTrace;Error.prepareStackTrace=function(a,b){for(var e=[],f=0;f<b.length;){var g=b[f];++f;null!=Ia.wrapCallSite&&(g=Ia.wrapCallSite(g));var k=null,p=g.getFunctionName();if(null!=p){var h=p.lastIndexOf(".");0<=h&&(k=P.substr(p,0,h),p=P.substr(p,h+1,null),k=nd.Method(k,p))}e.push(nd.FilePos(k,g.getFileName(),g.getLineNumber()))}return e};a=Ia.makeStack(a.stack);Error.prepareStackTrace=b;return a};Ia.wrapCallSite=null;Ia.callStack=function(){try{throw Error();}catch(a){Ia.lastException=
a;a instanceof F&&(a=a.val);var b=Ia.getStack(a);b.shift();return b}};Ia.exceptionStack=function(){return Ia.getStack(Ia.lastException)};Ia.toString=function(a){for(var b=new je,c=0;c<a.length;){var d=a[c];++c;b.b+="\nCalled from ";Ia.itemToString(b,d)}return b.b};Ia.itemToString=function(a,b){switch(b[1]){case 0:a.b+="a C function";break;case 1:var c=b[2];a.b+="module ";a.b=null==c?a.b+"null":a.b+(""+c);break;case 2:var c=b[4],d=b[3],e=b[2];null!=e&&(Ia.itemToString(a,e),a.b+=" (");a.b=null==d?a.b+
"null":a.b+(""+d);a.b+=" line ";a.b=null==c?a.b+"null":a.b+(""+c);null!=e&&(a.b+=")");break;case 3:c=b[3];d=b[2];a.b=null==d?a.b+"null":a.b+(""+d);a.b+=".";a.b=null==c?a.b+"null":a.b+(""+c);break;case 4:c=b[2],a.b+="local function #",a.b=null==c?a.b+"null":a.b+(""+c)}};Ia.makeStack=function(a){if(null==a)return[];if("string"==typeof a){a=a.split("\n");"Error"==a[0]&&a.shift();for(var b=[],c=new Rd("^   at ([A-Za-z0-9_. ]+) \\(([^)]+):([0-9]+):([0-9]+)\\)$",""),d=0;d<a.length;){var e=a[d];++d;if(c.match(e)){var e=
c.matched(1).split("."),f=e.pop(),g=c.matched(2),k=u.parseInt(c.matched(3));b.push(nd.FilePos("Anonymous function"==f?nd.LocalFunction():"Global code"==f?null:nd.Method(e.join("."),f),g,k))}else b.push(nd.Module(Ca.trim(e)))}return b}return a};var Ah=function(){};n["haxe.IMap"]=Ah;Ah.__name__=["haxe","IMap"];Ah.prototype={__class__:Ah};var ug={};n["haxe._Int32.Int32_Impl_"]=ug;ug.__name__=["haxe","_Int32","Int32_Impl_"];ug.ucompare=function(a,b){return 0>a?0>b?~b-~a|0:1:0>b?-1:a-b|0};var $i={};n["haxe._Int64.Int64_Impl_"]=
$i;$i.__name__=["haxe","_Int64","Int64_Impl_"];$i.toString=function(a){var b=a;if(function(a){a=new Bb(0,0);return b.high==a.high&&b.low==a.low}(this))return"0";a="";var c=!1;if(0>b.high){var c=!0,d=~b.high,e=-b.low;if(0==e){var f=d++,d=d|0;f}b=new Bb(d,e)}for(d=new Bb(0,10);function(a){a=new Bb(0,0);return b.high!=a.high||b.low!=a.low}(this);)e=$i.divMod(b,d),a=e.modulus.low+a,b=e.quotient;c&&(a="-"+a);return a};$i.divMod=function(a,b){if(0==b.high)switch(b.low){case 0:throw new F("divide by zero");
case 1:return{quotient:new Bb(a.high,a.low),modulus:new Bb(0,0)}}var c=0>a.high!=0>b.high,d;if(0>a.high){var e=~a.high,f=-a.low;if(0==f){var g=e++,e=e|0;g}d=new Bb(e,f)}else d=new Bb(a.high,a.low);0>b.high&&(e=~b.high,f=-b.low,0==f&&(g=e++,e|=0,g),b=new Bb(e,f));var e=new Bb(0,0),k;for(k=new Bb(0,1);!(0>b.high||(f=ug.ucompare(b.high,d.high),f=0!=f?f:ug.ucompare(b.low,d.low),g=1,g&=63,b=0==g?new Bb(b.high,b.low):32>g?new Bb(b.high<<g|b.low>>>32-g,b.low<<g):new Bb(b.low<<g-32,0),g=1,g&=63,k=0==g?new Bb(k.high,
k.low):32>g?new Bb(k.high<<g|k.low>>>32-g,k.low<<g):new Bb(k.low<<g-32,0),0<=f)););for(;function(a){a=new Bb(0,0);return k.high!=a.high||k.low!=a.low}(this);){if(0<=function(a){a=ug.ucompare(d.high,b.high);return 0!=a?a:ug.ucompare(d.low,b.low)}(this)){e=new Bb(e.high|k.high,e.low|k.low);f=d.high-b.high|0;g=d.low-b.low|0;if(0>ug.ucompare(d.low,b.low)){var p=f--,f=f|0;p}d=new Bb(f,g)}f=1;f&=63;k=0==f?new Bb(k.high,k.low):32>f?new Bb(k.high>>>f,k.high<<32-f|k.low>>>f):new Bb(0,k.high>>>f-32);f=1;f&=
63;b=0==f?new Bb(b.high,b.low):32>f?new Bb(b.high>>>f,b.high<<32-f|b.low>>>f):new Bb(0,b.high>>>f-32)}c&&(c=~e.high,e=-e.low,0==e&&(f=c++,c|=0,f),e=new Bb(c,e));0>a.high&&(c=~d.high,f=-d.low,0==f&&(g=c++,c|=0,g),d=new Bb(c,f));return{quotient:e,modulus:d}};var Bb=function(a,b){this.high=a;this.low=b};n["haxe._Int64.___Int64"]=Bb;Bb.__name__=["haxe","_Int64","___Int64"];Bb.prototype={__class__:Bb};var Al=function(){};n["haxe.Log"]=Al;Al.__name__=["haxe","Log"];Al.trace=function(a,b){q.__trace(a,b)};
var Bh=function(){};n["haxe.Resource"]=Bh;Bh.__name__=["haxe","Resource"];Bh.content=null;Bh.getString=function(a){for(var b=0,c=Bh.content;b<c.length;){var d=c[b];++b;if(d.name==a)return null!=d.str?d.str:vg.decode(d.data).toString()}return null};var Yd=function(){this.buf=new je;this.cache=[];this.useCache=Yd.USE_CACHE;this.useEnumIndex=Yd.USE_ENUM_INDEX;this.shash=new ma;this.scount=0};n["haxe.Serializer"]=Yd;Yd.__name__=["haxe","Serializer"];Yd.run=function(a){var b=new Yd;b.serialize(a);return b.toString()};
Yd.prototype={toString:function(){return this.buf.b},serializeString:function(a){var b=this.shash.get(a);null!=b?(this.buf.b+="R",this.buf.b=null==b?this.buf.b+"null":this.buf.b+(""+b)):(this.shash.set(a,this.scount++),this.buf.b+="y",a=encodeURIComponent(a),this.buf.b=null==a.length?this.buf.b+"null":this.buf.b+(""+a.length),this.buf.b+=":",this.buf.b=null==a?this.buf.b+"null":this.buf.b+(""+a))},serializeRef:function(a){for(var b=typeof a,c=0,d=this.cache.length;c<d;){var e=c++,f=this.cache[e];
if(typeof f==b&&f==a)return this.buf.b+="r",this.buf.b=null==e?this.buf.b+"null":this.buf.b+(""+e),!0}this.cache.push(a);return!1},serializeFields:function(a){for(var b=0,c=O.fields(a);b<c.length;){var d=c[b];++b;this.serializeString(d);this.serialize(O.field(a,d))}this.buf.b+="g"},serialize:function(a){var b=ua["typeof"](a);switch(b[1]){case 0:this.buf.b+="n";break;case 1:if(0==a){this.buf.b+="z";break}this.buf.b+="i";this.buf.b=null==a?this.buf.b+"null":this.buf.b+(""+a);break;case 2:isNaN(a)?this.buf.b+=
"k":isFinite(a)?(this.buf.b+="d",this.buf.b=null==a?this.buf.b+"null":this.buf.b+(""+a)):this.buf.b=0>a?this.buf.b+"m":this.buf.b+"p";break;case 3:this.buf.b=a?this.buf.b+"t":this.buf.b+"f";break;case 6:b=b[2];if(b==String){this.serializeString(a);break}if(this.useCache&&this.serializeRef(a))break;switch(b){case Array:b=0;this.buf.b+="a";for(var c=a.length,d=0;d<c;){var e=d++;null==a[e]?b++:(0<b&&(1==b?this.buf.b+="n":(this.buf.b+="u",this.buf.b=null==b?this.buf.b+"null":this.buf.b+(""+b)),b=0),this.serialize(a[e]))}0<
b&&(1==b?this.buf.b+="n":(this.buf.b+="u",this.buf.b=null==b?this.buf.b+"null":this.buf.b+(""+b)));this.buf.b+="h";break;case Af:this.buf.b+="l";a=a.h;for(b=null;null!=a;)b=a[0],a=a[1],this.serialize(b);this.buf.b+="h";break;case Date:this.buf.b+="v";this.buf.add(a.getTime());break;case ma:this.buf.b+="b";for(b=a.keys();b.hasNext();)c=b.next(),this.serializeString(c),this.serialize(null!=Ab[c]?a.getReserved(c):a.h[c]);this.buf.b+="h";break;case xa:this.buf.b+="q";for(b=a.keys();b.hasNext();)c=b.next(),
this.buf.b+=":",this.buf.b=null==c?this.buf.b+"null":this.buf.b+(""+c),this.serialize(a.h[c]);this.buf.b+="h";break;case rd:this.buf.b+="M";for(b=a.keys();b.hasNext();)c=b.next(),d=O.field(c,"__id__"),O.deleteField(c,"__id__"),this.serialize(c),c.__id__=d,this.serialize(a.h[c.__id__]);this.buf.b+="h";break;case Ya:d=0;e=a.length-2;b=new je;for(c=Yd.BASE64;d<e;){var f=a.get(d++),g=a.get(d++),k=a.get(d++);b.add(c.charAt(f>>2));b.add(c.charAt((f<<4|g>>4)&63));b.add(c.charAt((g<<2|k>>6)&63));b.add(c.charAt(k&
63))}d==e?(e=a.get(d++),a=a.get(d++),b.add(c.charAt(e>>2)),b.add(c.charAt((e<<4|a>>4)&63)),b.add(c.charAt(a<<2&63))):d==e+1&&(a=a.get(d++),b.add(c.charAt(a>>2)),b.add(c.charAt(a<<4&63)));a=b.b;this.buf.b+="s";this.buf.b=null==a.length?this.buf.b+"null":this.buf.b+(""+a.length);this.buf.b+=":";this.buf.b=null==a?this.buf.b+"null":this.buf.b+(""+a);break;default:this.useCache&&this.cache.pop(),null!=a.hxSerialize?(this.buf.b+="C",this.serializeString(ua.getClassName(b)),this.useCache&&this.cache.push(a),
a.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(ua.getClassName(b)),this.useCache&&this.cache.push(a),this.serializeFields(a))}break;case 4:if(q.__instanceof(a,Fn))a=ua.getClassName(a),this.buf.b+="A",this.serializeString(a);else if(q.__instanceof(a,Mn))this.buf.b+="B",this.serializeString(ua.getEnumName(a));else{if(this.useCache&&this.serializeRef(a))break;this.buf.b+="o";this.serializeFields(a)}break;case 7:b=b[2];if(this.useCache){if(this.serializeRef(a))break;this.cache.pop()}this.buf.b=
this.useEnumIndex?this.buf.b+"j":this.buf.b+"w";this.serializeString(ua.getEnumName(b));this.useEnumIndex?(this.buf.b+=":",this.buf.b+=u.string(a[1])):this.serializeString(a[0]);this.buf.b+=":";b=a.length;this.buf.b+=u.string(b-2);for(c=2;c<b;)d=c++,this.serialize(a[d]);this.useCache&&this.cache.push(a);break;case 5:throw new F("Cannot serialize function");default:throw new F("Cannot serialize "+u.string(a));}},__class__:Yd};var Ad=function(a){var b=this;this.id=setInterval(function(){b.run()},a)};
n["haxe.Timer"]=Ad;Ad.__name__=["haxe","Timer"];Ad.delay=function(a,b){var c=new Ad(b);c.run=function(){c.stop();a()};return c};Ad.measure=function(a,b){var c=Ad.stamp(),d=a();Al.trace(Ad.stamp()-c+"s",b);return d};Ad.stamp=function(){return(new Date).getTime()/1E3};Ad.prototype={stop:function(){null!=this.id&&(clearInterval(this.id),this.id=null)},run:function(){},__class__:Ad};var Jd=function(a){this.buf=a;this.length=a.length;this.pos=0;this.scache=[];this.cache=[];a=Jd.DEFAULT_RESOLVER;null==
a&&(a=ua,Jd.DEFAULT_RESOLVER=a);this.setResolver(a)};n["haxe.Unserializer"]=Jd;Jd.__name__=["haxe","Unserializer"];Jd.initCodes=function(){for(var a=[],b=0,c=Jd.BASE64.length;b<c;){var d=b++;a[Jd.BASE64.charCodeAt(d)]=d}return a};Jd.prototype={setResolver:function(a){this.resolver=null==a?{resolveClass:function(a){return null},resolveEnum:function(a){return null}}:a},get:function(a){return this.buf.charCodeAt(a)},readDigits:function(){for(var a=0,b=!1,c=this.pos;;){var d=this.buf.charCodeAt(this.pos);
if(d!=d)break;if(45==d){if(this.pos!=c)break;b=!0}else{if(48>d||57<d)break;a=10*a+(d-48)}this.pos++}b&&(a*=-1);return a},readFloat:function(){for(var a=this.pos;;){var b=this.buf.charCodeAt(this.pos);if(43<=b&&58>b||101==b||69==b)this.pos++;else break}return u.parseFloat(P.substr(this.buf,a,this.pos-a))},unserializeObject:function(a){for(;;){if(this.pos>=this.length)throw new F("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var b=this.unserialize();if("string"!=typeof b)throw new F("Invalid object key");
var c=this.unserialize();a[b]=c}this.pos++},unserializeEnum:function(a,b){if(58!=this.get(this.pos++))throw new F("Invalid enum format");var c=this.readDigits();if(0==c)return ua.createEnum(a,b);for(var d=[];0<c--;)d.push(this.unserialize());return ua.createEnum(a,b,d)},unserialize:function(){switch(this.get(this.pos++)){case 110:return null;case 116:return!0;case 102:return!1;case 122:return 0;case 105:return this.readDigits();case 100:return this.readFloat();case 121:var a=this.readDigits();if(58!=
this.get(this.pos++)||this.length-this.pos<a)throw new F("Invalid string length");var b=P.substr(this.buf,this.pos,a);this.pos+=a;b=decodeURIComponent(b.split("+").join(" "));this.scache.push(b);return b;case 107:return NaN;case 109:return-Infinity;case 112:return Infinity;case 97:a=[];for(this.cache.push(a);;){b=this.buf.charCodeAt(this.pos);if(104==b){this.pos++;break}117==b?(this.pos++,b=this.readDigits(),a[a.length+b-1]=null):a.push(this.unserialize())}return a;case 111:return a={},this.cache.push(a),
this.unserializeObject(a),a;case 114:a=this.readDigits();if(0>a||a>=this.cache.length)throw new F("Invalid reference");return this.cache[a];case 82:a=this.readDigits();if(0>a||a>=this.scache.length)throw new F("Invalid string reference");return this.scache[a];case 120:throw new F(this.unserialize());case 99:a=this.unserialize();b=this.resolver.resolveClass(a);if(null==b)throw new F("Class not found "+a);a=ua.createEmptyInstance(b);this.cache.push(a);this.unserializeObject(a);return a;case 119:a=this.unserialize();
b=this.resolver.resolveEnum(a);if(null==b)throw new F("Enum not found "+a);a=this.unserializeEnum(b,this.unserialize());this.cache.push(a);return a;case 106:a=this.unserialize();b=this.resolver.resolveEnum(a);if(null==b)throw new F("Enum not found "+a);this.pos++;var c=this.readDigits(),d=ua.getEnumConstructs(b)[c];if(null==d)throw new F("Unknown enum index "+a+"@"+c);a=this.unserializeEnum(b,d);this.cache.push(a);return a;case 108:a=new Af;for(this.cache.push(a);104!=this.buf.charCodeAt(this.pos);)a.add(this.unserialize());
this.pos++;return a;case 98:a=new ma;for(this.cache.push(a);104!=this.buf.charCodeAt(this.pos);)b=this.unserialize(),a.set(b,this.unserialize());this.pos++;return a;case 113:a=new xa;this.cache.push(a);for(b=this.get(this.pos++);58==b;)b=this.readDigits(),a.set(b,this.unserialize()),b=this.get(this.pos++);if(104!=b)throw new F("Invalid IntMap format");return a;case 77:a=new rd;for(this.cache.push(a);104!=this.buf.charCodeAt(this.pos);)b=this.unserialize(),a.set(b,this.unserialize());this.pos++;return a;
case 118:return 48<=this.buf.charCodeAt(this.pos)&&57>=this.buf.charCodeAt(this.pos)&&48<=this.buf.charCodeAt(this.pos+1)&&57>=this.buf.charCodeAt(this.pos+1)&&48<=this.buf.charCodeAt(this.pos+2)&&57>=this.buf.charCodeAt(this.pos+2)&&48<=this.buf.charCodeAt(this.pos+3)&&57>=this.buf.charCodeAt(this.pos+3)&&45==this.buf.charCodeAt(this.pos+4)?(a=P.substr(this.buf,this.pos,19),a=P.strDate(a),this.pos+=19):(a=this.readFloat(),b=new Date,b.setTime(a),a=b),this.cache.push(a),a;case 115:a=this.readDigits();
d=this.buf;if(58!=this.get(this.pos++)||this.length-this.pos<a)throw new F("Invalid bytes length");var e=Jd.CODES;null==e&&(e=Jd.initCodes(),Jd.CODES=e);for(var f=this.pos,g=a&3,k=f+(a-g),b=Ya.alloc(3*(a>>2)+(2<=g?g-1:0)),c=0;f<k;){var p=e[Ca.fastCodeAt(d,f++)],h=e[Ca.fastCodeAt(d,f++)];b.set(c++,p<<2|h>>4);p=e[Ca.fastCodeAt(d,f++)];b.set(c++,h<<4|p>>2);h=e[Ca.fastCodeAt(d,f++)];b.set(c++,p<<6|h)}2<=g&&(h=e[Ca.fastCodeAt(d,f++)],k=e[Ca.fastCodeAt(d,f++)],b.set(c++,h<<2|k>>4),3==g&&(d=e[Ca.fastCodeAt(d,
f++)],b.set(c++,k<<4|d>>2)));this.pos+=a;this.cache.push(b);return b;case 67:a=this.unserialize();b=this.resolver.resolveClass(a);if(null==b)throw new F("Class not found "+a);a=ua.createEmptyInstance(b);this.cache.push(a);a.hxUnserialize(this);if(103!=this.get(this.pos++))throw new F("Invalid custom data");return a;case 65:a=this.unserialize();b=this.resolver.resolveClass(a);if(null==b)throw new F("Class not found "+a);return b;case 66:a=this.unserialize();b=this.resolver.resolveEnum(a);if(null==
b)throw new F("Enum not found "+a);return b}this.pos--;throw new F("Invalid char "+this.buf.charAt(this.pos)+" at position "+this.pos);},__class__:Jd};var Ya=function(a){this.length=a.byteLength;this.b=new nc(a);this.b.bufferValue=a;a.hxBytes=this;a.bytes=this.b};n["haxe.io.Bytes"]=Ya;Ya.__name__=["haxe","io","Bytes"];Ya.alloc=function(a){return new Ya(new dj(a))};Ya.ofString=function(a){for(var b=[],c=0;c<a.length;){var d=Ca.fastCodeAt(a,c++);55296<=d&&56319>=d&&(d=d-55232<<10|Ca.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 Ya((new nc(b)).buffer)};Ya.ofData=function(a){var b=a.hxBytes;return null!=b?b:new Ya(a)};Ya.prototype={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 F(ud.OutsideBounds);0==c&&d==b.length?this.b.set(b.b,a):this.b.set(b.b.subarray(c,
c+d),a)},getDouble:function(a){null==this.data&&(this.data=new ej(this.b.buffer,this.b.byteOffset,this.b.byteLength));return this.data.getFloat64(a,!0)},getFloat:function(a){null==this.data&&(this.data=new ej(this.b.buffer,this.b.byteOffset,this.b.byteLength));return this.data.getFloat32(a,!0)},setDouble:function(a,b){null==this.data&&(this.data=new ej(this.b.buffer,this.b.byteOffset,this.b.byteLength));this.data.setFloat64(a,b,!0)},setFloat:function(a,b){null==this.data&&(this.data=new ej(this.b.buffer,
this.b.byteOffset,this.b.byteLength));this.data.setFloat32(a,b,!0)},setUInt16:function(a,b){null==this.data&&(this.data=new ej(this.b.buffer,this.b.byteOffset,this.b.byteLength));this.data.setUint16(a,b,!0)},setInt32:function(a,b){null==this.data&&(this.data=new ej(this.b.buffer,this.b.byteOffset,this.b.byteLength));this.data.setInt32(a,b,!0)},getString:function(a,b){if(0>a||0>b||a+b>this.length)throw new F(ud.OutsideBounds);for(var c="",d=this.b,e=String.fromCharCode,f=a,g=a+b;f<g;){var k=d[f++];
if(128>k){if(0==k)break;c+=e(k)}else if(224>k)c+=e((k&63)<<6|d[f++]&127);else if(240>k)var p=d[f++],c=c+e((k&31)<<12|(p&127)<<6|d[f++]&127);else var p=d[f++],h=d[f++],k=(k&15)<<18|(p&127)<<12|(h&127)<<6|d[f++]&127,c=c+e((k>>10)+55232),c=c+e(k&1023|56320)}return c},toString:function(){return this.getString(0,this.length)},__class__:Ya};var vg=function(){};n["haxe.crypto.Base64"]=vg;vg.__name__=["haxe","crypto","Base64"];vg.decode=function(a,b){null==b&&(b=!0);if(b)for(;61==P.cca(a,a.length-1);)a=P.substr(a,
0,-1);return(new mg(vg.BYTES)).decodeBytes(Ya.ofString(a))};var mg=function(a){for(var b=a.length,c=1;b>1<<c;)c++;if(8<c||b!=1<<c)throw new F("BaseCode : base length must be a power of two.");this.base=a;this.nbits=c};n["haxe.crypto.BaseCode"]=mg;mg.__name__=["haxe","crypto","BaseCode"];mg.prototype={encodeBytes:function(a){for(var b=this.nbits,c=this.base,d=8*a.length/b|0,e=Ya.alloc(d+(0==8*a.length%b?0:1)),f=0,g=0,k=(1<<b)-1,p=0,h=0;h<d;){for(;g<b;)g+=8,f<<=8,f|=a.get(p++);g-=b;e.set(h++,c.b[f>>
g&k])}0<g&&e.set(h++,c.b[f<<b-g&k]);return e},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=Ya.alloc(d),f=0,g=0,k=0,p=0;p<d;){for(;8>g;){var g=g+b,f=f<<b,h=c[a.get(k++)];if(-1==h)throw new F("BaseCode : invalid encoded char");f|=h}g-=8;e.set(p++,f>>g&255)}return e},__class__:mg};var Pf=function(){};
n["haxe.crypto.Md5"]=Pf;Pf.__name__=["haxe","crypto","Md5"];Pf.encode=function(a){var b=new Pf;a=b.doEncode(Pf.str2blks(a));return b.hex(a)};Pf.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]|=P.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};Pf.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,g){return this.cmn(this.bitOR(this.bitAND(b,c),this.bitAND(~b,d)),a,b,e,f,g)},gg:function(a,b,c,d,e,f,g){return this.cmn(this.bitOR(this.bitAND(b,d),this.bitAND(c,~d)),a,b,e,f,g)},hh:function(a,b,c,d,e,f,g){return this.cmn(this.bitXOR(this.bitXOR(b,c),d),a,b,e,f,g)},ii:function(a,b,c,d,e,f,g){return this.cmn(this.bitXOR(c,this.bitOR(b,~d)),a,b,e,f,g)},doEncode:function(a){for(var b=1732584193,c=-271733879,d=-1732584194,e=271733878,f=0;f<a.length;)var g=b,k=c,p=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,g),c=this.addme(c,k),d=this.addme(d,p),e=this.addme(e,h),f=f+16;return[b,c,d,e]},__class__:Pf};var xa=function(){this.h={}};n["haxe.ds.IntMap"]=xa;xa.__name__=["haxe","ds","IntMap"];xa.__interfaces__=[Ah];xa.prototype={set:function(a,b){this.h[a]=b},get:function(a){return this.h[a]},exists:function(a){return this.h.hasOwnProperty(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 P.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__:xa};var rd=function(){this.h={};this.h.__keys__={}};n["haxe.ds.ObjectMap"]=rd;rd.__name__=["haxe","ds","ObjectMap"];rd.__interfaces__=[Ah];rd.prototype={set:function(a,b){var c=a.__id__||(a.__id__=++rd.count);this.h[c]=b;this.h.__keys__[c]=a},get:function(a){return this.h[a.__id__]},exists:function(a){return null!=
this.h.__keys__[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 P.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__:rd};var If=function(a,b){this.map=a;this.keys=b;this.index=
0;this.count=b.length};n["haxe.ds._StringMap.StringMapIterator"]=If;If.__name__=["haxe","ds","_StringMap","StringMapIterator"];If.prototype={hasNext:function(){return this.index<this.count},next:function(){return this.map.get(this.keys[this.index++])},__class__:If};var ma=function(){this.h={}};n["haxe.ds.StringMap"]=ma;ma.__name__=["haxe","ds","StringMap"];ma.__interfaces__=[Ah];ma.prototype={set:function(a,b){null!=Ab[a]?this.setReserved(a,b):this.h[a]=b},get:function(a){return null!=Ab[a]?this.getReserved(a):
this.h[a]},exists:function(a){return null!=Ab[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!=Ab[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 P.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 If(this,this.arrayKeys())},__class__:ma};var H={};n["haxe.ds._Vector.Vector_Impl_"]=H;H.__name__=["haxe","ds","_Vector","Vector_Impl_"];H.blit=function(a,b,c,d,e){for(var f=0;f<e;){var g=f++;c[d+g]=a[b+g]}};H.toArray=function(a){for(var b=[],c=
a.length,d=0;d<c;){var e=d++;b[e]=a[e]}return b};var cn=function(){};n["haxe.io.Eof"]=cn;cn.__name__=["haxe","io","Eof"];cn.prototype={toString:function(){return"Eof"},__class__:cn};var ud=n["haxe.io.Error"]={__ename__:["haxe","io","Error"],__constructs__:["Blocked","Overflow","OutsideBounds","Custom"]};ud.Blocked=["Blocked",0];ud.Blocked.toString=J;ud.Blocked.__enum__=ud;ud.Overflow=["Overflow",1];ud.Overflow.toString=J;ud.Overflow.__enum__=ud;ud.OutsideBounds=["OutsideBounds",2];ud.OutsideBounds.toString=
J;ud.OutsideBounds.__enum__=ud;ud.Custom=function(a){a=["Custom",3,a];a.__enum__=ud;a.toString=J;return a};var Be=function(){};n["haxe.io.FPHelper"]=Be;Be.__name__=["haxe","io","FPHelper"];Be.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)};Be.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};Be.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)};Be.doubleToI64=function(a){var b=Be.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 wg=
function(a){switch(a){case ".":case "..":this.dir=a;this.file="";return}var b=a.lastIndexOf("/"),c=a.lastIndexOf("\\");b<c?(this.dir=P.substr(a,0,c),a=P.substr(a,c+1,null),this.backslash=!0):c<b?(this.dir=P.substr(a,0,b),a=P.substr(a,b+1,null)):this.dir=null;b=a.lastIndexOf(".");-1!=b?(this.ext=P.substr(a,b+1,null),this.file=P.substr(a,0,b)):(this.ext=null,this.file=a)};n["haxe.io.Path"]=wg;wg.__name__=["haxe","io","Path"];wg.withoutExtension=function(a){a=new wg(a);a.ext=null;return a.toString()};
wg.prototype={toString:function(){return(null==this.dir?"":this.dir+(this.backslash?"\\":"/"))+this.file+(null==this.ext?"":"."+this.ext)},__class__:wg};var Bl=function(a){this.__x=a};n["haxe.xml._Fast.NodeAccess"]=Bl;Bl.__name__=["haxe","xml","_Fast","NodeAccess"];Bl.prototype={resolve:function(a){var b=this.__x.elementsNamed(a).next();if(null==b)throw b=this.__x.nodeType==ba.Document?"Document":this.__x.get_nodeName(),new F(b+" is missing element "+a);return new Qd(b)},__class__:Bl};var Cl=function(a){this.__x=
a};n["haxe.xml._Fast.AttribAccess"]=Cl;Cl.__name__=["haxe","xml","_Fast","AttribAccess"];Cl.prototype={resolve:function(a){if(this.__x.nodeType==ba.Document)throw new F("Cannot access document attribute "+a);var b=this.__x.get(a);if(null==b)throw new F(this.__x.get_nodeName()+" is missing attribute "+a);return b},__class__:Cl};var Dl=function(a){this.__x=a};n["haxe.xml._Fast.HasAttribAccess"]=Dl;Dl.__name__=["haxe","xml","_Fast","HasAttribAccess"];Dl.prototype={resolve:function(a){if(this.__x.nodeType==
ba.Document)throw new F("Cannot access document attribute "+a);return this.__x.exists(a)},__class__:Dl};var El=function(a){this.__x=a};n["haxe.xml._Fast.HasNodeAccess"]=El;El.__name__=["haxe","xml","_Fast","HasNodeAccess"];El.prototype={resolve:function(a){return this.__x.elementsNamed(a).hasNext()},__class__:El};var Fl=function(a){this.__x=a};n["haxe.xml._Fast.NodeListAccess"]=Fl;Fl.__name__=["haxe","xml","_Fast","NodeListAccess"];Fl.prototype={resolve:function(a){var b=new Af;for(a=this.__x.elementsNamed(a);a.hasNext();){var c=
a.next();b.add(new Qd(c))}return b},__class__:Fl};var Qd=function(a){if(a.nodeType!=ba.Document&&a.nodeType!=ba.Element)throw new F("Invalid nodeType "+a.nodeType);this.x=a;this.node=new Bl(a);this.nodes=new Fl(a);this.att=new Cl(a);this.has=new Dl(a);this.hasNode=new El(a)};n["haxe.xml.Fast"]=Qd;Qd.__name__=["haxe","xml","Fast"];Qd.prototype={get_name:function(){return this.x.nodeType==ba.Document?"Document":this.x.get_nodeName()},get_innerData:function(){var a=this.x.iterator();if(!a.hasNext())throw new F(this.get_name()+
" does not have data");var b=a.next(),c=a.next();if(null!=c){if(b.nodeType==ba.PCData&&c.nodeType==ba.CData&&""==Ca.trim(function(a){if(b.nodeType==ba.Document||b.nodeType==ba.Element)throw new F("Bad node type, unexpected "+b.nodeType);return b.nodeValue}(this))){var d=a.next();if(null==d||d.nodeType==ba.PCData&&""==Ca.trim(function(a){if(d.nodeType==ba.Document||d.nodeType==ba.Element)throw new F("Bad node type, unexpected "+d.nodeType);return d.nodeValue}(this))&&null==a.next()){if(c.nodeType==
ba.Document||c.nodeType==ba.Element)throw new F("Bad node type, unexpected "+c.nodeType);return c.nodeValue}}throw new F(this.get_name()+" does not only have data");}if(b.nodeType!=ba.PCData&&b.nodeType!=ba.CData)throw new F(this.get_name()+" does not have data");if(b.nodeType==ba.Document||b.nodeType==ba.Element)throw new F("Bad node type, unexpected "+b.nodeType);return b.nodeValue},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 Qd(b)}}},__class__:Qd,__properties__:{get_elements:"get_elements",get_innerData:"get_innerData",get_name:"get_name"}};var cf=function(){};n["haxe.xml.Parser"]=cf;cf.__name__=["haxe","xml","Parser"];cf.parse=function(a,b){null==b&&(b=!1);var c=ba.createDocument();cf.doParse(a,b,0,c);return c};cf.doParse=function(a,b,c,d){null==c&&(c=0);for(var e=null,f=1,g=1,k=null,p=0,h=0,l=0,m=a.charCodeAt(c),n=new je,q=1,D=-1;m==m;){switch(f){case 0:switch(m){case 10:case 13:case 9:case 32:break;default:f=
g;continue}break;case 1:switch(m){case 60:f=0;g=2;break;default:p=c;f=13;continue}break;case 13:60==m?(n.addSub(a,p,c-p),g=ba.createPCData(n.b),n=new je,d.addChild(g),h++,f=0,g=2):38==m&&(n.addSub(a,p,c-p),f=18,q=13,p=c+1);break;case 17:93==m&&93==a.charCodeAt(c+1)&&62==a.charCodeAt(c+2)&&(m=ba.createCData(P.substr(a,p,c-p)),d.addChild(m),h++,c+=2,f=1);break;case 2:switch(m){case 33:if(91==a.charCodeAt(c+1)){c+=2;if("CDATA["!=P.substr(a,c,6).toUpperCase())throw new F("Expected <![CDATA[");c+=5;f=
17}else if(68==a.charCodeAt(c+1)||100==a.charCodeAt(c+1)){if("OCTYPE"!=P.substr(a,c+2,6).toUpperCase())throw new F("Expected <!DOCTYPE");c+=8;f=16}else{if(45!=a.charCodeAt(c+1)||45!=a.charCodeAt(c+2))throw new F("Expected \x3c!--");c+=2;f=15}p=c+1;break;case 63:f=14;p=c;break;case 47:if(null==d)throw new F("Expected node name");p=c+1;f=0;g=10;break;default:f=3;p=c;continue}break;case 3:if(!(97<=m&&122>=m||65<=m&&90>=m||48<=m&&57>=m||58==m||46==m||95==m||45==m)){if(c==p)throw new F("Expected node name");
e=ba.createElement(P.substr(a,p,c-p));d.addChild(e);h++;f=0;g=4;continue}break;case 4:switch(m){case 47:f=11;break;case 62:f=9;break;default:f=5;p=c;continue}break;case 5:if(!(97<=m&&122>=m||65<=m&&90>=m||48<=m&&57>=m||58==m||46==m||95==m||45==m)){if(p==c)throw new F("Expected attribute name");k=P.substr(a,p,c-p);if(e.exists(k))throw new F("Duplicate attribute");f=0;g=6;continue}break;case 6:switch(m){case 61:f=0;g=7;break;default:throw new F("Expected =");}break;case 7:switch(m){case 34:case 39:n=
new je;f=8;p=c+1;D=m;break;default:throw new F('Expected "');}break;case 8:switch(m){case 38:n.addSub(a,p,c-p);f=18;q=8;p=c+1;break;case 62:if(b)throw new F("Invalid unescaped "+String.fromCharCode(m)+" in attribute value");m==D&&(n.addSub(a,p,c-p),g=n.b,n=new je,e.set(k,g),f=0,g=4);break;case 60:if(b)throw new F("Invalid unescaped "+String.fromCharCode(m)+" in attribute value");m==D&&(n.addSub(a,p,c-p),g=n.b,n=new je,e.set(k,g),f=0,g=4);break;default:m==D&&(n.addSub(a,p,c-p),g=n.b,n=new je,e.set(k,
g),f=0,g=4)}break;case 9:p=c=cf.doParse(a,b,c,e);f=1;break;case 11:switch(m){case 62:f=1;break;default:throw new F("Expected >");}break;case 12:switch(m){case 62:return 0==h&&d.addChild(ba.createPCData("")),c;default:throw new F("Expected >");}case 10:if(!(97<=m&&122>=m||65<=m&&90>=m||48<=m&&57>=m||58==m||46==m||95==m||45==m)){if(p==c)throw new F("Expected node name");g=P.substr(a,p,c-p);if(d.nodeType!=ba.Element)throw new F("Bad node type, expected Element but found "+d.nodeType);if(g!=d.nodeName){c=
F;if(d.nodeType!=ba.Element)throw"Bad node type, expected Element but found "+d.nodeType;throw new c("Expected </"+d.nodeName+">");}f=0;g=12;continue}break;case 15:45==m&&45==a.charCodeAt(c+1)&&62==a.charCodeAt(c+2)&&(m=ba.createComment(P.substr(a,p,c-p)),d.addChild(m),h++,c+=2,f=1);break;case 16:91==m?l++:93==m?l--:62==m&&0==l&&(m=ba.createDocType(P.substr(a,p,c-p)),d.addChild(m),h++,f=1);break;case 14:63==m&&62==a.charCodeAt(c+1)&&(c++,m=P.substr(a,p+1,c-p-2),m=ba.createProcessingInstruction(m),
d.addChild(m),h++,f=1);break;case 18:if(59==m){p=P.substr(a,p,c-p);if(35==p.charCodeAt(0))p=120==p.charCodeAt(1)?u.parseInt("0"+P.substr(p,1,p.length-1)):u.parseInt(P.substr(p,1,p.length-1)),n.b+=String.fromCharCode(p);else if(cf.escapes.exists(p))n.add(cf.escapes.get(p));else{if(b)throw new F("Undefined entity: "+p);n.b+=u.string("&"+p+";")}p=c+1;f=q}else if(!(97<=m&&122>=m||65<=m&&90>=m||48<=m&&57>=m||58==m||46==m||95==m||45==m)&&35!=m){if(b)throw new F("Invalid character in entity: "+String.fromCharCode(m));
n.b+="&";n.addSub(a,p,c-p);c--;p=c+1;f=q}}m=Ca.fastCodeAt(a,++c)}1==f&&(p=c,f=13);if(13==f){if(c!=p||0==h)n.addSub(a,p,c-p),a=ba.createPCData(n.b),d.addChild(a);return c}if(!b&&18==f&&13==q)return n.b+="&",n.addSub(a,p,c-p),a=ba.createPCData(n.b),d.addChild(a),c;throw new F("Unexpected end");};var F=function(a){Error.call(this);this.val=a;this.message=String(a);Error.captureStackTrace&&Error.captureStackTrace(this,F)};n["js._Boot.HaxeError"]=F;F.__name__=["js","_Boot","HaxeError"];F.__super__=Error;
F.prototype=L(Error.prototype,{__class__:F});var q=function(){};n["js.Boot"]=q;q.__name__=["js","Boot"];q.__unhtml=function(a){return a.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;")};q.__trace=function(a,b){var c;c=null!=b?b.fileName+":"+b.lineNumber+": ":"";c+=q.__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+=","+q.__string_rec(f,"")}var g;"undefined"!=typeof document&&null!=(g=document.getElementById("haxe:trace"))?
g.innerHTML+=q.__unhtml(c)+"<br/>":"undefined"!=typeof Cn&&null!=Cn.log&&Cn.log(c)};q.getClass=function(a){if(a instanceof Array&&null==a.__enum__)return Array;var b=a.__class__;if(null!=b)return b;a=q.__nativeClassName(a);return null!=a?q.__resolveNativeClass(a):null};q.__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+(","+q.__string_rec(a[f],b)):c+q.__string_rec(a[f],b);return c+")"}c=a.length;d="[";b+="\t";for(e=0;e<c;)f=e++,d+=(0<f?",":"")+q.__string_rec(a[f],b);return d+"]"}try{d=a.toString}catch(g){return Ia.lastException=g,g instanceof F&&(g=g.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+" : "+q.__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)}};q.__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||q.__interfLoop(f,b))return!0}return q.__interfLoop(a.__super__,b)};q.__instanceof=
function(a,b){if(null==b)return!1;switch(b){case $m:return(a|0)===a;case Jf:return"number"==typeof a;case En:return"boolean"==typeof a;case String:return"string"==typeof a;case Array:return a instanceof Array&&null==a.__enum__;case Vn:return!0;default:if(null!=a)if("function"==typeof b){if(a instanceof b||q.__interfLoop(q.getClass(a),b))return!0}else{if("object"==typeof b&&q.__isNativeObj(b)&&a instanceof b)return!0}else return!1;return b==Fn&&null!=a.__name__||b==Mn&&null!=a.__ename__?!0:a.__enum__==
b}};q.__cast=function(a,b){if(q.__instanceof(a,b))return a;throw new F("Cannot cast "+u.string(a)+" to "+u.string(b));};q.__nativeClassName=function(a){a=q.__toStr.call(a).slice(8,-1);return"Object"==a||"Function"==a||"Math"==a||"JSON"==a?null:a};q.__isNativeObj=function(a){return null!=q.__nativeClassName(a)};q.__resolveNativeClass=function(a){return Function("return typeof "+a+' != "undefined" ? '+a+" : null")()};var xg=function(){};n["js.Browser"]=xg;xg.__name__=["js","Browser"];xg.getLocalStorage=
function(){try{var a=window.localStorage;a.getItem("");return a}catch(b){return Ia.lastException=b,b instanceof F&&(b=b.val),null}};xg.alert=function(a){window.alert(q.__string_rec(a,""))};var Ce=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}};n["js.html.compat.ArrayBuffer"]=Ce;Ce.__name__=["js","html","compat","ArrayBuffer"];Ce.sliceImpl=function(a,b){var c=new nc(this,a,null==b?null:
b-a),d=new dj(c.byteLength);(new nc(d)).set(c);return d};Ce.prototype={slice:function(a,b){return new Ce(this.a.slice(a,b))},__class__:Ce};var Gl=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 F(ud.OutsideBounds);};n["js.html.compat.DataView"]=Gl;Gl.__name__=["js","html","compat","DataView"];Gl.prototype={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 Be.i32ToFloat(this.getInt32(a,b))},getFloat64:function(a,b){var c=this.getInt32(a,b),d=this.getInt32(a+4,b);return Be.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,Be.floatToI32(b),c)},setFloat64:function(a,b,c){b=Be.doubleToI64(b);c?(this.setUint32(a,b.low),this.setUint32(a,b.high)):(this.setUint32(a,b.high),this.setUint32(a,
b.low))},__class__:Gl};var qf=function(){};n["js.html.compat.Uint8Array"]=qf;qf.__name__=["js","html","compat","Uint8Array"];qf._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 Ce(c)}else if(q.__instanceof(a,Ce))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 Ce(c);else throw new F("TODO "+u.string(a));c.subarray=qf._subarray;c.set=qf._set;return c};qf._set=function(a,b){if(q.__instanceof(a.buffer,Ce)){if(a.byteLength+b>this.byteLength)throw new F("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 F("set() outside of range");c=0;for(d=a.length;c<d;)e=c++,this[e+b]=a[e]}else throw new F("TODO");};qf._subarray=function(a,
b){var c=qf._new(this.slice(a,b));c.byteOffset=a;return c};var Hl=function(){this.enabled=!0;this.audio=new ma;this.font=new ma;this.image=new ma;this.version=u["int"](1E6*Math.random())};n["lime.AssetCache"]=Hl;Hl.__name__=["lime","AssetCache"];Hl.prototype={clear:function(a){if(null==a)this.audio=new ma,this.font=new ma,this.image=new ma;else{for(var b=this.audio.keys();b.hasNext();){var c=b.next();Ca.startsWith(c,a)&&this.audio.remove(c)}for(b=this.font.keys();b.hasNext();)c=b.next(),Ca.startsWith(c,
a)&&this.font.remove(c);for(b=this.image.keys();b.hasNext();)c=b.next(),Ca.startsWith(c,a)&&this.image.remove(c)}},__class__:Hl};var rc=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};n["lime.app.Event_Void_Void"]=rc;rc.__name__=["lime","app","Event_Void_Void"];rc.prototype={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)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(O.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)O.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},dispatch:function(){this.canceled=!1;for(var a=
this.__listeners,b=this.__repeat,c=0;c<a.length&&(a[c](),b[c]?c++:this.remove(a[c]),!this.canceled););},__class__:rc};var N=function(){};n["lime.Assets"]=N;N.__name__=["lime","Assets"];N.exists=function(a,b){N.initialize();null==b&&(b="BINARY");var c=a.substring(0,a.indexOf(":")),d;d=a.indexOf(":")+1;d=P.substr(a,d,null);c=N.getLibrary(c);return null!=c?c.exists(d,b):!1};N.getAudioBuffer=function(a,b){null==b&&(b=!0);N.initialize();if(b&&N.cache.enabled&&N.cache.audio.exists(a)){var c=N.cache.audio.get(a);
if(N.isValidAudio(c))return c}var c=a.substring(0,a.indexOf(":")),d;d=a.indexOf(":")+1;d=P.substr(a,d,null);c=N.getLibrary(c);if(null!=c&&c.exists(d,"SOUND")&&c.isLocal(d,"SOUND"))return c=c.getAudioBuffer(d),b&&N.cache.enabled&&N.cache.audio.set(a,c),c;null;return null};N.getBytes=function(a){N.initialize();var b=a.substring(0,a.indexOf(":")),c=a.indexOf(":")+1;a=P.substr(a,c,null);b=N.getLibrary(b);if(null!=b&&b.exists(a,"BINARY")&&b.isLocal(a,"BINARY"))return b.getBytes(a);null;return null};N.getFont=
function(a,b){null==b&&(b=!0);N.initialize();if(b&&N.cache.enabled&&N.cache.font.exists(a))return N.cache.font.get(a);var c=a.substring(0,a.indexOf(":")),d;d=a.indexOf(":")+1;d=P.substr(a,d,null);c=N.getLibrary(c);if(null!=c&&c.exists(d,"FONT")&&c.isLocal(d,"FONT"))return c=c.getFont(d),b&&N.cache.enabled&&N.cache.font.set(a,c),c;null;return null};N.getImage=function(a,b){null==b&&(b=!0);N.initialize();if(b&&N.cache.enabled&&N.cache.image.exists(a)){var c=N.cache.image.get(a);if(N.isValidImage(c))return c}var c=
a.substring(0,a.indexOf(":")),d;d=a.indexOf(":")+1;d=P.substr(a,d,null);c=N.getLibrary(c);if(null!=c&&c.exists(d,"IMAGE")&&c.isLocal(d,"IMAGE"))return c=c.getImage(d),b&&N.cache.enabled&&N.cache.image.set(a,c),c;null;return null};N.getLibrary=function(a){if(null==a||""==a)a="default";return N.libraries.get(a)};N.getPath=function(a){N.initialize();var b=a.substring(0,a.indexOf(":")),c=a.indexOf(":")+1;a=P.substr(a,c,null);b=N.getLibrary(b);if(null!=b&&b.exists(a,null))return b.getPath(a);null;return null};
N.getText=function(a){N.initialize();var b=a.substring(0,a.indexOf(":")),c=a.indexOf(":")+1;a=P.substr(a,c,null);b=N.getLibrary(b);if(null!=b&&b.exists(a,"TEXT")&&b.isLocal(a,"TEXT"))return b.getText(a);null;return null};N.initialize=function(){N.initialized||(N.registerLibrary("default",new mi),N.initialized=!0)};N.isLocal=function(a,b,c){null==c&&(c=!0);N.initialize();if(c&&N.cache.enabled&&(("IMAGE"==b||null==b)&&N.cache.image.exists(a)||("FONT"==b||null==b)&&N.cache.font.exists(a)||("SOUND"==
b||"MUSIC"==b||null==b)&&N.cache.audio.exists(a)))return!0;c=a.substring(0,a.indexOf(":"));var d=a.indexOf(":")+1;a=P.substr(a,d,null);c=N.getLibrary(c);return null!=c?c.isLocal(a,b):!1};N.isValidAudio=function(a){return null!=a};N.isValidImage=function(a){return!0};N.list=function(a){N.initialize();for(var b=[],c=N.libraries.iterator();c.hasNext();){var d=c.next().list(a);null!=d&&(b=b.concat(d))}return b};N.loadAudioBuffer=function(a,b){null==b&&(b=!0);N.initialize();var c=new Jc;if(b&&N.cache.enabled&&
N.cache.audio.exists(a)){var d=N.cache.audio.get(a);if(N.isValidAudio(d))return c.complete(d),c.future}var d=a.substring(0,a.indexOf(":")),e;e=a.indexOf(":")+1;e=P.substr(a,e,null);var f=N.getLibrary(d);if(null!=f)if(f.exists(e,"SOUND")){d=f.loadAudioBuffer(e);if(b&&N.cache.enabled)d.onComplete(function(b){N.cache.audio.set(a,b)});c.completeWith(d)}else c.error('[Assets] There is no audio asset with an ID of "'+a+'"');else c.error('[Assets] There is no asset library named "'+d+'"');return c.future};
N.loadBytes=function(a){N.initialize();var b=new Jc,c=a.substring(0,a.indexOf(":")),d;d=a.indexOf(":")+1;d=P.substr(a,d,null);var e=N.getLibrary(c);null!=e?e.exists(d,"BINARY")?b.completeWith(e.loadBytes(d)):b.error('[Assets] There is no String or Bytes asset with an ID of "'+a+'"'):b.error('[Assets] There is no asset library named "'+c+'"');return b.future};N.loadFont=function(a){N.initialize();var b=new Jc,c=a.substring(0,a.indexOf(":")),d;d=a.indexOf(":")+1;d=P.substr(a,d,null);var e=N.getLibrary(c);
null!=e?e.exists(d,"FONT")?b.completeWith(e.loadFont(d)):b.error('[Assets] There is no Font asset with an ID of "'+a+'"'):b.error('[Assets] There is no asset library named "'+c+'"');return b.future};N.loadImage=function(a,b){null==b&&(b=!0);N.initialize();var c=new Jc;if(b&&N.cache.enabled&&N.cache.image.exists(a)){var d=N.cache.image.get(a);if(N.isValidImage(d))return c.complete(d),c.future}var d=a.substring(0,a.indexOf(":")),e;e=a.indexOf(":")+1;e=P.substr(a,e,null);var f=N.getLibrary(d);if(null!=
f)if(f.exists(e,"IMAGE")){d=f.loadImage(e);if(b&&N.cache.enabled)d.onComplete(function(b){N.cache.image.set(a,b)});c.completeWith(d)}else c.error('[Assets] There is no Image asset with an ID of "'+a+'"');else c.error('[Assets] There is no asset library named "'+d+'"');return c.future};N.loadLibrary=function(a){N.initialize();var b=new Jc,c=N.getText("libraries/"+a+".json");null!=c&&""!=c?(c=JSON.parse(c),c=ua.createInstance(ua.resolveClass(c.type),c.args),N.libraries.set(a,c),c.onChange.add((fj=N.onChange,
K(fj,fj.dispatch))),b.completeWith(c.load())):b.error('[Assets] There is no asset library named "'+a+'"');return b.future};N.loadText=function(a){N.initialize();var b=new Jc,c=a.substring(0,a.indexOf(":")),d;d=a.indexOf(":")+1;d=P.substr(a,d,null);var e=N.getLibrary(c);null!=e?e.exists(d,"TEXT")?b.completeWith(e.loadText(d)):b.error('[Assets] There is no String asset with an ID of "'+a+'"'):b.error('[Assets] There is no asset library named "'+c+'"');return b.future};N.registerLibrary=function(a,b){if(N.libraries.exists(a)){if(N.libraries.get(a)==
b)return;N.unloadLibrary(a)}null!=b&&b.onChange.add(N.library_onChange);N.libraries.set(a,b)};N.unloadLibrary=function(a){N.initialize();var b=N.libraries.get(a);null!=b&&(N.cache.clear(a+":"),b.onChange.remove(N.library_onChange),b.unload());N.libraries.remove(a)};N.library_onChange=function(){N.cache.clear();N.onChange.dispatch()};var Il=function(a){this.gameDeviceCache=new xa;this.parent=a;this.nextUpdate=this.lastUpdate=this.currentUpdate=0;this.framePeriod=-1;Tc.init()};n["lime._backend.html5.HTML5Application"]=
Il;Il.__name__=["lime","_backend","html5","HTML5Application"];Il.prototype={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);CanvasRenderingContext2D.prototype.isPointInStroke||(CanvasRenderingContext2D.prototype.isPointInStroke=function(a,b,c){return!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(),g=Math.max(0,16-(f-a)),k=window.setTimeout(function(){b(f+g)},g);a=f+g;return k});window.cancelAnimationFrame||(window.cancelAnimationFrame=function(a){clearTimeout(a)});window.requestAnimFrame=window.requestAnimationFrame;this.lastUpdate=(new Date).getTime();this.handleApplicationEvent();return 0},exit:function(){},getFrameRate:function(){return 0>this.framePeriod?60:1E3==this.framePeriod?0:1E3/this.framePeriod},handleApplicationEvent:function(a){this.updateGameDevices();
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].onKeyDown.canceled&&a.preventDefault()):(this.parent.windows[0].onKeyUp.dispatch(b,c),this.parent.windows[0].onKeyUp.canceled&&a.preventDefault())}},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},updateGameDevices:function(){var a=ic.__getDeviceData();if(null!=a)for(var b,c,d,e,f,g=0,k=a.length;g<k;)if(b=g++,e=a[b],null!=e){if(!this.gameDeviceCache.h.hasOwnProperty(b)){f=new Jl;f.id=b;f.connected=e.connected;c=0;for(d=e.buttons.length;c<d;){var p=c++;f.buttons.push(e.buttons[p].value)}c=0;for(d=e.axes.length;c<d;)p=c++,f.axes.push(e.axes[p]);"standard"==e.mapping&&(f.isGamepad=!0);this.gameDeviceCache.h[b]=f;e.connected&&
(ic.__connect(b),f.isGamepad&&Mc.__connect(b))}f=this.gameDeviceCache.h[b];d=ic.devices.h[b];c=Mc.devices.h[b];if(e.connected){for(var h=0,l=e.buttons.length;h<l;){var m=h++,p=e.buttons[m].value;if(p!=f.buttons[m]){if(6==m)d.onAxisMove.dispatch(e.axes.length,p),null!=c&&c.onAxisMove.dispatch(4,p);else if(7==m)d.onAxisMove.dispatch(e.axes.length+1,p),null!=c&&c.onAxisMove.dispatch(5,p);else if(0<p?d.onButtonDown.dispatch(m):d.onButtonUp.dispatch(m),null!=c){switch(m){case 0:b=0;break;case 1:b=1;break;
case 2:b=2;break;case 3:b=3;break;case 4:b=9;break;case 5:b=10;break;case 8:b=4;break;case 9:b=6;break;case 10:b=7;break;case 11:b=8;break;case 12:b=11;break;case 13:b=12;break;case 14:b=13;break;case 15:b=14;break;case 16:b=5;break;default:continue}0<p?c.onButtonDown.dispatch(b):c.onButtonUp.dispatch(b)}f.buttons[m]=p}}b=0;for(p=e.axes.length;b<p;)h=b++,e.axes[h]!=f.axes[h]&&(d.onAxisMove.dispatch(h,e.axes[h]),null!=c&&c.onAxisMove.dispatch(h,e.axes[h]),f.axes[h]=e.axes[h])}else f.connected&&(f.connected=
!1,ic.__disconnect(b),Mc.__disconnect(b))}},__class__:Il};var Jl=function(){this.connected=!0;this.buttons=[];this.axes=[]};n["lime._backend.html5.GameDeviceData"]=Jl;Jl.__name__=["lime","_backend","html5","GameDeviceData"];Jl.prototype={__class__:Jl};var Sb=function(){};n["lime._backend.html5.HTML5Mouse"]=Sb;Sb.__name__=["lime","_backend","html5","HTML5Mouse"];Sb.__cursor=null;Sb.__hidden=null;Sb.hide=function(){if(!Sb.__hidden){Sb.__hidden=!0;for(var a=0,b=ed.current.windows;a<b.length;){var c=
b[a];++a;c.backend.element.style.cursor="none"}}};Sb.show=function(){if(Sb.__hidden){Sb.__hidden=!1;var a=Sb.__cursor;Sb.__cursor=null;Sb.set_cursor(a)}};Sb.warp=function(a,b,c){};Sb.get_cursor=function(){return null==Sb.__cursor?Ha.DEFAULT:Sb.__cursor};Sb.set_cursor=function(a){if(Sb.__cursor!=a){if(!Sb.__hidden)for(var b=0,c=ed.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"}}Sb.__cursor=
a}return Sb.__cursor};Sb.get_lock=function(){return!1};Sb.set_lock=function(a){return a};var Kl=function(a){this.parent=a};n["lime._backend.html5.HTML5Renderer"]=Kl;Kl.__name__=["lime","_backend","html5","HTML5Renderer"];Kl.prototype={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=Uc.DOM(this.parent.window.backend.div),this.parent.type=Xb.DOM):null!=this.parent.window.backend.canvas&&(this.parent.context=Uc.CANVAS(this.parent.window.backend.canvas.getContext("2d")),this.parent.type=Xb.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)}},readPixels:function(a){if(null!=this.parent.window.backend.canvas&&(null==a?a=new tc(0,0,this.parent.window.backend.canvas.width,this.parent.window.backend.canvas.height):a.__contract(0,0,this.parent.window.backend.canvas.width,this.parent.window.backend.canvas.height),0<a.width&&0<a.height)){var b=window.document.createElement("canvas");b.width=a.width|0;b.height=a.height|0;b.getContext("2d").drawImage(this.parent.window.backend.canvas,
-a.x,-a.y);return pb.fromCanvas(b)}return null},render:function(){},__class__:Kl};var ib=function(a){this.unusedTouchesPool=new Af;this.currentTouches=new xa;this.parent=a;null!=a.config&&Object.prototype.hasOwnProperty.call(a.config,"element")&&(this.element=a.config.element)};n["lime._backend.html5.HTML5Window"]=ib;ib.__name__=["lime","_backend","html5","HTML5Window"];ib.textInput=null;ib.prototype={alert:function(a,b){null!=a&&xg.alert(a)},close:function(){this.parent.application.removeWindow(this.parent)},
create:function(a){this.setWidth=this.parent.__width;this.setHeight=this.parent.__height;this.parent.id=ib.windowID++;q.__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);this.element.addEventListener("gamepadconnected",K(this,this.handleGamepadEvent),!0);this.element.addEventListener("gamepaddisconnected",
K(this,this.handleGamepadEvent),!0)}},focus:function(){},getDisplay:function(){return Tb.getDisplay(0)},getEnableTextEvents:function(){return this.enableTextEvents},handleFocusEvent:function(a){this.enableTextEvents&&Ad.delay(function(){ib.textInput.focus()},20)},handleGamepadEvent:function(a){switch(a.type){case "gamepadconnected":ic.__connect(a.gamepad.index);"standard"==a.gamepad.mapping&&Mc.__connect(a.gamepad.index);break;case "gamepaddisconnected":ic.__disconnect(a.gamepad.index),Mc.__disconnect(a.gamepad.index)}},
handleInputEvent:function(a){""!=ib.textInput.value&&(this.parent.onTextInput.dispatch(ib.textInput.value),ib.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());var c=this.setWidth,d=this.setHeight;if(0==c||0==d)null!=b?(c=b.width,d=b.height):d=c=1;for(var e=0,f=
a.changedTouches;e<f.length;){var g=f[e];++e;var k=0,p=0;null!=b?(k=c/b.width*(g.clientX-b.left),p=d/b.height*(g.clientY-b.top)):(k=g.clientX,p=g.clientY);switch(a.type){case "touchstart":var h=this.unusedTouchesPool.pop();null==h?h=new Zd(k/c,p/d,g.identifier,0,0,g.force,this.parent.id):(h.x=k/c,h.y=p/d,h.id=g.identifier,h.dx=0,h.dy=0,h.pressure=g.force,h.device=this.parent.id);this.currentTouches.h[g.identifier]=h;Zd.onStart.dispatch(h);null==this.primaryTouch&&(this.primaryTouch=h);h==this.primaryTouch&&
this.parent.onMouseDown.dispatch(k,p,0);break;case "touchend":h=this.currentTouches.h[g.identifier];if(null!=h){var l=h.x,m=h.y;h.x=k/c;h.y=p/d;h.dx=h.x-l;h.dy=h.y-m;h.pressure=g.force;Zd.onEnd.dispatch(h);this.currentTouches.remove(g.identifier);this.unusedTouchesPool.add(h);h==this.primaryTouch&&(this.parent.onMouseUp.dispatch(k,p,0),this.primaryTouch=null)}break;case "touchmove":h=this.currentTouches.h[g.identifier],null!=h&&(l=h.x,m=h.y,h.x=k/c,h.y=p/d,h.dx=h.x-l,h.dy=h.y-m,h.pressure=g.force,
Zd.onMove.dispatch(h),h==this.primaryTouch&&this.parent.onMouseMove.dispatch(k,p))}}},move:function(a,b){},resize:function(a,b){},setBorderless:function(a){return a},setEnableTextEvents:function(a){a?(null==ib.textInput&&(ib.textInput=window.document.createElement("input"),ib.textInput.type="text",ib.textInput.style.position="absolute",ib.textInput.style.opacity="0",ib.textInput.style.color="transparent",ib.textInput.value="",ib.textInput.autocapitalize="off",ib.textInput.autocorrect="off",ib.textInput.autocomplete=
"off",ib.textInput.style.left="0px",ib.textInput.style.top="50%",(new Rd("(iPad|iPhone|iPod).*OS 8_","gi")).match(window.navigator.userAgent)?(ib.textInput.style.fontSize="0px",ib.textInput.style.width="0px",ib.textInput.style.height="0px"):(ib.textInput.style.width="1px",ib.textInput.style.height="1px"),ib.textInput.style.pointerEvents="none",ib.textInput.style.zIndex="-10000000",window.document.body.appendChild(ib.textInput)),this.enableTextEvents||(ib.textInput.addEventListener("input",K(this,
this.handleInputEvent),!0),ib.textInput.addEventListener("blur",K(this,this.handleFocusEvent),!0)),ib.textInput.focus()):null!=ib.textInput&&(ib.textInput.removeEventListener("input",K(this,this.handleInputEvent),!0),ib.textInput.removeEventListener("blur",K(this,this.handleFocusEvent),!0),ib.textInput.blur());return this.enableTextEvents=a},setFullscreen:function(a){return!1},setIcon:function(a){},setMaximized:function(a){return!1},setMinimized:function(a){return!1},setResizable:function(a){return a},
setTitle:function(a){return a},__class__:ib};var gj=function(){};n["lime.app.IModule"]=gj;gj.__name__=["lime","app","IModule"];gj.prototype={__class__:gj};var Ch=function(){this.onExit=new Qf};n["lime.app.Module"]=Ch;Ch.__name__=["lime","app","Module"];Ch.__interfaces__=[gj];Ch.prototype={onGamepadAxisMove:function(a,b,c){},onGamepadButtonDown:function(a,b){},onGamepadButtonUp:function(a,b){},onGamepadConnect:function(a){null},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){},onWindowDropFile:function(a,b){},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__:Ch};var ed=function(){this.onUpdate=new Qf;this.onExit=new Qf;null==ed.current&&(ed.current=this);this.modules=[];this.renderers=[];this.windows=[];this.windowByID=new xa;this.backend=new Il(this);this.onExit.add(K(this,this.onModuleExit));this.onUpdate.add(K(this,this.update));Mc.onConnect.add(K(this,this.__onGamepadConnect));
ic.onConnect.add(K(this,this.__onJoystickConnect));Zd.onStart.add(K(this,this.onTouchStart));Zd.onMove.add(K(this,this.onTouchMove));Zd.onEnd.add(K(this,this.onTouchEnd))};n["lime.app.Application"]=ed;ed.__name__=["lime","app","Application"];ed.current=null;ed.__super__=Ch;ed.prototype=L(Ch.prototype,{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)},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 Rf(a[0]);this.createWindow(a);break}if(null==this.preloader||this.preloader.complete)this.onPreloadComplete()}},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.onDropFile.add(function(a,b){return function(e){a(b,e)}}(K(this,this.onWindowDropFile),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,g){a(b,e,f,g)}}(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,g){a(b,e,f,g)}}(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,g){a(b,e,f,g)}}(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 Ll(a);this.addRenderer(b)}a.create(this);this.windows.push(a);this.windowByID.h[a.id]=a;a.onCreate.dispatch()},exec:function(){ed.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)}},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)}},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 g=f[e];++e;g.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 g=f[e];++e;g.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 g=f[e];++e;g.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)}},onWindowDropFile:function(a,b){for(var c=0,d=this.modules;c<d.length;){var e=d[c];++c;e.onWindowDropFile(a,b)}},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)}},removeModule:function(a){null!=a&&(a.onModuleExit(0),P.remove(this.modules,a))},removeRenderer:function(a){null!=a&&-1<P.indexOf(this.renderers,a,0)&&P.remove(this.renderers,a)},removeWindow:function(a){null!=a&&this.windowByID.h.hasOwnProperty(a.id)&&(P.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)}},__onGamepadConnect:function(a){this.onGamepadConnect(a);
a.onAxisMove.add(function(a,c){return function(d,e){a(c,d,e)}}(K(this,this.onGamepadAxisMove),a));a.onButtonDown.add(function(a,c){return function(d){a(c,d)}}(K(this,this.onGamepadButtonDown),a));a.onButtonUp.add(function(a,c){return function(d){a(c,d)}}(K(this,this.onGamepadButtonUp),a));a.onDisconnect.add(function(a,c){return function(){a(c)}}(K(this,this.onGamepadDisconnect),a))},__onJoystickConnect:function(a){this.onJoystickConnect(a);a.onAxisMove.add(function(a,c){return function(d,e){a(c,d,
e)}}(K(this,this.onJoystickAxisMove),a));a.onButtonDown.add(function(a,c){return function(d){a(c,d)}}(K(this,this.onJoystickButtonDown),a));a.onButtonUp.add(function(a,c){return function(d){a(c,d)}}(K(this,this.onJoystickButtonUp),a));a.onDisconnect.add(function(a,c){return function(){a(c)}}(K(this,this.onJoystickDisconnect),a));a.onHatMove.add(function(a,c){return function(d,e){a(c,d,e)}}(K(this,this.onJoystickHatMove),a));a.onTrackballMove.add(function(a,c){return function(d,e){a(c,d,e)}}(K(this,
this.onJoystickTrackballMove),a))},get_frameRate:function(){return this.backend.getFrameRate()},set_frameRate:function(a){return this.backend.setFrameRate(a)},get_renderer:function(){return this.renderers[0]},get_window:function(){return this.windows[0]},__class__:ed,__properties__:{get_window:"get_window",get_renderer:"get_renderer",set_frameRate:"set_frameRate",get_frameRate:"get_frameRate"}});var dn=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};n["lime.app.Event"]=
dn;dn.__name__=["lime","app","Event"];dn.prototype={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)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(O.compareMethods(d,a))return!0}return!1},
remove:function(a){for(var b=this.__listeners.length;0<=--b;)O.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},__class__:dn};var De=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};n["lime.app.Event_Dynamic_Void"]=De;De.__name__=["lime","app","Event_Dynamic_Void"];De.prototype={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)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(O.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)O.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,
1),this.__repeat.splice(b,1))},dispatch:function(a){this.canceled=!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?d++:this.remove(b[d]),!this.canceled););},__class__:De};var hj=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};n["lime.app.Event_Float_Float_Int_Void"]=hj;hj.__name__=["lime","app","Event_Float_Float_Int_Void"];hj.prototype={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)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(O.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)O.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,
1),this.__repeat.splice(b,1))},dispatch:function(a,b,c){this.canceled=!1;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]),!this.canceled););},__class__:hj};var yg=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};n["lime.app.Event_Float_Float_Void"]=yg;yg.__name__=["lime","app","Event_Float_Float_Void"];yg.prototype={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)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(O.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)O.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,
1),this.__repeat.splice(b,1))},dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,e=0;e<c.length&&(c[e](a,b),d[e]?e++:this.remove(c[e]),!this.canceled););},__class__:yg};var ij=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};n["lime.app.Event_Int_Float_Void"]=ij;ij.__name__=["lime","app","Event_Int_Float_Void"];ij.prototype={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)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(O.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)O.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,
1),this.__repeat.splice(b,1))},dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,e=0;e<c.length&&(c[e](a,b),d[e]?e++:this.remove(c[e]),!this.canceled););},__class__:ij};var jj=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};n["lime.app.Event_Int_Int_Void"]=jj;jj.__name__=["lime","app","Event_Int_Int_Void"];jj.prototype={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)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(O.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)O.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,
1),this.__repeat.splice(b,1))},dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,e=0;e<c.length&&(c[e](a,b),d[e]?e++:this.remove(c[e]),!this.canceled););},__class__:jj};var Qf=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};n["lime.app.Event_Int_Void"]=Qf;Qf.__name__=["lime","app","Event_Int_Void"];Qf.prototype={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)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(O.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)O.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},dispatch:function(a){this.canceled=
!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?d++:this.remove(b[d]),!this.canceled););},__class__:Qf};var Ml=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};n["lime.app.Event_Int_lime_ui_JoystickHatPosition_Void"]=Ml;Ml.__name__=["lime","app","Event_Int_lime_ui_JoystickHatPosition_Void"];Ml.prototype={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)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(O.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)O.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},dispatch:function(a,
b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,e=0;e<c.length&&(c[e](a,b),d[e]?e++:this.remove(c[e]),!this.canceled););},__class__:Ml};var Nl=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};n["lime.app.Event_String_Int_Int_Void"]=Nl;Nl.__name__=["lime","app","Event_String_Int_Int_Void"];Nl.prototype={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)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(O.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)O.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},dispatch:function(a,
b,c){this.canceled=!1;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]),!this.canceled););},__class__:Nl};var kj=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};n["lime.app.Event_String_Void"]=kj;kj.__name__=["lime","app","Event_String_Void"];kj.prototype={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)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(O.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)O.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},dispatch:function(a){this.canceled=
!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?d++:this.remove(b[d]),!this.canceled););},__class__:kj};var Ol=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};n["lime.app.Event_lime_graphics_RenderContext_Void"]=Ol;Ol.__name__=["lime","app","Event_lime_graphics_RenderContext_Void"];Ol.prototype={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)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(O.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)O.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},dispatch:function(a){this.canceled=
!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?d++:this.remove(b[d]),!this.canceled););},__class__:Ol};var Pl=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};n["lime.app.Event_lime_ui_GamepadAxis_Float_Void"]=Pl;Pl.__name__=["lime","app","Event_lime_ui_GamepadAxis_Float_Void"];Pl.prototype={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)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(O.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)O.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},dispatch:function(a,
b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,e=0;e<c.length&&(c[e](a,b),d[e]?e++:this.remove(c[e]),!this.canceled););},__class__:Pl};var lj=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};n["lime.app.Event_lime_ui_GamepadButton_Void"]=lj;lj.__name__=["lime","app","Event_lime_ui_GamepadButton_Void"];lj.prototype={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)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(O.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)O.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},dispatch:function(a){this.canceled=
!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?d++:this.remove(b[d]),!this.canceled););},__class__:lj};var Ql=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};n["lime.app.Event_lime_ui_Gamepad_Void"]=Ql;Ql.__name__=["lime","app","Event_lime_ui_Gamepad_Void"];Ql.prototype={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)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(O.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)O.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},dispatch:function(a){this.canceled=
!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?d++:this.remove(b[d]),!this.canceled););},__class__:Ql};var Rl=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};n["lime.app.Event_lime_ui_Joystick_Void"]=Rl;Rl.__name__=["lime","app","Event_lime_ui_Joystick_Void"];Rl.prototype={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)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(O.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)O.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},dispatch:function(a){this.canceled=
!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?d++:this.remove(b[d]),!this.canceled););},__class__:Rl};var mj=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};n["lime.app.Event_lime_ui_KeyCode_lime_ui_KeyModifier_Void"]=mj;mj.__name__=["lime","app","Event_lime_ui_KeyCode_lime_ui_KeyModifier_Void"];mj.prototype={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)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(O.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)O.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},dispatch:function(a,
b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,e=0;e<c.length&&(c[e](a,b),d[e]?e++:this.remove(c[e]),!this.canceled););},__class__:mj};var Dh=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};n["lime.app.Event_lime_ui_Touch_Void"]=Dh;Dh.__name__=["lime","app","Event_lime_ui_Touch_Void"];Dh.prototype={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)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(O.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)O.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},dispatch:function(a){this.canceled=
!1;for(var b=this.__listeners,c=this.__repeat,d=0;d<b.length&&(b[d](a),c[d]?d++:this.remove(b[d]),!this.canceled););},__class__:Dh};var Rb=function(a){if(null!=a){null==Rb.__threadPool&&(Rb.__threadPool=new Sl,Rb.__threadPool.doWork.add(Rb.threadPool_doWork),Rb.__threadPool.onComplete.add(Rb.threadPool_onComplete),Rb.__threadPool.onError.add(Rb.threadPool_onError));var b=new Jc;b.future=this;Rb.__threadPool.queue({promise:b,work:a})}};n["lime.app.Future"]=Rb;Rb.__name__=["lime","app","Future"];Rb.__threadPool=
null;Rb.threadPool_doWork=function(a){try{var b=a.work();Rb.__threadPool.sendComplete({promise:a.promise,result:b})}catch(c){Ia.lastException=c,c instanceof F&&(c=c.val),Rb.__threadPool.sendError({promise:a.promise,error:c})}};Rb.threadPool_onComplete=function(a){a.promise.complete(a.result)};Rb.threadPool_onError=function(a){a.promise.error(a.error)};Rb.prototype={onComplete:function(a){null!=a&&(this.__completed?a(this.value):this.__errored||(null==this.__completeListeners&&(this.__completeListeners=
[]),this.__completeListeners.push(a)));return this},onError:function(a){null!=a&&(this.__errored?a(this.__errorMessage):this.__completed||(null==this.__errorListeners&&(this.__errorListeners=[]),this.__errorListeners.push(a)));return this},onProgress:function(a){null!=a&&(null==this.__progressListeners&&(this.__progressListeners=[]),this.__progressListeners.push(a));return this},then:function(a){if(this.__completed)return a(this.value);if(this.__errored){var b=new Rb;b.onError(this.__errorMessage);
return b}var c=new Jc;this.onError(K(c,c.error));this.onProgress(K(c,c.progress));this.onComplete(function(b){b=a(b);b.onError(K(c,c.error));b.onComplete(K(c,c.complete))});return c.future},get_isCompleted:function(){return this.__completed||this.__errored},__class__:Rb,__properties__:{get_isCompleted:"get_isCompleted"}};var Ac=function(){this.loaded=this.total=0;this.onProgress=new jj;this.onComplete=new rc;this.onProgress.add(K(this,this.update))};n["lime.app.Preloader"]=Ac;Ac.__name__=["lime",
"app","Preloader"];Ac.prototype={create:function(a){},load:function(a,b){for(var c=null,d=N.cache.version,e=0,f=a.length;e<f;){var g=e++,c=a[g];switch(b[g]){case "IMAGE":Ac.images.exists(c)||(g=new Image,Ac.images.set(c,g),g.onload=K(this,this.image_onLoad),g.src=c+"?"+d,this.total++);break;case "BINARY":Ac.loaders.exists(c)||(g=new gg,Ac.loaders.set(c,g),this.total++);break;case "TEXT":Ac.loaders.exists(c)||(g=new gg,Ac.loaders.set(c,g),this.total++);break;case "FONT":this.total++,this.loadFont(c)}}for(c=
Ac.loaders.keys();c.hasNext();)e=c.next(),Ac.loaders.get(e).load(e+"?"+d).onComplete(K(this,this.loader_onComplete));0==this.total&&this.start()},loadFont:function(a){var b=this;if(window.document.fonts&&(fj=window.document.fonts,K(fj,fj.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,g=!1;a=function(){if(c.offsetWidth!=e){if(!g)return g=!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__:Ac};var Jc=function(){this.future=new Rb};n["lime.app.Promise"]=Jc;Jc.__name__=["lime","app","Promise"];Jc.prototype={complete:function(a){if(!this.future.__errored&&
(this.future.__completed=!0,this.future.value=a,null!=this.future.__completeListeners)){for(var b=0,c=this.future.__completeListeners;b<c.length;){var d=c[b];++b;d(a)}this.future.__completeListeners=null}return this},completeWith:function(a){a.onComplete(K(this,this.complete));a.onError(K(this,this.error));a.onProgress(K(this,this.progress));return this},error:function(a){if(!this.future.__completed&&(this.future.__errored=!0,this.future.__errorMessage=a,null!=this.future.__errorListeners)){for(var b=
0,c=this.future.__errorListeners;b<c.length;){var d=c[b];++b;d(a)}this.future.__errorListeners=null}return this},progress:function(a){if(!this.future.__errored&&!this.future.__completed&&null!=this.future.__progressListeners)for(var b=0,c=this.future.__progressListeners;b<c.length;){var d=c[b];++b;d(a)}return this},get_isCompleted:function(){return this.future.get_isCompleted()},__class__:Jc,__properties__:{get_isCompleted:"get_isCompleted"}};var en=function(){this.EXPONENT_DISTANCE_CLAMPED=53254;
this.EXPONENT_DISTANCE=53253;this.LINEAR_DISTANCE_CLAMPED=53252;this.LINEAR_DISTANCE=53251;this.INVERSE_DISTANCE_CLAMPED=53250;this.INVERSE_DISTANCE=53249;this.DISTANCE_MODEL=53248;this.DOPPLER_VELOCITY=49153;this.SPEED_OF_SOUND=49155;this.DOPPLER_FACTOR=49152;this.EXTENSIONS=45060;this.RENDERER=45059;this.VERSION=45058;this.VENDOR=45057;this.OUT_OF_MEMORY=40965;this.INVALID_OPERATION=40964;this.INVALID_VALUE=40963;this.INVALID_ENUM=40962;this.INVALID_NAME=40961;this.NO_ERROR=0;this.SIZE=8196;this.CHANNELS=
8195;this.BITS=8194;this.FREQUENCY=8193;this.FORMAT_STEREO16=4355;this.FORMAT_STEREO8=4354;this.FORMAT_MONO16=4353;this.FORMAT_MONO8=4352;this.UNDETERMINED=4144;this.STREAMING=4137;this.STATIC=4136;this.SOURCE_TYPE=4135;this.BYTE_OFFSET=4134;this.SAMPLE_OFFSET=4133;this.SEC_OFFSET=4132;this.MAX_DISTANCE=4131;this.CONE_OUTER_GAIN=4130;this.ROLLOFF_FACTOR=4129;this.REFERENCE_DISTANCE=4128;this.BUFFERS_PROCESSED=4118;this.BUFFERS_QUEUED=4117;this.STOPPED=4116;this.PAUSED=4115;this.PLAYING=4114;this.INITIAL=
4113;this.SOURCE_STATE=4112;this.ORIENTATION=4111;this.MAX_GAIN=4110;this.MIN_GAIN=4109;this.GAIN=4106;this.BUFFER=4105;this.LOOPING=4103;this.VELOCITY=4102;this.DIRECTION=4101;this.POSITION=4100;this.PITCH=4099;this.CONE_OUTER_ANGLE=4098;this.CONE_INNER_ANGLE=4097;this.SOURCE_RELATIVE=514;this.TRUE=1;this.NONE=this.FALSE=0};n["lime.audio.ALAudioContext"]=en;en.__name__=["lime","audio","ALAudioContext"];en.prototype={bufferData:function(a,b,c,d,e){G.bufferData(a,b,c,d,e)},buffer3f:function(a,b,c,
d,e){G.buffer3f(a,b,c,d,e)},buffer3i:function(a,b,c,d,e){G.buffer3i(a,b,c,d,e)},bufferf:function(a,b,c){G.bufferf(a,b,c)},bufferfv:function(a,b,c){G.bufferfv(a,b,c)},bufferi:function(a,b,c){G.bufferi(a,b,c)},bufferiv:function(a,b,c){G.bufferiv(a,b,c)},deleteBuffer:function(a){G.deleteBuffer(a)},deleteBuffers:function(a){G.deleteBuffers(a)},deleteSource:function(a){G.deleteSource(a)},deleteSources:function(a){G.deleteSources(a)},disable:function(a){G.disable(a)},distanceModel:function(a){G.distanceModel(a)},
dopplerFactor:function(a){G.dopplerFactor(a)},dopplerVelocity:function(a){G.dopplerVelocity(a)},enable:function(a){G.enable(a)},genSource:function(){return G.genSource()},genSources:function(a){return G.genSources(a)},genBuffer:function(){return G.genBuffer()},genBuffers:function(a){return G.genBuffers(a)},getBoolean:function(a){return G.getBoolean(a)},getBooleanv:function(a,b){null==b&&(b=1);return G.getBooleanv(a,b)},getBuffer3f:function(a,b){return G.getBuffer3f(a,b)},getBuffer3i:function(a,b){return G.getBuffer3i(a,
b)},getBufferf:function(a,b){return G.getBufferf(a,b)},getBufferfv:function(a,b,c){null==c&&(c=1);return G.getBufferfv(a,b,c)},getBufferi:function(a,b){return G.getBufferi(a,b)},getBufferiv:function(a,b,c){null==c&&(c=1);return G.getBufferiv(a,b,c)},getDouble:function(a){return G.getDouble(a)},getDoublev:function(a,b){null==b&&(b=1);return G.getDoublev(a,b)},getEnumValue:function(a){return G.getEnumValue(a)},getError:function(){return G.getError()},getErrorString:function(){return G.getErrorString()},
getFloat:function(a){return G.getFloat(a)},getFloatv:function(a,b){null==b&&(b=1);return G.getFloatv(a,b)},getInteger:function(a){return G.getInteger(a)},getIntegerv:function(a,b){null==b&&(b=1);return G.getIntegerv(a,b)},getListener3f:function(a){return G.getListener3f(a)},getListener3i:function(a){return G.getListener3i(a)},getListenerf:function(a){return G.getListenerf(a)},getListenerfv:function(a,b){null==b&&(b=1);return G.getListenerfv(a,b)},getListeneri:function(a){return G.getListeneri(a)},
getListeneriv:function(a,b){null==b&&(b=1);return G.getListeneriv(a,b)},getProcAddress:function(a){return G.getProcAddress(a)},getSource3f:function(a,b){return G.getSource3f(a,b)},getSourcef:function(a,b){return G.getSourcef(a,b)},getSource3i:function(a,b){return G.getSource3i(a,b)},getSourcefv:function(a,b,c){return G.getSourcefv(a,b)},getSourcei:function(a,b){return G.getSourcei(a,b)},getSourceiv:function(a,b,c){null==c&&(c=1);return G.getSourceiv(a,b,c)},getString:function(a){return G.getString(a)},
isBuffer:function(a){return G.isBuffer(a)},isEnabled:function(a){return G.isEnabled(a)},isExtensionPresent:function(a){return G.isExtensionPresent(a)},isSource:function(a){return G.isSource(a)},listener3f:function(a,b,c,d){G.listener3f(a,b,c,d)},listener3i:function(a,b,c,d){G.listener3i(a,b,c,d)},listenerf:function(a,b){G.listenerf(a,b)},listenerfv:function(a,b){G.listenerfv(a,b)},listeneri:function(a,b){G.listeneri(a,b)},listeneriv:function(a,b){G.listeneriv(a,b)},source3f:function(a,b,c,d,e){G.source3f(a,
b,c,d,e)},source3i:function(a,b,c,d,e){G.source3i(a,b,c,d,e)},sourcef:function(a,b,c){G.sourcef(a,b,c)},sourcefv:function(a,b,c){G.sourcefv(a,b,c)},sourcei:function(a,b,c){G.sourcei(a,b,c)},sourceiv:function(a,b,c){G.sourceiv(a,b,c)},sourcePlay:function(a){G.sourcePlay(a)},sourcePlayv:function(a){G.sourcePlayv(a)},sourceStop:function(a){G.sourceStop(a)},sourceStopv:function(a){G.sourceStopv(a)},sourceRewind:function(a){G.sourceRewind(a)},sourceRewindv:function(a){G.sourceRewindv(a)},sourcePause:function(a){G.sourcePause(a)},
sourcePausev:function(a){G.sourcePausev(a)},sourceQueueBuffer:function(a,b){G.sourceQueueBuffer(a,b)},sourceQueueBuffers:function(a,b,c){G.sourceQueueBuffers(a,b,c)},sourceUnqueueBuffer:function(a){return G.sourceUnqueueBuffer(a)},sourceUnqueueBuffers:function(a,b){return G.sourceUnqueueBuffers(a,b)},speedOfSound:function(a){G.speedOfSound(a)},__class__:en};var fn=function(){this.ALL_DEVICES_SPECIFIER=4115;this.DEFAULT_ALL_DEVICES_SPECIFIER=4114;this.ENUMERATE_ALL_EXT=1;this.EXTENSIONS=4102;this.DEVICE_SPECIFIER=
4101;this.DEFAULT_DEVICE_SPECIFIER=4100;this.ALL_ATTRIBUTES=4099;this.ATTRIBUTES_SIZE=4098;this.OUT_OF_MEMORY=40965;this.INVALID_VALUE=40964;this.INVALID_ENUM=40963;this.INVALID_CONTEXT=40962;this.INVALID_DEVICE=40961;this.NO_ERROR=0;this.STEREO_SOURCES=4113;this.MONO_SOURCES=4112;this.SYNC=4105;this.REFRESH=4104;this.FREQUENCY=4103;this.TRUE=1;this.FALSE=0};n["lime.audio.ALCAudioContext"]=fn;fn.__name__=["lime","audio","ALCAudioContext"];fn.prototype={closeDevice:function(a){return ya.closeDevice(a)},
createContext:function(a,b){return ya.createContext(a,b)},destroyContext:function(a){ya.destroyContext(a)},getContextsDevice:function(a){return ya.getContextsDevice(a)},getCurrentContext:function(){return ya.getCurrentContext()},getError:function(a){return ya.getError(a)},getErrorString:function(a){return ya.getErrorString(a)},getIntegerv:function(a,b,c){null==c&&(c=1);return ya.getIntegerv(a,b,c)},getString:function(a,b){return ya.getString(a,b)},makeContextCurrent:function(a){return ya.makeContextCurrent(a)},
openDevice:function(a){return ya.openDevice(a)},processContext:function(a){ya.processContext(a)},suspendContext:function(a){ya.suspendContext(a)},__class__:fn};var rf=function(){this.id=0};n["lime.audio.AudioBuffer"]=rf;rf.__name__=["lime","audio","AudioBuffer"];rf.fromBytes=function(a){return null};rf.fromFile=function(a){return null};rf.fromURL=function(a,b){null!=a&&-1==a.indexOf("http://")&&-1==a.indexOf("https://")&&b(rf.fromFile(a))};rf.prototype={dispose:function(){},__class__:rf};var Ee=n["lime.audio.AudioContext"]=
{__ename__:["lime","audio","AudioContext"],__constructs__:["OPENAL","HTML5","WEB","FLASH","CUSTOM"]};Ee.OPENAL=function(a,b){var c=["OPENAL",0,a,b];c.__enum__=Ee;c.toString=J;return c};Ee.HTML5=function(a){a=["HTML5",1,a];a.__enum__=Ee;a.toString=J;return a};Ee.WEB=function(a){a=["WEB",2,a];a.__enum__=Ee;a.toString=J;return a};Ee.FLASH=function(a){a=["FLASH",3,a];a.__enum__=Ee;a.toString=J;return a};Ee.CUSTOM=function(a){a=["CUSTOM",4,a];a.__enum__=Ee;a.toString=J;return a};var Tc=function(){};n["lime.audio.AudioManager"]=
Tc;Tc.__name__=["lime","audio","AudioManager"];Tc.context=null;Tc.init=function(a){if(null==Tc.context)if(null==a)try{window.AudioContext=window.AudioContext||window.webkitAudioContext,Tc.context=Ee.WEB(new AudioContext)}catch(b){Ia.lastException=b,b instanceof F&&(b=b.val),Tc.context=Ee.HTML5(new Tl)}else Tc.context=a};Tc.resume=function(){if(null!=Tc.context){var a=Tc.context;switch(a[1]){case 0:a=a[2],a.processContext(a.getCurrentContext())}}};Tc.shutdown=function(){if(null!=Tc.context){var a=
Tc.context;switch(a[1]){case 0:var a=a[2],b=a.getCurrentContext();if(null!=b){var c=a.getContextsDevice(b);a.makeContextCurrent(null);a.destroyContext(b);a.closeDevice(c)}}}};Tc.suspend=function(){if(null!=Tc.context){var a=Tc.context;switch(a[1]){case 0:a=a[2],a.suspendContext(a.getCurrentContext())}}};var gn=function(a,b,c,d){null==d&&(d=0);null==b&&(b=0);this.onComplete=new rc;this.buffer=a;this.offset=b;null!=c&&0!=c&&this.set_length(c);this.set_loops(d);this.id=0;null!=a&&this.init()};n["lime.audio.AudioSource"]=
gn;gn.__name__=["lime","audio","AudioSource"];gn.prototype={dispose:function(){var a=Tc.context;switch(a[1]){case 0:a=a[3],0!=this.id&&a.deleteSource(this.id)}},init:function(){var a=Tc.context;switch(a[1]){case 0:a=a[3];if(0==this.buffer.id){this.buffer.id=a.genBuffer();var b=0;1==this.buffer.channels?8==this.buffer.bitsPerSample?b=a.FORMAT_MONO8:16==this.buffer.bitsPerSample&&(b=a.FORMAT_MONO16):2==this.buffer.channels&&(8==this.buffer.bitsPerSample?b=a.FORMAT_STEREO8:16==this.buffer.bitsPerSample&&
(b=a.FORMAT_STEREO16));a.bufferData(this.buffer.id,b,this.buffer.data,this.buffer.data.length,this.buffer.sampleRate)}this.id=a.genSource();a.sourcei(this.id,a.BUFFER,this.buffer.id)}},play:function(){},pause:function(){},stop:function(){},timer_onRun:function(){},get_currentTime:function(){return 0},set_currentTime:function(a){return this.pauseTime=a},get_gain:function(){return 1},set_gain:function(a){return 1},get_length:function(){return null!=this.__length?this.__length:0},set_length:function(a){return this.__length=
a},get_loops:function(){return this.__loops},set_loops:function(a){return this.__loops=a},__class__:gn,__properties__:{set_loops:"set_loops",get_loops:"get_loops",set_length:"set_length",get_length:"get_length",set_gain:"set_gain",get_gain:"get_gain",set_currentTime:"set_currentTime",get_currentTime:"get_currentTime"}};var hn=function(){};n["lime.audio.FlashAudioContext"]=hn;hn.__name__=["lime","audio","FlashAudioContext"];hn.prototype={createBuffer:function(a,b){return null},getBytesLoaded:function(a){return 0},
getBytesTotal:function(a){return 0},getID3:function(a){return null},getIsBuffering:function(a){return!1},getIsURLInaccessible:function(a){return!1},getLength:function(a){return 0},getURL:function(a){return null},close:function(a){},extract:function(a,b,c,d){return 0},load:function(a,b,c){},loadCompressedDataFromByteArray:function(a,b,c){},loadPCMFromByteArray:function(a,b,c,d,e,f){},play:function(a,b,c,d){return null},__class__:hn};var Tl=function(){this.NETWORK_NO_SOURCE=3;this.NETWORK_LOADING=2;
this.NETWORK_IDLE=1;this.HAVE_NOTHING=this.NETWORK_EMPTY=0;this.HAVE_METADATA=1;this.HAVE_FUTURE_DATA=3;this.HAVE_ENOUGH_DATA=4;this.HAVE_CURRENT_DATA=2};n["lime.audio.HTML5AudioContext"]=Tl;Tl.__name__=["lime","audio","HTML5AudioContext"];Tl.prototype={canPlayType:function(a,b){return null!=a.src?a.src.canPlayType(b):null},createBuffer:function(a){var b=new rf;b.src=new Audio;b.src.src=a;return b},getAutoplay:function(a){return null!=a.src?a.src.autoplay:!1},getBuffered:function(a){return null!=
a.src?a.src.buffered:null},getCurrentSrc:function(a){return null!=a.src?a.src.currentSrc:null},getCurrentTime:function(a){return null!=a.src?a.src.currentTime:0},getDefaultPlaybackRate:function(a){return null!=a.src?a.src.defaultPlaybackRate:1},getDuration:function(a){return null!=a.src?a.src.duration:0},getEnded:function(a){return null!=a.src?a.src.ended:!1},getError:function(a){return null!=a.src?a.src.error:null},getLoop:function(a){return null!=a.src?a.src.loop:!1},getMuted:function(a){return null!=
a.src?a.src.muted:!1},getNetworkState:function(a){return null!=a.src?a.src.networkState:0},getPaused:function(a){return null!=a.src?a.src.paused:!1},getPlaybackRate:function(a){return null!=a.src?a.src.playbackRate:1},getPlayed:function(a){return null!=a.src?a.src.played:null},getPreload:function(a){return null!=a.src?a.src.preload:null},getReadyState:function(a){return null!=a.src?a.src.readyState:0},getSeekable:function(a){return null!=a.src?a.src.seekable:null},getSeeking:function(a){return null!=
a.src?a.src.seeking:!1},getSrc:function(a){return null!=a.src?a.src.src:null},getStartTime:function(a){return null!=a.src?a.src.playbackRate:0},getVolume:function(a){return null!=a.src?a.src.volume:1},load:function(a){if(null!=a.src)return a.src.load()},pause:function(a){if(null!=a.src)return a.src.pause()},play:function(a){if(null!=a.src)return a.src.play()},setAutoplay:function(a,b){null!=a.src&&(a.src.autoplay=b)},setCurrentTime:function(a,b){null!=a.src&&(a.src.currentTime=b)},setDefaultPlaybackRate:function(a,
b){null!=a.src&&(a.src.defaultPlaybackRate=b)},setLoop:function(a,b){null!=a.src&&(a.src.loop=b)},setMuted:function(a,b){null!=a.src&&(a.src.muted=b)},setPlaybackRate:function(a,b){null!=a.src&&(a.src.playbackRate=b)},setPreload:function(a,b){null!=a.src&&(a.src.preload=b)},setSrc:function(a,b){null!=a.src&&(a.src.src=b)},setVolume:function(a,b){null!=a.src&&(a.src.volume=b)},__class__:Tl};var G=function(){};n["lime.audio.openal.AL"]=G;G.__name__=["lime","audio","openal","AL"];G.bufferData=function(a,
b,c,d,e){};G.buffer3f=function(a,b,c,d,e){};G.buffer3i=function(a,b,c,d,e){};G.bufferf=function(a,b,c){};G.bufferfv=function(a,b,c){};G.bufferi=function(a,b,c){};G.bufferiv=function(a,b,c){};G.deleteBuffer=function(a){};G.deleteBuffers=function(a){};G.deleteSource=function(a){};G.deleteSources=function(a){};G.disable=function(a){};G.distanceModel=function(a){};G.dopplerFactor=function(a){};G.dopplerVelocity=function(a){};G.enable=function(a){};G.genSource=function(){return 0};G.genSources=function(a){return null};
G.genBuffer=function(){return 0};G.genBuffers=function(a){return null};G.getBoolean=function(a){return!1};G.getBooleanv=function(a,b){return null};G.getBuffer3f=function(a,b){return null};G.getBuffer3i=function(a,b){return null};G.getBufferf=function(a,b){return 0};G.getBufferfv=function(a,b,c){return null};G.getBufferi=function(a,b){return 0};G.getBufferiv=function(a,b,c){return null};G.getDouble=function(a){return 0};G.getDoublev=function(a,b){return null};G.getEnumValue=function(a){return 0};G.getError=
function(){return 0};G.getErrorString=function(){switch(G.getError()){case 40961:return"INVALID_NAME: Invalid parameter name";case 40962:return"INVALID_ENUM: Invalid enum value";case 40963:return"INVALID_VALUE: Invalid parameter value";case 40964:return"INVALID_OPERATION: Illegal operation or call";case 40965:return"OUT_OF_MEMORY: OpenAL has run out of memory";default:return""}};G.getFloat=function(a){return 0};G.getFloatv=function(a,b){return null};G.getInteger=function(a){return 0};G.getIntegerv=
function(a,b){return null};G.getListener3f=function(a){return null};G.getListener3i=function(a){return null};G.getListenerf=function(a){return 0};G.getListenerfv=function(a,b){return null};G.getListeneri=function(a){return 0};G.getListeneriv=function(a,b){return null};G.getProcAddress=function(a){return null};G.getSource3f=function(a,b){return null};G.getSourcef=function(a,b){return 0};G.getSource3i=function(a,b){return null};G.getSourcefv=function(a,b,c){return null};G.getSourcei=function(a,b){return 0};
G.getSourceiv=function(a,b,c){return null};G.getString=function(a){return null};G.isBuffer=function(a){return!1};G.isEnabled=function(a){return!1};G.isExtensionPresent=function(a){return!1};G.isSource=function(a){return!1};G.listener3f=function(a,b,c,d){};G.listener3i=function(a,b,c,d){};G.listenerf=function(a,b){};G.listenerfv=function(a,b){};G.listeneri=function(a,b){};G.listeneriv=function(a,b){};G.source3f=function(a,b,c,d,e){};G.source3i=function(a,b,c,d,e){};G.sourcef=function(a,b,c){};G.sourcefv=
function(a,b,c){};G.sourcei=function(a,b,c){};G.sourceiv=function(a,b,c){};G.sourcePlay=function(a){};G.sourcePlayv=function(a){};G.sourceStop=function(a){};G.sourceStopv=function(a){};G.sourceRewind=function(a){};G.sourceRewindv=function(a){};G.sourcePause=function(a){};G.sourcePausev=function(a){};G.sourceQueueBuffer=function(a,b){};G.sourceQueueBuffers=function(a,b,c){};G.sourceUnqueueBuffer=function(a){return 0};G.sourceUnqueueBuffers=function(a,b){return null};G.speedOfSound=function(a){};var ya=
function(){};n["lime.audio.openal.ALC"]=ya;ya.__name__=["lime","audio","openal","ALC"];ya.closeDevice=function(a){return!1};ya.createContext=function(a,b){return null};ya.destroyContext=function(a){};ya.getContextsDevice=function(a){return null};ya.getCurrentContext=function(){return null};ya.getError=function(a){return 0};ya.getErrorString=function(a){switch(ya.getError(a)){case 40961:return"INVALID_DEVICE: Invalid device (or no device?)";case 40962:return"INVALID_CONTEXT: Invalid context (or no context?)";
case 40963:return"INVALID_ENUM: Invalid enum value";case 40964:return"INVALID_VALUE: Invalid param value";case 40965:return"OUT_OF_MEMORY: OpenAL has run out of memory";default:return""}};ya.getIntegerv=function(a,b,c){return null};ya.getString=function(a,b){return null};ya.makeContextCurrent=function(a){return!1};ya.openDevice=function(a){return null};ya.processContext=function(a){};ya.suspendContext=function(a){};var Gn={};n["lime.audio.openal._ALContext.ALContext_Impl_"]=Gn;Gn.__name__=["lime",
"audio","openal","_ALContext","ALContext_Impl_"];Gn._new=function(a){return a};var Hn={};n["lime.audio.openal._ALDevice.ALDevice_Impl_"]=Hn;Hn.__name__=["lime","audio","openal","_ALDevice","ALDevice_Impl_"];Hn._new=function(a){return a};var jn=function(){};n["lime.graphics.ConsoleRenderContext"]=jn;jn.__name__=["lime","graphics","ConsoleRenderContext"];jn.prototype={createIndexBuffer:function(a,b){return new Ul},createVertexBuffer:function(a,b){return new Vl},lookupShader:function(a){return new Wl},
clear:function(a,b,c,d,e,f){},bindShader:function(a){},setViewport:function(a,b,c,d,e,f){},setVertexShaderConstantF:function(a,b,c){},setVertexSource:function(a){},setIndexSource:function(a){},draw:function(a,b,c){},drawIndexed:function(a,b,c,d){},get_width:function(){return 0},get_height:function(){return 0},__class__:jn,__properties__:{get_height:"get_height",get_width:"get_width"}};var kn=function(){};n["lime.graphics.FlashRenderContext"]=kn;kn.__name__=["lime","graphics","FlashRenderContext"];
kn.prototype={addChild:function(a){return null},addChildAt:function(a,b){return null},addEventListener:function(a,b,c,d,e){},areInaccessibleObjectsUnderPoint:function(a){return!1},contains:function(a){return!1},dispatchEvent:function(a){return!1},getBounds:function(a){return null},getChildAt:function(a){return null},getChildByName:function(a){return null},getChildIndex:function(a){return 0},getObjectsUnderPoint:function(a){return null},getRect:function(a){return null},globalToLocal:function(a){return null},
globalToLocal3D:function(a){return null},hasEventListener:function(a){return!1},hitTestObject:function(a){return!1},hitTestPoint:function(a,b,c){return!1},local3DToGlobal:function(a){return null},localToGlobal:function(a){return null},removeChild:function(a){return null},removeChildAt:function(a){return null},removeChildren:function(a,b){},removeEventListener:function(a,b,c){},requestSoftKeyboard:function(){return!1},setChildIndex:function(a,b){},startDrag:function(a,b){},startTouchDrag:function(a,
b,c){},stopAllMovieClips:function(){},stopDrag:function(){},stopTouchDrag:function(a){},swapChildren:function(a,b){},swapChildrenAt:function(a,b){},toString:function(){return null},willTrigger:function(a){return!1},__class__:kn};var pb=function(a,b,c,d,e,f,g){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==g)if(null!=ed.current&&null!=ed.current.renderers[0])switch(ed.current.renderers[0].context[1]){case 2:case 1:this.type=
Hc.CANVAS;break;case 3:this.type=Hc.FLASH;break;default:this.type=Hc.DATA}else this.type=Hc.DATA;else this.type=g;if(null==a){if(0<d&&0<e)switch(this.type[1]){case 0:this.buffer=new Fe(null,d,e);X.createCanvas(this,d,e);null!=f&&this.fillRect(new tc(0,0,d,e),f);break;case 1:a=d*e*4,a=null!=a?new nc(a):null,this.buffer=new Fe(a,d,e),null!=f&&this.fillRect(new tc(0,0,d,e),f)}}else this.__fromImageBuffer(a)};n["lime.graphics.Image"]=pb;pb.__name__=["lime","graphics","Image"];pb.__base64Encoder=null;
pb.fromBase64=function(a,b,c){if(null==a)return null;var d=new pb;d.__fromBase64(a,b,c);return d};pb.fromBitmapData=function(a){return null==a?null:a.image};pb.fromBytes=function(a,b){if(null==a)return null;var c=new pb;c.__fromBytes(a,b);return c};pb.fromCanvas=function(a){if(null==a)return null;var b=new Fe(null,a.width,a.height);b.set_src(a);return new pb(b)};pb.fromFile=function(a,b,c){var d=new pb;d.__fromFile(a,b,c);return d};pb.fromImageElement=function(a){if(null==a)return null;var b=new Fe(null,
a.width,a.height);b.set_src(a);return new pb(b)};pb.__base64Encode=function(a){var b;switch(a.length%3){case 1:b="==";break;case 2:b="=";break;default:b=""}null==pb.__base64Encoder&&(pb.__base64Encoder=new mg(Ya.ofString(pb.__base64Chars)));return pb.__base64Encoder.encodeBytes(a).toString()+b};pb.__isJPG=function(a){return 255==a.b[0]&&216==a.b[1]};pb.__isPNG=function(a){return 137==a.b[0]&&80==a.b[1]&&78==a.b[2]&&71==a.b[3]&&13==a.b[4]&&10==a.b[5]&&26==a.b[6]&&10==a.b[7]};pb.__isGIF=function(a){if(71==
a.b[0]&&73==a.b[1]&&70==a.b[2]&&56==a.b[3]){var b=a.b[4];return(55==b||57==b)&&97==a.b[5]}return!1};pb.prototype={clone:function(){if(null!=this.buffer){this.type==Hc.CANVAS&&null==this.buffer.__srcImage&&(X.convertToCanvas(this),X.sync(this,!0));var a=new pb(this.buffer.clone(),this.offsetX,this.offsetY,this.width,this.height,null,this.type);a.dirty=this.dirty;return a}return new pb(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:X.colorTransform(this,a,b);break;case 1:X.convertToData(this);Ma.colorTransform(this,a,b);break;case 2:a.offset(this.offsetX,this.offsetY),this.buffer.__srcBitmapData.colorTransform(a.__toFlashRectangle(),fb.__toFlashColorTransform(b))}},copyChannel:function(a,b,c,d,e){b=this.__clipRect(b);if(null!=this.buffer&&null!=b&&!(e==lc.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:X.copyChannel(this,a,b,c,d,e);break;case 1:X.convertToData(this);Ma.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 g;switch(e[1]){case 0:g=1;break;case 1:g=2;break;case 2:g=4;break;case 3:g=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,g)}},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:X.convertToCanvas(this);X.copyPixels(this,
a,b,c,d,e,f);break;case 1:X.convertToData(this);X.convertToData(a);Ma.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)}},encode:function(a,b){null==b&&(b=90);null==a&&(a="png");switch(a){case "png":return nj.encode(this);
case "jpg":case "jpeg":return oj.encode(this,b);case "bmp":return ln.encode(this)}return null},fillRect:function(a,b,c){a=this.__clipRect(a);if(null!=this.buffer&&null!=a)switch(this.type[1]){case 0:X.fillRect(this,a,b,c);break;case 1:X.convertToData(this);if(0==this.buffer.data.length)break;Ma.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)}},floodFill:function(a,b,c,d){if(null!=this.buffer)switch(this.type[1]){case 0:X.floodFill(this,a,b,c,d);break;case 1:X.convertToData(this);Ma.floodFill(this,a,b,c,d);break;case 2:if(null!=d)switch(d){case 1:break;case 2:c=(c&255)<<24|(c>>8&255)<<16|(c>>16&255)<<8|c>>24&255;break;default:c=(c&255)<<24|(c>>24&255)<<16|(c>>16&255)<<8|c>>8&255}else c=(c&
255)<<24|(c>>24&255)<<16|(c>>16&255)<<8|c>>8&255;this.buffer.__srcBitmapData.floodFill(a+this.offsetX,b+this.offsetY,c)}},getColorBoundsRect:function(a,b,c,d){null==c&&(c=!0);if(null==this.buffer)return null;switch(this.type[1]){case 0:return X.convertToData(this),Ma.getColorBoundsRect(this,a,b,c,d);case 1:return Ma.getColorBoundsRect(this,a,b,c,d);case 2:return a=this.buffer.__srcBitmapData.getColorBoundsRect(a,b,c),new tc(a.x,a.y,a.width,a.height);default:return null}},getPixel:function(a,b,c){if(null==
this.buffer||0>a||0>b||a>=this.width||b>=this.height)return 0;switch(this.type[1]){case 0:return X.getPixel(this,a,b,c);case 1:return X.convertToData(this),Ma.getPixel(this,a,b,c);case 2:if(a=this.buffer.__srcBitmapData.getPixel(a+this.offsetX,b+this.offsetY),null!=c)switch(c){case 1:return a;case 2:return(a&255)<<24|(a>>8&255)<<16|(a>>16&255)<<8|a>>24&255;default:return(a>>16&255)<<24|(a>>8&255)<<16|(a&255)<<8|a>>24&255}else return(a>>16&255)<<24|(a>>8&255)<<16|(a&255)<<8|a>>24&255;default:return 0}},
getPixel32:function(a,b,c){if(null==this.buffer||0>a||0>b||a>=this.width||b>=this.height)return 0;switch(this.type[1]){case 0:return X.getPixel32(this,a,b,c);case 1:return X.convertToData(this),Ma.getPixel32(this,a,b,c);case 2:if(a=this.buffer.__srcBitmapData.getPixel32(a+this.offsetX,b+this.offsetY),null!=c)switch(c){case 1:return a;case 2:return(a&255)<<24|(a>>8&255)<<16|(a>>16&255)<<8|a>>24&255;default:return(a>>16&255)<<24|(a>>8&255)<<16|(a&255)<<8|a>>24&255}else return(a>>16&255)<<24|(a>>8&255)<<
16|(a&255)<<8|a>>24&255;default:return 0}},getPixels:function(a,b){if(null==this.buffer)return null;switch(this.type[1]){case 0:return X.getPixels(this,a,b);case 1:return X.convertToData(this),Ma.getPixels(this,a,b);case 2:return null;default:return null}},merge:function(a,b,c,d,e,f,g){if(null!=this.buffer&&null!=a)switch(this.type[1]){case 0:X.convertToCanvas(this);X.merge(this,a,b,c,d,e,f,g);break;case 1:X.convertToData(this);X.convertToData(a);Ma.merge(this,a,b,c,d,e,f,g);break;case 2:b.offset(this.offsetX,
this.offsetY);this.buffer.__srcBitmapData.merge(a.buffer.__srcBitmapData,b.__toFlashRectangle(),c.__toFlashPoint(),d,e,f,g);break;default:return null}},resize:function(a,b){switch(this.type[1]){case 0:X.resize(this,a,b);break;case 1:Ma.resize(this,a,b)}this.buffer.width=a;this.buffer.height=b;this.offsetY=this.offsetX=0;this.width=a;this.height=b},scroll:function(a,b){if(null!=this.buffer)switch(this.type[1]){case 0:X.scroll(this,a,b);break;case 1:this.copyPixels(this,this.get_rect(),new yc(a,b));
break;case 2:this.buffer.__srcBitmapData.scroll(a+this.offsetX,b+this.offsetX)}},setPixel:function(a,b,c,d){if(!(null==this.buffer||0>a||0>b||a>=this.width||b>=this.height))switch(this.type[1]){case 0:X.setPixel(this,a,b,c,d);break;case 1:X.convertToData(this);Ma.setPixel(this,a,b,c,d);break;case 2:if(null!=d)switch(d){case 1:break;case 2:c=(c&255)<<24|(c>>8&255)<<16|(c>>16&255)<<8|c>>24&255;break;default:c=(c&255)<<24|(c>>24&255)<<16|(c>>16&255)<<8|c>>8&255}else c=(c&255)<<24|(c>>24&255)<<16|(c>>
16&255)<<8|c>>8&255;this.buffer.__srcBitmapData.setPixel(a+this.offsetX,b+this.offsetX,c)}},setPixel32:function(a,b,c,d){if(!(null==this.buffer||0>a||0>b||a>=this.width||b>=this.height))switch(this.type[1]){case 0:X.setPixel32(this,a,b,c,d);break;case 1:X.convertToData(this);Ma.setPixel32(this,a,b,c,d);break;case 2:if(null!=d)switch(d){case 1:break;case 2:c=(c&255)<<24|(c>>8&255)<<16|(c>>16&255)<<8|c>>24&255;break;default:c=(c&255)<<24|(c>>24&255)<<16|(c>>16&255)<<8|c>>8&255}else c=(c&255)<<24|(c>>
24&255)<<16|(c>>16&255)<<8|c>>8&255;this.buffer.__srcBitmapData.setPixel32(a+this.offsetX,b+this.offsetY,c)}},setPixels:function(a,b,c){a=this.__clipRect(a);if(null!=this.buffer&&null!=a)switch(this.type[1]){case 0:X.setPixels(this,a,b,c);break;case 1:X.convertToData(this),Ma.setPixels(this,a,b,c)}},threshold:function(a,b,c,d,e,f,g,k,p){null==k&&(k=!1);null==g&&(g=-1);null==f&&(f=0);if(null==this.buffer||null==a||null==b)return 0;switch(this.type[1]){case 0:case 1:return X.convertToData(this),Ma.threshold(this,
a,b,c,d,e,f,g,k,p);case 2:if(null!=p)switch(p){case 1:break;case 2:f=(f&255)<<24|(f>>8&255)<<16|(f>>16&255)<<8|f>>24&255;break;default:f=(f&255)<<24|(f>>24&255)<<16|(f>>16&255)<<8|f>>8&255}else f=(f&255)<<24|(f>>24&255)<<16|(f>>16&255)<<8|f>>8&255;if(null!=p)switch(p){case 1:break;case 2:g=(g&255)<<24|(g>>8&255)<<16|(g>>16&255)<<8|g>>24&255;break;default:g=(g&255)<<24|(g>>24&255)<<16|(g>>16&255)<<8|g>>8&255}else g=(g&255)<<24|(g>>24&255)<<16|(g>>16&255)<<8|g>>8&255;b.offset(a.offsetX,a.offsetY);c.offset(this.offsetX,
this.offsetY);return this.buffer.__srcBitmapData.threshold(a.buffer.get_src(),b.__toFlashRectangle(),c.__toFlashPoint(),d,e,f,g,k)}return 0},__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},__fromBase64:function(a,b,c){var d=this,e=new Image;e.crossOrigin="Anonymous";
e.addEventListener("load",function(a){d.buffer=new Fe(null,e.width,e.height);d.buffer.__srcImage=e;d.offsetX=0;d.offsetY=0;d.width=d.buffer.width;d.height=d.buffer.height;null!=c&&c(d)},!1);e.src="data:"+b+";base64,"+a},__fromBytes:function(a,b){var c="";if(pb.__isPNG(a))c="image/png";else if(pb.__isJPG(a))c="image/jpeg";else if(pb.__isGIF(a))c="image/gif";else throw new F("Image tried to read PNG/JPG Bytes, but found an invalid header.");this.__fromBase64(pb.__base64Encode(a),c,b)},__fromFile:function(a,
b,c){var d=this,e=new Image;e.crossOrigin="Anonymous";e.onload=function(a){d.buffer=new Fe(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&&(X.convertToCanvas(this),X.sync(this,!1),X.createImageData(this));
return this.buffer.data},set_data:function(a){return this.buffer.data=a},get_format:function(){return this.buffer.format},set_format:function(a){if(this.buffer.format!=a)switch(this.type[1]){case 1:Ma.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},set_powerOfTwo:function(a){if(a!=this.get_powerOfTwo()){for(var b=
1,c=1;b<this.buffer.width;)b<<=1;for(;c<this.buffer.height;)c<<=1;switch(this.type[1]){case 1:Ma.resizeBuffer(this,b,c)}}return a},get_premultiplied:function(){return this.buffer.premultiplied},set_premultiplied:function(a){if(a&&!this.buffer.premultiplied)switch(this.type[1]){case 1:X.convertToData(this),Ma.multiplyAlpha(this)}else if(!a&&this.buffer.premultiplied)switch(this.type[1]){case 1:X.convertToData(this),Ma.unmultiplyAlpha(this)}return a},get_rect:function(){return new tc(0,0,this.width,
this.height)},get_src:function(){null==this.buffer.__srcCanvas&&X.convertToCanvas(this);return this.buffer.get_src()},set_src:function(a){return this.buffer.set_src(a)},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__:pb,__properties__:{set_transparent:"set_transparent",get_transparent:"get_transparent",set_src:"set_src",get_src:"get_src",get_rect:"get_rect",set_premultiplied:"set_premultiplied",
get_premultiplied:"get_premultiplied",set_powerOfTwo:"set_powerOfTwo",get_powerOfTwo:"get_powerOfTwo",set_format:"set_format",get_format:"get_format",set_data:"set_data",get_data:"get_data"}};var Fe=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};n["lime.graphics.ImageBuffer"]=Fe;Fe.__name__=["lime","graphics","ImageBuffer"];Fe.prototype={clone:function(){var a=new Fe(this.data,
this.width,this.height,this.bitsPerPixel);if(null!=this.data){var b=this.data.byteLength,b=null!=b?new nc(b):null;a.data=b;b=this.data;b=null!=b?new nc(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){q.__instanceof(a,Image)?this.__srcImage=a:q.__instanceof(a,HTMLCanvasElement)&&(this.__srcCanvas=a,this.__srcContext=this.__srcCanvas.getContext("2d"));return a},get_stride:function(){return 4*this.width},__class__:Fe,__properties__:{get_stride:"get_stride",set_src:"set_src",get_src:"get_src"}};var lc=n["lime.graphics.ImageChannel"]={__ename__:["lime","graphics","ImageChannel"],__constructs__:["RED","GREEN","BLUE","ALPHA"]};lc.RED=
["RED",0];lc.RED.toString=J;lc.RED.__enum__=lc;lc.GREEN=["GREEN",1];lc.GREEN.toString=J;lc.GREEN.__enum__=lc;lc.BLUE=["BLUE",2];lc.BLUE.toString=J;lc.BLUE.__enum__=lc;lc.ALPHA=["ALPHA",3];lc.ALPHA.toString=J;lc.ALPHA.__enum__=lc;var Hc=n["lime.graphics.ImageType"]={__ename__:["lime","graphics","ImageType"],__constructs__:["CANVAS","DATA","FLASH","CUSTOM"]};Hc.CANVAS=["CANVAS",0];Hc.CANVAS.toString=J;Hc.CANVAS.__enum__=Hc;Hc.DATA=["DATA",1];Hc.DATA.toString=J;Hc.DATA.__enum__=Hc;Hc.FLASH=["FLASH",
2];Hc.FLASH.toString=J;Hc.FLASH.__enum__=Hc;Hc.CUSTOM=["CUSTOM",3];Hc.CUSTOM.toString=J;Hc.CUSTOM.__enum__=Hc;var Uc=n["lime.graphics.RenderContext"]={__ename__:["lime","graphics","RenderContext"],__constructs__:"OPENGL CANVAS DOM FLASH CAIRO CONSOLE CUSTOM NONE".split(" ")};Uc.OPENGL=function(a){a=["OPENGL",0,a];a.__enum__=Uc;a.toString=J;return a};Uc.CANVAS=function(a){a=["CANVAS",1,a];a.__enum__=Uc;a.toString=J;return a};Uc.DOM=function(a){a=["DOM",2,a];a.__enum__=Uc;a.toString=J;return a};Uc.FLASH=
function(a){a=["FLASH",3,a];a.__enum__=Uc;a.toString=J;return a};Uc.CAIRO=function(a){a=["CAIRO",4,a];a.__enum__=Uc;a.toString=J;return a};Uc.CONSOLE=function(a){a=["CONSOLE",5,a];a.__enum__=Uc;a.toString=J;return a};Uc.CUSTOM=function(a){a=["CUSTOM",6,a];a.__enum__=Uc;a.toString=J;return a};Uc.NONE=["NONE",7];Uc.NONE.toString=J;Uc.NONE.__enum__=Uc;var Ll=function(a){this.onRender=new rc;this.onContextRestored=new Ol;this.onContextLost=new rc;this.window=a;this.backend=new Kl(this);this.window.renderer=
this};n["lime.graphics.Renderer"]=Ll;Ll.__name__=["lime","graphics","Renderer"];Ll.prototype={create:function(){this.backend.create()},flip:function(){this.backend.flip()},readPixels:function(a){return this.backend.readPixels(a)},render:function(){this.backend.render()},__class__:Ll};var Xb=n["lime.graphics.RendererType"]={__ename__:["lime","graphics","RendererType"],__constructs__:"OPENGL CANVAS DOM FLASH CAIRO CONSOLE CUSTOM".split(" ")};Xb.OPENGL=["OPENGL",0];Xb.OPENGL.toString=J;Xb.OPENGL.__enum__=
Xb;Xb.CANVAS=["CANVAS",1];Xb.CANVAS.toString=J;Xb.CANVAS.__enum__=Xb;Xb.DOM=["DOM",2];Xb.DOM.toString=J;Xb.DOM.__enum__=Xb;Xb.FLASH=["FLASH",3];Xb.FLASH.toString=J;Xb.FLASH.__enum__=Xb;Xb.CAIRO=["CAIRO",4];Xb.CAIRO.toString=J;Xb.CAIRO.__enum__=Xb;Xb.CONSOLE=["CONSOLE",5];Xb.CONSOLE.toString=J;Xb.CONSOLE.__enum__=Xb;Xb.CUSTOM=["CUSTOM",6];Xb.CUSTOM.toString=J;Xb.CUSTOM.__enum__=Xb;var Sf=function(a){};n["lime.graphics.cairo.Cairo"]=Sf;Sf.__name__=["lime","graphics","cairo","Cairo"];Sf.__properties__=
{get_versionString:"get_versionString",get_version:"get_version"};Sf.version=null;Sf.versionString=null;Sf.get_version=function(){return 0};Sf.get_versionString=function(){return""};Sf.prototype={arc:function(a,b,c,d,e){},arcNegative:function(a,b,c,d,e){},clip:function(){},clipExtents:function(a,b,c,d){},clipPreserve:function(){},closePath:function(){},copyPage:function(){},curveTo:function(a,b,c,d,e,f){},fill:function(){},fillExtents:function(a,b,c,d){},fillPreserve:function(){},identityMatrix:function(){},
inClip:function(a,b){return!1},inFill:function(a,b){return!1},inStroke:function(a,b){return!1},lineTo:function(a,b){},moveTo:function(a,b){},mask:function(a){},maskSurface:function(a,b,c){},newPath:function(){},paint:function(){},paintWithAlpha:function(a){},popGroup:function(){return null},popGroupToSource:function(){},pushGroup:function(){},pushGroupWithContent:function(a){},recreate:function(a){},rectangle:function(a,b,c,d){},relCurveTo:function(a,b,c,d,e,f){},relLineTo:function(a,b){},relMoveTo:function(a,
b){},resetClip:function(){},restore:function(){},save:function(){},setFontSize:function(a){},setSourceRGB:function(a,b,c){},setSourceRGBA:function(a,b,c,d){},setSourceSurface:function(a,b,c){},showPage:function(){},showText:function(a){},status:function(){return 0},stroke:function(){},strokeExtents:function(a,b,c,d){},strokePreserve:function(){},transform:function(a){},rotate:function(a){},scale:function(a,b){},translate:function(a,b){},get_antialias:function(){return 0},set_antialias:function(a){return a},
get_currentPoint:function(){return null},get_dash:function(){return[]},set_dash:function(a){return a},get_dashCount:function(){return 0},get_fillRule:function(){return 0},set_fillRule:function(a){return a},get_fontFace:function(){return 0},set_fontFace:function(a){return a},get_fontOptions:function(){return null},set_fontOptions:function(a){return a},get_groupTarget:function(){return 0},get_hasCurrentPoint:function(){return!1},get_lineCap:function(){return 0},set_lineCap:function(a){return a},get_lineJoin:function(){return 0},
set_lineJoin:function(a){return a},get_lineWidth:function(){return 0},set_lineWidth:function(a){return a},get_matrix:function(){return null},set_matrix:function(a){return a},get_miterLimit:function(){return 0},set_miterLimit:function(a){return a},get_operator:function(){return 0},set_operator:function(a){return a},get_source:function(){return 0},set_source:function(a){return a},get_target:function(){return 0},get_tolerance:function(){return 0},set_tolerance:function(a){return a},__class__:Sf,__properties__:{set_tolerance:"set_tolerance",
get_tolerance:"get_tolerance",get_target:"get_target",set_source:"set_source",get_source:"get_source",set_operator:"set_operator",get_operator:"get_operator",set_miterLimit:"set_miterLimit",get_miterLimit:"get_miterLimit",set_matrix:"set_matrix",get_matrix:"get_matrix",set_lineWidth:"set_lineWidth",get_lineWidth:"get_lineWidth",set_lineJoin:"set_lineJoin",get_lineJoin:"get_lineJoin",set_lineCap:"set_lineCap",get_lineCap:"get_lineCap",get_hasCurrentPoint:"get_hasCurrentPoint",get_groupTarget:"get_groupTarget",
set_fontOptions:"set_fontOptions",get_fontOptions:"get_fontOptions",set_fontFace:"set_fontFace",get_fontFace:"get_fontFace",set_fillRule:"set_fillRule",get_fillRule:"get_fillRule",get_dashCount:"get_dashCount",set_dash:"set_dash",get_dash:"get_dash",get_currentPoint:"get_currentPoint",set_antialias:"set_antialias",get_antialias:"get_antialias"}};var Xl={};n["lime.graphics.cairo._CairoFTFontFace.CairoFTFontFace_Impl_"]=Xl;Xl.__name__=["lime","graphics","cairo","_CairoFTFontFace","CairoFTFontFace_Impl_"];
Xl._new=function(){return 0};Xl.create=function(a,b){return 0};var mn={};n["lime.graphics.cairo._CairoFontFace.CairoFontFace_Impl_"]=mn;mn.__name__=["lime","graphics","cairo","_CairoFontFace","CairoFontFace_Impl_"];mn._new=function(){return null};mn.status=function(a){return 0};var Ge={};n["lime.graphics.cairo._CairoFontOptions.CairoFontOptions_Impl_"]=Ge;Ge.__name__=["lime","graphics","cairo","_CairoFontOptions","CairoFontOptions_Impl_"];Ge.__properties__={set_subpixelOrder:"set_subpixelOrder",get_subpixelOrder:"get_subpixelOrder",
set_hintStyle:"set_hintStyle",get_hintStyle:"get_hintStyle",set_hintMetrics:"set_hintMetrics",get_hintMetrics:"get_hintMetrics",set_antialias:"set_antialias",get_antialias:"get_antialias"};Ge._new=function(){return null};Ge.get_antialias=function(a){return 0};Ge.set_antialias=function(a,b){return b};Ge.get_hintMetrics=function(a){return 0};Ge.set_hintMetrics=function(a,b){return b};Ge.get_hintStyle=function(a){return 0};Ge.set_hintStyle=function(a,b){return b};Ge.get_subpixelOrder=function(a){return 0};
Ge.set_subpixelOrder=function(a,b){return b};var He={};n["lime.graphics.cairo._CairoImageSurface.CairoImageSurface_Impl_"]=He;He.__name__=["lime","graphics","cairo","_CairoImageSurface","CairoImageSurface_Impl_"];He.__properties__={get_width:"get_width",get_stride:"get_stride",get_height:"get_height",get_format:"get_format",get_data:"get_data"};He._new=function(a,b,c){return 0};He.create=function(a,b,c,d,e){return 0};He.fromImage=function(a){return null};He.get_data=function(a){return null};He.get_format=
function(a){return 0};He.get_height=function(a){return 0};He.get_stride=function(a){return 0};He.get_width=function(a){return 0};var Kb={};n["lime.graphics.cairo._CairoPattern.CairoPattern_Impl_"]=Kb;Kb.__name__=["lime","graphics","cairo","_CairoPattern","CairoPattern_Impl_"];Kb.__properties__={set_matrix:"set_matrix",get_matrix:"get_matrix",set_filter:"set_filter",get_filter:"get_filter",set_extend:"set_extend",get_extend:"get_extend",get_colorStopCount:"get_colorStopCount"};Kb._new=function(a){return a};
Kb.addColorStopRGB=function(a,b,c,d,e){};Kb.addColorStopRGBA=function(a,b,c,d,e,f){};Kb.createForSurface=function(a){return 0};Kb.createLinear=function(a,b,c,d){return 0};Kb.createRadial=function(a,b,c,d,e,f){return 0};Kb.createRGB=function(a,b,c){return 0};Kb.createRGBA=function(a,b,c,d){return 0};Kb.get_colorStopCount=function(a){return 0};Kb.get_extend=function(a){return 0};Kb.set_extend=function(a,b){return b};Kb.get_filter=function(a){return 0};Kb.set_filter=function(a,b){return b};Kb.get_matrix=
function(a){return null};Kb.set_matrix=function(a,b){return b};var nn={};n["lime.graphics.cairo._CairoSurface.CairoSurface_Impl_"]=nn;nn.__name__=["lime","graphics","cairo","_CairoSurface","CairoSurface_Impl_"];nn.flush=function(a){};var Ul=function(){};n["lime.graphics.console.IndexBuffer"]=Ul;Ul.__name__=["lime","graphics","console","IndexBuffer"];Ul.prototype={__class__:Ul};var Vc=n["lime.graphics.console.Primitive"]={__ename__:["lime","graphics","console","Primitive"],__constructs__:["Point",
"Line","LineStrip","Triangle","TriangleStrip"]};Vc.Point=["Point",0];Vc.Point.toString=J;Vc.Point.__enum__=Vc;Vc.Line=["Line",1];Vc.Line.toString=J;Vc.Line.__enum__=Vc;Vc.LineStrip=["LineStrip",2];Vc.LineStrip.toString=J;Vc.LineStrip.__enum__=Vc;Vc.Triangle=["Triangle",3];Vc.Triangle.toString=J;Vc.Triangle.__enum__=Vc;Vc.TriangleStrip=["TriangleStrip",4];Vc.TriangleStrip.toString=J;Vc.TriangleStrip.__enum__=Vc;var Wl=function(){};n["lime.graphics.console.Shader"]=Wl;Wl.__name__=["lime","graphics",
"console","Shader"];Wl.prototype={__class__:Wl};var Vl=function(){};n["lime.graphics.console.VertexBuffer"]=Vl;Vl.__name__=["lime","graphics","console","VertexBuffer"];Vl.prototype={lock:function(){return new Yl},unlock:function(){},__class__:Vl};var Yl=function(){};n["lime.graphics.console.VertexOutput"]=Yl;Yl.__name__=["lime","graphics","console","VertexOutput"];Yl.prototype={vec2:function(a,b){},vec3:function(a,b,c){},color:function(a,b,c,d){},__class__:Yl};var ln=function(){};n["lime.graphics.format.BMP"]=
ln;ln.__name__=["lime","graphics","format","BMP"];ln.encode=function(a,b){if(a.get_premultiplied()||0!=a.get_format())a=a.clone(),a.set_premultiplied(!1),a.set_format(0);null==b&&(b=vd.RGB);var c=14,d=40,e=a.width*a.height*4;if(null!=b)switch(b[1]){case 1:d=108;break;case 2:c=0;e+=a.width*a.height;break;case 0:e=3*a.width+3*a.width%4+3*a.height+3*a.height}var f=Ya.alloc(c+d+e),g=0;0<c&&(f.set(g++,66),f.set(g++,77),f.setInt32(g,f.length),g+=4,f.setUInt16(g,0),g+=2,f.setUInt16(g,0),g+=2,f.setInt32(g,
c+d),g+=4);f.setInt32(g,d);g+=4;f.setInt32(g,a.width);g+=4;f.setInt32(g,b==vd.ICO?2*a.height:a.height);g+=4;f.setUInt16(g,1);g+=2;f.setUInt16(g,b==vd.RGB?24:32);g+=2;f.setInt32(g,b==vd.BITFIELD?3:0);g+=4;f.setInt32(g,e);g+=4;f.setInt32(g,11824);g+=4;f.setInt32(g,11824);g+=4;f.setInt32(g,0);g+=4;f.setInt32(g,0);g+=4;if(b==vd.BITFIELD)for(f.setInt32(g,16711680),g+=4,f.setInt32(g,65280),g+=4,f.setInt32(g,255),g+=4,f.setInt32(g,-16777216),g+=4,f.set(g++,32),f.set(g++,110),f.set(g++,105),f.set(g++,87),
c=0;48>c;)c++,f.set(g++,0);var c=a.getPixels(new tc(0,0,a.width,a.height),1),d=0,k,p,h;if(null!=b)switch(b[1]){case 1:for(var l=0,m=a.height;l<m;)for(var d=l++,d=4*(a.height-1-d)*a.width,n=0,q=a.width;n<q;)n++,k=c.get(d++),e=c.get(d++),p=c.get(d++),h=c.get(d++),f.set(g++,h),f.set(g++,p),f.set(g++,e),f.set(g++,k);break;case 2:l=Ya.alloc(a.width*a.height);n=m=0;for(q=a.height;n<q;)for(var d=n++,d=4*(a.height-1-d)*a.width,D=0,u=a.width;D<u;)D++,k=c.get(d++),e=c.get(d++),p=c.get(d++),h=c.get(d++),f.set(g++,
h),f.set(g++,p),f.set(g++,e),f.set(g++,k),l.set(m++,0);f.blit(g,l,0,a.width*a.height);break;case 0:for(k=0,l=a.height;k<l;){d=k++;d=4*(a.height-1-d)*a.width;m=0;for(n=a.width;m<n;)m++,c.get(d++),e=c.get(d++),p=c.get(d++),h=c.get(d++),f.set(g++,h),f.set(g++,p),f.set(g++,e);d=0;for(e=3*a.width%4;d<e;)d++,f.set(g++,0)}}return f};var vd=n["lime.graphics.format.BMPType"]={__ename__:["lime","graphics","format","BMPType"],__constructs__:["RGB","BITFIELD","ICO"]};vd.RGB=["RGB",0];vd.RGB.toString=J;vd.RGB.__enum__=
vd;vd.BITFIELD=["BITFIELD",1];vd.BITFIELD.toString=J;vd.BITFIELD.__enum__=vd;vd.ICO=["ICO",2];vd.ICO.toString=J;vd.ICO.__enum__=vd;var oj=function(){};n["lime.graphics.format.JPEG"]=oj;oj.__name__=["lime","graphics","format","JPEG"];oj.decodeBytes=function(a,b){return null};oj.decodeFile=function(a,b){return null};oj.encode=function(a,b){if(a.get_premultiplied()||0!=a.get_format())a=a.clone(),a.set_premultiplied(!1),a.set_format(0);X.sync(a,!1);if(null!=a.buffer.__srcCanvas){for(var c=a.buffer.__srcCanvas.toDataURL("image/jpeg",
b/100),c=window.atob(c.split(";base64,")[1]),d=Ya.alloc(c.length),e=0,f=c.length;e<f;){var g=e++;d.set(g,P.cca(c,g))}return d}return null};var nj=function(){};n["lime.graphics.format.PNG"]=nj;nj.__name__=["lime","graphics","format","PNG"];nj.decodeBytes=function(a,b){return null};nj.decodeFile=function(a,b){return null};nj.encode=function(a){if(a.get_premultiplied()||0!=a.get_format())a=a.clone(),a.set_premultiplied(!1),a.set_format(0);return null};var m=function(){};n["lime.graphics.opengl.GL"]=
m;m.__name__=["lime","graphics","opengl","GL"];m.__properties__={get_version:"get_version"};m.version=null;m.context=null;m.activeTexture=function(a){m.context.activeTexture(a)};m.attachShader=function(a,b){m.context.attachShader(a,b)};m.bindAttribLocation=function(a,b,c){m.context.bindAttribLocation(a,b,c)};m.bindBuffer=function(a,b){m.context.bindBuffer(a,b)};m.bindFramebuffer=function(a,b){m.context.bindFramebuffer(a,b)};m.bindRenderbuffer=function(a,b){m.context.bindRenderbuffer(a,b)};m.bindTexture=
function(a,b){m.context.bindTexture(a,b)};m.blendColor=function(a,b,c,d){m.context.blendColor(a,b,c,d)};m.blendEquation=function(a){m.context.blendEquation(a)};m.blendEquationSeparate=function(a,b){m.context.blendEquationSeparate(a,b)};m.blendFunc=function(a,b){m.context.blendFunc(a,b)};m.blendFuncSeparate=function(a,b,c,d){m.context.blendFuncSeparate(a,b,c,d)};m.bufferData=function(a,b,c){m.context.bufferData(a,b,c)};m.bufferSubData=function(a,b,c){m.context.bufferSubData(a,b,c)};m.checkFramebufferStatus=
function(a){return m.context.checkFramebufferStatus(a)};m.clear=function(a){m.context.clear(a)};m.clearColor=function(a,b,c,d){m.context.clearColor(a,b,c,d)};m.clearDepth=function(a){m.context.clearDepth(a)};m.clearStencil=function(a){m.context.clearStencil(a)};m.colorMask=function(a,b,c,d){m.context.colorMask(a,b,c,d)};m.compileShader=function(a){m.context.compileShader(a)};m.compressedTexImage2D=function(a,b,c,d,e,f,g){m.context.compressedTexImage2D(a,b,c,d,e,f,g)};m.compressedTexSubImage2D=function(a,
b,c,d,e,f,g,k){m.context.compressedTexSubImage2D(a,b,c,d,e,f,g,k)};m.copyTexImage2D=function(a,b,c,d,e,f,g,k){m.context.copyTexImage2D(a,b,c,d,e,f,g,k)};m.copyTexSubImage2D=function(a,b,c,d,e,f,g,k){m.context.copyTexSubImage2D(a,b,c,d,e,f,g,k)};m.createBuffer=function(){return m.context.createBuffer()};m.createFramebuffer=function(){return m.context.createFramebuffer()};m.createProgram=function(){return m.context.createProgram()};m.createRenderbuffer=function(){return m.context.createRenderbuffer()};
m.createShader=function(a){return m.context.createShader(a)};m.createTexture=function(){return m.context.createTexture()};m.cullFace=function(a){m.context.cullFace(a)};m.deleteBuffer=function(a){m.context.deleteBuffer(a)};m.deleteFramebuffer=function(a){m.context.deleteFramebuffer(a)};m.deleteProgram=function(a){m.context.deleteProgram(a)};m.deleteRenderbuffer=function(a){m.context.deleteRenderbuffer(a)};m.deleteShader=function(a){m.context.deleteShader(a)};m.deleteTexture=function(a){m.context.deleteTexture(a)};
m.depthFunc=function(a){m.context.depthFunc(a)};m.depthMask=function(a){m.context.depthMask(a)};m.depthRange=function(a,b){m.context.depthRange(a,b)};m.detachShader=function(a,b){m.context.detachShader(a,b)};m.disable=function(a){m.context.disable(a)};m.disableVertexAttribArray=function(a){m.context.disableVertexAttribArray(a)};m.drawArrays=function(a,b,c){m.context.drawArrays(a,b,c)};m.drawElements=function(a,b,c,d){m.context.drawElements(a,b,c,d)};m.enable=function(a){m.context.enable(a)};m.enableVertexAttribArray=
function(a){m.context.enableVertexAttribArray(a)};m.finish=function(){m.context.finish()};m.flush=function(){m.context.flush()};m.framebufferRenderbuffer=function(a,b,c,d){m.context.framebufferRenderbuffer(a,b,c,d)};m.framebufferTexture2D=function(a,b,c,d,e){m.context.framebufferTexture2D(a,b,c,d,e)};m.frontFace=function(a){m.context.frontFace(a)};m.generateMipmap=function(a){m.context.generateMipmap(a)};m.getActiveAttrib=function(a,b){return m.context.getActiveAttrib(a,b)};m.getActiveUniform=function(a,
b){return m.context.getActiveUniform(a,b)};m.getAttachedShaders=function(a){return m.context.getAttachedShaders(a)};m.getAttribLocation=function(a,b){return m.context.getAttribLocation(a,b)};m.getBufferParameter=function(a,b){return m.context.getBufferParameter(a,b)};m.getContextAttributes=function(){return m.context.getContextAttributes()};m.getError=function(){return m.context.getError()};m.getExtension=function(a){return m.context.getExtension(a)};m.getFramebufferAttachmentParameter=function(a,
b,c){return m.context.getFramebufferAttachmentParameter(a,b,c)};m.getParameter=function(a){return m.context.getParameter(a)};m.getProgramInfoLog=function(a){return m.context.getProgramInfoLog(a)};m.getProgramParameter=function(a,b){return m.context.getProgramParameter(a,b)};m.getRenderbufferParameter=function(a,b){return m.context.getRenderbufferParameter(a,b)};m.getShaderInfoLog=function(a){return m.context.getShaderInfoLog(a)};m.getShaderParameter=function(a,b){return m.context.getShaderParameter(a,
b)};m.getShaderPrecisionFormat=function(a,b){return m.context.getShaderPrecisionFormat(a,b)};m.getShaderSource=function(a){return m.context.getShaderSource(a)};m.getSupportedExtensions=function(){return m.context.getSupportedExtensions()};m.getTexParameter=function(a,b){return m.context.getTexParameter(a,b)};m.getUniform=function(a,b){return m.context.getUniform(a,b)};m.getUniformLocation=function(a,b){return m.context.getUniformLocation(a,b)};m.getVertexAttrib=function(a,b){return m.context.getVertexAttrib(a,
b)};m.getVertexAttribOffset=function(a,b){return m.context.getVertexAttribOffset(a,b)};m.hint=function(a,b){m.context.hint(a,b)};m.isBuffer=function(a){return m.context.isBuffer(a)};m.isContextLost=function(){return m.context.isContextLost()};m.isEnabled=function(a){return m.context.isEnabled(a)};m.isFramebuffer=function(a){return m.context.isFramebuffer(a)};m.isProgram=function(a){return m.context.isProgram(a)};m.isRenderbuffer=function(a){return m.context.isRenderbuffer(a)};m.isShader=function(a){return m.context.isShader(a)};
m.isTexture=function(a){return m.context.isTexture(a)};m.lineWidth=function(a){m.context.lineWidth(a)};m.linkProgram=function(a){m.context.linkProgram(a)};m.pixelStorei=function(a,b){m.context.pixelStorei(a,b)};m.polygonOffset=function(a,b){m.context.polygonOffset(a,b)};m.readPixels=function(a,b,c,d,e,f,g){m.context.readPixels(a,b,c,d,e,f,g)};m.renderbufferStorage=function(a,b,c,d){m.context.renderbufferStorage(a,b,c,d)};m.sampleCoverage=function(a,b){m.context.sampleCoverage(a,b)};m.scissor=function(a,
b,c,d){m.context.scissor(a,b,c,d)};m.shaderSource=function(a,b){m.context.shaderSource(a,b)};m.stencilFunc=function(a,b,c){m.context.stencilFunc(a,b,c)};m.stencilFuncSeparate=function(a,b,c,d){m.context.stencilFuncSeparate(a,b,c,d)};m.stencilMask=function(a){m.context.stencilMask(a)};m.stencilMaskSeparate=function(a,b){m.context.stencilMaskSeparate(a,b)};m.stencilOp=function(a,b,c){m.context.stencilOp(a,b,c)};m.stencilOpSeparate=function(a,b,c,d){m.context.stencilOpSeparate(a,b,c,d)};m.texImage2D=
function(a,b,c,d,e,f,g,k,p){m.context.texImage2D(a,b,c,d,e,f,g,k,p)};m.texParameterf=function(a,b,c){m.context.texParameterf(a,b,c)};m.texParameteri=function(a,b,c){m.context.texParameteri(a,b,c)};m.texSubImage2D=function(a,b,c,d,e,f,g,k,p){m.context.texSubImage2D(a,b,c,d,e,f,g,k,p)};m.uniform1f=function(a,b){m.context.uniform1f(a,b)};m.uniform1fv=function(a,b){m.context.uniform1fv(a,b)};m.uniform1i=function(a,b){m.context.uniform1i(a,b)};m.uniform1iv=function(a,b){m.context.uniform1iv(a,b)};m.uniform2f=
function(a,b,c){m.context.uniform2f(a,b,c)};m.uniform2fv=function(a,b){m.context.uniform2fv(a,b)};m.uniform2i=function(a,b,c){m.context.uniform2i(a,b,c)};m.uniform2iv=function(a,b){m.context.uniform2iv(a,b)};m.uniform3f=function(a,b,c,d){m.context.uniform3f(a,b,c,d)};m.uniform3fv=function(a,b){m.context.uniform3fv(a,b)};m.uniform3i=function(a,b,c,d){m.context.uniform3i(a,b,c,d)};m.uniform3iv=function(a,b){m.context.uniform3iv(a,b)};m.uniform4f=function(a,b,c,d,e){m.context.uniform4f(a,b,c,d,e)};m.uniform4fv=
function(a,b){m.context.uniform4fv(a,b)};m.uniform4i=function(a,b,c,d,e){m.context.uniform4i(a,b,c,d,e)};m.uniform4iv=function(a,b){m.context.uniform4iv(a,b)};m.uniformMatrix2fv=function(a,b,c){m.context.uniformMatrix2fv(a,b,c)};m.uniformMatrix3fv=function(a,b,c){m.context.uniformMatrix3fv(a,b,c)};m.uniformMatrix4fv=function(a,b,c){m.context.uniformMatrix4fv(a,b,c)};m.useProgram=function(a){m.context.useProgram(a)};m.validateProgram=function(a){m.context.validateProgram(a)};m.vertexAttrib1f=function(a,
b){m.context.vertexAttrib1f(a,b)};m.vertexAttrib1fv=function(a,b){m.context.vertexAttrib1fv(a,b)};m.vertexAttrib2f=function(a,b,c){m.context.vertexAttrib2f(a,b,c)};m.vertexAttrib2fv=function(a,b){m.context.vertexAttrib2fv(a,b)};m.vertexAttrib3f=function(a,b,c,d){m.context.vertexAttrib3f(a,b,c,d)};m.vertexAttrib3fv=function(a,b){m.context.vertexAttrib3fv(a,b)};m.vertexAttrib4f=function(a,b,c,d,e){m.context.vertexAttrib4f(a,b,c,d,e)};m.vertexAttrib4fv=function(a,b){m.context.vertexAttrib4fv(a,b)};m.vertexAttribPointer=
function(a,b,c,d,e,f){m.context.vertexAttribPointer(a,b,c,d,e,f)};m.viewport=function(a,b,c,d){m.context.viewport(a,b,c,d)};m.get_version=function(){return 2};var X=function(){};n["lime.graphics.utils.ImageCanvasUtil"]=X;X.__name__=["lime","graphics","utils","ImageCanvasUtil"];X.colorTransform=function(a,b,c){X.convertToCanvas(a);X.createImageData(a);Ma.colorTransform(a,b,c)};X.convertToCanvas=function(a){var b=a.buffer;null!=b.__srcImage?(null==b.__srcCanvas&&(X.createCanvas(a,b.__srcImage.width,
b.__srcImage.height),b.__srcContext.drawImage(b.__srcImage,0,0)),b.__srcImage=null):null!=b.data&&null==b.__srcCanvas?(X.createCanvas(a,b.width,b.height),X.createImageData(a)):null==b.data&&null!=b.__srcImageData&&(b.data=b.__srcImageData.data)};X.convertToData=function(a){null==a.buffer.data&&(X.convertToCanvas(a),X.sync(a,!1),X.createImageData(a),a.buffer.__srcCanvas=null,a.buffer.__srcContext=null)};X.copyChannel=function(a,b,c,d,e,f){X.convertToCanvas(b);X.createImageData(b);X.convertToCanvas(a);
X.createImageData(a);Ma.copyChannel(a,b,c,d,e,f)};X.copyPixels=function(a,b,c,d,e,f,g){null==g&&(g=!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 yc),b=a.clone(),b.copyChannel(e,new tc(f.x,f.y,c.width,c.height),new yc(c.x,c.y),lc.ALPHA,lc.ALPHA)),X.sync(a,!0),g||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),X.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))};X.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)};X.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 nc(b):null;a.data=b}};X.fillRect=function(a,b,c,d){X.convertToCanvas(a);
X.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)}};X.floodFill=function(a,b,c,d,e){X.convertToCanvas(a);
X.createImageData(a);Ma.floodFill(a,b,c,d,e)};X.getPixel=function(a,b,c,d){X.convertToCanvas(a);X.createImageData(a);return Ma.getPixel(a,b,c,d)};X.getPixel32=function(a,b,c,d){X.convertToCanvas(a);X.createImageData(a);return Ma.getPixel32(a,b,c,d)};X.getPixels=function(a,b,c){X.convertToCanvas(a);X.createImageData(a);return Ma.getPixels(a,b,c)};X.merge=function(a,b,c,d,e,f,g,k){X.convertToCanvas(b);X.createImageData(b);X.convertToCanvas(a);X.createImageData(a);Ma.merge(a,b,c,d,e,f,g,k)};X.resize=
function(a,b,c){var d=a.buffer;if(null==d.__srcCanvas)X.createCanvas(a,b,c),d.__srcContext.drawImage(d.get_src(),0,0,b,c);else{X.sync(a,!0);var e=d.__srcCanvas;d.__srcCanvas=null;X.createCanvas(a,b,c);d.__srcContext.drawImage(e,0,0,b,c)}};X.scroll=function(a,b,c){if(0!=b%a.width||0!=c%a.height)X.convertToCanvas(a),X.sync(a,!0),a.buffer.__srcContext.clearRect(b,c,a.width,a.height),a.buffer.__srcContext.drawImage(a.buffer.__srcCanvas,b,c)};X.setPixel=function(a,b,c,d,e){X.convertToCanvas(a);X.createImageData(a);
Ma.setPixel(a,b,c,d,e)};X.setPixel32=function(a,b,c,d,e){X.convertToCanvas(a);X.createImageData(a);Ma.setPixel32(a,b,c,d,e)};X.setPixels=function(a,b,c,d){X.convertToCanvas(a);X.createImageData(a);Ma.setPixels(a,b,c,d)};X.sync=function(a,b){a.dirty&&null!=a.buffer.__srcImageData&&a.type!=Hc.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 Ma=function(){};n["lime.graphics.utils.ImageDataUtil"]=
Ma;Ma.__name__=["lime","graphics","utils","ImageDataUtil"];Ma.colorTransform=function(a,b,c){var d=a.buffer.data;if(null!=d){var e=a.buffer.format,f=a.buffer.premultiplied;b=new wd(a,b);var g=fb.getAlphaTable(c),k=fb.getRedTable(c),p=fb.getGreenTable(c);c=fb.getBlueTable(c);for(var h,l,m,n=0,q=b.height;n<q;){h=n++;h=b.offset+b.stride*h;for(var D=0,u=b.width;D<u;){l=D++;l=h+4*l;switch(e){case 2:m=(d[l+2]&255)<<24|(d[l+1]&255)<<16|(d[l]&255)<<8|d[l+3]&255;break;case 0:m=(d[l]&255)<<24|(d[l+1]&255)<<
16|(d[l+2]&255)<<8|d[l+3]&255;break;case 1:m=(d[l+1]&255)<<24|(d[l+2]&255)<<16|(d[l+3]&255)<<8|d[l]&255}if(f&&0!=(m&255)&&255!=(m&255)){B.unmult=255/(m&255);var r;r=Math.round((m>>24&255)*B.unmult);r=B.__clamp[r];var t;t=Math.round((m>>16&255)*B.unmult);t=B.__clamp[t];var z=Math.round((m>>8&255)*B.unmult);m=(r&255)<<24|(t&255)<<16|(B.__clamp[z]&255)<<8|m&255}m=(k[m>>24&255]&255)<<24|(p[m>>16&255]&255)<<16|(c[m>>8&255]&255)<<8|g[m&255]&255;f&&(0==(m&255)?0!=m&&(m=0):255!=(m&255)&&(B.a16=B.__alpha16[m&
255],m=((m>>24&255)*B.a16>>16&255)<<24|((m>>16&255)*B.a16>>16&255)<<16|((m>>8&255)*B.a16>>16&255)<<8|m&255));switch(e){case 2:d[l]=m>>8&255;d[l+1]=m>>16&255;d[l+2]=m>>24&255;d[l+3]=m&255;break;case 0:d[l]=m>>24&255;d[l+1]=m>>16&255;d[l+2]=m>>8&255;d[l+3]=m&255;break;case 1:d[l]=m&255,d[l+1]=m>>24&255,d[l+2]=m>>16&255,d[l+3]=m>>8&255}}}a.dirty=!0}};Ma.copyChannel=function(a,b,c,d,e,f){var g;switch(f[1]){case 0:g=0;break;case 1:g=1;break;case 2:g=2;break;case 3:g=3}var k;switch(e[1]){case 0:k=0;break;
case 1:k=1;break;case 2:k=2;break;case 3:k=3}e=b.buffer.data;f=a.buffer.data;if(null!=e&&null!=f){c=new wd(b,c);d=new wd(a,new tc(d.x,d.y,c.width,c.height));var p=b.buffer.format,h=a.buffer.format;b=b.buffer.premultiplied;for(var l=a.buffer.premultiplied,m,n,q,D,u=0,r=0,t=d.height;r<t;){n=r++;m=c.offset+c.stride*n;n=d.offset+d.stride*n;for(var z=0,v=d.width;z<v;){z++;switch(p){case 2:q=(e[m+2]&255)<<24|(e[m+1]&255)<<16|(e[m]&255)<<8|e[m+3]&255;break;case 0:q=(e[m]&255)<<24|(e[m+1]&255)<<16|(e[m+2]&
255)<<8|e[m+3]&255;break;case 1:q=(e[m+1]&255)<<24|(e[m+2]&255)<<16|(e[m+3]&255)<<8|e[m]&255}if(b&&0!=(q&255)&&255!=(q&255)){B.unmult=255/(q&255);var y;y=Math.round((q>>24&255)*B.unmult);y=B.__clamp[y];var x;x=Math.round((q>>16&255)*B.unmult);x=B.__clamp[x];var A=Math.round((q>>8&255)*B.unmult);q=(y&255)<<24|(x&255)<<16|(B.__clamp[A]&255)<<8|q&255}switch(h){case 2:D=(f[n+2]&255)<<24|(f[n+1]&255)<<16|(f[n]&255)<<8|f[n+3]&255;break;case 0:D=(f[n]&255)<<24|(f[n+1]&255)<<16|(f[n+2]&255)<<8|f[n+3]&255;
break;case 1:D=(f[n+1]&255)<<24|(f[n+2]&255)<<16|(f[n+3]&255)<<8|f[n]&255}l&&0!=(D&255)&&255!=(D&255)&&(B.unmult=255/(D&255),y=Math.round((D>>24&255)*B.unmult),y=B.__clamp[y],x=Math.round((D>>16&255)*B.unmult),x=B.__clamp[x],A=Math.round((D>>8&255)*B.unmult),D=(y&255)<<24|(x&255)<<16|(B.__clamp[A]&255)<<8|D&255);switch(k){case 0:u=q>>24&255;break;case 1:u=q>>16&255;break;case 2:u=q>>8&255;break;case 3:u=q&255}switch(g){case 0:D=(u&255)<<24|(D>>16&255)<<16|(D>>8&255)<<8|D&255;u;break;case 1:D=(D>>
24&255)<<24|(u&255)<<16|(D>>8&255)<<8|D&255;u;break;case 2:D=(D>>24&255)<<24|(D>>16&255)<<16|(u&255)<<8|D&255;u;break;case 3:D=(D>>24&255)<<24|(D>>16&255)<<16|(D>>8&255)<<8|u&255,u}l&&(0==(D&255)?0!=D&&(D=0):255!=(D&255)&&(B.a16=B.__alpha16[D&255],D=((D>>24&255)*B.a16>>16&255)<<24|((D>>16&255)*B.a16>>16&255)<<16|((D>>8&255)*B.a16>>16&255)<<8|D&255));switch(h){case 2:f[n]=D>>8&255;f[n+1]=D>>16&255;f[n+2]=D>>24&255;f[n+3]=D&255;break;case 0:f[n]=D>>24&255;f[n+1]=D>>16&255;f[n+2]=D>>8&255;f[n+3]=D&255;
break;case 1:f[n]=D&255,f[n+1]=D>>24&255,f[n+2]=D>>16&255,f[n+3]=D>>8&255}m+=4;n+=4}}a.dirty=!0}};Ma.copyPixels=function(a,b,c,d,e,f,g){null==g&&(g=!1);var k=b.buffer.data,p=a.buffer.data;if(null!=k&&null!=p){c=new wd(b,c);d=new wd(a,new tc(d.x,d.y,c.width,c.height));var h=b.buffer.format,l=a.buffer.format,m=b.buffer.premultiplied,n=a.buffer.premultiplied,q;if(g&&b.get_transparent()){var D,u,r,t,z;if(null==e){var v=0;for(b=d.height;v<b;){f=v++;e=c.offset+c.stride*f;f=d.offset+d.stride*f;g=0;for(var y=
d.width;g<y;){g++;switch(h){case 2:q=(k[e+2]&255)<<24|(k[e+1]&255)<<16|(k[e]&255)<<8|k[e+3]&255;break;case 0:q=(k[e]&255)<<24|(k[e+1]&255)<<16|(k[e+2]&255)<<8|k[e+3]&255;break;case 1:q=(k[e+1]&255)<<24|(k[e+2]&255)<<16|(k[e+3]&255)<<8|k[e]&255}if(m&&0!=(q&255)&&255!=(q&255)){B.unmult=255/(q&255);var x;x=Math.round((q>>24&255)*B.unmult);x=B.__clamp[x];var A;A=Math.round((q>>16&255)*B.unmult);A=B.__clamp[A];var H=Math.round((q>>8&255)*B.unmult);q=(x&255)<<24|(A&255)<<16|(B.__clamp[H]&255)<<8|q&255}switch(l){case 2:z=
(p[f+2]&255)<<24|(p[f+1]&255)<<16|(p[f]&255)<<8|p[f+3]&255;break;case 0:z=(p[f]&255)<<24|(p[f+1]&255)<<16|(p[f+2]&255)<<8|p[f+3]&255;break;case 1:z=(p[f+1]&255)<<24|(p[f+2]&255)<<16|(p[f+3]&255)<<8|p[f]&255}n&&0!=(z&255)&&255!=(z&255)&&(B.unmult=255/(z&255),x=Math.round((z>>24&255)*B.unmult),x=B.__clamp[x],A=Math.round((z>>16&255)*B.unmult),A=B.__clamp[A],H=Math.round((z>>8&255)*B.unmult),z=(x&255)<<24|(A&255)<<16|(B.__clamp[H]&255)<<8|z&255);D=(q&255)/255;u=(z&255)/255;r=1-D;t=D+u*r;0==t?z=0:(x=
Math.round(((q>>24&255)*D+(z>>24&255)*u*r)/t),x=B.__clamp[x],z=(x&255)<<24|(z>>16&255)<<16|(z>>8&255)<<8|z&255,x,x=Math.round(((q>>16&255)*D+(z>>16&255)*u*r)/t),x=B.__clamp[x],z=(z>>24&255)<<24|(x&255)<<16|(z>>8&255)<<8|z&255,x,x=Math.round(((q>>8&255)*D+(z>>8&255)*u*r)/t),x=B.__clamp[x],z=(z>>24&255)<<24|(z>>16&255)<<16|(x&255)<<8|z&255,x,x=Math.round(255*t),x=B.__clamp[x],z=(z>>24&255)<<24|(z>>16&255)<<16|(z>>8&255)<<8|x&255,x);n&&(0==(z&255)?0!=z&&(z=0):255!=(z&255)&&(B.a16=B.__alpha16[z&255],
z=((z>>24&255)*B.a16>>16&255)<<24|((z>>16&255)*B.a16>>16&255)<<16|((z>>8&255)*B.a16>>16&255)<<8|z&255));switch(l){case 2:p[f]=z>>8&255;p[f+1]=z>>16&255;p[f+2]=z>>24&255;p[f+3]=z&255;break;case 0:p[f]=z>>24&255;p[f+1]=z>>16&255;p[f+2]=z>>8&255;p[f+3]=z&255;break;case 1:p[f]=z&255,p[f+1]=z>>24&255,p[f+2]=z>>16&255,p[f+3]=z>>8&255}e+=4;f+=4}}}else{null==f&&(f=new yc);b=e.buffer.data;g=e.buffer.format;y=e.buffer.premultiplied;x=new wd(e,new tc(f.x,f.y,d.width,d.height));var C;A=0;for(H=x.height;A<H;){C=
A++;e=c.offset+c.stride*C;f=d.offset+d.stride*C;C=x.offset+x.stride*C;for(var G=0,E=x.width;G<E;){G++;switch(h){case 2:q=(k[e+2]&255)<<24|(k[e+1]&255)<<16|(k[e]&255)<<8|k[e+3]&255;break;case 0:q=(k[e]&255)<<24|(k[e+1]&255)<<16|(k[e+2]&255)<<8|k[e+3]&255;break;case 1:q=(k[e+1]&255)<<24|(k[e+2]&255)<<16|(k[e+3]&255)<<8|k[e]&255}m&&0!=(q&255)&&255!=(q&255)&&(B.unmult=255/(q&255),t=Math.round((q>>24&255)*B.unmult),t=B.__clamp[t],D=Math.round((q>>16&255)*B.unmult),D=B.__clamp[D],u=Math.round((q>>8&255)*
B.unmult),q=(t&255)<<24|(D&255)<<16|(B.__clamp[u]&255)<<8|q&255);switch(l){case 2:z=(p[f+2]&255)<<24|(p[f+1]&255)<<16|(p[f]&255)<<8|p[f+3]&255;break;case 0:z=(p[f]&255)<<24|(p[f+1]&255)<<16|(p[f+2]&255)<<8|p[f+3]&255;break;case 1:z=(p[f+1]&255)<<24|(p[f+2]&255)<<16|(p[f+3]&255)<<8|p[f]&255}n&&0!=(z&255)&&255!=(z&255)&&(B.unmult=255/(z&255),t=Math.round((z>>24&255)*B.unmult),t=B.__clamp[t],D=Math.round((z>>16&255)*B.unmult),D=B.__clamp[D],u=Math.round((z>>8&255)*B.unmult),z=(t&255)<<24|(D&255)<<16|
(B.__clamp[u]&255)<<8|z&255);switch(g){case 2:v=(b[C+2]&255)<<24|(b[C+1]&255)<<16|(b[C]&255)<<8|b[C+3]&255;break;case 0:v=(b[C]&255)<<24|(b[C+1]&255)<<16|(b[C+2]&255)<<8|b[C+3]&255;break;case 1:v=(b[C+1]&255)<<24|(b[C+2]&255)<<16|(b[C+3]&255)<<8|b[C]&255}y&&0!=(v&255)&&255!=(v&255)&&(B.unmult=255/(v&255),t=Math.round((v>>24&255)*B.unmult),t=B.__clamp[t],D=Math.round((v>>16&255)*B.unmult),D=B.__clamp[D],u=Math.round((v>>8&255)*B.unmult),v=(t&255)<<24|(D&255)<<16|(B.__clamp[u]&255)<<8|v&255);D=(v&255)/
255;u=(z&255)/255;r=1-D;t=D+u*r;if(0==t)z=0;else{var I;I=Math.round(((q>>24&255)*D+(z>>24&255)*u*r)/t);I=B.__clamp[I];z=(I&255)<<24|(z>>16&255)<<16|(z>>8&255)<<8|z&255;I;I=Math.round(((q>>16&255)*D+(z>>16&255)*u*r)/t);I=B.__clamp[I];z=(z>>24&255)<<24|(I&255)<<16|(z>>8&255)<<8|z&255;I;D=Math.round(((q>>8&255)*D+(z>>8&255)*u*r)/t);D=B.__clamp[D];z=(z>>24&255)<<24|(z>>16&255)<<16|(D&255)<<8|z&255;D;t=Math.round(255*t);t=B.__clamp[t];z=(z>>24&255)<<24|(z>>16&255)<<16|(z>>8&255)<<8|t&255;t}n&&(0==(z&255)?
0!=z&&(z=0):255!=(z&255)&&(B.a16=B.__alpha16[z&255],z=((z>>24&255)*B.a16>>16&255)<<24|((z>>16&255)*B.a16>>16&255)<<16|((z>>8&255)*B.a16>>16&255)<<8|z&255));switch(l){case 2:p[f]=z>>8&255;p[f+1]=z>>16&255;p[f+2]=z>>24&255;p[f+3]=z&255;break;case 0:p[f]=z>>24&255;p[f+1]=z>>16&255;p[f+2]=z>>8&255;p[f+3]=z&255;break;case 1:p[f]=z&255,p[f+1]=z>>24&255,p[f+2]=z>>16&255,p[f+3]=z>>8&255}e+=4;f+=4}}}}else for(z=0,v=d.height;z<v;)for(f=z++,e=c.offset+c.stride*f,f=d.offset+d.stride*f,b=0,g=d.width;b<g;){b++;
switch(h){case 2:q=(k[e+2]&255)<<24|(k[e+1]&255)<<16|(k[e]&255)<<8|k[e+3]&255;break;case 0:q=(k[e]&255)<<24|(k[e+1]&255)<<16|(k[e+2]&255)<<8|k[e+3]&255;break;case 1:q=(k[e+1]&255)<<24|(k[e+2]&255)<<16|(k[e+3]&255)<<8|k[e]&255}m&&0!=(q&255)&&255!=(q&255)&&(B.unmult=255/(q&255),y=Math.round((q>>24&255)*B.unmult),y=B.__clamp[y],x=Math.round((q>>16&255)*B.unmult),x=B.__clamp[x],A=Math.round((q>>8&255)*B.unmult),q=(y&255)<<24|(x&255)<<16|(B.__clamp[A]&255)<<8|q&255);n&&(0==(q&255)?0!=q&&(q=0):255!=(q&
255)&&(B.a16=B.__alpha16[q&255],q=((q>>24&255)*B.a16>>16&255)<<24|((q>>16&255)*B.a16>>16&255)<<16|((q>>8&255)*B.a16>>16&255)<<8|q&255));switch(l){case 2:p[f]=q>>8&255;p[f+1]=q>>16&255;p[f+2]=q>>24&255;p[f+3]=q&255;break;case 0:p[f]=q>>24&255;p[f+1]=q>>16&255;p[f+2]=q>>8&255;p[f+3]=q&255;break;case 1:p[f]=q&255,p[f+1]=q>>24&255,p[f+2]=q>>16&255,p[f+3]=q>>8&255}e+=4;f+=4}a.dirty=!0}};Ma.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 wd(a,b);for(var g,k=0,p=b.height;k<p;){g=k++;g=b.offset+b.stride*g;for(var h=0,l=b.width;h<l;){var m=h++,m=g+4*m;f&&(0==(c&255)?0!=c&&(c=0):255!=(c&255)&&(B.a16=B.__alpha16[c&255],c=((c>>24&255)*B.a16>>16&255)<<24|((c>>16&255)*B.a16>>16&255)<<16|((c>>8&255)*B.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}};Ma.floodFill=function(a,b,c,d,e){var f=a.buffer.data;if(null!=f){1==e&&(d=(d&16777215)<<8|d>>24&255);e=a.buffer.format;var g=a.buffer.premultiplied,k,p=4*(c+a.offsetY)*a.buffer.width+4*(b+a.offsetX);switch(e){case 2:k=(f[p+2]&255)<<24|(f[p+1]&255)<<16|(f[p]&255)<<
8|f[p+3]&255;break;case 0:k=(f[p]&255)<<24|(f[p+1]&255)<<16|(f[p+2]&255)<<8|f[p+3]&255;break;case 1:k=(f[p+1]&255)<<24|(f[p+2]&255)<<16|(f[p+3]&255)<<8|f[p]&255}if(g&&0!=(k&255)&&255!=(k&255)){B.unmult=255/(k&255);var p=Math.round((k>>24&255)*B.unmult),p=B.__clamp[p],h;h=Math.round((k>>16&255)*B.unmult);h=B.__clamp[h];var l=Math.round((k>>8&255)*B.unmult);k=(p&255)<<24|(h&255)<<16|(B.__clamp[l]&255)<<8|k&255}a.get_transparent()||(d=(d>>24&255)<<24|(d>>16&255)<<16|(d>>8&255)<<8|255,255,k=(k>>24&255)<<
24|(k>>16&255)<<16|(k>>8&255)<<8|255,255);if(d!=k){p=[0,-1,1,0];h=[-1,0,0,1];var l=-a.offsetX,m=-a.offsetY,n=l+a.width,q=m+a.height,D=[];D.push(b);D.push(c);for(var u,r,t,z;0<D.length;){c=D.pop();b=D.pop();for(var v=0;4>v;)if(r=v++,u=b+p[r],r=c+h[r],!(u<l||r<m||u>=n||r>=q)){t=4*(r*a.width+u);switch(e){case 2:z=(f[t+2]&255)<<24|(f[t+1]&255)<<16|(f[t]&255)<<8|f[t+3]&255;break;case 0:z=(f[t]&255)<<24|(f[t+1]&255)<<16|(f[t+2]&255)<<8|f[t+3]&255;break;case 1:z=(f[t+1]&255)<<24|(f[t+2]&255)<<16|(f[t+3]&
255)<<8|f[t]&255}if(g&&0!=(z&255)&&255!=(z&255)){B.unmult=255/(z&255);var x;x=Math.round((z>>24&255)*B.unmult);x=B.__clamp[x];var y;y=Math.round((z>>16&255)*B.unmult);y=B.__clamp[y];var A=Math.round((z>>8&255)*B.unmult);z=(x&255)<<24|(y&255)<<16|(B.__clamp[A]&255)<<8|z&255}if(z==k){g&&(0==(d&255)?0!=d&&(d=0):255!=(d&255)&&(B.a16=B.__alpha16[d&255],d=((d>>24&255)*B.a16>>16&255)<<24|((d>>16&255)*B.a16>>16&255)<<16|((d>>8&255)*B.a16>>16&255)<<8|d&255));switch(e){case 2:f[t]=d>>8&255;f[t+1]=d>>16&255;
f[t+2]=d>>24&255;f[t+3]=d&255;break;case 0:f[t]=d>>24&255;f[t+1]=d>>16&255;f[t+2]=d>>8&255;f[t+3]=d&255;break;case 1:f[t]=d&255,f[t+1]=d>>24&255,f[t+2]=d>>16&255,f[t+3]=d>>8&255}D.push(u);D.push(r)}}}a.dirty=!0}}};Ma.getColorBoundsRect=function(a,b,c,d,e){null==d&&(d=!0);var f=a.width+1,g=0,k=a.height+1,p=0;switch(e){case 1:c=(c>>16&255)<<24|(c>>8&255)<<16|(c&255)<<8|c>>24&255;b=(b>>16&255)<<24|(b>>8&255)<<16|(b&255)<<8|b>>24&255;break;case 2:c=(c>>8&255)<<24|(c>>16&255)<<16|(c>>24&255)<<8|c&255;
b=(b>>8&255)<<24|(b>>16&255)<<16|(b>>24&255)<<8|b&255;break}a.get_transparent()||(c=(c>>24&255)<<24|(c>>16&255)<<16|(c>>8&255)<<8|255,255,b=(b>>24&255)<<24|(b>>16&255)<<16|(b>>8&255)<<8|255,255);for(var h=0,l=a.width;h<l;){var m=h++;e=!1;for(var n=0,q=a.height;n<q;)if(e=n++,e=a.getPixel32(m,e,0),e=d?(e&b)==c:(e&b)!=c){m<f&&(f=m);break}if(e)break}h=0;for(l=a.width;h<l;){e=h++;m=a.width-1-e;e=!1;n=0;for(q=a.height;n<q;)if(e=n++,e=a.getPixel32(m,e,0),e=d?(e&b)==c:(e&b)!=c){m>g&&(g=m);break}if(e)break}h=
0;for(l=a.height;h<l;){m=h++;e=!1;n=0;for(q=a.width;n<q;)if(e=n++,e=a.getPixel32(e,m,0),e=d?(e&b)==c:(e&b)!=c){m<k&&(k=m);break}if(e)break}h=0;for(l=a.height;h<l;){e=h++;m=a.height-1-e;e=!1;n=0;for(q=a.width;n<q;)if(e=n++,e=a.getPixel32(e,m,0),e=d?(e&b)==c:(e&b)!=c){m>p&&(p=m);break}if(e)break}d=g-f;c=p-k;0<d&&d++;0<c&&c++;0>d&&(d=0);0>c&&(c=0);f==g&&(d=1);k==p&&(c=1);f>a.width&&(f=0);k>a.height&&(k=0);return new tc(f,k,d,c)};Ma.getPixel=function(a,b,c,d){var e,f=a.buffer.data;b=4*(c+a.offsetY)*a.buffer.width+
4*(b+a.offsetX);switch(a.buffer.format){case 2:e=(f[b+2]&255)<<24|(f[b+1]&255)<<16|(f[b]&255)<<8|f[b+3]&255;break;case 0:e=(f[b]&255)<<24|(f[b+1]&255)<<16|(f[b+2]&255)<<8|f[b+3]&255;break;case 1:e=(f[b+1]&255)<<24|(f[b+2]&255)<<16|(f[b+3]&255)<<8|f[b]&255}a.buffer.premultiplied&&0!=(e&255)&&255!=(e&255)&&(B.unmult=255/(e&255),a=Math.round((e>>24&255)*B.unmult),a=B.__clamp[a],f=Math.round((e>>16&255)*B.unmult),f=B.__clamp[f],b=Math.round((e>>8&255)*B.unmult),e=(a&255)<<24|(f&255)<<16|(B.__clamp[b]&
255)<<8|e&255);e=(e>>24&255)<<24|(e>>16&255)<<16|(e>>8&255)<<8|0;0;switch(d){case 1:return function(a){a=0;return a=(e&255)<<24|(e>>24&255)<<16|(e>>16&255)<<8|e>>8&255}(this);case 2:return function(a){a=0;return a=(e>>8&255)<<24|(e>>16&255)<<16|(e>>24&255)<<8|e&255}(this);default:return e}};Ma.getPixel32=function(a,b,c,d){var e,f=a.buffer.data;b=4*(c+a.offsetY)*a.buffer.width+4*(b+a.offsetX);switch(a.buffer.format){case 2:e=(f[b+2]&255)<<24|(f[b+1]&255)<<16|(f[b]&255)<<8|f[b+3]&255;break;case 0:e=
(f[b]&255)<<24|(f[b+1]&255)<<16|(f[b+2]&255)<<8|f[b+3]&255;break;case 1:e=(f[b+1]&255)<<24|(f[b+2]&255)<<16|(f[b+3]&255)<<8|f[b]&255}a.buffer.premultiplied&&0!=(e&255)&&255!=(e&255)&&(B.unmult=255/(e&255),a=Math.round((e>>24&255)*B.unmult),a=B.__clamp[a],f=Math.round((e>>16&255)*B.unmult),f=B.__clamp[f],b=Math.round((e>>8&255)*B.unmult),e=(a&255)<<24|(f&255)<<16|(B.__clamp[b]&255)<<8|e&255);switch(d){case 1:return function(a){a=0;return a=(e&255)<<24|(e>>24&255)<<16|(e>>16&255)<<8|e>>8&255}(this);
case 2:return function(a){a=0;return a=(e>>8&255)<<24|(e>>16&255)<<16|(e>>24&255)<<8|e&255}(this);default:return e}};Ma.getPixels=function(a,b,c){if(null==a.buffer.data)return null;var d=Ya.alloc(4*(b.width*b.height|0)),e=a.buffer.data,f=a.buffer.format,g=a.buffer.premultiplied;a=new wd(a,b);for(var k,p,h=b=0,l=a.height;h<l;){k=h++;k=a.offset+a.stride*k;for(var m=0,n=a.width;m<n;){m++;switch(f){case 2:p=(e[k+2]&255)<<24|(e[k+1]&255)<<16|(e[k]&255)<<8|e[k+3]&255;break;case 0:p=(e[k]&255)<<24|(e[k+
1]&255)<<16|(e[k+2]&255)<<8|e[k+3]&255;break;case 1:p=(e[k+1]&255)<<24|(e[k+2]&255)<<16|(e[k+3]&255)<<8|e[k]&255}if(g&&0!=(p&255)&&255!=(p&255)){B.unmult=255/(p&255);var q;q=Math.round((p>>24&255)*B.unmult);q=B.__clamp[q];var D;D=Math.round((p>>16&255)*B.unmult);D=B.__clamp[D];var u=Math.round((p>>8&255)*B.unmult);p=(q&255)<<24|(D&255)<<16|(B.__clamp[u]&255)<<8|p&255}switch(c){case 1:q=0;p=q=(p&255)<<24|(p>>24&255)<<16|(p>>16&255)<<8|p>>8&255;break;case 2:q=0,p=q=(p>>8&255)<<24|(p>>16&255)<<16|(p>>
24&255)<<8|p&255}d.set(b++,p>>24&255);d.set(b++,p>>16&255);d.set(b++,p>>8&255);d.set(b++,p&255);k+=4}}return d};Ma.merge=function(a,b,c,d,e,f,g,k){if(null!=a.buffer.data&&null!=b.buffer.data){c=new wd(b,c);d=new wd(a,new tc(d.x,d.y,c.width,c.height));var p=b.buffer.data,h=a.buffer.data,l=b.buffer.format,m=a.buffer.format;b=b.buffer.premultiplied;for(var n=a.buffer.premultiplied,q,D,u,r,t=0,z=d.height;t<z;){D=t++;q=c.offset+c.stride*D;D=d.offset+d.stride*D;for(var v=0,x=d.width;v<x;){v++;switch(l){case 2:u=
(p[q+2]&255)<<24|(p[q+1]&255)<<16|(p[q]&255)<<8|p[q+3]&255;break;case 0:u=(p[q]&255)<<24|(p[q+1]&255)<<16|(p[q+2]&255)<<8|p[q+3]&255;break;case 1:u=(p[q+1]&255)<<24|(p[q+2]&255)<<16|(p[q+3]&255)<<8|p[q]&255}if(b&&0!=(u&255)&&255!=(u&255)){B.unmult=255/(u&255);var y;y=Math.round((u>>24&255)*B.unmult);y=B.__clamp[y];var A;A=Math.round((u>>16&255)*B.unmult);A=B.__clamp[A];var C=Math.round((u>>8&255)*B.unmult);u=(y&255)<<24|(A&255)<<16|(B.__clamp[C]&255)<<8|u&255}switch(m){case 2:r=(h[D+2]&255)<<24|(h[D+
1]&255)<<16|(h[D]&255)<<8|h[D+3]&255;break;case 0:r=(h[D]&255)<<24|(h[D+1]&255)<<16|(h[D+2]&255)<<8|h[D+3]&255;break;case 1:r=(h[D+1]&255)<<24|(h[D+2]&255)<<16|(h[D+3]&255)<<8|h[D]&255}n&&0!=(r&255)&&255!=(r&255)&&(B.unmult=255/(r&255),y=Math.round((r>>24&255)*B.unmult),y=B.__clamp[y],A=Math.round((r>>16&255)*B.unmult),A=B.__clamp[A],C=Math.round((r>>8&255)*B.unmult),r=(y&255)<<24|(A&255)<<16|(B.__clamp[C]&255)<<8|r&255);y=((u>>24&255)*e+(r>>24&255)*(256-e))/256|0;r=(y&255)<<24|(r>>16&255)<<16|(r>>
8&255)<<8|r&255;y;y=((u>>16&255)*f+(r>>16&255)*(256-f))/256|0;r=(r>>24&255)<<24|(y&255)<<16|(r>>8&255)<<8|r&255;y;y=((u>>8&255)*g+(r>>8&255)*(256-g))/256|0;r=(r>>24&255)<<24|(r>>16&255)<<16|(y&255)<<8|r&255;y;y=((u&255)*k+(r&255)*(256-k))/256|0;r=(r>>24&255)<<24|(r>>16&255)<<16|(r>>8&255)<<8|y&255;y;n&&(0==(r&255)?0!=r&&(r=0):255!=(r&255)&&(B.a16=B.__alpha16[r&255],r=((r>>24&255)*B.a16>>16&255)<<24|((r>>16&255)*B.a16>>16&255)<<16|((r>>8&255)*B.a16>>16&255)<<8|r&255));switch(m){case 2:h[D]=r>>8&255;
h[D+1]=r>>16&255;h[D+2]=r>>24&255;h[D+3]=r&255;break;case 0:h[D]=r>>24&255;h[D+1]=r>>16&255;h[D+2]=r>>8&255;h[D+3]=r&255;break;case 1:h[D]=r&255,h[D+1]=r>>24&255,h[D+2]=r>>16&255,h[D+3]=r>>8&255}q+=4;D+=4}}a.dirty=!0}};Ma.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 g=f++,k=4*g;switch(c){case 2:e=(b[k+2]&255)<<24|(b[k+1]&255)<<16|(b[k]&255)<<8|b[k+3]&255;break;case 0:e=(b[k]&255)<<24|(b[k+1]&255)<<16|(b[k+
2]&255)<<8|b[k+3]&255;break;case 1:e=(b[k+1]&255)<<24|(b[k+2]&255)<<16|(b[k+3]&255)<<8|b[k]&255}g*=4;0==(e&255)?0!=e&&(e=0):255!=(e&255)&&(B.a16=B.__alpha16[e&255],e=((e>>24&255)*B.a16>>16&255)<<24|((e>>16&255)*B.a16>>16&255)<<16|((e>>8&255)*B.a16>>16&255)<<8|e&255);switch(c){case 2:b[g]=e>>8&255;b[g+1]=e>>16&255;b[g+2]=e>>24&255;b[g+3]=e&255;break;case 0:b[g]=e>>24&255;b[g+1]=e>>16&255;b[g+2]=e>>8&255;b[g+3]=e&255;break;case 1:b[g]=e&255,b[g+1]=e>>24&255,b[g+2]=e>>16&255,b[g+3]=e>>8&255}}a.buffer.premultiplied=
!0;a.dirty=!0}};Ma.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 nc(e):null,e=new Fe(e,b,c),f=a.width,g=a.height;a=a.get_data();for(var k=e.data,p,h,l,m,n,q,D,r,t,v=0;v<c;)for(var z=v++,y=0;y<b;){n=y++;r=(n+.5)/b*f-.5;t=(z+.5)/c*g-.5;q=r|0;D=t|0;p=4*(D*f+q);h=q<f-1?p+4:p;l=D<g-1?p+4*f:p;m=h!=p?l+4:l;n=4*(z*b+n);q=r-q;D=t-D;t=1-q;r=1-D;var x=u["int"]((va.toFloat(a[p])*t+va.toFloat(a[h])*q)*r+(va.toFloat(a[l])*t+va.toFloat(a[m])*q)*D);k[n]=x;x=u["int"]((va.toFloat(a[p+
1])*t+va.toFloat(a[h+1])*q)*r+(va.toFloat(a[l+1])*t+va.toFloat(a[m+1])*q)*D);k[n+1]=x;q=u["int"]((va.toFloat(a[p+2])*t+va.toFloat(a[h+2])*q)*r+(va.toFloat(a[l+2])*t+va.toFloat(a[m+2])*q)*D);k[n+2]=q;k[n+3]=0==a[h+3]||0==a[l+3]||0==a[m+3]?0:a[p+3]}d.data=e.data;d.width=b;d.height=c}};Ma.resizeBuffer=function(a,b,c){var d=a.buffer;a=a.get_data();var e;e=b*c*4;e=null!=e?new nc(e):null;for(var f,g,k=0,p=d.height;k<p;)for(var h=k++,l=0,m=d.width;l<m;)g=l++,f=4*(h*d.width+g),g=4*(h*b+g),e[g]=a[f],e[g+1]=
a[f+1],e[g+2]=a[f+2],e[g+3]=a[f+3];d.data=e;d.width=b;d.height=c};Ma.setFormat=function(a,b){var c=a.buffer.data;if(null!=c){var d,e=c.length/4|0,f,g,k,p,h,l,m,n,q,D,u,r;switch(a.get_format()){case 0:f=0;g=1;k=2;p=3;break;case 1:f=1;g=2;k=3;p=0;break;case 2:f=2,g=1,k=0,p=3}switch(b){case 0:h=0;l=1;m=2;n=3;break;case 1:h=1;l=2;m=3;n=0;break;case 2:h=2,l=1,m=0,n=3}for(var t=0;t<e;)d=4*t++,q=c[d+f],D=c[d+g],u=c[d+k],r=c[d+p],c[d+h]=q,c[d+l]=D,c[d+m]=u,c[d+n]=r;a.buffer.format=b;a.dirty=!0}};Ma.setPixel=
function(a,b,c,d,e){switch(e){case 1:d=(d>>16&255)<<24|(d>>8&255)<<16|(d&255)<<8|d>>24&255;break;case 2:d=(d>>8&255)<<24|(d>>16&255)<<16|(d>>24&255)<<8|d&255;break}e=0;var f=a.buffer.data,g=4*(c+a.offsetY)*a.buffer.width+4*(b+a.offsetX);switch(a.buffer.format){case 2:e=(f[g+2]&255)<<24|(f[g+1]&255)<<16|(f[g]&255)<<8|f[g+3]&255;break;case 0:e=(f[g]&255)<<24|(f[g+1]&255)<<16|(f[g+2]&255)<<8|f[g+3]&255;break;case 1:e=(f[g+1]&255)<<24|(f[g+2]&255)<<16|(f[g+3]&255)<<8|f[g]&255}if(a.buffer.premultiplied&&
0!=(e&255)&&255!=(e&255)){B.unmult=255/(e&255);var f=Math.round((e>>24&255)*B.unmult),f=B.__clamp[f],g=Math.round((e>>16&255)*B.unmult),g=B.__clamp[g],k=Math.round((e>>8&255)*B.unmult);e=(f&255)<<24|(g&255)<<16|(B.__clamp[k]&255)<<8|e&255}e&=255;d=(d>>24&255)<<24|(d>>16&255)<<16|(d>>8&255)<<8|e&255;e;e=a.buffer.data;b=4*(c+a.offsetY)*a.buffer.width+4*(b+a.offsetX);a.buffer.premultiplied&&(0==(d&255)?0!=d&&(d=0):255!=(d&255)&&(B.a16=B.__alpha16[d&255],d=((d>>24&255)*B.a16>>16&255)<<24|((d>>16&255)*
B.a16>>16&255)<<16|((d>>8&255)*B.a16>>16&255)<<8|d&255));switch(a.buffer.format){case 2:e[b]=d>>8&255;e[b+1]=d>>16&255;e[b+2]=d>>24&255;e[b+3]=d&255;break;case 0:e[b]=d>>24&255;e[b+1]=d>>16&255;e[b+2]=d>>8&255;e[b+3]=d&255;break;case 1:e[b]=d&255,e[b+1]=d>>24&255,e[b+2]=d>>16&255,e[b+3]=d>>8&255}a.dirty=!0};Ma.setPixel32=function(a,b,c,d,e){switch(e){case 1:d=(d>>16&255)<<24|(d>>8&255)<<16|(d&255)<<8|d>>24&255;break;case 2:d=(d>>8&255)<<24|(d>>16&255)<<16|(d>>24&255)<<8|d&255;break}a.get_transparent()||
(d=(d>>24&255)<<24|(d>>16&255)<<16|(d>>8&255)<<8|255,255);e=a.buffer.data;b=4*(c+a.offsetY)*a.buffer.width+4*(b+a.offsetX);a.buffer.premultiplied&&(0==(d&255)?0!=d&&(d=0):255!=(d&255)&&(B.a16=B.__alpha16[d&255],d=((d>>24&255)*B.a16>>16&255)<<24|((d>>16&255)*B.a16>>16&255)<<16|((d>>8&255)*B.a16>>16&255)<<8|d&255));switch(a.buffer.format){case 2:e[b]=d>>8&255;e[b+1]=d>>16&255;e[b+2]=d>>24&255;e[b+3]=d&255;break;case 0:e[b]=d>>24&255;e[b+1]=d>>16&255;e[b+2]=d>>8&255;e[b+3]=d&255;break;case 1:e[b]=d&
255,e[b+1]=d>>24&255,e[b+2]=d>>16&255,e[b+3]=d>>8&255}a.dirty=!0};Ma.setPixels=function(a,b,c,d){if(null!=a.buffer.data){var e=a.buffer.data,f=a.buffer.format,g=a.buffer.premultiplied;b=new wd(a,b);for(var k,p,h=a.get_transparent(),l=0,m=0,n=b.height;m<n;){k=m++;k=b.offset+b.stride*k;for(var q=0,D=b.width;q<D;){var u=q++;p=c.b[l+3]|c.b[l+2]<<8|c.b[l+1]<<16|c.b[l]<<24;l+=4;switch(d){case 1:var r=0;p=r=(p>>16&255)<<24|(p>>8&255)<<16|(p&255)<<8|p>>24&255;break;case 2:r=0;p=r=(p>>8&255)<<24|(p>>16&255)<<
16|(p>>24&255)<<8|p&255;break}h||(p=(p>>24&255)<<24|(p>>16&255)<<16|(p>>8&255)<<8|255,255);u=k+4*u;g&&(0==(p&255)?0!=p&&(p=0):255!=(p&255)&&(B.a16=B.__alpha16[p&255],p=((p>>24&255)*B.a16>>16&255)<<24|((p>>16&255)*B.a16>>16&255)<<16|((p>>8&255)*B.a16>>16&255)<<8|p&255));switch(f){case 2:e[u]=p>>8&255;e[u+1]=p>>16&255;e[u+2]=p>>24&255;e[u+3]=p&255;break;case 0:e[u]=p>>24&255;e[u+1]=p>>16&255;e[u+2]=p>>8&255;e[u+3]=p&255;break;case 1:e[u]=p&255,e[u+1]=p>>24&255,e[u+2]=p>>16&255,e[u+3]=p>>8&255}}}a.dirty=
!0}};Ma.threshold=function(a,b,c,d,e,f,g,k,p,h){switch(h){case 1:g=(g>>16&255)<<24|(g>>8&255)<<16|(g&255)<<8|g>>24&255;k=(k>>16&255)<<24|(k>>8&255)<<16|(k&255)<<8|k>>24&255;f=(f>>16&255)<<24|(f>>8&255)<<16|(f&255)<<8|f>>24&255;break;case 2:g=(g>>8&255)<<24|(g>>16&255)<<16|(g>>24&255)<<8|g&255;k=(k>>8&255)<<24|(k>>16&255)<<16|(k>>24&255)<<8|k&255;f=(f>>8&255)<<24|(f>>16&255)<<16|(f>>24&255)<<8|f&255;break}switch(e){case "!=":e=0;break;case "==":e=1;break;case "<":e=2;break;case "<=":e=3;break;case ">":e=
4;break;case ">=":e=5;break;default:e=-1}if(-1==e)return 0;h=b.buffer.data;var l=a.buffer.data;if(null==h||null==l)return 0;var m=0;c=new wd(b,c);d=new wd(a,new tc(d.x,d.y,c.width,c.height));var n=b.buffer.format,q=a.buffer.format;b=b.buffer.premultiplied;for(var u=a.buffer.premultiplied,r,t,v,z,y=0,x=d.height;y<x;){t=y++;r=c.offset+c.stride*t;t=d.offset+d.stride*t;for(var A=0,C=d.width;A<C;){A++;switch(n){case 2:v=(h[r+2]&255)<<24|(h[r+1]&255)<<16|(h[r]&255)<<8|h[r+3]&255;break;case 0:v=(h[r]&255)<<
24|(h[r+1]&255)<<16|(h[r+2]&255)<<8|h[r+3]&255;break;case 1:v=(h[r+1]&255)<<24|(h[r+2]&255)<<16|(h[r+3]&255)<<8|h[r]&255}if(b&&0!=(v&255)&&255!=(v&255)){B.unmult=255/(v&255);z=Math.round((v>>24&255)*B.unmult);z=B.__clamp[z];var H;H=Math.round((v>>16&255)*B.unmult);H=B.__clamp[H];var G=Math.round((v>>8&255)*B.unmult);v=(z&255)<<24|(H&255)<<16|(B.__clamp[G]&255)<<8|v&255}z=v&k;z=Ma.__pixelCompare(z,f);switch(e){case 0:z=0!=z;break;case 1:z=0==z;break;case 2:z=-1==z;break;case 3:z=0==z||-1==z;break;
case 4:z=1==z;break;case 5:z=0==z||1==z;break;default:z=!1}if(z){u&&(0==(g&255)?0!=g&&(g=0):255!=(g&255)&&(B.a16=B.__alpha16[g&255],g=((g>>24&255)*B.a16>>16&255)<<24|((g>>16&255)*B.a16>>16&255)<<16|((g>>8&255)*B.a16>>16&255)<<8|g&255));switch(q){case 2:l[t]=g>>8&255;l[t+1]=g>>16&255;l[t+2]=g>>24&255;l[t+3]=g&255;break;case 0:l[t]=g>>24&255;l[t+1]=g>>16&255;l[t+2]=g>>8&255;l[t+3]=g&255;break;case 1:l[t]=g&255,l[t+1]=g>>24&255,l[t+2]=g>>16&255,l[t+3]=g>>8&255}m++}else if(p)switch(u&&(0==(v&255)?0!=
v&&(v=0):255!=(v&255)&&(B.a16=B.__alpha16[v&255],v=((v>>24&255)*B.a16>>16&255)<<24|((v>>16&255)*B.a16>>16&255)<<16|((v>>8&255)*B.a16>>16&255)<<8|v&255)),q){case 2:l[t]=v>>8&255;l[t+1]=v>>16&255;l[t+2]=v>>24&255;l[t+3]=v&255;break;case 0:l[t]=v>>24&255;l[t+1]=v>>16&255;l[t+2]=v>>8&255;l[t+3]=v&255;break;case 1:l[t]=v&255,l[t+1]=v>>24&255,l[t+2]=v>>16&255,l[t+3]=v>>8&255}r+=4;t+=4}}0<m&&(a.dirty=!0);return m};Ma.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 g=f++,k=4*g;switch(c){case 2:e=(b[k+2]&255)<<24|(b[k+1]&255)<<16|(b[k]&255)<<8|b[k+3]&255;break;case 0:e=(b[k]&255)<<24|(b[k+1]&255)<<16|(b[k+2]&255)<<8|b[k+3]&255;break;case 1:e=(b[k+1]&255)<<24|(b[k+2]&255)<<16|(b[k+3]&255)<<8|b[k]&255}if(0!=(e&255)&&255!=(e&255)){B.unmult=255/(e&255);var k=Math.round((e>>24&255)*B.unmult),k=B.__clamp[k],p;p=Math.round((e>>16&255)*B.unmult);p=B.__clamp[p];var h=Math.round((e>>8&255)*B.unmult);e=(k&255)<<24|(p&255)<<16|(B.__clamp[h]&
255)<<8|e&255}g*=4;switch(c){case 2:b[g]=e>>8&255;b[g+1]=e>>16&255;b[g+2]=e>>24&255;b[g+3]=e&255;break;case 0:b[g]=e>>24&255;b[g+1]=e>>16&255;b[g+2]=e>>8&255;b[g+3]=e&255;break;case 1:b[g]=e&255,b[g+1]=e>>24&255,b[g+2]=e>>16&255,b[g+3]=e>>8&255}}a.buffer.premultiplied=!1;a.dirty=!0}};Ma.__pixelCompare=function(a,b){var c,d;c=a>>24&255;d=b>>24&255;if(c!=d)return c>d?1:-1;c=a>>16&255;d=b>>16&255;if(c!=d)return c>d?1:-1;c=a>>8&255;d=b>>8&255;if(c!=d)return c>d?1:-1;c=a&255;d=b&255;return c!=d?c>d?1:
-1:0};var wd=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)};n["lime.graphics.utils._ImageDataUtil.ImageDataView"]=
wd;wd.__name__=["lime","graphics","utils","_ImageDataUtil","ImageDataView"];wd.prototype={clip:function(a,b,c,d){this.rect.__contract(a,b,c,d);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+this.image.offsetY)+4*(this.x+this.image.offsetX)},row:function(a){return this.offset+this.stride*a},__class__:wd};var fb={};n["lime.math._ColorMatrix.ColorMatrix_Impl_"]=fb;fb.__name__=
["lime","math","_ColorMatrix","ColorMatrix_Impl_"];fb.__properties__={set_redOffset:"set_redOffset",get_redOffset:"get_redOffset",set_redMultiplier:"set_redMultiplier",get_redMultiplier:"get_redMultiplier",set_greenOffset:"set_greenOffset",get_greenOffset:"get_greenOffset",set_greenMultiplier:"set_greenMultiplier",get_greenMultiplier:"get_greenMultiplier",set_color:"set_color",get_color:"get_color",set_blueOffset:"set_blueOffset",get_blueOffset:"get_blueOffset",set_blueMultiplier:"set_blueMultiplier",
get_blueMultiplier:"get_blueMultiplier",set_alphaOffset:"set_alphaOffset",get_alphaOffset:"get_alphaOffset",set_alphaMultiplier:"set_alphaMultiplier",get_alphaMultiplier:"get_alphaMultiplier"};fb._new=function(a){if(null==a||20!=a.length)a=fb.__identity,a=null!=a?new Float32Array(a):null;return a};fb.clone=function(a){return fb._new(null!=a?new Float32Array(a):null)};fb.concat=function(a,b){a[0]+=b[0];a[6]+=b[6];a[12]+=b[12];a[18]+=b[18]};fb.copyFrom=function(a,b){a.set(b)};fb.identity=function(a){a[0]=
1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=0;a[6]=1;a[7]=0;a[8]=0;a[9]=0;a[10]=0;a[11]=0;a[12]=1;a[13]=0;a[14]=0;a[15]=0;a[16]=0;a[17]=0;a[18]=1;a[19]=0};fb.getAlphaTable=function(a){var b;b=new nc(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};fb.getBlueTable=function(a){var b;b=new nc(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};fb.getGreenTable=function(a){var b;
b=new nc(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};fb.getRedTable=function(a){var b;b=new nc(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};fb.__toFlashColorTransform=function(a){return null};fb.get_alphaMultiplier=function(a){return a[18]};fb.set_alphaMultiplier=function(a,b){return a[18]=b};fb.get_alphaOffset=function(a){return 255*a[19]};fb.set_alphaOffset=
function(a,b){return a[19]=b/255};fb.get_blueMultiplier=function(a){return a[12]};fb.set_blueMultiplier=function(a,b){return a[12]=b};fb.get_blueOffset=function(a){return 255*a[14]};fb.set_blueOffset=function(a,b){return a[14]=b/255};fb.get_color=function(a){return(255*a[4]|0)<<16|(255*a[9]|0)<<8|255*a[14]|0};fb.set_color=function(a,b){a[4]=(b>>16&255)/255;a[9]=(b>>8&255)/255;a[14]=(b&255)/255;a[0]=0;a[6]=0;a[12]=0;return fb.get_color(a)};fb.get_greenMultiplier=function(a){return a[6]};fb.set_greenMultiplier=
function(a,b){return a[6]=b};fb.get_greenOffset=function(a){return 255*a[9]};fb.set_greenOffset=function(a,b){return a[9]=b/255};fb.get_redMultiplier=function(a){return a[0]};fb.set_redMultiplier=function(a,b){return a[0]=b};fb.get_redOffset=function(a){return 255*a[4]};fb.set_redOffset=function(a,b){return a[4]=b/255};fb.get=function(a,b){return a[b]};fb.set=function(a,b,c){return a[b]=c};var xe=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};n["lime.math.Matrix3"]=xe;xe.__name__=["lime","math","Matrix3"];xe.prototype={clone:function(){return new xe(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},copyColumnFrom:function(a,b){if(2<a)throw new F("Column "+
a+" out of bounds (2)");0==a?(this.a=b.x,this.c=b.y):1==a?(this.b=b.x,this.d=b.y):(this.tx=b.x,this.ty=b.y)},copyColumnTo:function(a,b){if(2<a)throw new F("Column "+a+" out of bounds (2)");0==a?(b.x=this.a,b.y=this.c,b.z=0):1==a?(b.x=this.b,b.y=this.d,b.z=0):(b.x=this.tx,b.y=this.ty,b.z=1)},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},copyRowFrom:function(a,b){if(2<a)throw new F("Row "+a+" out of bounds (2)");0==a?(this.a=b.x,this.c=b.y):1==a?(this.b=
b.x,this.d=b.y):(this.tx=b.x,this.ty=b.y)},copyRowTo:function(a,b){if(2<a)throw new F("Row "+a+" out of bounds (2)");0==a?(b.x=this.a,b.y=this.b,b.z=this.tx):1==a?(b.x=this.c,b.y=this.d,b.z=this.ty):(b.x=0,b.y=0,b.z=1)},createBox:function(a,b,c,d,e){null==e&&(e=0);null==d&&(d=0);null==c&&(c=0);this.a=a;this.d=b;this.b=c;this.tx=d;this.ty=e},createGradientBox:function(a,b,c,d,e){null==e&&(e=0);null==d&&(d=0);null==c&&(c=0);this.a=a/1638.4;this.d=b/1638.4;if(0!=c){var f=Math.cos(c);c=Math.sin(c);this.b=
c*this.d;this.c=-c*this.a;this.a*=f;this.d*=f}else this.c=this.b=0;this.tx=d+a/2;this.ty=e+b/2},equals:function(a){return null!=a&&this.tx==a.tx&&this.ty==a.ty&&this.a==a.a&&this.b==a.b&&this.c==a.c&&this.d==a.d},deltaTransformVector2:function(a){return new yc(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},mult:function(a){var b=new xe(this.a,this.b,this.c,this.d,this.tx,this.ty);b.concat(a);return b},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},setRotation:function(a,b){null==b&&(b=1);this.a=Math.cos(a)*b;this.c=Math.sin(a)*b;this.b=-this.c;this.d=this.a},setTo:function(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.d=d;this.tx=e;this.ty=f},to3DString:function(a){null==a&&(a=!1);return a?"Matrix33d("+this.a+", "+this.b+", 0, 0, "+this.c+", "+this.d+", 0, 0, 0, 0, 1, 0, "+(this.tx|0)+", "+(this.ty|0)+", 0, 1)":"Matrix33d("+this.a+", "+this.b+", 0, 0, "+this.c+", "+this.d+", 0, 0, 0, 0, 1, 0, "+
this.tx+", "+this.ty+", 0, 1)"},toMozString:function(){return"Matrix3("+this.a+", "+this.b+", "+this.c+", "+this.d+", "+this.tx+"px, "+this.ty+"px)"},toString:function(){return"Matrix3("+this.a+", "+this.b+", "+this.c+", "+this.d+", "+this.tx+", "+this.ty+")"},transformVector2:function(a){return new yc(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},__cleanValues:function(){this.a=Math.round(1E3*this.a)/1E3;this.b=Math.round(1E3*this.b)/
1E3;this.c=Math.round(1E3*this.c)/1E3;this.d=Math.round(1E3*this.d)/1E3;this.tx=Math.round(10*this.tx)/10;this.ty=Math.round(10*this.ty)/10},__transformX:function(a){return a.x*this.a+a.y*this.c+this.tx},__transformY:function(a){return a.x*this.b+a.y*this.d+this.ty},__translateTransformed:function(a){this.tx=a.x*this.a+a.y*this.c+this.tx;this.ty=a.x*this.b+a.y*this.d+this.ty},__class__:xe};var aa={};n["lime.math._Matrix4.Matrix4_Impl_"]=aa;aa.__name__=["lime","math","_Matrix4","Matrix4_Impl_"];aa.__properties__=
{set_position:"set_position",get_position:"get_position",get_determinant:"get_determinant"};aa._new=function(a){if(null==a||16!=a.length)a=aa.__identity,a=null!=a?new Float32Array(a):null;return a};aa.append=function(a,b){var c=a[0],d=a[4],e=a[8],f=a[12],g=a[1],k=a[5],p=a[9],h=a[13],l=a[2],m=a[6],n=a[10],q=a[14],u=a[3],r=a[7],t=a[11],v=a[15],z=aa.get(b,0),y=aa.get(b,4),x=aa.get(b,8),A=aa.get(b,12),B=aa.get(b,1),C=aa.get(b,5),H=aa.get(b,9),G=aa.get(b,13),I=aa.get(b,2),E=aa.get(b,6),F=aa.get(b,10),
L=aa.get(b,14),K=aa.get(b,3),J=aa.get(b,7),M=aa.get(b,11),P=aa.get(b,15);a[0]=c*z+g*y+l*x+u*A;a[1]=c*B+g*C+l*H+u*G;a[2]=c*I+g*E+l*F+u*L;a[3]=c*K+g*J+l*M+u*P;a[4]=d*z+k*y+m*x+r*A;a[5]=d*B+k*C+m*H+r*G;a[6]=d*I+k*E+m*F+r*L;a[7]=d*K+k*J+m*M+r*P;a[8]=e*z+p*y+n*x+t*A;a[9]=e*B+p*C+n*H+t*G;a[10]=e*I+p*E+n*F+t*L;a[11]=e*K+p*J+n*M+t*P;a[12]=f*z+h*y+q*x+v*A;a[13]=f*B+h*C+q*H+v*G;a[14]=f*I+h*E+q*F+v*L;a[15]=f*K+h*J+q*M+v*P};aa.appendRotation=function(a,b,c,d){b=aa.getAxisRotation(c.x,c.y,c.z,b);null!=d&&aa.appendTranslation(b,
d.x,d.y,d.z);aa.append(a,b)};aa.appendScale=function(a,b,c,d){aa.append(a,aa._new(function(a){a=[b,0,0,0,0,c,0,0,0,0,d,0,0,0,0,1];return null!=a?new Float32Array(a):null}(this)))};aa.appendTranslation=function(a,b,c,d){a[12]+=b;a[13]+=c;a[14]+=d};aa.clone=function(a){return aa._new(null!=a?new Float32Array(a):null)};aa.copyColumnFrom=function(a,b,c){switch(b){case 0:a[0]=c.x;a[1]=c.y;a[2]=c.z;a[3]=c.w;break;case 1:a[4]=c.x;a[5]=c.y;a[6]=c.z;a[7]=c.w;break;case 2:a[8]=c.x;a[9]=c.y;a[10]=c.z;a[11]=
c.w;break;case 3:a[12]=c.x;a[13]=c.y;a[14]=c.z;a[15]=c.w;break;default:throw new F("Error, Column "+b+" out of bounds [0, ..., 3]");}};aa.copyColumnTo=function(a,b,c){switch(b){case 0:c.x=a[0];c.y=a[1];c.z=a[2];c.w=a[3];break;case 1:c.x=a[4];c.y=a[5];c.z=a[6];c.w=a[7];break;case 2:c.x=a[8];c.y=a[9];c.z=a[10];c.w=a[11];break;case 3:c.x=a[12];c.y=a[13];c.z=a[14];c.w=a[15];break;default:throw new F("Error, Column "+b+" out of bounds [0, ..., 3]");}};aa.copyFrom=function(a,b){a.set(b)};aa.copythisFrom=
function(a,b,c,d){null==d&&(d=!1);null==c&&(c=0);d&&aa.transpose(a);for(var e=b.length-c,f=0;f<e;){var g=f++;a[g]=b[g+c]}d&&aa.transpose(a)};aa.copythisTo=function(a,b,c,d){null==d&&(d=!1);null==c&&(c=0);d&&aa.transpose(a);for(var e=a.length,f=0;f<e;){var g=f++;b[g+c]=a[g]}d&&aa.transpose(a)};aa.copyRowFrom=function(a,b,c){switch(b){case 0:a[0]=c.x;a[4]=c.y;a[8]=c.z;a[12]=c.w;break;case 1:a[1]=c.x;a[5]=c.y;a[9]=c.z;a[13]=c.w;break;case 2:a[2]=c.x;a[6]=c.y;a[10]=c.z;a[14]=c.w;break;case 3:a[3]=c.x;
a[7]=c.y;a[11]=c.z;a[15]=c.w;break;default:throw new F("Error, Row "+u.string(va.toFloat(b))+" out of bounds [0, ..., 3]");}};aa.create2D=function(a,b,c,d){null==d&&(d=0);null==c&&(c=1);d=d*Math.PI/180;var e=Math.cos(d),f=Math.sin(d);return aa._new(function(d){d=[e*c,-f*c,0,0,f*c,e*c,0,0,0,0,1,0,a,b,0,1];return null!=d?new Float32Array(d):null}(this))};aa.createABCD=function(a,b,c,d,e,f){return aa._new(function(g){g=[a,b,0,0,c,d,0,0,0,0,1,0,e,f,0,1];return null!=g?new Float32Array(g):null}(this))};
aa.createOrtho=function(a,b,c,d,e,f){var g=1/(b-a),k=1/(d-c),p=1/(f-e);return aa._new(function(h){h=[2*g,0,0,0,0,2*k,0,0,0,0,-2*p,0,-(a+b)*g,-(c+d)*k,-(e+f)*p,1];return null!=h?new Float32Array(h):null}(this))};aa.copyRowTo=function(a,b,c){switch(b){case 0:c.x=a[0];c.y=a[4];c.z=a[8];c.w=a[12];break;case 1:c.x=a[1];c.y=a[5];c.z=a[9];c.w=a[13];break;case 2:c.x=a[2];c.y=a[6];c.z=a[10];c.w=a[14];break;case 3:c.x=a[3];c.y=a[7];c.z=a[11];c.w=a[15];break;default:throw new F("Error, Row "+b+" out of bounds [0, ..., 3]");
}};aa.copyToMatrix4=function(a,b){q.__cast(b,Float32Array).set(a)};aa.deltaTransformVector=function(a,b){var c=b.x,d=b.y,e=b.z;return new wb(c*a[0]+d*a[4]+e*a[8]+a[3],c*a[1]+d*a[5]+e*a[9]+a[7],c*a[2]+d*a[6]+e*a[10]+a[11],0)};aa.identity=function(a){a[0]=1;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=1;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=0;a[13]=0;a[14]=0;a[15]=1};aa.interpolate=function(a,b,c){for(var d=aa._new(),e=0;16>e;){var f=e++;aa.set(d,f,aa.get(a,f)+(aa.get(b,f)-aa.get(a,f))*c)}return d};
aa.interpolateTo=function(a,b,c){for(var d=0;16>d;){var e=d++,f=a[e]+(aa.get(b,e)-a[e])*c;a[e]=f}};aa.invert=function(a){var b=aa.get_determinant(a),c=1E-11<Math.abs(b);if(c){var b=1/b,d=a[0],e=a[4],f=a[8],g=a[12],k=a[1],p=a[5],h=a[9],l=a[13],m=a[2],n=a[6],q=a[10],u=a[14],r=a[3],t=a[7],v=a[11],z=a[15];a[0]=b*(p*(q*z-u*v)-h*(n*z-u*t)+l*(n*v-q*t));a[1]=-b*(k*(q*z-u*v)-h*(m*z-u*r)+l*(m*v-q*r));a[2]=b*(k*(n*z-u*t)-p*(m*z-u*r)+l*(m*t-n*r));a[3]=-b*(k*(n*v-q*t)-p*(m*v-q*r)+h*(m*t-n*r));a[4]=-b*(e*(q*z-
u*v)-f*(n*z-u*t)+g*(n*v-q*t));a[5]=b*(d*(q*z-u*v)-f*(m*z-u*r)+g*(m*v-q*r));a[6]=-b*(d*(n*z-u*t)-e*(m*z-u*r)+g*(m*t-n*r));a[7]=b*(d*(n*v-q*t)-e*(m*v-q*r)+f*(m*t-n*r));a[8]=b*(e*(h*z-l*v)-f*(p*z-l*t)+g*(p*v-h*t));a[9]=-b*(d*(h*z-l*v)-f*(k*z-l*r)+g*(k*v-h*r));a[10]=b*(d*(p*z-l*t)-e*(k*z-l*r)+g*(k*t-p*r));a[11]=-b*(d*(p*v-h*t)-e*(k*v-h*r)+f*(k*t-p*r));a[12]=-b*(e*(h*u-l*q)-f*(p*u-l*n)+g*(p*q-h*n));a[13]=b*(d*(h*u-l*q)-f*(k*u-l*m)+g*(k*q-h*m));a[14]=-b*(d*(p*u-l*n)-e*(k*u-l*m)+g*(k*n-p*m));a[15]=b*(d*
(p*q-h*n)-e*(k*q-h*m)+f*(k*n-p*m))}return c};aa.pointAt=function(a,b,c,d){null==c&&(c=new wb(0,0,-1));null==d&&(d=new wb(0,-1,0));c=new wb(c.x-b.x,c.y-b.y,c.z-b.z);d=new wb(d.x,d.y,d.z,d.w);var e;c.normalize();d.normalize();e=new wb(c.x,c.y,c.z,c.w);e.scaleBy(d.x*c.x+d.y*c.y+d.z*c.z);d=new wb(d.x-e.x,d.y-e.y,d.z-e.z);0<Math.sqrt(d.x*d.x+d.y*d.y+d.z*d.z)?d.normalize():d=0!=c.x?new wb(-c.y,c.x,0):new wb(1,0,0);e=new wb(d.y*c.z-d.z*c.y,d.z*c.x-d.x*c.z,d.x*c.y-d.y*c.x,1);e.normalize();a[0]=e.x;a[4]=e.y;
a[8]=e.z;a[12]=0;a[1]=d.x;a[5]=d.y;a[9]=d.z;a[13]=0;a[2]=c.x;a[6]=c.y;a[10]=c.z;a[14]=0;a[3]=b.x;a[7]=b.y;a[11]=b.z;a[15]=1};aa.prepend=function(a,b){var c=aa.get(b,0),d=aa.get(b,4),e=aa.get(b,8),f=aa.get(b,12),g=aa.get(b,1),k=aa.get(b,5),p=aa.get(b,9),h=aa.get(b,13),l=aa.get(b,2),m=aa.get(b,6),n=aa.get(b,10),q=aa.get(b,14),u=aa.get(b,3),r=aa.get(b,7),t=aa.get(b,11),v=aa.get(b,15),z=a[0],y=a[4],x=a[8],A=a[12],B=a[1],C=a[5],H=a[9],G=a[13],I=a[2],E=a[6],F=a[10],L=a[14],K=a[3],J=a[7],M=a[11],P=a[15];
a[0]=c*z+g*y+l*x+u*A;a[1]=c*B+g*C+l*H+u*G;a[2]=c*I+g*E+l*F+u*L;a[3]=c*K+g*J+l*M+u*P;a[4]=d*z+k*y+m*x+r*A;a[5]=d*B+k*C+m*H+r*G;a[6]=d*I+k*E+m*F+r*L;a[7]=d*K+k*J+m*M+r*P;a[8]=e*z+p*y+n*x+t*A;a[9]=e*B+p*C+n*H+t*G;a[10]=e*I+p*E+n*F+t*L;a[11]=e*K+p*J+n*M+t*P;a[12]=f*z+h*y+q*x+v*A;a[13]=f*B+h*C+q*H+v*G;a[14]=f*I+h*E+q*F+v*L;a[15]=f*K+h*J+q*M+v*P};aa.prependRotation=function(a,b,c,d){b=aa.getAxisRotation(c.x,c.y,c.z,b);null!=d&&aa.appendTranslation(b,d.x,d.y,d.z);aa.prepend(a,b)};aa.prependScale=function(a,
b,c,d){aa.prepend(a,aa._new(function(a){a=[b,0,0,0,0,c,0,0,0,0,d,0,0,0,0,1];return null!=a?new Float32Array(a):null}(this)))};aa.prependTranslation=function(a,b,c,d){var e=aa._new();aa.set_position(e,new wb(b,c,d));aa.prepend(a,e)};aa.transformVector=function(a,b){var c=b.x,d=b.y,e=b.z;return new wb(c*a[0]+d*a[4]+e*a[8]+a[12],c*a[1]+d*a[5]+e*a[9]+a[13],c*a[2]+d*a[6]+e*a[10]+a[14],c*a[3]+d*a[7]+e*a[11]+a[15])};aa.transformVectors=function(a,b,c){for(var d=0;d+3<=b.length;){var e=b[d],f=b[d+1],g=b[d+
2];c[d]=e*a[0]+f*a[4]+g*a[8]+a[12];c[d+1]=e*a[1]+f*a[5]+g*a[9]+a[13];c[d+2]=e*a[2]+f*a[6]+g*a[10]+a[14];d+=3}};aa.transpose=function(a){var b;b=null!=a?new Float32Array(a):null;a[1]=b[4];a[2]=b[8];a[3]=b[12];a[4]=b[1];a[6]=b[9];a[7]=b[13];a[8]=b[2];a[9]=b[6];a[11]=b[14];a[12]=b[3];a[13]=b[7];a[14]=b[11]};aa.getAxisRotation=function(a,b,c,d){var e=aa._new();a=new wb(a,b,c);d=Math.PI/180*-d;c=Math.cos(d);d=Math.sin(d);b=1-c;aa.set(e,0,c+a.x*a.x*b);aa.set(e,5,c+a.y*a.y*b);aa.set(e,10,c+a.z*a.z*b);c=
a.x*a.y*b;var f=a.z*d;aa.set(e,4,c+f);aa.set(e,1,c-f);c=a.x*a.z*b;f=a.y*d;aa.set(e,8,c-f);aa.set(e,2,c+f);c=a.y*a.z*b;f=a.x*d;aa.set(e,9,c+f);aa.set(e,6,c-f);return e};aa.get_determinant=function(a){return(a[0]*a[5]-a[4]*a[1])*(a[10]*a[15]-a[14]*a[11])-(a[0]*a[9]-a[8]*a[1])*(a[6]*a[15]-a[14]*a[7])+(a[0]*a[13]-a[12]*a[1])*(a[6]*a[11]-a[10]*a[7])+(a[4]*a[9]-a[8]*a[5])*(a[2]*a[15]-a[14]*a[3])-(a[4]*a[13]-a[12]*a[5])*(a[2]*a[11]-a[10]*a[3])+(a[8]*a[13]-a[12]*a[9])*(a[2]*a[7]-a[6]*a[3])};aa.get_position=
function(a){return new wb(a[12],a[13],a[14])};aa.set_position=function(a,b){a[12]=b.x;a[13]=b.y;a[14]=b.z;return b};aa.get=function(a,b){return a[b]};aa.set=function(a,b,c){return a[b]=c};var tc=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};n["lime.math.Rectangle"]=tc;tc.__name__=["lime","math","Rectangle"];tc.prototype={clone:function(){return new tc(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},equals:function(a){return null!=a&&this.x==a.x&&this.y==a.y&&
this.width==a.width&&this.height==a.height},inflate:function(a,b){this.x-=a;this.width+=2*a;this.y-=b;this.height+=2*b},inflatePoint:function(a){this.inflate(a.x,a.y)},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 tc;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 tc:new tc(b,d,c-b,a-d)},intersects:function(a){var b;b=this.x<a.x?a.x:this.x;
if((this.get_right()>a.get_right()?a.get_right():this.get_right())<=b)return!1;b=this.y<a.y?a.y:this.y;return(this.get_bottom()>a.get_bottom()?a.get_bottom():this.get_bottom())>b},isEmpty:function(){return 0>=this.width||0>=this.height},offset:function(a,b){this.x+=a;this.y+=b},offsetPoint:function(a){this.x+=a.x;this.y+=a.y},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},transform:function(a){var b=a.a*this.x+a.c*
this.y,c=b,d=a.b*this.x+a.d*this.y,e=d,f=a.a*(this.x+this.width)+a.c*this.y,g=a.b*(this.x+this.width)+a.d*this.y;f<b&&(b=f);g<d&&(d=g);f>c&&(c=f);g>e&&(e=g);f=a.a*(this.x+this.width)+a.c*(this.y+this.height);g=a.b*(this.x+this.width)+a.d*(this.y+this.height);f<b&&(b=f);g<d&&(d=g);f>c&&(c=f);g>e&&(e=g);f=a.a*this.x+a.c*(this.y+this.height);g=a.b*this.x+a.d*(this.y+this.height);f<b&&(b=f);g<d&&(d=g);f>c&&(c=f);g>e&&(e=g);return new tc(b+a.tx,d+a.ty,c-b,e-d)},union:function(a){if(0==this.width||0==this.height)return a.clone();
if(0==a.width||0==a.height)return this.clone();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();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 new tc(b,d,c-b,a-d)},__contract:function(a,b,c,d){if(0!=this.width||0!=this.height)this.x<a&&(this.x=a),this.y<b&&(this.y=b),this.get_right()>a+c&&(this.width=a+c-this.x),this.get_bottom()>b+d&&(this.height=b+d-this.y)},__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.y>b&&(this.y=b);e<a+c&&(this.width=a+c-this.x);f<b+d&&(this.height=b+d-this.y)}},__toFlashRectangle:function(){return null},get_bottom:function(){return this.y+this.height},set_bottom:function(a){this.height=a-this.y;return a},get_bottomRight:function(){return new yc(this.x+this.width,this.y+this.height)},set_bottomRight:function(a){this.width=a.x-this.x;
this.height=a.y-this.y;return a.clone()},get_left:function(){return this.x},set_left:function(a){this.width-=a-this.x;return this.x=a},get_right:function(){return this.x+this.width},set_right:function(a){this.width=a-this.x;return a},get_size:function(){return new yc(this.width,this.height)},set_size:function(a){this.width=a.x;this.height=a.y;return a.clone()},get_top:function(){return this.y},set_top:function(a){this.height-=a-this.y;return this.y=a},get_topLeft:function(){return new yc(this.x,this.y)},
set_topLeft:function(a){this.x=a.x;this.y=a.y;return a.clone()},__class__:tc,__properties__:{set_topLeft:"set_topLeft",get_topLeft:"get_topLeft",set_top:"set_top",get_top:"get_top",set_size:"set_size",get_size:"get_size",set_right:"set_right",get_right:"get_right",set_left:"set_left",get_left:"get_left",set_bottomRight:"set_bottomRight",get_bottomRight:"get_bottomRight",set_bottom:"set_bottom",get_bottom:"get_bottom"}};var yc=function(a,b){null==b&&(b=0);null==a&&(a=0);this.x=a;this.y=b};n["lime.math.Vector2"]=
yc;yc.__name__=["lime","math","Vector2"];yc.distance=function(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)};yc.interpolate=function(a,b,c){return new yc(b.x+c*(a.x-b.x),b.y+c*(a.y-b.y))};yc.polar=function(a,b){return new yc(a*Math.cos(b),a*Math.sin(b))};yc.prototype={add:function(a){return new yc(a.x+this.x,a.y+this.y)},clone:function(){return new yc(this.x,this.y)},equals:function(a){return null!=a&&a.x==this.x&&a.y==this.y},normalize:function(a){if(0!=this.x||0!=this.y)a/=Math.sqrt(this.x*
this.x+this.y*this.y),this.x*=a,this.y*=a},offset:function(a,b){this.x+=a;this.y+=b},setTo:function(a,b){this.x=a;this.y=b},subtract:function(a){return new yc(this.x-a.x,this.y-a.y)},__toFlashPoint:function(){return null},get_length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},__class__:yc,__properties__:{get_length:"get_length"}};var wb=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this.w=d;this.x=a;this.y=b;this.z=c};n["lime.math.Vector4"]=wb;wb.__name__=
["lime","math","Vector4"];wb.__properties__={get_Z_AXIS:"get_Z_AXIS",get_Y_AXIS:"get_Y_AXIS",get_X_AXIS:"get_X_AXIS"};wb.X_AXIS=null;wb.Y_AXIS=null;wb.Z_AXIS=null;wb.angleBetween=function(a,b){var c=new wb(a.x,a.y,a.z,a.w);c.normalize();var d=new wb(b.x,b.y,b.z,b.w);d.normalize();return Math.acos(c.x*d.x+c.y*d.y+c.z*d.z)};wb.distance=function(a,b){var c=b.x-a.x,d=b.y-a.y,e=b.z-a.z;return Math.sqrt(c*c+d*d+e*e)};wb.get_X_AXIS=function(){return new wb(1,0,0)};wb.get_Y_AXIS=function(){return new wb(0,
1,0)};wb.get_Z_AXIS=function(){return new wb(0,0,1)};wb.prototype={add:function(a){return new wb(this.x+a.x,this.y+a.y,this.z+a.z)},clone:function(){return new wb(this.x,this.y,this.z,this.w)},copyFrom:function(a){this.x=a.x;this.y=a.y;this.z=a.z},crossProduct:function(a){return new wb(this.y*a.z-this.z*a.y,this.z*a.x-this.x*a.z,this.x*a.y-this.y*a.x,1)},decrementBy:function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z},dotProduct:function(a){return this.x*a.x+this.y*a.y+this.z*a.z},equals:function(a,b){null==
b&&(b=!1);return this.x==a.x&&this.y==a.y&&this.z==a.z&&(!b||this.w==a.w)},incrementBy:function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z},nearEquals:function(a,b,c){null==c&&(c=!1);return Math.abs(this.x-a.x)<b&&Math.abs(this.y-a.y)<b&&Math.abs(this.z-a.z)<b&&(!c||Math.abs(this.w-a.w)<b)},negate:function(){this.x*=-1;this.y*=-1;this.z*=-1},normalize:function(){var a=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z);0!=a&&(this.x/=a,this.y/=a,this.z/=a);return a},project:function(){this.x/=this.w;
this.y/=this.w;this.z/=this.w},scaleBy:function(a){this.x*=a;this.y*=a;this.z*=a},setTo:function(a,b,c){this.x=a;this.y=b;this.z=c},subtract:function(a){return new wb(this.x-a.x,this.y-a.y,this.z-a.z)},toString:function(){return"Vector4("+this.x+", "+this.y+", "+this.z+")"},get_length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},get_lengthSquared:function(){return this.x*this.x+this.y*this.y+this.z*this.z},__class__:wb,__properties__:{get_lengthSquared:"get_lengthSquared",
get_length:"get_length"}};var bc={};n["lime.math.color._ARGB.ARGB_Impl_"]=bc;bc.__name__=["lime","math","color","_ARGB","ARGB_Impl_"];bc.__properties__={set_r:"set_r",get_r:"get_r",set_g:"set_g",get_g:"get_g",set_b:"set_b",get_b:"get_b",set_a:"set_a",get_a:"get_a"};bc.a16=null;bc.unmult=null;bc._new=function(a){null==a&&(a=0);return a};bc.create=function(a,b,c,d){return(a&255)<<24|(b&255)<<16|(c&255)<<8|d&255};bc.multiplyAlpha=function(a){0!=(a>>24&255)&&255!=(a>>24&255)&&(bc.a16=B.__alpha16[a>>24&
255])};bc.readUInt8=function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=0);switch(d){case 2:a=(b[c+1]&255)<<24|(b[c]&255)<<16|(b[c+3]&255)<<8|b[c+2]&255;break;case 0:a=(b[c+1]&255)<<24|(b[c+2]&255)<<16|(b[c+3]&255)<<8|b[c]&255;break;case 1:a=(b[c+2]&255)<<24|(b[c+3]&255)<<16|(b[c]&255)<<8|b[c+1]&255}e&&0!=(a>>24&255)&&255!=(a>>24&255)&&(bc.unmult=255/(a>>24&255))};bc.set=function(a,b,c,d,e){};bc.unmultiplyAlpha=function(a){0!=(a>>24&255)&&255!=(a>>24&255)&&(bc.unmult=255/(a>>24&255))};bc.writeUInt8=function(a,
b,c,d,e){null==e&&(e=!1);null==d&&(d=0);e&&(0==(a>>24&255)?a=0:255!=(a>>24&255)&&(bc.a16=B.__alpha16[a>>24&255],a=(a>>24&255)<<24|((a>>16&255)*bc.a16>>16&255)<<16|((a>>8&255)*bc.a16>>16&255)<<8|(a&255)*bc.a16>>16&255));switch(d){case 2:b[c]=a&255;b[c+1]=a>>8&255;b[c+2]=a>>16&255;b[c+3]=a>>24&255;break;case 0:b[c]=a>>16&255;b[c+1]=a>>8&255;b[c+2]=a&255;b[c+3]=a>>24&255;break;case 1:b[c]=a>>24&255,b[c+1]=a>>16&255,b[c+2]=a>>8&255,b[c+3]=a&255}};bc.__fromBGRA=function(a){return(a&255)<<24|(a>>8&255)<<
16|(a>>16&255)<<8|a>>24&255};bc.__fromRGBA=function(a){return(a&255)<<24|(a>>24&255)<<16|(a>>16&255)<<8|a>>8&255};bc.get_a=function(a){return a>>24&255};bc.set_a=function(a,b){return b};bc.get_b=function(a){return a&255};bc.set_b=function(a,b){return b};bc.get_g=function(a){return a>>8&255};bc.set_g=function(a,b){return b};bc.get_r=function(a){return a>>16&255};bc.set_r=function(a,b){return b};var cc={};n["lime.math.color._BGRA.BGRA_Impl_"]=cc;cc.__name__=["lime","math","color","_BGRA","BGRA_Impl_"];
cc.__properties__={set_r:"set_r",get_r:"get_r",set_g:"set_g",get_g:"get_g",set_b:"set_b",get_b:"get_b",set_a:"set_a",get_a:"get_a"};cc.a16=null;cc.unmult=null;cc._new=function(a){null==a&&(a=0);return a};cc.create=function(a,b,c,d){return(a&255)<<24|(b&255)<<16|(c&255)<<8|d&255};cc.multiplyAlpha=function(a){0!=(a&255)&&255!=(a&255)&&(cc.a16=B.__alpha16[a&255])};cc.readUInt8=function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=0);switch(d){case 2:a=(b[c]&255)<<24|(b[c+1]&255)<<16|(b[c+2]&255)<<8|b[c+3]&
255;break;case 0:a=(b[c+2]&255)<<24|(b[c+1]&255)<<16|(b[c]&255)<<8|b[c+3]&255;break;case 1:a=(b[c+3]&255)<<24|(b[c+2]&255)<<16|(b[c+1]&255)<<8|b[c]&255}e&&0!=(a&255)&&255!=(a&255)&&(cc.unmult=255/(a&255))};cc.set=function(a,b,c,d,e){};cc.unmultiplyAlpha=function(a){0!=(a&255)&&255!=(a&255)&&(cc.unmult=255/(a&255))};cc.writeUInt8=function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=0);e&&(0==(a&255)?a=0:255!=(a&255)&&(cc.a16=B.__alpha16[a&255],a=((a>>24&255)*cc.a16>>16&255)<<24|((a>>16&255)*cc.a16>>16&
255)<<16|((a>>8&255)*cc.a16>>16&255)<<8|a&255));switch(d){case 2:b[c]=a>>24&255;b[c+1]=a>>16&255;b[c+2]=a>>8&255;b[c+3]=a&255;break;case 0:b[c]=a>>8&255;b[c+1]=a>>16&255;b[c+2]=a>>24&255;b[c+3]=a&255;break;case 1:b[c]=a&255,b[c+1]=a>>8&255,b[c+2]=a>>16&255,b[c+3]=a>>24&255}};cc.__fromARGB=function(a){return(a&255)<<24|(a>>8&255)<<16|(a>>16&255)<<8|a>>24&255};cc.__fromRGBA=function(a){return(a>>8&255)<<24|(a>>16&255)<<16|(a>>24&255)<<8|a&255};cc.get_a=function(a){return a&255};cc.set_a=function(a,
b){return b};cc.get_b=function(a){return a>>24&255};cc.set_b=function(a,b){return b};cc.get_g=function(a){return a>>16&255};cc.set_g=function(a,b){return b};cc.get_r=function(a){return a>>8&255};cc.set_r=function(a,b){return b};var B={};n["lime.math.color._RGBA.RGBA_Impl_"]=B;B.__name__=["lime","math","color","_RGBA","RGBA_Impl_"];B.__properties__={set_r:"set_r",get_r:"get_r",set_g:"set_g",get_g:"get_g",set_b:"set_b",get_b:"get_b",set_a:"set_a",get_a:"get_a"};B.__alpha16=null;B.__clamp=null;B.a16=
null;B.unmult=null;B._new=function(a){null==a&&(a=0);return a};B.create=function(a,b,c,d){return(a&255)<<24|(b&255)<<16|(c&255)<<8|d&255};B.multiplyAlpha=function(a){0!=(a&255)&&255!=(a&255)&&(B.a16=B.__alpha16[a&255])};B.readUInt8=function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=0);switch(d){case 2:a=(b[c+2]&255)<<24|(b[c+1]&255)<<16|(b[c]&255)<<8|b[c+3]&255;break;case 0:a=(b[c]&255)<<24|(b[c+1]&255)<<16|(b[c+2]&255)<<8|b[c+3]&255;break;case 1:a=(b[c+1]&255)<<24|(b[c+2]&255)<<16|(b[c+3]&255)<<8|b[c]&
255}e&&0!=(a&255)&&255!=(a&255)&&(B.unmult=255/(a&255),Math.round((a>>24&255)*B.unmult),Math.round((a>>16&255)*B.unmult),Math.round((a>>8&255)*B.unmult))};B.set=function(a,b,c,d,e){};B.unmultiplyAlpha=function(a){0!=(a&255)&&255!=(a&255)&&(B.unmult=255/(a&255),Math.round((a>>24&255)*B.unmult),Math.round((a>>16&255)*B.unmult),Math.round((a>>8&255)*B.unmult))};B.writeUInt8=function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=0);e&&(0==(a&255)?0!=a&&(a=0):255!=(a&255)&&(B.a16=B.__alpha16[a&255],a=((a>>24&
255)*B.a16>>16&255)<<24|((a>>16&255)*B.a16>>16&255)<<16|((a>>8&255)*B.a16>>16&255)<<8|a&255));switch(d){case 2:b[c]=a>>8&255;b[c+1]=a>>16&255;b[c+2]=a>>24&255;b[c+3]=a&255;break;case 0:b[c]=a>>24&255;b[c+1]=a>>16&255;b[c+2]=a>>8&255;b[c+3]=a&255;break;case 1:b[c]=a&255,b[c+1]=a>>24&255,b[c+2]=a>>16&255,b[c+3]=a>>8&255}};B.__fromARGB=function(a){return(a>>16&255)<<24|(a>>8&255)<<16|(a&255)<<8|a>>24&255};B.__fromBGRA=function(a){return(a>>8&255)<<24|(a>>16&255)<<16|(a>>24&255)<<8|a&255};B.get_a=function(a){return a&
255};B.set_a=function(a,b){return b};B.get_b=function(a){return a>>8&255};B.set_b=function(a,b){return b};B.get_g=function(a){return a>>16&255};B.set_g=function(a,b){return b};B.get_r=function(a){return a>>24&255};B.set_r=function(a,b){return b};var gg=function(){this.promise=new Jc};n["lime.net.HTTPRequest"]=gg;gg.__name__=["lime","net","HTTPRequest"];gg.prototype={load:function(a){var b=this;this.bytesTotal=this.bytesLoaded=0;var c=new XMLHttpRequest;c.addEventListener("progress",K(this,this.request_onProgress),
!1);c.onreadystatechange=function(){4==c.readyState&&(null!=c.status&&200<=c.status&&400>=c.status?(b.bytes=uc.ofData(c.response),b.promise.complete(b.bytes)):b.promise.error(c.status))};c.open("GET",a,!0);c.responseType="arraybuffer";c.send("");return this.promise.future},curl_onProgress:function(a,b,c,d){if(d>this.bytesLoaded||b>this.bytesLoaded||c>this.bytesTotal||a>this.bytesTotal)d>this.bytesLoaded&&(this.bytesLoaded=d|0),b>this.bytesLoaded&&(this.bytesLoaded=b|0),c>this.bytesTotal&&(this.bytesTotal=
c|0),a>this.bytesTotal&&(this.bytesTotal=a|0),this.promise.progress(this.bytesLoaded/this.bytesTotal);return 0},curl_onWrite:function(a,b,c){var d=this.bytes;this.bytes=uc.alloc(this.bytes.length+a.length);this.bytes.blit(0,d,0,d.length);this.bytes.blit(d.length,a,0,a.length);return b*c},request_onProgress:function(a){this.promise.progress(a.loaded/a.total)},__class__:gg};var $d={};n["lime.net.curl._CURL.CURL_Impl_"]=$d;$d.__name__=["lime","net","curl","_CURL","CURL_Impl_"];$d.getDate=function(a,
b){return 0};$d.globalCleanup=function(){};$d.globalInit=function(a){return 0};$d.version=function(){return null};$d.versionInfo=function(a){return null};$d.intGt=function(a,b){return a>b};var ae=function(){};n["lime.net.curl.CURLEasy"]=ae;ae.__name__=["lime","net","curl","CURLEasy"];ae.cleanup=function(a){};ae.duphandle=function(a){return 0};ae.escape=function(a,b,c){return null};ae.getinfo=function(a,b){return null};ae.init=function(){return 0};ae.pause=function(a,b){return 0};ae.perform=function(a){return 0};
ae.reset=function(a){};ae.setopt=function(a,b,c){return 0};ae.strerror=function(a){return null};ae.unescape=function(a,b,c,d){return null};ae.__writeCallback=function(a,b,c,d){return 0};var zg=function(){this.onProgress=new De;this.onError=new De;this.onComplete=new De;this.doWork=new De};n["lime.system.BackgroundWorker"]=zg;zg.__name__=["lime","system","BackgroundWorker"];zg.prototype={cancel:function(){this.canceled=!0},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))},sendProgress:function(a){this.canceled||this.onProgress.dispatch(a)},__doWork:function(){this.doWork.dispatch(this.__runMessage)},__update:function(a){},__class__:zg};var xd=function(){};n["lime.system.CFFI"]=xd;xd.__name__=["lime","system","CFFI"];xd.available=null;xd.enabled=null;xd.load=function(a,b,c,d){null==d&&(d=!1);null==c&&(c=0);return xd.enabled?null:O.makeVarArgs(function(a){return{}})};
xd.__findHaxelib=function(a){return""};xd.__loaderTrace=function(a){};xd.__sysName=function(){return null};xd.__tryLoad=function(a,b,c,d){return null};var Sa={};n["lime.system._CFFIPointer.CFFIPointer_Impl_"]=Sa;Sa.__name__=["lime","system","_CFFIPointer","CFFIPointer_Impl_"];Sa._new=function(a){return a};Sa.get=function(a){return 0};Sa.equals=function(a,b){return Sa.get(a)==b};Sa.equalsPointer=function(a,b){return Sa.get(a)==Sa.get(b)};Sa.greaterThan=function(a,b){return Sa.get(a)>b};Sa.greaterThanPointer=
function(a,b){return Sa.get(a)>Sa.get(b)};Sa.greaterThanOrEqual=function(a,b){return Sa.get(a)>=b};Sa.greaterThanOrEqualPointer=function(a,b){return Sa.get(a)>=Sa.get(b)};Sa.lessThan=function(a,b){return Sa.get(a)<b};Sa.lessThanPointer=function(a,b){return Sa.get(a)<Sa.get(b)};Sa.lessThanOrEqual=function(a,b){return Sa.get(a)<=b};Sa.lessThanOrEqualPointer=function(a,b){return Sa.get(a)<=Sa.get(b)};Sa.notEquals=function(a,b){return Sa.get(a)!=b};Sa.notEqualsPointer=function(a,b){return Sa.get(a)!=
Sa.get(b)};var Tf=function(){};n["lime.system.Clipboard"]=Tf;Tf.__name__=["lime","system","Clipboard"];Tf.__properties__={set_text:"set_text",get_text:"get_text"};Tf.get_text=function(){return null};Tf.set_text=function(a){return null};var Zl=function(){};n["lime.system.Display"]=Zl;Zl.__name__=["lime","system","Display"];Zl.prototype={__class__:Zl};var $l=function(a,b,c,d){this.width=a;this.height=b;this.refreshRate=c;this.pixelFormat=d};n["lime.system.DisplayMode"]=$l;$l.__name__=["lime","system",
"DisplayMode"];$l.prototype={__class__:$l};var Uf=n["lime.system.Endian"]={__ename__:["lime","system","Endian"],__constructs__:["LITTLE_ENDIAN","BIG_ENDIAN"]};Uf.LITTLE_ENDIAN=["LITTLE_ENDIAN",0];Uf.LITTLE_ENDIAN.toString=J;Uf.LITTLE_ENDIAN.__enum__=Uf;Uf.BIG_ENDIAN=["BIG_ENDIAN",1];Uf.BIG_ENDIAN.toString=J;Uf.BIG_ENDIAN.__enum__=Uf;var Tb=function(){};n["lime.system.System"]=Tb;Tb.__name__=["lime","system","System"];Tb.__properties__={get_userDirectory:"get_userDirectory",get_numDisplays:"get_numDisplays",
get_fontsDirectory:"get_fontsDirectory",get_endianness:"get_endianness",get_documentsDirectory:"get_documentsDirectory",get_desktopDirectory:"get_desktopDirectory",get_applicationStorageDirectory:"get_applicationStorageDirectory",get_applicationDirectory:"get_applicationDirectory",set_allowScreenTimeout:"set_allowScreenTimeout",get_allowScreenTimeout:"get_allowScreenTimeout"};Tb.applicationDirectory=null;Tb.applicationStorageDirectory=null;Tb.desktopDirectory=null;Tb.disableCFFI=null;Tb.documentsDirectory=
null;Tb.endianness=null;Tb.fontsDirectory=null;Tb.numDisplays=null;Tb.userDirectory=null;Tb.embed=ci.lime.embed=function(a,b,c,d,e){var f=null,f="string"==typeof a?window.document.getElementById(q.__cast(a,String)):null==a?window.document.createElement("div"):a;a=null;null!=d&&(d=Ca.replace(d,"#",""),a=-1<d.indexOf("0x")?u.parseInt(d):u.parseInt("0x"+d));null==b&&(b=0);null==c&&(c=0);Qb.config.windows[0].background=a;Qb.config.windows[0].element=f;Qb.config.windows[0].width=b;Qb.config.windows[0].height=
c;Qb.config.assetsPrefix=e;Qb.create()};Tb.exit=function(a){};Tb.getDisplay=function(a){return 0==a?(a=new Zl,a.id=0,a.name="Generic Display",a.dpi=96,a.currentMode=new $l(window.screen.width,window.screen.height,60,1),a.supportedModes=[a.currentMode],a.bounds=new tc(0,0,a.currentMode.width,a.currentMode.height),a):null};Tb.getTimer=function(){return(new Date).getTime()};Tb.load=function(a,b,c,d){null==d&&(d=!1);null==c&&(c=0);return xd.load(a,b,c,d)};Tb.get_allowScreenTimeout=function(){return!0};
Tb.set_allowScreenTimeout=function(a){return!0};Tb.get_applicationDirectory=function(){return null};Tb.get_applicationStorageDirectory=function(){return null};Tb.get_desktopDirectory=function(){return null};Tb.get_documentsDirectory=function(){return null};Tb.get_fontsDirectory=function(){return null};Tb.get_numDisplays=function(){return 1};Tb.get_userDirectory=function(){return null};Tb.get_endianness=function(){return Uf.LITTLE_ENDIAN};var Sl=function(a,b){null==b&&(b=1);null==a&&(a=0);this.onProgress=
new De;this.onError=new De;this.onComplete=new De;this.doWork=new De;this.minThreads=a;this.maxThreads=b;this.currentThreads=0};n["lime.system.ThreadPool"]=Sl;Sl.__name__=["lime","system","ThreadPool"];Sl.prototype={queue:function(a){this.doWork.dispatch(a)},sendComplete:function(a){this.onComplete.dispatch(a)},sendError:function(a){this.onError.dispatch(a)},sendProgress:function(a){this.onProgress.dispatch(a)},__class__:Sl};var Wc=n["lime.system._ThreadPool.ThreadPoolMessageType"]={__ename__:["lime",
"system","_ThreadPool","ThreadPoolMessageType"],__constructs__:["COMPLETE","ERROR","EXIT","PROGRESS","WORK"]};Wc.COMPLETE=["COMPLETE",0];Wc.COMPLETE.toString=J;Wc.COMPLETE.__enum__=Wc;Wc.ERROR=["ERROR",1];Wc.ERROR.toString=J;Wc.ERROR.__enum__=Wc;Wc.EXIT=["EXIT",2];Wc.EXIT.toString=J;Wc.EXIT.__enum__=Wc;Wc.PROGRESS=["PROGRESS",3];Wc.PROGRESS.toString=J;Wc.PROGRESS.__enum__=Wc;Wc.WORK=["WORK",4];Wc.WORK.toString=J;Wc.WORK.__enum__=Wc;var on=function(a,b){this.type=a;this.state=b};n["lime.system._ThreadPool.ThreadPoolMessage"]=
on;on.__name__=["lime","system","_ThreadPool","ThreadPoolMessage"];on.prototype={__class__:on};var ie=function(a){null!=a&&(this.name=a);null!=this.__fontPath&&this.__fromFile(this.__fontPath)};n["lime.text.Font"]=ie;ie.__name__=["lime","text","Font"];ie.fromBytes=function(a){var b=new ie;b.__fromBytes(a);return b};ie.fromFile=function(a){var b=new ie;b.__fromFile(a);return b};ie.prototype={decompose:function(){return null},getGlyph:function(a){return-1},getGlyphs:function(a){return null},getGlyphMetrics:function(a){return null},
renderGlyph:function(a,b){return null},renderGlyphs:function(a,b){return null},__fromBytes:function(a){this.__fontPath=null},__fromFile:function(a){this.__fontPath=a},__setSize:function(a){},get_ascender:function(){return 0},get_descender:function(){return 0},get_height:function(){return 0},get_numGlyphs:function(){return 0},get_underlinePosition:function(){return 0},get_underlineThickness:function(){return 0},get_unitsPerEM:function(){return 0},__class__:ie,__properties__:{get_unitsPerEM:"get_unitsPerEM",
get_underlineThickness:"get_underlineThickness",get_underlinePosition:"get_underlinePosition",get_numGlyphs:"get_numGlyphs",get_height:"get_height",get_descender:"get_descender",get_ascender:"get_ascender"}};var In={};n["lime.text._Glyph.Glyph_Impl_"]=In;In.__name__=["lime","text","_Glyph","Glyph_Impl_"];In._new=function(a){return a};var pn=function(){};n["lime.text.GlyphMetrics"]=pn;pn.__name__=["lime","text","GlyphMetrics"];pn.prototype={__class__:pn};var qn=function(a,b,c){this.glyph=a;this.advance=
b;this.offset=null!=c?c:new yc};n["lime.text.GlyphPosition"]=qn;qn.__name__=["lime","text","GlyphPosition"];qn.prototype={__class__:qn};var be={};n["lime.text._TextDirection.TextDirection_Impl_"]=be;be.__name__=["lime","text","_TextDirection","TextDirection_Impl_"];be.__properties__={get_vertical:"get_vertical",get_horizontal:"get_horizontal",get_forward:"get_forward",get_backward:"get_backward"};be.reverse=function(a){};be.toString=function(a){switch(a){case 4:return"leftToRight";case 5:return"rightToLeft";
case 6:return"topToBottom";case 7:return"bottomToTop";default:return""}};be.get_backward=function(a){return 5==(a&-3)};be.get_forward=function(a){return 4==(a&-3)};be.get_horizontal=function(a){return 4==(a&-2)};be.get_vertical=function(a){return 6==(a&-2)};var rn=function(a,b,c,d,e,f){null==f&&(f="en");null==e&&(e="Zyyy");null==d&&(d=4);null==c&&(c=12);null==a&&(a="");this.set_text(a);this.set_font(b);this.set_size(c);this.__direction=d;this.__script=e;this.__language=f;this.positions=[];this.__dirty=
!0};n["lime.text.TextLayout"]=rn;rn.__name__=["lime","text","TextLayout"];rn.prototype={__position:function(){this.positions=[]},get_positions:function(){this.__dirty&&(this.__dirty=!1,this.__position());return this.positions},get_direction:function(){return this.__direction},set_direction:function(a){if(a==this.__direction)return a;this.__direction=a;this.__dirty=!0;return a},set_font:function(a){if(a==this.font)return a;this.font=a;this.__dirty=!0;return a},get_glyphs:function(){for(var a=[],b=
0,c=this.get_positions();b<c.length;){var d=c[b];++b;a.push(d.glyph)}return a},get_language:function(){return this.__language},set_language:function(a){if(a==this.__language)return a;this.__language=a;this.__dirty=!0;return a},get_script:function(){return this.__script},set_script:function(a){if(a==this.__script)return a;this.__script=a;this.__dirty=!0;return a},set_size:function(a){if(a==this.size)return a;this.size=a;this.__dirty=!0;return a},set_text:function(a){if(a==this.text)return a;this.text=
a;this.__dirty=!0;return a},__class__:rn,__properties__:{set_text:"set_text",set_size:"set_size",set_script:"set_script",get_script:"get_script",get_positions:"get_positions",set_language:"set_language",get_language:"get_language",get_glyphs:"get_glyphs",set_font:"set_font",set_direction:"set_direction",get_direction:"get_direction"}};var U={};n["lime.text._TextScript.TextScript_Impl_"]=U;U.__name__=["lime","text","_TextScript","TextScript_Impl_"];U.__properties__={get_rightToLeft:"get_rightToLeft"};
U.get_rightToLeft=function(a){switch(a){case "Hebr":case "Arab":case "Syrc":case "Thaa":case "Nkoo":case "Samr":case "Mand":case "Armi":case "Phnx":case "Lydi":case "Cprt":case "Khar":case "Sarb":case "Avst":case "Phli":case "Phlp":case "Orkh":return!0;default:return!1}};var Mc=function(a){this.onDisconnect=new rc;this.onButtonUp=new lj;this.onButtonDown=new lj;this.onAxisMove=new Pl;this.id=a;this.connected=!0};n["lime.ui.Gamepad"]=Mc;Mc.__name__=["lime","ui","Gamepad"];Mc.addMappings=function(a){};
Mc.__connect=function(a){if(!Mc.devices.h.hasOwnProperty(a)){var b=new Mc(a);Mc.devices.h[a]=b;Mc.onConnect.dispatch(b)}};Mc.__disconnect=function(a){var b=Mc.devices.h[a];null!=b&&(b.connected=!1);Mc.devices.remove(a);null!=b&&b.onDisconnect.dispatch()};Mc.prototype={get_guid:function(){return ic.__getDeviceData()[this.id].id},get_name:function(){return ic.__getDeviceData()[this.id].id},__class__:Mc,__properties__:{get_name:"get_name",get_guid:"get_guid"}};var Vf={};n["lime.ui._GamepadAxis.GamepadAxis_Impl_"]=
Vf;Vf.__name__=["lime","ui","_GamepadAxis","GamepadAxis_Impl_"];Vf.toString=function(a){switch(a){case 0:return"LEFT_X";case 1:return"LEFT_Y";case 2:return"RIGHT_X";case 3:return"RIGHT_Y";case 4:return"TRIGGER_LEFT";case 5:return"TRIGGER_RIGHT";default:return"UNKNOWN ("+a+")"}};var od={};n["lime.ui._GamepadButton.GamepadButton_Impl_"]=od;od.__name__=["lime","ui","_GamepadButton","GamepadButton_Impl_"];od.toString=function(a){switch(a){case 0:return"A";case 1:return"B";case 2:return"X";case 3:return"Y";
case 4:return"BACK";case 5:return"GUIDE";case 6:return"START";case 7:return"LEFT_STICK";case 8:return"RIGHT_STICK";case 9:return"LEFT_SHOULDER";case 10:return"RIGHT_SHOULDER";case 11:return"DPAD_UP";case 12:return"DPAD_DOWN";case 13:return"DPAD_LEFT";case 14:return"DPAD_RIGHT";default:return"UNKNOWN ("+a+")"}};var ic=function(a){this.onTrackballMove=new ij;this.onHatMove=new Ml;this.onDisconnect=new rc;this.onButtonUp=new Qf;this.onButtonDown=new Qf;this.onAxisMove=new ij;this.id=a;this.connected=
!0};n["lime.ui.Joystick"]=ic;ic.__name__=["lime","ui","Joystick"];ic.__connect=function(a){if(!ic.devices.h.hasOwnProperty(a)){var b=new ic(a);ic.devices.h[a]=b;ic.onConnect.dispatch(b)}};ic.__disconnect=function(a){var b=ic.devices.h[a];null!=b&&(b.connected=!1);ic.devices.remove(a);null!=b&&b.onDisconnect.dispatch()};ic.__getDeviceData=function(){return navigator.getGamepads?navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads():null};ic.prototype={get_guid:function(){return ic.__getDeviceData()[this.id].id},
get_name:function(){return ic.__getDeviceData()[this.id].id},get_numAxes:function(){return ic.__getDeviceData()[this.id].axes.length},get_numButtons:function(){return ic.__getDeviceData()[this.id].buttons.length},get_numHats:function(){return 0},get_numTrackballs:function(){return 0},__class__:ic,__properties__:{get_numTrackballs:"get_numTrackballs",get_numHats:"get_numHats",get_numButtons:"get_numButtons",get_numAxes:"get_numAxes",get_name:"get_name",get_guid:"get_guid"}};var Dc={};n["lime.ui._JoystickHatPosition.JoystickHatPosition_Impl_"]=
Dc;Dc.__name__=["lime","ui","_JoystickHatPosition","JoystickHatPosition_Impl_"];Dc.__properties__={set_up:"set_up",get_up:"get_up",set_right:"set_right",get_right:"get_right",set_left:"set_left",get_left:"get_left",set_down:"set_down",get_down:"get_down",set_center:"set_center",get_center:"get_center"};Dc._new=function(a){return a};Dc.get_center=function(a){return 0==a};Dc.set_center=function(a,b){return b};Dc.get_down=function(a){return 0<(a&4)};Dc.set_down=function(a,b){return b};Dc.get_left=function(a){return 0<
(a&8)};Dc.set_left=function(a,b){return b};Dc.get_right=function(a){return 0<(a&2)};Dc.set_right=function(a,b){return b};Dc.get_up=function(a){return 0<(a&1)};Dc.set_up=function(a,b){return b};var C={};n["lime.ui._KeyCode.KeyCode_Impl_"]=C;C.__name__=["lime","ui","_KeyCode","KeyCode_Impl_"];C.gt=function(a,b){return a>b};C.gte=function(a,b){return a>=b};C.lt=function(a,b){return a<b};C.lte=function(a,b){return a<=b};C.plus=function(a,b){return a+b};var db={};n["lime.ui._KeyModifier.KeyModifier_Impl_"]=
db;db.__name__=["lime","ui","_KeyModifier","KeyModifier_Impl_"];db.__properties__={set_shiftKey:"set_shiftKey",get_shiftKey:"get_shiftKey",set_numLock:"set_numLock",get_numLock:"get_numLock",set_metaKey:"set_metaKey",get_metaKey:"get_metaKey",set_ctrlKey:"set_ctrlKey",get_ctrlKey:"get_ctrlKey",set_capsLock:"set_capsLock",get_capsLock:"get_capsLock",set_altKey:"set_altKey",get_altKey:"get_altKey"};db.get_altKey=function(a){return 0<(a&256)||0<(a&512)};db.set_altKey=function(a,b){return b};db.get_capsLock=
function(a){return 0<(a&8192)||0<(a&8192)};db.set_capsLock=function(a,b){return b};db.get_ctrlKey=function(a){return 0<(a&64)||0<(a&128)};db.set_ctrlKey=function(a,b){return b};db.get_metaKey=function(a){return 0<(a&1024)||0<(a&2048)};db.set_metaKey=function(a,b){return b};db.get_numLock=function(a){return 0<(a&4096)||0<(a&4096)};db.set_numLock=function(a,b){return b};db.get_shiftKey=function(a){return 0<(a&1)||0<(a&2)};db.set_shiftKey=function(a,b){return b};var ce=function(){};n["lime.ui.Mouse"]=
ce;ce.__name__=["lime","ui","Mouse"];ce.__properties__={set_lock:"set_lock",get_lock:"get_lock",set_cursor:"set_cursor",get_cursor:"get_cursor"};ce.hide=function(){Sb.hide()};ce.show=function(){Sb.show()};ce.warp=function(a,b,c){Sb.warp(a,b,c)};ce.get_cursor=function(){return Sb.get_cursor()};ce.set_cursor=function(a){return Sb.set_cursor(a)};ce.get_lock=function(){return Sb.get_lock()};ce.set_lock=function(a){return Sb.set_lock(a)};var Ha=n["lime.ui.MouseCursor"]={__ename__:["lime","ui","MouseCursor"],
__constructs__:"ARROW CROSSHAIR DEFAULT MOVE POINTER RESIZE_NESW RESIZE_NS RESIZE_NWSE RESIZE_WE TEXT WAIT WAIT_ARROW CUSTOM".split(" ")};Ha.ARROW=["ARROW",0];Ha.ARROW.toString=J;Ha.ARROW.__enum__=Ha;Ha.CROSSHAIR=["CROSSHAIR",1];Ha.CROSSHAIR.toString=J;Ha.CROSSHAIR.__enum__=Ha;Ha.DEFAULT=["DEFAULT",2];Ha.DEFAULT.toString=J;Ha.DEFAULT.__enum__=Ha;Ha.MOVE=["MOVE",3];Ha.MOVE.toString=J;Ha.MOVE.__enum__=Ha;Ha.POINTER=["POINTER",4];Ha.POINTER.toString=J;Ha.POINTER.__enum__=Ha;Ha.RESIZE_NESW=["RESIZE_NESW",
5];Ha.RESIZE_NESW.toString=J;Ha.RESIZE_NESW.__enum__=Ha;Ha.RESIZE_NS=["RESIZE_NS",6];Ha.RESIZE_NS.toString=J;Ha.RESIZE_NS.__enum__=Ha;Ha.RESIZE_NWSE=["RESIZE_NWSE",7];Ha.RESIZE_NWSE.toString=J;Ha.RESIZE_NWSE.__enum__=Ha;Ha.RESIZE_WE=["RESIZE_WE",8];Ha.RESIZE_WE.toString=J;Ha.RESIZE_WE.__enum__=Ha;Ha.TEXT=["TEXT",9];Ha.TEXT.toString=J;Ha.TEXT.__enum__=Ha;Ha.WAIT=["WAIT",10];Ha.WAIT.toString=J;Ha.WAIT.__enum__=Ha;Ha.WAIT_ARROW=["WAIT_ARROW",11];Ha.WAIT_ARROW.toString=J;Ha.WAIT_ARROW.__enum__=Ha;Ha.CUSTOM=
["CUSTOM",12];Ha.CUSTOM.toString=J;Ha.CUSTOM.__enum__=Ha;var Zd=function(a,b,c,d,e,f,g){this.x=a;this.y=b;this.id=c;this.dx=d;this.dy=e;this.pressure=f;this.device=g};n["lime.ui.Touch"]=Zd;Zd.__name__=["lime","ui","Touch"];Zd.prototype={__class__:Zd};var Rf=function(a){this.onTextInput=new kj;this.onTextEdit=new Nl;this.onRestore=new rc;this.onResize=new jj;this.onMove=new yg;this.onMouseWheel=new yg;this.onMouseUp=new hj;this.onMouseMoveRelative=new yg;this.onMouseMove=new yg;this.onMouseDown=new hj;
this.onMinimize=new rc;this.onLeave=new rc;this.onKeyUp=new mj;this.onKeyDown=new mj;this.onFullscreen=new rc;this.onFocusOut=new rc;this.onFocusIn=new rc;this.onEnter=new rc;this.onDropFile=new kj;this.onDeactivate=new rc;this.onCreate=new rc;this.onClose=new rc;this.onActivate=new rc;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,"borderless")&&(this.__borderless=a.borderless),Object.prototype.hasOwnProperty.call(a,"resizable")&&(this.__resizable=a.resizable),Object.prototype.hasOwnProperty.call(a,"title")&&(this.__title=a.title));this.backend=new ib(this)};
n["lime.ui.Window"]=Rf;Rf.__name__=["lime","ui","Window"];Rf.prototype={alert:function(a,b){this.backend.alert(a,b)},close:function(){this.backend.close()},create:function(a){this.application=a;this.backend.create(a);null!=this.renderer&&this.renderer.create()},focus:function(){this.backend.focus()},move:function(a,b){this.backend.move(a,b);this.__x=a;this.__y=b},resize:function(a,b){this.backend.resize(a,b);this.__width=a;this.__height=b},setIcon:function(a){null!=a&&this.backend.setIcon(a)},toString:function(){return"[object Window]"},
get_display:function(){return this.backend.getDisplay()},get_borderless:function(){return this.__borderless},set_borderless:function(a){return this.__borderless=this.backend.setBorderless(a)},get_enableTextEvents:function(){return this.backend.getEnableTextEvents()},set_enableTextEvents:function(a){return this.backend.setEnableTextEvents(a)},get_fullscreen:function(){return this.__fullscreen},set_fullscreen:function(a){return this.__fullscreen=this.backend.setFullscreen(a)},get_height:function(){return this.__height},
set_height:function(a){this.resize(this.__width,a);return this.__height},get_maximized:function(){return this.__maximized},set_maximized:function(a){this.__minimized=!1;return this.__maximized=this.backend.setMaximized(a)},get_minimized:function(){return this.__minimized},set_minimized:function(a){this.__maximized=!1;return this.__minimized=this.backend.setMinimized(a)},get_resizable:function(){return this.__resizable},set_resizable:function(a){return this.__resizable=this.backend.setResizable(a)},
get_scale:function(){return this.__scale},get_title:function(){return this.__title},set_title:function(a){return this.__title=this.backend.setTitle(this.__title)},get_width:function(){return this.__width},set_width:function(a){this.resize(a,this.__height);return this.__width},get_x:function(){return this.__x},set_x:function(a){this.move(a,this.__y);return this.__x},get_y:function(){return this.__y},set_y:function(a){this.move(this.__x,a);return this.__y},__class__:Rf,__properties__:{set_y:"set_y",
get_y:"get_y",set_x:"set_x",get_x:"get_x",set_width:"set_width",get_width:"get_width",set_title:"set_title",get_title:"get_title",get_scale:"get_scale",set_resizable:"set_resizable",get_resizable:"get_resizable",set_minimized:"set_minimized",get_minimized:"get_minimized",set_maximized:"set_maximized",get_maximized:"get_maximized",set_height:"set_height",get_height:"get_height",set_fullscreen:"set_fullscreen",get_fullscreen:"get_fullscreen",set_enableTextEvents:"set_enableTextEvents",get_enableTextEvents:"get_enableTextEvents",
get_display:"get_display",set_borderless:"set_borderless",get_borderless:"get_borderless"}};var sn=n["lime.utils.TAError"]={__ename__:["lime","utils","TAError"],__constructs__:["RangeError"]};sn.RangeError=["RangeError",0];sn.RangeError.toString=J;sn.RangeError.__enum__=sn;var uc=function(a,b){Ya.call(this,b)};n["lime.utils.Bytes"]=uc;uc.__name__=["lime","utils","Bytes"];uc.alloc=function(a){a=Ya.alloc(a);return new uc(a.length,a.b.bufferValue)};uc.fastGet=function(a,b){return a.bytes[b]};uc.ofData=
function(a){a=Ya.ofData(a);return new uc(a.length,a.b.bufferValue)};uc.ofString=function(a){a=Ya.ofString(a);return new uc(a.length,a.b.bufferValue)};uc.readFile=function(a){return null};uc.lime_bytes_from_data_pointer=function(a,b){return uc.cffi_lime_bytes_from_data_pointer(a,b)};uc.lime_bytes_get_data_pointer=function(a){return uc.cffi_lime_bytes_get_data_pointer(a)};uc.lime_bytes_read_file=function(a){return uc.cffi_lime_bytes_read_file(a)};uc.__super__=Ya;uc.prototype=L(Ya.prototype,{__class__:uc});
var Ag={};n["lime.utils._Float32Array.Float32Array_Impl_"]=Ag;Ag.__name__=["lime","utils","_Float32Array","Float32Array_Impl_"];Ag.__set=function(a,b,c){return a[b]=c};Ag.__get=function(a,b){return a[b]};Ag.fromBytes=function(a,b,c){null==b&&(b=0);return null==b?new Float32Array(a.b.bufferValue):null==c?new Float32Array(a.b.bufferValue,b):new Float32Array(a.b.bufferValue,b,c)};Ag.toBytes=function(a){return new Ya(new nc(a.buffer))};Ag.toString=function(a){return null!=a?"Float32Array [byteLength:"+
a.byteLength+", length:"+a.length+"]":null};var pj=function(){};n["lime.utils.GLUtils"]=pj;pj.__name__=["lime","utils","GLUtils"];pj.compileShader=function(a,b){var c=m.context.createShader(b);m.context.shaderSource(c,a);m.context.compileShader(c);if(0==m.context.getShaderParameter(c,35713))switch(b){case 35633:throw new F("Error compiling vertex shader");case 35632:throw new F("Error compiling fragment shader");default:throw new F("Error compiling unknown shader type");}return c};pj.createProgram=
function(a,b){var c=pj.compileShader(a,35633),d=pj.compileShader(b,35632),e=m.context.createProgram();m.context.attachShader(e,c);m.context.attachShader(e,d);m.context.linkProgram(e);if(0==m.context.getProgramParameter(e,35714))throw new F("Unable to initialize the shader program.");return e};var Bg={};n["lime.utils._Int16Array.Int16Array_Impl_"]=Bg;Bg.__name__=["lime","utils","_Int16Array","Int16Array_Impl_"];Bg.__set=function(a,b,c){return a[b]=c};Bg.__get=function(a,b){return a[b]};Bg.fromBytes=
function(a,b,c){null==b&&(b=0);return null==b?new Int16Array(a.b.bufferValue):null==c?new Int16Array(a.b.bufferValue,b):new Int16Array(a.b.bufferValue,b,c)};Bg.toBytes=function(a){return new Ya(new nc(a.buffer))};Bg.toString=function(a){return null!=a?"Int16Array [byteLength:"+a.byteLength+", length:"+a.length+"]":null};var Cg={};n["lime.utils._Int32Array.Int32Array_Impl_"]=Cg;Cg.__name__=["lime","utils","_Int32Array","Int32Array_Impl_"];Cg.__set=function(a,b,c){return a[b]=c};Cg.__get=function(a,
b){return a[b]};Cg.fromBytes=function(a,b,c){null==b&&(b=0);return null==b?new Int32Array(a.b.bufferValue):null==c?new Int32Array(a.b.bufferValue,b):new Int32Array(a.b.bufferValue,b,c)};Cg.toBytes=function(a){return new Ya(new nc(a.buffer))};Cg.toString=function(a){return null!=a?"Int32Array [byteLength:"+a.byteLength+", length:"+a.length+"]":null};var tn=function(){};n["lime.utils.LZMA"]=tn;tn.__name__=["lime","utils","LZMA"];tn.decode=function(a){return null};tn.encode=function(a){return null};
var Dg={};n["lime.utils._UInt16Array.UInt16Array_Impl_"]=Dg;Dg.__name__=["lime","utils","_UInt16Array","UInt16Array_Impl_"];Dg.__set=function(a,b,c){return a[b]=c};Dg.__get=function(a,b){return a[b]};Dg.fromBytes=function(a,b,c){null==b&&(b=0);return null==b?new Uint16Array(a.b.bufferValue):null==c?new Uint16Array(a.b.bufferValue,b):new Uint16Array(a.b.bufferValue,b,c)};Dg.toBytes=function(a){return new Ya(new nc(a.buffer))};Dg.toString=function(a){return null!=a?"UInt16Array [byteLength:"+a.byteLength+
", length:"+a.length+"]":null};var Eg={};n["lime.utils._UInt32Array.UInt32Array_Impl_"]=Eg;Eg.__name__=["lime","utils","_UInt32Array","UInt32Array_Impl_"];Eg.__set=function(a,b,c){return a[b]=c};Eg.__get=function(a,b){return a[b]};Eg.fromBytes=function(a,b,c){null==b&&(b=0);return null==b?new Uint32Array(a.b.bufferValue):null==c?new Uint32Array(a.b.bufferValue,b):new Uint32Array(a.b.bufferValue,b,c)};Eg.toBytes=function(a){return new Ya(new nc(a.buffer))};Eg.toString=function(a){return null!=a?"UInt32Array [byteLength:"+
a.byteLength+", length:"+a.length+"]":null};var Fg={};n["lime.utils._UInt8Array.UInt8Array_Impl_"]=Fg;Fg.__name__=["lime","utils","_UInt8Array","UInt8Array_Impl_"];Fg.__set=function(a,b,c){return a[b]=c};Fg.__get=function(a,b){return a[b]};Fg.fromBytes=function(a,b,c){return null==b?new nc(a.b.bufferValue):null==c?new nc(a.b.bufferValue,b):new nc(a.b.bufferValue,b,c)};Fg.toBytes=function(a){return new Ya(new nc(a.buffer))};Fg.toString=function(a){return null!=a?"UInt8Array [byteLength:"+a.byteLength+
", length:"+a.length+"]":null};var Gg=function(){};n["motion.actuators.IGenericActuator"]=Gg;Gg.__name__=["motion","actuators","IGenericActuator"];Gg.prototype={__class__:Gg};var sf=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=ea.defaultEase};n["motion.actuators.GenericActuator"]=sf;sf.__name__=["motion","actuators","GenericActuator"];sf.__interfaces__=
[Gg];sf.prototype={apply:function(){for(var a=0,b=O.fields(this.properties);a<b.length;){var c=b[a];++a;Object.prototype.hasOwnProperty.call(this.target,c)?O.setField(this.target,c,O.field(this.properties,c)):O.setProperty(this.target,c,O.field(this.properties,c))}},autoVisible:function(a){null==a&&(a=!0);this._autoVisible=a;return this},callMethod:function(a,b){null==b&&(b=[]);return O.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));ea.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__:sf};var rb=function(a,b,c){this.active=!0;this.propertyDetails=[];this.toggleVisible=this.setVisible=this.initialized=this.cacheVisible=this.paused=this.sendChange=!1;this.startTime=ka.getTimer()/
1E3;sf.call(this,a,b,c);rb.addedEvent||(rb.addedEvent=!0,ka.current.stage.addEventListener("enterFrame",rb.stage_onEnterFrame))};n["motion.actuators.SimpleActuator"]=rb;rb.__name__=["motion","actuators","SimpleActuator"];rb.stage_onEnterFrame=function(a){a=ka.getTimer()/1E3;for(var b,c=0,d=0,e=rb.actuatorsLength;d<e;)d++,b=rb.actuators[c],null!=b&&b.active?(a>=b.timeOffset&&b.update(a),c++):(rb.actuators.splice(c,1),--rb.actuatorsLength)};rb.__super__=sf;rb.prototype=L(sf.prototype,{setField_openfl_geom_Transform:function(a,
b,c){Object.prototype.hasOwnProperty.call(a,b)?a[b]=c:O.setProperty(a,b,c)},setField_motion_actuators_TransformActuator_T:function(a,b,c){Object.prototype.hasOwnProperty.call(a,b)?a[b]=c:O.setProperty(a,b,c)},setField_motion_actuators_MotionPathActuator_T:function(a,b,c){Object.prototype.hasOwnProperty.call(a,b)?a[b]=c:O.setProperty(a,b,c)},setField_openfl_display_DisplayObject:function(a,b,c){Object.prototype.hasOwnProperty.call(a,b)?a[b]=c:O.setProperty(a,b,c)},setField_motion_actuators_SimpleActuator_T:function(a,
b,c){Object.prototype.hasOwnProperty.call(a,b)?a[b]=c:O.setProperty(a,b,c)},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)?O.field(a,b):O.getProperty(a,b)},initialize:function(){for(var a,
b=0,c=O.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=O.getProperty(this.target,d)):a=O.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 re(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")&&q.__instanceof(this.target,wa))&&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;rb.actuators.push(this);++rb.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,sf.prototype.pause.call(this),this.pauseTime=ka.getTimer())},resume:function(){this.paused&&(this.paused=!1,this.timeOffset+=(ka.getTimer()-this.pauseTime)/1E3,sf.prototype.resume.call(this))},setProperty:function(a,b){a.isField?a.target[a.propertyName]=b:O.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=O.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,g=this.detailsLength;f<g;)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:O.setProperty(b.target,b.propertyName,e)}else for(c=this._ease.calculate(d),f=0,g=this.detailsLength;f<g;)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__:rb});var Eh=function(){};n["motion.easing.Expo"]=Eh;Eh.__name__=["motion","easing","Expo"];Eh.__properties__={get_easeOut:"get_easeOut",get_easeInOut:"get_easeInOut",get_easeIn:"get_easeIn"};Eh.get_easeIn=function(){return new qj};
Eh.get_easeInOut=function(){return new rj};Eh.get_easeOut=function(){return new sj};var dc=function(){};n["motion.easing.IEasing"]=dc;dc.__name__=["motion","easing","IEasing"];dc.prototype={__class__:dc};var sj=function(){};n["motion.easing.ExpoEaseOut"]=sj;sj.__name__=["motion","easing","ExpoEaseOut"];sj.__interfaces__=[dc];sj.prototype={calculate:function(a){return 1==a?1:1-Math.pow(2,-10*a)},ease:function(a,b,c,d){return a==d?b+c:c*(1-Math.pow(2,-10*a/d))+b},__class__:sj};var ea=function(){};n["motion.Actuate"]=
ea;ea.__name__=["motion","Actuate"];ea.apply=function(a,b,c){ea.stop(a,b);null==c&&(c=ea.defaultActuator);a=ua.createInstance(c,[a,0,b]);a.apply();return a};ea.effects=function(a,b,c){null==c&&(c=!0);return new am(a,b,c)};ea.getLibrary=function(a,b){null==b&&(b=!0);null==ea.targetLibraries.h.__keys__[a.__id__]&&b&&ea.targetLibraries.set(a,[]);return ea.targetLibraries.h[a.__id__]};ea.isActive=function(){for(var a=!1,b=ea.targetLibraries.iterator();b.hasNext();){b.next();a=!0;break}return a};ea.motionPath=
function(a,b,c,d){null==d&&(d=!0);return ea.tween(a,b,c,d,tj)};ea.pause=function(a){if(q.__instanceof(a,Gg))a.pause();else if(a=ea.getLibrary(a,!1),null!=a)for(var b=0;b<a.length;){var c=a[b];++b;c.pause()}};ea.pauseAll=function(){for(var a=ea.targetLibraries.iterator();a.hasNext();)for(var b=a.next(),c=0;c<b.length;){var d=b[c];++c;d.pause()}};ea.reset=function(){for(var a=ea.targetLibraries.iterator();a.hasNext();)for(var b=a.next(),c=b.length-1;0<=c;)b[c].stop(null,!1,!1),c--;ea.targetLibraries=
new rd};ea.resume=function(a){if(q.__instanceof(a,Gg))a.resume();else if(a=ea.getLibrary(a,!1),null!=a)for(var b=0;b<a.length;){var c=a[b];++b;c.resume()}};ea.resumeAll=function(){for(var a=ea.targetLibraries.iterator();a.hasNext();)for(var b=a.next(),c=0;c<b.length;){var d=b[c];++c;d.resume()}};ea.stop=function(a,b,c,d){null==d&&(d=!0);null==c&&(c=!1);if(null!=a)if(q.__instanceof(a,Gg))a.stop(null,c,d);else if(a=ea.getLibrary(a,!1),null!=a){if("string"==typeof b){var e={};O.setField(e,b,null);b=
e}else if(b instanceof Array&&null==b.__enum__){var e={},f=0;for(b=q.__cast(b,Array);f<b.length;){var g=b[f];++f;O.setField(e,g,null)}b=e}for(e=a.length-1;0<=e;)a[e].stop(b,c,d),e--}};ea.timer=function(a,b){return ea.tween(new uj(0),a,new uj(1),!1,b)};ea.transform=function(a,b,c){null==c&&(c=!0);null==b&&(b=0);return new bm(a,b,c)};ea.tween=function(a,b,c,d,e){null==d&&(d=!0);if(null!=a){if(0<b){null==e&&(e=ea.defaultActuator);a=ua.createInstance(e,[a,b,c]);b=ea.getLibrary(a.target);if(d){for(d=b.length-
1;0<=d;)b[d].stop(a.properties,!1,!1),d--;b=ea.getLibrary(a.target)}b.push(a);a.move();return a}return ea.apply(a,c,e)}return null};ea.unload=function(a){var b=a.target;null!=ea.targetLibraries.h.__keys__[b.__id__]&&(P.remove(ea.targetLibraries.h[b.__id__],a),0==ea.targetLibraries.h[b.__id__].length&&ea.targetLibraries.remove(b))};ea.update=function(a,b,c,d,e){null==e&&(e=!0);return ea.tween(a,b,{start:c,end:d},e,vj)};var am=function(a,b,c){this.target=a;this.duration=b;this.overwrite=c};n["motion._Actuate.EffectsOptions"]=
am;am.__name__=["motion","_Actuate","EffectsOptions"];am.prototype={filter:function(a,b){b.filter=a;return ea.tween(this.target,this.duration,b,this.overwrite,wj)},__class__:am};var bm=function(a,b,c){this.target=a;this.duration=b;this.overwrite=c};n["motion._Actuate.TransformOptions"]=bm;bm.__name__=["motion","_Actuate","TransformOptions"];bm.prototype={color:function(a,b,c){null==b&&(b=1);null==a&&(a=0);a={colorValue:a,colorStrength:b};null!=c&&(a.colorAlpha=c);return ea.tween(this.target,this.duration,
a,this.overwrite,Fh)},sound:function(a,b){var c={};null!=a&&(c.soundVolume=a);null!=b&&(c.soundPan=b);return ea.tween(this.target,this.duration,c,this.overwrite,Fh)},__class__:bm};var uj=function(a){this.progress=a};n["motion._Actuate.TweenTimer"]=uj;uj.__name__=["motion","_Actuate","TweenTimer"];uj.prototype={__class__:uj};var un=function(){this._x=new Gh;this._y=new Gh;this._rotation=null};n["motion.MotionPath"]=un;un.__name__=["motion","MotionPath"];un.prototype={bezier:function(a,b,c,d,e){null==
e&&(e=1);this._x.addPath(new Wf(a,c,e));this._y.addPath(new Wf(b,d,e));return this},line:function(a,b,c){null==c&&(c=1);this._x.addPath(new Hh(a,c));this._y.addPath(new Hh(b,c));return this},get_rotation:function(){null==this._rotation&&(this._rotation=new xj(this._x,this._y));return this._rotation},get_x:function(){return this._x},get_y:function(){return this._y},__class__:un,__properties__:{get_y:"get_y",get_x:"get_x",get_rotation:"get_rotation"}};var Xf=function(){};n["motion.IComponentPath"]=
Xf;Xf.__name__=["motion","IComponentPath"];Xf.prototype={__class__:Xf,__properties__:{get_end:"get_end"}};var Gh=function(){this.paths=[];this.totalStrength=this.start=0};n["motion.ComponentPath"]=Gh;Gh.__name__=["motion","ComponentPath"];Gh.__interfaces__=[Xf];Gh.prototype={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__:Gh,__properties__:{get_end:"get_end"}};var Wf=function(a,b,c){this.end=a;this.control=b;this.strength=c};n["motion.BezierPath"]=Wf;Wf.__name__=["motion","BezierPath"];Wf.prototype={calculate:function(a,b){return(1-b)*(1-b)*a+2*(1-b)*b*this.control+b*b*this.end},__class__:Wf};var Hh=function(a,b){Wf.call(this,
a,0,b)};n["motion.LinearPath"]=Hh;Hh.__name__=["motion","LinearPath"];Hh.__super__=Wf;Hh.prototype=L(Wf.prototype,{calculate:function(a,b){return a+b*(this.end-a)},__class__:Hh});var xj=function(a,b){this.step=.01;this._x=a;this._y=b;this.offset=0;this.start=this.calculate(0)};n["motion.RotationPath"]=xj;xj.__name__=["motion","RotationPath"];xj.__interfaces__=[Xf];xj.prototype={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__:xj,__properties__:{get_end:"get_end"}};var wj=function(a,b,c){this.filterIndex=-1;rb.call(this,a,b,c);if(q.__instanceof(c.filter,Fn))for(this.filterClass=c.filter,0==a.get_filters().length&&a.set_filters([ua.createInstance(this.filterClass,[])]),b=0,a=a.get_filters();b<a.length;)c=a[b],++b,q.__instanceof(c,this.filterClass)&&(this.filter=c);else this.filterIndex=c.filter,
this.filter=a.get_filters()[this.filterIndex]};n["motion.actuators.FilterActuator"]=wj;wj.__name__=["motion","actuators","FilterActuator"];wj.__super__=rb;wj.prototype=L(rb.prototype,{apply:function(){for(var a=0,b=O.fields(this.properties);a<b.length;){var c=b[a];++a;"filter"!=c&&O.setField(this.filter,c,O.field(this.properties,c))}a=this.getField(this.target,"filters");O.setField(a,this.properties.filter,this.filter);this.setField_openfl_display_DisplayObject(this.target,"filters",a)},initialize:function(){for(var a,
b=0,c=O.fields(this.properties);b<c.length;){var d=c[b];++b;"filter"!=d&&(a=this.getField(this.filter,d),a=new re(this.filter,d,a,O.field(this.properties,d)-a),this.propertyDetails.push(a))}this.detailsLength=this.propertyDetails.length;this.initialized=!0},update:function(a){rb.prototype.update.call(this,a);a=this.target.get_filters();if(-1<this.filterIndex)O.setField(a,this.properties.filter,this.filter);else for(var b=0,c=a.length;b<c;){var d=b++;q.__instanceof(a[d],this.filterClass)&&(a[d]=this.filter)}this.setField_openfl_display_DisplayObject(this.target,
"filters",a)},__class__:wj});var vj=function(a,b,c){this.currentParameters=[];this.tweenProperties={};rb.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])};n["motion.actuators.MethodActuator"]=vj;vj.__name__=["motion","actuators","MethodActuator"];vj.__super__=rb;
vj.prototype=L(rb.prototype,{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]=O.field(this.tweenProperties,"param"+d)}this.callMethod(this.target,this.currentParameters);rb.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 re(this.tweenProperties,a,b,this.properties.end[e]-b),this.propertyDetails.push(a)}this.detailsLength=this.propertyDetails.length;this.initialized=!0},update:function(a){rb.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]=O.field(this.tweenProperties,"param"+c)}this.callMethod(this.target,this.currentParameters)}},__class__:vj});var tj=function(a,b,c){rb.call(this,a,b,c)};n["motion.actuators.MotionPathActuator"]=
tj;tj.__name__=["motion","actuators","MotionPathActuator"];tj.__super__=rb;tj.prototype=L(rb.prototype,{apply:function(){for(var a=0,b=O.fields(this.properties);a<b.length;){var c=b[a];++a;Object.prototype.hasOwnProperty.call(this.target,c)?O.setField(this.target,c,q.__cast(O.field(this.properties,c),Xf).get_end()):O.setProperty(this.target,c,q.__cast(O.field(this.properties,c),Xf).get_end())}},initialize:function(){for(var a,b=0,c=O.fields(this.properties);b<c.length;){var d=c[b];++b;a=q.__cast(O.field(this.properties,
d),Xf);if(null!=a){var e=!0;Object.prototype.hasOwnProperty.call(this.target,d)?a.start=O.field(this.target,d):(e=!1,a.start=O.getProperty(this.target,d));a=new Ie(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?O.setField(f.target,f.propertyName,Math.round(q.__cast(f,Ie).path.calculate(b))):O.setProperty(f.target,f.propertyName,Math.round(q.__cast(f,Ie).path.calculate(b))):f.isField?O.setField(f.target,f.propertyName,q.__cast(f,Ie).path.calculate(b)):O.setProperty(f.target,f.propertyName,q.__cast(f,Ie).path.calculate(b))}}else for(b=this._ease.calculate(c),d=0,e=this.propertyDetails;d<e.length;)f=e[d],++d,f.isField?O.setField(f.target,
f.propertyName,q.__cast(f,Ie).path.calculate(b)):O.setProperty(f.target,f.propertyName,q.__cast(f,Ie).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__:tj});var re=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};n["motion.actuators.PropertyDetails"]=re;re.__name__=["motion","actuators","PropertyDetails"];re.prototype={__class__:re};var Ie=function(a,b,c,d){null==d&&(d=!0);re.call(this,a,b,0,0,d);this.path=c};n["motion.actuators.PropertyPathDetails"]=Ie;Ie.__name__=["motion","actuators","PropertyPathDetails"];
Ie.__super__=re;Ie.prototype=L(re.prototype,{__class__:Ie});var Fh=function(a,b,c){rb.call(this,a,b,c)};n["motion.actuators.TransformActuator"]=Fh;Fh.__name__=["motion","actuators","TransformActuator"];Fh.__super__=rb;Fh.prototype=L(rb.prototype,{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")&&q.__instanceof(this.target,wa)&&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 yd;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 yd;for(var d,b=0;b<a.length;){var e=a[b];++b;d=this.getField(c,e);d=new re(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 ze);var a=this.getField(this.target,"soundTransform");this.endSoundTransform=this.getField(this.target,"soundTransform");this.tweenSoundTransform=new ze;Object.prototype.hasOwnProperty.call(this.properties,
"soundVolume")&&(this.endSoundTransform.volume=this.properties.soundVolume,this.propertyDetails.push(new re(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 re(this.tweenSoundTransform,"pan",a.pan,this.endSoundTransform.pan-a.pan)))},update:function(a){rb.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__:Fh});var yj=function(){};n["motion.easing.Back"]=yj;yj.__name__=["motion","easing","Back"];yj.__properties__={get_easeOut:"get_easeOut",get_easeInOut:"get_easeInOut",get_easeIn:"get_easeIn"};yj.get_easeIn=function(){return new zj(1.70158)};
yj.get_easeInOut=function(){return new Aj(1.70158)};yj.get_easeOut=function(){return new Bj(1.70158)};var zj=function(a){this.s=a};n["motion.easing.BackEaseIn"]=zj;zj.__name__=["motion","easing","BackEaseIn"];zj.__interfaces__=[dc];zj.prototype={calculate:function(a){return a*a*((this.s+1)*a-this.s)},ease:function(a,b,c,d){return c*(a/=d)*a*((this.s+1)*a-this.s)+b},__class__:zj};var Aj=function(a){this.s=a};n["motion.easing.BackEaseInOut"]=Aj;Aj.__name__=["motion","easing","BackEaseInOut"];Aj.__interfaces__=
[dc];Aj.prototype={calculate:function(a){return 1>(a/=.5)?.5*a*a*(((this.s*=1.525)+1)*a-this.s):.5*((a-=2)*a*(((this.s*=1.525)+1)*a+this.s)+2)},ease:function(a,b,c,d){return 1>(a/=d/2)?c/2*a*a*(((this.s*=1.525)+1)*a-this.s)+b:c/2*((a-=2)*a*(((this.s*=1.525)+1)*a+this.s)+2)+b},__class__:Aj};var Bj=function(a){this.s=a};n["motion.easing.BackEaseOut"]=Bj;Bj.__name__=["motion","easing","BackEaseOut"];Bj.__interfaces__=[dc];Bj.prototype={calculate:function(a){return--a*a*((this.s+1)*a+this.s)+1},ease:function(a,
b,c,d){return c*((a=a/d-1)*a*((this.s+1)*a+this.s)+1)+b},__class__:Bj};var Cj=function(){};n["motion.easing.Cubic"]=Cj;Cj.__name__=["motion","easing","Cubic"];Cj.__properties__={get_easeOut:"get_easeOut",get_easeInOut:"get_easeInOut",get_easeIn:"get_easeIn"};Cj.get_easeIn=function(){return new Dj};Cj.get_easeInOut=function(){return new Ej};Cj.get_easeOut=function(){return new Fj};var Dj=function(){};n["motion.easing.CubicEaseIn"]=Dj;Dj.__name__=["motion","easing","CubicEaseIn"];Dj.__interfaces__=
[dc];Dj.prototype={calculate:function(a){return a*a*a},ease:function(a,b,c,d){return c*(a/=d)*a*a+b},__class__:Dj};var Ej=function(){};n["motion.easing.CubicEaseInOut"]=Ej;Ej.__name__=["motion","easing","CubicEaseInOut"];Ej.__interfaces__=[dc];Ej.prototype={calculate:function(a){return 1>(a/=.5)?.5*a*a*a:.5*((a-=2)*a*a+2)},ease:function(a,b,c,d){return 1>(a/=d/2)?c/2*a*a*a+b:c/2*((a-=2)*a*a+2)+b},__class__:Ej};var Fj=function(){};n["motion.easing.CubicEaseOut"]=Fj;Fj.__name__=["motion","easing","CubicEaseOut"];
Fj.__interfaces__=[dc];Fj.prototype={calculate:function(a){return--a*a*a+1},ease:function(a,b,c,d){return c*((a=a/d-1)*a*a+1)+b},__class__:Fj};var Gj=function(){};n["motion.easing.Elastic"]=Gj;Gj.__name__=["motion","easing","Elastic"];Gj.__properties__={get_easeOut:"get_easeOut",get_easeInOut:"get_easeInOut",get_easeIn:"get_easeIn"};Gj.get_easeIn=function(){return new Hj(.1,.4)};Gj.get_easeInOut=function(){return new Ij(.1,.4)};Gj.get_easeOut=function(){return new Jj(.1,.4)};var Hj=function(a,b){this.a=
a;this.p=b};n["motion.easing.ElasticEaseIn"]=Hj;Hj.__name__=["motion","easing","ElasticEaseIn"];Hj.__interfaces__=[dc];Hj.prototype={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))},ease:function(a,b,c,d){if(0==a)return b;if(1==(a/=d))return b+c;this.a<Math.abs(c)?(this.a=c,c=this.p/4):c=this.p/(2*Math.PI)*Math.asin(c/this.a);return-(this.a*Math.pow(2,
10*--a)*Math.sin(2*(a*d-c)*Math.PI/this.p))+b},__class__:Hj};var Ij=function(a,b){this.a=a;this.p=b};n["motion.easing.ElasticEaseInOut"]=Ij;Ij.__name__=["motion","easing","ElasticEaseInOut"];Ij.__interfaces__=[dc];Ij.prototype={calculate:function(a){return 0==a?0:2==(a/=.5)?1:1>a?-.5*Math.pow(2,10*--a)*Math.sin(2*(a-.11249999999999999)*Math.PI/.44999999999999996):Math.pow(2,-10*--a)*Math.sin(2*(a-.11249999999999999)*Math.PI/.44999999999999996)*.5+1},ease:function(a,b,c,d){if(0==a)return b;if(2==(a/=
d/2))return b+c;var e;this.a<Math.abs(c)?(this.a=c,e=this.p/4):e=this.p/(2*Math.PI)*Math.asin(c/this.a);return 1>a?-.5*this.a*Math.pow(2,10*--a)*Math.sin(2*(a*d-e)*Math.PI/this.p)+b:this.a*Math.pow(2,-10*--a)*Math.sin(2*(a*d-e)*Math.PI/this.p)*.5+c+b},__class__:Ij};var Jj=function(a,b){this.a=a;this.p=b};n["motion.easing.ElasticEaseOut"]=Jj;Jj.__name__=["motion","easing","ElasticEaseOut"];Jj.__interfaces__=[dc];Jj.prototype={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},ease:function(a,b,c,d){if(0==a)return b;if(1==(a/=d))return b+c;var e;this.a<Math.abs(c)?(this.a=c,e=this.p/4):e=this.p/(2*Math.PI)*Math.asin(c/this.a);return this.a*Math.pow(2,-10*a)*Math.sin(2*(a*d-e)*Math.PI/this.p)+c+b},__class__:Jj};var qj=function(){};n["motion.easing.ExpoEaseIn"]=qj;qj.__name__=["motion","easing","ExpoEaseIn"];qj.__interfaces__=[dc];qj.prototype={calculate:function(a){return 0==
a?0:Math.pow(2,10*(a-1))},ease:function(a,b,c,d){return 0==a?b:c*Math.pow(2,10*(a/d-1))+b},__class__:qj};var rj=function(){};n["motion.easing.ExpoEaseInOut"]=rj;rj.__name__=["motion","easing","ExpoEaseInOut"];rj.__interfaces__=[dc];rj.prototype={calculate:function(a){return 0==a?0:1==a?1:1>(a/=.5)?.5*Math.pow(2,10*(a-1)):.5*(2-Math.pow(2,-10*--a))},ease:function(a,b,c,d){return 0==a?b:a==d?b+c:1>(a/=d/2)?c/2*Math.pow(2,10*(a-1))+b:c/2*(2-Math.pow(2,-10*--a))+b},__class__:rj};var Jb=function(){};n["motion.easing.Linear"]=
Jb;Jb.__name__=["motion","easing","Linear"];Jb.__properties__={get_easeNone:"get_easeNone"};Jb.get_easeNone=function(){return new Kj};var Kj=function(){};n["motion.easing.LinearEaseNone"]=Kj;Kj.__name__=["motion","easing","LinearEaseNone"];Kj.__interfaces__=[dc];Kj.prototype={calculate:function(a){return a},ease:function(a,b,c,d){return c*a/d+b},__class__:Kj};var Lj=function(){};n["motion.easing.Quad"]=Lj;Lj.__name__=["motion","easing","Quad"];Lj.__properties__={get_easeOut:"get_easeOut",get_easeInOut:"get_easeInOut",
get_easeIn:"get_easeIn"};Lj.get_easeIn=function(){return new Mj};Lj.get_easeInOut=function(){return new Nj};Lj.get_easeOut=function(){return new Oj};var Mj=function(){};n["motion.easing.QuadEaseIn"]=Mj;Mj.__name__=["motion","easing","QuadEaseIn"];Mj.__interfaces__=[dc];Mj.prototype={calculate:function(a){return a*a},ease:function(a,b,c,d){return c*(a/=d)*a+b},__class__:Mj};var Nj=function(){};n["motion.easing.QuadEaseInOut"]=Nj;Nj.__name__=["motion","easing","QuadEaseInOut"];Nj.__interfaces__=[dc];
Nj.prototype={calculate:function(a){return 1>(a*=2)?.5*a*a:-.5*((a-1)*(a-3)-1)},ease:function(a,b,c,d){return 1>(a/=d/2)?c/2*a*a+b:-c/2*((a-1)*(a-3)-1)+b},__class__:Nj};var Oj=function(){};n["motion.easing.QuadEaseOut"]=Oj;Oj.__name__=["motion","easing","QuadEaseOut"];Oj.__interfaces__=[dc];Oj.prototype={calculate:function(a){return-a*(a-2)},ease:function(a,b,c,d){return-c*(a/=d)*(a-2)+b},__class__:Oj};var Pj=function(){};n["motion.easing.Quart"]=Pj;Pj.__name__=["motion","easing","Quart"];Pj.__properties__=
{get_easeOut:"get_easeOut",get_easeInOut:"get_easeInOut",get_easeIn:"get_easeIn"};Pj.get_easeIn=function(){return new Qj};Pj.get_easeInOut=function(){return new Rj};Pj.get_easeOut=function(){return new Sj};var Qj=function(){};n["motion.easing.QuartEaseIn"]=Qj;Qj.__name__=["motion","easing","QuartEaseIn"];Qj.__interfaces__=[dc];Qj.prototype={calculate:function(a){return a*a*a*a},ease:function(a,b,c,d){return c*(a/=d)*a*a*a+b},__class__:Qj};var Rj=function(){};n["motion.easing.QuartEaseInOut"]=Rj;Rj.__name__=
["motion","easing","QuartEaseInOut"];Rj.__interfaces__=[dc];Rj.prototype={calculate:function(a){return 1>(a*=2)?.5*a*a*a*a:-.5*((a-=2)*a*a*a-2)},ease:function(a,b,c,d){return 1>(a/=d/2)?c/2*a*a*a*a+b:-c/2*((a-=2)*a*a*a-2)+b},__class__:Rj};var Sj=function(){};n["motion.easing.QuartEaseOut"]=Sj;Sj.__name__=["motion","easing","QuartEaseOut"];Sj.__interfaces__=[dc];Sj.prototype={calculate:function(a){return-(--a*a*a*a-1)},ease:function(a,b,c,d){return-c*((a=a/d-1)*a*a*a-1)+b},__class__:Sj};var Tj=function(){};
n["motion.easing.Quint"]=Tj;Tj.__name__=["motion","easing","Quint"];Tj.__properties__={get_easeOut:"get_easeOut",get_easeInOut:"get_easeInOut",get_easeIn:"get_easeIn"};Tj.get_easeIn=function(){return new Uj};Tj.get_easeInOut=function(){return new Vj};Tj.get_easeOut=function(){return new Wj};var Uj=function(){};n["motion.easing.QuintEaseIn"]=Uj;Uj.__name__=["motion","easing","QuintEaseIn"];Uj.__interfaces__=[dc];Uj.prototype={calculate:function(a){return a*a*a*a*a},ease:function(a,b,c,d){return c*
(a/=d)*a*a*a*a+b},__class__:Uj};var Vj=function(){};n["motion.easing.QuintEaseInOut"]=Vj;Vj.__name__=["motion","easing","QuintEaseInOut"];Vj.__interfaces__=[dc];Vj.prototype={calculate:function(a){return 1>(a*=2)?.5*a*a*a*a*a:.5*((a-=2)*a*a*a*a+2)},ease:function(a,b,c,d){return 1>(a/=d/2)?c/2*a*a*a*a*a+b:c/2*((a-=2)*a*a*a*a+2)+b},__class__:Vj};var Wj=function(){};n["motion.easing.QuintEaseOut"]=Wj;Wj.__name__=["motion","easing","QuintEaseOut"];Wj.__interfaces__=[dc];Wj.prototype={calculate:function(a){return--a*
a*a*a*a+1},ease:function(a,b,c,d){return c*((a=a/d-1)*a*a*a*a+1)+b},__class__:Wj};var Xj=function(){};n["motion.easing.Sine"]=Xj;Xj.__name__=["motion","easing","Sine"];Xj.__properties__={get_easeOut:"get_easeOut",get_easeInOut:"get_easeInOut",get_easeIn:"get_easeIn"};Xj.get_easeIn=function(){return new Yj};Xj.get_easeInOut=function(){return new Zj};Xj.get_easeOut=function(){return new ak};var Yj=function(){};n["motion.easing.SineEaseIn"]=Yj;Yj.__name__=["motion","easing","SineEaseIn"];Yj.__interfaces__=
[dc];Yj.prototype={calculate:function(a){return 1-Math.cos(Math.PI/2*a)},ease:function(a,b,c,d){return-c*Math.cos(a/d*(Math.PI/2))+c+b},__class__:Yj};var Zj=function(){};n["motion.easing.SineEaseInOut"]=Zj;Zj.__name__=["motion","easing","SineEaseInOut"];Zj.__interfaces__=[dc];Zj.prototype={calculate:function(a){return-(Math.cos(Math.PI*a)-1)/2},ease:function(a,b,c,d){return-c/2*(Math.cos(Math.PI*a/d)-1)+b},__class__:Zj};var ak=function(){};n["motion.easing.SineEaseOut"]=ak;ak.__name__=["motion","easing",
"SineEaseOut"];ak.__interfaces__=[dc];ak.prototype={calculate:function(a){return Math.sin(Math.PI/2*a)},ease:function(a,b,c,d){return c*Math.sin(a/d*(Math.PI/2))+b},__class__:ak};var cm=function(){};n["openfl.IAssetCache"]=cm;cm.__name__=["openfl","IAssetCache"];cm.prototype={__class__:cm,__properties__:{set_enabled:"set_enabled",get_enabled:"get_enabled"}};var bk=function(){this.__enabled=!0;this.bitmapData=new ma;this.font=new ma;this.sound=new ma};n["openfl.AssetCache"]=bk;bk.__name__=["openfl",
"AssetCache"];bk.__interfaces__=[cm];bk.prototype={clear:function(a){if(null==a)this.bitmapData=new ma,this.font=new ma,this.sound=new ma;else{for(var b=this.bitmapData.keys();b.hasNext();){var c=b.next();Ca.startsWith(c,a)&&this.bitmapData.remove(c)}for(b=this.font.keys();b.hasNext();)c=b.next(),Ca.startsWith(c,a)&&this.font.remove(c);for(b=this.sound.keys();b.hasNext();)c=b.next(),Ca.startsWith(c,a)&&this.sound.remove(c)}},getBitmapData:function(a){return this.bitmapData.get(a)},getFont:function(a){return this.font.get(a)},
getSound:function(a){return this.sound.get(a)},hasBitmapData:function(a){return this.bitmapData.exists(a)},hasFont:function(a){return this.font.exists(a)},hasSound:function(a){return this.sound.exists(a)},removeBitmapData:function(a){return this.bitmapData.remove(a)},removeFont:function(a){return this.font.remove(a)},removeSound:function(a){return this.sound.remove(a)},setBitmapData:function(a,b){this.bitmapData.set(a,b)},setFont:function(a,b){this.font.set(a,b)},setSound:function(a,b){this.sound.set(a,
b)},get_enabled:function(){return this.__enabled},set_enabled:function(a){return this.__enabled=a},__class__:bk,__properties__:{set_enabled:"set_enabled",get_enabled:"get_enabled"}};var R=function(){};n["openfl.Assets"]=R;R.__name__=["openfl","Assets"];R.addEventListener=function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=0);null==c&&(c=!1);N.onChange.has(R.LimeAssets_onChange)||N.onChange.add(R.LimeAssets_onChange);R.dispatcher.addEventListener(a,b,c,d,e)};R.dispatchEvent=function(a){return R.dispatcher.dispatchEvent(a)};
R.exists=function(a,b){return N.exists(a,b)};R.getBitmapData=function(a,b){null==b&&(b=!0);if(b&&R.cache.get_enabled()&&R.cache.hasBitmapData(a)){var c=R.cache.getBitmapData(a);if(R.isValidBitmapData(c))return c}c=N.getImage(a,!1);return null!=c?(c=Ba.fromImage(c),b&&R.cache.get_enabled()&&R.cache.setBitmapData(a,c),c):null};R.getBytes=function(a){return kb.fromBytes(N.getBytes(a))};R.getFont=function(a,b){null==b&&(b=!0);if(b&&R.cache.get_enabled()&&R.cache.hasFont(a))return R.cache.getFont(a);var c=
N.getFont(a,!1);return null!=c?(c=Xc.__fromLimeFont(c),b&&R.cache.get_enabled()&&R.cache.setFont(a,c),c):new Xc};R.getLibrary=function(a){return N.getLibrary(a)};R.getMovieClip=function(a){var b=a.substring(0,a.indexOf(":")),c=a.indexOf(":")+1;a=P.substr(a,c,null);b=R.getLibrary(b);if(null!=b&&b.exists(a,"MOVIE_CLIP")&&b.isLocal(a,"MOVIE_CLIP"))return b.getMovieClip(a);null;return null};R.getMusic=function(a,b){var c=N.getPath(a);return null!=c?new Kd(new ne(c)):null};R.getPath=function(a){return N.getPath(a)};
R.getSound=function(a,b){null==b&&(b=!0);if(b&&R.cache.get_enabled()&&R.cache.hasSound(a)){var c=R.cache.getSound(a);if(R.isValidSound(c))return c}c=N.getPath(a);return null!=c?new Kd(new ne(c)):null};R.getText=function(a){return N.getText(a)};R.hasEventListener=function(a){return R.dispatcher.hasEventListener(a)};R.isLocal=function(a,b,c){null==c&&(c=!0);if(c&&R.cache.get_enabled()&&(("IMAGE"==b||null==b)&&R.cache.hasBitmapData(a)||("FONT"==b||null==b)&&R.cache.hasFont(a)||("SOUND"==b||"MUSIC"==
b||null==b)&&R.cache.hasSound(a)))return!0;c=a.substring(0,a.indexOf(":"));var d=a.indexOf(":")+1;a=P.substr(a,d,null);c=R.getLibrary(c);return null!=c?c.isLocal(a,b):!1};R.isValidBitmapData=function(a){return null!=a&&null!=a.image};R.isValidSound=function(a){return!0};R.list=function(a){return N.list(a)};R.loadBitmapData=function(a,b,c){null==b&&(b=!0);null==b&&(b=!0);var d=new Jc;null!=c&&(d.future.onComplete(c),d.future.onError(function(a){c(null)}));if(b&&R.cache.get_enabled()&&R.cache.hasBitmapData(a)){var e=
R.cache.getBitmapData(a);if(R.isValidBitmapData(e))return d.complete(e),d.future}N.loadImage(a,!1).onComplete(function(c){null!=c?(c=Ba.fromImage(c),b&&R.cache.get_enabled()&&R.cache.setBitmapData(a,c),d.complete(c)):d.error('[Assets] Could not load Image "'+a+'"')}).onError(K(d,d.error)).onProgress(K(d,d.progress));return d.future};R.loadBytes=function(a,b){var c=new Jc,d=N.loadBytes(a);null!=b&&(c.future.onComplete(b),c.future.onError(function(a){b(null)}),d.onComplete(function(a){c.complete(kb.fromBytes(a))}),
d.onProgress(function(a){c.progress(a)}),d.onError(function(a){c.error(a)}));return c.future};R.loadFont=function(a,b,c){null==b&&(b=!0);null==b&&(b=!0);var d=new Jc;null!=c&&(d.future.onComplete(c),d.future.onError(function(a){c(null)}));if(b&&R.cache.get_enabled()&&R.cache.hasFont(a))return d.complete(R.cache.getFont(a)),d.future;N.loadFont(a).onComplete(function(c){c=Xc.__fromLimeFont(c);b&&R.cache.get_enabled()&&R.cache.setFont(a,c);d.complete(c)}).onError(K(d,d.error)).onProgress(K(d,d.progress));
return d.future};R.loadLibrary=function(a,b){var c=N.loadLibrary(a);null!=b&&(c.onComplete(b),c.onError(function(a){b(null)}));return c};R.loadMusic=function(a,b,c){null==b&&(b=!0);null==b&&(b=!0);return new Rb(function(){return R.getMusic(a,b)})};R.loadMovieClip=function(a,b){var c=new Jc;null!=b&&(c.future.onComplete(b),c.future.onError(function(a){b(null)}));var d=a.substring(0,a.indexOf(":")),e;e=a.indexOf(":")+1;e=P.substr(a,e,null);var f=R.getLibrary(d);null!=f?f.exists(e,"MOVIE_CLIP")?c.completeWith(f.loadMovieClip(e)):
c.error('[Assets] There is no MovieClip asset with an ID of "'+a+'"'):c.error('[Assets] There is no asset library named "'+d+'"');return c.future};R.loadSound=function(a,b,c){null==b&&(b=!0);null==b&&(b=!0);return new Rb(function(){return R.getSound(a,b)})};R.loadText=function(a,b){var c=N.loadText(a);null!=b&&(c.onComplete(b),c.onError(function(a){b(null)}));return c};R.registerLibrary=function(a,b){N.registerLibrary(a,b)};R.removeEventListener=function(a,b,c){null==c&&(c=!1);R.dispatcher.removeEventListener(a,
b,c)};R.resolveClass=function(a){return ua.resolveClass(a)};R.resolveEnum=function(a){return ua.resolveEnum(a)};R.unloadLibrary=function(a){N.unloadLibrary(a)};R.LimeAssets_onChange=function(){R.dispatchEvent(new fa("change"))};var dm=function(){this.onChange=new rc};n["openfl.AssetLibrary"]=dm;dm.__name__=["openfl","AssetLibrary"];dm.__super__=fg;dm.prototype=L(fg.prototype,{getMovieClip:function(a){return null},loadMovieClip:function(a){var b=this;return new Rb(function(){return b.getMovieClip(a)})},
__class__:dm});var Ih=function(){ga.call(this);this.__currentFrame=0;this.__currentLabels=[];this.__totalFrames=0;this.enabled=!0};n["openfl.display.MovieClip"]=Ih;Ih.__name__=["openfl","display","MovieClip"];Ih.__super__=ga;Ih.prototype=L(ga.prototype,{addFrameScript:function(a,b){null!=b?(null==this.__frameScripts&&(this.__frameScripts=new xa),this.__frameScripts.h[a]=b):null!=this.__frameScripts&&this.__frameScripts.remove(a)},gotoAndPlay:function(a,b){},gotoAndStop:function(a,b){},nextFrame:function(){},
play:function(){},prevFrame:function(){},stop:function(){},get_currentFrame:function(){return this.__currentFrame},get_currentFrameLabel:function(){return this.__currentFrameLabel},get_currentLabel:function(){return this.__currentLabel},get_currentLabels:function(){return this.__currentLabels},get_framesLoaded:function(){return this.__totalFrames},get_totalFrames:function(){return this.__totalFrames},__class__:Ih,__properties__:L(ga.prototype.__properties__,{get_totalFrames:"get_totalFrames",get_framesLoaded:"get_framesLoaded",
get_currentLabels:"get_currentLabels",get_currentLabel:"get_currentLabel",get_currentFrameLabel:"get_currentFrameLabel",get_currentFrame:"get_currentFrame"})});var ka=function(){};n["openfl.Lib"]=ka;ka.__name__=["openfl","Lib"];ka.application=null;ka.as=function(a,b){return q.__instanceof(a,b)?a:null};ka.attach=function(a){return new Ih};ka.embed=ci.openfl.embed=function(a,b,c,d,e){Tb.embed(a,b,c,d,e)};ka.getTimer=function(){return Tb.getTimer()};ka.getURL=function(a,b){null==b&&(b="_blank");window.open(a.url,
b)};ka.notImplemented=function(a){ka.__sentWarnings.exists(a)||(ka.__sentWarnings.set(a,!0),null)};ka.preventDefaultTouchMove=function(){window.document.addEventListener("touchmove",function(a){a.preventDefault()},!1)};ka.trace=function(a){Al.trace(a,{fileName:"Lib.hx",lineNumber:144,className:"openfl.Lib",methodName:"trace"})};var xb={};n["openfl._Vector.Vector_Impl_"]=xb;xb.__name__=["openfl","_Vector","Vector_Impl_"];xb.__properties__={set_fixed:"set_fixed",get_fixed:"get_fixed",set_length:"set_length",
get_length:"get_length"};xb._new=function(a,b){null==b&&(b=!1);null==a&&(a=0);var c;c=new Lb;c.data=Array(a);c.length=a;c.fixed=b;return c};xb.concat=function(a,b){var c=new Lb;c.length=null!=b?a.length+b.length:a.length;c.fixed=!1;c.data=Array(c.length);H.blit(a.data,0,c.data,0,a.length);null!=b&&H.blit(b.data,0,c.data,a.length,b.length);return c};xb.copy=function(a){var b=new Lb;b.length=a.length;b.fixed=a.fixed;b.data=Array(a.length);H.blit(a.data,0,b.data,0,a.length);return b};xb.iterator=function(a){return new em(a)};
xb.join=function(a,b){for(var c="",d=0,e=a.length;d<e;){var f=d++;0<f&&(c+=b);c+=u.string(a.data[f])}return c};xb.pop=function(a){var b=null;!a.fixed&&0<a.length&&(a.length--,b=a.data[a.length]);return b};xb.push=function(a,b){if(!a.fixed){a.length++;if(a.data.length<a.length){var c;c=Array(a.data.length+10);H.blit(a.data,0,c,0,a.data.length);a.data=c}a.data[a.length-1]=b}return a.length};xb.reverse=function(a){var b;b=Array(a.length);for(var c=0,d=a.length;c<d;){var e=c++;b[a.length-1-e]=a.data[e]}a.data=
b};xb.shift=function(a){if(!a.fixed&&0<a.length){a.length--;var b=a.data[0];H.blit(a.data,1,a.data,0,a.length);return b}return null};xb.unshift=function(a,b){if(!a.fixed){a.length++;if(a.data.length<a.length){var c;c=Array(a.length+10);H.blit(a.data,0,c,1,a.data.length);a.data=c}else H.blit(a.data,0,a.data,1,a.length-1);a.data[0]=b}};xb.slice=function(a,b,c){null==c&&(c=0);null==b&&(b=0);0>b&&(b+=a.length);0>=c&&(c+=a.length);c>a.length&&(c=a.length);var d=c-b;if(0>=d||d>a.length)d=a.length;var e=
new Lb;e.length=c-b;e.fixed=!0;e.data=Array(d);H.blit(a.data,b,e.data,0,d);return e};xb.sort=function(a,b){var c=H.toArray(a.data);c.sort(b);var d;d=Array(c.length);for(var e=0,f=c.length;e<f;){var g=e++;d[g]=c[g]}a.data=d};xb.splice=function(a,b,c){0>b&&(b+=a.length);b+c>a.length&&(c=a.length-b);0>c&&(c=0);var d=new Lb;d.length=c;d.fixed=!1;d.data=Array(c);H.blit(a.data,b,d.data,0,c);0<c&&(a.length-=c,H.blit(a.data,b+c,a.data,b,a.length-b));return d};xb.toString=function(a){return H.toArray(a.data).toString()};
xb.indexOf=function(a,b,c){null==c&&(c=0);for(var d=-1,e=a.length;c<e;){var f=c++;if(a.data[f]==b){d=f;break}}return d};xb.lastIndexOf=function(a,b,c){null==c&&(c=0);for(var d=-1,e=a.length-1;e>=c;){if(a.data[e]==b){d=e;break}e--}return d};xb.ofArray=function(a){var b=new Lb;b.length=a.length;b.fixed=!0;var c;c=Array(a.length);for(var d=0,e=a.length;d<e;){var f=d++;c[f]=a[f]}b.data=c;return b};xb.convert=function(a){return a};xb.get=function(a,b){return a.data[b]};xb.set=function(a,b,c){if(!a.fixed&&
(b>=a.length&&(a.length=b+1),a.data.length<a.length)){var d;d=Array(a.data.length+10);H.blit(a.data,0,d,0,a.data.length);a.data=d}return a.data[b]=c};xb.fromArray=function(a){var b=new Lb;b.length=a.length;b.fixed=!0;var c;c=Array(a.length);for(var d=0,e=a.length;d<e;){var f=d++;c[f]=a[f]}b.data=c;return b};xb.toArray=function(a){for(var b=[],c=0,d=a.data.length;c<d;){var e=c++;b.push(a.data[e])}return b};xb.fromHaxeVector=function(a){var b=new Lb;b.length=a.length;b.fixed=!0;b.data=a;return b};xb.toHaxeVector=
function(a){return a.data};xb.fromVectorData=function(a){return a};xb.toVectorData=function(a){return a};xb.get_length=function(a){return a.length};xb.set_length=function(a,b){if(!a.fixed){if(b>a.length){var c;c=Array(b);H.blit(a.data,0,c,0,u["int"](Math.min(a.data.length,b)));a.data=c}a.length=b}return b};xb.get_fixed=function(a){return a.fixed};xb.set_fixed=function(a,b){return a.fixed=b};var Lb=function(){this.length=0};n["openfl.VectorData"]=Lb;Lb.__name__=["openfl","VectorData"];Lb.prototype=
{__class__:Lb};var em=function(a){this.index=0;this.vectorData=a};n["openfl.VectorDataIterator"]=em;em.__name__=["openfl","VectorDataIterator"];em.prototype={hasNext:function(){return this.index<this.vectorData.length},next:function(){var a=this.index++;return this.vectorData.data[a]},__class__:em};var Je=function(a){this.renderSession=a};n["openfl._internal.renderer.AbstractMaskManager"]=Je;Je.__name__=["openfl","_internal","renderer","AbstractMaskManager"];Je.prototype={pushMask:function(a){},pushRect:function(a,
b){},popMask:function(){},popRect:function(){},saveState:function(){},restoreState:function(){},__class__:Je};var Yc=function(a,b){this.width=a;this.height=b};n["openfl._internal.renderer.AbstractRenderer"]=Yc;Yc.__name__=["openfl","_internal","renderer","AbstractRenderer"];Yc.prototype={render:function(a){},renderShape:function(a){},setViewport:function(a,b,c,d){},resize:function(a,b){},__class__:Yc};var tf=function(){this.types=[];this.b=[];this.i=[];this.f=[];this.o=[];this.ff=[];this.ii=[];this.ts=
[]};n["openfl._internal.renderer.DrawCommandBuffer"]=tf;tf.__name__=["openfl","_internal","renderer","DrawCommandBuffer"];tf.prototype={append:function(a){for(var b=new Ke(a),c=0,d=a.types;c<d.length;){var e=d[c];++c;switch(e[1]){case 0:e=b.readBeginBitmapFill();this.beginBitmapFill(lb.get_bitmap(e),lb.get_matrix(e),lb.get_repeat(e),lb.get_smooth(e));break;case 1:e=b.readBeginFill();this.beginFill(Yb.get_color(e),Yb.get_alpha(e));break;case 2:e=b.readBeginGradientFill();this.beginGradientFill(Qa.get_type(e),
Qa.get_colors(e),Qa.get_alphas(e),Qa.get_ratios(e),Qa.get_matrix(e),Qa.get_spreadMethod(e),Qa.get_interpolationMethod(e),Qa.get_focalPointRatio(e));break;case 3:e=b.readCubicCurveTo();this.cubicCurveTo(Fa.get_controlX1(e),Fa.get_controlY1(e),Fa.get_controlX2(e),Fa.get_controlY2(e),Fa.get_anchorX(e),Fa.get_anchorY(e));break;case 4:e=b.readCurveTo();this.curveTo(Za.get_controlX(e),Za.get_controlY(e),Za.get_anchorX(e),Za.get_anchorY(e));break;case 5:e=b.readDrawCircle();this.drawCircle(jb.get_x(e),jb.get_y(e),
jb.get_radius(e));break;case 6:e=b.readDrawEllipse();this.drawEllipse(cb.get_x(e),cb.get_y(e),cb.get_width(e),cb.get_height(e));break;case 7:e=b.readDrawPath();this.drawPath(Nb.get_commands(e),Nb.get_data(e),Nb.get_winding(e));break;case 8:e=b.readDrawRect();this.drawRect(Ua.get_x(e),Ua.get_y(e),Ua.get_width(e),Ua.get_height(e));break;case 9:e=b.readDrawRoundRect();this.drawRoundRect(Na.get_x(e),Na.get_y(e),Na.get_width(e),Na.get_height(e),Na.get_ellipseWidth(e),Na.get_ellipseHeight(e));break;case 10:e=
b.readDrawTiles();this.drawTiles(qa.get_sheet(e),qa.get_tileData(e),qa.get_smooth(e),qa.get_flags(e),qa.get_shader(e),qa.get_count(e));break;case 11:e=b.readDrawTriangles();this.drawTriangles(oc.get_vertices(e),oc.get_indices(e),oc.get_uvtData(e),oc.get_culling(e));break;case 12:b.readEndFill();this.endFill();break;case 13:e=b.readLineBitmapStyle();this.lineBitmapStyle(pc.get_bitmap(e),pc.get_matrix(e),pc.get_repeat(e),pc.get_smooth(e));break;case 14:e=b.readLineGradientStyle();this.lineGradientStyle($a.get_type(e),
$a.get_colors(e),$a.get_alphas(e),$a.get_ratios(e),$a.get_matrix(e),$a.get_spreadMethod(e),$a.get_interpolationMethod(e),$a.get_focalPointRatio(e));break;case 15:e=b.readLineStyle();this.lineStyle(Ga.get_thickness(e),Ga.get_color(e),Ga.get_alpha(e),Ga.get_pixelHinting(e),Ga.get_scaleMode(e),Ga.get_caps(e),Ga.get_joints(e),Ga.get_miterLimit(e));break;case 16:e=b.readLineTo();this.lineTo(Hb.get_x(e),Hb.get_y(e));break;case 17:e=b.readMoveTo();this.moveTo(yb.get_x(e),yb.get_y(e));break;case 18:e=b.readOverrideMatrix(),
this.overrideMatrix(Hg.get_matrix(e))}}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,g,k){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(g);this.f.push(k)},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)},copy:function(){var a=new tf;a.append(this);return a},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)},destroy:function(){this.clear();this.ts=this.ii=this.ff=this.o=this.f=this.i=this.b=this.types=null},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.o.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){this.types.push(Z.DRAW_TRIANGLES);this.o.push(a);this.o.push(b);
this.o.push(c);this.o.push(d)},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,g,k){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(g);this.f.push(k)},lineStyle:function(a,b,c,d,e,f,g,k){this.types.push(Z.LINE_STYLE);this.o.push(a);this.i.push(b);
this.f.push(c);this.b.push(d);this.o.push(e);this.o.push(f);this.o.push(g);this.f.push(k)},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__:tf,__properties__:{get_length:"get_length"}};var Ke=function(a){this.buffer=a;this.bPos=this.iPos=this.fPos=this.oPos=
this.ffPos=this.iiPos=this.tsPos=0;this.prev=Z.UNKNOWN};n["openfl._internal.renderer.DrawCommandReader"]=Ke;Ke.__name__=["openfl","_internal","renderer","DrawCommandReader"];Ke.prototype={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+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=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+=5;this.oPos+=1;break;case 10:this.tsPos+=1;this.ffPos+=1;this.bPos+=1;this.iPos+=2;this.oPos+=1;break;case 11:this.oPos+=4;break;case 13:this.oPos+=2;this.bPos+=2;break;case 14:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 15:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 16:this.fPos+=2;break;case 17:this.fPos+=2;break;case 18:this.oPos+=1}},bool:function(a){return this.buffer.b[this.bPos+a]},destroy:function(){this.buffer=
null;this.reset()},fArr:function(a){return this.buffer.ff[this.ffPos+a]},"float":function(a){return this.buffer.f[this.fPos+a]},iArr:function(a){return this.buffer.ii[this.iiPos+a]},"int":function(a){return this.buffer.i[this.iPos+a]},obj:function(a){return this.buffer.o[this.oPos+a]},readBeginBitmapFill:function(){this.advance();this.prev=Z.BEGIN_BITMAP_FILL;return lb._new(this)},readBeginFill:function(){this.advance();this.prev=Z.BEGIN_FILL;return Yb._new(this)},readBeginGradientFill:function(){this.advance();
this.prev=Z.BEGIN_GRADIENT_FILL;return Qa._new(this)},readCubicCurveTo:function(){this.advance();this.prev=Z.CUBIC_CURVE_TO;return Fa._new(this)},readCurveTo:function(){this.advance();this.prev=Z.CURVE_TO;return Za._new(this)},readDrawCircle:function(){this.advance();this.prev=Z.DRAW_CIRCLE;return jb._new(this)},readDrawEllipse:function(){this.advance();this.prev=Z.DRAW_ELLIPSE;return cb._new(this)},readDrawPath:function(){this.advance();this.prev=Z.DRAW_PATH;return Nb._new(this)},readDrawRect:function(){this.advance();
this.prev=Z.DRAW_RECT;return Ua._new(this)},readDrawRoundRect:function(){this.advance();this.prev=Z.DRAW_ROUND_RECT;return Na._new(this)},readDrawTiles:function(){this.advance();this.prev=Z.DRAW_TILES;return qa._new(this)},readDrawTriangles:function(){this.advance();this.prev=Z.DRAW_TRIANGLES;return oc._new(this)},readEndFill:function(){this.advance();this.prev=Z.END_FILL;return vn._new(this)},readLineBitmapStyle:function(){this.advance();this.prev=Z.LINE_BITMAP_STYLE;return pc._new(this)},readLineGradientStyle:function(){this.advance();
this.prev=Z.LINE_GRADIENT_STYLE;return $a._new(this)},readLineStyle:function(){this.advance();this.prev=Z.LINE_STYLE;return Ga._new(this)},readLineTo:function(){this.advance();this.prev=Z.LINE_TO;return Hb._new(this)},readMoveTo:function(){this.advance();this.prev=Z.MOVE_TO;return yb._new(this)},readOverrideMatrix:function(){this.advance();this.prev=Z.OVERRIDE_MATRIX;return Hg._new(this)},reset:function(){this.bPos=this.iPos=this.fPos=this.oPos=this.ffPos=this.iiPos=this.tsPos=0},skip:function(a){this.advance();
this.prev=a},tileSheet:function(a){return this.buffer.ts[this.tsPos+a]},__class__:Ke};var lb={};n["openfl._internal.renderer._DrawCommandReader.BeginBitmapFillView_Impl_"]=lb;lb.__name__=["openfl","_internal","renderer","_DrawCommandReader","BeginBitmapFillView_Impl_"];lb.__properties__={get_smooth:"get_smooth",get_repeat:"get_repeat",get_matrix:"get_matrix",get_bitmap:"get_bitmap"};lb._new=function(a){return a};lb.get_bitmap=function(a){return a.obj(0)};lb.get_matrix=function(a){return a.obj(1)};
lb.get_repeat=function(a){return a.bool(0)};lb.get_smooth=function(a){return a.bool(1)};var Yb={};n["openfl._internal.renderer._DrawCommandReader.BeginFillView_Impl_"]=Yb;Yb.__name__=["openfl","_internal","renderer","_DrawCommandReader","BeginFillView_Impl_"];Yb.__properties__={get_alpha:"get_alpha",get_color:"get_color"};Yb._new=function(a){return a};Yb.get_color=function(a){return a["int"](0)};Yb.get_alpha=function(a){return a["float"](0)};var Qa={};n["openfl._internal.renderer._DrawCommandReader.BeginGradientFillView_Impl_"]=
Qa;Qa.__name__=["openfl","_internal","renderer","_DrawCommandReader","BeginGradientFillView_Impl_"];Qa.__properties__={get_focalPointRatio:"get_focalPointRatio",get_interpolationMethod:"get_interpolationMethod",get_spreadMethod:"get_spreadMethod",get_matrix:"get_matrix",get_ratios:"get_ratios",get_alphas:"get_alphas",get_colors:"get_colors",get_type:"get_type"};Qa._new=function(a){return a};Qa.get_type=function(a){return a.obj(0)};Qa.get_colors=function(a){return a.iArr(0)};Qa.get_alphas=function(a){return a.fArr(0)};
Qa.get_ratios=function(a){return a.iArr(1)};Qa.get_matrix=function(a){return a.obj(1)};Qa.get_spreadMethod=function(a){return a.obj(2)};Qa.get_interpolationMethod=function(a){return a.obj(3)};Qa.get_focalPointRatio=function(a){return a["float"](0)};var Fa={};n["openfl._internal.renderer._DrawCommandReader.CubicCurveToView_Impl_"]=Fa;Fa.__name__=["openfl","_internal","renderer","_DrawCommandReader","CubicCurveToView_Impl_"];Fa.__properties__={get_anchorY:"get_anchorY",get_anchorX:"get_anchorX",get_controlY2:"get_controlY2",
get_controlX2:"get_controlX2",get_controlY1:"get_controlY1",get_controlX1:"get_controlX1"};Fa._new=function(a){return a};Fa.get_controlX1=function(a){return a["float"](0)};Fa.get_controlY1=function(a){return a["float"](1)};Fa.get_controlX2=function(a){return a["float"](2)};Fa.get_controlY2=function(a){return a["float"](3)};Fa.get_anchorX=function(a){return a["float"](4)};Fa.get_anchorY=function(a){return a["float"](5)};var Za={};n["openfl._internal.renderer._DrawCommandReader.CurveToView_Impl_"]=
Za;Za.__name__=["openfl","_internal","renderer","_DrawCommandReader","CurveToView_Impl_"];Za.__properties__={get_anchorY:"get_anchorY",get_anchorX:"get_anchorX",get_controlY:"get_controlY",get_controlX:"get_controlX"};Za._new=function(a){return a};Za.get_controlX=function(a){return a["float"](0)};Za.get_controlY=function(a){return a["float"](1)};Za.get_anchorX=function(a){return a["float"](2)};Za.get_anchorY=function(a){return a["float"](3)};var jb={};n["openfl._internal.renderer._DrawCommandReader.DrawCircleView_Impl_"]=
jb;jb.__name__=["openfl","_internal","renderer","_DrawCommandReader","DrawCircleView_Impl_"];jb.__properties__={get_radius:"get_radius",get_y:"get_y",get_x:"get_x"};jb._new=function(a){return a};jb.get_x=function(a){return a["float"](0)};jb.get_y=function(a){return a["float"](1)};jb.get_radius=function(a){return a["float"](2)};var cb={};n["openfl._internal.renderer._DrawCommandReader.DrawEllipseView_Impl_"]=cb;cb.__name__=["openfl","_internal","renderer","_DrawCommandReader","DrawEllipseView_Impl_"];
cb.__properties__={get_height:"get_height",get_width:"get_width",get_y:"get_y",get_x:"get_x"};cb._new=function(a){return a};cb.get_x=function(a){return a["float"](0)};cb.get_y=function(a){return a["float"](1)};cb.get_width=function(a){return a["float"](2)};cb.get_height=function(a){return a["float"](3)};var Nb={};n["openfl._internal.renderer._DrawCommandReader.DrawPathView_Impl_"]=Nb;Nb.__name__=["openfl","_internal","renderer","_DrawCommandReader","DrawPathView_Impl_"];Nb.__properties__={get_winding:"get_winding",
get_data:"get_data",get_commands:"get_commands"};Nb._new=function(a){return a};Nb.get_commands=function(a){return a.obj(0)};Nb.get_data=function(a){return a.obj(1)};Nb.get_winding=function(a){return a.obj(2)};var Ua={};n["openfl._internal.renderer._DrawCommandReader.DrawRectView_Impl_"]=Ua;Ua.__name__=["openfl","_internal","renderer","_DrawCommandReader","DrawRectView_Impl_"];Ua.__properties__={get_height:"get_height",get_width:"get_width",get_y:"get_y",get_x:"get_x"};Ua._new=function(a){return a};
Ua.get_x=function(a){return a["float"](0)};Ua.get_y=function(a){return a["float"](1)};Ua.get_width=function(a){return a["float"](2)};Ua.get_height=function(a){return a["float"](3)};var Na={};n["openfl._internal.renderer._DrawCommandReader.DrawRoundRectView_Impl_"]=Na;Na.__name__=["openfl","_internal","renderer","_DrawCommandReader","DrawRoundRectView_Impl_"];Na.__properties__={get_ellipseHeight:"get_ellipseHeight",get_ellipseWidth:"get_ellipseWidth",get_height:"get_height",get_width:"get_width",get_y:"get_y",
get_x:"get_x"};Na._new=function(a){return a};Na.get_x=function(a){return a["float"](0)};Na.get_y=function(a){return a["float"](1)};Na.get_width=function(a){return a["float"](2)};Na.get_height=function(a){return a["float"](3)};Na.get_ellipseWidth=function(a){return a["float"](4)};Na.get_ellipseHeight=function(a){return a.obj(0)};var qa={};n["openfl._internal.renderer._DrawCommandReader.DrawTilesView_Impl_"]=qa;qa.__name__=["openfl","_internal","renderer","_DrawCommandReader","DrawTilesView_Impl_"];
qa.__properties__={get_count:"get_count",get_shader:"get_shader",get_flags:"get_flags",get_smooth:"get_smooth",get_tileData:"get_tileData",get_sheet:"get_sheet"};qa._new=function(a){return a};qa.get_sheet=function(a){return a.tileSheet(0)};qa.get_tileData=function(a){return a.fArr(0)};qa.get_smooth=function(a){return a.bool(0)};qa.get_flags=function(a){return a["int"](0)};qa.get_shader=function(a){return a.obj(0)};qa.get_count=function(a){return a["int"](1)};var oc={};n["openfl._internal.renderer._DrawCommandReader.DrawTrianglesView_Impl_"]=
oc;oc.__name__=["openfl","_internal","renderer","_DrawCommandReader","DrawTrianglesView_Impl_"];oc.__properties__={get_culling:"get_culling",get_uvtData:"get_uvtData",get_indices:"get_indices",get_vertices:"get_vertices"};oc._new=function(a){return a};oc.get_vertices=function(a){return a.obj(0)};oc.get_indices=function(a){return a.obj(1)};oc.get_uvtData=function(a){return a.obj(2)};oc.get_culling=function(a){return a.obj(3)};var vn={};n["openfl._internal.renderer._DrawCommandReader.EndFillView_Impl_"]=
vn;vn.__name__=["openfl","_internal","renderer","_DrawCommandReader","EndFillView_Impl_"];vn._new=function(a){return a};var pc={};n["openfl._internal.renderer._DrawCommandReader.LineBitmapStyleView_Impl_"]=pc;pc.__name__=["openfl","_internal","renderer","_DrawCommandReader","LineBitmapStyleView_Impl_"];pc.__properties__={get_smooth:"get_smooth",get_repeat:"get_repeat",get_matrix:"get_matrix",get_bitmap:"get_bitmap"};pc._new=function(a){return a};pc.get_bitmap=function(a){return a.obj(0)};pc.get_matrix=
function(a){return a.obj(1)};pc.get_repeat=function(a){return a.bool(0)};pc.get_smooth=function(a){return a.bool(1)};var $a={};n["openfl._internal.renderer._DrawCommandReader.LineGradientStyleView_Impl_"]=$a;$a.__name__=["openfl","_internal","renderer","_DrawCommandReader","LineGradientStyleView_Impl_"];$a.__properties__={get_focalPointRatio:"get_focalPointRatio",get_interpolationMethod:"get_interpolationMethod",get_spreadMethod:"get_spreadMethod",get_matrix:"get_matrix",get_ratios:"get_ratios",get_alphas:"get_alphas",
get_colors:"get_colors",get_type:"get_type"};$a._new=function(a){return a};$a.get_type=function(a){return a.obj(0)};$a.get_colors=function(a){return a.iArr(0)};$a.get_alphas=function(a){return a.fArr(0)};$a.get_ratios=function(a){return a.iArr(1)};$a.get_matrix=function(a){return a.obj(1)};$a.get_spreadMethod=function(a){return a.obj(2)};$a.get_interpolationMethod=function(a){return a.obj(3)};$a.get_focalPointRatio=function(a){return a["float"](0)};var Ga={};n["openfl._internal.renderer._DrawCommandReader.LineStyleView_Impl_"]=
Ga;Ga.__name__=["openfl","_internal","renderer","_DrawCommandReader","LineStyleView_Impl_"];Ga.__properties__={get_miterLimit:"get_miterLimit",get_joints:"get_joints",get_caps:"get_caps",get_scaleMode:"get_scaleMode",get_pixelHinting:"get_pixelHinting",get_alpha:"get_alpha",get_color:"get_color",get_thickness:"get_thickness"};Ga._new=function(a){return a};Ga.get_thickness=function(a){return a.obj(0)};Ga.get_color=function(a){return a["int"](0)};Ga.get_alpha=function(a){return a["float"](0)};Ga.get_pixelHinting=
function(a){return a.bool(0)};Ga.get_scaleMode=function(a){return a.obj(1)};Ga.get_caps=function(a){return a.obj(2)};Ga.get_joints=function(a){return a.obj(3)};Ga.get_miterLimit=function(a){return a["float"](1)};var Hb={};n["openfl._internal.renderer._DrawCommandReader.LineToView_Impl_"]=Hb;Hb.__name__=["openfl","_internal","renderer","_DrawCommandReader","LineToView_Impl_"];Hb.__properties__={get_y:"get_y",get_x:"get_x"};Hb._new=function(a){return a};Hb.get_x=function(a){return a["float"](0)};Hb.get_y=
function(a){return a["float"](1)};var yb={};n["openfl._internal.renderer._DrawCommandReader.MoveToView_Impl_"]=yb;yb.__name__=["openfl","_internal","renderer","_DrawCommandReader","MoveToView_Impl_"];yb.__properties__={get_y:"get_y",get_x:"get_x"};yb._new=function(a){return a};yb.get_x=function(a){return a["float"](0)};yb.get_y=function(a){return a["float"](1)};var Hg={};n["openfl._internal.renderer._DrawCommandReader.OverrideMatrixView_Impl_"]=Hg;Hg.__name__=["openfl","_internal","renderer","_DrawCommandReader",
"OverrideMatrixView_Impl_"];Hg.__properties__={get_matrix:"get_matrix"};Hg._new=function(a){return a};Hg.get_matrix=function(a){return a.obj(0)};var Z=n["openfl._internal.renderer.DrawCommandType"]={__ename__:["openfl","_internal","renderer","DrawCommandType"],__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=J;Z.BEGIN_BITMAP_FILL.__enum__=Z;Z.BEGIN_FILL=["BEGIN_FILL",1];Z.BEGIN_FILL.toString=J;Z.BEGIN_FILL.__enum__=Z;Z.BEGIN_GRADIENT_FILL=["BEGIN_GRADIENT_FILL",2];Z.BEGIN_GRADIENT_FILL.toString=J;Z.BEGIN_GRADIENT_FILL.__enum__=Z;Z.CUBIC_CURVE_TO=["CUBIC_CURVE_TO",3];Z.CUBIC_CURVE_TO.toString=J;Z.CUBIC_CURVE_TO.__enum__=Z;Z.CURVE_TO=["CURVE_TO",4];Z.CURVE_TO.toString=J;Z.CURVE_TO.__enum__=Z;Z.DRAW_CIRCLE=["DRAW_CIRCLE",5];Z.DRAW_CIRCLE.toString=
J;Z.DRAW_CIRCLE.__enum__=Z;Z.DRAW_ELLIPSE=["DRAW_ELLIPSE",6];Z.DRAW_ELLIPSE.toString=J;Z.DRAW_ELLIPSE.__enum__=Z;Z.DRAW_PATH=["DRAW_PATH",7];Z.DRAW_PATH.toString=J;Z.DRAW_PATH.__enum__=Z;Z.DRAW_RECT=["DRAW_RECT",8];Z.DRAW_RECT.toString=J;Z.DRAW_RECT.__enum__=Z;Z.DRAW_ROUND_RECT=["DRAW_ROUND_RECT",9];Z.DRAW_ROUND_RECT.toString=J;Z.DRAW_ROUND_RECT.__enum__=Z;Z.DRAW_TILES=["DRAW_TILES",10];Z.DRAW_TILES.toString=J;Z.DRAW_TILES.__enum__=Z;Z.DRAW_TRIANGLES=["DRAW_TRIANGLES",11];Z.DRAW_TRIANGLES.toString=
J;Z.DRAW_TRIANGLES.__enum__=Z;Z.END_FILL=["END_FILL",12];Z.END_FILL.toString=J;Z.END_FILL.__enum__=Z;Z.LINE_BITMAP_STYLE=["LINE_BITMAP_STYLE",13];Z.LINE_BITMAP_STYLE.toString=J;Z.LINE_BITMAP_STYLE.__enum__=Z;Z.LINE_GRADIENT_STYLE=["LINE_GRADIENT_STYLE",14];Z.LINE_GRADIENT_STYLE.toString=J;Z.LINE_GRADIENT_STYLE.__enum__=Z;Z.LINE_STYLE=["LINE_STYLE",15];Z.LINE_STYLE.toString=J;Z.LINE_STYLE.__enum__=Z;Z.LINE_TO=["LINE_TO",16];Z.LINE_TO.toString=J;Z.LINE_TO.__enum__=Z;Z.MOVE_TO=["MOVE_TO",17];Z.MOVE_TO.toString=
J;Z.MOVE_TO.__enum__=Z;Z.OVERRIDE_MATRIX=["OVERRIDE_MATRIX",18];Z.OVERRIDE_MATRIX.toString=J;Z.OVERRIDE_MATRIX.__enum__=Z;Z.UNKNOWN=["UNKNOWN",19];Z.UNKNOWN.toString=J;Z.UNKNOWN.__enum__=Z;var qc=function(){};n["openfl._internal.renderer.GraphicsPaths"]=qc;qc.__name__=["openfl","_internal","renderer","GraphicsPaths"];qc.ellipse=function(a,b,c,d,e,f){var g=2*Math.PI/f,k=0;for(f+=1;k<f;){var p=k++;a.push(b+Math.sin(g*p)*d);a.push(c+Math.cos(g*p)*e)}};qc.cubicCurveTo=function(a,b,c,d,e,f,g){for(var k=
0,p=0,h=0,l=0,m=0,n=a[a.length-2],q=a[a.length-1],u=0,r=k=0,t=1;21>t;)r=t++/20,k=1-r,p=k*k,h=p*k,l=r*r,m=l*r,u=h*n+3*p*r*b+3*k*l*d+m*f,k=h*q+3*p*r*c+3*k*l*e+m*g,a.push(u),a.push(k)};qc.curveTo=function(a,b,c,d,e){for(var f=0,g=0,k=a[a.length-2],p=a[a.length-1],h=g=f=0,l=1;21>l;)h=l++/20,f=k+(b-k)*h,g=p+(c-p)*h,f+=(b+(d-b)*h-f)*h,g+=(c+(e-c)*h-g)*h,a.push(f),a.push(g)};qc.roundRectangle=function(a,b,c,d,e,f,g){d=b+d;e=c+e;var k=-f+f*qc.SIN45,p=-f+f*qc.TAN22,h=-g+g*qc.SIN45,l=-g+g*qc.TAN22;a.push(d);
a.push(e-g);qc.curveTo(a,d,e+l,d+k,e+h);qc.curveTo(a,d+p,e,d-f,e);a.push(b+f);a.push(e);qc.curveTo(a,b-p,e,b-k,e+h);qc.curveTo(a,b,e+l,b,e-g);a.push(b);a.push(c+g);qc.curveTo(a,b,c-l,b-k,c-h);qc.curveTo(a,b-p,c,b+f,c);a.push(d-f);a.push(c);qc.curveTo(a,d+p,c,d+k,c-h);qc.curveTo(a,d,c-l,d,c+g);a.push(d);a.push(e-g)};var Yf=function(){};n["openfl._internal.renderer.PolyK"]=Yf;Yf.__name__=["openfl","_internal","renderer","PolyK"];Yf.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 g=f++;e.push(g)}for(var f=0,g=d,k=!1;3<g;){var p=e[f%g],h=e[(f+1)%g],l=e[(f+2)%g],m=b[2*p],n=b[2*p+1],q=b[2*h],u=b[2*h+1],r=b[2*l],t=b[2*l+1],k=!1;if(Yf._convex(m,n,q,u,r,t,c))for(var k=!0,v=0;v<g;){var z=v++,z=e[z];if(z!=p&&z!=h&&z!=l&&Yf._PointInTriangle(b[2*z],b[2*z+1],m,n,q,u,r,t)){k=!1;break}}if(k)a.push(p),a.push(h),a.push(l),e.splice((f+1)%g,1),g--,f=0;else if(f++>3*g)if(c){a=[];c=[];for(e=0;e<d;)f=e++,c.push(f);e=c;f=0;g=d;c=!1}else return[]}a.push(e[0]);a.push(e[1]);
a.push(e[2]);return a};Yf._PointInTriangle=function(a,b,c,d,e,f,g,k){g=g-c|0;k=k-d|0;e=e-c|0;f=f-d|0;a=a-c|0;c=b-d|0;b=g*g+k*k;d=g*e+k*f;g=g*a+k*c;k=e*e+f*f;e=e*a+f*c;f=1/(b*k-d*d);k=(k*g-d*e)*f;g=(b*e-d*g)*f;return 0<=k&&0<=g&&1>k+g};Yf._convex=function(a,b,c,d,e,f,g){return 0<=(b-d)*(e-c)+(c-a)*(f-d)==g};var Zf=function(){this.activeTextures=0};n["openfl._internal.renderer.RenderSession"]=Zf;Zf.__name__=["openfl","_internal","renderer","RenderSession"];Zf.prototype={__class__:Zf};var an=function(){};
n["openfl._internal.renderer.cairo.CairoBitmap"]=an;an.__name__=["openfl","_internal","renderer","cairo","CairoBitmap"];an.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=Kb.createForSurface(d),Kb.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 E=function(){};n["openfl._internal.renderer.cairo.CairoGraphics"]=E;E.__name__=["openfl","_internal","renderer","cairo","CairoGraphics"];E.bitmapFill=null;E.bitmapRepeat=null;E.bounds=null;E.cairo=
null;E.fillPattern=null;E.fillPatternMatrix=null;E.graphics=null;E.hasFill=null;E.hasStroke=null;E.hitTesting=null;E.inversePendingMatrix=null;E.pendingMatrix=null;E.strokePattern=null;E.closePath=function(){null!=E.strokePattern&&(E.cairo.closePath(),E.cairo.set_source(E.strokePattern),E.hitTesting||E.cairo.strokePreserve(),E.cairo.newPath())};E.createGradientPattern=function(a,b,c,d,e,f,g,k){f=null;switch(a){case 1:null==e&&(e=new Oa);f=e.transformPoint(new W(1638.4,0));a=e.tx+E.graphics.__bounds.x;
g=e.ty+E.graphics.__bounds.y;f=Kb.createRadial(a,g,0,a,g,(f.x-e.tx)/2);break;case 0:null==e&&(e=new Oa),f=e.transformPoint(new W(-819.2,0)),e=e.transformPoint(new W(819.2,0)),f.x+=E.graphics.__bounds.x,e.x+=E.graphics.__bounds.x,f.y+=E.graphics.__bounds.y,e.y+=E.graphics.__bounds.y,f=Kb.createLinear(f.x,f.y,e.x,e.y)}e=0;for(a=b.length;e<a;){var p=e++,h=b[p];g=c[p];k=((h&16711680)>>>16)/255;var l=((h&65280)>>>8)/255,h=(h&255)/255,p=d[p]/255;0>p&&(p=0);1<p&&(p=1);Kb.addColorStopRGBA(f,p,k,l,h,g)}b=
Kb.get_matrix(f);b.tx=E.bounds.x;b.ty=E.bounds.y;Kb.set_matrix(f,b);return f};E.createImagePattern=function(a,b,c){a=Kb.createForSurface(a.getSurface());c&&Kb.set_extend(a,1);E.fillPatternMatrix=b;return a};E.drawRoundRect=function(a,b,c,d,e,f){null==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 g=-e+e*E.SIN45,k=-e+e*E.TAN22,p=-f+f*E.SIN45,h=-f+f*E.TAN22;E.cairo.moveTo(c,d-f);E.quadraticCurveTo(c,d+h,c+g,d+p);E.quadraticCurveTo(c+k,d,c-e,d);E.cairo.lineTo(a+e,d);E.quadraticCurveTo(a-
k,d,a-g,d+p);E.quadraticCurveTo(a,d+h,a,d-f);E.cairo.lineTo(a,b+f);E.quadraticCurveTo(a,b-h,a-g,b-p);E.quadraticCurveTo(a-k,b,a+e,b);E.cairo.lineTo(c-e,b);E.quadraticCurveTo(c+k,b,c+g,b-p);E.quadraticCurveTo(c,b-h,c,b+f);E.cairo.lineTo(c,d-f)};E.endFill=function(){E.cairo.newPath();E.playCommands(E.fillCommands,!1);E.fillCommands.clear()};E.endStroke=function(){E.cairo.newPath();E.playCommands(E.strokeCommands,!0);E.cairo.closePath();E.strokeCommands.clear()};E.hitTest=function(a,b,c){return!1};E.isCCW=
function(a,b,c,d,e,f){return 0>(c-a)*(f-b)-(d-b)*(e-a)};E.normalizeUVT=function(a,b){null==b&&(b=!1);for(var c=-Infinity,d=-Infinity,e=a.length,f=1,g=e+1;f<g;)d=f++,b&&0==d%3||(d=a.data[d-1],c<d&&(c=d));f=new Lb;f.data=[];f.length=0;f.fixed=!1;g=1;for(e+=1;g<e;)if(d=g++,!b||0!=d%3){if(!f.fixed){f.length++;if(f.data.length<f.length){var k;k=Array(f.data.length+10);H.blit(f.data,0,k,0,f.data.length);f.data=k}f.data[f.length-1]=a.data[d-1]/c}f.length}return{max:c,uvt:f}};E.playCommands=function(a,b){null==
b&&(b=!1);if(0!=a.get_length()){E.bounds=E.graphics.__bounds;var c=E.bounds.x,d=E.bounds.y,e=0,f=0,g=!1,k=0,p=0;E.cairo.set_fillRule(1);E.cairo.set_antialias(3);var h=!1,l=new Ke(a),m=0,n=a.types;try{for(;m<n.length;){var q=n[m];++m;switch(q[1]){case 3:var r=l.readCubicCurveTo(),h=!0;E.cairo.curveTo(Fa.get_controlX1(r)-c,Fa.get_controlY1(r)-d,Fa.get_controlX2(r)-c,Fa.get_controlY2(r)-d,Fa.get_anchorX(r)-c,Fa.get_anchorY(r)-d);break;case 4:var t=l.readCurveTo(),h=!0;E.quadraticCurveTo(Za.get_controlX(t)-
c,Za.get_controlY(t)-d,Za.get_anchorX(t)-c,Za.get_anchorY(t)-d);break;case 5:var v=l.readDrawCircle(),h=!0;E.cairo.moveTo(jb.get_x(v)-c+jb.get_radius(v),jb.get_y(v)-d);E.cairo.arc(jb.get_x(v)-c,jb.get_y(v)-d,jb.get_radius(v),0,2*Math.PI);break;case 8:var y=l.readDrawRect(),h=!0;E.cairo.rectangle(Ua.get_x(y)-c,Ua.get_y(y)-d,Ua.get_width(y),Ua.get_height(y));break;case 6:var z=l.readDrawEllipse(),h=!0,x=cb.get_x(z),A=cb.get_y(z),B=cb.get_width(z),C=cb.get_height(z),x=x-c,A=A-d,G=B/2*.5522848,I=C/2*
.5522848,F=x+B,L=A+C,K=x+B/2,J=A+C/2;E.cairo.moveTo(x,J);E.cairo.curveTo(x,J-I,K-G,A,K,A);E.cairo.curveTo(K+G,A,F,J-I,F,J);E.cairo.curveTo(F,J+I,K+G,L,K,L);E.cairo.curveTo(K-G,L,x,J+I,x,J);break;case 9:var M=l.readDrawRoundRect(),h=!0;E.drawRoundRect(Na.get_x(M)-c,Na.get_y(M)-d,Na.get_width(M),Na.get_height(M),Na.get_ellipseWidth(M),Na.get_ellipseHeight(M));break;case 16:var P=l.readLineTo(),h=!0;E.cairo.lineTo(Hb.get_x(P)-c,Hb.get_y(P)-d);e=Hb.get_x(P);f=Hb.get_y(P);break;case 17:var O=l.readMoveTo();
E.cairo.moveTo(yb.get_x(O)-c,yb.get_y(O)-d);e=yb.get_x(O);f=yb.get_y(O);g=!0;k=yb.get_x(O);p=yb.get_y(O);break;case 15:var N=l.readLineStyle();b&&E.hasStroke&&E.closePath();E.cairo.moveTo(e-c,f-d);if(null==Ga.get_thickness(N))E.hasStroke=!1;else{E.hasStroke=!0;E.cairo.set_lineWidth(0<Ga.get_thickness(N)?Ga.get_thickness(N):1);null==Ga.get_joints(N)?E.cairo.set_lineJoin(1):E.cairo.set_lineJoin(function(a){switch(Ga.get_joints(N)){case 1:a=0;break;case 0:a=2;break;default:a=1}return a}(this));null==
Ga.get_caps(N)?E.cairo.set_lineCap(1):E.cairo.set_lineCap(function(a){switch(Ga.get_caps(N)){case 0:a=0;break;case 2:a=2;break;default:a=1}return a}(this));E.cairo.set_miterLimit(Ga.get_miterLimit(N));var R=((Ga.get_color(N)&16711680)>>>16)/255,U=((Ga.get_color(N)&65280)>>>8)/255,S=(Ga.get_color(N)&255)/255;1==Ga.get_alpha(N)?E.strokePattern=Kb.createRGB(R,U,S):E.strokePattern=Kb.createRGBA(R,U,S,Ga.get_alpha(N))}break;case 14:var T=l.readLineGradientStyle();b&&E.hasStroke&&E.closePath();E.cairo.moveTo(e-
c,f-d);E.strokePattern=E.createGradientPattern($a.get_type(T),$a.get_colors(T),$a.get_alphas(T),$a.get_ratios(T),$a.get_matrix(T),$a.get_spreadMethod(T),$a.get_interpolationMethod(T),$a.get_focalPointRatio(T));E.hasStroke=!0;break;case 13:var Z=l.readLineBitmapStyle();b&&E.hasStroke&&E.closePath();E.cairo.moveTo(e-c,f-d);E.strokePattern=E.createImagePattern(pc.get_bitmap(Z),pc.get_matrix(Z),pc.get_repeat(Z));E.hasStroke=!0;break;case 0:var V=l.readBeginBitmapFill();E.fillPattern=E.createImagePattern(lb.get_bitmap(V),
lb.get_matrix(V),lb.get_repeat(V));E.bitmapFill=lb.get_bitmap(V);E.bitmapRepeat=lb.get_repeat(V);E.hasFill=!0;break;case 1:var W=l.readBeginFill();.005>Yb.get_alpha(W)?E.hasFill=!1:(null!=E.fillPattern&&(E.fillPatternMatrix=null),E.fillPattern=Kb.createRGBA(((Yb.get_color(W)&16711680)>>>16)/255,((Yb.get_color(W)&65280)>>>8)/255,(Yb.get_color(W)&255)/255,Yb.get_alpha(W)),E.hasFill=!0);E.bitmapFill=null;break;case 2:var X=l.readBeginGradientFill();null!=E.fillPattern&&(E.fillPatternMatrix=null);E.fillPattern=
E.createGradientPattern(Qa.get_type(X),Qa.get_colors(X),Qa.get_alphas(X),Qa.get_ratios(X),Qa.get_matrix(X),Qa.get_spreadMethod(X),Qa.get_interpolationMethod(X),Qa.get_focalPointRatio(X));E.hasFill=!0;E.bitmapFill=null;break;case 11:var aa=l.readDrawTriangles(),Y=oc.get_vertices(aa),ba=oc.get_indices(aa),Q=oc.get_uvtData(aa),ca=null==E.bitmapFill;if(ca&&null!=Q)throw"__break__";var fa=0,da=0;if(!ca){if(null==Q){var ea;ea=new Lb;ea.data=[];ea.length=0;ea.fixed=!1;for(var Q=ea,ha=0,oa=Y.length/2|0;ha<
oa;){var ia=ha++;if(!Q.fixed){Q.length++;if(Q.data.length<Q.length){var ja;ja=Array(Q.data.length+10);H.blit(Q.data,0,ja,0,Q.data.length);Q.data=ja}Q.data[Q.length-1]=Y.data[2*ia]/E.bitmapFill.width}Q.length;if(!Q.fixed){Q.length++;if(Q.data.length<Q.length){var na;na=Array(Q.data.length+10);H.blit(Q.data,0,na,0,Q.data.length);Q.data=na}Q.data[Q.length-1]=Y.data[2*ia+1]/E.bitmapFill.height}Q.length}}var la;la=oc.get_uvtData(aa).length!=Y.length;var ma=E.normalizeUVT(Q,la),pa=ma.max,Q=ma.uvt;1<pa?
(fa=E.bounds.width|0,da=E.bounds.height|0):(fa=E.bitmapFill.width,da=E.bitmapFill.height)}var ka=0,ta=ba.length,ra,sa,ua,wa,Ba,xa,Ca,Da,Ka,ga,za,Ia,Ea,Ja,Ha,Aa,Ta,Oa,Pa,Ra,Ma,ya,Va,Ya,Wa,Xa,bb,db;for(E.cairo.set_antialias(1);ka<ta;){ra=ka;sa=ka+1;ua=ka+2;wa=2*ba.data[ra];Ba=2*ba.data[ra]+1;xa=2*ba.data[sa];Ca=2*ba.data[sa]+1;Da=2*ba.data[ua];Ka=2*ba.data[ua]+1;ga=Y.data[wa];za=Y.data[Ba];Ia=Y.data[xa];Ea=Y.data[Ca];Ja=Y.data[Da];Ha=Y.data[Ka];switch(oc.get_culling(aa)){case 2:if(!(0>(Ia-ga)*(Ha-za)-
(Ea-za)*(Ja-ga))){ka+=3;continue}break;case 0:if(0>(Ia-ga)*(Ha-za)-(Ea-za)*(Ja-ga)){ka+=3;continue}}if(ca)E.cairo.newPath(),E.cairo.moveTo(ga,za),E.cairo.lineTo(Ia,Ea),E.cairo.lineTo(Ja,Ha),E.cairo.closePath(),E.hitTesting||E.cairo.fillPreserve();else if(E.cairo.identityMatrix(),E.cairo.newPath(),E.cairo.moveTo(ga,za),E.cairo.lineTo(Ia,Ea),E.cairo.lineTo(Ja,Ha),E.cairo.closePath(),Aa=Q.data[wa]*fa,Oa=Q.data[xa]*fa,Ra=Q.data[Da]*fa,Ta=Q.data[Ba]*da,Pa=Q.data[Ca]*da,Ma=Q.data[Ka]*da,ya=Aa*(Ma-Pa)-Oa*
Ma+Ra*Pa+(Oa-Ra)*Ta,0!=ya){Va=-(Ta*(Ja-Ia)-Pa*Ja+Ma*Ia+(Pa-Ma)*ga)/ya;Ya=(Pa*Ha+Ta*(Ea-Ha)-Ma*Ea+(Ma-Pa)*za)/ya;Wa=(Aa*(Ja-Ia)-Oa*Ja+Ra*Ia+(Oa-Ra)*ga)/ya;Xa=-(Oa*Ha+Aa*(Ea-Ha)-Ra*Ea+(Ra-Oa)*za)/ya;bb=(Aa*(Ma*Ia-Pa*Ja)+Ta*(Oa*Ja-Ra*Ia)+(Ra*Pa-Oa*Ma)*ga)/ya;db=(Aa*(Ma*Ea-Pa*Ha)+Ta*(Oa*Ha-Ra*Ea)+(Ra*Pa-Oa*Ma)*za)/ya;var gb=new xe(Va,Ya,Wa,Xa,bb,db);E.cairo.set_matrix(gb);E.cairo.set_source(E.fillPattern);E.hitTesting||E.cairo.fill()}ka+=3}break;case 10:var va=l.readDrawTiles(),eb=0<(qa.get_flags(va)&
1),fb=0<(qa.get_flags(va)&2),kb=E.bounds.x,mb=E.bounds.y,hb=0<(qa.get_flags(va)&16),pb=0<(qa.get_flags(va)&4),nb=0<(qa.get_flags(va)&8),ib=0<(qa.get_flags(va)&32),qb=0<(qa.get_flags(va)&64),rb=0<(qa.get_flags(va)&65536),tb=0<(qa.get_flags(va)&4194304);hb&&(fb=eb=!1);var ub=0,vb=0,wb=0,ob=0,ab=3;ib&&(ab=qb?8:6);eb&&(ub=ab,ab++);fb&&(vb=ab,ab++);hb&&(ob=ab,ab+=4);pb&&(ab+=3);nb&&(wb=ab,ab++);var Bb=qa.get_tileData(va).length;0<=qa.get_count(va)&&Bb>qa.get_count(va)&&(Bb=qa.get_count(va));var Sa=0,sb=
null,xb=null,Db=-1,Eb;qa.get_sheet(va).__bitmap.__sync();Eb=qa.get_sheet(va).__bitmap.getSurface();E.cairo.save();rb&&E.cairo.set_operator(12);for(tb&&E.cairo.set_operator(16);Sa<Bb;){var Ib=u["int"](qa.get_tileData(va)[Sa+2]),Ab;Ab=ib?-1:Ib;ib||Ab==Db?ib&&(sb=qa.get_sheet(va).__rectTile,sb.setTo(qa.get_tileData(va)[Sa+2],qa.get_tileData(va)[Sa+3],qa.get_tileData(va)[Sa+4],qa.get_tileData(va)[Sa+5]),xb=qa.get_sheet(va).__point,qb?xb.setTo(qa.get_tileData(va)[Sa+6],qa.get_tileData(va)[Sa+7]):xb.setTo(0,
0)):(sb=qa.get_sheet(va).__tileRects[Ab],xb=qa.get_sheet(va).__centerPoints[Ab],Db=Ab);if(null!=sb&&0<sb.width&&0<sb.height&&null!=xb){E.cairo.identityMatrix();if(hb){var Jb=new xe(qa.get_tileData(va)[Sa+ob],qa.get_tileData(va)[Sa+ob+1],qa.get_tileData(va)[Sa+ob+2],qa.get_tileData(va)[Sa+ob+3],0,0);E.cairo.set_matrix(Jb)}E.cairo.translate(qa.get_tileData(va)[Sa]-kb,qa.get_tileData(va)[Sa+1]-mb);fb&&E.cairo.rotate(qa.get_tileData(va)[Sa+vb]);if(eb){var Fb=qa.get_tileData(va)[Sa+ub];E.cairo.scale(Fb,
Fb)}E.cairo.setSourceSurface(Eb,0,0);nb?E.hitTesting||E.cairo.paintWithAlpha(qa.get_tileData(va)[Sa+wb]):E.hitTesting||E.cairo.paint()}Sa+=ab}(rb||tb)&&E.cairo.set_operator(2);E.cairo.restore();break;default:l.skip(q)}}}catch(Gb){if("__break__"!=Gb)throw Gb;}l.destroy();if(h&&(b&&E.hasStroke&&(E.hasFill&&g?E.cairo.lineTo(k-c,p-d):g&&e==k&&f==p&&E.cairo.closePath(),E.cairo.set_source(E.strokePattern),E.hitTesting||E.cairo.strokePreserve()),!b&&E.hasFill)){E.cairo.translate(-E.bounds.x,-E.bounds.y);
if(null!=E.fillPatternMatrix){var Cb=E.fillPatternMatrix.clone();Cb.invert();null!=E.pendingMatrix&&Cb.concat(E.pendingMatrix);Kb.set_matrix(E.fillPattern,Cb.__toMatrix3())}E.cairo.set_source(E.fillPattern);null!=E.pendingMatrix?(E.cairo.transform(E.pendingMatrix.__toMatrix3()),E.hitTesting||E.cairo.fillPreserve(),E.cairo.transform(E.inversePendingMatrix.__toMatrix3())):E.hitTesting||E.cairo.fillPreserve();E.cairo.translate(E.bounds.x,E.bounds.y);E.cairo.closePath()}}};E.quadraticCurveTo=function(a,
b,c,d){var e=null;E.cairo.get_hasCurrentPoint()?e=E.cairo.get_currentPoint():(E.cairo.moveTo(a,b),e=new yc(a,b));E.cairo.curveTo(e.x+.6666666666666666*(a-e.x),e.y+.6666666666666666*(b-e.y),c+.6666666666666666*(a-c),d+.6666666666666666*(b-d),c,d)};E.render=function(a,b){};E.renderMask=function(a,b){if(0!=a.__commands.get_length()){for(var c=b.cairo,d=new Ke(a.__commands),e=0,f=a.__commands.types;e<f.length;){var g=f[e];++e;switch(g[1]){case 3:g=d.readCubicCurveTo();c.curveTo(Fa.get_controlX1(g)-0,
Fa.get_controlY1(g)-0,Fa.get_controlX2(g)-0,Fa.get_controlY2(g)-0,Fa.get_anchorX(g)-0,Fa.get_anchorY(g)-0);Fa.get_anchorX(g);Fa.get_anchorX(g);break;case 4:g=d.readCurveTo();E.quadraticCurveTo(Za.get_controlX(g)-0,Za.get_controlY(g)-0,Za.get_anchorX(g)-0,Za.get_anchorY(g)-0);Za.get_anchorX(g);Za.get_anchorY(g);break;case 5:g=d.readDrawCircle();c.arc(jb.get_x(g)-0,jb.get_y(g)-0,jb.get_radius(g),0,2*Math.PI);break;case 6:var k=d.readDrawEllipse(),g=cb.get_x(k),p=cb.get_y(k),h=cb.get_width(k),l=cb.get_height(k),
g=g-0,p=p-0,k=h/2*.5522848,m=l/2*.5522848,n=g+h,q=p+l,h=g+h/2,l=p+l/2;c.moveTo(g,l);c.curveTo(g,l-m,h-k,p,h,p);c.curveTo(h+k,p,n,l-m,n,l);c.curveTo(n,l+m,h+k,q,h,q);c.curveTo(h-k,q,g,l+m,g,l);break;case 8:g=d.readDrawRect();c.rectangle(Ua.get_x(g)-0,Ua.get_y(g)-0,Ua.get_width(g),Ua.get_height(g));break;case 9:g=d.readDrawRoundRect();E.drawRoundRect(Na.get_x(g)-0,Na.get_y(g)-0,Na.get_width(g),Na.get_height(g),Na.get_ellipseWidth(g),Na.get_ellipseHeight(g));break;case 16:g=d.readLineTo();c.lineTo(Hb.get_x(g)-
0,Hb.get_y(g)-0);Hb.get_x(g);Hb.get_y(g);break;case 17:g=d.readMoveTo();c.moveTo(yb.get_x(g)-0,yb.get_y(g)-0);yb.get_x(g);yb.get_y(g);break;default:d.skip(g)}}d.destroy()}};var ck=function(a){this.renderSession=a};n["openfl._internal.renderer.cairo.CairoMaskManager"]=ck;ck.__name__=["openfl","_internal","renderer","cairo","CairoMaskManager"];ck.__super__=Je;ck.prototype=L(Je.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 xe(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__:ck});var dk=function(a,b,c){Yc.call(this,a,b);this.cairo=c;this.renderSession=new Zf;this.renderSession.cairo=c;this.renderSession.roundPixels=!0;this.renderSession.renderer=
this;this.renderSession.maskManager=new ck(this.renderSession)};n["openfl._internal.renderer.cairo.CairoRenderer"]=dk;dk.__name__=["openfl","_internal","renderer","cairo","CairoRenderer"];dk.__super__=Yc;dk.prototype=L(Yc.prototype,{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)},renderDisplayObject:function(a){this.cairo.identityMatrix();a.__renderCairo(this.renderSession)},
__class__:dk});var Um=function(){};n["openfl._internal.renderer.cairo.CairoShape"]=Um;Um.__name__=["openfl","_internal","renderer","cairo","CairoShape"];Um.render=function(a,b){};var wn=function(){};n["openfl._internal.renderer.cairo.CairoTextField"]=wn;wn.__name__=["openfl","_internal","renderer","cairo","CairoTextField"];wn.render=function(a,b){};var bn=function(){};n["openfl._internal.renderer.canvas.CanvasBitmap"]=bn;bn.__name__=["openfl","_internal","renderer","canvas","CanvasBitmap"];bn.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 v=function(){};n["openfl._internal.renderer.canvas.CanvasGraphics"]=v;v.__name__=["openfl","_internal","renderer","canvas","CanvasGraphics"];v.bitmapFill=null;v.bitmapStroke=null;v.bitmapRepeat=null;v.bounds=null;v.graphics=null;v.hasFill=null;v.hasStroke=
null;v.hitTesting=null;v.inversePendingMatrix=null;v.pendingMatrix=null;v.context=null;v.closePath=function(){null!=v.context.strokeStyle&&(v.context.closePath(),v.context.stroke(),v.context.beginPath())};v.createBitmapFill=function(a,b){a.__sync();return v.context.createPattern(a.image.get_src(),b?"repeat":"no-repeat")};v.createGradientPattern=function(a,b,c,d,e,f,g,k){f=null;switch(a){case 1:null==e&&(e=new Oa);f=e.transformPoint(new W(1638.4,0));f=v.context.createRadialGradient(e.tx,e.ty,0,e.tx,
e.ty,(f.x-e.tx)/2);break;case 0:e=null!=e?e:new Oa,f=e.transformPoint(new W(-819.2,0)),e=e.transformPoint(new W(819.2,0)),f=v.context.createLinearGradient(f.x,f.y,e.x,e.y)}e=0;for(a=b.length;e<a;){var p=e++,h=b[p];g=c[p];k=(h&16711680)>>>16;var l=(h&65280)>>>8,h=h&255,p=d[p]/255;0>p&&(p=0);1<p&&(p=1);f.addColorStop(p,"rgba("+k+", "+l+", "+h+", "+g+")")}return f};v.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();v.hitTesting||f.fill();return e};v.drawRoundRect=function(a,b,c,d,e,f){null==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 g=-e+e*v.SIN45,k=-e+e*v.TAN22,p=-f+f*v.SIN45,h=-f+f*v.TAN22;v.context.moveTo(c,d-f);v.context.quadraticCurveTo(c,d+h,c+g,d+p);v.context.quadraticCurveTo(c+k,d,c-e,d);v.context.lineTo(a+e,d);v.context.quadraticCurveTo(a-
k,d,a-g,d+p);v.context.quadraticCurveTo(a,d+h,a,d-f);v.context.lineTo(a,b+f);v.context.quadraticCurveTo(a,b-h,a-g,b-p);v.context.quadraticCurveTo(a-k,b,a+e,b);v.context.lineTo(c-e,b);v.context.quadraticCurveTo(c+k,b,c+g,b-p);v.context.quadraticCurveTo(c,b-h,c,b+f);v.context.lineTo(c,d-f)};v.endFill=function(){v.context.beginPath();v.playCommands(v.fillCommands,!1);v.fillCommands.clear()};v.endStroke=function(){v.context.beginPath();v.playCommands(v.strokeCommands,!0);v.context.closePath();v.strokeCommands.clear()};
v.hitTest=function(a,b,c){if(!(0==a.__commands.get_length()||null==v.bounds||0>=v.bounds.width||0>=v.bounds.height)){v.hitTesting=!0;b-=v.bounds.x;c-=v.bounds.y;null==a.__canvas&&(a.__canvas=window.document.createElement("canvas"),a.__context=a.__canvas.getContext("2d"));v.context=a.__context;v.fillCommands.clear();v.strokeCommands.clear();v.hasFill=!1;v.hasStroke=!1;v.bitmapFill=null;v.bitmapRepeat=!1;v.context.beginPath();var d=new Ke(a.__commands),e=0;for(a=a.__commands.types;e<a.length;){var f=
a[e];++e;switch(f[1]){case 3:f=d.readCubicCurveTo();v.fillCommands.cubicCurveTo(Fa.get_controlX1(f),Fa.get_controlY1(f),Fa.get_controlX2(f),Fa.get_controlY2(f),Fa.get_anchorX(f),Fa.get_anchorY(f));v.strokeCommands.cubicCurveTo(Fa.get_controlX1(f),Fa.get_controlY1(f),Fa.get_controlX2(f),Fa.get_controlY2(f),Fa.get_anchorX(f),Fa.get_anchorY(f));break;case 4:f=d.readCurveTo();v.fillCommands.curveTo(Za.get_controlX(f),Za.get_controlY(f),Za.get_anchorX(f),Za.get_anchorY(f));v.strokeCommands.curveTo(Za.get_controlX(f),
Za.get_controlY(f),Za.get_anchorX(f),Za.get_anchorY(f));break;case 16:f=d.readLineTo();v.fillCommands.lineTo(Hb.get_x(f),Hb.get_y(f));v.strokeCommands.lineTo(Hb.get_x(f),Hb.get_y(f));break;case 17:f=d.readMoveTo();v.fillCommands.moveTo(yb.get_x(f),yb.get_y(f));v.strokeCommands.moveTo(yb.get_x(f),yb.get_y(f));break;case 14:f=d.readLineGradientStyle();v.strokeCommands.lineGradientStyle($a.get_type(f),$a.get_colors(f),$a.get_alphas(f),$a.get_ratios(f),$a.get_matrix(f),$a.get_spreadMethod(f),$a.get_interpolationMethod(f),
$a.get_focalPointRatio(f));break;case 13:f=d.readLineBitmapStyle();v.strokeCommands.lineBitmapStyle(pc.get_bitmap(f),pc.get_matrix(f),pc.get_repeat(f),pc.get_smooth(f));break;case 15:f=d.readLineStyle();v.strokeCommands.lineStyle(Ga.get_thickness(f),Ga.get_color(f),1,Ga.get_pixelHinting(f),Ga.get_scaleMode(f),Ga.get_caps(f),Ga.get_joints(f),Ga.get_miterLimit(f));break;case 12:d.readEndFill();v.endFill();v.endStroke();if(v.hasFill&&v.context.isPointInPath(b,c)||v.hasStroke&&v.context.isPointInStroke(b,
c))return d.destroy(),!0;v.hasFill=!1;v.bitmapFill=null;break;case 0:case 1:case 2:v.endFill();v.endStroke();if(v.hasFill&&v.context.isPointInPath(b,c)||v.hasStroke&&v.context.isPointInStroke(b,c))return d.destroy(),!0;f==Z.BEGIN_BITMAP_FILL?(f=d.readBeginBitmapFill(),v.fillCommands.beginBitmapFill(lb.get_bitmap(f),lb.get_matrix(f),lb.get_repeat(f),lb.get_smooth(f)),v.strokeCommands.beginBitmapFill(lb.get_bitmap(f),lb.get_matrix(f),lb.get_repeat(f),lb.get_smooth(f))):f==Z.BEGIN_GRADIENT_FILL?(f=d.readBeginGradientFill(),
v.fillCommands.beginGradientFill(Qa.get_type(f),Qa.get_colors(f),Qa.get_alphas(f),Qa.get_ratios(f),Qa.get_matrix(f),Qa.get_spreadMethod(f),Qa.get_interpolationMethod(f),Qa.get_focalPointRatio(f)),v.strokeCommands.beginGradientFill(Qa.get_type(f),Qa.get_colors(f),Qa.get_alphas(f),Qa.get_ratios(f),Qa.get_matrix(f),Qa.get_spreadMethod(f),Qa.get_interpolationMethod(f),Qa.get_focalPointRatio(f))):(f=d.readBeginFill(),v.fillCommands.beginFill(Yb.get_color(f),1),v.strokeCommands.beginFill(Yb.get_color(f),
1));break;case 5:f=d.readDrawCircle();v.fillCommands.drawCircle(jb.get_x(f),jb.get_y(f),jb.get_radius(f));v.strokeCommands.drawCircle(jb.get_x(f),jb.get_y(f),jb.get_radius(f));break;case 6:f=d.readDrawEllipse();v.fillCommands.drawEllipse(cb.get_x(f),cb.get_y(f),cb.get_width(f),cb.get_height(f));v.strokeCommands.drawEllipse(cb.get_x(f),cb.get_y(f),cb.get_width(f),cb.get_height(f));break;case 8:f=d.readDrawRect();v.fillCommands.drawRect(Ua.get_x(f),Ua.get_y(f),Ua.get_width(f),Ua.get_height(f));v.strokeCommands.drawRect(Ua.get_x(f),
Ua.get_y(f),Ua.get_width(f),Ua.get_height(f));break;case 9:f=d.readDrawRoundRect();v.fillCommands.drawRoundRect(Na.get_x(f),Na.get_y(f),Na.get_width(f),Na.get_height(f),Na.get_ellipseWidth(f),Na.get_ellipseHeight(f));v.strokeCommands.drawRoundRect(Na.get_x(f),Na.get_y(f),Na.get_width(f),Na.get_height(f),Na.get_ellipseWidth(f),Na.get_ellipseHeight(f));break;default:d.skip(f)}}0<v.fillCommands.get_length()&&v.endFill();0<v.strokeCommands.get_length()&&v.endStroke();d.destroy();if(v.hasFill&&v.context.isPointInPath(b,
c)||v.hasStroke&&v.context.isPointInStroke(b,c))return!0}return!1};v.isCCW=function(a,b,c,d,e,f){return 0>(c-a)*(f-b)-(d-b)*(e-a)};v.normalizeUVT=function(a,b){null==b&&(b=!1);for(var c=-Infinity,d=-Infinity,e=a.length,f=1,g=e+1;f<g;)d=f++,b&&0==d%3||(d=a.data[d-1],c<d&&(c=d));f=new Lb;f.data=[];f.length=0;f.fixed=!1;g=1;for(e+=1;g<e;)if(d=g++,!b||0!=d%3){if(!f.fixed){f.length++;if(f.data.length<f.length){var k;k=Array(f.data.length+10);H.blit(f.data,0,k,0,f.data.length);f.data=k}f.data[f.length-
1]=a.data[d-1]/c}f.length}return{max:c,uvt:f}};v.playCommands=function(a,b){null==b&&(b=!1);v.bounds=v.graphics.__bounds;for(var c=v.bounds.x,d=v.bounds.y,e=0,f=0,g=!1,k=0,p=0,h=new Ke(a),l=0,m=a.types;l<m.length;){var n=m[l];++l;switch(n[1]){case 3:n=h.readCubicCurveTo();v.context.bezierCurveTo(Fa.get_controlX1(n)-c,Fa.get_controlY1(n)-d,Fa.get_controlX2(n)-c,Fa.get_controlY2(n)-d,Fa.get_anchorX(n)-c,Fa.get_anchorY(n)-d);break;case 4:n=h.readCurveTo();v.context.quadraticCurveTo(Za.get_controlX(n)-
c,Za.get_controlY(n)-d,Za.get_anchorX(n)-c,Za.get_anchorY(n)-d);break;case 5:n=h.readDrawCircle();v.context.moveTo(jb.get_x(n)-c+jb.get_radius(n),jb.get_y(n)-d);v.context.arc(jb.get_x(n)-c,jb.get_y(n)-d,jb.get_radius(n),0,2*Math.PI,!0);break;case 6:var q=h.readDrawEllipse(),n=cb.get_x(q),u=cb.get_y(q),r=cb.get_width(q),t=cb.get_height(q),n=n-c,u=u-d,q=r/2*.5522848,y=t/2*.5522848,z=n+r,x=u+t,r=n+r/2,t=u+t/2;v.context.moveTo(n,t);v.context.bezierCurveTo(n,t-y,r-q,u,r,u);v.context.bezierCurveTo(r+q,
u,z,t-y,z,t);v.context.bezierCurveTo(z,t+y,r+q,x,r,x);v.context.bezierCurveTo(r-q,x,n,t+y,n,t);break;case 9:n=h.readDrawRoundRect();v.drawRoundRect(Na.get_x(n)-c,Na.get_y(n)-d,Na.get_width(n),Na.get_height(n),Na.get_ellipseWidth(n),Na.get_ellipseHeight(n));break;case 16:f=h.readLineTo();v.context.lineTo(Hb.get_x(f)-c,Hb.get_y(f)-d);e=Hb.get_x(f);f=Hb.get_y(f);break;case 17:p=h.readMoveTo();v.context.moveTo(yb.get_x(p)-c,yb.get_y(p)-d);e=yb.get_x(p);f=yb.get_y(p);g=!0;k=yb.get_x(p);p=yb.get_y(p);break;
case 15:n=h.readLineStyle();b&&v.hasStroke&&(v.context.closePath(),v.hitTesting||v.context.stroke(),v.context.beginPath());v.context.moveTo(e-c,f-d);if(null==Ga.get_thickness(n))v.hasStroke=!1;else{0<Ga.get_thickness(n)?v.context.lineWidth=Ga.get_thickness(n):v.context.lineWidth=1;null==Ga.get_joints(n)?v.context.lineJoin="round":v.context.lineJoin=Ig.toString(Ga.get_joints(n)).toLowerCase();if(null==Ga.get_caps(n))v.context.lineCap="round";else switch(Ga.get_caps(n)){case 0:v.context.lineCap="butt";
break;default:v.context.lineCap=Jg.toString(Ga.get_caps(n)).toLowerCase()}v.context.miterLimit=Ga.get_miterLimit(n);1==Ga.get_alpha(n)?v.context.strokeStyle="#"+Ca.hex(Ga.get_color(n)&16777215,6):(u=(Ga.get_color(n)&16711680)>>>16,q=(Ga.get_color(n)&65280)>>>8,y=Ga.get_color(n)&255,v.context.strokeStyle="rgba("+u+", "+q+", "+y+", "+Ga.get_alpha(n)+")");v.hasStroke=!0}break;case 14:n=h.readLineGradientStyle();b&&v.hasStroke&&v.closePath();v.context.moveTo(e-c,f-d);v.context.strokeStyle=v.createGradientPattern($a.get_type(n),
$a.get_colors(n),$a.get_alphas(n),$a.get_ratios(n),$a.get_matrix(n),$a.get_spreadMethod(n),$a.get_interpolationMethod(n),$a.get_focalPointRatio(n));v.hasStroke=!0;break;case 13:n=h.readLineBitmapStyle();b&&v.hasStroke&&v.closePath();v.context.moveTo(e-c,f-d);v.context.strokeStyle=v.createBitmapFill(pc.get_bitmap(n),pc.get_repeat(n));v.hasStroke=!0;break;case 0:n=h.readBeginBitmapFill();v.context.fillStyle=v.createBitmapFill(lb.get_bitmap(n),!0);v.hasFill=!0;null!=lb.get_matrix(n)?(v.pendingMatrix=
lb.get_matrix(n),v.inversePendingMatrix=lb.get_matrix(n).clone(),v.inversePendingMatrix.invert()):(v.pendingMatrix=null,v.inversePendingMatrix=null);break;case 1:n=h.readBeginFill();.005>Yb.get_alpha(n)?v.hasFill=!1:(1==Yb.get_alpha(n)?v.context.fillStyle="#"+Ca.hex(Yb.get_color(n),6):(u=(Yb.get_color(n)&16711680)>>>16,q=(Yb.get_color(n)&65280)>>>8,y=Yb.get_color(n)&255,v.context.fillStyle="rgba("+u+", "+q+", "+y+", "+Yb.get_alpha(n)+")"),v.bitmapFill=null,v.hasFill=!0);break;case 2:n=h.readBeginGradientFill();
v.context.fillStyle=v.createGradientPattern(Qa.get_type(n),Qa.get_colors(n),Qa.get_alphas(n),Qa.get_ratios(n),Qa.get_matrix(n),Qa.get_spreadMethod(n),Qa.get_interpolationMethod(n),Qa.get_focalPointRatio(n));v.bitmapFill=null;v.hasFill=!0;break;case 8:n=h.readDrawRect();u=!1;null!=v.bitmapFill&&(x=z=r=q=0,y=!0,null!=v.pendingMatrix?0!=v.pendingMatrix.b||0!=v.pendingMatrix.c?y=!1:(z=v.inversePendingMatrix.transformPoint(new W(Ua.get_x(n),Ua.get_y(n))),r=v.inversePendingMatrix.transformPoint(new W(Ua.get_x(n)+
Ua.get_width(n),Ua.get_y(n)+Ua.get_height(n))),q=z.y,x=z.x,z=r.y,r=r.x):(q=Ua.get_y(n),x=Ua.get_x(n),z=Ua.get_y(n)+Ua.get_height(n),r=Ua.get_x(n)+Ua.get_width(n)),y&&0<=q&&0<=x&&r<=v.bitmapFill.width&&z<=v.bitmapFill.height&&(u=!0,v.hitTesting||v.context.drawImage(v.bitmapFill.image.get_src(),x,q,r-x,z-q,Ua.get_x(n)-c,Ua.get_y(n)-d,Ua.get_width(n),Ua.get_height(n))));u||v.context.rect(Ua.get_x(n)-c,Ua.get_y(n)-d,Ua.get_width(n),Ua.get_height(n));break;default:h.skip(n)}}h.destroy();b&&v.hasStroke&&
(v.hasFill&&g?v.context.lineTo(k-c,p-d):g&&e==k&&f==p&&v.context.closePath(),v.hitTesting||v.context.stroke());b||!v.hasFill&&null==v.bitmapFill||(v.context.translate(-v.bounds.x,-v.bounds.y),null!=v.pendingMatrix?(v.context.transform(v.pendingMatrix.a,v.pendingMatrix.b,v.pendingMatrix.c,v.pendingMatrix.d,v.pendingMatrix.tx,v.pendingMatrix.ty),v.hitTesting||v.context.fill(),v.context.transform(v.inversePendingMatrix.a,v.inversePendingMatrix.b,v.inversePendingMatrix.c,v.inversePendingMatrix.d,v.inversePendingMatrix.tx,
v.inversePendingMatrix.ty)):v.hitTesting||v.context.fill(),v.context.translate(v.bounds.x,v.bounds.y),v.context.closePath())};v.render=function(a,b){if(a.__dirty){v.hitTesting=!1;v.graphics=a;v.bounds=a.__bounds;if(!a.__visible||0==a.__commands.get_length()||null==v.bounds||0>=v.bounds.width||0>=v.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"));v.context=a.__context;a.__canvas.width=
Math.ceil(v.bounds.width);a.__canvas.height=Math.ceil(v.bounds.height);v.fillCommands.clear();v.strokeCommands.clear();v.hasFill=!1;v.hasStroke=!1;v.bitmapFill=null;v.bitmapRepeat=!1;var c=new Ke(a.__commands),d=0,e=a.__commands.types;try{for(;d<e.length;){var f=e[d];++d;switch(f[1]){case 3:var g=c.readCubicCurveTo();v.fillCommands.cubicCurveTo(Fa.get_controlX1(g),Fa.get_controlY1(g),Fa.get_controlX2(g),Fa.get_controlY2(g),Fa.get_anchorX(g),Fa.get_anchorY(g));v.strokeCommands.cubicCurveTo(Fa.get_controlX1(g),
Fa.get_controlY1(g),Fa.get_controlX2(g),Fa.get_controlY2(g),Fa.get_anchorX(g),Fa.get_anchorY(g));break;case 4:var k=c.readCurveTo();v.fillCommands.curveTo(Za.get_controlX(k),Za.get_controlY(k),Za.get_anchorX(k),Za.get_anchorY(k));v.strokeCommands.curveTo(Za.get_controlX(k),Za.get_controlY(k),Za.get_anchorX(k),Za.get_anchorY(k));break;case 16:var h=c.readLineTo();v.fillCommands.lineTo(Hb.get_x(h),Hb.get_y(h));v.strokeCommands.lineTo(Hb.get_x(h),Hb.get_y(h));break;case 17:var l=c.readMoveTo();v.fillCommands.moveTo(yb.get_x(l),
yb.get_y(l));v.strokeCommands.moveTo(yb.get_x(l),yb.get_y(l));break;case 12:c.readEndFill();v.endFill();v.endStroke();v.hasFill=!1;v.bitmapFill=null;break;case 15:var m=c.readLineStyle();v.strokeCommands.lineStyle(Ga.get_thickness(m),Ga.get_color(m),Ga.get_alpha(m),Ga.get_pixelHinting(m),Ga.get_scaleMode(m),Ga.get_caps(m),Ga.get_joints(m),Ga.get_miterLimit(m));break;case 14:var n=c.readLineGradientStyle();v.strokeCommands.lineGradientStyle($a.get_type(n),$a.get_colors(n),$a.get_alphas(n),$a.get_ratios(n),
$a.get_matrix(n),$a.get_spreadMethod(n),$a.get_interpolationMethod(n),$a.get_focalPointRatio(n));break;case 13:var q=c.readLineBitmapStyle();v.strokeCommands.lineBitmapStyle(pc.get_bitmap(q),pc.get_matrix(q),pc.get_repeat(q),pc.get_smooth(q));break;case 0:case 1:case 2:v.endFill();v.endStroke();if(f==Z.BEGIN_BITMAP_FILL){var r=c.readBeginBitmapFill();v.fillCommands.beginBitmapFill(lb.get_bitmap(r),lb.get_matrix(r),lb.get_repeat(r),lb.get_smooth(r));v.strokeCommands.beginBitmapFill(lb.get_bitmap(r),
lb.get_matrix(r),lb.get_repeat(r),lb.get_smooth(r))}else if(f==Z.BEGIN_GRADIENT_FILL){var t=c.readBeginGradientFill();v.fillCommands.beginGradientFill(Qa.get_type(t),Qa.get_colors(t),Qa.get_alphas(t),Qa.get_ratios(t),Qa.get_matrix(t),Qa.get_spreadMethod(t),Qa.get_interpolationMethod(t),Qa.get_focalPointRatio(t));v.strokeCommands.beginGradientFill(Qa.get_type(t),Qa.get_colors(t),Qa.get_alphas(t),Qa.get_ratios(t),Qa.get_matrix(t),Qa.get_spreadMethod(t),Qa.get_interpolationMethod(t),Qa.get_focalPointRatio(t))}else{var y=
c.readBeginFill();v.fillCommands.beginFill(Yb.get_color(y),Yb.get_alpha(y));v.strokeCommands.beginFill(Yb.get_color(y),Yb.get_alpha(y))}break;case 5:var x=c.readDrawCircle();v.fillCommands.drawCircle(jb.get_x(x),jb.get_y(x),jb.get_radius(x));v.strokeCommands.drawCircle(jb.get_x(x),jb.get_y(x),jb.get_radius(x));break;case 6:var A=c.readDrawEllipse();v.fillCommands.drawEllipse(cb.get_x(A),cb.get_y(A),cb.get_width(A),cb.get_height(A));v.strokeCommands.drawEllipse(cb.get_x(A),cb.get_y(A),cb.get_width(A),
cb.get_height(A));break;case 8:var z=c.readDrawRect();v.fillCommands.drawRect(Ua.get_x(z),Ua.get_y(z),Ua.get_width(z),Ua.get_height(z));v.strokeCommands.drawRect(Ua.get_x(z),Ua.get_y(z),Ua.get_width(z),Ua.get_height(z));break;case 9:var B=c.readDrawRoundRect();v.fillCommands.drawRoundRect(Na.get_x(B),Na.get_y(B),Na.get_width(B),Na.get_height(B),Na.get_ellipseWidth(B),Na.get_ellipseHeight(B));v.strokeCommands.drawRoundRect(Na.get_x(B),Na.get_y(B),Na.get_width(B),Na.get_height(B),Na.get_ellipseWidth(B),
Na.get_ellipseHeight(B));break;case 11:v.endFill();v.endStroke();var C=c.readDrawTriangles(),G=oc.get_vertices(C),I=oc.get_indices(C),E=oc.get_uvtData(C),F=null,L=null==v.bitmapFill;if(L&&null!=E)throw"__break__";if(!L){if(null==E){var K;K=new Lb;K.data=[];K.length=0;K.fixed=!1;for(var E=K,J=0,M=G.length/2|0;J<M;){var P=J++;if(!E.fixed){E.length++;if(E.data.length<E.length){var O;O=Array(E.data.length+10);H.blit(E.data,0,O,0,E.data.length);E.data=O}E.data[E.length-1]=G.data[2*P]/v.bitmapFill.width}E.length;
if(!E.fixed){E.length++;if(E.data.length<E.length){var N;N=Array(E.data.length+10);H.blit(E.data,0,N,0,E.data.length);E.data=N}E.data[E.length-1]=G.data[2*P+1]/v.bitmapFill.height}E.length}}var Q=v.normalizeUVT(E,E.length!=G.length),R=Q.max,E=Q.uvt,F=1<R?v.createTempPatternCanvas(v.bitmapFill,v.bitmapRepeat,v.bounds.width|0,v.bounds.height|0):v.createTempPatternCanvas(v.bitmapFill,v.bitmapRepeat,v.bitmapFill.width,v.bitmapFill.height)}for(var J=0,U=I.length,S,T,V,W,X,Y,aa,ba,fa,ca,da,ea,ha,ia,ja,
na,oa,ka,la,ma,pa,ra,sa,ta,ua,va,wa,xa;J<U;){S=J;T=J+1;V=J+2;W=2*I.data[S];X=2*I.data[S]+1;Y=2*I.data[T];aa=2*I.data[T]+1;ba=2*I.data[V];fa=2*I.data[V]+1;ca=G.data[W];da=G.data[X];ea=G.data[Y];ha=G.data[aa];ia=G.data[ba];ja=G.data[fa];switch(oc.get_culling(C)){case 2:if(!(0>(ea-ca)*(ja-da)-(ha-da)*(ia-ca))){J+=3;continue}break;case 0:if(0>(ea-ca)*(ja-da)-(ha-da)*(ia-ca)){J+=3;continue}}L?(v.context.beginPath(),v.context.moveTo(ca,da),v.context.lineTo(ea,ha),v.context.lineTo(ia,ja),v.context.closePath(),
v.hitTesting||v.context.fill()):(v.context.save(),v.context.beginPath(),v.context.moveTo(ca,da),v.context.lineTo(ea,ha),v.context.lineTo(ia,ja),v.context.closePath(),v.context.clip(),na=E.data[W]*F.width,ka=E.data[Y]*F.width,ma=E.data[ba]*F.width,oa=E.data[X]*F.height,la=E.data[aa]*F.height,pa=E.data[fa]*F.height,ra=na*(pa-la)-ka*pa+ma*la+(ka-ma)*oa,0!=ra&&(sa=-(oa*(ia-ea)-la*ia+pa*ea+(la-pa)*ca)/ra,ta=(la*ja+oa*(ha-ja)-pa*ha+(pa-la)*da)/ra,ua=(na*(ia-ea)-ka*ia+ma*ea+(ka-ma)*ca)/ra,va=-(ka*ja+na*
(ha-ja)-ma*ha+(ma-ka)*da)/ra,wa=(na*(pa*ea-la*ia)+oa*(ka*ia-ma*ea)+(ma*la-ka*pa)*ca)/ra,xa=(na*(pa*ha-la*ja)+oa*(ka*ja-ma*ha)+(ma*la-ka*pa)*da)/ra,v.context.transform(sa,ta,ua,va,wa,xa),v.context.drawImage(F,0,0),v.context.restore()));J+=3}break;case 10:var ga=c.readDrawTiles(),za=0<(qa.get_flags(ga)&1),Ca=v.bounds.x,Ia=v.bounds.y,Da=0<(qa.get_flags(ga)&2),Ea=0<(qa.get_flags(ga)&16),Ka=0<(qa.get_flags(ga)&4),Ja=0<(qa.get_flags(ga)&8),Ha=0<(qa.get_flags(ga)&32),Oa=0<(qa.get_flags(ga)&64),Pa=0<(qa.get_flags(ga)&
65536);Ea&&(Da=za=!1);var Ra=J=F=0,Ma=0,Aa=3;Ha&&(Aa=Oa?8:6);za&&(F=Aa,Aa++);Da&&(J=Aa,Aa++);Ea&&(Ma=Aa,Aa+=4);Ka&&(Aa+=3);Ja&&(Ra=Aa,Aa++);var Ta=qa.get_tileData(ga).length;0<=qa.get_count(ga)&&Ta>qa.get_count(ga)&&(Ta=qa.get_count(ga));var ya=0,Sa=null,Va=null,Ya=-1,ab;qa.get_sheet(ga).__bitmap.__sync();ab=qa.get_sheet(ga).__bitmap.image.get_src();Pa&&(v.context.globalCompositeOperation="lighter");for(;ya<Ta;){var Wa;Wa=Ha?-1:u["int"](qa.get_tileData(ga)[ya+2]);Ha||Wa==Ya?Ha&&(Sa=qa.get_sheet(ga).__rectTile,
Sa.setTo(qa.get_tileData(ga)[ya+2],qa.get_tileData(ga)[ya+3],qa.get_tileData(ga)[ya+4],qa.get_tileData(ga)[ya+5]),Va=qa.get_sheet(ga).__point,Oa?Va.setTo(qa.get_tileData(ga)[ya+6],qa.get_tileData(ga)[ya+7]):Va.setTo(0,0)):(Sa=qa.get_sheet(ga).__tileRects[Wa],Va=qa.get_sheet(ga).__centerPoints[Wa],Ya=Wa);if(null!=Sa&&0<Sa.width&&0<Sa.height&&null!=Va){v.context.save();v.context.translate(qa.get_tileData(ga)[ya]-Ca,qa.get_tileData(ga)[ya+1]-Ia);Da&&v.context.rotate(qa.get_tileData(ga)[ya+J]);var Xa=
1;za&&(Xa=qa.get_tileData(ga)[ya+F]);Ea&&v.context.transform(qa.get_tileData(ga)[ya+Ma],qa.get_tileData(ga)[ya+Ma+1],qa.get_tileData(ga)[ya+Ma+2],qa.get_tileData(ga)[ya+Ma+3],0,0);Ja&&(v.context.globalAlpha=qa.get_tileData(ga)[ya+Ra]);v.context.imageSmoothingEnabled=qa.get_smooth(ga);v.context.drawImage(ab,Sa.x,Sa.y,Sa.width,Sa.height,-Va.x*Xa,-Va.y*Xa,Sa.width*Xa,Sa.height*Xa);v.context.restore()}ya+=Aa}Pa&&(v.context.globalCompositeOperation="source-over");break;default:c.skip(f)}}}catch(bb){if("__break__"!=
bb)throw bb;}0<v.fillCommands.get_length()&&v.endFill();0<v.strokeCommands.get_length()&&v.endStroke();c.destroy();a.__bitmap=Ba.fromCanvas(a.__canvas)}a.set___dirty(!1)}};v.renderMask=function(a,b){if(0!=a.__commands.get_length()){v.context=b.context;for(var c=new Ke(a.__commands),d=0,e=a.__commands.types;d<e.length;){var f=e[d];++d;switch(f[1]){case 3:f=c.readCubicCurveTo();v.context.bezierCurveTo(Fa.get_controlX1(f)-0,Fa.get_controlY1(f)-0,Fa.get_controlX2(f)-0,Fa.get_controlY2(f)-0,Fa.get_anchorX(f)-
0,Fa.get_anchorY(f)-0);Fa.get_anchorX(f);Fa.get_anchorY(f);break;case 4:f=c.readCurveTo();v.context.quadraticCurveTo(Za.get_controlX(f)-0,Za.get_controlY(f)-0,Za.get_anchorX(f)-0,Za.get_anchorY(f)-0);Za.get_anchorX(f);Za.get_anchorY(f);break;case 5:f=c.readDrawCircle();v.context.arc(jb.get_x(f)-0,jb.get_y(f)-0,jb.get_radius(f),0,2*Math.PI,!0);break;case 6:var g=c.readDrawEllipse(),f=cb.get_x(g),k=cb.get_y(g),h=cb.get_width(g),l=cb.get_height(g),f=f-0,k=k-0,g=h/2*.5522848,m=l/2*.5522848,n=f+h,q=k+
l,h=f+h/2,l=k+l/2;v.context.moveTo(f,l);v.context.bezierCurveTo(f,l-m,h-g,k,h,k);v.context.bezierCurveTo(h+g,k,n,l-m,n,l);v.context.bezierCurveTo(n,l+m,h+g,q,h,q);v.context.bezierCurveTo(h-g,q,f,l+m,f,l);break;case 8:f=c.readDrawRect();v.context.rect(Ua.get_x(f)-0,Ua.get_y(f)-0,Ua.get_width(f),Ua.get_height(f));break;case 9:f=c.readDrawRoundRect();v.drawRoundRect(Na.get_x(f)-0,Na.get_y(f)-0,Na.get_width(f),Na.get_height(f),Na.get_ellipseWidth(f),Na.get_ellipseHeight(f));break;case 16:f=c.readLineTo();
v.context.lineTo(Hb.get_x(f)-0,Hb.get_y(f)-0);Hb.get_x(f);Hb.get_y(f);break;case 17:f=c.readMoveTo();v.context.moveTo(yb.get_x(f)-0,yb.get_y(f)-0);yb.get_x(f);yb.get_y(f);break;default:c.skip(f)}}c.destroy()}};var Jh=function(a){this.renderSession=a};n["openfl._internal.renderer.canvas.CanvasMaskManager"]=Jh;Jh.__name__=["openfl","_internal","renderer","canvas","CanvasMaskManager"];Jh.__super__=Je;Jh.prototype=L(Je.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__:Jh});var ek=function(a,b,c){Yc.call(this,a,b);this.context=c;this.renderSession=new Zf;this.renderSession.context=
c;this.renderSession.roundPixels=!0;this.renderSession.renderer=this;this.renderSession.maskManager=new Jh(this.renderSession)};n["openfl._internal.renderer.canvas.CanvasRenderer"]=ek;ek.__name__=["openfl","_internal","renderer","canvas","CanvasRenderer"];ek.__super__=Yc;ek.prototype=L(Yc.prototype,{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__:ek});var Vm=function(){};n["openfl._internal.renderer.canvas.CanvasShape"]=Vm;Vm.__name__=["openfl","_internal","renderer","canvas","CanvasShape"];Vm.render=function(a,b){if(a.__renderable&&!(0>=a.__worldAlpha)){var c=a.__graphics;if(null!=c&&(v.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 Db=function(){};n["openfl._internal.renderer.canvas.CanvasTextField"]=Db;Db.__name__=["openfl","_internal","renderer","canvas","CanvasTextField"];Db.context=null;Db.disableInputMode=function(a){};Db.enableInputMode=function(a){a.__cursorPosition=-1;if(null==a.__hiddenInput){a.__hiddenInput=window.document.createElement("input");var b=a.__hiddenInput;b.type="text";b.style.position="absolute";b.style.opacity="0";b.style.color="transparent";b.style.left="0px";b.style.top="50%";(new Rd("(iPad|iPhone|iPod).*OS 8_",
"gi")).match(window.navigator.userAgent)?(b.style.fontSize="0px",b.style.width="0px",b.style.height="0px"):(b.style.width="1px",b.style.height="1px");b.style.pointerEvents="none";b.style.zIndex="-10000000";0<a.maxChars&&(b.maxLength=a.maxChars);window.document.body.appendChild(b);b.value=a.text}};Db.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)&&2!=c.autoSize)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 jc),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;Db.context=e.__context;if(null!=c.text&&""!=c.text||c.__hasFocus){var f=c.text;if(c.displayAsPassword){for(var f=f.length,
g="",k=0;k<f;)k++,g+="*";f=g}e.__canvas.width=Math.ceil(d.width);e.__canvas.height=Math.ceil(d.height);0!=c.antiAliasType||1!=c.gridFitType?(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)Db.context.rect(.5,.5,d.width-1,d.height-1),c.background&&(Db.context.fillStyle="#"+Ca.hex(c.backgroundColor,
6),Db.context.fill()),c.border&&(Db.context.lineWidth=1,Db.context.strokeStyle="#"+Ca.hex(c.borderColor,6),Db.context.stroke());Db.context.textBaseline="top";Db.context.textAlign="start";for(var d=-a.get_scrollH(),k=g=0,h=a.get_scrollV()-1;k<h;)var l=k++,g=g-c.lineHeights[l];for(var m,k=0,h=(new Rd("(iPad|iPhone|iPod|Firefox)","g")).match(window.navigator.userAgent),l=0,n=c.layoutGroups;l<n.length;){var q=n[l];++l;if(!(q.lineIndex<a.get_scrollV()-1)){if(q.lineIndex>a.get_scrollV()+c.bottomScrollV-
2)break;Db.context.font=ob.getFont(q.format);Db.context.fillStyle="#"+Ca.hex(q.format.color,6);h&&(k=.185*q.format.size);Db.context.fillText(f.substring(q.startIndex,q.endIndex),q.offsetX+d,q.offsetY+k+g);if(-1<a.__caretIndex&&c.selectable)if(a.__selectionIndex==a.__caretIndex){if(a.__showCursor&&q.startIndex<=a.__caretIndex&&q.endIndex>=a.__caretIndex){for(var r=m=0,t=a.__caretIndex-q.startIndex;r<t;){var v=r++;if(q.advances.length<=v)break;m+=q.advances[v]}Db.context.fillRect(q.offsetX+m,q.offsetY,
1,q.height)}}else if(q.startIndex<=a.__caretIndex&&q.endIndex>=a.__caretIndex||q.startIndex<=a.__selectionIndex&&q.endIndex>=a.__selectionIndex)m=u["int"](Math.min(a.__selectionIndex,a.__caretIndex)),r=u["int"](Math.max(a.__selectionIndex,a.__caretIndex)),q.startIndex>m&&(m=q.startIndex),q.endIndex<r&&(r=q.endIndex),t=a.getCharBoundaries(m),r>=c.text.length?(v=a.getCharBoundaries(c.text.length-1),v.x+=v.width+2):v=a.getCharBoundaries(r),null!=t&&null!=v&&(Db.context.fillStyle="#000000",Db.context.fillRect(t.x,
t.y,v.x-t.x,q.height),Db.context.fillStyle="#FFFFFF",Db.context.fillText(f.substring(m,r),d+t.x,q.offsetY+k+g))}}}else if(e.__canvas.width=Math.ceil(d.width),e.__canvas.height=Math.ceil(d.height),c.border||c.background)c.border?Db.context.rect(.5,.5,d.width-1,d.height-1):Db.context.rect(0,0,d.width,d.height),c.background&&(Db.context.fillStyle="#"+Ca.hex(c.backgroundColor,6),Db.context.fill()),c.border&&(Db.context.lineWidth=1,Db.context.lineCap="square",Db.context.strokeStyle="#"+Ca.hex(c.borderColor,
6),Db.context.stroke());e.__bitmap=Ba.fromCanvas(a.__graphics.__canvas);a.__dirty=!1;e.set___dirty(!1)}}};var fm=function(a,b,c){Yc.call(this,a,b);throw new F("ConsoleRenderer not supported");};n["openfl._internal.renderer.console.ConsoleRenderer"]=fm;fm.__name__=["openfl","_internal","renderer","console","ConsoleRenderer"];fm.__super__=Yc;fm.prototype=L(Yc.prototype,{render:function(a){},__class__:fm});var Lf=function(){};n["openfl._internal.renderer.dom.DOMBitmap"]=Lf;Lf.__name__=["openfl","_internal",
"renderer","dom","DOMBitmap"];Lf.render=function(a,b){null!=a.stage&&a.__worldVisible&&a.__renderable&&null!=a.bitmapData&&a.bitmapData.__isValid?null!=a.bitmapData.image.buffer.__srcImage?Lf.renderImage(a,b):Lf.renderCanvas(a,b):(null!=a.__image&&(b.element.removeChild(a.__image),a.__image=null,a.__style=null),null!=a.__canvas&&(b.element.removeChild(a.__canvas),a.__canvas=null,a.__style=null))};Lf.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),Hd.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);Hd.applyStyle(a,b,!0,!1,!0)};
Lf.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,Hd.initializeElement(a,a.__image,b));Hd.applyStyle(a,b,!0,!0,!0)};var fk=function(a){this.renderSession=a};n["openfl._internal.renderer.dom.DOMMaskManager"]=fk;fk.__name__=["openfl","_internal","renderer","dom","DOMMaskManager"];fk.__super__=Je;fk.prototype=L(Je.prototype,{pushMask:function(a){},
pushRect:function(a,b){},popMask:function(){},__class__:fk});var Hd=function(a,b,c){Yc.call(this,a,b);this.element=c;this.renderSession=new Zf;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 fk(this.renderSession);this.renderSession.renderer=this};n["openfl._internal.renderer.dom.DOMRenderer"]=Hd;Hd.__name__=["openfl","_internal","renderer","dom","DOMRenderer"];Hd.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=Oa.__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)))};Hd.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};Hd.__super__=Yc;Hd.prototype=L(Yc.prototype,{render:function(a){this.element.style.background=a.__colorString;this.renderSession.z=
1;a.__renderDOM(this.renderSession)},__class__:Hd});var Wm=function(){};n["openfl._internal.renderer.dom.DOMShape"]=Wm;Wm.__name__=["openfl","_internal","renderer","dom","DOMShape"];Wm.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)v.render(c,b),null!=c.__canvas?(null==a.__canvas&&(a.__canvas=window.document.createElement("canvas"),a.__context=a.__canvas.getContext("2d"),Hd.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=Oa.__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)}Hd.applyStyle(a,b,!1,!1,!0)}}else null!=a.__canvas&&(b.element.removeChild(a.__canvas),a.__canvas=null,a.__style=null)};var gm=function(){};n["openfl._internal.renderer.dom.DOMTextField"]=gm;gm.__name__=["openfl","_internal","renderer","dom","DOMTextField"];gm.measureText=function(a){var b=a.__textEngine,
c=a.__div;null==c&&(c=window.document.createElement("div"),c.innerHTML=(new Rd("\n","g")).replace(b.text,"<br>"),c.style.setProperty("font",ob.getFont(a.__textFormat),null),c.style.setProperty("pointer-events","none",null),c.style.position="absolute",c.style.top="110%",window.document.body.appendChild(c));b.__measuredWidth=c.clientWidth;null==a.__div&&(c.style.width=u.string(b.width-4)+"px");b.__measuredHeight=c.clientHeight;null==a.__div&&window.document.body.removeChild(c)};gm.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||1==c.type){null==a.__div&&(a.__div=window.document.createElement("div"),Hd.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=1==c.type;var d=a.__style;a.__div.innerHTML=c.text;c.background?d.setProperty("background-color","#"+Ca.hex(c.backgroundColor,6),null):d.removeProperty("background-color");c.border?d.setProperty("border","solid 1px #"+Ca.hex(c.borderColor,6),null):d.removeProperty("border");d.setProperty("font",ob.getFont(a.__textFormat),null);d.setProperty("color","#"+Ca.hex(a.__textFormat.color,6),null);2!=c.autoSize?d.setProperty("width",
"auto",null):d.setProperty("width",c.width+"px",null);d.setProperty("height",c.height+"px",null);switch(a.__textFormat.align){case 0:d.setProperty("text-align","center",null);break;case 4: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&&Hd.applyStyle(a,b,!0,!0,!1)}else null!=a.__div&&(b.element.removeChild(a.__div),a.__div=null,a.__style=null)};var Ic=function(){};
n["openfl._internal.renderer.opengl.GLBitmap"]=Ic;Ic.__name__=["openfl","_internal","renderer","opengl","GLBitmap"];Ic.render=function(a,b){!a.__renderable||0>=a.__worldAlpha||null==a.bitmapData||!a.bitmapData.__isValid||b.spriteBatch.renderBitmapData(a.bitmapData,a.smoothing,a.__renderTransform,a.__worldColorTransform,a.__worldAlpha,a.__blendMode,a.__shader,a.pixelSnapping)};Ic.pushFramebuffer=function(a,b,c,d,e,f,g){null==g&&(g=!0);null==f&&(f=!1);null==e&&(e=!0);var k=a.gl;if(null==k)return null;
var h=a.renderer,l=c.x|0,m=c.y|0,n=c.width|0,q=c.height|0;a.spriteBatch.finish();0>=Ic.fbData.length&&Ic.fbData.push({texture:null,viewPort:null,transparent:h.transparent});null==b&&(b=new hm(k,n,q,d,g));b.resize(n,q);h.transparent=e;a.maskManager.saveState();k.bindFramebuffer(k.FRAMEBUFFER,(b.__swapped?b.__texture1:b.__texture0).frameBuffer);h.setViewport(l,m,n,q);k.colorMask(!0,!0,!0,!0);a.blendModeManager.setBlendMode(10);f&&(b.__swapped?b.__texture1:b.__texture0).clear(0,0,0,0,null);Ic.fbData.push({texture:b,
viewPort:c,transparent:e});return b};Ic.drawBitmapDrawable=function(a,b,c,d,e,f,g){var k=Ic.fbData[Ic.fbData.length-1];if(null==k)throw new F("No data to draw to");var h=a.gl;if(null!=h){var k=k.viewPort,l=a.spriteBatch,m=null!=b;g=null==g?new ha(k.x,k.y,k.width,k.height):g.clone();l.begin(a,m?null:g);m&&(b.__worldTransform.identity(),Ic.flipMatrix(b.__worldTransform,k.height),b.__renderGL(a),l.stop(),null!=b.__texture&&h.deleteTexture(b.__texture),b.__texture=null,l.start(g));b=c.__worldColorTransform;
h=c.__blendMode;g=c.__cacheAsBitmap;d=null!=d?d.clone():new Oa;Ic.flipMatrix(d,k.height);c.__worldColorTransform=null!=e?e:new yd;c.__blendMode=f;wa.__cacheAsBitmapMode=!0;c.__updateTransforms(d);c.__updateChildren(!1);c.__cacheAsBitmap=!1;c.__renderGL(a);c.__cacheAsBitmap=g;c.__worldColorTransform=b;c.__blendMode=h;wa.__cacheAsBitmapMode=!1;c.__updateTransforms();c.__updateChildren(!1)}};Ic.popFramebuffer=function(a,b){var c=a.gl;if(null!=c){a.spriteBatch.finish();Ic.fbData.pop();var d=Ic.fbData[Ic.fbData.length-
1];if(null==d)throw new F("oh");var e,f,g,k;null==d.viewPort?(e=f=0,g=a.renderer.width,k=a.renderer.height):(e=Math.floor(d.viewPort.x),f=Math.floor(d.viewPort.y),g=Math.ceil(d.viewPort.width),k=Math.ceil(d.viewPort.height));null!=b&&(b.width==g&&b.height==k||b.resize(g,k),c.readPixels(e,f,g,k,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,g,k);a.renderer.transparent=
d.transparent;a.maskManager.restoreState()}};Ic.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 Pc=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;Yc.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=Pc.glContextId++;this.gl=c;this.defaultFramebuffer=null;Pc.glContexts[this._glContextId]=c;this.projectionMatrix=new Oa;this.projection=new W;this.projection.x=this.width/2;this.projection.y=-this.height/2;this.offset=new W(0,0);this.resize(this.width,this.height);this.contextLost=!1;this.shaderManager=new Kh(c);this.spriteBatch=new gk(c);this.filterManager=new im(c,this.transparent);this.stencilManager=new jm(c);this.blendModeManager=new km(c);this.renderSession=new Zf;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 hk(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)};n["openfl._internal.renderer.opengl.GLRenderer"]=Pc;Pc.__name__=["openfl","_internal","renderer","opengl","GLRenderer"];Pc.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=Oa.__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,0)}};Pc.__super__=Yc;Pc.prototype=L(Yc.prototype,{destroy:function(){this.offset=this.projection=Pc.glContexts[this._glContextId]=null;this.shaderManager.destroy();this.spriteBatch.destroy();this.maskManager.destroy();this.filterManager.destroy();this.renderSession=this.gl=this.filterManager=
this.maskManager=this.spriteBatch=this.shaderManager=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},handleContextLost:function(a){a.preventDefault();this.contextLost=!0},handleContextRestored:function(){var a=
this.gl;Pc.glContextId++;this.shaderManager.setContext(a);this.spriteBatch.setContext(a);this.maskManager.setContext(a);this.filterManager.setContext(a);this.renderSession.gl=a;this.defaultFramebuffer=null;a.disable(a.DEPTH_TEST);a.disable(a.CULL_FACE);a.enable(a.BLEND);a.colorMask(!0,!0,!0,this.transparent);this.setViewport(0,0,this.width,this.height);this.contextLost=!1},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(10);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;Yc.prototype.resize.call(this,a,b);this.setViewport(0,0,a,b);this.projection.x=a/2;this.projection.y=-b/2},__class__:Pc});var Ob=function(a){this.wrapS=this.wrapT=33071;this.compiled=!1;this.uniforms=new ma;this.attributes=new ma;this.ID=Ob.UID++;this.gl=a;this.program=null};n["openfl._internal.renderer.opengl.shaders2.Shader"]=Ob;Ob.__name__="openfl _internal renderer opengl shaders2 Shader".split(" ");Ob.compileProgram=function(a,b,c){var d=Kh.compiledShadersCache,
e=Pf.encode(b+c);if(null!=Ab[e]?d.existsReserved(e):d.h.hasOwnProperty(e))return null!=Ab[e]?d.getReserved(e):d.h[e];b=Ob.compileShader(a,b,a.VERTEX_SHADER);c=Ob.compileShader(a,c,a.FRAGMENT_SHADER);var f=a.createProgram();if(null!=b&&null!=c&&(a.attachShader(f,b),a.attachShader(f,c),a.linkProgram(f),a.deleteShader(b),a.deleteShader(c),0==a.getProgramParameter(f,a.LINK_STATUS)))return null;null!=Ab[e]?d.setReserved(e,f):d.h[e]=f;return f};Ob.compileShader=function(a,b,c){c=a.createShader(c);a.shaderSource(c,
b);a.compileShader(c);return 0==a.getShaderParameter(c,a.COMPILE_STATUS)?null:c};Ob.prototype={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 F("No vertex or fragment source provided");this.program=Ob.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!=Ab[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 F("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 F("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)}},unbindVertexArray:function(a){var b=
0;for(a=a.attributes;b<a.length;){var c=a[b];++b;this.disableVertexAttribute(c,!1)}},__class__:Ob};var $f=function(a){Ob.call(this,a);this.vertexSrc=$f.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()};n["openfl._internal.renderer.opengl.shaders2.DefaultShader"]=$f;$f.__name__="openfl _internal renderer opengl shaders2 DefaultShader".split(" ");$f.__super__=Ob;$f.prototype=L(Ob.prototype,{init:function(a){null==a&&(a=!1);Ob.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__:$f});var ik=function(a){Ob.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()};n["openfl._internal.renderer.opengl.shaders2.DrawTrianglesShader"]=ik;ik.__name__="openfl _internal renderer opengl shaders2 DrawTrianglesShader".split(" ");ik.__super__=Ob;ik.prototype=L(Ob.prototype,{init:function(a){null==a&&(a=!1);Ob.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__:ik});var jk=function(a){Ob.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()};n["openfl._internal.renderer.opengl.shaders2.FillShader"]=jk;jk.__name__="openfl _internal renderer opengl shaders2 FillShader".split(" ");jk.__super__=Ob;jk.prototype=L(Ob.prototype,{init:function(a){null==a&&(a=!1);Ob.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__:jk});var kk=function(a){Ob.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()};n["openfl._internal.renderer.opengl.shaders2.PatternFillShader"]=kk;kk.__name__="openfl _internal renderer opengl shaders2 PatternFillShader".split(" ");kk.__super__=Ob;kk.prototype=L(Ob.prototype,{init:function(a){null==a&&(a=!1);Ob.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__:kk});var lk=function(a){Ob.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()};n["openfl._internal.renderer.opengl.shaders2.PrimitiveShader"]=lk;lk.__name__="openfl _internal renderer opengl shaders2 PrimitiveShader".split(" ");
lk.__super__=Ob;lk.prototype=L(Ob.prototype,{init:function(a){null==a&&(a=!1);Ob.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__:lk});var km=function(a){this.gl=a;this.currentBlendMode=
null};n["openfl._internal.renderer.opengl.utils.BlendModeManager"]=km;km.__name__="openfl _internal renderer opengl utils BlendModeManager".split(" ");km.prototype={destroy:function(){this.gl=null},setBlendMode:function(a,b){null==b&&(b=!1);null==a&&(a=10,b=!0);if(!b&&this.currentBlendMode==a)return!1;this.currentBlendMode=a;switch(a){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 14:this.gl.blendEquation(32779);this.gl.blendFunc(1,1);break;default:this.gl.blendEquation(32774),this.gl.blendFunc(1,771)}return!0},__class__:km};var zc=function(a){null==a&&(a=!0);this.type=mb.Polygon;this.points=null;this.winding=0;this.isRemovable=!0;this.fillIndex=0;this.line=new Lh;this.fill=Zc.None;a&&(this.points=[])};n["openfl._internal.renderer.opengl.utils.DrawPath"]=zc;zc.__name__="openfl _internal renderer opengl utils DrawPath".split(" ");zc.getStack=
function(a,b){return t.build(a,b)};zc.prototype={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?2:a.scaleMode;this.line.caps=null==a.caps?1:a.caps;this.line.joints=null==a.joints?2:a.joints;this.line.miterLimit=a.miterLimit},__class__:zc};var t=function(){};n["openfl._internal.renderer.opengl.utils.PathBuiler"]=
t;t.__name__="openfl _internal renderer opengl utils PathBuiler".split(" ");t.__currentPath=null;t.__drawPaths=null;t.__line=null;t.__fill=null;t.closePath=function(){var a;a=null==t.__currentPath.points?0:t.__currentPath.points.length;if(!(0>=a)&&t.__currentPath.type==mb.Polygon&&t.__currentPath.fill!=Zc.None){var b=t.__currentPath.points[0],c=t.__currentPath.points[1],d=t.__currentPath.points[a-1];b==t.__currentPath.points[a-2]&&c==d||t.lineTo(b,c)}};t.endFill=function(){t.__fill=Zc.None;t.__fillIndex++};
t.moveTo=function(a,b){!t.__currentPath.isRemovable||null!=t.__currentPath.points&&0!=t.__currentPath.points.length?t.closePath():t.__drawPaths.pop();t.__currentPath=new zc;t.__currentPath.update(t.__line,t.__fill,t.__fillIndex,t.__currentWinding);t.__currentPath.type=mb.Polygon;t.__currentPath.points.push(a);t.__currentPath.points.push(b);t.__drawPaths.push(t.__currentPath)};t.lineTo=function(a,b){var c=t.__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&&(t.__currentPath.points.push(a),t.__currentPath.points.push(b))};t.curveTo=function(a,b,c,d){if(null==t.__currentPath.points||0==t.__currentPath.points.length)!t.__currentPath.isRemovable||null!=t.__currentPath.points&&0!=t.__currentPath.points.length?t.closePath():t.__drawPaths.pop(),t.__currentPath=new zc,t.__currentPath.update(t.__line,t.__fill,t.__fillIndex,t.__currentWinding),t.__currentPath.type=mb.Polygon,t.__currentPath.points.push(0),t.__currentPath.points.push(0),t.__drawPaths.push(t.__currentPath);
qc.curveTo(t.__currentPath.points,a,b,c,d)};t.cubicCurveTo=function(a,b,c,d,e,f){if(null==t.__currentPath.points||0==t.__currentPath.points.length)!t.__currentPath.isRemovable||null!=t.__currentPath.points&&0!=t.__currentPath.points.length?t.closePath():t.__drawPaths.pop(),t.__currentPath=new zc,t.__currentPath.update(t.__line,t.__fill,t.__fillIndex,t.__currentWinding),t.__currentPath.type=mb.Polygon,t.__currentPath.points.push(0),t.__currentPath.points.push(0),t.__drawPaths.push(t.__currentPath);
qc.cubicCurveTo(t.__currentPath.points,a,b,c,d,e,f)};t.graphicDataPop=function(){!t.__currentPath.isRemovable||null!=t.__currentPath.points&&0!=t.__currentPath.points.length?t.closePath():t.__drawPaths.pop()};t.build=function(a,b){var c=null,d=a.__bounds;t.__drawPaths=[];t.__currentPath=new zc;t.__line=new Lh;t.__fill=Zc.None;t.__fillIndex=0;c=a.__glStack[Pc.glContextId];null==c&&(c=a.__glStack[Pc.glContextId]=new lm(b));if(a.__visible&&0!=a.__commands.get_length()&&null!=d&&0!=d.width&&0!=d.height){for(var d=
new Ke(a.__commands),e=0,f=a.__commands.types;e<f.length;){var g=f[e];++e;switch(g[1]){case 0:g=d.readBeginBitmapFill();t.endFill();null!=lb.get_bitmap(g)?t.__fill=Zc.Texture(lb.get_bitmap(g),lb.get_matrix(g),lb.get_repeat(g),lb.get_smooth(g)):t.__fill=Zc.None;if(null==t.__currentPath.points||0==t.__currentPath.points.length)!t.__currentPath.isRemovable||null!=t.__currentPath.points&&0!=t.__currentPath.points.length?t.closePath():t.__drawPaths.pop(),t.__currentPath=new zc,t.__currentPath.update(t.__line,
t.__fill,t.__fillIndex,t.__currentWinding),t.__currentPath.points=[],t.__currentPath.type=mb.Polygon,t.__drawPaths.push(t.__currentPath);break;case 1:g=d.readBeginFill();t.endFill();0<Yb.get_alpha(g)?t.__fill=Zc.Color(Yb.get_color(g)&16777215,Yb.get_alpha(g)):t.__fill=Zc.None;if(null==t.__currentPath.points||0==t.__currentPath.points.length)!t.__currentPath.isRemovable||null!=t.__currentPath.points&&0!=t.__currentPath.points.length?t.closePath():t.__drawPaths.pop(),t.__currentPath=new zc,t.__currentPath.update(t.__line,
t.__fill,t.__fillIndex,t.__currentWinding),t.__currentPath.points=[],t.__currentPath.type=mb.Polygon,t.__drawPaths.push(t.__currentPath);break;case 3:g=d.readCubicCurveTo();t.cubicCurveTo(Fa.get_controlX1(g),Fa.get_controlY1(g),Fa.get_controlX2(g),Fa.get_controlY2(g),Fa.get_anchorX(g),Fa.get_anchorY(g));break;case 4:g=d.readCurveTo();t.curveTo(Za.get_controlX(g),Za.get_controlY(g),Za.get_anchorX(g),Za.get_anchorY(g));break;case 5:g=d.readDrawCircle();!t.__currentPath.isRemovable||null!=t.__currentPath.points&&
0!=t.__currentPath.points.length?t.closePath():t.__drawPaths.pop();t.__currentPath=new zc;t.__currentPath.update(t.__line,t.__fill,t.__fillIndex,t.__currentWinding);t.__currentPath.type=mb.Circle;t.__currentPath.points=[jb.get_x(g),jb.get_y(g),jb.get_radius(g)];t.__drawPaths.push(t.__currentPath);break;case 6:g=d.readDrawEllipse();!t.__currentPath.isRemovable||null!=t.__currentPath.points&&0!=t.__currentPath.points.length?t.closePath():t.__drawPaths.pop();t.__currentPath=new zc;t.__currentPath.update(t.__line,
t.__fill,t.__fillIndex,t.__currentWinding);t.__currentPath.type=mb.Ellipse;t.__currentPath.points=[cb.get_x(g),cb.get_y(g),cb.get_width(g),cb.get_height(g)];t.__drawPaths.push(t.__currentPath);break;case 8:g=d.readDrawRect();!t.__currentPath.isRemovable||null!=t.__currentPath.points&&0!=t.__currentPath.points.length?t.closePath():t.__drawPaths.pop();t.__currentPath=new zc;t.__currentPath.update(t.__line,t.__fill,t.__fillIndex,t.__currentWinding);t.__currentPath.type=mb.Rectangle(!1);t.__currentPath.points=
[Ua.get_x(g),Ua.get_y(g),Ua.get_width(g),Ua.get_height(g)];t.__drawPaths.push(t.__currentPath);break;case 9:var k=d.readDrawRoundRect(),g=Na.get_x(k),h=Na.get_y(k),l=Na.get_width(k),m=Na.get_height(k),n=Na.get_ellipseWidth(k),k=Na.get_ellipseHeight(k);null==k&&(k=n);n*=.5;k*=.5;n>l/2&&(n=l/2);k>m/2&&(k=m/2);!t.__currentPath.isRemovable||null!=t.__currentPath.points&&0!=t.__currentPath.points.length?t.closePath():t.__drawPaths.pop();t.__currentPath=new zc;t.__currentPath.update(t.__line,t.__fill,t.__fillIndex,
t.__currentWinding);t.__currentPath.type=mb.Rectangle(!0);t.__currentPath.points=[g,h,l,m,n,k];t.__drawPaths.push(t.__currentPath);break;case 12:d.readEndFill();t.endFill();break;case 15:g=d.readLineStyle();t.__line=new Lh;(h=null==Ga.get_thickness(g))||(h=void 0,h=Ga.get_thickness(g),h=isNaN(h));h||0>Ga.get_thickness(g)?t.__line.width=0:0==Ga.get_thickness(g)?t.__line.width=1:t.__line.width=Ga.get_thickness(g);!t.__currentPath.isRemovable||null!=t.__currentPath.points&&0!=t.__currentPath.points.length?
t.closePath():t.__drawPaths.pop();t.__line.color=Ga.get_color(g);t.__line.alpha=Ga.get_alpha(g);t.__line.scaleMode=Ga.get_scaleMode(g);t.__line.caps=Ga.get_caps(g);t.__line.joints=Ga.get_joints(g);t.__line.miterLimit=Ga.get_miterLimit(g);t.__currentPath=new zc;t.__currentPath.update(t.__line,t.__fill,t.__fillIndex,t.__currentWinding);t.__currentPath.points=[];t.__currentPath.type=mb.Polygon;t.__drawPaths.push(t.__currentPath);break;case 16:g=d.readLineTo();t.lineTo(Hb.get_x(g),Hb.get_y(g));break;
case 17:g=d.readMoveTo();t.moveTo(yb.get_x(g),yb.get_y(g));break;case 11:m=d.readDrawTriangles();l=oc.get_uvtData(m);g=oc.get_vertices(m);h=oc.get_indices(m);m=oc.get_culling(m);switch(t.__fill[1]){case 1:n=!0;break;default:n=!1}if(n&&null!=l)continue;!t.__currentPath.isRemovable||null!=t.__currentPath.points&&0!=t.__currentPath.points.length?t.closePath():t.__drawPaths.pop();t.__currentPath=new zc;t.__currentPath.update(t.__line,t.__fill,t.__fillIndex,t.__currentWinding);if(null==l)switch(l=new Lb,
l.data=[],l.length=0,l.fixed=!1,n=t.__fill,n[1]){case 2:for(var n=n[2],k=0,q=g.length/2|0;k<q;){var u=k++;if(!l.fixed){l.length++;if(l.data.length<l.length){var r;r=Array(l.data.length+10);H.blit(l.data,0,r,0,l.data.length);l.data=r}l.data[l.length-1]=g.data[2*u]/n.width}l.length;l.fixed||(l.length++,l.data.length<l.length&&(r=Array(l.data.length+10),H.blit(l.data,0,r,0,l.data.length),l.data=r),l.data[l.length-1]=g.data[2*u+1]/n.height);l.length}}t.__currentPath.type=mb.DrawTriangles(g,h,l,m,null,
0);t.__currentPath.isRemovable=!1;t.__drawPaths.push(t.__currentPath);break;case 10:g=d.readDrawTiles();!t.__currentPath.isRemovable||null!=t.__currentPath.points&&0!=t.__currentPath.points.length?t.closePath():t.__drawPaths.pop();t.__fillIndex++;t.__currentPath=new zc(!1);t.__currentPath.update(t.__line,t.__fill,t.__fillIndex,t.__currentWinding);t.__currentPath.type=mb.DrawTiles(qa.get_sheet(g),qa.get_tileData(g),qa.get_smooth(g),qa.get_flags(g),qa.get_shader(g),qa.get_count(g));t.__currentPath.isRemovable=
!1;t.__drawPaths.push(t.__currentPath);break;case 7:g=d.readDrawPath();!t.__currentPath.isRemovable||null!=t.__currentPath.points&&0!=t.__currentPath.points.length?t.closePath():t.__drawPaths.pop();switch(Nb.get_winding(g)){case "evenOdd":t.__currentWinding=0;break;case "nonZero":t.__currentWinding=1;break;default:t.__currentWinding=0}for(var v,l=h=0,m=Nb.get_commands(g).length;l<m;)switch(n=l++,n=Nb.get_commands(g).data[n],n){case 1:r=Nb.get_data(g).data[h];v=Nb.get_data(g).data[h+1];h+=2;!t.__currentPath.isRemovable||
null!=t.__currentPath.points&&0!=t.__currentPath.points.length?t.closePath():t.__drawPaths.pop();t.__currentPath=new zc;t.__currentPath.update(t.__line,t.__fill,t.__fillIndex,t.__currentWinding);t.__currentPath.type=mb.Polygon;t.__currentPath.points.push(r);t.__currentPath.points.push(v);t.__drawPaths.push(t.__currentPath);break;case 4:r=Nb.get_data(g).data[h+2];v=Nb.get_data(g).data[h+3];h+=4;!t.__currentPath.isRemovable||null!=t.__currentPath.points&&0!=t.__currentPath.points.length?t.closePath():
t.__drawPaths.pop();t.__currentPath=new zc;t.__currentPath.update(t.__line,t.__fill,t.__fillIndex,t.__currentWinding);t.__currentPath.type=mb.Polygon;t.__currentPath.points.push(r);t.__currentPath.points.push(v);t.__drawPaths.push(t.__currentPath);break;case 2:r=Nb.get_data(g).data[h];v=Nb.get_data(g).data[h+1];h+=2;t.lineTo(r,v);break;case 5:r=Nb.get_data(g).data[h+2];v=Nb.get_data(g).data[h+3];h+=4;t.lineTo(r,v);break;case 3:n=Nb.get_data(g).data[h];k=Nb.get_data(g).data[h+1];r=Nb.get_data(g).data[h+
2];v=Nb.get_data(g).data[h+3];h+=4;if(null==t.__currentPath.points||0==t.__currentPath.points.length)!t.__currentPath.isRemovable||null!=t.__currentPath.points&&0!=t.__currentPath.points.length?t.closePath():t.__drawPaths.pop(),t.__currentPath=new zc,t.__currentPath.update(t.__line,t.__fill,t.__fillIndex,t.__currentWinding),t.__currentPath.type=mb.Polygon,t.__currentPath.points.push(0),t.__currentPath.points.push(0),t.__drawPaths.push(t.__currentPath);qc.curveTo(t.__currentPath.points,n,k,r,v);break;
case 6:n=Nb.get_data(g).data[h];k=Nb.get_data(g).data[h+1];q=Nb.get_data(g).data[h+2];u=Nb.get_data(g).data[h+3];r=Nb.get_data(g).data[h+4];v=Nb.get_data(g).data[h+5];h+=6;if(null==t.__currentPath.points||0==t.__currentPath.points.length)!t.__currentPath.isRemovable||null!=t.__currentPath.points&&0!=t.__currentPath.points.length?t.closePath():t.__drawPaths.pop(),t.__currentPath=new zc,t.__currentPath.update(t.__line,t.__fill,t.__fillIndex,t.__currentWinding),t.__currentPath.type=mb.Polygon,t.__currentPath.points.push(0),
t.__currentPath.points.push(0),t.__drawPaths.push(t.__currentPath);qc.cubicCurveTo(t.__currentPath.points,n,k,q,u,r,v)}t.__currentWinding=0;break;case 18:g=d.readOverrideMatrix();!t.__currentPath.isRemovable||null!=t.__currentPath.points&&0!=t.__currentPath.points.length?t.closePath():t.__drawPaths.pop();t.__currentPath=new zc;t.__currentPath.update(t.__line,t.__fill,t.__fillIndex,t.__currentWinding);t.__currentPath.type=mb.OverrideMatrix(Hg.get_matrix(g));t.__currentPath.isRemovable=!1;t.__drawPaths.push(t.__currentPath);
break;default:d.skip(g)}}t.closePath();d.destroy()}a.__drawPaths=t.__drawPaths;return c};var Lh=function(){this.color=this.width=0;this.alpha=1;this.scaleMode=2;this.caps=1;this.joints=2;this.miterLimit=3};n["openfl._internal.renderer.opengl.utils.LineStyle"]=Lh;Lh.__name__="openfl _internal renderer opengl utils LineStyle".split(" ");Lh.prototype={__class__:Lh};var Zc=n["openfl._internal.renderer.opengl.utils.FillType"]={__ename__:"openfl _internal renderer opengl utils FillType".split(" "),__constructs__:["None",
"Color","Texture","Gradient"]};Zc.None=["None",0];Zc.None.toString=J;Zc.None.__enum__=Zc;Zc.Color=function(a,b){var c=["Color",1,a,b];c.__enum__=Zc;c.toString=J;return c};Zc.Texture=function(a,b,c,d){a=["Texture",2,a,b,c,d];a.__enum__=Zc;a.toString=J;return a};Zc.Gradient=["Gradient",3];Zc.Gradient.toString=J;Zc.Gradient.__enum__=Zc;var im=function(a,b){this.transparent=b;this.filterStack=[];this.offsetY=this.offsetX=0;this.setContext(a)};n["openfl._internal.renderer.opengl.utils.FilterManager"]=
im;im.__name__="openfl _internal renderer opengl utils FilterManager".split(" ");im.prototype={applyFilterPass:function(a,b,c,d){},begin:function(a,b){this.renderSession=a;this.defaultShader=a.shaderManager.defaultShader;this.height=this.width=0;this.buffer=b},destroy:function(){var a=this.gl;this.filterStack=null;for(var b=this.offsetY=this.offsetX=0,c=this.texturePool;b<c.length;){var d=c[b];++b;d.destroy()}this.texturePool=null;a.deleteBuffer(this.vertexBuffer);a.deleteBuffer(this.uvBuffer);a.deleteBuffer(this.colorBuffer);
a.deleteBuffer(this.indexBuffer)},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)},popFilter:function(){},pushFilter:function(a){},setContext:function(a){this.gl=
a;this.texturePool=[];this.initShaderBuffers()},__class__:im};var hk=function(a){this.renderSession=a;this.setContext(a.gl);this.clips=[]};n["openfl._internal.renderer.opengl.utils.GLMaskManager"]=hk;hk.__name__="openfl _internal renderer opengl utils GLMaskManager".split(" ");hk.__super__=Je;hk.prototype=L(Je.prototype,{destroy:function(){this.gl=null},pushRect:function(a,b){if(null!=a){var c=b.clone();Ic.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__:hk});var de=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};n["openfl._internal.renderer.opengl.utils.VertexAttribute"]=de;de.__name__="openfl _internal renderer opengl utils VertexAttribute".split(" ");de.prototype={copy:function(){return new de(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}},get_elements:function(){return Math.floor(this.components*this.getElementsBytes()/4)},__class__:de,__properties__:{get_elements:"get_elements"}};var Q=function(){};n["openfl._internal.renderer.opengl.utils.GraphicsRenderer"]=Q;Q.__name__="openfl _internal renderer opengl utils GraphicsRenderer".split(" ");Q.lastVertsBuffer=null;Q.lastBucketMode=null;Q.lastTexture=null;Q.lastTextureRepeat=
null;Q.lastTextureSmooth=null;Q.overrideMatrix=null;Q.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==mb.Ellipse&&(g/=2,d/=2,e+=g,f+=d);c&&(e-=Q.objectBounds.x,f-=Q.objectBounds.y);c=2*Math.PI/40;b=Q.prepareBucket(a,b);var k=b.getData(Ld.Fill);if(null!=k){var h=k.verts,k=k.indices,l=h.length/2|0;k.push(l);for(var m=0;41>m;){var n=m++;h.push(e);h.push(f);h.push(e+Math.sin(c*n)*g);h.push(f+Math.cos(c*n)*d);k.push(l++);k.push(l++)}k.push(l-
1)}0<a.line.width&&(c=a.points,a.points=[],qc.ellipse(a.points,e,f,g,d,40),Q.buildLine(a,b),a.points=c)};Q.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]-=Q.objectBounds.x;e[2*g+1]-=Q.objectBounds.y}d=Q.prepareBucket(a,b);f=d.getData(Ld.Fill);f.drawMode=b.gl.TRIANGLE_FAN;f.verts=e;f=f.indices;e=e.length/2|0;for(g=0;g<e;){var k=g++;f.push(k)}}0<a.line.width&&(null==d&&(d=Q.prepareBucket(a,
b)),Q.buildLine(a,d,c))};Q.buildLine=function(a,b,c){null==c&&(c=!1);var d=a.points;if(0!=d.length){b=b.getData(Ld.Line);if(c){c=0;for(var e=d.length/2|0;c<e;){var f=c++;d[2*f]-=Q.objectBounds.x;d[2*f+1]-=Q.objectBounds.y}}e=new W(d[0],d[1]);f=new W(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 W(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,k=a.line.width/2,h=Q.hex2rgb(a.line.color);a=a.line.alpha;var l=h[0],m=h[1],h=h[2],n,q,r,u,t,v,y,z,x,A,B,C,H,E;r=d[0];u=d[1];t=d[2];v=d[3];z=-(u-v);x=r-t;q=Math.sqrt(Math.abs(z*z+x*x));z=z/q*k;x=x/q*k;c.push(r-z);c.push(u-x);c.push(l);c.push(m);c.push(h);c.push(a);c.push(r+z);c.push(u+x);c.push(l);c.push(m);c.push(h);c.push(a);for(var G=1,I=g-1;G<I;)x=G++,r=d[2*(x-1)],u=d[2*(x-1)+1],t=d[2*x],v=d[2*x+1],n=d[2*(x+1)],y=d[2*(x+1)+1],z=-(u-v),x=r-t,q=Math.sqrt(Math.abs(z*z+x*x)),
z/=q,x/=q,z*=k,x*=k,A=-(v-y),B=t-n,q=Math.sqrt(Math.abs(A*A+B*B)),A/=q,B/=q,A*=k,B*=k,q=-x+u-(-x+v),C=-z+t-(-z+r),r=(-z+r)*(-x+v)-(-z+t)*(-x+u),u=-B+y-(-B+v),H=-A+t-(-A+n),y=(-A+n)*(-B+v)-(-A+t)*(-B+y),E=q*H-u*C,.1>Math.abs(E)?(c.push(t-z),c.push(v-x),c.push(l),c.push(m),c.push(h),c.push(a),c.push(t+z),c.push(v+x),c.push(l),c.push(m),c.push(h),c.push(a)):(n=(C*y-H*r)/E,q=(u*r-q*y)/E,C=(n-t)*(n-t)+(q-v)+(q-v),19600<C?(z-=A,x-=B,q=Math.sqrt(Math.abs(z*z+x*x)),z/=q,x/=q,z*=k,x*=k,c.push(t-z),c.push(v-
x),c.push(l),c.push(m),c.push(h),c.push(a),c.push(t+z),c.push(v+x),c.push(l),c.push(m),c.push(h),c.push(a),c.push(t-z),c.push(v-x),c.push(l),c.push(m),c.push(h),c.push(a),e++):(c.push(n),c.push(q),c.push(l),c.push(m),c.push(h),c.push(a),c.push(t-(n-t)),c.push(v-(q-v)),c.push(l),c.push(m),c.push(h),c.push(a)));r=d[2*(g-2)];u=d[2*(g-2)+1];t=d[2*(g-1)];v=d[2*(g-1)+1];z=-(u-v);x=r-t;q=Math.sqrt(Math.abs(z*z+x*x));isFinite(q)||null;z/=q;x/=q;z*=k;x*=k;c.push(t-z);c.push(v-x);c.push(l);c.push(m);c.push(h);
c.push(a);c.push(t+z);c.push(v+x);c.push(l);c.push(m);c.push(h);c.push(a);b.push(f);for(d=0;d<e;)d++,b.push(f++);b.push(f-1)}};Q.buildPoly=function(a,b){if(!(6>a.points.length)){var c=a.points,d=c.length,e=c[0],f=c[1],g=c[d-1];if(e!=c[d-2]||f!=g)c.push(e),c.push(f);var d=c.length/2|0,e=Q.prepareBucket(a,b),k=e.getData(Ld.Fill),f=k.verts,g=k.indices;if(null!=k){k=[];Yf.triangulate(k,c);for(var h=f.length/2,l=0;l<k.length;)g.push(k[l]+h|0),g.push(k[l]+h|0),g.push(k[l+1]+h|0),g.push(k[l+2]+h|0),g.push(k[l+
2]+h|0),l+=3;for(g=0;g<d;)k=g++,f.push(c[2*k]),f.push(c[2*k+1])}0<a.line.width&&Q.buildLine(a,e)}};Q.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-=Q.objectBounds.x,f-=Q.objectBounds.y);b=Q.prepareBucket(a,b);var k=b.getData(Ld.Fill);if(null!=k){c=k.verts;var k=k.indices,h=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);k.push(h);k.push(h);k.push(h+1);k.push(h+2);k.push(h+3);k.push(h+3)}0<a.line.width&&
(c=a.points,a.points=[e,f,e+g,f,e+g,f+d,e,f+d,e,f],Q.buildLine(a,b),a.points=c)};Q.buildRoundedRectangle=function(a,b,c){null==c&&(c=!1);var d=a.points.slice(),e=d[0],f=d[1],g=d[2],k=d[3],h=d[4],d=d[5];c&&(e-=Q.objectBounds.x,f-=Q.objectBounds.y);c=[];qc.roundRectangle(c,e,f,g,k,h,d);b=Q.prepareBucket(a,b);f=b.getData(Ld.Fill);if(null!=f){e=f.verts;f=f.indices;g=e.length/2;k=[];Yf.triangulate(k,c);for(h=0;h<k.length;)f.push(k[h]+g|0),f.push(k[h]+g|0),f.push(k[h+1]+g|0),f.push(k[h+2]+g|0),f.push(k[h+
2]+g|0),h+=3;for(h=0;h<c.length;)e.push(c[h]),e.push(c[++h]),h++}0<a.line.width&&(e=a.points,a.points=c,Q.buildLine(a,b),a.points=e)};Q.buildDrawTriangles=function(a,b,c,d){null==d&&(d=!1);var e=a.type.slice(2),f=e[0],g=e[1],k=e[2],h=e[3],e=e[4],l,m,n,q,r;d?(l=1,n=m=0,q=1,b=r=0):(l=b.__worldTransform.a,m=b.__worldTransform.b,n=b.__worldTransform.c,q=b.__worldTransform.d,r=b.__worldTransform.tx,b=b.__worldTransform.ty);var t=null!=e&&0<e.length;c=Q.prepareBucket(a,c).getData(Ld.Fill);a=c.vertexArray.attributes[2];
a.enabled=t;var v=[1,1,1,1],v=null!=v?new Float32Array(v):null;a.defaultValue=v;c.rawVerts=!0;c.glLength=g.length;c.stride=u["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 x=0,y=0,z=0,A=0,B=0,C=0,H=0,E=0,G=0,I=0,F=0,J=0,L=v=0,K=g.length/3|0;L<K;){C=L++;A=g.data[3*C];B=g.data[3*C+1];C=g.data[3*C+2];x=2*A;y=2*B;z=2*C;H=f.data[x];E=f.data[x+
1];G=f.data[y];I=f.data[y+1];F=f.data[z];J=f.data[z+1];d&&(H-=Q.objectBounds.x,E-=Q.objectBounds.y,G-=Q.objectBounds.x,I-=Q.objectBounds.y,F-=Q.objectBounds.x,J-=Q.objectBounds.y);switch(h){case 2:if(!(0>(G-H)*(J-E)-(I-E)*(F-H)))continue;break;case 0:if(0>(G-H)*(J-E)-(I-E)*(F-H))continue}var M=v++;a[M]=l*H+n*E+r;M=v++;a[M]=m*H+q*E+b;H=v++;a[H]=k.data[x];H=v++;a[H]=k.data[x+1];t&&(x=v++,c[x]=e.data[A]);A=v++;a[A]=l*G+n*I+r;A=v++;a[A]=m*G+q*I+b;G=v++;a[G]=k.data[y];G=v++;a[G]=k.data[y+1];t&&(y=v++,
c[y]=e.data[B]);B=v++;a[B]=l*F+n*J+r;B=v++;a[B]=m*F+q*J+b;F=v++;a[F]=k.data[z];F=v++;a[F]=k.data[z+1];t&&(z=v++,c[z]=e.data[C])}};Q.buildDrawTiles=function(a,b){Q.prepareBucket(a,b)};Q.quadraticBezierCurve=function(a,b,c,d,e,f){for(var g,k,h,l,m=[],n=0,q=0;21>q;)n=q++/20,g=a+(c-a)*n,k=b+(d-b)*n,h=c+(e-c)*n,l=d+(f-d)*n,g+=(h-g)*n,k+=(l-k)*n,m.push(g),m.push(k);return m};Q.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&&Q.updateGraphics(a,a.__graphics,b.gl,a.get_cacheAsBitmap()),Q.renderGraphics(a,b,!1)):c.__glStack.splice(0,c.__glStack.length)};Q.renderGraphics=function(a,b,c){null==c&&(c=!1);var d=b.gl,e=a.__graphics.__glStack[Pc.glContextId];if(null!=e){var f,g;g=c?Oa.__identity:a.__worldTransform;for(var k=b.spriteBatch.clipRect,h=b.spriteBatch.drawing,l=0,m=e.buckets.length;l<m;){f=l++;(h=b.spriteBatch.drawing)&&!c&&b.spriteBatch.finish();b.blendModeManager.setBlendMode(a.__blendMode);null!=
k&&(d.enable(d.SCISSOR_TEST),d.scissor(Math.floor(k.x),Math.floor(k.y),Math.floor(k.width),Math.floor(k.height)));f=e.buckets[f];switch(f.mode[1]){case 1:case 2:b.stencilManager.pushBucket(f,b,g.toArray(!0));h=Q.prepareShader(f,b,a,g.toArray(!0));Q.renderFill(f,h,b);b.stencilManager.popBucket(a,f,b);break;case 5:h=Q.prepareShader(f,b,a,null);Q.renderDrawTriangles(f,h,b);break;case 6:h||b.spriteBatch.begin(b,k),h=f.graphicType.slice(2),b.spriteBatch.renderTiles(a,h[0],h[1],h[2],h[3],h[4],h[5]),b.spriteBatch.finish()}var h=
a.__worldColorTransform,n=0;for(f=f.lines;n<f.length;){var q=f[n];++n;if(null!=q&&0<q.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"),h.redMultiplier,h.greenMultiplier,
h.blueMultiplier,h.alphaMultiplier);d.uniform4f(r.getUniformLocation("openfl_uColorOffset"),h.redOffset/255,h.greenOffset/255,h.blueOffset/255,h.alphaOffset/255);q.vertexArray.bind();r.bindVertexArray(q.vertexArray);d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,q.indexBuffer);d.drawElements(d.TRIANGLE_STRIP,q.indices.length,d.UNSIGNED_SHORT,0)}}null!=k&&d.disable(d.SCISSOR_TEST);(h=b.spriteBatch.drawing)||c||b.spriteBatch.begin(b,k)}}};Q.updateGraphics=function(a,b,c,d){null==d&&(d=!1);Q.objectPosition.setTo(a.get_x(),
a.get_y());null==b.__bounds?Q.objectBounds=new ha:Q.objectBounds.copyFrom(b.__bounds);var e=null;b.__dirty&&(e=zc.getStack(b,c));b.set___dirty(!1);c=0;for(var f=e.buckets;c<f.length;){var g=f[c];++c;g.reset();Q.bucketPool.push(g)}e.reset();c=e.lastIndex;for(f=b.__drawPaths.length;c<f;){var g=c++,g=b.__drawPaths[g],k=g.type;switch(k[1]){case 0:Q.buildComplexPoly(g,e,d);break;case 1:k[2]?Q.buildRoundedRectangle(g,e,d):Q.buildRectangle(g,e,d);break;case 2:case 3:Q.buildCircle(g,e,d);break;case 4:Q.buildDrawTriangles(g,
a,e,d);break;case 5:Q.prepareBucket(g,e);break;case 6:Q.overrideMatrix=k[2]}e.lastIndex++}a=0;for(b=e.buckets;a<b.length;)d=b[a],++a,d.uploadTileBuffer&&d.uploadTile(Math.ceil(Q.objectBounds.get_left()),Math.ceil(Q.objectBounds.get_top()),Math.floor(Q.objectBounds.get_right()),Math.floor(Q.objectBounds.get_bottom())),d.optimize();e.upload()};Q.prepareBucket=function(a,b){var c=null,c=a.fill;switch(c[1]){case 1:var d=c[3],e=c[2],c=Q.switchBucket(a.fillIndex,b,ab.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=Q.switchBucket(a.fillIndex,b,ab.PatternFill);c.bitmap=g;c.textureRepeat=e;c.textureSmooth=d;c.texture=g.getTexture(b.gl);c.uploadTileBuffer=!0;d=null==f?new Oa:f.clone();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=Q.switchBucket(a.fillIndex,b,ab.Line),
c.uploadTileBuffer=!1}switch(a.type[1]){case 4:c.mode=ab.DrawTriangles;c.uploadTileBuffer=!1;break;case 5:c.mode=ab.DrawTiles,c.uploadTileBuffer=!1}c.graphicType=a.type;c.overrideMatrix=Q.overrideMatrix;return c};Q.getBucket=function(a,b){var c=Q.bucketPool.pop();null==c&&(c=new mm(a.gl));c.mode=b;a.buckets.push(c);return c};Q.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=Q.getBucket(b,c));d.dirty=!0;d.fillIndex=a;
return d};Q.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};Q.renderFill=function(a,b,c){c=c.gl;a.mode==ab.PatternFill&&null!=a.texture&&Q.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)};Q.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||(Q.bindTexture(c,a),f.vertexArray.bind(),b.bindVertexArray(f.vertexArray),c.drawArrays(c.TRIANGLES,f.glStart,f.glLength))}};
Q.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))};Q.isCCW=function(a,b,c,d,e,f){return 0>(c-a)*(f-b)-(d-b)*(e-a)};Q.hex2rgb=function(a){return null==a?[1,1,1]:[(a>>16&255)/255,(a>>8&255)/255,(a&255)/255]};Q.hex2rgba=function(a){return null==a?[1,1,1,1]:[(a>>16&255)/255,(a>>8&255)/255,(a&255)/255,(a>>24&255)/255]};var lm=function(a){this.lastIndex=0;this.gl=a;this.buckets=[];this.lastIndex=0};n["openfl._internal.renderer.opengl.utils.GLStack"]=lm;lm.__name__=
"openfl _internal renderer opengl utils GLStack".split(" ");lm.prototype={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__:lm};var mm=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=ab.Fill;this.textureMatrix=new Oa;this.textureTL=new W;
this.textureBR=new W(1,1)};n["openfl._internal.renderer.opengl.utils.GLBucket"]=mm;mm.__name__="openfl _internal renderer opengl utils GLBucket".split(" ");mm.prototype={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 nm(this.gl));c.available=!1;c.parent=this;c.type=a;d&&P.remove(b,c);b.push(c);switch(a[1]){case 1:switch(this.mode[1]){case 1:case 2:c.vertexArray.attributes=
Q.fillVertexAttributes;break;case 5:c.vertexArray.attributes=Q.drawTrianglesVertexAttributes.slice(),c.vertexArray.attributes[2]=c.vertexArray.attributes[2].copy()}break;case 0:c.vertexArray.attributes=Q.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,k=0;k<a.length;){var h=a[k];++k;if(h.available||h.rawVerts||h.rawIndices)null!=c&&(b.push(c),c=null),b.push(h);else if(null==d||d.drawMode==h.drawMode){if(null==c)c=h;else{for(var f=
c.verts.length,g=c.indices.length,d=0,l=h.verts.length;d<l;){var m=d++;c.verts[m+f]=h.verts[m]}f=0;for(d=h.indices.length;f<d;)l=f++,c.indices[l+g]=h.indices[l]+e}e=c.indices[c.indices.length-1]+1}else null!=c&&(b.push(c),c=null),b.push(h);d=h}0==b.length&&null!=c&&b.push(c);if(0<b.length)switch(Ld.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=mb.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!=ab.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__:mm};var nm=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 mk([])};n["openfl._internal.renderer.opengl.utils.GLBucketData"]=nm;nm.__name__="openfl _internal renderer opengl utils GLBucketData".split(" ");nm.prototype={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__:nm};var ab=n["openfl._internal.renderer.opengl.utils.BucketMode"]={__ename__:"openfl _internal renderer opengl utils BucketMode".split(" "),__constructs__:"None Fill PatternFill Line PatternLine DrawTriangles DrawTiles".split(" ")};ab.None=["None",0];ab.None.toString=J;ab.None.__enum__=ab;ab.Fill=["Fill",1];ab.Fill.toString=J;ab.Fill.__enum__=ab;ab.PatternFill=["PatternFill",2];ab.PatternFill.toString=J;ab.PatternFill.__enum__=ab;ab.Line=["Line",3];
ab.Line.toString=J;ab.Line.__enum__=ab;ab.PatternLine=["PatternLine",4];ab.PatternLine.toString=J;ab.PatternLine.__enum__=ab;ab.DrawTriangles=["DrawTriangles",5];ab.DrawTriangles.toString=J;ab.DrawTriangles.__enum__=ab;ab.DrawTiles=["DrawTiles",6];ab.DrawTiles.toString=J;ab.DrawTiles.__enum__=ab;var Ld=n["openfl._internal.renderer.opengl.utils.BucketDataType"]={__ename__:"openfl _internal renderer opengl utils BucketDataType".split(" "),__constructs__:["Line","Fill"]};Ld.Line=["Line",0];Ld.Line.toString=
J;Ld.Line.__enum__=Ld;Ld.Fill=["Fill",1];Ld.Fill.toString=J;Ld.Fill.__enum__=Ld;var xn=function(a){this.indices=[];this.data=[];this.mode=this.lastIndex=0;this.dirty=!0;this.alpha=1;this.tint=[1,1,1];this.gl=a;this.dataBuffer=a.createBuffer();this.indexBuffer=a.createBuffer()};n["openfl._internal.renderer.opengl.utils.GLGraphicsData"]=xn;xn.__name__="openfl _internal renderer opengl utils GLGraphicsData".split(" ");xn.prototype={reset:function(){this.data=[];this.indices=[];this.lastIndex=0},upload:function(){var a=
this.data;this.glData=null!=a?new Float32Array(a):null;this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.dataBuffer);this.gl.bufferData(this.gl.ARRAY_BUFFER,this.glData,this.gl.STATIC_DRAW);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.STATIC_DRAW);this.dirty=!1},__class__:xn};var mb=n["openfl._internal.renderer.opengl.utils.GraphicType"]={__ename__:"openfl _internal renderer opengl utils GraphicType".split(" "),
__constructs__:"Polygon Rectangle Circle Ellipse DrawTriangles DrawTiles OverrideMatrix".split(" ")};mb.Polygon=["Polygon",0];mb.Polygon.toString=J;mb.Polygon.__enum__=mb;mb.Rectangle=function(a){a=["Rectangle",1,a];a.__enum__=mb;a.toString=J;return a};mb.Circle=["Circle",2];mb.Circle.toString=J;mb.Circle.__enum__=mb;mb.Ellipse=["Ellipse",3];mb.Ellipse.toString=J;mb.Ellipse.__enum__=mb;mb.DrawTriangles=function(a,b,c,d,e,f){a=["DrawTriangles",4,a,b,c,d,e,f];a.__enum__=mb;a.toString=J;return a};mb.DrawTiles=
function(a,b,c,d,e,f){a=["DrawTiles",5,a,b,c,d,e,f];a.__enum__=mb;a.toString=J;return a};mb.OverrideMatrix=function(a){a=["OverrideMatrix",6,a];a.__enum__=mb;a.toString=J;return a};var hm=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 nk(a,b,c,d,e))};n["openfl._internal.renderer.opengl.utils.PingPongTexture"]=hm;hm.__name__="openfl _internal renderer opengl utils PingPongTexture".split(" ");
hm.prototype={swap:function(){this.__swapped=!this.__swapped;null==(this.__swapped?this.__texture1:this.__texture0)&&this.set_renderTexture(new nk(this.gl,this.width,this.height,this.smoothing,this.powerOfTwo))},clear:function(a,b,c,d,e){null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);(this.__swapped?this.__texture1:this.__texture0).clear(a,b,c,d,e)},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},get___otherTexture:function(){return this.__swapped?this.__texture0:this.__texture1},__class__:hm,__properties__:{get___otherTexture:"get___otherTexture",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 nk=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)};n["openfl._internal.renderer.opengl.utils.RenderTexture"]=nk;nk.__name__="openfl _internal renderer opengl utils RenderTexture".split(" ");
nk.prototype={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 Mh);
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__:nk};var Kh=function(a){this.setContext(a)};n["openfl._internal.renderer.opengl.utils.ShaderManager"]=Kh;Kh.__name__="openfl _internal renderer opengl utils ShaderManager".split(" ");Kh.prototype={setContext:function(a){this.gl=
a;this.defaultShader=new $f(a);this.fillShader=new jk(a);this.patternFillShader=new kk(a);this.drawTrianglesShader=new ik(a);this.primitiveShader=new lk(a);this.setShader(this.defaultShader,!0)},destroy:function(){this.defaultShader.destroy();this.fillShader.destroy();this.patternFillShader.destroy();this.drawTrianglesShader.destroy();this.primitiveShader.destroy();this.gl=null},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__:Kh};var gk=function(a,b){null==b&&(b=2E3);this.colorTransform=new yd;this.uvs=new Mh;this.matrix=new Oa;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 de(2,5126,!1,"openfl_aPosition"));this.attributes.push(new de(2,5126,!1,"openfl_aTexCoord0"));
this.attributes.push(new de(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 mk(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 ok;this.dirty=!0;this.drawing=!1;this.batchedSprites=0;this.setContext(a)};n["openfl._internal.renderer.opengl.utils.SpriteBatch"]=gk;gk.__name__="openfl _internal renderer opengl utils SpriteBatch".split(" ");
gk.prototype={destroy:function(){this.vertexArray.destroy();this.indices=this.vertexArray=null;this.gl.deleteBuffer(this.indexBuffer);this.currentState.destroy();for(var a=0,b=this.states;a<b.length;){var c=b[a];++a;c.destroy()}this.gl=this.colorTransform=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,k,h){null==e&&(e=1);if(null!=a){h=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,k),this.setState(this.batchedSprites,h,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 k=b.__bitmap.getTexture(this.gl);if(null!=k){var h=0<(e&1),l=0<(e&2),m=0<(e&16),n=0<(e&4),q=0<(e&8),r=0<(e&32),u=0<(e&64),t=0<(e&128);switch(e&983040){case 65536:e=0;break;case 131072:e=9;break;case 262144:e=12;break;case 524288:e=14;break;default:switch(e&15728640){case 1048576:e=2;break;case 2097152:e=
8;break;case 4194304:e=11;break;case 8388608:e=5;break;default:switch(e&251658240){case 16777216:e=3;break;case 33554432:e=6;break;default:e=10}}}m&&(l=h=!1);var v=0,x=0,z=0,y=0,A=0,B=0,C=3;r&&(C=u?8:6);h&&(v=C,C++);l&&(x=C,C++);m&&(B=C,C+=4);n&&(z=C,C+=3);q&&(A=C,C++);t&&(y=C,C+=4);var H=c.length;0<=g&&H>g&&(H=g);Math.ceil(H/C);g=0;var E=-1,G=b.__rectTile,E=b.__rectUV,I=b.__point,F=0,J=0,E=1,L=16777215,K=1,M=0,P=1,O=P=M=0,N=F=M=K=0,Q=0,N=0,R=a.__worldTransform,F=0,J=1,O=P=0,K=1,N=M=0,S=R.a,T=R.b,
U=R.c,V=R.d,Z=R.tx,R=R.ty,W=0,X=0,Y=0,aa=0,ba=0,ca=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<H;)this.batchedSprites>=this.maxSprites&&this.flush(),F=c[g],J=c[g+1],r?(G.x=c[g+2],G.y=c[g+3],G.width=c[g+4],G.height=c[g+5],u?(I.x=c[g+6],I.y=c[g+7]):I.setTo(0,0),W=G.width,X=G.height,Y=G.get_left()/b.__bitmap.width,
aa=G.get_top()/b.__bitmap.height,ba=G.get_right()/b.__bitmap.width,ca=G.get_bottom()/b.__bitmap.height):(E=(null==c[g+2]?0:c[g+2])|0,G=b.__tileRects[E],I=b.__centerPoints[E],E=b.__tileUVs[E],null!=G&&(W=G.width,X=G.height,Y=E.x,aa=E.y,ba=E.width,ca=E.height)),null!=G&&0<G.width&&0<G.height&&null!=I&&(L=16777215,P=K=1,M=0,E=q?c[g+A]*a.__worldAlpha:a.__worldAlpha,n&&(L=(255*c[g+z]|0)<<16|(255*c[g+z+1]|0)<<8|255*c[g+z+2]|0),O=a.__worldColorTransform,this.colorTransform.redMultiplier=O.redMultiplier,
this.colorTransform.greenMultiplier=O.greenMultiplier,this.colorTransform.blueMultiplier=O.blueMultiplier,this.colorTransform.alphaMultiplier=O.alphaMultiplier,this.colorTransform.redOffset=O.redOffset,this.colorTransform.greenOffset=O.greenOffset,this.colorTransform.blueOffset=O.blueOffset,this.colorTransform.alphaOffset=O.alphaOffset,t&&(this.colorTransform.redOffset+=c[g+y],this.colorTransform.greenOffset+=c[g+y+1],this.colorTransform.blueOffset+=c[g+y+2],this.colorTransform.alphaOffset+=c[g+y+
3]),h&&(K=c[g+v]),l&&(M=c[g+x],P=Math.cos(M),M=Math.sin(M)),m?(P=c[g+B],O=c[g+B+1],K=c[g+B+2],M=c[g+B+3]):(P*=K,O=K*M,K=-O,M=P),Q=I.x*P+I.y*K,N=I.x*O+I.y*M,F-=Q,N=J-N,J=(P*S+O*U)*W,P=(P*T+O*V)*W,O=(K*S+M*U)*X,K=(K*T+M*V)*X,M=F*S+N*U+Z,N=F*T+N*V+R,F=4*this.batchedSprites*this.elementsPerVertex,this.positions[F]=M,this.positions[F+1]=N,this.positions[F+5]=J+M,this.positions[F+6]=P+N,this.positions[F+10]=J+O+M,this.positions[F+11]=K+P+N,this.positions[F+15]=O+M,this.positions[F+16]=K+N,E=this.colors[F+
19]=((255*E|0)&255)<<24|L,E=this.colors[F+14]=E,E=this.colors[F+9]=E,this.colors[F+4]=E,this.positions[F+2]=Y,this.positions[F+3]=aa,this.positions[F+7]=ba,this.positions[F+8]=aa,this.positions[F+12]=ba,this.positions[F+13]=ca,this.positions[F+17]=Y,this.positions[F+18]=ca,this.writtenVertexBytes=F+20,this.setState(this.batchedSprites,k,d,e,this.colorTransform,f,!1),this.batchedSprites++),g+=C}},fillVertices:function(a,b,c,d,e,f,g){null==f&&(f=-1);var k=d.a,h=d.b,l=d.c,m=d.d,n=d.tx;d=d.ty;null==g||
2==g?(this.positions[a]=n,this.positions[a+1]=d,this.positions[a+5]=k*b+n,this.positions[a+6]=h*b+d,this.positions[a+10]=k*b+l*c+n,this.positions[a+11]=m*c+h*b+d,this.positions[a+15]=l*c+n,this.positions[a+16]=m*c+d):(g=Math.round(n),this.positions[a]=g,g=Math.round(d),this.positions[a+1]=g,g=Math.round(k*b+n),this.positions[a+5]=g,g=Math.round(h*b+d),this.positions[a+6]=g,k=Math.round(k*b+l*c+n),this.positions[a+10]=k,b=Math.round(m*c+h*b+d),this.positions[a+11]=b,l=Math.round(l*c+n),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},enableAttributes:function(a){null==a&&(a=-1);this.enableColor=-1!=a;this.enableColor!=this.lastEnableColor&&(this.flush(),
this.lastEnableColor=this.enableColor);this.attributes[2].enabled=this.lastEnableColor;this.elementsPerVertex=this.getElementsPerVertex()},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.skipColorTransform=a.skipColorTransform,this.currentState.colorTransform=
this.currentState.skipColorTransform?null: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 k=this.states[a];null==k&&(k=this.states[a]=new ok);k.texture=b;k.textureSmooth=c;k.blendMode=d;k.skipColorTransform=null!=e&&e.__isDefault();k.skipColorTransform||(k.colorTransform.redMultiplier=e.redMultiplier,k.colorTransform.greenMultiplier=e.greenMultiplier,k.colorTransform.blueMultiplier=e.blueMultiplier,k.colorTransform.alphaMultiplier=e.alphaMultiplier,k.colorTransform.redOffset=
e.redOffset,k.colorTransform.greenOffset=e.greenOffset,k.colorTransform.blueOffset=e.blueOffset,k.colorTransform.alphaOffset=e.alphaOffset);k.skipColorTransformAlpha=g;null==f?(k.shader=null,k.shaderData=null):(k.shader=f.__shader,k.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(Wa.uObjectSize),d=a.data.get(Wa.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__:gk};var ok=function(){this.skipColorTransform=this.skipColorTransformAlpha=!1;this.colorTransform=new yd;this.textureSmooth=!0};n["openfl._internal.renderer.opengl.utils._SpriteBatch.State"]=ok;ok.__name__="openfl _internal renderer opengl utils _SpriteBatch State".split(" ");ok.prototype={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&&(this.skipColorTransform&&a.skipColorTransform||!this.skipColorTransform&&!a.skipColorTransform&&this.colorTransform.__equals(a.colorTransform,this.skipColorTransformAlpha))},destroy:function(){this.colorTransform=this.texture=null},__class__:ok};var jm=function(a){this.stencilMask=0;this.stencilStack=[];this.setContext(a);
this.reverse=!0;this.count=0};n["openfl._internal.renderer.opengl.utils.StencilManager"]=jm;jm.__name__="openfl _internal renderer opengl utils StencilManager".split(" ");jm.prototype={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&&Q.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[Pc.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)},bindGraphics:function(a,b,c){},destroy:function(){this.gl=this.stencilStack=null},popStencil:function(a,b,c){this.stencilStack.pop();this.count--;if(0==this.stencilStack.length)this.gl.disable(this.gl.STENCIL_TEST);else{var d=this.count;
this.bindGraphics(a,b,c);this.gl.colorMask(!1,!1,!1,!1);1==b.mode?((this.reverse=!this.reverse)?(this.gl.stencilFunc(this.gl.EQUAL,255-(d+1),255),this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.INCR)):(this.gl.stencilFunc(this.gl.EQUAL,d+1,255),this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.DECR)),this.gl.drawElements(this.gl.TRIANGLE_FAN,4,this.gl.UNSIGNED_SHORT,2*(b.indices.length-4)),this.gl.stencilFunc(this.gl.ALWAYS,0,255),this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.INVERT),
this.gl.drawElements(this.gl.TRIANGLE_FAN,b.indices.length-4,this.gl.UNSIGNED_SHORT,0)):(this.reverse?(this.gl.stencilFunc(this.gl.EQUAL,d+1,255),this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.DECR)):(this.gl.stencilFunc(this.gl.EQUAL,255-(d+1),255),this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.INCR)),this.gl.drawElements(this.gl.TRIANGLE_STRIP,b.indices.length,this.gl.UNSIGNED_SHORT,0));this.reverse?this.gl.stencilFunc(this.gl.EQUAL,d,255):this.gl.stencilFunc(this.gl.EQUAL,255-d,255);
this.gl.colorMask(!0,!0,!0,!0);this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.KEEP)}},pushStencil:function(a,b,c){this.bindGraphics(a,b,c);0==this.stencilStack.length&&(this.gl.enable(this.gl.STENCIL_TEST),this.gl.clear(this.gl.STENCIL_BUFFER_BIT),this.reverse=!0,this.count=0);this.stencilStack.push(b);a=this.count;this.gl.colorMask(!1,!1,!1,!1);this.gl.stencilFunc(this.gl.ALWAYS,0,255);this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.INVERT);1==b.mode?(this.gl.drawElements(this.gl.TRIANGLE_FAN,
b.indices.length-4,this.gl.UNSIGNED_SHORT,0),this.reverse?(this.gl.stencilFunc(this.gl.EQUAL,255-a,255),this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.DECR)):(this.gl.stencilFunc(this.gl.EQUAL,a,255),this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.INCR)),this.gl.drawElements(this.gl.TRIANGLE_FAN,4,this.gl.UNSIGNED_SHORT,2*(b.indices.length-4)),this.reverse?this.gl.stencilFunc(this.gl.EQUAL,255-(a+1),255):this.gl.stencilFunc(this.gl.EQUAL,a+1,255),this.reverse=!this.reverse):(this.reverse?
(this.gl.stencilFunc(this.gl.EQUAL,a,255),this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.INCR)):(this.gl.stencilFunc(this.gl.EQUAL,255-a,255),this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.DECR)),this.gl.drawElements(this.gl.TRIANGLE_STRIP,b.indices.length,this.gl.UNSIGNED_SHORT,0),this.reverse?this.gl.stencilFunc(this.gl.EQUAL,a+1,255):this.gl.stencilFunc(this.gl.EQUAL,255-(a+1),255));this.gl.colorMask(!0,!0,!0,!0);this.gl.stencilOp(this.gl.KEEP,this.gl.KEEP,this.gl.KEEP);this.count++},
setContext:function(a){this.gl=a},__class__:jm};var mk=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 dj(b));this.isStatic=c};n["openfl._internal.renderer.opengl.utils.VertexArray"]=mk;mk.__name__="openfl _internal renderer opengl utils VertexArray".split(" ");mk.prototype={bind:function(){this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.glBuffer)},unbind:function(){this.gl.bindBuffer(this.gl.ARRAY_BUFFER,
null)},upload:function(a){this.gl.bufferSubData(this.gl.ARRAY_BUFFER,0,a)},destroy:function(){this.gl.deleteBuffer(this.glBuffer);this.buffer=null},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__:mk,
__properties__:{get_stride:"get_stride"}};var ob=function(a){this.textField=a;this.height=this.width=100;this.text="";this.bounds=new ha(0,0,0,0);this.type=0;this.autoSize=2;this.embedFonts=this.displayAsPassword=!1;this.selectable=!0;this.borderColor=0;this.border=!1;this.backgroundColor=16777215;this.background=!1;this.gridFitType=1;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=[];ob.__canvas=window.document.createElement("canvas");ob.__context=ob.__canvas.getContext("2d")};n["openfl._internal.text.TextEngine"]=ob;ob.__name__=["openfl","_internal","text","TextEngine"];ob.__canvas=null;ob.__context=null;ob.findFont=function(a){return null};ob.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};ob.getFontInstance=function(a){return null};ob.prototype={getBounds:function(){var a;a=this.border?1:0;this.bounds.width=this.width+a;this.bounds.height=this.height+a},getLine:function(a){return 0>a||a>this.lineBreaks.length+1?null:0==this.lineBreaks.length?this.text:this.text.substring(0<a?this.lineBreaks[a-1]:0,this.lineBreaks[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 k=g[f];for(++f;k.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,k.ascent);b=Math.max(b,k.descent);c=null==c?k.leading:u["int"](Math.max(c,k.leading));d=Math.max(d,k.height);e=k.offsetX-2+k.width;e>this.textWidth&&(this.textWidth=e);this.textHeight=k.offsetY-2+k.ascent+k.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=Cd.__defaultTextFormat.clone(),d=0,e=0,f=0,g,k,h,l=0,m=0,n=0,q=this.text.indexOf(" "),r=this.text.indexOf("\n"),u=0,t=2,v=2,x=0,z=0,y=null;a<this.textFormatRanges.length-
1&&(a++,b=this.textFormatRanges[a],c.__merge(b.format),ob.__context.font=ob.getFont(c),e=c.size,f=.185*c.size,d=c.leading,l=e+f+d,-1<q&&(m=ob.__context.measureText(" ").width));for(var y=b.format,A;x<this.text.length;)if(-1<r&&(-1==q||r<q)&&b.end>=r){g=new Kg(b.format,x,r);k=this.text;for(A=[];x<r;)h=x++,A.push(ob.__context.measureText(k.charAt(h)).width);g.advances=A;g.offsetX=t;g.ascent=e;g.descent=f;g.leading=d;g.lineIndex=z;g.offsetY=v;t=g.advances;for(k=x=0;k<t.length;)A=t[k],++k,x+=A;g.width=
x;g.height=l;this.layoutGroups.push(g);v+=l;t=2;this.wordWrap&&g.offsetX+g.width>this.width-2&&(g.offsetY=v,g.offsetX=t,v+=l,z++);x=r+1;r=this.text.indexOf("\n",x);z++;b.end==r&&(a<this.textFormatRanges.length-1&&(a++,b=this.textFormatRanges[a],c.__merge(b.format),ob.__context.font=ob.getFont(c),e=c.size,f=.185*c.size,d=c.leading,l=e+f+d,-1<q&&(m=ob.__context.measureText(" ").width)),y=b.format)}else if(b.end>=q&&-1<q)for(g=null,A=!1;;){-1==q&&(q=b.end);k=this.text;h=[];for(var B=x;B<q;){var C=B++;
h.push(ob.__context.measureText(k.charAt(C)).width)}k=h;for(B=h=0;B<k.length;)C=k[B],++B,h+=C;this.wordWrap&&t+h>this.width-2&&(A=!0);if(A){v+=l;t=this.layoutGroups.length-1;for(u=0;;){g=this.layoutGroups[t];if(0<t&&g.startIndex>n)u++;else break;t--}z++;t=2;if(0<u)for(n=this.layoutGroups[this.layoutGroups.length-u].offsetX,u=this.layoutGroups.length-u,A=this.layoutGroups.length;u<A;)g=u++,g=this.layoutGroups[g],g.offsetX-=n,g.offsetY=v,g.lineIndex=z,t+=g.width;g=new Kg(b.format,x,q);g.advances=k;
g.offsetX=t;g.ascent=e;g.descent=f;g.leading=d;g.lineIndex=z;g.offsetY=v;g.width=h;g.height=l;this.layoutGroups.push(g);t=h+m;u=m;A=!1}else null!=g&&x==q?(2!=b.format.align&&(g.endIndex=q),g.advances.push(m),u+=m):(null==g||2==y.align?(g=new Kg(b.format,x,q),g.advances=k,g.offsetX=t,g.ascent=e,g.descent=f,g.leading=d,g.lineIndex=z,g.offsetY=v,g.width=h,g.height=l,this.layoutGroups.push(g)):(g.endIndex=q,g.advances=g.advances.concat(k),g.width+=u+h),g.advances.push(m),u=m),t+=h+m;x=q+1;n=q;q=this.text.indexOf(" ",
n+1);b.end<=n&&(g=null,a<this.textFormatRanges.length-1&&(a++,b=this.textFormatRanges[a],c.__merge(b.format),ob.__context.font=ob.getFont(c),e=c.size,f=.185*c.size,d=c.leading,l=e+f+d,-1<q&&(m=ob.__context.measureText(" ").width)));if(q>r&&-1<r||x>this.text.length||q>b.end||-1==q&&-1<r)break}else{if(x>=b.end)break;g=new Kg(b.format,x,b.end);k=this.text;for(A=[];x<b.end;)h=x++,A.push(ob.__context.measureText(k.charAt(h)).width);g.advances=A;g.offsetX=t;g.ascent=e;g.descent=f;g.leading=d;g.lineIndex=
z;g.offsetY=v;x=g.advances;for(A=k=0;A<x.length;)h=x[A],++A,k+=h;g.width=k;g.height=l;this.layoutGroups.push(g);t+=g.width;x=b.end;a<this.textFormatRanges.length-1&&(a++,b=this.textFormatRanges[a],c.__merge(b.format),ob.__context.font=ob.getFont(c),e=c.size,f=.185*c.size,d=c.leading,l=e+f+d,-1<q&&(m=ob.__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){case 0:b=
this.lineWidths[a]<this.width-4?Math.round((this.width-4-this.lineWidths[a])/2):0;break;case 4: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,k=this.layoutGroups.length;b<k;){var h=b++;if(this.layoutGroups[h].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),k=1;k<d;)h=k++,this.layoutGroups[g+
h].offsetX+=b*h}b=0;break;default:b=0}0<b&&(c.offsetX+=b)}},update:function(){null==this.text||""==Ca.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__:ob};var Lg=function(a,b,c){this.format=a;this.start=b;this.end=c};n["openfl._internal.text.TextFormatRange"]=Lg;Lg.__name__=["openfl","_internal","text","TextFormatRange"];Lg.prototype={__class__:Lg};var Kg=function(a,b,c){this.format=a;this.startIndex=b;this.endIndex=c};n["openfl._internal.text.TextLayoutGroup"]=
Kg;Kg.__name__=["openfl","_internal","text","TextLayoutGroup"];Kg.prototype={__class__:Kg};var di=function(){ed.call(this);null==ka.application&&(ka.application=this)};n["openfl.display.Application"]=di;di.__name__=["openfl","display","Application"];di.__super__=ed;di.prototype=L(ed.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 pk(a[0]);this.createWindow(a);break}if(null==this.preloader||this.preloader.complete)this.onPreloadComplete()}},__class__:di});var Ba=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 pb(null,0,0,a,b,d<<8|d>>24&255),this.image.set_transparent(c),
this.__isValid=!0);this.__createUVs();this.__worldTransform=new Oa;this.__worldColorTransform=new yd};n["openfl.display.BitmapData"]=Ba;Ba.__name__=["openfl","display","BitmapData"];Ba.__interfaces__=[ii];Ba.fromBase64=function(a,b,c){var d=new Ba(0,0,!0);d.__fromBase64(a,b,c);return d};Ba.fromBytes=function(a,b,c){var d=new Ba(0,0,!0);d.__fromBytes(a,b,c);return d};Ba.fromCanvas=function(a,b){null==b&&(b=!0);if(null==a)return null;var c=new Ba(0,0,b);c.__fromImage(pb.fromCanvas(a));c.image.set_transparent(b);
return c};Ba.fromFile=function(a,b,c){var d=new Ba(0,0,!0);d.__fromFile(a,b,c);return d};Ba.fromImage=function(a,b){null==b&&(b=!0);if(null==a||null==a.buffer)return null;var c=new Ba(0,0,b);c.__fromImage(a);c.image.set_transparent(b);return c};Ba.__asRenderTexture=function(a,b){null==b&&(b=0);null==a&&(a=0);var c=new Ba(0,0);c.__resize(a,b);return c};Ba.prototype={applyFilter:function(a,b,c,d){this.__isValid&&null!=a&&a.__isValid&&(X.convertToCanvas(this.image),X.createImageData(this.image),X.convertToCanvas(a.image),
X.createImageData(a.image),d.__applyFilter(this.image.buffer.__srcImageData,a.image.buffer.__srcImageData,b,c),this.image.dirty=!0)},clone:function(){return this.__isValid?Ba.fromImage(this.image.clone(),this.transparent):new Ba(this.width,this.height,this.transparent)},colorTransform:function(a,b){this.__isValid&&(this.image.colorTransform(a.__toLimeRectangle(),b.__toLimeColorMatrix()),this.__usingPingPongTexture=!1)},compare:function(a){if(a==this)return 0;if(null==a)return-1;if(0==this.__isValid||
0==a.__isValid)return-2;if(this.width!=a.width)return-3;if(this.height!=a.height)return-4;if(null!=this.image&&null!=a.image&&this.image.get_format()==a.image.get_format()){for(var b=this.image.get_data(),c=a.image.get_data(),d=!0,e=0,f=b.length;e<f;){var g=e++;if(b[g]!=c[g]){d=!1;break}}if(d)return 0}for(var b=null,k,h,l,m,n,e=0,f=this.height;e<f;)for(var g=e++,q=0,r=this.width;q<r;){var u=q++,c=!1;k=this.getPixel32(u,g);h=a.getPixel32(u,g);d=0;k!=h&&(l=(k>>16&255)-(h>>16&255),m=(k>>8&255)-(h>>8&
255),n=(k&255)-(h&255),0>l&&(l*=-1),0>m&&(m*=-1),0>n&&(n*=-1),0==l&&0==m&&0==n?(k=(k>>24&255)-(h>>24&255),0!=k&&(d=(d>>24&255)<<24|16711680|(d>>8&255)<<8|d&255,255,d=(d>>24&255)<<24|(d>>16&255)<<16|65280|d&255,255,d=(d>>24&255)<<24|(d>>16&255)<<16|(d>>8&255)<<8|255,255,d=(k&255)<<24|(d>>16&255)<<16|(d>>8&255)<<8|d&255,k,c=!0)):(d=(d>>24&255)<<24|(l&255)<<16|(d>>8&255)<<8|d&255,l,d=(d>>24&255)<<24|(d>>16&255)<<16|(m&255)<<8|d&255,m,d=(d>>24&255)<<24|(d>>16&255)<<16|(d>>8&255)<<8|n&255,n,d=-16777216|
(d>>16&255)<<16|(d>>8&255)<<8|d&255,255,c=!0));c&&(null==b&&(b=new Ba(this.width,this.height,this.transparent||a.transparent,0)),b.setPixel32(u,g,d))}return null==b?0:b},copyChannel:function(a,b,c,d,e){if(this.__isValid){switch(d){case 1:d=lc.RED;break;case 2:d=lc.GREEN;break;case 4:d=lc.BLUE;break;case 8:d=lc.ALPHA;break;default:return}switch(e){case 1:e=lc.RED;break;case 2:e=lc.GREEN;break;case 4:e=lc.BLUE;break;case 8:e=lc.ALPHA;break;default:return}this.image.copyChannel(a.image,b.__toLimeRectangle(),
c.__toLimeVector2(),d,e);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=ka.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 Ba(O.getProperty(a,"width"),O.getProperty(a,"height"),!0,0),d.draw(a),d.colorTransform(d.rect,c),a=d);X.convertToCanvas(this.image);X.sync(this.image,!0);c=this.image.buffer;d=new Zf;d.context=c.__srcContext;d.roundPixels=!0;d.maskManager=new Jh(d);f||(c.__srcContext.mozImageSmoothingEnabled=!1,c.__srcContext.msImageSmoothingEnabled=
!1,c.__srcContext.imageSmoothingEnabled=!1);null!=e&&d.maskManager.pushRect(e,new Oa);var g=a.__worldTransform;a.__updateTransforms(null!=b?b:new Oa);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}},encode:function(a,b,c){return this.__isValid&&
null!=a?q.__instanceof(b,om)?kb.fromBytes(this.image.encode("png")):q.__instanceof(b,qk)?kb.fromBytes(this.image.encode("jpg",q.__cast(b,qk).quality)):null:null},fillRect:function(a,b){this.__isValid&&null!=a&&(this.transparent&&0==(b&-16777216)&&(b=0),this.image.fillRect(a.__toLimeRectangle(),b,1),this.__usingPingPongTexture=!1)},floodFill:function(a,b,c){this.__isValid&&(this.image.floodFill(a,b,c,1),this.__usingPingPongTexture=!1)},generateFilterRect:function(a,b){return a.clone()},getBuffer:function(a){if(null==
this.__buffer){var b=[this.width,this.height,0,1,1,0,this.height,0,0,1,this.width,0,0,1,0,0,0,0,0,0];this.__buffer=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,this.__buffer);a.bufferData(a.ARRAY_BUFFER,null!=b?new Float32Array(b):null,a.STATIC_DRAW);a.bindBuffer(a.ARRAY_BUFFER,null)}return this.__buffer},getColorBoundsRect:function(a,b,c){null==c&&(c=!0);if(!this.__isValid)return new ha(0,0,this.width,this.height);a=this.image.getColorBoundsRect(a,b,c,1);return new ha(a.x,a.y,a.width,a.height)},
getPixel:function(a,b){return this.__isValid?this.image.getPixel(a,b,1):0},getPixel32:function(a,b){return this.__isValid?this.image.getPixel32(a,b,1):0},getPixels:function(a){if(!this.__isValid)return null;null==a&&(a=this.rect);return kb.fromBytes(this.image.getPixels(a.__toLimeRectangle(),1))},getSurface:function(){if(!this.__isValid)return null;null==this.__surface&&(this.__surface=He.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&&
nn.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},getVector:function(a){a=this.getPixels(a);var b=u["int"](kb.get_length(a)/4),c;c=
new Lb;c.data=Array(b);c.length=b;c.fixed=!0;for(var d=0;d<b;){var e=d++,f=a.readUnsignedInt();if(!c.fixed&&(e>=c.length&&(c.length=e+1),c.data.length<c.length)){var g;g=Array(c.data.length+10);H.blit(c.data,0,g,0,c.data.length);c.data=g}c.data[e]=f}return c},histogram:function(a){a=null!=a?a:new ha(0,0,this.width,this.height);a=this.getPixels(a);for(var b=[],c=0;4>c;)c++,b.push(function(a){a=[];for(var b=0;256>b;)b++,a.push(0);return a}(this));for(var c=0,d=kb.get_length(a);c<d;){var e=c++;++b[e%
4][a.readUnsignedByte()]}return b},hitTest:function(a,b,c,d,e){null==e&&(e=1);if(!this.__isValid)return!1;q.__instanceof(c,qb)&&(c=q.__cast(c,qb).bitmapData);if(q.__instanceof(c,W)){if(e=c.x-a.x|0,a=c.y-a.y|0,this.rect.contains(e,a)&&(this.getPixel32(e,a)>>24&255)>=b)return!0}else if(q.__instanceof(c,Ba)){var f,g;null==d?g=f=0:(f=d.x-a.x|0,g=d.y-a.y|0);if(this.rect.contains(f,g)){d=ha.__temp;d.setTo(f,g,Math.min(c.width,this.width-f),Math.min(c.height,this.height-g));a=this.getPixels(d);d.offset(-f,
-g);c=c.getPixels(d);f=d.width*d.height|0;for(var k=0;k<f;)if(k++,d=a.readUnsignedInt(),g=c.readUnsignedInt(),(d>>24&255)>=b&&(g>>24&255)>=e)return!0}}else if(q.__instanceof(c,ha)&&(e=ha.__temp,e.copyFrom(c),e.offset(-a.x,-a.y),e.__contract(0,0,this.width,this.height),0<e.width&&0<e.height))for(e=this.getPixels(e),a=u["int"](kb.get_length(e)/4),f=0;f<a;)if(f++,c=e.readUnsignedInt(),(c>>24&255)>=b)return!0;return!1},lock:function(){},merge:function(a,b,c,d,e,f,g){this.__isValid&&null!=a&&a.__isValid&&
null!=b&&null!=c&&(this.image.merge(a.image,b.__toLimeRectangle(),c.__toLimeVector2(),d,e,f,g),this.__usingPingPongTexture=!1)},noise:function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=7);null==c&&(c=255);null==b&&(b=0);if(this.__isValid){var f;f=function(){a=1103515245*a+12345;return u["int"](Math.abs(a/65536))%32768};f();c-=b;new kd(0);var g=1==(d&1),k=1==(d&2)>>1,h=1==(d&4)>>2;d=1==(d&8)>>3;for(var l=0,m=this.height;l<m;)for(var n=l++,q=0,r=this.width;q<r;){var t=q++,v=0,x=0,y=0,z=255;e?(v=y=x=b+
f()%c,z=255):(g&&(v=b+f()%c),k&&(y=b+f()%c),h&&(x=b+f()%c),d&&(z=b+f()%c));z=(z<<8)+v;z=(z<<8)+y;z=(z<<8)+x;this.setPixel32(t,n,z)}}},paletteMap:function(a,b,c,d,e,f,g){a=b.width|0;var k=b.height|0;b=this.getPixels(b);b.position=0;for(var h,l,m,n,q,r,u,t=0,v=k*a;t<v;){var x=t++;h=b.readUnsignedInt();m=null==g?h&-16777216:g[h>>24&255];q=null==d?h&16711680:d[h>>16&255];r=null==e?h&65280:e[h>>8&255];u=null==f?h&255:f[h&255];n=(m>>24&255)+(q>>24&255)+(r>>24&255)+(u>>24&255);255<n&&255==n;h=(m>>16&255)+
(q>>16&255)+(r>>16&255)+(u>>16&255);255<h&&255==h;l=(m>>8&255)+(q>>8&255)+(r>>8&255)+(u>>8&255);255<l&&255==l;m=(m&255)+(q&255)+(r&255)+(u&255);255<m&&255==m;h=n<<24|h<<16|l<<8|m;b.position=4*x;b.writeUnsignedInt(h)}b.position=0;c=new ha(c.x,c.y,a,k);this.setPixels(c,b)},perlinNoise:function(a,b,c,d,e,f,g,k,h){ka.notImplemented("BitmapData.perlinNoise")},scroll:function(a,b){this.__isValid&&(this.image.scroll(a,b),this.__usingPingPongTexture=!1)},setPixel:function(a,b,c){this.__isValid&&(this.image.setPixel(a,
b,c,1),this.__usingPingPongTexture=!1)},setPixel32:function(a,b,c){this.__isValid&&(this.image.setPixel32(a,b,c,1),this.__usingPingPongTexture=!1)},setPixels:function(a,b){this.__isValid&&null!=a&&(this.image.setPixels(a.__toLimeRectangle(),kb.toBytes(b),1),this.__usingPingPongTexture=!1)},setVector:function(a,b){var c=new kd(0);kb.set_length(c,4*b.length);for(var d=0;d<b.length;){var e=b.data[d];++d;c.writeUnsignedInt(e)}c.position=0;this.setPixels(a,c)},threshold:function(a,b,c,d,e,f,g,k){null==
k&&(k=!1);null==g&&(g=-1);null==f&&(f=0);return null==a||null==b||null==c||b.x>a.width||b.y>a.height||c.x>this.width||c.y>this.height?0:this.image.threshold(a.image,b.__toLimeRectangle(),c.__toLimeVector2(),d,e,f,g,k,1)},unlock:function(a){},__createUVs:function(a,b,c,d,e,f,g,k){null==k&&(k=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 Mh);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=k},__drawGL:function(a,b,c,d,e,f,g,k,h,l,m){null==m&&(m=!0);null==l&&(l=!1);null==h&&(h=!1);null==k&&(k=!1);null==g&&(g=!1);this.__pingPongTexture=Ic.pushFramebuffer(a,this.__pingPongTexture,this.rect,g,this.transparent,h,m);Ic.drawBitmapDrawable(a,k?this:null,b,c,d,e,f);Ic.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},__fromBase64:function(a,b,c){var d=this;pb.fromBase64(a,b,function(a){d.__fromImage(a);null!=c&&c(d)})},__fromBytes:function(a,b,c){var d=this;pb.fromBytes(kb.toBytes(a),function(a){d.__fromImage(a);if(null!=b){X.convertToCanvas(a);X.createImageData(a);for(var f=a.buffer.data,g=0,k=kb.get_length(b);g<k;){var h=g++,l=b.readUnsignedByte();f[4*h+3]=l}a.dirty=!0}null!=c&&c(d)})},__fromFile:function(a,b,c){var d=this;pb.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)},__renderCairo:function(a){if(this.__isValid){var b=a.cairo;null==this.__worldTransform&&(this.__worldTransform=new Oa);var c=this.__worldTransform;a.roundPixels?(a=c.__toMatrix3(),a.tx=Math.round(a.tx),a.ty=Math.round(a.ty),b.set_matrix(a)):b.set_matrix(c.__toMatrix3());a=this.getSurface();null!=a&&(a=Kb.createForSurface(a),
1==b.get_antialias()?Kb.set_filter(a,3):Kb.set_filter(a,1),b.set_source(a),b.paint())}},__renderCairoMask:function(a){},__renderCanvas:function(a){if(this.__isValid){X.sync(this.image,!1);var b=a.context;null==this.__worldTransform&&(this.__worldTransform=new Oa);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)}},__renderCanvasMask:function(a){},__renderGL:function(a){a.spriteBatch.renderBitmapData(this,
!1,this.__worldTransform,this.__worldColorTransform,this.__worldColorTransform.alphaMultiplier,this.__blendMode,this.__shader)},__resize:function(a,b){this.width=a;this.height=b;this.rect.width=a;this.rect.height=b},__sync:function(){X.sync(this.image,!1)},__updateChildren:function(a){},__updateMask:function(a){},__updateTransforms:function(a){null==a?this.__worldTransform.identity():this.__worldTransform=a},__class__:Ba};var Mh=function(){this.x0=this.x1=this.x2=this.x3=this.y0=this.y1=this.y2=this.y3=
0};n["openfl.display.TextureUvs"]=Mh;Mh.__name__=["openfl","display","TextureUvs"];Mh.prototype={reset:function(){this.x0=this.x1=this.x2=this.x3=this.y0=this.y1=this.y2=this.y3=0},__class__:Mh};var Sc={};n["openfl.display._BlendMode.BlendMode_Impl_"]=Sc;Sc.__name__=["openfl","display","_BlendMode","BlendMode_Impl_"];Sc.fromString=function(a){switch(a){case "add":return 0;case "alpha":return 1;case "darken":return 2;case "difference":return 3;case "erase":return 4;case "hardlight":return 5;case "invert":return 6;
case "layer":return 7;case "lighten":return 8;case "multiply":return 9;case "normal":return 10;case "overlay":return 11;case "screen":return 12;case "shader":return 13;case "subtract":return 14;default:return null}};Sc.toString=function(a){switch(a){case 0:return"add";case 1:return"alpha";case 2:return"darken";case 3:return"difference";case 4:return"erase";case 5:return"hardlight";case 6:return"invert";case 7:return"layer";case 8:return"lighten";case 9:return"multiply";case 10:return"normal";case 11:return"overlay";
case 12:return"screen";case 13:return"shader";case 14:return"subtract";default:return null}};var Jg={};n["openfl.display._CapsStyle.CapsStyle_Impl_"]=Jg;Jg.__name__=["openfl","display","_CapsStyle","CapsStyle_Impl_"];Jg.fromString=function(a){switch(a){case "none":return 0;case "round":return 1;case "square":return 2;default:return null}};Jg.toString=function(a){switch(a){case 0:return"none";case 1:return"round";case 2:return"square";default:return null}};var pm=function(a,b){Va.call(this);this.__name=
a;this.__frame=b};n["openfl.display.FrameLabel"]=pm;pm.__name__=["openfl","display","FrameLabel"];pm.__super__=Va;pm.prototype=L(Va.prototype,{get_frame:function(){return this.__frame},get_name:function(){return this.__name},__class__:pm,__properties__:{get_name:"get_name",get_frame:"get_frame"}});var rk={};n["openfl.display._GradientType.GradientType_Impl_"]=rk;rk.__name__=["openfl","display","_GradientType","GradientType_Impl_"];rk.fromString=function(a){switch(a){case "linear":return 0;case "radial":return 1;
default:return null}};rk.toString=function(a){switch(a){case 0:return"linear";case 1:return"radial";default:return null}};var jc=function(){this.__glStack=[];this.__dirty=!0;this.__commands=new tf;this.__positionY=this.__positionX=this.__strokePadding=0;this.__hardware=!0;this.moveTo(0,0)};n["openfl.display.Graphics"]=jc;jc.__name__=["openfl","display","Graphics"];jc.prototype={beginBitmapFill:function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!0);this.__commands.beginBitmapFill(a,null!=b?b.clone():null,
c,d);this.__visible=!0},beginFill:function(a,b){null==b&&(b=1);null==a&&(a=0);this.__commands.beginFill(a&16777215,b);0<b&&(this.__visible=!0)},beginGradientFill:function(a,b,c,d,e,f,g,k){null==k&&(k=0);null==g&&(g=1);null==f&&(f=0);this.__commands.beginGradientFill(a,b,c,d,e,f,g,k);this.__hardware=!1;for(a=0;a<c.length;)if(b=c[a],++a,0<b){this.__visible=!0;break}},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)},copyFrom:function(a){this.__bounds=null!=a.__bounds?a.__bounds.clone():null;this.__commands=a.__commands.copy();this.set___dirty(!0);this.__strokePadding=a.__strokePadding;this.__positionX=a.__positionX;this.__positionY=a.__positionY;this.__transformDirty=!0;this.__visible=a.__visible},cubicCurveTo:function(a,b,c,d,e,f){this.__inflateBounds(this.__positionX-this.__strokePadding,this.__positionY-this.__strokePadding);this.__inflateBounds(this.__positionX+
this.__strokePadding,this.__positionY+this.__strokePadding);var g,k,h,l;h=g=e;if(!(a<e&&a>this.__positionX||a>e&&a<this.__positionX)||!(c<e&&c>this.__positionX||c>e&&c<this.__positionX)){l=2*this.__positionX-4*a+2*c;var m=a-this.__positionX,n=-this.__positionX+3*a+e-3*c;k=(-l+Math.sqrt(l*l-4*m*n))/(2*n);l=(-l-Math.sqrt(l*l-4*m*n))/(2*n);0<k&&1>k&&(g=this.__calculateBezierCubicPoint(k,this.__positionX,a,c,e));0<l&&1>l&&(h=this.__calculateBezierCubicPoint(l,this.__positionX,a,c,e))}l=k=f;if(!(b<f&&
b>this.__positionX||b>f&&b<this.__positionX)||!(d<f&&d>this.__positionX||d>f&&d<this.__positionX)){var n=2*this.__positionX-4*b+2*d,q=b-this.__positionX,r=-this.__positionX+3*b+f-3*d,m=(-n+Math.sqrt(n*n-4*q*r))/(2*r),n=(-n-Math.sqrt(n*n-4*q*r))/(2*r);0<m&&1>m&&(k=this.__calculateBezierCubicPoint(m,this.__positionX,b,d,f));0<n&&1>n&&(l=this.__calculateBezierCubicPoint(n,this.__positionX,b,d,f))}this.__inflateBounds(g-this.__strokePadding,k-this.__strokePadding);this.__inflateBounds(g+this.__strokePadding,
k+this.__strokePadding);this.__inflateBounds(h-this.__strokePadding,l-this.__strokePadding);this.__inflateBounds(h+this.__strokePadding,l+this.__strokePadding);this.__positionX=e;this.__positionY=f;this.__commands.cubicCurveTo(a,b,c,d,e,f);this.__hardware=!1;this.set___dirty(!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))},drawEllipse: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.drawEllipse(a,
b,c,d),this.__hardware=!1,this.set___dirty(!0))},drawGraphicsData:function(a){for(var b,c,d=0;d<a.length;)b=a.data[d],++d,q.__instanceof(b,Nh)?this.beginFill(b.color,b.alpha):q.__instanceof(b,Oh)?this.beginBitmapFill(b.bitmapData,b.matrix,b.repeat,b.smooth):q.__instanceof(b,Ph)?this.beginGradientFill(b.type,b.colors,b.alphas,b.ratios,b.matrix,b.spreadMethod,b.interpolationMethod,b.focalPointRatio):q.__instanceof(b,sk)?(c=b,q.__instanceof(c.fill,Nh)?(b=c.fill,this.lineStyle(c.thickness,b.color,b.alpha,
c.pixelHinting,c.scaleMode,c.caps,c.joints,c.miterLimit)):(this.lineStyle(c.thickness,0,1,c.pixelHinting,c.scaleMode,c.caps,c.joints,c.miterLimit),q.__instanceof(c.fill,Oh)?(b=c.fill,this.lineBitmapStyle(b.bitmapData,b.matrix,b.repeat,b.smooth)):q.__instanceof(c.fill,Ph)&&(b=c.fill,this.lineGradientStyle(b.type,b.colors,b.alphas,b.ratios,b.matrix,b.spreadMethod,b.interpolationMethod,b.focalPointRatio)))):q.__instanceof(b,tk)?this.drawPath(b.commands,b.data,b.winding):q.__instanceof(b,uk)&&this.endFill()},
drawPath:function(a,b,c){var d=c=0;try{for(;d<a.length;){var e=a.data[d];++d;if(null!=e)switch(e){case 1:this.moveTo(b.data[c],b.data[c+1]);c+=2;break;case 2:this.lineTo(b.data[c],b.data[c+1]);c+=2;break;case 4:throw this.moveTo(b.data[c+2],b.data[c+3]),"__break__";case 5:throw this.lineTo(b.data[c+2],b.data[c+3]),"__break__";case 3:this.curveTo(b.data[c],b.data[c+1],b.data[c+2],b.data[c+3]);c+=4;break;case 6:this.cubicCurveTo(b.data[c],b.data[c+1],b.data[c+2],b.data[c+3],b.data[c+4],b.data[c+5]),
c+=6}}}catch(f){if("__break__"!=f)throw f;}},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){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))},drawRoundRectComplex:function(a,b,c,d,e,f,g,k){ka.notImplemented("Graphics.drawRoundRectComplex")},drawTiles:function(a,b,c,d,e,f){null==f&&(f=-1);null==d&&(d=0);null==c&&(c=!1);var g=0<(d&1),k=0<(d&2),h=0<(d&4),l=0<(d&8),m=0<(d&16),n=0<(d&128),q=0<(d&32),r=0<(d&64),t=ha.__temp,v=Oa.__temp,x=3,y=f;0>f&&(y=b.length);if(m||g||k||h||l||n){var z=0,A=0,B=0;q&&(x=r?8:6);g&&(z=x,x++);k&&(A=x,x++);m&&(B=x,x+=4);h&&(x+=3);l&&x++;n&&(x+=4);for(var h=0,l=
-1,C,E,H,G,F=null,I=null;h<y;)n=b[h],C=b[h+1],E=q?-1:b[h+2]|0,H=1,G=0,g&&(H=b[h+z]),k&&(G=b[h+A]),0>E?F=null:q||l==E?q&&(F=a.__rectTile,F.setTo(b[h+2],b[h+3],b[h+4],b[h+5]),I=a.__point,r?I.setTo(b[h+6]/F.width,b[h+7]/F.height):I.setTo(0,0)):(l=E,F=a.__tileRects[E],I=a.__centerPoints[E]),null!=F&&(m?(t.setTo(0,0,F.width,F.height),v.setTo(b[h+B],b[h+B+1],b[h+B+2],b[h+B+3],0,0),G=I.x*H,H*=I.y,v.translate(n-(G*v.a+H*v.c+v.tx),C-(G*v.b+H*v.d+v.ty)),t.__transform(t,v),this.__inflateBounds(t.x,t.y),this.__inflateBounds(t.get_right(),
t.get_bottom())):(E=F.width*H,H*=F.height,n-=I.x*E,C-=I.y*H,0!=G?(t.setTo(0,0,E,H),v.identity(),v.rotate(G),v.translate(n,C),t.__transform(t,v),this.__inflateBounds(t.x,t.y),this.__inflateBounds(t.get_right(),t.get_bottom())):(this.__inflateBounds(n,C),this.__inflateBounds(n+E,C+H)))),h+=x}else for(v=ha.__temp,x=0;x<y;)g=b[x++],k=b[x++],z=q?-1:u["int"](b[x++]),A=t=0,q?(v.setTo(b[x++],b[x++],b[x++],b[x++]),r&&(t=b[x++],A=b[x++]),this.__inflateBounds(g-t,k-A),this.__inflateBounds(g-t+v.width,k-A+v.height)):
(m=a.__tileRects[z],null!=m&&(z=a.__centerPoints[z],t=z.x*m.width,A=z.y*m.height,this.__inflateBounds(g-t,k-A),this.__inflateBounds(g-t+m.width,k-A+m.height)));this.__commands.drawTiles(a,b,c,d,e,f);this.set___dirty(!0);this.__visible=!0},drawTriangles:function(a,b,c,d){null==d&&(d=1);var e=a.length/2|0;null==d&&(d=1);if(null==b){if(0!=e%3)throw new F(new vk("Not enough vertices to close a triangle."));b=new Lb;b.data=[];b.length=0;b.fixed=!1;for(var f=0;f<e;){var g=f++;if(!b.fixed){b.length++;if(b.data.length<
b.length){var k;k=Array(b.data.length+10);H.blit(b.data,0,k,0,b.data.length);b.data=k}b.data[b.length-1]=g}b.length}}this.__inflateBounds(0,0);var h=f=-Infinity;k=g=-Infinity;for(var l=0;l<e;)h=l++,f=a.data[2*h],h=a.data[2*h+1],g<f&&(g=f),k<h&&(k=h);this.__inflateBounds(g,k);this.__commands.drawTriangles(a,b,c,d);this.set___dirty(!0);this.__visible=!0},endFill:function(){this.__commands.endFill()},lineBitmapStyle:function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!0);this.__commands.lineBitmapStyle(a,
null!=b?b.clone():null,c,d)},lineGradientStyle:function(a,b,c,d,e,f,g,k){null==k&&(k=0);null==g&&(g=1);null==f&&(f=0);this.__commands.lineGradientStyle(a,b,c,d,e,f,g,k)},lineStyle:function(a,b,c,d,e,f,g,k){null==k&&(k=3);null==e&&(e=2);null==d&&(d=!1);null==c&&(c=1);null==b&&(b=0);null!=a&&(1==g?a>this.__strokePadding&&(this.__strokePadding=a):a/2>this.__strokePadding&&(this.__strokePadding=a/2));this.__commands.lineStyle(a,b,c,d,e,f,g,k);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)},__calculateBezierCubicPoint:function(a,b,c,d,e){var f=1-a;return b*f*f*f+3*c*a*f*f+3*d*f*a*a+e*a*a*a},__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?v.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__:jc,__properties__:{set___dirty:"set___dirty"}};var Mg=function(){};n["openfl.display.IGraphicsFill"]=Mg;Mg.__name__=["openfl","display","IGraphicsFill"];Mg.prototype={__class__:Mg};var uf=function(){};n["openfl.display.IGraphicsData"]=uf;uf.__name__=["openfl","display","IGraphicsData"];uf.prototype={__class__:uf};var Oh=function(a,
b,c,d){null==d&&(d=!1);null==c&&(c=!0);this.bitmapData=a;this.matrix=b;this.repeat=c;this.smooth=d;this.__graphicsDataType=Zb.BITMAP;this.__graphicsFillType=$c.BITMAP_FILL};n["openfl.display.GraphicsBitmapFill"]=Oh;Oh.__name__=["openfl","display","GraphicsBitmapFill"];Oh.__interfaces__=[Mg,uf];Oh.prototype={__class__:Oh};var uk=function(){this.__graphicsDataType=Zb.END;this.__graphicsFillType=$c.END_FILL};n["openfl.display.GraphicsEndFill"]=uk;uk.__name__=["openfl","display","GraphicsEndFill"];uk.__interfaces__=
[Mg,uf];uk.prototype={__class__:uk};var Ph=function(a,b,c,d,e,f,g,k){null==k&&(k=0);null==a&&(a=0);null==f&&(f=0);null==g&&(g=1);this.type=a;this.colors=b;this.alphas=c;this.ratios=d;this.matrix=e;this.spreadMethod=f;this.interpolationMethod=g;this.focalPointRatio=k;this.__graphicsDataType=Zb.GRADIENT;this.__graphicsFillType=$c.GRADIENT_FILL};n["openfl.display.GraphicsGradientFill"]=Ph;Ph.__name__=["openfl","display","GraphicsGradientFill"];Ph.__interfaces__=[Mg,uf];Ph.prototype={__class__:Ph};var Jn=
function(){};n["openfl.display.IGraphicsPath"]=Jn;Jn.__name__=["openfl","display","IGraphicsPath"];var tk=function(a,b,c){null==c&&(c="evenOdd");this.commands=a;this.data=b;this.winding=c;this.__graphicsDataType=Zb.PATH};n["openfl.display.GraphicsPath"]=tk;tk.__name__=["openfl","display","GraphicsPath"];tk.__interfaces__=[Jn,uf];tk.prototype={curveTo:function(a,b,c,d){if(null!=this.commands&&null!=this.data){var e=this.commands;if(!e.fixed){e.length++;if(e.data.length<e.length){var f;f=Array(e.data.length+
10);H.blit(e.data,0,f,0,e.data.length);e.data=f}e.data[e.length-1]=3}e.length;e=this.data;e.fixed||(e.length++,e.data.length<e.length&&(f=Array(e.data.length+10),H.blit(e.data,0,f,0,e.data.length),e.data=f),e.data[e.length-1]=c);e.length;c=this.data;c.fixed||(c.length++,c.data.length<c.length&&(e=Array(c.data.length+10),H.blit(c.data,0,e,0,c.data.length),c.data=e),c.data[c.length-1]=d);c.length;d=this.data;d.fixed||(d.length++,d.data.length<d.length&&(c=Array(d.data.length+10),H.blit(d.data,0,c,0,
d.data.length),d.data=c),d.data[d.length-1]=a);d.length;a=this.data;a.fixed||(a.length++,a.data.length<a.length&&(d=Array(a.data.length+10),H.blit(a.data,0,d,0,a.data.length),a.data=d),a.data[a.length-1]=b);a.length}},lineTo:function(a,b){if(null!=this.commands&&null!=this.data){var c=this.commands;if(!c.fixed){c.length++;if(c.data.length<c.length){var d;d=Array(c.data.length+10);H.blit(c.data,0,d,0,c.data.length);c.data=d}c.data[c.length-1]=2}c.length;c=this.data;c.fixed||(c.length++,c.data.length<
c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d),c.data[c.length-1]=a);c.length;c=this.data;c.fixed||(c.length++,c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d),c.data[c.length-1]=b);c.length}},moveTo:function(a,b){if(null!=this.commands&&null!=this.data){var c=this.commands;if(!c.fixed){c.length++;if(c.data.length<c.length){var d;d=Array(c.data.length+10);H.blit(c.data,0,d,0,c.data.length);c.data=d}c.data[c.length-1]=
1}c.length;c=this.data;c.fixed||(c.length++,c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d),c.data[c.length-1]=a);c.length;c=this.data;c.fixed||(c.length++,c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d),c.data[c.length-1]=b);c.length}},wideLineTo:function(a,b){if(null!=this.commands&&null!=this.data){var c=this.commands;if(!c.fixed){c.length++;if(c.data.length<c.length){var d;d=Array(c.data.length+10);
H.blit(c.data,0,d,0,c.data.length);c.data=d}c.data[c.length-1]=2}c.length;c=this.data;c.fixed||(c.length++,c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d),c.data[c.length-1]=a);c.length;c=this.data;c.fixed||(c.length++,c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d),c.data[c.length-1]=b);c.length}},wideMoveTo:function(a,b){if(null!=this.commands&&null!=this.data){var c=this.commands;if(!c.fixed){c.length++;
if(c.data.length<c.length){var d;d=Array(c.data.length+10);H.blit(c.data,0,d,0,c.data.length);c.data=d}c.data[c.length-1]=1}c.length;c=this.data;c.fixed||(c.length++,c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d),c.data[c.length-1]=a);c.length;c=this.data;c.fixed||(c.length++,c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d),c.data[c.length-1]=b);c.length}},__class__:tk};var Nh=function(a,b){null==b&&(b=
1);null==a&&(a=0);this.alpha=b;this.color=a;this.__graphicsDataType=Zb.SOLID;this.__graphicsFillType=$c.SOLID_FILL};n["openfl.display.GraphicsSolidFill"]=Nh;Nh.__name__=["openfl","display","GraphicsSolidFill"];Nh.__interfaces__=[Mg,uf];Nh.prototype={__class__:Nh};var Kn=function(){};n["openfl.display.IGraphicsStroke"]=Kn;Kn.__name__=["openfl","display","IGraphicsStroke"];var sk=function(a,b,c,d,e,f,g){null==f&&(f=3);null==b&&(b=!1);null==a&&(a=0);this.caps=null!=d?d:0;this.fill=g;this.joints=null!=
e?e:2;this.miterLimit=f;this.pixelHinting=b;this.scaleMode=null!=c?c:2;this.thickness=a;this.__graphicsDataType=Zb.STROKE};n["openfl.display.GraphicsStroke"]=sk;sk.__name__=["openfl","display","GraphicsStroke"];sk.__interfaces__=[Kn,uf];sk.prototype={__class__:sk};var Zb=n["openfl.display.GraphicsDataType"]={__ename__:["openfl","display","GraphicsDataType"],__constructs__:"STROKE SOLID GRADIENT PATH BITMAP END".split(" ")};Zb.STROKE=["STROKE",0];Zb.STROKE.toString=J;Zb.STROKE.__enum__=Zb;Zb.SOLID=
["SOLID",1];Zb.SOLID.toString=J;Zb.SOLID.__enum__=Zb;Zb.GRADIENT=["GRADIENT",2];Zb.GRADIENT.toString=J;Zb.GRADIENT.__enum__=Zb;Zb.PATH=["PATH",3];Zb.PATH.toString=J;Zb.PATH.__enum__=Zb;Zb.BITMAP=["BITMAP",4];Zb.BITMAP.toString=J;Zb.BITMAP.__enum__=Zb;Zb.END=["END",5];Zb.END.toString=J;Zb.END.__enum__=Zb;var $c=n["openfl.display.GraphicsFillType"]={__ename__:["openfl","display","GraphicsFillType"],__constructs__:["SOLID_FILL","GRADIENT_FILL","BITMAP_FILL","END_FILL"]};$c.SOLID_FILL=["SOLID_FILL",0];
$c.SOLID_FILL.toString=J;$c.SOLID_FILL.__enum__=$c;$c.GRADIENT_FILL=["GRADIENT_FILL",1];$c.GRADIENT_FILL.toString=J;$c.GRADIENT_FILL.__enum__=$c;$c.BITMAP_FILL=["BITMAP_FILL",2];$c.BITMAP_FILL.toString=J;$c.BITMAP_FILL.__enum__=$c;$c.END_FILL=["END_FILL",3];$c.END_FILL.toString=J;$c.END_FILL.__enum__=$c;var wk={};n["openfl.display._InterpolationMethod.InterpolationMethod_Impl_"]=wk;wk.__name__=["openfl","display","_InterpolationMethod","InterpolationMethod_Impl_"];wk.fromString=function(a){switch(a){case "linearRGB":return 0;
case "rgb":return 1;default:return null}};wk.toString=function(a){switch(a){case 0:return"linearRGB";case 1:return"rgb";default:return null}};var qk=function(a){null==a&&(a=80);this.quality=a};n["openfl.display.JPEGEncoderOptions"]=qk;qk.__name__=["openfl","display","JPEGEncoderOptions"];qk.prototype={__class__:qk};var Ig={};n["openfl.display._JointStyle.JointStyle_Impl_"]=Ig;Ig.__name__=["openfl","display","_JointStyle","JointStyle_Impl_"];Ig.fromString=function(a){switch(a){case "bevel":return 0;
case "miter":return 1;case "round":return 2;default:return null}};Ig.toString=function(a){switch(a){case 0:return"bevel";case 1:return"miter";case 2:return"round";default:return null}};var Ng={};n["openfl.display._LineScaleMode.LineScaleMode_Impl_"]=Ng;Ng.__name__=["openfl","display","_LineScaleMode","LineScaleMode_Impl_"];Ng.fromString=function(a){switch(a){case "horizontal":return 0;case "none":return 1;case "normal":return 2;case "vertical":return 3;default:return null}};Ng.toString=function(a){switch(a){case 0:return"horizontal";
case 1:return"none";case 2:return"normal";case 3:return"vertical";default:return null}};var Ri=function(){xc.call(this);this.contentLoaderInfo=Re.create(this)};n["openfl.display.Loader"]=Ri;Ri.__name__=["openfl","display","Loader"];Ri.__super__=xc;Ri.prototype=L(xc.prototype,{close:function(){ka.notImplemented("Loader.close")},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 zg;e.doWork.add(function(b){Ba.fromFile(a.url,
function(a){e.sendComplete(a)},function(){e.sendError("ioError")})});e.onError.add(K(this,this.BitmapData_onError));e.onComplete.add(K(this,this.BitmapData_onLoad));e.run()},loadBytes:function(a,b){var c=new zg;c.doWork.add(function(b){Ba.fromBytes(a,null,function(a){c.sendComplete(a)})});c.onComplete.add(K(this,this.BitmapData_onLoad));c.run()},unload:function(){if(0<this.get_numChildren()){for(;0<this.get_numChildren();)this.removeChildAt(0);this.content=null;this.contentLoaderInfo.url=null;this.contentLoaderInfo.contentType=
null;this.contentLoaderInfo.content=null;this.contentLoaderInfo.bytesLoaded=0;this.contentLoaderInfo.bytesTotal=0;this.contentLoaderInfo.width=0;this.contentLoaderInfo.height=0;var a=new fa("unload");a.currentTarget=this;this.__dispatchEvent(a)}},unloadAndStop:function(a){ka.notImplemented("Loader.unloadAndStop")},BitmapData_onLoad:function(a){this.contentLoaderInfo.content=new qb(a);this.content=this.contentLoaderInfo.content;this.addChild(this.contentLoaderInfo.content);a=new fa("complete");a.target=
this.contentLoaderInfo;a.currentTarget=this.contentLoaderInfo;this.contentLoaderInfo.dispatchEvent(a)},BitmapData_onError:function(a){a=new $e("ioError");a.target=this.contentLoaderInfo;a.currentTarget=this.contentLoaderInfo;this.contentLoaderInfo.dispatchEvent(a)},__class__:Ri});var om=function(a){null==a&&(a=!1);this.fastCompression=a};n["openfl.display.PNGEncoderOptions"]=om;om.__name__=["openfl","display","PNGEncoderOptions"];om.prototype={__class__:om};var Qh={};n["openfl.display._PixelSnapping.PixelSnapping_Impl_"]=
Qh;Qh.__name__=["openfl","display","_PixelSnapping","PixelSnapping_Impl_"];Qh.fromString=function(a){switch(a){case "always":return 0;case "auto":return 1;case "never":return 2;default:return null}};Qh.toString=function(a){switch(a){case 0:return"always";case 1:return"auto";case 2:return"never";default:return null}};var fi=function(a){Ac.call(this);if(null!=a&&(this.display=a,ka.current.addChild(a),q.__instanceof(a,Sd)))q.__cast(a,Sd).onInit()};n["openfl.display.Preloader"]=fi;fi.__name__=["openfl",
"display","Preloader"];fi.__super__=Ac;fi.prototype=L(Ac.prototype,{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=wg.withoutExtension(d),P.remove(c,d)||this.total++,c.push(d)}}for(e=0;e<c.length;)f=c[e],++e,d=new Kd,d.addEventListener("complete",K(this,this.sound_onComplete)),d.addEventListener("ioError",K(this,this.sound_onIOError)),d.load(new ne(f+".ogg"));Ac.prototype.load.call(this,a,b)},start:function(){null!=this.display&&
q.__instanceof(this.display,Sd)?(this.display.addEventListener("complete",K(this,this.display_onComplete)),q.__cast(this.display,Sd).onLoaded()):Ac.prototype.start.call(this)},update:function(a,b){if(null!=this.display&&q.__instanceof(this.display,Sd))q.__cast(this.display,Sd).onUpdate(a,b)},display_onComplete:function(a){this.display.removeEventListener("complete",K(this,this.display_onComplete));ka.current.removeChild(this.display);ka.current.stage.set_focus(null);this.display=null;Ac.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__:fi});var Wa=function(a){null==a&&(a=1);this.__dirty=!0;this.repeatX=this.repeatY=33071;this.precision=1;this.precision=a;this.data=new ma;a=new Og("vec2");this.data.set(Wa.uObjectSize,a);a=new Og("vec2");this.data.set(Wa.uTextureSize,
a)};n["openfl.display.Shader"]=Wa;Wa.__name__=["openfl","display","Shader"];Wa.prototype={__init:function(a){var b=this.__dirty;b&&(null!=this.__shader&&this.__shader.destroy(),this.__shader=new Ob(a),this.__shader.vertexString=null!=this.__vertexCode?this.__vertexCode:$f.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(Wa.fragmentHeader);b.push(a);this.__fragmentCode=b.join("\n")},__buildVertexCode: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(Wa.vertexHeader);b.push(a);this.__vertexCode=b.join("\n")},
__class__:Wa};var Og=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()};n["openfl.display.GLShaderParameter"]=Og;Og.__name__=["openfl","display","GLShaderParameter"];Og.prototype={__init:function(){var a=this.type;switch(a){case "bool":this.size=this.internalType=1;if(4==this.internalType)throw new F("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 F("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 F("This parameter doesn't accept a value, use bitmap instead");this.value=[0];break;case "sampler2D":if(-1<a.indexOf("vec"))Ca.startsWith(this.type,"b")||Ca.startsWith(this.type,"i")?this.internalType=1:this.internalType=2,this.size=u.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=u.parseInt(this.type.charAt(this.type.length-1));if(4==this.internalType)throw new F("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"))Ca.startsWith(this.type,"b")||Ca.startsWith(this.type,"i")?this.internalType=1:this.internalType=2,this.size=u.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=u.parseInt(this.type.charAt(this.type.length-1));if(4==this.internalType)throw new F("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"))Ca.startsWith(this.type,"b")||Ca.startsWith(this.type,"i")?this.internalType=1:this.internalType=2,this.size=u.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=u.parseInt(this.type.charAt(this.type.length-1));if(4==this.internalType)throw new F("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,null}},set_value:function(a){if(4==this.internalType)throw new F("This parameter doesn't accept a value, use bitmap instead");
return this.value=a},set_bitmap:function(a){if(4!=this.internalType)throw new F("This parameter doesn't accept a bitmap, use value instead");return this.bitmap=a},__class__:Og,__properties__:{set_bitmap:"set_bitmap",set_value:"set_value"}};var Pd=function(){wa.call(this)};n["openfl.display.Shape"]=Pd;Pd.__name__=["openfl","display","Shape"];Pd.__super__=wa;Pd.prototype=L(wa.prototype,{get_graphics:function(){null==this.__graphics&&(this.__graphics=new jc,this.__graphics.__owner=this);return this.__graphics},
__class__:Pd,__properties__:L(wa.prototype.__properties__,{get_graphics:"get_graphics"})});var Rh={};n["openfl.display._SpreadMethod.SpreadMethod_Impl_"]=Rh;Rh.__name__=["openfl","display","_SpreadMethod","SpreadMethod_Impl_"];Rh.fromString=function(a){switch(a){case "pad":return 0;case "reflect":return 1;case "repeat":return 2;default:return null}};Rh.toString=function(a){switch(a){case 0:return"pad";case 1:return"reflect";case 2:return"repeat";default:return null}};var Sh=function(a,b){xc.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=2;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=6;this.allowsFullScreenInteractive=this.allowsFullScreen=!1;this.quality=1;this.scaleMode=2;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 Lb;c.data=[];c.length=0;c.fixed=!1;c=this.stage3Ds=c;var d=new xk;if(!c.fixed){c.length++;if(c.data.length<c.length){var e;e=Array(c.data.length+10);H.blit(c.data,0,e,0,c.data.length);c.data=e}c.data[c.length-1]=d}c.length;null==ka.current.stage&&this.stage.addChild(ka.current)};n["openfl.display.Stage"]=Sh;Sh.__name__=["openfl","display","Stage"];
Sh.__interfaces__=[gj];Sh.__super__=xc;Sh.prototype=L(xc.prototype,{globalToLocal:function(a){return a.clone()},invalidate:function(){this.__invalidated=!0},localToGlobal:function(a){return a.clone()},onGamepadAxisMove:function(a,b,c){gb.__onGamepadAxisMove(a,b,c)},onGamepadButtonDown:function(a,b){gb.__onGamepadButtonDown(a,b)},onGamepadButtonUp:function(a,b){gb.__onGamepadButtonUp(a,b)},onGamepadConnect:function(a){gb.__onGamepadConnect(a)},onGamepadDisconnect:function(a){gb.__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("keyDown",b,c)},onKeyUp:function(a,b,c){null!=this.window&&this.window==a&&this.__onKey("keyUp",b,c)},onModuleExit:function(a){null!=this.window&&(a=new fa("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="middleMouseDown";break;case 2:e="rightMouseDown";break;default:e="mouseDown"}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("mouseMove",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="middleMouseUp";break;case 2:e=
"rightMouseUp";break;default:e="mouseUp"}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 Le("textInput",!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 fa("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 1:this.__renderer=new ek(this.stageWidth,this.stageHeight,a[2])}},onWindowDeactivate:function(a){null!=this.window&&this.window==a&&(a=new fa("deactivate"),this.__broadcast(a,!0))},onWindowDropFile:function(a,b){},onWindowEnter:function(a){},onWindowFocusIn:function(a){null!=this.window&&this.window==a&&(a=new ee("focusIn",!0,!1,null,!1,0),this.__broadcast(a,!0))},onWindowFocusOut:function(a){null!=this.window&&this.window==a&&(a=new ee("focusOut",
!0,!1,null,!1,0),this.__broadcast(a,!0))},onWindowFullscreen:function(a){null!=this.window&&this.window==a&&2==this.__displayState&&(this.__displayState=1)},onWindowLeave:function(a){null!=this.window&&this.window==a&&this.__dispatchEvent(new fa("mouseLeave"))},onWindowMinimize:function(a){},onWindowMove:function(a,b,c){},onWindowResize:function(a,b,c){null!=this.window&&this.window==a&&(2==this.__displayState||a.__fullscreen||(this.__displayState=2),this.stageWidth=b*a.__scale|0,this.stageHeight=
c*a.__scale|0,null!=this.__renderer&&this.__renderer.resize(this.stageWidth,this.stageHeight),a=new fa("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,wa.__worldTransformDirty++),this.__renderDirty||(this.__updateCachedBitmap=!0,this.__updateFilters=null!=this.get_filters()&&0<this.get_filters().length,this.__renderDirty=
!0,wa.__worldRenderDirty++)),!this.__rendering)){this.__rendering=!0;this.__broadcast(new fa("enterFrame"),!0);this.__invalidated&&(this.__invalidated=!1,this.__broadcast(new fa("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],q.__cast(this.__renderer,dk).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=
2,a.target.__broadcast(a,!1);else{a.eventPhase=1;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.__isCanceled)return}a.eventPhase=2;a.target.__broadcast(a,!1);if(!a.__isCanceled&&a.bubbles)for(a.eventPhase=3,c-=2;0<=c;){b[c].__broadcast(a,!1);if(a.__isCanceled)break;c--}}},__getInteractive:function(a){null!=a&&a.push(this);return!0},__onKey:function(a,b,c){Xa.__altKey=db.get_altKey(c);Xa.__commandKey=db.get_metaKey(c);Xa.__ctrlKey=db.get_ctrlKey(c);Xa.__shiftKey=
db.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=Y.__getCharCode(b,db.get_shiftKey(c));c=new Ve(a,!0,!1,f,b,e,this.__macKeyboard?db.get_ctrlKey(c)||db.get_metaKey(c):
db.get_ctrlKey(c),db.get_altKey(c),db.get_shiftKey(c),db.get_ctrlKey(c),db.get_metaKey(c));d.reverse();this.__fireEvent(c,d);c.__isCanceled&&("keyDown"==a?this.window.onKeyDown.cancel():this.window.onKeyUp.cancel())}},__onMouse:function(a,b,c,d){if(!(2<d)){this.__mouseX=b;this.__mouseY=c;var e=[],f=null,g=new W(b,c);this.__hitTest(b,c,!0,e,!0,this)?f=e[e.length-1]:(f=this,e=[this]);null==f&&(f=this);b=null;switch(a){case "mouseDown":f.get_tabEnabled()?this.set_focus(f):this.set_focus(null);this.__mouseDownLeft=
f;break;case "middleMouseDown":this.__mouseDownMiddle=f;break;case "rightMouseDown":this.__mouseDownRight=f;break;case "mouseUp":this.__mouseDownLeft==f&&(b="click");this.__mouseDownLeft=null;break;case "middleMouseUp":this.__mouseDownMiddle==f&&(b="middleClick");this.__mouseDownMiddle=null;break;case "rightMouseUp":this.__mouseDownRight==f&&(b="rightClick"),this.__mouseDownRight=null}this.__fireEvent(Xa.__create(a,d,this.__mouseX,this.__mouseY,f==this?g:f.globalToLocal(g),f),e);null!=b&&(this.__fireEvent(Xa.__create(b,
d,this.__mouseX,this.__mouseY,f==this?g:f.globalToLocal(g),f),e),"mouseUp"==a&&q.__cast(f,mc).doubleClickEnabled&&(a=ka.getTimer(),500>a-this.__lastClickTime?(this.__fireEvent(Xa.__create("doubleClick",d,this.__mouseX,this.__mouseY,f==this?g:f.globalToLocal(g),f),e),this.__lastClickTime=0):this.__lastClickTime=a));a=null;for(f=0;f<e.length;)if(a=e[f],++f,a=a.__getCursor(),null!=a){ce.set_cursor(a);break}null==a&&ce.set_cursor(Ha.ARROW);a=0;for(b=this.__mouseOutStack;a<b.length;)c=b[a],++a,-1==P.indexOf(e,
c,0)&&(P.remove(this.__mouseOutStack,c),f=c.globalToLocal(g),f=Xa.__create("mouseOut",d,this.__mouseX,this.__mouseY,f,c),f.bubbles=!1,c.__dispatchEvent(f));for(a=0;a<e.length;)b=e[a],++a,-1==P.indexOf(this.__mouseOutStack,b,0)&&(b.hasEventListener("mouseOver")&&(f=b.globalToLocal(g),f=Xa.__create("mouseOver",d,this.__mouseX,this.__mouseY,f,b),f.bubbles=!1,b.__dispatchEvent(f)),b.hasEventListener("mouseOut")&&this.__mouseOutStack.push(b));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,this)||(e=[this]);var f=e[e.length-1],c=new W(c,d),d=b|0;this.__fireEvent(Xa.__create("mouseWheel",0,this.__mouseX,this.__mouseY,f==this?c:f.globalToLocal(c),f,d),e)},__onTouch:function(a,b){var c=new W(b.x*this.stageWidth,b.y*this.stageHeight);this.__mouseX=c.x;this.__mouseY=c.y;var d=[];if(this.__hitTest(this.__mouseX,this.__mouseY,!1,d,!0,this)){var e=d[d.length-1];null==e&&(e=this);c=e.globalToLocal(c);e=pd.__create(a,null,
this.__mouseX,this.__mouseY,c,e);e.touchPointID=b.id;e.isPrimaryTouchPoint=!0;this.__fireEvent(e,d)}else d=pd.__create(a,null,this.__mouseX,this.__mouseY,c,this),d.touchPointID=b.id,d.isPrimaryTouchPoint=!0,this.__fireEvent(d,[this.stage])},__resize:function(){},__startDrag:function(a,b,c){this.__dragBounds=null==c?null:c.clone();this.__dragObject=a;null!=this.__dragObject&&(b?(this.__dragOffsetX=-this.__dragObject.get_width()/2,this.__dragOffsetY=-this.__dragObject.get_height()/2):(a=new W(this.get_mouseX(),
this.get_mouseY()),b=this.__dragObject.parent,null!=b&&(a=b.globalToLocal(a)),this.__dragOffsetX=this.__dragObject.get_x()-a.x,this.__dragOffsetY=this.__dragObject.get_y()-a.y))},__stopDrag:function(a){this.__dragObject=this.__dragBounds=null},__update:function(a,b,c){if(a)0<wa.__worldTransformDirty&&(xc.prototype.__update.call(this,!0,b,c),b&&(wa.__worldTransformDirty=0,this.__dirty=!0));else if(0<wa.__worldTransformDirty||this.__dirty||0<wa.__worldRenderDirty)xc.prototype.__update.call(this,!1,
b,c),b&&(wa.__worldTransformDirty=0,wa.__worldRenderDirty=0,this.__dirty=!1)},get_mouseX:function(){return this.__mouseX},get_mouseY:function(){return this.__mouseY},canvas_onContextLost:function(a){},canvas_onContextRestored:function(a){},get_color:function(){return this.__color},set_color:function(a){this.__colorSplit=[((a&16711680)>>>16)/255,((a&65280)>>>8)/255,(a&255)/255];this.__colorString="#"+Ca.hex(a,6);return this.__color=a},get_displayState:function(){return this.__displayState},set_displayState:function(a){if(null!=
this.window)switch(a){case 2:this.window.__fullscreen&&(this.window.set_fullscreen(!1),this.stageWidth=this.window.__width*this.window.__scale|0,this.stageHeight=this.window.__height*this.window.__scale|0,this.dispatchEvent(new Qe("fullScreen",!1,!1,!1,!0)));break;default:this.window.__fullscreen||(this.window.set_fullscreen(!0),this.stageWidth=this.window.__width*this.window.__scale|0,this.stageHeight=this.window.__height*this.window.__scale|0,this.dispatchEvent(new Qe("fullScreen",!1,!1,!0,!0)))}return this.__displayState=
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 ee("focusOut",!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 ee("focusIn",!0,!1,b,!1,0),this.__stack=[],a.__getInteractive(this.__stack),this.__stack.reverse(),this.__fireEvent(b,this.__stack))}return this.__focus},get_frameRate:function(){return null!=
this.application?this.application.backend.getFrameRate():0},set_frameRate:function(a){return null!=this.application?this.application.backend.setFrameRate(a):a},__class__:Sh,__properties__:L(xc.prototype.__properties__,{set_frameRate:"set_frameRate",get_frameRate:"get_frameRate",set_focus:"set_focus",get_focus:"get_focus",set_displayState:"set_displayState",get_displayState:"get_displayState",set_color:"set_color",get_color:"get_color"})});var xk=function(){Va.call(this)};n["openfl.display.Stage3D"]=
xk;xk.__name__=["openfl","display","Stage3D"];xk.__super__=Va;xk.prototype=L(Va.prototype,{requestContext3D:function(a){null==a&&(a="");var b=this;Gd.get_isSupported()?Ad.delay(function(){b.context3D=new ta;b.dispatchEvent(new fa("context3DCreate"))},1):Ad.delay(function(){b.dispatchEvent(new fe("error"))},1)},__class__:xk});var Me={};n["openfl.display._StageAlign.StageAlign_Impl_"]=Me;Me.__name__=["openfl","display","_StageAlign","StageAlign_Impl_"];Me.fromString=function(a){switch(a){case "bottom":return 0;
case "bottomLeft":return 1;case "bottomRight":return 2;case "left":return 3;case "right":return 4;case "top":return 5;case "topLeft":return 6;case "topRight":return 7;default:return null}};Me.toString=function(a){switch(a){case 0:return"bottom";case 1:return"bottomLeft";case 2:return"bottomRight";case 3:return"left";case 4:return"right";case 5:return"top";case 6:return"topLeft";case 7:return"topRight";default:return null}};var Th={};n["openfl.display._StageDisplayState.StageDisplayState_Impl_"]=Th;
Th.__name__=["openfl","display","_StageDisplayState","StageDisplayState_Impl_"];Th.fromString=function(a){switch(a){case "fullScreen":return 0;case "fullScreenInteractive":return 1;case "normal":return 2;default:return null}};Th.toString=function(a){switch(a){case 0:return"fullScreen";case 1:return"fullScreenInteractive";case 2:return"normal";default:return null}};var Pg={};n["openfl.display._StageQuality.StageQuality_Impl_"]=Pg;Pg.__name__=["openfl","display","_StageQuality","StageQuality_Impl_"];
Pg.fromString=function(a){switch(a){case "best":return 0;case "high":return 1;case "low":return 2;case "medium":return 3;default:return null}};Pg.toString=function(a){switch(a){case 0:return"best";case 1:return"high";case 2:return"low";case 3:return"medium";default:return null}};var Qg={};n["openfl.display._StageScaleMode.StageScaleMode_Impl_"]=Qg;Qg.__name__=["openfl","display","_StageScaleMode","StageScaleMode_Impl_"];Qg.fromString=function(a){switch(a){case "exactFit":return 0;case "noBorder":return 1;
case "noScale":return 2;case "showAll":return 3;default:return null}};Qg.toString=function(a){switch(a){case 0:return"exactFit";case 1:return"noBorder";case 2:return"noScale";case 3:return"showAll";default:return null}};var vc=function(a){this.__bitmap=a;this.__centerPoints=[];this.__tileRects=[];this.__tileUVs=[];this.__rectTile=new ha;this.__rectUV=new ha;this.__point=new W};n["openfl.display.Tilesheet"]=vc;vc.__name__=["openfl","display","Tilesheet"];vc.prototype={addTileRect:function(a,b){this.__tileRects.push(a);
null==b&&(b=vc.__defaultPoint);this.__centerPoints.push(b);this.__tileUVs.push(new ha(a.get_left()/this.__bitmap.width,a.get_top()/this.__bitmap.height,a.get_right()/this.__bitmap.width,a.get_bottom()/this.__bitmap.height));return this.__tileRects.length-1},drawTiles:function(a,b,c,d,e){null==e&&(e=-1);null==d&&(d=0);null==c&&(c=!1);a.drawTiles(this,b,c,d,null,e)},getTileCenter:function(a){return this.__centerPoints[a]},getTileRect:function(a){return this.__tileRects[a]},getTileUVs:function(a){return this.__tileUVs[a]},
__class__:vc};var Uh={};n["openfl.display._TriangleCulling.TriangleCulling_Impl_"]=Uh;Uh.__name__=["openfl","display","_TriangleCulling","TriangleCulling_Impl_"];Uh.fromString=function(a){switch(a){case "negative":return 0;case "none":return 1;case "positive":return 2;default:return null}};Uh.toString=function(a){switch(a){case 0:return"negative";case 1:return"none";case 2:return"positive";default:return null}};var pk=function(a){Rf.call(this,a)};n["openfl.display.Window"]=pk;pk.__name__=["openfl",
"display","Window"];pk.__super__=Rf;pk.prototype=L(Rf.prototype,{create:function(a){Rf.prototype.create.call(this,a);this.stage=new Sh(this,Object.prototype.hasOwnProperty.call(this.config,"background")?this.config.background:16777215);a.addModule(this.stage)},__class__:pk});var ta=function(){this.disposed=!1;this.stencilCompareMode=519;this.stencilRef=0;this.stencilReadMask=255;this._yFlip=1;this.vertexBuffersCreated=[];this.indexBuffersCreated=[];this.programsCreated=[];this.texturesCreated=[];
this.samplerParameters=[];for(var a=0,b=ta.MAX_SAMPLERS;a<b;){var c=a++;this.samplerParameters[c]=new qm;this.samplerParameters[c].wrap=vf.CLAMP;this.samplerParameters[c].filter=ec.LINEAR;this.samplerParameters[c].mipfilter=Md.MIPNONE}a=ka.current.stage;this.ogl=new Gd;this.ogl.set_scrollRect(new ha(0,0,a.stageWidth,a.stageHeight));this.scrollRect=this.ogl.get_scrollRect().clone();this.ogl.set_width(a.stageWidth);this.ogl.set_height(a.stageHeight);a.addChildAt(this.ogl,0);m.context.pixelStorei(37440,
1);m.context.pixelStorei(37441,1)};n["openfl.display3D.Context3D"]=ta;ta.__name__=["openfl","display3D","Context3D"];ta.prototype={clear:function(a,b,c,d,e,f,g){null==g&&(g=17664);null==f&&(f=0);null==e&&(e=1);null==d&&(d=1);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this.drawing||(this.__updateBlendStatus(),this.drawing=!0);null!=this.scissorRectangle&&m.context.disable(3089);m.context.clearColor(a,b,c,d);m.context.clearDepth(e);m.context.clearStencil(f);m.context.clear(g);null!=this.scissorRectangle&&
m.context.enable(3089)},configureBackBuffer:function(a,b,c,d){null==d&&(d=!0);this.backBufferDepthAndStencil=d;this.updateDepthAndStencilState();this.setBackBufferViewPort(null,null,a,b);this.updateScissorRectangle()},setBackBufferViewPort:function(a,b,c,d){null==a&&(a=this.scrollRect.x|0);null==b&&(b=this.scrollRect.y|0);null==c&&(c=this.scrollRect.width|0);null==d&&(d=this.scrollRect.height|0);this.scrollRect.x=a;this.scrollRect.y=b;this.scrollRect.width=c;this.scrollRect.height=d;this.ogl.set_width(a+
c);this.ogl.set_height(b+d);this.updateBackBufferViewPort()},updateBackBufferViewPort:function(){this.renderToTexture||m.context.viewport(this.scrollRect.x|0,this.scrollRect.y|0,this.scrollRect.width|0,this.scrollRect.height|0)},updateDepthAndStencilState:function(){(this.renderToTexture?this.rttDepthAndStencil:this.backBufferDepthAndStencil)?(ed.current.windows[0].config.depthBuffer&&m.context.enable(2929),ed.current.windows[0].config.stencilBuffer&&m.context.enable(2960)):(m.context.disable(2929),
m.context.disable(2960))},createCubeTexture:function(a,b,c,d){a=new ag(this,m.context.createTexture(),a);this.texturesCreated.push(a);return a},createIndexBuffer:function(a,b){null==b&&(b=Ne.STATIC_DRAW);var c=new rm(this,m.context.createBuffer(),a,b==Ne.STATIC_DRAW?35044:35048);this.indexBuffersCreated.push(c);return c},createProgram:function(){var a=new sm(this,m.context.createProgram());this.programsCreated.push(a);return a},createRectangleTexture:function(a,b,c,d){a=new bg(this,m.context.createTexture(),
d,a,b);this.texturesCreated.push(a);return a},createTexture:function(a,b,c,d,e){a=new ge(this,m.context.createTexture(),d,a,b);this.texturesCreated.push(a);return a},createVertexBuffer:function(a,b,c){null==c&&(c=Ne.STATIC_DRAW);a=new tm(this,m.context.createBuffer(),a,b,c==Ne.STATIC_DRAW?35044:35048);this.vertexBuffersCreated.push(a);return a},__deleteTexture:function(a){null!=a.glTexture&&(P.remove(this.texturesCreated,a),m.context.deleteTexture(a.glTexture),a.glTexture=null)},__deleteVertexBuffer:function(a){null!=
a.glBuffer&&(P.remove(this.vertexBuffersCreated,a),m.context.deleteBuffer(a.glBuffer),a.glBuffer=null)},__deleteIndexBuffer:function(a){null!=a.glBuffer&&(P.remove(this.indexBuffersCreated,a),m.context.deleteBuffer(a.glBuffer),a.glBuffer=null)},__deleteProgram:function(a){null!=a.glProgram&&(P.remove(this.programsCreated,a),m.context.deleteProgram(a.glProgram),a.glProgram=null)},dispose:function(){for(var a=0,b=this.vertexBuffersCreated;a<b.length;){var c=b[a];++a;c.dispose()}this.vertexBuffersCreated=
null;a=0;for(b=this.indexBuffersCreated;a<b.length;)c=b[a],++a,c.dispose();this.indexBuffersCreated=null;a=0;for(b=this.programsCreated;a<b.length;)c=b[a],++a,c.dispose();this.samplerParameters=this.programsCreated=null;a=0;for(b=this.texturesCreated;a<b.length;)c=b[a],++a,c.dispose();this.texturesCreated=null;null!=this.framebuffer&&(m.context.deleteFramebuffer(this.framebuffer),this.framebuffer=null);null!=this.renderbuffer&&(m.context.deleteRenderbuffer(this.renderbuffer),this.renderbuffer=null);
this.disposed=!0},drawToBitmapData:function(a){},drawTriangles:function(a,b,c){null==c&&(c=-1);null==b&&(b=0);var d=m.context.getUniformLocation(this.currentProgram.glProgram,"yflip");m.context.uniform1f(d,this._yFlip);if(!this.drawing)throw new F(new Nc("Need to clear before drawing if the buffer has not been cleared since the last present() call."));c=-1==c?a.numIndices:3*c;b*=2;m.context.bindBuffer(34963,a.glBuffer);m.context.drawElements(4,c,5123,b)},present:function(){this.drawing=!1;m.context.useProgram(null);
m.context.bindBuffer(34962,null);m.context.disable(2884);null!=this.framebuffer&&m.context.bindFramebuffer(36160,null);null!=this.renderbuffer&&m.context.bindRenderbuffer(36161,null)},removeRenderMethod:function(a){this.ogl.set_render(null)},setBlendFactors:function(a,b){this.blendEnabled=!0;this.blendSourceFactor=a;this.blendDestinationFactor=b;this.__updateBlendStatus()},setColorMask:function(a,b,c,d){m.context.colorMask(a,b,c,d)},setCulling:function(a){if(0==a)m.context.disable(2884);else switch(m.context.enable(2884),
a){case 1029:m.context.cullFace(1029);break;case 1028:m.context.cullFace(1028);break;case 1032:m.context.cullFace(1032);break;default:throw new F("Unknown Context3DTriangleFace type.");}switch(a){case 1029:this._yFlip=-1;break;case 1028:this._yFlip=1;break;case 1032:this._yFlip=1;break;case 0:this._yFlip=1;break;default:throw new F("Unknown culling mode "+a+".");}},setDepthTest:function(a,b){m.context.depthFunc(b);m.context.depthMask(a)},setGLSLProgramConstantsFromByteArray:function(a,b,c){null==
c&&(c=0);b.position=c;a=m.context.getUniformLocation(this.currentProgram.glProgram,a);m.uniform4f(a,b.readFloat(),b.readFloat(),b.readFloat(),b.readFloat())},setGLSLProgramConstantsFromMatrix:function(a,b,c){null==c&&(c=!1);a=m.context.getUniformLocation(this.currentProgram.glProgram,a);m.uniformMatrix4fv(a,!c,function(a){a=b.rawData;for(var c=[],f=0,g=a.data.length;f<g;){var k=f++;c.push(a.data[k])}return null!=c?new Float32Array(c):null}(this))},setGLSLProgramConstantsFromVector4:function(a,b,c){null==
c&&(c=0);a=m.context.getUniformLocation(this.currentProgram.glProgram,a);m.context.uniform4f(a,b[c],b[c+1],b[c+2],b[c+3])},setGLSLTextureAt:function(a,b,c){switch(c){case 0:m.context.activeTexture(33984);break;case 1:m.context.activeTexture(33985);break;case 2:m.context.activeTexture(33986);break;case 3:m.context.activeTexture(33987);break;case 4:m.context.activeTexture(33988);break;case 5:m.context.activeTexture(33989);break;case 6:m.context.activeTexture(33990);break;case 7:m.context.activeTexture(33991);
break;default:throw new F("Does not support texture8 or more");}if(null==b)m.context.bindTexture(3553,null),m.context.bindTexture(34067,null);else{a=m.context.getUniformLocation(this.currentProgram.glProgram,a);if(q.__instanceof(b,ge))m.bindTexture(3553,q.__cast(b,ge).glTexture),m.context.uniform1i(a,c);else if(q.__instanceof(b,bg))m.bindTexture(3553,q.__cast(b,bg).glTexture),m.context.uniform1i(a,c);else if(q.__instanceof(b,ag))m.bindTexture(34067,q.__cast(b,ag).glTexture),m.context.uniform1i(a,
c);else throw new F("Texture of type "+ua.getClassName(null==b?null:q.getClass(b))+" not supported yet");c=this.samplerParameters[c];null!=c?this.setTextureParameters(b,c.wrap,c.filter,c.mipfilter):this.setTextureParameters(b,vf.CLAMP,ec.NEAREST,Md.MIPNONE)}},setGLSLVertexBufferAt:function(a,b,c,d){null==c&&(c=0);a=null!=this.currentProgram&&null!=this.currentProgram.glProgram?m.context.getAttribLocation(this.currentProgram.glProgram,a):-1;if(-1!=a)if(null==b)-1<a&&m.context.disableVertexAttribArray(a);
else{m.context.bindBuffer(34962,b.glBuffer);var e=4,f=5126,g=4;if(d==wc.BYTES_4)e=4,f=5126,g=4;else if(d==wc.FLOAT_1)e=1,f=5126,g=4;else if(d==wc.FLOAT_2)e=2,f=5126,g=4;else if(d==wc.FLOAT_3)e=3,f=5126,g=4;else if(d==wc.FLOAT_4)e=4,f=5126,g=4;else throw new F("Buffer format "+u.string(d)+" is not supported");m.context.enableVertexAttribArray(a);m.context.vertexAttribPointer(a,e,f,!1,b.data32PerVertex*g,c*g)}},setProgram:function(a){var b=null;null!=a&&(b=a.glProgram);m.context.useProgram(b);this.currentProgram=
a},setProgramConstantsFromByteArray:function(a,b,c,d,e){d.position=e;for(e=0;e<c;){var f=e++,f=this.__getUniformLocationNameFromAgalRegisterIndex(a,b+f);this.setGLSLProgramConstantsFromByteArray(f,d)}},setProgramConstantsFromMatrix:function(a,b,c,d){null==d&&(d=!1);c=c.rawData;d?(this.setProgramConstantsFromVector(a,b,[c.data[0],c.data[4],c.data[8],c.data[12]],1),this.setProgramConstantsFromVector(a,b+1,[c.data[1],c.data[5],c.data[9],c.data[13]],1),this.setProgramConstantsFromVector(a,b+2,[c.data[2],
c.data[6],c.data[10],c.data[14]],1),this.setProgramConstantsFromVector(a,b+3,[c.data[3],c.data[7],c.data[11],c.data[15]],1)):(this.setProgramConstantsFromVector(a,b,[c.data[0],c.data[1],c.data[2],c.data[3]],1),this.setProgramConstantsFromVector(a,b+1,[c.data[4],c.data[5],c.data[6],c.data[7]],1),this.setProgramConstantsFromVector(a,b+2,[c.data[8],c.data[9],c.data[10],c.data[11]],1),this.setProgramConstantsFromVector(a,b+3,[c.data[12],c.data[13],c.data[14],c.data[15]],1))},setProgramConstantsFromVector:function(a,
b,c,d){null==d&&(d=1);for(var e=0;e<d;){var f=e++,g=4*f,f=this.__getUniformLocationNameFromAgalRegisterIndex(a,b+f);this.setGLSLProgramConstantsFromVector4(f,c,g)}},setRenderMethod:function(a){this.ogl.set_render(function(b){a(null)})},setRenderToBackBuffer:function(){m.context.disable(2929);m.context.disable(2960);m.context.disable(3089);m.context.bindFramebuffer(36160,null);null!=this.framebuffer&&m.context.bindFramebuffer(36160,null);null!=this.renderbuffer&&m.context.bindRenderbuffer(36161,null);
this.renderToTexture=!1;this.updateBackBufferViewPort();this.updateScissorRectangle();this.updateDepthAndStencilState()},setRenderToTexture:function(a,b,c,d){null==b&&(b=!1);null==this.framebuffer&&(this.framebuffer=m.context.createFramebuffer());m.context.bindFramebuffer(36160,this.framebuffer);null==this.renderbuffer&&(this.renderbuffer=m.context.createRenderbuffer());m.context.bindRenderbuffer(36161,this.renderbuffer);b&&m.context.renderbufferStorage(36161,34041,a.width,a.height);m.context.framebufferTexture2D(36160,
36064,3553,a.glTexture,0);m.context.renderbufferStorage(36161,34041,a.width,a.height);m.context.framebufferRenderbuffer(36160,33306,36161,this.renderbuffer);b&&(m.context.enable(2929),m.context.enable(2960));m.context.bindTexture(3553,a.glTexture);m.context.texImage2D(3553,0,6408,a.width,a.height,0,6408,5121,null);m.context.texParameteri(3553,10240,9729);m.context.texParameteri(3553,10241,9985);m.context.viewport(0,0,a.width,a.height);this.renderToTexture=!0;this.rttDepthAndStencil=b;this.rttWidth=
a.width;this.rttHeight=a.height;this.updateScissorRectangle();this.updateDepthAndStencilState()},setSamplerStateAt:function(a,b,c,d){if(0<=a&&a<ta.MAX_SAMPLERS)this.samplerParameters[a].wrap=b,this.samplerParameters[a].filter=c,this.samplerParameters[a].mipfilter=d;else throw new F("Sampler is out of bounds.");},setScissorRectangle:function(a){this.scissorRectangle=a;null==a?m.context.disable(3089):(m.context.enable(3089),this.updateScissorRectangle())},updateScissorRectangle:function(){null!=this.scissorRectangle&&
m.context.scissor(this.scissorRectangle.x|0,(this.renderToTexture?this.rttHeight:this.scrollRect.height|0)-(this.scissorRectangle.y|0)-(this.scissorRectangle.height|0)|0,this.scissorRectangle.width|0,this.scissorRectangle.height|0)},setStencilActions:function(a,b,c,d,e){this.stencilCompareMode=b;m.context.stencilOp(c,d,e);m.context.stencilFunc(this.stencilCompareMode,this.stencilRef,this.stencilReadMask)},setStencilReferenceValue:function(a,b,c){null==c&&(c=255);null==b&&(b=255);this.stencilReadMask=
b;this.stencilRef=a;m.context.stencilFunc(this.stencilCompareMode,this.stencilRef,this.stencilReadMask);m.context.stencilMask(c)},setTextureAt:function(a,b){this.setGLSLTextureAt("fs"+a,b,a)},setTextureParameters:function(a,b,c,d){if(!ta.anisotropySupportTested){var e=m.context.getExtension("EXT_texture_filter_anisotropic");if(null==e||null==O.field(e,"MAX_TEXTURE_MAX_ANISOTROPY_EXT"))e=m.context.getExtension("MOZ_EXT_texture_filter_anisotropic");if(null==e||null==O.field(e,"MAX_TEXTURE_MAX_ANISOTROPY_EXT"))e=
m.context.getExtension("WEBKIT_EXT_texture_filter_anisotropic");ta.supportsAnisotropy=null!=e;ta.supportsAnisotropy&&(ta.maxSupportedAnisotropy=m.getParameter(e.MAX_TEXTURE_MAX_ANISOTROPY_EXT),m.context.texParameteri(3553,ta.TEXTURE_MAX_ANISOTROPY_EXT,ta.maxSupportedAnisotropy));ta.anisotropySupportTested=!0}if(q.__instanceof(a,ge)){switch(b[1]){case 0:m.context.texParameteri(3553,10242,33071);m.context.texParameteri(3553,10243,33071);break;case 1:m.context.texParameteri(3553,10242,10497),m.context.texParameteri(3553,
10243,10497)}switch(c[1]){case 4:m.context.texParameteri(3553,10240,9729);ta.supportsAnisotropy&&m.context.texParameterf(3553,ta.TEXTURE_MAX_ANISOTROPY_EXT,1);break;case 5:m.context.texParameteri(3553,10240,9728);ta.supportsAnisotropy&&m.context.texParameterf(3553,ta.TEXTURE_MAX_ANISOTROPY_EXT,1);break;case 0:ta.supportsAnisotropy&&m.texParameterf(3553,ta.TEXTURE_MAX_ANISOTROPY_EXT,va.gt(2,ta.maxSupportedAnisotropy)?va.toFloat(ta.maxSupportedAnisotropy):2);break;case 1:ta.supportsAnisotropy&&m.texParameterf(3553,
ta.TEXTURE_MAX_ANISOTROPY_EXT,va.gt(4,ta.maxSupportedAnisotropy)?va.toFloat(ta.maxSupportedAnisotropy):4);break;case 2:ta.supportsAnisotropy&&m.texParameterf(3553,ta.TEXTURE_MAX_ANISOTROPY_EXT,va.gt(8,ta.maxSupportedAnisotropy)?va.toFloat(ta.maxSupportedAnisotropy):8);break;case 3:ta.supportsAnisotropy&&m.texParameterf(3553,ta.TEXTURE_MAX_ANISOTROPY_EXT,va.gt(16,ta.maxSupportedAnisotropy)?va.toFloat(ta.maxSupportedAnisotropy):16)}switch(d[1]){case 0:m.context.texParameteri(3553,10241,9987);break;
case 1:m.context.texParameteri(3553,10241,9984);break;case 2:m.context.texParameteri(3553,10241,c==ec.NEAREST?9728:9729)}d==Md.MIPNONE||a.mipmapsGenerated||(m.context.generateMipmap(3553),a.mipmapsGenerated=!0)}else if(q.__instanceof(a,bg)){m.context.texParameteri(3553,10242,33071);m.context.texParameteri(3553,10243,33071);switch(c[1]){case 4:m.context.texParameteri(3553,10240,9729);ta.supportsAnisotropy&&m.context.texParameterf(3553,ta.TEXTURE_MAX_ANISOTROPY_EXT,1);break;case 5:m.context.texParameteri(3553,
10240,9728);ta.supportsAnisotropy&&m.context.texParameterf(3553,ta.TEXTURE_MAX_ANISOTROPY_EXT,1);break;case 0:ta.supportsAnisotropy&&m.texParameterf(3553,ta.TEXTURE_MAX_ANISOTROPY_EXT,va.gt(2,ta.maxSupportedAnisotropy)?va.toFloat(ta.maxSupportedAnisotropy):2);break;case 1:ta.supportsAnisotropy&&m.texParameterf(3553,ta.TEXTURE_MAX_ANISOTROPY_EXT,va.gt(4,ta.maxSupportedAnisotropy)?va.toFloat(ta.maxSupportedAnisotropy):4);break;case 2:ta.supportsAnisotropy&&m.texParameterf(3553,ta.TEXTURE_MAX_ANISOTROPY_EXT,
va.gt(8,ta.maxSupportedAnisotropy)?va.toFloat(ta.maxSupportedAnisotropy):8);break;case 3:ta.supportsAnisotropy&&m.texParameterf(3553,ta.TEXTURE_MAX_ANISOTROPY_EXT,va.gt(16,ta.maxSupportedAnisotropy)?va.toFloat(ta.maxSupportedAnisotropy):16)}m.context.texParameteri(3553,10241,c==ec.NEAREST?9728:9729)}else if(q.__instanceof(a,ag)){switch(b[1]){case 0:m.context.texParameteri(34067,10242,33071);m.context.texParameteri(34067,10243,33071);break;case 1:m.context.texParameteri(34067,10242,10497),m.context.texParameteri(34067,
10243,10497)}switch(c[1]){case 4:m.context.texParameteri(34067,10240,9729);ta.supportsAnisotropy&&m.context.texParameterf(34067,ta.TEXTURE_MAX_ANISOTROPY_EXT,1);break;case 5:m.context.texParameteri(34067,10240,9728);ta.supportsAnisotropy&&m.context.texParameterf(34067,ta.TEXTURE_MAX_ANISOTROPY_EXT,1);break;case 0:ta.supportsAnisotropy&&m.texParameterf(34067,ta.TEXTURE_MAX_ANISOTROPY_EXT,va.gt(2,ta.maxSupportedAnisotropy)?va.toFloat(ta.maxSupportedAnisotropy):2);break;case 1:ta.supportsAnisotropy&&
m.texParameterf(34067,ta.TEXTURE_MAX_ANISOTROPY_EXT,va.gt(4,ta.maxSupportedAnisotropy)?va.toFloat(ta.maxSupportedAnisotropy):4);break;case 2:ta.supportsAnisotropy&&m.texParameterf(34067,ta.TEXTURE_MAX_ANISOTROPY_EXT,va.gt(8,ta.maxSupportedAnisotropy)?va.toFloat(ta.maxSupportedAnisotropy):8);break;case 3:ta.supportsAnisotropy&&m.texParameterf(34067,ta.TEXTURE_MAX_ANISOTROPY_EXT,va.gt(16,ta.maxSupportedAnisotropy)?va.toFloat(ta.maxSupportedAnisotropy):16)}switch(d[1]){case 0:m.context.texParameteri(34067,
10241,9987);break;case 1:m.context.texParameteri(34067,10241,9984);break;case 2:m.context.texParameteri(34067,10241,c==ec.NEAREST?9728:9729)}d==Md.MIPNONE||a.mipmapsGenerated||(m.context.generateMipmap(34067),a.mipmapsGenerated=!0)}else throw new F("Texture of type "+ua.getClassName(null==a?null:q.getClass(a))+" not supported yet");},setVertexBufferAt:function(a,b,c,d){null==c&&(c=0);this.setGLSLVertexBufferAt("va"+a,b,c,d)},__getUniformLocationNameFromAgalRegisterIndex:function(a,b){if(a==wf.VERTEX)return"vc"+
b;if(a==wf.FRAGMENT)return"fc"+b;throw new F("Program Type "+u.string(a)+" not supported");},__updateBlendStatus:function(){this.blendEnabled?(m.context.enable(3042),m.context.blendEquation(32774),m.context.blendFunc(this.blendSourceFactor,this.blendDestinationFactor)):m.context.disable(3042)},__class__:ta};var qm=function(){};n["openfl.display3D._Context3D.SamplerState"]=qm;qm.__name__=["openfl","display3D","_Context3D","SamplerState"];qm.prototype={__class__:qm};var Ne=n["openfl.display3D.Context3DBufferUsage"]=
{__ename__:["openfl","display3D","Context3DBufferUsage"],__constructs__:["STATIC_DRAW","DYNAMIC_DRAW"]};Ne.STATIC_DRAW=["STATIC_DRAW",0];Ne.STATIC_DRAW.toString=J;Ne.STATIC_DRAW.__enum__=Ne;Ne.DYNAMIC_DRAW=["DYNAMIC_DRAW",1];Ne.DYNAMIC_DRAW.toString=J;Ne.DYNAMIC_DRAW.__enum__=Ne;var yk=function(){};n["openfl.display3D.Context3DClearMask"]=yk;yk.__name__=["openfl","display3D","Context3DClearMask"];var se={};n["openfl.display3D._Context3DCompareMode.Context3DCompareMode_Impl_"]=se;se.__name__=["openfl",
"display3D","_Context3DCompareMode","Context3DCompareMode_Impl_"];se._new=function(a){return a};se.fromInt=function(a){return a};se.toInt=function(a){return a};var Md=n["openfl.display3D.Context3DMipFilter"]={__ename__:["openfl","display3D","Context3DMipFilter"],__constructs__:["MIPLINEAR","MIPNEAREST","MIPNONE"]};Md.MIPLINEAR=["MIPLINEAR",0];Md.MIPLINEAR.toString=J;Md.MIPLINEAR.__enum__=Md;Md.MIPNEAREST=["MIPNEAREST",1];Md.MIPNEAREST.toString=J;Md.MIPNEAREST.__enum__=Md;Md.MIPNONE=["MIPNONE",2];
Md.MIPNONE.toString=J;Md.MIPNONE.__enum__=Md;var wf=n["openfl.display3D.Context3DProgramType"]={__ename__:["openfl","display3D","Context3DProgramType"],__constructs__:["VERTEX","FRAGMENT"]};wf.VERTEX=["VERTEX",0];wf.VERTEX.toString=J;wf.VERTEX.__enum__=wf;wf.FRAGMENT=["FRAGMENT",1];wf.FRAGMENT.toString=J;wf.FRAGMENT.__enum__=wf;var ec=n["openfl.display3D.Context3DTextureFilter"]={__ename__:["openfl","display3D","Context3DTextureFilter"],__constructs__:"ANISOTROPIC2X ANISOTROPIC4X ANISOTROPIC8X ANISOTROPIC16X LINEAR NEAREST".split(" ")};
ec.ANISOTROPIC2X=["ANISOTROPIC2X",0];ec.ANISOTROPIC2X.toString=J;ec.ANISOTROPIC2X.__enum__=ec;ec.ANISOTROPIC4X=["ANISOTROPIC4X",1];ec.ANISOTROPIC4X.toString=J;ec.ANISOTROPIC4X.__enum__=ec;ec.ANISOTROPIC8X=["ANISOTROPIC8X",2];ec.ANISOTROPIC8X.toString=J;ec.ANISOTROPIC8X.__enum__=ec;ec.ANISOTROPIC16X=["ANISOTROPIC16X",3];ec.ANISOTROPIC16X.toString=J;ec.ANISOTROPIC16X.__enum__=ec;ec.LINEAR=["LINEAR",4];ec.LINEAR.toString=J;ec.LINEAR.__enum__=ec;ec.NEAREST=["NEAREST",5];ec.NEAREST.toString=J;ec.NEAREST.__enum__=
ec;var Oe=n["openfl.display3D.Context3DTextureFormat"]={__ename__:["openfl","display3D","Context3DTextureFormat"],__constructs__:["BGRA","COMPRESSED","COMPRESSED_ALPHA"]};Oe.BGRA=["BGRA",0];Oe.BGRA.toString=J;Oe.BGRA.__enum__=Oe;Oe.COMPRESSED=["COMPRESSED",1];Oe.COMPRESSED.toString=J;Oe.COMPRESSED.__enum__=Oe;Oe.COMPRESSED_ALPHA=["COMPRESSED_ALPHA",2];Oe.COMPRESSED_ALPHA.toString=J;Oe.COMPRESSED_ALPHA.__enum__=Oe;var cg={};n["openfl.display3D._Context3DTriangleFace.Context3DTriangleFace_Impl_"]=cg;
cg.__name__=["openfl","display3D","_Context3DTriangleFace","Context3DTriangleFace_Impl_"];cg._new=function(a){return a};cg.fromInt=function(a){return a};cg.toInt=function(a){return a};var wc=n["openfl.display3D.Context3DVertexBufferFormat"]={__ename__:["openfl","display3D","Context3DVertexBufferFormat"],__constructs__:["BYTES_4","FLOAT_1","FLOAT_2","FLOAT_3","FLOAT_4"]};wc.BYTES_4=["BYTES_4",0];wc.BYTES_4.toString=J;wc.BYTES_4.__enum__=wc;wc.FLOAT_1=["FLOAT_1",1];wc.FLOAT_1.toString=J;wc.FLOAT_1.__enum__=
wc;wc.FLOAT_2=["FLOAT_2",2];wc.FLOAT_2.toString=J;wc.FLOAT_2.__enum__=wc;wc.FLOAT_3=["FLOAT_3",3];wc.FLOAT_3.toString=J;wc.FLOAT_3.__enum__=wc;wc.FLOAT_4=["FLOAT_4",4];wc.FLOAT_4.toString=J;wc.FLOAT_4.__enum__=wc;var vf=n["openfl.display3D.Context3DWrapMode"]={__ename__:["openfl","display3D","Context3DWrapMode"],__constructs__:["CLAMP","REPEAT"]};vf.CLAMP=["CLAMP",0];vf.CLAMP.toString=J;vf.CLAMP.__enum__=vf;vf.REPEAT=["REPEAT",1];vf.REPEAT.toString=J;vf.REPEAT.__enum__=vf;var rm=function(a,b,c,d){this.context=
a;this.glBuffer=b;this.numIndices=c;this.bufferUsage=d};n["openfl.display3D.IndexBuffer3D"]=rm;rm.__name__=["openfl","display3D","IndexBuffer3D"];rm.prototype={dispose:function(){this.context.__deleteIndexBuffer(this)},uploadFromByteArray:function(a,b,c,d){m.context.bindBuffer(34963,this.glBuffer);d*=2;b+=2*c;c=null!=d?new Int16Array(d):null;a.position=b;for(var e=0;a.position<d+b;){var f=a.readUnsignedByte();c[e]=f;e++}m.context.bufferData(34963,c,this.bufferUsage)},uploadFromVector:function(a,b,
c){m.context.bindBuffer(34963,this.glBuffer);var d;d=null!=c?new Int16Array(c):null;var e=b;for(b+=c;e<b;)c=e++,d[c]=a.data[c];m.context.bufferData(34963,d,this.bufferUsage)},uploadFromInt16Array:function(a){m.context.bindBuffer(34963,this.glBuffer);m.context.bufferData(34963,a,this.bufferUsage)},__class__:rm};var sm=function(a,b){this.context=a;this.glProgram=b};n["openfl.display3D.Program3D"]=sm;sm.__name__=["openfl","display3D","Program3D"];sm.prototype={dispose:function(){this.context.__deleteProgram(this)},
upload:function(a,b){m.context.attachShader(this.glProgram,a);m.context.attachShader(this.glProgram,b);m.context.linkProgram(this.glProgram);if(0==m.context.getProgramParameter(this.glProgram,35714)){var c=m.context.getProgramInfoLog(this.glProgram);if(""!=c)throw new F(c);}},__class__:sm};var tm=function(a,b,c,d,e){this.context=a;this.glBuffer=b;this.numVertices=c;this.data32PerVertex=d;this.bufferUsage=e};n["openfl.display3D.VertexBuffer3D"]=tm;tm.__name__=["openfl","display3D","VertexBuffer3D"];
tm.prototype={dispose:function(){this.context.__deleteVertexBuffer(this)},uploadFromByteArray:function(a,b,c,d){var e=4*this.data32PerVertex;m.context.bindBuffer(34962,this.glBuffer);d*=e;b+=c*e;c=null!=d?new Float32Array(d):null;a.position=b;for(e=0;a.position<d+b;){var f=a.readUnsignedByte();c[e]=f;e++}m.context.bufferData(34962,c,this.bufferUsage)},uploadFromFloat32Array:function(a){m.context.bindBuffer(34962,this.glBuffer);m.context.bufferData(34962,a,this.bufferUsage)},uploadFromVector:function(a,
b,c){m.context.bindBuffer(34962,this.glBuffer);var d=c*this.data32PerVertex;c=null!=d?new Float32Array(d):null;var e=b;for(b+=d;e<b;)d=e++,c[d]=a.data[d];m.context.bufferData(34962,c,this.bufferUsage)},__class__:tm};var he=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);Va.call(this);this.context=a;this.width=c;this.height=d;this.glTexture=b};n["openfl.display3D.textures.TextureBase"]=he;he.__name__=["openfl","display3D","textures","TextureBase"];he.__super__=Va;he.prototype=L(Va.prototype,{dispose:function(){this.context.__deleteTexture(this)},
__class__:he});var ag=function(a,b,c){he.call(this,a,b,c,c);this.size=c;this.mipmapsGenerated=!1;this._textures=[];for(a=0;6>a;)b=a++,this._textures[b]=m.context.createTexture()};n["openfl.display3D.textures.CubeTexture"]=ag;ag.__name__=["openfl","display3D","textures","CubeTexture"];ag.__super__=he;ag.prototype=L(he.prototype,{glTextureAt:function(a){return this._textures[a]},uploadCompressedTextureFromByteArray:function(a,b,c){},uploadFromBitmapData:function(a,b,c){null==c&&(c=0);var d=a.image.get_data();
m.context.bindTexture(34067,this.glTexture);switch(b){case 0:m.context.texImage2D(34069,c,6408,a.width,a.height,0,6408,5121,d);break;case 1:m.context.texImage2D(34070,c,6408,a.width,a.height,0,6408,5121,d);break;case 2:m.context.texImage2D(34071,c,6408,a.width,a.height,0,6408,5121,d);break;case 3:m.context.texImage2D(34072,c,6408,a.width,a.height,0,6408,5121,d);break;case 4:m.context.texImage2D(34073,c,6408,a.width,a.height,0,6408,5121,d);break;case 5:m.context.texImage2D(34074,c,6408,a.width,a.height,
0,6408,5121,d);break;default:throw new F("unknown side type");}m.context.bindTexture(34067,null)},uploadFromByteArray:function(a,b,c,d){},__class__:ag});var bg=function(a,b,c,d,e){this.optimizeForRenderToTexture=c;null==this.optimizeForRenderToTexture&&(this.optimizeForRenderToTexture=!1);he.call(this,a,b,d,e)};n["openfl.display3D.textures.RectangleTexture"]=bg;bg.__name__=["openfl","display3D","textures","RectangleTexture"];bg.__super__=he;bg.prototype=L(he.prototype,{uploadFromBitmapData:function(a,
b){var c=kb.fromArrayBuffer(a.image.get_data().buffer);this.width=a.width;this.height=a.height;this.uploadFromByteArray(c,0)},uploadFromByteArray:function(a,b){m.context.bindTexture(3553,this.glTexture);this.optimizeForRenderToTexture&&m.context.pixelStorei(37440,1);m.context.texParameteri(3553,10240,9728);m.context.texParameteri(3553,10241,9728);m.context.texParameteri(3553,10242,33071);m.context.texParameteri(3553,10243,33071);var c;c=kb.get_length(a);c=null!=c?new nc(c):null;a.position=b;for(var d=
0;a.position<kb.get_length(a);){var e=a.readUnsignedByte();c[d]=e;d++}m.context.texImage2D(3553,0,6408,this.width,this.height,0,6408,5121,c);m.context.bindTexture(3553,null)},__class__:bg});var ge=function(a,b,c,d,e){this.optimizeForRenderToTexture=c;this.mipmapsGenerated=!1;-1==ge.internalFormat&&(ge.internalFormat=6408);null==this.optimizeForRenderToTexture&&(this.optimizeForRenderToTexture=!1);he.call(this,a,b,d,e)};n["openfl.display3D.textures.Texture"]=ge;ge.__name__=["openfl","display3D","textures",
"Texture"];ge.__super__=he;ge.prototype=L(he.prototype,{uploadCompressedTextureFromByteArray:function(a,b,c){},uploadFromBitmapData:function(a,b){null==b&&(b=0);var c=a.image;!c.get_premultiplied()&&c.get_transparent()&&(c=c.clone(),c.set_premultiplied(!0));this.width=c.width;this.height=c.height;this.uploadFromUInt8Array(c.get_data(),b)},uploadFromByteArray:function(a,b,c){null==c&&(c=0);var d;d=kb.get_length(a);d=null!=d?new nc(d):null;a.position=b;for(b=0;a.position<kb.get_length(a);){var e=a.readUnsignedByte();
d[b]=e;b++}this.uploadFromUInt8Array(d,c)},uploadFromUInt8Array:function(a,b){null==b&&(b=0);m.context.bindTexture(3553,this.glTexture);this.optimizeForRenderToTexture&&(m.context.pixelStorei(37440,1),m.context.texParameteri(3553,10240,9728),m.context.texParameteri(3553,10241,9728),m.context.texParameteri(3553,10242,33071),m.context.texParameteri(3553,10243,33071));m.context.texImage2D(3553,b,ge.internalFormat,this.width,this.height,0,ge.internalFormat,5121,a);m.context.bindTexture(3553,null)},__class__:ge});
var Nc=function(a,b){null==b&&(b=0);null==a&&(a="");this.message=a;this.errorID=b;this.name="Error"};n["openfl.errors.Error"]=Nc;Nc.__name__=["openfl","errors","Error"];Nc.prototype={getStackTrace:function(){return Ia.toString(Ia.exceptionStack())},toString:function(){return null!=this.message?this.message:"Error"},__class__:Nc};var vk=function(a){null==a&&(a="");Nc.call(this,a);this.name="ArgumentError"};n["openfl.errors.ArgumentError"]=vk;vk.__name__=["openfl","errors","ArgumentError"];vk.__super__=
Nc;vk.prototype=L(Nc.prototype,{__class__:vk});var Rg=function(a){null==a&&(a="");Nc.call(this,a);this.name="IOError"};n["openfl.errors.IOError"]=Rg;Rg.__name__=["openfl","errors","IOError"];Rg.__super__=Nc;Rg.prototype=L(Nc.prototype,{__class__:Rg});var af=function(){Rg.call(this,"End of file was encountered");this.name="EOFError";this.errorID=2030};n["openfl.errors.EOFError"]=af;af.__name__=["openfl","errors","EOFError"];af.__super__=Rg;af.prototype=L(Rg.prototype,{__class__:af});var li=function(a){null==
a&&(a="");Nc.call(this,a,0);this.name="RangeError"};n["openfl.errors.RangeError"]=li;li.__name__=["openfl","errors","RangeError"];li.__super__=Nc;li.prototype=L(Nc.prototype,{__class__:li});var um=function(a){null==a&&(a="");Nc.call(this,a,0);this.name="SecurityError"};n["openfl.errors.SecurityError"]=um;um.__name__=["openfl","errors","SecurityError"];um.__super__=Nc;um.prototype=L(Nc.prototype,{__class__:um});var ki=function(a){null==a&&(a="");Nc.call(this,a,0);this.name="TypeError"};n["openfl.errors.TypeError"]=
ki;ki.__name__=["openfl","errors","TypeError"];ki.__super__=Nc;ki.prototype=L(Nc.prototype,{__class__:ki});var xf=function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!1);null==b&&(b=!1);fa.call(this,a,b,c);this.activating=d};n["openfl.events.ActivityEvent"]=xf;xf.__name__=["openfl","events","ActivityEvent"];xf.__super__=fa;xf.prototype=L(fa.prototype,{clone:function(){var a=new xf(this.type,this.bubbles,this.cancelable,this.activating);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=
this.eventPhase;return a},toString:function(){return this.__formatToString("ActivityEvent",["type","bubbles","cancelable","activating"])},__class__:xf});var Le=function(a,b,c,d){null==d&&(d="");null==c&&(c=!1);null==b&&(b=!1);fa.call(this,a,b,c);this.text=d};n["openfl.events.TextEvent"]=Le;Le.__name__=["openfl","events","TextEvent"];Le.__super__=fa;Le.prototype=L(fa.prototype,{clone:function(){var a=new Le(this.type,this.bubbles,this.cancelable,this.text);a.target=this.target;a.currentTarget=this.currentTarget;
a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("TextEvent",["type","bubbles","cancelable","text"])},__class__:Le});var fe=function(a,b,c,d,e){null==e&&(e=0);null==d&&(d="");null==c&&(c=!1);null==b&&(b=!1);Le.call(this,a,b,c,d);this.errorID=e};n["openfl.events.ErrorEvent"]=fe;fe.__name__=["openfl","events","ErrorEvent"];fe.__super__=Le;fe.prototype=L(Le.prototype,{clone:function(){var a=new fe(this.type,this.bubbles,this.cancelable,this.text,this.errorID);a.target=
this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("ErrorEvent",["type","bubbles","cancelable","text","errorID"])},__class__:fe});var hi=function(a,b,c){this.callback=a;this.useCapture=b;this.priority=c};n["openfl.events._EventDispatcher.Listener"]=hi;hi.__name__=["openfl","events","_EventDispatcher","Listener"];hi.prototype={match:function(a,b){return O.compareMethods(this.callback,a)&&this.useCapture==b},__class__:hi};
var ee=function(a,b,c,d,e,f){null==f&&(f=0);null==e&&(e=!1);null==c&&(c=!1);null==b&&(b=!1);fa.call(this,a,b,c);this.keyCode=f;this.shiftKey=e;this.relatedObject=d};n["openfl.events.FocusEvent"]=ee;ee.__name__=["openfl","events","FocusEvent"];ee.__super__=fa;ee.prototype=L(fa.prototype,{clone:function(){var a=new ee(this.type,this.bubbles,this.cancelable,this.relatedObject,this.shiftKey,this.keyCode);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("FocusEvent",
"type bubbles cancelable relatedObject shiftKey keyCode".split(" "))},__class__:ee});var Qe=function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=!1);null==c&&(c=!1);null==b&&(b=!1);xf.call(this,a,b,c);this.fullScreen=d;this.interactive=e};n["openfl.events.FullScreenEvent"]=Qe;Qe.__name__=["openfl","events","FullScreenEvent"];Qe.__super__=xf;Qe.prototype=L(xf.prototype,{clone:function(){var a=new Qe(this.type,this.bubbles,this.cancelable,this.fullScreen,this.interactive);a.target=this.target;a.currentTarget=
this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("FullscreenEvent",["type","bubbles","cancelable","fullscreen","interactive"])},__class__:Qe});var bf=function(a,b,c,d){null==c&&(c=!1);null==b&&(b=!0);fa.call(this,a,b,c);this.device=d};n["openfl.events.GameInputEvent"]=bf;bf.__name__=["openfl","events","GameInputEvent"];bf.__super__=fa;bf.prototype=L(fa.prototype,{clone:function(){var a=new bf(this.type,this.bubbles,this.cancelable,this.device);
a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("GameInputEvent",["type","bubbles","cancelable","device"])},__class__:bf});var dg=function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=0);null==c&&(c=!1);null==b&&(b=!1);this.status=d;this.redirected=e;fa.call(this,a,b,c)};n["openfl.events.HTTPStatusEvent"]=dg;dg.__name__=["openfl","events","HTTPStatusEvent"];dg.__super__=fa;dg.prototype=L(fa.prototype,{clone:function(){var a=
new dg(this.type,this.bubbles,null,this.status,this.redirected);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("HTTPStatusEvent",["type","bubbles","cancelable","status","redirected"])},__class__:dg});var $e=function(a,b,c,d,e){null==e&&(e=0);null==d&&(d="");null==c&&(c=!1);null==b&&(b=!0);fe.call(this,a,b,c,d,e)};n["openfl.events.IOErrorEvent"]=$e;$e.__name__=["openfl","events","IOErrorEvent"];$e.__super__=
fe;$e.prototype=L(fe.prototype,{clone:function(){var a=new $e(this.type,this.bubbles,this.cancelable,this.text,this.errorID);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("IOErrorEvent",["type","bubbles","cancelable","text","errorID"])},__class__:$e});var Ve=function(a,b,c,d,e,f,g,k,h,l,m){null==m&&(m=!1);null==l&&(l=!1);null==h&&(h=!1);null==k&&(k=!1);null==g&&(g=!1);null==e&&(e=0);null==d&&(d=0);null==
c&&(c=!1);null==b&&(b=!1);fa.call(this,a,b,c);this.charCode=d;this.keyCode=e;this.keyLocation=null!=f?f:0;this.ctrlKey=g;this.altKey=k;this.shiftKey=h;this.controlKey=l;this.commandKey=m};n["openfl.events.KeyboardEvent"]=Ve;Ve.__name__=["openfl","events","KeyboardEvent"];Ve.__super__=fa;Ve.prototype=L(fa.prototype,{clone:function(){var a=new Ve(this.type,this.bubbles,this.cancelable,this.charCode,this.keyCode,this.keyLocation,this.ctrlKey,this.altKey,this.shiftKey,this.controlKey,this.commandKey);
a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("KeyboardEvent","type bubbles cancelable charCode keyCode keyLocation ctrlKey altKey shiftKey".split(" "))},__class__:Ve});var Xa=function(a,b,c,d,e,f,g,k,h,l,m,n,q){null==q&&(q=0);null==n&&(n=!1);null==m&&(m=0);null==l&&(l=!1);null==h&&(h=!1);null==k&&(k=!1);null==g&&(g=!1);null==e&&(e=0);null==d&&(d=0);null==c&&(c=!1);null==b&&(b=!0);fa.call(this,a,b,c);
this.shiftKey=h;this.altKey=k;this.ctrlKey=g;this.bubbles=b;this.relatedObject=f;this.delta=m;this.localX=d;this.localY=e;this.buttonDown=l;this.commandKey=n;this.clickCount=q};n["openfl.events.MouseEvent"]=Xa;Xa.__name__=["openfl","events","MouseEvent"];Xa.__altKey=null;Xa.__buttonDown=null;Xa.__commandKey=null;Xa.__ctrlKey=null;Xa.__shiftKey=null;Xa.__create=function(a,b,c,d,e,f,g){null==g&&(g=0);switch(a){case "mouseDown":Xa.__buttonDown=!0;break;case "mouseUp":Xa.__buttonDown=!1}a=new Xa(a,!0,
!1,e.x,e.y,null,Xa.__ctrlKey,Xa.__altKey,Xa.__shiftKey,Xa.__buttonDown,g,Xa.__commandKey);a.stageX=c;a.stageY=d;a.target=f;return a};Xa.__super__=fa;Xa.prototype=L(fa.prototype,{clone:function(){var a=new Xa(this.type,this.bubbles,this.cancelable,this.localX,this.localY,this.relatedObject,this.ctrlKey,this.altKey,this.shiftKey,this.buttonDown,this.delta,this.commandKey,this.clickCount);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("MouseEvent",
"type bubbles cancelable localX localY relatedObject ctrlKey altKey shiftKey buttonDown delta".split(" "))},updateAfterEvent:function(){},__class__:Xa});var Sg=function(a,b,c,d){null==c&&(c=!1);null==b&&(b=!1);this.info=d;fa.call(this,a,b,c)};n["openfl.events.NetStatusEvent"]=Sg;Sg.__name__=["openfl","events","NetStatusEvent"];Sg.__super__=fa;Sg.prototype=L(fa.prototype,{clone:function(){var a=new Sg(this.type,this.bubbles,this.cancelable,this.info);a.target=this.target;a.currentTarget=this.currentTarget;
a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("NetStatusEvent",["type","bubbles","cancelable","info"])},__class__:Sg});var eg=function(a,b,c,d,e){null==e&&(e=0);null==d&&(d=0);null==c&&(c=!1);null==b&&(b=!1);fa.call(this,a,b,c);this.bytesLoaded=d;this.bytesTotal=e};n["openfl.events.ProgressEvent"]=eg;eg.__name__=["openfl","events","ProgressEvent"];eg.__super__=fa;eg.prototype=L(fa.prototype,{clone:function(){var a=new eg(this.type,this.bubbles,this.cancelable,
this.bytesLoaded,this.bytesTotal);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("ProgressEvent",["type","bubbles","cancelable","bytesLoaded","bytesTotal"])},__class__:eg});var Tg=function(a,b,c,d,e){null==e&&(e=0);null==d&&(d="");null==c&&(c=!1);null==b&&(b=!1);fe.call(this,a,b,c,d,e)};n["openfl.events.SecurityErrorEvent"]=Tg;Tg.__name__=["openfl","events","SecurityErrorEvent"];Tg.__super__=fe;Tg.prototype=
L(fe.prototype,{clone:function(){var a=new Tg(this.type,this.bubbles,this.cancelable,this.text,this.errorID);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("SecurityErrorEvent",["type","bubbles","cancelable","text","errorID"])},__class__:Tg});var pd=function(a,b,c,d,e,f,g,k,h,l,m,n,q,r,u,t,v,x,z,y){null==t&&(t=!1);null==u&&(u=!1);null==r&&(r=!1);null==q&&(q=!1);null==n&&(n=!1);null==l&&(l=0);null==h&&
(h=0);null==k&&(k=0);null==g&&(g=0);null==f&&(f=0);null==e&&(e=!1);null==d&&(d=0);null==c&&(c=!1);null==b&&(b=!0);fa.call(this,a,b,c);this.touchPointID=d;this.isPrimaryTouchPoint=e;this.localX=f;this.localY=g;this.sizeX=k;this.sizeY=h;this.pressure=l;this.relatedObject=m;this.ctrlKey=n;this.altKey=q;this.shiftKey=r;this.commandKey=u;this.controlKey=t};n["openfl.events.TouchEvent"]=pd;pd.__name__=["openfl","events","TouchEvent"];pd.__create=function(a,b,c,d,e,f){a=new pd(a,!0,!1,0,!0,e.x,e.y,1,1,1);
a.stageX=c;a.stageY=d;a.target=f;return a};pd.__super__=fa;pd.prototype=L(fa.prototype,{clone:function(){var a=new pd(this.type,this.bubbles,this.cancelable,this.touchPointID,this.isPrimaryTouchPoint,this.localX,this.localY,this.sizeX,this.sizeY,this.pressure,this.relatedObject,this.ctrlKey,this.altKey,this.shiftKey,this.commandKey,this.controlKey);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("TouchEvent",
"type bubbles cancelable touchPointID isPrimaryTouchPoint localX localY sizeX sizeY pressure relatedObject ctrlKey altKey shiftKey commandKey controlKey".split(" "))},updateAfterEvent:function(){},__class__:pd});var Nd=function(){this.__saveLastFilter=!1;this.__passes=0;this.__dirty=!0};n["openfl.filters.BitmapFilter"]=Nd;Nd.__name__=["openfl","filters","BitmapFilter"];Nd.__tmpRenderTexture=null;Nd.__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,k=!1,h=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(Nd.__tmpRenderTexture));for(var n=0,q=m.__passes;n<q;){var r=n++,k=m.__saveLastFilter&&m.__useLastFilter(r);f&&!k&&d.__pingPongTexture.swap();k&&(Nd.__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,!k)}}c.__shader=h;f&&(d.__pingPongTexture.useOldTexture=!1)};Nd.__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)};Nd.prototype={clone:function(){return new Nd},__applyFilter:function(a,b,c,d){},__growBounds:function(a){},__preparePass:function(a){return null},__useLastFilter:function(a){return!1},
__class__:Nd};var We=function(a){Nd.call(this);this.__colorMatrixShader=new Vh;this.__passes=1;this.set_matrix(a)};n["openfl.filters.ColorMatrixFilter"]=We;We.__name__=["openfl","filters","ColorMatrixFilter"];We.__super__=Nd;We.prototype=L(Nd.prototype,{clone:function(){return new We(this.matrix)},__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 k,h,l=c.y|0,m=c.height|0;l<m;)for(var n=l++,q=c.x|0,r=c.width|0;q<r;){h=q++;k=n*a+4*h;h=(n+g)*
b+4*(h+d);var u=e[k],t=e[k+1],v=e[k+2];k=e[k+3];f[h]=this.matrix[0]*u+this.matrix[1]*t+this.matrix[2]*v+this.matrix[3]*k+this.matrix[4]|0;f[h+1]=this.matrix[5]*u+this.matrix[6]*t+this.matrix[7]*v+this.matrix[8]*k+this.matrix[9]|0;f[h+2]=this.matrix[10]*u+this.matrix[11]*t+this.matrix[12]*v+this.matrix[13]*k+this.matrix[14]|0;f[h+3]=this.matrix[15]*u+this.matrix[16]*t+this.matrix[17]*v+this.matrix[18]*k+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]);return this.matrix=a},__class__:We,__properties__:{set_matrix:"set_matrix"}});var Vh=function(){this.__uOffsets=new Og("vec4",0);this.__uMultipliers=new Og("mat4",0);this.fragment=["uniform mat4 uMultipliers;","uniform vec4 uOffsets;","void main(void) {","\tvec4 color = texture2D("+Wa.uSampler+", "+Wa.vTexCoord+");","\tcolor = vec4(color.rgb / color.a, color.a);","\tcolor = uOffsets + color * uMultipliers;","\tcolor = vec4(color.rgb * color.a, color.a);",
"\tgl_FragColor = color;","}"];Wa.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("+Wa.uSampler+", "+Wa.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}")};n["openfl.filters._ColorMatrixFilter.ColorMatrixShader"]=
Vh;Vh.__name__=["openfl","filters","_ColorMatrixFilter","ColorMatrixShader"];Vh.__super__=Wa;Vh.prototype=L(Wa.prototype,{get_uMultipliers:function(){return this.__uMultipliers.value},set_uMultipliers:function(a){return this.__uMultipliers.set_value(a)},get_uOffsets:function(){return this.__uOffsets.value},set_uOffsets:function(a){return this.__uOffsets.set_value(a)},__class__:Vh,__properties__:{set_uOffsets:"set_uOffsets",get_uOffsets:"get_uOffsets",set_uMultipliers:"set_uMultipliers",get_uMultipliers:"get_uMultipliers"}});
var Oc=function(a){if(null!=a&&16==a.length)this.rawData=a;else{a=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];var b=new Lb;b.length=a.length;b.fixed=!0;var c;c=Array(a.length);for(var d=0,e=a.length;d<e;){var f=d++;c[f]=a[f]}b.data=c;this.rawData=b}};n["openfl.geom.Matrix3D"]=Oc;Oc.__name__=["openfl","geom","Matrix3D"];Oc.create2D=function(a,b,c,d){null==d&&(d=0);null==c&&(c=1);var e=d*Math.PI/180;d=Math.cos(e);e=Math.sin(e);a=[d*c,-e*c,0,0,e*c,d*c,0,0,0,0,1,0,a,b,0,1];b=new Lb;b.length=a.length;b.fixed=!0;
c=Array(a.length);d=0;for(e=a.length;d<e;){var f=d++;c[f]=a[f]}b.data=c;return new Oc(b)};Oc.createABCD=function(a,b,c,d,e,f){a=[a,b,0,0,c,d,0,0,0,0,1,0,e,f,0,1];b=new Lb;b.length=a.length;b.fixed=!0;c=Array(a.length);d=0;for(e=a.length;d<e;)f=d++,c[f]=a[f];b.data=c;return new Oc(b)};Oc.createOrtho=function(a,b,c,d,e,f){var g=1/(b-a),k=1/(d-c),h=1/(f-e);a=[2*g,0,0,0,0,2*k,0,0,0,0,-2*h,0,-(a+b)*g,-(c+d)*k,-(e+f)*h,1];b=new Lb;b.length=a.length;b.fixed=!0;c=Array(a.length);d=0;for(e=a.length;d<e;)f=
d++,c[f]=a[f];b.data=c;return new Oc(b)};Oc.interpolate=function(a,b,c){for(var d=new Oc,e=0;16>e;){var f=e++,g=d.rawData;if(!g.fixed&&(f>=g.length&&(g.length=f+1),g.data.length<g.length)){var k;k=Array(g.data.length+10);H.blit(g.data,0,k,0,g.data.length);g.data=k}g.data[f]=a.rawData.data[f]+(b.rawData.data[f]-a.rawData.data[f])*c}return d};Oc.__getAxisRotation=function(a,b,c,d){var e=new Oc;a=new Pb(a,b,c);d=Math.PI/180*-d;c=Math.cos(d);d=Math.sin(d);b=1-c;var f=e.rawData;if(!f.fixed&&(0>=f.length&&
(f.length=1),f.data.length<f.length)){var g;g=Array(f.data.length+10);H.blit(f.data,0,g,0,f.data.length);f.data=g}f.data[0]=c+a.x*a.x*b;f=e.rawData;f.fixed||(5>=f.length&&(f.length=6),f.data.length<f.length&&(g=Array(f.data.length+10),H.blit(f.data,0,g,0,f.data.length),f.data=g));f.data[5]=c+a.y*a.y*b;f=e.rawData;f.fixed||(10>=f.length&&(f.length=11),f.data.length<f.length&&(g=Array(f.data.length+10),H.blit(f.data,0,g,0,f.data.length),f.data=g));f.data[10]=c+a.z*a.z*b;c=a.x*a.y*b;f=a.z*d;g=e.rawData;
if(!g.fixed&&(4>=g.length&&(g.length=5),g.data.length<g.length)){var k;k=Array(g.data.length+10);H.blit(g.data,0,k,0,g.data.length);g.data=k}g.data[4]=c+f;g=e.rawData;g.fixed||(1>=g.length&&(g.length=2),g.data.length<g.length&&(k=Array(g.data.length+10),H.blit(g.data,0,k,0,g.data.length),g.data=k));g.data[1]=c-f;c=a.x*a.z*b;f=a.y*d;g=e.rawData;g.fixed||(8>=g.length&&(g.length=9),g.data.length<g.length&&(k=Array(g.data.length+10),H.blit(g.data,0,k,0,g.data.length),g.data=k));g.data[8]=c-f;g=e.rawData;
g.fixed||(2>=g.length&&(g.length=3),g.data.length<g.length&&(k=Array(g.data.length+10),H.blit(g.data,0,k,0,g.data.length),g.data=k));g.data[2]=c+f;c=a.y*a.z*b;f=a.x*d;a=e.rawData;a.fixed||(9>=a.length&&(a.length=10),a.data.length<a.length&&(d=Array(a.data.length+10),H.blit(a.data,0,d,0,a.data.length),a.data=d));a.data[9]=c+f;a=e.rawData;a.fixed||(6>=a.length&&(a.length=7),a.data.length<a.length&&(d=Array(a.data.length+10),H.blit(a.data,0,d,0,a.data.length),a.data=d));a.data[6]=c-f;return e};Oc.prototype=
{append:function(a){var b=this.rawData.data[0],c=this.rawData.data[4],d=this.rawData.data[8],e=this.rawData.data[12],f=this.rawData.data[1],g=this.rawData.data[5],k=this.rawData.data[9],h=this.rawData.data[13],l=this.rawData.data[2],m=this.rawData.data[6],n=this.rawData.data[10],q=this.rawData.data[14],r=this.rawData.data[3],u=this.rawData.data[7],t=this.rawData.data[11],v=this.rawData.data[15],x=a.rawData.data[0],z=a.rawData.data[4],y=a.rawData.data[8],A=a.rawData.data[12],B=a.rawData.data[1],C=
a.rawData.data[5],E=a.rawData.data[9],G=a.rawData.data[13],F=a.rawData.data[2],I=a.rawData.data[6],J=a.rawData.data[10],K=a.rawData.data[14],L=a.rawData.data[3],M=a.rawData.data[7],P=a.rawData.data[11];a=a.rawData.data[15];var O=this.rawData;if(!O.fixed&&(0>=O.length&&(O.length=1),O.data.length<O.length)){var N;N=Array(O.data.length+10);H.blit(O.data,0,N,0,O.data.length);O.data=N}O.data[0]=b*x+f*z+l*y+r*A;O=this.rawData;O.fixed||(1>=O.length&&(O.length=2),O.data.length<O.length&&(N=Array(O.data.length+
10),H.blit(O.data,0,N,0,O.data.length),O.data=N));O.data[1]=b*B+f*C+l*E+r*G;O=this.rawData;O.fixed||(2>=O.length&&(O.length=3),O.data.length<O.length&&(N=Array(O.data.length+10),H.blit(O.data,0,N,0,O.data.length),O.data=N));O.data[2]=b*F+f*I+l*J+r*K;O=this.rawData;O.fixed||(3>=O.length&&(O.length=4),O.data.length<O.length&&(N=Array(O.data.length+10),H.blit(O.data,0,N,0,O.data.length),O.data=N));O.data[3]=b*L+f*M+l*P+r*a;b=this.rawData;b.fixed||(4>=b.length&&(b.length=5),b.data.length<b.length&&(f=
Array(b.data.length+10),H.blit(b.data,0,f,0,b.data.length),b.data=f));b.data[4]=c*x+g*z+m*y+u*A;b=this.rawData;b.fixed||(5>=b.length&&(b.length=6),b.data.length<b.length&&(f=Array(b.data.length+10),H.blit(b.data,0,f,0,b.data.length),b.data=f));b.data[5]=c*B+g*C+m*E+u*G;b=this.rawData;b.fixed||(6>=b.length&&(b.length=7),b.data.length<b.length&&(f=Array(b.data.length+10),H.blit(b.data,0,f,0,b.data.length),b.data=f));b.data[6]=c*F+g*I+m*J+u*K;b=this.rawData;b.fixed||(7>=b.length&&(b.length=8),b.data.length<
b.length&&(f=Array(b.data.length+10),H.blit(b.data,0,f,0,b.data.length),b.data=f));b.data[7]=c*L+g*M+m*P+u*a;c=this.rawData;c.fixed||(8>=c.length&&(c.length=9),c.data.length<c.length&&(g=Array(c.data.length+10),H.blit(c.data,0,g,0,c.data.length),c.data=g));c.data[8]=d*x+k*z+n*y+t*A;c=this.rawData;c.fixed||(9>=c.length&&(c.length=10),c.data.length<c.length&&(g=Array(c.data.length+10),H.blit(c.data,0,g,0,c.data.length),c.data=g));c.data[9]=d*B+k*C+n*E+t*G;c=this.rawData;c.fixed||(10>=c.length&&(c.length=
11),c.data.length<c.length&&(g=Array(c.data.length+10),H.blit(c.data,0,g,0,c.data.length),c.data=g));c.data[10]=d*F+k*I+n*J+t*K;c=this.rawData;c.fixed||(11>=c.length&&(c.length=12),c.data.length<c.length&&(g=Array(c.data.length+10),H.blit(c.data,0,g,0,c.data.length),c.data=g));c.data[11]=d*L+k*M+n*P+t*a;d=this.rawData;d.fixed||(12>=d.length&&(d.length=13),d.data.length<d.length&&(k=Array(d.data.length+10),H.blit(d.data,0,k,0,d.data.length),d.data=k));d.data[12]=e*x+h*z+q*y+v*A;x=this.rawData;x.fixed||
(13>=x.length&&(x.length=14),x.data.length<x.length&&(z=Array(x.data.length+10),H.blit(x.data,0,z,0,x.data.length),x.data=z));x.data[13]=e*B+h*C+q*E+v*G;B=this.rawData;B.fixed||(14>=B.length&&(B.length=15),B.data.length<B.length&&(C=Array(B.data.length+10),H.blit(B.data,0,C,0,B.data.length),B.data=C));B.data[14]=e*F+h*I+q*J+v*K;F=this.rawData;F.fixed||(15>=F.length&&(F.length=16),F.data.length<F.length&&(I=Array(F.data.length+10),H.blit(F.data,0,I,0,F.data.length),F.data=I));F.data[15]=e*L+h*M+q*
P+v*a},appendRotation:function(a,b,c){a=Oc.__getAxisRotation(b.x,b.y,b.z,a);null!=c&&a.appendTranslation(c.x,c.y,c.z);this.append(a)},appendScale:function(a,b,c){this.append(new Oc(function(d){d=[a,0,0,0,0,b,0,0,0,0,c,0,0,0,0,1];var e=new Lb;e.length=d.length;e.fixed=!0;var f;f=Array(d.length);for(var g=0,h=d.length;g<h;){var l=g++;f[l]=d[l]}e.data=f;return e}(this)))},appendTranslation:function(a,b,c){var d=this.rawData;if(!d.fixed&&(12>=d.length&&(d.length=13),d.data.length<d.length)){var e;e=Array(d.data.length+
10);H.blit(d.data,0,e,0,d.data.length);d.data=e}d.data[12]=this.rawData.data[12]+a;a=this.rawData;a.fixed||(13>=a.length&&(a.length=14),a.data.length<a.length&&(d=Array(a.data.length+10),H.blit(a.data,0,d,0,a.data.length),a.data=d));a.data[13]=this.rawData.data[13]+b;b=this.rawData;b.fixed||(14>=b.length&&(b.length=15),b.data.length<b.length&&(a=Array(b.data.length+10),H.blit(b.data,0,a,0,b.data.length),b.data=a));b.data[14]=this.rawData.data[14]+c},clone:function(){var a=this.rawData,b=new Lb;b.length=
a.length;b.fixed=a.fixed;b.data=Array(a.length);H.blit(a.data,0,b.data,0,a.length);return new Oc(b)},copyColumnFrom:function(a,b){switch(a){case 0:var c=this.rawData;if(!c.fixed&&(0>=c.length&&(c.length=1),c.data.length<c.length)){var d;d=Array(c.data.length+10);H.blit(c.data,0,d,0,c.data.length);c.data=d}c.data[0]=b.x;c=this.rawData;c.fixed||(1>=c.length&&(c.length=2),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[1]=b.y;c=this.rawData;c.fixed||
(2>=c.length&&(c.length=3),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[2]=b.z;c=this.rawData;c.fixed||(3>=c.length&&(c.length=4),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[3]=b.w;break;case 1:c=this.rawData;c.fixed||(4>=c.length&&(c.length=5),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[4]=b.x;c=this.rawData;c.fixed||(5>=
c.length&&(c.length=6),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[5]=b.y;c=this.rawData;c.fixed||(6>=c.length&&(c.length=7),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[6]=b.z;c=this.rawData;c.fixed||(7>=c.length&&(c.length=8),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[7]=b.w;break;case 2:c=this.rawData;c.fixed||(8>=c.length&&
(c.length=9),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[8]=b.x;c=this.rawData;c.fixed||(9>=c.length&&(c.length=10),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[9]=b.y;c=this.rawData;c.fixed||(10>=c.length&&(c.length=11),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[10]=b.z;c=this.rawData;c.fixed||(11>=c.length&&(c.length=
12),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[11]=b.w;break;case 3:c=this.rawData,c.fixed||(12>=c.length&&(c.length=13),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d)),c.data[12]=b.x,c=this.rawData,c.fixed||(13>=c.length&&(c.length=14),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d)),c.data[13]=b.y,c=this.rawData,c.fixed||(14>=c.length&&(c.length=
15),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d)),c.data[14]=b.z,c=this.rawData,c.fixed||(15>=c.length&&(c.length=16),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d)),c.data[15]=b.w}},copyColumnTo:function(a,b){switch(a){case 0:b.x=this.rawData.data[0];b.y=this.rawData.data[1];b.z=this.rawData.data[2];b.w=this.rawData.data[3];break;case 1:b.x=this.rawData.data[4];b.y=this.rawData.data[5];b.z=this.rawData.data[6];
b.w=this.rawData.data[7];break;case 2:b.x=this.rawData.data[8];b.y=this.rawData.data[9];b.z=this.rawData.data[10];b.w=this.rawData.data[11];break;case 3:b.x=this.rawData.data[12],b.y=this.rawData.data[13],b.z=this.rawData.data[14],b.w=this.rawData.data[15]}},copyFrom:function(a){a=a.rawData;var b=new Lb;b.length=a.length;b.fixed=a.fixed;b.data=Array(a.length);H.blit(a.data,0,b.data,0,a.length);this.rawData=b},copyRawDataFrom:function(a,b,c){null==c&&(c=!1);null==b&&(b=0);c&&this.transpose();for(var d=
a.length-b,e=0;e<d;){var f=e++,g=this.rawData;if(!g.fixed&&(f>=g.length&&(g.length=f+1),g.data.length<g.length)){var h;h=Array(g.data.length+10);H.blit(g.data,0,h,0,g.data.length);g.data=h}g.data[f]=a.data[f+b]}c&&this.transpose()},copyRawDataTo:function(a,b,c){null==c&&(c=!1);null==b&&(b=0);c&&this.transpose();for(var d=0,e=this.rawData.length;d<e;){var f=d++,g=f+b;if(!a.fixed&&(g>=a.length&&(a.length=g+1),a.data.length<a.length)){var h;h=Array(a.data.length+10);H.blit(a.data,0,h,0,a.data.length);
a.data=h}a.data[g]=this.rawData.data[f]}c&&this.transpose()},copyRowFrom:function(a,b){switch(a){case 0:var c=this.rawData;if(!c.fixed&&(0>=c.length&&(c.length=1),c.data.length<c.length)){var d;d=Array(c.data.length+10);H.blit(c.data,0,d,0,c.data.length);c.data=d}c.data[0]=b.x;c=this.rawData;c.fixed||(4>=c.length&&(c.length=5),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[4]=b.y;c=this.rawData;c.fixed||(8>=c.length&&(c.length=9),c.data.length<
c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[8]=b.z;c=this.rawData;c.fixed||(12>=c.length&&(c.length=13),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[12]=b.w;break;case 1:c=this.rawData;c.fixed||(1>=c.length&&(c.length=2),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[1]=b.x;c=this.rawData;c.fixed||(5>=c.length&&(c.length=6),c.data.length<
c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[5]=b.y;c=this.rawData;c.fixed||(9>=c.length&&(c.length=10),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[9]=b.z;c=this.rawData;c.fixed||(13>=c.length&&(c.length=14),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[13]=b.w;break;case 2:c=this.rawData;c.fixed||(2>=c.length&&(c.length=3),c.data.length<
c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[2]=b.x;c=this.rawData;c.fixed||(6>=c.length&&(c.length=7),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[6]=b.y;c=this.rawData;c.fixed||(10>=c.length&&(c.length=11),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[10]=b.z;c=this.rawData;c.fixed||(14>=c.length&&(c.length=15),c.data.length<c.length&&
(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[14]=b.w;break;case 3:c=this.rawData,c.fixed||(3>=c.length&&(c.length=4),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d)),c.data[3]=b.x,c=this.rawData,c.fixed||(7>=c.length&&(c.length=8),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d)),c.data[7]=b.y,c=this.rawData,c.fixed||(11>=c.length&&(c.length=12),c.data.length<c.length&&
(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d)),c.data[11]=b.z,c=this.rawData,c.fixed||(15>=c.length&&(c.length=16),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d)),c.data[15]=b.w}},copyRowTo:function(a,b){switch(a){case 0:b.x=this.rawData.data[0];b.y=this.rawData.data[4];b.z=this.rawData.data[8];b.w=this.rawData.data[12];break;case 1:b.x=this.rawData.data[1];b.y=this.rawData.data[5];b.z=this.rawData.data[9];b.w=this.rawData.data[13];
break;case 2:b.x=this.rawData.data[2];b.y=this.rawData.data[6];b.z=this.rawData.data[10];b.w=this.rawData.data[14];break;case 3:b.x=this.rawData.data[3],b.y=this.rawData.data[7],b.z=this.rawData.data[11],b.w=this.rawData.data[15]}},copyToMatrix3D:function(a){var b=this.rawData,c=new Lb;c.length=b.length;c.fixed=b.fixed;c.data=Array(b.length);H.blit(b.data,0,c.data,0,b.length);a.rawData=c},decompose:function(a){null==a&&(a=1);var b;b=new Lb;b.data=[];b.length=0;b.fixed=!1;var c=this.clone().rawData,
d=new Lb;d.length=c.length;d.fixed=c.fixed;d.data=Array(c.length);H.blit(c.data,0,d.data,0,c.length);c=new Pb(d.data[12],d.data[13],d.data[14]);if(!d.fixed&&(12>=d.length&&(d.length=13),d.data.length<d.length)){var e;e=Array(d.data.length+10);H.blit(d.data,0,e,0,d.data.length);d.data=e}d.data[12]=0;d.fixed||(13>=d.length&&(d.length=14),d.data.length<d.length&&(e=Array(d.data.length+10),H.blit(d.data,0,e,0,d.data.length),d.data=e));d.data[13]=0;d.fixed||(14>=d.length&&(d.length=15),d.data.length<d.length&&
(e=Array(d.data.length+10),H.blit(d.data,0,e,0,d.data.length),d.data=e));d.data[14]=0;e=new Pb;e.x=Math.sqrt(d.data[0]*d.data[0]+d.data[1]*d.data[1]+d.data[2]*d.data[2]);e.y=Math.sqrt(d.data[4]*d.data[4]+d.data[5]*d.data[5]+d.data[6]*d.data[6]);e.z=Math.sqrt(d.data[8]*d.data[8]+d.data[9]*d.data[9]+d.data[10]*d.data[10]);0>d.data[0]*(d.data[5]*d.data[10]-d.data[6]*d.data[9])-d.data[1]*(d.data[4]*d.data[10]-d.data[6]*d.data[8])+d.data[2]*(d.data[4]*d.data[9]-d.data[5]*d.data[8])&&(e.z=-e.z);if(!d.fixed&&
(0>=d.length&&(d.length=1),d.data.length<d.length)){var f;f=Array(d.data.length+10);H.blit(d.data,0,f,0,d.data.length);d.data=f}d.data[0]/=e.x;d.fixed||(1>=d.length&&(d.length=2),d.data.length<d.length&&(f=Array(d.data.length+10),H.blit(d.data,0,f,0,d.data.length),d.data=f));d.data[1]/=e.x;d.fixed||(2>=d.length&&(d.length=3),d.data.length<d.length&&(f=Array(d.data.length+10),H.blit(d.data,0,f,0,d.data.length),d.data=f));d.data[2]/=e.x;d.fixed||(4>=d.length&&(d.length=5),d.data.length<d.length&&(f=
Array(d.data.length+10),H.blit(d.data,0,f,0,d.data.length),d.data=f));d.data[4]/=e.y;d.fixed||(5>=d.length&&(d.length=6),d.data.length<d.length&&(f=Array(d.data.length+10),H.blit(d.data,0,f,0,d.data.length),d.data=f));d.data[5]/=e.y;d.fixed||(6>=d.length&&(d.length=7),d.data.length<d.length&&(f=Array(d.data.length+10),H.blit(d.data,0,f,0,d.data.length),d.data=f));d.data[6]/=e.y;d.fixed||(8>=d.length&&(d.length=9),d.data.length<d.length&&(f=Array(d.data.length+10),H.blit(d.data,0,f,0,d.data.length),
d.data=f));d.data[8]/=e.z;d.fixed||(9>=d.length&&(d.length=10),d.data.length<d.length&&(f=Array(d.data.length+10),H.blit(d.data,0,f,0,d.data.length),d.data=f));d.data[9]/=e.z;d.fixed||(10>=d.length&&(d.length=11),d.data.length<d.length&&(f=Array(d.data.length+10),H.blit(d.data,0,f,0,d.data.length),d.data=f));d.data[10]/=e.z;f=new Pb;if(null!=a)switch(a){case 0:f.w=Math.acos((d.data[0]+d.data[5]+d.data[10]-1)/2);a=Math.sqrt((d.data[6]-d.data[9])*(d.data[6]-d.data[9])+(d.data[8]-d.data[2])*(d.data[8]-
d.data[2])+(d.data[1]-d.data[4])*(d.data[1]-d.data[4]));0!=a?(f.x=(d.data[6]-d.data[9])/a,f.y=(d.data[8]-d.data[2])/a,f.z=(d.data[1]-d.data[4])/a):f.x=f.y=f.z=0;break;case 2:a=d.data[0]+d.data[5]+d.data[10];0<a?(f.w=Math.sqrt(1+a)/2,f.x=(d.data[6]-d.data[9])/(4*f.w),f.y=(d.data[8]-d.data[2])/(4*f.w),f.z=(d.data[1]-d.data[4])/(4*f.w)):d.data[0]>d.data[5]&&d.data[0]>d.data[10]?(f.x=Math.sqrt(1+d.data[0]-d.data[5]-d.data[10])/2,f.w=(d.data[6]-d.data[9])/(4*f.x),f.y=(d.data[1]+d.data[4])/(4*f.x),f.z=
(d.data[8]+d.data[2])/(4*f.x)):d.data[5]>d.data[10]?(f.y=Math.sqrt(1+d.data[5]-d.data[0]-d.data[10])/2,f.x=(d.data[1]+d.data[4])/(4*f.y),f.w=(d.data[8]-d.data[2])/(4*f.y),f.z=(d.data[6]+d.data[9])/(4*f.y)):(f.z=Math.sqrt(1+d.data[10]-d.data[0]-d.data[5])/2,f.x=(d.data[8]+d.data[2])/(4*f.z),f.y=(d.data[6]+d.data[9])/(4*f.z),f.w=(d.data[1]-d.data[4])/(4*f.z));break;case 1:f.y=Math.asin(-d.data[2]),1!=d.data[2]&&-1!=d.data[2]?(f.x=Math.atan2(d.data[6],d.data[10]),f.z=Math.atan2(d.data[1],d.data[0])):
(f.z=0,f.x=Math.atan2(d.data[4],d.data[5]))}b.fixed||(b.length++,b.data.length<b.length&&(d=Array(b.data.length+10),H.blit(b.data,0,d,0,b.data.length),b.data=d),b.data[b.length-1]=c);b.length;b.fixed||(b.length++,b.data.length<b.length&&(d=Array(b.data.length+10),H.blit(b.data,0,d,0,b.data.length),b.data=d),b.data[b.length-1]=f);b.length;b.fixed||(b.length++,b.data.length<b.length&&(d=Array(b.data.length+10),H.blit(b.data,0,d,0,b.data.length),b.data=d),b.data[b.length-1]=e);b.length;return b},deltaTransformVector:function(a){var b=
a.x,c=a.y;a=a.z;return new Pb(b*this.rawData.data[0]+c*this.rawData.data[4]+a*this.rawData.data[8]+this.rawData.data[3],b*this.rawData.data[1]+c*this.rawData.data[5]+a*this.rawData.data[9]+this.rawData.data[7],b*this.rawData.data[2]+c*this.rawData.data[6]+a*this.rawData.data[10]+this.rawData.data[11],0)},identity:function(){var a=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],b=new Lb;b.length=a.length;b.fixed=!0;var c;c=Array(a.length);for(var d=0,e=a.length;d<e;){var f=d++;c[f]=a[f]}b.data=c;this.rawData=b},
interpolateTo:function(a,b){for(var c=0;16>c;){var d=c++,e=this.rawData;if(!e.fixed&&(d>=e.length&&(e.length=d+1),e.data.length<e.length)){var f;f=Array(e.data.length+10);H.blit(e.data,0,f,0,e.data.length);e.data=f}e.data[d]=this.rawData.data[d]+(a.rawData.data[d]-this.rawData.data[d])*b}},invert:function(){var a=this.get_determinant(),b=1E-11<Math.abs(a);if(b){var a=1/a,c=this.rawData.data[0],d=this.rawData.data[4],e=this.rawData.data[8],f=this.rawData.data[12],g=this.rawData.data[1],h=this.rawData.data[5],
l=this.rawData.data[9],m=this.rawData.data[13],n=this.rawData.data[2],q=this.rawData.data[6],r=this.rawData.data[10],u=this.rawData.data[14],t=this.rawData.data[3],v=this.rawData.data[7],x=this.rawData.data[11],y=this.rawData.data[15],z=this.rawData;if(!z.fixed&&(0>=z.length&&(z.length=1),z.data.length<z.length)){var A;A=Array(z.data.length+10);H.blit(z.data,0,A,0,z.data.length);z.data=A}z.data[0]=a*(h*(r*y-u*x)-l*(q*y-u*v)+m*(q*x-r*v));z=this.rawData;z.fixed||(1>=z.length&&(z.length=2),z.data.length<
z.length&&(A=Array(z.data.length+10),H.blit(z.data,0,A,0,z.data.length),z.data=A));z.data[1]=-a*(g*(r*y-u*x)-l*(n*y-u*t)+m*(n*x-r*t));z=this.rawData;z.fixed||(2>=z.length&&(z.length=3),z.data.length<z.length&&(A=Array(z.data.length+10),H.blit(z.data,0,A,0,z.data.length),z.data=A));z.data[2]=a*(g*(q*y-u*v)-h*(n*y-u*t)+m*(n*v-q*t));z=this.rawData;z.fixed||(3>=z.length&&(z.length=4),z.data.length<z.length&&(A=Array(z.data.length+10),H.blit(z.data,0,A,0,z.data.length),z.data=A));z.data[3]=-a*(g*(q*x-
r*v)-h*(n*x-r*t)+l*(n*v-q*t));z=this.rawData;z.fixed||(4>=z.length&&(z.length=5),z.data.length<z.length&&(A=Array(z.data.length+10),H.blit(z.data,0,A,0,z.data.length),z.data=A));z.data[4]=-a*(d*(r*y-u*x)-e*(q*y-u*v)+f*(q*x-r*v));z=this.rawData;z.fixed||(5>=z.length&&(z.length=6),z.data.length<z.length&&(A=Array(z.data.length+10),H.blit(z.data,0,A,0,z.data.length),z.data=A));z.data[5]=a*(c*(r*y-u*x)-e*(n*y-u*t)+f*(n*x-r*t));z=this.rawData;z.fixed||(6>=z.length&&(z.length=7),z.data.length<z.length&&
(A=Array(z.data.length+10),H.blit(z.data,0,A,0,z.data.length),z.data=A));z.data[6]=-a*(c*(q*y-u*v)-d*(n*y-u*t)+f*(n*v-q*t));z=this.rawData;z.fixed||(7>=z.length&&(z.length=8),z.data.length<z.length&&(A=Array(z.data.length+10),H.blit(z.data,0,A,0,z.data.length),z.data=A));z.data[7]=a*(c*(q*x-r*v)-d*(n*x-r*t)+e*(n*v-q*t));z=this.rawData;z.fixed||(8>=z.length&&(z.length=9),z.data.length<z.length&&(A=Array(z.data.length+10),H.blit(z.data,0,A,0,z.data.length),z.data=A));z.data[8]=a*(d*(l*y-m*x)-e*(h*y-
m*v)+f*(h*x-l*v));z=this.rawData;z.fixed||(9>=z.length&&(z.length=10),z.data.length<z.length&&(A=Array(z.data.length+10),H.blit(z.data,0,A,0,z.data.length),z.data=A));z.data[9]=-a*(c*(l*y-m*x)-e*(g*y-m*t)+f*(g*x-l*t));z=this.rawData;z.fixed||(10>=z.length&&(z.length=11),z.data.length<z.length&&(A=Array(z.data.length+10),H.blit(z.data,0,A,0,z.data.length),z.data=A));z.data[10]=a*(c*(h*y-m*v)-d*(g*y-m*t)+f*(g*v-h*t));y=this.rawData;y.fixed||(11>=y.length&&(y.length=12),y.data.length<y.length&&(z=Array(y.data.length+
10),H.blit(y.data,0,z,0,y.data.length),y.data=z));y.data[11]=-a*(c*(h*x-l*v)-d*(g*x-l*t)+e*(g*v-h*t));t=this.rawData;t.fixed||(12>=t.length&&(t.length=13),t.data.length<t.length&&(v=Array(t.data.length+10),H.blit(t.data,0,v,0,t.data.length),t.data=v));t.data[12]=-a*(d*(l*u-m*r)-e*(h*u-m*q)+f*(h*r-l*q));t=this.rawData;t.fixed||(13>=t.length&&(t.length=14),t.data.length<t.length&&(v=Array(t.data.length+10),H.blit(t.data,0,v,0,t.data.length),t.data=v));t.data[13]=a*(c*(l*u-m*r)-e*(g*u-m*n)+f*(g*r-l*
n));t=this.rawData;t.fixed||(14>=t.length&&(t.length=15),t.data.length<t.length&&(v=Array(t.data.length+10),H.blit(t.data,0,v,0,t.data.length),t.data=v));t.data[14]=-a*(c*(h*u-m*q)-d*(g*u-m*n)+f*(g*q-h*n));f=this.rawData;f.fixed||(15>=f.length&&(f.length=16),f.data.length<f.length&&(m=Array(f.data.length+10),H.blit(f.data,0,m,0,f.data.length),f.data=m));f.data[15]=a*(c*(h*r-l*q)-d*(g*r-l*n)+e*(g*q-h*n))}return b},pointAt:function(a,b,c){null==b&&(b=new Pb(0,0,-1));null==c&&(c=new Pb(0,-1,0));b=b.subtract(a);
c=c.clone();var d;b.normalize();c.normalize();d=b.clone();d.scaleBy(c.dotProduct(b));c=c.subtract(d);0<c.get_length()?c.normalize():c=0!=b.x?new Pb(-b.y,b.x,0):new Pb(1,0,0);d=c.crossProduct(b);d.normalize();var e=this.rawData;if(!e.fixed&&(0>=e.length&&(e.length=1),e.data.length<e.length)){var f;f=Array(e.data.length+10);H.blit(e.data,0,f,0,e.data.length);e.data=f}e.data[0]=d.x;e=this.rawData;e.fixed||(4>=e.length&&(e.length=5),e.data.length<e.length&&(f=Array(e.data.length+10),H.blit(e.data,0,f,
0,e.data.length),e.data=f));e.data[4]=d.y;e=this.rawData;e.fixed||(8>=e.length&&(e.length=9),e.data.length<e.length&&(f=Array(e.data.length+10),H.blit(e.data,0,f,0,e.data.length),e.data=f));e.data[8]=d.z;d=this.rawData;d.fixed||(12>=d.length&&(d.length=13),d.data.length<d.length&&(e=Array(d.data.length+10),H.blit(d.data,0,e,0,d.data.length),d.data=e));d.data[12]=0;d=this.rawData;d.fixed||(1>=d.length&&(d.length=2),d.data.length<d.length&&(e=Array(d.data.length+10),H.blit(d.data,0,e,0,d.data.length),
d.data=e));d.data[1]=c.x;d=this.rawData;d.fixed||(5>=d.length&&(d.length=6),d.data.length<d.length&&(e=Array(d.data.length+10),H.blit(d.data,0,e,0,d.data.length),d.data=e));d.data[5]=c.y;d=this.rawData;d.fixed||(9>=d.length&&(d.length=10),d.data.length<d.length&&(e=Array(d.data.length+10),H.blit(d.data,0,e,0,d.data.length),d.data=e));d.data[9]=c.z;c=this.rawData;c.fixed||(13>=c.length&&(c.length=14),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[13]=
0;c=this.rawData;c.fixed||(2>=c.length&&(c.length=3),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[2]=b.x;c=this.rawData;c.fixed||(6>=c.length&&(c.length=7),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[6]=b.y;c=this.rawData;c.fixed||(10>=c.length&&(c.length=11),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[10]=b.z;b=this.rawData;
b.fixed||(14>=b.length&&(b.length=15),b.data.length<b.length&&(c=Array(b.data.length+10),H.blit(b.data,0,c,0,b.data.length),b.data=c));b.data[14]=0;b=this.rawData;b.fixed||(3>=b.length&&(b.length=4),b.data.length<b.length&&(c=Array(b.data.length+10),H.blit(b.data,0,c,0,b.data.length),b.data=c));b.data[3]=a.x;b=this.rawData;b.fixed||(7>=b.length&&(b.length=8),b.data.length<b.length&&(c=Array(b.data.length+10),H.blit(b.data,0,c,0,b.data.length),b.data=c));b.data[7]=a.y;b=this.rawData;b.fixed||(11>=
b.length&&(b.length=12),b.data.length<b.length&&(c=Array(b.data.length+10),H.blit(b.data,0,c,0,b.data.length),b.data=c));b.data[11]=a.z;a=this.rawData;a.fixed||(15>=a.length&&(a.length=16),a.data.length<a.length&&(b=Array(a.data.length+10),H.blit(a.data,0,b,0,a.data.length),a.data=b));a.data[15]=1},prepend:function(a){var b=a.rawData.data[0],c=a.rawData.data[4],d=a.rawData.data[8],e=a.rawData.data[12],f=a.rawData.data[1],g=a.rawData.data[5],h=a.rawData.data[9],l=a.rawData.data[13],m=a.rawData.data[2],
n=a.rawData.data[6],q=a.rawData.data[10],r=a.rawData.data[14],t=a.rawData.data[3],u=a.rawData.data[7],v=a.rawData.data[11];a=a.rawData.data[15];var x=this.rawData.data[0],y=this.rawData.data[4],z=this.rawData.data[8],A=this.rawData.data[12],B=this.rawData.data[1],C=this.rawData.data[5],E=this.rawData.data[9],G=this.rawData.data[13],F=this.rawData.data[2],I=this.rawData.data[6],J=this.rawData.data[10],K=this.rawData.data[14],L=this.rawData.data[3],M=this.rawData.data[7],O=this.rawData.data[11],P=this.rawData.data[15],
N=this.rawData;if(!N.fixed&&(0>=N.length&&(N.length=1),N.data.length<N.length)){var Q;Q=Array(N.data.length+10);H.blit(N.data,0,Q,0,N.data.length);N.data=Q}N.data[0]=b*x+f*y+m*z+t*A;N=this.rawData;N.fixed||(1>=N.length&&(N.length=2),N.data.length<N.length&&(Q=Array(N.data.length+10),H.blit(N.data,0,Q,0,N.data.length),N.data=Q));N.data[1]=b*B+f*C+m*E+t*G;N=this.rawData;N.fixed||(2>=N.length&&(N.length=3),N.data.length<N.length&&(Q=Array(N.data.length+10),H.blit(N.data,0,Q,0,N.data.length),N.data=Q));
N.data[2]=b*F+f*I+m*J+t*K;N=this.rawData;N.fixed||(3>=N.length&&(N.length=4),N.data.length<N.length&&(Q=Array(N.data.length+10),H.blit(N.data,0,Q,0,N.data.length),N.data=Q));N.data[3]=b*L+f*M+m*O+t*P;b=this.rawData;b.fixed||(4>=b.length&&(b.length=5),b.data.length<b.length&&(f=Array(b.data.length+10),H.blit(b.data,0,f,0,b.data.length),b.data=f));b.data[4]=c*x+g*y+n*z+u*A;b=this.rawData;b.fixed||(5>=b.length&&(b.length=6),b.data.length<b.length&&(f=Array(b.data.length+10),H.blit(b.data,0,f,0,b.data.length),
b.data=f));b.data[5]=c*B+g*C+n*E+u*G;b=this.rawData;b.fixed||(6>=b.length&&(b.length=7),b.data.length<b.length&&(f=Array(b.data.length+10),H.blit(b.data,0,f,0,b.data.length),b.data=f));b.data[6]=c*F+g*I+n*J+u*K;b=this.rawData;b.fixed||(7>=b.length&&(b.length=8),b.data.length<b.length&&(f=Array(b.data.length+10),H.blit(b.data,0,f,0,b.data.length),b.data=f));b.data[7]=c*L+g*M+n*O+u*P;c=this.rawData;c.fixed||(8>=c.length&&(c.length=9),c.data.length<c.length&&(g=Array(c.data.length+10),H.blit(c.data,
0,g,0,c.data.length),c.data=g));c.data[8]=d*x+h*y+q*z+v*A;c=this.rawData;c.fixed||(9>=c.length&&(c.length=10),c.data.length<c.length&&(g=Array(c.data.length+10),H.blit(c.data,0,g,0,c.data.length),c.data=g));c.data[9]=d*B+h*C+q*E+v*G;c=this.rawData;c.fixed||(10>=c.length&&(c.length=11),c.data.length<c.length&&(g=Array(c.data.length+10),H.blit(c.data,0,g,0,c.data.length),c.data=g));c.data[10]=d*F+h*I+q*J+v*K;c=this.rawData;c.fixed||(11>=c.length&&(c.length=12),c.data.length<c.length&&(g=Array(c.data.length+
10),H.blit(c.data,0,g,0,c.data.length),c.data=g));c.data[11]=d*L+h*M+q*O+v*P;d=this.rawData;d.fixed||(12>=d.length&&(d.length=13),d.data.length<d.length&&(h=Array(d.data.length+10),H.blit(d.data,0,h,0,d.data.length),d.data=h));d.data[12]=e*x+l*y+r*z+a*A;x=this.rawData;x.fixed||(13>=x.length&&(x.length=14),x.data.length<x.length&&(y=Array(x.data.length+10),H.blit(x.data,0,y,0,x.data.length),x.data=y));x.data[13]=e*B+l*C+r*E+a*G;B=this.rawData;B.fixed||(14>=B.length&&(B.length=15),B.data.length<B.length&&
(C=Array(B.data.length+10),H.blit(B.data,0,C,0,B.data.length),B.data=C));B.data[14]=e*F+l*I+r*J+a*K;F=this.rawData;F.fixed||(15>=F.length&&(F.length=16),F.data.length<F.length&&(I=Array(F.data.length+10),H.blit(F.data,0,I,0,F.data.length),F.data=I));F.data[15]=e*L+l*M+r*O+a*P},prependRotation:function(a,b,c){a=Oc.__getAxisRotation(b.x,b.y,b.z,a);null!=c&&a.appendTranslation(c.x,c.y,c.z);this.prepend(a)},prependScale:function(a,b,c){this.prepend(new Oc(function(d){d=[a,0,0,0,0,b,0,0,0,0,c,0,0,0,0,
1];var e=new Lb;e.length=d.length;e.fixed=!0;var f;f=Array(d.length);for(var g=0,h=d.length;g<h;){var l=g++;f[l]=d[l]}e.data=f;return e}(this)))},prependTranslation:function(a,b,c){var d=new Oc;d.set_position(new Pb(a,b,c));this.prepend(d)},recompose:function(a,b){if(3>a.length||0==a.data[2].x||0==a.data[2].y||0==a.data[2].z)return!1;null==b&&(b=1);this.identity();var c=[];c[0]=c[1]=c[2]=a.data[2].x;c[4]=c[5]=c[6]=a.data[2].y;c[8]=c[9]=c[10]=a.data[2].z;if(null!=b)switch(b){case 1:var d=Math.cos(a.data[1].x),
e=Math.cos(a.data[1].y),f=Math.cos(a.data[1].z),g=Math.sin(a.data[1].x),h=Math.sin(a.data[1].y),l=Math.sin(a.data[1].z),m=this.rawData;if(!m.fixed&&(0>=m.length&&(m.length=1),m.data.length<m.length)){var n;n=Array(m.data.length+10);H.blit(m.data,0,n,0,m.data.length);m.data=n}m.data[0]=e*f*c[0];m=this.rawData;m.fixed||(1>=m.length&&(m.length=2),m.data.length<m.length&&(n=Array(m.data.length+10),H.blit(m.data,0,n,0,m.data.length),m.data=n));m.data[1]=e*l*c[1];m=this.rawData;m.fixed||(2>=m.length&&(m.length=
3),m.data.length<m.length&&(n=Array(m.data.length+10),H.blit(m.data,0,n,0,m.data.length),m.data=n));m.data[2]=-h*c[2];m=this.rawData;m.fixed||(3>=m.length&&(m.length=4),m.data.length<m.length&&(n=Array(m.data.length+10),H.blit(m.data,0,n,0,m.data.length),m.data=n));m.data[3]=0;m=this.rawData;m.fixed||(4>=m.length&&(m.length=5),m.data.length<m.length&&(n=Array(m.data.length+10),H.blit(m.data,0,n,0,m.data.length),m.data=n));m.data[4]=(g*h*f-d*l)*c[4];m=this.rawData;m.fixed||(5>=m.length&&(m.length=
6),m.data.length<m.length&&(n=Array(m.data.length+10),H.blit(m.data,0,n,0,m.data.length),m.data=n));m.data[5]=(g*h*l+d*f)*c[5];m=this.rawData;m.fixed||(6>=m.length&&(m.length=7),m.data.length<m.length&&(n=Array(m.data.length+10),H.blit(m.data,0,n,0,m.data.length),m.data=n));m.data[6]=g*e*c[6];m=this.rawData;m.fixed||(7>=m.length&&(m.length=8),m.data.length<m.length&&(n=Array(m.data.length+10),H.blit(m.data,0,n,0,m.data.length),m.data=n));m.data[7]=0;m=this.rawData;m.fixed||(8>=m.length&&(m.length=
9),m.data.length<m.length&&(n=Array(m.data.length+10),H.blit(m.data,0,n,0,m.data.length),m.data=n));m.data[8]=(d*h*f+g*l)*c[8];m=this.rawData;m.fixed||(9>=m.length&&(m.length=10),m.data.length<m.length&&(n=Array(m.data.length+10),H.blit(m.data,0,n,0,m.data.length),m.data=n));m.data[9]=(d*h*l-g*f)*c[9];f=this.rawData;f.fixed||(10>=f.length&&(f.length=11),f.data.length<f.length&&(g=Array(f.data.length+10),H.blit(f.data,0,g,0,f.data.length),f.data=g));f.data[10]=d*e*c[10];c=this.rawData;c.fixed||(11>=
c.length&&(c.length=12),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[11]=0;c=this.rawData;c.fixed||(12>=c.length&&(c.length=13),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[12]=a.data[0].x;c=this.rawData;c.fixed||(13>=c.length&&(c.length=14),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[13]=a.data[0].y;c=this.rawData;c.fixed||
(14>=c.length&&(c.length=15),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[14]=a.data[0].z;c=this.rawData;c.fixed||(15>=c.length&&(c.length=16),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d));c.data[15]=1;break;default:d=a.data[1].x,e=a.data[1].y,f=a.data[1].z,g=a.data[1].w,ua.enumEq(b,0)&&(d*=Math.sin(g/2),e*=Math.sin(g/2),f*=Math.sin(g/2),g=Math.cos(g/2)),h=this.rawData,h.fixed||(0>=h.length&&
(h.length=1),h.data.length<h.length&&(l=Array(h.data.length+10),H.blit(h.data,0,l,0,h.data.length),h.data=l)),h.data[0]=(1-2*e*e-2*f*f)*c[0],h=this.rawData,h.fixed||(1>=h.length&&(h.length=2),h.data.length<h.length&&(l=Array(h.data.length+10),H.blit(h.data,0,l,0,h.data.length),h.data=l)),h.data[1]=(2*d*e+2*g*f)*c[1],h=this.rawData,h.fixed||(2>=h.length&&(h.length=3),h.data.length<h.length&&(l=Array(h.data.length+10),H.blit(h.data,0,l,0,h.data.length),h.data=l)),h.data[2]=(2*d*f-2*g*e)*c[2],h=this.rawData,
h.fixed||(3>=h.length&&(h.length=4),h.data.length<h.length&&(l=Array(h.data.length+10),H.blit(h.data,0,l,0,h.data.length),h.data=l)),h.data[3]=0,h=this.rawData,h.fixed||(4>=h.length&&(h.length=5),h.data.length<h.length&&(l=Array(h.data.length+10),H.blit(h.data,0,l,0,h.data.length),h.data=l)),h.data[4]=(2*d*e-2*g*f)*c[4],h=this.rawData,h.fixed||(5>=h.length&&(h.length=6),h.data.length<h.length&&(l=Array(h.data.length+10),H.blit(h.data,0,l,0,h.data.length),h.data=l)),h.data[5]=(1-2*d*d-2*f*f)*c[5],
h=this.rawData,h.fixed||(6>=h.length&&(h.length=7),h.data.length<h.length&&(l=Array(h.data.length+10),H.blit(h.data,0,l,0,h.data.length),h.data=l)),h.data[6]=(2*e*f+2*g*d)*c[6],h=this.rawData,h.fixed||(7>=h.length&&(h.length=8),h.data.length<h.length&&(l=Array(h.data.length+10),H.blit(h.data,0,l,0,h.data.length),h.data=l)),h.data[7]=0,h=this.rawData,h.fixed||(8>=h.length&&(h.length=9),h.data.length<h.length&&(l=Array(h.data.length+10),H.blit(h.data,0,l,0,h.data.length),h.data=l)),h.data[8]=(2*d*f+
2*g*e)*c[8],h=this.rawData,h.fixed||(9>=h.length&&(h.length=10),h.data.length<h.length&&(l=Array(h.data.length+10),H.blit(h.data,0,l,0,h.data.length),h.data=l)),h.data[9]=(2*e*f-2*g*d)*c[9],f=this.rawData,f.fixed||(10>=f.length&&(f.length=11),f.data.length<f.length&&(g=Array(f.data.length+10),H.blit(f.data,0,g,0,f.data.length),f.data=g)),f.data[10]=(1-2*d*d-2*e*e)*c[10],c=this.rawData,c.fixed||(11>=c.length&&(c.length=12),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),
c.data=d)),c.data[11]=0,c=this.rawData,c.fixed||(12>=c.length&&(c.length=13),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d)),c.data[12]=a.data[0].x,c=this.rawData,c.fixed||(13>=c.length&&(c.length=14),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d)),c.data[13]=a.data[0].y,c=this.rawData,c.fixed||(14>=c.length&&(c.length=15),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),
c.data=d)),c.data[14]=a.data[0].z,c=this.rawData,c.fixed||(15>=c.length&&(c.length=16),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d)),c.data[15]=1}else d=a.data[1].x,e=a.data[1].y,f=a.data[1].z,g=a.data[1].w,ua.enumEq(b,0)&&(d*=Math.sin(g/2),e*=Math.sin(g/2),f*=Math.sin(g/2),g=Math.cos(g/2)),h=this.rawData,h.fixed||(0>=h.length&&(h.length=1),h.data.length<h.length&&(l=Array(h.data.length+10),H.blit(h.data,0,l,0,h.data.length),h.data=l)),h.data[0]=
(1-2*e*e-2*f*f)*c[0],h=this.rawData,h.fixed||(1>=h.length&&(h.length=2),h.data.length<h.length&&(l=Array(h.data.length+10),H.blit(h.data,0,l,0,h.data.length),h.data=l)),h.data[1]=(2*d*e+2*g*f)*c[1],h=this.rawData,h.fixed||(2>=h.length&&(h.length=3),h.data.length<h.length&&(l=Array(h.data.length+10),H.blit(h.data,0,l,0,h.data.length),h.data=l)),h.data[2]=(2*d*f-2*g*e)*c[2],h=this.rawData,h.fixed||(3>=h.length&&(h.length=4),h.data.length<h.length&&(l=Array(h.data.length+10),H.blit(h.data,0,l,0,h.data.length),
h.data=l)),h.data[3]=0,h=this.rawData,h.fixed||(4>=h.length&&(h.length=5),h.data.length<h.length&&(l=Array(h.data.length+10),H.blit(h.data,0,l,0,h.data.length),h.data=l)),h.data[4]=(2*d*e-2*g*f)*c[4],h=this.rawData,h.fixed||(5>=h.length&&(h.length=6),h.data.length<h.length&&(l=Array(h.data.length+10),H.blit(h.data,0,l,0,h.data.length),h.data=l)),h.data[5]=(1-2*d*d-2*f*f)*c[5],h=this.rawData,h.fixed||(6>=h.length&&(h.length=7),h.data.length<h.length&&(l=Array(h.data.length+10),H.blit(h.data,0,l,0,
h.data.length),h.data=l)),h.data[6]=(2*e*f+2*g*d)*c[6],h=this.rawData,h.fixed||(7>=h.length&&(h.length=8),h.data.length<h.length&&(l=Array(h.data.length+10),H.blit(h.data,0,l,0,h.data.length),h.data=l)),h.data[7]=0,h=this.rawData,h.fixed||(8>=h.length&&(h.length=9),h.data.length<h.length&&(l=Array(h.data.length+10),H.blit(h.data,0,l,0,h.data.length),h.data=l)),h.data[8]=(2*d*f+2*g*e)*c[8],h=this.rawData,h.fixed||(9>=h.length&&(h.length=10),h.data.length<h.length&&(l=Array(h.data.length+10),H.blit(h.data,
0,l,0,h.data.length),h.data=l)),h.data[9]=(2*e*f-2*g*d)*c[9],f=this.rawData,f.fixed||(10>=f.length&&(f.length=11),f.data.length<f.length&&(g=Array(f.data.length+10),H.blit(f.data,0,g,0,f.data.length),f.data=g)),f.data[10]=(1-2*d*d-2*e*e)*c[10],c=this.rawData,c.fixed||(11>=c.length&&(c.length=12),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d)),c.data[11]=0,c=this.rawData,c.fixed||(12>=c.length&&(c.length=13),c.data.length<c.length&&(d=Array(c.data.length+
10),H.blit(c.data,0,d,0,c.data.length),c.data=d)),c.data[12]=a.data[0].x,c=this.rawData,c.fixed||(13>=c.length&&(c.length=14),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d)),c.data[13]=a.data[0].y,c=this.rawData,c.fixed||(14>=c.length&&(c.length=15),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d)),c.data[14]=a.data[0].z,c=this.rawData,c.fixed||(15>=c.length&&(c.length=16),c.data.length<c.length&&(d=Array(c.data.length+
10),H.blit(c.data,0,d,0,c.data.length),c.data=d)),c.data[15]=1;0==a.data[2].x&&(c=this.rawData,c.fixed||(0>=c.length&&(c.length=1),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d)),c.data[0]=1E-15);0==a.data[2].y&&(c=this.rawData,c.fixed||(5>=c.length&&(c.length=6),c.data.length<c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d)),c.data[5]=1E-15);0==a.data[2].z&&(c=this.rawData,c.fixed||(10>=c.length&&(c.length=11),c.data.length<
c.length&&(d=Array(c.data.length+10),H.blit(c.data,0,d,0,c.data.length),c.data=d)),c.data[10]=1E-15);return!(0==a.data[2].x||0==a.data[2].y||0==a.data[2].y)},transformVector:function(a){var b=a.x,c=a.y;a=a.z;return new Pb(b*this.rawData.data[0]+c*this.rawData.data[4]+a*this.rawData.data[8]+this.rawData.data[12],b*this.rawData.data[1]+c*this.rawData.data[5]+a*this.rawData.data[9]+this.rawData.data[13],b*this.rawData.data[2]+c*this.rawData.data[6]+a*this.rawData.data[10]+this.rawData.data[14],b*this.rawData.data[3]+
c*this.rawData.data[7]+a*this.rawData.data[11]+this.rawData.data[15])},transformVectors:function(a,b){for(var c=0,d,e,f;c+3<=a.length;){d=a.data[c];e=a.data[c+1];f=a.data[c+2];if(!b.fixed&&(c>=b.length&&(b.length=c+1),b.data.length<b.length)){var g;g=Array(b.data.length+10);H.blit(b.data,0,g,0,b.data.length);b.data=g}b.data[c]=d*this.rawData.data[0]+e*this.rawData.data[4]+f*this.rawData.data[8]+this.rawData.data[12];g=c+1;if(!b.fixed&&(g>=b.length&&(b.length=g+1),b.data.length<b.length)){var h;h=
Array(b.data.length+10);H.blit(b.data,0,h,0,b.data.length);b.data=h}b.data[g]=d*this.rawData.data[1]+e*this.rawData.data[5]+f*this.rawData.data[9]+this.rawData.data[13];g=c+2;b.fixed||(g>=b.length&&(b.length=g+1),b.data.length<b.length&&(h=Array(b.data.length+10),H.blit(b.data,0,h,0,b.data.length),b.data=h));b.data[g]=d*this.rawData.data[2]+e*this.rawData.data[6]+f*this.rawData.data[10]+this.rawData.data[14];c+=3}},transpose:function(){var a=this.rawData,b=new Lb;b.length=a.length;b.fixed=a.fixed;
b.data=Array(a.length);H.blit(a.data,0,b.data,0,a.length);a=this.rawData;if(!a.fixed&&(1>=a.length&&(a.length=2),a.data.length<a.length)){var c;c=Array(a.data.length+10);H.blit(a.data,0,c,0,a.data.length);a.data=c}a.data[1]=b.data[4];a=this.rawData;a.fixed||(2>=a.length&&(a.length=3),a.data.length<a.length&&(c=Array(a.data.length+10),H.blit(a.data,0,c,0,a.data.length),a.data=c));a.data[2]=b.data[8];a=this.rawData;a.fixed||(3>=a.length&&(a.length=4),a.data.length<a.length&&(c=Array(a.data.length+10),
H.blit(a.data,0,c,0,a.data.length),a.data=c));a.data[3]=b.data[12];a=this.rawData;a.fixed||(4>=a.length&&(a.length=5),a.data.length<a.length&&(c=Array(a.data.length+10),H.blit(a.data,0,c,0,a.data.length),a.data=c));a.data[4]=b.data[1];a=this.rawData;a.fixed||(6>=a.length&&(a.length=7),a.data.length<a.length&&(c=Array(a.data.length+10),H.blit(a.data,0,c,0,a.data.length),a.data=c));a.data[6]=b.data[9];a=this.rawData;a.fixed||(7>=a.length&&(a.length=8),a.data.length<a.length&&(c=Array(a.data.length+
10),H.blit(a.data,0,c,0,a.data.length),a.data=c));a.data[7]=b.data[13];a=this.rawData;a.fixed||(8>=a.length&&(a.length=9),a.data.length<a.length&&(c=Array(a.data.length+10),H.blit(a.data,0,c,0,a.data.length),a.data=c));a.data[8]=b.data[2];a=this.rawData;a.fixed||(9>=a.length&&(a.length=10),a.data.length<a.length&&(c=Array(a.data.length+10),H.blit(a.data,0,c,0,a.data.length),a.data=c));a.data[9]=b.data[6];a=this.rawData;a.fixed||(11>=a.length&&(a.length=12),a.data.length<a.length&&(c=Array(a.data.length+
10),H.blit(a.data,0,c,0,a.data.length),a.data=c));a.data[11]=b.data[14];a=this.rawData;a.fixed||(12>=a.length&&(a.length=13),a.data.length<a.length&&(c=Array(a.data.length+10),H.blit(a.data,0,c,0,a.data.length),a.data=c));a.data[12]=b.data[3];a=this.rawData;a.fixed||(13>=a.length&&(a.length=14),a.data.length<a.length&&(c=Array(a.data.length+10),H.blit(a.data,0,c,0,a.data.length),a.data=c));a.data[13]=b.data[7];a=this.rawData;a.fixed||(14>=a.length&&(a.length=15),a.data.length<a.length&&(c=Array(a.data.length+
10),H.blit(a.data,0,c,0,a.data.length),a.data=c));a.data[14]=b.data[11]},get_determinant:function(){return(this.rawData.data[0]*this.rawData.data[5]-this.rawData.data[4]*this.rawData.data[1])*(this.rawData.data[10]*this.rawData.data[15]-this.rawData.data[14]*this.rawData.data[11])-(this.rawData.data[0]*this.rawData.data[9]-this.rawData.data[8]*this.rawData.data[1])*(this.rawData.data[6]*this.rawData.data[15]-this.rawData.data[14]*this.rawData.data[7])+(this.rawData.data[0]*this.rawData.data[13]-this.rawData.data[12]*
this.rawData.data[1])*(this.rawData.data[6]*this.rawData.data[11]-this.rawData.data[10]*this.rawData.data[7])+(this.rawData.data[4]*this.rawData.data[9]-this.rawData.data[8]*this.rawData.data[5])*(this.rawData.data[2]*this.rawData.data[15]-this.rawData.data[14]*this.rawData.data[3])-(this.rawData.data[4]*this.rawData.data[13]-this.rawData.data[12]*this.rawData.data[5])*(this.rawData.data[2]*this.rawData.data[11]-this.rawData.data[10]*this.rawData.data[3])+(this.rawData.data[8]*this.rawData.data[13]-
this.rawData.data[12]*this.rawData.data[9])*(this.rawData.data[2]*this.rawData.data[7]-this.rawData.data[6]*this.rawData.data[3])},get_position:function(){return new Pb(this.rawData.data[12],this.rawData.data[13],this.rawData.data[14])},set_position:function(a){var b=this.rawData;if(!b.fixed&&(12>=b.length&&(b.length=13),b.data.length<b.length)){var c;c=Array(b.data.length+10);H.blit(b.data,0,c,0,b.data.length);b.data=c}b.data[12]=a.x;b=this.rawData;b.fixed||(13>=b.length&&(b.length=14),b.data.length<
b.length&&(c=Array(b.data.length+10),H.blit(b.data,0,c,0,b.data.length),b.data=c));b.data[13]=a.y;b=this.rawData;b.fixed||(14>=b.length&&(b.length=15),b.data.length<b.length&&(c=Array(b.data.length+10),H.blit(b.data,0,c,0,b.data.length),b.data=c));b.data[14]=a.z;return a},__class__:Oc,__properties__:{set_position:"set_position",get_position:"get_position",get_determinant:"get_determinant"}};var Wh={};n["openfl.geom._Orientation3D.Orientation3D_Impl_"]=Wh;Wh.__name__=["openfl","geom","_Orientation3D",
"Orientation3D_Impl_"];Wh.fromString=function(a){switch(a){case "axisAngle":return 0;case "eulerAngles":return 1;case "quaternion":return 2;default:return null}};Wh.toString=function(a){switch(a){case 0:return"axisAngle";case 1:return"eulerAngles";case 2:return"quaternion";default:return null}};var ji=function(a){this.__colorTransform=new yd;this.concatenatedColorTransform=new yd;this.pixelBounds=new ha;this.__displayObject=a;this.__hasMatrix=!0};n["openfl.geom.Transform"]=ji;ji.__name__=["openfl",
"geom","Transform"];ji.prototype={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},get_matrix:function(){return this.__hasMatrix?this.__displayObject.__transform.clone():null},get_concatenatedMatrix:function(){return this.__hasMatrix?this.__displayObject.__getWorldTransform().clone():
null},set_matrix:function(a){if(null==a)return this.__hasMatrix=!1,null;this.__hasMatrix=!0;this.__hasMatrix3D=!1;if(null!=this.__displayObject){var b=180/Math.PI*Math.atan2(a.d,a.c)-90;b!=this.__displayObject.__rotation&&(this.__displayObject.__rotation=b,b*=Math.PI/180,this.__displayObject.__rotationSine=Math.sin(b),this.__displayObject.__rotationCosine=Math.cos(b));this.__displayObject.__transform.copyFrom(a);this.__displayObject.__setTransformDirty()}return a},get_matrix3D:function(){if(this.__hasMatrix3D){var a=
this.__displayObject.__transform,a=[a.a,a.b,0,0,a.c,a.d,0,0,0,0,1,0,a.tx,a.ty,0,1],b=new Lb;b.length=a.length;b.fixed=!0;var c;c=Array(a.length);for(var d=0,e=a.length;d<e;){var f=d++;c[f]=a[f]}b.data=c;return new Oc(b)}return null},set_matrix3D:function(a){if(null==a)return this.__hasMatrix3D=!1,null;this.__hasMatrix=!1;this.__hasMatrix3D=!0;if(null!=this.__displayObject){var b=180/Math.PI*Math.atan2(a.rawData.data[5],a.rawData.data[4])-90;b!=this.__displayObject.__rotation&&(this.__displayObject.__rotation=
b,b*=Math.PI/180,this.__displayObject.__rotationSine=Math.sin(b),this.__displayObject.__rotationCosine=Math.cos(b));this.__displayObject.__transform.a=a.rawData.data[0];this.__displayObject.__transform.b=a.rawData.data[1];this.__displayObject.__transform.c=a.rawData.data[5];this.__displayObject.__transform.d=a.rawData.data[6];this.__displayObject.__transform.tx=a.rawData.data[12];this.__displayObject.__transform.ty=a.rawData.data[13];this.__displayObject.__setTransformDirty()}return a},__class__:ji,
__properties__:{set_matrix3D:"set_matrix3D",get_matrix3D:"get_matrix3D",set_matrix:"set_matrix",get_matrix:"get_matrix",get_concatenatedMatrix:"get_concatenatedMatrix",set_colorTransform:"set_colorTransform",get_colorTransform:"get_colorTransform"}};var Pb=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this.w=d;this.x=a;this.y=b;this.z=c};n["openfl.geom.Vector3D"]=Pb;Pb.__name__=["openfl","geom","Vector3D"];Pb.__properties__={get_Z_AXIS:"get_Z_AXIS",get_Y_AXIS:"get_Y_AXIS",
get_X_AXIS:"get_X_AXIS"};Pb.X_AXIS=null;Pb.Y_AXIS=null;Pb.Z_AXIS=null;Pb.angleBetween=function(a,b){var c=a.get_length(),d=b.get_length(),e=a.dotProduct(b);0!=c&&(e/=c);0!=d&&(e/=d);return Math.acos(e)};Pb.distance=function(a,b){var c=b.x-a.x,d=b.y-a.y,e=b.z-a.z;return Math.sqrt(c*c+d*d+e*e)};Pb.get_X_AXIS=function(){return new Pb(1,0,0)};Pb.get_Y_AXIS=function(){return new Pb(0,1,0)};Pb.get_Z_AXIS=function(){return new Pb(0,0,1)};Pb.prototype={add:function(a){return new Pb(this.x+a.x,this.y+a.y,
this.z+a.z)},clone:function(){return new Pb(this.x,this.y,this.z,this.w)},copyFrom:function(a){this.x=a.x;this.y=a.y;this.z=a.z},crossProduct:function(a){return new Pb(this.y*a.z-this.z*a.y,this.z*a.x-this.x*a.z,this.x*a.y-this.y*a.x,1)},decrementBy:function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z},dotProduct:function(a){return this.x*a.x+this.y*a.y+this.z*a.z},equals:function(a,b){null==b&&(b=!1);return this.x==a.x&&this.y==a.y&&this.z==a.z&&(!b||this.w==a.w)},incrementBy:function(a){this.x+=a.x;
this.y+=a.y;this.z+=a.z},nearEquals:function(a,b,c){null==c&&(c=!1);return Math.abs(this.x-a.x)<b&&Math.abs(this.y-a.y)<b&&Math.abs(this.z-a.z)<b&&(!c||Math.abs(this.w-a.w)<b)},negate:function(){this.x*=-1;this.y*=-1;this.z*=-1},normalize:function(){var a=this.get_length();0!=a&&(this.x/=a,this.y/=a,this.z/=a);return a},project:function(){this.x/=this.w;this.y/=this.w;this.z/=this.w},scaleBy:function(a){this.x*=a;this.y*=a;this.z*=a},setTo:function(a,b,c){this.x=a;this.y=b;this.z=c},subtract:function(a){return new Pb(this.x-
a.x,this.y-a.y,this.z-a.z)},toString:function(){return"Vector3D("+this.x+", "+this.y+", "+this.z+")"},get_length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},get_lengthSquared:function(){return this.x*this.x+this.y*this.y+this.z*this.z},__class__:Pb,__properties__:{get_lengthSquared:"get_lengthSquared",get_length:"get_length"}};var vm=function(){};n["openfl.media.ID3Info"]=vm;vm.__name__=["openfl","media","ID3Info"];vm.prototype={__class__:vm};var Kd=function(a,b){Va.call(this,
this);this.bytesTotal=this.bytesLoaded=0;this.id3=null;this.isBuffering=!1;this.url=null;null!=a&&this.load(a,b)};n["openfl.media.Sound"]=Kd;Kd.__name__=["openfl","media","Sound"];Kd.fromAudioBuffer=function(a){var b=new Kd;b.__buffer=a;return b};Kd.fromFile=function(a){return Kd.fromAudioBuffer(rf.fromFile(a))};Kd.__super__=Va;Kd.prototype=L(Va.prototype,{close:function(){Kd.__registeredSounds.exists(this.__soundID)&&createjs.Sound.removeSound(this.__soundID)},load:function(a,b){this.url=a.url;this.__soundID=
wg.withoutExtension(a.url);Kd.__registeredSounds.exists(this.__soundID)?this.dispatchEvent(new fa("complete")):(Kd.__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){ka.notImplemented("Sound.loadCompressedDataFromByteArray")},loadPCMFromByteArray:function(a,
b,c,d,e){ka.notImplemented("Sound.loadPCMFromByteArray")},play:function(a,b,c){null==b&&(b=0);null==a&&(a=0);null==c&&(c=new ze(1,0));var d=c.pan;0==d&&(d=-1E-7);a=1<b?createjs.Sound.play(this.__soundID,"any",0,a|0,b-1,c.volume,d):createjs.Sound.play(this.__soundID,"any",0,a|0,0,c.volume,d);return new zk(a)},get_id3:function(){return new vm},get_length:function(){return 0},AudioBuffer_onURLLoad:function(a){null==a?this.dispatchEvent(new $e("ioError")):(this.__buffer=a,this.dispatchEvent(new fa("complete")))},
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 fa("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 $e("ioError")))},
__class__:Kd,__properties__:{get_length:"get_length",get_id3:"get_id3"}});var zk=function(a){Va.call(this,this);this.rightPeak=this.leftPeak=1;null!=a&&(this.__soundInstance=a,this.__soundInstance.addEventListener("complete",K(this,this.source_onComplete)),this.__isValid=!0)};n["openfl.media.SoundChannel"]=zk;zk.__name__=["openfl","media","SoundChannel"];zk.__super__=Va;zk.prototype=L(Va.prototype,{stop:function(){this.__isValid&&this.__soundInstance.stop()},__dispose:function(){this.__isValid&&(this.__soundInstance.stop(),
this.__soundInstance=null,this.__isValid=!1)},get_position:function(){return this.__isValid?this.__soundInstance.getPosition():0},set_position:function(a){if(!this.__isValid)return 0;this.__soundInstance.setPosition(a|0);return this.__soundInstance.getPosition()},get_soundTransform:function(){return this.__isValid?new ze(this.__soundInstance.getVolume(),this.__soundInstance.getPan()):new ze},set_soundTransform:function(a){if(!this.__isValid)return a;this.__soundInstance.setVolume(a.volume);this.__soundInstance.setPan(a.pan);
return a},soundInstance_onComplete:function(a){this.dispatchEvent(new fa("soundComplete"))},source_onComplete:function(){this.__dispose();this.dispatchEvent(new fa("soundComplete"))},__class__:zk,__properties__:{set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform",set_position:"set_position",get_position:"get_position"}});var yn=function(a,b){null==b&&(b=!1);null==a&&(a=1E3);this.bufferTime=a;this.checkPolicyFile=b};n["openfl.media.SoundLoaderContext"]=yn;yn.__name__=["openfl",
"media","SoundLoaderContext"];yn.prototype={__class__:yn};var Ak=function(){Va.call(this)};n["openfl.net.NetConnection"]=Ak;Ak.__name__=["openfl","net","NetConnection"];Ak.__super__=Va;Ak.prototype=L(Va.prototype,{connect:function(a,b,c,d,e,f){if(null!=a)throw new F('Error: Can only connect in "HTTP streaming" mode');this.dispatchEvent(new Sg("netStatus",!1,!0,{code:"connectSuccess"}))},__class__:Ak});var gc=function(){Va.call(this);this.client=this;this.objectEncoding=3};n["openfl.net.SharedObject"]=
gc;gc.__name__=["openfl","net","SharedObject"];gc.__sharedObjects=null;gc.getLocal=function(a,b,c){null==b&&(b=window.location.href);null==gc.__sharedObjects&&(gc.__sharedObjects=new ma,ka.application.onExit.add(gc.application_onExit));c=b+"/"+a;if(!gc.__sharedObjects.exists(c)){var d=new gc;d.data={};d.__localPath=b;d.__name=a;var e=null;try{var f=xg.getLocalStorage();null!=f&&(e=f.getItem(b+":"+a))}catch(g){Ia.lastException=g,g instanceof F&&(g=g.val)}if(null!=e&&""!=e)try{var h=new Jd(e);h.setResolver({resolveEnum:ua.resolveEnum,
resolveClass:gc.__resolveClass});d.data=h.unserialize()}catch(l){Ia.lastException=l,l instanceof F&&(l=l.val)}gc.__sharedObjects.set(c,d)}return gc.__sharedObjects.get(c)};gc.getRemote=function(a,b,c,d){ka.notImplemented("SharedObject.getRemote");return null};gc.__mkdir=function(a){};gc.__resolveClass=function(a){return null!=a?(Ca.startsWith(a,"neash.")&&(a=Ca.replace(a,"neash.","openfl.")),Ca.startsWith(a,"native.")&&(a=Ca.replace(a,"native.","openfl.")),Ca.startsWith(a,"flash.")&&(a=Ca.replace(a,
"flash.","openfl.")),Ca.startsWith(a,"openfl._v2.")&&(a=Ca.replace(a,"openfl._v2.","openfl.")),Ca.startsWith(a,"openfl._legacy.")&&(a=Ca.replace(a,"openfl._legacy.","openfl.")),ua.resolveClass(a)):null};gc.application_onExit=function(a){for(a=gc.__sharedObjects.iterator();a.hasNext();)a.next().flush()};gc.__super__=Va;gc.prototype=L(Va.prototype,{clear:function(){this.data={};try{var a=xg.getLocalStorage();null!=a&&a.removeItem(this.__localPath+":"+this.__name)}catch(b){Ia.lastException=b,b instanceof
F&&(b=b.val)}},close:function(){},connect:function(a,b){ka.notImplemented("SharedObject.connect")},flush:function(a){if(0==O.fields(this.data).length)return 0;a=Yd.run(this.data);try{var b=xg.getLocalStorage();null!=b&&(b.removeItem(this.__localPath+":"+this.__name),b.setItem(this.__localPath+":"+this.__name,a))}catch(c){return Ia.lastException=c,c instanceof F&&(c=c.val),1}return 0},send:function(a){ka.notImplemented("SharedObject.send")},setDirty:function(a){},setProperty:function(a,b){null!=this.data&&
(this.data[a]=b)},get_size:function(){try{var a=Yd.run(this.data);return Ya.ofString(a).length}catch(b){return Ia.lastException=b,b instanceof F&&(b=b.val),0}},__class__:gc,__properties__:{get_size:"get_size"}});var Bk={};n["openfl.net._SharedObjectFlushStatus.SharedObjectFlushStatus_Impl_"]=Bk;Bk.__name__=["openfl","net","_SharedObjectFlushStatus","SharedObjectFlushStatus_Impl_"];Bk.fromString=function(a){switch(a){case "flushed":return 0;case "pending":return 1;default:return null}};Bk.toString=
function(a){switch(a){case 0:return"flushed";case 1:return"pending";default:return null}};var ng=function(a){Va.call(this);this.bytesTotal=this.bytesLoaded=0;this.set_dataFormat(1);null!=a&&this.load(a)};n["openfl.net.URLLoader"]=ng;ng.__name__=["openfl","net","URLLoader"];ng.__super__=Va;ng.prototype=L(Va.prototype,{close:function(){},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){Ia.lastException=d,d instanceof F&&(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(q.__instanceof(c,kd))switch(this.dataFormat){case 0:f=q.__cast(c,dj);break;default:f=c.readUTFBytes(c.length)}else if(q.__instanceof(c,Si))for(var g=0,h=O.fields(c);g<h.length;){var l=h[g];++g;0!=f.length&&(f+="&");f+=encodeURIComponent(l)+"="+Ca.urlEncode(O.field(c,l))}else null!=
c&&(f=c.toString());try{if("GET"==b&&null!=f&&""!=f){var m=1>=a.split("?").length;e.open(b,a+(m?"?":"&")+u.string(f),!0);f=""}else e.open(b,a,!0)}catch(n){Ia.lastException=n;n instanceof F&&(n=n.val);this.onError(n.toString());return}switch(this.dataFormat){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){case 0:this.data=
kb.fromArrayBuffer(a);break;default:this.data=u.string(a)}a=new fa("complete");a.currentTarget=this;this.dispatchEvent(a)},onError:function(a){var b=new $e("ioError");b.text=a;b.currentTarget=this;this.dispatchEvent(b)},onOpen:function(){var a=new fa("open");a.currentTarget=this;this.dispatchEvent(a)},onProgress:function(a){var b=new eg("progress");b.currentTarget=this;b.bytesLoaded=a.loaded;b.bytesTotal=a.total;this.dispatchEvent(b)},onSecurityError:function(a){var b=new Tg("securityError");b.text=
a;b.currentTarget=this;this.dispatchEvent(b)},onStatus:function(a){a=new dg("httpStatus",!1,!1,a);a.currentTarget=this;this.dispatchEvent(a)},set_dataFormat:function(a){0!=a||O.hasField(window,"ArrayBuffer")?this.dataFormat=a:this.dataFormat=1;return this.dataFormat},__class__:ng,__properties__:{set_dataFormat:"set_dataFormat"}});var Xh={};n["openfl.net._URLLoaderDataFormat.URLLoaderDataFormat_Impl_"]=Xh;Xh.__name__=["openfl","net","_URLLoaderDataFormat","URLLoaderDataFormat_Impl_"];Xh.fromString=
function(a){switch(a){case "binary":return 0;case "text":return 1;case "variables":return 2;default:return null}};Xh.toString=function(a){switch(a){case 0:return"binary";case 1:return"text";case 2:return"variables";default:return null}};var ne=function(a){null!=a&&(this.url=a);this.requestHeaders=[];this.method=Vd.toString(1);this.contentType=null};n["openfl.net.URLRequest"]=ne;ne.__name__=["openfl","net","URLRequest"];ne.prototype={formatRequestHeaders:function(){var a=this.requestHeaders;null==
a&&(a=[]);if(1==Vd.fromString(this.method)||null==this.data)return a;if("string"==typeof this.data||q.__instanceof(this.data,kd))a=a.slice(),a.push(new wm("Content-Type",null!=this.contentType?this.contentType:"application/x-www-form-urlencoded"));return a},__class__:ne};var wm=function(a,b){null==b&&(b="");null==a&&(a="");this.name=a;this.value=b};n["openfl.net.URLRequestHeader"]=wm;wm.__name__=["openfl","net","URLRequestHeader"];wm.prototype={__class__:wm};var Vd={};n["openfl.net._URLRequestMethod.URLRequestMethod_Impl_"]=
Vd;Vd.__name__=["openfl","net","_URLRequestMethod","URLRequestMethod_Impl_"];Vd.fromString=function(a){switch(a){case "DELETE":return 0;case "GET":return 1;case "HEAD":return 2;case "OPTIONS":return 3;case "POST":return 4;case "PUT":return 5;default:return null}};Vd.toString=function(a){switch(a){case 0:return"DELETE";case 1:return"GET";case 2:return"HEAD";case 3:return"OPTIONS";case 4:return"POST";case 5:return"PUT";default:return null}};var Si=function(a){null!=a&&this.decode(a)};n["openfl.net.URLVariables"]=
Si;Si.__name__=["openfl","net","URLVariables"];Si.prototype={decode:function(a){for(var b=O.fields(this),c=0;c<b.length;){var d=b[c];++c;O.deleteField(this,d)}a=a.split(";").join("&").split("&");for(b=0;b<a.length;)c=a[b],++b,d=c.indexOf("="),0<d?O.setField(this,Ca.urlDecode(P.substr(c,0,d)),Ca.urlDecode(P.substr(c,d+1,null))):0!=d&&O.setField(this,decodeURIComponent(c.split("+").join(" ")),"")},toString:function(){for(var a=[],b=O.fields(this),c=0;c<b.length;){var d=b[c];++c;a.push(encodeURIComponent(d)+
"="+Ca.urlEncode(O.field(this,d)))}return a.join("&")},__class__:Si};var Pa=function(){};n["openfl.system.Capabilities"]=Pa;Pa.__name__=["openfl","system","Capabilities"];Pa.__properties__={get_version:"get_version",get_screenResolutionY:"get_screenResolutionY",get_screenResolutionX:"get_screenResolutionX",get_screenDPI:"get_screenDPI",get_pixelAspectRatio:"get_pixelAspectRatio",get_os:"get_os",get_language:"get_language"};Pa.language=null;Pa.os=null;Pa.pixelAspectRatio=null;Pa.screenDPI=null;Pa.screenResolutionX=
null;Pa.screenResolutionY=null;Pa.version=null;Pa.hasMultiChannelAudio=function(a){return!1};Pa.get_os=function(){return"HTML5"};Pa.get_pixelAspectRatio=function(){return 1};Pa.get_screenDPI=function(){if(0<Pa.screenDPI)return Pa.screenDPI;var a=window.document.getElementsByTagName("body")[0],b=window.document.createElement("div");b.style.width=b.style.height="1in";b.style.padding=b.style.margin="0px";b.style.position="absolute";b.style.top="-100%";a.appendChild(b);Pa.screenDPI=b.offsetWidth;a.removeChild(b);
return Pa.screenDPI};Pa.get_screenResolutionX=function(){var a=ka.application.windows[0];return null!=a&&(a=a.get_display(),null!=a)?a.currentMode.width:0};Pa.get_screenResolutionY=function(){var a=ka.application.windows[0];return null!=a&&(a=a.get_display(),null!=a)?a.currentMode.height:0};Pa.get_language=function(){return navigator.language};Pa.get_version=function(){var a;return a="WEB"+(" "+Ca.replace("3.6.1",".",",")+",0")};var zn=function(a,b,c){null==a&&(a=!1);this.checkPolicyFile=a;this.securityDomain=
c;this.applicationDomain=b;this.allowLoadBytesCodeExecution=this.allowCodeImport=!0};n["openfl.system.LoaderContext"]=zn;zn.__name__=["openfl","system","LoaderContext"];zn.prototype={__class__:zn};var Ck=function(){};n["openfl.system.SecurityDomain"]=Ck;Ck.__name__=["openfl","system","SecurityDomain"];Ck.prototype={__class__:Ck};var Td=function(){};n["openfl.system.System"]=Td;Td.__name__=["openfl","system","System"];Td.__properties__={get_vmVersion:"get_vmVersion",get_totalMemory:"get_totalMemory"};
Td.totalMemory=null;Td.vmVersion=null;Td.exit=function(a){Tb.exit(a)};Td.gc=function(){};Td.pause=function(){ka.notImplemented("System.pause")};Td.resume=function(){ka.notImplemented("System.resume")};Td.setClipboard=function(a){Tf.set_text(a)};Td.get_totalMemory=function(){return window.performance&&window.performance.memory?window.performance.memory.usedJSHeapSize:0};Td.get_vmVersion=function(){return"1.0.0"};var Yh={};n["openfl.system._TouchscreenType.TouchscreenType_Impl_"]=Yh;Yh.__name__=["openfl",
"system","_TouchscreenType","TouchscreenType_Impl_"];Yh.fromString=function(a){switch(a){case "finger":return 0;case "none":return 1;case "stylus":return 2;default:return null}};Yh.toString=function(a){switch(a){case 0:return"finger";case 1:return"none";case 2:return"stylus";default:return null}};var Dk={};n["openfl.text._AntiAliasType.AntiAliasType_Impl_"]=Dk;Dk.__name__=["openfl","text","_AntiAliasType","AntiAliasType_Impl_"];Dk.fromString=function(a){switch(a){case "advanced":return 0;case "normal":return 1;
default:return null}};Dk.toString=function(a){switch(a){case 0:return"advanced";case 1:return"normal";default:return null}};var Xc=function(a){ie.call(this,a)};n["openfl.text.Font"]=Xc;Xc.__name__=["openfl","text","Font"];Xc.enumerateFonts=function(a){return Xc.__registeredFonts};Xc.fromBytes=function(a){var b=new Xc;b.__fromBytes(kb.toBytes(a));return b};Xc.fromFile=function(a){var b=new Xc;b.__fromFile(a);return b};Xc.registerFont=function(a){a=q.__cast(ua.createInstance(a,[]),Xc);null!=a&&Xc.__registeredFonts.push(a)};
Xc.__fromLimeFont=function(a){var b=new Xc;b.name=a.name;b.src=a.src;return b};Xc.__super__=ie;Xc.prototype=L(ie.prototype,{get_fontName:function(){return this.name},set_fontName:function(a){return this.name=a},__class__:Xc,__properties__:L(ie.prototype.__properties__,{set_fontName:"set_fontName",get_fontName:"get_fontName"})});var Ug={};n["openfl.text._FontStyle.FontStyle_Impl_"]=Ug;Ug.__name__=["openfl","text","_FontStyle","FontStyle_Impl_"];Ug.fromString=function(a){switch(a){case "bold":return 0;
case "boldItalic":return 1;case "italic":return 2;case "regular":return 3;default:return null}};Ug.toString=function(a){switch(a){case 0:return"bold";case 1:return"boldItalic";case 2:return"italic";case 3:return"regular";default:return null}};var Zh={};n["openfl.text._FontType.FontType_Impl_"]=Zh;Zh.__name__=["openfl","text","_FontType","FontType_Impl_"];Zh.fromString=function(a){switch(a){case "device":return 0;case "embedded":return 1;case "embeddedCFF":return 2;default:return null}};Zh.toString=
function(a){switch(a){case 0:return"device";case 1:return"embedded";case 2:return"embeddedCFF";default:return null}};var $h={};n["openfl.text._GridFitType.GridFitType_Impl_"]=$h;$h.__name__=["openfl","text","_GridFitType","GridFitType_Impl_"];$h.fromString=function(a){switch(a){case "none":return 0;case "pixel":return 1;case "subpixel":return 2;default:return null}};$h.toString=function(a){switch(a){case 0:return"none";case 1:return"pixel";case 2:return"subpixel";default:return null}};var Cd=function(){mc.call(this);
this.__caretIndex=-1;this.__graphics=new jc;this.__textEngine=new ob(this);this.__tabEnabled=this.__layoutDirty=!0;null==Cd.__defaultTextFormat&&(Cd.__defaultTextFormat=new hh("Times New Roman",12,0,!1,!1,!1,"","",3,0,0,0,0),Cd.__defaultTextFormat.blockIndent=0,Cd.__defaultTextFormat.bullet=!1,Cd.__defaultTextFormat.letterSpacing=0,Cd.__defaultTextFormat.kerning=!1);this.__textFormat=Cd.__defaultTextFormat.clone();this.__textEngine.textFormatRanges.push(new Lg(this.__textFormat,0,0));this.addEventListener("mouseDown",
K(this,this.this_onMouseDown))};n["openfl.text.TextField"]=Cd;Cd.__name__=["openfl","text","TextField"];Cd.__defaultTextFormat=null;Cd.__super__=mc;Cd.prototype=L(mc.prototype,{appendText:function(a){this.__textEngine.text+=a;this.__textEngine.textFormatRanges[this.__textEngine.textFormatRanges.length-1].end=this.__textEngine.text.length;this.__layoutDirty=this.__dirty=!0},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},getCharIndexAtPoint:function(a,b){if(2>=a||a>this.get_width()+4||0>=b||b>this.get_height()+4)return-1;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]}d=0;for(e=this.__textEngine.layoutGroups;d<e.length;)if(c=
e[d],++d,b>=c.offsetY&&b<=c.offsetY+c.height&&a>=c.offsetX&&a<=c.offsetX+c.width){for(var e=d=0,f=c.advances.length;e<f;){var g=e++,d=d+c.advances[g];if(a<=c.offsetX+d)return c.startIndex+g}return c.endIndex}return-1},getFirstCharInParagraph:function(a){if(0>a||a>this.__textEngine.text.length-1)return 0;for(var b=this.__textEngine.text.indexOf("\n"),c=0;-1<b;){if(b<=a)c=b+1;else if(b>a)break;b=this.__textEngine.text.indexOf("\n",b+1)}return c},getLineIndexAtPoint:function(a,b){this.__updateLayout();
if(2>=a||a>this.get_width()+4||0>=b||b>this.get_height()+4)return-1;for(var c=0,d=this.get_scrollV()-1;c<d;){var e=c++;b+=this.__textEngine.lineHeights[e]}c=0;for(d=this.__textEngine.layoutGroups;c<d.length;)if(e=d[c],++c,b>=e.offsetY&&b<=e.offsetY+e.height)return e.lineIndex;return-1},getLineIndexOfChar:function(a){if(0>a||a>this.__textEngine.text.length-1)return-1;this.__updateLayout();for(var b=0,c=this.__textEngine.layoutGroups;b<c.length;){var d=c[b];++b;if(d.startIndex<=a&&d.endIndex>=a)return d.lineIndex}return-1},
getLineLength:function(a){this.__updateLayout();if(0>a||a>this.__textEngine.numLines-1)return 0;for(var b=-1,c=-1,d=0,e=this.__textEngine.layoutGroups;d<e.length;){var f=e[d];++d;if(f.lineIndex==a)-1==b&&(b=f.startIndex);else if(f.lineIndex==a+1){c=f.startIndex;break}}-1==c&&(c=this.__textEngine.text.length);return c-b},getLineMetrics:function(a){this.__updateLayout();var b=this.__textEngine.lineAscents[a],c=this.__textEngine.lineDescents[a],d=this.__textEngine.lineLeadings[a],e=this.__textEngine.lineHeights[a];
a=this.__textEngine.lineWidths[a];var f;switch(this.__textFormat.align){case 3:case 2:case 5:f=2;break;case 4:case 1:f=this.__textEngine.width-a-2;break;case 0:f=(this.__textEngine.width-a)/2}return new xm(f,a,e,b,c,d)},getLineOffset:function(a){this.__updateLayout();if(0>a||a>this.__textEngine.numLines-1)return-1;for(var b=0,c=this.__textEngine.layoutGroups;b<c.length;){var d=c[b];++b;if(d.lineIndex==a)return d.startIndex}return 0},getLineText:function(a){this.__updateLayout();if(0>a||a>this.__textEngine.numLines-
1)return null;for(var b=-1,c=-1,d=0,e=this.__textEngine.layoutGroups;d<e.length;){var f=e[d];++d;if(f.lineIndex==a)-1==b&&(b=f.startIndex);else if(f.lineIndex==a+1){c=f.startIndex;break}}-1==c&&(c=this.__textEngine.text.length);return this.__textEngine.text.substring(b,c)},getParagraphLength:function(a){if(0>a||a>this.__textEngine.text.length-1)return 0;var b=this.getFirstCharInParagraph(a);a=this.__textEngine.text.indexOf("\n",a)+1;0==a&&(a=this.__textEngine.text.length);return a-b},getTextFormat:function(a,
b){null==b&&(b=0);null==a&&(a=0);for(var c=null,d=0,e=this.__textEngine.textFormatRanges;d<e.length;){var f=e[d];++d;if(f.start<=a&&f.end>=a||f.start<=b&&f.end>=b)null==c?c=f.format.clone():(f.format.font!=c.font&&(c.font=null),f.format.size!=c.size&&(c.size=null),f.format.color!=c.color&&(c.color=null),f.format.bold!=c.bold&&(c.bold=null),f.format.italic!=c.italic&&(c.italic=null),f.format.underline!=c.underline&&(c.underline=null),f.format.url!=c.url&&(c.url=null),f.format.target!=c.target&&(c.target=
null),f.format.align!=c.align&&(c.align=null),f.format.leftMargin!=c.leftMargin&&(c.leftMargin=null),f.format.rightMargin!=c.rightMargin&&(c.rightMargin=null),f.format.indent!=c.indent&&(c.indent=null),f.format.leading!=c.leading&&(c.leading=null),f.format.blockIndent!=c.blockIndent&&(c.blockIndent=null),f.format.bullet!=c.bullet&&(c.bullet=null),f.format.kerning!=c.kerning&&(c.kerning=null),f.format.letterSpacing!=c.letterSpacing&&(c.letterSpacing=null),f.format.tabStops!=c.tabStops&&(c.tabStops=
null))}return c},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}},setSelection:function(a,b){this.__selectionIndex=a;this.__caretIndex=b},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?Ha.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,g=this.__textEngine.layoutGroups.length;e<g;)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(g=c.advances.length;e<g;)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,f){if(!f.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(f),!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){wn.render(this,a);mc.prototype.__renderCairo.call(this,a)},__renderCanvas:function(a){Db.render(this,a);if(0==this.__textEngine.antiAliasType&&1==this.__textEngine.gridFitType){var b=a.context.imageSmoothingEnabled;b&&(a.context.mozImageSmoothingEnabled=!1,a.context.msImageSmoothingEnabled=!1,a.context.imageSmoothingEnabled=!1);mc.prototype.__renderCanvas.call(this,a);b&&(a.context.mozImageSmoothingEnabled=!0,a.context.msImageSmoothingEnabled=
!0,a.context.imageSmoothingEnabled=!0)}else mc.prototype.__renderCanvas.call(this,a)},__renderDOM:function(a){gm.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),Db.render(this,a),Pc.renderBitmap(this,a,0!=this.__textEngine.antiAliasType||1!=this.__textEngine.gridFitType),
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=Ad.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(2!=this.__textEngine.autoSize){var a=this.__textEngine.width;switch(this.__textEngine.autoSize){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){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}},get_antiAliasType:function(){return this.__textEngine.antiAliasType},set_antiAliasType:function(a){return this.__textEngine.antiAliasType=a},get_autoSize:function(){return this.__textEngine.autoSize},
set_autoSize:function(a){a!=this.__textEngine.autoSize&&(this.__layoutDirty=this.__dirty=!0);return this.__textEngine.autoSize=a},get_background:function(){return this.__textEngine.background},set_background:function(a){a!=this.__textEngine.background&&(this.__dirty=!0);return this.__textEngine.background=a},get_backgroundColor:function(){return this.__textEngine.backgroundColor},set_backgroundColor:function(a){a!=this.__textEngine.backgroundColor&&(this.__dirty=!0);return this.__textEngine.backgroundColor=
a},get_border:function(){return this.__textEngine.border},set_border:function(a){a!=this.__textEngine.border&&(this.__dirty=!0);return this.__textEngine.border=a},get_borderColor:function(){return this.__textEngine.borderColor},set_borderColor:function(a){a!=this.__textEngine.borderColor&&(this.__dirty=!0);return this.__textEngine.borderColor=a},get_bottomScrollV:function(){this.__updateLayout();return this.__textEngine.bottomScrollV},get_caretIndex:function(){return this.__caretIndex},get_defaultTextFormat:function(){return this.__textFormat.clone()},
set_defaultTextFormat:function(a){this.__textFormat.__merge(a);this.__dirty=this.__layoutDirty=!0;return a},get_displayAsPassword:function(){return this.__textEngine.displayAsPassword},set_displayAsPassword:function(a){a!=this.__textEngine.displayAsPassword&&(this.__layoutDirty=this.__dirty=!0);return this.__textEngine.displayAsPassword=a},get_embedFonts:function(){return this.__textEngine.embedFonts},set_embedFonts:function(a){return this.__textEngine.embedFonts=a},get_gridFitType:function(){return this.__textEngine.gridFitType},
set_gridFitType:function(a){return this.__textEngine.gridFitType=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,wa.__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 Rd("<br>","g")).replace(a,"\n");a=(new Rd("<br/>","g")).replace(a,"\n");var b=a.split("<font");if(1==b.length)a=(new Rd("<.*?>","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,g=e,h=this.__textFormat.clone(),l=d.indexOf("face="),m=d.indexOf("color="),n=d.indexOf("size=");if(-1<l&&l<f){var q=d.indexOf('"',l);h.font=P.substr(d,l+6,q)}-1<m&&m<f&&(h.color=u.parseInt("0x"+P.substr(d,m+8,6)));-1<n&&n<f&&(h.size=u.parseInt(function(a){a=d.indexOf('"',n);return P.substr(d,n+6,a)}(this)));f=d.substring(f,g);f=(new Rd("<.*?>",
"g")).replace(f,"");this.__textEngine.textFormatRanges.push(new Lg(h,a.length,a.length+f.length));a+=f;e+7<d.length&&(f=P.substr(d,e+7,null),this.__textEngine.textFormatRanges.push(new Lg(this.__textFormat,a.length,a.length+f.length)),a+=f)}else this.__textEngine.textFormatRanges.push(new Lg(this.__textFormat,a.length,a.length+d.length)),a+=d}}}}return this.__textEngine.text=a},get_length:function(){return null!=this.__textEngine.text?this.__textEngine.text.length:0},get_maxChars:function(){return this.__textEngine.maxChars},
set_maxChars:function(a){a!=this.__textEngine.maxChars&&(this.__layoutDirty=this.__dirty=!0);return this.__textEngine.maxChars=a},get_maxScrollH:function(){this.__updateLayout();return this.__textEngine.maxScrollH},get_maxScrollV:function(){this.__updateLayout();return this.__textEngine.maxScrollV},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_numLines:function(){this.__updateLayout();
return this.__textEngine.numLines},get_restrict:function(){return this.__textEngine.restrict},set_restrict:function(a){return this.__textEngine.restrict=a},get_scrollH:function(){return this.__textEngine.scrollH},set_scrollH:function(a){a>this.__textEngine.maxScrollH&&(a=this.__textEngine.maxScrollH);0>a&&(a=0);a!=this.__textEngine.scrollH&&(this.__dirty=!0);return this.__textEngine.scrollH=a},get_scrollV:function(){return this.__textEngine.scrollV},set_scrollV:function(a){a>this.__textEngine.maxScrollV&&
(a=this.__textEngine.maxScrollV);1>a&&(a=1);a!=this.__textEngine.scrollV&&(this.__dirty=!0);return this.__textEngine.scrollV=a},get_selectable:function(){return this.__textEngine.selectable},set_selectable:function(a){a!=this.__textEngine.selectable&&1==this.get_type()&&(null!=this.stage&&this.stage.get_focus()==this?this.__startTextInput():a||this.__stopTextInput());return this.__textEngine.selectable=a},get_selectionBeginIndex:function(){return u["int"](Math.min(this.__caretIndex,this.__selectionIndex))},
get_selectionEndIndex:function(){return u["int"](Math.max(this.__caretIndex,this.__selectionIndex))},get_sharpness:function(){return this.__textEngine.sharpness},set_sharpness:function(a){a!=this.__textEngine.sharpness&&(this.__dirty=!0);return this.__textEngine.sharpness=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},get_textColor:function(){return this.__textFormat.color},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},set_type:function(a){a!=this.__textEngine.type&&(1==a?(this.addEventListener("focusIn",K(this,this.this_onFocusIn)),this.addEventListener("focusOut",K(this,this.this_onFocusOut)),this.addEventListener("addedToStage",K(this,this.this_onAddedToStage)),this.this_onFocusIn(null)):(this.removeEventListener("focusIn",K(this,this.this_onFocusIn)),this.removeEventListener("focusOut",
K(this,this.this_onFocusOut)),this.removeEventListener("addedToStage",K(this,this.this_onAddedToStage)),this.__stopTextInput()),this.__dirty=!0);return this.__textEngine.type=a},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,wa.__worldTransformDirty++),this.__layoutDirty=this.__dirty=!0;this.set_scaleX(1);return this.__textEngine.width=a},get_wordWrap:function(){return this.__textEngine.wordWrap},
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("mouseMove",K(this,this.stage_onMouseMove)),
this.stage.removeEventListener("mouseUp",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=u["int"](Math.min(this.__selectionIndex,b));b=u["int"](Math.max(this.__selectionIndex,b));this.__selectionIndex=a;this.__caretIndex=b;this.__inputEnabled&&
(this.this_onFocusIn(null),this.__stopCursorTimer(),this.__startCursorTimer())}},this_onAddedToStage:function(a){this.this_onFocusIn(null)},this_onFocusIn:function(a){this.get_selectable()&&1==this.get_type()&&null!=this.stage&&this.stage.get_focus()==this&&this.__startTextInput()},this_onFocusOut:function(a){this.__stopTextInput()},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("mouseMove",K(this,this.stage_onMouseMove)),this.stage.addEventListener("mouseUp",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 fa("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 fa("change",!0)));break;case 1073741904:db.get_shiftKey(b)?0<this.__caretIndex&&this.__caretIndex--:(this.__selectionIndex==this.__caretIndex?0<this.__caretIndex&&this.__caretIndex--:this.__caretIndex=u["int"](Math.min(this.__caretIndex,this.__selectionIndex)),
this.__selectionIndex=this.__caretIndex);this.__stopCursorTimer();this.__startCursorTimer();break;case 1073741903:db.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=u["int"](Math.max(this.__caretIndex,this.__selectionIndex)),this.__selectionIndex=this.__caretIndex);this.__stopCursorTimer();this.__startCursorTimer();break;case 99:64!=
b&&128!=b||Tf.set_text(this.__textEngine.text.substring(this.__caretIndex,this.__selectionIndex));break;case 120:if(64==b||128==b)Tf.set_text(this.__textEngine.text.substring(this.__caretIndex,this.__selectionIndex)),this.__caretIndex!=this.__selectionIndex&&(this.replaceSelectedText(""),this.dispatchEvent(new fa("change",!0)));break;case 118:if(64==b||128==b){var c=Tf.get_text();null!=c?this.replaceSelectedText(c):this.replaceSelectedText("");this.dispatchEvent(new fa("change",!0))}else this.__textEngine.textFormatRanges[this.__textEngine.textFormatRanges.length-
1].end=this.__textEngine.text.length}},window_onTextInput:function(a){this.replaceSelectedText(a);this.dispatchEvent(new fa("change",!0))},__class__:Cd,__properties__:L(mc.prototype.__properties__,{set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",set_type:"set_type",get_type:"get_type",get_textWidth:"get_textWidth",get_textHeight:"get_textHeight",set_textColor:"set_textColor",get_textColor:"get_textColor",set_text:"set_text",get_text:"get_text",set_sharpness:"set_sharpness",get_sharpness:"get_sharpness",
get_selectionEndIndex:"get_selectionEndIndex",get_selectionBeginIndex:"get_selectionBeginIndex",set_selectable:"set_selectable",get_selectable:"get_selectable",set_scrollV:"set_scrollV",get_scrollV:"get_scrollV",set_scrollH:"set_scrollH",get_scrollH:"get_scrollH",set_restrict:"set_restrict",get_restrict:"get_restrict",get_numLines:"get_numLines",set_multiline:"set_multiline",get_multiline:"get_multiline",get_maxScrollV:"get_maxScrollV",get_maxScrollH:"get_maxScrollH",set_maxChars:"set_maxChars",get_maxChars:"get_maxChars",
get_length:"get_length",set_htmlText:"set_htmlText",get_htmlText:"get_htmlText",set_gridFitType:"set_gridFitType",get_gridFitType:"get_gridFitType",set_embedFonts:"set_embedFonts",get_embedFonts:"get_embedFonts",set_displayAsPassword:"set_displayAsPassword",get_displayAsPassword:"get_displayAsPassword",set_defaultTextFormat:"set_defaultTextFormat",get_defaultTextFormat:"get_defaultTextFormat",get_caretIndex:"get_caretIndex",get_bottomScrollV:"get_bottomScrollV",set_borderColor:"set_borderColor",get_borderColor:"get_borderColor",
set_border:"set_border",get_border:"get_border",set_backgroundColor:"set_backgroundColor",get_backgroundColor:"get_backgroundColor",set_background:"set_background",get_background:"get_background",set_autoSize:"set_autoSize",get_autoSize:"get_autoSize",set_antiAliasType:"set_antiAliasType",get_antiAliasType:"get_antiAliasType"})});var Vg={};n["openfl.text._TextFieldAutoSize.TextFieldAutoSize_Impl_"]=Vg;Vg.__name__=["openfl","text","_TextFieldAutoSize","TextFieldAutoSize_Impl_"];Vg.fromString=function(a){switch(a){case "center":return 0;
case "left":return 1;case "none":return 2;case "right":return 3;default:return null}};Vg.toString=function(a){switch(a){case 0:return"center";case 1:return"left";case 2:return"none";case 3:return"right";default:return null}};var Ek={};n["openfl.text._TextFieldType.TextFieldType_Impl_"]=Ek;Ek.__name__=["openfl","text","_TextFieldType","TextFieldType_Impl_"];Ek.fromString=function(a){switch(a){case "dynamic":return 0;case "input":return 1;default:return null}};Ek.toString=function(a){switch(a){case 0:return"dynamic";
case 1:return"input";default:return null}};var hh=function(a,b,c,d,e,f,g,h,l,m,n,q,r){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=l;this.leftMargin=m;this.rightMargin=n;this.indent=q;this.leading=r};n["openfl.text.TextFormat"]=hh;hh.__name__=["openfl","text","TextFormat"];hh.prototype={clone:function(){var a=new hh(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__:hh};var yf={};n["openfl.text._TextFormatAlign.TextFormatAlign_Impl_"]=yf;yf.__name__=["openfl","text","_TextFormatAlign","TextFormatAlign_Impl_"];yf.fromString=function(a){switch(a){case "center":return 0;case "end":return 1;case "justify":return 2;case "left":return 3;case "right":return 4;case "start":return 5;default:return null}};yf.toString=function(a){switch(a){case 0:return"center";case 1:return"end";case 2:return"justify";case 3:return"left";case 4:return"right";case 5:return"start";
default:return null}};var xm=function(a,b,c,d,e,f){this.x=a;this.width=b;this.height=c;this.ascent=d;this.descent=e;this.leading=f};n["openfl.text.TextLineMetrics"]=xm;xm.__name__=["openfl","text","TextLineMetrics"];xm.prototype={__class__:xm};var gb=function(){Va.call(this);gb.__instances.push(this)};n["openfl.ui.GameInput"]=gb;gb.__name__=["openfl","ui","GameInput"];gb.getDeviceAt=function(a){return 0<=a&&a<gb.__deviceList.length?gb.__deviceList[a]:null};gb.__getDevice=function(a){if(null==a)return null;
if(null==gb.__devices.h.__keys__[a.__id__]){var b=new Fk(a.get_guid(),a.get_name());gb.__deviceList.push(b);gb.__devices.set(a,b);gb.numDevices=gb.__deviceList.length}return gb.__devices.h[a.__id__]};gb.__onGamepadAxisMove=function(a,b,c){a=gb.__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 zf(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 fa("change"))}};gb.__onGamepadButtonDown=function(a,b){var c=gb.__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 zf(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 fa("change"))}};gb.__onGamepadButtonUp=function(a,b){var c=gb.__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 zf(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 fa("change"))}};gb.__onGamepadConnect=function(a){a=
gb.__getDevice(a);if(null!=a)for(var b=0,c=gb.__instances;b<c.length;){var d=c[b];++b;d.dispatchEvent(new bf("deviceAdded",null,null,a))}};gb.__onGamepadDisconnect=function(a){var b=gb.__devices.h[a.__id__];if(null!=b){null!=gb.__devices.h.__keys__[a.__id__]&&(P.remove(gb.__deviceList,gb.__devices.h[a.__id__]),gb.__devices.remove(a));gb.numDevices=gb.__deviceList.length;a=0;for(var c=gb.__instances;a<c.length;){var d=c[a];++a;d.dispatchEvent(new bf("deviceRemoved",null,null,b))}}};gb.__super__=Va;
gb.prototype=L(Va.prototype,{__class__:gb});var zf=function(a,b,c,d,e){null==e&&(e=0);Va.call(this);this.device=a;this.id=b;this.minValue=c;this.maxValue=d;this.value=e};n["openfl.ui.GameInputControl"]=zf;zf.__name__=["openfl","ui","GameInputControl"];zf.__super__=Va;zf.prototype=L(Va.prototype,{__class__:zf});var Fk=function(a,b){this.__controls=[];this.__button=new xa;this.__axis=new xa;this.id=a;this.name=b;for(var c,d=0;6>d;){var e=d++;c=new zf(this,"AXIS_"+e,-1,1);this.__axis.h[e]=c;this.__controls.push(c)}for(d=
0;15>d;)e=d++,c=new zf(this,"BUTTON_"+e,0,1),this.__button.h[e]=c,this.__controls.push(c)};n["openfl.ui.GameInputDevice"]=Fk;Fk.__name__=["openfl","ui","GameInputDevice"];Fk.prototype={getCachedSamples:function(a,b){return 0},getControlAt:function(a){return 0<=a&&a<this.__controls.length?this.__controls[a]:null},startCachingSamples:function(a,b){},stopCachingSamples:function(){},get_numControls:function(){return this.__controls.length},__class__:Fk,__properties__:{get_numControls:"get_numControls"}};
var Y=function(){};n["openfl.ui.Keyboard"]=Y;Y.__name__=["openfl","ui","Keyboard"];Y.capsLock=null;Y.numLock=null;Y.isAccessible=function(){return!1};Y.__convertKeyCode=function(a){switch(a){case 8:return 8;case 9:return 9;case 13:return 13;case 27:return 27;case 32:return 32;case 33:return 49;case 34:return 222;case 35:return 51;case 36:return 52;case 37:return 53;case 38:return 55;case 39:return 222;case 40:return 57;case 41:return 48;case 42:return 56;case 44:return 188;case 45:return 189;case 46:return 190;
case 47:return 191;case 48:return 48;case 49:return 49;case 50:return 50;case 51:return 51;case 52:return 52;case 53:return 53;case 54:return 54;case 55:return 55;case 56:return 56;case 57:return 57;case 58:return 186;case 59:return 186;case 60:return 60;case 61:return 187;case 62:return 190;case 63:return 191;case 64:return 50;case 91:return 219;case 92:return 220;case 93:return 221;case 94:return 54;case 95:return 189;case 96:return 192;case 97:return 65;case 98:return 66;case 99:return 67;case 100:return 68;
case 101:return 69;case 102:return 70;case 103:return 71;case 104:return 72;case 105:return 73;case 106:return 74;case 107:return 75;case 108:return 76;case 109:return 77;case 110:return 78;case 111:return 79;case 112:return 80;case 113:return 81;case 114:return 82;case 115:return 83;case 116:return 84;case 117:return 85;case 118:return 86;case 119:return 87;case 120:return 88;case 121:return 89;case 122:return 90;case 127:return 46;case 1073741881:return 20;case 1073741882:return 112;case 1073741883:return 113;
case 1073741884:return 114;case 1073741885:return 115;case 1073741886:return 116;case 1073741887:return 117;case 1073741888:return 118;case 1073741889:return 119;case 1073741890:return 120;case 1073741891:return 121;case 1073741892:return 122;case 1073741893:return 123;case 1073741894:return 301;case 1073741895:return 145;case 1073741896:return 19;case 1073741897:return 45;case 1073741898:return 36;case 1073741899:return 33;case 1073741901:return 35;case 1073741902:return 34;case 1073741903:return 39;
case 1073741904:return 37;case 1073741905:return 40;case 1073741906:return 38;case 1073741907:return 144;case 1073741908:return 111;case 1073741909:return 106;case 1073741910:return 109;case 1073741911:return 107;case 1073741912:return 108;case 1073741913:return 97;case 1073741914:return 98;case 1073741915:return 99;case 1073741916:return 100;case 1073741917:return 101;case 1073741918:return 102;case 1073741919:return 103;case 1073741920:return 104;case 1073741921:return 105;case 1073741922:return 96;
case 1073741923:return 110;case 1073741925:return 302;case 1073741928:return 124;case 1073741929:return 125;case 1073741930:return 126;case 1073741982:return 13;case 1073742044:return 110;case 1073742048:return 17;case 1073742049:return 16;case 1073742050:return 18;case 1073742051:return 15;case 1073742052:return 17;case 1073742053:return 16;case 1073742054:return 18;case 1073742055:return 15;default:return a}};Y.__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};Y.__getKeyLocation=function(a){switch(a){case 1073742048:case 1073742049:case 1073742050:case 1073742051:return 1;
case 1073742052:case 1073742053:case 1073742054:case 1073742055:return 2;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:return 3;default:return 0}};var Qi=function(){};n["openfl.ui.Mouse"]=Qi;Qi.__name__=["openfl","ui","Mouse"];Qi.hide=function(){ce.hide()};Qi.show=function(){ce.show()};
var Ec=function(){};n["openfl.ui.Multitouch"]=Ec;Ec.__name__=["openfl","ui","Multitouch"];Ec.__properties__={get_supportsTouchEvents:"get_supportsTouchEvents",set_inputMode:"set_inputMode",get_inputMode:"get_inputMode"};Ec.maxTouchPoints=null;Ec.supportedGestures=null;Ec.supportsGestureEvents=null;Ec.supportsTouchEvents=null;Ec.get_inputMode=function(){return 2};Ec.set_inputMode=function(a){return 0==a?Ec.get_inputMode():a};Ec.get_supportsTouchEvents=function(){return"ontouchstart"in document.documentElement||
window.DocumentTouch&&document instanceof DocumentTouch?!0:!1};var ai={};n["openfl.ui._MultitouchInputMode.MultitouchInputMode_Impl_"]=ai;ai.__name__=["openfl","ui","_MultitouchInputMode","MultitouchInputMode_Impl_"];ai.fromString=function(a){switch(a){case "gesture":return 0;case "none":return 1;case "touchPoint":return 2;default:return null}};ai.toString=function(a){switch(a){case 0:return"gesture";case 1:return"none";case 2:return"touchPoint";default:return null}};var kb={};n["openfl.utils._ByteArray.ByteArray_Impl_"]=
kb;kb.__name__=["openfl","utils","_ByteArray","ByteArray_Impl_"];kb.__properties__={set_length:"set_length",get_length:"get_length"};kb.defaultObjectEncoding=null;kb._new=function(a){null==a&&(a=0);return new kd(a)};kb.get=function(a,b){return a.b[b]};kb.set=function(a,b,c){a.b[b]=c&255;return c};kb.fromArrayBuffer=function(a){return kd.fromBytes(Ya.ofData(a))};kb.fromBytes=function(a){return q.__instanceof(a,kd)?a:kd.fromBytes(a)};kb.fromBytesData=function(a){return kd.fromBytes(Ya.ofData(a))};kb.toArrayBuffer=
function(a){return a.b.bufferValue};kb.toBytes=function(a){return a};kb.toBytesData=function(a){return a.b.bufferValue};kb.toLimeBytes=function(a){return new uc(kb.get_length(a),a.b.bufferValue)};kb.get_length=function(a){return a.__length};kb.set_length=function(a,b){0<b&&a.__resize(b);return a.__length=b};var ym=function(){};n["openfl.utils.IDataOutput"]=ym;ym.__name__=["openfl","utils","IDataOutput"];ym.prototype={__class__:ym,__properties__:{set_endian:"set_endian",get_endian:"get_endian"}};var zm=
function(){};n["openfl.utils.IDataInput"]=zm;zm.__name__=["openfl","utils","IDataInput"];zm.prototype={__class__:zm,__properties__:{set_endian:"set_endian",get_endian:"get_endian",get_bytesAvailable:"get_bytesAvailable"}};var kd=function(a){null==a&&(a=0);var b=Ya.alloc(a);Ya.call(this,b.b.buffer);this.__length=a;this.position=this.__endian=0};n["openfl.utils.ByteArrayData"]=kd;kd.__name__=["openfl","utils","ByteArrayData"];kd.__interfaces__=[ym,zm];kd.fromBytes=function(a){var b=new kd;b.__fromBytes(a);
return b};kd.__super__=Ya;kd.prototype=L(Ya.prototype,{clear:function(){this.position=this.__length=0},compress:function(a){this.position=this.__length=this.length},deflate:function(){this.compress(0)},inflate:function(){this.uncompress(0)},readBoolean:function(){if(this.position<this.length)return 0!=this.get(this.position++);throw new F(new af);},readByte:function(){var a=this.readUnsignedByte();return 0!=(a&128)?a-256:a},readBytes:function(a,b,c){null==c&&(c=0);null==b&&(b=0);0==c&&(c=this.__length-
this.position);if(this.position+c>this.__length)throw new F(new af);a.__length<b+c&&a.__resize(b+c);a.blit(b,this,this.position,c);this.position+=c},readDouble:function(){if(this.position+8>this.__length)throw new F(new af);this.position+=8;return this.getDouble(this.position-8)},readFloat:function(){if(this.position+4>this.__length)throw new F(new af);this.position+=4;return this.getFloat(this.position-4)},readInt:function(){var a=this.readUnsignedByte(),b=this.readUnsignedByte(),c=this.readUnsignedByte(),
d=this.readUnsignedByte();return 1==this.__endian?d<<24|c<<16|b<<8|a:a<<24|b<<16|c<<8|d},readMultiByte:function(a,b){return this.readUTFBytes(a)},readShort:function(){var a=this.readUnsignedByte(),b=this.readUnsignedByte(),a=1==this.__endian?b<<8|a:a<<8|b;return 0!=(a&32768)?a-65536:a},readUnsignedByte:function(){if(this.position<this.__length)return this.get(this.position++);throw new F(new af);},readUnsignedInt:function(){var a=this.readUnsignedByte(),b=this.readUnsignedByte(),c=this.readUnsignedByte(),
d=this.readUnsignedByte();return 1==this.__endian?d<<24|c<<16|b<<8|a:a<<24|b<<16|c<<8|d},readUnsignedShort:function(){var a=this.readUnsignedByte(),b=this.readUnsignedByte();return 1==this.__endian?(b<<8)+a:a<<8|b},readUTF:function(){var a=this.readUnsignedShort();return this.readUTFBytes(a)},readUTFBytes:function(a){if(this.position+a>this.__length)throw new F(new af);this.position+=a;return this.getString(this.position-a,a)},uncompress:function(a){this.__length=this.length;this.position=0},writeBoolean:function(a){this.writeByte(a?
1:0)},writeByte:function(a){this.__resize(this.position+1);this.set(this.position++,a&255)},writeBytes:function(a,b,c){null==c&&(c=0);null==b&&(b=0);0!=kb.get_length(a)&&(0==c&&(c=kb.get_length(a)-b),this.__resize(this.position+c),this.blit(this.position,a,b,c),this.position+=c)},writeDouble:function(a){this.__resize(this.position+8);this.setDouble(this.position,a);this.position+=8},writeFloat:function(a){this.__resize(this.position+4);this.setFloat(this.position,a);this.position+=4},writeInt:function(a){this.__resize(this.position+
4);1==this.__endian?(this.set(this.position++,a),this.set(this.position++,a>>8),this.set(this.position++,a>>16),this.set(this.position++,a>>24)):(this.set(this.position++,a>>24),this.set(this.position++,a>>16),this.set(this.position++,a>>8),this.set(this.position++,a))},writeMultiByte:function(a,b){this.writeUTFBytes(a)},writeShort:function(a){this.__resize(this.position+2);1==this.__endian?(this.set(this.position++,a),this.set(this.position++,a>>8)):(this.set(this.position++,a>>8),this.set(this.position++,
a))},writeUnsignedInt:function(a){this.writeInt(a)},writeUTF:function(a){a=Ya.ofString(a);this.writeShort(a.length);this.writeBytes(kb.fromBytes(a))},writeUTFBytes:function(a){Ya.ofString(a);this.writeBytes(kb.fromBytes(Ya.ofString(a)))},__fromBytes:function(a){this.b=a.b;this.length=a.length;this.data=a.data;this.__length=a.length},__resize:function(a){if(a>this.length){var b=Ya.alloc(3*(a+1)>>1);b.blit(0,this,0,this.length);this.b=b.b;this.length=b.length;this.data=b.data}this.__length<a&&(this.__length=
a)},__setData:function(a){this.b=a.b;this.length=a.length;this.data=a.data},get_bytesAvailable:function(){return this.__length-this.position},get_endian:function(){return this.__endian},set_endian:function(a){return this.__endian=a},__class__:kd,__properties__:{set_endian:"set_endian",get_endian:"get_endian",get_bytesAvailable:"get_bytesAvailable"}});var bi={};n["openfl.utils._CompressionAlgorithm.CompressionAlgorithm_Impl_"]=bi;bi.__name__=["openfl","utils","_CompressionAlgorithm","CompressionAlgorithm_Impl_"];
bi.fromString=function(a){switch(a){case "deflate":return 0;case "lzma":return 1;case "zlib":return 2;default:return null}};bi.toString=function(a){switch(a){case 0:return"deflate";case 1:return"lzma";case 2:return"zlib";default:return null}};var Gk={};n["openfl.utils._Endian.Endian_Impl_"]=Gk;Gk.__name__=["openfl","utils","_Endian","Endian_Impl_"];Gk.fromString=function(a){switch(a){case "bigEndian":return 0;case "littleEndian":return 1;default:return null}};Gk.toString=function(a){switch(a){case 0:return"bigEndian";
case 1:return"littleEndian";default:return null}};var Pe={};n["openfl.utils._Object.Object_Impl_"]=Pe;Pe.__name__=["openfl","utils","_Object","Object_Impl_"];Pe._new=function(){return{}};Pe.hasOwnProperty=function(a,b){return null!=a&&Object.prototype.hasOwnProperty.call(a,b)};Pe.isPrototypeOf=function(a,b){var c;for(c=null==a?null:q.getClass(a);null!=c;){if(c==b)return!0;c=ua.getSuperClass(c)}return!1};Pe.iterator=function(a){a=O.fields(a);null==a&&(a=[]);return P.iter(a)};Pe.propertyIsEnumerable=
function(a,b){return null!=a&&Object.prototype.hasOwnProperty.call(a,b)&&u.is(O.field(a,b),Am)};Pe.toLocaleString=function(a){return u.string(a)};Pe.toString=function(a){return u.string(a)};Pe.valueOf=function(a){return a};Pe.__get=function(a,b){return O.field(a,b)};Pe.__set=function(a,b,c){return a[b]=c};var An=function(){};n["haxe.lang.Iterator"]=An;An.__name__=["haxe","lang","Iterator"];An.prototype={__class__:An};var Am=function(){};n["haxe.lang.Iterable"]=Am;Am.__name__=["haxe","lang","Iterable"];
Am.prototype={__class__:Am};var Bm=function(a,b,c){da.call(this,b)};n["scripts.ActorEvents_0"]=Bm;Bm.__name__=["scripts","ActorEvents_0"];Bm.__super__=da;Bm.prototype=L(da.prototype,{init:function(){},forwardMessage:function(a){},__class__:Bm});var Cm=function(a,b,c){da.call(this,b)};n["scripts.ActorEvents_10"]=Cm;Cm.__name__=["scripts","ActorEvents_10"];Cm.__super__=da;Cm.prototype=L(da.prototype,{init:function(){var a=this;this.actor.setXVelocity(-30);l.runLater(2E3,function(b){l.recycleActor(a.actor)},
this.actor)},forwardMessage:function(a){},__class__:Cm});var Dm=function(a,b,c){da.call(this,b);this.nameMap.set("PdAtirar","_PdAtirar");this._PdAtirar=!1};n["scripts.ActorEvents_12"]=Dm;Dm.__name__=["scripts","ActorEvents_12"];Dm.__super__=da;Dm.prototype=L(da.prototype,{init:function(){var a=this;this._PdAtirar=!1;this.propertyChanged("_PdAtirar",this._PdAtirar);l.runPeriodically(800,function(b){a.wrapper.enabled&&(h.engine.getGameAttribute("PatientX")+250>=a.actor.getX()&&(a._PdAtirar=!0,a.propertyChanged("_PdAtirar",
a._PdAtirar),a.actor.setAnimation("Shoot")),a._PdAtirar&&l.runLater(500,function(b){l.createRecycledActor(l.getActorType(10),a.actor.getX(),a.actor.getY(),l.FRONT);a._PdAtirar=!1;a.propertyChanged("_PdAtirar",a._PdAtirar)},a.actor))},this.actor);l.runPeriodically(5E3,function(b){a.wrapper.enabled&&(0==a._PdAtirar?(a.actor.setAnimation("IdleRight"),l.runLater(2500,function(b){a.actor.setAnimation("IdleLeft")},a.actor)):a.actor.setAnimation("IdleLeft"))},this.actor)},forwardMessage:function(a){},__class__:Dm});
var Em=function(a,b,c){da.call(this,b)};n["scripts.ActorEvents_15"]=Em;Em.__name__=["scripts","ActorEvents_15"];Em.__super__=da;Em.prototype=L(da.prototype,{init:function(){},forwardMessage:function(a){},__class__:Em});var Fm=function(a,b,c){da.call(this,b)};n["scripts.ActorEvents_17"]=Fm;Fm.__name__=["scripts","ActorEvents_17"];Fm.__super__=da;Fm.prototype=L(da.prototype,{init:function(){},forwardMessage:function(a){},__class__:Fm});var Gm=function(a,b,c){da.call(this,b)};n["scripts.ActorEvents_2"]=
Gm;Gm.__name__=["scripts","ActorEvents_2"];Gm.__super__=da;Gm.prototype=L(da.prototype,{init:function(){},forwardMessage:function(a){},__class__:Gm});var Hm=function(a,b,c){da.call(this,b)};n["scripts.ActorEvents_30"]=Hm;Hm.__name__=["scripts","ActorEvents_30"];Hm.__super__=da;Hm.prototype=L(da.prototype,{init:function(){},forwardMessage:function(a){},__class__:Hm});var Im=function(a,b,c){da.call(this,b)};n["scripts.ActorEvents_32"]=Im;Im.__name__=["scripts","ActorEvents_32"];Im.__super__=da;Im.prototype=
L(da.prototype,{init:function(){},forwardMessage:function(a){},__class__:Im});var Jm=function(a,b,c){da.call(this,b)};n["scripts.ActorEvents_4"]=Jm;Jm.__name__=["scripts","ActorEvents_4"];Jm.__super__=da;Jm.prototype=L(da.prototype,{init:function(){},forwardMessage:function(a){},__class__:Jm});var Km=function(a,b,c){da.call(this,b);this.nameMap.set("Vida","_Vida");this._Vida=0};n["scripts.ActorEvents_6"]=Km;Km.__name__=["scripts","ActorEvents_6"];Km.__super__=da;Km.prototype=L(da.prototype,{init:function(){var a=
this;this._Vida=q.__cast(1,Jf);this.propertyChanged("_Vida",this._Vida);this.addAnyKeyPressedListener(function(b,c){a.wrapper.enabled&&0==h.engine.getGameAttribute("controlling")&&("a"==l.charFromCharCode(b.charCode)&&(a.actor.setXVelocity(-10),a.actor.setAnimation("WalkLeft")),"d"==l.charFromCharCode(b.charCode)&&(a.actor.setXVelocity(10),a.actor.setAnimation("WalkRight")))});this.addWhenUpdatedListener(null,function(b,c){a.wrapper.enabled&&(h.engine.setGameAttribute("PatientX",a.actor.getX()),h.engine.setGameAttribute("PatientY",
a.actor.getY()))});this.addAnyKeyReleasedListener(function(b,c){a.wrapper.enabled&&0==h.engine.getGameAttribute("controlling")&&("s"==l.charFromCharCode(b.charCode)&&a.actor.setYVelocity(0),"a"==l.charFromCharCode(b.charCode)&&(a.actor.setXVelocity(0),a.actor.setAnimation("IdleLeft")),"d"==l.charFromCharCode(b.charCode)&&(a.actor.setXVelocity(0),a.actor.setAnimation("IdleRight")))});this.addKeyStateListener("d",function(b,c,d){a.wrapper.enabled&&b&&l.loopSoundOnChannel(l.getSound(26),1)});this.addKeyStateListener("d",
function(b,c,d){a.wrapper.enabled&&c&&l.stopSoundOnChannel(1)});this.addKeyStateListener("a",function(b,c,d){a.wrapper.enabled&&b&&l.playSoundOnChannel(l.getSound(26),1)});this.addKeyStateListener("a",function(b,c,d){a.wrapper.enabled&&c&&l.stopSoundOnChannel(1)});this.addSceneCollisionListener(l.getActorType(6).ID,l.getActorType(10).ID,function(b,c){a.wrapper.enabled&&(l.recycleActor(b.otherActor),--a._Vida,a.propertyChanged("_Vida",a._Vida))});this.addWhenUpdatedListener(null,function(b,c){a.wrapper.enabled&&
0>=a._Vida&&(l.switchScene(na.get().scenes.get(4).getID(),l.createFadeOut(.5,0),l.createFadeIn(.5,0)),l.recycleActor(a.actor))})},forwardMessage:function(a){},__class__:Km});var Lm=function(a,b,c){da.call(this,b);this.nameMap.set("able","_able");this._able=!1;this.nameMap.set("following","_following");this._following=!1;this.nameMap.set("temp","_temp");this._temp=0;this.nameMap.set("zombList","_zombList");this.nameMap.set("Jumping","_Jumping");this._Jumping=!1;this.nameMap.set("sendoUsado","_sendoUsado");
this._sendoUsado=!1;this.nameMap.set("lastx","_lastx");this._lastx=0};n["scripts.ActorEvents_8"]=Lm;Lm.__name__=["scripts","ActorEvents_8"];Lm.__super__=da;Lm.prototype=L(da.prototype,{init:function(){var a=this;this._able=!1;this.propertyChanged("_able",this._able);this._following=!1;this.propertyChanged("_following",this._following);this._temp=q.__cast(0,Jf);this.propertyChanged("_temp",this._temp);this._zombList=[];this.propertyChanged("_zombList",this._zombList);this._lastx=l.asNumber(this.actor.getX());
this.propertyChanged("_lastx",this._lastx);this.addWhenUpdatedListener(null,function(b,c){a.wrapper.enabled&&(h.engine.getGameAttribute("PatientX")<=a.actor.getX()+50&&h.engine.getGameAttribute("PatientX")>=a.actor.getX()-50&&h.engine.getGameAttribute("PatientY")>=a.actor.getY()-50&&h.engine.getGameAttribute("PatientY")<=a.actor.getY()+50?0==a._following&&2>h.engine.getGameAttribute("zombies")&&(a.actor.setAnimation("InRange"),a._able=!0,a.propertyChanged("_able",a._able)):0==a._following&&(a.actor.setAnimation("normal"),
a._able=!1,a.propertyChanged("_able",a._able)),a._sendoUsado&&h.engine.getGameAttribute("stay")&&(a._following=!1,a.propertyChanged("_following",a._following),h.engine.setGameAttribute("controlling",!1),a._sendoUsado=!1,a.propertyChanged("_sendoUsado",a._sendoUsado),a._zombList=[],a.propertyChanged("_zombList",a._zombList),h.engine.setGameAttribute("zombies",h.engine.getGameAttribute("zombies")-1),a._temp=q.__cast(0,Jf),a.propertyChanged("_temp",a._temp),h.engine.setGameAttribute("stay",!1),1==h.engine.getGameAttribute("forca")&&
h.engine.getGameAttribute("zombs").remove(1),1==h.engine.getGameAttribute("explode")&&h.engine.getGameAttribute("zombs").remove(2)),1==a._following&&(1==a._zombList[0]&&a.actor.setAnimation("forca"),2==a._zombList[0]&&a.actor.setAnimation("explode"),h.engine.getGameAttribute("controlling")||0!=h.engine.getGameAttribute("voltando")||(a._sendoUsado=!1,a.propertyChanged("_sendoUsado",a._sendoUsado),a.actor.setY(h.engine.getGameAttribute("PatientY")),a._lastx=l.asNumber(a.actor.getX()),a.propertyChanged("_lastx",
a._lastx),a.actor.getX()>=h.engine.getGameAttribute("PatientX")- -42*a._temp?a.actor.setX(h.engine.getGameAttribute("PatientX")- -42*a._temp):a.actor.getX()<=h.engine.getGameAttribute("PatientX")-42*a._temp&&a.actor.setX(h.engine.getGameAttribute("PatientX")-42*a._temp),a.actor.getX()<a._lastx&&(1==a._zombList[0]&&a.actor.setAnimation("forca"),2==a._zombList[0]&&a.actor.setAnimation("explode")),a.actor.getX()>a._lastx&&(1==a._zombList[0]&&a.actor.setAnimation("forca"),2==a._zombList[0]&&a.actor.setAnimation("explode")))))});
this.addKeyStateListener("1",function(b,c,d){a.wrapper.enabled&&b&&1==a._able&&2>h.engine.getGameAttribute("zombies")&&!I.contains(h.engine.getGameAttribute("zombs"),1)&&(a._following=!0,a.propertyChanged("_following",a._following),a._zombList.splice(0,0,1),h.engine.getGameAttribute("zombs").insert(u["int"](h.engine.getGameAttribute("zombies")),1),h.engine.setGameAttribute("zombies",h.engine.getGameAttribute("zombies")+1),a._temp=l.asNumber(h.engine.getGameAttribute("zombies")),a.propertyChanged("_temp",
a._temp),a.actor.setAnimation("forca"),a._able=!1,a.propertyChanged("_able",a._able))});this.addKeyStateListener("2",function(b,c,d){a.wrapper.enabled&&b&&1==a._able&&2>h.engine.getGameAttribute("zombies")&&!I.contains(h.engine.getGameAttribute("zombs"),2)&&(a._following=!0,a.propertyChanged("_following",a._following),a._zombList.splice(0,0,2),h.engine.getGameAttribute("zombs").insert(u["int"](h.engine.getGameAttribute("zombies")),2),h.engine.setGameAttribute("zombies",h.engine.getGameAttribute("zombies")+
1),a._temp=l.asNumber(h.engine.getGameAttribute("zombies")),a.propertyChanged("_temp",a._temp),a.actor.setAnimation("explode"),a._able=!1,a.propertyChanged("_able",a._able))});this.addCollisionListener(this.actor,function(b,c){a.wrapper.enabled&&b.thisFromBottom&&!b.thisCollidedWithSensor&&(h.engine.setGameAttribute("on ground",!0),h.engine.setGameAttribute("jumping",!1))});this.addKeyStateListener("c",function(b,c,d){a.wrapper.enabled&&b&&I.contains(a._zombList,1)&&!h.engine.getGameAttribute("controlling")&&
(h.engine.setGameAttribute("controlling",!0),h.engine.setGameAttribute("forca",!0),a._sendoUsado=!0,a.propertyChanged("_sendoUsado",a._sendoUsado))});this.addKeyStateListener("v",function(b,c,d){a.wrapper.enabled&&b&&I.contains(a._zombList,2)&&!h.engine.getGameAttribute("controlling")&&(h.engine.setGameAttribute("controlling",!0),h.engine.setGameAttribute("explode",!0),a._sendoUsado=!0,a.propertyChanged("_sendoUsado",a._sendoUsado))})},forwardMessage:function(a){},__class__:Lm});var Mm=function(a,
b,c){da.call(this,b);this.nameMap.set("Actor","actor");this.nameMap.set("Left Control","_LeftControl");this.nameMap.set("Right Control","_RightControl");this.nameMap.set("Move","_Move");this._Move=0;this.nameMap.set("Use Controls","_UseControls");this._UseControls=!0;this.nameMap.set("Jump Control","_JumpControl");this.nameMap.set("Jump","_Jump");this._Jump=!1;this.nameMap.set("On Ground","_OnGround");this._OnGround=!1;this.nameMap.set("Maximum Running Speed","_MaximumRunningSpeed");this._MaximumRunningSpeed=
15;this.nameMap.set("Jumping Force","_JumpingForce");this._JumpingForce=25;this.nameMap.set("Run Right Animation","_RunRightAnimation");this.nameMap.set("Run Left Animation","_RunLeftAnimation");this.nameMap.set("Idle Right Animation","_IdleRightAnimation");this.nameMap.set("Idle Left Animation","_IdleLeftAnimation");this.nameMap.set("Jumping","_Jumping");this._Jumping=!1;this.nameMap.set("Jump Right Animation","_JumpRightAnimation");this.nameMap.set("Jump Left Animation","_JumpLeftAnimation");this.nameMap.set("Facing Left",
"_FacingLeft");this._FacingLeft=!1;this.nameMap.set("Jump Animation When Falling","_JumpAnimationWhenFalling");this._JumpAnimationWhenFalling=!1;this.nameMap.set("Jump Higher","_JumpHigher");this._JumpHigher=!1;this.nameMap.set("Was Jump","_WasJump");this._WasJump=!1;this.nameMap.set("Variable Jump","_VariableJump");this._VariableJump=!1;this.nameMap.set("Variable Jump Duration","_VariableJumpDuration");this._VariableJumpDuration=.2;this.nameMap.set("Running Force","_RunningForce");this._RunningForce=
50};n["scripts.Design_12_12_JumpandRunMovement"]=Mm;Mm.__name__=["scripts","Design_12_12_JumpandRunMovement"];Mm.__super__=da;Mm.prototype=L(da.prototype,{_customEvent_MoveLeft:function(){this._Move=q.__cast(-1,Jf);this.propertyChanged("_Move",this._Move)},_customEvent_MoveRight:function(){this._Move=q.__cast(1,Jf);this.propertyChanged("_Move",this._Move)},_customEvent_Jump:function(){this._Jump=!0;this.propertyChanged("_Jump",this._Jump);this._JumpHigher=!0;this.propertyChanged("_JumpHigher",this._JumpHigher)},
init:function(){var a=this;this.addWhenUpdatedListener(null,function(b,c){a.wrapper.enabled&&(a._UseControls&&(a._Move=l.asNumber(l.asNumber(l.isKeyDown(a._RightControl))-l.asNumber(l.isKeyDown(a._LeftControl))),a.propertyChanged("_Move",a._Move),a._Jump=l.isKeyPressed(a._JumpControl),a.propertyChanged("_Jump",a._Jump)),0!=a._Move&&a.actor.push(a._Move,0,a._RunningForce),Math.abs(a.actor.getXVelocity())>a._MaximumRunningSpeed&&a.actor.setXVelocity(Math.abs(a.actor.getXVelocity())/a.actor.getXVelocity()*
a._MaximumRunningSpeed),a._Jump&&a._OnGround&&(a._Jumping=!0,a.propertyChanged("_Jumping",a._Jumping),a._VariableJump?(a._JumpHigher=!0,a.propertyChanged("_JumpHigher",a._JumpHigher),l.runLater(1E3*a._VariableJumpDuration,function(b){a._JumpHigher=!1;a.propertyChanged("_JumpHigher",a._JumpHigher);a._Jumping||(a._JumpHigher=!1,a.propertyChanged("_JumpHigher",a._JumpHigher),b.repeats=!1)},a.actor)):0==h.engine.getGameAttribute("controlling")&&a.actor.applyImpulse(0,-1,a._JumpingForce)),a._JumpHigher&&
l.isKeyDown(a._JumpControl)&&0==h.engine.getGameAttribute("controlling")&&a.actor.applyImpulse(0,-1,a._JumpingForce/l.getStepSize()),-1==a._Move?(a._FacingLeft=!0,a.propertyChanged("_FacingLeft",a._FacingLeft)):1==a._Move&&(a._FacingLeft=!1,a.propertyChanged("_FacingLeft",a._FacingLeft)),a._Jumping&&0>a.actor.getYVelocity()||a._JumpAnimationWhenFalling&&!a._OnGround?a._FacingLeft?a.actor.setAnimation(""+a._JumpLeftAnimation):a.actor.setAnimation(""+a._JumpRightAnimation):0!=a._Move&&a._OnGround?a._FacingLeft?
a.actor.setAnimation(""+a._RunLeftAnimation):a.actor.setAnimation(""+a._RunRightAnimation):a._FacingLeft?a.actor.setAnimation(""+a._IdleLeftAnimation):a.actor.setAnimation(""+a._IdleRightAnimation),a._Move=q.__cast(0,Jf),a.propertyChanged("_Move",a._Move),a._WasJump=a._Jump,a.propertyChanged("_WasJump",a._WasJump),a._Jump=!1,a.propertyChanged("_Jump",a._Jump),a._OnGround=!1,a.propertyChanged("_OnGround",a._OnGround))});this.addCollisionListener(this.actor,function(b,c){a.wrapper.enabled&&(b.thisFromBottom&&
!b.thisCollidedWithSensor&&(a._OnGround=!0,a.propertyChanged("_OnGround",a._OnGround)),a._OnGround&&!a._WasJump&&(a._Jumping=!1,a.propertyChanged("_Jumping",a._Jumping)))})},forwardMessage:function(a){},__class__:Mm});var ra=function(){A.enable();A.define("up",[38]);A.define("down",[40]);A.define("left",[37]);A.define("right",[39]);A.define("action1",[90]);A.define("action2",[88]);A.define("enter",[13]);A.define("Z",[90]);A.define("1",[49]);A.define("2",[50]);A.define("c",[67]);A.define("v",[86]);
A.define("b",[66]);A.define("w",[87]);A.define("d",[68]);A.define("a",[65])};n["scripts.MyAssets"]=ra;ra.__name__=["scripts","MyAssets"];ra.__interfaces__=[bl];ra.prototype={loadResources:function(a){var b=0,c=50/Math.max(1,34),d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/sprite-1-0.png",!1);a.set("1-0.png",d);la.instance.updatePreloader(15+(c*b|0));b++;d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/sprite-3-0.png",!1);a.set("3-0.png",d);la.instance.updatePreloader(15+(c*b|0));b++;d=R.getBitmapData("assets/graphics/"+
h.IMG_BASE+"/sprite-5-0.png",!1);a.set("5-0.png",d);la.instance.updatePreloader(15+(c*b|0));b++;d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/sprite-7-0.png",!1);a.set("7-0.png",d);d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/sprite-7-1.png",!1);a.set("7-1.png",d);d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/sprite-7-2.png",!1);a.set("7-2.png",d);d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/sprite-7-3.png",!1);a.set("7-3.png",d);la.instance.updatePreloader(15+(c*b|0));b++;d=R.getBitmapData("assets/graphics/"+
h.IMG_BASE+"/sprite-9-4.png",!1);a.set("9-4.png",d);d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/sprite-9-6.png",!1);a.set("9-6.png",d);d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/sprite-9-9.png",!1);a.set("9-9.png",d);d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/sprite-9-10.png",!1);a.set("9-10.png",d);la.instance.updatePreloader(15+(c*b|0));b++;d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/sprite-11-0.png",!1);a.set("11-0.png",d);la.instance.updatePreloader(15+(c*b|0));b++;d=
R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/sprite-13-2.png",!1);a.set("13-2.png",d);d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/sprite-13-3.png",!1);a.set("13-3.png",d);d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/sprite-13-4.png",!1);a.set("13-4.png",d);la.instance.updatePreloader(15+(c*b|0));b++;d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/tileset-14.png",!1);a.set("14.png",d);la.instance.updatePreloader(15+(c*b|0));b++;d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/sprite-16-0.png",
!1);a.set("16-0.png",d);d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/sprite-16-1.png",!1);a.set("16-1.png",d);la.instance.updatePreloader(15+(c*b|0));b++;d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/sprite-18-0.png",!1);a.set("18-0.png",d);d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/sprite-18-1.png",!1);a.set("18-1.png",d);la.instance.updatePreloader(15+(c*b|0));b++;d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/background-19-0.png",!1);a.set("19-0.png",d);la.instance.updatePreloader(15+
(c*b|0));b++;d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/tileset-20.png",!1);a.set("20.png",d);la.instance.updatePreloader(15+(c*b|0));b++;d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/background-21-0.png",!1);a.set("21-0.png",d);la.instance.updatePreloader(15+(c*b|0));b++;d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/background-22-0.png",!1);a.set("22-0.png",d);la.instance.updatePreloader(15+(c*b|0));b++;d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/background-23-0.png",!1);a.set("23-0.png",
d);la.instance.updatePreloader(15+(c*b|0));b++;d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/background-24-0.png",!1);a.set("24-0.png",d);la.instance.updatePreloader(15+(c*b|0));b++;d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/background-25-0.png",!1);a.set("25-0.png",d);la.instance.updatePreloader(15+(c*b|0));b++;d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/background-28-0.png",!1);a.set("28-0.png",d);la.instance.updatePreloader(15+(c*b|0));b++;d=R.getBitmapData("assets/graphics/"+
h.IMG_BASE+"/background-29-0.png",!1);a.set("29-0.png",d);la.instance.updatePreloader(15+(c*b|0));b++;d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/sprite-31-0.png",!1);a.set("31-0.png",d);d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/sprite-31-1.png",!1);a.set("31-1.png",d);la.instance.updatePreloader(15+(c*b|0));b++;d=R.getBitmapData("assets/graphics/"+h.IMG_BASE+"/sprite-33-0.png",!1);a.set("33-0.png",d);la.instance.updatePreloader(15+(c*b|0))},loadScenes:function(a){var b=0,c=10/Math.max(1,
7);a.h[0]="menu";la.instance.updatePreloader(90+(c*b|0));b++;a.h[1]="main";la.instance.updatePreloader(90+(c*b|0));b++;a.h[2]="creditos";la.instance.updatePreloader(90+(c*b|0));b++;a.h[3]="main 2";la.instance.updatePreloader(90+(c*b|0));b++;a.h[4]="derrota";la.instance.updatePreloader(90+(c*b|0));b++;a.h[5]="main3";la.instance.updatePreloader(90+(c*b|0));b++;a.h[6]="main4";la.instance.updatePreloader(90+(c*b|0))},__class__:ra};var Bn=function(){};n["scripts.MyScripts"]=Bn;Bn.__name__=["scripts","MyScripts"];
Bn.prototype={__class__:Bn};var Nm=function(a,b){l.call(this)};n["scripts.SceneEvents_0"]=Nm;Nm.__name__=["scripts","SceneEvents_0"];Nm.__super__=Qc;Nm.prototype=L(Qc.prototype,{init:function(){var a=this;this.addMouseOverActorListener(l.getActor(1),function(b,c){a.wrapper.enabled&&3==b&&l.switchScene(na.get().scenes.get(1).getID(),l.createFadeOut(.3,0),l.createFadeIn(.3,0))});this.addMouseOverActorListener(l.getActor(2),function(b,c){a.wrapper.enabled&&3==b&&l.switchScene(na.get().scenes.get(2).getID(),
l.createFadeOut(.3,0),l.createFadeIn(.3,0))})},forwardMessage:function(a){},__class__:Nm});var Om=function(a,b){l.call(this);this.nameMap.set("sla","_sla")};n["scripts.SceneEvents_1"]=Om;Om.__name__=["scripts","SceneEvents_1"];Om.__super__=Qc;Om.prototype=L(Qc.prototype,{init:function(){var a=this;h.engine.setGameAttribute("zombs",[]);h.engine.setGameAttribute("zombies",0);h.engine.setGameAttribute("controlling",!1);h.engine.setGameAttribute("forca",!1);h.engine.setGameAttribute("explode",!1);h.engine.setGameAttribute("on ground",
!0);h.engine.setGameAttribute("jumping",!1);l.loopSoundOnChannel(l.getSound(27),2);this.addMouseOverActorListener(l.getActor(1),function(b,c){a.wrapper.enabled&&3==b&&l.switchScene(na.get().scenes.get(0).getID(),l.createFadeOut(.3,0),l.createFadeIn(.3,0))});this.addAnyKeyPressedListener(function(b,c){a.wrapper.enabled&&h.engine.getGameAttribute("controlling")&&(1==h.engine.getGameAttribute("forca")&&("f"==(""+a._sla.getAnimation()).charAt(1)&&(a._sla=l.getActor(10),a.propertyChanged("_sla",a._sla)),
"f"==(""+a._sla.getAnimation()).charAt(1)&&(a._sla=l.getActor(8),a.propertyChanged("_sla",a._sla))),1==h.engine.getGameAttribute("explode")&&("e"==(""+l.getActor(8).getAnimation()).charAt(1)&&(a._sla=l.getActor(8),a.propertyChanged("_sla",a._sla)),"explode"==l.getActor(10).getAnimation()&&(a._sla=l.getActor(10),a.propertyChanged("_sla",a._sla))),"w"==l.charFromCharCode(b.charCode)&&0==h.engine.getGameAttribute("jumping")&&1==h.engine.getGameAttribute("on ground")&&(h.engine.setGameAttribute("jumping",
!0),h.engine.setGameAttribute("on ground",!1),a._sla.applyImpulse(0,-1,25)),"s"==l.charFromCharCode(b.charCode)&&(h.engine.setGameAttribute("stay",!0),l.createRecycledActor(l.getActorType(15),a._sla.getX(),a._sla.getY()-21,l.FRONT)),"a"==l.charFromCharCode(b.charCode)&&a._sla.setXVelocity(-10),"d"==l.charFromCharCode(b.charCode)&&a._sla.setXVelocity(10))});this.addActorEntersRegionListener(l.getRegion(1),function(b,c){a.wrapper.enabled&&l.sameAsAny(l.getActorType(6),b.getType(),b.getGroup())&&l.switchScene(na.get().scenes.get(3).getID(),
l.createFadeOut(.2,0),l.createFadeIn(.2,0))});this.addAnyKeyReleasedListener(function(b,c){a.wrapper.enabled&&h.engine.getGameAttribute("controlling")&&("a"==l.charFromCharCode(b.charCode)&&a._sla.setXVelocity(0),"d"==l.charFromCharCode(b.charCode)&&a._sla.setXVelocity(0))});this.addKeyStateListener("b",function(b,c,d){a.wrapper.enabled&&b&&(h.engine.getGameAttribute("forca")||h.engine.getGameAttribute("explode"))&&h.engine.getGameAttribute("controlling")&&(h.engine.setGameAttribute("voltando",!0),
a._sla.getX()>=h.engine.getGameAttribute("PatientX")- -42?a._sla.moveTo(h.engine.getGameAttribute("PatientX")- -50,l.getActor(2).getY(),Math.abs(h.engine.getGameAttribute("PatientX")-42-a._sla.getX())/100,Jb.get_easeNone()):a._sla.getX()<=h.engine.getGameAttribute("PatientX")-42&&a._sla.moveTo(h.engine.getGameAttribute("PatientX")-50,l.getActor(2).getY(),Math.abs(h.engine.getGameAttribute("PatientX")- -42-a._sla.getX())/100,Jb.get_easeNone()),l.runLater(1E3*(Math.abs(h.engine.getGameAttribute("PatientX")-
-42-a._sla.getX())/100),function(a){h.engine.setGameAttribute("controlling",!1);h.engine.getGameAttribute("forca")?h.engine.setGameAttribute("forca",!1):h.engine.setGameAttribute("explode",!1);h.engine.setGameAttribute("voltando",!1)},null))})},forwardMessage:function(a){},__class__:Om});var Pm=function(a,b){l.call(this)};n["scripts.SceneEvents_2"]=Pm;Pm.__name__=["scripts","SceneEvents_2"];Pm.__super__=Qc;Pm.prototype=L(Qc.prototype,{init:function(){var a=this;this.addMouseOverActorListener(l.getActor(1),
function(b,c){a.wrapper.enabled&&3==b&&l.switchScene(na.get().scenes.get(0).getID(),l.createFadeOut(.3,0),l.createFadeIn(.3,0))})},forwardMessage:function(a){},__class__:Pm});var Qm=function(a,b){l.call(this);this.nameMap.set("sla","_sla");this.nameMap.set("ptPressed","_ptPressed");this._ptPressed=!1;this.nameMap.set("zbPressed","_zbPressed");this._zbPressed=!1};n["scripts.SceneEvents_3"]=Qm;Qm.__name__=["scripts","SceneEvents_3"];Qm.__super__=Qc;Qm.prototype=L(Qc.prototype,{init:function(){var a=
this;h.engine.setGameAttribute("zombs",[]);h.engine.setGameAttribute("zombies",0);h.engine.setGameAttribute("controlling",!1);h.engine.setGameAttribute("forca",!1);h.engine.setGameAttribute("explode",!1);h.engine.setGameAttribute("on ground",!0);h.engine.setGameAttribute("jumping",!1);l.hideTileLayer(0,"2");this._zbPressed=!1;this.propertyChanged("_zbPressed",this._zbPressed);this._ptPressed=!1;this.propertyChanged("_ptPressed",this._ptPressed);l.loopSoundOnChannel(l.getSound(27),2);this.addActorEntersRegionListener(l.getRegion(1),
function(b,c){a.wrapper.enabled&&l.sameAs(l.getActor(2),b)&&1==a._zbPressed&&l.switchScene(na.get().scenes.get(5).getID(),l.createFadeOut(.2,0),l.createFadeIn(.2,0))});this.addAnyKeyPressedListener(function(b,c){a.wrapper.enabled&&h.engine.getGameAttribute("controlling")&&(1==h.engine.getGameAttribute("forca")&&"forca"==l.getActor(3).getAnimation()&&(a._sla=l.getActor(3),a.propertyChanged("_sla",a._sla)),1==h.engine.getGameAttribute("explode")&&"explode"==l.getActor(3).getAnimation()&&(a._sla=l.getActor(3),
a.propertyChanged("_sla",a._sla)),"w"==l.charFromCharCode(b.charCode)&&0==h.engine.getGameAttribute("jumping")&&1==h.engine.getGameAttribute("on ground")&&(h.engine.setGameAttribute("jumping",!0),h.engine.setGameAttribute("on ground",!1),a._sla.applyImpulse(0,-1,25)),"s"==l.charFromCharCode(b.charCode)&&(h.engine.setGameAttribute("stay",!0),l.createRecycledActor(l.getActorType(15),a._sla.getX(),a._sla.getY()-21,l.FRONT)),"forca"==a._sla.getAnimation()&&("a"==l.charFromCharCode(b.charCode)&&(a._sla.setXVelocity(-10),
a._sla.setAnimation("forca")),"d"==l.charFromCharCode(b.charCode)&&(a._sla.setXVelocity(10),a._sla.setAnimation("forca"))),"explode"==a._sla.getAnimation()&&("a"==l.charFromCharCode(b.charCode)&&(a._sla.setXVelocity(-10),a._sla.setAnimation("explode")),"d"==l.charFromCharCode(b.charCode)&&(a._sla.setXVelocity(10),a._sla.setAnimation("explode"))))});this.addActorEntersRegionListener(l.getRegion(0),function(b,c){a.wrapper.enabled&&l.sameAsAny(l.getActorType(6),b.getType(),b.getGroup())&&(l.showTileLayer(0,
"2"),a._ptPressed=!0,a.propertyChanged("_ptPressed",a._ptPressed))});this.addActorEntersRegionListener(l.getRegion(0),function(b,c){a.wrapper.enabled&&l.sameAsAny(l.getActorType(8),b.getType(),b.getGroup())&&(l.showTileLayer(0,"2"),a._zbPressed=!0,a.propertyChanged("_zbPressed",a._zbPressed))});this.addActorExitsRegionListener(l.getRegion(0),function(b,c){a.wrapper.enabled&&l.sameAsAny(l.getActorType(6),b.getType(),b.getGroup())&&0==a._zbPressed&&(l.hideTileLayer(0,"2"),a._ptPressed=!1,a.propertyChanged("_ptPressed",
a._ptPressed))});this.addActorExitsRegionListener(l.getRegion(0),function(b,c){a.wrapper.enabled&&l.sameAs(l.getActor(3),b)&&0==a._ptPressed&&(l.hideTileLayer(0,"2"),a._zbPressed=!1,a.propertyChanged("_zbPressed",a._zbPressed))});this.addAnyKeyReleasedListener(function(b,c){a.wrapper.enabled&&h.engine.getGameAttribute("controlling")&&l.runLater(100,function(c){"f"==(""+a._sla.getAnimation()).charAt(1)&&("a"==l.charFromCharCode(b.charCode)&&(a._sla.setXVelocity(0),a._sla.setAnimation("forca")),"d"==
l.charFromCharCode(b.charCode)&&(a._sla.setXVelocity(0),a._sla.setAnimation("forca")));"e"==(""+a._sla.getAnimation()).charAt(1)&&("a"==l.charFromCharCode(b.charCode)&&(a._sla.setXVelocity(0),a._sla.setAnimation("explode")),"d"==l.charFromCharCode(b.charCode)&&(a._sla.setXVelocity(0),a._sla.setAnimation("explode")))},null)});this.addKeyStateListener("b",function(b,c,d){a.wrapper.enabled&&b&&(h.engine.getGameAttribute("forca")||h.engine.getGameAttribute("explode"))&&h.engine.getGameAttribute("controlling")&&
(h.engine.setGameAttribute("voltando",!0),a._sla.getX()>=h.engine.getGameAttribute("PatientX")- -42?a._sla.moveTo(h.engine.getGameAttribute("PatientX")- -50,l.getActor(2).getY(),Math.abs(h.engine.getGameAttribute("PatientX")-42-a._sla.getX())/100,Jb.get_easeNone()):a._sla.getX()<=h.engine.getGameAttribute("PatientX")-42&&a._sla.moveTo(h.engine.getGameAttribute("PatientX")-50,l.getActor(2).getY(),Math.abs(h.engine.getGameAttribute("PatientX")- -42-a._sla.getX())/100,Jb.get_easeNone()),l.runLater(1E3*
(Math.abs(h.engine.getGameAttribute("PatientX")- -42-a._sla.getX())/100),function(a){h.engine.setGameAttribute("controlling",!1);h.engine.getGameAttribute("forca")?h.engine.setGameAttribute("forca",!1):h.engine.setGameAttribute("explode",!1);h.engine.setGameAttribute("voltando",!1)},null))})},forwardMessage:function(a){},__class__:Qm});var Rm=function(a,b){l.call(this)};n["scripts.SceneEvents_4"]=Rm;Rm.__name__=["scripts","SceneEvents_4"];Rm.__super__=Qc;Rm.prototype=L(Qc.prototype,{init:function(){var a=
this;this.addMouseOverActorListener(l.getActor(1),function(b,c){a.wrapper.enabled&&3==b&&l.switchScene(na.get().scenes.get(0).getID(),l.createFadeOut(.5,0),l.createFadeIn(.5,0))})},forwardMessage:function(a){},__class__:Rm});var Sm=function(a,b){l.call(this);this.nameMap.set("sla","_sla");this.nameMap.set("ptPressed","_ptPressed");this._ptPressed=!1;this.nameMap.set("zb2Pressed","_zb2Pressed");this._zb2Pressed=!1;this.nameMap.set("zb1Pressed","_zb1Pressed");this._zb1Pressed=!1};n["scripts.SceneEvents_5"]=
Sm;Sm.__name__=["scripts","SceneEvents_5"];Sm.__super__=Qc;Sm.prototype=L(Qc.prototype,{init:function(){var a=this;h.engine.setGameAttribute("zombs",[]);h.engine.setGameAttribute("zombies",0);h.engine.setGameAttribute("controlling",!1);h.engine.setGameAttribute("forca",!1);h.engine.setGameAttribute("explode",!1);h.engine.setGameAttribute("on ground",!0);h.engine.setGameAttribute("jumping",!1);l.hideTileLayer(0,"2");this._ptPressed=!1;this.propertyChanged("_ptPressed",this._ptPressed);this._zb1Pressed=
!1;this.propertyChanged("_zb1Pressed",this._zb1Pressed);this._zb2Pressed=!1;this.propertyChanged("_zb2Pressed",this._zb2Pressed);l.loopSoundOnChannel(l.getSound(27),2);this.addActorEntersRegionListener(l.getRegion(0),function(b,c){a.wrapper.enabled&&l.sameAs(l.getActor(2),b)&&(a._ptPressed=!0,a.propertyChanged("_ptPressed",a._ptPressed),l.showTileLayer(0,"2"))});this.addActorEntersRegionListener(l.getRegion(0),function(b,c){a.wrapper.enabled&&l.sameAs(l.getActor(4),b)&&(a._zb1Pressed=!0,a.propertyChanged("_zb1Pressed",
a._zb1Pressed),l.showTileLayer(0,"2"))});this.addActorEntersRegionListener(l.getRegion(0),function(b,c){a.wrapper.enabled&&l.sameAs(l.getActor(5),b)&&(a._zb2Pressed=!0,a.propertyChanged("_zb2Pressed",a._zb2Pressed),l.showTileLayer(0,"2"))});this.addActorExitsRegionListener(l.getRegion(0),function(b,c){a.wrapper.enabled&&l.sameAs(l.getActor(2),b)&&!a._zb1Pressed&&!a._zb2Pressed&&(l.hideTileLayer(0,"2"),a._ptPressed=!1,a.propertyChanged("_ptPressed",a._ptPressed))});this.addActorExitsRegionListener(l.getRegion(0),
function(b,c){a.wrapper.enabled&&l.sameAs(l.getActor(4),b)&&!a._ptPressed&&!a._zb2Pressed&&(l.hideTileLayer(0,"2"),a._zb1Pressed=!1,a.propertyChanged("_zb1Pressed",a._zb1Pressed))});this.addActorExitsRegionListener(l.getRegion(0),function(b,c){a.wrapper.enabled&&l.sameAs(l.getActor(5),b)&&!a._zb1Pressed&&!a._ptPressed&&(l.hideTileLayer(0,"2"),a._zb2Pressed=!1,a.propertyChanged("_zb2Pressed",a._zb2Pressed))});this.addActorEntersRegionListener(l.getRegion(1),function(b,c){a.wrapper.enabled&&l.sameAs(l.getActor(2),
b)&&(a._ptPressed||a._zb1Pressed||a._zb2Pressed)&&l.switchScene(na.get().scenes.get(6).getID(),l.createFadeOut(.2,0),l.createFadeIn(.2,0))});this.addAnyKeyPressedListener(function(b,c){a.wrapper.enabled&&h.engine.getGameAttribute("controlling")&&(1==h.engine.getGameAttribute("forca")&&("forca"==l.getActor(4).getAnimation()&&(a._sla=l.getActor(4),a.propertyChanged("_sla",a._sla)),"forca"==l.getActor(5).getAnimation()&&(a._sla=l.getActor(5),a.propertyChanged("_sla",a._sla))),1==h.engine.getGameAttribute("explode")&&
("explode"==l.getActor(4).getAnimation()&&(a._sla=l.getActor(4),a.propertyChanged("_sla",a._sla)),"explode"==l.getActor(5).getAnimation()&&(a._sla=l.getActor(5),a.propertyChanged("_sla",a._sla))),"w"==l.charFromCharCode(b.charCode)&&0==h.engine.getGameAttribute("jumping")&&1==h.engine.getGameAttribute("on ground")&&(h.engine.setGameAttribute("jumping",!0),h.engine.setGameAttribute("on ground",!1),a._sla.applyImpulse(0,-1,25)),"s"==l.charFromCharCode(b.charCode)&&(h.engine.setGameAttribute("stay",
!0),l.createRecycledActor(l.getActorType(15),a._sla.getX(),a._sla.getY()-21,l.FRONT)),"a"==l.charFromCharCode(b.charCode)&&a._sla.setXVelocity(-10),"d"==l.charFromCharCode(b.charCode)&&a._sla.setXVelocity(10))});this.addAnyKeyReleasedListener(function(b,c){a.wrapper.enabled&&h.engine.getGameAttribute("controlling")&&null!=a._sla&&("forca"==a._sla.getAnimation()&&("a"==l.charFromCharCode(b.charCode)&&(a._sla.setXVelocity(0),a._sla.setAnimation("forca")),"d"==l.charFromCharCode(b.charCode)&&(a._sla.setXVelocity(0),
a._sla.setAnimation("forca"))),"explode"==a._sla.getAnimation()&&("a"==l.charFromCharCode(b.charCode)&&(a._sla.setXVelocity(0),a._sla.setAnimation("explode")),"d"==l.charFromCharCode(b.charCode)&&(a._sla.setXVelocity(0),a._sla.setAnimation("explode"))))});this.addKeyStateListener("b",function(b,c,d){a.wrapper.enabled&&b&&(h.engine.getGameAttribute("forca")||h.engine.getGameAttribute("explode"))&&h.engine.getGameAttribute("controlling")&&(h.engine.setGameAttribute("voltando",!0),a._sla.getX()>=h.engine.getGameAttribute("PatientX")-
-42?a._sla.moveTo(h.engine.getGameAttribute("PatientX")- -50,l.getActor(2).getY(),Math.abs(h.engine.getGameAttribute("PatientX")-42-a._sla.getX())/100,Jb.get_easeNone()):a._sla.getX()<=h.engine.getGameAttribute("PatientX")-42&&a._sla.moveTo(h.engine.getGameAttribute("PatientX")-50,l.getActor(2).getY(),Math.abs(h.engine.getGameAttribute("PatientX")- -42-a._sla.getX())/100,Jb.get_easeNone()),l.runLater(1E3*(Math.abs(h.engine.getGameAttribute("PatientX")- -42-a._sla.getX())/100),function(a){h.engine.setGameAttribute("controlling",
!1);h.engine.getGameAttribute("forca")?h.engine.setGameAttribute("forca",!1):h.engine.setGameAttribute("explode",!1);h.engine.setGameAttribute("voltando",!1)},null))})},forwardMessage:function(a){},__class__:Sm});var Tm=function(a,b){l.call(this);this.nameMap.set("sla","_sla")};n["scripts.SceneEvents_6"]=Tm;Tm.__name__=["scripts","SceneEvents_6"];Tm.__super__=Qc;Tm.prototype=L(Qc.prototype,{init:function(){var a=this;h.engine.setGameAttribute("zombs",[]);h.engine.setGameAttribute("zombies",0);h.engine.setGameAttribute("controlling",
!1);h.engine.setGameAttribute("forca",!1);h.engine.setGameAttribute("explode",!1);h.engine.setGameAttribute("on ground",!0);h.engine.setGameAttribute("jumping",!1);l.loopSoundOnChannel(l.getSound(27),2);this.addAnyKeyPressedListener(function(b,c){a.wrapper.enabled&&h.engine.getGameAttribute("controlling")&&(1==h.engine.getGameAttribute("forca")&&("forca"==l.getActor(2).getAnimation()&&(a._sla=l.getActor(2),a.propertyChanged("_sla",a._sla)),"forca"==l.getActor(3).getAnimation()&&(a._sla=l.getActor(3),
a.propertyChanged("_sla",a._sla))),1==h.engine.getGameAttribute("explode")&&("explode"==l.getActor(2).getAnimation()&&(a._sla=l.getActor(2),a.propertyChanged("_sla",a._sla)),"explode"==l.getActor(3).getAnimation()&&(a._sla=l.getActor(3),a.propertyChanged("_sla",a._sla))),"w"==l.charFromCharCode(b.charCode)&&0==h.engine.getGameAttribute("jumping")&&1==h.engine.getGameAttribute("on ground")&&(h.engine.setGameAttribute("jumping",!0),h.engine.setGameAttribute("on ground",!1),a._sla.applyImpulse(0,-1,
25)),"s"==l.charFromCharCode(b.charCode)&&(h.engine.setGameAttribute("stay",!0),l.createRecycledActor(l.getActorType(15),a._sla.getX(),a._sla.getY()-21,l.FRONT)),"forca"==a._sla.getAnimation()&&("a"==l.charFromCharCode(b.charCode)&&(a._sla.setXVelocity(-10),a._sla.setAnimation("forca")),"d"==l.charFromCharCode(b.charCode)&&(a._sla.setXVelocity(10),a._sla.setAnimation("forca"))),"explode"==a._sla.getAnimation()&&("a"==l.charFromCharCode(b.charCode)&&(a._sla.setXVelocity(-10),a._sla.setAnimation("explode")),
"d"==l.charFromCharCode(b.charCode)&&(a._sla.setXVelocity(10),a._sla.setAnimation("explode"))),"e"==l.charFromCharCode(b.charCode)&&a._sla.getX()>=l.getActor(5).getX()-100&&(a._sla.setAnimation("explosion"),l.getActor(5).setAnimation("bam"),l.runLater(300,function(a){l.recycleActor(l.getActor(5))},null)))});this.addActorEntersRegionListener(l.getRegion(0),function(b,c){a.wrapper.enabled&&l.sameAs(l.getActor(1),b)&&l.switchScene(na.get().scenes.get(2).getID(),l.createFadeOut(.2,0),l.createFadeIn(.2,
0))});this.addAnyKeyReleasedListener(function(b,c){a.wrapper.enabled&&h.engine.getGameAttribute("controlling")&&("f"==(""+a._sla.getAnimation()).charAt(1)&&("a"==l.charFromCharCode(b.charCode)&&(a._sla.setXVelocity(0),a._sla.setAnimation("forca")),"d"==l.charFromCharCode(b.charCode)&&(a._sla.setXVelocity(0),a._sla.setAnimation("forca"))),"e"==(""+a._sla.getAnimation()).charAt(1)&&("a"==l.charFromCharCode(b.charCode)&&(a._sla.setXVelocity(0),a._sla.setAnimation("explode")),"d"==l.charFromCharCode(b.charCode)&&
(a._sla.setXVelocity(0),a._sla.setAnimation("explode"))))});this.addKeyStateListener("b",function(b,c,d){a.wrapper.enabled&&b&&(h.engine.getGameAttribute("forca")||h.engine.getGameAttribute("explode"))&&h.engine.getGameAttribute("controlling")&&(h.engine.setGameAttribute("voltando",!0),a._sla.getX()>=h.engine.getGameAttribute("PatientX")- -42?a._sla.moveTo(h.engine.getGameAttribute("PatientX")- -50,l.getActor(2).getY(),Math.abs(h.engine.getGameAttribute("PatientX")-42-a._sla.getX())/100,Jb.get_easeNone()):
a._sla.getX()<=h.engine.getGameAttribute("PatientX")-42&&a._sla.moveTo(h.engine.getGameAttribute("PatientX")-50,l.getActor(2).getY(),Math.abs(h.engine.getGameAttribute("PatientX")- -42-a._sla.getX())/100,Jb.get_easeNone()),l.runLater(1E3*(Math.abs(h.engine.getGameAttribute("PatientX")- -42-a._sla.getX())/100),function(a){h.engine.setGameAttribute("controlling",!1);h.engine.getGameAttribute("forca")?h.engine.setGameAttribute("forca",!1):h.engine.setGameAttribute("explode",!1);h.engine.setGameAttribute("voltando",
!1)},null))})},forwardMessage:function(a){},__class__:Tm});var ei=function(){Sd.call(this);this.locked=!1;this.adFinished=!0;this.started=!1;this.background=new ga;this.background.get_graphics().beginFill(-15592942,1);this.background.get_graphics().drawRect(0,0,this.getWidth(),this.getHeight());this.addChild(this.background);try{var a=Bh.getString("preloader-bg"),b=new ga;this.addChild(b);Ba.fromBase64(a,"png",function(a){a=new qb(a);b.addChild(a)})}catch(c){if(Ia.lastException=c,c instanceof F&&
(c=c.val),q.__instanceof(c,String))null;else throw c;}this.barWidth=120;this.barHeight=8;var a=this.getWidth()/2-this.barWidth/2,d=this.getHeight()/2-this.barHeight/2;this.barBorder=new ga;this.barBorder.get_graphics().beginFill(-12303292,1);this.barBorder.get_graphics().drawRect(-2,-2,this.barWidth+4,this.barHeight+4);this.barBorder.set_x(a+0);this.barBorder.set_y(d+0);this.addChild(this.barBorder);this.barBackground=new ga;this.barBackground.get_graphics().beginFill(-12303292,1);this.barBackground.get_graphics().drawRect(0,
0,this.barWidth,this.barHeight);this.barBackground.set_x(a+0);this.barBackground.set_y(d+0);this.barBackground.set_scaleX(1);this.addChild(this.barBackground);this.bar=new ga;this.bar.get_graphics().beginFill(-7829368,1);this.bar.get_graphics().drawRect(0,0,this.barWidth,this.barHeight);var e=new ha(0,0,0,this.barHeight);this.bar.set_scrollRect(e);this.bar.set_x(a+0);this.bar.set_y(d+0);this.addChild(this.bar);""!=this.getURL()&&this.addEventListener("mouseDown",K(this,this.onMouseDown),!1,2);e=this.getLockURL();
if(this.isSiteLocked()&&null!=e&&""!=e){a=!1;d=ka.current.loaderInfo.url;if(null==d)a=!0;else if(0>d.indexOf("http://")&&0>d.indexOf("https://"))a=!0;else if(0<d.indexOf("stencyl.com")||0<d.indexOf("localhost"))a=!0;if(!a){for(var e=e.split(","),f=0;f<e.length;){var g=e[f];++f;null!=d&&0<=d.indexOf(g)&&(a=!0)}if(!a){this.showLockScreen(e[0]);return}}}this.addEventListener("enterFrame",K(this,this.onEnterFrame))};n["scripts.StencylPreloader"]=ei;ei.__name__=["scripts","StencylPreloader"];ei.__super__=
Sd;ei.prototype=L(Sd.prototype,{getLockURL:function(){return""},isSiteLocked:function(){return!1},showLockScreen:function(a){this.locked=!0;I.removeAllChildren(this);var b=new qb(new Ba(u["int"](this.getWidth()),u["int"](this.getHeight()),!1,5658198));this.addChild(b);var c=new Cd;c.set_width(this.getWidth()-16);c.set_height(this.getHeight()-16);c.set_x(8);c.set_y(8);c.set_textColor(16777215);c.set_multiline(!0);c.set_wordWrap(!0);c.set_text("Hi there!  It looks like somebody copied this game without my permission. Just click anywhere, or copy-paste this URL into your browser.\n\n"+
a+"\n\nThanks, and have fun!");this.addChild(c);this.removeEventListener("mouseDown",K(this,this.onMouseDown));c.addEventListener("click",K(this,this.goToLockURL));b.addEventListener("click",K(this,this.goToLockURL))},getURL:function(){return""},goToLockURL:function(a){ka.getURL(new ne(this.getLockURL()),"_parent")},onMouseDown:function(a){this.removeEventListener("mouseDown",K(this,this.onMouseDown));ka.getURL(new ne(this.getURL()),"_blank")},getBackgroundColor:function(){return 3368601},getWidth:function(){return 1024},
getHeight:function(){return 682},onInit:function(){},onLoaded:function(){!this.adFinished||this.isSiteLocked()&&this.locked||this.dispatchEvent(new fa("complete"))},onUpdate:function(a,b){var c=a/b;1<c&&1==c;null!=this.bar&&(c=new ha(0,0,this.barWidth*c,this.barHeight),this.bar.set_scrollRect(c))},onEnterFrame:function(a){this.started||(this.started=!0)},__class__:ei});var fj,Un=0;Array.prototype.indexOf&&(P.indexOf=function(a,b,c){return Array.prototype.indexOf.call(a,b,c)});n.Math=Math;String.prototype.__class__=
n.String=String;String.__name__=["String"];n.Array=Array;Array.__name__=["Array"];Date.prototype.__class__=n.Date=Date;Date.__name__=["Date"];var $m=n.Int={__name__:["Int"]},Vn=n.Dynamic={__name__:["Dynamic"]},Jf=n.Float=Number;Jf.__name__=["Float"];var En=n.Bool=Boolean;En.__ename__=["Bool"];var Fn=n.Class={__name__:["Class"]},Mn={};Bh.content=[{name:"preloader-bg",data:"aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUFFQUFBQUJDQVlBQUFBZkZjU0pBQUFBRFVsRVFWUjQybU5nWUdENER3QUJCQUVBZ0x2UgpXd0FBQUFCSlJVNUVya0pnZ2c9PQ"}];
var Ab={},dj=Function("return typeof ArrayBuffer != 'undefined' ? ArrayBuffer : null")()||Ce;null==dj.prototype.slice&&(dj.prototype.slice=Ce.sliceImpl);var ej=Function("return typeof DataView != 'undefined' ? DataView : null")()||Gl,nc=Function("return typeof Uint8Array != 'undefined' ? Uint8Array : null")()||qf._new,Nn;Nn=new Uint32Array(256);B.__alpha16=Nn;for(var On=0;256>On;){var Pn=On++,Wn=Math.ceil(257.00392156862745*Pn);B.__alpha16[Pn]=Wn}var Qn;Qn=new nc(510);B.__clamp=Qn;for(var Rn=0;255>
Rn;){var Sn=Rn++;B.__clamp[Sn]=Sn}for(var Tn=255;511>Tn;){var Xn=Tn++;B.__clamp[Xn]=255}xd.available=!1;xd.enabled=!1;null!=window.createjs&&(createjs.Sound.alternateExtensions=["ogg","mp3","wav"]);Ec.maxTouchPoints=2;Ec.supportedGestures=null;Ec.supportsGestureEvents=!1;wa.__instanceCount=0;wa.__worldRenderDirty=0;wa.__worldTransformDirty=0;wa.__cacheAsBitmapMode=!1;zd.NO_SCALING=0;zd.FULLSCREEN=1;zd.STRETCH_TO_FIT=2;zd.SCALE_TO_FIT_LETTERBOX=3;zd.SCALE_TO_FIT_FILL=4;zd.SCALE_TO_FIT_FULLSCREEN=5;
Aa.TOUCH_POINT=1;Aa.GESTURE=2;Aa.GESTURE_CAPTURE=3;Aa.PAN_X=1;Aa.PAN_Y=2;Aa.PAN_XY=3;Aa.READY=0;Aa.BEGIN=1;Aa.TWO_FINGER_MOVE=2;Aa.MOVE=4;Aa.R2D=180/Math.PI;Aa.SWIPE_SCROLL_TIME=2;Aa.SWIPE_SAMPLE_TIME=.2;Aa.VELOCITY_RATIO=.25;Aa.touchEvents="touchBegin touchEnd touchMove touchOver touchOut touchRollOver touchRollOut touchTap".split(" ");Aa.mouseEvents="mouseDown mouseUp mouseMove mouseOver mouseOut rollOver rollOut click".split(" ");Aa.geTouchEvents=["touchBegin","touchEnd","touchMove","touchOut"];
Aa.geMouseEvents=["mouseDown","mouseUp","mouseMove","mouseOut"];Aa.initialized=!1;Aa.moveToleSqr=1;Aa.MAP="mouseDown rox_touch_begin mouseUp rox_touch_end mouseMove rox_touch_move mouseOver rox_touch_over mouseOut rox_touch_out rollOver rox_touch_roll_over rollOut rox_touch_roll_in click rox_touch_tap touchBegin rox_touch_begin touchEnd rox_touch_end touchMove rox_touch_move touchOver rox_touch_over touchOut rox_touch_out touchRollOver rox_touch_roll_over touchRollOut rox_touch_roll_in touchTap rox_touch_tap".split(" ");
Aa.typeMap=Aa.initTypeMap();fa.ACTIVATE="activate";fa.ADDED="added";fa.ADDED_TO_STAGE="addedToStage";fa.CANCEL="cancel";fa.CHANGE="change";fa.CLOSE="close";fa.COMPLETE="complete";fa.CONNECT="connect";fa.CONTEXT3D_CREATE="context3DCreate";fa.DEACTIVATE="deactivate";fa.ENTER_FRAME="enterFrame";fa.ID3="id3";fa.INIT="init";fa.MOUSE_LEAVE="mouseLeave";fa.OPEN="open";fa.REMOVED="removed";fa.REMOVED_FROM_STAGE="removedFromStage";fa.RENDER="render";fa.RESIZE="resize";fa.SCROLL="scroll";fa.SELECT="select";
fa.SOUND_COMPLETE="soundComplete";fa.TAB_CHILDREN_CHANGE="tabChildrenChange";fa.TAB_ENABLED_CHANGE="tabEnabledChange";fa.TAB_INDEX_CHANGE="tabIndexChange";fa.UNLOAD="unload";Eb.TOUCH_BEGIN="rox_touch_begin";Eb.TOUCH_END="rox_touch_end";Eb.TOUCH_MOVE="rox_touch_move";Eb.TOUCH_OVER="rox_touch_over";Eb.TOUCH_OUT="rox_touch_out";Eb.TOUCH_ROLL_OVER="rox_touch_roll_over";Eb.TOUCH_ROLL_OUT="rox_touch_roll_in";Eb.TOUCH_TAP="rox_touch_tap";Eb.GESTURE_TAP="rox_gesture_tap";Eb.GESTURE_LONG_PRESS="rox_gesture_long_press";
Eb.GESTURE_PAN="rox_gesture_pan";Eb.GESTURE_SWIPE="rox_gesture_swipe";Eb.GESTURE_BEGIN="rox_gesture_begin";Eb.GESTURE_PINCH="rox_gesture_pinch";Eb.GESTURE_ROTATION="rox_gesture_rotation";Eb.GESTURE_END="rox_gesture_end";ba.Element=0;ba.PCData=1;ba.CData=2;ba.Comment=3;ba.DocType=4;ba.ProcessingInstruction=5;ba.Document=6;y.pool=[];y.pooli=0;kc.VERTEX=0;kc.FACE=1;Ja.b2_nullFeature=255;Ja.s_incidentEdge=Ja.makeClipPointVector();Ja.s_clipPoints1=Ja.makeClipPointVector();Ja.s_clipPoints2=Ja.makeClipPointVector();
Ja.s_edgeAO=[];Ja.s_edgeBO=[];Ja.s_localTangent=new y;Ja.s_localNormal=new y;Ja.s_planePoint=new y;Ja.s_normal=new y;Ja.s_tangent=new y;Ja.s_tangent2=new y;Ja.s_v11=new y;Ja.s_v12=new y;Ja.b2CollidePolyTempVec=new y;gd.s_simplex=new Mk;gd.s_saveA=[];gd.s_saveB=[];$g.currentID=0;Fc.e_circles=1;Fc.e_faceA=2;Fc.e_faceB=4;Bd.e_points=1;Bd.e_faceA=2;Bd.e_faceB=4;Ra.b2_toiCalls=0;Ra.b2_toiIters=0;Ra.b2_toiMaxIters=0;Ra.b2_toiRootIters=0;Ra.b2_toiMaxRootIters=0;Ra.s_cache=new ah;Ra.s_distanceInput=new Yg;
Ra.s_xfA=new hd;Ra.s_xfB=new hd;Ra.s_fcn=new Bd;Ra.s_distanceOutput=new Zg;Ta.distanceInput=new Yg;Ta.proxyA=new df;Ta.proxyB=new df;Ta.simplexCache=new ah;Ta.distanceOutput=new Zg;Ta.e_unknownShape=-1;Ta.e_circleShape=0;Ta.e_polygonShape=1;Ta.e_edgeShape=2;Ta.e_shapeTypeCount=3;Ta.e_hitCollide=1;Ta.e_missCollide=0;Ta.e_startsInsideCollide=-1;za.s_mat=new tb;M.VERSION="2.1alpha";M.USHRT_MAX=65535;M.b2_pi=Math.PI;M.b2_maxManifoldPoints=2;M.b2_aabbExtension=.1;M.b2_aabbMultiplier=2;M.b2_linearSlop=
.005;M.b2_polygonRadius=2*M.b2_linearSlop;M.b2_angularSlop=.011111111111111112*M.b2_pi;M.b2_toiSlop=8*M.b2_linearSlop;M.b2_maxTOIContactsPerIsland=32;M.b2_maxTOIJointsPerIsland=32;M.b2_velocityThreshold=1;M.b2_maxLinearCorrection=.2;M.b2_maxAngularCorrection=.044444444444444446*M.b2_pi;M.b2_maxTranslation=2;M.b2_maxTranslationSquared=M.b2_maxTranslation*M.b2_maxTranslation;M.b2_maxRotation=.5*M.b2_pi;M.b2_maxRotationSquared=M.b2_maxRotation*M.b2_maxRotation;M.b2_contactBaumgarte=.2;M.b2_timeToSleep=
.5;M.b2_linearSleepTolerance=.01;M.b2_angularSleepTolerance=.011111111111111112*M.b2_pi;x.b2Vec2_zero=new y(0,0);x.b2Mat22_identity=tb.fromVV(new y(1,0),new y(0,1));x.b2Transform_identity=new hd(x.b2Vec2_zero,x.b2Mat22_identity);S.s_xf1=new hd;S.e_islandFlag=1;S.e_awakeFlag=2;S.e_allowSleepFlag=4;S.e_bulletFlag=8;S.e_fixedRotationFlag=16;S.e_activeFlag=32;S.e_ignoreGravityFlag=128;S.e_alwaysActiveFlag=256;S.e_pausedFlag=512;S.b2_staticBody=0;S.b2_kinematicBody=1;S.b2_dynamicBody=2;ch.b2_defaultFilter=
new ch;Se.KEY_LOCK=0;Se.b2_defaultListener=new Se;si.s_evalCP=new Lk;ad.e_shapeBit=1;ad.e_jointBit=2;ad.e_aabbBit=4;ad.e_pairBit=8;ad.e_centerOfMassBit=16;ad.e_controllerBit=32;id.tempAABB1=new fd;id.tempAABB2=new fd;Cf.s_impulse=new Tk;eb.s_timestep2=new eh;eb.s_xf=new hd;eb.s_backupA=new ef;eb.s_backupB=new ef;eb.s_timestep=new eh;eb.s_queue=[];eb.s_jointColor=new ri(.5,.8,.8);eb.m_warmStarting=!0;eb.m_continuousPhysics=!1;eb.e_newFixture=1;eb.e_locked=2;sa.e_sensorFlag=1;sa.e_continuousFlag=2;
sa.e_islandFlag=4;sa.e_toiFlag=8;sa.e_touchingFlag=16;sa.e_enabledFlag=32;sa.e_filterFlag=64;sa.s_input=new Sk;fh.circlePointA=new y;fh.circlePointB=new y;bd.staticFix=M.b2_maxManifoldPoints;bd.s_worldManifold=new qi;bd.s_psm=new fh;oa.m_xf=new hd;oa.q=new y;oa.p=new y;oa.e=new y;oa.temp1=new y;oa.temp2=new y;oa.m_centroidB=new y;oa.mat=new tb;r.m_xf=new hd;r.temp=new y;r.m_centroidB=new y;r.m_lowerLimit=new y;r.m_upperLimit=new y;r.m_polygonB=new Yk;r.edgeAxis=new ui;r.polygonAxis=new ui;r.perp=
new y;r.n=new y;r.rf=new Zk;r.mat=new tb;r.temp1=new y;r.temp2=new y;r.ie=[new jf,new jf];r.clipPoints1=[new jf,new jf];r.clipPoints2=[new jf,new jf];r.edge0=new y;r.edge1=new y;r.edge2=new y;r.m_normal=new y;r.m_normal0=new y;r.m_normal1=new y;r.m_normal2=new y;T.e_unknownJoint=0;T.e_revoluteJoint=1;T.e_prismaticJoint=2;T.e_distanceJoint=3;T.e_pulleyJoint=4;T.e_mouseJoint=5;T.e_gearJoint=6;T.e_lineJoint=7;T.e_weldJoint=8;T.e_frictionJoint=9;T.e_inactiveLimit=0;T.e_atLowerLimit=1;T.e_atUpperLimit=
2;T.e_equalLimits=3;Ib.CENTER="center";ue.b2_minPulleyLength=2;le.tImpulse=new y;Gf.GRAPH_WIDTH=70;Gf.XPOS=69;Gf.GRAPH_HEIGHT=1;Gf.TEXT_HEIGHT=15;ve.bg=51;ve.fps=16776960;ve.ms=65280;ve.mem=65535;ve.memmax=16711792;ve.bgCSS="#000033";ve.msCSS="#00ff00";ve.fpsCSS="#ffff00";ve.memCSS="#00ffff";ve.memmaxCSS="#ff0070";ac.TYPE_ADS=1;ac.TYPE_PURCHASES=2;ac.TYPE_GAMECENTER=3;ac.TYPE_KEYBOARD=4;h.DOODAD="";h.INTERNAL_SHIFT="iSHIFT";h.INTERNAL_CTRL="iCTRL";h.NO_PHYSICS=!1;h.DEBUG_DRAW=!1;h.IMG_BASE="";h.SCALE=
1;h.checkedWideScreen=!1;h.isStandardIOS=!1;h.isExtendedIOS=!1;h.isIPhone6=!1;h.isIPhone6Plus=!1;h.isTabletIOS=!1;h.engine=null;h.landscape=!1;h.paused=!1;h.started=!1;h.events=new ac;h.ITERATIONS=3;h.physicsScale=10;h.paddingLeft=0;h.paddingRight=0;h.paddingTop=0;h.paddingBottom=0;h.STEP_SIZE=10;h.MS_PER_SEC=1E3;h.elapsedTime=0;h.timeScale=1;h.debug=!1;h.debugDraw=!1;A.keyString="";A.mouseX=0;A.mouseY=0;A.mouseWheelDelta=0;A.joySensitivity=.12;A.kKeyStringMax=100;A._joystickEnabled=!1;A._enabled=
!1;A._key=[];A._keyNum=0;A._press=[];A._pressNum=0;A._release=[];A._releaseNum=0;A._joyControllerReady=new xa;A._joyHatState=new xa;A._joyAxisState=new xa;A._joyAxisPressure=new xa;A._joyButtonState=new xa;A._joyControlMap=new ma;A._controlButtonMap=new ma;A._control=new ma;cd.DEVICE=0;cd.TYPE=1;cd.UP=0;cd.DOWN=1;cd.LEFT=2;cd.RIGHT=3;cd.AXIS=0;cd.HAT=1;cd.BUTTON=2;cd.BALL=3;ia.ANY=-1;ia.LEFT=37;ia.UP=38;ia.RIGHT=39;ia.DOWN=40;ia.ENTER=13;ia.CONTROL=17;ia.SPACE=32;ia.SHIFT=16;ia.BACKSPACE=8;ia.CAPS_LOCK=
20;ia.DELETE=46;ia.END=35;ia.ESCAPE=27;ia.HOME=36;ia.INSERT=45;ia.TAB=9;ia.PAGE_DOWN=34;ia.PAGE_UP=33;ia.LEFT_SQUARE_BRACKET=219;ia.RIGHT_SQUARE_BRACKET=221;ia.A=97;ia.B=98;ia.C=99;ia.D=100;ia.E=101;ia.F=102;ia.G=103;ia.H=104;ia.I=105;ia.J=106;ia.K=107;ia.L=108;ia.M=109;ia.N=110;ia.O=111;ia.P=112;ia.Q=113;ia.R=114;ia.S=115;ia.T=116;ia.U=117;ia.V=118;ia.W=119;ia.X=120;ia.Y=121;ia.Z=122;ia.F1=112;ia.F2=113;ia.F3=114;ia.F4=115;ia.F5=116;ia.F6=117;ia.F7=118;ia.F8=119;ia.F9=120;ia.F10=121;ia.F11=122;ia.F12=
123;ia.F13=124;ia.F14=125;ia.F15=126;ia.DIGIT_0=48;ia.DIGIT_1=49;ia.DIGIT_2=50;ia.DIGIT_3=51;ia.DIGIT_4=52;ia.DIGIT_5=53;ia.DIGIT_6=54;ia.DIGIT_7=55;ia.DIGIT_8=56;ia.DIGIT_9=57;ia.NUMPAD_0=96;ia.NUMPAD_1=97;ia.NUMPAD_2=98;ia.NUMPAD_3=99;ia.NUMPAD_4=100;ia.NUMPAD_5=101;ia.NUMPAD_6=102;ia.NUMPAD_7=103;ia.NUMPAD_8=104;ia.NUMPAD_9=105;ia.NUMPAD_ADD=107;ia.NUMPAD_DECIMAL=110;ia.NUMPAD_DIVIDE=111;ia.NUMPAD_ENTER=108;ia.NUMPAD_MULTIPLY=106;ia.NUMPAD_SUBTRACT=109;ha.__temp=new ha;Oa.__identity=new Oa;Oa.__temp=
new Oa;l.FRONT=0;l.MIDDLE=1;l.BACK=2;l.CHANNELS=32;l.lastCreatedActor=null;l.lastCreatedJoint=null;l.lastCreatedRegion=null;l.lastCreatedTerrainRegion=null;l.mpx=0;l.mpy=0;l.mrx=0;l.mry=0;l.dummyVec=new y;l.drawData=[];l.ma=new Oa;l.dummyRect=new ha(0,0,1,1);l.dummyPoint=new W(0,0);l.BASE_64_ENCODINGS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";l.BASE_64_PADDING="=";sb.AD_USER_OPEN=100;sb.AD_USER_CLOSE=101;sb.AD_LOADED=102;sb.AD_FAILED=103;sb.AD_CLICKED=104;sb.FULL_AD_USER_OPEN=
105;sb.FULL_AD_USER_CLOSE=106;sb.FULL_AD_LOADED=107;sb.FULL_AD_FAILED=108;sb.FULL_AD_CLICKED=109;sb.PURCHASE_READY=200;sb.PURCHASE_SUCCESS=201;sb.PURCHASE_FAIL=202;sb.PURCHASE_RESTORE=203;sb.PURCHASE_CANCEL=204;sb.PURCHASE_PRODUCTS_VERIFIED=205;sb.PURCHASE_PRODUCT_VALIDATED=206;sb.GAME_CENTER_READY=300;sb.GAME_CENTER_SCORE=301;sb.GAME_CENTER_ACHIEVEMENT=302;sb.GAME_CENTER_ACHIEVEMENT_RESET=303;sb.GAME_CENTER_READY_FAIL=304;sb.GAME_CENTER_SCORE_FAIL=305;sb.GAME_CENTER_ACHIEVEMENT_FAIL=306;sb.GAME_CENTER_ACHIEVEMENT_RESET_FAIL=
307;sb.KEYBOARD_EVENT=400;sb.KEYBOARD_DONE=401;sb.KEYBOARD_SHOW=402;sb.KEYBOARD_HIDE=403;Cc.ALIGN_LEFT="left";Cc.ALIGN_RIGHT="right";Cc.ALIGN_CENTER="center";Cc.TEXT_SET1=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";Cc.TEXT_SET2=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ";Cc.TEXT_SET25=" !\"'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ";Cc.TEXT_SET3="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ";Cc.TEXT_SET4="ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789";
Cc.TEXT_SET5="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789";Cc.TEXT_SET6="ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ";Cc.TEXT_SET7="AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39";Cc.TEXT_SET8="0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ";Cc.TEXT_SET9="ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!";Cc.TEXT_SET10="ABCDEFGHIJKLMNOPQRSTUVWXYZ";Cc.TEXT_SET11="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789";Ti.stringBlendMap=function(a){a=new ma;a.set("add",0);a.set("alpha",1);a.set("darken",
2);a.set("difference",3);a.set("erase",4);a.set("hardlight",5);a.set("invert",6);a.set("lighten",8);a.set("multiply",9);a.set("normal",10);a.set("overlay",11);a.set("screen",12);a.set("subtract",14);return a}(this);Ed.fontCache=null;sd._storedFonts=new ma;sd.ZERO_POINT=new W;lf.fontData=" 36000000000000000000!26101010001000\"46101010100000000000000000#66010100111110010100111110010100000000$56001000111011000001101110000100%66100100000100001000010000010010000000&66011000100000011010100100011010000000'26101000000000(36010100100100010000)36100010010010100000*46000010100100101000000000+46000001001110010000000000,36000000000000010100-46000000001110000000000000.26000000001000/66000010000100001000010000100000000000056011001001010010100100110000000156011000010000100001000010000000256111000001001100100001111000000356111000001001100000101110000000456100101001010010011100001000000556111101000011100000101110000000656011001000011100100100110000000756111000001000010001100001000000856011001001001100100100110000000956011001001010010011100001000000:26001000100000;26001000101000<46001001001000010000100000=46000011100000111000000000>46100001000010010010000000?56111000001001100000000100000000@66011100100010101110101010011100000000A56011001001010010111101001000000B56111001001011100100101110000000C56011001001010000100100110000000D56111001001010010100101110000000E56111101000011000100001111000000F56111101000010000110001000000000G56011001000010110100100111000000H56100101001011110100101001000000I26101010101000J56000100001000010100100110000000K56100101001010010111001001000000L46100010001000100011100000M66100010100010110110101010100010000000N56100101001011010101101001000000O56011001001010010100100110000000P56111001001010010111001000000000Q56011001001010010100100110000010R56111001001010010111001001000000S56011101000001100000101110000000T46111001000100010001000000U56100101001010010100100110000000V56100101001010010101000100000000W66100010100010101010110110100010000000X56100101001001100100101001000000Y56100101001010010011100001001100Z56111100001001100100001111000000[36110100100100110000}46110001000010010011000000]36110010010010110000^46010010100000000000000000_46000000000000000011110000'26101000000000a56000000111010010100100111000000b56100001110010010100101110000000c46000001101000100001100000d56000100111010010100100111000000e56000000110010110110000110000000f46011010001000110010000000g5700000011001001010010011100001001100h56100001110010010100101001000000i26100010101000j37010000010010010010100k56100001001010010111001001000000l26101010101000m66000000111100101010101010101010000000n56000001110010010100101001000000o56000000110010010100100110000000p5700000111001001010010111001000010000q5700000011101001010010011100001000010r46000010101100100010000000s56000000111011000001101110000000t46100011001000100001100000u56000001001010010100100111000000v56000001001010010101000100000000w66000000101010101010101010011110000000x56000001001010010011001001000000y5700000100101001010010011100001001100z56000001111000100010001111000000{46011001001000010001100000|26101010101000}46110001000010010011000000~56010101010000000000000000000000\\46111010101010101011100000";
fl.LEFT=1;fl.RIGHT=2;fl.CENTER=3;Gd.CONTEXT_LOST="glcontextlost";Gd.CONTEXT_RESTORED="glcontextrestored";Lc.vertexShader="\n#ifdef GL_ES\n\tprecision mediump float;\n#endif\n\nattribute vec4 aVertex;\n\nattribute vec2 aTexCoord;\nvarying vec2 vTexCoord;\n\nvoid main() {\n\tvTexCoord = aTexCoord;\n\tgl_Position = vec4(aVertex.x, aVertex.y, 0.0, 1.0);\n}";Ea.IN="in";Ea.OUT="out";Ea.THROUGH="through";jd.SLIDE_UP="up";jd.SLIDE_DOWN="down";jd.SLIDE_LEFT="left";jd.SLIDE_RIGHT="right";Da.GROUP_OFFSET=1E6;
Da.manifold=new qi;ye.defaultFont=null;na.INHERIT_ID=-1E3;na.REGION_ID=-2;na.PLAYER_ID=0;na.TERRAIN_ID=1;na.DOODAD_ID=2;na.ACTOR_ID=3;ja.fixedCenter=0;ja.showWherePressed=1;ja.viewOffsetX=0;ja.viewOffsetY=0;ja.initialized=!1;$b.UNSET_ID=-1;Xi.MAX_VERTICES=200;we.muted=!1;we.masterVolume=1;Te.UNSET_ID=-1;Ue.allAnimations=[];fc.recycledCollisions=[];fc.collisionResponses=new xa;Fd.WHITE=-1;Fd.TRANSPARENT=-2;Ye.infoArray=[];dd.NO_AUTOTILE_DATA=0;dd.CORNER_TL=1;dd.CORNER_TR=2;dd.CORNER_BR=4;dd.CORNER_BL=
8;dd.SIDE_L=16;dd.SIDE_T=32;dd.SIDE_R=64;dd.SIDE_B=128;Wd.rect=new ha;Rc.TILESET_CACHE_MULTIPLIER=1E6;Rc.cacheSource=new xa;Rc.autotileFlagPointMap=function(a){a=new xa;var b=new W(-1,-1);a.h[dd.CORNER_TL]=b;b=new W(1,-1);a.h[dd.CORNER_TR]=b;b=new W(-1,1);a.h[dd.CORNER_BL]=b;b=new W(1,1);a.h[dd.CORNER_BR]=b;b=new W(0,-1);a.h[dd.SIDE_T]=b;b=new W(0,1);a.h[dd.SIDE_B]=b;b=new W(-1,0);a.h[dd.SIDE_L]=b;b=new W(1,0);a.h[dd.SIDE_R]=b;return a}(this);nb.BLACK=-16777216;nb.WHITE=-1;nb.RED=-65536;nb.GREEN=
-16711936;nb.BLUE=-16776961;nb.CYAN=-16711681;nb.MAGENTA=-65281;nb.YELLOW=-256;pa.LUMA_R=.212671;pa.LUMA_G=.71516;pa.LUMA_B=.072169;pa.LUMA_R2=.3086;pa.LUMA_G2=.6094;pa.LUMA_B2=.082;pa.INV3=.3333333333333333;Wb.BLACK=0;Wb.WHITE=16777215;Wb.RED=16711680;Wb.GREEN=65280;Wb.BLUE=255;Wb.CYAN=65535;Wb.MAGENTA=16711935;Wb.YELLOW=16776960;Re.__rootURL=window.document.URL;qg.currentDomain=new qg(null);I.INTEGER_MAX=1E8;I.NUMBER_MAX_VALUE=1.79769313486231E308;I.blackColor=-16777216;I.rate=1;I.camera=new W;
I._bitmap=new ma;I._seed=0;I._volume=1;I._pan=0;I._soundTransform=new ze;I.DEG=57.29577951308402;I.RAD=.01745329251994278;I.point=new W;I.point2=new W;I.zero=new W;I.rect=new ha;I.matrix=new Oa;I.sprite=new ga;I.collision=new fc;V._initialized=!1;Id._counter=0;Ae.VAL_ABSENT=-2147483648;Ae.EMPTY_SLOT=-1;Ae.NULL_POINTER=-1;qe.KEY_ABSENT=-2147483648;qe.VAL_ABSENT=-2147483648;qe.EMPTY_SLOT=-1;qe.NULL_POINTER=-1;Yd.USE_CACHE=!1;Yd.USE_ENUM_INDEX=!1;Yd.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";
Jd.DEFAULT_RESOLVER=ua;Jd.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";Jd.CODES=null;vg.CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";vg.BYTES=Ya.ofString(vg.CHARS);rd.count=0;Be.i64tmp=new Bb(0,0);cf.escapes=function(a){a=new ma;null!=Ab.lt?a.setReserved("lt","<"):a.h.lt="<";null!=Ab.gt?a.setReserved("gt",">"):a.h.gt=">";null!=Ab.amp?a.setReserved("amp","&"):a.h.amp="&";null!=Ab.quot?a.setReserved("quot",'"'):a.h.quot='"';null!=Ab.apos?a.setReserved("apos",
"'"):a.h.apos="'";return a}(this);q.__toStr={}.toString;qf.BYTES_PER_ELEMENT=1;N.cache=new Hl;N.libraries=new ma;N.onChange=new rc;N.initialized=!1;ib.windowID=0;Ac.images=new ma;Ac.loaders=new ma;G.NONE=0;G.FALSE=0;G.TRUE=1;G.SOURCE_RELATIVE=514;G.CONE_INNER_ANGLE=4097;G.CONE_OUTER_ANGLE=4098;G.PITCH=4099;G.POSITION=4100;G.DIRECTION=4101;G.VELOCITY=4102;G.LOOPING=4103;G.BUFFER=4105;G.GAIN=4106;G.MIN_GAIN=4109;G.MAX_GAIN=4110;G.ORIENTATION=4111;G.SOURCE_STATE=4112;G.INITIAL=4113;G.PLAYING=4114;G.PAUSED=
4115;G.STOPPED=4116;G.BUFFERS_QUEUED=4117;G.BUFFERS_PROCESSED=4118;G.REFERENCE_DISTANCE=4128;G.ROLLOFF_FACTOR=4129;G.CONE_OUTER_GAIN=4130;G.MAX_DISTANCE=4131;G.SEC_OFFSET=4132;G.SAMPLE_OFFSET=4133;G.BYTE_OFFSET=4134;G.SOURCE_TYPE=4135;G.STATIC=4136;G.STREAMING=4137;G.UNDETERMINED=4144;G.FORMAT_MONO8=4352;G.FORMAT_MONO16=4353;G.FORMAT_STEREO8=4354;G.FORMAT_STEREO16=4355;G.FREQUENCY=8193;G.BITS=8194;G.CHANNELS=8195;G.SIZE=8196;G.NO_ERROR=0;G.INVALID_NAME=40961;G.INVALID_ENUM=40962;G.INVALID_VALUE=40963;
G.INVALID_OPERATION=40964;G.OUT_OF_MEMORY=40965;G.VENDOR=45057;G.VERSION=45058;G.RENDERER=45059;G.EXTENSIONS=45060;G.DOPPLER_FACTOR=49152;G.SPEED_OF_SOUND=49155;G.DOPPLER_VELOCITY=49153;G.DISTANCE_MODEL=53248;G.INVERSE_DISTANCE=53249;G.INVERSE_DISTANCE_CLAMPED=53250;G.LINEAR_DISTANCE=53251;G.LINEAR_DISTANCE_CLAMPED=53252;G.EXPONENT_DISTANCE=53253;G.EXPONENT_DISTANCE_CLAMPED=53254;ya.FALSE=0;ya.TRUE=1;ya.FREQUENCY=4103;ya.REFRESH=4104;ya.SYNC=4105;ya.MONO_SOURCES=4112;ya.STEREO_SOURCES=4113;ya.NO_ERROR=
0;ya.INVALID_DEVICE=40961;ya.INVALID_CONTEXT=40962;ya.INVALID_ENUM=40963;ya.INVALID_VALUE=40964;ya.OUT_OF_MEMORY=40965;ya.ATTRIBUTES_SIZE=4098;ya.ALL_ATTRIBUTES=4099;ya.DEFAULT_DEVICE_SPECIFIER=4100;ya.DEVICE_SPECIFIER=4101;ya.EXTENSIONS=4102;ya.ENUMERATE_ALL_EXT=1;ya.DEFAULT_ALL_DEVICES_SPECIFIER=4114;ya.ALL_DEVICES_SPECIFIER=4115;pb.__base64Chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";Xl.FT_LOAD_FORCE_AUTOHINT=32;m.DEPTH_BUFFER_BIT=256;m.STENCIL_BUFFER_BIT=1024;m.COLOR_BUFFER_BIT=
16384;m.POINTS=0;m.LINES=1;m.LINE_LOOP=2;m.LINE_STRIP=3;m.TRIANGLES=4;m.TRIANGLE_STRIP=5;m.TRIANGLE_FAN=6;m.ZERO=0;m.ONE=1;m.SRC_COLOR=768;m.ONE_MINUS_SRC_COLOR=769;m.SRC_ALPHA=770;m.ONE_MINUS_SRC_ALPHA=771;m.DST_ALPHA=772;m.ONE_MINUS_DST_ALPHA=773;m.DST_COLOR=774;m.ONE_MINUS_DST_COLOR=775;m.SRC_ALPHA_SATURATE=776;m.FUNC_ADD=32774;m.BLEND_EQUATION=32777;m.BLEND_EQUATION_RGB=32777;m.BLEND_EQUATION_ALPHA=34877;m.FUNC_SUBTRACT=32778;m.FUNC_REVERSE_SUBTRACT=32779;m.BLEND_DST_RGB=32968;m.BLEND_SRC_RGB=
32969;m.BLEND_DST_ALPHA=32970;m.BLEND_SRC_ALPHA=32971;m.CONSTANT_COLOR=32769;m.ONE_MINUS_CONSTANT_COLOR=32770;m.CONSTANT_ALPHA=32771;m.ONE_MINUS_CONSTANT_ALPHA=32772;m.BLEND_COLOR=32773;m.ARRAY_BUFFER=34962;m.ELEMENT_ARRAY_BUFFER=34963;m.ARRAY_BUFFER_BINDING=34964;m.ELEMENT_ARRAY_BUFFER_BINDING=34965;m.STREAM_DRAW=35040;m.STATIC_DRAW=35044;m.DYNAMIC_DRAW=35048;m.BUFFER_SIZE=34660;m.BUFFER_USAGE=34661;m.CURRENT_VERTEX_ATTRIB=34342;m.FRONT=1028;m.BACK=1029;m.FRONT_AND_BACK=1032;m.CULL_FACE=2884;m.BLEND=
3042;m.DITHER=3024;m.STENCIL_TEST=2960;m.DEPTH_TEST=2929;m.SCISSOR_TEST=3089;m.POLYGON_OFFSET_FILL=32823;m.SAMPLE_ALPHA_TO_COVERAGE=32926;m.SAMPLE_COVERAGE=32928;m.NO_ERROR=0;m.INVALID_ENUM=1280;m.INVALID_VALUE=1281;m.INVALID_OPERATION=1282;m.OUT_OF_MEMORY=1285;m.CW=2304;m.CCW=2305;m.LINE_WIDTH=2849;m.ALIASED_POINT_SIZE_RANGE=33901;m.ALIASED_LINE_WIDTH_RANGE=33902;m.CULL_FACE_MODE=2885;m.FRONT_FACE=2886;m.DEPTH_RANGE=2928;m.DEPTH_WRITEMASK=2930;m.DEPTH_CLEAR_VALUE=2931;m.DEPTH_FUNC=2932;m.STENCIL_CLEAR_VALUE=
2961;m.STENCIL_FUNC=2962;m.STENCIL_FAIL=2964;m.STENCIL_PASS_DEPTH_FAIL=2965;m.STENCIL_PASS_DEPTH_PASS=2966;m.STENCIL_REF=2967;m.STENCIL_VALUE_MASK=2963;m.STENCIL_WRITEMASK=2968;m.STENCIL_BACK_FUNC=34816;m.STENCIL_BACK_FAIL=34817;m.STENCIL_BACK_PASS_DEPTH_FAIL=34818;m.STENCIL_BACK_PASS_DEPTH_PASS=34819;m.STENCIL_BACK_REF=36003;m.STENCIL_BACK_VALUE_MASK=36004;m.STENCIL_BACK_WRITEMASK=36005;m.VIEWPORT=2978;m.SCISSOR_BOX=3088;m.COLOR_CLEAR_VALUE=3106;m.COLOR_WRITEMASK=3107;m.UNPACK_ALIGNMENT=3317;m.PACK_ALIGNMENT=
3333;m.MAX_TEXTURE_SIZE=3379;m.MAX_VIEWPORT_DIMS=3386;m.SUBPIXEL_BITS=3408;m.RED_BITS=3410;m.GREEN_BITS=3411;m.BLUE_BITS=3412;m.ALPHA_BITS=3413;m.DEPTH_BITS=3414;m.STENCIL_BITS=3415;m.POLYGON_OFFSET_UNITS=10752;m.POLYGON_OFFSET_FACTOR=32824;m.TEXTURE_BINDING_2D=32873;m.SAMPLE_BUFFERS=32936;m.SAMPLES=32937;m.SAMPLE_COVERAGE_VALUE=32938;m.SAMPLE_COVERAGE_INVERT=32939;m.COMPRESSED_TEXTURE_FORMATS=34467;m.DONT_CARE=4352;m.FASTEST=4353;m.NICEST=4354;m.GENERATE_MIPMAP_HINT=33170;m.BYTE=5120;m.UNSIGNED_BYTE=
5121;m.SHORT=5122;m.UNSIGNED_SHORT=5123;m.INT=5124;m.UNSIGNED_INT=5125;m.FLOAT=5126;m.DEPTH_COMPONENT=6402;m.ALPHA=6406;m.RGB=6407;m.RGBA=6408;m.BGR_EXT=32992;m.BGRA_EXT=32993;m.LUMINANCE=6409;m.LUMINANCE_ALPHA=6410;m.UNSIGNED_SHORT_4_4_4_4=32819;m.UNSIGNED_SHORT_5_5_5_1=32820;m.UNSIGNED_SHORT_5_6_5=33635;m.FRAGMENT_SHADER=35632;m.VERTEX_SHADER=35633;m.MAX_VERTEX_ATTRIBS=34921;m.MAX_VERTEX_UNIFORM_VECTORS=36347;m.MAX_VARYING_VECTORS=36348;m.MAX_COMBINED_TEXTURE_IMAGE_UNITS=35661;m.MAX_VERTEX_TEXTURE_IMAGE_UNITS=
35660;m.MAX_TEXTURE_IMAGE_UNITS=34930;m.MAX_FRAGMENT_UNIFORM_VECTORS=36349;m.SHADER_TYPE=35663;m.DELETE_STATUS=35712;m.LINK_STATUS=35714;m.VALIDATE_STATUS=35715;m.ATTACHED_SHADERS=35717;m.ACTIVE_UNIFORMS=35718;m.ACTIVE_ATTRIBUTES=35721;m.SHADING_LANGUAGE_VERSION=35724;m.CURRENT_PROGRAM=35725;m.NEVER=512;m.LESS=513;m.EQUAL=514;m.LEQUAL=515;m.GREATER=516;m.NOTEQUAL=517;m.GEQUAL=518;m.ALWAYS=519;m.KEEP=7680;m.REPLACE=7681;m.INCR=7682;m.DECR=7683;m.INVERT=5386;m.INCR_WRAP=34055;m.DECR_WRAP=34056;m.VENDOR=
7936;m.RENDERER=7937;m.VERSION=7938;m.NEAREST=9728;m.LINEAR=9729;m.NEAREST_MIPMAP_NEAREST=9984;m.LINEAR_MIPMAP_NEAREST=9985;m.NEAREST_MIPMAP_LINEAR=9986;m.LINEAR_MIPMAP_LINEAR=9987;m.TEXTURE_MAG_FILTER=10240;m.TEXTURE_MIN_FILTER=10241;m.TEXTURE_WRAP_S=10242;m.TEXTURE_WRAP_T=10243;m.TEXTURE_2D=3553;m.TEXTURE=5890;m.TEXTURE_CUBE_MAP=34067;m.TEXTURE_BINDING_CUBE_MAP=34068;m.TEXTURE_CUBE_MAP_POSITIVE_X=34069;m.TEXTURE_CUBE_MAP_NEGATIVE_X=34070;m.TEXTURE_CUBE_MAP_POSITIVE_Y=34071;m.TEXTURE_CUBE_MAP_NEGATIVE_Y=
34072;m.TEXTURE_CUBE_MAP_POSITIVE_Z=34073;m.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074;m.MAX_CUBE_MAP_TEXTURE_SIZE=34076;m.TEXTURE0=33984;m.TEXTURE1=33985;m.TEXTURE2=33986;m.TEXTURE3=33987;m.TEXTURE4=33988;m.TEXTURE5=33989;m.TEXTURE6=33990;m.TEXTURE7=33991;m.TEXTURE8=33992;m.TEXTURE9=33993;m.TEXTURE10=33994;m.TEXTURE11=33995;m.TEXTURE12=33996;m.TEXTURE13=33997;m.TEXTURE14=33998;m.TEXTURE15=33999;m.TEXTURE16=34E3;m.TEXTURE17=34001;m.TEXTURE18=34002;m.TEXTURE19=34003;m.TEXTURE20=34004;m.TEXTURE21=34005;m.TEXTURE22=
34006;m.TEXTURE23=34007;m.TEXTURE24=34008;m.TEXTURE25=34009;m.TEXTURE26=34010;m.TEXTURE27=34011;m.TEXTURE28=34012;m.TEXTURE29=34013;m.TEXTURE30=34014;m.TEXTURE31=34015;m.ACTIVE_TEXTURE=34016;m.REPEAT=10497;m.CLAMP_TO_EDGE=33071;m.MIRRORED_REPEAT=33648;m.FLOAT_VEC2=35664;m.FLOAT_VEC3=35665;m.FLOAT_VEC4=35666;m.INT_VEC2=35667;m.INT_VEC3=35668;m.INT_VEC4=35669;m.BOOL=35670;m.BOOL_VEC2=35671;m.BOOL_VEC3=35672;m.BOOL_VEC4=35673;m.FLOAT_MAT2=35674;m.FLOAT_MAT3=35675;m.FLOAT_MAT4=35676;m.SAMPLER_2D=35678;
m.SAMPLER_CUBE=35680;m.VERTEX_ATTRIB_ARRAY_ENABLED=34338;m.VERTEX_ATTRIB_ARRAY_SIZE=34339;m.VERTEX_ATTRIB_ARRAY_STRIDE=34340;m.VERTEX_ATTRIB_ARRAY_TYPE=34341;m.VERTEX_ATTRIB_ARRAY_NORMALIZED=34922;m.VERTEX_ATTRIB_ARRAY_POINTER=34373;m.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING=34975;m.VERTEX_PROGRAM_POINT_SIZE=34370;m.POINT_SPRITE=34913;m.COMPILE_STATUS=35713;m.LOW_FLOAT=36336;m.MEDIUM_FLOAT=36337;m.HIGH_FLOAT=36338;m.LOW_INT=36339;m.MEDIUM_INT=36340;m.HIGH_INT=36341;m.FRAMEBUFFER=36160;m.RENDERBUFFER=36161;
m.RGBA4=32854;m.RGB5_A1=32855;m.RGB565=36194;m.DEPTH_COMPONENT16=33189;m.STENCIL_INDEX=6401;m.STENCIL_INDEX8=36168;m.DEPTH_STENCIL=34041;m.RENDERBUFFER_WIDTH=36162;m.RENDERBUFFER_HEIGHT=36163;m.RENDERBUFFER_INTERNAL_FORMAT=36164;m.RENDERBUFFER_RED_SIZE=36176;m.RENDERBUFFER_GREEN_SIZE=36177;m.RENDERBUFFER_BLUE_SIZE=36178;m.RENDERBUFFER_ALPHA_SIZE=36179;m.RENDERBUFFER_DEPTH_SIZE=36180;m.RENDERBUFFER_STENCIL_SIZE=36181;m.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE=36048;m.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME=36049;
m.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL=36050;m.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE=36051;m.COLOR_ATTACHMENT0=36064;m.DEPTH_ATTACHMENT=36096;m.STENCIL_ATTACHMENT=36128;m.DEPTH_STENCIL_ATTACHMENT=33306;m.NONE=0;m.FRAMEBUFFER_COMPLETE=36053;m.FRAMEBUFFER_INCOMPLETE_ATTACHMENT=36054;m.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT=36055;m.FRAMEBUFFER_INCOMPLETE_DIMENSIONS=36057;m.FRAMEBUFFER_UNSUPPORTED=36061;m.FRAMEBUFFER_BINDING=36006;m.RENDERBUFFER_BINDING=36007;m.MAX_RENDERBUFFER_SIZE=34024;m.INVALID_FRAMEBUFFER_OPERATION=
1286;m.UNPACK_FLIP_Y_WEBGL=37440;m.UNPACK_PREMULTIPLY_ALPHA_WEBGL=37441;m.CONTEXT_LOST_WEBGL=37442;m.UNPACK_COLORSPACE_CONVERSION_WEBGL=37443;m.BROWSER_DEFAULT_WEBGL=37444;fb.__identity=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];xe.__identity=new xe;aa.__identity=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];$d.GLOBAL_SSL=1;$d.GLOBAL_WIN32=2;$d.GLOBAL_ALL=3;$d.GLOBAL_NOTHING=0;$d.GLOBAL_DEFAULT=3;$d.GLOBAL_ACK_EINTR=4;zg.MESSAGE_COMPLETE="__COMPLETE__";zg.MESSAGE_ERROR="__ERROR__";xd.__moduleNames=null;be.INVALID=
0;be.LEFT_TO_RIGHT=4;be.RIGHT_TO_LEFT=5;be.TOP_TO_BOTTOM=6;be.BOTTOM_TO_TOP=7;U.COMMON="Zyyy";U.INHERITED="Zinh";U.UNKNOWN="Zzzz";U.ARABIC="Arab";U.ARMENIAN="Armn";U.BENGALI="Beng";U.CYRILLIC="Cyrl";U.DEVANAGARI="Deva";U.GEORGIAN="Geor";U.GREEK="Grek";U.GUJARATI="Gujr";U.GURMUKHI="Guru";U.HANGUL="Hang";U.HAN="Hani";U.HEBREW="Hebr";U.HIRAGANA="Hira";U.KANNADA="Knda";U.KATAKANA="Kana";U.LAO="Laoo";U.LATIN="Latn";U.MALAYALAM="Mlym";U.ORIYA="Orya";U.TAMIL="Taml";U.TELUGA="Telu";U.THAI="Thai";U.TIBETAN=
"Tibt";U.BOPOMOFO="Bopo";U.BRAILLE="Brai";U.CANADIAN_SYLLABICS="Cans";U.CHEROKEE="Cher";U.ETHIOPIC="Ethi";U.KHMER="Khmr";U.MONGOLIAN="Mong";U.MYANMAR="Mymr";U.OGHAM="Ogam";U.RUNIC="Runr";U.SINHALA="Sinh";U.SYRIAC="Syrc";U.THAANA="Thaa";U.YI="Yiii";U.DESERET="Dsrt";U.GOTHIC="Goth";U.OLD_ITALIC="Ital";U.BUHID="Buhd";U.HANUNOO="Hano";U.TAGALOG="Tglg";U.TAGBANWA="Tagb";U.CYPRIOT="Cprt";U.LIMBU="Limb";U.LINEAR_B="Linb";U.OSMANYA="Osma";U.SHAVIAN="Shaw";U.TAI_LE="Tale";U.UGARITIC="Ugar";U.BUGINESE="Bugi";
U.COPTIC="Copt";U.GLAGOLITIC="Glag";U.KHAROSHTHI="Khar";U.NEW_TAI_LUE="Talu";U.OLD_PERSIAN="Xpeo";U.SYLOTI_NAGRI="Sylo";U.TIFINAGH="Tfng";U.BALINESE="Bali";U.CUNEIFORM="Xsux";U.NKO="Nkoo";U.PHAGS_PA="Phag";U.PHOENICIAN="Phnx";U.CARIAN="Cari";U.CHAM="Cham";U.KAYAH_LI="Kali";U.LEPCHA="Lepc";U.LYCIAN="Lyci";U.LYDIAN="Lydi";U.OL_CHIKI="Olck";U.REJANG="Rjng";U.SAURASHTRA="Saur";U.SUNDANESE="Sund";U.VAI="Vaii";U.AVESTAN="Avst";U.BAMUM="Bamu";U.EGYPTIAN_HIEROGLYPHS="Egyp";U.IMPERIAL_ARAMAIC="Armi";U.INSCRIPTIONAL_PAHLAVI=
"Phli";U.INSCRIPTIONAL_PARTHIAN="Prti";U.JAVANESE="Java";U.KAITHI="Kthi";U.LISU="Lisu";U.MEETEI_MAYEK="Mtei";U.OLD_SOUTH_ARABIAN="Sarb";U.OLD_TURKIC="Orkh";U.SAMARITAN="Samr";U.TAI_THAM="Lana";U.TAI_VIET="Tavt";U.BATAK="Batk";U.BRAHMI="Brah";U.MANDAIC="Mand";U.CHAKMA="Cakm";U.MEROITIC_CURSIVE="Merc";U.MEROITIC_HIEROGLYPHS="Mero";U.MIAO="Plrd";U.SHARADA="Shrd";U.SORA_SOMPENG="Sora";U.TAKRI="Takr";U.BASSA_VAH="Bass";U.CAUCASIAN_ALBANIAN="Aghb";U.DUPLOYAN="Dupl";U.ELBASAN="Elba";U.GRANTHA="Gran";U.KHOJKI=
"Khoj";U.KHUDAWADI="Sind";U.LINEAR_A="Lina";U.MAHAJANI="Mahj";U.MANICHAEAN="Mani";U.MENDE_KIKAKUI="Mend";U.MODI="Modi";U.MRO="Mroo";U.NABATAEAN="Nbat";U.OLD_NORTH_ARABIAN="Narb";U.OLD_PERMIC="Perm";U.PAHAWH_HMONG="Hmng";U.PALMYRENE="Palm";U.PAU_CIN_HAU="Pauc";U.PSALTER_PAHLAVI="Phlp";U.SIDDHAM="Sidd";U.TIRHUTA="Tirh";U.WARANG_CITI="Wara";Mc.devices=new xa;Mc.onConnect=new Ql;Vf.LEFT_X=0;Vf.LEFT_Y=1;Vf.RIGHT_X=2;Vf.RIGHT_Y=3;Vf.TRIGGER_LEFT=4;Vf.TRIGGER_RIGHT=5;od.A=0;od.B=1;od.X=2;od.Y=3;od.BACK=
4;od.GUIDE=5;od.START=6;od.LEFT_STICK=7;od.RIGHT_STICK=8;od.LEFT_SHOULDER=9;od.RIGHT_SHOULDER=10;od.DPAD_UP=11;od.DPAD_DOWN=12;od.DPAD_LEFT=13;od.DPAD_RIGHT=14;ic.devices=new xa;ic.onConnect=new Rl;Dc.CENTER=0;Dc.DOWN=4;Dc.LEFT=8;Dc.RIGHT=2;Dc.UP=1;Dc.DOWN_LEFT=12;Dc.DOWN_RIGHT=6;Dc.UP_LEFT=9;Dc.UP_RIGHT=3;C.UNKNOWN=0;C.BACKSPACE=8;C.TAB=9;C.RETURN=13;C.ESCAPE=27;C.SPACE=32;C.EXCLAMATION=33;C.QUOTE=34;C.HASH=35;C.DOLLAR=36;C.PERCENT=37;C.AMPERSAND=38;C.SINGLE_QUOTE=39;C.LEFT_PARENTHESIS=40;C.RIGHT_PARENTHESIS=
41;C.ASTERISK=42;C.PLUS=43;C.COMMA=44;C.MINUS=45;C.PERIOD=46;C.SLASH=47;C.NUMBER_0=48;C.NUMBER_1=49;C.NUMBER_2=50;C.NUMBER_3=51;C.NUMBER_4=52;C.NUMBER_5=53;C.NUMBER_6=54;C.NUMBER_7=55;C.NUMBER_8=56;C.NUMBER_9=57;C.COLON=58;C.SEMICOLON=59;C.LESS_THAN=60;C.EQUALS=61;C.GREATER_THAN=62;C.QUESTION=63;C.AT=64;C.LEFT_BRACKET=91;C.BACKSLASH=92;C.RIGHT_BRACKET=93;C.CARET=94;C.UNDERSCORE=95;C.GRAVE=96;C.A=97;C.B=98;C.C=99;C.D=100;C.E=101;C.F=102;C.G=103;C.H=104;C.I=105;C.J=106;C.K=107;C.L=108;C.M=109;C.N=110;
C.O=111;C.P=112;C.Q=113;C.R=114;C.S=115;C.T=116;C.U=117;C.V=118;C.W=119;C.X=120;C.Y=121;C.Z=122;C.DELETE=127;C.CAPS_LOCK=1073741881;C.F1=1073741882;C.F2=1073741883;C.F3=1073741884;C.F4=1073741885;C.F5=1073741886;C.F6=1073741887;C.F7=1073741888;C.F8=1073741889;C.F9=1073741890;C.F10=1073741891;C.F11=1073741892;C.F12=1073741893;C.PRINT_SCREEN=1073741894;C.SCROLL_LOCK=1073741895;C.PAUSE=1073741896;C.INSERT=1073741897;C.HOME=1073741898;C.PAGE_UP=1073741899;C.END=1073741901;C.PAGE_DOWN=1073741902;C.RIGHT=
1073741903;C.LEFT=1073741904;C.DOWN=1073741905;C.UP=1073741906;C.NUM_LOCK=1073741907;C.NUMPAD_DIVIDE=1073741908;C.NUMPAD_MULTIPLY=1073741909;C.NUMPAD_MINUS=1073741910;C.NUMPAD_PLUS=1073741911;C.NUMPAD_ENTER=1073741912;C.NUMPAD_1=1073741913;C.NUMPAD_2=1073741914;C.NUMPAD_3=1073741915;C.NUMPAD_4=1073741916;C.NUMPAD_5=1073741917;C.NUMPAD_6=1073741918;C.NUMPAD_7=1073741919;C.NUMPAD_8=1073741920;C.NUMPAD_9=1073741921;C.NUMPAD_0=1073741922;C.NUMPAD_PERIOD=1073741923;C.APPLICATION=1073741925;C.POWER=1073741926;
C.NUMPAD_EQUALS=1073741927;C.F13=1073741928;C.F14=1073741929;C.F15=1073741930;C.F16=1073741931;C.F17=1073741932;C.F18=1073741933;C.F19=1073741934;C.F20=1073741935;C.F21=1073741936;C.F22=1073741937;C.F23=1073741938;C.F24=1073741939;C.EXECUTE=1073741940;C.HELP=1073741941;C.MENU=1073741942;C.SELECT=1073741943;C.STOP=1073741944;C.AGAIN=1073741945;C.UNDO=1073741946;C.CUT=1073741947;C.COPY=1073741948;C.PASTE=1073741949;C.FIND=1073741950;C.MUTE=1073741951;C.VOLUME_UP=1073741952;C.VOLUME_DOWN=1073741953;
C.NUMPAD_COMMA=1073741957;C.ALT_ERASE=1073741977;C.SYSTEM_REQUEST=1073741978;C.CANCEL=1073741979;C.CLEAR=1073741980;C.PRIOR=1073741981;C.RETURN2=1073741982;C.SEPARATOR=1073741983;C.OUT=1073741984;C.OPER=1073741985;C.CLEAR_AGAIN=1073741986;C.CRSEL=1073741987;C.EXSEL=1073741988;C.NUMPAD_00=1073742E3;C.NUMPAD_000=1073742001;C.THOUSAND_SEPARATOR=1073742002;C.DECIMAL_SEPARATOR=1073742003;C.CURRENCY_UNIT=1073742004;C.CURRENCY_SUBUNIT=1073742005;C.NUMPAD_LEFT_PARENTHESIS=1073742006;C.NUMPAD_RIGHT_PARENTHESIS=
1073742007;C.NUMPAD_LEFT_BRACE=1073742008;C.NUMPAD_RIGHT_BRACE=1073742009;C.NUMPAD_TAB=1073742010;C.NUMPAD_BACKSPACE=1073742011;C.NUMPAD_A=1073742012;C.NUMPAD_B=1073742013;C.NUMPAD_C=1073742014;C.NUMPAD_D=1073742015;C.NUMPAD_E=1073742016;C.NUMPAD_F=1073742017;C.NUMPAD_XOR=1073742018;C.NUMPAD_POWER=1073742019;C.NUMPAD_PERCENT=1073742020;C.NUMPAD_LESS_THAN=1073742021;C.NUMPAD_GREATER_THAN=1073742022;C.NUMPAD_AMPERSAND=1073742023;C.NUMPAD_DOUBLE_AMPERSAND=1073742024;C.NUMPAD_VERTICAL_BAR=1073742025;
C.NUMPAD_DOUBLE_VERTICAL_BAR=1073742026;C.NUMPAD_COLON=1073742027;C.NUMPAD_HASH=1073742028;C.NUMPAD_SPACE=1073742029;C.NUMPAD_AT=1073742030;C.NUMPAD_EXCLAMATION=1073742031;C.NUMPAD_MEM_STORE=1073742032;C.NUMPAD_MEM_RECALL=1073742033;C.NUMPAD_MEM_CLEAR=1073742034;C.NUMPAD_MEM_ADD=1073742035;C.NUMPAD_MEM_SUBTRACT=1073742036;C.NUMPAD_MEM_MULTIPLY=1073742037;C.NUMPAD_MEM_DIVIDE=1073742038;C.NUMPAD_PLUS_MINUS=1073742039;C.NUMPAD_CLEAR=1073742040;C.NUMPAD_CLEAR_ENTRY=1073742041;C.NUMPAD_BINARY=1073742042;
C.NUMPAD_OCTAL=1073742043;C.NUMPAD_DECIMAL=1073742044;C.NUMPAD_HEXADECIMAL=1073742045;C.LEFT_CTRL=1073742048;C.LEFT_SHIFT=1073742049;C.LEFT_ALT=1073742050;C.LEFT_META=1073742051;C.RIGHT_CTRL=1073742052;C.RIGHT_SHIFT=1073742053;C.RIGHT_ALT=1073742054;C.RIGHT_META=1073742055;C.MODE=1073742081;C.AUDIO_NEXT=1073742082;C.AUDIO_PREVIOUS=1073742083;C.AUDIO_STOP=1073742084;C.AUDIO_PLAY=1073742085;C.AUDIO_MUTE=1073742086;C.MEDIA_SELECT=1073742087;C.WWW=1073742088;C.MAIL=1073742089;C.CALCULATOR=1073742090;
C.COMPUTER=1073742091;C.APP_CONTROL_SEARCH=1073742092;C.APP_CONTROL_HOME=1073742093;C.APP_CONTROL_BACK=1073742094;C.APP_CONTROL_FORWARD=1073742095;C.APP_CONTROL_STOP=1073742096;C.APP_CONTROL_REFRESH=1073742097;C.APP_CONTROL_BOOKMARKS=1073742098;C.BRIGHTNESS_DOWN=1073742099;C.BRIGHTNESS_UP=1073742100;C.DISPLAY_SWITCH=1073742101;C.BACKLIGHT_TOGGLE=1073742102;C.BACKLIGHT_DOWN=1073742103;C.BACKLIGHT_UP=1073742104;C.EJECT=1073742105;C.SLEEP=1073742106;db.NONE=0;db.LEFT_SHIFT=1;db.RIGHT_SHIFT=2;db.LEFT_CTRL=
64;db.RIGHT_CTRL=128;db.LEFT_ALT=256;db.RIGHT_ALT=512;db.LEFT_META=1024;db.RIGHT_META=2048;db.NUM_LOCK=4096;db.CAPS_LOCK=8192;db.MODE=16384;db.CTRL=192;db.SHIFT=3;db.ALT=768;db.META=3072;Zd.onEnd=new Dh;Zd.onMove=new Dh;Zd.onStart=new Dh;uc.cffi_lime_bytes_from_data_pointer=xd.load("lime","lime_bytes_from_data_pointer",2,!1);uc.cffi_lime_bytes_get_data_pointer=xd.load("lime","lime_bytes_get_data_pointer",1,!1);uc.cffi_lime_bytes_read_file=xd.load("lime","lime_bytes_read_file",1,!1);Ag.BYTES_PER_ELEMENT=
4;Bg.BYTES_PER_ELEMENT=2;Cg.BYTES_PER_ELEMENT=4;Dg.BYTES_PER_ELEMENT=2;Eg.BYTES_PER_ELEMENT=4;Fg.BYTES_PER_ELEMENT=1;rb.actuators=[];rb.actuatorsLength=0;rb.addedEvent=!1;ea.defaultActuator=rb;ea.defaultEase=Eh.get_easeOut();ea.targetLibraries=new rd;R.cache=new bk;R.dispatcher=new Va;ka.current=new Ih;ka.__sentWarnings=new ma;qc.SIN45=.7071067811865476;qc.TAN22=.41421356237309503;E.SIN45=.7071067811865476;E.TAN22=.41421356237309503;E.fillCommands=new tf;E.strokeCommands=new tf;v.SIN45=.7071067811865476;
v.TAN22=.41421356237309503;v.fillCommands=new tf;v.strokeCommands=new tf;Ic.fbData=[];Pc.glContextId=0;Pc.glContexts=[];Ob.UID=0;$f.VERTEX_SRC=["attribute vec2 openfl_aPosition;","attribute vec2 openfl_aTexCoord0;","attribute vec4 openfl_aColor;","uniform mat3 openfl_uProjectionMatrix;","uniform bool openfl_uUseColorTransform;","varying vec2 openfl_vTexCoord;","varying vec4 openfl_vColor;","void main(void) {","   gl_Position = vec4((openfl_uProjectionMatrix * vec3(openfl_aPosition, 1.0)).xy, 0.0, 1.0);",
"   openfl_vTexCoord = openfl_aTexCoord0;","   if(openfl_uUseColorTransform)","   \topenfl_vColor = openfl_aColor;","   else","   \topenfl_vColor = vec4(openfl_aColor.rgb * openfl_aColor.a, openfl_aColor.a);","}"];t.__currentWinding=0;t.__fillIndex=0;Q.fillVertexAttributes=[new de(2,5126,!1,"openfl_aPosition")];Q.drawTrianglesVertexAttributes=[new de(2,5126,!1,"openfl_aPosition"),new de(2,5126,!1,"openfl_aTexCoord0"),new de(4,5121,!0,"openfl_aColor")];Q.primitiveVertexAttributes=[new de(2,5126,!1,
"openfl_aPosition"),new de(4,5126,!1,"openfl_aColor")];Q.graphicsDataPool=[];Q.bucketPool=[];Q.SIN45=.7071067811865476;Q.TAN22=.41421356237309503;Q.objectPosition=new W;Q.objectBounds=new ha;Kh.compiledShadersCache=new ma;gk.VERTS_PER_SPRITE=4;ob.UTF8_TAB=9;ob.UTF8_ENDLINE=10;ob.UTF8_SPACE=32;ob.UTF8_HYPHEN=45;ob.__defaultFonts=new ma;Ba.__isGLES=null;Sc.ADD=0;Sc.ALPHA=1;Sc.DARKEN=2;Sc.DIFFERENCE=3;Sc.ERASE=4;Sc.HARDLIGHT=5;Sc.INVERT=6;Sc.LAYER=7;Sc.LIGHTEN=8;Sc.MULTIPLY=9;Sc.NORMAL=10;Sc.OVERLAY=
11;Sc.SCREEN=12;Sc.SHADER=13;Sc.SUBTRACT=14;Jg.NONE=0;Jg.ROUND=1;Jg.SQUARE=2;rk.LINEAR=0;rk.RADIAL=1;jc.TILE_SCALE=1;jc.TILE_ROTATION=2;jc.TILE_RGB=4;jc.TILE_ALPHA=8;jc.TILE_TRANS_2x2=16;jc.TILE_RECT=32;jc.TILE_ORIGIN=64;jc.TILE_BLEND_NORMAL=0;jc.TILE_BLEND_ADD=65536;jc.TILE_BLEND_MULTIPLY=131072;jc.TILE_BLEND_SCREEN=262144;jc.TILE_BLEND_SUBTRACT=524288;jc.TILE_BLEND_DARKEN=1048576;jc.TILE_BLEND_LIGHTEN=2097152;jc.TILE_BLEND_OVERLAY=4194304;jc.TILE_BLEND_HARDLIGHT=8388608;jc.TILE_BLEND_DIFFERENCE=
16777216;jc.TILE_BLEND_INVERT=33554432;wk.LINEAR_RGB=0;wk.RGB=1;Ig.BEVEL=0;Ig.MITER=1;Ig.ROUND=2;Ng.HORIZONTAL=0;Ng.NONE=1;Ng.NORMAL=2;Ng.VERTICAL=3;Qh.ALWAYS=0;Qh.AUTO=1;Qh.NEVER=2;Wa.uniformRegex=new Rd("^\\s*uniform\\s+(sampler(?:2D|Cube)|[bi]?vec[234]|float|int|bool|mat[234])\\s+(\\w+)\\s*(?:\\[(\\d+)\\])?\\s*;.*$","gmi");Wa.aPosition="openfl_aPosition";Wa.aTexCoord="openfl_aTexCoord0";Wa.aColor="openfl_aColor";Wa.uSampler="openfl_uSampler0";Wa.uProjectionMatrix="openfl_uProjectionMatrix";Wa.uColorMultiplier=
"openfl_uColorMultiplier";Wa.uColorOffset="openfl_uColorOffset";Wa.uObjectSize="openfl_uObjectSize";Wa.uTextureSize="openfl_uTextureSize";Wa.vTexCoord="openfl_vTexCoord";Wa.vColor="openfl_vColor";Wa.vertexHeader=["attribute vec2 "+Wa.aPosition+";","attribute vec2 "+Wa.aTexCoord+";","attribute vec4 "+Wa.aColor+";","uniform mat3 "+Wa.uProjectionMatrix+";","uniform vec2 "+Wa.uObjectSize+";","uniform vec2 "+Wa.uTextureSize+";","varying vec2 "+Wa.vTexCoord+";","varying vec4 "+Wa.vColor+";"];Wa.fragmentHeader=
["uniform sampler2D "+Wa.uSampler+";","uniform vec4 "+Wa.uColorMultiplier+";","uniform vec4 "+Wa.uColorOffset+";","uniform vec2 "+Wa.uObjectSize+";","uniform vec2 "+Wa.uTextureSize+";","varying vec2 "+Wa.vTexCoord+";","varying vec4 "+Wa.vColor+";","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;","}"];Rh.PAD=0;Rh.REFLECT=1;Rh.REPEAT=2;Me.BOTTOM=0;Me.BOTTOM_LEFT=1;Me.BOTTOM_RIGHT=2;Me.LEFT=3;Me.RIGHT=4;Me.TOP=5;Me.TOP_LEFT=6;Me.TOP_RIGHT=7;Th.FULL_SCREEN=0;Th.FULL_SCREEN_INTERACTIVE=1;Th.NORMAL=2;Pg.BEST=0;Pg.HIGH=1;Pg.LOW=2;Pg.MEDIUM=3;Qg.EXACT_FIT=0;Qg.NO_BORDER=1;Qg.NO_SCALE=2;Qg.SHOW_ALL=3;vc.TILE_SCALE=1;vc.TILE_ROTATION=2;vc.TILE_RGB=4;vc.TILE_ALPHA=8;vc.TILE_TRANS_2x2=16;vc.TILE_RECT=32;vc.TILE_ORIGIN=64;vc.TILE_TRANS_COLOR=
128;vc.TILE_BLEND_NORMAL=0;vc.TILE_BLEND_ADD=65536;vc.TILE_BLEND_MULTIPLY=131072;vc.TILE_BLEND_SCREEN=262144;vc.TILE_BLEND_SUBTRACT=524288;vc.TILE_BLEND_DARKEN=1048576;vc.TILE_BLEND_LIGHTEN=2097152;vc.TILE_BLEND_OVERLAY=4194304;vc.TILE_BLEND_HARDLIGHT=8388608;vc.TILE_BLEND_DIFFERENCE=16777216;vc.TILE_BLEND_INVERT=33554432;vc.__defaultPoint=new W(0,0);Uh.NEGATIVE=0;Uh.NONE=1;Uh.POSITIVE=2;ta.TEXTURE_MAX_ANISOTROPY_EXT=34046;ta.MAX_SAMPLERS=8;ta.MAX_TEXTURE_MAX_ANISOTROPY_EXT=34047;ta.anisotropySupportTested=
!1;ta.supportsAnisotropy=!1;ta.maxSupportedAnisotropy=256;yk.ALL=17664;yk.COLOR=16384;yk.DEPTH=256;yk.STENCIL=1024;se.ALWAYS=519;se.EQUAL=514;se.GREATER=516;se.GREATER_EQUAL=518;se.LESS=513;se.LESS_EQUAL=515;se.NEVER=512;se.NOT_EQUAL=517;cg.BACK=1028;cg.FRONT=1029;cg.FRONT_AND_BACK=1032;cg.NONE=0;ge.internalFormat=-1;Nc.DEFAULT_TO_STRING="Error";xf.ACTIVITY="activity";Le.LINK="link";Le.TEXT_INPUT="textInput";fe.ERROR="error";ee.FOCUS_IN="focusIn";ee.FOCUS_OUT="focusOut";ee.KEY_FOCUS_CHANGE="keyFocusChange";
ee.MOUSE_FOCUS_CHANGE="mouseFocusChange";Qe.FULL_SCREEN="fullScreen";Qe.FULL_SCREEN_INTERACTIVE_ACCEPTED="fullScreenInteractiveAccepted";bf.DEVICE_ADDED="deviceAdded";bf.DEVICE_REMOVED="deviceRemoved";bf.DEVICE_UNUSABLE="deviceUnusable";dg.HTTP_RESPONSE_STATUS="httpResponseStatus";dg.HTTP_STATUS="httpStatus";$e.IO_ERROR="ioError";Ve.KEY_DOWN="keyDown";Ve.KEY_UP="keyUp";Xa.CLICK="click";Xa.DOUBLE_CLICK="doubleClick";Xa.MIDDLE_CLICK="middleClick";Xa.MIDDLE_MOUSE_DOWN="middleMouseDown";Xa.MIDDLE_MOUSE_UP=
"middleMouseUp";Xa.MOUSE_DOWN="mouseDown";Xa.MOUSE_MOVE="mouseMove";Xa.MOUSE_OUT="mouseOut";Xa.MOUSE_OVER="mouseOver";Xa.MOUSE_UP="mouseUp";Xa.MOUSE_WHEEL="mouseWheel";Xa.RIGHT_CLICK="rightClick";Xa.RIGHT_MOUSE_DOWN="rightMouseDown";Xa.RIGHT_MOUSE_UP="rightMouseUp";Xa.ROLL_OUT="rollOut";Xa.ROLL_OVER="rollOver";Sg.NET_STATUS="netStatus";eg.PROGRESS="progress";eg.SOCKET_DATA="socketData";Tg.SECURITY_ERROR="securityError";pd.TOUCH_BEGIN="touchBegin";pd.TOUCH_END="touchEnd";pd.TOUCH_MOVE="touchMove";
pd.TOUCH_OUT="touchOut";pd.TOUCH_OVER="touchOver";pd.TOUCH_ROLL_OUT="touchRollOut";pd.TOUCH_ROLL_OVER="touchRollOver";pd.TOUCH_TAP="touchTap";Vh.__meta__={fields:{fragment:{fragment:null},get_uMultipliers:{noCompletion:null},set_uMultipliers:{noCompletion:null},get_uOffsets:{noCompletion:null},set_uOffsets:{noCompletion:null}}};Wh.AXIS_ANGLE=0;Wh.EULER_ANGLES=1;Wh.QUATERNION=2;Kd.__registeredSounds=new ma;Ak.CONNECT_SUCCESS="connectSuccess";gc.defaultObjectEncoding=3;Bk.FLUSHED=0;Bk.PENDING=1;Xh.BINARY=
0;Xh.TEXT=1;Xh.VARIABLES=2;Vd.DELETE=0;Vd.GET=1;Vd.HEAD=2;Vd.OPTIONS=3;Vd.POST=4;Vd.PUT=5;Pa.avHardwareDisable=!0;Pa.cpuArchitecture="";Pa.hasAccessibility=!1;Pa.hasAudio=!0;Pa.hasAudioEncoder=!1;Pa.hasEmbeddedVideo=!1;Pa.hasIME=!1;Pa.hasMP3=!1;Pa.hasPrinting=!1;Pa.hasScreenBroadcast=!1;Pa.hasScreenPlayback=!1;Pa.hasStreamingAudio=!1;Pa.hasStreamingVideo=!1;Pa.hasTLS=!0;Pa.hasVideoEncoder=!1;Pa.isDebugger=!1;Pa.isEmbeddedInAcrobat=!1;Pa.localFileReadDisable=!0;Pa.manufacturer="OpenFL Contributors";
Pa.maxLevelIDC=0;Pa.playerType="OpenFL";Pa.screenColor="color";Pa.serverString="";Pa.supports32BitProcesses=!1;Pa.supports64BitProcesses=!1;Pa.touchscreenType=0;Ck.currentDomain=new Ck;Td.useCodePage=!1;Yh.FINGER=0;Yh.NONE=1;Yh.STYLUS=2;Dk.ADVANCED=0;Dk.NORMAL=1;Xc.__registeredFonts=[];Ug.BOLD=0;Ug.BOLD_ITALIC=1;Ug.ITALIC=2;Ug.REGULAR=3;Zh.DEVICE=0;Zh.EMBEDDED=1;Zh.EMBEDDED_CFF=2;$h.NONE=0;$h.PIXEL=1;$h.SUBPIXEL=2;Vg.CENTER=0;Vg.LEFT=1;Vg.NONE=2;Vg.RIGHT=3;Ek.DYNAMIC=0;Ek.INPUT=1;yf.CENTER=0;yf.END=
1;yf.JUSTIFY=2;yf.LEFT=3;yf.RIGHT=4;yf.START=5;gb.isSupported=!0;gb.numDevices=0;gb.__deviceList=[];gb.__devices=new rd;gb.__instances=[];Fk.MAX_BUFFER_SIZE=32E3;Y.NUMBER_0=48;Y.NUMBER_1=49;Y.NUMBER_2=50;Y.NUMBER_3=51;Y.NUMBER_4=52;Y.NUMBER_5=53;Y.NUMBER_6=54;Y.NUMBER_7=55;Y.NUMBER_8=56;Y.NUMBER_9=57;Y.A=65;Y.B=66;Y.C=67;Y.D=68;Y.E=69;Y.F=70;Y.G=71;Y.H=72;Y.I=73;Y.J=74;Y.K=75;Y.L=76;Y.M=77;Y.N=78;Y.O=79;Y.P=80;Y.Q=81;Y.R=82;Y.S=83;Y.T=84;Y.U=85;Y.V=86;Y.W=87;Y.X=88;Y.Y=89;Y.Z=90;Y.NUMPAD_0=96;Y.NUMPAD_1=
97;Y.NUMPAD_2=98;Y.NUMPAD_3=99;Y.NUMPAD_4=100;Y.NUMPAD_5=101;Y.NUMPAD_6=102;Y.NUMPAD_7=103;Y.NUMPAD_8=104;Y.NUMPAD_9=105;Y.NUMPAD_MULTIPLY=106;Y.NUMPAD_ADD=107;Y.NUMPAD_ENTER=108;Y.NUMPAD_SUBTRACT=109;Y.NUMPAD_DECIMAL=110;Y.NUMPAD_DIVIDE=111;Y.F1=112;Y.F2=113;Y.F3=114;Y.F4=115;Y.F5=116;Y.F6=117;Y.F7=118;Y.F8=119;Y.F9=120;Y.F10=121;Y.F11=122;Y.F12=123;Y.F13=124;Y.F14=125;Y.F15=126;Y.BACKSPACE=8;Y.TAB=9;Y.ALTERNATE=18;Y.ENTER=13;Y.COMMAND=15;Y.SHIFT=16;Y.CONTROL=17;Y.BREAK=19;Y.CAPS_LOCK=20;Y.NUMPAD=
21;Y.ESCAPE=27;Y.SPACE=32;Y.PAGE_UP=33;Y.PAGE_DOWN=34;Y.END=35;Y.HOME=36;Y.LEFT=37;Y.RIGHT=39;Y.UP=38;Y.DOWN=40;Y.INSERT=45;Y.DELETE=46;Y.NUMLOCK=144;Y.SEMICOLON=186;Y.EQUAL=187;Y.COMMA=188;Y.MINUS=189;Y.PERIOD=190;Y.SLASH=191;Y.BACKQUOTE=192;Y.LEFTBRACKET=219;Y.BACKSLASH=220;Y.RIGHTBRACKET=221;Y.QUOTE=222;ai.GESTURE=0;ai.NONE=1;ai.TOUCH_POINT=2;bi.DEFLATE=0;bi.LZMA=1;bi.ZLIB=2;Gk.BIG_ENDIAN=0;Gk.LITTLE_ENDIAN=1;ra.landscape=!1;ra.autorotate=!1;ra.scaleMode=0;ra.stageWidth=1024;ra.stageHeight=682;
ra.initSceneID=0;ra.physicsMode=0;ra.gameScale=1;ra.gameImageBase="1x";ra.antialias=!0;ra.pixelsnap=!1;ra.startInFullScreen=!1;ra.adPositionBottom=!0;ra.testAds=!1;ra.whirlID="";ra.whirlID1="";ra.ioswhirlID="";ra.ioswhirlID1="";ra.cpmstarID="";ra.newgroundsID="";ra.newgroundsKey="";ra.releaseMode=!0;ra.showConsole=!1;ra.debugDraw=!1;ra.always1x=!1;ra.maxScale=4;ra.disableBackButton=!1;ra.androidPublicKey="";Qb.main()})("undefined"!=typeof console?console:{log:function(){}},"undefined"!=typeof window?
window:exports);
